lkml.org 
[lkml]   [2001]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectquestion about scsi generic behavior
Date
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:55    [W:0.029 / U:2.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site