Bug 56856 - (USB STORAGE)usb compact flash reader (sandisk SDDR-31) works only after unloading and reloading usb-storage module
(USB STORAGE)usb compact flash reader (sandisk SDDR-31) works only after unlo...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-28 17:51 EST by Seth Vidal
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-08 00:43:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Possible fix. (2.41 KB, patch)
2002-08-08 01:33 EDT, Pete Zaitcev
no flags Details | Diff

  None (edit)
Description Seth Vidal 2001-11-28 17:51:56 EST
Description of Problem:
on the 2.4.9-13 kernel (errata of 7.2) and on 2.4.7 (from 7.2 orig) the
following problem occurs:


plug in a usb-storage compatible device (sandisk sddr-31), insert cf card
mount device (ext2), all works. unmount card, remove card, re-insert card,
try to mount the device and get this error:

kernel:  I/O error: dev 08:01, sector 2
kernel: SCSI device sda: 62721 512-byte hdwr sectors (32 MB)
kernel: sda: Write Protect is off
kernel:  sda: sda1
kernel: FAT: bogus logical sector size 0
kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.


so I then modprobe -r usb-storage ; modprobe -a usb-storage 
then attempt to mount the device and it works.

weird things:
1. the device being mounted is ext2 not FAT and is labeled as such in fstab
2. It happens every time - it appears to be some sort of odd disk change
issue - b/c it won't occur if I don't remove the compact flash card.
Comment 1 Pete Zaitcev 2001-11-28 18:00:01 EST
Please make sure you are not doing it from GNOME
(where magicdev confuses the issue).
I am not sure "ps auxww| grep magic" is sufficient
to make sure the magicdev is not running.
Can you reproduce it on the console, init level 3?
Comment 2 Seth Vidal 2001-11-28 18:35:36 EST
magicdev is not installed.
I remove it from systems I use b/c I hate it :)
Comment 3 Seth Vidal 2001-12-27 22:43:39 EST
any ideas on this bug - its been a minor/daily pain in my ass.

Comment 4 Pete Zaitcev 2002-01-24 13:07:13 EST
Still looking for the HW.

Matt Dharm may have fixed something in the main trunk,
I have to check.

Sorry for the delay.
Comment 5 jcmain 2002-02-06 20:37:34 EST
Hello,

I have a similar problem with my Sony DSC-S85 digital camera when connected through the USB. I get the following error in /var/log/messages when 
mounting it as a vfat drive when using a 128M memory stick:

Feb  6 20:17:47 bytor kernel: FAT: bogus logical sector size 65535
Feb  6 20:17:47 bytor kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.

I tried the modprobe -r usb-storage ; modprobe -a usb-storage proposed by skvidal, and that is a work-around for the problem.

The strange thing (to me, anyway) is that a 16M memory stick works fine right out of the box with no modprobing.

This seemed relevant to your problem, so I hope it helps.


Good luck,
jcmain
Comment 6 Seth Vidal 2002-02-28 09:21:10 EST
Interesting discovery. The failure to mount on the second try only occurs if it
is marked as auto in /etc/fstab. If I mark it specifically as ext2 it will mount
correctly.

so it appears it can't figure out what the fs via the auto option
Comment 7 Pete Zaitcev 2002-03-13 12:56:36 EST
We bought SDDR-31, getting a card now.
Comment 8 Pete Zaitcev 2002-08-08 01:31:47 EDT
Bug root cause:

SDDR-31 fakes START STOP UNIT command without regard to a pending
UNIT ATTENTION status. Such behavious confuses Linux SCSI stack.

Bug scenario:

Reseat the flash card to trigger UNIT ATTENTION status.
This is recorded in the device until host retrieves sense.

When device is open, sd_open calls check_disk_change.
check_disk_change calls check_scsidisk_media_change, and
it that indicates a change, calls revalidate_scsidisk.

check_scsidisk_media_change issues START STOP UNIT to gather
possible unit attention, but since SDDR-31 fakes that, it
proceeds and returns no change indication. Later, different
access paths fails when attention is returned with READ
or MODE SENSE, or other command.
Comment 9 Pete Zaitcev 2002-08-08 01:33:22 EDT
Created attachment 69464 [details]
Possible fix.
Comment 10 Pete Zaitcev 2002-08-08 12:38:09 EDT
Modified
HEAD 2.4.18-7.94+
hampton 2.4.18-10+

Note You need to log in before you can comment on or make changes to this bug.