Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/jmcneill-usbmp]: src/sys/dev/scsipi merge scsiconf.c 1.264.



details:   https://anonhg.NetBSD.org/src/rev/f4a4561b5f54
branches:  jmcneill-usbmp
changeset: 771837:f4a4561b5f54
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Mar 12 04:11:56 2012 +0000

description:
merge scsiconf.c 1.264.

diffstat:

 sys/dev/scsipi/scsiconf.c |  23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diffs (67 lines):

diff -r 71622a79af8d -r f4a4561b5f54 sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Mon Mar 12 04:11:34 2012 +0000
+++ b/sys/dev/scsipi/scsiconf.c Mon Mar 12 04:11:56 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.262 2011/04/26 07:41:18 hannken Exp $   */
+/*     $NetBSD: scsiconf.c,v 1.262.8.1 2012/03/12 04:11:56 mrg Exp $   */
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.262 2011/04/26 07:41:18 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.262.8.1 2012/03/12 04:11:56 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -256,11 +256,18 @@
        struct scsipi_xfer *xs;
        int error;
 
+       /* XXXSMP scsipi */
+       KERNEL_LOCK(1, curlwp);
+
        /*
         * Detach all of the periphs.
         */
-       if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0)
+       if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0) {
+               /* XXXSMP scsipi */
+               KERNEL_UNLOCK_ONE(curlwp);
+
                return error;
+       }
 
        pmf_device_deregister(self);
 
@@ -290,6 +297,10 @@
         * Now shut down the channel.
         */
        scsipi_channel_shutdown(chan);
+
+       /* XXXSMP scsipi */
+       KERNEL_UNLOCK_ONE(curlwp);
+
        return 0;
 }
 
@@ -378,11 +389,17 @@
        target = device_locator(child, SCSIBUSCF_TARGET);
        lun = device_locator(child, SCSIBUSCF_LUN);
 
+       /* XXXSMP scsipi */
+       KERNEL_LOCK(1, curlwp);
+
        periph = scsipi_lookup_periph(chan, target, lun);
        KASSERT(periph->periph_dev == child);
 
        scsipi_remove_periph(chan, periph);
        free(periph, M_DEVBUF);
+
+       /* XXXSMP scsipi */
+       KERNEL_UNLOCK_ONE(curlwp);
 }
 
 /*



Home | Main Index | Thread Index | Old Index