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

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
69 * Logical device --- a device that can be accessed by OS.
70 * Physical device --- device attached to the controller.
71 * A logical device can be simply a physical device.
73 * Each logical and physical device has a 32bit ID. GUI will use this ID
75 * 1. The ID must be unique.
76 * 2. The ID must be immutable. Once an ID is assigned to a device, it
77 * must not change when system is running and the device exists.
78 * 3. The ID of logical device must be NOT reusable. If a device is
79 * removed, other newly created logical device must not use the same ID.
80 * 4. The ID must not be zero or 0xFFFFFFFF.
85 * logical device type.
86 * Identify array (logical device) and physical device.
93 * GUI will treat all array as 1-level RAID. No RAID0/1 or RAID1/0.
94 * A RAID0/1 device is type AT_RAID1. A RAID1/0 device is type AT_RAID0.
108 * physical device type
153 #define ARRAY_FLAG_NEED_AUTOREBUILD 0x00000080 /* auto-rebuild should start */
165 * device flags
167 #define DEVICE_FLAG_DISABLED 0x00000001 /* device is disabled */
171 #define DEVICE_FLAG_SATA 0x00000010 /* SATA or SAS device */
173 #define DEVICE_FLAG_SAS 0x00000040 /* SAS device */
175 #define DEVICE_FLAG_UNINITIALIZED 0x00010000 /* device is not initialized, can't be used to creat…
182 #define DEVICE_FLAG_SSD 0x00000100 /* SSD device */
218 #define HPT_CTL_CODE_LINUX_TO_IOP(x) ((x)-0xff00)
226 #define HPT_CTL_CODE_WIN32_TO_IOP(x) ((((x) & 0xffff)>>2)-0x900)
380 HPT_U8 SupportCrossControllerRAID; /* 1-support, 0-not support */
536 typedef char check_CONTROLLER_INFO_V3[sizeof(CONTROLLER_INFO_V3)==256? 1:-1];
545 DEVICEID Devices[2]; /* device connected to this channel */
553 DEVICEID Devices[2+13]; /* device connected to this channel, PMPort max=15 */
669 HPT_U32 seconds:6; /* 0 - 59 */
670 HPT_U32 minutes:6; /* 0 - 59 */
671 HPT_U32 month:4; /* 1 - 12 */
672 HPT_U32 hours:6; /* 0 - 59 */
673 HPT_U32 day:5; /* 1 - 31 */
689 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
716 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
738 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
748 DEVICEID TransformTarget; /* destination device ID */
771 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
780 DEVICEID TransformTarget; /* destination device ID */
792 * ATA/ATAPI Device identify data without the Reserved4.
842 * physical device information.
843 * IdentifyData.ModelNumber[] is HPT_U8-swapped from the original identify data.
846 HPT_U8 ControllerId; /* controller id */
848 HPT_U8 TargetId; /* id */
849 HPT_U8 DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
850 /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
851 HPT_U8 DeviceType; /* device type */
880 IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
888 * physical device information.
889 * IdentifyData.ModelNumber[] is HPT_U8-swapped from the original identify data.
892 HPT_U8 ControllerId; /* controller id */
894 HPT_U8 TargetId; /* id */
895 HPT_U8 DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
896 /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
897 HPT_U8 DeviceType; /* device type */
926 IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
956 HPT_U16 BeeperControl; /* bit4: beeper control bit. bit0-3: frequency bits */
957 HPT_U16 LED1Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
958 HPT_U16 LED2Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
972 * Logical device information.
974 * Common properties will be put in logical device information.
985 DEVICE_INFO device; member
996 DEVICEID ParentArray; /* for physical device, Please don't use this field.
1002 DEVICE_INFO device; member
1015 HPT_U8 TargetId; /* OS target id. Value 0xFF is invalid */
1018 DEVICEID ParentArray; /* for physical device, don't use this field.
1028 DEVICE_INFO_V2 device; member
1044 HPT_U8 TargetId; /* OS target id. Value 0xFF is invalid */
1047 DEVICEID ParentArray; /* for physical device, don't use this field.
1057 DEVICE_INFO_V3 device; member
1094 HPT_U8 DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
1099 HPT_U8 DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
1153 HPT_U8 ArrayType; /* 1-level array type */
1163 HPT_U32 Members[MAX_ARRAY_MEMBERS_V1];/* ID of array members, a member can be an array */
1169 HPT_U8 ArrayType; /* 1-level array type */
1180 HPT_U32 Members[MAX_ARRAY_MEMBERS_V2];/* ID of array members, a member can be an array */
1193 HPT_U8 ArrayType; /* 1-level array type */
1204 HPT_U32 Members[MAX_ARRAY_MEMBERS_V3];/* ID of array members, a member can be an array */
1220 * call hpt_get_device_info() with the returned array ID and check returned flags to
1265 #define ET_DEVICE_REMOVED 1 /* device removed */
1266 #define ET_DEVICE_PLUGGED 2 /* device plugged */
1267 #define ET_DEVICE_ERROR 3 /* device I/O error */
1308 * IDE pass-through command. Use it at your own risk!
1311 DEVICEID idDisk; /* disk ID */
1320 HPT_U8 protocol; /* IO_COMMAND_(READ,WRITE) or zero for non-DATA */
1328 DEVICEID idDisk; /* disk ID */
1337 HPT_U8 protocol; /* IO_COMMAND_(READ,WRITE) or zero for non-DATA */
1367 * device io packet format
1393 HPT_U8 location; /* 0 - system */
1432 DEVICEID id; member
1444 DEVICEID id; member
1470 /* for 32-bit app running on 64-bit system */
1484 * User-mode ioctl parameter passing conventions:
1491 * 4) Pass the structure to driver through a platform-specific method.
1492 * This is implemented in the mid-layer user-mode library. The UI
1517 * 0 - Success
1535 * id Controller id
1540 int hpt_get_controller_info(int id, PCONTROLLER_INFO pInfo);
1546 * id Controller id
1551 int hpt_get_controller_info_v2(int id, PCONTROLLER_INFO_V2 pInfo);
1556 * id Controller id
1561 int hpt_get_controller_info_v2_ext(int id, PCONTROLLER_INFO_V2_EXT pInfo);
1566 * id Controller id
1571 int hpt_get_controller_info_v3(int id, PCONTROLLER_INFO_V3 pInfo);
1577 * id Controller id
1583 int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo);
1588 * id Controller id
1594 int hpt_get_channel_info_v2(int id, int bus, PCHANNEL_INFO_V2 pInfo);
1602 * Number of ID returned. All logical device IDs are put into pIds array.
1603 * Note: A spare disk is not a logical device.
1613 * Number of ID returned. All physical device IDs are put into pIds array.
1620 * id logical device id
1623 * 0 - Success
1625 int hpt_get_device_info(DEVICEID id, PLOGICAL_DEVICE_INFO pInfo);
1633 * else return array id
1640 * id array id
1644 int hpt_delete_array(DEVICEID id, HPT_U32 options);
1647 * Read/write data on array and physcal device.
1650 * id device id. If it's an array ID, IO will be performed on the array.
1651 * If it's a physical device ID, IO will be performed on the device.
1658 int hpt_device_io(DEVICEID id, int cmd, HPT_U32 lba, HPT_U32 nSector, void * buffer);
1662 * Auto-rebuild will start.
1665 * idArray array id
1666 * idDisk disk id
1676 * idDisk disk id
1686 * idDisk disk id
1687 * idArray array id
1697 * idDisk disk id
1717 * idArray Array ID (RAID1, 0/1 or RAID5)
1731 * idArray Array ID
1750 * idArray Array ID
1759 * set device info.
1762 * idDisk device ID
1791 * idDisk - Disk handle
1792 * PHPT601_INFO - pointer to HPT601 info buffer
1802 * idDisk - Disk handle
1803 * PHPT601_INFO - pointer to HPT601 info buffer
1810 * Lock a block on a device (prevent OS accessing it)
1813 * idDisk - Disk handle
1814 * Lba - Start LBA
1815 * nSectors - number of sectors
1822 * Unlock a device
1825 * idDisk - Disk handle
1832 * send a ATA passthrough command to a device.
1835 * p - IDE_PASS_THROUGH header pointer
1843 * send a SCSI passthrough command to a device.
1846 * in - HPT_SCSI_PASSTHROUGH_IN header pointer
1847 * out - PHPT_SCSI_PASSTHROUGH_OUT header pointer
1848 * insize, outsize - in/out buffer size
1859 * idArray - Array ID
1860 * Lba - block number (on each array member, not logical block!)
1861 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1873 * idArray - Array ID
1874 * Lba - block number (on each array member, not logical block!)
1875 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1882 * extended device I/O function
1885 * idArray - Array ID
1886 * Lba - block number (on each array member, not logical block!)
1887 * nSectors - Sectors for each member
1888 * buffer - I/O buffer or s/g address
1895 * select boot device
1898 * id - logical device ID. If id is 0 the boot mark will be removed.
1902 int hpt_set_boot_mark(DEVICEID id);
1905 * check if device can be removed safely
1908 * ndev - number of devices
1909 * pIds - device ID list
1911 * 0 - Success
1912 * -1 - unknown error
1913 * n - the n-th device that can't be removed
1921 * ndev - number of devices
1922 * pIds - device ID list
1924 * 0 - Success
1925 * -1 - unknown error
1926 * n - the n-th device that can't be removed
1936 * else return array id
1948 * else return array id
1957 * id logical device id
1960 * 0 - Success
1963 int hpt_get_device_info_v2(DEVICEID id, PLOGICAL_DEVICE_INFO_V2 pInfo);
1969 * id logical device id
1972 * 0 - Success
1975 int hpt_get_device_info_v3(DEVICEID id, PLOGICAL_DEVICE_INFO_V3 pInfo);
1981 * id logical device id
1984 * 0 - Success
1987 int hpt_get_device_info_v4(DEVICEID id, PLOGICAL_DEVICE_INFO_V4 pInfo);
1994 * idArray - source array
1995 * destInfo - destination array info
1997 * destination array id
2007 * idArray - source array
2008 * destInfo - destination array info
2010 * destination array id
2018 * This function is called by mid-layer, not GUI (which uses set_array_state instead).
2021 * idArray - destination array ID
2022 * the source ID will be invalid when transform complete.
2024 * 0 - Success
2034 * dev - destination device
2037 * 0 - Success
2047 * ndev - number of disks to initialize
2048 * pIds - array of DEVICEID
2051 * 0 - Success
2061 * source - if transform, this is the source array, otherwise, it should be zero
2062 * destInfo - target array params
2064 * 0 - Success
2065 * cap - max capacity of the target array
2075 * source - if transform, this is the source array, otherwise, it should be zero
2076 * destInfo - target array params
2078 * 0 - Success
2079 * cap - max capacity of the target array
2089 * idArray Array ID (RAID1, 0/1 or RAID5)
2104 * idArray - Array ID
2105 * Lba - block number (on each array member, not logical block!)
2106 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
2120 * idArray - Array ID
2121 * Lba - block number (on each array member, not logical block!)
2122 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
2134 * indata[0] - controller ID
2146 * location - parameter location
2147 * outBuffer - a buffer to hold the output
2148 * outBufferSize - size of outBuffer
2160 * pParam - a pointer to HPT_DRIVER_PARAMETER.
2166 int hpt_reenumerate_device(DEVICEID id);
2181 * id enclosure id
2200 int hpt_get_perfmon_data(DEVICEID id, PHPT_PM_IOSTAT iostat);
2210 * p - ACCESS_CONFIG_REG_PARAMS header pointer
2219 * p - PDUMP_METADATA_PARAMS header pointer