Deleted Added
full compact
cam_xpt.c (103817) cam_xpt.c (109623)
1/*
2 * Implementation of the Common Access Method Transport (XPT) layer.
3 *
4 * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs.
5 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Implementation of the Common Access Method Transport (XPT) layer.
3 *
4 * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs.
5 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/cam/cam_xpt.c 103817 2002-09-23 04:55:32Z mjacob $
29 * $FreeBSD: head/sys/cam/cam_xpt.c 109623 2003-01-21 08:56:16Z alfred $
30 */
31#include <sys/param.h>
32#include <sys/bus.h>
33#include <sys/systm.h>
34#include <sys/types.h>
35#include <sys/malloc.h>
36#include <sys/kernel.h>
37#include <sys/time.h>

--- 4761 unchanged lines hidden (view full) ---

4799 splx(s);
4800}
4801
4802union ccb *
4803xpt_alloc_ccb()
4804{
4805 union ccb *new_ccb;
4806
30 */
31#include <sys/param.h>
32#include <sys/bus.h>
33#include <sys/systm.h>
34#include <sys/types.h>
35#include <sys/malloc.h>
36#include <sys/kernel.h>
37#include <sys/time.h>

--- 4761 unchanged lines hidden (view full) ---

4799 splx(s);
4800}
4801
4802union ccb *
4803xpt_alloc_ccb()
4804{
4805 union ccb *new_ccb;
4806
4807 new_ccb = malloc(sizeof(*new_ccb), M_DEVBUF, M_WAITOK);
4807 new_ccb = malloc(sizeof(*new_ccb), M_DEVBUF, 0);
4808 return (new_ccb);
4809}
4810
4811void
4812xpt_free_ccb(union ccb *free_ccb)
4813{
4814 free(free_ccb, M_DEVBUF);
4815}

--- 348 unchanged lines hidden (view full) ---

5164 request_ccb->ccb_h.status = CAM_REQ_CMP;
5165 xpt_free_ccb(work_ccb);
5166 xpt_done(request_ccb);
5167 return;
5168 }
5169
5170 /* Save some state for use while we probe for devices */
5171 scan_info = (xpt_scan_bus_info *)
4808 return (new_ccb);
4809}
4810
4811void
4812xpt_free_ccb(union ccb *free_ccb)
4813{
4814 free(free_ccb, M_DEVBUF);
4815}

--- 348 unchanged lines hidden (view full) ---

5164 request_ccb->ccb_h.status = CAM_REQ_CMP;
5165 xpt_free_ccb(work_ccb);
5166 xpt_done(request_ccb);
5167 return;
5168 }
5169
5170 /* Save some state for use while we probe for devices */
5171 scan_info = (xpt_scan_bus_info *)
5172 malloc(sizeof(xpt_scan_bus_info), M_TEMP, M_WAITOK);
5172 malloc(sizeof(xpt_scan_bus_info), M_TEMP, 0);
5173 scan_info->request_ccb = request_ccb;
5174 scan_info->cpi = &work_ccb->cpi;
5175
5176 /* Cache on our stack so we can work asynchronously */
5177 max_target = scan_info->cpi->max_target;
5178 initiator_id = scan_info->cpi->initiator_id;
5179
5180 /*

--- 1825 unchanged lines hidden ---
5173 scan_info->request_ccb = request_ccb;
5174 scan_info->cpi = &work_ccb->cpi;
5175
5176 /* Cache on our stack so we can work asynchronously */
5177 max_target = scan_info->cpi->max_target;
5178 initiator_id = scan_info->cpi->initiator_id;
5179
5180 /*

--- 1825 unchanged lines hidden ---