Lines Matching +full:device +full:- +full:id

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
70 * Logical device --- a device that can be accessed by OS.
71 * Physical device --- device attached to the controller.
72 * A logical device can be simply a physical device.
74 * Each logical and physical device has a 32bit ID. GUI will use this ID
76 * 1. The ID must be unique.
77 * 2. The ID must be immutable. Once an ID is assigned to a device, it
78 * must not change when system is running and the device exists.
79 * 3. The ID of logical device must be NOT reusable. If a device is
80 * removed, other newly created logical device must not use the same ID.
81 * 4. The ID must not be zero or 0xFFFFFFFF.
86 * logical device type.
87 * Identify array (logical device) and physical device.
94 * GUI will treat all array as 1-level RAID. No RAID0/1 or RAID1/0.
95 * A RAID0/1 device is type AT_RAID1. A RAID1/0 device is type AT_RAID0.
109 * physical device type
155 #define ARRAY_FLAG_NEED_AUTOREBUILD 0x00000080 /* auto-rebuild should start */
167 * device flags
169 #define DEVICE_FLAG_DISABLED 0x00000001 /* device is disabled */
173 #define DEVICE_FLAG_SATA 0x00000010 /* SATA or SAS device */
175 #define DEVICE_FLAG_SAS 0x00000040 /* SAS device */
177 #define DEVICE_FLAG_TAPE 0x00000200 /* SAS Tape device */
178 #define DEVICE_FLAG_CHANGER 0x00000400 /* SAS Changer device */
179 #define DEVICE_FLAG_UNINITIALIZED 0x00010000 /* device is not initialized, can't be used to creat…
186 #define DEVICE_FLAG_SSD 0x00000100 /* SSD device */
222 #define HPT_CTL_CODE_LINUX_TO_IOP(x) ((x)-0xff00)
230 #define HPT_CTL_CODE_WIN32_TO_IOP(x) ((((x) & 0xffff)>>2)-0x900)
384 HPT_U8 SupportCrossControllerRAID; /* 1-support, 0-not support */
540 typedef char check_CONTROLLER_INFO_V3[sizeof(CONTROLLER_INFO_V3)==256? 1:-1];
549 DEVICEID Devices[2]; /* device connected to this channel */
557 DEVICEID Devices[2+13]; /* device connected to this channel, PMPort max=15 */
673 HPT_U32 seconds:6; /* 0 - 59 */
674 HPT_U32 minutes:6; /* 0 - 59 */
675 HPT_U32 month:4; /* 1 - 12 */
676 HPT_U32 hours:6; /* 0 - 59 */
677 HPT_U32 day:5; /* 1 - 31 */
693 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
720 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
742 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
752 DEVICEID TransformTarget; /* destination device ID */
775 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
784 DEVICEID TransformTarget; /* destination device ID */
796 * ATA/ATAPI Device identify data without the Reserved4.
846 * physical device information.
847 * IdentifyData.ModelNumber[] is HPT_U8-swapped from the original identify data.
850 HPT_U8 ControllerId; /* controller id */
852 HPT_U8 TargetId; /* id */
853 HPT_U8 DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
854 /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
855 HPT_U8 DeviceType; /* device type */
884 IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
892 * physical device information.
893 * IdentifyData.ModelNumber[] is HPT_U8-swapped from the original identify data.
896 HPT_U8 ControllerId; /* controller id */
898 HPT_U8 TargetId; /* id */
899 HPT_U8 DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
900 /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
901 HPT_U8 DeviceType; /* device type */
930 IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
960 HPT_U16 BeeperControl; /* bit4: beeper control bit. bit0-3: frequency bits */
961 HPT_U16 LED1Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
962 HPT_U16 LED2Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
976 * Logical device information.
978 * Common properties will be put in logical device information.
989 DEVICE_INFO device; member
1000 DEVICEID ParentArray; /* for physical device, Please don't use this field.
1006 DEVICE_INFO device; member
1019 HPT_U8 TargetId; /* OS target id. Value 0xFF is invalid */
1022 DEVICEID ParentArray; /* for physical device, don't use this field.
1032 DEVICE_INFO_V2 device; member
1048 HPT_U8 TargetId; /* OS target id. Value 0xFF is invalid */
1051 DEVICEID ParentArray; /* for physical device, don't use this field.
1061 DEVICE_INFO_V3 device; member
1098 HPT_U8 DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
1103 HPT_U8 DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
1157 HPT_U8 ArrayType; /* 1-level array type */
1167 HPT_U32 Members[MAX_ARRAY_MEMBERS_V1];/* ID of array members, a member can be an array */
1173 HPT_U8 ArrayType; /* 1-level array type */
1184 HPT_U32 Members[MAX_ARRAY_MEMBERS_V2];/* ID of array members, a member can be an array */
1197 HPT_U8 ArrayType; /* 1-level array type */
1208 HPT_U32 Members[MAX_ARRAY_MEMBERS_V3];/* ID of array members, a member can be an array */
1224 * call hpt_get_device_info() with the returned array ID and check returned flags to
1269 #define ET_DEVICE_REMOVED 1 /* device removed */
1270 #define ET_DEVICE_PLUGGED 2 /* device plugged */
1271 #define ET_DEVICE_ERROR 3 /* device I/O error */
1312 * IDE pass-through command. Use it at your own risk!
1315 DEVICEID idDisk; /* disk ID */
1324 HPT_U8 protocol; /* IO_COMMAND_(READ,WRITE) or zero for non-DATA */
1332 DEVICEID idDisk; /* disk ID */
1341 HPT_U8 protocol; /* IO_COMMAND_(READ,WRITE) or zero for non-DATA */
1371 * device io packet format
1397 HPT_U8 location; /* 0 - system */
1436 DEVICEID id; member
1448 DEVICEID id; member
1474 /* for 32-bit app running on 64-bit system */
1488 * User-mode ioctl parameter passing conventions:
1495 * 4) Pass the structure to driver through a platform-specific method.
1496 * This is implemented in the mid-layer user-mode library. The UI
1521 * 0 - Success
1539 * id Controller id
1544 int hpt_get_controller_info(int id, PCONTROLLER_INFO pInfo);
1550 * id Controller id
1555 int hpt_get_controller_info_v2(int id, PCONTROLLER_INFO_V2 pInfo);
1560 * id Controller id
1565 int hpt_get_controller_info_v2_ext(int id, PCONTROLLER_INFO_V2_EXT pInfo);
1570 * id Controller id
1575 int hpt_get_controller_info_v3(int id, PCONTROLLER_INFO_V3 pInfo);
1581 * id Controller id
1587 int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo);
1592 * id Controller id
1598 int hpt_get_channel_info_v2(int id, int bus, PCHANNEL_INFO_V2 pInfo);
1606 * Number of ID returned. All logical device IDs are put into pIds array.
1607 * Note: A spare disk is not a logical device.
1617 * Number of ID returned. All physical device IDs are put into pIds array.
1624 * id logical device id
1627 * 0 - Success
1629 int hpt_get_device_info(DEVICEID id, PLOGICAL_DEVICE_INFO pInfo);
1637 * else return array id
1644 * id array id
1648 int hpt_delete_array(DEVICEID id, HPT_U32 options);
1651 * Read/write data on array and physcal device.
1654 * id device id. If it's an array ID, IO will be performed on the array.
1655 * If it's a physical device ID, IO will be performed on the device.
1662 int hpt_device_io(DEVICEID id, int cmd, HPT_U32 lba, HPT_U32 nSector, void * buffer);
1666 * Auto-rebuild will start.
1669 * idArray array id
1670 * idDisk disk id
1680 * idDisk disk id
1690 * idDisk disk id
1691 * idArray array id
1701 * idDisk disk id
1721 * idArray Array ID (RAID1, 0/1 or RAID5)
1735 * idArray Array ID
1754 * idArray Array ID
1763 * set device info.
1766 * idDisk device ID
1795 * idDisk - Disk handle
1796 * PHPT601_INFO - pointer to HPT601 info buffer
1806 * idDisk - Disk handle
1807 * PHPT601_INFO - pointer to HPT601 info buffer
1814 * Lock a block on a device (prevent OS accessing it)
1817 * idDisk - Disk handle
1818 * Lba - Start LBA
1819 * nSectors - number of sectors
1826 * Unlock a device
1829 * idDisk - Disk handle
1836 * send a ATA passthrough command to a device.
1839 * p - IDE_PASS_THROUGH header pointer
1847 * send a SCSI passthrough command to a device.
1850 * in - HPT_SCSI_PASSTHROUGH_IN header pointer
1851 * out - PHPT_SCSI_PASSTHROUGH_OUT header pointer
1852 * insize, outsize - in/out buffer size
1863 * idArray - Array ID
1864 * Lba - block number (on each array member, not logical block!)
1865 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1877 * idArray - Array ID
1878 * Lba - block number (on each array member, not logical block!)
1879 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1886 * extended device I/O function
1889 * idArray - Array ID
1890 * Lba - block number (on each array member, not logical block!)
1891 * nSectors - Sectors for each member
1892 * buffer - I/O buffer or s/g address
1899 * select boot device
1902 * id - logical device ID. If id is 0 the boot mark will be removed.
1906 int hpt_set_boot_mark(DEVICEID id);
1909 * check if device can be removed safely
1912 * ndev - number of devices
1913 * pIds - device ID list
1915 * 0 - Success
1916 * -1 - unknown error
1917 * n - the n-th device that can't be removed
1925 * ndev - number of devices
1926 * pIds - device ID list
1928 * 0 - Success
1929 * -1 - unknown error
1930 * n - the n-th device that can't be removed
1940 * else return array id
1952 * else return array id
1961 * id logical device id
1964 * 0 - Success
1967 int hpt_get_device_info_v2(DEVICEID id, PLOGICAL_DEVICE_INFO_V2 pInfo);
1973 * id logical device id
1976 * 0 - Success
1979 int hpt_get_device_info_v3(DEVICEID id, PLOGICAL_DEVICE_INFO_V3 pInfo);
1985 * id logical device id
1988 * 0 - Success
1991 int hpt_get_device_info_v4(DEVICEID id, PLOGICAL_DEVICE_INFO_V4 pInfo);
1998 * idArray - source array
1999 * destInfo - destination array info
2001 * destination array id
2011 * idArray - source array
2012 * destInfo - destination array info
2014 * destination array id
2022 * This function is called by mid-layer, not GUI (which uses set_array_state instead).
2025 * idArray - destination array ID
2026 * the source ID will be invalid when transform complete.
2028 * 0 - Success
2038 * dev - destination device
2041 * 0 - Success
2051 * ndev - number of disks to initialize
2052 * pIds - array of DEVICEID
2055 * 0 - Success
2065 * source - if transform, this is the source array, otherwise, it should be zero
2066 * destInfo - target array params
2068 * 0 - Success
2069 * cap - max capacity of the target array
2079 * source - if transform, this is the source array, otherwise, it should be zero
2080 * destInfo - target array params
2082 * 0 - Success
2083 * cap - max capacity of the target array
2093 * idArray Array ID (RAID1, 0/1 or RAID5)
2108 * idArray - Array ID
2109 * Lba - block number (on each array member, not logical block!)
2110 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
2124 * idArray - Array ID
2125 * Lba - block number (on each array member, not logical block!)
2126 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
2138 * indata[0] - controller ID
2150 * location - parameter location
2151 * outBuffer - a buffer to hold the output
2152 * outBufferSize - size of outBuffer
2164 * pParam - a pointer to HPT_DRIVER_PARAMETER.
2170 int hpt_reenumerate_device(DEVICEID id);
2185 * id enclosure id
2204 int hpt_get_perfmon_data(DEVICEID id, PHPT_PM_IOSTAT iostat);
2214 * p - ACCESS_CONFIG_REG_PARAMS header pointer
2223 * p - PDUMP_METADATA_PARAMS header pointer