public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* request sense
@ 2005-02-24 23:19 Matthew Wilcox
  2005-02-25  4:02 ` Douglas Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2005-02-24 23:19 UTC (permalink / raw)
  To: linux-scsi


Found a funny in the sym2 driver I'm not sure how to resolve:

                cp->sensecmd[0]         = REQUEST_SENSE;
                cp->sensecmd[1]         = 0;
                if (tp->tinfo.curr.scsi_version <= 2 && cp->lun <= 7)
                        cp->sensecmd[1] = cp->lun << 5;

Thing is, we don't set scsi_version anywhere, so I'm sure sym2 currently
does The Wrong Thing for SCSI-2 drives.  Pulling up the (draft) specs,
this does seem to be something that changed between SCSI-2 and SPC3r15.
Polling some of the other scsi drivers for a solution:

3w-9xxx		Never fills in LUN
53c700		Always fills in LUN
BusLogic	Doesn't send REQUEST_SENSE
aic7xxx		Same as sym2 (except it sets its equivalent of scsi_version)
dc395x		Always fills in LUN
gdth		Doesn't send REQUEST_SENSE
ipr		Never fills in LUN
ips		Doesn't send REQUEST_SENSE
ncr53c8xx	Doesn't send REQUEST_SENSE
qla1280		Doesn't send REQUEST_SENSE
sym53c416	Doesn't send REQUEST_SENSE
tmscsim		Always fills in LUN

In other words, the only driver I've found that gets this *right* is
aic7xxx (and 79xx).  Even scsi_error.c doesn't fill in the LUN.  What's
going on here?

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-02-25 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-24 23:19 request sense Matthew Wilcox
2005-02-25  4:02 ` Douglas Gilbert
2005-02-25 15:37   ` Matthew Wilcox
2005-02-25 16:58     ` Patrick Mansfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox