* Set the LUN in the CDB if we have an older device.  We also * set it for more modern SCSI-II devices "just in case".
* Set the LUN in the CDB.  This may only be needed if we have an * older device.  However, we also set it for more modern SCSI * devices "just in case".  The old code assumed everything newer * than SCSI-2 would not need it, but why risk it?  This was the * old conditional: * * if ((sc_link->scsi_version & SID_ANSII) <= 2)
scsi_make_xs(sc_link, scsi_cmd, cmdlen, data_addr, datalen,	     retries, timeout, bp, flags)	struct scsi_link *sc_link;	struct scsi_generic *scsi_cmd;	int cmdlen;	u_char *data_addr;	int datalen;	int retries;	int timeout;	struct buf *bp;	int flags;{	struct scsi_xfer *xs;	if ((xs = scsi_get_xs(sc_link, flags)) == NULL)		return NULL;	/*	 * Fill out the scsi_xfer structure.  We don't know whose context	 * the cmd is in, so copy it.	 */	xs->sc_link = sc_link;	bcopy(scsi_cmd, &xs->cmdstore, cmdlen);	xs->cmd = &xs->cmdstore;	xs->cmdlen = cmdlen;	xs->data = data_addr;	xs->datalen = datalen;	xs->retries = retries;	xs->timeout = timeout;	xs->bp = bp;	/*	 * Set the LUN in the CDB if we have an older device.  We also	 * set it for more modern SCSI-II devices "just in case".	 */	if ((sc_link->scsi_version & SID_ANSII) <= 2)		xs->cmd->bytes[0] |=		    ((sc_link->lun << SCSI_CMD_LUN_SHIFT) & SCSI_CMD_LUN_MASK);	return xs;}