linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: hiren_mehta@agilent.com
To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: question about scsi generic behavior
Date: Fri, 8 Jun 2001 17:22:56 -0600	[thread overview]
Message-ID: <FEEBE78C8360D411ACFD00D0B7477971880AA8@xsj02.sjs.agilent.com> (raw)

Hi List,

I am trying to use sg_dd which goes through the scsi generic driver.
This is how use it.

sg_dd if=/dev/zero of=/dev/sg5 bs=4096 count=1

And sg5 is actually a disk. 

The question that I have is, does the scsi generic driver have a knowledge
about what kind of device it is dealing with ? As you know, all disk drives
have block size of 512 bytes. So, according to the above command, I am
suppose
write 4096 bytes of data. But when my driver gets the CDB, I see that
the transfer length is set to 1 block instead of 8 blocks. And to transfer
4096 bytes, obviously we need transfer length=8 in CDB. Since, the transfer
length
is set to 1, the drive comes back with 1 512 byte block and then comes back
with 
a good status because of which sg_dd command is not able to transfer all
4096 bytes
of data.

Any input on this ?

Regards,
-hiren
hiren_mehta@agilent.com

             reply	other threads:[~2001-06-08 23:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-08 23:22 hiren_mehta [this message]
2001-06-09 17:19 ` question about scsi generic behavior Douglas Gilbert
2001-06-08 23:49 David Chambliss
2001-06-09  0:13 hiren_mehta
2001-06-09  0:37 ` Alan Cox
2001-06-09  1:27 hiren_mehta
2001-06-09  4:40 David Chambliss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FEEBE78C8360D411ACFD00D0B7477971880AA8@xsj02.sjs.agilent.com \
    --to=hiren_mehta@agilent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).