All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nirmala S" <nmala@mail.com>
To: "Cress, Andrew R" <andrew.r.cress@intel.com>, linux-scsi@vger.kernel.org
Subject: RE: Issuing SCSI command 'MODE SENSE'
Date: Tue, 12 Nov 2002 10:08:45 -0500	[thread overview]
Message-ID: <20021112150845.32341.qmail@mail.com> (raw)

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" <andrew.r.cress@intel.com>
Date: Tue, 12 Nov 2002 06:01:10 -0800
To: "''Nirmala S''" <nmala@mail.com>, linux-scsi@vger.kernel.org
Subject: RE: Issuing SCSI command 'MODE SENSE'


> Mala,
> 
> The LUN should be passed in as part of the host:chan:targ:lun addressing.
> Use SCSI_IOCTL_GET_IDLUN to 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:nmala@mail.com] 
> Sent: Tuesday, November 12, 2002 8:38 AM
> To: linux-scsi@vger.kernel.org
> 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,
> Mala
> -- 
> __________________________________________________________
> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

-- 
__________________________________________________________
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


             reply	other threads:[~2002-11-12 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-12 15:08 Nirmala S [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-12 14:01 Issuing SCSI command 'MODE SENSE' Cress, Andrew R
2002-11-12 13:37 Nirmala S

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=20021112150845.32341.qmail@mail.com \
    --to=nmala@mail.com \
    --cc=andrew.r.cress@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.