summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-10-31 10:43:38 +0000
committermav <mav@FreeBSD.org>2009-10-31 10:43:38 +0000
commit924c32a1e2de2cc7dfafa407c8af49d2b496a67b (patch)
treeafe2bf9beb5bf8430164a807b56424ff9b9192fb /sys/cam/scsi
parent9ade11517cead4cc052d6f18b7cc626962a03fc0 (diff)
downloadFreeBSD-src-924c32a1e2de2cc7dfafa407c8af49d2b496a67b.zip
FreeBSD-src-924c32a1e2de2cc7dfafa407c8af49d2b496a67b.tar.gz
MFp4:
- Reduce code duplication in ATA XPT and PMP driver. - Move PIO size setting from ada driver to ATA XPT. It is XPT business to negotiate transfer details. ada driver is now stateless. - Report PIO size to SIM. It is required for correct PATA SIM operation. - Tune PMP scan timings. It workarounds some problems with SiI. - If reset hapens during PMP initialization - restart it. - Introduce early-initialized periph drivers, which are used during initial scan process. Use it for xpt, probe, aprobe and pmp. It gives pmp chance to finish scan before mountroot and numerate devices in right order.
Diffstat (limited to 'sys/cam/scsi')
-rw-r--r--sys/cam/scsi/scsi_da.c4
-rw-r--r--sys/cam/scsi/scsi_sg.c4
-rw-r--r--sys/cam/scsi/scsi_xpt.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index bb9299a..8f740dc 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1491,8 +1491,10 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
{
struct da_softc *softc;
struct ccb_scsiio *csio;
+ u_int32_t priority;
softc = (struct da_softc *)periph->softc;
+ priority = done_ccb->ccb_h.pinfo.priority;
csio = &done_ccb->csio;
switch (csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK) {
case DA_CCB_BUFFER_IO:
@@ -1610,7 +1612,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
softc->state = DA_STATE_PROBE2;
free(rdcap, M_SCSIDA);
xpt_release_ccb(done_ccb);
- xpt_schedule(periph, /*priority*/5);
+ xpt_schedule(periph, priority);
return;
}
} else {
diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c
index 4ab038b..d47e6e9 100644
--- a/sys/cam/scsi/scsi_sg.c
+++ b/sys/cam/scsi/scsi_sg.c
@@ -510,7 +510,7 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
break;
}
- ccb = cam_periph_getccb(periph, /*priority*/5);
+ ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
csio = &ccb->csio;
error = copyin(req.cmdp, &csio->cdb_io.cdb_bytes,
@@ -729,7 +729,7 @@ sgwrite(struct cdev *dev, struct uio *uio, int ioflag)
cam_periph_lock(periph);
sc = periph->softc;
- xpt_setup_ccb(&ccb->ccb_h, periph->path, /*priority*/5);
+ xpt_setup_ccb(&ccb->ccb_h, periph->path, CAM_PRIORITY_NORMAL);
cam_fill_csio(csio,
/*retries*/1,
sgdone,
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index 35a5ac2..a240db8 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -110,7 +110,8 @@ static periph_init_t probe_periph_init;
static struct periph_driver probe_driver =
{
probe_periph_init, "probe",
- TAILQ_HEAD_INITIALIZER(probe_driver.units)
+ TAILQ_HEAD_INITIALIZER(probe_driver.units), /* generation */ 0,
+ CAM_PERIPH_DRV_EARLY
};
PERIPHDRIVER_DECLARE(probe, probe_driver);
OpenPOWER on IntegriCloud