Page 2 of 2

Re: fast cfcard issues

Posted: Tue May 14, 2019 4:26 am
by xeno74
Hi All,

Great news! :-)
Darren wrote: Hello Christian

I've confirmed this with my San Disk 16G card.

I've investigated, and what is happening is that the platform code just adds the port so always works, the pata_pcmcia driver has a list of supported devices, and newer SanDisk cards use a new controller chip, mine advertises LBA48 support - only needed >120G size. This chip is not currently listed in the pata_pcmcia driver.

I've attached a patch, which does 2 things. Adds this device, and prints out what device has been detected by the pcmcia core, my card is now detected normally.

Can you rebuild the mainline kernel with this patch applied and pcmcia reenabled, and see if it fixes SailorMH's problems. If it doesn't I need a copy of dmesg from a boot with his card attached. (I can then add his device)

Thanks
Darren

Code: Select all

diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 9b0e6c7..16b064c 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -322,6 +322,7 @@ static void pcmcia_remove_one(struct pcmcia_device *pdev)
 	PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000),	/* Toshiba */
 	PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d),
 	PCMCIA_DEVICE_MANF_CARD(0x00ce, 0x0000),	/* Samsung */
+	PCMCIA_DEVICE_MANF_CARD(0x00f1, 0x0101),		/* SanDisk High (>8G) CFA */
 	PCMCIA_DEVICE_MANF_CARD(0x0319, 0x0000),	/* Hitachi */
 	PCMCIA_DEVICE_MANF_CARD(0x2080, 0x0001),
 	PCMCIA_DEVICE_MANF_CARD(0x4e01, 0x0100),	/* Viking CFA */
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index a9258f6..3660670 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -419,6 +419,8 @@ static int pcmcia_device_query(struct pcmcia_device *p_dev)
 		mutex_lock(&p_dev->socket->ops_mutex);
 		p_dev->manf_id = manf_id.manf;
 		p_dev->card_id = manf_id.card;
+                printk(KERN_INFO
+                         "pcmcia: Found: manuf: %x device %x\n",manf_id.manf, manf_id.card);
 		p_dev->has_manf_id = 1;
 		p_dev->has_card_id = 1;
 		mutex_unlock(&p_dev->socket->ops_mutex);
I will compile a new test kernel with his patch. Many thanks to Darren!

Cheers,
Christian

Re: fast cfcard issues

Posted: Tue May 14, 2019 12:37 pm
by sailorMH
Hi Xeno74, thank you and Darren very much for this.
I will gladly test it.