public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Problems accessing USB Mass Storage
@ 2002-09-17 18:15 Jonathan Corbet
  2002-09-17 18:22 ` Randy.Dunlap
  2002-09-18  9:22 ` Andries Brouwer
  0 siblings, 2 replies; 19+ messages in thread
From: Jonathan Corbet @ 2002-09-17 18:15 UTC (permalink / raw)
  To: gen-lists; +Cc: linux-kernel

Don't know if this is helpful or not, but, based on my messing around with
SmartMedia USB stuff...

SmartMedia cards are weird in that they have a (seemingly) random amount of
waste space at the beginning of the card.  Your 8MB card, in particular,
has nothing of interest in the first 25 sectors.  Some cards have a
reasonable partition table in the first sector, and some don't.  Modern
Windows systems (and cameras, of course) seem to be able to access the
filesystem on the card without needing to see a partition table.

A little while I posted a Lexar SmartMedia driver patch which hacked around
this by substituting a fake partition table when the first sector was read.
I'm not sure it's the right solution, though.  A better way, perhaps, is a
little user-space program which writes the appropriate partition table
depending on the card capacity.  Note that fdisk doesn't (easily) work for
this purpose, since it wants partitions to start on cylinder boundaries.

You might try just using dd to copy your card to disk with an offset of 25
sectors, and see of you can mount the resulting image.

Then again, the interface to some SmartMedia readers is vastly more
complicated, as the sddr09 driver shows.

jon

Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: Problems accessing USB Mass Storage
@ 2002-09-17 22:04 Thomas Dodd
  2002-09-17 22:12 ` [Linux-usb-users] " Randy.Dunlap
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas Dodd @ 2002-09-17 22:04 UTC (permalink / raw)
  To: Rogier Wolff; +Cc: linux-kernel, linux-usb-users



Rogier Wolff wrote:
> On Tue, Sep 17, 2002 at 10:46:31AM -0700, Greg KH wrote:
> 
>>On Tue, Sep 17, 2002 at 12:37:37PM -0500, Thomas Dodd wrote:
>>
>>>I get the feeling it's not a true mass storage device.
>>
>>Sounds like it.
> 
> 
> Nope. Sure does sound like it's a mass storage device. And it works
> too. 
> 
> The kernel managed to read the partition table off it, and got
> one valid partition: sda1. 

Accept that you cannot read data from the device. At all.
Even dd fails. And the windows drivers work (using XP
in vmware it think it was) correctly on this same device.

	-Thomas


^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: Problems accessing USB Mass Storage
@ 2002-09-17 22:51 Mark C
  2002-09-17 23:09 ` [Linux-usb-users] " Randy.Dunlap
  0 siblings, 1 reply; 19+ messages in thread
From: Mark C @ 2002-09-17 22:51 UTC (permalink / raw)
  To: Patrick Mansfield; +Cc: linux-kernel, linux-usb-users

On Tue, 2002-09-17 at 23:21, Patrick Mansfield wrote:

> You should be able to run the equivalent:
> 
> 	dd if=/dev/sda of=/dev/zero bs=512 count=8

I done that and please find the output below:

usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Command START_STOP (6 bytes)
usb-storage: 1b 00 00 00 01 00 74 c1 00 00 00 00
usb-storage: Bulk command S 0x43425355 T 0x20 Trg 0 LUN 0 L 0 F 0 CL 6
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: clearing endpoint halt for pipe 0xc0038280
usb-storage: usb_stor_clear_halt: result=0
usb-storage: Attempting to get CSW (2nd try)...
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x20 R 0 Stat 0x1
usb-storage: -- transport indicates command failure
usb-storage: Issuing auto-REQUEST_SENSE
usb-storage: Bulk command S 0x43425355 T 0x20 Trg 0 LUN 0 L 18 F 128 CL
6
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_transfer_partial(): xfer 18 bytes
usb-storage: usb_stor_bulk_msg() returned 0 xferred 18/18
usb-storage: usb_stor_transfer_partial(): transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x20 R 0 Stat 0x0
usb-storage: -- Result from auto-sense is 0
usb-storage: -- code: 0x70, key: 0x5, ASC: 0x24, ASCQ: 0x0
usb-storage: Illegal Request: invalid field in CDB
usb-storage: scsi cmd done, result=0x2
usb-storage: *** thread sleeping.
SCSI device (ioctl) reports ILLEGAL REQUEST.
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage: 00 00 00 00 00 00 00 00 00 00 e9 df
usb-storage: Bulk command S 0x43425355 T 0x21 Trg 0 LUN 0 L 0 F 0 CL 6
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x21 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
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 e9 df
usb-storage: Bulk command S 0x43425355 T 0x22 Trg 0 LUN 0 L 8 F 128 CL
10
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_transfer_partial(): xfer 8 bytes
usb-storage: usb_stor_bulk_msg() returned 0 xferred 8/8
usb-storage: usb_stor_transfer_partial(): transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x22 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
SCSI device sda: 16384 512-byte hdwr sectors (8 MB)
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Command MODE_SENSE (6 bytes)
usb-storage: 1a 00 3f 00 ff 00 00 00 00 00 e9 df
usb-storage: Bulk command S 0x43425355 T 0x23 Trg 0 LUN 0 L 255 F 128 CL
6
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_transfer_partial(): xfer 255 bytes
usb-storage: usb_stor_bulk_msg() returned -32 xferred 0/255
usb-storage: clearing endpoint halt for pipe 0xc0038280
usb-storage: usb_stor_clear_halt: result=0
usb-storage: usb_stor_transfer_partial(): unknown error
usb-storage: Bulk data transfer result 0x2
usb-storage: Attempting to get CSW...
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x23 R 255 Stat 0x1
usb-storage: -- transport indicates command failure
usb-storage: Issuing auto-REQUEST_SENSE
usb-storage: Bulk command S 0x43425355 T 0x23 Trg 0 LUN 0 L 18 F 128 CL
6
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_transfer_partial(): xfer 18 bytes
usb-storage: usb_stor_bulk_msg() returned 0 xferred 18/18
usb-storage: usb_stor_transfer_partial(): transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x23 R 0 Stat 0x0
usb-storage: -- Result from auto-sense is 0
usb-storage: -- code: 0x70, key: 0x5, ASC: 0x24, ASCQ: 0x0
usb-storage: Illegal Request: invalid field in CDB
usb-storage: scsi cmd done, result=0x2
usb-storage: *** thread sleeping.
sda: test WP failed, assume Write Enabled
 sda: I/O error: dev 08:00, sector 0
 I/O error: dev 08:00, sector 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 01 00 d7 d4 b7 1e 14 c0
usb-storage: Bulk command S 0x43425355 T 0x24 Trg 0 LUN 0 L 0 F 0 CL 6
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x24 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
 I/O error: dev 08:00, sector 0
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)
usb-storage: 1e 00 00 00 00 00 12 c0 30 33 67 d5
usb-storage: Bulk command S 0x43425355 T 0x25 Trg 0 LUN 0 L 0 F 0 CL 6
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x25 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.

Thanks

Mark

-- 
---
To steal ideas from one person is plagiarism;
to steal from many is research.


^ permalink raw reply	[flat|nested] 19+ messages in thread
[parent not found: <Pine.LNX.4.33L2.0209171627330.14033-100000@dragon.pdx.osdl.net>]

end of thread, other threads:[~2002-09-18  9:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-17 18:15 Problems accessing USB Mass Storage Jonathan Corbet
2002-09-17 18:22 ` Randy.Dunlap
2002-09-17 19:46   ` Mark C
2002-09-17 20:12     ` jbradford
2002-09-17 21:21     ` Jonathan Corbet
2002-09-17 19:50   ` Thomas Dodd
2002-09-17 19:58     ` Matthew Dharm
2002-09-17 20:13       ` Thomas Dodd
2002-09-17 21:13         ` [Linux-usb-users] " Mark C
2002-09-17 21:40           ` Thomas Dodd
2002-09-17 21:51             ` Mark C
2002-09-17 21:58           ` Rogier Wolff
2002-09-17 22:17             ` Thomas Dodd
2002-09-17 22:23               ` Randy.Dunlap
2002-09-18  9:28         ` Andries Brouwer
2002-09-18  9:22 ` Andries Brouwer
  -- strict thread matches above, loose matches on Subject: below --
2002-09-17 22:04 Thomas Dodd
2002-09-17 22:12 ` [Linux-usb-users] " Randy.Dunlap
2002-09-17 22:51 Mark C
2002-09-17 23:09 ` [Linux-usb-users] " Randy.Dunlap
     [not found] <Pine.LNX.4.33L2.0209171627330.14033-100000@dragon.pdx.osdl.net>
2002-09-17 23:46 ` Mark C

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox