On 18.05.2011 10:44, Stefano Babic wrote: > Drivers that do not have TX inside an interrupt handler must > call this function that replaces netif_rx with netif_rx_ni. > > Signed-off-by: Stefano Babic <[email protected]> > ---
Acked-by: Oliver Hartkopp <[email protected]> What should be done with this patch now? 1. It could be committed to the SocketCAN SVN on BerliOS 2. It could be posted on netdev-ml While '1' is easy to do, i wonder if this function would be added to mainline without any user. IMHO the correct way would be to add this patch to the mainline tree when you also add the 'user' of this patch - e.g. your SPI-based CAN driver, right? I don't know if it's worth a try to add this function without a consumer ?!? Regards, Oliver > drivers/net/can/dev.c | 13 +++++++++++++ > include/linux/can/dev.h | 1 + > 2 files changed, 14 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c > index d0f8c7e..e3e6101 100644 > --- a/drivers/net/can/dev.c > +++ b/drivers/net/can/dev.c > @@ -328,6 +328,19 @@ void can_get_echo_skb(struct net_device *dev, unsigned > int idx) > } > EXPORT_SYMBOL_GPL(can_get_echo_skb); > > +void can_get_echo_skb_ni(struct net_device *dev, unsigned int idx) > +{ > + struct can_priv *priv = netdev_priv(dev); > + > + BUG_ON(idx >= priv->echo_skb_max); > + > + if (priv->echo_skb[idx]) { > + netif_rx_ni(priv->echo_skb[idx]); > + priv->echo_skb[idx] = NULL; > + } > +} > +EXPORT_SYMBOL_GPL(can_get_echo_skb_ni); > + > /* > * Remove the skb from the stack and free it. > * > diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h > index cc0bb49..5b99f78 100644 > --- a/include/linux/can/dev.h > +++ b/include/linux/can/dev.h > @@ -94,6 +94,7 @@ void can_bus_off(struct net_device *dev); > void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, > unsigned int idx); > void can_get_echo_skb(struct net_device *dev, unsigned int idx); > +void can_get_echo_skb_ni(struct net_device *dev, unsigned int idx); > void can_free_echo_skb(struct net_device *dev, unsigned int idx); > > struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf); _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
