Compact Flash Card in PCMCIA Adapter
Felix Brack
fb at ltec.ch
Wed Aug 8 10:55:40 EDT 2007
Hello Peter,
Many thanks for your help. I think you are right: it was not
memory_cs, it must have been something like ide_cs.
After some more testing I found that the problem must be related to a
specific CF card from Transcend. When I use a CF-Card from SimpleTech,
SanDisk or TakeMS everything seems fine. In this case I get the
following information:
from 'pccardctl status' (socket 1 is the CF card):
Socket 0:
3.3V 32-bit PC Card
Socket 1:
3.3V 16-bit PC Card
Subdevice 0 (function 0) bound to driver "pata_pcmcia"
and from 'dmesg':
[ 5066.164000] pccard: PCMCIA card inserted into slot 1
[ 5066.164000] pcmcia: registering new device pcmcia1.0
[ 5066.204000] ata4: PATA max PIO0 cmd 0x00010100 ctl 0x0001010e bmdma 0x00000000 irq 3
[ 5066.204000] scsi3 : pata_pcmcia
[ 5066.384000] ata4.00: CFA: Hitachi XX.V.3.4.0.0, Rev 0.00, max PIO4
[ 5066.384000] ata4.00: 1000944 sectors, multi 0: LBA
[ 5066.392000] ata4.00: configured for PIO0
[ 5066.392000] scsi 3:0:0:0: Direct-Access ATA Hitachi XX.V.3.4 Rev PQ: 0 ANSI: 5
[ 5066.392000] SCSI device sda: 1000944 512-byte hdwr sectors (512 MB)
[ 5066.392000] sda: Write Protect is off
[ 5066.392000] sda: Mode Sense: 00 3a 00 00
[ 5066.392000] SCSI device sda: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 5066.392000] SCSI device sda: 1000944 512-byte hdwr sectors (512 MB)
[ 5066.392000] sda: Write Protect is off
[ 5066.392000] sda: Mode Sense: 00 3a 00 00
[ 5066.392000] SCSI device sda: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 5066.392000] sda: sda1
[ 5066.396000] sd 3:0:0:0: Attached scsi removable disk sda
[ 5066.396000] sd 3:0:0:0: Attached scsi generic sg0 type 0
However when I insert the Transcend CF card it is not detected. I get
the following information then:
from 'pccardctl status' (again socket 1 is the CF card):
Socket 0:
3.3V 32-bit PC Card
Socket 1:
3.3V 16-bit PC Card
and from 'dmesg' I get only one line:
[ 5334.476000] pccard: PCMCIA card inserted into slot 1
This CF card (the one from Transcend that is not working) supports
Ultra DMA; might this be the problem?
If I insert the Transcend CF card in a USB reader, everything is fine
too and I can access it as device 'sda'. The card also works in the
PCMCIA adapter and notebook if run Windows instead of LINUX.
I really have no idea of what could be wrong. The tiny
bit of output from 'dmesg' is not really helpful. Is there some kind
of debugging I could enable to get more information?
Felix
----------------------
Peter Stuge wrote:
> On Tue, Aug 07, 2007 at 03:46:04PM +0200, Felix Brack wrote:
>> I'm using a PCMCIA adapter to which I can plug CF cards. I believe
>> the adapter itself consist of nothing more then 'some wires'.
>>
>> Everything was working quite fine with some 2.6 kernel (I do not
>> remember the exact version) and card manager. Plugging in the
>> adapter (including CF card of course) loaded the memory_cs driver
>> and I was able to access the card.
> Really? memory_cs? How did you access the card? What kind of CF card
> is it?
>> Now, with kernel 2.6.20 things don't work anymore. After some
>> research I found that now 'pcmciautils' is responsible for managing
>> the PCMCIA adapters (16 and 32 bit?). I believe that the driver the
>> kernel should load when I plug in my card is 'pcmciamtd'.
> It depends on the card.
> If it's a "normal" CF memory card they are usually used in an IDE
> mode where they behave like a hard drive, using the driver ide_cs
> (old ATA/ATAPI/MFM/RLL drivers) or pata_pcmcia. (new libata SATA/PATA
> drivers)
> Which to choose is mostly a matter of which other ATA drivers you are
> using in the kernel. ide_cs is tried and proven while the PATA
> drivers using libata are still marked experimental. (But I've used
> them without problems for some time.) Both drivers should support the
> same cards.
>> I found the source file 'pcmciamtd.c' in the kernel source tree but
>> I do not know how to enable it.
> There's one sure way to enable any kernel driver and a second
> option available for most drivers.
> 1. Compile the driver built-in to the kernel (*) in menuconfig
> 2. Compile the driver as a module (M) in menuconfig
> Built-in drivers are loaded automatically when the kernel is loaded
> and activated/bound to devices sometimes automatically, sometimes
> with a little help from userspace. (udev, pcmciautils, etc)
> Modules have to be loaded into the kernel after it has been started,
> either manually with the modprobe command or by distribution-specific
> startup scripts usually found in /etc/init.d. Modules are
> activated/bound just like built-in drivers.
>> I think there should be some file called 'pcmciamtd.ko' after
>> kernel compilation, but there isn't. Is it possible that this
>> driver always gets linked to the kernel, i.e. there is no module
>> for 'pcmciamtd'?
> This depends on your particular configuration. pcmciamtd may not be
> built at all, or built into the kernel, or built as a module.
>> I use 'make menuconfig' to configure the kernel, but as I said, I
>> can't find the switch to turn 'pcmciamtd' on. Does anybody know how
>> to do this;
> Make sure you have enabled PCMCIA and then look in the MTD driver
> section, but..
>> maybe this is a very stupid configuration error on my part?
> ..depending on the CF card pcmciamtd isn't the best driver.
> //Peter
> _______________________________________________
> Linux PCMCIA reimplementation list
> http://lists.infradead.org/mailman/listinfo/linux-pcmcia
More information about the linux-pcmcia
mailing list