diff options
author | mav <mav@FreeBSD.org> | 2011-01-26 06:37:51 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2011-01-26 06:37:51 +0000 |
commit | 36a124cfce9d4580bc5f356ddb1207eb50950573 (patch) | |
tree | 40f5f7f3fa57666ef76ead06590d3b180897fb64 /sys/cam | |
parent | a553f5bca5636375477f3d88822ed41b34867fba (diff) | |
download | FreeBSD-src-36a124cfce9d4580bc5f356ddb1207eb50950573.zip FreeBSD-src-36a124cfce9d4580bc5f356ddb1207eb50950573.tar.gz |
Make device initialization sequence shorter when possible. Do not enable/
disable already enabled/disabled SATA features.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/ata/ata_xpt.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c index e20159c..5a50b12 100644 --- a/sys/cam/ata/ata_xpt.c +++ b/sys/cam/ata/ata_xpt.c @@ -988,7 +988,9 @@ noerror: cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; xpt_action((union ccb *)&cts); softc->caps = caps; - if (ident_buf->satasupport & ATA_SUPPORT_IFPWRMNGT) { + if ((ident_buf->satasupport & ATA_SUPPORT_IFPWRMNGT) && + (!(softc->caps & CTS_SATA_CAPS_H_PMREQ)) != + (!(ident_buf->sataenabled & ATA_SUPPORT_IFPWRMNGT))) { PROBE_SET_ACTION(softc, PROBE_SETPM); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); @@ -997,7 +999,9 @@ noerror: /* FALLTHROUGH */ case PROBE_SETPM: if (ident_buf->satacapabilities != 0xffff && - ident_buf->satacapabilities & ATA_SUPPORT_DAPST) { + (ident_buf->satacapabilities & ATA_SUPPORT_DAPST) && + (!(softc->caps & CTS_SATA_CAPS_H_APST)) != + (!(ident_buf->sataenabled & ATA_ENABLED_DAPST))) { PROBE_SET_ACTION(softc, PROBE_SETAPST); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); @@ -1005,7 +1009,9 @@ noerror: } /* FALLTHROUGH */ case PROBE_SETAPST: - if (ident_buf->satasupport & ATA_SUPPORT_AUTOACTIVATE) { + if ((ident_buf->satasupport & ATA_SUPPORT_AUTOACTIVATE) && + (!(softc->caps & CTS_SATA_CAPS_H_DMAAA)) != + (!(ident_buf->sataenabled & ATA_SUPPORT_AUTOACTIVATE))) { PROBE_SET_ACTION(softc, PROBE_SETDMAAA); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); |