Skip to contentSkip to conversation

parisc: Ignore AUX port of DIVA on rp34xx machines

RFC PATCH Superseded Helge Deller 1 participant 3 messages May 21, 2017 – May 30, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 parisc: Ignore AUX port of DIVA on rp34xx machines

On rp34xx machines Linux detects the AUX port of the DIVA GSP card (PCI subsystem id 0x1291) before the console port of DIVA GSP and as such the AUX port becomes ttyS0 and the console port becomes ttyS1. Since the palo bootloader by default sets the console output to ttyS0 if no keyboard & monitor is attached, all Linux kernel boot messages get lost.

Avoid this problem by ignoring the AUX port. There is no external serial port connector for AUX, so we won't miss this serial port either.

(RFC, patch untested)

drivers/tty/serial/8250/8250_pci.c +3 -0
index 22d32d2..98261aa 100644
@@ -174,6 +174,9 @@ static int pci_hp_diva_init(struct pci_dev *dev)
 	case PCI_DEVICE_ID_HP_DIVA_HURRICANE:
 		rc = 1;
 		break;
+	case PCI_DEVICE_ID_HP_DIVA_AUX2:
+		rc = -ENODEV; /* ignore on rp34xx */
+		break;
 	}
 
 	return rc;
include/linux/pci_ids.h +1 -0
index 3e5dbbe..633e738 100644
@@ -760,6 +760,7 @@
 #define PCI_DEVICE_ID_HP_SX1000_IOC	0x127c
 #define PCI_DEVICE_ID_HP_DIVA_EVEREST	0x1282
 #define PCI_DEVICE_ID_HP_DIVA_AUX	0x1290
+#define PCI_DEVICE_ID_HP_DIVA_AUX2	0x1291
 #define PCI_DEVICE_ID_HP_DIVA_RMP3	0x1301
 #define PCI_DEVICE_ID_HP_DIVA_HURRICANE	0x132a
 #define PCI_DEVICE_ID_HP_CISSA		0x3220
#1 lore raw

PATCH v2 1/1 serial/parisc: Ignore AUX port of DIVA on rp34xx machines

On rp34xx machines Linux detects the AUX port of the DIVA GSP card (PCI subsystem id 0x1291) before the console port of DIVA GSP and as such the AUX port becomes ttyS0 and the console port becomes ttyS1.
Since the palo bootloader by default sets the console output to ttyS0 if no keyboard & monitor is attached, all Linux kernel boot messages get lost.

Avoid this problem by ignoring the AUX port. There is no external serial port connector for AUX, so we won't miss this serial port either.

Tested on a rp3410 parisc machine.

drivers/tty/serial/8250/8250_pci.c +14 -0
index 00e51a0..2ec120e 100644
@@ -174,6 +174,9 @@ static int pci_hp_diva_init(struct pci_dev *dev)
 	case PCI_DEVICE_ID_HP_DIVA_HURRICANE:
 		rc = 1;
 		break;
+	case PCI_DEVICE_ID_HP_DIVA_AUX2:
+		rc = -ENODEV; /* ignore on rp34x0 machines */
+		break;
 	}
 
 	return rc;
@@ -1785,6 +1788,17 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
 		.setup		= pci_hp_diva_setup,
 	},
 	/*
+	 * HP Diva Auxiliary Serial Port
+	 */
+	{
+		.vendor		= PCI_VENDOR_ID_HP,
+		.device		= PCI_DEVICE_ID_HP_DIVA_AUX,
+		.subvendor	= PCI_VENDOR_ID_HP,
+		.subdevice	= PCI_DEVICE_ID_HP_DIVA_AUX2,
+		.init		= pci_hp_diva_init,
+		.setup		= pci_default_setup,
+	},
+	/*
 	 * Intel
 	 */
 	{
include/linux/pci_ids.h +1 -0
index 5f6b71d..ecc88a3 100644
@@ -762,6 +762,7 @@
 #define PCI_DEVICE_ID_HP_SX1000_IOC	0x127c
 #define PCI_DEVICE_ID_HP_DIVA_EVEREST	0x1282
 #define PCI_DEVICE_ID_HP_DIVA_AUX	0x1290
+#define PCI_DEVICE_ID_HP_DIVA_AUX2	0x1291
 #define PCI_DEVICE_ID_HP_DIVA_RMP3	0x1301
 #define PCI_DEVICE_ID_HP_DIVA_HURRICANE	0x132a
 #define PCI_DEVICE_ID_HP_CISSA		0x3220
#2 lore raw

Re: [PATCH v2] serial/parisc: Ignore AUX port of DIVA on rp34xx machines

Quoted 10 lines · Helge Deller

On rp34xx machines Linux detects the AUX port of the DIVA GSP card (PCI subsystem id 0x1291) before the console port of DIVA GSP and as such the AUX port becomes ttyS0 and the console port becomes ttyS1.
Since the palo bootloader by default sets the console output to ttyS0 if no keyboard & monitor is attached, all Linux kernel boot messages get lost.

Avoid this problem by ignoring the AUX port. There is no external serial port connector for AUX, so we won't miss this serial port either.

Tested on a rp3410 parisc machine.

I will drop this patch.
Instead I've committed changes to the palo bootloader
to default to ttyS1 on rp34x0 machines.
Patch is in palo git tree, palo v1.98 release will include that fix:
https://git.kernel.org/pub/scm/linux/kernel/git/deller/palo.git/commit/?id=9bb40b5ab775a077fd847c6ff99462249cc3f426

Helge