Bug 56856 - (USB STORAGE)usb compact flash reader (sandisk SDDR-31) works only after unloading and reloading usb-storage module
Summary: (USB STORAGE)usb compact flash reader (sandisk SDDR-31) works only after unlo...
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
Target Milestone: ---
Assignee: Pete Zaitcev
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2001-11-28 22:51 UTC by Seth Vidal
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-08 04:43:53 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 05:33 UTC, Pete Zaitcev
no flags Details | Diff

Description Seth Vidal 2001-11-28 22:51:56 UTC
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 23:00:01 UTC
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 23:35:36 UTC
magicdev is not installed.
I remove it from systems I use b/c I hate it :)

Comment 3 Seth Vidal 2001-12-28 03:43:39 UTC
any ideas on this bug - its been a minor/daily pain in my ass.

Comment 4 Pete Zaitcev 2002-01-24 18:07:13 UTC
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-07 01:37:34 UTC

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,

Comment 6 Seth Vidal 2002-02-28 14:21:10 UTC
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

so it appears it can't figure out what the fs via the auto option

Comment 7 Pete Zaitcev 2002-03-13 17:56:36 UTC
We bought SDDR-31, getting a card now.

Comment 8 Pete Zaitcev 2002-08-08 05:31:47 UTC
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 05:33:22 UTC
Created attachment 69464 [details]
Possible fix.

Comment 10 Pete Zaitcev 2002-08-08 16:38:09 UTC
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.