Skip to contentSkip to conversation

Feiya 5-in-1 Card Reader

linux-usb-devel [email protected] 5 participants 6 messages Sep 4, 2002 – Sep 5, 2002 SCSI

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines
Quoted 1 line

Matt, is it ok with you for me to add this patch to the tree?

I'd like to hold off a few more days while I try to find out what the 'secret sauce' that the other OSes use for a device like this.

Hmm. You do not confuse two situations, do you? In the past few days I made two devices work.

One was a Feiya 5-in-1 CF / SM / SD card reader (Vendor Id: 090c, Product Id: 1132, Revision 1.00). It returned a capacity that is one too large, and becomes very unhappy if one tries to read a sector past the end. So, a flag was needed to tell that the result of READ CAPACITY needs fixing.

The other was a Travelmate CF / SM / SD card reader (Vendor Id: 3538, Product Id: 0001, Revision 2.05). It became unhappy when MODE_SENSE asked for too much data. A patch on sd.c solved this.

Andries

#1 lore raw

Nope, not confused.

I'm trying to find out why Windows doesn't choke on the strange READ_CAPACITY value. My guess is that there is code somewhere to universally fixup READ_CAPACITY, and I'd like to know what the magic formula is.

The MODE_SENSE bit is fine by me. But it's a SCSI change, so I'm not the person to ask. The fix to sddr09.c for that seems reasonable, but you put it all together and I haven't had time to split it up. Of course, I fully expect the changes to MODE_SENSE in the SCSI layer to break other USB devices, but there is only one way to find out....

Matt

Quoted 21 lines · On Thu, Sep 05, 2002 at 12:56:00AM +0200, [email protected] wrote:
Quoted 4 lines
Quoted 1 line

Matt, is it ok with you for me to add this patch to the tree?

I'd like to hold off a few more days while I try to find out what the 'secret sauce' that the other OSes use for a device like this.

Hmm. You do not confuse two situations, do you? In the past few days I made two devices work.

One was a Feiya 5-in-1 CF / SM / SD card reader (Vendor Id: 090c, Product Id: 1132, Revision 1.00). It returned a capacity that is one too large, and becomes very unhappy if one tries to read a sector past the end. So, a flag was needed to tell that the result of READ CAPACITY needs fixing.

The other was a Travelmate CF / SM / SD card reader (Vendor Id: 3538, Product Id: 0001, Revision 2.05). It became unhappy when MODE_SENSE asked for too much data. A patch on sd.c solved this.

Andries

Signature · 7 lines
Matthew Dharm                              Home: [email protected] 
Maintainer, Linux USB Mass Storage Driver

It's not that hard.  No matter what the problem is, tell the customer 
to reinstall Windows.
					-- Nurse
User Friendly, 3/22/1998
#2 lore raw
Quoted 2 lines · Matthew Dharm

I'm trying to find out why Windows doesn't choke on the strange READ_CAPACITY value.

That is an easy one.
It belongs to the recent partitioning discussion on l-k.

Windows knows the type of partition table, so reads the partition table and the boot sector and the FAT and is happy.

Linux tries various things, depending on how you compiled your kernel, and among other things also needs to examine the last sector. So, only Linux will do bad things in case the capacity is off by one, and only when your config includes partitioning types that use this last sector.

Andries

#3 lore raw

Well, that's the best answer I've gotten so far.

I guess the patch can go in.

Matt

Quoted 16 lines · Andries Brouwer
Quoted 2 lines · Matthew Dharm

I'm trying to find out why Windows doesn't choke on the strange READ_CAPACITY value.

That is an easy one.
It belongs to the recent partitioning discussion on l-k.

Windows knows the type of partition table, so reads the partition table and the boot sector and the FAT and is happy.

Linux tries various things, depending on how you compiled your kernel, and among other things also needs to examine the last sector. So, only Linux will do bad things in case the capacity is off by one, and only when your config includes partitioning types that use this last sector.

Signature · 6 lines
Matthew Dharm                              Home: [email protected] 
Maintainer, Linux USB Mass Storage Driver

I don't have a left mouse button.  I only have one mouse and it's on my right.
					-- Customer
User Friendly, 2/13/1999
#4 lore raw
In reply to Matthew Dharm
Quoted 5 lines · Matthew Dharm

The MODE_SENSE bit is fine by me. But it's a SCSI change, so I'm not the person to ask. The fix to sddr09.c for that seems reasonable, but you put it all together and I haven't had time to split it up. Of course, I fully expect the changes to MODE_SENSE in the SCSI layer to break other USB devices, but there is only one way to find out....

Speaking of sddr09 devices (of which I possess one), what's the current state of support for the sddr09? Last I knew, at the time when I finally got mine working, the sddr09 was only supported read-only, since there were not-fully-understood issues that resulted in filesystem corruption if you tried to write to it. Currently, the driver will still allow me to mount it only as a read-only filesystem. Can write support for the sddr09 be expected any time soon?

Signature · 5 lines
  *********  Fight Back!  It may not be just YOUR life at risk.  *********
  phil stracchino   ::   [email protected]   ::   [email protected]
    unix ronin     ::::   renaissance man   ::::   mystic zen biker geek
     2000 CBR929RR, 1991 VFR750F3 (foully murdered), 1986 VF500F (sold)
       Linux Now! ...because friends don't let friends use Microsoft.
#5 lore raw
In reply to [email protected]
Quoted 8 lines · On Thu, Sep 05, 2002 at 12:56:00AM +0200, [email protected] wrote:
Quoted 4 lines
Quoted 1 line

Matt, is it ok with you for me to add this patch to the tree?

I'd like to hold off a few more days while I try to find out what the 'secret sauce' that the other OSes use for a device like this.

Hmm. You do not confuse two situations, do you? In the past few days I made two devices work.

Quoted 6 lines

One was a Feiya 5-in-1 CF / SM / SD card reader (Vendor Id: 090c, Product Id: 1132, Revision 1.00). It returned a capacity that is one too large, and becomes very unhappy if one tries to read a sector past the end. So, a flag was needed to tell that the result of READ CAPACITY needs fixing.

Seems reasonble, Matt, any objection?

Quoted 4 lines

The other was a Travelmate CF / SM / SD card reader (Vendor Id: 3538, Product Id: 0001, Revision 2.05). It became unhappy when MODE_SENSE asked for too much data. A patch on sd.c solved this.

Linus already added this patch to his tree :)

thanks,

greg k-h