diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt.c')
| -rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 6a512871176b..d95730c6e0f2 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c | |||
| @@ -3903,7 +3903,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len, | |||
| 3903 | if (len) | 3903 | if (len) |
| 3904 | break; | 3904 | break; |
| 3905 | /* on first few passes, just barely sleep */ | 3905 | /* on first few passes, just barely sleep */ |
| 3906 | if (i < DFLT_HWRM_CMD_TIMEOUT) | 3906 | if (i < HWRM_SHORT_TIMEOUT_COUNTER) |
| 3907 | usleep_range(HWRM_SHORT_MIN_TIMEOUT, | 3907 | usleep_range(HWRM_SHORT_MIN_TIMEOUT, |
| 3908 | HWRM_SHORT_MAX_TIMEOUT); | 3908 | HWRM_SHORT_MAX_TIMEOUT); |
| 3909 | else | 3909 | else |
| @@ -3926,7 +3926,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len, | |||
| 3926 | dma_rmb(); | 3926 | dma_rmb(); |
| 3927 | if (*valid) | 3927 | if (*valid) |
| 3928 | break; | 3928 | break; |
| 3929 | udelay(1); | 3929 | usleep_range(1, 5); |
| 3930 | } | 3930 | } |
| 3931 | 3931 | ||
| 3932 | if (j >= HWRM_VALID_BIT_DELAY_USEC) { | 3932 | if (j >= HWRM_VALID_BIT_DELAY_USEC) { |
| @@ -4973,12 +4973,18 @@ static int bnxt_hwrm_ring_alloc(struct bnxt *bp) | |||
| 4973 | struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; | 4973 | struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; |
| 4974 | struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; | 4974 | struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; |
| 4975 | u32 map_idx = ring->map_idx; | 4975 | u32 map_idx = ring->map_idx; |
| 4976 | unsigned int vector; | ||
| 4976 | 4977 | ||
| 4978 | vector = bp->irq_tbl[map_idx].vector; | ||
| 4979 | disable_irq_nosync(vector); | ||
| 4977 | rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx); | 4980 | rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx); |
| 4978 | if (rc) | 4981 | if (rc) { |
| 4982 | enable_irq(vector); | ||
| 4979 | goto err_out; | 4983 | goto err_out; |
| 4984 | } | ||
| 4980 | bnxt_set_db(bp, &cpr->cp_db, type, map_idx, ring->fw_ring_id); | 4985 | bnxt_set_db(bp, &cpr->cp_db, type, map_idx, ring->fw_ring_id); |
| 4981 | bnxt_db_nq(bp, &cpr->cp_db, cpr->cp_raw_cons); | 4986 | bnxt_db_nq(bp, &cpr->cp_db, cpr->cp_raw_cons); |
| 4987 | enable_irq(vector); | ||
| 4982 | bp->grp_info[i].cp_fw_ring_id = ring->fw_ring_id; | 4988 | bp->grp_info[i].cp_fw_ring_id = ring->fw_ring_id; |
| 4983 | 4989 | ||
| 4984 | if (!i) { | 4990 | if (!i) { |
