History

Merge branch 'bnxt_en-error-recovery-bug-fixes'

Michael Chan says: ==================== bnxt_en: Error recovery bug fixes. Two error recovery related bug fixes for 2 corner cases. Please queue patch #2 for -stable. Thanks. ====================

Jakub Kicinski committed 5 years ago

Commit eee7ede2 parents 82adc45 20d7d1c1 file · +15 −2Browse files

Unified · Split

drivers/net/ethernet/broadcom/bnxt/bnxt.c+15−2
@@ -8556,10 +8556,18 @@ static void bnxt_setup_inta(struct bnxt *bp) · 8555 unmodified lines
85568556 bp->irq_tbl[0].handler = bnxt_inta;
85578557 }
85588558
8559+static int bnxt_init_int_mode(struct bnxt *bp);
8560+
85598561 static int bnxt_setup_int_mode(struct bnxt *bp)
85608562 {
85618563 int rc;
85628564
8565+ if (!bp->irq_tbl) {
8566+ rc = bnxt_init_int_mode(bp);
8567+ if (rc || !bp->irq_tbl)
8568+ return rc ?: -ENODEV;
8569+ }
8570+
85638571 if (bp->flags & BNXT_FLAG_USING_MSIX)
85648572 bnxt_setup_msix(bp);
85658573 else
@@ -8744,7 +8752,7 @@ static int bnxt_init_inta(struct bnxt *bp) · 178 unmodified lines
87448752
87458753 static int bnxt_init_int_mode(struct bnxt *bp)
87468754 {
8747− int rc = 0;
8755+ int rc = -ENODEV;
87488756
87498757 if (bp->flags & BNXT_FLAG_MSIX_CAP)
87508758 rc = bnxt_init_msix(bp);
@@ -9514,7 +9522,8 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) · 763 unmodified lines
95149522 {
95159523 struct hwrm_func_drv_if_change_output *resp = bp->hwrm_cmd_resp_addr;
95169524 struct hwrm_func_drv_if_change_input req = {0};
9517− bool resc_reinit = false, fw_reset = false;
9525+ bool fw_reset = !bp->irq_tbl;
9526+ bool resc_reinit = false;
95189527 int rc, retry = 0;
95199528 u32 flags = 0;
95209529
@@ -9557,6 +9566,7 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) · 36 unmodified lines
95579566
95589567 if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state) && !fw_reset) {
95599568 netdev_err(bp->dev, "RESET_DONE not set during FW reset.\n");
9569+ set_bit(BNXT_STATE_ABORT_ERR, &bp->state);
95609570 return -ENODEV;
95619571 }
95629572 if (resc_reinit || fw_reset) {
@@ -9890,6 +9900,9 @@ static int bnxt_reinit_after_abort(struct bnxt *bp) · 327 unmodified lines
98909900 if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
98919901 return -EBUSY;
98929902
9903+ if (bp->dev->reg_state == NETREG_UNREGISTERED)
9904+ return -ENODEV;
9905+
98939906 rc = bnxt_fw_init_one(bp);
98949907 if (!rc) {
98959908 bnxt_clear_int_mode(bp);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t