LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   USB Stick reads but won't write (http://www.linuxquestions.org/questions/linux-hardware-18/usb-stick-reads-but-wont-write-366081/)

jaws_tas 09-22-2005 07:44 PM

USB Stick reads but won't write
 
Hey all,

I just purchased a USB 2.0 256MB usb stick with inbuilt memory stick and SD readers. The card readers work fine (read and write) but when I try to write to the internal 256MB I get a stack of SCSI errors. At first I thought it might be broken but a quick check on Windows XP let me write a 240MB file with no problems.

I have Fedora 4 and I've tried the stock kernel and the latest kernel 2.6.12-1.1447_FC4. I do have USB 2.0 ports and I have no problems writing to my USB 2.0 dvd-burner or Zaurus.

The output of dmesg when I plug the device in gives:

Code:

usb 1-1: new full speed USB device using uhci_hcd and address 11
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 11
usb-storage: waiting for device to settle before scanning
ieee1394: sbp2: aborting sbp2 command
scsi0 : destination target 0, lun 0
        command: Read Capacity (10): 25 00 00 00 00 00 00 00 00 00
  Vendor: UNISON    Model: 7921  HS-FLASH    Rev: 1.07
  Type:  Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: Mode Sense: 00 23 00 00
sda: assuming drive cache: write through
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: Mode Sense: 00 23 00 00
sda: assuming drive cache: write through
 sda: unknown partition table
Attached scsi removable disk sda at scsi6, channel 0, id 0, lun 0
  Vendor: UNISON    Model: 7921  HS-SD/MMC  Rev: 1.07
  Type:  Direct-Access                      ANSI SCSI revision: 00
Attached scsi removable disk sdb at scsi6, channel 0, id 0, lun 1
  Vendor: UNISON    Model: 7921  HS-MS      Rev: 1.07
  Type:  Direct-Access                      ANSI SCSI revision: 00
Attached scsi removable disk sdc at scsi6, channel 0, id 0, lun 2
usb-storage: device scan complete

Reading from the device is fine, but when I try to write to the device I get this from dmesg:

Code:

SCSI error : <4 0 0 0> return code = 0x10070000
end_request: I/O error, dev sda, sector 1
Buffer I/O error on device sda, logical block 1
lost page write due to I/O error on sda
SCSI error : <4 0 0 0> return code = 0x10070000
end_request: I/O error, dev sda, sector 38
Buffer I/O error on device sda, logical block 38
lost page write due to I/O error on sda
SCSI error : <4 0 0 0> return code = 0x10070000
end_request: I/O error, dev sda, sector 39
Buffer I/O error on device sda, logical block 39
lost page write due to I/O error on sda
SCSI error : <4 0 0 0> return code = 0x10070000
end_request: I/O error, dev sda, sector 40

These messages just continue ad nauseum until I unplug the device (I can't unmount it).

Any help would be greatly appreciated!

Bruce Hill 09-22-2005 09:04 PM

While I'm not sure of your trouble, I can tell you that USB2.0 is EHCI. Issue from a
terminal "dmesg | grep ehci" to see if you've got it, and check the output of "lsmod"
to see if that module is loaded. While I don't know if that's the problem, your dmesg
output does indicate it's using UHCI, which is USB1.1.

PaganHippie 09-22-2005 10:58 PM

Just a thought... many USB sticks have a physical 'write-protect' switch. Is yours on?

jaws_tas 09-23-2005 12:36 AM

Nope its definitely not write protected. I think chinaman might be on to something with the UHCI thing. I didn't notice that it was uhci not ehci until he pointed it out. Its weird because my LG DVD burner uses ehci. This thing should too but it doesn't. I don't know if its the device or the driver though causing the discrepancy. Even if it is using the uhci not ehci, it still shouldn't have worked on the XP box ond not Fedora (it was XP SP1 without the ehci driver anyway so there should be no difference).

I'd like to know if anyone else has had similar problems with any other hi-speed USB device - not just pendrives. Maybe their solutions might work for me if its a problem with the hi-speed USB driver.

Incidently, the card reader part of the thing works fine, its only its internal 256mb that doesn't. And even then, it only doesn't work on linux. On Windows its fine. Which is no good cause none of my three pc's run it :p


All times are GMT -5. The time now is 03:28 PM.