From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bn3nam01on0139.outbound.protection.outlook.com ([104.47.33.139]:31640 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1031977AbeCAPZ6 (ORCPT ); Thu, 1 Mar 2018 10:25:58 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Helge Deller , Sasha Levin Subject: [added to the 4.1 stable tree] parisc: Hide Diva-built-in serial aux and graphics card Date: Thu, 1 Mar 2018 15:23:08 +0000 Message-ID: <20180301152116.1486-66-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Helge Deller This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ Upstream commit bcf3f1752a622f1372d3252d0fea8855d89812e7 ] Diva GSP card has built-in serial AUX port and ATI graphic card which simpl= y don't work and which both don't have external connectors. User Guides even mention that those devices shouldn't be used. So, prevent that Linux drivers try to enable those devices. Signed-off-by: Helge Deller Cc: # v3.0+ Signed-off-by: Sasha Levin --- drivers/parisc/lba_pci.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 3901ff66d0ee..2f7978204421 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c @@ -1654,3 +1654,36 @@ void lba_set_iregs(struct parisc_device *lba, u32 ib= ase, u32 imask) iounmap(base_addr); } =20 + +/* + * The design of the Diva management card in rp34x0 machines (rp3410, rp34= 40) + * 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 R= V100 + * Radeon 7000 graphics card which both don't have any external connectors= and + * thus are useless, and even worse, e.g. the AUX port occupies ttyS0 and = as + * such makes those machines the only PARISC machines on which we can't us= e + * ttyS0 as boot console. + */ +static void quirk_diva_ati_card(struct pci_dev *dev) +{ + if (dev->subsystem_vendor !=3D PCI_VENDOR_ID_HP || + dev->subsystem_device !=3D 0x1292) + return; + + dev_info(&dev->dev, "Hiding Diva built-in ATI card"); + dev->device =3D 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) +{ + if (dev->subsystem_vendor !=3D PCI_VENDOR_ID_HP || + dev->subsystem_device !=3D 0x1291) + return; + + dev_info(&dev->dev, "Hiding Diva built-in AUX serial device"); + dev->device =3D 0; +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX, + quirk_diva_aux_disable); --=20 2.14.1