Re: smart media changing problem

Thomas Dodd <[email protected]>
Newsgroups gmane.linux.redhat.release.limbo
Message-ID <[email protected]>

Gerry Tool wrote:

> hub.c: USB hub found
> hub.c: 4 ports detected
> hub.c: USB hub found
> hub.c: 2 ports detected
> hub.c: USB hub found
> hub.c: 2 ports detected
> hub.c: USB hub found
> hub.c: 2 ports detected
> hub.c: USB hub found
> hub.c: 2 ports detected

That's a lot of USB ports :)

> hub.c: USB new device connect on bus4/1, assigned device number 2
> usb.c: USB device 2 (vend/prod 0x4b8/0x10b) is not claimed by any active driver.
> hub.c: USB new device connect on bus4/2, assigned device number 3
> usb.c: USB device 3 (vend/prod 0x66b/0x105) is not claimed by any active driver.
 > hub.c: USB new device connect on bus2/1, assigned device number 2
> usb.c: USB device 2 (vend/prod 0xaec/0x5010) is not claimed by any active driver.

A lot of unrecognized devices. It might help to disconnect them
for a while. Probably not, but maybe.

> Initializing USB Mass Storage driver...
> usb.c: registered new driver usb-storage
> scsi1 : SCSI emulation for USB Mass Storage devices
>   Vendor: Olympus   Model: Camedia MAUSB-2   Rev: 0100
>   Type:   Direct-Access                      ANSI SCSI revision: 02

Seams detected OK.

 > Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0

Knows it's removable too.
I wonder if issuing and eject might help?

> usb-uhci.c: interrupt, status 3, frame# 494

Could be an issue. USB debugging code might be handy here.

> SCSI device sda: 131072 512-byte hdwr sectors (67 MB)
> sda: Write Protect is on
>  sda: sda1
> usb-uhci.c: interrupt, status 2, frame# 167
>  I/O error: dev 08:01, sector 0
> FAT: unable to read boot sector

It tried to read the partition table, and couldn't.
I/O error reading sector 0.

This looks like the problem Mark C. was having with
his USB attached camera. It was noted on the kernel-list
that Smart media doesn't alway put the partition table
in sector 0, and some don't even implement the first few
sectors.

> On Thu, 2002-09-19 at 03:49, Dennis Gilmore wrote:
> [root@gstpc gerry]# /sbin/fdisk -l /dev/sda
> 
> Disk /dev/sda: 4 heads, 16 sectors, 256 cylinders
> Units = cylinders of 64 * 512 bytes
> 
>    Device Boot    Start       End    Blocks   Id  System
> /dev/sda1   *         1       250      7987+   1  FAT12
> [root@gstpc gerry]# mount /mnt/smedia
> mount: block device /dev/sda1 is write-protected, mounting read-only
> [root@gstpc gerry]# umount /mnt/smedia
> 
> 	remove and reinsert the card
> 
> [root@gstpc gerry]# mount /mnt/smedia
> mount: block device /dev/sda1 is write-protected, mounting read-only
> mount: wrong fs type, bad option, bad superblock on /dev/sda1,
>        or too many mounted file systems

If you checked dmesg here, I'd expect to se the I/O error
for sector 0 again.

> [root@gstpc gerry]# /sbin/fdisk -l /dev/sda
> 
> Disk /dev/sda: 4 heads, 16 sectors, 256 cylinders
> Units = cylinders of 64 * 512 bytes
> 
>    Device Boot    Start       End    Blocks   Id  System
> /dev/sda1   *         1       250      7987+   1  FAT12

I wonder if the kernel is giving the old partition data to
fdisk. Some sort of caching in the SCSI layer maybe.

I did notice that in the above dmesg, the SCSI layer never rescanned
the device. I had a removable SCSI disk sometime ago (SyQuest)
and always used the eject command. I think the kernel rescanned
the device when I inserted a disk. It probably should do the same here.

	-Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.