PERFORCE change 170610 for review
Alexander Motin
mav at FreeBSD.org
Sat Nov 14 08:31:29 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=170610
Change 170610 by mav at mav_mavtest on 2009/11/14 08:31:22
Honor HBA SNCQ capability bit whan reporting NCQ support.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#79 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#79 (text+ko) ====
@@ -734,7 +734,9 @@
/* Construct SIM entry */
ch->sim = cam_sim_alloc(ahciaction, ahcipoll, "ahcich", ch,
device_get_unit(dev), &ch->mtx,
- min(2, ch->numslots), ch->numslots, devq);
+ min(2, ch->numslots),
+ (ch->caps & AHCI_CAP_SNCQ) ? ch->numslots : 0,
+ devq);
if (ch->sim == NULL) {
device_printf(dev, "unable to allocate sim\n");
error = ENOMEM;
@@ -2119,7 +2121,9 @@
struct ccb_pathinq *cpi = &ccb->cpi;
cpi->version_num = 1; /* XXX??? */
- cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE;
+ cpi->hba_inquiry = PI_SDTR_ABLE;
+ if (ch->caps & AHCI_CAP_SNCQ)
+ cpi->hba_inquiry |= PI_TAG_ABLE;
if (ch->caps & AHCI_CAP_SPM)
cpi->hba_inquiry |= PI_SATAPM;
cpi->target_sprt = 0;
More information about the p4-projects
mailing list