Message ID | 87ppk1q3iq.fsf@schwinge.name (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi! On Mon, 28 Apr 2014 10:09:17 +0200, I wrote: > On Sun, 27 Apr 2014 15:55:29 -0400, Jerome Glisse <j.glisse@gmail.com> wrote: > > If my ugly patch works does this quirk also work ? > > Unfortunately they both don't; see my other email, > <http://news.gmane.org/find-root.php?message_id=%3C87sioxq3rx.fsf%40schwinge.name%3E>. > [...] hacked around as follows: [...] > If needed, I can try to capture more data, but someone who has knowledge > of PCI bus architecture and Linux kernel code (so, not me), might > probably already see what's wrong. The problem "solved itself": the machine recently died of hardware failure. ;-| Grüße, Thomas
diff --git drivers/pci/quirks.c drivers/pci/quirks.c index f025867..33aaad2 100644 --- drivers/pci/quirks.c +++ drivers/pci/quirks.c @@ -2452,6 +2452,8 @@ u64 pci_ht_quirk_dma_32bit_only(struct pci_dev *dev, u64 mask) struct pci_dev *bridge = bus->self; int pos; + if (!bridge) + goto skip; pos = pci_find_ht_capability(bridge, HT_CAPTYPE_SLAVE); if (pos) { int ctrl_off; @@ -2472,6 +2474,7 @@ u64 pci_ht_quirk_dma_32bit_only(struct pci_dev *dev, u64 mask) return 0xffffffff; } } + skip: bus = bus->parent; } while (bus); return mask;
Hi! On Sun, 27 Apr 2014 15:55:29 -0400, Jerome Glisse <j.glisse@gmail.com> wrote: > If my ugly patch works does this quirk also work ? Unfortunately they both don't; see my other email, <http://news.gmane.org/find-root.php?message_id=%3C87sioxq3rx.fsf%40schwinge.name%3E>. Also, the quirk patch resulted in a NULL pointer dereference in pci_find_ht_capability+0x4/0x30, which I hacked around as follows: If needed, I can try to capture more data, but someone who has knowledge of PCI bus architecture and Linux kernel code (so, not me), might probably already see what's wrong. Grüße, Thomas