| Author |
Message |
Guest
|
Posted:
Mon Sep 26, 2005 8:22 pm Post subject:
responses to SCSI commands |
|
|
Hi all,
I suspect the answer will be obvious, but I don't see it yet. I'm
starting to develop a driver for scsi over usb. I've read the
documentation on the SCSI command set and I understand that. What I
don't see explained is what the response looks like. For example, if I
send a READ(10) command, correctly formatted, etc. what does the
response from the device look like? I'm sure I'll feel stupid when I
see the answer, but so far I'm missing it. All I've seen so far is
details on the request. Thanks for any help anyone can give.
Lee Thalblum |
|
| Back to top |
|
 |
Jeremy Boden
Guest
|
Posted:
Tue Sep 27, 2005 12:14 am Post subject:
Re: responses to SCSI commands |
|
|
In message <1127748164.826345.267850@z14g2000cwz.googlegroups.com>,
lee_t@bigfoot.com writes
| Quote: | Hi all,
I suspect the answer will be obvious, but I don't see it yet. I'm
starting to develop a driver for scsi over usb. I've read the
documentation on the SCSI command set and I understand that. What I
don't see explained is what the response looks like. For example, if I
send a READ(10) command, correctly formatted, etc. what does the
response from the device look like? I'm sure I'll feel stupid when I
see the answer, but so far I'm missing it. All I've seen so far is
details on the request. Thanks for any help anyone can give.
Lee Thalblum
What is the reason for this driver? |
I would be *very* interested if it could be used on a Windows NT
machine.
--
Jeremy Boden |
|
| Back to top |
|
 |
Guest
|
Posted:
Tue Sep 27, 2005 12:26 am Post subject:
Re: responses to SCSI commands |
|
|
Jeremy,
Sorry, it's for an embedded application. Any chance you have some
experience with scsi drivers in general?
Lee |
|
| Back to top |
|
 |
Jeremy Boden
Guest
|
Posted:
Tue Sep 27, 2005 12:33 am Post subject:
Re: responses to SCSI commands |
|
|
In message <1127762784.698734.282060@f14g2000cwb.googlegroups.com>,
lee_t@bigfoot.com writes
| Quote: | Jeremy,
Sorry, it's for an embedded application. Any chance you have some
experience with scsi drivers in general?
Lee
Sorry - absolutely none! |
--
Jeremy Boden |
|
| Back to top |
|
 |
Rob Turk
Guest
|
Posted:
Tue Sep 27, 2005 1:58 am Post subject:
Re: responses to SCSI commands |
|
|
<lee_t@bigfoot.com> wrote in message
news:1127748164.826345.267850@z14g2000cwz.googlegroups.com...
| Quote: | Hi all,
I suspect the answer will be obvious, but I don't see it yet. I'm
starting to develop a driver for scsi over usb. I've read the
documentation on the SCSI command set and I understand that. What I
don't see explained is what the response looks like. For example, if I
send a READ(10) command, correctly formatted, etc. what does the
response from the device look like? I'm sure I'll feel stupid when I
see the answer, but so far I'm missing it. All I've seen so far is
details on the request. Thanks for any help anyone can give.
Lee Thalblum
|
Hi Lee,
If you send a valid READ(10) command then the drive will first transfer the
requested data to the buffer you specified. The drive the returns a single
status byte, which will be 00h. This indicates 'Good Status'. This status
byte will end up in the 'Target status' byte from your driver control block.
If anything goes wrong you will get a Check Condition status (02h). The
normal course of action is then to send a SCSI Request Sense command. The
returned sense data will tell you what went wrong. Many operating systems
and drivers do the Request Sense step automatically.
Rob |
|
| Back to top |
|
 |
Guest
|
Posted:
Tue Sep 27, 2005 2:13 am Post subject:
Re: responses to SCSI commands |
|
|
Rob,
When you say "the buffer you specified" is this the address contained
in the Logical Block Address in the READ(10) command? If so, do you
happen to know how that would work over a serial connection, rather
than a disk drive? I know there's a SCSI over serial spec and that's a
bit closer to what I'm trying to do. Thanks.
Lee |
|
| Back to top |
|
 |
Rob Turk
Guest
|
Posted:
Tue Sep 27, 2005 7:26 am Post subject:
Re: responses to SCSI commands |
|
|
<lee_t@bigfoot.com> wrote in message
news:1127769225.056733.222260@z14g2000cwz.googlegroups.com...
| Quote: | Rob,
When you say "the buffer you specified" is this the address contained
in the Logical Block Address in the READ(10) command? If so, do you
happen to know how that would work over a serial connection, rather
than a disk drive? I know there's a SCSI over serial spec and that's a
bit closer to what I'm trying to do. Thanks.
Lee
|
Lee,
You should separate the physical attributes from the logical ones. Serial or
parallel SCSI are just the physical layer which define how the electrical
signals travel from A to B. The logical layer defines what those signals
actually mean. SCSI over serial lines exists already in the form of iSCSI.
For the most part the fact that there's a network connection involved is
invisible to the host operating system. It only finds SCSI targets which it
can communicate with, using the same SCSI CDB's as when they were on a local
SCSI adapter.
In your case of writing a SCSI over USB driver you should probably set up
two logical connections, one for commands and status, and the other for
data. You would send the SCSI READ(10) command to the target disk, which
would seek to the LBA you specified. It would read the sector (usually 512
bytes) and send the data back to your host over the data channel. Your host
would store that data somewhere in a buffer in memory, which was specified
by the driver or application requesting the READ(10) in the first place. At
the end, the target disk would send a status byte back over the
command/status connection.
Is this just a hobby project you're working on, or are you working for a
company trying to develop a new product??
Rob |
|
| Back to top |
|
 |
Guest
|
Posted:
Tue Sep 27, 2005 1:39 pm Post subject:
Re: responses to SCSI commands |
|
|
Rob,
I'm working for a company developing a product.
Lee |
|
| Back to top |
|
 |
Rob Turk
Guest
|
Posted:
Tue Sep 27, 2005 9:22 pm Post subject:
Re: responses to SCSI commands |
|
|
<lee_t@bigfoot.com> wrote in message
news:1127810395.409217.252990@f14g2000cwb.googlegroups.com...
| Quote: | Rob,
I'm working for a company developing a product.
Lee
|
In that case you may want to contact me off-list. Send me an e-mail at
robtu
at
rtist
dot
nl
Rob |
|
| Back to top |
|
 |
The Moojit
Guest
|
Posted:
Sat Oct 01, 2005 8:15 pm Post subject:
Re: responses to SCSI commands |
|
|
There are two types of I/O you can perform to a storage device - DIRECT I/O
and INDIRECT I/O. The Windows I/O Manager assembles all requests to the
SCSI driver in the form of an IRP (IO request packet). All buffer
manipulations are handled by pointers. DIRECT IO is analogous to DMA
transfers, INDIRECT IO is analogous to copying the user defined buffer in
user space to kernel space to allow the driver to access it.
The Moojit
<lee_t@bigfoot.com> wrote in message
news:1127769225.056733.222260@z14g2000cwz.googlegroups.com...
| Quote: | Rob,
When you say "the buffer you specified" is this the address contained
in the Logical Block Address in the READ(10) command? If so, do you
happen to know how that would work over a serial connection, rather
than a disk drive? I know there's a SCSI over serial spec and that's a
bit closer to what I'm trying to do. Thanks.
Lee
|
|
|
| Back to top |
|
 |
Phil Barila
Guest
|
Posted:
Fri Nov 11, 2005 10:30 am Post subject:
Re: responses to SCSI commands |
|
|
<lee_t@bigfoot.com> wrote in message
news:1127810395.409217.252990@f14g2000cwb.googlegroups.com...
| Quote: | Rob,
I'm working for a company developing a product.
Lee
|
The appropriate interface is already defined. It's called USB Mass Storage
device. Make your device consistent with that spec, and you won't need a
driver, since there are very few modern OS releases without USB Mass Storage
support.
Phil
--
Philip D. Barila Windows DDK MVP
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead. |
|
| Back to top |
|
 |
|
|
|
|