On Fri, 15 Oct 2004, Moshe Yudkowsky wrote:

> Here's a progress report on this problem, and a plea for further hints. I am 
> slightly less clueless this time around.
> 
> Additional information: Deiban 2.4.27-1-k7, and the entry for the USB device is:
> 
> T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 31 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=4102 ProdID=1107 Rev= 0.01
> S:  Manufacturer=iRiver Limited.
> S:  Product=IFP-700 HIGH SPEED
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
> I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> 
> 
> > Problem: I don't see /dev/sd* created when I plug in my UMS-based MP3 player, and 
> > it seems to be a usbdevfs problem.
> 
> <snip>
> >  usbdevfs: USBDEVFS_CONTROL failed dev 2 rqt 192 rq 23 len 4 ret -110
> 
> After some fooling around, I realized that although usb-storage loaded sd_mod 
> had not loaded. I issued "modprobe sd_mod", got the /dev/sda device, which 
> points to the proper place on the SCSI chain.
> 
> I used the following command to create a FAT filesystem on the MP3 player:
> 
> # mkdosfs -v -I /dev/sda
> 
> And got this response:
> 
> 
> mkdosfs 2.10 (22 Sep 2003)
> /dev/sda has 9 heads and 56 sectors per track,
> logical sector size is 512,
> using 0xf8 media descriptor, with 512000 sectors;
> file system has 2 16-bit FATs and 8 sectors per cluster.
> FAT size is 250 sectors, and provides 63933 clusters.
> Root directory contains 512 slots.
> Volume ID is 416fdcd5, no volume label.
> 
> right size and everything.
> 
> I mounted it on the /mnt/ums file:
> 
> # mount -v -t vfat /dev/sda /mnt/ums
> /dev/scsi/host1/bus0/target0/lun0/disc on /mnt/ums type vfat (rw)
> 
> No problem. I can read/write to the device and when I umount and unplug the 
> device I can listen to the files.
> 
> The problem now is that when I attempt to plug the device in again, and attempt 
> to mount the system using the same command, I get an error:
> # mount -v -t vfat  /dev/sda /mnt/ums
> mount: wrong fs type, bad option, bad superblock on /dev/sda,
>         or too many mounted file systems
> 
> According to syslog:
> 
> Oct 15 09:35:22 bagpipes kernel: SCSI disk error : host 1 channel 0 id 0 lun 0 
> return code = 70000
> Oct 15 09:35:22 bagpipes kernel:  I/O error: dev 08:00, sector 0
> Oct 15 09:35:22 bagpipes kernel: FAT: unable to read boot sector

You can get more complete debugging information if you turn on the 
usb-storage verbose debugging option in the kernel configuration.  To see 
the debugging messages, you then either have to use dmesg or else 
configure /etc/syslog.conf to capture debug-level messages from the 
kernel.

> But Linux mkdosfs will never, ever create a boot sector, and why didn't it 
> complain the first time?

You got that just backward.  mkdosfs _always_ writes over the boot sector.  
After all, you can hardly have a valid FAT filesystem without a good boot
sector!

> Other symptoms:
> 
> * If I "rmmod sd_mod ; modprobe sd_mod" I can remount the system (!)
> 
> * If I *don't* unplug the device, I can umount/mount the system without problems:
> 
> Oct 15 09:41:41 bagpipes kernel: Attached scsi removable disk sda at scsi1, 
> channel 0, id 0, lun 0
> Oct 15 09:41:41 bagpipes kernel: SCSI device sda: 512001 512-byte hdwr sectors 
> (262 MB)
> Oct 15 09:41:41 bagpipes kernel: sda: Write Protect is off
> Oct 15 09:41:41 bagpipes kernel:  /dev/scsi/host1/bus0/target0/lun0:
> 
> 
> So, here's the less clueless question: Is this a symptom of hotplug problems, a 
> known sd_mod problem, or something else? I find it hard to believe that sd_mod 
> has to be rm/modprobe'd each time as a matter of course.

Well, the number of sectors mentioned above sure looks suspicious.  USB 
devices basically never have an odd number of sectors.  Probably the 
device is reporting one more sector than it really has.  I don't know why 
this should cause a problem only when you unplug the device and replug it, 
though.  Or why it worked okay the first time.

The usb-storage verbose debugging will provide more information to help
track this down.  Post everything that appears in the log from the time 
you first plug in the device until after you unplug it and plug it in 
again.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to