Module Name:    src
Committed By:   mlelstv
Date:           Sat Aug 12 11:03:47 UTC 2017

Modified Files:
        src/sys/dev/pci: arcmsr.c

Log Message:
tag arcmsr scsipi adapter and pci interrupt as MPSAFE. I/O is now done
without taking kernel lock.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pci/arcmsr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/arcmsr.c
diff -u src/sys/dev/pci/arcmsr.c:1.36 src/sys/dev/pci/arcmsr.c:1.37
--- src/sys/dev/pci/arcmsr.c:1.36	Sun Jun 19 21:12:44 2016
+++ src/sys/dev/pci/arcmsr.c	Sat Aug 12 11:03:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: arcmsr.c,v 1.36 2016/06/19 21:12:44 dholland Exp $ */
+/*	$NetBSD: arcmsr.c,v 1.37 2017/08/12 11:03:47 mlelstv Exp $ */
 /*	$OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */
 
 /*
@@ -21,7 +21,7 @@
 #include "bio.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.36 2016/06/19 21:12:44 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.37 2017/08/12 11:03:47 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -241,6 +241,7 @@ arc_attach(device_t parent, device_t sel
 	adapt->adapt_max_periph = adapt->adapt_openings;
 	adapt->adapt_minphys = arc_minphys;		
 	adapt->adapt_request = arc_scsi_cmd;
+	adapt->adapt_flags = SCSIPI_ADAPT_MPSAFE;
 
 	memset(chan, 0, sizeof(*chan));
 	chan->chan_adapter = adapt;
@@ -625,6 +626,8 @@ arc_map_pci_resources(device_t self, str
 		goto unmap;
 	}
 
+	pci_intr_setattr(pa->pa_pc, &ih, PCI_INTR_MPSAFE, true);
+
 	sc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_BIO,
 	    arc_intr, sc);
 	if (sc->sc_ih == NULL) {

Reply via email to