summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2011-07-23 22:11:40 +0000
committermav <mav@FreeBSD.org>2011-07-23 22:11:40 +0000
commit5ae6dbf0f4866e68b3be1b9f0de65a84a9ac0461 (patch)
tree874f6af18adff029b7c633d9ce072e6a99f8d1c7 /sys/cam
parentb0952adc3d724d7d273111865dd4d0b40c478c18 (diff)
downloadFreeBSD-src-5ae6dbf0f4866e68b3be1b9f0de65a84a9ac0461.zip
FreeBSD-src-5ae6dbf0f4866e68b3be1b9f0de65a84a9ac0461.tar.gz
Do not try to execute FLUSHCACHE on close and print extra messages for
invalidated (considered lost) ada device. Exactly same already done for the da devices. Approved by: re (kib) MFC after: 1 week
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_da.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index ed0dbef..46ae218 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -425,7 +425,8 @@ adaclose(struct disk *dp)
softc = (struct ada_softc *)periph->softc;
/* We only sync the cache if the drive is capable of it. */
- if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) {
+ if ((softc->flags & ADA_FLAG_CAN_FLUSHCACHE) != 0 &&
+ (softc->flags & ADA_FLAG_PACK_INVALID) == 0) {
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
cam_fill_ataio(&ccb->ataio,
@@ -1361,7 +1362,8 @@ adadone(struct cam_periph *periph, union ccb *done_ccb)
return;
}
if (error != 0) {
- if (error == ENXIO) {
+ if (error == ENXIO &&
+ (softc->flags & ADA_FLAG_PACK_INVALID) == 0) {
/*
* Catastrophic error. Mark our pack as
* invalid.
OpenPOWER on IntegriCloud