* 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
@ 2006-06-15 16:28 Andy Isaacson
2006-06-17 17:03 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Andy Isaacson @ 2006-06-15 16:28 UTC (permalink / raw)
To: akpm, linux-kernel
The PCMCIA slot on my Thinkpad X40 stopped working sometime between
2.6.17-rc4-mm3 and 2.6.17-rc5-mm3, and is still not working as of
2.6.17-rc6-mm2. There's one diff early in dmesg that looks interesting:
ACPI: PCI Interrupt 0000:00:1f.6[B] -> GSI 17 (level, low) -> IRQ 177
PCI: Setting latency timer of device 0000:00:1f.6 to 64
MC'97 1 converters and GPIO not ready (0xff00)
PM: Adding info for ac97:1-1:unknown codec
-ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 169
Yenta: CardBus bridge found at 0000:02:00.0 [1014:0555]
-Yenta: ISA IRQ mask 0x04b8, PCI irq 169
+Yenta: ISA IRQ mask 0x0cb8, PCI irq 169
Socket status: 30000006
pcmcia: parent PCI bridge I/O window: 0x3000 - 0x7fff
cs: IO port probe 0x3000-0x7fff: clean.
pcmcia: parent PCI bridge Memory window: 0xd0200000 - 0xdfffffff
pcmcia: parent PCI bridge Memory window: 0xf0000000 - 0xf7ffffff
Then when I insert the card, instead of
pccard: PCMCIA card inserted into slot 0
cs: memory probe 0xf0000000-0xf7ffffff: excluding 0xf0000000-0xf7ffffff
cs: memory probe 0xd0200000-0xdfffffff: excluding 0xd0200000-0xd11fffff
0xd1a00000-0xd41fffff 0xd4a00000-0xd51fffff 0xd5a00000-0xd61fffff
0xd6a00000-0xd71fffff 0xd7a00000-0xd81fffff 0xd8a00000-0xd91fffff
0xd9a00000-0xda1fffff 0xdaa00000-0xdb1fffff 0xdba00000-0xdc1fffff
0xdca00000-0xdd1fffff 0xdda00000-0xde1fffff 0xdea00000-0xdf1fffff
0xdfa00000-0xe01fffff
pcmcia: registering new device pcmcia0.0
PM: Adding info for pcmcia:0.0
-Probing IDE interface ide2...
-hde: CF Card, CFA DISK drive
-PM: Adding info for No Bus:ide2
-hdf: probing with STATUS(0x50) instead of ALTSTATUS(0x0a)
I get
pccard: PCMCIA card inserted into slot 0
cs: memory probe 0xf0000000-0xf7ffffff: excluding 0xf0000000-0xf7ffffff
cs: memory probe 0xd0200000-0xdfffffff: excluding 0xd0200000-0xd11fffff
0xd1a00000-0xd41fffff 0xd4a00000-0xd51fffff 0xd5a00000-0xd61fffff
0xd6a00000-0xd71fffff 0xd7a00000-0xd81fffff 0xd8a00000-0xd91fffff
0xd9a00000-0xda1fffff 0xdaa00000-0xdb1fffff 0xdba00000-0xdc1fffff
0xdca00000-0xdd1fffff 0xdda00000-0xde1fffff 0xdea00000-0xdf1fffff
0xdfa00000-0xe01fffff
pcmcia: registering new device pcmcia0.0
PM: Adding info for pcmcia:0.0
+ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
+ide2: ports already in use, skipping probe
+ide2: I/O resource 0xF8A8A01E-0xF8A8A01E not free.
+ide2: ports already in use, skipping probe
+ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
+ide2: ports already in use, skipping probe
With 2.6.17-rc6-mm2 I have
CPU0
0: 188343 IO-APIC-edge timer
1: 2685 IO-APIC-edge i8042
9: 393 IO-APIC-fasteoi acpi
12: 17840 IO-APIC-edge i8042
14: 4616 IO-APIC-edge ide0
169: 1 IO-APIC-fasteoi uhci_hcd:usb1, yenta
177: 0 IO-APIC-fasteoi Intel 82801DB-ICH4, Intel 82801DB-ICH4 Modem
185: 0 IO-APIC-fasteoi uhci_hcd:usb3
193: 0 IO-APIC-fasteoi uhci_hcd:usb2
201: 0 IO-APIC-fasteoi ehci_hcd:usb4
209: 2524 IO-APIC-fasteoi eth0
217: 43647 IO-APIC-fasteoi ipw2200
NMI: 0
LOC: 175985
ERR: 0
MIS: 0
The card I'm trying to use is a "PQI Compact Flash Adapter", which
appears to just be some wires connecting the PCMCIA pins to the CF pins.
The CF card is a "TwinMOS Ultra-X 140X 1GB" card, part number
FCF1GBUPS-K W543F5TM0832.
dmesgs at
http://web.hexapodia.org/~adi/tmp/dmesg.2.6.17-rc4-mm3.txt
http://web.hexapodia.org/~adi/tmp/dmesg.2.6.17-rc6-mm2.txt
(although the rc4-mm3 one is truncated, sorry.)
-andy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-15 16:28 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free" Andy Isaacson
@ 2006-06-17 17:03 ` Andrew Morton
2006-06-20 21:17 ` Andy Isaacson
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2006-06-17 17:03 UTC (permalink / raw)
To: Andy Isaacson; +Cc: linux-kernel
On Thu, 15 Jun 2006 09:28:59 -0700
Andy Isaacson <adi@hexapodia.org> wrote:
> The PCMCIA slot on my Thinkpad X40 stopped working sometime between
> 2.6.17-rc4-mm3 and 2.6.17-rc5-mm3, and is still not working as of
> 2.6.17-rc6-mm2. There's one diff early in dmesg that looks interesting:
>
> ACPI: PCI Interrupt 0000:00:1f.6[B] -> GSI 17 (level, low) -> IRQ 177
> PCI: Setting latency timer of device 0000:00:1f.6 to 64
> MC'97 1 converters and GPIO not ready (0xff00)
> PM: Adding info for ac97:1-1:unknown codec
> -ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 169
> Yenta: CardBus bridge found at 0000:02:00.0 [1014:0555]
> -Yenta: ISA IRQ mask 0x04b8, PCI irq 169
> +Yenta: ISA IRQ mask 0x0cb8, PCI irq 169
> Socket status: 30000006
> pcmcia: parent PCI bridge I/O window: 0x3000 - 0x7fff
> cs: IO port probe 0x3000-0x7fff: clean.
> pcmcia: parent PCI bridge Memory window: 0xd0200000 - 0xdfffffff
> pcmcia: parent PCI bridge Memory window: 0xf0000000 - 0xf7ffffff
>
> Then when I insert the card, instead of
>
> pccard: PCMCIA card inserted into slot 0
> cs: memory probe 0xf0000000-0xf7ffffff: excluding 0xf0000000-0xf7ffffff
> cs: memory probe 0xd0200000-0xdfffffff: excluding 0xd0200000-0xd11fffff
> 0xd1a00000-0xd41fffff 0xd4a00000-0xd51fffff 0xd5a00000-0xd61fffff
> 0xd6a00000-0xd71fffff 0xd7a00000-0xd81fffff 0xd8a00000-0xd91fffff
> 0xd9a00000-0xda1fffff 0xdaa00000-0xdb1fffff 0xdba00000-0xdc1fffff
> 0xdca00000-0xdd1fffff 0xdda00000-0xde1fffff 0xdea00000-0xdf1fffff
> 0xdfa00000-0xe01fffff
> pcmcia: registering new device pcmcia0.0
> PM: Adding info for pcmcia:0.0
> -Probing IDE interface ide2...
> -hde: CF Card, CFA DISK drive
> -PM: Adding info for No Bus:ide2
> -hdf: probing with STATUS(0x50) instead of ALTSTATUS(0x0a)
>
> I get
>
> pccard: PCMCIA card inserted into slot 0
> cs: memory probe 0xf0000000-0xf7ffffff: excluding 0xf0000000-0xf7ffffff
> cs: memory probe 0xd0200000-0xdfffffff: excluding 0xd0200000-0xd11fffff
> 0xd1a00000-0xd41fffff 0xd4a00000-0xd51fffff 0xd5a00000-0xd61fffff
> 0xd6a00000-0xd71fffff 0xd7a00000-0xd81fffff 0xd8a00000-0xd91fffff
> 0xd9a00000-0xda1fffff 0xdaa00000-0xdb1fffff 0xdba00000-0xdc1fffff
> 0xdca00000-0xdd1fffff 0xdda00000-0xde1fffff 0xdea00000-0xdf1fffff
> 0xdfa00000-0xe01fffff
> pcmcia: registering new device pcmcia0.0
> PM: Adding info for pcmcia:0.0
> +ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
> +ide2: ports already in use, skipping probe
> +ide2: I/O resource 0xF8A8A01E-0xF8A8A01E not free.
> +ide2: ports already in use, skipping probe
> +ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
> +ide2: ports already in use, skipping probe
>
> With 2.6.17-rc6-mm2 I have
>
> CPU0
> 0: 188343 IO-APIC-edge timer
> 1: 2685 IO-APIC-edge i8042
> 9: 393 IO-APIC-fasteoi acpi
> 12: 17840 IO-APIC-edge i8042
> 14: 4616 IO-APIC-edge ide0
> 169: 1 IO-APIC-fasteoi uhci_hcd:usb1, yenta
> 177: 0 IO-APIC-fasteoi Intel 82801DB-ICH4, Intel 82801DB-ICH4 Modem
> 185: 0 IO-APIC-fasteoi uhci_hcd:usb3
> 193: 0 IO-APIC-fasteoi uhci_hcd:usb2
> 201: 0 IO-APIC-fasteoi ehci_hcd:usb4
> 209: 2524 IO-APIC-fasteoi eth0
> 217: 43647 IO-APIC-fasteoi ipw2200
> NMI: 0
> LOC: 175985
> ERR: 0
> MIS: 0
>
> The card I'm trying to use is a "PQI Compact Flash Adapter", which
> appears to just be some wires connecting the PCMCIA pins to the CF pins.
> The CF card is a "TwinMOS Ultra-X 140X 1GB" card, part number
> FCF1GBUPS-K W543F5TM0832.
>
> dmesgs at
>
> http://web.hexapodia.org/~adi/tmp/dmesg.2.6.17-rc4-mm3.txt
> http://web.hexapodia.org/~adi/tmp/dmesg.2.6.17-rc6-mm2.txt
>
hm. I don't know who to blame for this yet ;)
The contents of /proc/ioports on both kernels might be useful. Let's see
which device+driver is already using those ports, and whether the older
kenrel uses the same addresses.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-17 17:03 ` Andrew Morton
@ 2006-06-20 21:17 ` Andy Isaacson
2006-06-20 22:03 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Andy Isaacson @ 2006-06-20 21:17 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
On Sat, Jun 17, 2006 at 10:03:27AM -0700, Andrew Morton wrote:
> > The PCMCIA slot on my Thinkpad X40 stopped working sometime between
> > 2.6.17-rc4-mm3 and 2.6.17-rc5-mm3, and is still not working as of
> > 2.6.17-rc6-mm2.
[snip]
> > -Probing IDE interface ide2...
> > -hde: CF Card, CFA DISK drive
> > -PM: Adding info for No Bus:ide2
> > -hdf: probing with STATUS(0x50) instead of ALTSTATUS(0x0a)
> > +ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
> > +ide2: ports already in use, skipping probe
> > +ide2: I/O resource 0xF8A8A01E-0xF8A8A01E not free.
> > +ide2: ports already in use, skipping probe
> > +ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
> > +ide2: ports already in use, skipping probe
>
> hm. I don't know who to blame for this yet ;)
>
> The contents of /proc/ioports on both kernels might be useful. Let's see
> which device+driver is already using those ports, and whether the older
> kenrel uses the same addresses.
In further testing, -rc6 is fine while -rc6-mm2 fails.
Under 2.6.17-rc6 (after having inserted and removed the card, but that
doesn't seem to make much difference) I have
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
03c0-03df : vga+
03f6-03f6 : ide0
1000-107f : 0000:00:1f.0
1000-107f : motherboard
1000-1003 : PM1a_EVT_BLK
1004-1005 : PM1a_CNT_BLK
1008-100b : PM_TMR
1010-1015 : ACPI CPU throttle
1020-1020 : PM2_CNT_BLK
1028-102f : GPE0_BLK
1180-11bf : 0000:00:1f.0
1180-11bf : motherboard
15e0-15ef : motherboard
1600-167f : motherboard
1680-169f : motherboard
1800-1807 : 0000:00:02.0
1810-181f : 0000:00:1f.1
1810-1817 : ide0
1818-181f : ide1
1820-183f : 0000:00:1d.0
1820-183f : uhci_hcd
1840-185f : 0000:00:1d.1
1840-185f : uhci_hcd
1860-187f : 0000:00:1d.2
1860-187f : uhci_hcd
1880-189f : 0000:00:1f.3
18c0-18ff : 0000:00:1f.5
18c0-18ff : Intel 82801DB-ICH4
1c00-1cff : 0000:00:1f.5
1c00-1cff : Intel 82801DB-ICH4
2000-207f : 0000:00:1f.6
2000-207f : Intel 82801DB-ICH4 Modem
2400-24ff : 0000:00:1f.6
2400-24ff : Intel 82801DB-ICH4 Modem
3000-7fff : PCI Bus #02
3000-30ff : PCI CardBus #03
3400-34ff : PCI CardBus #03
7000-703f : 0000:02:01.0
7000-703f : e1000
The diff between -rc6 and -rc6-mm2 shows that they have the same ioport
assignment (there's only a textual diff due to ACPI string changes).
I've put just about everything you could want to know about the two
kernels at
http://web.hexapodia.org/~adi/bobble/bobble_2.6.17-rc6_20060620093733/
and
http://web.hexapodia.org/~adi/bobble/bobble_2.6.17-rc6-mm2_20060620094254/
-andy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-20 21:17 ` Andy Isaacson
@ 2006-06-20 22:03 ` Andrew Morton
2006-06-20 22:36 ` Randy.Dunlap
2006-06-21 6:50 ` Andy Isaacson
0 siblings, 2 replies; 10+ messages in thread
From: Andrew Morton @ 2006-06-20 22:03 UTC (permalink / raw)
To: Andy Isaacson; +Cc: linux-kernel
Andy Isaacson <adi@hexapodia.org> wrote:
>
> On Sat, Jun 17, 2006 at 10:03:27AM -0700, Andrew Morton wrote:
> > > The PCMCIA slot on my Thinkpad X40 stopped working sometime between
> > > 2.6.17-rc4-mm3 and 2.6.17-rc5-mm3, and is still not working as of
> > > 2.6.17-rc6-mm2.
> [snip]
> > > -Probing IDE interface ide2...
> > > -hde: CF Card, CFA DISK drive
> > > -PM: Adding info for No Bus:ide2
> > > -hdf: probing with STATUS(0x50) instead of ALTSTATUS(0x0a)
> > > +ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
> > > +ide2: ports already in use, skipping probe
> > > +ide2: I/O resource 0xF8A8A01E-0xF8A8A01E not free.
> > > +ide2: ports already in use, skipping probe
> > > +ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
> > > +ide2: ports already in use, skipping probe
> >
> > hm. I don't know who to blame for this yet ;)
> >
> > The contents of /proc/ioports on both kernels might be useful. Let's see
> > which device+driver is already using those ports, and whether the older
> > kenrel uses the same addresses.
>
> In further testing, -rc6 is fine while -rc6-mm2 fails.
OK.
> Under 2.6.17-rc6 (after having inserted and removed the card, but that
> doesn't seem to make much difference) I have
>
> 0000-001f : dma1
> ...
I should have said iomem, not ioports. But you have it there on those very
detailed web pages. There's nothing at 0xF8A8Axxx in either kernel.
> The diff between -rc6 and -rc6-mm2 shows that they have the same ioport
> assignment (there's only a textual diff due to ACPI string changes).
yep. The only reelvant diff in the rc6 versus rc6-mm2 /proc/iomem is:
@@ -29,7 +29,6 @@
d0220000-d0220fff : 0000:02:02.0
d0220000-d0220fff : ipw2200
d0221000-d02210ff : 0000:02:00.1
- d1200000-d1200fff : pcmcia_socket0
d2000000-d3ffffff : PCI CardBus #03
e0000000-e7ffffff : 0000:00:02.0
e8000000-efffffff : 0000:00:02.1
whch is to be expected if you removed the card.
> I've put just about everything you could want to know about the two
> kernels at
> http://web.hexapodia.org/~adi/bobble/bobble_2.6.17-rc6_20060620093733/
> and
> http://web.hexapodia.org/~adi/bobble/bobble_2.6.17-rc6-mm2_20060620094254/
>
It's strange (to me) that IDE is requesting a single-byte memory region.
Possibly we've broken the resource.c code such that it has some off-by-one
and is now rejecting single-byte requests.
If you're keen , the place to poke around is in
kernel/resource.c:__request_region(). Here's a starting patch:
--- a/kernel/resource.c~a
+++ a/kernel/resource.c
@@ -501,6 +501,10 @@ struct resource * __request_region(struc
conflict = __request_resource(parent, res);
if (!conflict)
break;
+ printk("conflict: %s[%Lx->%Lx]\n",
+ conflict->name,
+ (unsigned long long)conflict->start,
+ (unsigned long long)conflict->end);
if (conflict != parent) {
parent = conflict;
if (!(conflict->flags & IORESOURCE_BUSY))
_
Which should tell us what we're allegedly conflicting with.
Then again, perhaps IDE is broken (as well?), because you don't have any
single-byte iomem regions in your 2.6.17-rc6 /proc/iomem. It would be
interesting to run this patch in both 2.6.17-rc6 and in 2.6.17-rc6-mm2, see
what it says:
diff -puN drivers/ide/ide.c~a drivers/ide/ide.c
--- 25/drivers/ide/ide.c~a Tue Jun 20 15:01:32 2006
+++ 25-akpm/drivers/ide/ide.c Tue Jun 20 15:02:15 2006
@@ -364,6 +364,10 @@ static struct resource* hwif_request_reg
{
struct resource *res = request_region(addr, num, hwif->name);
+ if (num == 1) {
+ printk("%s: single-byte request\n", __FUNCTION__);
+ dump_stack();
+ }
if (!res)
printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n",
hwif->name, addr, addr+num-1);
_
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-20 22:03 ` Andrew Morton
@ 2006-06-20 22:36 ` Randy.Dunlap
2006-06-21 6:50 ` Andy Isaacson
1 sibling, 0 replies; 10+ messages in thread
From: Randy.Dunlap @ 2006-06-20 22:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: adi, linux-kernel
On Tue, 20 Jun 2006 15:03:17 -0700 Andrew Morton wrote:
> Andy Isaacson <adi@hexapodia.org> wrote:
> >
> > On Sat, Jun 17, 2006 at 10:03:27AM -0700, Andrew Morton wrote:
> > > > The PCMCIA slot on my Thinkpad X40 stopped working sometime between
> > > > 2.6.17-rc4-mm3 and 2.6.17-rc5-mm3, and is still not working as of
> > > > 2.6.17-rc6-mm2.
> > [snip]
> > > > -Probing IDE interface ide2...
> > > > -hde: CF Card, CFA DISK drive
> > > > -PM: Adding info for No Bus:ide2
> > > > -hdf: probing with STATUS(0x50) instead of ALTSTATUS(0x0a)
> > > > +ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
> > > > +ide2: ports already in use, skipping probe
> > > > +ide2: I/O resource 0xF8A8A01E-0xF8A8A01E not free.
> > > > +ide2: ports already in use, skipping probe
> > > > +ide2: I/O resource 0xF8A8A00E-0xF8A8A00E not free.
> > > > +ide2: ports already in use, skipping probe
> > >
> > > hm. I don't know who to blame for this yet ;)
> > >
> > > The contents of /proc/ioports on both kernels might be useful. Let's see
> > > which device+driver is already using those ports, and whether the older
> > > kenrel uses the same addresses.
> >
> > In further testing, -rc6 is fine while -rc6-mm2 fails.
>
> OK.
>
> > Under 2.6.17-rc6 (after having inserted and removed the card, but that
> > doesn't seem to make much difference) I have
> >
> > 0000-001f : dma1
> > ...
>
> I should have said iomem, not ioports. But you have it there on those very
> detailed web pages. There's nothing at 0xF8A8Axxx in either kernel.
>
> > The diff between -rc6 and -rc6-mm2 shows that they have the same ioport
> > assignment (there's only a textual diff due to ACPI string changes).
>
> yep. The only reelvant diff in the rc6 versus rc6-mm2 /proc/iomem is:
>
> @@ -29,7 +29,6 @@
> d0220000-d0220fff : 0000:02:02.0
> d0220000-d0220fff : ipw2200
> d0221000-d02210ff : 0000:02:00.1
> - d1200000-d1200fff : pcmcia_socket0
> d2000000-d3ffffff : PCI CardBus #03
> e0000000-e7ffffff : 0000:00:02.0
> e8000000-efffffff : 0000:00:02.1
>
> whch is to be expected if you removed the card.
>
>
> > I've put just about everything you could want to know about the two
> > kernels at
> > http://web.hexapodia.org/~adi/bobble/bobble_2.6.17-rc6_20060620093733/
> > and
> > http://web.hexapodia.org/~adi/bobble/bobble_2.6.17-rc6-mm2_20060620094254/
> >
>
> It's strange (to me) that IDE is requesting a single-byte memory region.
> Possibly we've broken the resource.c code such that it has some off-by-one
> and is now rejecting single-byte requests.
Looks like ide.c uses single-byte requests just for checking
region availability, but I would think that it should use
full-sized requests for that.
> If you're keen , the place to poke around is in
> kernel/resource.c:__request_region(). Here's a starting patch:
>
>
> --- a/kernel/resource.c~a
> +++ a/kernel/resource.c
> @@ -501,6 +501,10 @@ struct resource * __request_region(struc
> conflict = __request_resource(parent, res);
> if (!conflict)
> break;
> + printk("conflict: %s[%Lx->%Lx]\n",
> + conflict->name,
> + (unsigned long long)conflict->start,
> + (unsigned long long)conflict->end);
> if (conflict != parent) {
> parent = conflict;
> if (!(conflict->flags & IORESOURCE_BUSY))
> _
>
> Which should tell us what we're allegedly conflicting with.
>
>
>
>
> Then again, perhaps IDE is broken (as well?), because you don't have any
> single-byte iomem regions in your 2.6.17-rc6 /proc/iomem. It would be
> interesting to run this patch in both 2.6.17-rc6 and in 2.6.17-rc6-mm2, see
> what it says:
>
> diff -puN drivers/ide/ide.c~a drivers/ide/ide.c
> --- 25/drivers/ide/ide.c~a Tue Jun 20 15:01:32 2006
> +++ 25-akpm/drivers/ide/ide.c Tue Jun 20 15:02:15 2006
> @@ -364,6 +364,10 @@ static struct resource* hwif_request_reg
> {
> struct resource *res = request_region(addr, num, hwif->name);
>
> + if (num == 1) {
> + printk("%s: single-byte request\n", __FUNCTION__);
> + dump_stack();
> + }
> if (!res)
> printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n",
> hwif->name, addr, addr+num-1);
> _
linux-2617-pv/drivers/ide> grep hwif_request_reg *.c
ide.c:static struct resource* hwif_request_region(ide_hwif_t *hwif,
ide.c: * ide_hwif_request_regions - request resources for IDE
ide.c:int ide_hwif_request_regions(ide_hwif_t *hwif)
ide.c: if (addr && !hwif_request_region(hwif, addr, 1))
ide.c: if (!hwif_request_region(hwif, addr, 8))
ide.c: if (!hwif_request_region(hwif, addr, 1)) {
---
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-20 22:03 ` Andrew Morton
2006-06-20 22:36 ` Randy.Dunlap
@ 2006-06-21 6:50 ` Andy Isaacson
2006-06-21 7:46 ` Andrew Morton
1 sibling, 1 reply; 10+ messages in thread
From: Andy Isaacson @ 2006-06-21 6:50 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
On Tue, Jun 20, 2006 at 03:03:17PM -0700, Andrew Morton wrote:
> It's strange (to me) that IDE is requesting a single-byte memory region.
> Possibly we've broken the resource.c code such that it has some off-by-one
> and is now rejecting single-byte requests.
[snip]
> +++ a/kernel/resource.c
> + printk("conflict: %s[%Lx->%Lx]\n",
[snip]
> Then again, perhaps IDE is broken (as well?), because you don't have any
> single-byte iomem regions in your 2.6.17-rc6 /proc/iomem. It would be
> interesting to run this patch in both 2.6.17-rc6 and in 2.6.17-rc6-mm2, see
> what it says:
[snip]
> +++ 25-akpm/drivers/ide/ide.c Tue Jun 20 15:02:15 2006
> + printk("%s: single-byte request\n", __FUNCTION__);
> + dump_stack();
With both patches, rc6-mm2 dumps the following.
[ 2034.052000] pccard: PCMCIA card inserted into slot 0
[ 2034.052000] cs: memory probe 0xf0000000-0xf7ffffff: excluding 0xf0000000-0xf7ffffff
[ 2034.052000] cs: memory probe 0xd0200000-0xdfffffff: excluding 0xd0200000-0xd11fffff 0xd1a00000-0xd41fffff 0xd4a00000-0xd51fffff 0xd5a00000-0xd61fffff 0xd6a00000-0xd71fffff 0xd7a00000-0xd81fffff 0xd8a00000-0xd91fffff 0xd9a00000-0xda1fffff 0xdaa00000-0xdb1fffff 0xdba00000-0xdc1fffff 0xdca00000-0xdd1fffff 0xdda00000-0xde1fffff 0xdea00000-0xdf1fffff 0xdfa00000-0xe01fffff
[ 2034.060000] pcmcia: registering new device pcmcia0.0
[ 2034.060000] PM: Adding info for pcmcia:0.0
[ 2035.976000] conflict: PCI IO[0->ffff]
[ 2035.976000] hwif_request_region: single-byte request for ide2
[ 2035.976000] [<c0257386>] hwif_request_region+0xa6/0xb0
[ 2035.976000] [<c02574bf>] ide_hwif_request_regions+0x12f/0x150
[ 2035.976000] [<c0257177>] init_hwif_default+0x37/0x120
[ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
[ 2035.976000] [<c025e8a9>] probe_hwif+0x29/0x4f0
[ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
[ 2035.976000] [<c025ed85>] probe_hwif_init_with_fixup+0x15/0xa0
[ 2035.976000] [<c0257ea5>] ide_register_hw_with_fixup+0x165/0x1b0
[ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
[ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
[ 2035.976000] [<f8b07163>] idecs_register+0x83/0xd0 [ide_cs]
[ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
[ 2035.976000] [<f8b071c0>] outb_mem+0x0/0x10 [ide_cs]
[ 2035.976000] [<f8b075e4>] ide_config+0x414/0x790 [ide_cs]
[ 2035.976000] [<f8b071c0>] outb_mem+0x0/0x10 [ide_cs]
[ 2035.976000] [<f8b0f4c8>] pcmcia_device_probe+0xa8/0x160 [pcmcia]
[ 2035.976000] [<c025104c>] driver_probe_device+0xbc/0xe0
[ 2035.976000] [<c02510f0>] __driver_attach+0x0/0x80
[ 2035.976000] [<c0251160>] __driver_attach+0x70/0x80
[ 2035.976000] [<c0250369>] bus_for_each_dev+0x69/0x80
[ 2035.976000] [<c0251195>] driver_attach+0x25/0x30
[ 2035.976000] [<c02510f0>] __driver_attach+0x0/0x80
[ 2035.976000] [<c0250968>] bus_add_driver+0x88/0xd0
[ 2035.976000] [<f8b0b00f>] init_ide_cs+0xf/0x11 [ide_cs]
[ 2035.976000] [<c0139f32>] sys_init_module+0xf2/0x190
[ 2035.976000] [<c02e3105>] sysenter_past_esp+0x56/0x79
[ 2035.976000] [<c02e007b>] inet6_lookup_listener+0x2b/0x100
[ 2035.976000] ide2: I/O resource 0xF8B0200E-0xF8B0200E not free.
[ 2035.976000] ide2: ports already in use, skipping probe
[ 2035.976000] conflict: PCI IO[0->ffff]
[ 2035.976000] hwif_request_region: single-byte request for ide2
[ 2035.976000] [<c0257386>] hwif_request_region+0xa6/0xb0
[ 2035.976000] [<c02574bf>] ide_hwif_request_regions+0x12f/0x150
[ 2035.976000] [<c0257177>] init_hwif_default+0x37/0x120
[snip 1400 lines more]
-andy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-21 6:50 ` Andy Isaacson
@ 2006-06-21 7:46 ` Andrew Morton
2006-06-21 17:10 ` Andy Isaacson
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2006-06-21 7:46 UTC (permalink / raw)
To: Andy Isaacson; +Cc: linux-kernel
On Tue, 20 Jun 2006 23:50:36 -0700
Andy Isaacson <adi@hexapodia.org> wrote:
> On Tue, Jun 20, 2006 at 03:03:17PM -0700, Andrew Morton wrote:
> > It's strange (to me) that IDE is requesting a single-byte memory region.
> > Possibly we've broken the resource.c code such that it has some off-by-one
> > and is now rejecting single-byte requests.
> [snip]
> > +++ a/kernel/resource.c
> > + printk("conflict: %s[%Lx->%Lx]\n",
> [snip]
> > Then again, perhaps IDE is broken (as well?), because you don't have any
> > single-byte iomem regions in your 2.6.17-rc6 /proc/iomem. It would be
> > interesting to run this patch in both 2.6.17-rc6 and in 2.6.17-rc6-mm2, see
> > what it says:
> [snip]
> > +++ 25-akpm/drivers/ide/ide.c Tue Jun 20 15:02:15 2006
> > + printk("%s: single-byte request\n", __FUNCTION__);
> > + dump_stack();
>
> With both patches, rc6-mm2 dumps the following.
>
> [ 2034.052000] pccard: PCMCIA card inserted into slot 0
> [ 2034.052000] cs: memory probe 0xf0000000-0xf7ffffff: excluding 0xf0000000-0xf7ffffff
> [ 2034.052000] cs: memory probe 0xd0200000-0xdfffffff: excluding 0xd0200000-0xd11fffff 0xd1a00000-0xd41fffff 0xd4a00000-0xd51fffff 0xd5a00000-0xd61fffff 0xd6a00000-0xd71fffff 0xd7a00000-0xd81fffff 0xd8a00000-0xd91fffff 0xd9a00000-0xda1fffff 0xdaa00000-0xdb1fffff 0xdba00000-0xdc1fffff 0xdca00000-0xdd1fffff 0xdda00000-0xde1fffff 0xdea00000-0xdf1fffff 0xdfa00000-0xe01fffff
> [ 2034.060000] pcmcia: registering new device pcmcia0.0
> [ 2034.060000] PM: Adding info for pcmcia:0.0
> [ 2035.976000] conflict: PCI IO[0->ffff]
> [ 2035.976000] hwif_request_region: single-byte request for ide2
> [ 2035.976000] [<c0257386>] hwif_request_region+0xa6/0xb0
> [ 2035.976000] [<c02574bf>] ide_hwif_request_regions+0x12f/0x150
> [ 2035.976000] [<c0257177>] init_hwif_default+0x37/0x120
> [ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
> [ 2035.976000] [<c025e8a9>] probe_hwif+0x29/0x4f0
> [ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
> [ 2035.976000] [<c025ed85>] probe_hwif_init_with_fixup+0x15/0xa0
> [ 2035.976000] [<c0257ea5>] ide_register_hw_with_fixup+0x165/0x1b0
> [ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
> [ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
> [ 2035.976000] [<f8b07163>] idecs_register+0x83/0xd0 [ide_cs]
> [ 2035.976000] [<f8b070b0>] idecs_mmio_fixup+0x0/0x30 [ide_cs]
> [ 2035.976000] [<f8b071c0>] outb_mem+0x0/0x10 [ide_cs]
> [ 2035.976000] [<f8b075e4>] ide_config+0x414/0x790 [ide_cs]
> [ 2035.976000] [<f8b071c0>] outb_mem+0x0/0x10 [ide_cs]
> [ 2035.976000] [<f8b0f4c8>] pcmcia_device_probe+0xa8/0x160 [pcmcia]
> [ 2035.976000] [<c025104c>] driver_probe_device+0xbc/0xe0
> [ 2035.976000] [<c02510f0>] __driver_attach+0x0/0x80
> [ 2035.976000] [<c0251160>] __driver_attach+0x70/0x80
> [ 2035.976000] [<c0250369>] bus_for_each_dev+0x69/0x80
> [ 2035.976000] [<c0251195>] driver_attach+0x25/0x30
> [ 2035.976000] [<c02510f0>] __driver_attach+0x0/0x80
> [ 2035.976000] [<c0250968>] bus_add_driver+0x88/0xd0
> [ 2035.976000] [<f8b0b00f>] init_ide_cs+0xf/0x11 [ide_cs]
> [ 2035.976000] [<c0139f32>] sys_init_module+0xf2/0x190
> [ 2035.976000] [<c02e3105>] sysenter_past_esp+0x56/0x79
> [ 2035.976000] [<c02e007b>] inet6_lookup_listener+0x2b/0x100
> [ 2035.976000] ide2: I/O resource 0xF8B0200E-0xF8B0200E not free.
> [ 2035.976000] ide2: ports already in use, skipping probe
hm. It appears to have decided that 0 < 0xF8B0200E < 0xffff, which is
clever of it.
Does it help if you set CONFIG_RESOURCES_32BIT?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-21 7:46 ` Andrew Morton
@ 2006-06-21 17:10 ` Andy Isaacson
2006-06-21 18:31 ` Andy Isaacson
2006-06-22 0:31 ` Vivek Goyal
0 siblings, 2 replies; 10+ messages in thread
From: Andy Isaacson @ 2006-06-21 17:10 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
On Wed, Jun 21, 2006 at 12:46:30AM -0700, Andrew Morton wrote:
> > [ 2034.060000] pcmcia: registering new device pcmcia0.0
> > [ 2034.060000] PM: Adding info for pcmcia:0.0
> > [ 2035.976000] conflict: PCI IO[0->ffff]
> > [ 2035.976000] hwif_request_region: single-byte request for ide2
> > [ 2035.976000] [<c0257386>] hwif_request_region+0xa6/0xb0
[snip]
> > [ 2035.976000] ide2: I/O resource 0xF8B0200E-0xF8B0200E not free.
> > [ 2035.976000] ide2: ports already in use, skipping probe
>
> hm. It appears to have decided that 0 < 0xF8B0200E < 0xffff, which is
> clever of it.
>
> Does it help if you set CONFIG_RESOURCES_32BIT?
Nope, same conflict with CONFIG_RESOURCES_32BIT set. You're right, it
is deciding that 0xF8B0200E conflicts with that range:
conflict: PCI IO[0->ffff] conflicts with ide2[f8b3c00e->f8b3c00e]
Looking at the code, I don't understand how this could have worked in
-rc6; __request_resource hasn't changed, and it says
167 if (end < start)
168 return root;
169 if (start < root->start)
170 return root;
171 if (end > root->end)
172 return root;
If root-> start == 0 and root->end == 0xffff, we should always hit line
172, unless sign extension is in effect... and all the variables are
unsigned long in -rc6, so that doesn't make sense.
Rebooting into -rc6 with some debugging...
-andy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-21 17:10 ` Andy Isaacson
@ 2006-06-21 18:31 ` Andy Isaacson
2006-06-22 0:31 ` Vivek Goyal
1 sibling, 0 replies; 10+ messages in thread
From: Andy Isaacson @ 2006-06-21 18:31 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Randy.Dunlap
On Wed, Jun 21, 2006 at 10:10:48AM -0700, Andy Isaacson wrote:
> > > [ 2035.976000] ide2: I/O resource 0xF8B0200E-0xF8B0200E not free.
> > > [ 2035.976000] ide2: ports already in use, skipping probe
> >
> > hm. It appears to have decided that 0 < 0xF8B0200E < 0xffff, which is
> > clever of it.
> >
> > Does it help if you set CONFIG_RESOURCES_32BIT?
>
> Nope, same conflict with CONFIG_RESOURCES_32BIT set. You're right, it
> is deciding that 0xF8B0200E conflicts with that range:
>
> conflict: PCI IO[0->ffff] conflicts with ide2[f8b3c00e->f8b3c00e]
>
> Looking at the code, I don't understand how this could have worked in
> -rc6; __request_resource hasn't changed, and it says
>
> 167 if (end < start)
> 168 return root;
> 169 if (start < root->start)
> 170 return root;
> 171 if (end > root->end)
> 172 return root;
>
> If root-> start == 0 and root->end == 0xffff, we should always hit line
> 172, unless sign extension is in effect... and all the variables are
> unsigned long in -rc6, so that doesn't make sense.
>
> Rebooting into -rc6 with some debugging...
So 2.6.17-rc6 plus the conflict-printer patch and the
ide-single-byte-request patch does the following (booted with the
PCMCIA/CF adapter in by accident, and I'm using a different CF card now,
but it seems to have done the right thing):
cs: memory probe 0xf0000000-0xf7ffffff: excluding 0xf0000000-0xf7ffffff
cs: memory probe 0xd0200000-0xdfffffff: excluding 0xd0200000-0xd11fffff 0xd1a00000-0xd41fffff 0xd4a00000-0xd51fffff 0xd5a00000-0xd61fffff 0xd6a00000-0xd71fffff 0xd7a00000-0xd81fffff 0xd8a00000-0xd91fffff 0xd9a00000-0xda1fffff 0xdaa00000-0xdb1fffff 0xdba00000-0xdc1fffff 0xdca00000-0xdd1fffff 0xdda00000-0xde1fffff 0xdea00000-0xdf1fffff 0xdfa00000-0xe01fffff
pcmcia: registering new device pcmcia0.0
pcmcia: Detected deprecated PCMCIA ioctl usage from process: cardmgr.
pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.
pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.
cs: IO port probe 0x100-0x4ff: excluding 0x170-0x177 0x370-0x377 0x4d0-0x4d7
cs: IO port probe 0x800-0x8ff: clean.
cs: IO port probe 0xc00-0xcff: excluding 0xcf8-0xcff
cs: IO port probe 0xa00-0xaff: clean.
conflict: PCI Bus #02[3000->7fff] conflicts with ide2[310e->310e]
conflict: pcmcia_socket0[3100->310f] conflicts with ide2[310e->310e]
hwif_request_region: single-byte request for ide2
<c0242abe> hwif_request_region+0x9e/0xa0 <c0242bbf> ide_hwif_request_regions+0xff/0x120
<c0249c90> ide_undecoded_slave+0x0/0xc0 <c0249d79> probe_hwif+0x29/0x4f0
<c0249c90> ide_undecoded_slave+0x0/0xc0 <c024a255> probe_hwif_init_with_fixup+0x15/0xa0
<c0243556> ide_register_hw_with_fixup+0x166/0x1b0 <c0249c90> ide_undecoded_slave+0x0/0xc0
<f8a8612b> idecs_register+0x7b/0xb0 [ide_cs] <c0249c90> ide_undecoded_slave+0x0/0xc0
<f8a865a2> ide_config+0x442/0x6c0 [ide_cs] <f8ab348e> pcmcia_device_probe+0x6e/0x100 [pcmcia]
<c023ca1c> driver_probe_device+0xbc/0xe0 <c023cac0> __driver_attach+0x0/0x80
<c023cb30> __driver_attach+0x70/0x80 <c023bd69> bus_for_each_dev+0x69/0x80
<c01e5723> kobject_set_name+0x43/0xe0 <c023cb65> driver_attach+0x25/0x30
<c023cac0> __driver_attach+0x0/0x80 <c023c338> bus_add_driver+0x88/0xd0
<c023d077> driver_register+0x97/0xa0 <c023cfc0> klist_devices_get+0x0/0x10
<c023cfd0> klist_devices_put+0x0/0x10 <f8ab32f7> pcmcia_register_driver+0x17/0x50 [pcmcia]
<f894200f> init_ide_cs+0xf/0x11 [ide_cs] <c0136da2> sys_init_module+0xf2/0x180
<c0102f2f> sysenter_past_esp+0x54/0x75
conflict: PCI Bus #02[3000->7fff] conflicts with ide2[3100->3107]
conflict: pcmcia_socket0[3100->310f] conflicts with ide2[3100->3107]
Probing IDE interface ide2...
hde: LEXAR ATA FLASH, CFA DISK drive
ide2 at 0x3100-0x3107,0x310e on irq 3
hde: max request size: 128KiB
hde: 64256 sectors (32 MB) w/1KiB Cache, CHS=1004/2/32
hde: cache flushes not supported
hde: hde1
ide-cs: hde: Vpp = 0.0
I hope somebody who understands resource.c better than me is reading
this, because I'm pretty much out of time to spend reading code. (Happy
to test patches, of course.)
-andy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free"
2006-06-21 17:10 ` Andy Isaacson
2006-06-21 18:31 ` Andy Isaacson
@ 2006-06-22 0:31 ` Vivek Goyal
1 sibling, 0 replies; 10+ messages in thread
From: Vivek Goyal @ 2006-06-22 0:31 UTC (permalink / raw)
To: Andy Isaacson; +Cc: Andrew Morton, linux-kernel
On Wed, Jun 21, 2006 at 10:10:48AM -0700, Andy Isaacson wrote:
> On Wed, Jun 21, 2006 at 12:46:30AM -0700, Andrew Morton wrote:
> > > [ 2034.060000] pcmcia: registering new device pcmcia0.0
> > > [ 2034.060000] PM: Adding info for pcmcia:0.0
> > > [ 2035.976000] conflict: PCI IO[0->ffff]
> > > [ 2035.976000] hwif_request_region: single-byte request for ide2
> > > [ 2035.976000] [<c0257386>] hwif_request_region+0xa6/0xb0
> [snip]
> > > [ 2035.976000] ide2: I/O resource 0xF8B0200E-0xF8B0200E not free.
> > > [ 2035.976000] ide2: ports already in use, skipping probe
> >
> > hm. It appears to have decided that 0 < 0xF8B0200E < 0xffff, which is
> > clever of it.
> >
> > Does it help if you set CONFIG_RESOURCES_32BIT?
>
> Nope, same conflict with CONFIG_RESOURCES_32BIT set. You're right, it
> is deciding that 0xF8B0200E conflicts with that range:
>
> conflict: PCI IO[0->ffff] conflicts with ide2[f8b3c00e->f8b3c00e]
>
> Looking at the code, I don't understand how this could have worked in
> -rc6; __request_resource hasn't changed, and it says
>
> 167 if (end < start)
> 168 return root;
> 169 if (start < root->start)
> 170 return root;
> 171 if (end > root->end)
> 172 return root;
>
> If root-> start == 0 and root->end == 0xffff, we should always hit line
> 172, unless sign extension is in effect... and all the variables are
> unsigned long in -rc6, so that doesn't make sense.
>
I think this makes sense. We are hitting line 172 in case of -mm because
f8b3c00e is not a valid io port at all. Maximum valid value can be 0xffff.
So _request_region considers this to be a conflict and returns.
It succeeds in -rc6 because ide code is requesting a valid ioport region
ide2[310e->310e].
So __request_region() code seems to be fine. Problem seems to be that
why do we get an invalid ioport range in following call.
addr = hwif->io_ports[IDE_CONTROL_OFFSET];
Either hwif pointer is bad or somehow the location it is pointing to
is corrupt or something else. Can you do some more tracing on hwif.
Thanks
Vivek
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-06-22 0:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-15 16:28 2.6.17-rc[56]-mm*: pcmcia "I/O resource not free" Andy Isaacson
2006-06-17 17:03 ` Andrew Morton
2006-06-20 21:17 ` Andy Isaacson
2006-06-20 22:03 ` Andrew Morton
2006-06-20 22:36 ` Randy.Dunlap
2006-06-21 6:50 ` Andy Isaacson
2006-06-21 7:46 ` Andrew Morton
2006-06-21 17:10 ` Andy Isaacson
2006-06-21 18:31 ` Andy Isaacson
2006-06-22 0:31 ` Vivek Goyal
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.