|
|
Re: [PATCH 2/9] atl1: make driver napi compatible |
From: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>
Date: Fri, 13 Apr 2012 18:15:15 +0100
> On Fri, 2012-04-13 at 20:09 +0400, Tony Zelenoff wrote:
>> This is first step, here there is no fine interrupt
>> disabling which cause TX/ERR interrupts stalling when
>> RX scheduled ints processed.
>>
>> Signed-off-by: Tony Zelenoff <antonz@xxxxxxxxxxxxx>
>> ---
>> drivers/net/ethernet/atheros/atlx/atl1.c | 46 ++++++++++++++++++++++++++----
>> drivers/net/ethernet/atheros/atlx/atl1.h | 1 +
>> 2 files changed, 41 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
>> index 6438239..d39c1b9 100644
>> --- a/drivers/net/ethernet/atheros/atlx/atl1.c
>> +++ b/drivers/net/ethernet/atheros/atlx/atl1.c
>> @@ -1917,7 +1917,7 @@ next:
>> return num_alloc;
>> }
>>
>> -static void atl1_intr_rx(struct atl1_adapter *adapter)
>> +static int atl1_intr_rx(struct atl1_adapter *adapter, int budget)
>> {
>> int i, count;
>> u16 length;
>> @@ -1933,7 +1933,7 @@ static void atl1_intr_rx(struct atl1_adapter *adapter)
>>
>> rrd_next_to_clean = atomic_read(&rrd_ring->next_to_clean);
>>
>> - while (1) {
>> + while (count <= budget) {
> [...]
>
> Off by one; the test should be count < budget. Otherwise you can exit
> with count == budget + 1 and net_rx_action() will WARN you about that.
Right, this needs to be fixed up.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]
![]() |
![]() |