Deleted Added
full compact
gui_lib.c (302408) gui_lib.c (315221)
1/*
2 * Copyright (c) 2004-2005 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) 2004-2005 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: stable/11/sys/dev/hptmv/gui_lib.c 298433 2016-04-21 19:57:40Z pfg $
26 * $FreeBSD: stable/11/sys/dev/hptmv/gui_lib.c 315221 2017-03-14 02:06:03Z pfg $
27 */
28/*
29 * gui_lib.c
30 * Copyright (c) 2002-2004 HighPoint Technologies, Inc. All rights reserved.
31 *
32 * Platform independent ioctl interface implementation.
33 * The platform dependent part may reuse this function and/or use it own
34 * implementation for each ioctl function.

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

69int
70check_VDevice_valid(PVDevice p)
71{
72 int i;
73 PVDevice pVDevice;
74 PVBus _vbus_p;
75 IAL_ADAPTER_T *pAdapter = gIal_Adapter;
76
27 */
28/*
29 * gui_lib.c
30 * Copyright (c) 2002-2004 HighPoint Technologies, Inc. All rights reserved.
31 *
32 * Platform independent ioctl interface implementation.
33 * The platform dependent part may reuse this function and/or use it own
34 * implementation for each ioctl function.

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

69int
70check_VDevice_valid(PVDevice p)
71{
72 int i;
73 PVDevice pVDevice;
74 PVBus _vbus_p;
75 IAL_ADAPTER_T *pAdapter = gIal_Adapter;
76
77 while(pAdapter != 0)
77 while(pAdapter != NULL)
78 {
79 for (i = 0; i < MV_SATA_CHANNELS_NUM; i++)
80 if(&(pAdapter->VDevices[i]) == p) return 0;
81 pAdapter = pAdapter->next;
82 }
83
84#ifdef SUPPORT_ARRAY
85 pAdapter = gIal_Adapter;
78 {
79 for (i = 0; i < MV_SATA_CHANNELS_NUM; i++)
80 if(&(pAdapter->VDevices[i]) == p) return 0;
81 pAdapter = pAdapter->next;
82 }
83
84#ifdef SUPPORT_ARRAY
85 pAdapter = gIal_Adapter;
86 while(pAdapter != 0)
86 while(pAdapter != NULL)
87 {
88 _vbus_p = &pAdapter->VBus;
89 for (i=0;i<MAX_ARRAY_PER_VBUS;i++)
90 {
91 pVDevice=ArrayTables(i);
92 if ((pVDevice->u.array.dArStamp != 0) && (pVDevice == p))
93 return 0;
94 }

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

398 return 0;
399}
400
401int hpt_get_controller_count(void)
402{
403 IAL_ADAPTER_T *pAdapTemp = gIal_Adapter;
404 int iControllerCount = 0;
405
87 {
88 _vbus_p = &pAdapter->VBus;
89 for (i=0;i<MAX_ARRAY_PER_VBUS;i++)
90 {
91 pVDevice=ArrayTables(i);
92 if ((pVDevice->u.array.dArStamp != 0) && (pVDevice == p))
93 return 0;
94 }

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

398 return 0;
399}
400
401int hpt_get_controller_count(void)
402{
403 IAL_ADAPTER_T *pAdapTemp = gIal_Adapter;
404 int iControllerCount = 0;
405
406 while(pAdapTemp != 0)
406 while(pAdapTemp != NULL)
407 {
408 iControllerCount++;
409 pAdapTemp = pAdapTemp->next;
410 }
411
412 return iControllerCount;
413}
414

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

443}
444
445
446int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo)
447{
448 IAL_ADAPTER_T *pAdapTemp = gIal_Adapter;
449 int i,iControllerCount = 0;
450
407 {
408 iControllerCount++;
409 pAdapTemp = pAdapTemp->next;
410 }
411
412 return iControllerCount;
413}
414

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

443}
444
445
446int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo)
447{
448 IAL_ADAPTER_T *pAdapTemp = gIal_Adapter;
449 int i,iControllerCount = 0;
450
451 while(pAdapTemp != 0)
451 while(pAdapTemp != NULL)
452 {
453 if (iControllerCount++==id)
454 goto found;
455 pAdapTemp = pAdapTemp->next;
456 }
457 return -1;
458
459found:

--- 988 unchanged lines hidden ---
452 {
453 if (iControllerCount++==id)
454 goto found;
455 pAdapTemp = pAdapTemp->next;
456 }
457 return -1;
458
459found:

--- 988 unchanged lines hidden ---