]> git.baikalelectronics.ru Git - kernel.git/commit
net/ps3: Fix gelic RX DMA restart
authorGeoff Levand <geoff@infradead.org>
Thu, 14 Jul 2011 23:03:29 +0000 (16:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Jul 2011 23:03:29 +0000 (16:03 -0700)
commit151405fa782db32503a9d1e47c8167cc3e5e925c
tree5f02677e563e83f2296ebb8632f7eecb57e15fea
parentf7d0cd6ed7c3fca054e6ae2f083b3b300fae1d9b
net/ps3: Fix gelic RX DMA restart

Fix the condition where PS3 network RX hangs when no network
TX is occurring by calling gelic_card_enable_rxdmac() during
RX_DMA_CHAIN_END event processing.

The gelic hardware automatically clears its RX_DMA_EN flag when
it detects an RX_DMA_CHAIN_END event.  In its processing of
RX_DMA_CHAIN_END the gelic driver is required to set RX_DMA_EN
(with a call to gelic_card_enable_rxdmac()) to restart RX DMA
transfers.  The existing gelic driver code does not set
RX_DMA_EN directly in its processing of the RX_DMA_CHAIN_END
event, but uses a flag variable card->rx_dma_restart_required
to schedule the setting of RX_DMA_EN until next inside the
interrupt handler.

It seems this delayed setting of RX_DMA_EN causes the hang since
the next RX interrupt after the RX_DMA_CHAIN_END event where
RX_DMA_EN is scheduled to be set will not occur since RX_DMA_EN
was not set.  In the case were network TX is occuring, RX_DMA_EN
is set in the next TX interrupt and RX processing continues.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ps3_gelic_net.c
drivers/net/ps3_gelic_net.h