Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92947 - [g-d-s]: outdated libata promise_sata patch causes kernel panics!
Summary: [g-d-s]: outdated libata promise_sata patch causes kernel panics!
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-17 10:05 UTC by John D
Modified: 2005-05-31 16:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John D 2005-05-17 10:05:02 UTC
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.
Comment 1 John Mylchreest (RETIRED) gentoo-dev 2005-05-17 11:28:23 UTC
fixed in hardened-sources, code looks good.
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2005-05-17 13:24:58 UTC
Are you sure it can replace patch 4315? 4315 is a new driver for PDC2027x...
Comment 3 John D 2005-05-17 14:44:09 UTC
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 ;-)
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2005-05-17 15:24:37 UTC
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.
Comment 5 John D 2005-05-17 17:54:39 UTC
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?
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2005-05-18 03:08:23 UTC
Yes, quite possibly. If you leave 4315 in place, reverse out 4320 and apply
yours, does the issue go away?
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2005-05-31 16:14:43 UTC
Please reopen when you can try comment #6