pch_gbe: don't reset MAC_RX on FIFO overflow
authorVeaceslav Falico <vfalico@redhat.com>
Mon, 22 Oct 2012 04:43:25 +0000 (04:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Oct 2012 06:31:15 +0000 (02:31 -0400)
commita35279f002c5843c2b2faaa4538963c8eb18446c
tree3b5c10e54ffcc850363f1018075668b455bc82e9
parent9c0314e111a540620441b27aeedb55f572f812f5
pch_gbe: don't reset MAC_RX on FIFO overflow

Currently, when FIFO_ERR happens, we stop the dma, wait for it to become
idle and then reset the whole MAC_RX logic (and after that we must re-set
multicast addresses and also re-enable MAC_RX when we're finally ready to
accept new packets). This leads to CRC errors on high number of incoming
packets and is not needed according to the datasheet.

This patch fixes it by the following steps:

1) remove this reset in pch_gbe_stop_receive(), which causes some functions
to not be used anywhere
2) remove already unused functions pch_gbe_wait_clr_bit_irq() and
pch_gbe_mac_reset_rx() to correctly build
3) move pch_gbe_enable_mac_rx() out of pch_gbe_start_receive() to
pch_gbe_up() where it's only needed after we've removed the MAC_RX reset
4) rename pch_gbe_start/stop_receive() to pch_gbe_enable/disable_dma_rx()
to more precisely reflect what the functions are now doing.

After these changes we already don't see the CRC errors and gain some
increase in RX processing speed.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c