Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #73724

Bug#999820:

From Rich <rincebrain@gmail.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#999820:
Date 2021-11-19 09:10 +0100
Message-ID <Dl785-7aP-3@gated-at.bofh.it> (permalink)
References <DkneW-3Ts-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


I found the following patch generated against 5.14.0 helps and hasn't
burned the house down in testing so far.

---

diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 860644d182ab..70c08acd3ee5 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -9034,16 +9034,20 @@ static void niu_try_msix(struct niu *np, u8
*ldg_num_map)
                msi_vec[i].entry = i;
        }

-       num_irqs = pci_enable_msix_range(pdev, msi_vec, 1, num_irqs);
+       if (np->num_ldg == 0)
+               num_irqs = pci_enable_msix_range(pdev, msi_vec, 1, num_irqs);
+
        if (num_irqs < 0) {
                np->flags &= ~NIU_FLAGS_MSIX;
                return;
        }

        np->flags |= NIU_FLAGS_MSIX;
-       for (i = 0; i < num_irqs; i++)
-               np->ldg[i].irq = msi_vec[i].vector;
-       np->num_ldg = num_irqs;
+       if (np->num_ldg == 0) {
+               for (i = 0; i < num_irqs; i++)
+                       np->ldg[i].irq = msi_vec[i].vector;
+               np->num_ldg = num_irqs;
+       }
 }

 static int niu_n2_irq_init(struct niu *np, u8 *ldg_num_map)

---

(I obviously haven't tested it on hardware other than the broken setup.)

I'll try using this for a bit and see if it unexpectedly burns the house down.

Back to linux.debian.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#999820: linux-image-5.14.0-4-sparc64-smp: kernel fails to boot with niu driver enabled on recent kernels Rich Ercolani <rincebrain@gmail.com> - 2021-11-17 08:10 +0100
  Bug#999820:  Rich <rincebrain@gmail.com> - 2021-11-19 09:10 +0100
    Bug#999820:  Rich <rincebrain@gmail.com> - 2021-11-19 09:30 +0100
      Bug#999820:  Rich <rincebrain@gmail.com> - 2021-11-19 23:00 +0100

csiph-web