From: Prarit Bhargava <prarit@redhat.com> Date: Mon, 15 Dec 2008 13:17:33 -0500 Subject: [ata] JMB361 only has one port Message-id: 49469F3D.7030809@redhat.com O-Subject: Re: [RHEL 5.4 PATCH]: JMB361 only has one port [v2] Bugzilla: 476206 RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com> RH-Acked-by: Alan Cox <alan@redhat.com> RH-Acked-by: Jeff Garzik <jgarzik@redhat.com> JMB361 only has one port according to http://www.jmicron.com/JMB361.html Upstream here: http://marc.info/?l=git-commits-head&m=121399915906664&w=2 Successfully compiled and booted by me. Resolves BZ 476206. diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 290bae8..f200f3e 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -698,6 +698,17 @@ static void ahci_save_initial_config(struct pci_dev *pdev, cap &= ~HOST_CAP_PMP; } + if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361 && + port_map != 1) { + dev_printk(KERN_INFO, &pdev->dev, + "JMB361 has only one port, port_map 0x%x -> 0x%x\n", + port_map, 1); + port_map = 1; + cap &= 0xffffffe0; + hpriv->saved_port_map = port_map; + hpriv->saved_cap = cap; + } + /* * Temporary Marvell 6145 hack: PATA port presence * is asserted through the standard AHCI port