Thread (5 messages) 5 messages, 2 authors, 2017-02-09

Re: pull-request: can-next 2017-02-06,pull-request: can-next 2017-02-06,Re: pull-request: can-next 2017-02-06,pull-request: can-next 2017-02-06

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2017-02-09 10:11:37
Also in: netdev

On 02/06/2017 05:59 PM, David Miller wrote:
Sure but what about these "can_rx_offload_le()" comparisons?
This is to scan the mailboxes according to priority. On some CAN IP
cores the mailboxes decrease in priority (0=high, 63=low) some increase
(63=high, 0=low). The can_rx_offload_le() (le means less or equal) and
can_rx_offload_inc() functions are used to abstract the order. We always
only scan from highest to lower prio (offload->mb_first ...
offload->mb_last):
	for (i = offload->mb_first;
	     can_rx_offload_le(offload, i, offload->mb_last);
	     can_rx_offload_inc(offload, &i)) {
So we never wrap around.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help