Handle some of the inquiry flags that have come into
usage as of SPC2r20. Specifically, handle the BQueue flag which will indicate that a device supports the Basic Queueing model (no Head of Queue or Ordered tags). When this flag is set, SID_CmdQueue is clear. This has causes FreeBSD to assume that the device did not support tagged operations. MFC after: 1 month
This commit is contained in:
parent
8cb2906936
commit
4e359f5ad1
@ -3502,8 +3502,7 @@ xpt_action(union ccb *start_ccb)
|
||||
|
||||
if ((crs->release_flags & RELSIM_ADJUST_OPENINGS) != 0) {
|
||||
|
||||
if ((dev->inq_data.flags & SID_CmdQue) != 0) {
|
||||
|
||||
if (INQ_DATA_TQ_ENABLED(&dev->inq_data)) {
|
||||
/* Don't ever go below one opening */
|
||||
if (crs->openings > 0) {
|
||||
xpt_dev_ccbq_resize(crs->ccb_h.path,
|
||||
@ -5991,7 +5990,7 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
#ifdef CAM_NEW_TRAN_CODE
|
||||
xpt_devise_transport(path);
|
||||
#endif /* CAM_NEW_TRAN_CODE */
|
||||
if ((inq_buf->flags & SID_CmdQue) != 0)
|
||||
if (INQ_DATA_TQ_ENABLED(inq_buf))
|
||||
softc->action = PROBE_MODE_SENSE;
|
||||
else
|
||||
softc->action = PROBE_SERIAL_NUM;
|
||||
@ -6416,7 +6415,7 @@ xpt_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device,
|
||||
|
||||
/* SCSI specific sanity checking */
|
||||
if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0
|
||||
|| (inq_data->flags & SID_CmdQue) == 0
|
||||
|| (INQ_DATA_TQ_ENABLED(inq_data)) == 0
|
||||
|| (device->queue_flags & SCP_QUEUE_DQUE) != 0
|
||||
|| (device->quirk->mintags == 0)) {
|
||||
/*
|
||||
@ -6712,7 +6711,7 @@ xpt_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device,
|
||||
}
|
||||
|
||||
if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0
|
||||
|| (inq_data->flags & SID_CmdQue) == 0
|
||||
|| (INQ_DATA_TQ_ENABLED(inq_data)) == 0
|
||||
|| (device->queue_flags & SCP_QUEUE_DQUE) != 0
|
||||
|| (device->quirk->mintags == 0)) {
|
||||
/*
|
||||
|
@ -599,7 +599,19 @@ struct scsi_inquiry_data
|
||||
#define SID_AENC 0x80
|
||||
#define SID_TrmIOP 0x40
|
||||
u_int8_t additional_length;
|
||||
u_int8_t reserved[2];
|
||||
u_int8_t reserved;
|
||||
u_int8_t spc2_flags;
|
||||
#define SPC2_SID_MChngr 0x08
|
||||
#define SPC2_SID_MultiP 0x10
|
||||
#define SPC2_SID_EncServ 0x40
|
||||
#define SPC2_SID_BQueue 0x80
|
||||
|
||||
#define INQ_DATA_TQ_ENABLED(iqd) \
|
||||
((SID_ANSI_REV(iqd) < SCSI_REV_SPC2)? ((iqd)->flags & SID_CmdQue) : \
|
||||
(((iqd)->flags & SID_CmdQue) && !((iqd)->spc2_flags & SPC2_SID_BQueue)) || \
|
||||
(!((iqd)->flags & SID_CmdQue) && ((iqd)->spc2_flags & SPC2_SID_BQueue)))
|
||||
|
||||
|
||||
u_int8_t flags;
|
||||
#define SID_SftRe 0x01
|
||||
#define SID_CmdQue 0x02
|
||||
|
Loading…
Reference in New Issue
Block a user