Author: mav
Date: Sat Jul 30 09:38:52 2011
New Revision: 224508
URL: http://svn.freebsd.org/changeset/base/224508

Log:
  r224283:
  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.

Modified:
  stable/8/sys/cam/ata/ata_da.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/geom/label/   (props changed)

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c       Sat Jul 30 08:31:18 2011        
(r224507)
+++ stable/8/sys/cam/ata/ata_da.c       Sat Jul 30 09:38:52 2011        
(r224508)
@@ -401,7 +401,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,
@@ -1272,7 +1273,8 @@ adadone(struct cam_periph *periph, union
                                return;
                        }
                        if (error != 0) {
-                               if (error == ENXIO) {
+                               if (error == ENXIO &&
+                                   (softc->flags & ADA_FLAG_PACK_INVALID) == 
0) {
                                        /*
                                         * Catastrophic error.  Mark our pack as
                                         * invalid.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to