diff options
author | Rasesh Mody <rmody@brocade.com> | 2010-12-23 16:45:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-25 22:15:59 -0500 |
commit | be7fa3263a15d3f278c3bfbf606ec169aaa3a920 (patch) | |
tree | 758dca8183d4d5643dd23547bc470b38a15a8579 /drivers/net/bna/bnad.h | |
parent | e1928c86c4829703b800c81cc9edc939b5634e6f (diff) |
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: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bna/bnad.h')
-rw-r--r-- | drivers/net/bna/bnad.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/net/bna/bnad.h b/drivers/net/bna/bnad.h index ebc3a9078642..f59685a5543d 100644 --- a/drivers/net/bna/bnad.h +++ b/drivers/net/bna/bnad.h | |||
@@ -51,6 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | struct bnad_rx_ctrl { | 52 | struct bnad_rx_ctrl { |
53 | struct bna_ccb *ccb; | 53 | struct bna_ccb *ccb; |
54 | unsigned long flags; | ||
54 | struct napi_struct napi; | 55 | struct napi_struct napi; |
55 | }; | 56 | }; |
56 | 57 | ||
@@ -82,6 +83,7 @@ struct bnad_rx_ctrl { | |||
82 | 83 | ||
83 | /* Bit positions for tcb->flags */ | 84 | /* Bit positions for tcb->flags */ |
84 | #define BNAD_TXQ_FREE_SENT 0 | 85 | #define BNAD_TXQ_FREE_SENT 0 |
86 | #define BNAD_TXQ_TX_STARTED 1 | ||
85 | 87 | ||
86 | /* Bit positions for rcb->flags */ | 88 | /* Bit positions for rcb->flags */ |
87 | #define BNAD_RXQ_REFILL 0 | 89 | #define BNAD_RXQ_REFILL 0 |
@@ -199,12 +201,12 @@ struct bnad_unmap_q { | |||
199 | /* Set, tested & cleared using xxx_bit() functions */ | 201 | /* Set, tested & cleared using xxx_bit() functions */ |
200 | /* Values indicated bit positions */ | 202 | /* Values indicated bit positions */ |
201 | #define BNAD_RF_CEE_RUNNING 1 | 203 | #define BNAD_RF_CEE_RUNNING 1 |
202 | #define BNAD_RF_HW_ERROR 2 | 204 | #define BNAD_RF_MBOX_IRQ_DISABLED 2 |
203 | #define BNAD_RF_MBOX_IRQ_DISABLED 3 | 205 | #define BNAD_RF_RX_STARTED 3 |
204 | #define BNAD_RF_TX_STARTED 4 | 206 | #define BNAD_RF_DIM_TIMER_RUNNING 4 |
205 | #define BNAD_RF_RX_STARTED 5 | 207 | #define BNAD_RF_STATS_TIMER_RUNNING 5 |
206 | #define BNAD_RF_DIM_TIMER_RUNNING 6 | 208 | #define BNAD_RF_TX_SHUTDOWN_DELAYED 6 |
207 | #define BNAD_RF_STATS_TIMER_RUNNING 7 | 209 | #define BNAD_RF_RX_SHUTDOWN_DELAYED 7 |
208 | 210 | ||
209 | struct bnad { | 211 | struct bnad { |
210 | struct net_device *netdev; | 212 | struct net_device *netdev; |
@@ -320,9 +322,11 @@ extern void bnad_netdev_hwstats_fill(struct bnad *bnad, struct rtnl_link_stats64 | |||
320 | 322 | ||
321 | #define bnad_enable_rx_irq_unsafe(_ccb) \ | 323 | #define bnad_enable_rx_irq_unsafe(_ccb) \ |
322 | { \ | 324 | { \ |
323 | bna_ib_coalescing_timer_set((_ccb)->i_dbell, \ | 325 | if (likely(test_bit(BNAD_RXQ_STARTED, &ccb->rcb[0]->flags))) {\ |
324 | (_ccb)->rx_coalescing_timeo); \ | 326 | bna_ib_coalescing_timer_set((_ccb)->i_dbell, \ |
325 | bna_ib_ack((_ccb)->i_dbell, 0); \ | 327 | (_ccb)->rx_coalescing_timeo); \ |
328 | bna_ib_ack((_ccb)->i_dbell, 0); \ | ||
329 | } \ | ||
326 | } | 330 | } |
327 | 331 | ||
328 | #define bnad_dim_timer_running(_bnad) \ | 332 | #define bnad_dim_timer_running(_bnad) \ |