Lines Matching +full:device +full:- +full:id
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2004-2005 HighPoint Technologies, Inc.
54 * Logical device --- a device that can be accessed by OS.
55 * Physical device --- device attached to the controller.
56 * A logical device can be simply a physical device.
58 * Each logical and physical device has a 32bit ID. GUI will use this ID
60 * 1. The ID must be unique.
61 * 2. The ID must be immutable. Once an ID is assigned to a device, it
62 * must not change when system is running and the device exists.
63 * 3. The ID of logical device must be NOT reusable. If a device is
64 * removed, other newly created logical device must not use the same ID.
65 * 4. The ID must not be zero or 0xFFFFFFFF.
70 * logical device type.
71 * Identify array (logical device) and physical device.
78 * GUI will treat all array as 1-level RAID. No RAID0/1 or RAID1/0.
79 * A RAID0/1 device is type AT_RAID1. A RAID1/0 device is type AT_RAID0.
89 * physical device type
124 #define ARRAY_FLAG_NEED_AUTOREBUILD 0x00000080 /* auto-rebuild should start */
130 * device flags
132 #define DEVICE_FLAG_DISABLED 0x00000001 /* device is disabled */
136 #define DEVICE_FLAG_SATA 0x00000010 /* S-ATA device */
174 #define HPT_CTL_CODE_WIN32_TO_I960(x) ((((x) & 0xffff)>>2)-0x900)
272 UCHAR SupportCrossControllerRAID; /* 1-support, 0-not support */
295 * Only non-zero values is valid. Bit0-3 represents the lower(child) level RAID type;
296 * bit4-7 represents the top level. i.e.
327 DEVICEID Devices[2]; /* device connected to this channel */
336 UINT seconds:6; /* 0 - 59 */
337 UINT minutes:6; /* 0 - 59 */
338 UINT month:4; /* 1 - 12 */
339 UINT hours:6; /* 0 - 59 */
340 UINT day:5; /* 1 - 31 */
356 UCHAR nDisk; /* member count: Number of ID in Members[] */
393 UCHAR nDisk; /* member count: Number of ID in Members[] */
408 * ATA/ATAPI Device identify data without the Reserved4.
419 USHORT VendorUnique1[3]; /* 0E 7-9 */
420 USHORT SerialNumber[10]; /* 14 10-19 */
424 USHORT FirmwareRevision[4]; /* 2E 23-26 */
425 USHORT ModelNumber[20]; /* 36 27-46 */
440 ULONG CurrentSectorCapacity; /* 72 57-58 */
442 ULONG UserAddressableSectors; /* 60-61 */
453 USHORT Reserved5[2]; /* 69-70 */
458 /* USHORT Reserved6[14]; // 75-88 */
463 * physical device information.
464 * IdentifyData.ModelNumber[] is byte-swapped from the original identify data.
467 UCHAR ControllerId; /* controller id */
469 UCHAR TargetId; /* id */
470 UCHAR DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
471 /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
472 UCHAR DeviceType; /* device type */
487 IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
507 WORD BeeperControl; /* bit4: beeper control bit. bit0-3: frequency bits */
508 WORD LED1Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
509 WORD LED2Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
514 * Logical device information.
516 * Common properties will be put in logical device information.
527 DEVICE_INFO device; member
542 DEVICE_INFO device; member
572 UCHAR DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
578 UCHAR DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
593 UCHAR ArrayType; /* 1-level array type */
603 DWORD Members[MAX_ARRAY_MEMBERS_V1];/* ID of array members, a member can be an array */
609 UCHAR ArrayType; /* 1-level array type */
620 DWORD Members[MAX_ARRAY_MEMBERS_V2];/* ID of array members, a member can be an array */
631 * call hpt_get_device_info() with the returned array ID and check returned flags to
660 #define ET_DEVICE_REMOVED 1 /* device removed */
661 #define ET_DEVICE_PLUGGED 2 /* device plugged */
662 #define ET_DEVICE_ERROR 3 /* device I/O error */
691 * IDE pass-through command. Use it at your own risk!
697 DEVICEID idDisk; /* disk ID */
706 BYTE protocol; /* IO_COMMAND_(READ,WRITE) or zero for non-DATA */
713 * device io packet format
755 /* for 32-bit app running on 64-bit system */
768 * User-mode ioctl parameter passing conventions:
775 * 4) Pass the structure to driver through a platform-specific method.
776 * This is implemented in the mid-layer user-mode library. The UI
794 /*-------------------------------------------------------------------------- */
804 * 0 - Success
808 /*-------------------------------------------------------------------------- */
820 /*-------------------------------------------------------------------------- */
825 * id Controller id
830 int hpt_get_controller_info(int id, PCONTROLLER_INFO pInfo);
832 /*-------------------------------------------------------------------------- */
837 * id Controller id
843 int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo);
845 /*-------------------------------------------------------------------------- */
853 * Number of ID returned. All logical device IDs are put into pIds array.
854 * Note: A spare disk is not a logical device.
858 /*-------------------------------------------------------------------------- */
863 * id logical device id
866 * 0 - Success
868 int hpt_get_device_info(DEVICEID id, PLOGICAL_DEVICE_INFO pInfo);
871 int hpt_get_device_info_v2(DEVICEID id, PLOGICAL_DEVICE_INFO_V2 pInfo);
874 /*-------------------------------------------------------------------------- */
882 * else return array id
890 /*-------------------------------------------------------------------------- */
895 * id array id
899 int hpt_delete_array(DEVICEID id, DWORD options);
901 /*-------------------------------------------------------------------------- */
904 * Read/write data on array and physcal device.
907 * id device id. If it's an array ID, IO will be performed on the array.
908 * If it's a physical device ID, IO will be performed on the device.
915 int hpt_device_io(DEVICEID id, int cmd, ULONG lba, DWORD nSector, LPVOID buffer);
918 int hpt_device_io_v2(DEVICEID id, int cmd, LBA64 lba, DWORD nSector, LPVOID buffer);
923 * Auto-rebuild will start.
926 * idArray array id
927 * idDisk disk id
932 /*-------------------------------------------------------------------------- */
938 * idDisk disk id
943 /*-------------------------------------------------------------------------- */
949 * idDisk disk id
950 * idArray array id
955 /*-------------------------------------------------------------------------- */
961 * idDisk disk id
966 /*-------------------------------------------------------------------------- */
977 /*-------------------------------------------------------------------------- */
983 * idArray Array ID (RAID1, 0/1 or RAID5)
996 /*-------------------------------------------------------------------------- */
1002 * idArray Array ID
1016 /*-------------------------------------------------------------------------- */
1022 * idArray Array ID
1029 /*-------------------------------------------------------------------------- */
1032 * set device info.
1035 * idDisk device ID
1050 /*-------------------------------------------------------------------------- */
1061 /*-------------------------------------------------------------------------- */
1067 * idDisk - Disk handle
1068 * PHPT601_INFO - pointer to HPT601 info buffer
1073 /*-------------------------------------------------------------------------- */
1079 * idDisk - Disk handle
1080 * PHPT601_INFO - pointer to HPT601 info buffer
1085 /*-------------------------------------------------------------------------- */
1088 * Lock a block on a device (prevent OS accessing it)
1091 * idDisk - Disk handle
1092 * Lba - Start LBA
1093 * nSectors - number of sectors
1102 /*-------------------------------------------------------------------------- */
1105 * Unlock a device
1108 * idDisk - Disk handle
1113 /*-------------------------------------------------------------------------- */
1120 * p - IDE_PASS_THROUGH header pointer
1125 /*-------------------------------------------------------------------------- */
1131 * idArray - Array ID
1132 * Lba - block number (on each array member, not logical block!)
1133 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1144 /*-------------------------------------------------------------------------- */
1150 * idArray - Array ID
1151 * Lba - block number (on each array member, not logical block!)
1152 * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
1161 /*-------------------------------------------------------------------------- */
1164 * extended device I/O function
1167 * idArray - Array ID
1168 * Lba - block number (on each array member, not logical block!)
1169 * nSectors - Sectors for each member
1170 * buffer - I/O buffer or s/g address
1178 /*-------------------------------------------------------------------------- */
1181 * select boot device
1184 * id - logical device ID. If id is 0 the boot mark will be removed.
1188 int hpt_set_boot_mark(DEVICEID id);
1189 /*-------------------------------------------------------------------------- */
1192 * check if device can be removed safely
1195 * ndev - number of devices
1196 * pIds - device ID list
1198 * 0 - Success
1199 * -1 - unknown error
1200 * n - the n-th device that can't be removed
1203 /*-------------------------------------------------------------------------- */
1209 * ndev - number of devices
1210 * pIds - device ID list
1212 * 0 - Success
1213 * -1 - unknown error
1214 * n - the n-th device that can't be removed
1217 /*-------------------------------------------------------------------------- */
1224 * p - IDE_PASS_THROUGH header pointer
1229 /*-------------------------------------------------------------------------- */