Re: [PATCH] tmscsim: INQUIRY always only untagged

Christoph Hellwig
2004-10-01T22:46:10Z

On Fri, Oct 01, 2004 at 11:35:54PM +0100, Christoph Hellwig wrote:
> > + if (pcmd->cmnd[0] == INQUIRY &&
> > + (pcmd->result == (DID_OK << 16) || status_byte(pcmd->result) & CHECK_CONDITION) &&
> > + (ptr->DevType & SCSI_DEVTYPE) != TYPE_NODEV)
> > + /* device found: add */
> > + pDCB->DevType = ptr->DevType & SCSI_DEVTYPE;
>
> instead of ptr->DevType you can use the 'device' field in struct scsi_device.
> In fact the dcb DevType field should go away aswell in favour of that one.

And while we're at it: The whole inquiry sniffing in dc390_SRBdone (aka all
uses of ptr and ptr) can easily go away if you kill pDCB->Inquiry7 and check
sdev->sdtr instead.