summaryrefslogtreecommitdiffstats
path: root/sys/dev/stg/tmc18c30_pccard.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2014-11-20 20:50:05 +0000
committerjhb <jhb@FreeBSD.org>2014-11-20 20:50:05 +0000
commitd23541b62beeb8a67a793ffbbbb84a3e1f0a5494 (patch)
treebbaa810399dc71aebe8cb8d0f01072240f5f0681 /sys/dev/stg/tmc18c30_pccard.c
parent86ac03a3f79123d99c1bbb40a40c6fffeaf777af (diff)
downloadFreeBSD-src-d23541b62beeb8a67a793ffbbbb84a3e1f0a5494.zip
FreeBSD-src-d23541b62beeb8a67a793ffbbbb84a3e1f0a5494.tar.gz
Lock the scsi_low code and the drivers which use it along with other
related cleanups: - Require each driver to initalize a mutex in the scsi_low_softc that is shared with the scsi_low code. This mutex is used for CAM SIMs, timers, and interrupt handlers. - Replace the osdep function switch with direct calls to the relevant CAM functions and direct manipulation of timers via callout(9). - Collapse the CAM-specific scsi_low_osdep_interface substructure directly into scsi_low_softc. - Use bus_*() instead of bus_space_*(). - Return BUS_PROBE_DEFAULT from probe routines instead of 0. - No need to zero softcs. - Pass 0ul and ~0ul instead of 0 and ~0 to bus_alloc_resource(). - Spell "dettach" as "detach". - Remove unused 'dvname' variables. - De-spl(). Tested by: no one
Diffstat (limited to 'sys/dev/stg/tmc18c30_pccard.c')
-rw-r--r--sys/dev/stg/tmc18c30_pccard.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/stg/tmc18c30_pccard.c b/sys/dev/stg/tmc18c30_pccard.c
index bca458f..a10c001 100644
--- a/sys/dev/stg/tmc18c30_pccard.c
+++ b/sys/dev/stg/tmc18c30_pccard.c
@@ -83,7 +83,7 @@ stg_pccard_probe(device_t dev)
sizeof(stg_products[0]), NULL)) != NULL) {
if (pp->pp_name != NULL)
device_set_desc(dev, pp->pp_name);
- return(0);
+ return (BUS_PROBE_DEFAULT);
}
return(EIO);
}
@@ -105,8 +105,8 @@ stg_pccard_attach(device_t dev)
stg_release_resource(dev);
return(ENXIO);
}
- error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- NULL, stg_intr, (void *)sc, &sc->stg_intrhand);
+ error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY |
+ INTR_MPSAFE, NULL, stg_intr, sc, &sc->stg_intrhand);
if (error) {
stg_release_resource(dev);
return(error);
OpenPOWER on IntegriCloud