4 Nov 2005 22:27
pmac serial_pci_guess_board problem
Geoff Levand <geoffrey.levand <at> am.sony.com>
2005-11-04 21:27:05 GMT
2005-11-04 21:27:05 GMT
Russell,
I found that the serial port probe code in drivers/serial/8250_pci.c
no longer works properly for PowerMac G5 in 2.6.14. It seems some new
code now takes the PCI device info directly from the G5's Open
Firmware. The trouble is that OF sets the address length to 16 bytes,
not the expected 8 bytes.
Here's a fix, but I'd be interested to hear your comments.
-Geoff
Index: linux-2.6.14/drivers/serial/8250_pci.c
===================================================================
--- linux-2.6.14.orig/drivers/serial/8250_pci.c 2005-11-04 11:41:09.000000000 -0800
+++ linux-2.6.14/drivers/serial/8250_pci.c 2005-11-04 11:44:21.000000000 -0800
<at> <at> -1478,7 +1478,11 <at> <at>
num_port = 0;
for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
if (pci_resource_flags(dev, i) & IORESOURCE_IO &&
+#if defined(CONFIG_PPC_PMAC64)
+ pci_resource_len(dev, i) == 16 &&
+#else
pci_resource_len(dev, i) == 8 &&
+#endif
(first_port == -1 || (first_port + num_port) == i)) {
num_port++;
if (first_port == -1)
-------- Original Message --------
(Continue reading)
RSS Feed