mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
[PATCH] sky2: don't bother clearing status ring elements
Don't need to zero out the status ring entries after processing. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
parent
762c2de2e6
commit
dc4d5ea221
1 changed files with 2 additions and 5 deletions
|
@ -1825,7 +1825,6 @@ static int sky2_poll(struct net_device *dev0, int *budget)
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
u32 status;
|
u32 status;
|
||||||
u16 length;
|
u16 length;
|
||||||
u8 op;
|
|
||||||
|
|
||||||
le = hw->st_le + hw->st_idx;
|
le = hw->st_le + hw->st_idx;
|
||||||
hw->st_idx = (hw->st_idx + 1) % STATUS_RING_SIZE;
|
hw->st_idx = (hw->st_idx + 1) % STATUS_RING_SIZE;
|
||||||
|
@ -1839,10 +1838,8 @@ static int sky2_poll(struct net_device *dev0, int *budget)
|
||||||
sky2 = netdev_priv(dev);
|
sky2 = netdev_priv(dev);
|
||||||
status = le32_to_cpu(le->status);
|
status = le32_to_cpu(le->status);
|
||||||
length = le16_to_cpu(le->length);
|
length = le16_to_cpu(le->length);
|
||||||
op = le->opcode & ~HW_OWNER;
|
|
||||||
le->opcode = 0;
|
|
||||||
|
|
||||||
switch (op) {
|
switch (le->opcode & ~HW_OWNER) {
|
||||||
case OP_RXSTAT:
|
case OP_RXSTAT:
|
||||||
skb = sky2_receive(sky2, length, status);
|
skb = sky2_receive(sky2, length, status);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
|
@ -1890,7 +1887,7 @@ static int sky2_poll(struct net_device *dev0, int *budget)
|
||||||
default:
|
default:
|
||||||
if (net_ratelimit())
|
if (net_ratelimit())
|
||||||
printk(KERN_WARNING PFX
|
printk(KERN_WARNING PFX
|
||||||
"unknown status opcode 0x%x\n", op);
|
"unknown status opcode 0x%x\n", le->opcode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue