summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire/sbp.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2013-09-24 16:50:53 +0000
committerscottl <scottl@FreeBSD.org>2013-09-24 16:50:53 +0000
commit108b7070e7a17abc52f44f333ba095f8f0eafc3a (patch)
treeccab290b4cfbac27db6123e5df329c2ca4e9a641 /sys/dev/firewire/sbp.c
parent6633bf70ed24c304037f64ca2f28e6ea8d2a0b47 (diff)
downloadFreeBSD-src-108b7070e7a17abc52f44f333ba095f8f0eafc3a.zip
FreeBSD-src-108b7070e7a17abc52f44f333ba095f8f0eafc3a.tar.gz
Update the CAM API for FreeBSD 10:
- Remove the timeout_ch field. It's been deprecated since FreeBSD 7.0; MPSAFE drivers should be managing their own timeout storage. The remaining non-MPSAFE drivers have been modified to also manage their own storage, and should be considered for updating to MPSAFE (or removal) during the FreeBSD 10.x lifecycle. - Add fields related to soft timeouts and quality of service, to be used in upcoming work. - Add room for more flags in the CCB header and path_inq structures. - Begin support for extended 64-bit LUNs. - Bump the CAM version number to 0x18, but add compat shims. Tested with camcontrol and smartctl. Reviewed by: nathanw, ken, kib Approved by: re Obtained from: Netflix
Diffstat (limited to 'sys/dev/firewire/sbp.c')
-rw-r--r--sys/dev/firewire/sbp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c
index 6b1b4a1..00e780e 100644
--- a/sys/dev/firewire/sbp.c
+++ b/sys/dev/firewire/sbp.c
@@ -177,6 +177,7 @@ struct sbp_ocb {
struct sbp_dev *sdev;
int flags; /* XXX should be removed */
bus_dmamap_t dmamap;
+ struct callout_handle timeout_ch;
};
#define OCB_ACT_MGM 0
@@ -591,6 +592,7 @@ END_DEBUG
/* XXX */
goto next;
}
+ callout_handle_init(&ocb->timeout_ch);
sbp_free_ocb(sdev, ocb);
}
next:
@@ -2763,7 +2765,7 @@ END_DEBUG
STAILQ_REMOVE(&sdev->ocbs, ocb, sbp_ocb, ocb);
if (ocb->ccb != NULL)
untimeout(sbp_timeout, (caddr_t)ocb,
- ocb->ccb->ccb_h.timeout_ch);
+ ocb->timeout_ch);
if (ntohl(ocb->orb[4]) & 0xffff) {
bus_dmamap_sync(sdev->target->sbp->dmat,
ocb->dmamap,
@@ -2836,7 +2838,7 @@ END_DEBUG
STAILQ_INSERT_TAIL(&sdev->ocbs, ocb, ocb);
if (ocb->ccb != NULL)
- ocb->ccb->ccb_h.timeout_ch = timeout(sbp_timeout, (caddr_t)ocb,
+ ocb->timeout_ch = timeout(sbp_timeout, (caddr_t)ocb,
(ocb->ccb->ccb_h.timeout * hz) / 1000);
if (use_doorbell && prev == NULL)
@@ -2930,7 +2932,7 @@ END_DEBUG
}
if (ocb->ccb != NULL) {
untimeout(sbp_timeout, (caddr_t)ocb,
- ocb->ccb->ccb_h.timeout_ch);
+ ocb->timeout_ch);
ocb->ccb->ccb_h.status = status;
SBP_LOCK(sdev->target->sbp);
xpt_done(ocb->ccb);
OpenPOWER on IntegriCloud