Deleted Added
full compact
hpt27xx_osm_bsd.c (296373) hpt27xx_osm_bsd.c (331987)
1/*-
2 * Copyright (c) 2011 HighPoint Technologies, Inc.
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) 2011 HighPoint Technologies, Inc.
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: releng/10.3/sys/dev/hpt27xx/hpt27xx_osm_bsd.c 284879 2015-06-26 19:55:01Z delphij $
26 * $FreeBSD: releng/10.3/sys/dev/hpt27xx/hpt27xx_osm_bsd.c 331987 2018-04-04 05:43:03Z gordon $
27 */
28
29#include <dev/hpt27xx/hpt27xx_config.h>
30
31#include <dev/hpt27xx/os_bsd.h>
32#include <dev/hpt27xx/hptintf.h>
33
34static HIM *hpt_match(device_t dev)

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

1397{
1398 return 0;
1399}
1400
1401static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
1402{
1403 PHPT_IOCTL_PARAM piop=(PHPT_IOCTL_PARAM)data;
1404 IOCTL_ARG ioctl_args;
27 */
28
29#include <dev/hpt27xx/hpt27xx_config.h>
30
31#include <dev/hpt27xx/os_bsd.h>
32#include <dev/hpt27xx/hptintf.h>
33
34static HIM *hpt_match(device_t dev)

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

1397{
1398 return 0;
1399}
1400
1401static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
1402{
1403 PHPT_IOCTL_PARAM piop=(PHPT_IOCTL_PARAM)data;
1404 IOCTL_ARG ioctl_args;
1405 HPT_U32 bytesReturned;
1405 HPT_U32 bytesReturned = 0;
1406
1407 switch (cmd){
1408 case HPT_DO_IOCONTROL:
1409 {
1410 if (piop->Magic == HPT_IOCTL_MAGIC || piop->Magic == HPT_IOCTL_MAGIC32) {
1411 KdPrint(("<8>ioctl=%x in=%p len=%d out=%p len=%d\n",
1412 piop->dwIoControlCode,
1413 piop->lpInBuffer,

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

1427 if (!ioctl_args.lpInBuffer)
1428 goto invalid;
1429 if (copyin((void*)piop->lpInBuffer,
1430 ioctl_args.lpInBuffer, piop->nInBufferSize))
1431 goto invalid;
1432 }
1433
1434 if (ioctl_args.nOutBufferSize) {
1406
1407 switch (cmd){
1408 case HPT_DO_IOCONTROL:
1409 {
1410 if (piop->Magic == HPT_IOCTL_MAGIC || piop->Magic == HPT_IOCTL_MAGIC32) {
1411 KdPrint(("<8>ioctl=%x in=%p len=%d out=%p len=%d\n",
1412 piop->dwIoControlCode,
1413 piop->lpInBuffer,

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

1427 if (!ioctl_args.lpInBuffer)
1428 goto invalid;
1429 if (copyin((void*)piop->lpInBuffer,
1430 ioctl_args.lpInBuffer, piop->nInBufferSize))
1431 goto invalid;
1432 }
1433
1434 if (ioctl_args.nOutBufferSize) {
1435 ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK);
1435 ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO);
1436 if (!ioctl_args.lpOutBuffer)
1437 goto invalid;
1438 }
1439
1440#if __FreeBSD_version < 1000510
1441 mtx_lock(&Giant);
1442#endif
1443

--- 71 unchanged lines hidden ---
1436 if (!ioctl_args.lpOutBuffer)
1437 goto invalid;
1438 }
1439
1440#if __FreeBSD_version < 1000510
1441 mtx_lock(&Giant);
1442#endif
1443

--- 71 unchanged lines hidden ---