Date: Sat, 14 Nov 2009 20:06:04 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r199278 - head/sys/dev/ahci Message-ID: <200911142006.nAEK64rM012023@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sat Nov 14 20:06:04 2009 New Revision: 199278 URL: http://svn.freebsd.org/changeset/base/199278 Log: MFp4: Check SNCQ HBA capability bit when reporting NCQ support to CAM. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sat Nov 14 18:54:25 2009 (r199277) +++ head/sys/dev/ahci/ahci.c Sat Nov 14 20:06:04 2009 (r199278) @@ -734,7 +734,9 @@ ahci_ch_attach(device_t dev) /* 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 @@ ahciaction(struct cam_sim *sim, union cc 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911142006.nAEK64rM012023>