All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: echo6 <echo6_uk@yahoo.com>
Cc: linux-ide@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: sata_inic162x
Date: Sat, 30 Aug 2008 12:29:04 +0200	[thread overview]
Message-ID: <48B920F0.7090405@kernel.org> (raw)
In-Reply-To: <48AD9EAD.1010204@yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 1618 bytes --]

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

[-- Attachment #2: sata_inic162x-cardbus-debug.patch --]
[-- Type: text/x-patch, Size: 814 bytes --]

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)

  parent reply	other threads:[~2008-08-30 10:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 16:58 sata_inic162x echo6
2008-08-21 16:52 ` sata_inic162x Alan Cox
2008-08-21 18:00   ` sata_inic162x echo6
2008-08-30 10:29 ` Tejun Heo [this message]
2008-09-04  0:35   ` sata_inic162x LED enable request Bob Stewart
2008-09-04  7:27     ` echo6
2008-09-04 15:54       ` Bob Stewart
2008-09-04 18:14         ` echo6
2008-09-04  8:13     ` Tejun Heo
2008-09-04 15:52       ` Bob Stewart
2008-09-08 12:12         ` Tejun Heo
2008-09-08 15:13           ` Bob Stewart
2008-09-08 19:09             ` Tejun Heo
2008-09-08 20:24               ` Bob Stewart
2008-09-09  7:53                 ` Tejun Heo
2008-09-09 19:41                   ` Bob Stewart
2008-09-11  9:50                     ` [PATCH #upstream-fixes] sata_inic162x: enable LED blinking Tejun Heo
2008-09-13 20:43                       ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B920F0.7090405@kernel.org \
    --to=tj@kernel.org \
    --cc=echo6_uk@yahoo.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.