svn commit: r200411 - in stable/8/sys/cam: . ata
Alexander Motin
mav at FreeBSD.org
Fri Dec 11 04:53:09 PST 2009
Author: mav
Date: Fri Dec 11 12:53:09 2009
New Revision: 200411
URL: http://svn.freebsd.org/changeset/base/200411
Log:
MFC r200180:
If we panicked with SIM lock held, do not try to flush caches.
Extra lock recursing will not make debugging easier.
Modified:
stable/8/sys/cam/ata/ata_da.c
stable/8/sys/cam/cam_periph.h
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/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c Fri Dec 11 12:46:41 2009 (r200410)
+++ stable/8/sys/cam/ata/ata_da.c Fri Dec 11 12:53:09 2009 (r200411)
@@ -1040,6 +1040,9 @@ adashutdown(void * arg, int howto)
TAILQ_FOREACH(periph, &adadriver.units, unit_links) {
union ccb ccb;
+ /* If we paniced with lock held - not recurse here. */
+ if (cam_periph_owned(periph))
+ continue;
cam_periph_lock(periph);
softc = (struct ada_softc *)periph->softc;
/*
Modified: stable/8/sys/cam/cam_periph.h
==============================================================================
--- stable/8/sys/cam/cam_periph.h Fri Dec 11 12:46:41 2009 (r200410)
+++ stable/8/sys/cam/cam_periph.h Fri Dec 11 12:53:09 2009 (r200411)
@@ -190,5 +190,11 @@ cam_periph_unlock(struct cam_periph *per
mtx_unlock(periph->sim->mtx);
}
+static __inline int
+cam_periph_owned(struct cam_periph *periph)
+{
+ return (mtx_owned(periph->sim->mtx));
+}
+
#endif /* _KERNEL */
#endif /* _CAM_CAM_PERIPH_H */
More information about the svn-src-stable-8
mailing list