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 */
162 * device flags
164 #define DEVICE_FLAG_DISABLED 0x00000001 /* device is disabled */
168 #define DEVICE_FLAG_SATA 0x00000010 /* SATA or SAS device */
170 #define DEVICE_FLAG_SAS 0x00000040 /* SAS device */
172 #define DEVICE_FLAG_UNINITIALIZED 0x00010000 /* device is not initialized, can't be used to creat…
208 #define HPT_CTL_CODE_LINUX_TO_IOP(x) ((x)-0xff00)
216 #define HPT_CTL_CODE_WIN32_TO_IOP(x) ((((x) & 0xffff)>>2)-0x900)
344 HPT_U8 SupportCrossControllerRAID; /* 1-support, 0-not support */
453 typedef char check_CONTROLLER_INFO_V3[sizeof(CONTROLLER_INFO_V3)==256? 1:-1];
462 DEVICEID Devices[2]; /* device connected to this channel */
470 DEVICEID Devices[2+13]; /* device connected to this channel, PMPort max=15 */
478 HPT_U32 seconds:6; /* 0 - 59 */
479 HPT_U32 minutes:6; /* 0 - 59 */
480 HPT_U32 month:4; /* 1 - 12 */
481 HPT_U32 hours:6; /* 0 - 59 */
482 HPT_U32 day:5; /* 1 - 31 */
498 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
525 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
547 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
557 DEVICEID TransformTarget; /* destination device ID */
580 HPT_U8 nDisk; /* member count: Number of ID in Members[] */
589 DEVICEID TransformTarget; /* destination device ID */
602 * ATA/ATAPI Device identify data without the Reserved4.
654 * physical device information.
655 * IdentifyData.ModelNumber[] is HPT_U8-swapped from the original identify data.
658 HPT_U8 ControllerId; /* controller id */
660 HPT_U8 TargetId; /* id */
661 HPT_U8 DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
662 /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
663 HPT_U8 DeviceType; /* device type */
692 IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
700 * physical device information.
701 * IdentifyData.ModelNumber[] is HPT_U8-swapped from the original identify data.
704 HPT_U8 ControllerId; /* controller id */
706 HPT_U8 TargetId; /* id */
707 HPT_U8 DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
708 /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
709 HPT_U8 DeviceType; /* device type */
738 IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
768 HPT_U16 BeeperControl; /* bit4: beeper control bit. bit0-3: frequency bits */
769 HPT_U16 LED1Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
770 HPT_U16 LED2Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
784 * Logical device information.
786 * Common properties will be put in logical device information.
797 DEVICE_INFO device; member
808 DEVICEID ParentArray; /* for physical device, Please don't use this field.
814 DEVICE_INFO device; member
827 HPT_U8 TargetId; /* OS target id. Value 0xFF is invalid */
830 DEVICEID ParentArray; /* for physical device, don't use this field.
840 DEVICE_INFO_V2 device; member
856 HPT_U8 TargetId; /* OS target id. Value 0xFF is invalid */
859 DEVICEID ParentArray; /* for physical device, don't use this field.
869 DEVICE_INFO_V3 device; member
905 HPT_U8 DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
910 HPT_U8 DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
958 HPT_U8 ArrayType; /* 1-level array type */
968 HPT_U32 Members[MAX_ARRAY_MEMBERS_V1];/* ID of array members, a member can be an array */
974 HPT_U8 ArrayType; /* 1-level array type */
985 HPT_U32 Members[MAX_ARRAY_MEMBERS_V2];/* ID of array members, a member can be an array */
996 HPT_U8 ArrayType; /* 1-level array type */
1007 HPT_U32 Members[MAX_ARRAY_MEMBERS_V3];/* ID of array members, a member can be an array */
1023 * call hpt_get_device_info() with the returned array ID and check returned flags to
1068 #define ET_DEVICE_REMOVED 1 /* device removed */
1069 #define ET_DEVICE_PLUGGED 2 /* device plugged */
1070 #define ET_DEVICE_ERROR 3 /* device I/O error */
1111 * IDE pass-through command. Use it at your own risk!
1117 DEVICEID idDisk; /* disk ID */
1126 HPT_U8 protocol; /* IO_COMMAND_(READ,WRITE) or zero for non-DATA */
1156 * device io packet format
1182 HPT_U8 location; /* 0 - system */
1212 /* for 32-bit app running on 64-bit system */
1226 * User-mode ioctl parameter passing conventions:
1233 * 4) Pass the structure to driver through a platform-specific method.
1234 * This is implemented in the mid-layer user-mode library. The UI
1259 * 0 - Success
1277 * id Controller id
1282 int hpt_get_controller_info(int id, PCONTROLLER_INFO pInfo);
1288 * id Controller id
1293 int hpt_get_controller_info_v2(int id, PCONTROLLER_INFO_V2 pInfo);
1298 * id Controller id
1303 int hpt_get_controller_info_v3(int id, PCONTROLLER_INFO_V3 pInfo);
1309 * id Controller id
1315 int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo);
1320 * id Controller id
1326 int hpt_get_channel_info_v2(int id, int bus, PCHANNEL_INFO_V2 pInfo);
1334 * Number of ID returned. All logical device IDs are put into pIds array.
1335 * Note: A spare disk is not a logical device.
1342 * id logical device id
1345 * 0 - Success
1347 int hpt_get_device_info(DEVICEID id, PLOGICAL_DEVICE_INFO pInfo);
1355 * else return array id
1362 * id array id
1366 int hpt_delete_array(DEVICEID id, HPT_U32 options);
1369 * Read/write data on array and physcal device.
1372 * id device id. If it's an array ID, IO will be performed on the array.
1373 * If it's a physical device ID, IO will be performed on the device.
1380 int hpt_device_io(DEVICEID id, int cmd, HPT_U32 lba, HPT_U32 nSector, void * buffer);
1384 * Auto-rebuild will start.
1387 * idArray array id
1388 * idDisk disk id
1398 * idDisk disk id
1408 * idDisk disk id
1409 * idArray array id
1419 * idDisk disk id
1439 * idArray Array ID (RAID1, 0/1 or RAID5)
1453 * idArray Array ID
1472 * idArray Array ID
1481 * set device info.
1484 * idDisk device ID
1513 * idDisk - Disk handle
1514 * PHPT601_INFO - pointer to HPT601 info buffer
1524 * idDisk - Disk handle
1525 * PHPT601_INFO - pointer to HPT601 info buffer
1532 * Lock a block on a device (prevent OS accessing it)
1535 * idDisk - Disk handle
1536 * Lba - Start LBA
1537 * nSectors - number of sectors
1544 * Unlock a device
1547 * idDisk - Disk handle
1554 * send a ATA passthrough command to a device.
1557 * p - IDE_PASS_THROUGH header pointer
1564 * send a SCSI passthrough command to a device.
1567 * in - HPT_SCSI_PASSTHROUGH_IN header pointer
1568 * out - PHPT_SCSI_PASSTHROUGH_OUT header pointer
1569 * insize, outsize - in/out buffer size
1580 * idArray - Array ID
1581 * Lba - block number (on each array member, not logical block!)
1582 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1594 * idArray - Array ID
1595 * Lba - block number (on each array member, not logical block!)
1596 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1603 * extended device I/O function
1606 * idArray - Array ID
1607 * Lba - block number (on each array member, not logical block!)
1608 * nSectors - Sectors for each member
1609 * buffer - I/O buffer or s/g address
1616 * select boot device
1619 * id - logical device ID. If id is 0 the boot mark will be removed.
1623 int hpt_set_boot_mark(DEVICEID id);
1626 * check if device can be removed safely
1629 * ndev - number of devices
1630 * pIds - device ID list
1632 * 0 - Success
1633 * -1 - unknown error
1634 * n - the n-th device that can't be removed
1642 * ndev - number of devices
1643 * pIds - device ID list
1645 * 0 - Success
1646 * -1 - unknown error
1647 * n - the n-th device that can't be removed
1657 * else return array id
1669 * else return array id
1678 * id logical device id
1681 * 0 - Success
1684 int hpt_get_device_info_v2(DEVICEID id, PLOGICAL_DEVICE_INFO_V2 pInfo);
1690 * id logical device id
1693 * 0 - Success
1696 int hpt_get_device_info_v3(DEVICEID id, PLOGICAL_DEVICE_INFO_V3 pInfo);
1702 * id logical device id
1705 * 0 - Success
1708 int hpt_get_device_info_v4(DEVICEID id, PLOGICAL_DEVICE_INFO_V4 pInfo);
1715 * idArray - source array
1716 * destInfo - destination array info
1718 * destination array id
1728 * idArray - source array
1729 * destInfo - destination array info
1731 * destination array id
1739 * This function is called by mid-layer, not GUI (which uses set_array_state instead).
1742 * idArray - destination array ID
1743 * the source ID will be invalid when transform complete.
1745 * 0 - Success
1755 * dev - destination device
1758 * 0 - Success
1768 * ndev - number of disks to initialize
1769 * pIds - array of DEVICEID
1772 * 0 - Success
1782 * source - if transform, this is the source array, otherwise, it should be zero
1783 * destInfo - target array params
1785 * 0 - Success
1786 * cap - max capacity of the target array
1796 * source - if transform, this is the source array, otherwise, it should be zero
1797 * destInfo - target array params
1799 * 0 - Success
1800 * cap - max capacity of the target array
1810 * idArray Array ID (RAID1, 0/1 or RAID5)
1825 * idArray - Array ID
1826 * Lba - block number (on each array member, not logical block!)
1827 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1841 * idArray - Array ID
1842 * Lba - block number (on each array member, not logical block!)
1843 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1855 * indata[0] - controller ID
1867 * location - parameter location
1868 * outBuffer - a buffer to hold the output
1869 * outBufferSize - size of outBuffer
1881 * pParam - a pointer to HPT_DRIVER_PARAMETER.
1887 int hpt_reenumerate_device(DEVICEID id);