Issuing SCSI command 'MODE SENSE'
Hi,
Thanks for the reply.
I have found some code :
LEN = 480
cdb[1] = (((dev_id & 0xF00) >> 8) << 5)
cdb[7] = ((480 >> 8) & 0xff)
cdb[8] = (480 & 0xff)
Any idea why it is 'anded' with 255. Can't seem to understand how the lun value is calculated.
Any idea ??
Thanks and Regards,
Mala
----- Original Message -----
From: "Cress, Andrew R" <[email protected]>
Date: Tue, 12 Nov 2002 06:01:10 -0800
To: "''Nirmala S''" <[email protected]>, [email protected]
Subject: RE: Issuing SCSI command 'MODE SENSE'
Quoted 45 lines
Mala,
The LUN should be passed in as part of the host:chan:targ:lun addressing. Use
SCSI_IOCTL_GET_IDLUNto return it.If you are building a utility, I have some code that shows this and the length stuff for mode sense, see http://scsirastools.sourceforge.net
(sgmode.c&sgsub.c).scsiinfo is another open-source tool that shows mode sense usage.
Andy
-----Original Message-----
From: Nirmala S [mailto:[email protected]]
Sent: Tuesday, November 12, 2002 8:38 AM
To: [email protected]
Subject: Issuing SCSI command 'MODE SENSE'Hi,
While using the MODE SENSE command how does one calculate the "Allocation Length" MSB, LSB, the LUN no. and the length of the data returned by the command.
Kindly let me know.
Thanks and Regards,
MalaSignature · 12 lines
__________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup Single & ready to mingle? lavalife.com: Where singles click. Free to Search! http://www.lavalife.com/mailcom.epl?a=2116 - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 6 lines
__________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup Single & ready to mingle? lavalife.com: Where singles click. Free to Search! http://www.lavalife.com/mailcom.epl?a=2116