Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Vincent C Jones
On Sat, Jul 16, 2005 at 05:12:58PM +0200, Dominik Brodowski wrote:
> Could you check whether this patch helps, please?
> 
> Index: 2.6.13-rc3-git2/drivers/pcmcia/cistpl.c
> ===
> --- 2.6.13-rc3-git2.orig/drivers/pcmcia/cistpl.c
> +++ 2.6.13-rc3-git2/drivers/pcmcia/cistpl.c
> @@ -88,31 +88,38 @@ EXPORT_SYMBOL(release_cis_mem);
>  static void __iomem *

This patch appears to have cured it! Good job.

Just in case it is of use to use, I've also responded to your first
request below.

> Hi,
> 
> Could you send me the output of /proc/iomem on both a working kernel and on
> 2.6.13-rc3-APM, please?
> 
> Thanks,
>   Dominik


First is as fails, second is same kernel with your patch applied, where
it seems to work just fine. Let me know if you would like it from
2.6.12.2 or 2.6.11.4-21.7 (SuSE 9.3) kernel.

Linux X31 2.6.13-rc3-APM #13 Fri Jul 15 23:55:12 EDT 2005 i686 i686 i386 
GNU/Linux

-0009efff : System RAM
0009f000-0009 : reserved
000a-000b : Video RAM area
000c-000c : Video ROM
000d-000d0fff : Adapter ROM
000d1000-000d1fff : Adapter ROM
000d2000-000d3fff : reserved
000e-000e : Extension ROM
000f-000f : System ROM
0010-2ff5 : System RAM
  0010-00361cfc : Kernel code
  00361cfd-004083e7 : Kernel data
2ff6-2ff76fff : ACPI Tables
2ff77000-2ff78fff : ACPI Non-volatile Storage
2ff8-2fff : reserved
3000-33ff : :00:1f.1
b000-bfff : :02:00.0
  b000-bfff : yenta_socket
b100-b1000fff : :02:00.1
  b100-b1000fff : yenta_socket
c000-c3ff : :00:1d.7
  c000-c3ff : ehci_hcd
c800-c8ff : :00:1f.5
  c800-c8ff : Intel 82801DB-ICH4
cc00-cdff : :00:1f.5
  cc00-cdff : Intel 82801DB-ICH4
c010-c01f : PCI Bus #01
  c010-c010 : :01:00.0
c010-c010 : radeonfb
  c012-c013 : :01:00.0
c020-cfff : PCI Bus #02
  c020-c020 : :02:01.0
  c021-c021 : :02:02.0
c021-c021 : ath
  c022-c023 : :02:01.0
  c024-c02407ff : :02:00.2
c024-c02407ff : ohci1394
  c120-c1200fff : pcmcia_socket1
  c200-c3ff : PCI CardBus #03
  c400-c5ff : PCI CardBus #07
d000-dfff : :00:00.0
e000-e7ff : PCI Bus #01
  e000-e7ff : :01:00.0
e000-e7ff : radeonfb
e800-efff : PCI Bus #02
  e800-e9ff : PCI CardBus #03
  ea00-ebff : PCI CardBus #07
  ec00-ec00 : :02:01.0
ff80- : reserved

==

Linux X31 2.6.13-rc3-APM #14 Sat Jul 16 10:19:10 EDT 2005 i686 i686 i386 
GNU/Linux

-0009efff : System RAM
0009f000-0009 : reserved
000a-000b : Video RAM area
000c-000c : Video ROM
000d-000d0fff : Adapter ROM
000d1000-000d1fff : Adapter ROM
000d2000-000d3fff : reserved
000e-000e : Extension ROM
000f-000f : System ROM
0010-2ff5 : System RAM
  0010-00359af0 : Kernel code
  00359af1-003fe3e7 : Kernel data
2ff6-2ff76fff : ACPI Tables
2ff77000-2ff78fff : ACPI Non-volatile Storage
2ff8-2fff : reserved
3000-33ff : :00:1f.1
b000-bfff : :02:00.0
  b000-bfff : yenta_socket
b100-b1000fff : :02:00.1
  b100-b1000fff : yenta_socket
c000-c3ff : :00:1d.7
  c000-c3ff : ehci_hcd
c800-c8ff : :00:1f.5
  c800-c8ff : Intel 82801DB-ICH4
cc00-cdff : :00:1f.5
  cc00-cdff : Intel 82801DB-ICH4
c010-c01f : PCI Bus #01
  c010-c010 : :01:00.0
c010-c010 : radeonfb
  c012-c013 : :01:00.0
c020-cfff : PCI Bus #02
  c020-c020 : :02:01.0
  c021-c021 : :02:02.0
c021-c021 : ath
  c022-c023 : :02:01.0
  c024-c02407ff : :02:00.2
c024-c02407ff : ohci1394
  c120-c1200fff : pcmcia_socket1
  c200-c3ff : PCI CardBus #03
  c400-c5ff : PCI CardBus #07
d000-dfff : :00:00.0
e000-e7ff : PCI Bus #01
  e000-e7ff : :01:00.0
e000-e7ff : radeonfb
e800-efff : PCI Bus #02
  e800-e9ff : PCI CardBus #03
  ea00-ebff : PCI CardBus #07
  ec00-ec00 : :02:01.0
ff80- : reserved

-- 
Dr. Vincent C. Jones, PE  Expert advice and a helping hand
Computer Network Consultant   for those who want to manage and
Networking Unlimited, Inc.control their networking destiny
Phone: +1 201 568-7810
14 Dogwood Lane, Tenafly, NJ 07670
[EMAIL PROTECTED] http://www.networkingunlimited.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  

Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Dominik Brodowski
On Sat, Jul 16, 2005 at 04:21:44PM +0100, Russell King wrote:
> On Sat, Jul 16, 2005 at 05:12:58PM +0200, Dominik Brodowski wrote:
> > Could you send me the output of /proc/iomem on both a working kernel and on
> > 2.6.13-rc3-APM, please?
> 
> Dominik, I'd suggest looking elsewhere.  The memory regions must be
> free to be able to call into readable(), and therefore pccard_validate_cis().
> 
> What seems to be happening is that s->ops->set_mem_map in set_cis_map
> is returning an error, causing it to free the ioremapped region
> multiple times.  Maybe the card has an invalid CIS causing an out
> of range card_start to be requested?

Could you check whether this patch helps, please?

Index: 2.6.13-rc3-git2/drivers/pcmcia/cistpl.c
===
--- 2.6.13-rc3-git2.orig/drivers/pcmcia/cistpl.c
+++ 2.6.13-rc3-git2/drivers/pcmcia/cistpl.c
@@ -88,31 +88,38 @@ EXPORT_SYMBOL(release_cis_mem);
 static void __iomem *
 set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int 
flags)
 {
-pccard_mem_map *mem = >cis_mem;
-int ret;
+   pccard_mem_map *mem = >cis_mem;
+   int ret;
 
-if (!(s->features & SS_CAP_STATIC_MAP) && mem->res == NULL) {
-   mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s);
-   if (mem->res == NULL) {
-   printk(KERN_NOTICE "cs: unable to map card memory!\n");
-   return NULL;
-   }
-   s->cis_virt = ioremap(mem->res->start, s->map_size);
-}
-mem->card_start = card_offset;
-mem->flags = flags;
-ret = s->ops->set_mem_map(s, mem);
-if (ret) {
-   iounmap(s->cis_virt);
-   return NULL;
-}
-
-if (s->features & SS_CAP_STATIC_MAP) {
-   if (s->cis_virt)
-   iounmap(s->cis_virt);
-   s->cis_virt = ioremap(mem->static_start, s->map_size);
-}
-return s->cis_virt;
+   if (!(s->features & SS_CAP_STATIC_MAP) && (mem->res == NULL)) {
+   mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 
0, s);
+   if (mem->res == NULL) {
+   printk(KERN_NOTICE "cs: unable to map card memory!\n");
+   return NULL;
+   }
+   s->cis_virt = NULL;
+   }
+
+   if (!(s->features & SS_CAP_STATIC_MAP) && (!s->cis_virt))
+   s->cis_virt = ioremap(mem->res->start, s->map_size);
+
+   mem->card_start = card_offset;
+   mem->flags = flags;
+
+   ret = s->ops->set_mem_map(s, mem);
+   if (ret) {
+   iounmap(s->cis_virt);
+   s->cis_virt = NULL;
+   return NULL;
+   }
+
+   if (s->features & SS_CAP_STATIC_MAP) {
+   if (s->cis_virt)
+   iounmap(s->cis_virt);
+   s->cis_virt = ioremap(mem->static_start, s->map_size);
+   }
+
+   return s->cis_virt;
 }
 
 /*==
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Russell King
On Sat, Jul 16, 2005 at 05:12:58PM +0200, Dominik Brodowski wrote:
> Could you send me the output of /proc/iomem on both a working kernel and on
> 2.6.13-rc3-APM, please?

Dominik, I'd suggest looking elsewhere.  The memory regions must be
free to be able to call into readable(), and therefore pccard_validate_cis().

What seems to be happening is that s->ops->set_mem_map in set_cis_map
is returning an error, causing it to free the ioremapped region
multiple times.  Maybe the card has an invalid CIS causing an out
of range card_start to be requested?

-- 
Russell King
 Linux kernel2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Dominik Brodowski
Hi,

Could you send me the output of /proc/iomem on both a working kernel and on
2.6.13-rc3-APM, please?

Thanks,
Dominik
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Vincent C Jones
Testing 2.6.13-rc3 and getting nasty output during bootup from yenta
socket initialization. dmesg output follows:

Linux version 2.6.13-rc3-APM ([EMAIL PROTECTED]) (gcc version 3.3.5 20050117 
(prerelease) (SUSE Linux)) #13 Fri Jul 15 23:55:12 EDT 2005
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009f000 (usable)
 BIOS-e820: 0009f000 - 000a (reserved)
 BIOS-e820: 000d2000 - 000d4000 (reserved)
 BIOS-e820: 000dc000 - 0010 (reserved)
 BIOS-e820: 0010 - 2ff6 (usable)
 BIOS-e820: 2ff6 - 2ff77000 (ACPI data)
 BIOS-e820: 2ff77000 - 2ff79000 (ACPI NVS)
 BIOS-e820: 2ff8 - 3000 (reserved)
 BIOS-e820: ff80 - 0001 (reserved)
767MB LOWMEM available.
On node 0 totalpages: 196448
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 192352 pages, LIFO batch:31
  HighMem zone: 0 pages, LIFO batch:1
DMI present.
Allocating PCI resources starting at 3000 (gap: 3000:cf80)
Built 1 zonelists
Kernel command line: auto BOOT_IMAGE=Test_9.3 ro root=307 selinux=0 desktop 
video=1024x768 i8042.nomux PROFILE=NUI
Local APIC disabled by BIOS -- you can enable it with "lapic"
mapped APIC to d000 (01601000)
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 1398.858 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 774732k/785792k available (2439k kernel code, 10604k reserved, 665k 
data, 156k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 2800.29 BogoMIPS (lpj=14001494)
Security Framework v1.0.0 initialized
SELinux:  Disabled at boot.
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: After generic identify, caps: a7e9f9bf    0180 
 
CPU: After vendor identify, caps: a7e9f9bf    0180 
 
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 1024K
CPU: After all inits, caps: a7e9f9bf   0040 0180 
 
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
mtrr: v2.0 (20020519)
CPU: Intel(R) Pentium(R) M processor 1400MHz stepping 05
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd8d6, last bus=8
PCI: Using configuration type 1
Linux Plug and Play Support v0.97 (c) Adam Belay
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Ignoring BAR0-3 of IDE controller :00:1f.1
Boot video device is :01:00.0
PCI: Transparent bridge - :00:1e.0
PCI: Discovered primary peer bus 09 [IRQ]
PCI: Using IRQ router PIIX/ICH [8086/24cc] at :00:1f.0
PCI: IRQ 0 for device :00:1f.1 doesn't match PIRQ mask - try pci=usepirqmask
PCI: Found IRQ 11 for device :00:1f.1
PCI: Sharing IRQ 11 with :00:1d.2
PCI: Sharing IRQ 11 with :02:00.2
PCI: Sharing IRQ 11 with :02:02.0
PCI: Bridge: :00:01.0
  IO window: 3000-3fff
  MEM window: c010-c01f
  PREFETCH window: e000-e7ff
PCI: Bus 3, cardbus bridge: :02:00.0
  IO window: 4000-4fff
  IO window: 5000-5fff
  PREFETCH window: e800-e9ff
  MEM window: c200-c3ff
PCI: Bus 7, cardbus bridge: :02:00.1
  IO window: 6000-6fff
  IO window: 7000-7fff
  PREFETCH window: ea00-ebff
  MEM window: c400-c5ff
PCI: Bridge: :00:1e.0
  IO window: 4000-8fff
  MEM window: c020-cfff
  PREFETCH window: e800-efff
PCI: Setting latency timer of device :00:1e.0 to 64
PCI: Found IRQ 11 for device :02:00.0
PCI: Sharing IRQ 11 with :00:1d.0
PCI: Sharing IRQ 11 with :01:00.0
PCI: Sharing IRQ 11 with :02:01.0
PCI: Found IRQ 11 for device :02:00.1
PCI: Sharing IRQ 11 with :00:1f.3
PCI: Sharing IRQ 11 with :00:1f.5
PCI: Sharing IRQ 11 with :00:1f.6
audit: initializing netlink socket (disabled)
audit(1121522265.240:1): initialized
Total HugeTLB memory allocated, 0
inotify syscall
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
PCI: Found IRQ 11 for device :01:00.0
PCI: Sharing IRQ 11 with :00:1d.0
PCI: Sharing IRQ 11 with :02:00.0
PCI: Sharing IRQ 11 with :02:01.0
radeonfb: Retreived PLL infos from BIOS
radeonfb: Reference=27.00 MHz (RefDiv=60) Memory=144.00 Mhz, System=144.00 MHz
radeonfb: PLL min 12000 max 35000
Non-DDC laptop panel detected
radeonfb: Monitor 1 type LCD found
radeonfb: Monitor 2 type no found
radeonfb: panel ID string: 1024x768

Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Vincent C Jones
Testing 2.6.13-rc3 and getting nasty output during bootup from yenta
socket initialization. dmesg output follows:

Linux version 2.6.13-rc3-APM ([EMAIL PROTECTED]) (gcc version 3.3.5 20050117 
(prerelease) (SUSE Linux)) #13 Fri Jul 15 23:55:12 EDT 2005
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009f000 (usable)
 BIOS-e820: 0009f000 - 000a (reserved)
 BIOS-e820: 000d2000 - 000d4000 (reserved)
 BIOS-e820: 000dc000 - 0010 (reserved)
 BIOS-e820: 0010 - 2ff6 (usable)
 BIOS-e820: 2ff6 - 2ff77000 (ACPI data)
 BIOS-e820: 2ff77000 - 2ff79000 (ACPI NVS)
 BIOS-e820: 2ff8 - 3000 (reserved)
 BIOS-e820: ff80 - 0001 (reserved)
767MB LOWMEM available.
On node 0 totalpages: 196448
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 192352 pages, LIFO batch:31
  HighMem zone: 0 pages, LIFO batch:1
DMI present.
Allocating PCI resources starting at 3000 (gap: 3000:cf80)
Built 1 zonelists
Kernel command line: auto BOOT_IMAGE=Test_9.3 ro root=307 selinux=0 desktop 
video=1024x768 i8042.nomux PROFILE=NUI
Local APIC disabled by BIOS -- you can enable it with lapic
mapped APIC to d000 (01601000)
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 1398.858 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 774732k/785792k available (2439k kernel code, 10604k reserved, 665k 
data, 156k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 2800.29 BogoMIPS (lpj=14001494)
Security Framework v1.0.0 initialized
SELinux:  Disabled at boot.
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: After generic identify, caps: a7e9f9bf    0180 
 
CPU: After vendor identify, caps: a7e9f9bf    0180 
 
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 1024K
CPU: After all inits, caps: a7e9f9bf   0040 0180 
 
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
mtrr: v2.0 (20020519)
CPU: Intel(R) Pentium(R) M processor 1400MHz stepping 05
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd8d6, last bus=8
PCI: Using configuration type 1
Linux Plug and Play Support v0.97 (c) Adam Belay
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Ignoring BAR0-3 of IDE controller :00:1f.1
Boot video device is :01:00.0
PCI: Transparent bridge - :00:1e.0
PCI: Discovered primary peer bus 09 [IRQ]
PCI: Using IRQ router PIIX/ICH [8086/24cc] at :00:1f.0
PCI: IRQ 0 for device :00:1f.1 doesn't match PIRQ mask - try pci=usepirqmask
PCI: Found IRQ 11 for device :00:1f.1
PCI: Sharing IRQ 11 with :00:1d.2
PCI: Sharing IRQ 11 with :02:00.2
PCI: Sharing IRQ 11 with :02:02.0
PCI: Bridge: :00:01.0
  IO window: 3000-3fff
  MEM window: c010-c01f
  PREFETCH window: e000-e7ff
PCI: Bus 3, cardbus bridge: :02:00.0
  IO window: 4000-4fff
  IO window: 5000-5fff
  PREFETCH window: e800-e9ff
  MEM window: c200-c3ff
PCI: Bus 7, cardbus bridge: :02:00.1
  IO window: 6000-6fff
  IO window: 7000-7fff
  PREFETCH window: ea00-ebff
  MEM window: c400-c5ff
PCI: Bridge: :00:1e.0
  IO window: 4000-8fff
  MEM window: c020-cfff
  PREFETCH window: e800-efff
PCI: Setting latency timer of device :00:1e.0 to 64
PCI: Found IRQ 11 for device :02:00.0
PCI: Sharing IRQ 11 with :00:1d.0
PCI: Sharing IRQ 11 with :01:00.0
PCI: Sharing IRQ 11 with :02:01.0
PCI: Found IRQ 11 for device :02:00.1
PCI: Sharing IRQ 11 with :00:1f.3
PCI: Sharing IRQ 11 with :00:1f.5
PCI: Sharing IRQ 11 with :00:1f.6
audit: initializing netlink socket (disabled)
audit(1121522265.240:1): initialized
Total HugeTLB memory allocated, 0
inotify syscall
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
PCI: Found IRQ 11 for device :01:00.0
PCI: Sharing IRQ 11 with :00:1d.0
PCI: Sharing IRQ 11 with :02:00.0
PCI: Sharing IRQ 11 with :02:01.0
radeonfb: Retreived PLL infos from BIOS
radeonfb: Reference=27.00 MHz (RefDiv=60) Memory=144.00 Mhz, System=144.00 MHz
radeonfb: PLL min 12000 max 35000
Non-DDC laptop panel detected
radeonfb: Monitor 1 type LCD found
radeonfb: Monitor 2 type no found
radeonfb: panel ID string: 1024x768

Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Dominik Brodowski
Hi,

Could you send me the output of /proc/iomem on both a working kernel and on
2.6.13-rc3-APM, please?

Thanks,
Dominik
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Russell King
On Sat, Jul 16, 2005 at 05:12:58PM +0200, Dominik Brodowski wrote:
 Could you send me the output of /proc/iomem on both a working kernel and on
 2.6.13-rc3-APM, please?

Dominik, I'd suggest looking elsewhere.  The memory regions must be
free to be able to call into readable(), and therefore pccard_validate_cis().

What seems to be happening is that s-ops-set_mem_map in set_cis_map
is returning an error, causing it to free the ioremapped region
multiple times.  Maybe the card has an invalid CIS causing an out
of range card_start to be requested?

-- 
Russell King
 Linux kernel2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Dominik Brodowski
On Sat, Jul 16, 2005 at 04:21:44PM +0100, Russell King wrote:
 On Sat, Jul 16, 2005 at 05:12:58PM +0200, Dominik Brodowski wrote:
  Could you send me the output of /proc/iomem on both a working kernel and on
  2.6.13-rc3-APM, please?
 
 Dominik, I'd suggest looking elsewhere.  The memory regions must be
 free to be able to call into readable(), and therefore pccard_validate_cis().
 
 What seems to be happening is that s-ops-set_mem_map in set_cis_map
 is returning an error, causing it to free the ioremapped region
 multiple times.  Maybe the card has an invalid CIS causing an out
 of range card_start to be requested?

Could you check whether this patch helps, please?

Index: 2.6.13-rc3-git2/drivers/pcmcia/cistpl.c
===
--- 2.6.13-rc3-git2.orig/drivers/pcmcia/cistpl.c
+++ 2.6.13-rc3-git2/drivers/pcmcia/cistpl.c
@@ -88,31 +88,38 @@ EXPORT_SYMBOL(release_cis_mem);
 static void __iomem *
 set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int 
flags)
 {
-pccard_mem_map *mem = s-cis_mem;
-int ret;
+   pccard_mem_map *mem = s-cis_mem;
+   int ret;
 
-if (!(s-features  SS_CAP_STATIC_MAP)  mem-res == NULL) {
-   mem-res = pcmcia_find_mem_region(0, s-map_size, s-map_size, 0, s);
-   if (mem-res == NULL) {
-   printk(KERN_NOTICE cs: unable to map card memory!\n);
-   return NULL;
-   }
-   s-cis_virt = ioremap(mem-res-start, s-map_size);
-}
-mem-card_start = card_offset;
-mem-flags = flags;
-ret = s-ops-set_mem_map(s, mem);
-if (ret) {
-   iounmap(s-cis_virt);
-   return NULL;
-}
-
-if (s-features  SS_CAP_STATIC_MAP) {
-   if (s-cis_virt)
-   iounmap(s-cis_virt);
-   s-cis_virt = ioremap(mem-static_start, s-map_size);
-}
-return s-cis_virt;
+   if (!(s-features  SS_CAP_STATIC_MAP)  (mem-res == NULL)) {
+   mem-res = pcmcia_find_mem_region(0, s-map_size, s-map_size, 
0, s);
+   if (mem-res == NULL) {
+   printk(KERN_NOTICE cs: unable to map card memory!\n);
+   return NULL;
+   }
+   s-cis_virt = NULL;
+   }
+
+   if (!(s-features  SS_CAP_STATIC_MAP)  (!s-cis_virt))
+   s-cis_virt = ioremap(mem-res-start, s-map_size);
+
+   mem-card_start = card_offset;
+   mem-flags = flags;
+
+   ret = s-ops-set_mem_map(s, mem);
+   if (ret) {
+   iounmap(s-cis_virt);
+   s-cis_virt = NULL;
+   return NULL;
+   }
+
+   if (s-features  SS_CAP_STATIC_MAP) {
+   if (s-cis_virt)
+   iounmap(s-cis_virt);
+   s-cis_virt = ioremap(mem-static_start, s-map_size);
+   }
+
+   return s-cis_virt;
 }
 
 /*==
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6.13-rc3][PCMCIA] - iounmap: bad address f1d62000

2005-07-16 Thread Vincent C Jones
On Sat, Jul 16, 2005 at 05:12:58PM +0200, Dominik Brodowski wrote:
 Could you check whether this patch helps, please?
 
 Index: 2.6.13-rc3-git2/drivers/pcmcia/cistpl.c
 ===
 --- 2.6.13-rc3-git2.orig/drivers/pcmcia/cistpl.c
 +++ 2.6.13-rc3-git2/drivers/pcmcia/cistpl.c
 @@ -88,31 +88,38 @@ EXPORT_SYMBOL(release_cis_mem);
  static void __iomem *

This patch appears to have cured it! Good job.

Just in case it is of use to use, I've also responded to your first
request below.

 Hi,
 
 Could you send me the output of /proc/iomem on both a working kernel and on
 2.6.13-rc3-APM, please?
 
 Thanks,
   Dominik


First is as fails, second is same kernel with your patch applied, where
it seems to work just fine. Let me know if you would like it from
2.6.12.2 or 2.6.11.4-21.7 (SuSE 9.3) kernel.

Linux X31 2.6.13-rc3-APM #13 Fri Jul 15 23:55:12 EDT 2005 i686 i686 i386 
GNU/Linux

-0009efff : System RAM
0009f000-0009 : reserved
000a-000b : Video RAM area
000c-000c : Video ROM
000d-000d0fff : Adapter ROM
000d1000-000d1fff : Adapter ROM
000d2000-000d3fff : reserved
000e-000e : Extension ROM
000f-000f : System ROM
0010-2ff5 : System RAM
  0010-00361cfc : Kernel code
  00361cfd-004083e7 : Kernel data
2ff6-2ff76fff : ACPI Tables
2ff77000-2ff78fff : ACPI Non-volatile Storage
2ff8-2fff : reserved
3000-33ff : :00:1f.1
b000-bfff : :02:00.0
  b000-bfff : yenta_socket
b100-b1000fff : :02:00.1
  b100-b1000fff : yenta_socket
c000-c3ff : :00:1d.7
  c000-c3ff : ehci_hcd
c800-c8ff : :00:1f.5
  c800-c8ff : Intel 82801DB-ICH4
cc00-cdff : :00:1f.5
  cc00-cdff : Intel 82801DB-ICH4
c010-c01f : PCI Bus #01
  c010-c010 : :01:00.0
c010-c010 : radeonfb
  c012-c013 : :01:00.0
c020-cfff : PCI Bus #02
  c020-c020 : :02:01.0
  c021-c021 : :02:02.0
c021-c021 : ath
  c022-c023 : :02:01.0
  c024-c02407ff : :02:00.2
c024-c02407ff : ohci1394
  c120-c1200fff : pcmcia_socket1
  c200-c3ff : PCI CardBus #03
  c400-c5ff : PCI CardBus #07
d000-dfff : :00:00.0
e000-e7ff : PCI Bus #01
  e000-e7ff : :01:00.0
e000-e7ff : radeonfb
e800-efff : PCI Bus #02
  e800-e9ff : PCI CardBus #03
  ea00-ebff : PCI CardBus #07
  ec00-ec00 : :02:01.0
ff80- : reserved

==

Linux X31 2.6.13-rc3-APM #14 Sat Jul 16 10:19:10 EDT 2005 i686 i686 i386 
GNU/Linux

-0009efff : System RAM
0009f000-0009 : reserved
000a-000b : Video RAM area
000c-000c : Video ROM
000d-000d0fff : Adapter ROM
000d1000-000d1fff : Adapter ROM
000d2000-000d3fff : reserved
000e-000e : Extension ROM
000f-000f : System ROM
0010-2ff5 : System RAM
  0010-00359af0 : Kernel code
  00359af1-003fe3e7 : Kernel data
2ff6-2ff76fff : ACPI Tables
2ff77000-2ff78fff : ACPI Non-volatile Storage
2ff8-2fff : reserved
3000-33ff : :00:1f.1
b000-bfff : :02:00.0
  b000-bfff : yenta_socket
b100-b1000fff : :02:00.1
  b100-b1000fff : yenta_socket
c000-c3ff : :00:1d.7
  c000-c3ff : ehci_hcd
c800-c8ff : :00:1f.5
  c800-c8ff : Intel 82801DB-ICH4
cc00-cdff : :00:1f.5
  cc00-cdff : Intel 82801DB-ICH4
c010-c01f : PCI Bus #01
  c010-c010 : :01:00.0
c010-c010 : radeonfb
  c012-c013 : :01:00.0
c020-cfff : PCI Bus #02
  c020-c020 : :02:01.0
  c021-c021 : :02:02.0
c021-c021 : ath
  c022-c023 : :02:01.0
  c024-c02407ff : :02:00.2
c024-c02407ff : ohci1394
  c120-c1200fff : pcmcia_socket1
  c200-c3ff : PCI CardBus #03
  c400-c5ff : PCI CardBus #07
d000-dfff : :00:00.0
e000-e7ff : PCI Bus #01
  e000-e7ff : :01:00.0
e000-e7ff : radeonfb
e800-efff : PCI Bus #02
  e800-e9ff : PCI CardBus #03
  ea00-ebff : PCI CardBus #07
  ec00-ec00 : :02:01.0
ff80- : reserved

-- 
Dr. Vincent C. Jones, PE  Expert advice and a helping hand
Computer Network Consultant   for those who want to manage and
Networking Unlimited, Inc.control their networking destiny
Phone: +1 201 568-7810
14 Dogwood Lane, Tenafly, NJ 07670
[EMAIL PROTECTED] http://www.networkingunlimited.com
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/