diff mbox

Have my PA8800 back online...

Message ID ccca0165-6c4a-97f3-2e0b-00657948c775@gmx.de (mailing list archive)
State Superseded
Headers show

Commit Message

Helge Deller Dec. 9, 2017, 9:03 p.m. UTC
On 08.12.2017 23:14, John David Anglin wrote:
> On 2017-12-08 4:29 PM, Helge Deller wrote:
>>> root@rp3440:~# lspci -nn
>>> [...]
>>> e0:01.0 Communication controller [0780]: Hewlett-Packard Company Auxiliary Diva Serial Port [103c:1290] (rev 01)
>>> e0:01.1 Serial controller [0700]: Hewlett-Packard Company Diva Serial [GSP] Multiport UART [103c:1048] (rev 03)
>>>
>>> Interesting - actually the current situation looks like what [your patch from May 29th] should have accomplished. But as you dropped it in favor of a patch to palo, it seems to be unrelated.
>>>
>>> [your patch from May 29th]:https://patchwork.kernel.org/patch/9753613/
>> The patch had some other issues which is why I dropped it.
>> I like the testing of the class id much more, as it's done by the current upstream code.
>> E.g. this diva port reports PCI_CLASS_COMMUNICATION_OTHER as PCI CLASS ID, which differs to what the serial port driver should handle.
>>
> Yes, you previously noted that this port has no external connector or access via Ethernet.  I suspect it talks to some internal module.
> I don't know if there's any reason to access the device it's connected to (if any).  It probably should be "ttyO0".
> 
> Although the renumbering of the serial ports is somewhat annoying

Yes, it's really annoying.
Especially right now, where all kernels >= 4.14 need ttyS0, while older onese require ttyS1 as boot console. 
It's confusing.

> maybe palo change should be reverted so default is always ttyS0

Yes, agreed.
With the current situation we are not better with preselecting ttyS1 on rp34x0 machines.

> I would like the enumeration of the RV100 port skipped as the implementation on the rp34xx machines is broken and can't be used.

The RV100 port refers here to the built-in ATI Radeon 7000 graphics card which is part of Diva management card.
It's not working on rp34x0 machines. 

> It's enumeration means one has to explicitly specify the console argument in the boot command line as there seems to no way to
> prefer the serial console port.

Can you please try attached patch which disables the serial MUX and ATI card?
If it works for you and if we backport it to all kernels and if we revert palo to use ttyS0 for all machines we might be good.

Helge
diff mbox

Patch

diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index a25fed52f7e9..8e42827d3c27 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -1692,3 +1692,39 @@  void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask)
 	iounmap(base_addr);
 }
 
+
+/*
+ * The design of the Diva management card in rp34x0 machines (rp3410, rp3440)
+ * seems rushed, so that many built-in components simply don't work.
+ * The following quirks disable the serial AUX port and the built-in ATI RV100
+ * Radeon 7000 graphics card which both don't have any external connectors and
+ * thus are useless, and even worse, e.g. the AUX ports occupies ttyS0 and
+ * as such makes those machines the only PARISC machines on which we can't
+ * use ttyS0 as boot console.
+ */
+static void quirk_diva_ati_card(struct pci_dev *dev)
+{
+	/* subsystem IDs are from Diva */
+	if (dev->subsystem_vendor != PCI_VENDOR_ID_HP ||
+	    dev->subsystem_device != 0x1292)
+		return;
+
+	dev_info(dev, "Hiding Diva built-in ATI card.");
+	dev->device = 0;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RADEON_QY,
+	quirk_diva_ati_card);
+
+static void quirk_diva_aux_disable(struct pci_dev *dev)
+{
+	/* subsystem IDs are from Diva */
+	if (dev->subsystem_vendor != PCI_VENDOR_ID_HP ||
+	    dev->subsystem_device != 0x1291)
+		return;
+
+	dev_info(dev, "Hiding Diva built-in AUX serial device");
+	dev->device = 0;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
+	quirk_diva_aux_disable);
+