Bug 7836 - IOPORT for Cardbus is given in wrong range 0x1000
Summary: IOPORT for Cardbus is given in wrong range 0x1000
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Jesse Barnes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-16 13:25 UTC by Benedek Frank
Modified: 2008-12-22 09:50 UTC (History)
0 users

See Also:
Kernel Version: 2.6.18
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Benedek Frank 2007-01-16 13:25:41 UTC
Most recent kernel where this bug did *NOT* occur: N/A
Distribution: Debian Etch
Hardware Environment: i386 (transmeta crusoe)
Software Environment: 
Problem Description: When a 32bit Cardbus (pcmcia) card is in the slot, it will
get the 1000-10ff range, and it should start at 4000 as its stated in
include/asm-i386/pci.h

#define PCIBIOS_MIN_IO          0x1000
#define PCIBIOS_MIN_MEM         (pci_mem_start)

#define PCIBIOS_MIN_CARDBUS_IO  0x4000

Now, if I changed the PCIBIOS_MIN_IO to 0x4000 and recompiled the kernel, it
worked fine.


Steps to reproduce:

Take a Vaio laptop, load the sonypi module, place a 32bit PCMCIA (cardbus) card
in the slot, and there you are.

I did my tests on a Vaio PCG-U1 laptop.

The only thing (that I found so far) it bothered was the Sonypi module, which
loads itself with IOPORTS 1080-109f, and this blows it away when a 32bit Cardbus
card is in the yenta slot. When the card it ejected, sonypi immediately starts
to work.

/proc/ioports with bad kernel:

0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
0370-0371 : pnp 00:08
03c0-03df : vga+
03f6-03f6 : ide0
040b-040b : pnp 00:08
0480-048f : pnp 00:08
04d0-04d1 : pnp 00:08
04d6-04d6 : pnp 00:08
0cf8-0cff : PCI conf1
1000-10ff : PCI CardBus #01
  1080-109f : Sony Programable I/O Device
1400-14ff : 0000:00:06.0
  1400-14ff : ALI 5451
1800-18ff : 0000:00:0b.0
  1800-18ff : 8139too
1c00-1cff : 0000:00:0c.0
2000-200f : 0000:00:10.0
  2000-2007 : ide0
  2008-200f : ide1
2400-24ff : PCI CardBus #01
8000-803f : 0000:00:11.0
  8000-803f : motherboard
    8000-8003 : ACPI PM1a_EVT_BLK
    8008-800b : ACPI PM_TMR
    8010-8015 : ACPI CPU throttle
    8018-8027 : ACPI GPE0_BLK
    8030-8030 : ACPI PM2_CNT_BLK
8040-805f : 0000:00:11.0
  8040-805f : motherboard
    8040-805f : ali1535_smbus
8084-8087 : motherboard
  8086-8087 : ACPI PM1a_CNT_BLK


And with the modified pci.h

0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
0370-0371 : pnp 00:08
03c0-03df : vga+
03f6-03f6 : ide0
040b-040b : pnp 00:08
0480-048f : pnp 00:08
04d0-04d1 : pnp 00:08
04d6-04d6 : pnp 00:08
0cf8-0cff : PCI conf1
1080-109f : Sony Programable I/O Device
1400-140f : 0000:00:10.0
  1400-1407 : ide0
  1408-140f : ide1
1800-18ff : 0000:00:06.0
  1800-18ff : ALI 5451
1c00-1cff : 0000:00:0b.0
  1c00-1cff : 8139too
2000-20ff : 0000:00:0c.0
4000-40ff : PCI CardBus #01
4400-44ff : PCI CardBus #01
8000-803f : 0000:00:11.0
  8000-803f : motherboard
    8000-8003 : ACPI PM1a_EVT_BLK
    8008-800b : ACPI PM_TMR
    8010-8015 : ACPI CPU throttle
    8018-8027 : ACPI GPE0_BLK
    8030-8030 : ACPI PM2_CNT_BLK
8040-805f : 0000:00:11.0
  8040-805f : motherboard
    8040-805f : ali1535_smbus
8084-8087 : motherboard
  8086-8087 : ACPI PM1a_CNT_BLK

Credit for this fix goes to Stelian Pop, maintainer of Sonypi. Thanks Stelian.
Comment 1 Andrew Morton 2007-01-16 14:05:53 UTC
Linus, any thoughts on this?

> On Tue, 16 Jan 2007 13:32:57 -0800 bugme-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=7836
> 
>            Summary: IOPORT for Cardbus is given in wrong range 0x1000
>     Kernel Version: 2.6.18
>             Status: NEW
>           Severity: normal
>              Owner: greg@kroah.com
>          Submitter: linux@celifornia.com
> 
> 
> Most recent kernel where this bug did *NOT* occur: N/A
> Distribution: Debian Etch
> Hardware Environment: i386 (transmeta crusoe)
> Software Environment: 
> Problem Description: When a 32bit Cardbus (pcmcia) card is in the slot, it will
> get the 1000-10ff range, and it should start at 4000 as its stated in
> include/asm-i386/pci.h
> 
> #define PCIBIOS_MIN_IO          0x1000
> #define PCIBIOS_MIN_MEM         (pci_mem_start)
> 
> #define PCIBIOS_MIN_CARDBUS_IO  0x4000
> 
> Now, if I changed the PCIBIOS_MIN_IO to 0x4000 and recompiled the kernel, it
> worked fine.
> 
> 
> Steps to reproduce:
> 
> Take a Vaio laptop, load the sonypi module, place a 32bit PCMCIA (cardbus) card
> in the slot, and there you are.
> 
> I did my tests on a Vaio PCG-U1 laptop.
> 
> The only thing (that I found so far) it bothered was the Sonypi module, which
> loads itself with IOPORTS 1080-109f, and this blows it away when a 32bit Cardbus
> card is in the yenta slot. When the card it ejected, sonypi immediately starts
> to work.
> 
> /proc/ioports with bad kernel:
> 
> 0000-001f : dma1
> 0020-0021 : pic1
> 0040-0043 : timer0
> 0050-0053 : timer1
> 0060-006f : keyboard
> 0070-0077 : rtc
> 0080-008f : dma page reg
> 00a0-00a1 : pic2
> 00c0-00df : dma2
> 00f0-00ff : fpu
> 01f0-01f7 : ide0
> 0370-0371 : pnp 00:08
> 03c0-03df : vga+
> 03f6-03f6 : ide0
> 040b-040b : pnp 00:08
> 0480-048f : pnp 00:08
> 04d0-04d1 : pnp 00:08
> 04d6-04d6 : pnp 00:08
> 0cf8-0cff : PCI conf1
> 1000-10ff : PCI CardBus #01
>   1080-109f : Sony Programable I/O Device
> 1400-14ff : 0000:00:06.0
>   1400-14ff : ALI 5451
> 1800-18ff : 0000:00:0b.0
>   1800-18ff : 8139too
> 1c00-1cff : 0000:00:0c.0
> 2000-200f : 0000:00:10.0
>   2000-2007 : ide0
>   2008-200f : ide1
> 2400-24ff : PCI CardBus #01
> 8000-803f : 0000:00:11.0
>   8000-803f : motherboard
>     8000-8003 : ACPI PM1a_EVT_BLK
>     8008-800b : ACPI PM_TMR
>     8010-8015 : ACPI CPU throttle
>     8018-8027 : ACPI GPE0_BLK
>     8030-8030 : ACPI PM2_CNT_BLK
> 8040-805f : 0000:00:11.0
>   8040-805f : motherboard
>     8040-805f : ali1535_smbus
> 8084-8087 : motherboard
>   8086-8087 : ACPI PM1a_CNT_BLK
> 
> 
> And with the modified pci.h
> 
> 0000-001f : dma1
> 0020-0021 : pic1
> 0040-0043 : timer0
> 0050-0053 : timer1
> 0060-006f : keyboard
> 0070-0077 : rtc
> 0080-008f : dma page reg
> 00a0-00a1 : pic2
> 00c0-00df : dma2
> 00f0-00ff : fpu
> 01f0-01f7 : ide0
> 0370-0371 : pnp 00:08
> 03c0-03df : vga+
> 03f6-03f6 : ide0
> 040b-040b : pnp 00:08
> 0480-048f : pnp 00:08
> 04d0-04d1 : pnp 00:08
> 04d6-04d6 : pnp 00:08
> 0cf8-0cff : PCI conf1
> 1080-109f : Sony Programable I/O Device
> 1400-140f : 0000:00:10.0
>   1400-1407 : ide0
>   1408-140f : ide1
> 1800-18ff : 0000:00:06.0
>   1800-18ff : ALI 5451
> 1c00-1cff : 0000:00:0b.0
>   1c00-1cff : 8139too
> 2000-20ff : 0000:00:0c.0
> 4000-40ff : PCI CardBus #01
> 4400-44ff : PCI CardBus #01
> 8000-803f : 0000:00:11.0
>   8000-803f : motherboard
>     8000-8003 : ACPI PM1a_EVT_BLK
>     8008-800b : ACPI PM_TMR
>     8010-8015 : ACPI CPU throttle
>     8018-8027 : ACPI GPE0_BLK
>     8030-8030 : ACPI PM2_CNT_BLK
> 8040-805f : 0000:00:11.0
>   8040-805f : motherboard
>     8040-805f : ali1535_smbus
> 8084-8087 : motherboard
>   8086-8087 : ACPI PM1a_CNT_BLK
> 
> Credit for this fix goes to Stelian Pop, maintainer of Sonypi. Thanks Stelian.
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.

Comment 2 Stelian Pop 2007-01-16 14:27:44 UTC
Le mardi 16 janvier 2007 
Comment 3 Jesse Barnes 2008-05-01 17:35:57 UTC
Benedek, do you still see this?  I vaguely remember some changes in this area fairly recently...

Note You need to log in before you can comment on or make changes to this bug.