Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Dan Carpenter
On Thu, Nov 21, 2013 at 09:19:21PM +, Mark Einon wrote: On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls function et131x_send_packets, I put the work of

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Denis Kirjanov
On 11/22/13, Mark Einon mark.ei...@gmail.com wrote: On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls function et131x_send_packets, I put the work of et131x_send_packets directly

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 5:17 PM, Denis Kirjanov kirja...@gmail.com wrote: On 11/22/13, Mark Einon mark.ei...@gmail.com wrote: On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Denis Kirjanov
If you have no free TX descriptors that means that something went wrong and it's a BUG. You have to tell the stack to stop sending packets using netif_stop_queue() and reenable transmissions once tx descriptors will be available. There are a lot of live examples in the source tree. On 11/22/13,

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 7:56 PM, Denis Kirjanov kirja...@gmail.com wrote: If you have no free TX descriptors that means that something went wrong and it's a BUG. You have to tell the stack to stop sending packets using netif_stop_queue() and reenable transmissions once tx descriptors will be

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-21 Thread Mark Einon
On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls function et131x_send_packets, I put the work of et131x_send_packets directly into et131x_tx, and made some changes to let the code