2008-07-16 17:43:27

by alan

[permalink] [raw]
Subject: Problem mounting Motorola USB device

Initializing USB Mass Storage driver...
scsi6 : SCSI emulation for USB Mass Storage devices
I have a Motorola phone that mounts as USB storage. The phone used to
mount under 2.6.24 on Fedora 8. Under the latest kernels, however, it
does not want to mount. The device gives an odd media error at towards
the end of the device. It gave that before, but would still mount.

Does anyone have an idea what is going wrong?

How can I mount the device anyway? (The /dev/sdb does not get created by
usb-storage in this case.) I know I probably need a new memory card. I
would like to recover this one first.

Here are the /var/log/messages...

usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 6:0:0:0: Direct-Access Motorola Phone PQ: 0 ANSI: 4
sd 6:0:0:0: [sdb] 1987584 512-byte hardware sectors (1018 MB)
sd 6:0:0:0: [sdb] Write Protect is off
sd 6:0:0:0: [sdb] Mode Sense: 10 00 00 00
sd 6:0:0:0: [sdb] Assuming drive cache: write through
sd 6:0:0:0: [sdb] 1987584 512-byte hardware sectors (1018 MB)
sd 6:0:0:0: [sdb] Write Protect is off
sd 6:0:0:0: [sdb] Mode Sense: 10 00 00 00
sd 6:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 6:0:0:0: [sdb] Attached SCSI disk
sd 6:0:0:0: Attached scsi generic sg2 type 0
sd 6:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
sd 6:0:0:0: [sdb] Sense Key : Medium Error [current]
sd 6:0:0:0: [sdb] Add. Sense: No additional sense information
end_request: I/O error, dev sdb, sector 1987576


2008-07-16 17:49:42

by alan

[permalink] [raw]
Subject: Re: Problem mounting Motorola USB device

> Initializing USB Mass Storage driver...
> scsi6 : SCSI emulation for USB Mass Storage devices
> I have a Motorola phone that mounts as USB storage. The phone used to
> mount under 2.6.24 on Fedora 8. Under the latest kernels, however, it
> does not want to mount. The device gives an odd media error at towards
> the end of the device. It gave that before, but would still mount.
>
> Does anyone have an idea what is going wrong?

Forgot the kernel version.

Fedora 9 2.6.25.10-86.fc9_x86_64

I am wondering if this is a kernel problem or a udev problem. Should I
diff the udev rules between f8 and f9?

It appears to be a maze of twisty configs, all alike.

2008-07-26 06:51:44

by Andrew Morton

[permalink] [raw]
Subject: Re: Problem mounting Motorola USB device

(cc linux-usb-devel)

On Wed, 16 Jul 2008 10:32:31 -0700 (PDT) "Alan" <[email protected]> wrote:

> Initializing USB Mass Storage driver...
> scsi6 : SCSI emulation for USB Mass Storage devices
> I have a Motorola phone that mounts as USB storage. The phone used to
> mount under 2.6.24 on Fedora 8. Under the latest kernels, however, it
> does not want to mount. The device gives an odd media error at towards
> the end of the device. It gave that before, but would still mount.
>
> Does anyone have an idea what is going wrong?
>
> How can I mount the device anyway? (The /dev/sdb does not get created by
> usb-storage in this case.) I know I probably need a new memory card. I
> would like to recover this one first.
>
> Here are the /var/log/messages...
>
> usbcore: registered new interface driver usb-storage
> USB Mass Storage support registered.
> usb-storage: device found at 3
> usb-storage: waiting for device to settle before scanning
> usb-storage: device scan complete
> scsi 6:0:0:0: Direct-Access Motorola Phone PQ: 0 ANSI: 4
> sd 6:0:0:0: [sdb] 1987584 512-byte hardware sectors (1018 MB)
> sd 6:0:0:0: [sdb] Write Protect is off
> sd 6:0:0:0: [sdb] Mode Sense: 10 00 00 00
> sd 6:0:0:0: [sdb] Assuming drive cache: write through
> sd 6:0:0:0: [sdb] 1987584 512-byte hardware sectors (1018 MB)
> sd 6:0:0:0: [sdb] Write Protect is off
> sd 6:0:0:0: [sdb] Mode Sense: 10 00 00 00
> sd 6:0:0:0: [sdb] Assuming drive cache: write through
> sdb: sdb1
> sd 6:0:0:0: [sdb] Attached SCSI disk
> sd 6:0:0:0: Attached scsi generic sg2 type 0
> sd 6:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
> sd 6:0:0:0: [sdb] Sense Key : Medium Error [current]
> sd 6:0:0:0: [sdb] Add. Sense: No additional sense information
> end_request: I/O error, dev sdb, sector 1987576

It's a 2.6.24 -> 2.6.25 regression.

2008-07-26 17:25:27

by Pete Zaitcev

[permalink] [raw]
Subject: Re: Problem mounting Motorola USB device

On Fri, 25 Jul 2008 23:51:22 -0700, Andrew Morton <[email protected]> wrote:

> (cc linux-usb-devel)
>
> On Wed, 16 Jul 2008 10:32:31 -0700 (PDT) "Alan" <[email protected]> wrote:

> > [...] The device gives an odd media error at towards
> > the end of the device. It gave that before, but would still mount.

Weird. Actually, I would rather blame the partitioning code than
the usb-storage as such.

> > [...] I know I probably need a new memory card. I
> > would like to recover this one first.

Want a practical suggestion? Try to stick the card into a common
many-in-one reader, a SanDisk SDDR-somenumber would usually work.
Save the data.

> > sd 6:0:0:0: Attached scsi generic sg2 type 0
> > sd 6:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
> > sd 6:0:0:0: [sdb] Sense Key : Medium Error [current]
> > sd 6:0:0:0: [sdb] Add. Sense: No additional sense information

Well, duh.

BTW Andrew added:

> It's a 2.6.24 -> 2.6.25 regression.

Maybe in FAT... See the sector number (1987576).

BTW, all Fedora kernels have usbmon enabled. May I see the trace?
Best of all, take the one from the working 2.6.24 (if such install
is still available). It would become obvious if usb-storage began to
do something different.

Obligatory notice: I don't think ub would fix this.

-- Pete

2008-07-26 18:19:17

by alan

[permalink] [raw]
Subject: Re: Problem mounting Motorola USB device

On Sat, 2008-07-26 at 11:22 -0600, Pete Zaitcev wrote:
> On Fri, 25 Jul 2008 23:51:22 -0700, Andrew Morton <[email protected]> wrote:
>
> > (cc linux-usb-devel)
> >
> > On Wed, 16 Jul 2008 10:32:31 -0700 (PDT) "Alan" <[email protected]> wrote:
>
> > > [...] The device gives an odd media error at towards
> > > the end of the device. It gave that before, but would still mount.
>
> Weird. Actually, I would rather blame the partitioning code than
> the usb-storage as such.
>
> > > [...] I know I probably need a new memory card. I
> > > would like to recover this one first.
>
> Want a practical suggestion? Try to stick the card into a common
> many-in-one reader, a SanDisk SDDR-somenumber would usually work.
> Save the data.

This actually causes a kernel oops. I will post debug info soon.

>
> > > sd 6:0:0:0: Attached scsi generic sg2 type 0
> > > sd 6:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
> > > sd 6:0:0:0: [sdb] Sense Key : Medium Error [current]
> > > sd 6:0:0:0: [sdb] Add. Sense: No additional sense information
>
> Well, duh.
>
> BTW Andrew added:
>
> > It's a 2.6.24 -> 2.6.25 regression.
>
> Maybe in FAT... See the sector number (1987576).
>
> BTW, all Fedora kernels have usbmon enabled. May I see the trace?
> Best of all, take the one from the working 2.6.24 (if such install
> is still available). It would become obvious if usb-storage began to
> do something different.
>
> Obligatory notice: I don't think ub would fix this.

I will get more info now that OSCON is over.

2008-07-26 18:36:19

by Pete Zaitcev

[permalink] [raw]
Subject: Re: Problem mounting Motorola USB device

On Sat, 26 Jul 2008 11:19:07 -0700, Alan <[email protected]> wrote:

> > Want a practical suggestion? Try to stick the card into a common
> > many-in-one reader, a SanDisk SDDR-somenumber would usually work.
> > Save the data.
>
> This actually causes a kernel oops. I will post debug info soon.

Probably unrelated, but must be fixed.

> I will get more info now that OSCON is over.

Thanks.

One question: can you switch to self-built kernels instead of supplied
by Fedora, just for this bug? It would be easier for me to look at
(I'm speaking in the USB hacker capacity here rather than as one
of Chuck's underlings).

-- Pete

2008-07-26 20:15:28

by alan

[permalink] [raw]
Subject: Re: Problem mounting Motorola USB device

On Sat, 2008-07-26 at 12:33 -0600, Pete Zaitcev wrote:

> One question: can you switch to self-built kernels instead of supplied
> by Fedora, just for this bug? It would be easier for me to look at
> (I'm speaking in the USB hacker capacity here rather than as one
> of Chuck's underlings).

Which tree do you want me to build from?

2008-07-26 21:07:14

by Pete Zaitcev

[permalink] [raw]
Subject: Re: Problem mounting Motorola USB device

On Sat, 26 Jul 2008 13:15:20 -0700, Alan <[email protected]> wrote:
> On Sat, 2008-07-26 at 12:33 -0600, Pete Zaitcev wrote:

> > One question: can you switch to self-built kernels instead of supplied
> > by Fedora, just for this bug? It would be easier for me to look at
> > (I'm speaking in the USB hacker capacity here rather than as one
> > of Chuck's underlings).
>
> Which tree do you want me to build from?

I think 2.6.26 would be a good place to start. Also I think the best would
be to populate the .config from /boot/config* that Fedora supplies. It takes
longer to build, but makes it more likely that we reproduce one or both
of the failures you saw (phone not mounted and the oops). You will need
to run mkinitrd /boot/initrd-2.6.26-alan.img 2.6.26-alan or something
like it, Fedora's userland and .config pretty much require it.

-- Pete