diff options
author | mav <mav@FreeBSD.org> | 2010-02-02 11:09:28 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-02-02 11:09:28 +0000 |
commit | b5b6d6b0e0e8523be005d532c4327061249c2a84 (patch) | |
tree | 37197ad5ae0872a11e1bc6a7828374ebc3770e16 /sys/dev/ahci | |
parent | 2c76d0e26f4843ec857eaeade022a391227acb85 (diff) | |
download | FreeBSD-src-b5b6d6b0e0e8523be005d532c4327061249c2a84.zip FreeBSD-src-b5b6d6b0e0e8523be005d532c4327061249c2a84.tar.gz |
- Give ATA/SATA SIMs info about ATAPI packet size, supported by device.
- Make ATA XPT to reject longer SCSI CDBs then supported by device, or
any SCSI CDBs, if device doesn't support ATAPI.
Diffstat (limited to 'sys/dev/ahci')
-rw-r--r-- | sys/dev/ahci/ahci.c | 4 | ||||
-rw-r--r-- | sys/dev/ahci/ahci.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 8492725..fe3ce09 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -2358,6 +2358,8 @@ ahciaction(struct cam_sim *sim, union ccb *ccb) d->tags = min(ch->numslots, cts->xport_specific.sata.tags); if (cts->xport_specific.sata.valid & CTS_SATA_VALID_PM) ch->pm_present = cts->xport_specific.sata.pm_present; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) + d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -2401,6 +2403,8 @@ ahciaction(struct cam_sim *sim, union ccb *ccb) cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM; cts->xport_specific.sata.tags = d->tags; cts->xport_specific.sata.valid |= CTS_SATA_VALID_TAGS; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h index 5b524ab..a2cc5a0 100644 --- a/sys/dev/ahci/ahci.h +++ b/sys/dev/ahci/ahci.h @@ -370,6 +370,7 @@ struct ahci_device { int revision; int mode; u_int bytecount; + u_int atapi; u_int tags; }; |