Deleted Added
full compact
ciss.c (106039) ciss.c (109623)
1/*-
2 * Copyright (c) 2001 Michael Smith
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2001 Michael Smith
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/ciss/ciss.c 106039 2002-10-27 12:27:04Z mux $
26 * $FreeBSD: head/sys/dev/ciss/ciss.c 109623 2003-01-21 08:56:16Z alfred $
27 */
28
29/*
30 * Common Interface for SCSI-3 Support driver.
31 *
32 * CISS claims to provide a common interface between a generic SCSI
33 * transport and an intelligent host adapter.
34 *

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

1854 goto out;
1855 cc = CISS_FIND_COMMAND(cr);
1856
1857 /*
1858 * Allocate an in-kernel databuffer if required, copy in user data.
1859 */
1860 cr->cr_length = ioc->buf_size;
1861 if (ioc->buf_size > 0) {
27 */
28
29/*
30 * Common Interface for SCSI-3 Support driver.
31 *
32 * CISS claims to provide a common interface between a generic SCSI
33 * transport and an intelligent host adapter.
34 *

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

1854 goto out;
1855 cc = CISS_FIND_COMMAND(cr);
1856
1857 /*
1858 * Allocate an in-kernel databuffer if required, copy in user data.
1859 */
1860 cr->cr_length = ioc->buf_size;
1861 if (ioc->buf_size > 0) {
1862 if ((cr->cr_data = malloc(ioc->buf_size, CISS_MALLOC_CLASS, M_WAITOK)) == NULL) {
1862 if ((cr->cr_data = malloc(ioc->buf_size, CISS_MALLOC_CLASS, 0)) == NULL) {
1863 error = ENOMEM;
1864 goto out;
1865 }
1866 if ((error = copyin(ioc->buf, cr->cr_data, ioc->buf_size))) {
1867 debug(0, "copyin: bad data buffer %p/%d", ioc->buf, ioc->buf_size);
1868 goto out;
1869 }
1870 }

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

2033 */
2034static void
2035ciss_cam_rescan_target(struct ciss_softc *sc, int target)
2036{
2037 union ccb *ccb;
2038
2039 debug_called(1);
2040
1863 error = ENOMEM;
1864 goto out;
1865 }
1866 if ((error = copyin(ioc->buf, cr->cr_data, ioc->buf_size))) {
1867 debug(0, "copyin: bad data buffer %p/%d", ioc->buf, ioc->buf_size);
1868 goto out;
1869 }
1870 }

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

2033 */
2034static void
2035ciss_cam_rescan_target(struct ciss_softc *sc, int target)
2036{
2037 union ccb *ccb;
2038
2039 debug_called(1);
2040
2041 if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO)) == NULL) {
2041 if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_ZERO)) == NULL) {
2042 ciss_printf(sc, "rescan failed (can't allocate CCB)\n");
2043 return;
2044 }
2045
2046 if (xpt_create_path(&sc->ciss_cam_path, xpt_periph, cam_sim_path(sc->ciss_cam_sim), target, 0)
2047 != CAM_REQ_CMP) {
2048 ciss_printf(sc, "rescan failed (can't create path)\n");
2049 return;

--- 1393 unchanged lines hidden ---
2042 ciss_printf(sc, "rescan failed (can't allocate CCB)\n");
2043 return;
2044 }
2045
2046 if (xpt_create_path(&sc->ciss_cam_path, xpt_periph, cam_sim_path(sc->ciss_cam_sim), target, 0)
2047 != CAM_REQ_CMP) {
2048 ciss_printf(sc, "rescan failed (can't create path)\n");
2049 return;

--- 1393 unchanged lines hidden ---