On Sat, 25 Sep 2004, Joris van Rantwijk wrote:

> Hello,
> 
> Starting with Linux 2.6.8.1, I'm getting SCSI errors 0x10070000
> when accessing my USB flash MP3 player. This I/O error occurs while
> transferring the first few blocks on every attempt to read or write
> files. Listing directories is still possible.
> 
> I have tracked these errors to the checks for data underflow in
> drivers/usb/storage/transport.c. After backing out the code which
> checks for underflow, my drive was accessible again.
> These checks were introduced in Linux 2.6.8 as a patch titled
> "[PATCH] USB: Patch to signal underflow in usb-storage driver".
> 
> I don't know enough about SCSI/USB to tell whether my errors are caused
> by my USB device messing up, or by the Linux transport routines being too
> strict in their checking.
> Could someone who understands such things please take a look at this ?
> 
> My USB device is a MamboX flash drive / MP3 player.
> vendor:  0x03eb "Atmel Corp."
> product: 0x2002 "MusicDrive"
> 
> The code which raises the error is in drivers/usb/storage/transport.c,
> line 715:
> ---
>   /* Did we transfer less than the minimum amount required? */
>   if (srb->result == SAM_STAT_GOOD &&
>       srb->request_bufflen - srb->resid < srb->underflow)
>           srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24);
> ---
> 
> A fragment from my dmesg which shows the problem:
> ----
> scsi0 : SCSI emulation for USB Mass Storage devices
>   Vendor: Generic   Model: MusicDrive        Rev: 0.00
>   Type:   Direct-Access                      ANSI SCSI revision: 02
> SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
> sda: Write Protect is off
> sda: Mode Sense: 1b 00 00 00
> sda: assuming drive cache: write through
>  sda: sda1
> Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
> USB Mass Storage device found at 2
> usbcore: registered new driver usb-storage
> USB Mass Storage support registered.
> SCSI error : <0 0 0 0> return code = 0x10070000
> end_request: I/O error, dev sda, sector 107
> Buffer I/O error on device sda1, logical block 0
> ---
> 
> Bye,
>   Joris.

A patch has been submitted to fix this problem, which shows up for a few
non-compliant devices.  The patch hasn't been accepted yet, but it's
available at

https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-August/000748.html

although it doesn't include an entry for your particular device.  You can 
add a new entry to unusual_devs.h and test to make sure that it works.  If 
it does, post your patch with the new entry so that it can be added along 
with the others.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to