# kernel 2.6 and usb-storage problem

## CybeRDukE

Hi,

i'm using kernel-2.6.0-test9 and it works great except one thing: i can't mount my usb stick. the stick works fine with kernel 2.4 but now when i plug it in, i get the following message (from dmesg):

```

hub 1-0:1.0: new USB device on port 2, assigned address 3

scsi2 : SCSI emulation for USB Mass Storage devices

  Vendor: iRiver    Model: iFP Mass Driver   Rev: 1.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: 45 00 00 08

sda: assuming drive cache: write through

 /dev/scsi/host2/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

Buffer I/O error on device sda, logical block 0

 unable to read partition table

Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0

Attached scsi generic sg2 at scsi2, channel 0, id 0, lun 0,  type 0

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 3

```

so it can't read the partition table, but still creates /dev/sda. with kernel 2.4 it also creates /dev/sda1 to /dev/sda4 which are missing with the new kernel.

and when i try to mount /dev/sda, i get a 'wrong superblock' error.

i don't think it's a problem with my usb-setting in general, because my scanner works fine.

here a snippet of my autoloaded modules:

```
usbcore

sd_mod

usb_storage

uhci-hcd

scanner

```

i really hope you can at least give me a hint where to look next... 

thx

----------

## mc_rph

Maybe you forgot to compile "SCSI disk support" into your kernel. I once forgot it too. Same problem....

mcrph

----------

## CybeRDukE

 *mc_rph wrote:*   

> Maybe you forgot to compile "SCSI disk support" into your kernel. 

 

i compiled it in as module. as you see. the sd_mod module is loaded as shown above. there should not be any diference if it's a module or if it's compiled in the kernel, i guess.

----------

## MaGuS

Got the same problem here.

----------

## alphatronics

I'm also having difficulty with this issue. I'm fairly sure all the necessary USB/SCSI components are compiled in.

----------

## bcore

I've noticed this too... Here's my workaround (just in case it works for you)

when I first plug my compactflash reader into the USB, a node /dev/sda is created, but not the /dev/sda1 node I need. If I issue the following command:

mount -t vfat /dev/sda /mnt/cflash

It fails with an error message, but for whatever reason, the /dev/sda1 node is created, and then I can issue

mount -t vfat /dev/sda1 /mnt/cflash

Hope that helps...

----------

## wdreinhart

My USB memory stick and digital camera both work using love-sources (2.6.0-test11-love1), so this must be a version-specific bug or configuration problem, rather than a general kernel 2.6 bug.

----------

## alphatronics

I'm not even getting an sda to show up, I'll try out these new-fangled love sources and see what happens.

Here's what I'm using for kernel options at the moment (gentoo-dev, 2.6_test11):

USB Mass storage is on, USB works fine, otherwise my mouse probably wouldn't be working right now.

SCSI disk and cdrom support are on, the cdrom works fine, so I'm fairly sure that SCSI is okay too.

Here's what comes up in dmesg:

hub 5-0:1.0: new USB device on port 2, assigned address 4

scsi2 : SCSI emulation for USB Mass Storage devices

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 4

----------

## alphatronics

Installed love-sources_test11-r1, getting the same BS.

Turned on verbose logging in the kernel, so it's giving some more useless info. Maybe someone else can make sense of this:

Connect:

 *Quote:*   

> hub 5-0:1.0: new USB device on port 2, assigned address 5
> 
> usb-storage: USB Mass Storage device detected
> 
> usb-storage: act_altsetting is 0, id_index is 71
> ...

 

Disconnect:

 *Quote:*   

> usb 5-2: USB disconnect, address 5
> 
> usb-storage: storage_disconnect() called
> 
> usb-storage: usb_stor_stop_transport called
> ...

 

Here are the relevant contents of /dev:

 *Quote:*   

> $ ls -l s*0
> 
> lr-xr-xr-x    1 root     root           36 Dec  1 15:20 sg0 -> scsi/host0/bus0/target0/lun0/generic
> 
> lr-xr-xr-x    1 root     root           31 Dec  1 15:20 sr0 -> scsi/host0/bus0/target0/lun0/cd

 

I'll try activating verbose logging in the gentoo-dev kernel and see if it gives the same thing.

----------

## alphatronics

Getting the same errors with gentoo-dev-sources-2.6.0_beta11

Just in case it was something wierd with the memory stick, I switched sticks and got the same errors.

This all works fine in 2.4.x.

----------

## sbporter

I'm getting the same thing; I had though it was an x86_64 problem, but it seems not...

Kernel 2.6.0-test11, athlon 64 3200+, latest gentoo besides....

Simon  :Wink: 

----------

## DocGonzo

 *Quote:*   

>  /dev/scsi/host2/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0
> 
> Buffer I/O error on device sda, logical block 0
> 
>  unable to read partition table
> ...

 

I got the same error with my hd when I first switched to kernel 2.6. I had to enable the "DOS or Windows partitiontable support" or what ever it is named. If you have a preformated USB-stick I bet you have a windows partition table on it.

Give it a try, maybe it helps.

----------

## alphatronics

I have NTFS/FAT filesystems included in the kernel, if that's what you mean. (hda5 on this computer is a FAT partition)

/me looks around kernel config for partition table support

Didn't see anything about partition types, though I checked to make sure FAT as well as the VFAT and MSDOS extensions were enabled (they were).Last edited by alphatronics on Tue Dec 02, 2003 5:11 pm; edited 1 time in total

----------

## DocGonzo

No thats not what i mean. Look for "Partition Table Support". Its not the Filesystem what i mean. When I get on my linux box, I can tell you the right checkbox in the Kernelconfig.

----------

## alphatronics

Okay. Thanks!

----------

## sbporter

I checked, and my kernel has the DOS/Win patitioning enabled...

I suppose this is why we have test kernels....

Simon  :Wink: 

----------

## alphatronics

Under what section is this thing located, just out of curiosity? I'm having no luck finding it.

----------

## Beekster

File Systems -> Partition types -> Advanced partition selection -> PC BIOS (MSDOS Partition Tables) Support.

I've tried it, and it didn't help me...

I got a:

```
Dec  3 13:06:03 [kernel] hub 1-0:1.0: new USB device on port 2, assigned address 3

Dec  3 13:06:03 [kernel] scsi0 : SCSI emulation for USB Mass Storage devices

Dec  3 13:06:03 [usb.agent] ... no modules for USB product 54c/10/210

Dec  3 13:06:03 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:06:03 [scsi.agent] how to add device type= at /devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2:1.0/host0/0:0:0:0 ??

Dec  3 13:06:03 [kernel] sda: Write Protect is off

Dec  3 13:06:03 [kernel] sda: assuming drive cache: write through

Dec  3 13:06:03 [kernel] SCSI device (ioctl) reports ILLEGAL REQUEST.

Dec  3 13:06:03 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:06:03 [kernel] sda: Write Protect is off

Dec  3 13:06:03 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:06:03 [kernel] sda: Write Protect is off

Dec  3 13:07:26 [kernel] SCSI device (ioctl) reports ILLEGAL REQUEST.

Dec  3 13:07:26 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:07:26 [kernel] sda: Write Protect is off

Dec  3 13:07:26 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:07:26 [kernel] sda: Write Protect is off

Dec  3 13:07:26 [kernel] Buffer I/O error on device sda, logical block 0

Dec  3 13:07:26 [kernel] ldm_validate_partition_table(): Disk read failed.

Dec  3 13:07:26 [kernel]  unable to read partition table

Dec  3 13:07:26 [kernel] FAT: unable to read boot sector

Dec  3 13:08:10 [kernel] SCSI device (ioctl) reports ILLEGAL REQUEST.

Dec  3 13:08:10 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:08:10 [kernel] sda: Write Protect is off

Dec  3 13:08:10 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:08:10 [kernel] sda: Write Protect is off

Dec  3 13:08:10 [kernel] Buffer I/O error on device sda, logical block 0

Dec  3 13:08:10 [kernel] ldm_validate_partition_table(): Disk read failed.

Dec  3 13:08:10 [kernel]  unable to read partition table

Dec  3 13:08:10 [kernel] SCSI device (ioctl) reports ILLEGAL REQUEST.

Dec  3 13:08:10 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:08:10 [kernel] sda: Write Protect is off

Dec  3 13:08:10 [kernel] SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Dec  3 13:08:10 [kernel] sda: Write Protect is off

Dec  3 13:08:10 [kernel] Buffer I/O error on device sda, logical block 0

Dec  3 13:08:10 [kernel] ldm_validate_partition_table(): Disk read failed.

Dec  3 13:08:10 [kernel]  unable to read partition table

Dec  3 13:08:10 [kernel] Buffer I/O error on device sda, logical block 0

Dec  3 13:08:49 [kernel] usb 1-2: USB disconnect, address 3

```

----------

## DocGonzo

Sorry I'm late.   :Embarassed: 

Under File Systems -> Partitiontypes

I checked:

[x] Advanced partition selection

...

[x] PC BIOS (MSDOS) partition

[x] Windows Logical Disk Manager

Maybe the last one is the one you need.

I didn't had the time to install 2.6.0test11 yet, but with test9 all crap that i pluged onto my USB port worked flawlessly.

----------

## Beekster

I needed a patch that I found here to get my Sony camera working with 2.6.0-test10.  I have my /dev/sda1 back!

----------

## alphatronics

After modifying the kernel, here's what I get in dmesg:

Connect:

 *Quote:*   

> hub 5-0:1.0: new USB device on port 2, assigned address 4
> 
> usb-storage: USB Mass Storage device detected
> 
> usb-storage: act_altsetting is 0, id_index is 71
> ...

 

Disconnect:

 *Quote:*   

> usb 5-2: USB disconnect, address 4
> 
> usb-storage: storage_disconnect() called
> 
> usb-storage: usb_stor_stop_transport called
> ...

 

I have no idea what any of that means, but here's a summary: "2.6 < 2.4"

----------

## CybeRDukE

i just tried again getting my iriver to work and i realized some strange things that might help us.

i first tried adding my device to 

```
/usr/src/linux/drivers/usb/storage/unusual_devs.h
```

and tried several combinations of flags, transfer type etc (a good overview can be found here: http://lumumba.luc.ac.be/~cheezy/misc/unusual_devs.html)

dmesg output changed but the stick still did not work.

next thing was a look at the partition table since /dev/sda is created, but the 4 partitions are not recognized. now the very interesting fact:

after a 

```
fdisk -l /dev/sda
```

 the 4 missing entries were created, but disappeared when i tried to access them. and i realized that the table on the usb-stick is really messed up. fdisk complains about different physical and logical start/end sectors.

i also had a look at the kernel source and partition detection really changed a lot from 2.4 to 2.6 (as far as i could see with a quick look at check.c)

now my conclusion is: kernel 2.4 did not care about "unclean" partition talbles but 2.6 does. it would be interesting if your partition table has the same warnings (both, if your usb-storage device does or does not work).

btw, when looking at kernel-sources i realized that the "unable to read partition table" is not caused by a missing partition table type in the kernel (as discussed above).

----------

## alphatronics

I performed the edit/patch that I found here. After recompiling the kernel, the problem was solved, though it seemed to take a few seconds for /dev/sda1 to show up, even though /dev/sda showed up immediately.

Perhaps this could be a patch for a future gentoo-dev-sources build?

----------

## CybeRDukE

i just tried the patch alphatronics mentioned but for me it hasn't changed anything. neither the dmesg-output nor the devices at /dev

----------

## alphatronics

Hm, after doing it a couple times:

Correction: While sda shows up, sda1 might or might not, depending on which direction the wind is blowing. If it doesn't show up, this fixes it:

 *bcore wrote:*   

> I've noticed this too... Here's my workaround (just in case it works for you)
> 
> when I first plug my compactflash reader into the USB, a node /dev/sda is created, but not the /dev/sda1 node I need. If I issue the following command:
> 
> mount -t vfat /dev/sda /mnt/cflash
> ...

 

Under that thread, there's also this patch, but it looks like it's specific to the SJ33 that I'm trying to use. Haven't tried it yet.

----------

## alphatronics

The problem was not solved in 2.6.0 final, so I manually edited transport.c and afterwards things worked fine again.

Here's what I did:

```
# nano /usr/src/linux/drivers/usb/storage/transport.c
```

Change this (starting at line 824):

```
/* If not UFI, we interpret the data as a result code

* The first byte should always be a 0x0

* The second byte & 0x0F should be 0x0 for good, otherwise error

*/

if (us->iobuf[0]) {

        US_DEBUGP("CBI IRQ data showed reserved bType %d\n",

                        us->iobuf[0]);

        return USB_STOR_TRANSPORT_ERROR;

}
```

To this:

```
/* If not UFI, we interpret the data as a result code

* The first byte should always be a 0x0

* The second byte & 0x0F should be 0x0 for good, otherwise error

*/

/*if (us->iobuf[0]) {

*      US_DEBUGP("CBI IRQ data showed reserved bType %d\n",

*                      us->iobuf[0]);

*      return USB_STOR_TRANSPORT_ERROR;

*}

*/
```

Then recompile kernel. From then on, /dev/sda will show up whenever the device is connected to the computer, but first I have to get /dev/sda1 to appear (as mentioned by an earlier poster in this thread):

```
# mount /dev/sda /mnt/usb

mount: wrong fs type, bad option, bad superblock on /dev/sda,

       or too many mounted file systems
```

After doing that, /dev/sda1 mysteriously appears, and from this point on works normally:

```
# mount /dev/sda1 /mnt/usb

# cd /mnt/usb

# ls

memstick.ind palm

# :D
```

It'd be awesome if someone added this to the gentoo dev branch or something so that I (and anyone else who is getting this) don't have to manually edit the same if statement every time a new version of the 2.6 kernel comes out.

----------

## Simon196405

For me the problem got solved in 2.6.0 final when I emerged hotplug and usbutils.

Simon Siemonsma

----------

## alphatronics

Noticing that I don't have those, I'll try installing them and see what happens.

----------

## kpoman

I am unable to mount my mp3 player ( iriver ifp 380 ) under 2.6 kernels ! 

I have all the stuff needed on the kernel but I really think there are some issues with it (I saw lot of people complaining about this);

if someone could take a look at this ?:

-----

root@shuttle storage # ll /dev/sda*

lr-xr-xr-x    1 root     root           33 Dec 21 04:16 /dev/sda ->

scsi/host1/bus0/target0/lun0/disc

root@shuttle storage #  fdisk -l /dev/sda

Disk /dev/sda: 131 MB, 131072000 bytes

5 heads, 50 sectors/track, 1024 cylinders

Units = cylinders of 250 * 512 = 128000 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   ?      939366     8484986   943202437   64  Novell Netware 286

Partition 1 has different physical/logical beginnings (non-Linux?):

     phys=(32, 114, 46) logical=(939365, 4, 12)

Partition 1 has different physical/logical endings:

     phys=(369, 105, 51) logical=(8484985, 1, 35)

Partition 1 does not end on cylinder boundary.

/dev/sda2   ?     7880954    10055022   271758385+  20  Unknown

Partition 2 has different physical/logical beginnings (non-Linux?):

     phys=(378, 121, 37) logical=(7880953, 4, 47)

Partition 2 has different physical/logical endings:

     phys=(357, 117, 46) logical=(10055021, 0, 17)

Partition 2 does not end on cylinder boundary.

/dev/sda3   ?     7675951     8578355   112800441   20  Unknown

Partition 3 has different physical/logical beginnings (non-Linux?):

     phys=(370, 111, 53) logical=(7675950, 3, 1)

Partition 3 has different physical/logical endings:

     phys=(356, 114, 37) logical=(8578354, 0, 32)

Partition 3 does not end on cylinder boundary.

/dev/sda4   ?           1    13538079  1692259840    0  Empty

Partition 4 has different physical/logical beginnings (non-Linux?):

     phys=(0, 0, 0) logical=(0, 0, 1)

Partition 4 has different physical/logical endings:

     phys=(0, 0, 0) logical=(13538078, 3, 30)

Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

root@shuttle storage #  

root@shuttle storage # ll /dev/sda*

lr-xr-xr-x    1 root     root           33 Dec 21 04:16 /dev/sda ->

scsi/host1/bus0/target0/lun0/disc

lr-xr-xr-x    1 root     root           34 Dec 21 04:19 /dev/sda1 ->

scsi/host1/bus0/target0/lun0/part1

lr-xr-xr-x    1 root     root           34 Dec 21 04:19 /dev/sda2 ->

scsi/host1/bus0/target0/lun0/part2

lr-xr-xr-x    1 root     root           34 Dec 21 04:19 /dev/sda3 ->

scsi/host1/bus0/target0/lun0/part3

lr-xr-xr-x    1 root     root           34 Dec 21 04:19 /dev/sda4 ->

scsi/host1/bus0/target0/lun0/part4

root@shuttle storage # mount /dev/sda

sda   sda1  sda2  sda3  sda4  

root@shuttle storage # mount /dev/sda4 /mnt/iriver/

mount: special device /dev/sda4 does not exist

root@shuttle storage # ll /dev/sda*

lr-xr-xr-x    1 root     root           33 Dec 21 04:16 /dev/sda ->

scsi/host1/bus0/target0/lun0/disc

root@shuttle storage #  

---------

so the devices appear when I do the fdisk listing command, but then

disappear when I try to mount them this is disappointing !

on the same time I can see this on my dmesg:

when I fdisk -l /dev/sda :

---------

SCSI device sda: 256000 512-byte hdwr sectors (131 MB)

sda: Write Protect is off

sda: Mode Sense: 45 00 00 08

sda: assuming drive cache: write through

SCSI device sda: 256000 512-byte hdwr sectors (131 MB)

sda: Write Protect is off

sda: Mode Sense: 45 00 00 08

sda: assuming drive cache: write through

 /dev/scsi/host1/bus0/target0/lun0:<3>Buffer I/O error on device sda,

logical block 0

Buffer I/O error on device sda, logical block 0

ldm_validate_partition_table(): Disk read failed.

Buffer I/O error on device sda, logical block 0

 unable to read partition table

SCSI device sda: 256000 512-byte hdwr sectors (131 MB)

sda: Write Protect is off

sda: Mode Sense: 45 00 00 08

sda: assuming drive cache: write through

SCSI device sda: 256000 512-byte hdwr sectors (131 MB)

sda: Write Protect is off

sda: Mode Sense: 45 00 00 08

sda: assuming drive cache: write through

 /dev/scsi/host1/bus0/target0/lun0: p1 p2 p3 p4

----------

and when I try to mount the stuff:

----------

SCSI device sda: 256000 512-byte hdwr sectors (131 MB)

sda: Write Protect is off

sda: Mode Sense: 45 00 00 08

sda: assuming drive cache: write through

SCSI device sda: 256000 512-byte hdwr sectors (131 MB)

sda: Write Protect is off

sda: Mode Sense: 45 00 00 08

sda: assuming drive cache: write through

 /dev/scsi/host1/bus0/target0/lun0:<3>Buffer I/O error on device sda,

logical block 0

Buffer I/O error on device sda, logical block 0

ldm_validate_partition_table(): Disk read failed.

Buffer I/O error on device sda, logical block 0

 unable to read partition table

------------

then after this, all sda1 to 4 disappear !

please help   :Sad: 

----------

## guerrilla_thought

Hey alphatronics; that's a beautiful hack.Love your /* style */ hehe  :Wink: . I'm gonna try it out.I've been banging my head against the wall trying to get this working but this is a novel idea *crosses fingers* this has been insanity in hell trying to do this... ive got another post up here with the exact same error messages. one of my log dirs was 9mb because of that damn recurring error. 

anyway... i just updated form 2.6.0-test11 to 2.6.0 and im also trying your hack. Okay. It's compiling. i'll post an update.

 *alphatronics wrote:*   

> The problem was not solved in 2.6.0 final, so I manually edited transport.c and afterwards things worked fine again.
> 
> Here's what I did:
> 
> ```
> ...

 

----------

## CybeRDukE

 *kpoman wrote:*   

> I am unable to mount my mp3 player ( iriver ifp 380 ) under 2.6 kernels ! 
> 
> I have all the stuff needed on the kernel but I really think there are some issues with it (I saw lot of people complaining about this);
> 
> 

 

that is exactly the same problem i try to solve with my ifp 380. i tried a lot even with hacking kernel sources, but no success. see the full story above...

i hope we can find a solution soon!

----------

## kpoman

sure, hope someone is listening to all those guys crying out there, like us  :Smile: 

it may be a bad partitionning of the player when the ums installs;

the better could be to find the lines of kernel code which check for partitions structure and hack them a bit ...

a good thing could be also to list all hardware that is having the same problem than we are ... then some google search would give some more info;  because the combination of ifp and linux doesnt give anything of interest out there !

Help needed !!

----------

## kpoman

by the way, ifp users are welcome to 

http://www.iriver.com/community/discussion_new.asp

just to let them (guys of iriver) know we exist and we love our mp3 player !

----------

## AGM

Oh, I see, I'm not the only one having problems   :Very Happy:   I'm running 2.6.0 final and when I plug in my usb-stick I get this from /var/log/messages:

Dec 30 18:34:52 skeletor kernel: hub 1-0:1.0: new USB device on port 1, assigned address 3

Dec 30 18:34:52 skeletor usb.agent[3526]: ... no modules for USB product 8341/2000/100

Dec 30 18:34:52 skeletor kernel: scsi0 : SCSI emulation for USB Mass Storage devices

Dec 30 18:34:52 skeletor scsi.agent[3557]: how to add device type= at /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/host0/0:0:0:0 ??

Dec 30 18:34:52 skeletor kernel:   Vendor: MUSIC     Model: DISK              Rev: 1.00

Dec 30 18:34:52 skeletor kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02

Dec 30 18:34:52 skeletor kernel: SCSI device sda: 64001 2048-byte hdwr sectors (131 MB)

And thats it... no device comes up in /dev/

----------

## syscrash

I'm running 2.6.0 final and usb-storage doesn't work for me either. I tried the patch that was posted on the forums somewhere, but it failed to apply. I tried what alphatronics said, but it still doesn't work. It works fine in kernel 2.4. Any ideas?

```
sda : READ CAPACITY failed.

sda : status=0, message=00, host=7, driver=00 

sda : sense not available. 

sda: Write Protect is off

sda: Mode Sense: 00 00 00 00

sda: assuming drive cache: write through

sda : READ CAPACITY failed.

sda : status=0, message=00, host=7, driver=00 

sda : sense not available. 

sda: Write Protect is off

sda: Mode Sense: 00 00 00 00

sda: assuming drive cache: write through

sda : READ CAPACITY failed.

sda : status=0, message=00, host=7, driver=00 

sda : sense not available. 

sda: Write Protect is off

sda: Mode Sense: 00 00 00 00

sda: assuming drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

Buffer I/O error on device sda, logical block 0

ldm_validate_partition_table(): Disk read failed.

Buffer I/O error on device sda, logical block 0

 unable to read partition table

 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

ldm_validate_partition_table(): Disk read failed.

Buffer I/O error on device sda, logical block 0

 unable to read partition table

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 3

usb 1-2: USB disconnect, address 3

```

----------

## cuban

Same here... I get this:

```

root@fry djimenez # tail -f /var/log/everything/current 

Dec 31 20:21:34 [usb.agent] ... no modules for USB product 0/0/0

```

dmesg has this over and over

```

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

```

----------

## cuban

Okay, I recompiled my kernel and took usb mass storage from a built-in to a module. Now I seem to get no errors upon inserting my memory stick. Alsa, there are no sdas and /dev/scsi is still empty.

----------

## Thalion

Have anyone tried the new 2.6.1-rc1 kernel? The changelog (ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.1-rc1) looks impressive, and there's quite a lot of UMS-related fixes mentioned there. Gonna give it a try... maybe my iRiver iFP-180TC will work at last.

----------

## cuban

Let me know how that turns out. I can't mount my USB Pen either...

```

hub 6-1:1.0: new USB device on port 3, assigned address 6

scsi1 : SCSI emulation for USB Mass Storage devices

  Vendor:           Model:                   Rev:     

  Type:   Direct-Access                      ANSI SCSI revision: 02

SCSI device sdb: 1 512-byte hdwr sectors (0 MB)

sdb: Write Protect is off

sdb: Mode Sense: 00 0f 00 00

sdb: assuming drive cache: write through

 /dev/scsi/host1/bus0/target0/lun0:end_request: I/O error, dev sdb, sector 0

Buffer I/O error on device sdb, logical block 0

end_request: I/O error, dev sdb, sector 0

Buffer I/O error on device sdb, logical block 0

 unable to read partition table

Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0

Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0,  type 0

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 6

end_request: I/O error, dev sdb, sector 0

Buffer I/O error on device sdb, logical block 0

end_request: I/O error, dev sdb, sector 0

Buffer I/O error on device sdb, logical block 0

end_request: I/O error, dev sdb, sector 0

```

----------

## syscrash

 *Thalion wrote:*   

> Have anyone tried the new 2.6.1-rc1 kernel? The changelog (ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.1-rc1) looks impressive, and there's quite a lot of UMS-related fixes mentioned there. Gonna give it a try... maybe my iRiver iFP-180TC will work at last.

 

I just compiled 2.6.1-rc1, and it still does not work. My dmesg is flooded with these:

```
usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code -110; transferred 0/10

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

sda : READ CAPACITY failed.

sda : status=0, message=00, host=7, driver=00

sda : sense not available.

sda: assuming Write Enabled

sda: assuming drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

Buffer I/O error on device sda, logical block 0

ldm_validate_partition_table(): Disk read failed.

Buffer I/O error on device sda, logical block 0

 unable to read partition table

 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

ldm_validate_partition_table(): Disk read failed.

Buffer I/O error on device sda, logical block 0

 unable to read partition table

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)

usb-storage:  1e 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code -110; transferred 0/6

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)

usb-storage:  1e 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code -110; transferred 0/6

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)

usb-storage:  1e 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code -110; transferred 0/6

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)

usb-storage:  1e 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code -110; transferred 0/6

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)

usb-storage:  1e 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code -110; transferred 0/6

usb-storage: -- timeout or NAK

usb-storage: Call to usb_stor_ctrl_transfer() returned 4

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

usb-storage: Soft reset failed: -110

usb-storage: scsi cmd done, result=0x70000

usb-storage: *** thread sleeping.

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Bad target number (1:0)

usb-storage: scsi cmd done, result=0x40000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Bad target number (2:0)

usb-storage: scsi cmd done, result=0x40000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Bad target number (3:0)

usb-storage: scsi cmd done, result=0x40000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Bad target number (4:0)

usb-storage: scsi cmd done, result=0x40000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Bad target number (5:0)

usb-storage: scsi cmd done, result=0x40000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Bad target number (6:0)

usb-storage: scsi cmd done, result=0x40000

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Bad target number (7:0)

usb-storage: scsi cmd done, result=0x40000

usb-storage: *** thread sleeping.

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 3

usb 1-2: USB disconnect, address 3

usb-storage: storage_disconnect() called

usb-storage: usb_stor_stop_transport called

usb-storage: -- dissociate_dev

usb-storage: -- sending exit command to thread

usb-storage: *** thread awakened.

usb-storage: -- exit command received

usb-storage: -- usb_stor_release_resources finished

```

Sorry for the length  :Embarassed: 

----------

## CybeRDukE

 *Thalion wrote:*   

> Have anyone tried the new 2.6.1-rc1 kernel? The changelog (ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.1-rc1) looks impressive, and there's quite a lot of UMS-related fixes mentioned there. Gonna give it a try... maybe my iRiver iFP-180TC will work at last.

 

i just tried the mm-sources 2.6.1-rc1 and got the same error messages. 

however, i think the fixes have to be made at the partition-table routines and not at the usb-storage module.

btw, the manager version of the firmware already supports ogg    :Very Happy: 

can't wait for the ums version!

----------

## cuban

I can get dmesg to see my usb storage device, it says it's /dev/sdb. When i mount it I get this though:

```

root@fry usb-storage # mount -t vfat /dev/sdb /mnt/cardreader/

mount: /dev/sdb: can't read superblock

```

----------

## cuban

I've made some progress. I still get the above when I try to mount. Here is my dmesg when I plug the device in:

```

hub 6-2.1.2:1.0: new USB device on port 3, assigned address 11

scsi3 : SCSI emulation for USB Mass Storage devices

  Vendor:           Model:                   Rev:     

  Type:   Direct-Access                      ANSI SCSI revision: 02

SCSI device sdb: 1 512-byte hdwr sectors (0 MB)

sdb: Write Protect is off

sdb: Mode Sense: 00 0f 00 00

sdb: assuming drive cache: write through

 /dev/scsi/host3/bus0/target0/lun0:end_request: I/O error, dev sdb, sector 0

Buffer I/O error on device sdb, logical block 0

end_request: I/O error, dev sdb, sector 0

Buffer I/O error on device sdb, logical block 0

 unable to read partition table

Attached scsi removable disk sdb at scsi3, channel 0, id 0, lun 0

Attached scsi generic sg1 at scsi3, channel 0, id 0, lun 0,  type 0

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 11

```

----------

## wolf_99

Hi gang!

I installed the 2.6.0-mm-r1 kernel, and, yes, as you gussed, I can't get my mass-storage to mount.

I don't even have a /dev/sda or /dev/sda1 !

Now, I did compile my kernel with

```
    <M> Support for USB                                                             │ 

       [ ]   USB verbose debug messages                                                

        ---   Miscellaneous USB options                                                 

       [*]   USB device filesystem                                                     

       [ ]   Enforce USB bandwidth allocation (EXPERIMENTAL)                           

       [ ]   Dynamic USB minor allocation (EXPERIMENTAL)                               

         ---   USB Host Controller Drivers                                               

       <M>   EHCI HCD (USB 2.0) support                                                

       < >   OHCI HCD support                                                          

       < >   UHCI HCD (most Intel and VIA) support                                     

        ---   USB Device Class drivers                                                  

       < >   USB Audio support                                                         

       < >   USB Bluetooth TTY support                                                 

       < >   USB MIDI support                                                          

       <M>   USB Modem (CDC ACM) support                                               

       < >   USB Printer support                                                       

       <M>   USB Mass Storage support    
```

and my dmseg gives me

```
Initializing USB Mass Storage driver...

drivers/usb/core/usb.c: registered new driver usb-storage

USB Mass Storage support registered.
```

(these are the last three lines)

Can any one help me?

----------

## cuban

Well for one I believe you are going to need either UHCI or OHCI support. regardless of if you have USB 2.0 or not. One of those will support your usb 1.1.

To find out which you have do lspci -vv.

----------

## scoobydu

 *cuban wrote:*   

> I've made some progress. I still get the above when I try to mount. Here is my dmesg when I plug the device in:
> 
> ```
> 
> hub 6-2.1.2:1.0: new USB device on port 3, assigned address 11
> ...

 

Your card needs to be formatted 'vfat'.

Is it?

----------

## cuban

Even if it isn't fdisk -l returns this:

```

root@fry djimenez # fdisk /dev/sda

Unable to read /dev/sda
```

----------

## cuban

Mysteriously my 7-in-1 card reader now works, but my USB Pen does not.

All I added was multiple LUN support for SCSI to my kernel.

----------

## wolf_99

Thanks cuban, my pen works now!  :Very Happy: 

Good luck with your's.

----------

## AGM

So folks, 2.6.1_rc1 works for me... I hope your problems can be solved too...

----------

## syscrash

 *cuban wrote:*   

> Mysteriously my 7-in-1 card reader now works, but my USB Pen does not.
> 
> All I added was multiple LUN support for SCSI to my kernel.

 

I did that, and mine still doesn't work  :Sad: 

----------

## syscrash

Hmm... in 2.6.1, it spits out some io errors to dmesg.

```
scsi0 : SCSI emulation for USB Mass Storage devices

  Vendor: Casio     Model: QV DigitalCamera  Rev: 9009

  Type:   Direct-Access                      ANSI SCSI revision: 02

sda : READ CAPACITY failed.

sda : status=0, message=00, host=7, driver=00

sda : sense not available.

sda: assuming Write Enabled

sda: assuming drive cache: write through

sda : READ CAPACITY failed.

sda : status=0, message=00, host=7, driver=00

sda : sense not available.

sda: assuming Write Enabled

sda: assuming drive cache: write through

usb 1-2: USB disconnect, address 3

sda : READ CAPACITY failed.

sda : status=0, message=00, host=7, driver=00

sda : sense not available.

sda: assuming Write Enabled

sda: assuming drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

Buffer I/O error on device sda, logical block 0

ldm_validate_partition_table(): Disk read failed.

Buffer I/O error on device sda, logical block 0

 unable to read partition table

 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

ldm_validate_partition_table(): Disk read failed.

Buffer I/O error on device sda, logical block 0

 unable to read partition table

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 3

drivers/usb/core/usb.c: registered new driver usb-storage

USB Mass Storage support registered.

```

----------

## Pink

 :Confused:  Bump

I've got exactly the same problems (2.6.1-mm2 & in the various love-sources I play with).

I can't use my mp3 player or my flash drive, anyone got any more solutions or ideas?

----------

## dan2003

2.6.1 gentoo rc3 here, Im trying to use my usb2 harddrive, I have had it working in the past. I've always had to comment out an unusual device line in the unusual_devs.h file so i did this, 

```
/*UNUSUAL_DEV(  0x05e3, 0x0702, 0x0000, 0x0001,

                "EagleTec",

                "External Hard Disk",

                US_SC_DEVICE, US_PR_DEVICE, NULL,

                US_FL_FIX_INQUIRY ),

*/
```

But still no luck. I then decided to try a few things. I disabled preempt and enabled UMS verbose debug. it mounted first time and i thought im onto summin, so disabled debug to find it didnt work again. Now i re-enabled debug again but its still not workin :/. more playing about and it seems to work sometimes, sometimes not.

dmesg reports everything worked when i plug the thing in and i even get /dev/sda,sda1 and the relevant bits in /dev/scsi.

However attempts to access the hardware cause mount to take ages, or plain hang and fdisk will report that it failed to open /dev/sda

sometimes i am able to dd small amounts of data from /dev/sda but not much before io errors occur, again different amounts on each attempt.

----------

## tamran

Check the following site:

http://sourceforge.net/mailarchive/forum.php?thread_id=3698358&forum_id=18786

The solution was to modify one line on one file.  I did a kernel recompile and it actually worked!  I've been searching for over a month to get this to work!

Hope this helps someone

----------

## tamran

Oh, just in case the link goes stale, the code change looks like this:

```

 --- linux/drivers/scsi/scsi_ioctl.c.orig   2004-01-01 09:12:20.000000000 +0100

 +++ linux/drivers/scsi/scsi_ioctl.c   2004-01-05 20:42:03.979349544 +0100

 @@ -156,7 +156,7 @@

     if (!sdev->removable || !sdev->lockable)

            return 0;

  

 -   scsi_cmd[0] = ALLOW_MEDIUM_REMOVAL;

 +   scsi_cmd[0] = 0;

     scsi_cmd[1] = 0;

     scsi_cmd[2] = 0;

     scsi_cmd[3] = 0;

```

It worked for me using IRiver IFP-390.

----------

## Pink

Nope, that didn't work   :Sad: 

Still got the problem of:

```
mount: /dev/sda1: can't read superblock
```

on the first time I put the usb device on. Any subsequent times there is no sdx at all - no recognition of a device being inserted.

Most odd as there is no flicker of activity from anything when a device is plugged in (after the first unsuccesful attempt).

Oh well, possible time to ditch 2.6.1 and the love sources... and go back to 2.4 ?

----------

## tamran

Here is a list of modules I've loaded (when I do "lsmod").  I've highlighted the scsi and usb stuff in red.

```

tamran (~)# lsmod

Module                  Size  Used by

floppy                 59828  0 

nvidia               2067816  12 

ohci_hcd               18560  0 

ehci_hcd               24576  0 

parport_pc             41548  0 

parport                43904  1 parport_pc

via_agp                 7616  1 

agpgart                32520  1 via_agp

snd_seq_midi            8416  0 

snd_seq_midi_event      7936  1 snd_seq_midi

snd_seq                56432  2 snd_seq_midi,snd_seq_midi_event

snd_ens1371            22724  1 

snd_rawmidi            25472  2 snd_seq_midi,snd_ens1371

snd_seq_device          8132  3 snd_seq_midi,snd_seq,snd_rawmidi

snd_ac97_codec         63172  1 snd_ens1371

snd_pcm_oss            53636  0 

snd_pcm               101312  2 snd_ens1371,snd_pcm_oss

snd_page_alloc         11844  1 snd_pcm

snd_timer              26240  2 snd_seq,snd_pcm

snd_mixer_oss          19456  1 snd_pcm_oss

snd                    55428  13 snd_seq_midi,snd_seq_midi_event,snd_seq,snd_ens1371,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss

soundcore               9536  1 snd

hid                    64448  0 

iforce                 19200  0 

joydev                  9984  0 

sg                     34508  0 

usb_storage            67840  0 

uhci_hcd               32648  0 

[color=red]usbcore               111188  8 ohci_hcd,ehci_hcd,hid,iforce,usb_storage,uhci_hcd[/color]

tulip                  47008  0 

ide_tape               56464  0 

st                     39956  0 

ide_cd                 40960  0 

sr_mod                 16032  0 

[color=red]scsi_mod               79524  4 sg,usb_storage,st,sr_mod[/color]

cdrom                  35232  2 ide_cd,sr_mod

```

Also, when I mount, I use the following:

```

tamran (~)# mount -t vfat /dev/sda /mnt/usbstorage/

```

Notice I didn't use /dev/sda1 ... just sda

Hope you can get it to work.  Good luck.

Tamran

----------

## Thalion

Confirmed, the patch works for my iFP-180TC with UMS1.11 firmware and vanilla kernel 2.6.1. Hotplugging works nice for me, too.

Note that the device will be /dev/sda, not /dev/sda1. This is essentially why fdisk complains - there is no partition table, just a single big FAT16 partition the size of player's memory.

----------

## boludo

Hi folks,

I have an iRiver iFP-599 since Christmas, and I also had problems getting the UMS firmware to work under linux-2.6

The problem is indeed what the patched posted here tries to fix, but doing so breaks SCSI for other devices (in case you use them, that is).

I posted a patch on the lkml which is specific for iRiver devices, although more could be added if they have the same problem, that is, USB devices reporting being removable but not being so.

Anyway, use the patch if you will. It's been extensively tested and there are no problems at all. I've uploaded a copy to http://perso.wanadoo.es/smarcet/015_iriver_NORMB.patch

By the way, by default windows does a real mess on the mbr of the player, with four partitions which make no sense to fdisk. What I did was removing all the partitions with fdisk, so when I next turned the device on, it said 'FORMATTING', and I got a readable mbr, with no partitions, and now I can mount it via /dev/sda instead of /dev/sda4 and feel better for having the unit without any windows garbage on it  :Smile: 

----------

## tamran

 *Quote:*   

> 
> 
> Anyway, use the patch if you will. It's been extensively tested and there are no problems at all. I've uploaded a copy to http://perso.wanadoo.es/smarcet/015_iriver_NORMB.patch
> 
> 

 

Thanks a ton, I knew there was something more refined out there.

How does one petition that something like this gets put in kernel patches, or on the gentoo emerge system?  "emerge iriver-kernel-patch" would be nice  :Smile: 

Tamran

----------

## CybeRDukE

IT WORKS. 

i can't believe it. it finally works with kernel 2.6

thx a lot lot lot

----------

## syscrash

I have found out some more interesting details. If I use a sony digital camera, it will mount it happily. If I use my casio camera, it spits out the errors that i posted above. Weird  :Confused: 

----------

## syscrash

Sorry for the bumping, but I still experience this problem on 2.6.6-rc1  :Sad: 

----------

