From listes at zyzomys.com  Sun Feb  8 18:26:12 2004
From: listes at zyzomys.com (Pascal H.)
Date: Sun Feb  8 17:26:47 2004
Subject: Kernel 2.6.2 oops with Sandisk pcmcia CompactFlash adapter
Message-ID: <40267134.1010809@zyzomys.com>

Hi,

On my fujitsu-siemens Amilo M8815 i have a problem with a Sandisk 
CompactFlash pcmcia adapter. I have a kernel oops when i insert the 
pcmcia card. This problem occurs with kernel 2.6.1 and 2.6.2 (didn't 
test 2.6.0). The kernel is compiled with gcc-2.95.3, pcmcia-cs version 
is 3.2.7.
With kernel 2.4.23 everything works fine with this CF adapter.

Here is output of dmesg :

Feb  8 10:38:35 zyzomys kernel: Linux version 2.6.2lfs.19 
(pascal@zyzomys) (version gcc 3.2.1) #1 Wed Feb 4 10:50:52 CET 2004
Feb  8 10:38:35 zyzomys kernel: BIOS-provided physical RAM map:
Feb  8 10:38:35 zyzomys kernel:  BIOS-e820: 0000000000000000 - 
000000000009fc00 (usable)
Feb  8 10:38:35 zyzomys kernel:  BIOS-e820: 000000000009fc00 - 
00000000000a0000 (reserved)
Feb  8 10:38:35 zyzomys kernel:  BIOS-e820: 00000000000e0000 - 
0000000000100000 (reserved)
Feb  8 10:38:35 zyzomys kernel:  BIOS-e820: 0000000000100000 - 
000000000dff0000 (usable)
Feb  8 10:38:35 zyzomys kernel:  BIOS-e820: 000000000dff0000 - 
000000000dffffc0 (ACPI data)
Feb  8 10:38:35 zyzomys kernel:  BIOS-e820: 000000000dffffc0 - 
000000000e000000 (ACPI NVS)
Feb  8 10:38:35 zyzomys kernel:  BIOS-e820: 00000000fff80000 - 
0000000100000000 (reserved)
Feb  8 10:38:35 zyzomys kernel: user-defined physical RAM map:
Feb  8 10:38:35 zyzomys kernel:  user: 0000000000000000 - 
000000000009fc00 (usable)
Feb  8 10:38:35 zyzomys kernel:  user: 000000000009fc00 - 
00000000000a0000 (reserved)
Feb  8 10:38:35 zyzomys kernel:  user: 00000000000e0000 - 
0000000000100000 (reserved)
Feb  8 10:38:35 zyzomys kernel:  user: 0000000000100000 - 
000000000dff0000 (usable)
Feb  8 10:38:35 zyzomys kernel: 223MB LOWMEM available.
Feb  8 10:38:35 zyzomys kernel: On node 0 totalpages: 57328
Feb  8 10:38:35 zyzomys kernel:   DMA zone: 4096 pages, LIFO batch:1
Feb  8 10:38:35 zyzomys kernel:   Normal zone: 53232 pages, LIFO batch:12
Feb  8 10:38:35 zyzomys kernel:   HighMem zone: 0 pages, LIFO batch:1
Feb  8 10:38:35 zyzomys kernel: DMI 2.3 present.
Feb  8 10:38:35 zyzomys kernel: ACPI: RSDP (v000 
OID_00                                    ) @ 0x000e5010
Feb  8 10:38:35 zyzomys kernel: ACPI: RSDT (v001 INSYDE RSDT_000 
0x00000001 _CSI 0x00010101) @ 0x0dfffbc0
Feb  8 10:38:35 zyzomys kernel: ACPI: FADT (v001 INSYDE FACP_000 
0x00000100 _CSI 0x00010101) @ 0x0dfffac0
Feb  8 10:38:35 zyzomys kernel: ACPI: BOOT (v001 INSYDE SYS_BOOT 
0x00000100 _CSI 0x00010101) @ 0x0dfffb50
Feb  8 10:38:35 zyzomys kernel: ACPI: DBGP (v001 INSYDE DBGP_000 
0x00000100 _CSI 0x00010101) @ 0x0dfffb80
Feb  8 10:38:35 zyzomys kernel: ACPI: DSDT (v001 FUJITS EF4      
0x00000419 MSFT 0x0100000d) @ 0x00000000
Feb  8 10:38:35 zyzomys kernel: Building zonelist for node : 0
Feb  8 10:38:35 zyzomys kernel: Kernel command line: root=/dev/hda2 ro 
vga=827 mem=229312K
Feb  8 10:38:35 zyzomys kernel: No local APIC present or hardware disabled
Feb  8 10:38:35 zyzomys kernel: Initializing CPU#0
Feb  8 10:38:35 zyzomys kernel: PID hash table entries: 1024 (order 10: 
8192 bytes)
Feb  8 10:38:35 zyzomys kernel: Detected 1495.806 MHz processor.
Feb  8 10:38:35 zyzomys kernel: Using tsc for high-res timesource
Feb  8 10:38:35 zyzomys kernel: Console: colour dummy device 80x25
Feb  8 10:38:35 zyzomys kernel: Memory: 223684k/229312k available (1617k 
kernel code, 4928k reserved, 730k data, 136k init, 0k highmem)
Feb  8 10:38:35 zyzomys kernel: Checking if this processor honours the 
WP bit even in supervisor mode... Ok.
Feb  8 10:38:35 zyzomys kernel: Calibrating delay loop... 2940.92 BogoMIPS
Feb  8 10:38:35 zyzomys kernel: Dentry cache hash table entries: 32768 
(order: 5, 131072 bytes)
Feb  8 10:38:35 zyzomys kernel: Inode-cache hash table entries: 16384 
(order: 4, 65536 bytes)
Feb  8 10:38:35 zyzomys kernel: Mount-cache hash table entries: 512 
(order: 0, 4096 bytes)
Feb  8 10:38:35 zyzomys kernel: CPU:     After generic identify, caps: 
3febf9ff 00000000 00000000 00000000
Feb  8 10:38:35 zyzomys kernel: CPU:     After vendor identify, caps: 
3febf9ff 00000000 00000000 00000000
Feb  8 10:38:35 zyzomys kernel: CPU: Trace cache: 12K uops, L1 D cache: 8K
Feb  8 10:38:35 zyzomys kernel: CPU: L2 cache: 512K
Feb  8 10:38:35 zyzomys kernel: CPU:     After all inits, caps: 3febf9ff 
00000000 00000000 00000080
Feb  8 10:38:35 zyzomys kernel: Intel machine check architecture supported.
Feb  8 10:38:35 zyzomys kernel: Intel machine check reporting enabled on 
CPU#0.
Feb  8 10:38:35 zyzomys kernel: CPU#0: Intel P4/Xeon Extended MCE MSRs 
(12) available
Feb  8 10:38:35 zyzomys kernel: CPU: Intel(R) Genuine CPU 1.50GHz 
stepping 04
Feb  8 10:38:35 zyzomys kernel: Enabling fast FPU save and restore... done.
Feb  8 10:38:35 zyzomys kernel: Enabling unmasked SIMD FPU exception 
support... done.
Feb  8 10:38:35 zyzomys kernel: Checking 'hlt' instruction... OK.
Feb  8 10:38:35 zyzomys kernel: POSIX conformance testing by UNIFIX
Feb  8 10:38:35 zyzomys kernel: NET: Registered protocol family 16
Feb  8 10:38:35 zyzomys kernel: PCI: PCI BIOS revision 2.10 entry at 
0xe8964, last bus=1
Feb  8 10:38:35 zyzomys kernel: PCI: Using configuration type 1
Feb  8 10:38:35 zyzomys kernel: mtrr: v2.0 (20020519)
Feb  8 10:38:35 zyzomys kernel: ACPI: Subsystem revision 20040116
Feb  8 10:38:35 zyzomys kernel: ACPI: IRQ9 SCI: Edge set to Level Trigger.
Feb  8 10:38:35 zyzomys kernel: ACPI: Interpreter enabled
Feb  8 10:38:35 zyzomys kernel: ACPI: Using PIC for interrupt routing
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Root Bridge [PCI0] (00:00)
Feb  8 10:38:35 zyzomys kernel: PCI: Probing PCI hardware (bus 00)
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Routing Table 
[\_SB_.PCI0._PRT]
Feb  8 10:38:35 zyzomys kernel: ACPI: Embedded Controller [EC0] (gpe 1)
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Link [LNKA] (IRQs 3 
4 7 9 14 15)
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Link [LNKB] (IRQs 3 
4 7 *9 14 15)
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Link [LNKC] (IRQs 3 
4 7 *10 14 15)
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Link [LNKD] (IRQs 3 
4 7 *10 14 15)
Feb  8 10:38:35 zyzomys kernel: Linux Kernel Card Services
Feb  8 10:38:35 zyzomys kernel:   options:  [pci] [cardbus] [pm]
Feb  8 10:38:35 zyzomys kernel: drivers/usb/core/usb.c: registered new 
driver usbfs
Feb  8 10:38:35 zyzomys kernel: drivers/usb/core/usb.c: registered new 
driver hub
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Link [LNKA] enabled 
at IRQ 11
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Link [LNKB] enabled 
at IRQ 9
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Link [LNKC] enabled 
at IRQ 10
Feb  8 10:38:35 zyzomys kernel: ACPI: PCI Interrupt Link [LNKD] enabled 
at IRQ 10
Feb  8 10:38:35 zyzomys kernel: ACPI: No IRQ known for interrupt pin A 
of device 0000:00:11.1
Feb  8 10:38:35 zyzomys kernel: PCI: Using ACPI for IRQ routing
Feb  8 10:38:35 zyzomys kernel: PCI: if you experience problems, try 
using option 'pci=noacpi' or even 'acpi=off'
Feb  8 10:38:35 zyzomys kernel: vesafb: framebuffer at 0x90000000, 
mapped to 0xce808000, size 16384k
Feb  8 10:38:35 zyzomys kernel: vesafb: mode is 1400x1050x8, 
linelength=1400, pages=20
Feb  8 10:38:35 zyzomys kernel: vesafb: protected mode interface info at 
c000:76a8
Feb  8 10:38:35 zyzomys kernel: vesafb: scrolling: redraw
Feb  8 10:38:35 zyzomys kernel: fb0: VESA VGA frame buffer device
Feb  8 10:38:35 zyzomys kernel: SBF: Simple Boot Flag extension found 
and enabled.
Feb  8 10:38:35 zyzomys kernel: SBF: Setting boot flags 0x80
Feb  8 10:38:35 zyzomys kernel: ikconfig 0.7 with /proc/config*
Feb  8 10:38:35 zyzomys kernel: ACPI: AC Adapter [ADP0] (on-line)
Feb  8 10:38:35 zyzomys kernel: ACPI: Battery Slot [BAT0] (battery present)
Feb  8 10:38:35 zyzomys kernel: ACPI: Power Button (FF) [PWRF]
Feb  8 10:38:35 zyzomys kernel: ACPI: Lid Switch [LID]
Feb  8 10:38:35 zyzomys kernel: ACPI: Processor [CPU0] (supports C1 C2, 
16 throttling states)
Feb  8 10:38:35 zyzomys kernel: ACPI: Thermal Zone [TZN0] (53 C)
Feb  8 10:38:35 zyzomys kernel: Console: switching to colour frame 
buffer device 175x65
Feb  8 10:38:35 zyzomys kernel: pty: 256 Unix98 ptys configured
Feb  8 10:38:35 zyzomys kernel: PPP generic driver version 2.4.2
Feb  8 10:38:35 zyzomys kernel: PPP Deflate Compression module registered
Feb  8 10:38:35 zyzomys kernel: PPP BSD Compression module registered
Feb  8 10:38:35 zyzomys kernel: 8139too Fast Ethernet driver 0.9.26
Feb  8 10:38:35 zyzomys kernel: eth0: RealTek RTL8139 at 0xcf809000, 
00:e0:00:97:da:5b, IRQ 10
Feb  8 10:38:35 zyzomys kernel: eth0:  Identified 8139 chip type 'RTL-8139C'
Feb  8 10:38:35 zyzomys kernel: Uniform Multi-Platform E-IDE driver 
Revision: 7.00alpha2
Feb  8 10:38:35 zyzomys kernel: ide: Assuming 33MHz system bus speed for 
PIO modes; override with idebus=xx
Feb  8 10:38:35 zyzomys kernel: VP_IDE: IDE controller at PCI slot 
0000:00:11.1
Feb  8 10:38:35 zyzomys kernel: ACPI: No IRQ known for interrupt pin A 
of device 0000:00:11.1
Feb  8 10:38:35 zyzomys kernel: VP_IDE: chipset revision 6
Feb  8 10:38:35 zyzomys kernel: VP_IDE: not 100%% native mode: will 
probe irqs later
Feb  8 10:38:35 zyzomys kernel: ide: Assuming 33MHz system bus speed for 
PIO modes; override with idebus=xx
Feb  8 10:38:35 zyzomys kernel: VP_IDE: VIA vt8233 (rev 00) IDE UDMA100 
controller on pci0000:00:11.1
Feb  8 10:38:35 zyzomys kernel:     ide0: BM-DMA at 0x1100-0x1107, BIOS 
settings: hda:DMA, hdb:pio
Feb  8 10:38:35 zyzomys kernel:     ide1: BM-DMA at 0x1108-0x110f, BIOS 
settings: hdc:DMA, hdd:pio
Feb  8 10:38:35 zyzomys kernel: hda: FUJITSU MHR2020AT, ATA DISK drive
Feb  8 10:38:35 zyzomys kernel: Using anticipatory io scheduler
Feb  8 10:38:35 zyzomys kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Feb  8 10:38:35 zyzomys kernel: hdc: QSI CD-RW/DVD-ROM SBW-081, ATAPI 
CD/DVD-ROM drive
Feb  8 10:38:35 zyzomys kernel: ide1 at 0x170-0x177,0x376 on irq 15
Feb  8 10:38:35 zyzomys kernel: hda: max request size: 1024KiB
Feb  8 10:38:35 zyzomys kernel: hda: 39070080 sectors (20003 MB) 
w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
Feb  8 10:38:35 zyzomys kernel:  hda: hda1 hda2 hda3 hda4 < hda5 hda6 
hda7 hda8 >
Feb  8 10:38:35 zyzomys kernel: hdc: ATAPI 24X DVD-ROM CD-R/RW drive, 
2048kB Cache, UDMA(33)
Feb  8 10:38:35 zyzomys kernel: Uniform CD-ROM driver Revision: 3.20
Feb  8 10:38:35 zyzomys kernel: Console: switching to colour frame 
buffer device 175x65
Feb  8 10:38:35 zyzomys kernel: Yenta: CardBus bridge found at 
0000:00:0a.0 [10cf:10e7]
Feb  8 10:38:35 zyzomys kernel: Yenta: ISA IRQ mask 0x00b8, PCI irq 11
Feb  8 10:38:35 zyzomys kernel: Socket status: 30000006
Feb  8 10:38:35 zyzomys kernel: Yenta: CardBus bridge found at 
0000:00:0a.1 [10cf:10e7]
Feb  8 10:38:35 zyzomys kernel: Yenta: ISA IRQ mask 0x00b8, PCI irq 9
Feb  8 10:38:35 zyzomys kernel: Socket status: 30000006
Feb  8 10:38:35 zyzomys kernel: drivers/usb/host/uhci-hcd.c: USB 
Universal Host Controller Interface driver v2.1
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.2: UHCI Host Controller
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.2: irq 10, io base 
00001200
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.2: new USB bus 
registered, assigned bus number 1
Feb  8 10:38:35 zyzomys kernel: hub 1-0:1.0: USB hub found
Feb  8 10:38:35 zyzomys kernel: hub 1-0:1.0: 2 ports detected
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.3: UHCI Host Controller
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.3: irq 10, io base 
00001300
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.3: new USB bus 
registered, assigned bus number 2
Feb  8 10:38:35 zyzomys kernel: hub 2-0:1.0: USB hub found
Feb  8 10:38:35 zyzomys kernel: hub 2-0:1.0: 2 ports detected
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.4: UHCI Host Controller
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.4: irq 10, io base 
00001700
Feb  8 10:38:35 zyzomys kernel: uhci_hcd 0000:00:11.4: new USB bus 
registered, assigned bus number 3
Feb  8 10:38:35 zyzomys kernel: hub 3-0:1.0: USB hub found
Feb  8 10:38:35 zyzomys kernel: hub 3-0:1.0: 2 ports detected
Feb  8 10:38:35 zyzomys kernel: drivers/usb/core/usb.c: registered new 
driver hid
Feb  8 10:38:35 zyzomys kernel: drivers/usb/input/hid-core.c: v2.0:USB 
HID core driver
Feb  8 10:38:35 zyzomys kernel: mice: PS/2 mouse device common for all mice
Feb  8 10:38:35 zyzomys kernel: input: PC Speaker
Feb  8 10:38:35 zyzomys kernel: i8042.c: Detected active multiplexing 
controller, rev 1.1.
Feb  8 10:38:35 zyzomys kernel: serio: i8042 AUX0 port at 0x60,0x64 irq 12
Feb  8 10:38:35 zyzomys kernel: serio: i8042 AUX1 port at 0x60,0x64 irq 12
Feb  8 10:38:35 zyzomys kernel: serio: i8042 AUX2 port at 0x60,0x64 irq 12
Feb  8 10:38:35 zyzomys kernel: serio: i8042 AUX3 port at 0x60,0x64 irq 12
Feb  8 10:38:35 zyzomys kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
Feb  8 10:38:35 zyzomys kernel: input: AT Translated Set 2 keyboard on 
isa0060/serio0
Feb  8 10:38:35 zyzomys kernel: NET: Registered protocol family 2
Feb  8 10:38:35 zyzomys kernel: IP: routing cache hash table of 2048 
buckets, 16Kbytes
Feb  8 10:38:35 zyzomys kernel: TCP: Hash tables configured (established 
16384 bind 32768)
Feb  8 10:38:35 zyzomys kernel: NET: Registered protocol family 1
Feb  8 10:38:35 zyzomys kernel: NET: Registered protocol family 17
Feb  8 10:38:35 zyzomys kernel: ACPI: (supports S0 S3 S4 S5)
Feb  8 10:38:35 zyzomys kernel: VFS: Mounted root (ext2 filesystem) 
readonly.
Feb  8 10:38:35 zyzomys kernel: Freeing unused kernel memory: 136k freed
Feb  8 10:38:35 zyzomys kernel: hub 1-0:1.0: new USB device on port 1, 
assigned address 2
Feb  8 10:38:35 zyzomys kernel: input: USB HID v1.10 Mouse [Logitech 
Optical USB Mouse] on usb-0000:00:11.2-1
Feb  8 10:38:35 zyzomys kernel: hub 3-0:1.0: new USB device on port 2, 
assigned address 2
Feb  8 10:38:35 zyzomys kernel: Adding 514040k swap on /dev/hda8.  
Priority:1 extents:1
Feb  8 10:38:35 zyzomys kernel: Real Time Clock Driver v1.12
Feb  8 10:38:35 zyzomys kernel: cs: IO port probe 0x0c00-0x0cff: clean.
Feb  8 10:38:35 zyzomys kernel: cs: IO port probe 0x0800-0x08ff: clean.
Feb  8 10:38:35 zyzomys kernel: cs: IO port probe 0x0100-0x04ff: 
excluding 0x2f8-0x2ff 0x378-0x37f 0x3f8-0x3ff 0x4d0-0x4d7
Feb  8 10:38:35 zyzomys kernel: cs: IO port probe 0x0a00-0x0aff: clean.
Feb  8 10:38:35 zyzomys kernel: eth0: link up, 100Mbps, full-duplex, lpa 
0x45E1
Feb  8 10:38:35 zyzomys kernel: ip_tables: (C) 2000-2002 Netfilter core team
Feb  8 10:38:35 zyzomys kernel: ip_conntrack version 2.1 (1791 buckets, 
14328 max) - 300 bytes per conntrack
Feb  8 10:38:38 zyzomys kernel: PCI: Setting latency timer of device 
0000:00:11.5 to 64
Feb  8 10:38:41 zyzomys kernel: parport0: PC-style at 0x378 (0x778) 
[PCSPP(,...)]
Feb  8 10:38:41 zyzomys kernel: parport0: irq 7 detected
Feb  8 10:38:41 zyzomys kernel: lp0: using parport0 (polling).
Feb  8 10:38:41 zyzomys kernel: Serial: 8250/16550 driver $Revision: 
1.90 $ 8 ports, IRQ sharing disabled
Feb  8 10:38:41 zyzomys kernel: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Feb  8 10:38:41 zyzomys kernel: ttyS1 at I/O 0x2f8 (irq = 3) is a NS16550A
Feb  8 10:39:09 zyzomys kernel: cs: memory probe 
0xa0000000-0xa0ffffff:<1>Unable to handle kernel paging request at 
virtual address 007500a0
Feb  8 10:39:09 zyzomys kernel:  printing eip:
Feb  8 10:39:09 zyzomys kernel: c021a91b
Feb  8 10:39:09 zyzomys kernel: *pde = 00000000
Feb  8 10:39:09 zyzomys kernel: Oops: 0000 [#1]
Feb  8 10:39:09 zyzomys kernel: CPU:    0
Feb  8 10:39:09 zyzomys kernel: EIP:    0060:[read_cis_cache+155/384]    
Not tainted
Feb  8 10:39:09 zyzomys kernel: EFLAGS: 00010287
Feb  8 10:39:09 zyzomys kernel: EIP is at read_cis_cache+0x9b/0x180
Feb  8 10:39:09 zyzomys kernel: eax: 007500a0   ebx: 00000002   ecx: 
cde4202c   edx: 007500a0
Feb  8 10:39:09 zyzomys kernel: esi: 0000055d   edi: 00000001   ebp: 
cde42144   esp: cdc599f0
Feb  8 10:39:09 zyzomys kernel: ds: 007b   es: 007b   ss: 0068
Feb  8 10:39:09 zyzomys kernel: Process cardmgr (pid: 107, 
threadinfo=cdc58000 task=c13ac080)
Feb  8 10:39:09 zyzomys kernel: Stack: 00000016 000000d0 0000053b 
00000002 cdc59a32 0000055d cdc59a7c 00000001
Feb  8 10:39:09 zyzomys kernel:        cde4202c c021b06b cde4202c 
00000001 0000055d 00000002 cdc59a32 0000009a
Feb  8 10:39:09 zyzomys kernel:        200c0016 cdc59a7c c13f5780 
cde4202c c13f5780 c021ad35 c13f5780 cdc59a7c
Feb  8 10:39:09 zyzomys kernel: Call Trace:
Feb  8 10:39:09 zyzomys kernel:  [pcmcia_get_next_tuple+155/656] 
pcmcia_get_next_tuple+0x9b/0x290
Feb  8 10:39:09 zyzomys kernel:  [pcmcia_get_first_tuple+181/352] 
pcmcia_get_first_tuple+0xb5/0x160
Feb  8 10:39:09 zyzomys kernel:  [pcmcia_get_next_tuple+155/656] 
pcmcia_get_next_tuple+0x9b/0x290
Feb  8 10:39:09 zyzomys kernel:  [read_tuple+87/192] read_tuple+0x57/0xc0
Feb  8 10:39:09 zyzomys kernel:  [pcmcia_validate_cis+219/560] 
pcmcia_validate_cis+0xdb/0x230
Feb  8 10:39:09 zyzomys kernel:  [readable+86/160] readable+0x56/0xa0
Feb  8 10:39:09 zyzomys kernel:  [cis_readable+113/208] 
cis_readable+0x71/0xd0
Feb  8 10:39:09 zyzomys kernel:  [do_mem_probe+484/528] 
do_mem_probe+0x1e4/0x210
Feb  8 10:39:09 zyzomys kernel:  [inv_probe+143/160] inv_probe+0x8f/0xa0
Feb  8 10:39:09 zyzomys kernel:  [inv_probe+48/160] inv_probe+0x30/0xa0
Feb  8 10:39:09 zyzomys kernel:  [inv_probe+48/160] inv_probe+0x30/0xa0
Feb  8 10:39:09 zyzomys kernel:  [validate_mem+110/352] 
validate_mem+0x6e/0x160
Feb  8 10:39:09 zyzomys kernel:  [__getblk+43/96] __getblk+0x2b/0x60
Feb  8 10:39:09 zyzomys kernel:  [set_cis_map+152/288] 
set_cis_map+0x98/0x120
Feb  8 10:39:09 zyzomys kernel:  [read_block_bitmap+82/160] 
read_block_bitmap+0x52/0xa0
Feb  8 10:39:09 zyzomys kernel:  [read_cis_mem+300/416] 
read_cis_mem+0x12c/0x1a0
Feb  8 10:39:09 zyzomys kernel:  [read_cis_cache+349/384] 
read_cis_cache+0x15d/0x180
Feb  8 10:39:09 zyzomys kernel:  [pcmcia_get_next_tuple+155/656] 
pcmcia_get_next_tuple+0x9b/0x290
Feb  8 10:39:09 zyzomys kernel:  [pcmcia_get_first_tuple+181/352] 
pcmcia_get_first_tuple+0xb5/0x160
Feb  8 10:39:09 zyzomys kernel:  [pcmcia_validate_cis+181/560] 
pcmcia_validate_cis+0xb5/0x230
Feb  8 10:39:09 zyzomys kernel:  [ds_ioctl+782/1680] ds_ioctl+0x30e/0x690
Feb  8 10:39:09 zyzomys kernel:  [find_get_page+26/48] 
find_get_page+0x1a/0x30
Feb  8 10:39:09 zyzomys kernel:  [__find_get_block_slow+52/272] 
__find_get_block_slow+0x34/0x110
Feb  8 10:39:09 zyzomys kernel:  [unmap_underlying_metadata+35/112] 
unmap_underlying_metadata+0x23/0x70
Feb  8 10:39:09 zyzomys kernel:  [__set_page_dirty_nobuffers+123/144] 
__set_page_dirty_nobuffers+0x7b/0x90
Feb  8 10:39:09 zyzomys kernel:  [mark_buffer_dirty+59/96] 
mark_buffer_dirty+0x3b/0x60
Feb  8 10:39:09 zyzomys kernel:  [__block_commit_write+145/160] 
__block_commit_write+0x91/0xa0
Feb  8 10:39:09 zyzomys kernel:  [__pagevec_lru_add+155/176] 
__pagevec_lru_add+0x9b/0xb0
Feb  8 10:39:09 zyzomys kernel:  
[generic_file_aio_write_nolock+496/2544] 
generic_file_aio_write_nolock+0x1f0/0x9f0
Feb  8 10:39:09 zyzomys kernel:  [schedule+760/1296] schedule+0x2f8/0x510
Feb  8 10:39:09 zyzomys kernel:  [__alloc_pages+175/864] 
__alloc_pages+0xaf/0x360
Feb  8 10:39:09 zyzomys kernel:  [__get_free_pages+31/80] 
__get_free_pages+0x1f/0x50
Feb  8 10:39:09 zyzomys kernel:  [__pollwait+65/208] __pollwait+0x41/0xd0
Feb  8 10:39:09 zyzomys kernel:  [poll_freewait+68/80] 
poll_freewait+0x44/0x50
Feb  8 10:39:09 zyzomys kernel:  [do_select+424/704] do_select+0x1a8/0x2c0
Feb  8 10:39:09 zyzomys kernel:  [ds_read+158/320] ds_read+0x9e/0x140
Feb  8 10:39:09 zyzomys kernel:  [sys_select+605/1344] 
sys_select+0x25d/0x540
Feb  8 10:39:09 zyzomys kernel:  [vfs_read+215/304] vfs_read+0xd7/0x130
Feb  8 10:39:09 zyzomys kernel:  [sys_ioctl+197/592] sys_ioctl+0xc5/0x250
Feb  8 10:39:09 zyzomys kernel:  [syscall_call+7/11] syscall_call+0x7/0xb
Feb  8 10:39:09 zyzomys kernel:
Feb  8 10:39:09 zyzomys kernel: Code: 8b 00 0f 18 00 90 39 ea 75 eb 8b 
54 24 28 0f b7 42 10 25 00
Feb  8 10:42:44 zyzomys kernel:  <4>mtrr: 0x90000000,0x2000000 overlaps 
existing 0x90000000,0x1000000
Feb  8 10:42:45 zyzomys kernel: atkbd.c: Unknown key released 
(translated set 2, code 0x7a on isa0060/serio0).
Feb  8 10:42:45 zyzomys kernel: atkbd.c: This is an XFree86 bug. It 
shouldn't access hardware directly.
Feb  8 10:42:45 zyzomys kernel: atkbd.c: Unknown key released 
(translated set 2, code 0x7a on isa0060/serio0).
Feb  8 10:42:45 zyzomys kernel: atkbd.c: This is an XFree86 bug. It 
shouldn't access hardware directly.
Feb  8 10:54:41 zyzomys kernel: Kernel logging (proc) stopped.
Feb  8 10:54:41 zyzomys kernel: Kernel log daemon terminating.

-- 
Pascal Hubrecht

From pcmcia at externe.net  Mon Feb  9 17:35:52 2004
From: pcmcia at externe.net (Guylhem Aznar)
Date: Mon Feb  9 16:42:29 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the mouse
 ?!
Message-ID: <20040209173552.6fe9e27f.pcmcia@externe.net>

Hello

I just updated to kernel 2.6.2. I have a IBM netvista x40 (pentium 3 coppermine)
desktop system with a pcmcia pci card from Elan, which worked flawlessly under
kernel 2.4 with pcmcia-cs tools.

Now I have a very strange bug : the pcmcia subsystem is sleeping when I'm not
moving the mouse. How did I found it? My wifi pcmcia (intel 2011 - symbol v
2.50.13) didn't work after the upgrade. I've been trying to do lots of things,
including tweaking the orinoco .c to make it looks like pcmcia cs 3.2.5 which
worked fine. Nothing helped - it was recognized, it was associated to the access
point but no packet would come through. The card still works like a charm under
kernel 2.4.21 with pcmcia-cs tools. After upgrading the firmware of card [which
didn't help] I did try to ping a local machine and tcpdump. Then I realised the
packets were blocked until I moved the mouse - the packets would then "burst in"
:

$ ping cisco
PING cisco (10.3.0.2): 56 data bytes
64 bytes from 10.3.0.2: icmp_seq=0 ttl=64 time=84.0 ms
64 bytes from 10.3.0.2: icmp_seq=1 ttl=64 time=3.6 ms
64 bytes from 10.3.0.2: icmp_seq=2 ttl=64 time=882.7 ms   <--- I stop moving the
mouse
64 bytes from 10.3.0.2: icmp_seq=3 ttl=64 time=9.0 ms
64 bytes from 10.3.0.2: icmp_seq=4 ttl=64 time=4903.8 ms  <--- I stop again...
64 bytes from 10.3.0.2: icmp_seq=5 ttl=64 time=3998.8 ms
64 bytes from 10.3.0.2: icmp_seq=6 ttl=64 time=3013.9 ms
64 bytes from 10.3.0.2: icmp_seq=7 ttl=64 time=2036.6 ms
64 bytes from 10.3.0.2: icmp_seq=8 ttl=64 time=1051.7 ms
64 bytes from 10.3.0.2: icmp_seq=9 ttl=64 time=55.3 ms
64 bytes from 10.3.0.2: icmp_seq=10 ttl=64 time=315.0 ms

--- cisco ping statistics ---
11 packets transmitted, 11 packets received, 0% packet loss
round-trip min/avg/max = 3.6/1486.7/4903.8 ms

Another hint : if I unplug the card, cardmgr won't been unless I hit the mouse
or the keyboard. Any suggestion to fix that bug? I'm investigating cpufreq [it's
enabled among other power saving tools because the machine is on 24/7] and the
timer.

Here's my .config.

#
# Automatically generated make config: don't edit
#
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_GENERIC_ISA_DMA=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
# CONFIG_STANDALONE is not set
CONFIG_BROKEN_ON_SMP=y

#
# General setup
#
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y

#
# Processor type and features
#
CONFIG_X86_PC=y
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
CONFIG_MPENTIUMIII=y
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MELAN is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
# CONFIG_SMP is not set
CONFIG_PREEMPT=y
CONFIG_X86_UP_APIC=y
CONFIG_X86_UP_IOAPIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_TSC=y
CONFIG_X86_MCE=y
# CONFIG_X86_MCE_NONFATAL is not set
# CONFIG_X86_MCE_P4THERMAL is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_EDD is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
CONFIG_HAVE_DEC_LOCK=y

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
# CONFIG_ACPI_SLEEP is not set
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_RELAXED_AML is not set

#
# APM (Advanced Power Management) BIOS Support
#
# CONFIG_APM is not set

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_PROC_INTF is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_24_API is not set
CONFIG_CPU_FREQ_TABLE=y

#
# CPUFreq processor drivers
#
# CONFIG_X86_ACPI_CPUFREQ is not set
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
CONFIG_X86_SPEEDSTEP_ICH=y
# CONFIG_X86_SPEEDSTEP_SMI is not set
# CONFIG_X86_P4_CLOCKMOD is not set
CONFIG_X86_SPEEDSTEP_LIB=y
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set

#
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_USE_VECTOR is not set
# CONFIG_PCI_LEGACY_PROC is not set
CONFIG_PCI_NAMES=y
CONFIG_ISA=y
# CONFIG_EISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
CONFIG_HOTPLUG=y

#
# PCMCIA/CardBus support
#
CONFIG_PCMCIA=y
CONFIG_YENTA=y
CONFIG_CARDBUS=y
# CONFIG_I82092 is not set
# CONFIG_I82365 is not set
# CONFIG_TCIC is not set
CONFIG_PCMCIA_PROBE=y

#
# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_MISC=m

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_FW_LOADER=y

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Plug and Play support
#
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set

#
# Protocols
#
# CONFIG_ISAPNP is not set
CONFIG_PNPBIOS=y

#
# Block devices
#
CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_CRYPTOLOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
CONFIG_BLK_DEV_INITRD=y
# CONFIG_LBD is not set

#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
CONFIG_BLK_DEV_IDECS=m
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_TASKFILE_IO=y

#
# IDE chipset support/bugfixes
#
# CONFIG_IDE_GENERIC is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_IDEDMA_PCI_WIP is not set
CONFIG_BLK_DEV_ADMA=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
CONFIG_BLK_DEV_SIS5513=y
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_CHIPSETS is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_DMA_NONPCI is not set
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
CONFIG_CHR_DEV_SG=m

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_REPORT_LUNS is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set

#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
CONFIG_SCSI_QLA2XXX_CONFIG=y
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA23XX is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set

#
# PCMCIA SCSI adapter support
#
# CONFIG_PCMCIA_AHA152X is not set
# CONFIG_PCMCIA_FDOMAIN is not set
# CONFIG_PCMCIA_NINJA_SCSI is not set
# CONFIG_PCMCIA_QLOGIC is not set

#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Fusion MPT device support
#
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support (EXPERIMENTAL)
#
# CONFIG_IEEE1394 is not set

#
# I2O device support
#
# CONFIG_I2O is not set

#
# Networking support
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
# CONFIG_IP_MULTIPLE_TABLES is not set
# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_TOS is not set
CONFIG_IP_ROUTE_VERBOSE=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set

#
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=m
CONFIG_IP_NF_FTP=m
CONFIG_IP_NF_IRC=m
# CONFIG_IP_NF_TFTP is not set
# CONFIG_IP_NF_AMANDA is not set
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
# CONFIG_IP_NF_MATCH_IPRANGE is not set
CONFIG_IP_NF_MATCH_MAC=m
# CONFIG_IP_NF_MATCH_PKTTYPE is not set
CONFIG_IP_NF_MATCH_MARK=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
CONFIG_IP_NF_MATCH_TOS=m
# CONFIG_IP_NF_MATCH_RECENT is not set
# CONFIG_IP_NF_MATCH_ECN is not set
# CONFIG_IP_NF_MATCH_DSCP is not set
# CONFIG_IP_NF_MATCH_AH_ESP is not set
# CONFIG_IP_NF_MATCH_LENGTH is not set
# CONFIG_IP_NF_MATCH_TTL is not set
CONFIG_IP_NF_MATCH_TCPMSS=m
# CONFIG_IP_NF_MATCH_HELPER is not set
CONFIG_IP_NF_MATCH_STATE=m
# CONFIG_IP_NF_MATCH_CONNTRACK is not set
# CONFIG_IP_NF_MATCH_OWNER is not set
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_REDIRECT=m
# CONFIG_IP_NF_TARGET_NETMAP is not set
# CONFIG_IP_NF_TARGET_SAME is not set
# CONFIG_IP_NF_NAT_LOCAL is not set
# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
CONFIG_IP_NF_NAT_IRC=m
CONFIG_IP_NF_NAT_FTP=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_TOS=m
# CONFIG_IP_NF_TARGET_ECN is not set
# CONFIG_IP_NF_TARGET_DSCP is not set
CONFIG_IP_NF_TARGET_MARK=m
# CONFIG_IP_NF_TARGET_CLASSIFY is not set
# CONFIG_IP_NF_TARGET_LOG is not set
# CONFIG_IP_NF_TARGET_ULOG is not set
CONFIG_IP_NF_TARGET_TCPMSS=m
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_NETDEVICES=y

#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_NET_SB1000 is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set

#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_CS89x0 is not set
# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
CONFIG_SIS900=y
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_NET_POCKET is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set

#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
CONFIG_PPP=m
# CONFIG_PPP_MULTILINK is not set
# CONFIG_PPP_FILTER is not set
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPPOE=m
# CONFIG_SLIP is not set

#
# Wireless LAN (non-hamradio)
#
CONFIG_NET_RADIO=y

#
# Obsolete Wireless cards support (pre-802.11)
#
# CONFIG_STRIP is not set
# CONFIG_ARLAN is not set
# CONFIG_WAVELAN is not set
# CONFIG_PCMCIA_WAVELAN is not set
# CONFIG_PCMCIA_NETWAVE is not set

#
# Wireless 802.11 Frequency Hopping cards support
#
# CONFIG_PCMCIA_RAYCS is not set

#
# Wireless 802.11b ISA/PCI cards support
#
# CONFIG_AIRO is not set
CONFIG_HERMES=m
# CONFIG_PLX_HERMES is not set
# CONFIG_TMD_HERMES is not set
# CONFIG_PCI_HERMES is not set

#
# Wireless 802.11b Pcmcia/Cardbus cards support
#
CONFIG_PCMCIA_HERMES=m
# CONFIG_AIRO_CS is not set
# CONFIG_PCMCIA_ATMEL is not set
# CONFIG_PCMCIA_WL3501 is not set
CONFIG_NET_WIRELESS=y

#
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set

#
# PCMCIA network device support
#
CONFIG_NET_PCMCIA=y
# CONFIG_PCMCIA_3C589 is not set
# CONFIG_PCMCIA_3C574 is not set
# CONFIG_PCMCIA_FMVJ18X is not set
CONFIG_PCMCIA_PCNET=m
# CONFIG_PCMCIA_NMCLAN is not set
# CONFIG_PCMCIA_SMC91C92 is not set
# CONFIG_PCMCIA_XIRC2PS is not set
# CONFIG_PCMCIA_AXNET is not set

#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set

#
# IrDA (infrared) support
#
CONFIG_IRDA=m

#
# IrDA protocols
#
CONFIG_IRLAN=m
CONFIG_IRNET=m
CONFIG_IRCOMM=m
# CONFIG_IRDA_ULTRA is not set

#
# IrDA options
#
CONFIG_IRDA_CACHE_LAST_LSAP=y
CONFIG_IRDA_FAST_RR=y
# CONFIG_IRDA_DEBUG is not set

#
# Infrared-port device drivers
#

#
# SIR device drivers
#
CONFIG_IRTTY_SIR=m

#
# Dongle support
#
# CONFIG_DONGLE is not set

#
# Old SIR device drivers
#
CONFIG_IRPORT_SIR=m

#
# Old Serial dongle support
#
# CONFIG_DONGLE_OLD is not set

#
# FIR device drivers
#
CONFIG_USB_IRDA=m
# CONFIG_NSC_FIR is not set
# CONFIG_WINBOND_FIR is not set
# CONFIG_TOSHIBA_FIR is not set
# CONFIG_SMC_IRCC_FIR is not set
# CONFIG_ALI_FIR is not set
# CONFIG_VLSI_FIR is not set
# CONFIG_VIA_FIR is not set

#
# Bluetooth support
#
# CONFIG_BT is not set

#
# ISDN subsystem
#
# CONFIG_ISDN_BOOL is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=y
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
# CONFIG_MOUSE_PS2 is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_INPORT is not set
# CONFIG_MOUSE_LOGIBM is not set
# CONFIG_MOUSE_PC110PAD is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=y
# CONFIG_INPUT_UINPUT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_CONSOLE is not set
CONFIG_SERIAL_8250_CS=m
# CONFIG_SERIAL_8250_ACPI is not set
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256

#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set

#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set

#
# Watchdog Cards
#
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set
CONFIG_SOFT_WATCHDOG=y
# CONFIG_WDT is not set
# CONFIG_WDTPCI is not set
# CONFIG_PCWATCHDOG is not set
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_SCx200_WDT is not set
# CONFIG_60XX_WDT is not set
# CONFIG_W83877F_WDT is not set
# CONFIG_W83627HF_WDT is not set
# CONFIG_MACHZ_WDT is not set
# CONFIG_SC520_WDT is not set
# CONFIG_AMD7XX_TCO is not set
# CONFIG_ALIM7101_WDT is not set
# CONFIG_ALIM1535_WDT is not set
# CONFIG_SC1200_WDT is not set
# CONFIG_WAFER_WDT is not set
# CONFIG_CPU5_WDT is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
CONFIG_AGP=y
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_NVIDIA is not set
CONFIG_AGP_SIS=y
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
CONFIG_DRM=y
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_GAMMA is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_MGA is not set
CONFIG_DRM_SIS=y

#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HANGCHECK_TIMER is not set

#
# I2C support
#
CONFIG_I2C=m
# CONFIG_I2C_CHARDEV is not set

#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=m
# CONFIG_I2C_ALGOPCF is not set

#
# I2C Hardware Bus support
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_ELEKTOR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_ISA is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set

#
# I2C Hardware Sensors Chip support
#
# CONFIG_I2C_SENSOR is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_EEPROM is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set

#
# Multimedia devices
#
CONFIG_VIDEO_DEV=y

#
# Video For Linux
#

#
# Video Adapters
#
CONFIG_VIDEO_BT848=m
# CONFIG_VIDEO_PMS is not set
CONFIG_VIDEO_CPIA=m
# CONFIG_VIDEO_CPIA_USB is not set
# CONFIG_VIDEO_SAA5249 is not set
# CONFIG_TUNER_3036 is not set
# CONFIG_VIDEO_STRADIS is not set
# CONFIG_VIDEO_ZORAN is not set
# CONFIG_VIDEO_SAA7134 is not set
# CONFIG_VIDEO_MXB is not set
# CONFIG_VIDEO_DPC is not set
# CONFIG_VIDEO_HEXIUM_ORION is not set
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
# CONFIG_VIDEO_CX88 is not set

#
# Radio Adapters
#
# CONFIG_RADIO_CADET is not set
# CONFIG_RADIO_RTRACK is not set
# CONFIG_RADIO_RTRACK2 is not set
# CONFIG_RADIO_AZTECH is not set
# CONFIG_RADIO_GEMTEK is not set
# CONFIG_RADIO_GEMTEK_PCI is not set
# CONFIG_RADIO_MAXIRADIO is not set
# CONFIG_RADIO_MAESTRO is not set
# CONFIG_RADIO_SF16FMI is not set
# CONFIG_RADIO_TERRATEC is not set
# CONFIG_RADIO_TRUST is not set
# CONFIG_RADIO_TYPHOON is not set
# CONFIG_RADIO_ZOLTRIX is not set

#
# Digital Video Broadcasting Devices
#
CONFIG_DVB=y
CONFIG_DVB_CORE=y

#
# Supported Frontend Modules
#
# CONFIG_DVB_TWINHAN_DST is not set
# CONFIG_DVB_STV0299 is not set
# CONFIG_DVB_SP887X is not set
# CONFIG_DVB_ALPS_TDLB7 is not set
# CONFIG_DVB_ALPS_TDMB7 is not set
# CONFIG_DVB_ATMEL_AT76C651 is not set
# CONFIG_DVB_CX24110 is not set
# CONFIG_DVB_GRUNDIG_29504_491 is not set
# CONFIG_DVB_GRUNDIG_29504_401 is not set
# CONFIG_DVB_MT312 is not set
# CONFIG_DVB_VES1820 is not set
# CONFIG_DVB_VES1X93 is not set
# CONFIG_DVB_TDA1004X is not set

#
# Supported SAA7146 based PCI Adapters
#
# CONFIG_DVB_AV7110 is not set
# CONFIG_DVB_BUDGET is not set
# CONFIG_DVB_BUDGET_CI is not set
# CONFIG_DVB_BUDGET_AV is not set

#
# Supported USB Adapters
#
# CONFIG_DVB_TTUSB_BUDGET is not set
# CONFIG_DVB_TTUSB_DEC is not set

#
# Supported FlexCopII (B2C2) Adapters
#
# CONFIG_DVB_B2C2_SKYSTAR is not set

#
# Supported BT878 Adapters
#
# CONFIG_DVB_BT8XX is not set
CONFIG_VIDEO_TUNER=m
CONFIG_VIDEO_BUF=m
CONFIG_VIDEO_BTCX=m
CONFIG_VIDEO_IR=m

#
# Graphics support
#
CONFIG_FB=y
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_VESA is not set
# CONFIG_VIDEO_SELECT is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
CONFIG_FB_SIS=y
CONFIG_FB_SIS_300=y
# CONFIG_FB_SIS_315 is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_VIRTUAL is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE is not set

#
# Logo configuration
#
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

#
# Sound
#
CONFIG_SOUND=y

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_SEQUENCER=y
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_RTCTIMER is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

#
# Generic devices
#
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set

#
# ISA devices
#
# CONFIG_SND_AD1848 is not set
# CONFIG_SND_CS4231 is not set
# CONFIG_SND_CS4232 is not set
# CONFIG_SND_CS4236 is not set
# CONFIG_SND_ES1688 is not set
# CONFIG_SND_ES18XX is not set
# CONFIG_SND_GUSCLASSIC is not set
# CONFIG_SND_GUSEXTREME is not set
# CONFIG_SND_GUSMAX is not set
# CONFIG_SND_INTERWAVE is not set
# CONFIG_SND_INTERWAVE_STB is not set
# CONFIG_SND_OPTI92X_AD1848 is not set
# CONFIG_SND_OPTI92X_CS4231 is not set
# CONFIG_SND_OPTI93X is not set
# CONFIG_SND_SB8 is not set
# CONFIG_SND_SB16 is not set
# CONFIG_SND_SBAWE is not set
# CONFIG_SND_WAVEFRONT is not set
# CONFIG_SND_CMI8330 is not set
# CONFIG_SND_OPL3SA2 is not set
# CONFIG_SND_SGALAXY is not set
# CONFIG_SND_SSCAPE is not set

#
# PCI devices
#
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
CONFIG_SND_TRIDENT=y
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VX222 is not set

#
# ALSA USB devices
#
# CONFIG_SND_USB_AUDIO is not set

#
# PCMCIA devices
#
# CONFIG_SND_VXPOCKET is not set
# CONFIG_SND_VXP440 is not set

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set

#
# USB support
#
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_DYNAMIC_MINORS is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_EHCI_HCD is not set
CONFIG_USB_OHCI_HCD=y
# CONFIG_USB_UHCI_HCD is not set

#
# USB Device Class drivers
#
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_BLUETOOTH_TTY is not set
# CONFIG_USB_MIDI is not set
# CONFIG_USB_ACM is not set
CONFIG_USB_PRINTER=m
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
CONFIG_USB_STORAGE_FREECOM=y
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_HP8200e is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set

#
# USB Human Interface Devices (HID)
#
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_XPAD is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
CONFIG_USB_SCANNER=m
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_HPUSBSCSI is not set

#
# USB Multimedia devices
#
# CONFIG_USB_DABUSB is not set
# CONFIG_USB_VICAM is not set
# CONFIG_USB_DSBR is not set
# CONFIG_USB_IBMCAM is not set
# CONFIG_USB_KONICAWC is not set
# CONFIG_USB_OV511 is not set
CONFIG_USB_PWC=m
# CONFIG_USB_SE401 is not set
# CONFIG_USB_STV680 is not set
# CONFIG_USB_W9968CF is not set

#
# USB Network adaptors
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set

#
# USB port drivers
#

#
# USB Serial Converter support
#
CONFIG_USB_SERIAL=m
# CONFIG_USB_SERIAL_GENERIC is not set
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
CONFIG_USB_SERIAL_VISOR=m
# CONFIG_USB_SERIAL_IPAQ is not set
CONFIG_USB_SERIAL_IR=m
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
CONFIG_USB_SERIAL_KLSI=m
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_SAFE is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
# CONFIG_USB_SERIAL_OMNINET is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_TIGL is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_BRLVGER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_TEST is not set

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set

#
# File systems
#
CONFIG_EXT2_FS=m
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT3_FS is not set
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_XFS_FS=y
# CONFIG_XFS_RT is not set
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_POSIX_ACL is not set
CONFIG_MINIX_FS=m
CONFIG_ROMFS_FS=m
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_DEVPTS_FS_XATTR is not set
# CONFIG_TMPFS is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_CRAMFS=m
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
CONFIG_NFS_FS=m
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=m
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_TCP is not set
CONFIG_LOCKD=m
CONFIG_EXPORTFS=m
CONFIG_SUNRPC=m
# CONFIG_SUNRPC_GSS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y

#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_850=y
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y

#
# Profiling support
#
# CONFIG_PROFILING is not set

#
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
CONFIG_DEBUG_SPINLOCK_SLEEP=y
# CONFIG_FRAME_POINTER is not set
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y

#
# Security options
#
# CONFIG_SECURITY is not set

#
# Cryptographic options
#
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_TEST is not set

#
# Library routines
#
CONFIG_CRC32=y
CONFIG_ZLIB_INFLATE=m
CONFIG_ZLIB_DEFLATE=m
CONFIG_X86_BIOS_REBOOT=y
CONFIG_PC=y


Best regards,
Guylhem


-- 
*@externe.net ![guylhem@oeil.qc.ca->@metalab.unc.edu->@ibiblio.org->@7un.org]
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey


From linux at dominikbrodowski.de  Mon Feb  9 18:22:59 2004
From: linux at dominikbrodowski.de (Dominik Brodowski)
Date: Mon Feb  9 17:22:12 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the
	mouse ?!
In-Reply-To: <20040209173552.6fe9e27f.pcmcia@externe.net>
References: <20040209173552.6fe9e27f.pcmcia@externe.net>
Message-ID: <20040209172259.GA30062@dominikbrodowski.de>

Does /proc/interrupts differ between 2.4.x and 2.6.x?

	Dominik


On Mon, Feb 09, 2004 at 05:35:52PM +0100, Guylhem Aznar wrote a BUG report.

From dhinds at sonic.net  Mon Feb  9 09:35:55 2004
From: dhinds at sonic.net (David Hinds)
Date: Mon Feb  9 17:36:38 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the
	mouse ?!
In-Reply-To: <20040209173552.6fe9e27f.pcmcia@externe.net>
References: <20040209173552.6fe9e27f.pcmcia@externe.net>
Message-ID: <20040209093555.B9449@sonic.net>

On Mon, Feb 09, 2004 at 05:35:52PM +0100, Guylhem Aznar wrote:
> Hello
> 
> I just updated to kernel 2.6.2. I have a IBM netvista x40 (pentium 3
> coppermine) desktop system with a pcmcia pci card from Elan, which
> worked flawlessly under kernel 2.4 with pcmcia-cs tools.
>
> Now I have a very strange bug : the pcmcia subsystem is sleeping
> when I'm not moving the mouse.

You'll probably need to show boot messages.  Were you using ACPI with
2.4?  You might try turning that off.

-- Dave

From patrice at lazareff.com  Tue Feb 10 10:27:02 2004
From: patrice at lazareff.com (Patrice Lazareff)
Date: Tue Feb 10 09:28:51 2004
Subject: ide_cs cannot unload
Message-ID: <1076405222.1251.27.camel@nawak.local>

Hello,

I first posted this message on the sourceforge bug-tracking system of
the pcmcia-cs project.

I was advised to repost it here. I had a look in the list archive, but
did not find something similar in the past 3 months or so.

Right after inserting the pcmcia card for the atapi
cd-rom drive (PGCA-CD51), the module losts interrupt.

Ejecting the card (manually since cardctl says device
busy) seems to be ok, but also prevents unmounting
ide1, where the root partition is, on shutdown/reboot.
(the cdrom, when available, is on ide2).

Re-inserting the card totally freezes the machine.

Laptop Sony Vaio Z600
Kernel 2.6.2
modules-utils 3.0pre9
all compiled with gcc-3.3.2

From dmesg:

== during bootup ==
Linux Kernel Card Services
options: [pci] [cardbus] [pm]
PCI: Found IRQ 9 for device 0000:00:0c.0
PCI: Sharing IRQ 9 with 0000:00:0a.0
Yenta: CardBus bridge found at 0000:00:0c.0 [104d:8082]
Yenta: ISA IRQ mask 0x04b8, PCI irq 9
Socket status: 30000006
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x170-0x177
0x370-0x37f 0x398-0x39f 0x3c0-0x3df 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.

== on inserting card ==
hde: TOSHIBA CD-ROM XM-7002Bc, ATAPI CD/DVD-ROM drive
hdf: no response (status = 0xa1), resetting drive
hdf: no response (status = 0xa1)
ide2 at 0x180-0x187,0x386 on irq 3
Module ide_cs cannot be unloaded due to unsafe usage in
include/linux/module.h:489
ide-cs: hde: Vcc = 5.0, Vpp = 0.0
hde: lost interrupt
hde: lost interrupt
...

== on force eject ==
remove_proc_entry: hde/identify busy, count=1
remove_proc_entry: ide2/hde busy, count=1
Unable to handle kernel NULL pointer dereference at
virtual address 00000008
printing eip:
c018681f
*pde = 00000000
Oops: 0000 [#1]
CPU: 0
EIP: 0060:[<c018681f>] Not tainted
EFLAGS: 00010286
EIP is at sysfs_hash_and_remove+0xf/0x7d
eax: 00000000 ebx: c047c25c ecx: c0405320 edx:
00000000
esi: 00000000 edi: 00000001 ebp: d68d2000 esp:
d68d3878
ds: 007b es: 007b ss: 0068
Process pccardd (pid: 663, threadinfo=d68d2000
task=d7448740)
Stack: c0473d70 c7c70f20 c047c25c c0405478 c02315b8
00000000 c047c288 c047c25c
c047c608 c0231735 c047c25c c047c2b8 c047c25c
c047c608 c02305cd c047c25c
c047c25c d4b194e0 c0230623 c047c25c c047c16c
c02538e7 c047c25c d4b194e0
Call Trace:
[<c02315b8>] device_release_driver+0x28/0x70
[<c0231735>] bus_remove_device+0x55/0xa0
[<c02305cd>] device_del+0x5d/0xa0
[<c0230623>] device_unregister+0x13/0x30
[<c02538e7>] ide_unregister+0x827/0x910
[<c0117108>] recalc_task_prio+0xa8/0x1d0
[<c0137bff>] buffered_rmqueue+0xcf/0x170
[<c0137d3f>] __alloc_pages+0x9f/0x350
[<c013ada9>] cache_init_objs+0x69/0x70
[<c011827a>] __wake_up_common+0x3a/0x70
[<c0117f59>] schedule+0x319/0x590
[<c0117108>] recalc_task_prio+0xa8/0x1d0
[<d8867a91>] ide_release+0x81/0x120 [ide_cs]
[<d8867b7e>] ide_event+0x4e/0xe0 [ide_cs]
[<d884624e>] send_event+0x5e/0x70 [pcmcia_core]
[<d88462d2>] socket_remove_drivers+0x22/0x50 [pcmcia_core]
[<d8846313>] socket_shutdown+0x13/0x60 [pcmcia_core]
[<d8846903>] socket_remove+0x13/0x70 [pcmcia_core]
[<d88469ca>] socket_detect_change+0x6a/0x90 [pcmcia_core]
[<d8846ba8>] pccardd+0x1b8/0x240 [pcmcia_core]
[<c0118220>] default_wake_function+0x0/0x20
[<c0108f82>] ret_from_fork+0x6/0x14
[<c0118220>] default_wake_function+0x0/0x20
[<d88469f0>] pccardd+0x0/0x240 [pcmcia_core]
[<c0106f25>] kernel_thread_helper+0x5/0x10

Code: 8b 46 08 8d 48 68 ff 48 68 78 63 89 34 24 8b 44
24 18 89 44
<3>ide_timer_expiry: hwgroup->drive was NULL


== /sbin/lspci ==
00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX -
82443BX/ZX/DX Host bridge (rev 03)
00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX -
82443BX/ZX/DX AGP bridge (rev 03)
00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA
(rev 02)
00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4
IDE (rev 01)
00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4
USB (rev 01)
00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI
(rev 03)
00:08.0 FireWire (IEEE 1394): Sony Corporation CXD3222
i.LINK Controller (rev 02)
00:09.0 Multimedia audio controller: Yamaha Corporation
YMF-744B [DS-1S Audio Controller] (rev 02)
00:0a.0 Communication controller: Conexant HSF 56k
Data/Fax Modem (Mob WorldW SmartDAA) (rev 01)
00:0b.0 Ethernet controller: Intel Corp. 82557/8/9
[Ethernet Pro 100] (rev 08)
00:0c.0 CardBus bridge: Ricoh Co Ltd RL5c475 (rev 80)
01:00.0 VGA compatible controller: ATI Technologies Inc
Rage Mobility P/M AGP 2x (rev 64)


== cat /proc/interrupts ==
0: 3205158 XT-PIC timer
1: 6510 XT-PIC i8042
2: 0 XT-PIC cascade
9: 151336 XT-PIC ohci1394, uhci_hcd,
YMFPCI, eth0, yenta, hsfpcibasic2
11: 328 XT-PIC sonypi
12: 39503 XT-PIC i8042
14: 30729 XT-PIC ide0
NMI: 0
ERR: 0

== lsmod ==
hsfmc97ali 49412 0
hsfmc97via 47368 0
hsfmc97ich 48832 0
hsfpcibasic2 54744 0
hsfserial 19204 4
hsfmc97ali,hsfmc97via,hsfmc97ich,hsfpcibasic2
hsfengine 1210176 1 hsfserial
hsfosspec 58884 9
hsfmc97ali,hsfmc97via,hsfmc97ich,hsfpcibasic2,hsfserial,hsfengine
hsfsoar 51904 4
hsfmc97ali,hsfmc97via,hsfmc97ich,hsfpcibasic2
ide_cs 6212 2 [unsafe]
appletalk 31348 20
psnap 2756 1 appletalk
llc 5428 1 psnap
ds 11460 3 ide_cs
yenta_socket 14528 1
pcmcia_core 58528 3 ide_cs,ds,yenta_socket


Thank you for any direction. In the past (2.2 and 2.4
kernels) I could never use the kernel's pcmcia stuff
and relied only on pcmcia-cs

Patrice Lazareff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040210/2ccde6a4/attachment.bin
From rmk+pcmcia at arm.linux.org.uk  Tue Feb 10 09:52:44 2004
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Tue Feb 10 09:52:52 2004
Subject: ide_cs cannot unload
In-Reply-To: <1076405222.1251.27.camel@nawak.local>;
	from patrice@lazareff.com on Tue, Feb 10, 2004 at 10:27:02AM +0100
References: <1076405222.1251.27.camel@nawak.local>
Message-ID: <20040210095244.A22727@flint.arm.linux.org.uk>

On Tue, Feb 10, 2004 at 10:27:02AM +0100, Patrice Lazareff wrote:
> I first posted this message on the sourceforge bug-tracking system of
> the pcmcia-cs project.

Sorry to bounce you again, but could you send it to lkml.  It's something
for the IDE people to look at, not the PCMCIA people.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From patrice at lazareff.com  Tue Feb 10 12:50:23 2004
From: patrice at lazareff.com (Patrice Lazareff)
Date: Tue Feb 10 11:52:12 2004
Subject: ide_cs cannot unload
Message-ID: <1076413822.1246.39.camel@nawak.local>

Hello,

I first posted this message on the sourceforge bug-tracking system of
the pcmcia-cs project.

I was advised to repost it in the linux-pcmcia list, which I did to be
advised to repost it here. I had a look in the list archive, which is
not an easy thing to do, and could not find something both related and
recent.

So here come the rant:

Right after inserting the pcmcia card for the atapi
cd-rom drive (PGCA-CD51), the module losts interrupt.

Ejecting the card (manually since cardctl says device
busy) seems to be ok, but also prevents unmounting
ide1, where the root partition is, on shutdown/reboot.
(the cdrom, when available, is on ide2).

Re-inserting the card totally freezes the machine.

Laptop Sony Vaio Z600
Kernel 2.6.2
modules-utils 3.0pre9
all compiled with gcc-3.3.2

From dmesg:

== during bootup ==
Linux Kernel Card Services
options: [pci] [cardbus] [pm]
PCI: Found IRQ 9 for device 0000:00:0c.0
PCI: Sharing IRQ 9 with 0000:00:0a.0
Yenta: CardBus bridge found at 0000:00:0c.0 [104d:8082]
Yenta: ISA IRQ mask 0x04b8, PCI irq 9
Socket status: 30000006
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x170-0x177
0x370-0x37f 0x398-0x39f 0x3c0-0x3df 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.

== on inserting card ==
hde: TOSHIBA CD-ROM XM-7002Bc, ATAPI CD/DVD-ROM drive
hdf: no response (status = 0xa1), resetting drive
hdf: no response (status = 0xa1)
ide2 at 0x180-0x187,0x386 on irq 3
Module ide_cs cannot be unloaded due to unsafe usage in
include/linux/module.h:489
ide-cs: hde: Vcc = 5.0, Vpp = 0.0
hde: lost interrupt
hde: lost interrupt
...

== on force eject ==
remove_proc_entry: hde/identify busy, count=1
remove_proc_entry: ide2/hde busy, count=1
Unable to handle kernel NULL pointer dereference at
virtual address 00000008
printing eip:
c018681f
*pde = 00000000
Oops: 0000 [#1]
CPU: 0
EIP: 0060:[<c018681f>] Not tainted
EFLAGS: 00010286
EIP is at sysfs_hash_and_remove+0xf/0x7d
eax: 00000000 ebx: c047c25c ecx: c0405320 edx:
00000000
esi: 00000000 edi: 00000001 ebp: d68d2000 esp:
d68d3878
ds: 007b es: 007b ss: 0068
Process pccardd (pid: 663, threadinfo=d68d2000
task=d7448740)
Stack: c0473d70 c7c70f20 c047c25c c0405478 c02315b8
00000000 c047c288 c047c25c
c047c608 c0231735 c047c25c c047c2b8 c047c25c
c047c608 c02305cd c047c25c
c047c25c d4b194e0 c0230623 c047c25c c047c16c
c02538e7 c047c25c d4b194e0
Call Trace:
[<c02315b8>] device_release_driver+0x28/0x70
[<c0231735>] bus_remove_device+0x55/0xa0
[<c02305cd>] device_del+0x5d/0xa0
[<c0230623>] device_unregister+0x13/0x30
[<c02538e7>] ide_unregister+0x827/0x910
[<c0117108>] recalc_task_prio+0xa8/0x1d0
[<c0137bff>] buffered_rmqueue+0xcf/0x170
[<c0137d3f>] __alloc_pages+0x9f/0x350
[<c013ada9>] cache_init_objs+0x69/0x70
[<c011827a>] __wake_up_common+0x3a/0x70
[<c0117f59>] schedule+0x319/0x590
[<c0117108>] recalc_task_prio+0xa8/0x1d0
[<d8867a91>] ide_release+0x81/0x120 [ide_cs]
[<d8867b7e>] ide_event+0x4e/0xe0 [ide_cs]
[<d884624e>] send_event+0x5e/0x70 [pcmcia_core]
[<d88462d2>] socket_remove_drivers+0x22/0x50 [pcmcia_core]
[<d8846313>] socket_shutdown+0x13/0x60 [pcmcia_core]
[<d8846903>] socket_remove+0x13/0x70 [pcmcia_core]
[<d88469ca>] socket_detect_change+0x6a/0x90 [pcmcia_core]
[<d8846ba8>] pccardd+0x1b8/0x240 [pcmcia_core]
[<c0118220>] default_wake_function+0x0/0x20
[<c0108f82>] ret_from_fork+0x6/0x14
[<c0118220>] default_wake_function+0x0/0x20
[<d88469f0>] pccardd+0x0/0x240 [pcmcia_core]
[<c0106f25>] kernel_thread_helper+0x5/0x10

Code: 8b 46 08 8d 48 68 ff 48 68 78 63 89 34 24 8b 44
24 18 89 44
<3>ide_timer_expiry: hwgroup->drive was NULL


== /sbin/lspci ==
00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX -
82443BX/ZX/DX Host bridge (rev 03)
00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX -
82443BX/ZX/DX AGP bridge (rev 03)
00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA
(rev 02)
00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4
IDE (rev 01)
00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4
USB (rev 01)
00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI
(rev 03)
00:08.0 FireWire (IEEE 1394): Sony Corporation CXD3222
i.LINK Controller (rev 02)
00:09.0 Multimedia audio controller: Yamaha Corporation
YMF-744B [DS-1S Audio Controller] (rev 02)
00:0a.0 Communication controller: Conexant HSF 56k
Data/Fax Modem (Mob WorldW SmartDAA) (rev 01)
00:0b.0 Ethernet controller: Intel Corp. 82557/8/9
[Ethernet Pro 100] (rev 08)
00:0c.0 CardBus bridge: Ricoh Co Ltd RL5c475 (rev 80)
01:00.0 VGA compatible controller: ATI Technologies Inc
Rage Mobility P/M AGP 2x (rev 64)


== cat /proc/interrupts ==
0: 3205158 XT-PIC timer
1: 6510 XT-PIC i8042
2: 0 XT-PIC cascade
9: 151336 XT-PIC ohci1394, uhci_hcd,
YMFPCI, eth0, yenta, hsfpcibasic2
11: 328 XT-PIC sonypi
12: 39503 XT-PIC i8042
14: 30729 XT-PIC ide0
NMI: 0
ERR: 0

== lsmod ==
hsfmc97ali 49412 0
hsfmc97via 47368 0
hsfmc97ich 48832 0
hsfpcibasic2 54744 0
hsfserial 19204 4
hsfmc97ali,hsfmc97via,hsfmc97ich,hsfpcibasic2
hsfengine 1210176 1 hsfserial
hsfosspec 58884 9
hsfmc97ali,hsfmc97via,hsfmc97ich,hsfpcibasic2,hsfserial,hsfengine
hsfsoar 51904 4
hsfmc97ali,hsfmc97via,hsfmc97ich,hsfpcibasic2
ide_cs 6212 2 [unsafe]
appletalk 31348 20
psnap 2756 1 appletalk
llc 5428 1 psnap
ds 11460 3 ide_cs
yenta_socket 14528 1
pcmcia_core 58528 3 ide_cs,ds,yenta_socket


Thank you for any direction. In the past (2.2 and 2.4
kernels) I could never use the kernel's pcmcia stuff
and relied only on pcmcia-cs

Patrice Lazareff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040210/0a02738b/attachment.bin
From pcmcia at externe.net  Mon Feb  9 23:29:13 2004
From: pcmcia at externe.net (Guylhem Aznar)
Date: Tue Feb 10 12:33:42 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the
 mouse ?!
In-Reply-To: <20040209093555.B9449@sonic.net>
References: <20040209173552.6fe9e27f.pcmcia@externe.net>
	<20040209093555.B9449@sonic.net>
Message-ID: <20040209232913.5c8b1e4f.pcmcia@externe.net>

Hello,

On Mon, 9 Feb 2004 09:35:55 -0800
David Hinds <dhinds@sonic.net> wrote:
> You'll probably need to show boot messages.  Were you using ACPI with
> 2.4?  You might try turning that off.

I was using acpi without any problem. Here are the boot messages
I did try to compile with/without :
 - apic
 - hpet
 - cpufreq
 
I'm now going to try to remove other options like prempt, acpi, mtrr, etc

Meanwhile I'm trying to find a workaround. cat /dev/zero>/dev/null didn't work.
The only thing that works is activity either on the keyboard, on the mouse

Best regards,
Guylhem


-- 
*@externe.net ![guylhem@oeil.qc.ca->@metalab.unc.edu->@ibiblio.org->@7un.org]
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey


From athome at externe.net  Tue Feb 10 12:59:33 2004
From: athome at externe.net (Guylhem Aznar)
Date: Tue Feb 10 12:33:44 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the
 mouse ?!
In-Reply-To: <20040209093555.B9449@sonic.net>
References: <20040209173552.6fe9e27f.pcmcia@externe.net>
	<20040209093555.B9449@sonic.net>
Message-ID: <20040210125933.36552e22.athome@externe.net>

> Hello,

On Mon, 9 Feb 2004 09:35:55 -0800
David Hinds <dhinds@sonic.net> wrote:
> Were you using ACPI with 2.4?  You might try turning that off.

With acpi off, nothing works ie even when I move the mouse ping doesn't go on.

Here are my boot messages. I tried disabling preempt as well but it didn't help.
The only other bug I have with 2.6.2 is a text console corruption as soon as I
start X, but trying my pings in console-mode didn't help.

Linux version 2.6.2 (root@ibm) (gcc version 2.95.4 20011002 (Debian prerelease))
#9 Mon Feb 9 23:49:05 CET 2004
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000c8000 - 00000000000cc000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000001dff0000 (usable)
 BIOS-e820: 000000001dff0000 - 000000001dff8000 (ACPI data)
 BIOS-e820: 000000001dff8000 - 000000001e000000 (ACPI NVS)
 BIOS-e820: 00000000ffef0000 - 00000000fff00000 (reserved)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
479MB LOWMEM available.
On node 0 totalpages: 122864
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 118768 pages, LIFO batch:16
  HighMem zone: 0 pages, LIFO batch:1
DMI 2.3 present.
IBM machine detected. Enabling interrupts during APM calls.
IBM machine detected. Disabling SMBus accesses.
ACPI: RSDP (v000 AMI                                       ) @ 0x000fbed0
ACPI: RSDT (v001 AMIINT AMIINT10 0x00001000 MSFT 0x0100000b) @ 0x1dff0000
ACPI: FADT (v001 AMIINT AMIINT10 0x00001000 MSFT 0x0100000b) @ 0x1dff0030
ACPI: DBGP (v001 AMIINT          0x00001000 MSFT 0x0100000b) @ 0x1dff00a4
ACPI: DSDT (v001    SiS      630 0x00001000 MSFT 0x0100000c) @ 0x00000000
Building zonelist for node : 0
Kernel command line: ro root=/dev/hda1
video=sisfb:mode:1024x768x16,mem:12288,rate:75,queuemode=agp,userom=0
sisfb: Options mode:1024x768x16,mem:12288,rate:75,queuemode=agp,userom=0
sisfb: Invalid option queuemode=agp
sisfb: Invalid option userom=0
Local APIC disabled by BIOS -- reenabling.
Found and enabled local APIC!
Initializing CPU#0
PID hash table entries: 2048 (order 11: 16384 bytes)
Detected 598.133 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Memory: 482236k/491456k available (2208k kernel code, 8472k reserved, 1037k
data, 152k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 1183.74 BogoMIPS
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU:     After generic identify, caps: 0383fbff 00000000 00000000 00000000
CPU:     After vendor identify, caps: 0383fbff 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
CPU:     After all inits, caps: 0383fbff 00000000 00000000 00000040
CPU: Intel Pentium III (Coppermine) stepping 03
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 598.0008 MHz.
..... host bus clock speed is 132.0890 MHz.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd9a8, last bus=1
PCI: Using configuration type 1
ACPI: Subsystem revision 20040116
ACPI: IRQ5 SCI: Edge set to Level Trigger.
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: Power Resource [URP1] (off)
ACPI: Power Resource [URP2] (off)
ACPI: Power Resource [FDDP] (off)
ACPI: Power Resource [LPTP] (off)
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKU] (IRQs 3 4 5 6 7 10 11 12 14 15)
Linux Plug and Play Support v0.97 (c) Adam Belay
PnPBIOS: Scanning system for PnP BIOS support...
PnPBIOS: Found PnP BIOS installation structure at 0xc00f6c00
PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x5b64, dseg 0xf0000
PnPBIOS: Unknown tag '0x82', length '25'.
PnPBIOS: 14 nodes reported by PnP BIOS; 14 recorded by driver
SCSI subsystem initialized
Linux Kernel Card Services
  options:  [pci] [cardbus] [pm]
drivers/usb/core/usb.c: registered new driver usbfs
drivers/usb/core/usb.c: registered new driver hub
ACPI: No IRQ known for interrupt pin A of device 0000:00:00.1
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 9
ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
PCI: Using ACPI for IRQ routing
PCI: if you experience problems, try using option 'pci=noacpi' or even
'acpi=off'
PCI: Cannot allocate resource region 0 of device 0000:00:00.0
sisfb: Video ROM found and mapped to c00c0000
sisfb: Framebuffer at 0xf0000000, mapped to 0xde80c000, size 32768k
sisfb: MMIO at 0xfbce0000, mapped to 0xe080d000, size 128k
sisfb: Memory heap starting at 12288K
sisfb: SiS301 bridge detected
sisfb: Default mode is 1024x768x16 (75Hz)
sisfb: Installed SISFB_GET_INFO ioctl (80046ef8)
sisfb: 2D acceleration is enabled, scrolling mode ypan
fb0: SIS 630/730 VGA frame buffer device, Version 1.6.01
ikconfig 0.7 with /proc/config*
SGI XFS with no debug enabled
Initializing Cryptographic API
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [SLPB]
ACPI: Processor [CPU1] (supports C1, 8 throttling states)
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.12
Software Watchdog Timer: 0.06, soft_margin: 60 sec, nowayout: 0
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected SiS 630 chipset
agpgart: Maximum main memory to use for agp memory: 409M
agpgart: AGP aperture is 32M @ 0xf8000000
[drm] Initialized sis 1.1.0 20030826 on minor 0
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS4 at I/O 0x180 (irq = 3) is a 16550A
Using anticipatory io scheduler
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
loop: loaded (max 8 devices)
sis900.c: v1.08.07 11/02/2003
eth0: SiS 900 Internal MII PHY transceiver found at address 1.
eth0: Using transceiver found at address 1 as default
eth0: SiS 900 PCI Fast Ethernet at 0xd800, IRQ 9, 00:40:d0:2a:1c:b9.
Linux video capture interface: v1.00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SIS5513: IDE controller at PCI slot 0000:00:00.1
ACPI: No IRQ known for interrupt pin A of device 0000:00:00.1
SIS5513: chipset revision 208
SIS5513: not 100% native mode: will probe irqs later
SIS5513: SiS630 ATA 66 controller
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:DMA
hda: MAXTOR 6L040J2, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: TOSHIBA DVD-ROM SD-C2302, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=65535/16/63, UDMA(66)
 hda: hda1 hda2
hdc: ATAPI 24X DVD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.20
PCI: Enabling device 0000:00:05.0 (0000 -> 0002)
Yenta: CardBus bridge found at 0000:00:05.0 [0000:0000]
Yenta: Enabling burst memory read transactions
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta: ISA IRQ mask 0x0000, PCI irq 11
Socket status: 30000010
ohci_hcd: 2003 Oct 13 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
ohci_hcd 0000:00:01.2: OHCI Host Controller
ohci_hcd 0000:00:01.2: irq 11, pci mem e083e000
ohci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ohci_hcd 0000:00:01.3: OHCI Host Controller
ohci_hcd 0000:00:01.3: irq 11, pci mem e0840000
ohci_hcd 0000:00:01.3: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
drivers/usb/core/usb.c: registered new driver hid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
input: PC Speaker
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Advanced Linux Sound Architecture Driver Version 0.9.7 (Thu Sep 25 19:16:36 2003
UTC).
request_module: failed /sbin/modprobe -- snd-card-0. error = -16
hub 1-0:1.0: new USB device on port 2, assigned address 2
hub 1-2:1.0: USB hub found
hub 1-2:1.0: 3 ports detected
hub 1-0:1.0: new USB device on port 3, assigned address 3
input: USB HID v1.10 Gamepad [THRUSTMASTER FireStorm Dual Power 2 ] on
usb-0000:00:01.2-3
hub 1-2:1.0: new USB device on port 1, assigned address 4
ALSA device list:
  #0: SiS SI7018 PCI Audio at 0xdc00, irq 10
NET: Registered protocol family 2
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 32768 bind 32768)
NET: Registered protocol family 1
NET: Registered protocol family 17
BIOS EDD facility v0.10 2003-Oct-11, 1 devices found
Please report your BIOS at http://domsch.com/linux/edd30/results.html
XFS mounting filesystem hda1
Ending clean XFS mount for filesystem: hda1
VFS: Mounted root (xfs filesystem) readonly.
Freeing unused kernel memory: 152k freed
drivers/usb/input/hid-core.c: ctrl urb status -2 received
drivers/usb/input/hid-core.c: timeout initializing reports

input: USB HID v1.00 Keyboard [Silitek IBM USB HUB KEYBOARD] on
usb-0000:00:01.2-2.1
input: USB HID v1.00 Device [Silitek IBM USB HUB KEYBOARD] on
usb-0000:00:01.2-2.1
hub 1-2:1.0: new USB device on port 2, assigned address 5
input: USB HID v1.00 Mouse [Microsoft Microsoft Trackball Optical_] on
usb-0000:00:01.2-2.2
XFS mounting filesystem loop0
Ending clean XFS mount for filesystem: loop0
eth0: Media Link Off
request_module: failed /sbin/modprobe -- sound-slot-1. error = 256
NET: Registered protocol family 23
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
svc: unknown version (3)
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x180-0x187 0x290-0x297 0x3c0-0x3df
0x480-0x48f 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
orinoco.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
orinoco_cs.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
eth1: Station identity 001f:0002:0002:0001
eth1: Looks like a Symbol firmware version [V2.50-13] (parsing to 25013)
eth1: Ad-hoc demo mode supported
eth1: IEEE standard IBSS ad-hoc mode supported
eth1: WEP supported, 104-bit key
eth1: MAC address 00:02:B3:06:00:B8
eth1: Station name "Prism  I"
eth1: firmware ALLOC bug detected (old Symbol firmware?). Trying to work
around... ok.
eth1: ready
eth1: index 0x01: Vcc 5.0, irq 11, io 0x0100-0x0147
device eth0 entered promiscuous mode
request_module: failed /sbin/modprobe -- tty-ldisc-11. error = 256
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
atkbd.c: Unknown key released (translated set 0, code 0x7e on isa0060/serio0).
atkbd.c: Use 'setkeycodes 7e <keycode>' to make it known.
eth1: New link status: Connected (0001)
NETDEV WATCHDOG: eth1: transmit timed out
eth1: Tx timeout! ALLOCFID=0122, TXCOMPLFID=01f7, EVSTAT=800b
eth1: New link status: Connected (0001)
NETDEV WATCHDOG: eth1: transmit timed out
eth1: Tx timeout! ALLOCFID=0122, TXCOMPLFID=019e, EVSTAT=800b
eth1: New link status: Connected (0001)
NETDEV WATCHDOG: eth1: transmit timed out
eth1: Tx timeout! ALLOCFID=0122, TXCOMPLFID=037f, EVSTAT=800b
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
orinoco_lock() called with hw_unavailable (dev=dd542800)
eth1: New link status: Connected (0001)

These orinoco_lock and Tx timeout are due to a portion of the code in orinoco.c
ifdef'ed in pcmcia-cs by HAVE_TIMEOUT.


Best regards,
Guylhem


-- 
*@externe.net ![guylhem@oeil.qc.ca->@metalab.unc.edu->@ibiblio.org->@7un.org]
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040210/7e710d44/attachment.bin
From dhinds at sonic.net  Tue Feb 10 10:47:08 2004
From: dhinds at sonic.net (David Hinds)
Date: Tue Feb 10 18:47:20 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the
	mouse ?!
In-Reply-To: <20040210125933.36552e22.athome@externe.net>
References: <20040209173552.6fe9e27f.pcmcia@externe.net>
	<20040209093555.B9449@sonic.net> <20040210125933.36552e22.athome@externe.net>
Message-ID: <20040210104708.A15974@sonic.net>

On Tue, Feb 10, 2004 at 12:59:33PM +0100, Guylhem Aznar wrote:

> Yenta: CardBus bridge found at 0000:00:05.0 [0000:0000]
> Yenta: Enabling burst memory read transactions
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta: ISA IRQ mask 0x0000, PCI irq 11
> Socket status: 30000010

The ISA IRQ mask of 0x0000 makes it look like you're not getting any
interrupts delivered from the CardBus bridge.  Maybe this is a problem
in the Yenta driver.  Or maybe it is an APIC interrupt routing issue;
I do not know how that stuff works.  You could try booting with the
"noapic" parameter and see if that changes anything?

-- Dave

From Larry.Finger at lwfinger.net  Tue Feb 10 13:38:02 2004
From: Larry.Finger at lwfinger.net (Larry W. Finger)
Date: Tue Feb 10 20:38:30 2004
Subject: ide_cs cannot unload
In-Reply-To: <1076413822.1246.39.camel@nawak.local>
References: <1076413822.1246.39.camel@nawak.local>
Message-ID: <6.0.0.22.0.20040210133219.01c03ce0@pop-server.kc.rr.com>

At 04:50 AM 2/10/2004, Patrice Lazareff wrote:

>Ejecting the card (manually since cardctl says device
>busy) seems to be ok, but also prevents unmounting
>ide1, where the root partition is, on shutdown/reboot.
>(the cdrom, when available, is on ide2).
>
>Re-inserting the card totally freezes the machine.
>
>Laptop Sony Vaio Z600
>Kernel 2.6.2
>modules-utils 3.0pre9
>all compiled with gcc-3.3.2

My machine is an HP ze1115 using an Apricorn EZ-Gig expansion card for an 
external hard drive. With the following patch, the module loads cleanly and 
works. There is one error message upon unload, but the module will reload OK.

The unload error message is "request module: failed /sbin/modprobe 
--block-major - 33-0, error = 256"

The patch (against 2.6.2) is:

--- old/drivers/ide/legacy/ide-cs.c.orig        2004-02-10 
12:32:15.000000000 -0700
+++ new/drivers/ide/legacy/ide-cs.c     2004-02-10 12:52:34.984758032 -0700
@@ -361,7 +361,7 @@
         goto failed;
      }

-    MOD_INC_USE_COUNT;
+    try_module_get(THIS_MODULE);
      info->ndev = 1;
      sprintf(info->node.dev_name, "hd%c", 'a'+(hd*2));
      info->node.major = ide_major[hd];
@@ -407,7 +407,7 @@
         if (link->io.NumPorts2)
             request_region(link->io.BasePort2, link->io.NumPorts2,
                            info->node.dev_name);
-       MOD_DEC_USE_COUNT;
+       module_put(THIS_MODULE);
      }
      info->ndev = 0;
      link->dev = NULL;

My mailer lives on Windows and corrupts patches; therefore, I am also 
including the diff file from Linux.

Larry 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ide_cs.diff
Type: application/octet-stream
Size: 600 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040210/c3f26b6f/ide_cs.obj
From pcmcia at externe.net  Wed Feb 11 22:34:21 2004
From: pcmcia at externe.net (Guylhem Aznar)
Date: Wed Feb 11 21:31:37 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the
 mouse ?!
In-Reply-To: <20040210104708.A15974@sonic.net>
References: <20040209173552.6fe9e27f.pcmcia@externe.net>
	<20040209093555.B9449@sonic.net>
	<20040210125933.36552e22.athome@externe.net>
	<20040210104708.A15974@sonic.net>
Message-ID: <20040211223421.670eaece.pcmcia@externe.net>

Hello,

On Tue, 10 Feb 2004 10:47:08 -0800
David Hinds <dhinds@sonic.net> wrote:
> The ISA IRQ mask of 0x0000 makes it look like you're not getting any
> interrupts delivered from the CardBus bridge.  Maybe this is a problem
> in the Yenta driver.  Or maybe it is an APIC interrupt routing issue;
> I do not know how that stuff works.  You could try booting with the
> "noapic" parameter and see if that changes anything?

It does - moving the mouse or the keyboard does nothing. Now I have to play
music to make my pcmcia wifi card work (?)
The irq mask is identical :


Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU:     After generic identify, caps: 0383fbff 00000000 00000000 00000000
CPU:     After vendor identify, caps: 0383fbff 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
CPU:     After all inits, caps: 0383fbff 00000000 00000000 00000040
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: Intel Pentium III (Coppermine) stepping 03
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 598.0011 MHz.
..... host bus clock speed is 132.0891 MHz.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd9a8, last bus=1
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040116
ACPI: IRQ5 SCI: Edge set to Level Trigger.
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: Power Resource [URP1] (off)
ACPI: Power Resource [URP2] (off)
ACPI: Power Resource [FDDP] (off)
ACPI: Power Resource [LPTP] (off)
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKU] (IRQs 3 4 5 6 7 10 11 12 14 15)
Linux Plug and Play Support v0.97 (c) Adam Belay
PnPBIOS: Scanning system for PnP BIOS support...
PnPBIOS: Found PnP BIOS installation structure at 0xc00f6c00
PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x5b64, dseg 0xf0000
PnPBIOS: Unknown tag '0x82', length '25'.
PnPBIOS: 15 nodes reported by PnP BIOS; 15 recorded by driver
SCSI subsystem initialized
Linux Kernel Card Services
  options:  [pci] [cardbus] [pm]
drivers/usb/core/usb.c: registered new driver usbfs
drivers/usb/core/usb.c: registered new driver hub
PCI: Probing PCI hardware
PCI: Using IRQ router SIS [1039/0008] at 0000:00:01.0
PCI: IRQ 0 for device 0000:00:05.0 doesn't match PIRQ mask - try pci=usepirqmask
PCI: Cannot allocate resource region 0 of device 0000:00:00.0
sisfb: Video ROM found and mapped to c00c0000
sisfb: Framebuffer at 0xf0000000, mapped to 0xde80c000, size 32768k
sisfb: MMIO at 0xfbce0000, mapped to 0xe080d000, size 128k
sisfb: Memory heap starting at 12288K
sisfb: SiS301 bridge detected
sisfb: Default mode is 1024x768x16 (75Hz)
sisfb: Added MTRRs
sisfb: Installed SISFB_GET_INFO ioctl (80046ef8)
sisfb: 2D acceleration is enabled, scrolling mode ypan
fb0: SIS 630/730 VGA frame buffer device, Version 1.6.01
ikconfig 0.7 with /proc/config*
SGI XFS with no debug enabled
Initializing Cryptographic API
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [SLPB]
ACPI: Processor [CPU1] (supports C1, 8 throttling states)
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.12
Software Watchdog Timer: 0.06, soft_margin: 60 sec, nowayout: 0
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected SiS 630 chipset
agpgart: Maximum main memory to use for agp memory: 409M
agpgart: AGP aperture is 32M @ 0xf8000000
[drm] Initialized sis 1.1.0 20030826 on minor 0
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS4 at I/O 0x180 (irq = 3) is a 16550A
Using anticipatory io scheduler
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
loop: loaded (max 8 devices)
sis900.c: v1.08.07 11/02/2003
PCI: Found IRQ 9 for device 0000:00:01.1
eth0: SiS 900 Internal MII PHY transceiver found at address 1.
eth0: Using transceiver found at address 1 as default
eth0: SiS 900 PCI Fast Ethernet at 0xd800, IRQ 9, 00:40:d0:2a:1c:b9.
Linux video capture interface: v1.00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SIS5513: IDE controller at PCI slot 0000:00:00.1
SIS5513: chipset revision 208
SIS5513: not 100% native mode: will probe irqs later
SIS5513: SiS630 ATA 66 controller
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:DMA
hda: MAXTOR 6L040J2, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: TOSHIBA DVD-ROM SD-C2302, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=65535/16/63, UDMA(66)
 hda: hda1 hda2
hdc: ATAPI 24X DVD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.20
PCI: Enabling device 0000:00:05.0 (0000 -> 0002)
PCI: IRQ 0 for device 0000:00:05.0 doesn't match PIRQ mask - try pci=usepirqmask
PCI: Assigned IRQ 10 for device 0000:00:05.0
Yenta: CardBus bridge found at 0000:00:05.0 [0000:0000]
Yenta: Enabling burst memory read transactions
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta: ISA IRQ mask 0x0000, PCI irq 10
Socket status: 30000010
ohci_hcd: 2003 Oct 13 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
PCI: Found IRQ 11 for device 0000:00:01.2
PCI: Sharing IRQ 11 with 0000:00:01.3
PCI: Sharing IRQ 11 with 0000:00:09.0
ohci_hcd 0000:00:01.2: OHCI Host Controller
ohci_hcd 0000:00:01.2: irq 11, pci mem e083e000
ohci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
PCI: Found IRQ 11 for device 0000:00:01.3
PCI: Sharing IRQ 11 with 0000:00:01.2
PCI: Sharing IRQ 11 with 0000:00:09.0
ohci_hcd 0000:00:01.3: OHCI Host Controller
ohci_hcd 0000:00:01.3: irq 11, pci mem e0840000
ohci_hcd 0000:00:01.3: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
drivers/usb/core/usb.c: registered new driver hid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
input: PC Speaker
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Advanced Linux Sound Architecture Driver Version 0.9.7 (Thu Sep 25 19:16:36 2003
UTC).
request_module: failed /sbin/modprobe -- snd-card-0. error = -16
PCI: Found IRQ 10 for device 0000:00:01.4
hub 1-0:1.0: new USB device on port 2, assigned address 2
hub 1-2:1.0: USB hub found
hub 1-2:1.0: 3 ports detected
hub 1-0:1.0: new USB device on port 3, assigned address 3
input: USB HID v1.10 Gamepad [THRUSTMASTER FireStorm Dual Power 2 ] on
usb-0000:00:01.2-3
hub 1-2:1.0: new USB device on port 1, assigned address 4
ALSA device list:
  #0: SiS SI7018 PCI Audio at 0xdc00, irq 10
NET: Registered protocol family 2
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 32768 bind 32768)
NET: Registered protocol family 1
NET: Registered protocol family 17
BIOS EDD facility v0.10 2003-Oct-11, 1 devices found
Please report your BIOS at http://domsch.com/linux/edd30/results.html
XFS mounting filesystem hda1
Ending clean XFS mount for filesystem: hda1
VFS: Mounted root (xfs filesystem) readonly.
Freeing unused kernel memory: 156k freed
drivers/usb/input/hid-core.c: ctrl urb status -2 received
drivers/usb/input/hid-core.c: timeout initializing reports

input: USB HID v1.00 Keyboard [Silitek IBM USB HUB KEYBOARD] on
usb-0000:00:01.2-2.1
input: USB HID v1.00 Device [Silitek IBM USB HUB KEYBOARD] on
usb-0000:00:01.2-2.1
hub 1-2:1.0: new USB device on port 2, assigned address 5
input: USB HID v1.00 Mouse [Microsoft Microsoft Trackball Optical_] on
usb-0000:00:01.2-2.2
XFS mounting filesystem loop0
Starting XFS recovery on filesystem: loop0 (dev: loop0)
Ending XFS recovery on filesystem: loop0 (dev: loop0)
eth0: Media Link Off
request_module: failed /sbin/modprobe -- sound-slot-1. error = 256
NET: Registered protocol family 23
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
svc: unknown version (3)
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x180-0x187 0x278-0x27f 0x290-0x297
0x3c0-0x3df 0x480-0x48f 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
orinoco.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
orinoco_cs.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
eth1: Station identity 001f:0002:0002:0001
eth1: Looks like a Symbol firmware version [V2.50-13] (parsing to 25013)
eth1: Ad-hoc demo mode supported
eth1: IEEE standard IBSS ad-hoc mode supported
eth1: WEP supported, 104-bit key
eth1: MAC address 00:02:B3:06:00:B8
eth1: Station name "Prism  I"
eth1: firmware ALLOC bug detected (old Symbol firmware?). Trying to work
around... ok.
eth1: ready
eth1: index 0x01: Vcc 5.0, irq 10, io 0x0100-0x0147
device eth0 entered promiscuous mode
request_module: failed /sbin/modprobe -- tty-ldisc-11. error = 256
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
atkbd.c: Unknown key released (translated set 0, code 0x7e on isa0060/serio0).
atkbd.c: Use 'setkeycodes 7e <keycode>' to make it known.
hub 2-0:1.0: new USB device on port 2, assigned address 2



Bien a vous - Best regards,
Guylhem


-- 
*@externe.net ![guylhem@oeil.qc.ca->@metalab.unc.edu->@ibiblio.org->@7un.org]
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey


From daniel.ritz at gmx.ch  Thu Feb 12 16:22:40 2004
From: daniel.ritz at gmx.ch (Daniel Ritz)
Date: Thu Feb 12 15:23:13 2004
Subject: strange strange 2.6.2 bug - pcmcia sleeps until I move the
	mouse ?!
Message-ID: <200402121622.40572.daniel.ritz@gmx.ch>

can you please post the follwing info:
- lspci -vv
- cat /proc/interrupts (for both 2.4 and 2.6)
- you say it works with 2.4: with which socket driver? i82365 from the pcmcia-cs
  package or in-kernel yenta_socket?

you have two probles here: for one, there are no ISA interrupts available...
second, you have a TI cardbus bridge that forgets to route the interrupts
from the card to the PCI bus...so your card only works when there are interrupts
on the same line as the interrupt handler of the card is registered...

i tried forcing my ToPIC97 to a irq mask of 0000 so it has to route the
interrupts to the PCI interrupt...but it still works...but i have a ti1410 in
the other notebook...so i can play a bit...TI bridges have special init code
which may be different between 2.4 and 2.6. i'll look at it.

[ there is already code to enable the routing to pci for TI, but it's a) disabled
  b) in the wrong place and C) buggy ]

rgds
-daniel


From pcmcia at externe.net  Mon Feb 16 10:58:30 2004
From: pcmcia at externe.net (Guylhem Aznar)
Date: Mon Feb 16 10:00:50 2004
Subject: strange strange 2.6.2 bug - pcmcia sleeps until I move the
 mouse ?!
In-Reply-To: <200402121622.40572.daniel.ritz@gmx.ch>
References: <200402121622.40572.daniel.ritz@gmx.ch>
Message-ID: <20040216105830.0a2bf002.pcmcia@externe.net>

Hello,

On Thu, 12 Feb 2004 16:22:40 +0100
Daniel Ritz <daniel.ritz@gmx.ch> wrote:
> can you please post the follwing info:
> - lspci -vv

2.6 and 2.4 attached.

Diff says:
*root@ibm:~# diff lspci2.4 lspci2.6
80c80
<       Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR+
---
>       Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
>       <TAbort- <MAbort- >SERR- <PERR-
82c82
<       Interrupt: pin A routed to IRQ 5
---
>       Interrupt: pin A routed to IRQ 11
85,86c85,88
<       I/O window 0: 00000000-00000003
<       I/O window 1: 00000000-00000003
---
>       Memory window 0: 1e400000-1e7ff000 (prefetchable)
>       Memory window 1: 1e800000-1ebff000
>       I/O window 0: 00004000-000040ff
>       I/O window 1: 00004400-000044ff

On 2.4, it shares irq5 with acpi.

> - cat /proc/interrupts (for both 2.4 and 2.6)

see below

> - you say it works with 2.4: with which socket driver? i82365 from the
> pcmcia-cs  package or in-kernel yenta_socket?

i82365 - I don't really enjoy pcmcia kernel support since there are too few
drivers availables.

Some information: Using the latest init.d/pcmcia on 2.4+i82365 , I do have the
same bug I get with kernel 2.6
I've been trying various stuff (boot time options, with/without bios "Os support
PnP" option, etc) because I just couldn't make pcmcia in 2.4 work as it did.
Looks like an update of the pcmcia-cs tools, most specifically the boot script,
caused the problem.

Kernel messages with new (broken) pcmcia script:
Linux PCMCIA Card Services 3.2.5
  kernel build: 2.4.21-guylhem #6 Mon Sep 29 20:34:41 CEST 2003
  options:  [pci] [cardbus] [apm] [pnp]
PnP: PNP BIOS installation structure at 0xc00f6c00
PnP: PNP BIOS version 1.0, entry at f0000:5b64, dseg at f0000
Intel ISA/PCI/CardBus PCIC probe:
  TI 1410 rev 01 PCI-to-CardBus at slot 00:05, mem 0x1e000000
    host opts [0]: [serial pci & irq] [pci irq 5] [lat 168/176] [bus 2/5]
    PCI irq 5 test failed
    ISA irqs (scanned) = none!<6>    *NO* card interrupts, polling interval = 10
00 ms
cs: memory probe 0xa0000000-0xa0ffffff: clean.
orinoco.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
orinoco_cs.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
cs: IO port probe 0x0100-0x04ff: excluding 0x3c0-0x3e7
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0a00-0x0aff: clean.
cs: IO port probe 0x0c00-0x0cff: clean.
orinoco_cs: RequestIRQ: Resource in use

With old script:

Linux PCMCIA Card Services 3.2.5
  kernel build: 2.4.21-guylhem #2 Tue Sep 9 15:02:11 CEST 2003
  options:  [pci] [cardbus] [apm]
Intel ISA/PCI/CardBus PCIC probe:
  TI 1410 rev 01 PCI-to-CardBus at slot 00:05, mem 0x1e000000
    host opts [0]: [pci only] [pci irq 5] [lat 168/176] [bus 2/5]
    PCI card interrupts, PCI status changes
cs: memory probe 0xa0000000-0xa0ffffff: clean.
orinoco.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
orinoco_cs.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
cs: IO port probe 0x0100-0x04ff: excluding 0x180-0x187 0x290-0x297 0x3c0-0x3df 0
x480-0x48f 0x4d0-0x4d7
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0a00-0x0aff: clean.
cs: IO port probe 0x0c00-0x0cff: clean.
eth1: Station identity 001f:0002:0002:0001
eth1: Looks like a Symbol firmware version [V2.50-13] (parsing to 25013)
eth1: Ad-hoc demo mode supported
eth1: IEEE standard IBSS ad-hoc mode supported
eth1: WEP supported, 104-bit key
eth1: MAC address 00:02:B3:06:00:B8
eth1: Station name "Prism  I"
eth1: firmware ALLOC bug detected (old Symbol firmware?). Trying to work
around... ok.
eth1: ready
eth1: index 0x01: Vcc 5.0, irq 5, io 0x0100-0x0147
eth1: New link status: Connected (0001)

> you have two probles here: for one, there are no ISA interrupts available...

Looks like the card is very happy with a PCI irq. I'd like to enable ISA irq for
modems and other pcmcia cards however.

> second, you have a TI cardbus bridge that forgets to route the interrupts
> from the card to the PCI bus...so your card only works when there are
> interrupts on the same line as the interrupt handler of the card is
> registered...

There should be *many* interrupts available. Uncommending the "excludes" in
config.opts didn't help.

2.6 interrupts
           CPU0       
  0:     932315          XT-PIC  timer
  2:          0          XT-PIC  cascade
  5:          0          XT-PIC  acpi
  8:          4          XT-PIC  rtc
  9:         47          XT-PIC  eth0
 10:          0          XT-PIC  Trident Audio
 11:      22866          XT-PIC  yenta, ohci_hcd, ohci_hcd, orinoco_cs
 14:       7407          XT-PIC  ide0
 15:         36          XT-PIC  ide1
NMI:          0 
LOC:     932216 
ERR:          0
MIS:          0

I guess it leaves 1 2 3 4 6 7 12 13

2.4 interrupts
           CPU0       
  0:     454008          XT-PIC  timer
  1:          4          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  5:       1387          XT-PIC  acpi, i82365, orinoco_cs
  8:          4          XT-PIC  rtc
  9:         59          XT-PIC  eth0
 10:        159          XT-PIC  Trident Audio
 11:      18196          XT-PIC  usb-ohci, usb-ohci
 14:      28940          XT-PIC  ide0
 15:          2          XT-PIC  ide1
NMI:          0 
ERR:          0

I've no parallel port (disabled in the bios) and only 1 serial port which I can
also disable. There are only 2 cards in the machine : a pcmcia-pci and a
winmodem-pci (worthless but close a hole - I've lost the slot covert :-) The
machine is a so-called "legacy free" so I can also remove PS/2 support  (I've a
USB keyboard and mouse)

I'm now wondering why it can't use these free IRQ. On the PCMCIA-HOWTO I've read
/proc/interrupts didn't help, but I guess at least IRQ 7 (disabled in the bios!)
should be available !

Best regards,
Guylhem


-- 
*@externe.net ![guylhem@oeil.qc.ca->@metalab.unc.edu->@ibiblio.org->@7un.org]
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey


From pcmcia at externe.net  Mon Feb 16 11:53:14 2004
From: pcmcia at externe.net (Guylhem Aznar)
Date: Mon Feb 16 10:50:06 2004
Subject: strange strange 2.6.2 bug - pcmcia sleeps until I move the
 mouse ?!
In-Reply-To: <200402121622.40572.daniel.ritz@gmx.ch>
References: <200402121622.40572.daniel.ritz@gmx.ch>
Message-ID: <20040216115314.369d0b3e.pcmcia@externe.net>

Bonjour, Hello,


Forgot the attachments. pcmcia.old works like a charm yet I can't notice any
real difference.

Best regards,
Guylhem


-- 
*@externe.net ![guylhem@oeil.qc.ca->@metalab.unc.edu->@ibiblio.org->@7un.org]
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lspci2.4
Type: application/octet-stream
Size: 6426 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040216/978e344a/lspci2-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lspci2.6
Type: application/octet-stream
Size: 6514 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040216/978e344a/lspci2-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcmcia
Type: application/octet-stream
Size: 4509 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040216/978e344a/pcmcia-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcmcia.old
Type: application/x-trash
Size: 4983 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040216/978e344a/pcmcia-0001.bin
From daniel.ritz at gmx.ch  Mon Feb 16 17:26:42 2004
From: daniel.ritz at gmx.ch (Daniel Ritz)
Date: Mon Feb 16 16:31:14 2004
Subject: strange strange 2.6.2 bug - pcmcia sleeps until I move the
	mouse ?!
In-Reply-To: <20040216105830.0a2bf002.pcmcia@externe.net>
References: <200402121622.40572.daniel.ritz@gmx.ch>
	<20040216105830.0a2bf002.pcmcia@externe.net>
Message-ID: <200402161726.42951.daniel.ritz@gmx.ch>

hi

On Monday 16 February 2004 10:58, Guylhem Aznar wrote:
...
> Some information: Using the latest init.d/pcmcia on 2.4+i82365 , I do have the
> same bug I get with kernel 2.6
> I've been trying various stuff (boot time options, with/without bios "Os support
> PnP" option, etc) because I just couldn't make pcmcia in 2.4 work as it did.
> Looks like an update of the pcmcia-cs tools, most specifically the boot script,
> caused the problem.
> 
> Kernel messages with new (broken) pcmcia script:
> Linux PCMCIA Card Services 3.2.5
>   kernel build: 2.4.21-guylhem #6 Mon Sep 29 20:34:41 CEST 2003
>   options:  [pci] [cardbus] [apm] [pnp]
> PnP: PNP BIOS installation structure at 0xc00f6c00
> PnP: PNP BIOS version 1.0, entry at f0000:5b64, dseg at f0000
> Intel ISA/PCI/CardBus PCIC probe:
>   TI 1410 rev 01 PCI-to-CardBus at slot 00:05, mem 0x1e000000
>     host opts [0]: [serial pci & irq] [pci irq 5] [lat 168/176] [bus 2/5]
>     PCI irq 5 test failed
>     ISA irqs (scanned) = none!<6>    *NO* card interrupts, polling interval = 10
> 00 ms
> cs: memory probe 0xa0000000-0xa0ffffff: clean.
> orinoco.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
> orinoco_cs.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
> cs: IO port probe 0x0100-0x04ff: excluding 0x3c0-0x3e7
> cs: IO port probe 0x0800-0x08ff: clean.
> cs: IO port probe 0x0a00-0x0aff: clean.
> cs: IO port probe 0x0c00-0x0cff: clean.
> orinoco_cs: RequestIRQ: Resource in use
> 
> With old script:
> 
> Linux PCMCIA Card Services 3.2.5
>   kernel build: 2.4.21-guylhem #2 Tue Sep 9 15:02:11 CEST 2003
>   options:  [pci] [cardbus] [apm]
> Intel ISA/PCI/CardBus PCIC probe:
>   TI 1410 rev 01 PCI-to-CardBus at slot 00:05, mem 0x1e000000
>     host opts [0]: [pci only] [pci irq 5] [lat 168/176] [bus 2/5]
>     PCI card interrupts, PCI status changes
> cs: memory probe 0xa0000000-0xa0ffffff: clean.
> orinoco.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
> orinoco_cs.c 0.13e (David Gibson <hermes@gibson.dropbear.id.au> and others)
> cs: IO port probe 0x0100-0x04ff: excluding 0x180-0x187 0x290-0x297 0x3c0-0x3df 0
> x480-0x48f 0x4d0-0x4d7
> cs: IO port probe 0x0800-0x08ff: clean.
> cs: IO port probe 0x0a00-0x0aff: clean.
> cs: IO port probe 0x0c00-0x0cff: clean.
> eth1: Station identity 001f:0002:0002:0001
> eth1: Looks like a Symbol firmware version [V2.50-13] (parsing to 25013)
> eth1: Ad-hoc demo mode supported
> eth1: IEEE standard IBSS ad-hoc mode supported
> eth1: WEP supported, 104-bit key
> eth1: MAC address 00:02:B3:06:00:B8
> eth1: Station name "Prism  I"
> eth1: firmware ALLOC bug detected (old Symbol firmware?). Trying to work
> around... ok.
> eth1: ready
> eth1: index 0x01: Vcc 5.0, irq 5, io 0x0100-0x0147
> eth1: New link status: Connected (0001)
> 

ok, the main difference here:
new:
       host opts [0]: [serial pci & irq] [pci irq 5] [lat 168/176] [bus 2/5]
but with the old script:
       host opts [0]: [pci only] [pci irq 5] [lat 168/176] [bus 2/5]

so it messes around with some options. the main difference between old
and new script:

the old one uses /etc/default/pcmcia, the new one uses /etc/pcmcia.conf
for the options like PCIC, PCIC_OPTS, ...
so the difference should be there...
try 
  cp /etc/pcmcia.conf /etc/pcmcia.conf.old
  cp /etc/default/pcmcia /etc/pcmcia.conf

or even rename those file so they are not found by the init script


> > you have two probles here: for one, there are no ISA interrupts available...
> 
> Looks like the card is very happy with a PCI irq. I'd like to enable ISA irq for
> modems and other pcmcia cards however.
> 
> > second, you have a TI cardbus bridge that forgets to route the interrupts
> > from the card to the PCI bus...so your card only works when there are
> > interrupts on the same line as the interrupt handler of the card is
> > registered...
> 
> There should be *many* interrupts available. Uncommending the "excludes" in
> config.opts didn't help.
> 
> 2.6 interrupts
>            CPU0       
>   0:     932315          XT-PIC  timer
>   2:          0          XT-PIC  cascade
>   5:          0          XT-PIC  acpi
>   8:          4          XT-PIC  rtc
>   9:         47          XT-PIC  eth0
>  10:          0          XT-PIC  Trident Audio
>  11:      22866          XT-PIC  yenta, ohci_hcd, ohci_hcd, orinoco_cs
>  14:       7407          XT-PIC  ide0
>  15:         36          XT-PIC  ide1
> NMI:          0 
> LOC:     932216 
> ERR:          0
> MIS:          0
> 
> I guess it leaves 1 2 3 4 6 7 12 13

yenta probes for 3,4,5,6,7,9,10,11

> 
> 2.4 interrupts
>            CPU0       
>   0:     454008          XT-PIC  timer
>   1:          4          XT-PIC  keyboard
>   2:          0          XT-PIC  cascade
>   5:       1387          XT-PIC  acpi, i82365, orinoco_cs
>   8:          4          XT-PIC  rtc
>   9:         59          XT-PIC  eth0
>  10:        159          XT-PIC  Trident Audio
>  11:      18196          XT-PIC  usb-ohci, usb-ohci
>  14:      28940          XT-PIC  ide0
>  15:          2          XT-PIC  ide1
> NMI:          0 
> ERR:          0
> 
> I've no parallel port (disabled in the bios) and only 1 serial port which I can
> also disable. There are only 2 cards in the machine : a pcmcia-pci and a
> winmodem-pci (worthless but close a hole - I've lost the slot covert :-) The
> machine is a so-called "legacy free" so I can also remove PS/2 support  (I've a
> USB keyboard and mouse)
> 
> I'm now wondering why it can't use these free IRQ. On the PCMCIA-HOWTO I've read
> /proc/interrupts didn't help, but I guess at least IRQ 7 (disabled in the bios!)
> should be available !
> 

yenta probes the interrupts but none of them is working. this is because the
cardbus bridge doesn't know how to deliver the interrupts. why? it has some
registers wrongly programmed. the notebook manufacter screwed it up....

> Best regards,
> Guylhem
> 

rgds
-daniel


From pcmcia at externe.net  Mon Feb 16 19:01:50 2004
From: pcmcia at externe.net (Guylhem Aznar)
Date: Mon Feb 16 18:03:11 2004
Subject: strange strange 2.6.2 bug - pcmcia sleeps until I move the
 mouse ?!
In-Reply-To: <200402161726.42951.daniel.ritz@gmx.ch>
References: <200402121622.40572.daniel.ritz@gmx.ch>
	<20040216105830.0a2bf002.pcmcia@externe.net>
	<200402161726.42951.daniel.ritz@gmx.ch>
Message-ID: <20040216190150.643193c9.pcmcia@externe.net>

Hello,

On Mon, 16 Feb 2004 17:26:42 +0100
Daniel Ritz <daniel.ritz@gmx.ch> wrote:
> the old one uses /etc/default/pcmcia, the new one uses /etc/pcmcia.conf

Oops. Stupid me. I didn't look inside the options file. And indeed there's
PCIC_OPTS=irq_mode=0 pci_csc=0 poll_interval=100

> > I guess it leaves 1 2 3 4 6 7 12 13
> 
> yenta probes for 3,4,5,6,7,9,10,11

Which .h files defines the probed IRQs? Maybe more could be scanned, or the IRQ
could be forced?

> yenta probes the interrupts but none of them is working. this is because the
> cardbus bridge doesn't know how to deliver the interrupts. why? it has some
> registers wrongly programmed. the notebook manufacter screwed it up....

It's a standard Elan p311 http://www.elandigitalsystems.com/adapter/p311.php
which is reported  to work fine under linux. After some googling (elan isa irq
linux) I found http://www.elandigitalsystems.com/support/pfaq/plinux.php - ah ha
*they* have a problem.

I guess I can say goodbye to standard support.

-- 
*@externe.net ![guylhem@oeil.qc.ca->@metalab.unc.edu->@ibiblio.org->@7un.org]
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey


From rmk+pcmcia at arm.linux.org.uk  Mon Feb 16 19:12:40 2004
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Mon Feb 16 19:12:49 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the
	mouse ?!
In-Reply-To: <20040211223421.670eaece.pcmcia@externe.net>;
	from pcmcia@externe.net on Wed, Feb 11, 2004 at 10:34:21PM +0100
References: <20040209173552.6fe9e27f.pcmcia@externe.net>
	<20040209093555.B9449@sonic.net> <20040210125933.36552e22.athome@externe.net>
	<20040210104708.A15974@sonic.net> <20040211223421.670eaece.pcmcia@externe.net>
Message-ID: <20040216191239.B6046@flint.arm.linux.org.uk>

On Wed, Feb 11, 2004 at 10:34:21PM +0100, Guylhem Aznar wrote:
> It does - moving the mouse or the keyboard does nothing. Now I have to play
> music to make my pcmcia wifi card work (?)
> The irq mask is identical :

It may be a good idea to try what the kernel is suggesting.

> PCI: Probing PCI hardware
> PCI: Using IRQ router SIS [1039/0008] at 0000:00:01.0
> PCI: IRQ 0 for device 0000:00:05.0 doesn't match PIRQ mask - try pci=usepirqmask
                                                                   ^^^^^^^^^^^^^^^

> PCI: Enabling device 0000:00:05.0 (0000 -> 0002)
> PCI: IRQ 0 for device 0000:00:05.0 doesn't match PIRQ mask - try pci=usepirqmask
                                                                   ^^^^^^^^^^^^^^^
> PCI: Assigned IRQ 10 for device 0000:00:05.0
> Yenta: CardBus bridge found at 0000:00:05.0 [0000:0000]
> Yenta: Enabling burst memory read transactions
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta: ISA IRQ mask 0x0000, PCI irq 10

and see if that improves the situation.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From pcmcia at externe.net  Tue Feb 17 11:37:49 2004
From: pcmcia at externe.net (Guylhem Aznar)
Date: Tue Feb 17 10:47:37 2004
Subject: strange strange 2.6.2 bug - pcmcia  sleeps until I move the
 mouse ?!
In-Reply-To: <20040216191239.B6046@flint.arm.linux.org.uk>
References: <20040209173552.6fe9e27f.pcmcia@externe.net>
	<20040209093555.B9449@sonic.net>
	<20040210125933.36552e22.athome@externe.net>
	<20040210104708.A15974@sonic.net>
	<20040211223421.670eaece.pcmcia@externe.net>
	<20040216191239.B6046@flint.arm.linux.org.uk>
Message-ID: <20040217113749.3d1698c8.pcmcia@externe.net>

Hello,

On Mon, 16 Feb 2004 19:12:40 +0000
Russell King <rmk+pcmcia@arm.linux.org.uk> wrote:

> On Wed, Feb 11, 2004 at 10:34:21PM +0100, Guylhem Aznar wrote:
> > pci=usepirqmask
> 
> and see if that improves the situation

Didn't help.

Bien a vous - Best regards,
Guylhem


-- 
*@externe.net ![guylhem@oeil.qc.ca->@metalab.unc.edu->@ibiblio.org->@7un.org]
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey


From mymail7799 at yahoo.com  Wed Feb 18 18:14:24 2004
From: mymail7799 at yahoo.com (Dan Baryon)
Date: Wed Feb 18 09:14:48 2004
Subject: 32bit Cardbus CF adaptor
Message-ID: <40332CF0.6080809@yahoo.com>

Hello,

Delkin (http://www.delkin.com/cardbus.htm) is selling a 32bit Cardbus
adaptor for compact flash disk. It claims huge performace increase compared
to 16bit adaptors. Would this adaptor work with linux? Thanks.



From magikor at msn.com  Wed Feb 18 20:58:15 2004
From: magikor at msn.com (Magikor)
Date: Wed Feb 18 12:57:38 2004
Subject: PCMCIA GPRS cards not works,help...
Message-ID: <BAY5-DAV1310mJWEsBk000000e0@hotmail.com>

Hi,
I have a PCMCIA GPRS card,but when I insert it to my machine(Based on PXA255,linux-2.4.18-rmk7-pxa3)it appears two serial ports,so strange,can anyone give me a hand?
In order to avoid the "Bad Vcc" error,I have delete the two lines in cs.c
/*
    if (s->socket.Vcc != req->Vcc)
	return CS_BAD_VCC;
*/
Following is the detail debug info:

----s->socket.Vcc=33,	req->Vcc=50------
------<6>ttyS03 at port 0xf60003f8 (irq = 46) is a 16C950/954
ttyS04 at port 0xf6000400 (irq = 46) is a 16C950/954
Division by zero in kernel.
..................................................
---Send msg CFChanged()---
Division by zero in kernel.
...............................................


#/proc/bus/pccard/00>cardctl ident
Socket 0:
  product info: "GPRS Modem", "", "", ""
  manfid: 0x0279, 0x950b
  function: 2 (serial)
#/proc/bus/pccard/00>
#/proc/bus/pccard/00>
#/proc/bus/pccard/00>cardctl status
Socket 0:
  3.3V 16-bit PC Card
  function 0: [ready], [bat dead], [bat low]
#/proc/bus/pccard/00>
#/proc/bus/pccard/00>
#/proc/bus/pccard/00>cardctl config
Socket 0:
  Vcc 5.0V  Vpp1 0.0V  Vpp2 0.0V
  interface type is "memory and I/O"
  irq 46 [exclusive] [level]
  Speaker output is enabled
  function 0:
    config base 0x00f8
      option 0x41 status 0x08 pin 0x00 copy 0x00
    io 0xf60003f8-0xf6000407 [8bit]
#/proc/bus/pccard/00>
#/proc/bus/pccard/00>

#/root>cd /var/run/
#/var/run>cat stab 
Socket 0: Serial or Modem
0	serial	serial_cs	0	ttyS3	4	67
0	serial	serial_cs	1	ttyS4	4	68
#/var/run>cd /proc/bus/pccard/
#/proc/bus/pccard>cat drivers 
serial_cs                1 1
ide-cs                   1 0
#/proc/bus/pccard>cd 00
#/proc/bus/pccard/00>cat status 
k_flags  : detect ready bvd1 bvd2 vs_3v 
status   : SS_DETECT SS_READY SS_POWERON SS_IOCARD SS_STSCHG SS_3VCARD 
mask     : SS_DETECT 
cs_flags : SS_IOCARD SS_SPKR_ENA SS_OUTPUT_ENA 
Vcc      : 33
Vpp      : 0
irq      : 46
I/O      : 165 (180)
attribute: 300 (301)
common   : 150 (150)
#/proc/bus/pccard/00>
#/proc/bus/pccard/00>
#/proc/bus/pccard/00>

#/proc>cd /proc/tty/driver
#/proc/tty/driver>cat serial
serinfo:1.0 driver:5.05c revision:2001-07-08
0: uart:PXA UART port:0 irq:14
1: uart:PXA UART port:0 irq:13
2: uart:PXA UART port:0 irq:12
3: uart:16C950/954 port:F60003F8 irq:46 tx:0 rx:0 CTS
4: uart:16C950/954 port:F6000400 irq:46 tx:0 rx:0 CTS
5: uart:unknown port:0 irq:0
6: uart:unknown port:0 irq:0
7: uart:unknown port:0 irq:0
#/proc/tty/driver>
#/proc/tty/driver>

Best regards
Magikor




From proski at gnu.org  Wed Feb 18 18:44:50 2004
From: proski at gnu.org (Pavel Roskin)
Date: Wed Feb 18 23:44:56 2004
Subject: 32bit Cardbus CF adaptor
In-Reply-To: <40332CF0.6080809@yahoo.com>
References: <40332CF0.6080809@yahoo.com>
Message-ID: <Pine.LNX.4.58.0402181832500.2944@marabou.research.att.com>

On Wed, 18 Feb 2004, Dan Baryon wrote:

> Hello,
>
> Delkin (http://www.delkin.com/cardbus.htm) is selling a 32bit Cardbus
> adaptor for compact flash disk. It claims huge performace increase compared
> to 16bit adaptors. Would this adaptor work with linux? Thanks.

It's not just for CompactFlash, it's also for Secure Digital and Memory
Stick.  Note that they refer to it as a reader.  Obviously it's not a
generic bridge.

The Windows driver contains many references to SCSI, which only confirms
that the card is seen as a disk, not as a PCMCIA bridge.

It may have a supported SCSI chip, but it's more likely that you'll have
to write a SCSI driver for it.

-- 
Regards,
Pavel Roskin

From proski at gnu.org  Wed Feb 18 18:59:05 2004
From: proski at gnu.org (Pavel Roskin)
Date: Wed Feb 18 23:59:10 2004
Subject: 32bit Cardbus CF adaptor
In-Reply-To: <Pine.LNX.4.58.0402181832500.2944@marabou.research.att.com>
References: <40332CF0.6080809@yahoo.com>
	<Pine.LNX.4.58.0402181832500.2944@marabou.research.att.com>
Message-ID: <Pine.LNX.4.58.0402181856001.3352@marabou.research.att.com>

On Wed, 18 Feb 2004, Pavel Roskin wrote:

> The Windows driver contains many references to SCSI, which only confirms
> that the card is seen as a disk, not as a PCMCIA bridge.
>
> It may have a supported SCSI chip, but it's more likely that you'll have
> to write a SCSI driver for it.

Sorry, I looked in cf32ax.inf again, at it appears that some references to
SCSI are commented out and replaces with ATA.  So it may be an ATA
adaptor, which are supported.  Chances are much better in this case.
Even it it doesn't work out of box, all necessary code is already in the
kernel, you'll just need to add some IDs to the tables of supported
devices.

-- 
Regards,
Pavel Roskin

From dhinds at sonic.net  Wed Feb 18 16:22:53 2004
From: dhinds at sonic.net (David Hinds)
Date: Thu Feb 19 00:23:04 2004
Subject: 32bit Cardbus CF adaptor
In-Reply-To: <Pine.LNX.4.58.0402181856001.3352@marabou.research.att.com>
References: <40332CF0.6080809@yahoo.com>
	<Pine.LNX.4.58.0402181832500.2944@marabou.research.att.com>
	<Pine.LNX.4.58.0402181856001.3352@marabou.research.att.com>
Message-ID: <20040219002253.GA27305@sonic.net>

On Wed, Feb 18, 2004 at 06:59:05PM -0500, Pavel Roskin wrote:
> On Wed, 18 Feb 2004, Pavel Roskin wrote:
> 
> > The Windows driver contains many references to SCSI, which only confirms
> > that the card is seen as a disk, not as a PCMCIA bridge.
> >
> > It may have a supported SCSI chip, but it's more likely that you'll have
> > to write a SCSI driver for it.
> 
> Sorry, I looked in cf32ax.inf again, at it appears that some
> references to SCSI are commented out and replaces with ATA.  So it
> may be an ATA adaptor, which are supported.  Chances are much better
> in this case.

That would certainly make more sense, since compact flash devices are
just ATA/IDE devices.

-- Dave

From mymail7799 at yahoo.com  Thu Feb 19 13:22:30 2004
From: mymail7799 at yahoo.com (Dan Baryon)
Date: Thu Feb 19 04:22:59 2004
Subject: 32bit Cardbus CF adaptor
Message-ID: <40343A06.4070606@yahoo.com>

Thanks a lot. I will get one and try.
The adaptor is in fact developed by ASKA corp in Japan, and there is
a little more information on the site 
(http://www.aska-corp.co.jp/oem/e-pro-top.htm)


--- Pavel Roskin <proski@gnu.org> wrote:
 > On Wed, 18 Feb 2004, Pavel Roskin wrote:
 >
 > > The Windows driver contains many references to
 > SCSI, which only confirms
 > > that the card is seen as a disk, not as a PCMCIA
 > bridge.
 > >
 > > It may have a supported SCSI chip, but it's more
 > likely that you'll have
 > > to write a SCSI driver for it.
 >
 > Sorry, I looked in cf32ax.inf again, at it appears
 > that some references to
 > SCSI are commented out and replaces with ATA.  So it
 > may be an ATA
 > adaptor, which are supported.  Chances are much
 > better in this case.
 > Even it it doesn't work out of box, all necessary
 > code is already in the
 > kernel, you'll just need to add some IDs to the
 > tables of supported
 > devices.
 >


From magikor at msn.com  Thu Feb 19 17:29:39 2004
From: magikor at msn.com (Magikor)
Date: Thu Feb 19 09:28:53 2004
Subject: PCMCIA GPRS cards not works,help...
Message-ID: <BAY5-DAV108tS0B7H87000084ca@hotmail.com>

Does anyone know the reason?
Please help me,thanks a lot!
>Hi,
>I have a PCMCIA GPRS card,but when I insert it to my machine(Based on PXA255,linux-2.4.18-rmk7-pxa3)it appears two serial ports,so strange,can anyone give me a hand?
>In order to avoid the "Bad Vcc" error,I have delete the two lines in cs.c
>/*
>    if (s->socket.Vcc != req->Vcc)
>	return CS_BAD_VCC;
>*/
>Following is the detail debug info:
>
>----s->socket.Vcc=33,	req->Vcc=50------
>------<6>ttyS03 at port 0xf60003f8 (irq = 46) is a 16C950/954
>ttyS04 at port 0xf6000400 (irq = 46) is a 16C950/954
>Division by zero in kernel.
>.................................................
>---Send msg CFChanged()---
>Division by zero in kernel.
>..............................................
>
>
>#/proc/bus/pccard/00>cardctl ident
>Socket 0:
>  product info: "GPRS Modem", "", "", ""
>  manfid: 0x0279, 0x950b
>  function: 2 (serial)
>#/proc/bus/pccard/00>
>#/proc/bus/pccard/00>
>#/proc/bus/pccard/00>cardctl status
>Socket 0:
>  3.3V 16-bit PC Card
>  function 0: [ready], [bat dead], [bat low]
>#/proc/bus/pccard/00>
>#/proc/bus/pccard/00>
>#/proc/bus/pccard/00>cardctl config
>Socket 0:
>  Vcc 5.0V  Vpp1 0.0V  Vpp2 0.0V
>  interface type is "memory and I/O"
>  irq 46 [exclusive] [level]
>  Speaker output is enabled
>  function 0:
>    config base 0x00f8
>      option 0x41 status 0x08 pin 0x00 copy 0x00
>    io 0xf60003f8-0xf6000407 [8bit]
>#/proc/bus/pccard/00>
>#/proc/bus/pccard/00>
>
>#/root>cd /var/run/
>#/var/run>cat stab 
>Socket 0: Serial or Modem
>0	serial	serial_cs	0	ttyS3	4	67
>0	serial	serial_cs	1	ttyS4	4	68
>#/var/run>cd /proc/bus/pccard/
>#/proc/bus/pccard>cat drivers 
>serial_cs                1 1
>ide-cs                   1 0
>#/proc/bus/pccard>cd 00
>#/proc/bus/pccard/00>cat status 
>k_flags  : detect ready bvd1 bvd2 vs_3v 
>status   : SS_DETECT SS_READY SS_POWERON SS_IOCARD SS_STSCHG SS_3VCARD 
>mask     : SS_DETECT 
>cs_flags : SS_IOCARD SS_SPKR_ENA SS_OUTPUT_ENA 
>Vcc      : 33
>Vpp      : 0
>irq      : 46
>I/O      : 165 (180)
>attribute: 300 (301)
>common   : 150 (150)
>#/proc/bus/pccard/00>
>#/proc/bus/pccard/00>
>#/proc/bus/pccard/00>
>
>#/proc>cd /proc/tty/driver
>#/proc/tty/driver>cat serial
>serinfo:1.0 driver:5.05c revision:2001-07-08
>0: uart:PXA UART port:0 irq:14
>1: uart:PXA UART port:0 irq:13
>2: uart:PXA UART port:0 irq:12
>3: uart:16C950/954 port:F60003F8 irq:46 tx:0 rx:0 CTS
>4: uart:16C950/954 port:F6000400 irq:46 tx:0 rx:0 CTS
>5: uart:unknown port:0 irq:0
>6: uart:unknown port:0 irq:0
>7: uart:unknown port:0 irq:0
>#/proc/tty/driver>
>#/proc/tty/driver>
>
>Best regards
>Magikor
>
>
>
>
>_______________________________________________
>Linux PCMCIA reimplementation list
>http://lists.infradead.org/mailman/listinfo/linux-pcmcia
>.




From linux at arm.linux.org.uk  Thu Feb 19 09:58:01 2004
From: linux at arm.linux.org.uk (Russell King - ARM Linux)
Date: Thu Feb 19 09:58:09 2004
Subject: PCMCIA GPRS cards not works,help...
In-Reply-To: <BAY5-DAV108tS0B7H87000084ca@hotmail.com>;
	from magikor@msn.com on Thu, Feb 19, 2004 at 05:29:39PM +0800
References: <BAY5-DAV108tS0B7H87000084ca@hotmail.com>
Message-ID: <20040219095801.B7051@flint.arm.linux.org.uk>

On Thu, Feb 19, 2004 at 05:29:39PM +0800, Magikor wrote:
> Does anyone know the reason?
> Please help me,thanks a lot!

You're being rather impatient.  I haven't had a chance to look into this
at all yet.  Not everyone lives in your time zone.

It is known that the Linux PCMCIA subsystem does not support changing the
Vcc supplied to the card after the card has been initially powered up.  To
do so requires the card to first be powered down and then re-powered with
the new Vcc.

It would also appear that some PCMCIA cards report (via the hardware) that
they're 3.3V cards, but then in the CIS indicate they're 5V cards - in
other words, the usual good old quality you come to expect.

That said, commenting out that check is almost certainly wrong.  You need
to forcing req->Vcc to be the same as s->socket to ensure that we don't do
something Bad(tm).

> >----s->socket.Vcc=33,	req->Vcc=50------
> >------<6>ttyS03 at port 0xf60003f8 (irq = 46) is a 16C950/954
> >ttyS04 at port 0xf6000400 (irq = 46) is a 16C950/954
> >Division by zero in kernel.
> >.................................................
> >---Send msg CFChanged()---
> >Division by zero in kernel.

I'd suggest finding this message (its in arch/arm/kernel/*.c somewhere) and
adding a __backtrace() immediately after its printk.

From stefan.thomasson at possio.com  Thu Feb 19 11:36:10 2004
From: stefan.thomasson at possio.com (Stefan Thomasson)
Date: Thu Feb 19 10:29:30 2004
Subject: PCMCIA GPRS cards not works,help...
References: <BAY5-DAV108tS0B7H87000084ca@hotmail.com>
	<20040219095801.B7051@flint.arm.linux.org.uk>
Message-ID: <4034919A.E9A519A1@possio.com>



Russell King - ARM Linux wrote:
> 
> On Thu, Feb 19, 2004 at 05:29:39PM +0800, Magikor wrote:
> 
> > >----s->socket.Vcc=33,        req->Vcc=50------
> > >------<6>ttyS03 at port 0xf60003f8 (irq = 46) is a 16C950/954
> > >ttyS04 at port 0xf6000400 (irq = 46) is a 16C950/954
> > >Division by zero in kernel.
> > >.................................................
> > >---Send msg CFChanged()---
> > >Division by zero in kernel.
> 
> I'd suggest finding this message (its in arch/arm/kernel/*.c somewhere) and
> adding a __backtrace() immediately after its printk.
> 


Try to set baud_base with setserial twice.
If the second succeeds its due to baud_base is zero which
change_speed() does not check before dividing.

I dont think serial_cs is able to pass such information to higher
layers.

Maybe thats one of the reasons arch-sa1100/serial.h has a couple of
predefined 
serialports and arch-pxa/serial.h only has the internal ports defined?

From dhinds at sonic.net  Thu Feb 19 13:20:08 2004
From: dhinds at sonic.net (David Hinds)
Date: Thu Feb 19 21:20:21 2004
Subject: PCMCIA GPRS cards not works,help...
In-Reply-To: <20040219095801.B7051@flint.arm.linux.org.uk>
References: <BAY5-DAV108tS0B7H87000084ca@hotmail.com>
	<20040219095801.B7051@flint.arm.linux.org.uk>
Message-ID: <20040219212008.GD1819@sonic.net>

On Thu, Feb 19, 2004 at 09:58:01AM +0000, Russell King - ARM Linux wrote:
> On Thu, Feb 19, 2004 at 05:29:39PM +0800, Magikor wrote:
> > Does anyone know the reason?
> > Please help me,thanks a lot!
> 
> You're being rather impatient.  I haven't had a chance to look into this
> at all yet.  Not everyone lives in your time zone.
> 
> It is known that the Linux PCMCIA subsystem does not support changing the
> Vcc supplied to the card after the card has been initially powered up.  To
> do so requires the card to first be powered down and then re-powered with
> the new Vcc.

Right, basically, you should never change the card voltage.

The original problem implies use of an old version of serial_cs; prior
to 2.4.21, serial_cs assumed 5V for multiport cards.  Yes this is not
a multiport card... however it is asking for 16 IO ports, which
serial_cs interprets as meaning this is a dual port card.

There are a couple checks in serial_cs for specific card types that
are incorrectly detected as dual-port.  It sounds like a new one needs
to be added for this card.

I don't know about the division-by-zero thing.

-- Dave

From rmk+pcmcia at arm.linux.org.uk  Sat Feb 21 21:20:13 2004
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Sat Feb 21 21:20:26 2004
Subject: [CFT] 1/2 Overhaul PCMCIA debugging
Message-ID: <20040221212013.A10092@flint.arm.linux.org.uk>

Hi,

The attached patch overhauls (and fixes) PCMCIA debugging:

- introduce cs_debug_level() so we don't have to export pc_debug
  from cs.c.
- use socket->dev.class_id rather than the address of socket as an
  identifier.
- use module_param() for pc_debug variable - this now means that
  socket drivers can be built in, and debugging enabled via:

	pcmcia_core.pc_debug=n
	ds.pc_debug=n
	sa11xx_core.pc_debug=n
	tcic.pc_debug=n

  etc

- pc_debug from modules works as expected
- make PCMCIA core errors reflect the same format as the debugging
  messages, and use cs_err() to report them.

The patch is rather large, so I've split it in two.  First, the core
changes, then the socket drivers.  Even so, the two are a little
unseparable because au1000 uses the PCMCIA core debugging macros. ;(

diff -urpN orig/drivers/pcmcia/bulkmem.c linux/drivers/pcmcia/bulkmem.c
--- orig/drivers/pcmcia/bulkmem.c	Wed Feb 18 22:34:34 2004
+++ linux/drivers/pcmcia/bulkmem.c	Sat Feb 21 19:21:45 2004
@@ -48,6 +48,8 @@
 #include <pcmcia/cistpl.h>
 #include "cs_internal.h"
 
+static void retry_erase_list(erase_busy_t *list, u_int cause);
+
 /*======================================================================
 
     This function handles submitting an MTD request, and retrying
@@ -108,18 +110,18 @@ static int do_mtd_request(memory_handle_
 
 ======================================================================*/
 
-static void insert_queue(erase_busy_t *head, erase_busy_t *entry)
+static void insert_queue(struct pcmcia_socket *s, erase_busy_t *head, erase_busy_t *entry)
 {
-    DEBUG(2, "cs: adding 0x%p to queue 0x%p\n", entry, head);
+    cs_dbg(s, 2, "adding 0x%p to queue 0x%p\n", entry, head);
     entry->next = head;
     entry->prev = head->prev;
     head->prev->next = entry;
     head->prev = entry;
 }
 
-static void remove_queue(erase_busy_t *entry)
+static void remove_queue(struct pcmcia_socket *s, erase_busy_t *entry)
 {
-    DEBUG(2, "cs: unqueueing 0x%p\n", entry);
+    cs_dbg(s, 2, "unqueueing 0x%p\n", entry);
     entry->next->prev = entry->prev;
     entry->prev->next = entry->next;
 }
@@ -132,34 +134,35 @@ static void retry_erase(erase_busy_t *bu
     struct pcmcia_socket *s;
     int ret;
 
-    DEBUG(2, "cs: trying erase request 0x%p...\n", busy);
+    mtd = erase->Handle->mtd;
+    s = SOCKET(mtd);
+
+    cs_dbg(s, 2, "trying erase request 0x%p...\n", busy);
     if (busy->next)
-	remove_queue(busy);
+	remove_queue(s, busy);
     req.Function = MTD_REQ_ERASE | cause;
     req.TransferLength = erase->Size;
     req.DestCardOffset = erase->Offset + erase->Handle->info.CardOffset;
     req.MediaID = erase->Handle->MediaID;
-    mtd = erase->Handle->mtd;
-    s = SOCKET(mtd);
     mtd->event_callback_args.mtdrequest = &req;
     ret = EVENT(mtd, CS_EVENT_MTD_REQUEST, CS_EVENT_PRI_LOW);
     if (ret == CS_BUSY) {
-	DEBUG(2, "  Status = %d, requeueing.\n", req.Status);
+	cs_dbg(s, 2, "  Status = %d, requeueing.\n", req.Status);
 	switch (req.Status) {
 	case MTD_WAITREQ:
 	case MTD_WAITPOWER:
-	    insert_queue(&mtd->erase_busy, busy);
+	    insert_queue(s, &mtd->erase_busy, busy);
 	    break;
 	case MTD_WAITTIMER:
 	case MTD_WAITRDY:
 	    if (req.Status == MTD_WAITRDY)
-		insert_queue(&s->erase_busy, busy);
+		insert_queue(s, &s->erase_busy, busy);
 	    mod_timer(&busy->timeout, jiffies + req.Timeout*HZ/1000);
 	    break;
 	}
     } else {
 	/* update erase queue status */
-	DEBUG(2, "  Ret = %d\n", ret);
+	cs_dbg(s, 2, "  Ret = %d\n", ret);
 	switch (ret) {
 	case CS_SUCCESS:
 	    erase->State = ERASE_PASSED; break;
@@ -183,11 +186,11 @@ static void retry_erase(erase_busy_t *bu
     }
 } /* retry_erase */
 
-void retry_erase_list(erase_busy_t *list, u_int cause)
+static void retry_erase_list(erase_busy_t *list, u_int cause)
 {
     erase_busy_t tmp = *list;
 
-    DEBUG(2, "cs: rescanning erase queue list 0x%p\n", list);
+    cs_dbg(SOCKET(list->client), 2, "rescanning erase queue list 0x%p\n", list);
     if (list->next == list)
 	return;
     /* First, truncate the original list */
@@ -204,8 +207,9 @@ void retry_erase_list(erase_busy_t *list
 
 static void handle_erase_timeout(u_long arg)
 {
-    DEBUG(0, "cs: erase timeout for entry 0x%lx\n", arg);
-    retry_erase((erase_busy_t *)arg, MTD_REQ_TIMEOUT);
+    erase_busy_t *busy = (erase_busy_t *)arg;
+    cs_dbg(SOCKET(busy->client), 0, "erase timeout for entry 0x%lx\n", arg);
+    retry_erase(busy, MTD_REQ_TIMEOUT);
 }
 
 static void setup_erase_request(client_handle_t handle, eraseq_entry_t *erase)
@@ -333,8 +337,8 @@ static void setup_regions(client_handle_
     cistpl_device_geo_t geo;
     memory_handle_t r;
 
-    DEBUG(1, "cs: setup_regions(0x%p, %d, 0x%p)\n",
-	  handle, attr, list);
+    cs_dbg(SOCKET(handle), 1, "setup_regions(0x%p, %d, 0x%p)\n",
+	   handle, attr, list);
 
     code = (attr) ? CISTPL_DEVICE_A : CISTPL_DEVICE;
     if (read_tuple(handle, code, &device) != CS_SUCCESS)
@@ -342,17 +346,13 @@ static void setup_regions(client_handle_
     code = (attr) ? CISTPL_JEDEC_A : CISTPL_JEDEC_C;
     has_jedec = (read_tuple(handle, code, &jedec) == CS_SUCCESS);
     if (has_jedec && (device.ndev != jedec.nid)) {
-#ifdef PCMCIA_DEBUG
-	printk(KERN_DEBUG "cs: Device info does not match JEDEC info.\n");
-#endif
+	cs_dbg(SOCKET(handle), 0, "Device info does not match JEDEC info.\n");
 	has_jedec = 0;
     }
     code = (attr) ? CISTPL_DEVICE_GEO_A : CISTPL_DEVICE_GEO;
     has_geo = (read_tuple(handle, code, &geo) == CS_SUCCESS);
     if (has_geo && (device.ndev != geo.ngeo)) {
-#ifdef PCMCIA_DEBUG
-	printk(KERN_DEBUG "cs: Device info does not match geometry tuple.\n");
-#endif
+	cs_dbg(SOCKET(handle), 0, "Device info does not match geometry tuple.\n");
 	has_geo = 0;
     }
     
@@ -458,7 +458,7 @@ int pcmcia_register_mtd(client_handle_t 
 	list = s->a_region;
     else
 	list = s->c_region;
-    DEBUG(1, "cs: register_mtd(0x%p, '%s', 0x%x)\n",
+    cs_dbg(s, 1, "register_mtd(0x%p, '%s', 0x%x)\n",
 	  handle, handle->dev_info, reg->Offset);
     while (list) {
 	if (list->info.CardOffset == reg->Offset) break;
@@ -548,8 +548,8 @@ int pcmcia_open_memory(client_handle_t *
     }
     if (region && region->mtd) {
 	*mh = region;
-	DEBUG(1, "cs: open_memory(0x%p, 0x%x) = 0x%p\n",
-	      handle, open->Offset, region);
+	cs_dbg(s, 1, "open_memory(0x%p, 0x%x) = 0x%p\n",
+	       handle, open->Offset, region);
 	return CS_SUCCESS;
     } else
 	return CS_BAD_OFFSET;
@@ -565,7 +565,7 @@ int pcmcia_open_memory(client_handle_t *
 
 int pcmcia_close_memory(memory_handle_t handle)
 {
-    DEBUG(1, "cs: close_memory(0x%p)\n", handle);
+    cs_dbg(SOCKET(handle->mtd), 1, "cs: close_memory(0x%p)\n", handle);
     if (CHECK_REGION(handle))
 	return CS_BAD_HANDLE;
     return CS_SUCCESS;
diff -urpN orig/drivers/pcmcia/cardbus.c linux/drivers/pcmcia/cardbus.c
--- orig/drivers/pcmcia/cardbus.c	Sun Sep 28 09:54:57 2003
+++ linux/drivers/pcmcia/cardbus.c	Sat Feb 21 21:10:36 2004
@@ -58,10 +58,6 @@
 #include <pcmcia/cistpl.h>
 #include "cs_internal.h"
 
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-#endif
-
 /*====================================================================*/
 
 #define FIND_FIRST_BIT(n)	((n) - ((n) & ((n)-1)))
@@ -119,7 +115,7 @@ static u_int xlate_rom_addr(u_char * b, 
 static void cb_release_cis_mem(struct pcmcia_socket * s)
 {
 	if (s->cb_cis_virt) {
-		DEBUG(1, "cs: cb_release_cis_mem()\n");
+		cs_dbg(s, 1, "cb_release_cis_mem()\n");
 		iounmap(s->cb_cis_virt);
 		s->cb_cis_virt = NULL;
 		s->cb_cis_res = 0;
@@ -160,7 +156,7 @@ int read_cb_mem(struct pcmcia_socket * s
 	struct pci_dev *dev;
 	struct resource *res;
 
-	DEBUG(3, "cs: read_cb_mem(%d, %#x, %u)\n", space, addr, len);
+	cs_dbg(s, 3, "read_cb_mem(%d, %#x, %u)\n", space, addr, len);
 
 	dev = pci_find_slot(s->cb_dev->subordinate->number, 0);
 	if (!dev)
diff -urpN orig/drivers/pcmcia/cistpl.c linux/drivers/pcmcia/cistpl.c
--- orig/drivers/pcmcia/cistpl.c	Fri Jan  9 22:39:36 2004
+++ linux/drivers/pcmcia/cistpl.c	Sat Feb 21 19:21:45 2004
@@ -143,7 +143,7 @@ int read_cis_mem(struct pcmcia_socket *s
 {
     u_char *sys, *end, *buf = ptr;
     
-    DEBUG(3, "cs: read_cis_mem(%d, %#x, %u)\n", attr, addr, len);
+    cs_dbg(s, 3, "read_cis_mem(%d, %#x, %u)\n", attr, addr, len);
 
     if (attr & IS_INDIRECT) {
 	/* Indirect accesses use a bunch of special registers at fixed
@@ -195,7 +195,7 @@ int read_cis_mem(struct pcmcia_socket *s
 	    addr = 0;
 	}
     }
-    DEBUG(3, "cs:  %#2.2x %#2.2x %#2.2x %#2.2x ...\n",
+    cs_dbg(s, 3, "  %#2.2x %#2.2x %#2.2x %#2.2x ...\n",
 	  *(u_char *)(ptr+0), *(u_char *)(ptr+1),
 	  *(u_char *)(ptr+2), *(u_char *)(ptr+3));
     return 0;
@@ -206,7 +206,7 @@ void write_cis_mem(struct pcmcia_socket 
 {
     u_char *sys, *end, *buf = ptr;
     
-    DEBUG(3, "cs: write_cis_mem(%d, %#x, %u)\n", attr, addr, len);
+    cs_dbg(s, 3, "write_cis_mem(%d, %#x, %u)\n", attr, addr, len);
 
     if (attr & IS_INDIRECT) {
 	/* Indirect accesses use a bunch of special registers at fixed
@@ -578,8 +578,7 @@ int pcmcia_get_next_tuple(client_handle_
 	ofs += link[1] + 2;
     }
     if (i == MAX_TUPLES) {
-	DEBUG(1, "cs: overrun in pcmcia_get_next_tuple for socket %d\n",
-	      handle->Socket);
+	cs_dbg(s, 1, "cs: overrun in pcmcia_get_next_tuple\n");
 	return CS_NO_MORE_ITEMS;
     }
     
diff -urpN orig/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c
--- orig/drivers/pcmcia/cs.c	Thu Feb 19 14:33:40 2004
+++ linux/drivers/pcmcia/cs.c	Sat Feb 21 21:10:50 2004
@@ -32,6 +32,7 @@
 ======================================================================*/
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/config.h>
@@ -110,12 +111,17 @@ INT_MODULE_PARM(cis_speed,	300);		/* ns 
 /* Access speed for IO windows */
 INT_MODULE_PARM(io_speed,	0);		/* ns */
 
-#ifdef PCMCIA_DEBUG
-INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
-static const char *version =
-"cs.c 1.279 2001/10/13 00:08:28 (David Hinds)";
+#ifdef DEBUG
+static int pc_debug;
+
+module_param(pc_debug, int, 0644);
+
+int cs_debug_level(int level)
+{
+	return pc_debug > level;
+}
 #endif
- 
+
 /*====================================================================*/
 
 socket_state_t dead_socket = {
@@ -306,7 +312,7 @@ int pcmcia_register_socket(struct pcmcia
 	if (!socket || !socket->ops || !socket->dev.dev)
 		return -EINVAL;
 
-	DEBUG(0, "cs: pcmcia_register_socket(0x%p)\n", socket->ops);
+	cs_dbg(socket, 0, "pcmcia_register_socket(0x%p)\n", socket->ops);
 
 	/* try to obtain a socket number [yes, it gets ugly if we
 	 * register more than 2^sizeof(unsigned int) pcmcia 
@@ -377,7 +383,7 @@ void pcmcia_unregister_socket(struct pcm
 	if (!socket)
 		return;
 
-	DEBUG(0, "cs: pcmcia_unregister_socket(0x%p)\n", socket->ops);
+	cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops);
 
 	if (socket->thread) {
 		init_completion(&socket->thread_done);
@@ -443,7 +449,7 @@ static void shutdown_socket(struct pcmci
 {
     client_t **c;
     
-    DEBUG(1, "cs: shutdown_socket(%p)\n", s);
+    cs_dbg(s, 1, "shutdown_socket\n");
 
     /* Blank out the socket state */
     s->state &= SOCKET_PRESENT|SOCKET_INUSE;
@@ -499,8 +505,8 @@ static int send_event(struct pcmcia_sock
 {
     client_t *client = s->clients;
     int ret;
-    DEBUG(1, "cs: send_event(sock %d, event %d, pri %d)\n",
-	  s->sock, event, priority);
+    cs_dbg(s, 1, "send_event(event %d, pri %d)\n",
+	   event, priority);
     ret = 0;
     if (s->state & SOCKET_CARDBUS)
 	    return 0;
@@ -516,26 +522,14 @@ static int send_event(struct pcmcia_sock
     return ret;
 } /* send_event */
 
-static void pcmcia_error(struct pcmcia_socket *skt, const char *fmt, ...)
-{
-	static char buf[128];
-	va_list ap;
-	int len;
-
-	va_start(ap, fmt);
-	len = vsnprintf(buf, sizeof(buf), fmt, ap);
-	va_end(ap);
-	buf[len] = '\0';
-
-	printk(KERN_ERR "PCMCIA: socket %p: %s", skt, buf);
-}
-
 #define cs_to_timeout(cs) (((cs) * HZ + 99) / 100)
 
 static void socket_remove_drivers(struct pcmcia_socket *skt)
 {
 	client_t *client;
 
+	cs_dbg(skt, 4, "remove_drivers\n");
+
 	send_event(skt, CS_EVENT_CARD_REMOVAL, CS_EVENT_PRI_HIGH);
 
 	for (client = skt->clients; client; client = client->next)
@@ -545,6 +539,8 @@ static void socket_remove_drivers(struct
 
 static void socket_shutdown(struct pcmcia_socket *skt)
 {
+	cs_dbg(skt, 4, "shutdown\n");
+
 	socket_remove_drivers(skt);
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout(cs_to_timeout(shutdown_delay));
@@ -556,6 +552,8 @@ static int socket_reset(struct pcmcia_so
 {
 	int status, i;
 
+	cs_dbg(skt, 4, "reset\n");
+
 	skt->socket.flags |= SS_OUTPUT_ENA | SS_RESET;
 	skt->ops->set_socket(skt, &skt->socket);
 	udelay((long)reset_time);
@@ -578,7 +576,7 @@ static int socket_reset(struct pcmcia_so
 		schedule_timeout(cs_to_timeout(unreset_check));
 	}
 
-	pcmcia_error(skt, "time out after reset.\n");
+	cs_err(skt, "time out after reset.\n");
 	return CS_GENERAL_FAILURE;
 }
 
@@ -586,6 +584,8 @@ static int socket_setup(struct pcmcia_so
 {
 	int status, i;
 
+	cs_dbg(skt, 4, "setup\n");
+
 	skt->ops->get_status(skt, &status);
 	if (!(status & SS_DETECT))
 		return CS_NO_CARD;
@@ -606,14 +606,14 @@ static int socket_setup(struct pcmcia_so
 	}
 
 	if (status & SS_PENDING) {
-		pcmcia_error(skt, "voltage interrogation timed out.\n");
+		cs_err(skt, "voltage interrogation timed out.\n");
 		return CS_GENERAL_FAILURE;
 	}
 
 	if (status & SS_CARDBUS) {
 		skt->state |= SOCKET_CARDBUS;
 #ifndef CONFIG_CARDBUS
-		pcmcia_error(skt, "cardbus cards are not supported.\n");
+		cs_err(skt, "cardbus cards are not supported.\n");
 		return CS_BAD_TYPE;
 #endif
 	}
@@ -626,7 +626,7 @@ static int socket_setup(struct pcmcia_so
 	else if (!(status & SS_XVCARD))
 		skt->socket.Vcc = skt->socket.Vpp = 50;
 	else {
-		pcmcia_error(skt, "unsupported voltage key.\n");
+		cs_err(skt, "unsupported voltage key.\n");
 		return CS_BAD_TYPE;
 	}
 	skt->socket.flags = 0;
@@ -640,7 +640,7 @@ static int socket_setup(struct pcmcia_so
 
 	skt->ops->get_status(skt, &status);
 	if (!(status & SS_POWERON)) {
-		pcmcia_error(skt, "unable to apply power.\n");
+		cs_err(skt, "unable to apply power.\n");
 		return CS_BAD_TYPE;
 	}
 
@@ -655,6 +655,8 @@ static int socket_insert(struct pcmcia_s
 {
 	int ret;
 
+	cs_dbg(skt, 4, "insert\n");
+
 	if (!cs_socket_get(skt))
 		return CS_NO_CARD;
 
@@ -667,6 +669,8 @@ static int socket_insert(struct pcmcia_s
 			skt->state |= SOCKET_CARDBUS_CONFIG;
 		}
 #endif
+		cs_dbg(skt, 4, "insert done\n");
+
 		send_event(skt, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);
 	} else {
 		socket_shutdown(skt);
@@ -832,6 +836,7 @@ static int pccardd(void *__skt)
  */
 void pcmcia_parse_events(struct pcmcia_socket *s, u_int events)
 {
+	cs_dbg(s, 4, "parse_events: events %08x\n", events);
 	if (s->thread) {
 		spin_lock(&s->thread_lock);
 		s->thread_events |= events;
@@ -857,15 +862,15 @@ static int alloc_io_space(struct pcmcia_
     align = (*base) ? (lines ? 1<<lines : 0) : 1;
     if (align && (align < num)) {
 	if (*base) {
-	    DEBUG(0, "odd IO request: num %04x align %04x\n",
-		  num, align);
+	    cs_dbg(s, 0, "odd IO request: num %04x align %04x\n",
+		   num, align);
 	    align = 0;
 	} else
 	    while (align && (align < num)) align <<= 1;
     }
     if (*base & ~(align-1)) {
-	DEBUG(0, "odd IO request: base %04x align %04x\n",
-	      *base, align);
+	cs_dbg(s, 0, "odd IO request: base %04x align %04x\n",
+	       *base, align);
 	align = 0;
     }
     if ((s->features & SS_CAP_STATIC_MAP) && s->io_offset) {
@@ -1010,8 +1015,8 @@ int pcmcia_bind_device(bind_req_t *req)
     init_waitqueue_head(&client->mtd_req);
     client->next = s->clients;
     s->clients = client;
-    DEBUG(1, "cs: bind_device(): client 0x%p, sock %p, dev %s\n",
-	  client, client->Socket, client->dev_info);
+    cs_dbg(s, 1, "bind_device(): client 0x%p, dev %s\n",
+	   client, client->dev_info);
     return CS_SUCCESS;
 } /* bind_device */
 
@@ -1046,8 +1051,8 @@ int pcmcia_bind_mtd(mtd_bind_t *req)
 	return CS_BAD_OFFSET;
     strlcpy(region->dev_info, (char *)req->dev_info, DEV_NAME_LEN);
     
-    DEBUG(1, "cs: bind_mtd(): attr 0x%x, offset 0x%x, dev %s\n",
-	  req->Attributes, req->CardOffset, (char *)req->dev_info);
+    cs_dbg(s, 1, "bind_mtd(): attr 0x%x, offset 0x%x, dev %s\n",
+	   req->Attributes, req->CardOffset, (char *)req->dev_info);
     return CS_SUCCESS;
 } /* bind_mtd */
 
@@ -1061,9 +1066,12 @@ int pcmcia_deregister_client(client_hand
     u_long flags;
     int i;
     
-    DEBUG(1, "cs: deregister_client(%p)\n", handle);
     if (CHECK_HANDLE(handle))
 	return CS_BAD_HANDLE;
+
+    s = SOCKET(handle);
+    cs_dbg(s, 1, "deregister_client(%p)\n", handle);
+
     if (handle->state &
 	(CLIENT_IRQ_REQ|CLIENT_IO_REQ|CLIENT_CONFIG_LOCKED))
 	return CS_IN_USE;
@@ -1072,7 +1080,6 @@ int pcmcia_deregister_client(client_hand
 	    return CS_IN_USE;
 
     /* Disconnect all MTD links */
-    s = SOCKET(handle);
     if (handle->mtd_count) {
 	for (region = s->a_region; region; region = region->info.next)
 	    if (region->mtd == handle) region->mtd = NULL;
@@ -1543,8 +1550,8 @@ int pcmcia_register_client(client_handle
 	memset(s->config, 0, sizeof(config_t) * s->functions);
     }
     
-    DEBUG(1, "cs: register_client(): client 0x%p, sock %p, dev %s\n",
-	  client, client->Socket, client->dev_info);
+    cs_dbg(s, 1, "register_client(): client 0x%p, dev %s\n",
+	   client, client->dev_info);
     if (client->EventMask & CS_EVENT_REGISTRATION_COMPLETE)
 	EVENT(client, CS_EVENT_REGISTRATION_COMPLETE, CS_EVENT_PRI_LOW);
 
@@ -2077,8 +2084,8 @@ int pcmcia_reset_card(client_handle_t ha
     
 	if (CHECK_HANDLE(handle))
 		return CS_BAD_HANDLE;
-	DEBUG(1, "cs: resetting socket %p\n", handle->Socket);
 	skt = SOCKET(handle);
+	cs_dbg(skt, 1, "resetting socket\n");
 
 	down(&skt->skt_sem);
 	do {
@@ -2126,8 +2133,8 @@ int pcmcia_suspend_card(client_handle_t 
     
 	if (CHECK_HANDLE(handle))
 		return CS_BAD_HANDLE;
-	DEBUG(1, "cs: suspending socket %p\n", handle->Socket);
 	skt = SOCKET(handle);
+	cs_dbg(skt, 1, "suspending socket\n");
 
 	down(&skt->skt_sem);
 	do {
@@ -2153,8 +2160,8 @@ int pcmcia_resume_card(client_handle_t h
     
 	if (CHECK_HANDLE(handle))
 		return CS_BAD_HANDLE;
-	DEBUG(1, "cs: waking up socket %p\n", handle->Socket);
 	skt = SOCKET(handle);
+	cs_dbg(skt, 1, "waking up socket\n");
 
 	down(&skt->skt_sem);
 	do {
@@ -2186,8 +2193,8 @@ int pcmcia_eject_card(client_handle_t ha
     
 	if (CHECK_HANDLE(handle))
 		return CS_BAD_HANDLE;
-	DEBUG(1, "cs: user eject request on socket %p\n", handle->Socket);
 	skt = SOCKET(handle);
+	cs_dbg(skt, 1, "user eject request\n");
 
 	down(&skt->skt_sem);
 	do {
@@ -2215,8 +2222,8 @@ int pcmcia_insert_card(client_handle_t h
 
 	if (CHECK_HANDLE(handle))
 		return CS_BAD_HANDLE;
-	DEBUG(1, "cs: user insert request on socket %p\n", handle->Socket);
 	skt = SOCKET(handle);
+	cs_dbg(skt, 1, "user insert request\n");
 
 	down(&skt->skt_sem);
 	do {
@@ -2360,7 +2367,6 @@ static int __init init_pcmcia_cs(void)
 {
     printk(KERN_INFO "%s\n", release);
     printk(KERN_INFO "  %s\n", options);
-    DEBUG(0, "%s\n", version);
     class_register(&pcmcia_socket_class);
 
     return 0;
diff -urpN orig/drivers/pcmcia/cs_internal.h linux/drivers/pcmcia/cs_internal.h
--- orig/drivers/pcmcia/cs_internal.h	Sun Sep 28 09:54:57 2003
+++ linux/drivers/pcmcia/cs_internal.h	Sat Feb 21 19:21:45 2004
@@ -167,7 +167,6 @@ int replace_cis(client_handle_t handle, 
 int read_tuple(client_handle_t handle, cisdata_t code, void *parse);
 
 /* In bulkmem.c */
-void retry_erase_list(struct erase_busy_t *list, u_int cause);
 int get_first_region(client_handle_t handle, region_info_t *rgn);
 int get_next_region(client_handle_t handle, region_info_t *rgn);
 int register_mtd(client_handle_t handle, mtd_reg_t *reg);
@@ -195,10 +194,19 @@ extern struct rw_semaphore pcmcia_socket
 extern struct list_head pcmcia_socket_list;
 
 #ifdef PCMCIA_DEBUG
-extern int pc_debug;
-#define DEBUG(n, args...) do { if (pc_debug>(n)) printk(KERN_DEBUG args); } while (0)
+extern int cs_debug_level(int);
+
+#define cs_dbg(skt, lvl, fmt, arg...) do {		\
+	if (cs_debug_level(lvl))			\
+		printk(KERN_DEBUG "cs: %s: " fmt, 	\
+		       (skt)->dev.class_id, ## arg);	\
+} while (0)
+
 #else
-#define DEBUG(n, args...) do { } while (0)
+#define cs_dbg(skt, lvl, fmt, arg...) do { } while (0)
 #endif
 
+#define cs_err(skt, fmt, arg...) \
+	printk(KERN_ERR "cs: %s: " fmt, (skt)->dev.class_id, ## arg)
+
 #endif /* _LINUX_CS_INTERNAL_H */
diff -urpN orig/drivers/pcmcia/ds.c linux/drivers/pcmcia/ds.c
--- orig/drivers/pcmcia/ds.c	Thu Feb  5 15:26:01 2004
+++ linux/drivers/pcmcia/ds.c	Sat Feb 21 21:11:00 2004
@@ -33,6 +33,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/major.h>
@@ -69,13 +70,17 @@ MODULE_AUTHOR("David Hinds <dahinds@user
 MODULE_DESCRIPTION("PCMCIA Driver Services");
 MODULE_LICENSE("Dual MPL/GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#ifdef DEBUG
+static int pc_debug;
 
-#ifdef PCMCIA_DEBUG
-INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
+module_param(pc_debug, int, 0644);
+
+#define debug(lvl, fmt, arg...) do {				\
+	if (pc_debug > (lvl))					\
+		printk(KERN_DEBUG "ds: " fmt, ## arg);		\
+} while (0)
 #else
-#define DEBUG(n, args...)
+#define debug(lvl, fmt, arg...) do { } while (0)
 #endif
 
 /*====================================================================*/
@@ -277,7 +282,7 @@ static int ds_event(event_t event, int p
 {
     struct pcmcia_bus_socket *s;
 
-    DEBUG(1, "ds: ds_event(0x%06x, %d, 0x%p)\n",
+    debug(1, "ds_event(0x%06x, %d, 0x%p)\n",
 	  event, priority, args->client_handle);
     s = args->client_data;
     
@@ -353,7 +358,7 @@ static int bind_request(struct pcmcia_bu
     if (!s)
 	    return -EINVAL;
 
-    DEBUG(2, "bind_request(%d, '%s')\n", s->parent->sock,
+    debug(2, "bind_request(%d, '%s')\n", s->parent->sock,
 	  (char *)bind_info->dev_info);
     driver = get_pcmcia_driver(&bind_info->dev_info);
     if (!driver)
@@ -484,7 +489,7 @@ static int unbind_request(struct pcmcia_
 {
     socket_bind_t **b, *c;
 
-    DEBUG(2, "unbind_request(%d, '%s')\n", s->parent->sock,
+    debug(2, "unbind_request(%d, '%s')\n", s->parent->sock,
 	  (char *)bind_info->dev_info);
     for (b = &s->bind; *b; b = &(*b)->next)
 	if ((strcmp((char *)(*b)->driver->drv.name,
@@ -518,7 +523,7 @@ static int ds_open(struct inode *inode, 
     struct pcmcia_bus_socket *s;
     user_info_t *user;
 
-    DEBUG(0, "ds_open(socket %d)\n", i);
+    debug(0, "ds_open(socket %d)\n", i);
 
     s = pcmcia_get_bus_socket(i);
     if (!s)
@@ -552,7 +557,7 @@ static int ds_release(struct inode *inod
     struct pcmcia_bus_socket *s;
     user_info_t *user, **link;
 
-    DEBUG(0, "ds_release(socket %d)\n", iminor(inode));
+    debug(0, "ds_release(socket %d)\n", iminor(inode));
 
     user = file->private_data;
     if (CHECK_USER(user))
@@ -588,7 +593,7 @@ static ssize_t ds_read(struct file *file
     user_info_t *user;
     int ret;
 
-    DEBUG(2, "ds_read(socket %d)\n", iminor(inode));
+    debug(2, "ds_read(socket %d)\n", iminor(file->f_dentry->d_inode));
     
     if (count < 4)
 	return -EINVAL;
@@ -616,7 +621,7 @@ static ssize_t ds_write(struct file *fil
     struct pcmcia_bus_socket *s;
     user_info_t *user;
 
-    DEBUG(2, "ds_write(socket %d)\n", iminor(inode));
+    debug(2, "ds_write(socket %d)\n", iminor(file->f_dentry->d_inode));
     
     if (count != 4)
 	return -EINVAL;
@@ -650,7 +655,7 @@ static u_int ds_poll(struct file *file, 
     struct pcmcia_bus_socket *s;
     user_info_t *user;
 
-    DEBUG(2, "ds_poll(socket %d)\n", iminor(inode));
+    debug(2, "ds_poll(socket %d)\n", iminor(file->f_dentry->d_inode));
     
     user = file->private_data;
     if (CHECK_USER(user))
@@ -677,7 +682,7 @@ static int ds_ioctl(struct inode * inode
     ds_ioctl_arg_t buf;
     user_info_t *user;
 
-    DEBUG(2, "ds_ioctl(socket %d, %#x, %#lx)\n", iminor(inode), cmd, arg);
+    debug(2, "ds_ioctl(socket %d, %#x, %#lx)\n", iminor(inode), cmd, arg);
     
     user = file->private_data;
     if (CHECK_USER(user))
@@ -697,14 +702,14 @@ static int ds_ioctl(struct inode * inode
     if (cmd & IOC_IN) {
 	err = verify_area(VERIFY_READ, (char *)arg, size);
 	if (err) {
-	    DEBUG(3, "ds_ioctl(): verify_read = %d\n", err);
+	    debug(3, "ds_ioctl(): verify_read = %d\n", err);
 	    return err;
 	}
     }
     if (cmd & IOC_OUT) {
 	err = verify_area(VERIFY_WRITE, (char *)arg, size);
 	if (err) {
-	    DEBUG(3, "ds_ioctl(): verify_write = %d\n", err);
+	    debug(3, "ds_ioctl(): verify_write = %d\n", err);
 	    return err;
 	}
     }
@@ -806,7 +811,7 @@ static int ds_ioctl(struct inode * inode
     }
     
     if ((err == 0) && (ret != CS_SUCCESS)) {
-	DEBUG(2, "ds_ioctl: ret = %d\n", ret);
+	debug(2, "ds_ioctl: ret = %d\n", ret);
 	switch (ret) {
 	case CS_BAD_SOCKET: case CS_NO_CARD:
 	    err = -ENODEV; break;

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From rmk+pcmcia at arm.linux.org.uk  Sat Feb 21 21:21:43 2004
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Sat Feb 21 21:21:53 2004
Subject: [CFT] 2/2 Overhaul PCMCIA debugging
In-Reply-To: <20040221212013.A10092@flint.arm.linux.org.uk>;
	from rmk+pcmcia@arm.linux.org.uk on Sat, Feb 21, 2004 at 09:20:13PM +0000
References: <20040221212013.A10092@flint.arm.linux.org.uk>
Message-ID: <20040221212143.B10092@flint.arm.linux.org.uk>

The attached patch overhauls (and fixes) PCMCIA debugging:

- introduce cs_debug_level() so we don't have to export pc_debug
  from cs.c.
- use socket->dev.class_id rather than the address of socket as an
  identifier.
- use module_param() for pc_debug variable - this now means that
  socket drivers can be built in, and debugging enabled via:

	pcmcia_core.pc_debug=n
	ds.pc_debug=n
	sa11xx_core.pc_debug=n
	tcic.pc_debug=n

  etc

- pc_debug from modules works as expected
- make PCMCIA core errors reflect the same format as the debugging
  messages, and use cs_err() to report them.

This is the second half.

diff -urpN orig/drivers/pcmcia/au1000_generic.c linux/drivers/pcmcia/au1000_generic.c
--- orig/drivers/pcmcia/au1000_generic.c	Thu Oct  9 00:04:20 2003
+++ linux/drivers/pcmcia/au1000_generic.c	Sat Feb 21 21:10:25 2004
@@ -26,6 +26,7 @@
  * 
  */
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/config.h>
 #include <linux/delay.h>
@@ -54,8 +55,17 @@
 #include <asm/au1000.h>
 #include <asm/au1000_pcmcia.h>
 
-#ifdef PCMCIA_DEBUG
+#ifdef DEBUG
 static int pc_debug;
+
+module_param(pc_debug, int, 0644);
+
+#define debug(lvl,fmt) do {			\
+	if (pc_debug > (lvl))			\
+		printk(KERN_DEBUG fmt);		\
+} while (0)
+#else
+#define debug(lvl,fmt) do { } while (0)
 #endif
 
 MODULE_LICENSE("GPL");
@@ -209,7 +219,7 @@ static int __init au1000_pcmcia_driver_i
 	 */
 	au1000_pcmcia_poll_event(0);
 
-	DEBUG(1, "au1000: initialization complete\n");
+	debug(1, "au1000: initialization complete\n");
 	return 0;
 
 }  /* au1000_pcmcia_driver_init() */
@@ -228,7 +238,7 @@ static void __exit au1000_pcmcia_driver_
 		if (pcmcia_socket[i].virt_io) 
 			iounmap((void *)pcmcia_socket[i].virt_io);
 	}
-	DEBUG(1, "au1000: shutdown complete\n");
+	debug(1, "au1000: shutdown complete\n");
 }
 
 module_exit(au1000_pcmcia_driver_shutdown);
@@ -249,14 +259,14 @@ au1000_pcmcia_events(struct pcmcia_state
 	unsigned int events=0;
 
 	if(state->detect!=prev_state->detect){
-		DEBUG(2, "%s(): card detect value %u\n", 
+		debug(2, "%s(): card detect value %u\n", 
 				__FUNCTION__, state->detect);
 		events |= mask&SS_DETECT;
 	}
 
 
 	if(state->ready!=prev_state->ready){
-		DEBUG(2, "%s(): card ready value %u\n", 
+		debug(2, "%s(): card ready value %u\n", 
 				__FUNCTION__, state->ready);
 		events |= mask&((flags&SS_IOCARD)?0:SS_READY);
 	}
@@ -429,7 +439,7 @@ au1000_pcmcia_get_status(unsigned int so
 
 	*status|=state.vs_Xv?SS_XVCARD:0;
 
-	DEBUG(2, "\tstatus: %s%s%s%s%s%s%s%s\n",
+	debug(2, "\tstatus: %s%s%s%s%s%s%s%s\n",
 	(*status&SS_DETECT)?"DETECT ":"",
 	(*status&SS_READY)?"READY ":"", 
 	(*status&SS_BATDEAD)?"BATDEAD ":"",
@@ -457,7 +467,7 @@ au1000_pcmcia_set_socket(unsigned int so
 {
 	struct pcmcia_configure configure;
 
-	DEBUG(2, "\tmask:  %s%s%s%s%s%s\n\tflags: %s%s%s%s%s%s\n"
+	debug(2, "\tmask:  %s%s%s%s%s%s\n\tflags: %s%s%s%s%s%s\n"
 	"\tVcc %d  Vpp %d  irq %d\n",
 	(state->csc_mask==0)?"<NONE>":"",
 	(state->csc_mask&SS_DETECT)?"DETECT ":"",
@@ -494,7 +504,7 @@ au1000_pcmcia_set_socket(unsigned int so
 static int 
 au1000_pcmcia_get_io_map(unsigned int sock, struct pccard_io_map *map)
 {
-	DEBUG(1, "au1000_pcmcia_get_io_map: sock %d\n", sock);
+	debug(1, "au1000_pcmcia_get_io_map: sock %d\n", sock);
 	if(map->map>=MAX_IO_WIN){
 		printk(KERN_ERR "%s(): map (%d) out of range\n", 
 				__FUNCTION__, map->map);
@@ -531,7 +541,7 @@ au1000_pcmcia_set_io_map(unsigned int so
 	map->start=pcmcia_socket[sock].virt_io;
 	map->stop=map->start+(map->stop-start);
 	pcmcia_socket[sock].io_map[map->map]=*map;
-	DEBUG(3, "set_io_map %d start %x stop %x\n", 
+	debug(3, "set_io_map %d start %x stop %x\n", 
 			map->map, map->start, map->stop);
 	return 0;
 
@@ -595,7 +605,7 @@ au1000_pcmcia_set_mem_map(unsigned int s
 	map->sys_stop=map->sys_start+(map->sys_stop-start);
 	pcmcia_socket[sock].mem_map[map->map]=*map;
 	spin_unlock_irqrestore(&pcmcia_lock, flags);
-	DEBUG(3, "set_mem_map %d start %x stop %x card_start %x\n", 
+	debug(3, "set_mem_map %d start %x stop %x card_start %x\n", 
 			map->map, map->sys_start, map->sys_stop, 
 			map->card_start);
 	return 0;
diff -urpN orig/drivers/pcmcia/au1000_pb1x00.c linux/drivers/pcmcia/au1000_pb1x00.c
--- orig/drivers/pcmcia/au1000_pb1x00.c	Thu Oct  9 00:04:20 2003
+++ linux/drivers/pcmcia/au1000_pb1x00.c	Sat Feb 21 21:06:59 2004
@@ -48,6 +48,8 @@
 #include <asm/au1000.h>
 #include <asm/au1000_pcmcia.h>
 
+#define debug(fmt, arg...) do { } while (0)
+
 #ifdef CONFIG_MIPS_PB1000
 #include <asm/pb1000.h>
 #define PCMCIA_IRQ AU1000_GPIO_15
@@ -213,7 +215,7 @@ pb1x00_pcmcia_configure_socket(const str
 	}
 
 	pcr &= ~PCR_SLOT_0_RST;
-	DEBUG(KERN_INFO "Vcc %dV Vpp %dV, pcr %x\n", 
+	debug("Vcc %dV Vpp %dV, pcr %x\n", 
 			configure->vcc, configure->vpp, pcr);
 	switch(configure->vcc){
 		case 0:  /* Vcc 0 */
@@ -324,7 +326,7 @@ pb1x00_pcmcia_configure_socket(const str
 
 	pcr = au_readw(PB1100_MEM_PCMCIA) & ~0xf;
 
-	DEBUG(KERN_INFO "Vcc %dV Vpp %dV, pcr %x, reset %d\n", 
+	debug("Vcc %dV Vpp %dV, pcr %x, reset %d\n", 
 			configure->vcc, configure->vpp, pcr, configure->reset);
 
 
diff -urpN orig/drivers/pcmcia/i82365.c linux/drivers/pcmcia/i82365.c
--- orig/drivers/pcmcia/i82365.c	Fri Jan  9 22:39:36 2004
+++ linux/drivers/pcmcia/i82365.c	Sat Feb 21 21:11:12 2004
@@ -32,6 +32,7 @@
 ======================================================================*/
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/config.h>
 #include <linux/types.h>
@@ -66,14 +67,20 @@
 #include "ricoh.h"
 #include "o2micro.h"
 
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
+#ifdef DEBUG
 static const char *version =
 "i82365.c 1.265 1999/11/10 18:36:21 (David Hinds)";
+
+static int pc_debug;
+
+module_param(pc_debug, int, 0644);
+
+#define debug(lvl, fmt, arg...) do {				\
+	if (pc_debug > (lvl))					\
+		printk(KERN_DEBUG "i82365: " fmt, ## arg);	\
+} while (0)
 #else
-#define DEBUG(n, args...) do { } while (0)
+#define debug(lvl, fmt, arg...) do { } while (0)
 #endif
 
 static irqreturn_t i365_count_irq(int, void *, struct pt_regs *);
@@ -496,13 +503,13 @@ static irqreturn_t i365_count_irq(int ir
 {
     i365_get(irq_sock, I365_CSC);
     irq_hits++;
-    DEBUG(2, "-> hit on irq %d\n", irq);
+    debug(2, "-> hit on irq %d\n", irq);
     return IRQ_HANDLED;
 }
 
 static u_int __init test_irq(u_short sock, int irq)
 {
-    DEBUG(2, "  testing ISA irq %d\n", irq);
+    debug(2, "  testing ISA irq %d\n", irq);
     if (request_irq(irq, i365_count_irq, 0, "scan", i365_count_irq) != 0)
 	return 1;
     irq_hits = 0; irq_sock = sock;
@@ -510,7 +517,7 @@ static u_int __init test_irq(u_short soc
     schedule_timeout(HZ/100);
     if (irq_hits) {
 	free_irq(irq, i365_count_irq);
-	DEBUG(2, "    spurious hit!\n");
+	debug(2, "    spurious hit!\n");
 	return 1;
     }
 
@@ -523,7 +530,7 @@ static u_int __init test_irq(u_short soc
 
     /* mask all interrupts */
     i365_set(sock, I365_CSCINT, 0);
-    DEBUG(2, "    hits = %d\n", irq_hits);
+    debug(2, "    hits = %d\n", irq_hits);
     
     return (irq_hits != 1);
 }
@@ -850,7 +857,7 @@ static irqreturn_t pcic_interrupt(int ir
     u_long flags = 0;
     int handled = 0;
 
-    DEBUG(4, "i82365: pcic_interrupt(%d)\n", irq);
+    debug(4, "pcic_interrupt(%d)\n", irq);
 
     for (j = 0; j < 20; j++) {
 	active = 0;
@@ -874,7 +881,7 @@ static irqreturn_t pcic_interrupt(int ir
 		events |= (csc & I365_CSC_READY) ? SS_READY : 0;
 	    }
 	    ISA_UNLOCK(i, flags);
-	    DEBUG(2, "i82365: socket %d event 0x%02x\n", i, events);
+	    debug(2, "socket %d event 0x%02x\n", i, events);
 
 	    if (events)
 		pcmcia_parse_events(&socket[i].socket, events);
@@ -886,7 +893,7 @@ static irqreturn_t pcic_interrupt(int ir
     if (j == 20)
 	printk(KERN_NOTICE "i82365: infinite loop in interrupt handler\n");
 
-    DEBUG(4, "i82365: interrupt done\n");
+    debug(4, "interrupt done\n");
     return IRQ_RETVAL(handled);
 } /* pcic_interrupt */
 
@@ -928,7 +935,7 @@ static int i365_get_status(u_short sock,
 	}
     }
     
-    DEBUG(1, "i82365: GetStatus(%d) = %#4.4x\n", sock, *value);
+    debug(1, "GetStatus(%d) = %#4.4x\n", sock, *value);
     return 0;
 } /* i365_get_status */
 
@@ -998,7 +1005,7 @@ static int i365_get_socket(u_short sock,
 	state->csc_mask |= (reg & I365_CSC_READY) ? SS_READY : 0;
     }
     
-    DEBUG(1, "i82365: GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
+    debug(1, "GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
 	  "io_irq %d, csc_mask %#2.2x\n", sock, state->flags,
 	  state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
     return 0;
@@ -1011,7 +1018,7 @@ static int i365_set_socket(u_short sock,
     struct i82365_socket *t = &socket[sock];
     u_char reg;
     
-    DEBUG(1, "i82365: SetSocket(%d, flags %#3.3x, Vcc %d, Vpp %d, "
+    debug(1, "SetSocket(%d, flags %#3.3x, Vcc %d, Vpp %d, "
 	  "io_irq %d, csc_mask %#2.2x)\n", sock, state->flags,
 	  state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
     
@@ -1120,7 +1127,7 @@ static int i365_set_io_map(u_short sock,
 {
     u_char map, ioctl;
     
-    DEBUG(1, "i82365: SetIOMap(%d, %d, %#2.2x, %d ns, "
+    debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, "
 	  "%#4.4x-%#4.4x)\n", sock, io->map, io->flags,
 	  io->speed, io->start, io->stop);
     map = io->map;
@@ -1150,7 +1157,7 @@ static int i365_set_mem_map(u_short sock
     u_short base, i;
     u_char map;
     
-    DEBUG(1, "i82365: SetMemMap(%d, %d, %#2.2x, %d ns, %#5.5lx-%#5.5"
+    debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, %#5.5lx-%#5.5"
 	  "lx, %#5.5x)\n", sock, mem->map, mem->flags, mem->speed,
 	  mem->sys_start, mem->sys_stop, mem->card_start);
 
diff -urpN orig/drivers/pcmcia/sa11xx_core.c linux/drivers/pcmcia/sa11xx_core.c
--- orig/drivers/pcmcia/sa11xx_core.c	Sat Feb 21 20:31:12 2004
+++ linux/drivers/pcmcia/sa11xx_core.c	Sat Feb 21 21:11:24 2004
@@ -35,6 +35,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/config.h>
 #include <linux/cpufreq.h>
@@ -54,8 +55,19 @@
 #include "sa11xx_core.h"
 #include "sa1100.h"
 
-#ifdef PCMCIA_DEBUG
+#ifdef DEBUG
 static int pc_debug;
+
+module_param(pc_debug, int, 0644);
+
+#define debug(skt, lvl, fmt, arg...) do {			\
+	if (pc_debug > (lvl))					\
+		printk(KERN_DEBUG "skt%u: %s: " fmt,		\
+		       (skt)->nr, __func__, ## arg);		\
+} while (0)
+
+#else
+#define debug(skt, lvl, fmt, arg...) do { } while (0)
 #endif
 
 #define to_sa1100_socket(x)	container_of(x, struct sa1100_pcmcia_socket, socket)
@@ -133,8 +145,8 @@ sa1100_pcmcia_set_mecr(struct sa1100_pcm
 
 	local_irq_restore(flags);
 
-	DEBUG(4, "%s(): sock %u FAST %X  BSM %X  BSA %X  BSIO %X\n",
-	      __FUNCTION__, skt->nr, MECR_FAST_GET(mecr, skt->nr),
+	debug(skt, 4, "FAST %X  BSM %X  BSA %X  BSIO %X\n",
+	      MECR_FAST_GET(mecr, skt->nr),
 	      MECR_BSM_GET(mecr, skt->nr), MECR_BSA_GET(mecr, skt->nr),
 	      MECR_BSIO_GET(mecr, skt->nr));
 
@@ -221,7 +233,7 @@ static int sa1100_pcmcia_sock_init(struc
 {
 	struct sa1100_pcmcia_socket *skt = to_sa1100_socket(sock);
 
-	DEBUG(2, "%s(): initializing socket %u\n", __FUNCTION__, skt->nr);
+	debug(skt, 2, "initializing socket\n");
 
 	skt->ops->socket_init(skt);
 	return 0;
@@ -242,7 +254,7 @@ static int sa1100_pcmcia_suspend(struct 
 	struct sa1100_pcmcia_socket *skt = to_sa1100_socket(sock);
 	int ret;
 
-	DEBUG(2, "%s(): suspending socket %u\n", __FUNCTION__, skt->nr);
+	debug(skt, 2, "suspending socket\n");
 
 	ret = sa1100_pcmcia_config_skt(skt, &dead_socket);
 	if (ret == 0)
@@ -260,7 +272,7 @@ static void sa1100_check_status(struct s
 {
 	unsigned int events;
 
-	DEBUG(4, "%s(): entering PCMCIA monitoring thread\n", __FUNCTION__);
+	debug(skt, 4, "entering PCMCIA monitoring thread\n");
 
 	do {
 		unsigned int status;
@@ -273,7 +285,7 @@ static void sa1100_check_status(struct s
 		skt->status = status;
 		spin_unlock_irqrestore(&status_lock, flags);
 
-		DEBUG(2, "events: %s%s%s%s%s%s\n",
+		debug(skt, 4, "events: %s%s%s%s%s%s\n",
 			events == 0         ? "<NONE>"   : "",
 			events & SS_DETECT  ? "DETECT "  : "",
 			events & SS_READY   ? "READY "   : "",
@@ -293,7 +305,7 @@ static void sa1100_check_status(struct s
 static void sa1100_pcmcia_poll_event(unsigned long dummy)
 {
 	struct sa1100_pcmcia_socket *skt = (struct sa1100_pcmcia_socket *)dummy;
-	DEBUG(4, "%s(): polling for events\n", __FUNCTION__);
+	debug(skt, 4, "polling for events\n");
 
 	mod_timer(&skt->poll_timer, jiffies + SA1100_PCMCIA_POLL_PERIOD);
 
@@ -314,7 +326,7 @@ static irqreturn_t sa1100_pcmcia_interru
 {
 	struct sa1100_pcmcia_socket *skt = dev;
 
-	DEBUG(3, "%s(): servicing IRQ %d\n", __FUNCTION__, irq);
+	debug(skt, 3, "servicing IRQ %d\n", irq);
 
 	sa1100_check_status(skt);
 
@@ -363,7 +375,7 @@ sa1100_pcmcia_get_socket(struct pcmcia_s
 {
   struct sa1100_pcmcia_socket *skt = to_sa1100_socket(sock);
 
-  DEBUG(2, "%s() for sock %u\n", __FUNCTION__, skt->nr);
+  debug(skt, 2, "\n");
 
   *state = skt->cs_state;
 
@@ -385,22 +397,19 @@ sa1100_pcmcia_set_socket(struct pcmcia_s
 {
   struct sa1100_pcmcia_socket *skt = to_sa1100_socket(sock);
 
-  DEBUG(2, "%s() for sock %u\n", __FUNCTION__, skt->nr);
-
-  DEBUG(3, "\tmask:  %s%s%s%s%s%s\n\tflags: %s%s%s%s%s%s\n",
-	(state->csc_mask==0)?"<NONE>":"",
+  debug(skt, 2, "mask: %s%s%s%s%s%sflags: %s%s%s%s%s%sVcc %d Vpp %d irq %d\n",
+	(state->csc_mask==0)?"<NONE> ":"",
 	(state->csc_mask&SS_DETECT)?"DETECT ":"",
 	(state->csc_mask&SS_READY)?"READY ":"",
 	(state->csc_mask&SS_BATDEAD)?"BATDEAD ":"",
 	(state->csc_mask&SS_BATWARN)?"BATWARN ":"",
 	(state->csc_mask&SS_STSCHG)?"STSCHG ":"",
-	(state->flags==0)?"<NONE>":"",
+	(state->flags==0)?"<NONE> ":"",
 	(state->flags&SS_PWR_AUTO)?"PWR_AUTO ":"",
 	(state->flags&SS_IOCARD)?"IOCARD ":"",
 	(state->flags&SS_RESET)?"RESET ":"",
 	(state->flags&SS_SPKR_ENA)?"SPKR_ENA ":"",
-	(state->flags&SS_OUTPUT_ENA)?"OUTPUT_ENA ":"");
-  DEBUG(3, "\tVcc %d  Vpp %d  irq %d\n",
+	(state->flags&SS_OUTPUT_ENA)?"OUTPUT_ENA ":"",
 	state->Vcc, state->Vpp, state->io_irq);
 
   return sa1100_pcmcia_config_skt(skt, state);
@@ -422,11 +431,9 @@ sa1100_pcmcia_set_io_map(struct pcmcia_s
 	struct sa1100_pcmcia_socket *skt = to_sa1100_socket(sock);
 	unsigned short speed = map->speed;
 
-	DEBUG(2, "%s() for sock %u\n", __FUNCTION__, skt->nr);
-
-	DEBUG(3, "\tmap %u  speed %u\n\tstart 0x%08x  stop 0x%08x\n",
+	debug(skt, 2, "map %u  speed %u start 0x%08x stop 0x%08x\n",
 		map->map, map->speed, map->start, map->stop);
-	DEBUG(3, "\tflags: %s%s%s%s%s%s%s%s\n",
+	debug(skt, 2, "flags: %s%s%s%s%s%s%s%s\n",
 		(map->flags==0)?"<NONE>":"",
 		(map->flags&MAP_ACTIVE)?"ACTIVE ":"",
 		(map->flags&MAP_16BIT)?"16BIT ":"",
@@ -479,11 +486,9 @@ sa1100_pcmcia_set_mem_map(struct pcmcia_
 	struct resource *res;
 	unsigned short speed = map->speed;
 
-	DEBUG(2, "%s() for sock %u\n", __FUNCTION__, skt->nr);
-
-	DEBUG(3, "\tmap %u speed %u card_start %08x\n",
+	debug(skt, 2, "map %u speed %u card_start %08x\n",
 		map->map, map->speed, map->card_start);
-	DEBUG(3, "\tflags: %s%s%s%s%s%s%s%s\n",
+	debug(skt, 2, "flags: %s%s%s%s%s%s%s%s\n",
 		(map->flags==0)?"<NONE>":"",
 		(map->flags&MAP_ACTIVE)?"ACTIVE ":"",
 		(map->flags&MAP_16BIT)?"16BIT ":"",
@@ -920,23 +925,13 @@ sa1100_pcmcia_notifier(struct notifier_b
 
 	switch (val) {
 	case CPUFREQ_PRECHANGE:
-		if (freqs->new > freqs->old) {
-			DEBUG(2, "%s(): new frequency %u.%uMHz > %u.%uMHz, "
-				"pre-updating\n", __FUNCTION__,
-			    freqs->new / 1000, (freqs->new / 100) % 10,
-			    freqs->old / 1000, (freqs->old / 100) % 10);
+		if (freqs->new > freqs->old)
 			sa1100_pcmcia_update_mecr(freqs->new);
-		}
 		break;
 
 	case CPUFREQ_POSTCHANGE:
-		if (freqs->new < freqs->old) {
-			DEBUG(2, "%s(): new frequency %u.%uMHz < %u.%uMHz, "
-				"post-updating\n", __FUNCTION__,
-			    freqs->new / 1000, (freqs->new / 100) % 10,
-			    freqs->old / 1000, (freqs->old / 100) % 10);
+		if (freqs->new < freqs->old)
 			sa1100_pcmcia_update_mecr(freqs->new);
-		}
 		break;
 	}
 
diff -urpN orig/drivers/pcmcia/tcic.c linux/drivers/pcmcia/tcic.c
--- orig/drivers/pcmcia/tcic.c	Sat Oct 18 00:00:10 2003
+++ linux/drivers/pcmcia/tcic.c	Sat Feb 21 21:11:41 2004
@@ -32,6 +32,7 @@
 ======================================================================*/
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
@@ -55,14 +56,20 @@
 #include <pcmcia/ss.h>
 #include "tcic.h"
 
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
+#ifdef DEBUG
+static int pc_debug;
+
+module_param(pc_debug, int, 0644);
 MODULE_PARM(pc_debug, "i");
 static const char *version =
 "tcic.c 1.111 2000/02/15 04:13:12 (David Hinds)";
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
+
+#define debug(lvl, fmt, arg...) do {				\
+	if (pc_debug > (lvl))					\
+		printk(KERN_DEBUG "tcic: " fmt, ## arg);	\
+} while (0)
 #else
-#define DEBUG(n, args...)
+#define debug(lvl, fmt, arg...) do { } while (0)
 #endif
 
 MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>");
@@ -133,7 +140,7 @@ static struct tcic_socket socket_table[2
    to map to irq 11, but is coded as 0 or 1 in the irq registers. */
 #define TCIC_IRQ(x) ((x) ? (((x) == 11) ? 1 : (x)) : 15)
 
-#ifdef PCMCIA_DEBUG_X
+#ifdef DEBUG_X
 static u_char tcic_getb(u_char reg)
 {
     u_char val = inb(tcic_base+reg);
@@ -168,7 +175,7 @@ static void tcic_setw(u_char reg, u_shor
 
 static void tcic_setl(u_char reg, u_int data)
 {
-#ifdef PCMCIA_DEBUG_X
+#ifdef DEBUG_X
     printk(KERN_DEBUG "tcic_setl(%#x, %#lx)\n", tcic_base+reg, data);
 #endif
     outw(data & 0xffff, tcic_base+reg);
@@ -573,7 +580,7 @@ static irqreturn_t tcic_interrupt(int ir
     } else
 	active = 1;
 
-    DEBUG(2, "tcic: tcic_interrupt()\n");
+    debug(2, "tcic_interrupt()\n");
     
     for (i = 0; i < sockets; i++) {
 	psock = socket_table[i].psock;
@@ -610,13 +617,13 @@ static irqreturn_t tcic_interrupt(int ir
     }
     active = 0;
     
-    DEBUG(2, "tcic: interrupt done\n");
+    debug(2, "interrupt done\n");
     return IRQ_HANDLED;
 } /* tcic_interrupt */
 
 static void tcic_timer(u_long data)
 {
-    DEBUG(2, "tcic: tcic_timer()\n");
+    debug(2, "tcic_timer()\n");
     tcic_timer_pending = 0;
     tcic_interrupt(0, NULL, NULL);
 } /* tcic_timer */
@@ -643,7 +650,7 @@ static int tcic_get_status(struct pcmcia
     reg = tcic_getb(TCIC_PWR);
     if (reg & (TCIC_PWR_VCC(psock)|TCIC_PWR_VPP(psock)))
 	*value |= SS_POWERON;
-    DEBUG(1, "tcic: GetStatus(%d) = %#2.2x\n", psock, *value);
+    debug(1, "GetStatus(%d) = %#2.2x\n", psock, *value);
     return 0;
 } /* tcic_get_status */
   
@@ -694,7 +701,7 @@ static int tcic_get_socket(struct pcmcia
 	state->csc_mask |= (scf2 & TCIC_SCF2_MRDY) ? 0 : SS_READY;
     }
 
-    DEBUG(1, "tcic: GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
+    debug(1, "GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
 	  "io_irq %d, csc_mask %#2.2x\n", psock, state->flags,
 	  state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
     return 0;
@@ -708,7 +715,7 @@ static int tcic_set_socket(struct pcmcia
     u_char reg;
     u_short scf1, scf2;
 
-    DEBUG(1, "tcic: SetSocket(%d, flags %#3.3x, Vcc %d, Vpp %d, "
+    debug(1, "SetSocket(%d, flags %#3.3x, Vcc %d, Vpp %d, "
 	  "io_irq %d, csc_mask %#2.2x)\n", psock, state->flags,
 	  state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
     tcic_setw(TCIC_ADDR+2, (psock << TCIC_SS_SHFT) | TCIC_ADR2_INDREG);
@@ -783,7 +790,7 @@ static int tcic_set_io_map(struct pcmcia
     u_int addr;
     u_short base, len, ioctl;
     
-    DEBUG(1, "tcic: SetIOMap(%d, %d, %#2.2x, %d ns, "
+    debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, "
 	  "%#4.4x-%#4.4x)\n", psock, io->map, io->flags,
 	  io->speed, io->start, io->stop);
     if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) ||
@@ -820,7 +827,7 @@ static int tcic_set_mem_map(struct pcmci
     u_short addr, ctl;
     u_long base, len, mmap;
 
-    DEBUG(1, "tcic: SetMemMap(%d, %d, %#2.2x, %d ns, "
+    debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, "
 	  "%#5.5lx-%#5.5lx, %#5.5x)\n", psock, mem->map, mem->flags,
 	  mem->speed, mem->sys_start, mem->sys_stop, mem->card_start);
     if ((mem->map > 3) || (mem->card_start > 0x3ffffff) ||
diff -urpN orig/drivers/pcmcia/yenta_socket.c linux/drivers/pcmcia/yenta_socket.c
--- orig/drivers/pcmcia/yenta_socket.c	Fri Jan  9 22:39:36 2004
+++ linux/drivers/pcmcia/yenta_socket.c	Sat Feb 21 21:08:47 2004
@@ -30,9 +30,9 @@
 
 
 #if 0
-#define DEBUG(x,args...)	printk(KERN_DEBUG "%s: " x, __FUNCTION__, ##args)
+#define debug(x,args...) printk(KERN_DEBUG "%s: " x, __FUNCTION__, ##args)
 #else
-#define DEBUG(x,args...)
+#define debug(x,args...)
 #endif
 
 /* Don't ask.. */
@@ -47,13 +47,13 @@
 static inline u32 cb_readl(struct yenta_socket *socket, unsigned reg)
 {
 	u32 val = readl(socket->base + reg);
-	DEBUG("%p %04x %08x\n", socket, reg, val);
+	debug("%p %04x %08x\n", socket, reg, val);
 	return val;
 }
 
 static inline void cb_writel(struct yenta_socket *socket, unsigned reg, u32 val)
 {
-	DEBUG("%p %04x %08x\n", socket, reg, val);
+	debug("%p %04x %08x\n", socket, reg, val);
 	writel(val, socket->base + reg);
 }
 
@@ -61,7 +61,7 @@ static inline u8 config_readb(struct yen
 {
 	u8 val;
 	pci_read_config_byte(socket->dev, offset, &val);
-	DEBUG("%p %04x %02x\n", socket, offset, val);
+	debug("%p %04x %02x\n", socket, offset, val);
 	return val;
 }
 
@@ -69,7 +69,7 @@ static inline u16 config_readw(struct ye
 {
 	u16 val;
 	pci_read_config_word(socket->dev, offset, &val);
-	DEBUG("%p %04x %04x\n", socket, offset, val);
+	debug("%p %04x %04x\n", socket, offset, val);
 	return val;
 }
 
@@ -77,32 +77,32 @@ static inline u32 config_readl(struct ye
 {
 	u32 val;
 	pci_read_config_dword(socket->dev, offset, &val);
-	DEBUG("%p %04x %08x\n", socket, offset, val);
+	debug("%p %04x %08x\n", socket, offset, val);
 	return val;
 }
 
 static inline void config_writeb(struct yenta_socket *socket, unsigned offset, u8 val)
 {
-	DEBUG("%p %04x %02x\n", socket, offset, val);
+	debug("%p %04x %02x\n", socket, offset, val);
 	pci_write_config_byte(socket->dev, offset, val);
 }
 
 static inline void config_writew(struct yenta_socket *socket, unsigned offset, u16 val)
 {
-	DEBUG("%p %04x %04x\n", socket, offset, val);
+	debug("%p %04x %04x\n", socket, offset, val);
 	pci_write_config_word(socket->dev, offset, val);
 }
 
 static inline void config_writel(struct yenta_socket *socket, unsigned offset, u32 val)
 {
-	DEBUG("%p %04x %08x\n", socket, offset, val);
+	debug("%p %04x %08x\n", socket, offset, val);
 	pci_write_config_dword(socket->dev, offset, val);
 }
 
 static inline u8 exca_readb(struct yenta_socket *socket, unsigned reg)
 {
 	u8 val = readb(socket->base + 0x800 + reg);
-	DEBUG("%p %04x %02x\n", socket, reg, val);
+	debug("%p %04x %02x\n", socket, reg, val);
 	return val;
 }
 
@@ -111,19 +111,19 @@ static inline u8 exca_readw(struct yenta
 	u16 val;
 	val = readb(socket->base + 0x800 + reg);
 	val |= readb(socket->base + 0x800 + reg + 1) << 8;
-	DEBUG("%p %04x %04x\n", socket, reg, val);
+	debug("%p %04x %04x\n", socket, reg, val);
 	return val;
 }
 
 static inline void exca_writeb(struct yenta_socket *socket, unsigned reg, u8 val)
 {
-	DEBUG("%p %04x %02x\n", socket, reg, val);
+	debug("%p %04x %02x\n", socket, reg, val);
 	writeb(val, socket->base + 0x800 + reg);
 }
 
 static void exca_writew(struct yenta_socket *socket, unsigned reg, u16 val)
 {
-	DEBUG("%p %04x %04x\n", socket, reg, val);
+	debug("%p %04x %04x\n", socket, reg, val);
 	writeb(val, socket->base + 0x800 + reg);
 	writeb(val >> 8, socket->base + 0x800 + reg + 1);
 }


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From d_baryon at yahoo.com  Mon Feb 23 21:55:48 2004
From: d_baryon at yahoo.com (Dan Baryon)
Date: Mon Feb 23 12:56:10 2004
Subject: help for Cardbus CF adaptor 
Message-ID: <4039F854.6040905@yahoo.com>

Hello,

I just got a Delkin 32bit Cardbus adaptor for CF flash disk and tried it 
on linux.
Under kernel 2.6.0-mm2, the adaptor seems to be dected but the cf disk 
is not.
The output of "cardctl config" is:
socket0:
Vcc 3.3V Vpp1 3.3V Vpp2 3.3V
interface type is "cardbus"
irq 3 ...
function 0:

Nothing else can be found in the kernel.log, and
with the kernel used I have no problem in using the cf flash disk
via the usual 16bit adaptors.

Curiousely, I noticed that under windows XP the CF disk in the cardbus 
adaptor
is recognized as a scsi disk. However, according to  the site 
(http://www.workbit.co.jp/ts/english/z_cf32-e.html), this adaptor 
contains NPATA-32,
and this chip seems not a scsi device according to  
(http://www.workbit.co.jp/ts/english/z_npata32-e.html).

Your comments will be appreciated very much.






From willy at debian.org  Mon Feb 23 13:05:07 2004
From: willy at debian.org (Matthew Wilcox)
Date: Mon Feb 23 13:05:10 2004
Subject: help for Cardbus CF adaptor
In-Reply-To: <4039F854.6040905@yahoo.com>
References: <4039F854.6040905@yahoo.com>
Message-ID: <20040223130507.GS11824@parcelfarce.linux.theplanet.co.uk>

On Mon, Feb 23, 2004 at 09:55:48PM +0900, Dan Baryon wrote:
> I just got a Delkin 32bit Cardbus adaptor for CF flash disk and tried it 
> on linux.
> Under kernel 2.6.0-mm2, the adaptor seems to be dected but the cf disk 
> is not.

If it's cardbus, lspci should show it.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

From daniel.ritz at gmx.ch  Tue Feb 24 00:33:31 2004
From: daniel.ritz at gmx.ch (Daniel Ritz)
Date: Mon Feb 23 23:34:56 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
Message-ID: <200402240033.31042.daniel.ritz@gmx.ch>

hi

this patch should fix up wrongly initialized TI bridges. in a safe way (hopefully).

people with a TI bridge please test.
andrew, any chance for this in -mm?
thanx to Guylhem Aznar for testing it.

rgds
-daniel


---patch---

another TI irq routing patch. this one is not blidly guessing what's right.
it changes the routing depending on the device control registers. and it only
changes the device control register when interrupts are not working at all.
this has the following advantages over the old (and disabled in 2.6, but not in 2.4)
routing code:
- it shouldn't change working setups
- it's in the right place (the old code is wrong: checks irq_mask before it is set)
- it doens't disable working parallel ISA interrupts
- irqmux is 32bit, the old code operates on a 8bit variable, chaning the routing on
  5 of 7 MFUNCs.
- the routing of INTB depends on the chip and the INTRTIE flag in the device control
  register (may be unsafe, don't know)

against 2.6.3-bk


--- 1.18/drivers/pcmcia/ti113x.h	Wed Aug 27 21:58:54 2003
+++ edited/drivers/pcmcia/ti113x.h	Fri Feb 20 21:26:49 2004
@@ -273,6 +273,8 @@
 
 static int ti_override(struct yenta_socket *socket)
 {
+	u32 irqmux, irqmux_old, devctl;
+	unsigned probe_mask;
 	u8 new, reg = exca_readb(socket, I365_INTCTL);
 
 	new = reg & ~I365_INTR_ENA;
@@ -281,33 +283,73 @@
 
 	ti_set_zv(socket);
 
-#if 0
 	/*
-	 * If ISA interrupts don't work, then fall back to routing card
-	 * interrupts to the PCI interrupt of the socket.
-	 *
-	 * Tweaking this when we are using serial PCI IRQs causes hangs
-	 *   --rmk
+	 * a more reliable way of changing the IRQMUX. don't blindly guess
+	 * what's right, look up the device control register, change the
+	 * routing depending on that data. only fall back to PCI interrupts
+	 * when it's not working at all. there should be no change to the
+	 * IRQMUX when it's programmed right.
 	 */
-	if (!socket->socket.irq_mask) {
-		u8 irqmux, devctl;
 
-		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-		if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
-			printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
-
-			devctl &= ~TI113X_DCR_IMODE_MASK;
-
-			irqmux = config_readl(socket, TI122X_IRQMUX);
-			irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-			irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
+	/* check IRQ routing to see if 16bit cards would work */
+	irqmux = irqmux_old = config_readl(socket, TI122X_IRQMUX);
+	devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
+	printk(KERN_INFO "Yenta TI: irqmux %08x, devctl %02x\n", irqmux, devctl);
+
+#if 1
+	/* serialized interrupts: MFUNC3 must be IRQSER */
+	if (devctl & TI113X_DCR_IMODE_SERIAL)
+		irqmux = (irqmux & ~0xf000) | 0x1000;
+#endif
 
+#if 1
+	/* if we have all serial: probe, fall back to parallel PCI */
+	if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
+		/* write down if changed, probe */
+		if (irqmux_old != irqmux) {
+			printk(KERN_INFO "Yenta TI: changing to %08x", irqmux);
 			config_writel(socket, TI122X_IRQMUX, irqmux);
+		}
+	
+		probe_mask = yenta_probe_irq(socket, isa_interrupts);
+		if (!probe_mask) {
+			/* no chance to have all serial working -> PCI */
+			printk(KERN_INFO "Yenta TI: serial interrupts not working -> PCI\n");
+			devctl &= ~TI113X_DCR_IMODE_MASK;
 			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
 		}
 	}
 #endif
 
+	/* parallel PCI interrupts: MFUNC0 must be INTA */
+	if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
+		u32 sysctl;
+		irqmux = (irqmux & ~0x0f) | 0x02;
+
+		/* route INTB depending on INTRTIE */
+		switch (socket->dev->device) {
+			/* there are more... */
+			case PCI_DEVICE_ID_TI_1220:
+			case PCI_DEVICE_ID_TI_1221:
+			case PCI_DEVICE_ID_TI_1225:
+			case PCI_DEVICE_ID_TI_1420:
+			case PCI_DEVICE_ID_TI_1450:
+			//case PCI_DEVICE_ID_TI_1451:
+			case PCI_DEVICE_ID_TI_1520:
+				sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
+				if (!(sysctl & TI122X_SCR_INTRTIE))
+					irqmux = (irqmux & ~0xf0) | 0x20;
+
+			default:
+				break;
+		}
+	}
+
+	if (irqmux_old != irqmux) {
+		printk(KERN_INFO "Yenta TI: changing to %08x", irqmux);
+		config_writel(socket, TI122X_IRQMUX, irqmux);
+	}
+
 	return 0;
 }
 
@@ -365,26 +407,6 @@
 			old, diag);
 		config_writeb(socket, TI1250_DIAGNOSTIC, diag);
 	}
-
-#if 0
-	/*
-	 * This is highly machine specific, and we should NOT touch
-	 * this register - we have no knowledge how the hardware
-	 * is actually wired.
-	 *
-	 * If we're going to do this, we should probably look into
-	 * using the subsystem IDs.
-	 *
-	 * On ThinkPad 380XD, this changes MFUNC0 from the ISA IRQ3
-	 * output (which it is) to IRQ2.  We also change MFUNC1
-	 * from ISA IRQ4 to IRQ6.
-	 */
-	irqmux = config_readl(socket, TI122X_IRQMUX);
-	irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-	if (!(ti_sysctl(socket) & TI122X_SCR_INTRTIE))
-		irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
-	config_writel(socket, TI122X_IRQMUX, irqmux);
-#endif
 
 	return ti12xx_override(socket);
 }
===== drivers/pcmcia/yenta_socket.c 1.51 vs edited =====
--- 1.51/drivers/pcmcia/yenta_socket.c	Wed Dec 31 01:35:29 2003
+++ edited/drivers/pcmcia/yenta_socket.c	Mon Feb 16 18:23:50 2004
@@ -648,6 +648,8 @@
 
 	pci_release_regions(dev);
 	pci_set_drvdata(dev, NULL);
+
+	kfree(sock);
 }
 
 
@@ -662,6 +664,59 @@
 };
 
 
+/*
+ * Only probe "regular" interrupts, don't
+ * touch dangerous spots like the mouse irq,
+ * because there are mice that apparently
+ * get really confused if they get fondled
+ * too intimately.
+ *
+ * Default to 11, 10, 9, 7, 6, 5, 4, 3.
+ */
+static u32 isa_interrupts = 0x0ef8;
+
+static unsigned int yenta_probe_irq(struct yenta_socket *socket, u32 isa_irq_mask)
+{
+	int i;
+	unsigned long val;
+	u16 bridge_ctrl;
+	u32 mask;
+
+	/* Set up ISA irq routing to probe the ISA irqs.. */
+	bridge_ctrl = config_readw(socket, CB_BRIDGE_CONTROL);
+	if (!(bridge_ctrl & CB_BRIDGE_INTR)) {
+		bridge_ctrl |= CB_BRIDGE_INTR;
+		config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
+	}
+
+	/*
+	 * Probe for usable interrupts using the force
+	 * register to generate bogus card status events.
+	 */
+	cb_writel(socket, CB_SOCKET_EVENT, -1);
+	cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
+	exca_writeb(socket, I365_CSCINT, 0);
+	val = probe_irq_on() & isa_irq_mask;
+	for (i = 1; i < 16; i++) {
+		if (!((val >> i) & 1))
+			continue;
+		exca_writeb(socket, I365_CSCINT, I365_CSC_STSCHG | (i << 4));
+		cb_writel(socket, CB_SOCKET_FORCE, CB_FCARDSTS);
+		udelay(100);
+		cb_writel(socket, CB_SOCKET_EVENT, -1);
+	}
+	cb_writel(socket, CB_SOCKET_MASK, 0);
+	exca_writeb(socket, I365_CSCINT, 0);
+
+	mask = probe_irq_mask(val) & 0xffff;
+
+	bridge_ctrl &= ~CB_BRIDGE_INTR;
+	config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
+
+	return mask;
+}
+
+
 #include "ti113x.h"
 #include "ricoh.h"
 #include "topic.h"
@@ -715,58 +770,6 @@
 	},
 };
 
-
-/*
- * Only probe "regular" interrupts, don't
- * touch dangerous spots like the mouse irq,
- * because there are mice that apparently
- * get really confused if they get fondled
- * too intimately.
- *
- * Default to 11, 10, 9, 7, 6, 5, 4, 3.
- */
-static u32 isa_interrupts = 0x0ef8;
-
-static unsigned int yenta_probe_irq(struct yenta_socket *socket, u32 isa_irq_mask)
-{
-	int i;
-	unsigned long val;
-	u16 bridge_ctrl;
-	u32 mask;
-
-	/* Set up ISA irq routing to probe the ISA irqs.. */
-	bridge_ctrl = config_readw(socket, CB_BRIDGE_CONTROL);
-	if (!(bridge_ctrl & CB_BRIDGE_INTR)) {
-		bridge_ctrl |= CB_BRIDGE_INTR;
-		config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
-	}
-
-	/*
-	 * Probe for usable interrupts using the force
-	 * register to generate bogus card status events.
-	 */
-	cb_writel(socket, CB_SOCKET_EVENT, -1);
-	cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
-	exca_writeb(socket, I365_CSCINT, 0);
-	val = probe_irq_on() & isa_irq_mask;
-	for (i = 1; i < 16; i++) {
-		if (!((val >> i) & 1))
-			continue;
-		exca_writeb(socket, I365_CSCINT, I365_CSC_STSCHG | (i << 4));
-		cb_writel(socket, CB_SOCKET_FORCE, CB_FCARDSTS);
-		udelay(100);
-		cb_writel(socket, CB_SOCKET_EVENT, -1);
-	}
-	cb_writel(socket, CB_SOCKET_MASK, 0);
-	exca_writeb(socket, I365_CSCINT, 0);
-
-	mask = probe_irq_mask(val) & 0xffff;
-
-	bridge_ctrl &= ~CB_BRIDGE_INTR;
-	config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
-
-	return mask;
-}
 
 /*
  * Set static data that doesn't need re-initializing..





From rmk+lkml at arm.linux.org.uk  Tue Feb 24 00:00:51 2004
From: rmk+lkml at arm.linux.org.uk (Russell King)
Date: Tue Feb 24 00:01:00 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <200402240033.31042.daniel.ritz@gmx.ch>;
	from daniel.ritz@gmx.ch on Tue, Feb 24, 2004 at 12:33:31AM +0100
References: <200402240033.31042.daniel.ritz@gmx.ch>
Message-ID: <20040224000051.C25358@flint.arm.linux.org.uk>

On Tue, Feb 24, 2004 at 12:33:31AM +0100, Daniel Ritz wrote:
> this patch should fix up wrongly initialized TI bridges. in a safe way
> (hopefully).

Unfortunately not.

This is a working setup:

DCR = 6162
MUX = fba97543

Changing MUX from those values _breaks_.  Let's see what the code does.

> +	/* check IRQ routing to see if 16bit cards would work */
> +	irqmux = irqmux_old = config_readl(socket, TI122X_IRQMUX);
> +	devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
> +	printk(KERN_INFO "Yenta TI: irqmux %08x, devctl %02x\n", irqmux, devctl);
> +
> +#if 1
> +	/* serialized interrupts: MFUNC3 must be IRQSER */
> +	if (devctl & TI113X_DCR_IMODE_SERIAL)
> +		irqmux = (irqmux & ~0xf000) | 0x1000;
> +#endif

DCR doesn't have bit 2 set, so we don't change this (which is fine.)

>  
> +#if 1
> +	/* if we have all serial: probe, fall back to parallel PCI */
> +	if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {

Not true, so this is skipped (which again is fine.)

> +		/* write down if changed, probe */
> +		if (irqmux_old != irqmux) {
> +			printk(KERN_INFO "Yenta TI: changing to %08x", irqmux);
>  			config_writel(socket, TI122X_IRQMUX, irqmux);
> +		}
> +	
> +		probe_mask = yenta_probe_irq(socket, isa_interrupts);
> +		if (!probe_mask) {
> +			/* no chance to have all serial working -> PCI */
> +			printk(KERN_INFO "Yenta TI: serial interrupts not working -> PCI\n");
> +			devctl &= ~TI113X_DCR_IMODE_MASK;
>  			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
>  		}
>  	}
>  #endif
>  
> +	/* parallel PCI interrupts: MFUNC0 must be INTA */
> +	if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {

Ok, this is true.

> +		u32 sysctl;
> +		irqmux = (irqmux & ~0x0f) | 0x02;

Whoops, we've just taken out IRQ3 as a routed ISA IRQ.

> +
> +		/* route INTB depending on INTRTIE */
> +		switch (socket->dev->device) {
> +			/* there are more... */
> +			case PCI_DEVICE_ID_TI_1220:
> +			case PCI_DEVICE_ID_TI_1221:
> +			case PCI_DEVICE_ID_TI_1225:
> +			case PCI_DEVICE_ID_TI_1420:
> +			case PCI_DEVICE_ID_TI_1450:
> +			//case PCI_DEVICE_ID_TI_1451:
> +			case PCI_DEVICE_ID_TI_1520:
> +				sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
> +				if (!(sysctl & TI122X_SCR_INTRTIE))
> +					irqmux = (irqmux & ~0xf0) | 0x20;

Whoops, just taken out IRQ4 as a routed ISA IRQ.

> +
> +			default:
> +				break;
> +		}
> +	}
> +
> +	if (irqmux_old != irqmux) {
> +		printk(KERN_INFO "Yenta TI: changing to %08x", irqmux);
> +		config_writel(socket, TI122X_IRQMUX, irqmux);
> +	}

Net result - not good and probably not acceptable.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From daniel.ritz at gmx.ch  Tue Feb 24 01:32:31 2004
From: daniel.ritz at gmx.ch (Daniel Ritz)
Date: Tue Feb 24 00:33:55 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <20040224000051.C25358@flint.arm.linux.org.uk>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<20040224000051.C25358@flint.arm.linux.org.uk>
Message-ID: <200402240132.31659.daniel.ritz@gmx.ch>

On Tuesday 24 February 2004 01:00, Russell King wrote:
> On Tue, Feb 24, 2004 at 12:33:31AM +0100, Daniel Ritz wrote:
> > this patch should fix up wrongly initialized TI bridges. in a safe way
> > (hopefully).
> 
> Unfortunately not.
> 
> This is a working setup:
> 
> DCR = 6162
> MUX = fba97543
> 
> Changing MUX from those values _breaks_.  Let's see what the code does.
> 
> > +	/* check IRQ routing to see if 16bit cards would work */
> > +	irqmux = irqmux_old = config_readl(socket, TI122X_IRQMUX);
> > +	devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
> > +	printk(KERN_INFO "Yenta TI: irqmux %08x, devctl %02x\n", irqmux, devctl);
> > +
> > +#if 1
> > +	/* serialized interrupts: MFUNC3 must be IRQSER */
> > +	if (devctl & TI113X_DCR_IMODE_SERIAL)
> > +		irqmux = (irqmux & ~0xf000) | 0x1000;
> > +#endif
> 
> DCR doesn't have bit 2 set, so we don't change this (which is fine.)
> 
> >  
> > +#if 1
> > +	/* if we have all serial: probe, fall back to parallel PCI */
> > +	if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
> 
> Not true, so this is skipped (which again is fine.)
> 
> > +		/* write down if changed, probe */
> > +		if (irqmux_old != irqmux) {
> > +			printk(KERN_INFO "Yenta TI: changing to %08x", irqmux);
> >  			config_writel(socket, TI122X_IRQMUX, irqmux);
> > +		}
> > +	
> > +		probe_mask = yenta_probe_irq(socket, isa_interrupts);
> > +		if (!probe_mask) {
> > +			/* no chance to have all serial working -> PCI */
> > +			printk(KERN_INFO "Yenta TI: serial interrupts not working -> PCI\n");
> > +			devctl &= ~TI113X_DCR_IMODE_MASK;
> >  			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
> >  		}
> >  	}
> >  #endif
> >  
> > +	/* parallel PCI interrupts: MFUNC0 must be INTA */
> > +	if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
> 
> Ok, this is true.
> 
> > +		u32 sysctl;
> > +		irqmux = (irqmux & ~0x0f) | 0x02;
> 
> Whoops, we've just taken out IRQ3 as a routed ISA IRQ.

ok, not good. what about: read the routing in MFUNC0, test if it works, only set to PCI
if it doesn't work. the problem is we can't test if another device already sits on that irq.
we shouldn't do anything then.

> 
> > +
> > +		/* route INTB depending on INTRTIE */
> > +		switch (socket->dev->device) {
> > +			/* there are more... */
> > +			case PCI_DEVICE_ID_TI_1220:
> > +			case PCI_DEVICE_ID_TI_1221:
> > +			case PCI_DEVICE_ID_TI_1225:
> > +			case PCI_DEVICE_ID_TI_1420:
> > +			case PCI_DEVICE_ID_TI_1450:
> > +			//case PCI_DEVICE_ID_TI_1451:
> > +			case PCI_DEVICE_ID_TI_1520:
> > +				sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
> > +				if (!(sysctl & TI122X_SCR_INTRTIE))
> > +					irqmux = (irqmux & ~0xf0) | 0x20;
> 
> Whoops, just taken out IRQ4 as a routed ISA IRQ.

same as for MFUNC0: test first. or delete that part. and even set IRQTIE on these chips
if we have to use PCI fallback?

> 
> > +
> > +			default:
> > +				break;
> > +		}
> > +	}
> > +
> > +	if (irqmux_old != irqmux) {
> > +		printk(KERN_INFO "Yenta TI: changing to %08x", irqmux);
> > +		config_writel(socket, TI122X_IRQMUX, irqmux);
> > +	}
> 
> Net result - not good and probably not acceptable.

yeah, not as it is now. more checks are needed, PCI fallback only if nothing else works.
may be we should just make it a module param like in pcmcia-cs i82365.c?

new patch later today (first some sleep and work)

> 
> -- 
> Russell King
>  Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
>  maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
>                  2.6 Serial core
> 
> 


From proski at gnu.org  Mon Feb 23 19:46:35 2004
From: proski at gnu.org (Pavel Roskin)
Date: Tue Feb 24 00:46:44 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <20040224000051.C25358@flint.arm.linux.org.uk>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<20040224000051.C25358@flint.arm.linux.org.uk>
Message-ID: <Pine.LNX.4.58.0402231920110.30605@marabou.research.att.com>

On Tue, 24 Feb 2004, Russell King wrote:

> On Tue, Feb 24, 2004 at 12:33:31AM +0100, Daniel Ritz wrote:
> > this patch should fix up wrongly initialized TI bridges. in a safe way
> > (hopefully).
>
> Unfortunately not.

I admire your ability to see problems so fast.

Could you please look at my patch that I posted many times (attached
again)?  It's much simpler than the one by Daniel.

First of all, it removes the old attempts to fix the TI issue.  You can
always leave them intact if you want.

The fixup is applied is following conditions are met:

1) The card is a ti12xx or newer.  If older cards need any fixups, they
are going to be different.  Such cards don't have irqmux.

2) No ISA interrupts were detected.  That is, we are not breaking working
systems with ISA or serial ISA interrupts.

3) irqmux (the 32 bit value) is 0.  This value is not compatible with
working PCI interrupts.  Also, being 0 is a sign that irqmux wasn't
initialized from EEPROM.

Those conditions, if implemented properly (I hope so) mean that we are not
breaking existing functionality.

My testing shows that this patch fixes interrupts on certain TI PCI1410
cards with one slot.  I believe they have EEPROM but cannot be programmed.
I actually tried that and I can describe my attempts in more details in a
separate thread.

I also have a two-slot TI PCI1221 card, but it has proper irqmux and
doesn't need any fixups.

If any two-slot TI card needs to be supported, it can be done.  Most
likely this patch will set up interrupts at least for one of the slots,
which is good already.  I don't trust my skills to code from specs without
testing, so it's quite deliberate that the code makes no attempts to
support the second slot.  I can do it using the pcmcia-cs i82365 driver as
the starting point.

Please let me know what I can do make the kernel support TI PCI1410
bridges.  I have a lot of them on many systems, and it's quite an
annoyance to patch the kernel every time for each of those systems.  I'm
ready to put efforts into fixing this problem permanently.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- linux.orig/drivers/pcmcia/ti113x.h
+++ linux/drivers/pcmcia/ti113x.h
@@ -281,33 +281,6 @@ static int ti_override(struct yenta_sock
 
 	ti_set_zv(socket);
 
-#if 0
-	/*
-	 * If ISA interrupts don't work, then fall back to routing card
-	 * interrupts to the PCI interrupt of the socket.
-	 *
-	 * Tweaking this when we are using serial PCI IRQs causes hangs
-	 *   --rmk
-	 */
-	if (!socket->socket.irq_mask) {
-		u8 irqmux, devctl;
-
-		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-		if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
-			printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
-
-			devctl &= ~TI113X_DCR_IMODE_MASK;
-
-			irqmux = config_readl(socket, TI122X_IRQMUX);
-			irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-			irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
-
-			config_writel(socket, TI122X_IRQMUX, irqmux);
-			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
-		}
-	}
-#endif
-
 	return 0;
 }
 
@@ -347,6 +320,33 @@ static int ti12xx_override(struct yenta_
 	printk(KERN_INFO "Yenta: Routing CardBus interrupts to %s\n",
 		(val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");
 
+	/*
+	 * If ISA interrupts don't work, fall back to routing card
+	 * interrupts to the PCI bus.  Only do it if multifunction
+	 * routing register (irqmux) is in the default state, i.e.
+	 * the card wasn't initialized.
+	 */
+	if (!socket->socket.irq_mask) {
+		u32 irqmux;
+
+		irqmux = config_readl(socket, TI122X_IRQMUX);
+
+		if (irqmux == 0) {
+			u8 devctl;
+
+			printk (KERN_INFO "ti113x: Uninitialized IRQ routing "
+				"detected, enabling PCI interrupts\n");
+
+			/* Route INTA to MFUNC0 */
+			config_writel(socket, TI122X_IRQMUX, 0x02);
+
+			/* Enable parallel PCI interrupts */
+			devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
+			devctl &= ~TI113X_DCR_IMODE_MASK;
+			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
+		}
+	}
+
 	return ti_override(socket);
 }
 
@@ -366,26 +366,6 @@ static int ti1250_override(struct yenta_
 		config_writeb(socket, TI1250_DIAGNOSTIC, diag);
 	}
 
-#if 0
-	/*
-	 * This is highly machine specific, and we should NOT touch
-	 * this register - we have no knowledge how the hardware
-	 * is actually wired.
-	 *
-	 * If we're going to do this, we should probably look into
-	 * using the subsystem IDs.
-	 *
-	 * On ThinkPad 380XD, this changes MFUNC0 from the ISA IRQ3
-	 * output (which it is) to IRQ2.  We also change MFUNC1
-	 * from ISA IRQ4 to IRQ6.
-	 */
-	irqmux = config_readl(socket, TI122X_IRQMUX);
-	irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-	if (!(ti_sysctl(socket) & TI122X_SCR_INTRTIE))
-		irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
-	config_writel(socket, TI122X_IRQMUX, irqmux);
-#endif
-
 	return ti12xx_override(socket);
 }
 
From proski at gnu.org  Mon Feb 23 20:06:05 2004
From: proski at gnu.org (Pavel Roskin)
Date: Tue Feb 24 01:06:10 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <200402240132.31659.daniel.ritz@gmx.ch>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<20040224000051.C25358@flint.arm.linux.org.uk>
	<200402240132.31659.daniel.ritz@gmx.ch>
Message-ID: <Pine.LNX.4.58.0402231947520.30747@marabou.research.att.com>

On Tue, 24 Feb 2004, Daniel Ritz wrote:

> ok, not good. what about: read the routing in MFUNC0, test if it works,
> only set to PCI if it doesn't work. the problem is we can't test if
> another device already sits on that irq. we shouldn't do anything then.

What if we just check if irqmux is 0.  Is it 0 on your card?  I believe
the only problem is the the cards that don't have irqmux initialized from
EEPROM.

I think that your fix is too intrusive.  I'm not sure it's worth it.
After all, we are not going to support every possible piece of broken
hardware, only those that are relatively widespread.  I have one, you have
one (presumably), let's see what we have.

Could you please give more information about your hardware?  My hardware
is a card based on TI PCI1410 with broken EEPROM.  It has one slot.
irqmux is 0 on startup.  Attempts to write to EEPROM damage the card
permanently.  It stops working as a valid PCI device and prevents booting
Linux with PCI support.

I'm concerned that you are reading irqmux in ti_override(), which is also
used in bridges without irqmux.  Those bridges only need changes in devctl
if any.  The fix should be in ti12xx_override() or even ti1250_override().

> yeah, not as it is now. more checks are needed, PCI fallback only if
> nothing else works. may be we should just make it a module param like in
> pcmcia-cs i82365.c?

The parameter would be the last resort.  Shifting the problem to the users
is more like a surrender than a victory.  Not to mention that such
approach won't work well with multiple card and/or solid kernel.

-- 
Regards,
Pavel Roskin

From willy at debian.org  Tue Feb 24 01:16:52 2004
From: willy at debian.org (Matthew Wilcox)
Date: Tue Feb 24 01:17:00 2004
Subject: help for Cardbus CF adaptor
In-Reply-To: <20040224004431.92309.qmail@web41202.mail.yahoo.com>
References: <20040223130507.GS11824@parcelfarce.linux.theplanet.co.uk>
	<20040224004431.92309.qmail@web41202.mail.yahoo.com>
Message-ID: <20040224011652.GI25779@parcelfarce.linux.theplanet.co.uk>

On Mon, Feb 23, 2004 at 04:44:31PM -0800, Dan Baryon wrote:
> 
> lspci does show the presence of the adaptor. The line
> about
> the adaptor is:
> 
> 
> 03:00.0 Unknown mass storage controller: Workbit
> Corporation: Unknown device f021 (rev 01)
> 
> It shows the controller is from Workbit. 
> Thanks.

OK.  We have a SCSI Workbit driver, but that doesn't claim to support
device f021.  So we don't know if it'll work.  The class code is a little
concerning -- it doesn't claim to be either SCSI or IDE.  Someone needs
to talk to Workbit and try and get documentation for writing a driver
for it, I guess.

I found http://www.workbit.co.jp/ts/english/z_npata32-e.html which may
be of some help.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

From daniel.ritz at alcatel.ch  Tue Feb 24 12:59:50 2004
From: daniel.ritz at alcatel.ch (Daniel Ritz)
Date: Tue Feb 24 12:02:05 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <Pine.LNX.4.58.0402231947520.30747@marabou.research.att.com>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<200402240132.31659.daniel.ritz@gmx.ch>
	<Pine.LNX.4.58.0402231947520.30747@marabou.research.att.com>
Message-ID: <200402241259.50046.daniel.ritz@alcatel.ch>

On Tuesday 24 February 2004 02:06, Pavel Roskin wrote:
> On Tue, 24 Feb 2004, Daniel Ritz wrote:
> > ok, not good. what about: read the routing in MFUNC0, test if it works,
> > only set to PCI if it doesn't work. the problem is we can't test if
> > another device already sits on that irq. we shouldn't do anything then.
>
> What if we just check if irqmux is 0.  Is it 0 on your card?  I believe
> the only problem is the the cards that don't have irqmux initialized from
> EEPROM.

not good. newer chips (eg 1520) have a default value != 0. when a manufacter
forgets the serial ROM and does nothing in the BIOS you end up with default
values (eg. the 1520 has all serial interrupts). for the 1410 irqmux defaults to 0.

>
> I think that your fix is too intrusive.  I'm not sure it's worth it.

currently yes, i try to do better in the next version.

> After all, we are not going to support every possible piece of broken
> hardware, only those that are relatively widespread.  I have one, you have
> one (presumably), let's see what we have.
>

not broken hardware. uninitialized hardware. hardware that doesn't work with
yenta_socket but works with some redmond os...bad...

> Could you please give more information about your hardware?  My hardware
> is a card based on TI PCI1410 with broken EEPROM.  It has one slot.
> irqmux is 0 on startup.  Attempts to write to EEPROM damage the card
> permanently.  It stops working as a valid PCI device and prevents booting
> Linux with PCI support.

it's a 1410. and it's working. almost. with the redmond os it works, with linux
it works too and with freebsd the laptop dies as soon as inserting a card.

it's programmed for serial interrputs and PCI, INTA is routed. so not really
a problem there. (and my patch does _nothing_ there :)

>
> I'm concerned that you are reading irqmux in ti_override(), which is also
> used in bridges without irqmux.  Those bridges only need changes in devctl
> if any.  The fix should be in ti12xx_override() or even ti1250_override().

good catch...ti113x is one w/o irqmux...so yes ti12xx_override is the right place.
another bug in the disabled code...and i think in 2.4 too)

>
> > yeah, not as it is now. more checks are needed, PCI fallback only if
> > nothing else works. may be we should just make it a module param like in
> > pcmcia-cs i82365.c?
>
> The parameter would be the last resort.  Shifting the problem to the users
> is more like a surrender than a victory.  Not to mention that such
> approach won't work well with multiple card and/or solid kernel.

of course a module param would suck. that's why i didn't write code.

there's another bug btw. one that is probably never hit and harmless too:
rmk's notbook has parellel isa interrupts, INTA is _not_ routed. if it happens
that all the interrupts are taken by other devices the resource manager falls
back to routing the card to PCI which we know is not working...however
it is not happening on a notebook.



From rmk+lkml at arm.linux.org.uk  Tue Feb 24 12:40:11 2004
From: rmk+lkml at arm.linux.org.uk (Russell King)
Date: Tue Feb 24 12:40:20 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <200402241259.50046.daniel.ritz@alcatel.ch>;
	from daniel.ritz@alcatel.ch on Tue, Feb 24, 2004 at 12:59:50PM +0100
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<200402240132.31659.daniel.ritz@gmx.ch>
	<Pine.LNX.4.58.0402231947520.30747@marabou.research.att.com>
	<200402241259.50046.daniel.ritz@alcatel.ch>
Message-ID: <20040224124011.A30975@flint.arm.linux.org.uk>

On Tue, Feb 24, 2004 at 12:59:50PM +0100, Daniel Ritz wrote:
> there's another bug btw. one that is probably never hit and harmless too:
> rmk's notbook has parellel isa interrupts, INTA is _not_ routed.

Not true.  It has parallel ISA interrupts _and_ parallel PCI interrupts.
It's a TI 1250.  Unfortunately, the 1250 data sheet isn't available,
however there seems to be some consistency in the device codes to
features offered.

The 1450 and 1251A (both of which seem similar to 1250) has separate pins
for PCI parallel interrupts which are outside the control of the "IRQMUX"
register.  When these pins are not used for parallel PCI interrupts,
they function as "GPIO3" and "IRQSER" (for PCI serial interrupts)
respectively.  The function of these pins is controlled by the device
control register.

Please note that "IRQMUX" is a misleading definition of the register in
question.  The register programs various multifunction pins on the device
which _may_ be IRQ outputs, LED outputs, ZV switching outputs, audio, or
even GPIO.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From rmk+lkml at arm.linux.org.uk  Tue Feb 24 12:44:07 2004
From: rmk+lkml at arm.linux.org.uk (Russell King)
Date: Tue Feb 24 12:44:24 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <Pine.LNX.4.58.0402231920110.30605@marabou.research.att.com>;
	from proski@gnu.org on Mon, Feb 23, 2004 at 07:46:35PM -0500
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<20040224000051.C25358@flint.arm.linux.org.uk>
	<Pine.LNX.4.58.0402231920110.30605@marabou.research.att.com>
Message-ID: <20040224124407.B30975@flint.arm.linux.org.uk>

On Mon, Feb 23, 2004 at 07:46:35PM -0500, Pavel Roskin wrote:
> On Tue, 24 Feb 2004, Russell King wrote:
> > On Tue, Feb 24, 2004 at 12:33:31AM +0100, Daniel Ritz wrote:
> > > this patch should fix up wrongly initialized TI bridges. in a safe way
> > > (hopefully).
> >
> > Unfortunately not.
> 
> I admire your ability to see problems so fast.

Only because I've hit this problem before.  With the original IRQMUX
patches, they managed to probe the available IRQs (finding IRQ3 and IRQ4
available) and then changed IRQMUX preventing these signals working.

The net result was that an inserted card was allocated IRQ3 or IRQ4
and no surprises that it was unable to signal its interrupt.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From daniel.ritz at alcatel.ch  Tue Feb 24 16:23:11 2004
From: daniel.ritz at alcatel.ch (Daniel Ritz)
Date: Tue Feb 24 15:25:04 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <20040224124011.A30975@flint.arm.linux.org.uk>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<200402241259.50046.daniel.ritz@alcatel.ch>
	<20040224124011.A30975@flint.arm.linux.org.uk>
Message-ID: <200402241623.11569.daniel.ritz@alcatel.ch>

[removing akpm from cc as it is pcmcia centric]

On Tuesday 24 February 2004 13:40, Russell King wrote:
> On Tue, Feb 24, 2004 at 12:59:50PM +0100, Daniel Ritz wrote:
> > there's another bug btw. one that is probably never hit and harmless too:
> > rmk's notbook has parellel isa interrupts, INTA is _not_ routed.
>
> Not true.  It has parallel ISA interrupts _and_ parallel PCI interrupts.
> It's a TI 1250.  Unfortunately, the 1250 data sheet isn't available,
> however there seems to be some consistency in the device codes to
> features offered.

ok, i see the 1250, 1450 are different. the 1410/1520 doc says nothing about it.
did i miss something about the 1410/1520/etc ?

>
> The 1450 and 1251A (both of which seem similar to 1250) has separate pins
> for PCI parallel interrupts which are outside the control of the "IRQMUX"
> register.  When these pins are not used for parallel PCI interrupts,
> they function as "GPIO3" and "IRQSER" (for PCI serial interrupts)
> respectively.  The function of these pins is controlled by the device
> control register.
>
> Please note that "IRQMUX" is a misleading definition of the register in
> question.  The register programs various multifunction pins on the device
> which _may_ be IRQ outputs, LED outputs, ZV switching outputs, audio, or
> even GPIO.

TI calls it Multifunction Routing Register for a reason :)

so i think the safe way would be:
- move routing code to 12xx_override()
- first test interrupts, do nothing if working correct
- try to reflect the settings in device control register, test again
- fall back to pci if nothing works
- handle the 125x/1450 by not touching MFUNC0
- don't do INTB routing, set INTRTIE instead (on 2 slot chips)
(- remove the bad code from 2.4 and do the same)


From dhinds at sonic.net  Tue Feb 24 08:38:01 2004
From: dhinds at sonic.net (David Hinds)
Date: Tue Feb 24 16:38:21 2004
Subject: [PATCH] yenta: irq-routing for TI bridges
In-Reply-To: <20040224124011.A30975@flint.arm.linux.org.uk>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<200402240132.31659.daniel.ritz@gmx.ch>
	<Pine.LNX.4.58.0402231947520.30747@marabou.research.att.com>
	<200402241259.50046.daniel.ritz@alcatel.ch>
	<20040224124011.A30975@flint.arm.linux.org.uk>
Message-ID: <20040224163801.GA3398@sonic.net>

On Tue, Feb 24, 2004 at 12:40:11PM +0000, Russell King wrote:
> 
> Not true.  It has parallel ISA interrupts _and_ parallel PCI interrupts.
> It's a TI 1250.  Unfortunately, the 1250 data sheet isn't available,
> however there seems to be some consistency in the device codes to
> features offered.

I have a TI 1250 data sheet (well 1250A, which is what I think you
actually have).

> The 1450 and 1251A (both of which seem similar to 1250) has separate pins
> for PCI parallel interrupts which are outside the control of the "IRQMUX"
> register.  When these pins are not used for parallel PCI interrupts,
> they function as "GPIO3" and "IRQSER" (for PCI serial interrupts)
> respectively.  The function of these pins is controlled by the device
> control register.

The 1250A is the same.

-- Dave

From jt at bougret.hpl.hp.com  Tue Feb 24 14:05:12 2004
From: jt at bougret.hpl.hp.com (Jean Tourrilhes)
Date: Tue Feb 24 22:09:16 2004
Subject: [BUG] unable to apply power.
Message-ID: <20040224220512.GA5689@bougret.hpl.hp.com>

	Hi,

	After a few successful insertion/removal, my CardBus socket
developped this problem :
-------------------------------
PCMCIA: socket cf339030: unable to apply power.
-------------------------------
	And after that, the network Cardbus driver loads but doesn't
get any interrupts.

	I wonder how I shoulddebug that. By the way, this is 2.6.3
with :
-----------------------------------------
00:13.0 CardBus bridge: Ricoh Co Ltd RL5c475 (rev 80)
        Flags: bus master, medium devsel, latency 168, IRQ 17
        Memory at 10000000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=03, subordinate=06, sec-latency=176
        Memory window 0: 10400000-107ff000 (prefetchable)
        Memory window 1: 10800000-10bff000
        I/O window 0: 00004000-000040ff
        I/O window 1: 00004400-000044ff
        16-bit legacy interface ports at 0001
-----------------------------------------

	Thanks !

	Jean


From muthur at cereal.rutgers.edu  Tue Feb 24 17:58:49 2004
From: muthur at cereal.rutgers.edu (Muthukumar Ratty)
Date: Tue Feb 24 22:58:58 2004
Subject: test
Message-ID: <Pine.GSO.4.21.0402241758430.24627-100000@cereal.rutgers.edu>




From muthur at cereal.rutgers.edu  Tue Feb 24 18:02:15 2004
From: muthur at cereal.rutgers.edu (Muthukumar Ratty)
Date: Tue Feb 24 23:02:18 2004
Subject: Document for PCMCIA in 2.6 kernel.
Message-ID: <Pine.GSO.4.21.0402241759431.24627-100000@cereal.rutgers.edu>



Hi,
Is there any document out there that explains PCMCIA system in 2.6 kernel.
I got the cardservices link...
http://pcmcia-cs.sourceforge.net
but it mentions that 2.5/2.6 has different subsystem.
Any pointers would be appreciated.

thanks
Muthu.




From rmk+pcmcia at arm.linux.org.uk  Tue Feb 24 23:05:04 2004
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Tue Feb 24 23:05:20 2004
Subject: [BUG] unable to apply power.
In-Reply-To: <20040224220512.GA5689@bougret.hpl.hp.com>;
	from jt@bougret.hpl.hp.com on Tue, Feb 24, 2004 at 02:05:12PM -0800
References: <20040224220512.GA5689@bougret.hpl.hp.com>
Message-ID: <20040224230504.D4406@flint.arm.linux.org.uk>

On Tue, Feb 24, 2004 at 02:05:12PM -0800, Jean Tourrilhes wrote:
> 	After a few successful insertion/removal, my CardBus socket
> developped this problem :
> -------------------------------
> PCMCIA: socket cf339030: unable to apply power.
> -------------------------------
> 	And after that, the network Cardbus driver loads but doesn't
> get any interrupts.

I've seen something similar here on my CL PD6833... but only once.
I tried prodding various registers to persuade it to apply power,
but it refused and it wanted a reset.

Unfortunately I've not been able to reproduce it since.  Is yours
reproducable, if so how reproduable?  What are you doing when it
occurs?  Are you allowing a number of seconds between insert and
remove?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From rmk+pcmcia at arm.linux.org.uk  Tue Feb 24 23:10:18 2004
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Tue Feb 24 23:10:25 2004
Subject: Document for PCMCIA in 2.6 kernel.
In-Reply-To: <Pine.GSO.4.21.0402241759431.24627-100000@cereal.rutgers.edu>;
	from muthur@cereal.rutgers.edu on Tue, Feb 24, 2004 at 06:02:15PM -0500
References: <Pine.GSO.4.21.0402241759431.24627-100000@cereal.rutgers.edu>
Message-ID: <20040224231018.E4406@flint.arm.linux.org.uk>

On Tue, Feb 24, 2004 at 06:02:15PM -0500, Muthukumar Ratty wrote:
> Is there any document out there that explains PCMCIA system in 2.6 kernel.
> I got the cardservices link...
> http://pcmcia-cs.sourceforge.net
> but it mentions that 2.5/2.6 has different subsystem.
> Any pointers would be appreciated.

No documentation work has yet occurred, so if you have specific questions
it's best to ask on this list.

Overall the subsystem remains the same, apart from:

- the CardServices() call is gone, and replaced with a bunch of
  pcmcia_* functions.  Eg, CardServices(GetConfigurationInfo, ...)
  is replaced by pcmcia_get_configuration_info(...)

- we now have a struct pcmcia_driver which contains the attach and
  detach callbacks, and the driver name.  This structure should be
  registered on module initialisation using pcmcia_register_driver()
  and deregistered using pcmcia_unregister_driver().

  Note that after pcmcia_unregister_driver() your driver still needs
  to walk its private dev_list.  See drivers/net/pcmcia/pcnet_cs.c
  as an example of this.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From hch at infradead.org  Tue Feb 24 23:21:24 2004
From: hch at infradead.org (Christoph Hellwig)
Date: Tue Feb 24 23:21:27 2004
Subject: Document for PCMCIA in 2.6 kernel.
In-Reply-To: <20040224231018.E4406@flint.arm.linux.org.uk>;
	from rmk+pcmcia@arm.linux.org.uk on Tue, Feb 24, 2004 at 11:10:18PM +0000
References: <Pine.GSO.4.21.0402241759431.24627-100000@cereal.rutgers.edu>
	<20040224231018.E4406@flint.arm.linux.org.uk>
Message-ID: <20040224232124.A30033@infradead.org>

On Tue, Feb 24, 2004 at 11:10:18PM +0000, Russell King wrote:
>   Note that after pcmcia_unregister_driver() your driver still needs
>   to walk its private dev_list.  See drivers/net/pcmcia/pcnet_cs.c
>   as an example of this.

Actually it doesn't if you don't play DEV_STALE_* tricks.  It just hasn't
been removed from all the drivers yet.


From jt at bougret.hpl.hp.com  Tue Feb 24 15:24:23 2004
From: jt at bougret.hpl.hp.com (Jean Tourrilhes)
Date: Tue Feb 24 23:24:28 2004
Subject: [BUG] unable to apply power.
In-Reply-To: <20040224230504.D4406@flint.arm.linux.org.uk>
References: <20040224220512.GA5689@bougret.hpl.hp.com>
	<20040224230504.D4406@flint.arm.linux.org.uk>
Message-ID: <20040224232423.GA6208@bougret.hpl.hp.com>

On Tue, Feb 24, 2004 at 11:05:04PM +0000, Russell King wrote:
> On Tue, Feb 24, 2004 at 02:05:12PM -0800, Jean Tourrilhes wrote:
> > 	After a few successful insertion/removal, my CardBus socket
> > developped this problem :
> > -------------------------------
> > PCMCIA: socket cf339030: unable to apply power.
> > -------------------------------
> > 	And after that, the network Cardbus driver loads but doesn't
> > get any interrupts.
> 
> I've seen something similar here on my CL PD6833... but only once.
> I tried prodding various registers to persuade it to apply power,
> but it refused and it wanted a reset.
> 
> Unfortunately I've not been able to reproduce it since.  Is yours
> reproducable, if so how reproduable?  What are you doing when it
> occurs?  Are you allowing a number of seconds between insert and
> remove?

	I've rebooted and now I'm stuck with a firmware download
bug. But, it seems that I don't see it anymore. I'll keep you posted.
	Thanks !

	Jean

From daniel.ritz at gmx.ch  Wed Feb 25 00:26:20 2004
From: daniel.ritz at gmx.ch (Daniel Ritz)
Date: Tue Feb 24 23:26:27 2004
Subject: [PATCH] yenta: irq-routing for TI bridges - take 2
In-Reply-To: <200402241623.11569.daniel.ritz@alcatel.ch>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<20040224124011.A30975@flint.arm.linux.org.uk>
	<200402241623.11569.daniel.ritz@alcatel.ch>
Message-ID: <200402250026.20708.daniel.ritz@gmx.ch>

hi

the last patch was bad...chaning stuff it shouldn't on TI125x, 145x...

another try...comments?
couldn't find datasheets for 1210, 1220, 1250 so i'm not quite sure about them....
compile tested (my TI works, so no difference there)

against 2.6.3-bk

rgds
-daniel


--- 1.139/include/linux/pci_ids.h	Fri Feb 20 17:57:29 2004
+++ edited/include/linux/pci_ids.h	Tue Feb 24 22:24:10 2004
@@ -704,6 +704,7 @@
 #define PCI_VENDOR_ID_TI		0x104c
 #define PCI_DEVICE_ID_TI_TVP4010	0x3d04
 #define PCI_DEVICE_ID_TI_TVP4020	0x3d07
+#define PCI_DEVICE_ID_TI_4450		0x8011
 #define PCI_DEVICE_ID_TI_1130		0xac12
 #define PCI_DEVICE_ID_TI_1031		0xac13
 #define PCI_DEVICE_ID_TI_1131		0xac15
@@ -720,6 +721,7 @@
 #define PCI_DEVICE_ID_TI_4451		0xac42
 #define PCI_DEVICE_ID_TI_1410		0xac50
 #define PCI_DEVICE_ID_TI_1420		0xac51
+#define PCI_DEVICE_ID_TI_1451A		0xac52
 #define PCI_DEVICE_ID_TI_1520		0xac55
 #define PCI_DEVICE_ID_TI_1510		0xac56
 
--- 1.51/drivers/pcmcia/yenta_socket.c	Wed Dec 31 01:35:29 2003
+++ edited/drivers/pcmcia/yenta_socket.c	Tue Feb 24 23:01:26 2004
@@ -662,6 +662,59 @@
 };
 
 
+/*
+ * Only probe "regular" interrupts, don't
+ * touch dangerous spots like the mouse irq,
+ * because there are mice that apparently
+ * get really confused if they get fondled
+ * too intimately.
+ *
+ * Default to 11, 10, 9, 7, 6, 5, 4, 3.
+ */
+static u32 isa_interrupts = 0x0ef8;
+
+static unsigned int yenta_probe_irq(struct yenta_socket *socket, u32 isa_irq_mask)
+{
+	int i;
+	unsigned long val;
+	u16 bridge_ctrl;
+	u32 mask;
+
+	/* Set up ISA irq routing to probe the ISA irqs.. */
+	bridge_ctrl = config_readw(socket, CB_BRIDGE_CONTROL);
+	if (!(bridge_ctrl & CB_BRIDGE_INTR)) {
+		bridge_ctrl |= CB_BRIDGE_INTR;
+		config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
+	}
+
+	/*
+	 * Probe for usable interrupts using the force
+	 * register to generate bogus card status events.
+	 */
+	cb_writel(socket, CB_SOCKET_EVENT, -1);
+	cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
+	exca_writeb(socket, I365_CSCINT, 0);
+	val = probe_irq_on() & isa_irq_mask;
+	for (i = 1; i < 16; i++) {
+		if (!((val >> i) & 1))
+			continue;
+		exca_writeb(socket, I365_CSCINT, I365_CSC_STSCHG | (i << 4));
+		cb_writel(socket, CB_SOCKET_FORCE, CB_FCARDSTS);
+		udelay(100);
+		cb_writel(socket, CB_SOCKET_EVENT, -1);
+	}
+	cb_writel(socket, CB_SOCKET_MASK, 0);
+	exca_writeb(socket, I365_CSCINT, 0);
+
+	mask = probe_irq_mask(val) & 0xffff;
+
+	bridge_ctrl &= ~CB_BRIDGE_INTR;
+	config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
+
+	return mask;
+}
+
+
 #include "ti113x.h"
 #include "ricoh.h"
 #include "topic.h"
@@ -717,58 +770,6 @@
 
 
 /*
- * Only probe "regular" interrupts, don't
- * touch dangerous spots like the mouse irq,
- * because there are mice that apparently
- * get really confused if they get fondled
- * too intimately.
- *
- * Default to 11, 10, 9, 7, 6, 5, 4, 3.
- */
-static u32 isa_interrupts = 0x0ef8;
-
-static unsigned int yenta_probe_irq(struct yenta_socket *socket, u32 isa_irq_mask)
-{
-	int i;
-	unsigned long val;
-	u16 bridge_ctrl;
-	u32 mask;
-
-	/* Set up ISA irq routing to probe the ISA irqs.. */
-	bridge_ctrl = config_readw(socket, CB_BRIDGE_CONTROL);
-	if (!(bridge_ctrl & CB_BRIDGE_INTR)) {
-		bridge_ctrl |= CB_BRIDGE_INTR;
-		config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
-	}
-
-	/*
-	 * Probe for usable interrupts using the force
-	 * register to generate bogus card status events.
-	 */
-	cb_writel(socket, CB_SOCKET_EVENT, -1);
-	cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
-	exca_writeb(socket, I365_CSCINT, 0);
-	val = probe_irq_on() & isa_irq_mask;
-	for (i = 1; i < 16; i++) {
-		if (!((val >> i) & 1))
-			continue;
-		exca_writeb(socket, I365_CSCINT, I365_CSC_STSCHG | (i << 4));
-		cb_writel(socket, CB_SOCKET_FORCE, CB_FCARDSTS);
-		udelay(100);
-		cb_writel(socket, CB_SOCKET_EVENT, -1);
-	}
-	cb_writel(socket, CB_SOCKET_MASK, 0);
-	exca_writeb(socket, I365_CSCINT, 0);
-
-	mask = probe_irq_mask(val) & 0xffff;
-
-	bridge_ctrl &= ~CB_BRIDGE_INTR;
-	config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
-
-	return mask;
-}
-
-/*
  * Set static data that doesn't need re-initializing..
  */
 static void yenta_get_socket_capabilities(struct yenta_socket *socket, u32 isa_irq_mask)
@@ -997,7 +998,6 @@
 	 * data sheets for these devices. --rmk)
 	 */
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1210, TI),
-	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1251B, TI),
 
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1130, TI113X),
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1131, TI113X),
@@ -1007,11 +1007,13 @@
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1221, TI12XX),
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1225, TI12XX),
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1251A, TI12XX),
+	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1251B, TI12XX),
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1420, TI12XX),
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1450, TI12XX),
+	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1451A, TI12XX),
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520, TI12XX),
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4410, TI12XX),
-//	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4450, TI12XX),
+	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4450, TI12XX),
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4451, TI12XX),
 
 	CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1250, TI1250),
--- 1.18/drivers/pcmcia/ti113x.h	Wed Aug 27 21:58:54 2003
+++ edited/drivers/pcmcia/ti113x.h	Wed Feb 25 00:21:23 2004
@@ -252,7 +252,7 @@
  * INTCTL register that sets the PCI CSC interrupt.
  * Make sure we set it correctly at open and init
  * time
- * - open: disable the PCI CSC interrupt. This makes
+ * - override: disable the PCI CSC interrupt. This makes
  *   it possible to use the CSC interrupt to probe the
  *   ISA interrupts.
  * - init: set the interrupt to match our PCI state.
@@ -281,33 +281,6 @@
 
 	ti_set_zv(socket);
 
-#if 0
-	/*
-	 * If ISA interrupts don't work, then fall back to routing card
-	 * interrupts to the PCI interrupt of the socket.
-	 *
-	 * Tweaking this when we are using serial PCI IRQs causes hangs
-	 *   --rmk
-	 */
-	if (!socket->socket.irq_mask) {
-		u8 irqmux, devctl;
-
-		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-		if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
-			printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
-
-			devctl &= ~TI113X_DCR_IMODE_MASK;
-
-			irqmux = config_readl(socket, TI122X_IRQMUX);
-			irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-			irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
-
-			config_writel(socket, TI122X_IRQMUX, irqmux);
-			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
-		}
-	}
-#endif
-
 	return 0;
 }
 
@@ -327,7 +300,9 @@
 
 static int ti12xx_override(struct yenta_socket *socket)
 {
-	u32 val;
+	u32 val, mfunc, mfunc_old, devctl;
+	unsigned probe_mask;
+	int ret;
 
 	/* make sure that memory burst is active */
 	val = config_readl(socket, TI113X_SYSTEM_CONTROL);
@@ -347,7 +322,105 @@
 	printk(KERN_INFO "Yenta: Routing CardBus interrupts to %s\n",
 		(val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");
 
-	return ti_override(socket);
+
+	/* need to call ti_override() before testing interrupts */
+	ret = ti_override(socket);
+	if (ret)
+		goto out;
+
+	/* probe interrupts before any 'fixup' */
+	probe_mask = yenta_probe_irq(socket, isa_interrupts);
+	if (probe_mask)
+		goto out;
+
+
+	/*
+	 * we're here which means interrupts are not delivered. try to fix it:
+	 * first look at device control register, change MFUNCs to match that.
+	 * fall back to PCI interrupts if interrupt test still fails
+	 *
+	 * the 125x/145x are special: they have an extra pin (non-MFUNC) for
+	 * INTA. don't mess around with MFUNC0
+	 * also some chips don't have an IRQSER setting in MFUNC3
+	 */
+
+	mfunc = mfunc_old = config_readl(socket, TI122X_IRQMUX);
+	devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
+	printk(KERN_INFO "Yenta TI: mfunc %08x, devctl %02x\n", mfunc, devctl);
+
+	/* serialized interrupts: MFUNC3 should be IRQSER */
+	if (devctl & TI113X_DCR_IMODE_SERIAL) {
+		switch (socket->dev->device) {
+			/* FIXME 1220, 1210?? no datasheets... */
+			case PCI_DEVICE_ID_TI_1250:
+			case PCI_DEVICE_ID_TI_1251A:
+			case PCI_DEVICE_ID_TI_1251B:
+			case PCI_DEVICE_ID_TI_4450:
+			case PCI_DEVICE_ID_TI_4451:
+				/* these chips have no IRQSER setting in MFUNC3  */
+				break;
+
+			default:
+				mfunc = (mfunc & ~0xf000) | 0x1000;
+
+				/* write down if changed, probe */
+				if (mfunc != mfunc_old) {
+					printk(KERN_INFO "Yenta TI: changing mfunc to %08x\n", mfunc);
+					config_writel(socket, TI122X_IRQMUX, mfunc);
+
+					probe_mask = yenta_probe_irq(socket, isa_interrupts);
+					if (probe_mask)
+						goto out;
+				}
+		}
+	}
+
+	/* all-serial and not working: fall back to PCI */
+	if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
+		printk(KERN_INFO "Yenta TI: falling back to PCI interrupts\n");
+		devctl &= ~TI113X_DCR_IMODE_MASK;
+		config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
+	}
+
+	/* parallel PCI interrupts: MFUNC0 -> INTA. not for 125x/145x */
+	switch (socket->dev->device) {
+		case PCI_DEVICE_ID_TI_1250:
+		case PCI_DEVICE_ID_TI_1251A:
+		case PCI_DEVICE_ID_TI_1251B:
+		case PCI_DEVICE_ID_TI_1450:
+			/* nada */
+			break;
+
+		default:
+			mfunc = (mfunc & ~0x0f) | 0x02;
+			if (mfunc != mfunc_old) {
+				printk(KERN_INFO "Yenta TI: changing mfunc to %08x\n", mfunc);
+				config_writel(socket, TI122X_IRQMUX, mfunc);
+			}
+	}
+
+#if 0
+	/* dual slot chips: routing of INTB / INTRTIE */
+	switch (socket->dev->device) {
+		case PCI_DEVICE_ID_TI_1220:
+		case PCI_DEVICE_ID_TI_1221:
+		case PCI_DEVICE_ID_TI_1225:
+		case PCI_DEVICE_ID_TI_1420:
+		case PCI_DEVICE_ID_TI_1450:
+		case PCI_DEVICE_ID_TI_1451:
+		case PCI_DEVICE_ID_TI_1520:
+			sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
+			if (!(sysctl & TI122X_SCR_INTRTIE))
+				mfunc = (mfunc & ~0xf0) | 0x20;
+
+			/* we could also do the opposite and just set INTRTIE */
+		default:
+			break;
+	}
+#endif
+
+out:
+	return ret;
 }
 
 
@@ -365,26 +438,6 @@
 			old, diag);
 		config_writeb(socket, TI1250_DIAGNOSTIC, diag);
 	}
-
-#if 0
-	/*
-	 * This is highly machine specific, and we should NOT touch
-	 * this register - we have no knowledge how the hardware
-	 * is actually wired.
-	 *
-	 * If we're going to do this, we should probably look into
-	 * using the subsystem IDs.
-	 *
-	 * On ThinkPad 380XD, this changes MFUNC0 from the ISA IRQ3
-	 * output (which it is) to IRQ2.  We also change MFUNC1
-	 * from ISA IRQ4 to IRQ6.
-	 */
-	irqmux = config_readl(socket, TI122X_IRQMUX);
-	irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-	if (!(ti_sysctl(socket) & TI122X_SCR_INTRTIE))
-		irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
-	config_writel(socket, TI122X_IRQMUX, irqmux);
-#endif
 
 	return ti12xx_override(socket);
 }




From proski at gnu.org  Wed Feb 25 01:55:09 2004
From: proski at gnu.org (Pavel Roskin)
Date: Wed Feb 25 06:55:15 2004
Subject: [PATCH] yenta: irq-routing for TI bridges - take 2
In-Reply-To: <200402250026.20708.daniel.ritz@gmx.ch>
References: <200402240033.31042.daniel.ritz@gmx.ch>
 <20040224124011.A30975@flint.arm.linux.org.uk>
 <200402241623.11569.daniel.ritz@alcatel.ch>
 <200402250026.20708.daniel.ritz@gmx.ch>
Message-ID: <Pine.LNX.4.58.0402250148080.2144@portland.hansa.lan>

On Wed, 25 Feb 2004, Daniel Ritz wrote:

> hi
>
> the last patch was bad...chaning stuff it shouldn't on TI125x, 145x...
>
> another try...comments?
> couldn't find datasheets for 1210, 1220, 1250 so i'm not quite sure about them....

http://www.mit.edu/afs/sipb/contrib/doc/specs/ic/bridge/

> compile tested (my TI works, so no difference there)

Works for me.  yenta_socket is compiled into the kernel.  Two cards:  TI
1221 with 2 slots (no fixup needed) and TI 1410 that needs it.


Yenta: CardBus bridge found at 0000:00:08.0 [133f:1233]
Yenta: Enabling burst memory read transactions
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: mfunc 0cc07d92, devctl 60
Yenta: ISA IRQ mask 0x0000, PCI irq 5
Socket status: 30000006
Yenta: CardBus bridge found at 0000:00:08.1 [133f:1233]
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: mfunc 0cc07d92, devctl 60
Yenta: ISA IRQ mask 0x0000, PCI irq 5
Socket status: 30000006
Yenta: CardBus bridge found at 0000:00:0a.0 [0000:0000]
Yenta: Enabling burst memory read transactions
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: mfunc 00000000, devctl 66
Yenta TI: changing mfunc to 00001000
Yenta TI: falling back to PCI interrupts
Yenta TI: changing mfunc to 00001002
Yenta: ISA IRQ mask 0x0000, PCI irq 12

$ cat /proc/interrupts
           CPU0
  0:     664717          XT-PIC  timer
  1:       1530          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  5:          3          XT-PIC  yenta, yenta, orinoco_cs
  7:          0          XT-PIC  acpi
  8:          4          XT-PIC  rtc
 10:       1502          XT-PIC  uhci_hcd, uhci_hcd
 11:         46          XT-PIC  eth0
 12:          3          XT-PIC  yenta, VIA686A, orinoco_cs
 14:      36354          XT-PIC  ide0
 15:         21          XT-PIC  ide1
NMI:          0
ERR:          0

-- 
Regards,
Pavel Roskin

From jelbert at magma.com  Wed Feb 25 12:44:56 2004
From: jelbert at magma.com (Julia Elbert)
Date: Wed Feb 25 19:45:32 2004
Subject: [PATCH] yenta: irq-routing for TI bridges - take 2
Message-ID: <3162A998932B93429CC9A7A6E17F56B70EF5C2@s02.mobl.com>

 Hello,
Just wanted to thank you for all the patch information. I have been
auditing this list for help with my project.
 
I am working on allocating resources to bridges behind the cardbus
controller. Currently, with the 2.6 kernel, I am using a 1225 TI
controller and am able to hack the register information in for my 2 dec
bridges, which then allows me to enable a memory/prefetch window for my
pci video card  that sits in our box of pci slots. This card uses the
brooktree part. I can then successfully load the bttv.ko for this pci
card that sits behind my bridges. 
 
Your work is aiding in my final solution to support our MAGMA Expansion
Products under Linux as we support it under Windows and Apple.

To Do: this is my task
3. Test on all laptops, we have every cb controller you have listed.
2. Get pci cards with i/o working, I am not able to hack a pci card that
uses i/o write a patch.
1. Write resource allocation code patch for bridges behind cardbus
bridges.
 
I took our code from Windows that we use to patch bridges and put in my
current linux configuration.
 
 
Here it is if you are interested. We also end up setting cacheline and
latency values to 0x10 and 0xf8 for performance reasons. 

Thanks again,
--Julia

static patchTable patchUp[] = {
	/* TI Bridge Chips */
	   VID     DID         Reg       Value
	{0x104c, 0xAC16, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC19, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC1B, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC1C, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC1D, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC1E, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC1F, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC40, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC41, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC42, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC50, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC51, 32, 0x80, 0x0, 0xc000,  0}, 
	{0x104c, 0xAC52, 32, 0x80, 0x0, 0xc000,  0}, 

	/* Richo Bridge Chips */
	{0x1180, 0x0465, 16, 0x80, 0x0, 0x0001, -1}, 
	{0x1180, 0x0466, 16, 0x80, 0x0, 0x0001, -1}, 
	{0x1180, 0x0475, 16, 0x80, 0x0, 0x0001, -1}, 
	{0x1180, 0x0476, 16, 0x80, 0x0, 0x0001, -1}, 
	{0x1180, 0x0478, 16, 0x80, 0x0, 0x0001, -1}, 

	/* Mobility Controlers */
	{0x14f2, 0x0001,  8, 0x58, 0x0, 0x0005, -1},
	{0x14f2, 0x0002,  8, 0x58, 0x0, 0x0005, -1},
	// {0x14f2, 0x0120,  8, 0x58, 0x0, 0x0005, -1},

	/* ENE Bridge Chips */
	{0x1524, 0x1211,  8, 0xC9, 0x42, 0x0004, -1}, /* ???? */
	{0x1524, 0x1211, 16, 0x80, 0x00, 0xC000, -1}, /* ???? */
	{0x1524, 0x1225,  8, 0xC9, 0x42, 0x0004, -1}, /* ???? */
	{0x1524, 0x1225, 16, 0x80, 0x00, 0xC000, -1}, /* ???? */
	{0x1524, 0x1410,  8, 0xC9, 0x42, 0x0004, -1},
	{0x1524, 0x1410, 16, 0x80, 0x00, 0xC000, -1},
	{0x1524, 0x1420,  8, 0xC9, 0x42, 0x0004, -1}, /* ???? */
	{0x1524, 0x1420, 16, 0x80, 0x00, 0xC000, -1}, /* ???? */

	/* Intel BAM Chipsets */
	{0x8086, 0x2448, 16, 0x50, 0x0, 0x0004, -1},	//jme 82801BAM
PCI-> Hub 
	{0x8086, 0x244e, 16, 0x50, 0x0, 0x0004, -1},	//jme 82801BA
PCI-> Hub 
	{0xFFFF, 0xFFFF},
// end of table...
	0
// just in case...
};
 
/* Register definitions for TI PCI-to-CardBus bridges */

#define TI_SYSTEM_CONTROL			0x0080	/* 32 bit */
#define TI1250_MULTIMEDIA_CTL		0x0084	/* 8 bit */
#define TI1250_GENERAL_STATUS		0x0085	/* 8 bit */
#define TI1250_GPIO0_CONTROL		0x0088	/* 8 bit */
#define TI1250_GPIO1_CONTROL		0x0089	/* 8 bit */
#define TI1250_GPIO2_CONTROL		0x008a	/* 8 bit */
#define TI1250_GPIO3_CONTROL		0x008b	/* 8 bit */
#define TI122X_IRQMUX				0x008c	/* 32 bit */
#define TI_RETRY_STATUS				0x0090	/* 8 bit */
#define TI_CARD_CONTROL				0x0091	/* 8 bit */
#define TI_DEVICE_CONTROL			0x0092	/* 8 bit */
#define TI_BUFFER_CONTROL			0x0093	/* 8 bit */
#define TI_DMA_0					0x0094	/* 32
bit */
#define TI_DMA_1					0x0098	/* 32
bit */

/* Card Control Register */
#define  TI_CCR_RIENB				0x80
#define  TI_CCR_ZVENABLE			0x40
#define  TI_CCR_PCI_IRQ_ENA			0x20
#define  TI_CCR_PCI_IREQ			0x10
#define  TI_CCR_PCI_CSC				0x08
#define  TI_CCR_SPKROUTEN			0x02
#define  TI_CCR_IFG					0x01

#define  TI1220_CCR_PORT_SEL		0x20
#define  TI122X_CCR_AUD2MUX			0x04

/* Device Control Register */
#define  TI_DCR_5V_FORCE			0x40
#define  TI_DCR_3V_FORCE			0x20
#define  TI_DCR_IMODE_MASK			0x06
#define  TI_DCR_IMODE_ISA			0x02
#define  TI_DCR_IMODE_SERIAL		0x04

#define  TI12XX_DCR_IMODE_PCI_ONLY		0x00
#define  TI12XX_DCR_IMODE_ALL_SERIAL	0x06

/* Buffer Control Regiser */
#define  TI_BCR_CB_READ_DEPTH		0x08
#define  TI_BCR_CB_WRITE_DEPTH		0x04
#define  TI_BCR_PCI_READ_DEPTH		0x02
#define  TI_BCR_PCI_WRITE_DEPTH		0x01

/* Register definitions for Toshiba ToPIC95 controllers */

#define TOPIC_SOCKET_CONTROL		0x0090	/* 32 bit */
#define  TOPIC_SCR_IRQSEL		0x00000001

#define TOPIC_SLOT_CONTROL		0x00a0	/* 8 bit */
#define  TOPIC_SLOT_SLOTON		0x80
#define  TOPIC_SLOT_SLOTEN		0x40
#define  TOPIC_SLOT_ID_LOCK		0x20
#define  TOPIC_SLOT_ID_WP		0x10
#define  TOPIC_SLOT_PORT_MASK		0x0c
#define  TOPIC_SLOT_PORT_SHIFT		2
#define  TOPIC_SLOT_OFS_MASK		0x03

#define TOPIC_CARD_CONTROL		0x00a1	/* 8 bit */
#define  TOPIC_CCR_INTB			0x20
#define  TOPIC_CCR_INTA			0x10
#define  TOPIC_CCR_CLOCK		0x0c
#define  TOPIC_CCR_PCICLK		0x0c
#define  TOPIC_CCR_PCICLK_2		0x08
#define  TOPIC_CCR_CCLK			0x04

#define TOPIC97_INT_CONTROL		0x00a1	/* 8 bit */
#define  TOPIC97_ICR_INTB		0x20
#define  TOPIC97_ICR_INTA		0x10
#define  TOPIC97_ICR_STSIRQNP		0x04
#define  TOPIC97_ICR_IRQNP		0x02
#define  TOPIC97_ICR_IRQSEL		0x01

#define TOPIC_CARD_DETECT		0x00a3	/* 8 bit */
#define  TOPIC_CDR_MODE_PC32		0x80
#define  TOPIC_CDR_VS1			0x04
#define  TOPIC_CDR_VS2			0x02
#define  TOPIC_CDR_SW_DETECT		0x01

#define TOPIC_REGISTER_CONTROL		0x00a4	/* 32 bit */
#define  TOPIC_RCR_RESUME_RESET		0x80000000
#define  TOPIC_RCR_REMOVE_RESET		0x40000000
#define  TOPIC97_RCR_CLKRUN_ENA		0x20000000
#define  TOPIC97_RCR_TESTMODE		0x10000000
#define  TOPIC97_RCR_IOPLUP		0x08000000
#define  TOPIC_RCR_BUFOFF_PWROFF	0x02000000
#define  TOPIC_RCR_BUFOFF_SIGOFF	0x01000000
#define  TOPIC97_RCR_CB_DEV_MASK	0x0000f800
#define  TOPIC97_RCR_CB_DEV_SHIFT	11
#define  TOPIC97_RCR_RI_DISABLE		0x00000004
#define  TOPIC97_RCR_CAUDIO_OFF		0x00000002
#define  TOPIC_RCR_CAUDIO_INVERT	0x00000001

#define DEC_CHIP_CONTROL	0x40
#define DEC_BRIDGE_ARB		0x42

/* PCI_COMMAND Bits */
#define PCI_CMD_IO			0x1		/* Enable
response in I/O space */
#define PCI_CMD_MEMORY		0x2		/* Enable response in
Memory space */
#define PCI_CMD_MASTER		0x4		/* Enable bus mastering
*/
#define PCI_CMD_SPECIAL		0x8		/* Enable response to
special cycles */
#define PCI_CMD_INVALIDATE	0x10	/* Use memory write and
invalidate */
#define PCI_CMD_VGA_PALETTE 0x20	/* Enable palette snooping */
#define PCI_CMD_PARITY		0x40	/* Enable parity checking */
#define PCI_CMD_WAIT 		0x80	/* Enable address/data stepping
*/
#define PCI_CMD_SERR		0x100	/* Enable SERR */
#define PCI_CMD_FAST_BACK	0x200	/* Enable back-to-back writes */

#define PCI_STATUS_FAST_BACK	0x80	/* Capable of back-to-back
writes */

 

From daniel.ritz at gmx.ch  Wed Feb 25 21:03:47 2004
From: daniel.ritz at gmx.ch (Daniel Ritz)
Date: Wed Feb 25 20:04:36 2004
Subject: [PATCH] yenta: irq-routing for TI bridges - take 2
In-Reply-To: <Pine.LNX.4.58.0402250148080.2144@portland.hansa.lan>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<200402250026.20708.daniel.ritz@gmx.ch>
	<Pine.LNX.4.58.0402250148080.2144@portland.hansa.lan>
Message-ID: <200402252103.48739.daniel.ritz@gmx.ch>

On Wednesday 25 February 2004 07:55, Pavel Roskin wrote:
> On Wed, 25 Feb 2004, Daniel Ritz wrote:
> 
> > hi
> >
> > the last patch was bad...chaning stuff it shouldn't on TI125x, 145x...
> >
> > another try...comments?
> > couldn't find datasheets for 1210, 1220, 1250 so i'm not quite sure about them....
> 
> http://www.mit.edu/afs/sipb/contrib/doc/specs/ic/bridge/

thanks...i looked at the 1220 datasheet and it seems the chip is sane enough
so no special case like the 1250 is needed. the 1210 should be just the same but
with only one slot.

> 
> > compile tested (my TI works, so no difference there)
> 
> Works for me.  yenta_socket is compiled into the kernel.  Two cards:  TI
> 1221 with 2 slots (no fixup needed) and TI 1410 that needs it.
> 

nice to hear it works.

> 
> Yenta: CardBus bridge found at 0000:00:08.0 [133f:1233]
> Yenta: Enabling burst memory read transactions
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta TI: mfunc 0cc07d92, devctl 60

mfunc0 is inta, mfunc1 is irq9, mfunc2 is activity led, mfunc3 is irq7,
mfunc4 GPI3, mfunc5 is the other led, mfunc6 is irq12...

this would give you irq7,9,12 but device control says parallel PCI only..

> Yenta: ISA IRQ mask 0x0000, PCI irq 5
> Socket status: 30000006
> Yenta: CardBus bridge found at 0000:00:08.1 [133f:1233]
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta TI: mfunc 0cc07d92, devctl 60
> Yenta: ISA IRQ mask 0x0000, PCI irq 5
> Socket status: 30000006
> Yenta: CardBus bridge found at 0000:00:0a.0 [0000:0000]
> Yenta: Enabling burst memory read transactions
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta TI: mfunc 00000000, devctl 66

that's just an uninitialized ti1410. so we're using PCI


> Yenta TI: changing mfunc to 00001000
> Yenta TI: falling back to PCI interrupts
> Yenta TI: changing mfunc to 00001002
> Yenta: ISA IRQ mask 0x0000, PCI irq 12
> 
> $ cat /proc/interrupts
>            CPU0
>   0:     664717          XT-PIC  timer
>   1:       1530          XT-PIC  i8042
>   2:          0          XT-PIC  cascade
>   5:          3          XT-PIC  yenta, yenta, orinoco_cs
>   7:          0          XT-PIC  acpi
>   8:          4          XT-PIC  rtc
>  10:       1502          XT-PIC  uhci_hcd, uhci_hcd
>  11:         46          XT-PIC  eth0
>  12:          3          XT-PIC  yenta, VIA686A, orinoco_cs
>  14:      36354          XT-PIC  ide0
>  15:         21          XT-PIC  ide1
> NMI:          0
> ERR:          0
> 
> -- 
> Regards,
> Pavel Roskin
> 

rgds
-daniel 


From rmk+pcmcia at arm.linux.org.uk  Wed Feb 25 20:38:40 2004
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Wed Feb 25 20:38:47 2004
Subject: My smartcard client driver can not be loaded in RH Linux9.0.
In-Reply-To: <Mb959774818558.03548@send3.inner-21cn.com>;
	from s1977825@21cn.com on Wed, Feb 25, 2004 at 06:15:27PM +0800
References: <Mb959774818558.03548@send3.inner-21cn.com>
Message-ID: <20040225203840.A1794@flint.arm.linux.org.uk>

On Wed, Feb 25, 2004 at 06:15:27PM +0800, Jiang Jun wrote:
> My smartcard client driver can not be loaded in RH Linux9.0.

Sorry, I don't support Red Hat Linux PCMCIA problems (nor PCMCIA problems
on 2.4 kernels.)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

From proski at gnu.org  Wed Feb 25 16:20:02 2004
From: proski at gnu.org (Pavel Roskin)
Date: Wed Feb 25 21:20:09 2004
Subject: [PATCH] yenta: irq-routing for TI bridges - take 2
In-Reply-To: <200402252103.48739.daniel.ritz@gmx.ch>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<200402250026.20708.daniel.ritz@gmx.ch>
	<200402252103.48739.daniel.ritz@gmx.ch>
Message-ID: <Pine.LNX.4.58.0402251553410.20967@marabou.research.att.com>

On Wed, 25 Feb 2004, Daniel Ritz wrote:

> > Yenta: CardBus bridge found at 0000:00:08.0 [133f:1233]
> > Yenta: Enabling burst memory read transactions
> > Yenta: Using CSCINT to route CSC interrupts to PCI
> > Yenta: Routing CardBus interrupts to PCI
> > Yenta TI: mfunc 0cc07d92, devctl 60
>
> mfunc0 is inta, mfunc1 is irq9, mfunc2 is activity led, mfunc3 is irq7,
> mfunc4 GPI3, mfunc5 is the other led, mfunc6 is irq12...
>
> this would give you irq7,9,12 but device control says parallel PCI only..

That's not surprising.  The card is a PCI device, it's not connected to
the ISA bus.

[snip]
> that's just an uninitialized ti1410. so we're using PCI
>
>
> > Yenta TI: changing mfunc to 00001000
> > Yenta TI: falling back to PCI interrupts

By the way, I looked through your mails an I still don't quite understand
what the above is for.  I understand you are trying serial ISA interrupts
first.  What's the reason for that?  Do you know any device that needs
this?  I would prefer not to add any code unless it's known to be needed.
Any probe is potentially dangerous.  The known problems are with PCI
cards, which have PCI interrupts and don't need anything else.  I believe
laptops are engineered better and don't need any fixes.

> > Yenta TI: changing mfunc to 00001002
> > Yenta: ISA IRQ mask 0x0000, PCI irq 12

Apparently you are enabling INTA.  Shouldn't you disable serial ISA
interrupts if they didn't work?

I also think you are using mfunc_old incorrectly.  Either it should be the
current value of irqmux, in which case you should change it when testing
serial ISA interrupts, or it's the initial value of irqmux, in which case
you shouldn't compare it to mfunc the second time.  You cannot have it
both ways.  Please create one more variable, e.g. mfunc_current.

-- 
Regards,
Pavel Roskin

From daniel.ritz at gmx.ch  Thu Feb 26 00:01:23 2004
From: daniel.ritz at gmx.ch (Daniel Ritz)
Date: Wed Feb 25 23:02:24 2004
Subject: [PATCH] yenta: irq-routing for TI bridges - take 2
In-Reply-To: <Pine.LNX.4.58.0402251553410.20967@marabou.research.att.com>
References: <200402240033.31042.daniel.ritz@gmx.ch>
	<200402252103.48739.daniel.ritz@gmx.ch>
	<Pine.LNX.4.58.0402251553410.20967@marabou.research.att.com>
Message-ID: <200402260001.23913.daniel.ritz@gmx.ch>

On Wednesday 25 February 2004 22:20, Pavel Roskin wrote:
> On Wed, 25 Feb 2004, Daniel Ritz wrote:
> 
> > > Yenta: CardBus bridge found at 0000:00:08.0 [133f:1233]
> > > Yenta: Enabling burst memory read transactions
> > > Yenta: Using CSCINT to route CSC interrupts to PCI
> > > Yenta: Routing CardBus interrupts to PCI
> > > Yenta TI: mfunc 0cc07d92, devctl 60
> >
> > mfunc0 is inta, mfunc1 is irq9, mfunc2 is activity led, mfunc3 is irq7,
> > mfunc4 GPI3, mfunc5 is the other led, mfunc6 is irq12...
> >
> > this would give you irq7,9,12 but device control says parallel PCI only..
> 
> That's not surprising.  The card is a PCI device, it's not connected to
> the ISA bus.

that explains it...

> 
> [snip]
> > that's just an uninitialized ti1410. so we're using PCI
> >
> >
> > > Yenta TI: changing mfunc to 00001000
> > > Yenta TI: falling back to PCI interrupts
> 
> By the way, I looked through your mails an I still don't quite understand
> what the above is for.  I understand you are trying serial ISA interrupts
> first.  What's the reason for that?  Do you know any device that needs
> this?  I would prefer not to add any code unless it's known to be needed.
> Any probe is potentially dangerous.  The known problems are with PCI
> cards, which have PCI interrupts and don't need anything else.  I believe
> laptops are engineered better and don't need any fixes.
>

it's looking at the device control register first. if it's configured for
serial interutps then test it...my laptop for example uses serial interrupts
(plus the parallel PCI)

may be there are cards out there that need an exclusive interrupt. i don't
know.

the reason why i did it is the comment in the old code:

        /*
         * If ISA interrupts don't work, then fall back to routing card
         * interrupts to the PCI interrupt of the socket.
         *
         * Tweaking this when we are using serial PCI IRQs causes hangs
         *   --rmk
         */

the comment is there for a reason. so make sure DEVCTL is wrong, not MFUNC.
if we do check for all serial and don't fall back to PCI, the code wouldn't fixup
most of the non-working setups.
 
> > > Yenta TI: changing mfunc to 00001002
> > > Yenta: ISA IRQ mask 0x0000, PCI irq 12
> 
> Apparently you are enabling INTA.  Shouldn't you disable serial ISA
> interrupts if they didn't work?

it does so by masking out the routing bits in the device control register, it
set it to PCI only...but read on

> 
> I also think you are using mfunc_old incorrectly.  Either it should be the
> current value of irqmux, in which case you should change it when testing
> serial ISA interrupts, or it's the initial value of irqmux, in which case
> you shouldn't compare it to mfunc the second time.  You cannot have it
> both ways.  Please create one more variable, e.g. mfunc_current.
> 

no, it's the way it should be. but it should really go back to the old value if 
serial interrupts probing failed. then it would be correct.


> -- 
> Regards,
> Pavel Roskin
> 
> 

rgds,
-daniel


