Commit be7fa326 authored by Rasesh Mody's avatar Rasesh Mody Committed by David S. Miller

bna: TxRx and datapath fix

Change Details:
	- Check HW ready condition before accessing h/w register in data-path
	- Postpone clean-up of data buffers to the data-path restart path and
	wait in the cleanup routines for in-flight DMA to complete
	- Separate out Tx completion processing from Rx poll routine
Signed-off-by: default avatarDebashis Dutt <ddutt@brocade.com>
Signed-off-by: default avatarRasesh Mody <rmody@brocade.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e1928c86
This diff is collapsed.
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
*/ */
struct bnad_rx_ctrl { struct bnad_rx_ctrl {
struct bna_ccb *ccb; struct bna_ccb *ccb;
unsigned long flags;
struct napi_struct napi; struct napi_struct napi;
}; };
...@@ -82,6 +83,7 @@ struct bnad_rx_ctrl { ...@@ -82,6 +83,7 @@ struct bnad_rx_ctrl {
/* Bit positions for tcb->flags */ /* Bit positions for tcb->flags */
#define BNAD_TXQ_FREE_SENT 0 #define BNAD_TXQ_FREE_SENT 0
#define BNAD_TXQ_TX_STARTED 1
/* Bit positions for rcb->flags */ /* Bit positions for rcb->flags */
#define BNAD_RXQ_REFILL 0 #define BNAD_RXQ_REFILL 0
...@@ -199,12 +201,12 @@ struct bnad_unmap_q { ...@@ -199,12 +201,12 @@ struct bnad_unmap_q {
/* Set, tested & cleared using xxx_bit() functions */ /* Set, tested & cleared using xxx_bit() functions */
/* Values indicated bit positions */ /* Values indicated bit positions */
#define BNAD_RF_CEE_RUNNING 1 #define BNAD_RF_CEE_RUNNING 1
#define BNAD_RF_HW_ERROR 2 #define BNAD_RF_MBOX_IRQ_DISABLED 2
#define BNAD_RF_MBOX_IRQ_DISABLED 3 #define BNAD_RF_RX_STARTED 3
#define BNAD_RF_TX_STARTED 4 #define BNAD_RF_DIM_TIMER_RUNNING 4
#define BNAD_RF_RX_STARTED 5 #define BNAD_RF_STATS_TIMER_RUNNING 5
#define BNAD_RF_DIM_TIMER_RUNNING 6 #define BNAD_RF_TX_SHUTDOWN_DELAYED 6
#define BNAD_RF_STATS_TIMER_RUNNING 7 #define BNAD_RF_RX_SHUTDOWN_DELAYED 7
struct bnad { struct bnad {
struct net_device *netdev; struct net_device *netdev;
...@@ -320,9 +322,11 @@ extern void bnad_netdev_hwstats_fill(struct bnad *bnad, struct rtnl_link_stats64 ...@@ -320,9 +322,11 @@ extern void bnad_netdev_hwstats_fill(struct bnad *bnad, struct rtnl_link_stats64
#define bnad_enable_rx_irq_unsafe(_ccb) \ #define bnad_enable_rx_irq_unsafe(_ccb) \
{ \ { \
bna_ib_coalescing_timer_set((_ccb)->i_dbell, \ if (likely(test_bit(BNAD_RXQ_STARTED, &ccb->rcb[0]->flags))) {\
(_ccb)->rx_coalescing_timeo); \ bna_ib_coalescing_timer_set((_ccb)->i_dbell, \
bna_ib_ack((_ccb)->i_dbell, 0); \ (_ccb)->rx_coalescing_timeo); \
bna_ib_ack((_ccb)->i_dbell, 0); \
} \
} }
#define bnad_dim_timer_running(_bnad) \ #define bnad_dim_timer_running(_bnad) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment