LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-23-2010, 10:59 PM   #1
archanac07
LQ Newbie
 
Registered: Jan 2010
Posts: 26

Rep: Reputation: 15
Post scsi read command


hi all
i came across SCSI generic driver source code..
for read they are using scsi read_10 command

to send this scsi command to driver they are preparing CDB (command descriptor block) structure.

in that they are doing
cdbp[0] = READ_10;
cdbp[2] = (unsigned char)((start_block >> 24) & 0xff);
cdbp[3] = (unsigned char)((start_block >> 16) & 0xff);
cdbp[4] = (unsigned char)((start_block >> 8) & 0xff);
cdbp[5] = (unsigned char)(start_block & 0xff);
cdbp[7] = (unsigned char)((blocks >> 8) & 0xff);
cdbp[8] = (unsigned char)(blocks & 0xff);

where cdbp is unsigned char array, start_block = 0 and block is 1 to 128 any value

if anyone knows why they are performing cdbp[2] to cdbp[8] bit shift operations??
plz do explain.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need scsi command to get serial number of a scsi tape romeshs Programming 1 09-04-2006 06:24 AM
cant use cd burner to burn AND read? either one or other, ide-scsi dmx9595 Linux - Hardware 3 05-12-2004 08:33 PM
my dvd is read as hdd and my ide cd-rw is read as scsi??? spyghost Linux - Hardware 11 07-16-2003 04:03 PM
Read only SCSI - /dev/sda5 MikeSendrove Linux - Hardware 4 11-14-2002 01:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration