summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptmv
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/hptmv
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/hptmv')
-rw-r--r--sys/dev/hptmv/entry.c5
-rw-r--r--sys/dev/hptmv/osbsd.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c
index 80f5130..85d658e 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 e71e3ed..a0232e5 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;
OpenPOWER on IntegriCloud