Re: [REGRESSION][BISECTED] 5.15-rc1: Broken AHCI on NVIDIA ION (MCP79)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/21 15:07, Jason Andryuk wrote:
> On Tue, Oct 12, 2021 at 2:09 AM Josef Johansson <josef@xxxxxxxxxxx> wrote:
>> On 10/11/21 21:34, Josef Johansson wrote:
>>> On 10/11/21 20:47, Josef Johansson wrote:
>>>> More can be read over at freedesktop:
>>>> https://gitlab.freedesktop.org/drm/amd/-/issues/1715
> Hi, Josef,
>
> If you compare
> commit fcacdfbef5a1633211ebfac1b669a7739f5b553e "PCI/MSI: Provide a
> new set of mask and unmask functions"
> and
> commit 446a98b19fd6da97a1fb148abb1766ad89c9b767 "PCI/MSI: Use new
> mask/unmask functions" some of the replacement functions in 446198b1
> no longer exit early for the pci_msi_ignore_mask flag.
>
> Josef, I'd recommend you try adding pci_msi_ignore_mask checks to the
> new functions in fcacdfbef5a to see if that helps.
>
> There was already a pci_msi_ignore_mask fixup in commit
> 1a519dc7a73c977547d8b5108d98c6e769c89f4b "PCI/MSI: Skip masking MSI-X
> on Xen PV" though the kernel was crashing in that case.
>
> Regards,
> Jason

Hi Jason,

Makes sense. I am compiling now, will try it as soon as it's done.

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 0099a00af361..620928fd0065 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -148,6 +148,9 @@ static noinline void pci_msi_update_mask(struct
msi_desc *desc, u32 clear, u32 s
     raw_spinlock_t *lock = &desc->dev->msi_lock;
     unsigned long flags;
 
+    if (pci_msi_ignore_mask)
+        return;
+
     raw_spin_lock_irqsave(lock, flags);
     desc->msi_mask &= ~clear;
     desc->msi_mask |= set;
@@ -179,6 +182,9 @@ static inline void __iomem
*pci_msix_desc_addr(struct msi_desc *desc)
  */
 static void pci_msix_write_vector_ctrl(struct msi_desc *desc, u32 ctrl)
 {
+    if (pci_msi_ignore_mask)
+        return;
+
     void __iomem *desc_addr = pci_msix_desc_addr(desc);
 
     writel(ctrl, desc_addr + PCI_MSIX_ENTRY_VECTOR_CTRL);
@@ -186,6 +192,9 @@ static void pci_msix_write_vector_ctrl(struct
msi_desc *desc, u32 ctrl)
 
 static inline void pci_msix_mask(struct msi_desc *desc)
 {
+    if (pci_msi_ignore_mask)
+        return;
+
     desc->msix_ctrl |= PCI_MSIX_ENTRY_CTRL_MASKBIT;
     pci_msix_write_vector_ctrl(desc, desc->msix_ctrl);
     /* Flush write to device */
@@ -194,6 +203,9 @@ static inline void pci_msix_mask(struct msi_desc *desc)
 
 static inline void pci_msix_unmask(struct msi_desc *desc)
 {
+    if (pci_msi_ignore_mask)
+        return;
+
     desc->msix_ctrl &= ~PCI_MSIX_ENTRY_CTRL_MASKBIT;
     pci_msix_write_vector_ctrl(desc, desc->msix_ctrl);
 }




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux