aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2010-05-02 12:50:29 +0000
committerAlexander Motin <mav@FreeBSD.org>2010-05-02 12:50:29 +0000
commit467965c62910c6f743147c6862bf9d289034e312 (patch)
tree66ddd43b448b996f70620c3c6ac057dda2c623e4 /sys/cam
parent9171d4b73651b468fed1b27a29a20242a3de242a (diff)
Notes
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_da.c4
-rw-r--r--sys/cam/ata/ata_xpt.c29
2 files changed, 19 insertions, 14 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 6cb4f2e55091..6eff691de907 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -686,14 +686,10 @@ adaregister(struct cam_periph *periph, void *arg)
else
softc->quirks = ADA_Q_NONE;
- /* Check if the SIM does not want queued commands */
bzero(&cpi, sizeof(cpi));
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE);
cpi.ccb_h.func_code = XPT_PATH_INQ;
xpt_action((union ccb *)&cpi);
- if (cpi.ccb_h.status != CAM_REQ_CMP ||
- (cpi.hba_inquiry & PI_TAG_ABLE) == 0)
- softc->flags &= ~ADA_FLAG_CAN_NCQ;
TASK_INIT(&softc->sysctl_task, 0, adasysctlinit, periph);
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index d5e0b32a49b1..3bf9c1ef1dfa 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -766,6 +766,7 @@ noerror:
}
case PROBE_IDENTIFY:
{
+ struct ccb_pathinq cpi;
int16_t *ptr;
ident_buf = &softc->ident_data;
@@ -840,16 +841,24 @@ noerror:
ata_find_quirk(path->device);
if (path->device->mintags != 0 &&
path->bus->sim->max_tagged_dev_openings != 0) {
- /* Report SIM which tags are allowed. */
- bzero(&cts, sizeof(cts));
- xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
- cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
- cts.type = CTS_TYPE_CURRENT_SETTINGS;
- cts.xport_specific.sata.tags = path->device->maxtags;
- cts.xport_specific.sata.valid = CTS_SATA_VALID_TAGS;
- xpt_action((union ccb *)&cts);
- /* Reconfigure queues for tagged queueing. */
- xpt_start_tags(path);
+ /* Check if the SIM does not want queued commands. */
+ bzero(&cpi, sizeof(cpi));
+ xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
+ cpi.ccb_h.func_code = XPT_PATH_INQ;
+ xpt_action((union ccb *)&cpi);
+ if (cpi.ccb_h.status == CAM_REQ_CMP &&
+ (cpi.hba_inquiry & PI_TAG_ABLE)) {
+ /* Report SIM which tags are allowed. */
+ bzero(&cts, sizeof(cts));
+ xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
+ cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
+ cts.type = CTS_TYPE_CURRENT_SETTINGS;
+ cts.xport_specific.sata.tags = path->device->maxtags;
+ cts.xport_specific.sata.valid = CTS_SATA_VALID_TAGS;
+ xpt_action((union ccb *)&cts);
+ /* Reconfigure queues for tagged queueing. */
+ xpt_start_tags(path);
+ }
}
ata_device_transport(path);
PROBE_SET_ACTION(softc, PROBE_SETMODE);