From 1a4ccc2d460f252853dfa2fb38b4ea881916713d Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Thu, 1 Apr 2010 16:56:57 +0000 Subject: bnx2: use the dma state API instead of the pci equivalents The DMA API is preferred. Signed-off-by: FUJITA Tomonori Signed-off-by: David S. Miller --- drivers/net/bnx2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net/bnx2.h') diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index cd4b0e4..ab34a5d 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h @@ -6551,17 +6551,17 @@ struct l2_fhdr { struct sw_bd { struct sk_buff *skb; - DECLARE_PCI_UNMAP_ADDR(mapping) + DEFINE_DMA_UNMAP_ADDR(mapping); }; struct sw_pg { struct page *page; - DECLARE_PCI_UNMAP_ADDR(mapping) + DEFINE_DMA_UNMAP_ADDR(mapping); }; struct sw_tx_bd { struct sk_buff *skb; - DECLARE_PCI_UNMAP_ADDR(mapping) + DEFINE_DMA_UNMAP_ADDR(mapping); unsigned short is_gso; unsigned short nr_frags; }; -- cgit v1.1 From a33fa66bcf365ffe5b79d1ae1d3582cc261ae56e Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Thu, 6 May 2010 08:58:13 +0000 Subject: bnx2: Add prefetches to rx path. Add prefetches of the skb and the next rx descriptor to speed up rx path. Use prefetchw() for the skb [suggested by Eric Dumazet]. The rx descriptor is in skb->data which is mapped for streaming mode DMA. Eric Dumazet pointed out that we should not prefetch the data before dma_sync. So we prefetch only if dma_sync is no_op on the system. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/bnx2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/bnx2.h') diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index ab34a5d..dd35bd0 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h @@ -6551,6 +6551,7 @@ struct l2_fhdr { struct sw_bd { struct sk_buff *skb; + struct l2_fhdr *desc; DEFINE_DMA_UNMAP_ADDR(mapping); }; -- cgit v1.1 From b98eba52784fbd4a96241c5395c2c8d99fdb9433 Mon Sep 17 00:00:00 2001 From: Eddie Wai Date: Mon, 17 May 2010 17:32:56 -0700 Subject: bnx2: Fix register printouts during NETEV_WATCHDOG. Dump the correct MCP registers and add EMAC_RX_STATUS register during NETDEV_WATCHDOG for debugging. Signed-off-by: Eddie Wai Signed-off-by: Benjamin Li Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/bnx2.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/bnx2.h') diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index dd35bd0..ddaa3fc 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h @@ -6347,6 +6347,8 @@ struct l2_fhdr { #define BNX2_MCP_SCRATCH 0x00160000 #define BNX2_MCP_STATE_P1 0x0016f9c8 #define BNX2_MCP_STATE_P0 0x0016fdc8 +#define BNX2_MCP_STATE_P1_5708 0x001699c8 +#define BNX2_MCP_STATE_P0_5708 0x00169dc8 #define BNX2_SHM_HDR_SIGNATURE BNX2_MCP_SCRATCH #define BNX2_SHM_HDR_SIGNATURE_SIG_MASK 0xffff0000 -- cgit v1.1