diff options
author | Scott Long <scottl@FreeBSD.org> | 2013-09-24 16:50:53 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2013-09-24 16:50:53 +0000 |
commit | 185884259b58c3ef8203268c1c201095c7170d63 (patch) | |
tree | ccab290b4cfbac27db6123e5df329c2ca4e9a641 /sys/dev/hptmv | |
parent | febdb468801f35e51c6c5c22221cfce9197c6f3b (diff) | |
download | src-185884259b58c3ef8203268c1c201095c7170d63.tar.gz src-185884259b58c3ef8203268c1c201095c7170d63.zip |
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
Notes
Notes:
svn path=/head/; revision=255853
Diffstat (limited to 'sys/dev/hptmv')
-rw-r--r-- | sys/dev/hptmv/entry.c | 5 | ||||
-rw-r--r-- | sys/dev/hptmv/osbsd.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c index 80f513036a2b..85d658e16adb 100644 --- a/sys/dev/hptmv/entry.c +++ b/sys/dev/hptmv/entry.c @@ -1438,6 +1438,7 @@ unregister: free(pAdapter->pbus_dmamap, M_DEVBUF); goto unregister; } + callout_handle_init(&pmap->timeout_ch); } /* setup PRD Tables */ KdPrint(("Allocate PRD Tables\n")); @@ -2758,7 +2759,7 @@ hpt_io_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error) } } - ccb->ccb_h.timeout_ch = timeout(hpt_timeout, (caddr_t)ccb, 20*hz); + pmap->timeout_ch = timeout(hpt_timeout, (caddr_t)ccb, 20*hz); pVDev->pfnSendCommand(_VBUS_P pCmd); CheckPendingCall(_VBUS_P0); } @@ -2980,7 +2981,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd) KdPrint(("fOsCommandDone(pcmd=%p, result=%d)\n", pCmd, pCmd->Result)); - untimeout(hpt_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, (caddr_t)ccb, pmap->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: diff --git a/sys/dev/hptmv/osbsd.h b/sys/dev/hptmv/osbsd.h index e71e3edfe3f8..a0232e52efd7 100644 --- a/sys/dev/hptmv/osbsd.h +++ b/sys/dev/hptmv/osbsd.h @@ -153,6 +153,7 @@ typedef struct _BUS_DMAMAP { struct _BUS_DMAMAP *next; struct IALAdapter *pAdapter; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SCAT_GATH psg[MAX_SG_DESCRIPTORS]; } BUS_DMAMAP, *PBUS_DMAMAP; |