Make hptmv(4) use xpt_alloc_ccb/xpt_free_ccb instead of malloc/free.
Reviewed by: imp, mav MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26842
This commit is contained in:
parent
3df3c40de4
commit
2ef735f477
@ -2008,9 +2008,8 @@ hpt_attach(device_t dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if((ccb = (union ccb *)malloc(sizeof(*ccb), M_DEVBUF, M_WAITOK)) != (union ccb*)NULL)
|
if ((ccb = xpt_alloc_ccb()) != NULL)
|
||||||
{
|
{
|
||||||
bzero(ccb, sizeof(*ccb));
|
|
||||||
ccb->ccb_h.pinfo.priority = 1;
|
ccb->ccb_h.pinfo.priority = 1;
|
||||||
ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX;
|
ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX;
|
||||||
}
|
}
|
||||||
@ -2065,7 +2064,7 @@ hpt_attach(device_t dev)
|
|||||||
ccb->csa.callback = hpt_async;
|
ccb->csa.callback = hpt_async;
|
||||||
ccb->csa.callback_arg = hpt_vsim;
|
ccb->csa.callback_arg = hpt_vsim;
|
||||||
xpt_action((union ccb *)ccb);
|
xpt_action((union ccb *)ccb);
|
||||||
free(ccb, M_DEVBUF);
|
xpt_free_ccb(ccb);
|
||||||
|
|
||||||
if (device_get_unit(dev) == 0) {
|
if (device_get_unit(dev) == 0) {
|
||||||
/* Start the work thread. XXX */
|
/* Start the work thread. XXX */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user