reset of pcmcia device.

Krzysztof Drewicz hunter at mimuw.edu.pl
Sat May 6 12:03:10 EDT 2006


Russell King napisał(a):

>>>>pccardctl reset
>>>>        
>>>>
>>>ttyS1 at I/O 0x2f8 (irq = 169) is a 16550A
>>>      
>>>
>>>I use hotplug, but it does initialization only first time, rmmoding 
>>>pcmcia-related modules and modprobing gives error:
>>>$ cat < /dev/ttyS1
>>>cat: Read Error: Input/output error
>>>      
>>>
>>I'm quite sure the problem is not on the PCMCIA side of things.  If the
>>
>>the device properly, whether it was power cycled or not.  Using PCMCIA
>>
>>    
>>
>
>I'm not aware of any requirement like this.
>
>But I think someone's getting confused - note that Krzysztof talks of
>a reset as "rmmoding pcmcia-related modules and modprobing".  That's
>not a reset, that's a complete tear-down of PCMCIA.
>
>Also note that Krzysztof doesn't post any kernel messages illustrating
>what happened during this "rmmod and modprobe" action, so no one knows
>why it doesn't work.
>
Sorry for so a few details. Here is some better info:
OK, here it's afert boot-up and modprobe pcmcia-et-all:

ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 169
Yenta: CardBus bridge found at 0000:00:0a.0 [0000:0000]
Yenta: ISA IRQ mask 0x0000, PCI irq 169
Socket status: 30000810
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
lp0: using parport0 (interrupt-driven).
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
cs: IO port probe 0x100-0x3af: excluding 0x170-0x177 0x290-0x297 0x370-0x37f
cs: IO port probe 0x3e0-0x4ff: excluding 0x400-0x40f 0x4d0-0x4d7
cs: IO port probe 0x820-0x8ff: excluding 0x828-0x87f
cs: IO port probe 0xc00-0xcf7: clean.
cs: IO port probe 0xa00-0xaff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
ttyS1 at I/O 0x2f8 (irq = 169) is a 16550A

Maybe that could help
# gammu --identify
Manufacturer  : Sagem
Model         : unknown (MO190 GPRS)
Firmware      : SAGEM JO3,GC
IMEI          : 351742000046880
SIM IMSI      : 260032441378087

I issue a 'pccardctl reset':
[root at asia:~]$ pccardctl reset
[root at asia:~]$ gammu --identify
Manufacturer  : Sagem
Model         : unknown (MO190 GPRS)
Firmware      : SAGEM JO3,GC
IMEI          : 351742000046880
SIM IMSI      : 260032441378087

So, everything is ok, but i do a "hot plug off, plug in" pcmcia card:
[root at asia:~]$ pccardctl info
PRODID_1=""
PRODID_2=""
PRODID_3=""
PRODID_4=""
MANFID=0000,0000
FUNCID=255
[root at asia:~]$ pccardctl status
Socket 0:
  no card

And than i would like to insert card (to the pcmcia controler):

[root at asia:~]$ pccardctl status
Socket 0:
  3.3V 16-bit PC Card
  Subdevice 0 (function 0) [unbound]
[root at asia:~]$ pccardctl info
PRODID_1="PRETEC"
PRODID_2="CompactGPRS"
PRODID_3="20030619"
PRODID_4="Ver 2.02"
MANFID=02a5,0000
FUNCID=2
[root at asia:~]$ gammu --identify
Error during reading device.
[root at asia:~]$ cat < /dev/ttyS1
cat: Read Error: Input/output error
dmesg says nothing new.

Now I do a:
[root at asia:~]$ lsmod
Module                  Size  Used by    Not tainted
parport_serial 8064 0 - Live 0xc80c9000
lp 11716 2 - Live 0xc8096000
parport_pc 39492 2 parport_serial, Live 0xc814d000
parport 35272 2 lp,parport_pc, Live 0xc80ad000
serial_cs 19208 0 - Live 0xc80bf000
yenta_socket 26508 3 - Live 0xc80b7000
rsrc_nonstatic 13696 1 yenta_socket, Live 0xc809a000
pcmcia 41020 1 serial_cs, Live 0xc80a1000
pcmcia_core 43924 3 yenta_socket,rsrc_nonstatic,pcmcia, Live 0xc8076000
firmware_class 10368 1 pcmcia, Live 0xc806f000
thermal 20872 0 - Live 0xc808d000
processor 36412 1 thermal, Live 0xc8083000
fan 6276 0 - Live 0xc8073000
button 8976 0 - Live 0xc8060000
ac 6916 0 - Live 0xc8064000
via_rhine 23172 0 - Live 0xc8068000
mii 5376 1 via_rhine, Live 0xc802b000
minix 30724 1 - Live 0xc8022000
ext2 64136 2 - Live 0xc804f000
mbcache 9476 1 ext2, Live 0xc8004000
xfs 488664 0 - Live 0xc80d4000
ide_disk 18048 3 - Live 0xc800d000
via82cxxx 13724 0 [permanent], Live 0xc8013000
ide_core 126944 2 ide_disk,via82cxxx, Live 0xc802f000

And:
[root at asia:~]$ rmmod serial_cs yenta_socket rsrc_nonstatic pcmcia 
pcmcia_core firmware_class

[root at asia:~]$ rmmod yenta_socket  rsrc_nonstatic pcmcia_core
rmmod: yenta_socket: Resource temporarily unavailable
rmmod: rsrc_nonstatic: Resource temporarily unavailable
rmmod: pcmcia_core: Resource temporarily unavailable

[root at asia:~]$ modprobe serial_cs
[root at asia:~]$ modprobe pcmcia
[root at asia:~]$ cat < /dev/ttyS1
cat: Read Error: Input/output error
(still nothing new in dmesg).

Any clues ?

-- 
Krzysztof Drewicz






More information about the linux-pcmcia mailing list