From 2.6.10, gentoo[-dev]-sources has included patches to support the PATA ports on the Promise PDC20378 chipset. These are patches number 4315 and 4320. Since 2.6.11, these patches no longer work, and causes an Invalid Operand kernel panic upon detecting PATA drives. The updated patch for 2.6.11 can be found at https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=113505&action=view 4315 and 4320 should both be removed, as their functionality is combined into this new patch. I can confirm that this patch does indeed work properly :) Reproducible: Always Steps to Reproduce: 1. 2. 3.
fixed in hardened-sources, code looks good.
Are you sure it can replace patch 4315? 4315 is a new driver for PDC2027x...
Yeah, I'm sure. This patch contains the updated versions of both 4315 AND 4320... about halfway down, it starts patching sata_promise.c If you try to keep in 4315, the patch will fail ;-)
I doubt that is correct. 4315 adds support for new devices, as shown by: +static struct pci_device_id pdc2027x_pci_tbl[] = { +#ifdef ATA_ENABLE_PATA + { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20268, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_100 }, + { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20269, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, + { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20270, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_100 }, + { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20271, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, + { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20275, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, + { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20276, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, + { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20277, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, +#endif + { } /* terminate list */ +}; None of these are present inside the patch you posted. Also, there is only one tiny difference between the patch you posted, and 4320. 4320: case board_2037x: - probe_ent->n_ports = 2; + /* Some boards have also PATA port */ + tmp = readb(base + PDC_FLASH_CTL+1); + if (!(tmp & 0x80)) + { + probe_ent->n_ports = 3; Yours: case board_2037x: - probe_ent->n_ports = 2; + /* Some boards have also PATA port */ + tmp = readb(mmio_base + PDC_FLASH_CTL+1); // this line changed + if (!(tmp & 0x80)) + { + probe_ent->n_ports = 3; I think they (4315, then yours) will apply fine if you keep them in the original order. Maybe a rediff is necessary - but they are pretty much identical.
Well, Daniel, I'm not going to PRETEND to know what I'm talking about when it comes to kernel patches! You're the expert in that field. All I can say is, with gentoo-sources 2.6.11-r* I get kernel panics about invalid operands, but not if I reverse 4315,4320, then apply the redhat patch. This never happend with g-d-s 2.6.10-r*. Would that changed line influence a panic?
Yes, quite possibly. If you leave 4315 in place, reverse out 4320 and apply yours, does the issue go away?
Please reopen when you can try comment #6