Re: sata_inic162x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



echo6 wrote:
> I'm experiencing difficulties with this controller
> 
> 04:00.0 SATA controller: Initio Corporation INI-1623 PCI SATA-II
> Controller (rev 02) (prog-if 00 [Vendor specific])
>     Subsystem: Initio Corporation Unknown device 1626
>     Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B-
>     Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR-
>     Latency: 64
>     Interrupt: pin A routed to IRQ 21
>     Region 0: I/O ports at b000 [size=256]
>     Region 1: Memory at 8c420000 (32-bit, non-prefetchable) [size=4K]
>     [virtual] Expansion ROM at 8c400000 [disabled] [size=128K]
>     Capabilities: [dc] Power Management version 2
>         Flags: PMEClk+ DSI- D1+ D2+ AuxCurrent=0mA
> PME(D0-,D1+,D2+,D3hot+,D3cold-)
>         Status: D0 PME-Enable- DSel=0 DScale=0 PME-
> 
> Branded as an A.C.Ryan, http://www.acryan.com
> 
> I'm using Ubuntu 8.04;
> Linux toshiba 2.6.24-16-generic
> Linux toshiba 2.6.24-19-generic
> Produces an error
> [  608.944941] pccard: CardBus card inserted into slot 0
> [  609.062663] sata_inic162x 0000:04:00.0: version 0.3
> [  609.062933] PCI: Enabling device 0000:04:00.0 (0000 -> 0003)
> [  609.062945] ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 21 (level,
> low) -> IRQ 18
> [  609.062977] ACPI: PCI interrupt for device 0000:04:00.0 disabled
> [  609.063615] sata_inic162x: probe of 0000:04:00.0 failed with error -22

BAR 5 non-existent.  sata_inic162x should then use BAR 1 which
should seems fine.  Hmmm... ENOENT.  Can you please try the attached
patch?

-- 
tejun
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 3ead02f..be7eb4e 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -840,10 +840,15 @@ static int inic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (rc)
 		return rc;
 
-	if (pci_resource_flags(pdev, MMIO_BAR_PCI) & IORESOURCE_MEM)
+	if (pci_resource_len(pdev, MMIO_BAR_PCI) &&
+	    (pci_resource_flags(pdev, MMIO_BAR_PCI) & IORESOURCE_MEM))
 		mmio_bar = MMIO_BAR_PCI;
 	else
 		mmio_bar = MMIO_BAR_CARDBUS;
+	dev_printk(KERN_INFO, &pdev->dev, "XXX: BAR5 flags=0x%lx len=%lu, mmio_bar=%d\n",
+		   pci_resource_flags(pdev, MMIO_BAR_PCI),
+		   (unsigned long)pci_resource_len(pdev, MMIO_BAR_PCI),
+		   mmio_bar);
 
 	rc = pcim_iomap_regions(pdev, 1 << mmio_bar, DRV_NAME);
 	if (rc)

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux