sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget,/translations/zh_CN/userspace-api/ioctl/hdiomodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/userspace-api/ioctl/hdiomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/userspace-api/ioctl/hdiomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/userspace-api/ioctl/hdiomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/userspace-api/ioctl/hdiomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/userspace-api/ioctl/hdiomodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hSummary of `HDIO_` ioctl callsh](h Summary of }(hhhhhNhNubhtitle_reference)}(h`HDIO_`h]hHDIO_}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh ioctl calls}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/userspace-api/ioctl/hdio.rsthKubh bullet_list)}(hhh]h list_item)}(h"Edward A. Falk h]h paragraph)}(h!Edward A. Falk h](hEdward A. Falk <}(hhhhhNhNubh reference)}(hefalk@google.comh]hefalk@google.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:efalk@google.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubah}(h]h ]h"]h$]h&]bullet-uh1hhhhKhhhhubh)}(hNovember, 2004h]hNovember, 2004}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThis document attempts to describe the ioctl(2) calls supported by the HD/IDE layer. These are by-and-large implemented (as of Linux 5.11) drivers/ata/libata-scsi.c.h]hThis document attempts to describe the ioctl(2) calls supported by the HD/IDE layer. These are by-and-large implemented (as of Linux 5.11) drivers/ata/libata-scsi.c.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hUioctl values are listed in . As of this writing, they are as follows:h]hUioctl values are listed in . As of this writing, they are as follows:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh block_quote)}(hXioctls that pass argument pointers to user space: ======================= ======================================= HDIO_GETGEO get device geometry HDIO_GET_32BIT get current io_32bit setting HDIO_GET_IDENTITY get IDE identification info HDIO_DRIVE_TASKFILE execute raw taskfile HDIO_DRIVE_TASK execute task and special drive command HDIO_DRIVE_CMD execute a special drive command ======================= ======================================= ioctls that pass non-pointer values: ======================= ======================================= HDIO_SET_32BIT change io_32bit flags ======================= ======================================= h](h)}(h1ioctls that pass argument pointers to user space:h]h1ioctls that pass argument pointers to user space:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6ubj5)}(hX======================= ======================================= HDIO_GETGEO get device geometry HDIO_GET_32BIT get current io_32bit setting HDIO_GET_IDENTITY get IDE identification info HDIO_DRIVE_TASKFILE execute raw taskfile HDIO_DRIVE_TASK execute task and special drive command HDIO_DRIVE_CMD execute a special drive command ======================= ======================================= h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjSubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jVhjSubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h HDIO_GETGEOh]h HDIO_GETGEO}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjxubah}(h]h ]h"]h$]h&]uh1jvhjsubjw)}(hhh]h)}(hget device geometryh]hget device geometry}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jvhjsubeh}(h]h ]h"]h$]h&]uh1jqhjnubjr)}(hhh](jw)}(hhh]h)}(hHDIO_GET_32BITh]hHDIO_GET_32BIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hget current io_32bit settingh]hget current io_32bit setting}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjnubjr)}(hhh](jw)}(hhh]h)}(hHDIO_GET_IDENTITYh]hHDIO_GET_IDENTITY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hget IDE identification infoh]hget IDE identification info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjnubjr)}(hhh](jw)}(hhh]h)}(hHDIO_DRIVE_TASKFILEh]hHDIO_DRIVE_TASKFILE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hexecute raw taskfileh]hexecute raw taskfile}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj4ubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjnubjr)}(hhh](jw)}(hhh]h)}(hHDIO_DRIVE_TASKh]hHDIO_DRIVE_TASK}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjTubah}(h]h ]h"]h$]h&]uh1jvhjQubjw)}(hhh]h)}(h&execute task and special drive commandh]h&execute task and special drive command}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjkubah}(h]h ]h"]h$]h&]uh1jvhjQubeh}(h]h ]h"]h$]h&]uh1jqhjnubjr)}(hhh](jw)}(hhh]h)}(hHDIO_DRIVE_CMDh]hHDIO_DRIVE_CMD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hexecute a special drive commandh]hexecute a special drive command}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjnubeh}(h]h ]h"]h$]h&]uh1jlhjSubeh}(h]h ]h"]h$]h&]colsKuh1jQhjNubah}(h]h ]h"]h$]h&]uh1jLhjHubah}(h]h ]h"]h$]h&]uh1j4hhhKhj6ubh)}(h$ioctls that pass non-pointer values:h]h$ioctls that pass non-pointer values:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6ubj5)}(h======================= ======================================= HDIO_SET_32BIT change io_32bit flags ======================= ======================================= h]jM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jVhjubjm)}(hhh]jr)}(hhh](jw)}(hhh]h)}(hHDIO_SET_32BITh]hHDIO_SET_32BIT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hchange io_32bit flagsh]hchange io_32bit flags}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj!ubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]colsKuh1jQhjubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1j4hhhKhj6ubeh}(h]h ]h"]h$]h&]uh1j4hhhKhhhhubh)}(hThe information that follows was determined from reading kernel source code. It is likely that some corrections will be made over time.h]hThe information that follows was determined from reading kernel source code. It is likely that some corrections will be made over time.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hhhhubh transition)}(hN------------------------------------------------------------------------------h]h}(h]h ]h"]h$]h&]uh1jkhhhK%hhhhubh)}(hGeneral:h]hGeneral:}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hhhhubj5)}(hXeUnless otherwise specified, all ioctl calls return 0 on success and -1 with errno set to an appropriate value on error. Unless otherwise specified, all ioctl calls return -1 and set errno to EFAULT on a failed attempt to copy data to or from user address space. Unless otherwise specified, all data structures and constants are defined in h](h)}(hwUnless otherwise specified, all ioctl calls return 0 on success and -1 with errno set to an appropriate value on error.h]hwUnless otherwise specified, all ioctl calls return 0 on success and -1 with errno set to an appropriate value on error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubh)}(hUnless otherwise specified, all ioctl calls return -1 and set errno to EFAULT on a failed attempt to copy data to or from user address space.h]hUnless otherwise specified, all ioctl calls return -1 and set errno to EFAULT on a failed attempt to copy data to or from user address space.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubh)}(h\Unless otherwise specified, all data structures and constants are defined in h]h\Unless otherwise specified, all data structures and constants are defined in }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubeh}(h]h ]h"]h$]h&]uh1j4hhhK)hhhhubjl)}(hN------------------------------------------------------------------------------h]h}(h]h ]h"]h$]h&]uh1jkhhhK3hhhhubhdefinition_list)}(hhh](hdefinition_list_item)}(hXHDIO_GETGEO get device geometry usage:: struct hd_geometry geom; ioctl(fd, HDIO_GETGEO, &geom); inputs: none outputs: hd_geometry structure containing: ========= ================================== heads number of heads sectors number of sectors/track cylinders number of cylinders, mod 65536 start starting sector of this partition. ========= ================================== error returns: - EINVAL if the device is not a disk drive or floppy drive, or if the user passes a null pointer notes: Not particularly useful with modern disk drives, whose geometry is a polite fiction anyway. Modern drives are addressed purely by sector number nowadays (lba addressing), and the drive geometry is an abstraction which is actually subject to change. Currently (as of Nov 2004), the geometry values are the "bios" values -- presumably the values the drive had when Linux first booted. In addition, the cylinders field of the hd_geometry is an unsigned short, meaning that on most architectures, this ioctl will not return a meaningful value on drives with more than 65535 tracks. The start field is unsigned long, meaning that it will not contain a meaningful value for disks over 219 Gb in size. h](hterm)}(h HDIO_GETGEOh]h HDIO_GETGEO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKihjubh definition)}(hhh](h)}(hget device geometryh]hget device geometry}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubh)}(husage::h]husage:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubh literal_block)}(h8struct hd_geometry geom; ioctl(fd, HDIO_GETGEO, &geom);h]h8struct hd_geometry geom; ioctl(fd, HDIO_GETGEO, &geom);}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK;hjubj)}(hhh](j)}(hinputs: none h](j)}(hinputs:h]hinputs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKChjubj)}(hhh]h)}(hnoneh]hnone}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhj&ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKChjubj)}(hX*outputs: hd_geometry structure containing: ========= ================================== heads number of heads sectors number of sectors/track cylinders number of cylinders, mod 65536 start starting sector of this partition. ========= ================================== h](j)}(houtputs:h]houtputs:}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKOhjCubj)}(hhh](j5)}(h#hd_geometry structure containing: h]h)}(h!hd_geometry structure containing:h]h!hd_geometry structure containing:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhjXubah}(h]h ]h"]h$]h&]uh1j4hhhKFhjUubjM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jVhjsubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK"uh1jVhjsubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(hheadsh]hheads}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKJhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hnumber of headsh]hnumber of heads}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKJhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hsectorsh]hsectors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hnumber of sectors/trackh]hnumber of sectors/track}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h cylindersh]h cylinders}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hnumber of cylinders, mod 65536h]hnumber of cylinders, mod 65536}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hstarth]hstart}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhj5ubah}(h]h ]h"]h$]h&]uh1jvhj2ubjw)}(hhh]h)}(h"starting sector of this partition.h]h"starting sector of this partition.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjLubah}(h]h ]h"]h$]h&]uh1jvhj2ubeh}(h]h ]h"]h$]h&]uh1jqhjubeh}(h]h ]h"]h$]h&]uh1jlhjsubeh}(h]h ]h"]h$]h&]colsKuh1jQhjpubah}(h]h ]h"]h$]h&]uh1jLhjUubeh}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhhhKOhjubj)}(herror returns: - EINVAL if the device is not a disk drive or floppy drive, or if the user passes a null pointer h](j)}(herror returns:h]herror returns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKVhjubj)}(hhh]h)}(hhh]h)}(hyEINVAL if the device is not a disk drive or floppy drive, or if the user passes a null pointer h](h)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubj5)}(hYif the device is not a disk drive or floppy drive, or if the user passes a null pointer h]h)}(hWif the device is not a disk drive or floppy drive, or if the user passes a null pointerh]hWif the device is not a disk drive or floppy drive, or if the user passes a null pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1j4hhhKThjubeh}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]jj uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKVhjubj)}(hXnotes: Not particularly useful with modern disk drives, whose geometry is a polite fiction anyway. Modern drives are addressed purely by sector number nowadays (lba addressing), and the drive geometry is an abstraction which is actually subject to change. Currently (as of Nov 2004), the geometry values are the "bios" values -- presumably the values the drive had when Linux first booted. In addition, the cylinders field of the hd_geometry is an unsigned short, meaning that on most architectures, this ioctl will not return a meaningful value on drives with more than 65535 tracks. The start field is unsigned long, meaning that it will not contain a meaningful value for disks over 219 Gb in size. h](j)}(hnotes:h]hnotes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKihjubj)}(hhh](h)}(hXNot particularly useful with modern disk drives, whose geometry is a polite fiction anyway. Modern drives are addressed purely by sector number nowadays (lba addressing), and the drive geometry is an abstraction which is actually subject to change. Currently (as of Nov 2004), the geometry values are the "bios" values -- presumably the values the drive had when Linux first booted.h]hXNot particularly useful with modern disk drives, whose geometry is a polite fiction anyway. Modern drives are addressed purely by sector number nowadays (lba addressing), and the drive geometry is an abstraction which is actually subject to change. Currently (as of Nov 2004), the geometry values are the “bios” values -- presumably the values the drive had when Linux first booted.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjubh)}(hIn addition, the cylinders field of the hd_geometry is an unsigned short, meaning that on most architectures, this ioctl will not return a meaningful value on drives with more than 65535 tracks.h]hIn addition, the cylinders field of the hd_geometry is an unsigned short, meaning that on most architectures, this ioctl will not return a meaningful value on drives with more than 65535 tracks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahjubh)}(htThe start field is unsigned long, meaning that it will not contain a meaningful value for disks over 219 Gb in size.h]htThe start field is unsigned long, meaning that it will not contain a meaningful value for disks over 219 Gb in size.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKihjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKihjubj)}(hXHDIO_GET_IDENTITY get IDE identification info usage:: unsigned char identity[512]; ioctl(fd, HDIO_GET_IDENTITY, identity); inputs: none outputs: ATA drive identity information. For full description, see the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands in the ATA specification. error returns: - EINVAL Called on a partition instead of the whole disk device - ENOMSG IDENTIFY DEVICE information not available notes: Returns information that was obtained when the drive was probed. Some of this information is subject to change, and this ioctl does not re-probe the drive to update the information. This information is also available from /proc/ide/hdX/identify h](j)}(hHDIO_GET_IDENTITYh]hHDIO_GET_IDENTITY}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj?ubj)}(hhh](h)}(hget IDE identification infoh]hget IDE identification info}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjQubh)}(husage::h]husage:}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjQubj)}(hEunsigned char identity[512]; ioctl(fd, HDIO_GET_IDENTITY, identity);h]hEunsigned char identity[512]; ioctl(fd, HDIO_GET_IDENTITY, identity);}hjpsbah}(h]h ]h"]h$]h&]jjuh1jhhhKqhjQubj)}(hhh](j)}(hinputs: none h](j)}(hinputs:h]hinputs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKxhjubj)}(hhh]h)}(hnoneh]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKxhj~ubj)}(houtputs: ATA drive identity information. For full description, see the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands in the ATA specification. h](j)}(houtputs:h]houtputs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK}hjubj)}(hhh]h)}(hATA drive identity information. For full description, see the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands in the ATA specification.h]hATA drive identity information. For full description, see the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands in the ATA specification.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK}hj~ubj)}(herror returns: - EINVAL Called on a partition instead of the whole disk device - ENOMSG IDENTIFY DEVICE information not available h](j)}(herror returns:h]herror returns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hhh](h)}(hBEINVAL Called on a partition instead of the whole disk deviceh]h)}(hjh]hBEINVAL Called on a partition instead of the whole disk device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h6ENOMSG IDENTIFY DEVICE information not available h]h)}(h5ENOMSG IDENTIFY DEVICE information not availableh]h5ENOMSG IDENTIFY DEVICE information not available}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]jj uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj~ubj)}(hXnotes: Returns information that was obtained when the drive was probed. Some of this information is subject to change, and this ioctl does not re-probe the drive to update the information. This information is also available from /proc/ide/hdX/identify h](j)}(hnotes:h]hnotes:}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj8ubj)}(hhh](h)}(hReturns information that was obtained when the drive was probed. Some of this information is subject to change, and this ioctl does not re-probe the drive to update the information.h]hReturns information that was obtained when the drive was probed. Some of this information is subject to change, and this ioctl does not re-probe the drive to update the information.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJubh)}(h>This information is also available from /proc/ide/hdX/identifyh]h>This information is also available from /proc/ide/hdX/identify}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJubeh}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj~ubeh}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hHDIO_GET_32BIT get current io_32bit setting usage:: long val; ioctl(fd, HDIO_GET_32BIT, &val); inputs: none outputs: The value of the current io_32bit setting notes: 0=16-bit, 1=32-bit, 2,3 = 32bit+sync h](j)}(hHDIO_GET_32BITh]hHDIO_GET_32BIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh](h)}(hget current io_32bit settingh]hget current io_32bit setting}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(husage::h]husage:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h+long val; ioctl(fd, HDIO_GET_32BIT, &val);h]h+long val; ioctl(fd, HDIO_GET_32BIT, &val);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubj)}(hhh](j)}(hinputs: none h](j)}(hinputs:h]hinputs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hnoneh]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h5outputs: The value of the current io_32bit setting h](j)}(houtputs:h]houtputs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h)The value of the current io_32bit settingh]h)The value of the current io_32bit setting}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h.notes: 0=16-bit, 1=32-bit, 2,3 = 32bit+sync h](j)}(hnotes:h]hnotes:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj'ubj)}(hhh]h)}(h$0=16-bit, 1=32-bit, 2,3 = 32bit+synch]h$0=16-bit, 1=32-bit, 2,3 = 32bit+sync}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj9ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX#HDIO_DRIVE_TASKFILE execute raw taskfile Note: If you don't have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl. - Execute an ATA disk command directly by writing the "taskfile" registers of the drive. Requires ADMIN and RAWIO access privileges. usage:: struct { ide_task_request_t req_task; u8 outbuf[OUTPUT_SIZE]; u8 inbuf[INPUT_SIZE]; } task; memset(&task.req_task, 0, sizeof(task.req_task)); task.req_task.out_size = sizeof(task.outbuf); task.req_task.in_size = sizeof(task.inbuf); ... ioctl(fd, HDIO_DRIVE_TASKFILE, &task); ... inputs: (See below for details on memory area passed to ioctl.) ============ =================================================== io_ports[8] values to be written to taskfile registers hob_ports[8] high-order bytes, for extended commands. out_flags flags indicating which registers are valid in_flags flags indicating which registers should be returned data_phase see below req_cmd command type to be executed out_size size of output buffer outbuf buffer of data to be transmitted to disk inbuf buffer of data to be received from disk (see [1]) ============ =================================================== outputs: =========== ==================================================== io_ports[] values returned in the taskfile registers hob_ports[] high-order bytes, for extended commands. out_flags flags indicating which registers are valid (see [2]) in_flags flags indicating which registers should be returned outbuf buffer of data to be transmitted to disk (see [1]) inbuf buffer of data to be received from disk =========== ==================================================== error returns: - EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privilege not set. - ENOMSG Device is not a disk drive. - ENOMEM Unable to allocate memory for task - EFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8) - EPERM req_cmd == TASKFILE_MULTI_OUT and drive multi-count not yet set. - EIO Drive failed the command. notes: [1] READ THE FOLLOWING NOTES *CAREFULLY*. THIS IOCTL IS FULL OF GOTCHAS. Extreme caution should be used with using this ioctl. A mistake can easily corrupt data or hang the system. [2] Both the input and output buffers are copied from the user and written back to the user, even when not used. [3] If one or more bits are set in out_flags and in_flags is zero, the following values are used for in_flags.all and written back into in_flags on completion. * IDE_TASKFILE_STD_IN_FLAGS | (IDE_HOB_STD_IN_FLAGS << 8) if LBA48 addressing is enabled for the drive * IDE_TASKFILE_STD_IN_FLAGS if CHS/LBA28 The association between in_flags.all and each enable bitfield flips depending on endianness; fortunately, TASKFILE only uses inflags.b.data bit and ignores all other bits. The end result is that, on any endian machines, it has no effect other than modifying in_flags on completion. [4] The default value of SELECT is (0xa0|DEV_bit|LBA_bit) except for four drives per port chipsets. For four drives per port chipsets, it's (0xa0|DEV_bit|LBA_bit) for the first pair and (0x80|DEV_bit|LBA_bit) for the second pair. [5] The argument to the ioctl is a pointer to a region of memory containing a ide_task_request_t structure, followed by an optional buffer of data to be transmitted to the drive, followed by an optional buffer to receive data from the drive. Command is passed to the disk drive via the ide_task_request_t structure, which contains these fields: ============ =============================================== io_ports[8] values for the taskfile registers hob_ports[8] high-order bytes, for extended commands out_flags flags indicating which entries in the io_ports[] and hob_ports[] arrays contain valid values. Type ide_reg_valid_t. in_flags flags indicating which entries in the io_ports[] and hob_ports[] arrays are expected to contain valid values on return. data_phase See below req_cmd Command type, see below out_size output (user->drive) buffer size, bytes in_size input (drive->user) buffer size, bytes ============ =============================================== When out_flags is zero, the following registers are loaded. ============ =============================================== HOB_FEATURE If the drive supports LBA48 HOB_NSECTOR If the drive supports LBA48 HOB_SECTOR If the drive supports LBA48 HOB_LCYL If the drive supports LBA48 HOB_HCYL If the drive supports LBA48 FEATURE NSECTOR SECTOR LCYL HCYL SELECT First, masked with 0xE0 if LBA48, 0xEF otherwise; then, or'ed with the default value of SELECT. ============ =============================================== If any bit in out_flags is set, the following registers are loaded. ============ =============================================== HOB_DATA If out_flags.b.data is set. HOB_DATA will travel on DD8-DD15 on little endian machines and on DD0-DD7 on big endian machines. DATA If out_flags.b.data is set. DATA will travel on DD0-DD7 on little endian machines and on DD8-DD15 on big endian machines. HOB_NSECTOR If out_flags.b.nsector_hob is set HOB_SECTOR If out_flags.b.sector_hob is set HOB_LCYL If out_flags.b.lcyl_hob is set HOB_HCYL If out_flags.b.hcyl_hob is set FEATURE If out_flags.b.feature is set NSECTOR If out_flags.b.nsector is set SECTOR If out_flags.b.sector is set LCYL If out_flags.b.lcyl is set HCYL If out_flags.b.hcyl is set SELECT Or'ed with the default value of SELECT and loaded regardless of out_flags.b.select. ============ =============================================== Taskfile registers are read back from the drive into {io|hob}_ports[] after the command completes iff one of the following conditions is met; otherwise, the original values will be written back, unchanged. 1. The drive fails the command (EIO). 2. One or more than one bits are set in out_flags. 3. The requested data_phase is TASKFILE_NO_DATA. ============ =============================================== HOB_DATA If in_flags.b.data is set. It will contain DD8-DD15 on little endian machines and DD0-DD7 on big endian machines. DATA If in_flags.b.data is set. It will contain DD0-DD7 on little endian machines and DD8-DD15 on big endian machines. HOB_FEATURE If the drive supports LBA48 HOB_NSECTOR If the drive supports LBA48 HOB_SECTOR If the drive supports LBA48 HOB_LCYL If the drive supports LBA48 HOB_HCYL If the drive supports LBA48 NSECTOR SECTOR LCYL HCYL ============ =============================================== The data_phase field describes the data transfer to be performed. Value is one of: =================== ======================================== TASKFILE_IN TASKFILE_MULTI_IN TASKFILE_OUT TASKFILE_MULTI_OUT TASKFILE_IN_OUT TASKFILE_IN_DMA TASKFILE_IN_DMAQ == IN_DMA (queueing not supported) TASKFILE_OUT_DMA TASKFILE_OUT_DMAQ == OUT_DMA (queueing not supported) TASKFILE_P_IN unimplemented TASKFILE_P_IN_DMA unimplemented TASKFILE_P_IN_DMAQ unimplemented TASKFILE_P_OUT unimplemented TASKFILE_P_OUT_DMA unimplemented TASKFILE_P_OUT_DMAQ unimplemented =================== ======================================== The req_cmd field classifies the command type. It may be one of: ======================== ======================================= IDE_DRIVE_TASK_NO_DATA IDE_DRIVE_TASK_SET_XFER unimplemented IDE_DRIVE_TASK_IN IDE_DRIVE_TASK_OUT unimplemented IDE_DRIVE_TASK_RAW_WRITE ======================== ======================================= [6] Do not access {in|out}_flags->all except for resetting all the bits. Always access individual bit fields. ->all value will flip depending on endianness. For the same reason, do not use IDE_{TASKFILE|HOB}_STD_{OUT|IN}_FLAGS constants defined in hdreg.h. h](j)}(hHDIO_DRIVE_TASKFILEh]hHDIO_DRIVE_TASKFILE}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhubj)}(hhh](h)}(hexecute raw taskfileh]hexecute raw taskfile}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubj)}(hhh]j)}(hkNote: If you don't have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl. h](j)}(hNote:h]hNote:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hdIf you don't have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl.h]hfIf you don’t have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjzubh)}(hhh]h)}(hExecute an ATA disk command directly by writing the "taskfile" registers of the drive. Requires ADMIN and RAWIO access privileges. h]h)}(hExecute an ATA disk command directly by writing the "taskfile" registers of the drive. Requires ADMIN and RAWIO access privileges.h]hExecute an ATA disk command directly by writing the “taskfile” registers of the drive. Requires ADMIN and RAWIO access privileges.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]jj uh1hhhhKhjzubh)}(husage::h]husage:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubj)}(hXstruct { ide_task_request_t req_task; u8 outbuf[OUTPUT_SIZE]; u8 inbuf[INPUT_SIZE]; } task; memset(&task.req_task, 0, sizeof(task.req_task)); task.req_task.out_size = sizeof(task.outbuf); task.req_task.in_size = sizeof(task.inbuf); ... ioctl(fd, HDIO_DRIVE_TASKFILE, &task); ...h]hXstruct { ide_task_request_t req_task; u8 outbuf[OUTPUT_SIZE]; u8 inbuf[INPUT_SIZE]; } task; memset(&task.req_task, 0, sizeof(task.req_task)); task.req_task.out_size = sizeof(task.outbuf); task.req_task.in_size = sizeof(task.inbuf); ... ioctl(fd, HDIO_DRIVE_TASKFILE, &task); ...}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjzubh)}(hinputs:h]hinputs:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubj5)}(hX(See below for details on memory area passed to ioctl.) ============ =================================================== io_ports[8] values to be written to taskfile registers hob_ports[8] high-order bytes, for extended commands. out_flags flags indicating which registers are valid in_flags flags indicating which registers should be returned data_phase see below req_cmd command type to be executed out_size size of output buffer outbuf buffer of data to be transmitted to disk inbuf buffer of data to be received from disk (see [1]) ============ =================================================== h](h)}(h7(See below for details on memory area passed to ioctl.)h]h7(See below for details on memory area passed to ioctl.)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubjM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jVhj# ubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK3uh1jVhj# ubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(h io_ports[8]h]h io_ports[8]}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj@ ubah}(h]h ]h"]h$]h&]uh1jvhj= ubjw)}(hhh]h)}(h*values to be written to taskfile registersh]h*values to be written to taskfile registers}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjW ubah}(h]h ]h"]h$]h&]uh1jvhj= ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubjr)}(hhh](jw)}(hhh]h)}(h hob_ports[8]h]h hob_ports[8]}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjw ubah}(h]h ]h"]h$]h&]uh1jvhjt ubjw)}(hhh]h)}(h(high-order bytes, for extended commands.h]h(high-order bytes, for extended commands.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhjt ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubjr)}(hhh](jw)}(hhh]h)}(h out_flagsh]h out_flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h*flags indicating which registers are validh]h*flags indicating which registers are valid}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubjr)}(hhh](jw)}(hhh]h)}(hin_flagsh]hin_flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h3flags indicating which registers should be returnedh]h3flags indicating which registers should be returned}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubjr)}(hhh](jw)}(hhh]h)}(h data_phaseh]h data_phase}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h see belowh]h see below}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3 ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubjr)}(hhh](jw)}(hhh]h)}(hreq_cmdh]hreq_cmd}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjS ubah}(h]h ]h"]h$]h&]uh1jvhjP ubjw)}(hhh]h)}(hcommand type to be executedh]hcommand type to be executed}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjj ubah}(h]h ]h"]h$]h&]uh1jvhjP ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubjr)}(hhh](jw)}(hhh]h)}(hout_sizeh]hout_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(hsize of output bufferh]hsize of output buffer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubjr)}(hhh](jw)}(hhh]h)}(houtbufh]houtbuf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h(buffer of data to be transmitted to diskh]h(buffer of data to be transmitted to disk}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubjr)}(hhh](jw)}(hhh]h)}(hinbufh]hinbuf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h1buffer of data to be received from disk (see [1])h]h1buffer of data to be received from disk (see [1])}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhj: ubeh}(h]h ]h"]h$]h&]uh1jlhj# ubeh}(h]h ]h"]h$]h&]colsKuh1jQhj ubah}(h]h ]h"]h$]h&]uh1jLhj ubeh}(h]h ]h"]h$]h&]uh1j4hhhKhjzubh)}(houtputs:h]houtputs:}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubj5)}(hX=========== ==================================================== io_ports[] values returned in the taskfile registers hob_ports[] high-order bytes, for extended commands. out_flags flags indicating which registers are valid (see [2]) in_flags flags indicating which registers should be returned outbuf buffer of data to be transmitted to disk (see [1]) inbuf buffer of data to be received from disk =========== ==================================================== h]jM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jVhjZ ubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK4uh1jVhjZ ubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(h io_ports[]h]h io_ports[]}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjw ubah}(h]h ]h"]h$]h&]uh1jvhjt ubjw)}(hhh]h)}(h)values returned in the taskfile registersh]h)values returned in the taskfile registers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhjt ubeh}(h]h ]h"]h$]h&]uh1jqhjq ubjr)}(hhh](jw)}(hhh]h)}(h hob_ports[]h]h hob_ports[]}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h(high-order bytes, for extended commands.h]h(high-order bytes, for extended commands.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhjq ubjr)}(hhh](jw)}(hhh]h)}(h out_flagsh]h out_flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h4flags indicating which registers are valid (see [2])h]h4flags indicating which registers are valid (see [2])}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhjq ubjr)}(hhh](jw)}(hhh]h)}(hin_flagsh]hin_flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h3flags indicating which registers should be returnedh]h3flags indicating which registers should be returned}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3 ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhjq ubjr)}(hhh](jw)}(hhh]h)}(houtbufh]houtbuf}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjS ubah}(h]h ]h"]h$]h&]uh1jvhjP ubjw)}(hhh]h)}(h2buffer of data to be transmitted to disk (see [1])h]h2buffer of data to be transmitted to disk (see [1])}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjj ubah}(h]h ]h"]h$]h&]uh1jvhjP ubeh}(h]h ]h"]h$]h&]uh1jqhjq ubjr)}(hhh](jw)}(hhh]h)}(hinbufh]hinbuf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(h'buffer of data to be received from diskh]h'buffer of data to be received from disk}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhjq ubeh}(h]h ]h"]h$]h&]uh1jlhjZ ubeh}(h]h ]h"]h$]h&]colsKuh1jQhjW ubah}(h]h ]h"]h$]h&]uh1jLhjS ubah}(h]h ]h"]h$]h&]uh1j4hhhKhjzubj)}(hhh]j)}(hXerror returns: - EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privilege not set. - ENOMSG Device is not a disk drive. - ENOMEM Unable to allocate memory for task - EFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8) - EPERM req_cmd == TASKFILE_MULTI_OUT and drive multi-count not yet set. - EIO Drive failed the command. h](j)}(herror returns:h]herror returns:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(hhh](h)}(h=EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privilege not set.h]h)}(hj h]h=EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privilege not set.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h'ENOMSG Device is not a disk drive.h]h)}(hj h]h'ENOMSG Device is not a disk drive.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h.ENOMEM Unable to allocate memory for taskh]h)}(hj" h]h.ENOMEM Unable to allocate memory for task}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hDEFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8)h]h)}(hj9 h]hDEFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8)}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj7 ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h_EPERM req_cmd == TASKFILE_MULTI_OUT and drive multi-count not yet set.h](h)}(hEPERMh]hEPERM}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjN ubj5)}(h@req_cmd == TASKFILE_MULTI_OUT and drive multi-count not yet set.h]h)}(h@req_cmd == TASKFILE_MULTI_OUT and drive multi-count not yet set.h]h@req_cmd == TASKFILE_MULTI_OUT and drive multi-count not yet set.}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj` ubah}(h]h ]h"]h$]h&]uh1j4hhhKhjN ubeh}(h]h ]h"]h$]h&]uh1hhj ubh)}(h&EIO Drive failed the command. h]h)}(h%EIO Drive failed the command.h]h%EIO Drive failed the command.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj~ ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]jj uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjzubh)}(hnotes:h]hnotes:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubj5)}(hX[1] READ THE FOLLOWING NOTES *CAREFULLY*. THIS IOCTL IS FULL OF GOTCHAS. Extreme caution should be used with using this ioctl. A mistake can easily corrupt data or hang the system. [2] Both the input and output buffers are copied from the user and written back to the user, even when not used. [3] If one or more bits are set in out_flags and in_flags is zero, the following values are used for in_flags.all and written back into in_flags on completion. * IDE_TASKFILE_STD_IN_FLAGS | (IDE_HOB_STD_IN_FLAGS << 8) if LBA48 addressing is enabled for the drive * IDE_TASKFILE_STD_IN_FLAGS if CHS/LBA28 The association between in_flags.all and each enable bitfield flips depending on endianness; fortunately, TASKFILE only uses inflags.b.data bit and ignores all other bits. The end result is that, on any endian machines, it has no effect other than modifying in_flags on completion. [4] The default value of SELECT is (0xa0|DEV_bit|LBA_bit) except for four drives per port chipsets. For four drives per port chipsets, it's (0xa0|DEV_bit|LBA_bit) for the first pair and (0x80|DEV_bit|LBA_bit) for the second pair. [5] The argument to the ioctl is a pointer to a region of memory containing a ide_task_request_t structure, followed by an optional buffer of data to be transmitted to the drive, followed by an optional buffer to receive data from the drive. Command is passed to the disk drive via the ide_task_request_t structure, which contains these fields: ============ =============================================== io_ports[8] values for the taskfile registers hob_ports[8] high-order bytes, for extended commands out_flags flags indicating which entries in the io_ports[] and hob_ports[] arrays contain valid values. Type ide_reg_valid_t. in_flags flags indicating which entries in the io_ports[] and hob_ports[] arrays are expected to contain valid values on return. data_phase See below req_cmd Command type, see below out_size output (user->drive) buffer size, bytes in_size input (drive->user) buffer size, bytes ============ =============================================== When out_flags is zero, the following registers are loaded. ============ =============================================== HOB_FEATURE If the drive supports LBA48 HOB_NSECTOR If the drive supports LBA48 HOB_SECTOR If the drive supports LBA48 HOB_LCYL If the drive supports LBA48 HOB_HCYL If the drive supports LBA48 FEATURE NSECTOR SECTOR LCYL HCYL SELECT First, masked with 0xE0 if LBA48, 0xEF otherwise; then, or'ed with the default value of SELECT. ============ =============================================== If any bit in out_flags is set, the following registers are loaded. ============ =============================================== HOB_DATA If out_flags.b.data is set. HOB_DATA will travel on DD8-DD15 on little endian machines and on DD0-DD7 on big endian machines. DATA If out_flags.b.data is set. DATA will travel on DD0-DD7 on little endian machines and on DD8-DD15 on big endian machines. HOB_NSECTOR If out_flags.b.nsector_hob is set HOB_SECTOR If out_flags.b.sector_hob is set HOB_LCYL If out_flags.b.lcyl_hob is set HOB_HCYL If out_flags.b.hcyl_hob is set FEATURE If out_flags.b.feature is set NSECTOR If out_flags.b.nsector is set SECTOR If out_flags.b.sector is set LCYL If out_flags.b.lcyl is set HCYL If out_flags.b.hcyl is set SELECT Or'ed with the default value of SELECT and loaded regardless of out_flags.b.select. ============ =============================================== Taskfile registers are read back from the drive into {io|hob}_ports[] after the command completes iff one of the following conditions is met; otherwise, the original values will be written back, unchanged. 1. The drive fails the command (EIO). 2. One or more than one bits are set in out_flags. 3. The requested data_phase is TASKFILE_NO_DATA. ============ =============================================== HOB_DATA If in_flags.b.data is set. It will contain DD8-DD15 on little endian machines and DD0-DD7 on big endian machines. DATA If in_flags.b.data is set. It will contain DD0-DD7 on little endian machines and DD8-DD15 on big endian machines. HOB_FEATURE If the drive supports LBA48 HOB_NSECTOR If the drive supports LBA48 HOB_SECTOR If the drive supports LBA48 HOB_LCYL If the drive supports LBA48 HOB_HCYL If the drive supports LBA48 NSECTOR SECTOR LCYL HCYL ============ =============================================== The data_phase field describes the data transfer to be performed. Value is one of: =================== ======================================== TASKFILE_IN TASKFILE_MULTI_IN TASKFILE_OUT TASKFILE_MULTI_OUT TASKFILE_IN_OUT TASKFILE_IN_DMA TASKFILE_IN_DMAQ == IN_DMA (queueing not supported) TASKFILE_OUT_DMA TASKFILE_OUT_DMAQ == OUT_DMA (queueing not supported) TASKFILE_P_IN unimplemented TASKFILE_P_IN_DMA unimplemented TASKFILE_P_IN_DMAQ unimplemented TASKFILE_P_OUT unimplemented TASKFILE_P_OUT_DMA unimplemented TASKFILE_P_OUT_DMAQ unimplemented =================== ======================================== The req_cmd field classifies the command type. It may be one of: ======================== ======================================= IDE_DRIVE_TASK_NO_DATA IDE_DRIVE_TASK_SET_XFER unimplemented IDE_DRIVE_TASK_IN IDE_DRIVE_TASK_OUT unimplemented IDE_DRIVE_TASK_RAW_WRITE ======================== ======================================= [6] Do not access {in|out}_flags->all except for resetting all the bits. Always access individual bit fields. ->all value will flip depending on endianness. For the same reason, do not use IDE_{TASKFILE|HOB}_STD_{OUT|IN}_FLAGS constants defined in hdreg.h. h](h)}(h[1] READ THE FOLLOWING NOTES *CAREFULLY*. THIS IOCTL IS FULL OF GOTCHAS. Extreme caution should be used with using this ioctl. A mistake can easily corrupt data or hang the system.h](h[1] READ THE FOLLOWING NOTES }(hj hhhNhNubhemphasis)}(h *CAREFULLY*h]h CAREFULLY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh. THIS IOCTL IS FULL OF GOTCHAS. Extreme caution should be used with using this ioctl. A mistake can easily corrupt data or hang the system.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubh)}(hp[2] Both the input and output buffers are copied from the user and written back to the user, even when not used.h]hp[2] Both the input and output buffers are copied from the user and written back to the user, even when not used.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubh)}(h[3] If one or more bits are set in out_flags and in_flags is zero, the following values are used for in_flags.all and written back into in_flags on completion.h]h[3] If one or more bits are set in out_flags and in_flags is zero, the following values are used for in_flags.all and written back into in_flags on completion.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubj5)}(h* IDE_TASKFILE_STD_IN_FLAGS | (IDE_HOB_STD_IN_FLAGS << 8) if LBA48 addressing is enabled for the drive * IDE_TASKFILE_STD_IN_FLAGS if CHS/LBA28 h]h)}(hhh](h)}(hdIDE_TASKFILE_STD_IN_FLAGS | (IDE_HOB_STD_IN_FLAGS << 8) if LBA48 addressing is enabled for the driveh]h)}(hdIDE_TASKFILE_STD_IN_FLAGS | (IDE_HOB_STD_IN_FLAGS << 8) if LBA48 addressing is enabled for the driveh]hdIDE_TASKFILE_STD_IN_FLAGS | (IDE_HOB_STD_IN_FLAGS << 8) if LBA48 addressing is enabled for the drive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h'IDE_TASKFILE_STD_IN_FLAGS if CHS/LBA28 h]h)}(h&IDE_TASKFILE_STD_IN_FLAGS if CHS/LBA28h]h&IDE_TASKFILE_STD_IN_FLAGS if CHS/LBA28}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j*uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j4hhhKhj ubh)}(hXThe association between in_flags.all and each enable bitfield flips depending on endianness; fortunately, TASKFILE only uses inflags.b.data bit and ignores all other bits. The end result is that, on any endian machines, it has no effect other than modifying in_flags on completion.h]hXThe association between in_flags.all and each enable bitfield flips depending on endianness; fortunately, TASKFILE only uses inflags.b.data bit and ignores all other bits. The end result is that, on any endian machines, it has no effect other than modifying in_flags on completion.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubh)}(h[4] The default value of SELECT is (0xa0|DEV_bit|LBA_bit) except for four drives per port chipsets. For four drives per port chipsets, it's (0xa0|DEV_bit|LBA_bit) for the first pair and (0x80|DEV_bit|LBA_bit) for the second pair.h]h[4] The default value of SELECT is (0xa0|DEV_bit|LBA_bit) except for four drives per port chipsets. For four drives per port chipsets, it’s (0xa0|DEV_bit|LBA_bit) for the first pair and (0x80|DEV_bit|LBA_bit) for the second pair.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(h[5] The argument to the ioctl is a pointer to a region of memory containing a ide_task_request_t structure, followed by an optional buffer of data to be transmitted to the drive, followed by an optional buffer to receive data from the drive.h]h[5] The argument to the ioctl is a pointer to a region of memory containing a ide_task_request_t structure, followed by an optional buffer of data to be transmitted to the drive, followed by an optional buffer to receive data from the drive.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hfCommand is passed to the disk drive via the ide_task_request_t structure, which contains these fields:h]hfCommand is passed to the disk drive via the ide_task_request_t structure, which contains these fields:}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubj5)}(hX4============ =============================================== io_ports[8] values for the taskfile registers hob_ports[8] high-order bytes, for extended commands out_flags flags indicating which entries in the io_ports[] and hob_ports[] arrays contain valid values. Type ide_reg_valid_t. in_flags flags indicating which entries in the io_ports[] and hob_ports[] arrays are expected to contain valid values on return. data_phase See below req_cmd Command type, see below out_size output (user->drive) buffer size, bytes in_size input (drive->user) buffer size, bytes ============ =============================================== h]jM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jVhjubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(h io_ports[8]h]h io_ports[8]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h!values for the taskfile registersh]h!values for the taskfile registers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h hob_ports[8]h]h hob_ports[8]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h'high-order bytes, for extended commandsh]h'high-order bytes, for extended commands}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h out_flagsh]h out_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(htflags indicating which entries in the io_ports[] and hob_ports[] arrays contain valid values. Type ide_reg_valid_t.h]htflags indicating which entries in the io_ports[] and hob_ports[] arrays contain valid values. Type ide_reg_valid_t.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hin_flagsh]hin_flags}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jvhj@ubjw)}(hhh]h)}(hwflags indicating which entries in the io_ports[] and hob_ports[] arrays are expected to contain valid values on return.h]hwflags indicating which entries in the io_ports[] and hob_ports[] arrays are expected to contain valid values on return.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1jvhj@ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h data_phaseh]h data_phase}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjzubah}(h]h ]h"]h$]h&]uh1jvhjwubjw)}(hhh]h)}(h See belowh]h See below}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjwubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hreq_cmdh]hreq_cmd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hCommand type, see belowh]hCommand type, see below}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hout_sizeh]hout_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h'output (user->drive) buffer size, bytesh]h'output (user->drive) buffer size, bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hin_sizeh]hin_size}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h&input (drive->user) buffer size, bytesh]h&input (drive->user) buffer size, bytes}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubeh}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]colsKuh1jQhj~ubah}(h]h ]h"]h$]h&]uh1jLhjzubah}(h]h ]h"]h$]h&]uh1j4hhhMhj ubh)}(h;When out_flags is zero, the following registers are loaded.h]h;When out_flags is zero, the following registers are loaded.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj5)}(hX5============ =============================================== HOB_FEATURE If the drive supports LBA48 HOB_NSECTOR If the drive supports LBA48 HOB_SECTOR If the drive supports LBA48 HOB_LCYL If the drive supports LBA48 HOB_HCYL If the drive supports LBA48 FEATURE NSECTOR SECTOR LCYL HCYL SELECT First, masked with 0xE0 if LBA48, 0xEF otherwise; then, or'ed with the default value of SELECT. ============ =============================================== h]jM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jVhjubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(h HOB_FEATUREh]h HOB_FEATURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h HOB_NSECTORh]h HOB_NSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h HOB_SECTORh]h HOB_SECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj#ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hHOB_LCYLh]hHOB_LCYL}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjCubah}(h]h ]h"]h$]h&]uh1jvhj@ubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjZubah}(h]h ]h"]h$]h&]uh1jvhj@ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hHOB_HCYLh]hHOB_HCYL}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjzubah}(h]h ]h"]h$]h&]uh1jvhjwubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjubah}(h]h ]h"]h$]h&]uh1jvhjwubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hFEATUREh]hFEATURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hNSECTORh]hNSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hSECTORh]hSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hLCYLh]hLCYL}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj,ubah}(h]h ]h"]h$]h&]uh1jvhj)ubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhj)ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hHCYLh]hHCYL}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjUubah}(h]h ]h"]h$]h&]uh1jvhjRubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjRubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hSELECTh]hSELECT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hj~ubah}(h]h ]h"]h$]h&]uh1jvhj{ubjw)}(hhh]h)}(h_First, masked with 0xE0 if LBA48, 0xEF otherwise; then, or'ed with the default value of SELECT.h]haFirst, masked with 0xE0 if LBA48, 0xEF otherwise; then, or’ed with the default value of SELECT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjubah}(h]h ]h"]h$]h&]uh1jvhj{ubeh}(h]h ]h"]h$]h&]uh1jqhjubeh}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]colsKuh1jQhj~ubah}(h]h ]h"]h$]h&]uh1jLhjzubah}(h]h ]h"]h$]h&]uh1j4hhhM hj ubh)}(hCIf any bit in out_flags is set, the following registers are loaded.h]hCIf any bit in out_flags is set, the following registers are loaded.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj ubj5)}(hX:============ =============================================== HOB_DATA If out_flags.b.data is set. HOB_DATA will travel on DD8-DD15 on little endian machines and on DD0-DD7 on big endian machines. DATA If out_flags.b.data is set. DATA will travel on DD0-DD7 on little endian machines and on DD8-DD15 on big endian machines. HOB_NSECTOR If out_flags.b.nsector_hob is set HOB_SECTOR If out_flags.b.sector_hob is set HOB_LCYL If out_flags.b.lcyl_hob is set HOB_HCYL If out_flags.b.hcyl_hob is set FEATURE If out_flags.b.feature is set NSECTOR If out_flags.b.nsector is set SECTOR If out_flags.b.sector is set LCYL If out_flags.b.lcyl is set HCYL If out_flags.b.hcyl is set SELECT Or'ed with the default value of SELECT and loaded regardless of out_flags.b.select. ============ =============================================== h]jM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jVhjubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(hHOB_DATAh]hHOB_DATA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h~If out_flags.b.data is set. HOB_DATA will travel on DD8-DD15 on little endian machines and on DD0-DD7 on big endian machines.h]h~If out_flags.b.data is set. HOB_DATA will travel on DD8-DD15 on little endian machines and on DD0-DD7 on big endian machines.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hDATAh]hDATA}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj4ubah}(h]h ]h"]h$]h&]uh1jvhj1ubjw)}(hhh]h)}(hzIf out_flags.b.data is set. DATA will travel on DD0-DD7 on little endian machines and on DD8-DD15 on big endian machines.h]hzIf out_flags.b.data is set. DATA will travel on DD0-DD7 on little endian machines and on DD8-DD15 on big endian machines.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjKubah}(h]h ]h"]h$]h&]uh1jvhj1ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h HOB_NSECTORh]h HOB_NSECTOR}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjkubah}(h]h ]h"]h$]h&]uh1jvhjhubjw)}(hhh]h)}(h!If out_flags.b.nsector_hob is seth]h!If out_flags.b.nsector_hob is set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjubah}(h]h ]h"]h$]h&]uh1jvhjhubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h HOB_SECTORh]h HOB_SECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h If out_flags.b.sector_hob is seth]h If out_flags.b.sector_hob is set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hHOB_LCYLh]hHOB_LCYL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hIf out_flags.b.lcyl_hob is seth]hIf out_flags.b.lcyl_hob is set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hHOB_HCYLh]hHOB_HCYL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(hIf out_flags.b.hcyl_hob is seth]hIf out_flags.b.hcyl_hob is set}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj'ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hFEATUREh]hFEATURE}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjGubah}(h]h ]h"]h$]h&]uh1jvhjDubjw)}(hhh]h)}(hIf out_flags.b.feature is seth]hIf out_flags.b.feature is set}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj^ubah}(h]h ]h"]h$]h&]uh1jvhjDubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hNSECTORh]hNSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj~ubah}(h]h ]h"]h$]h&]uh1jvhj{ubjw)}(hhh]h)}(hIf out_flags.b.nsector is seth]hIf out_flags.b.nsector is set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjubah}(h]h ]h"]h$]h&]uh1jvhj{ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hSECTORh]hSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hIf out_flags.b.sector is seth]hIf out_flags.b.sector is set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hLCYLh]hLCYL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hIf out_flags.b.lcyl is seth]hIf out_flags.b.lcyl is set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hHCYLh]hHCYL}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj#ubah}(h]h ]h"]h$]h&]uh1jvhj ubjw)}(hhh]h)}(hIf out_flags.b.hcyl is seth]hIf out_flags.b.hcyl is set}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj:ubah}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hSELECTh]hSELECT}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjZubah}(h]h ]h"]h$]h&]uh1jvhjWubjw)}(hhh]h)}(hSOr'ed with the default value of SELECT and loaded regardless of out_flags.b.select.h]hUOr’ed with the default value of SELECT and loaded regardless of out_flags.b.select.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjqubah}(h]h ]h"]h$]h&]uh1jvhjWubeh}(h]h ]h"]h$]h&]uh1jqhjubeh}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]colsKuh1jQhjubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1j4hhhM2hj ubh)}(hTaskfile registers are read back from the drive into {io|hob}_ports[] after the command completes iff one of the following conditions is met; otherwise, the original values will be written back, unchanged.h]hTaskfile registers are read back from the drive into {io|hob}_ports[] after the command completes iff one of the following conditions is met; otherwise, the original values will be written back, unchanged.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubj5)}(hXz1. The drive fails the command (EIO). 2. One or more than one bits are set in out_flags. 3. The requested data_phase is TASKFILE_NO_DATA. ============ =============================================== HOB_DATA If in_flags.b.data is set. It will contain DD8-DD15 on little endian machines and DD0-DD7 on big endian machines. DATA If in_flags.b.data is set. It will contain DD0-DD7 on little endian machines and DD8-DD15 on big endian machines. HOB_FEATURE If the drive supports LBA48 HOB_NSECTOR If the drive supports LBA48 HOB_SECTOR If the drive supports LBA48 HOB_LCYL If the drive supports LBA48 HOB_HCYL If the drive supports LBA48 NSECTOR SECTOR LCYL HCYL ============ =============================================== h](henumerated_list)}(hhh](h)}(h"The drive fails the command (EIO).h]h)}(hjh]h"The drive fails the command (EIO).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h/One or more than one bits are set in out_flags.h]h)}(hjh]h/One or more than one bits are set in out_flags.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h.The requested data_phase is TASKFILE_NO_DATA. h]h)}(h-The requested data_phase is TASKFILE_NO_DATA.h]h-The requested data_phase is TASKFILE_NO_DATA.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjubjM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jVhjubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(hHOB_DATAh]hHOB_DATA}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj/ubah}(h]h ]h"]h$]h&]uh1jvhj,ubjw)}(hhh]h)}(hrIf in_flags.b.data is set. It will contain DD8-DD15 on little endian machines and DD0-DD7 on big endian machines.h]hrIf in_flags.b.data is set. It will contain DD8-DD15 on little endian machines and DD0-DD7 on big endian machines.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjFubah}(h]h ]h"]h$]h&]uh1jvhj,ubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(hDATAh]hDATA}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjfubah}(h]h ]h"]h$]h&]uh1jvhjcubjw)}(hhh]h)}(hrIf in_flags.b.data is set. It will contain DD0-DD7 on little endian machines and DD8-DD15 on big endian machines.h]hrIf in_flags.b.data is set. It will contain DD0-DD7 on little endian machines and DD8-DD15 on big endian machines.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj}ubah}(h]h ]h"]h$]h&]uh1jvhjcubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(h HOB_FEATUREh]h HOB_FEATURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(h HOB_NSECTORh]h HOB_NSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(h HOB_SECTORh]h HOB_SECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj ubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj"ubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(hHOB_LCYLh]hHOB_LCYL}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjBubah}(h]h ]h"]h$]h&]uh1jvhj?ubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjYubah}(h]h ]h"]h$]h&]uh1jvhj?ubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(hHOB_HCYLh]hHOB_HCYL}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjyubah}(h]h ]h"]h$]h&]uh1jvhjvubjw)}(hhh]h)}(hIf the drive supports LBA48h]hIf the drive supports LBA48}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjubah}(h]h ]h"]h$]h&]uh1jvhjvubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(hNSECTORh]hNSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(hSECTORh]hSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(hLCYLh]hLCYL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhj)ubjr)}(hhh](jw)}(hhh]h)}(hHCYLh]hHCYL}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hj+ubah}(h]h ]h"]h$]h&]uh1jvhj(ubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhj(ubeh}(h]h ]h"]h$]h&]uh1jqhj)ubeh}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]colsKuh1jQhjubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j4hhhMKhj ubh)}(hSThe data_phase field describes the data transfer to be performed. Value is one of:h]hSThe data_phase field describes the data transfer to be performed. Value is one of:}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahj ubj5)}(hXr=================== ======================================== TASKFILE_IN TASKFILE_MULTI_IN TASKFILE_OUT TASKFILE_MULTI_OUT TASKFILE_IN_OUT TASKFILE_IN_DMA TASKFILE_IN_DMAQ == IN_DMA (queueing not supported) TASKFILE_OUT_DMA TASKFILE_OUT_DMAQ == OUT_DMA (queueing not supported) TASKFILE_P_IN unimplemented TASKFILE_P_IN_DMA unimplemented TASKFILE_P_IN_DMAQ unimplemented TASKFILE_P_OUT unimplemented TASKFILE_P_OUT_DMA unimplemented TASKFILE_P_OUT_DMAQ unimplemented =================== ======================================== h]jM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK(uh1jVhjubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(h TASKFILE_INh]h TASKFILE_IN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_MULTI_INh]hTASKFILE_MULTI_IN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h TASKFILE_OUTh]h TASKFILE_OUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_MULTI_OUTh]hTASKFILE_MULTI_OUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_IN_OUTh]hTASKFILE_IN_OUT}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihj@ubah}(h]h ]h"]h$]h&]uh1jvhj=ubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhj=ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_IN_DMAh]hTASKFILE_IN_DMA}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjiubah}(h]h ]h"]h$]h&]uh1jvhjfubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjfubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_IN_DMAQh]hTASKFILE_IN_DMAQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h"== IN_DMA (queueing not supported)h]h"== IN_DMA (queueing not supported)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_OUT_DMAh]hTASKFILE_OUT_DMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_OUT_DMAQh]hTASKFILE_OUT_DMAQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h#== OUT_DMA (queueing not supported)h]h#== OUT_DMA (queueing not supported)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhj ubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(h TASKFILE_P_INh]h TASKFILE_P_IN}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj)ubah}(h]h ]h"]h$]h&]uh1jvhj&ubjw)}(hhh]h)}(h unimplementedh]h unimplemented}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj@ubah}(h]h ]h"]h$]h&]uh1jvhj&ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_P_IN_DMAh]hTASKFILE_P_IN_DMA}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohj`ubah}(h]h ]h"]h$]h&]uh1jvhj]ubjw)}(hhh]h)}(h unimplementedh]h unimplemented}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjwubah}(h]h ]h"]h$]h&]uh1jvhj]ubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_P_IN_DMAQh]hTASKFILE_P_IN_DMAQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h unimplementedh]h unimplemented}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_P_OUTh]hTASKFILE_P_OUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h unimplementedh]h unimplemented}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_P_OUT_DMAh]hTASKFILE_P_OUT_DMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h unimplementedh]h unimplemented}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hTASKFILE_P_OUT_DMAQh]hTASKFILE_P_OUT_DMAQ}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj<ubah}(h]h ]h"]h$]h&]uh1jvhj9ubjw)}(hhh]h)}(h unimplementedh]h unimplemented}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjSubah}(h]h ]h"]h$]h&]uh1jvhj9ubeh}(h]h ]h"]h$]h&]uh1jqhjubeh}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]colsKuh1jQhj|ubah}(h]h ]h"]h$]h&]uh1jLhjxubah}(h]h ]h"]h$]h&]uh1j4hhhMdhj ubh)}(hAThe req_cmd field classifies the command type. It may be one of:h]hAThe req_cmd field classifies the command type. It may be one of:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj ubj5)}(hX======================== ======================================= IDE_DRIVE_TASK_NO_DATA IDE_DRIVE_TASK_SET_XFER unimplemented IDE_DRIVE_TASK_IN IDE_DRIVE_TASK_OUT unimplemented IDE_DRIVE_TASK_RAW_WRITE ======================== ======================================= h]jM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jVhjubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(hIDE_DRIVE_TASK_NO_DATAh]hIDE_DRIVE_TASK_NO_DATA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hIDE_DRIVE_TASK_SET_XFERh]hIDE_DRIVE_TASK_SET_XFER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(h unimplementedh]h unimplemented}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hIDE_DRIVE_TASK_INh]hIDE_DRIVE_TASK_IN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hIDE_DRIVE_TASK_OUTh]hIDE_DRIVE_TASK_OUT}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjDubah}(h]h ]h"]h$]h&]uh1jvhjAubjw)}(hhh]h)}(h unimplementedh]h unimplemented}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hj[ubah}(h]h ]h"]h$]h&]uh1jvhjAubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hIDE_DRIVE_TASK_RAW_WRITEh]hIDE_DRIVE_TASK_RAW_WRITE}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hj{ubah}(h]h ]h"]h$]h&]uh1jvhjxubjw)}(hhh]h}(h]h ]h"]h$]h&]uh1jvhjxubeh}(h]h ]h"]h$]h&]uh1jqhjubeh}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]colsKuh1jQhjubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1j4hhhMyhj ubh)}(hX[6] Do not access {in|out}_flags->all except for resetting all the bits. Always access individual bit fields. ->all value will flip depending on endianness. For the same reason, do not use IDE_{TASKFILE|HOB}_STD_{OUT|IN}_FLAGS constants defined in hdreg.h.h]hX[6] Do not access {in|out}_flags->all except for resetting all the bits. Always access individual bit fields. ->all value will flip depending on endianness. For the same reason, do not use IDE_{TASKFILE|HOB}_STD_{OUT|IN}_FLAGS constants defined in hdreg.h.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j4hhhKhjzubeh}(h]h ]h"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hXHDIO_DRIVE_CMD execute a special drive command Note: If you don't have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl. usage:: u8 args[4+XFER_SIZE]; ... ioctl(fd, HDIO_DRIVE_CMD, args); inputs: Commands other than WIN_SMART: ======= ======= args[0] COMMAND args[1] NSECTOR args[2] FEATURE args[3] NSECTOR ======= ======= WIN_SMART: ======= ======= args[0] COMMAND args[1] SECTOR args[2] FEATURE args[3] NSECTOR ======= ======= outputs: args[] buffer is filled with register values followed by any data returned by the disk. ======== ==================================================== args[0] status args[1] error args[2] NSECTOR args[3] undefined args[4+] NSECTOR * 512 bytes of data returned by the command. ======== ==================================================== error returns: - EACCES Access denied: requires CAP_SYS_RAWIO - ENOMEM Unable to allocate memory for task - EIO Drive reports error notes: [1] For commands other than WIN_SMART, args[1] should equal args[3]. SECTOR, LCYL and HCYL are undefined. For WIN_SMART, 0x4f and 0xc2 are loaded into LCYL and HCYL respectively. In both cases SELECT will contain the default value for the drive. Please refer to HDIO_DRIVE_TASKFILE notes for the default value of SELECT. [2] If NSECTOR value is greater than zero and the drive sets DRQ when interrupting for the command, NSECTOR * 512 bytes are read from the device into the area following NSECTOR. In the above example, the area would be args[4..4+XFER_SIZE]. 16bit PIO is used regardless of HDIO_SET_32BIT setting. [3] If COMMAND == WIN_SETFEATURES && FEATURE == SETFEATURES_XFER && NSECTOR >= XFER_SW_DMA_0 && the drive supports any DMA mode, IDE driver will try to tune the transfer mode of the drive accordingly. h](j)}(hHDIO_DRIVE_CMDh]hHDIO_DRIVE_CMD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh](h)}(hexecute a special drive commandh]hexecute a special drive command}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hkNote: If you don't have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl.h]hmNote: If you don’t have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(husage::h]husage:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(h;u8 args[4+XFER_SIZE]; ... ioctl(fd, HDIO_DRIVE_CMD, args);h]h;u8 args[4+XFER_SIZE]; ... ioctl(fd, HDIO_DRIVE_CMD, args);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjubj)}(hhh](j)}(hX$inputs: Commands other than WIN_SMART: ======= ======= args[0] COMMAND args[1] NSECTOR args[2] FEATURE args[3] NSECTOR ======= ======= WIN_SMART: ======= ======= args[0] COMMAND args[1] SECTOR args[2] FEATURE args[3] NSECTOR ======= ======= h](j)}(hinputs:h]hinputs:}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj*ubj)}(hhh](h)}(hCommands other than WIN_SMART:h]hCommands other than WIN_SMART:}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubjM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjPubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjPubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(hargs[0]h]hargs[0]}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjmubah}(h]h ]h"]h$]h&]uh1jvhjjubjw)}(hhh]h)}(hCOMMANDh]hCOMMAND}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjjubeh}(h]h ]h"]h$]h&]uh1jqhjgubjr)}(hhh](jw)}(hhh]h)}(hargs[1]h]hargs[1]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hNSECTORh]hNSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjgubjr)}(hhh](jw)}(hhh]h)}(hargs[2]h]hargs[2]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hFEATUREh]hFEATURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjgubjr)}(hhh](jw)}(hhh]h)}(hargs[3]h]hargs[3]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hNSECTORh]hNSECTOR}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjgubeh}(h]h ]h"]h$]h&]uh1jlhjPubeh}(h]h ]h"]h$]h&]colsKuh1jQhjMubah}(h]h ]h"]h$]h&]uh1jLhj<ubh)}(h WIN_SMART:h]h WIN_SMART:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubjM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjjubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(hargs[0]h]hargs[0]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hCOMMANDh]hCOMMAND}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hargs[1]h]hargs[1]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hSECTORh]hSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hargs[2]h]hargs[2]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jvhjubjw)}(hhh]h)}(hFEATUREh]hFEATURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jqhjubjr)}(hhh](jw)}(hhh]h)}(hargs[3]h]hargs[3]}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jvhj)ubjw)}(hhh]h)}(hNSECTORh]hNSECTOR}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jvhj)ubeh}(h]h ]h"]h$]h&]uh1jqhjubeh}(h]h ]h"]h$]h&]uh1jlhjjubeh}(h]h ]h"]h$]h&]colsKuh1jQhjgubah}(h]h ]h"]h$]h&]uh1jLhj<ubeh}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj'ubj)}(hXoutputs: args[] buffer is filled with register values followed by any data returned by the disk. ======== ==================================================== args[0] status args[1] error args[2] NSECTOR args[3] undefined args[4+] NSECTOR * 512 bytes of data returned by the command. ======== ==================================================== h](j)}(houtputs:h]houtputs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh](j5)}(h>args[] buffer is filled with register values followed by any h]h)}(h= XFER_SW_DMA_0 && the drive supports any DMA mode, IDE driver will try to tune the transfer mode of the drive accordingly. h](h)}(hXD[1] For commands other than WIN_SMART, args[1] should equal args[3]. SECTOR, LCYL and HCYL are undefined. For WIN_SMART, 0x4f and 0xc2 are loaded into LCYL and HCYL respectively. In both cases SELECT will contain the default value for the drive. Please refer to HDIO_DRIVE_TASKFILE notes for the default value of SELECT.h]hXD[1] For commands other than WIN_SMART, args[1] should equal args[3]. SECTOR, LCYL and HCYL are undefined. For WIN_SMART, 0x4f and 0xc2 are loaded into LCYL and HCYL respectively. In both cases SELECT will contain the default value for the drive. Please refer to HDIO_DRIVE_TASKFILE notes for the default value of SELECT.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(hX([2] If NSECTOR value is greater than zero and the drive sets DRQ when interrupting for the command, NSECTOR * 512 bytes are read from the device into the area following NSECTOR. In the above example, the area would be args[4..4+XFER_SIZE]. 16bit PIO is used regardless of HDIO_SET_32BIT setting.h]hX([2] If NSECTOR value is greater than zero and the drive sets DRQ when interrupting for the command, NSECTOR * 512 bytes are read from the device into the area following NSECTOR. In the above example, the area would be args[4..4+XFER_SIZE]. 16bit PIO is used regardless of HDIO_SET_32BIT setting.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(h[3] If COMMAND == WIN_SETFEATURES && FEATURE == SETFEATURES_XFER && NSECTOR >= XFER_SW_DMA_0 && the drive supports any DMA mode, IDE driver will try to tune the transfer mode of the drive accordingly.h]h[3] If COMMAND == WIN_SETFEATURES && FEATURE == SETFEATURES_XFER && NSECTOR >= XFER_SW_DMA_0 && the drive supports any DMA mode, IDE driver will try to tune the transfer mode of the drive accordingly.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubeh}(h]h ]h"]h$]h&]uh1j4hhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hX>HDIO_DRIVE_TASK execute task and special drive command Note: If you don't have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl. usage:: u8 args[7]; ... ioctl(fd, HDIO_DRIVE_TASK, args); inputs: Taskfile register values: ======= ======= args[0] COMMAND args[1] FEATURE args[2] NSECTOR args[3] SECTOR args[4] LCYL args[5] HCYL args[6] SELECT ======= ======= outputs: Taskfile register values: ======= ======= args[0] status args[1] error args[2] NSECTOR args[3] SECTOR args[4] LCYL args[5] HCYL args[6] SELECT ======= ======= error returns: - EACCES Access denied: requires CAP_SYS_RAWIO - ENOMEM Unable to allocate memory for task - ENOMSG Device is not a disk drive. - EIO Drive failed the command. notes: [1] DEV bit (0x10) of SELECT register is ignored and the appropriate value for the drive is used. All other bits are used unaltered. h](j)}(hHDIO_DRIVE_TASKh]hHDIO_DRIVE_TASK}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj!ubj)}(hhh](h)}(h&execute task and special drive commandh]h&execute task and special drive command}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(hkNote: If you don't have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl.h]hmNote: If you don’t have a copy of the ANSI ATA specification handy, you should probably ignore this ioctl.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(husage::h]husage:}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubj)}(h2u8 args[7]; ... ioctl(fd, HDIO_DRIVE_TASK, args);h]h2u8 args[7]; ... ioctl(fd, HDIO_DRIVE_TASK, args);}hj"sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj!ubj)}(hhh](j)}(hinputs: Taskfile register values: ======= ======= args[0] COMMAND args[1] FEATURE args[2] NSECTOR args[3] SECTOR args[4] LCYL args[5] HCYL args[6] SELECT ======= ======= h](j)}(hinputs:h]hinputs:}(hj+"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj'"ubj)}(hhh](h)}(hTaskfile register values:h]hTaskfile register values:}(hj<"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9"ubjM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjM"ubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjM"ubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(hargs[0]h]hargs[0]}(hjm"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj"ubah}(h]h ]h"]h$]h&]uh1jvhjg"ubjw)}(hhh]h)}(hCOMMANDh]hCOMMAND}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jvhjg"ubeh}(h]h ]h"]h$]h&]uh1jqhjd"ubjr)}(hhh](jw)}(hhh]h)}(hargs[1]h]hargs[1]}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jvhj"ubjw)}(hhh]h)}(hFEATUREh]hFEATURE}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jvhj"ubeh}(h]h ]h"]h$]h&]uh1jqhjd"ubjr)}(hhh](jw)}(hhh]h)}(hargs[2]h]hargs[2]}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jvhj"ubjw)}(hhh]h)}(hNSECTORh]hNSECTOR}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jvhj"ubeh}(h]h ]h"]h$]h&]uh1jqhjd"ubjr)}(hhh](jw)}(hhh]h)}(hargs[3]h]hargs[3]}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jvhj #ubjw)}(hhh]h)}(hSECTORh]hSECTOR}(hj)#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&#ubah}(h]h ]h"]h$]h&]uh1jvhj #ubeh}(h]h ]h"]h$]h&]uh1jqhjd"ubjr)}(hhh](jw)}(hhh]h)}(hargs[4]h]hargs[4]}(hjI#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjF#ubah}(h]h ]h"]h$]h&]uh1jvhjC#ubjw)}(hhh]h)}(hLCYLh]hLCYL}(hj`#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]#ubah}(h]h ]h"]h$]h&]uh1jvhjC#ubeh}(h]h ]h"]h$]h&]uh1jqhjd"ubjr)}(hhh](jw)}(hhh]h)}(hargs[5]h]hargs[5]}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}#ubah}(h]h ]h"]h$]h&]uh1jvhjz#ubjw)}(hhh]h)}(hHCYLh]hHCYL}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jvhjz#ubeh}(h]h ]h"]h$]h&]uh1jqhjd"ubjr)}(hhh](jw)}(hhh]h)}(hargs[6]h]hargs[6]}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jvhj#ubjw)}(hhh]h)}(hSELECTh]hSELECT}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jvhj#ubeh}(h]h ]h"]h$]h&]uh1jqhjd"ubeh}(h]h ]h"]h$]h&]uh1jlhjM"ubeh}(h]h ]h"]h$]h&]colsKuh1jQhjJ"ubah}(h]h ]h"]h$]h&]uh1jLhj9"ubeh}(h]h ]h"]h$]h&]uh1jhj'"ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj$"ubj)}(houtputs: Taskfile register values: ======= ======= args[0] status args[1] error args[2] NSECTOR args[3] SECTOR args[4] LCYL args[5] HCYL args[6] SELECT ======= ======= h](j)}(houtputs:h]houtputs:}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj$ubj)}(hhh](h)}(hTaskfile register values:h]hTaskfile register values:}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubjM)}(hhh]jR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhj-$ubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhj-$ubjm)}(hhh](jr)}(hhh](jw)}(hhh]h)}(hargs[0]h]hargs[0]}(hjM$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJ$ubah}(h]h ]h"]h$]h&]uh1jvhjG$ubjw)}(hhh]h)}(hstatush]hstatus}(hjd$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhja$ubah}(h]h ]h"]h$]h&]uh1jvhjG$ubeh}(h]h ]h"]h$]h&]uh1jqhjD$ubjr)}(hhh](jw)}(hhh]h)}(hargs[1]h]hargs[1]}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jvhj~$ubjw)}(hhh]h)}(herrorh]herror}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jvhj~$ubeh}(h]h ]h"]h$]h&]uh1jqhjD$ubjr)}(hhh](jw)}(hhh]h)}(hargs[2]h]hargs[2]}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jvhj$ubjw)}(hhh]h)}(hNSECTORh]hNSECTOR}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jvhj$ubeh}(h]h ]h"]h$]h&]uh1jqhjD$ubjr)}(hhh](jw)}(hhh]h)}(hargs[3]h]hargs[3]}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jvhj$ubjw)}(hhh]h)}(hSECTORh]hSECTOR}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jvhj$ubeh}(h]h ]h"]h$]h&]uh1jqhjD$ubjr)}(hhh](jw)}(hhh]h)}(hargs[4]h]hargs[4]}(hj)%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&%ubah}(h]h ]h"]h$]h&]uh1jvhj#%ubjw)}(hhh]h)}(hLCYLh]hLCYL}(hj@%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=%ubah}(h]h ]h"]h$]h&]uh1jvhj#%ubeh}(h]h ]h"]h$]h&]uh1jqhjD$ubjr)}(hhh](jw)}(hhh]h)}(hargs[5]h]hargs[5]}(hj`%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]%ubah}(h]h ]h"]h$]h&]uh1jvhjZ%ubjw)}(hhh]h)}(hHCYLh]hHCYL}(hjw%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjt%ubah}(h]h ]h"]h$]h&]uh1jvhjZ%ubeh}(h]h ]h"]h$]h&]uh1jqhjD$ubjr)}(hhh](jw)}(hhh]h)}(hargs[6]h]hargs[6]}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jvhj%ubjw)}(hhh]h)}(hSELECTh]hSELECT}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jvhj%ubeh}(h]h ]h"]h$]h&]uh1jqhjD$ubeh}(h]h ]h"]h$]h&]uh1jlhj-$ubeh}(h]h ]h"]h$]h&]colsKuh1jQhj*$ubah}(h]h ]h"]h$]h&]uh1jLhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj$"ubj)}(herror returns: - EACCES Access denied: requires CAP_SYS_RAWIO - ENOMEM Unable to allocate memory for task - ENOMSG Device is not a disk drive. - EIO Drive failed the command. h](j)}(herror returns:h]herror returns:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj%ubj)}(hhh]h)}(hhh](h)}(h2EACCES Access denied: requires CAP_SYS_RAWIOh]h)}(hj&h]h2EACCES Access denied: requires CAP_SYS_RAWIO}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1hhj%ubh)}(h.ENOMEM Unable to allocate memory for taskh]h)}(hj&h]h.ENOMEM Unable to allocate memory for task}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1hhj%ubh)}(h'ENOMSG Device is not a disk drive.h]h)}(hj/&h]h'ENOMSG Device is not a disk drive.}(hj1&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-&ubah}(h]h ]h"]h$]h&]uh1hhj%ubh)}(h&EIO Drive failed the command. h]h)}(h%EIO Drive failed the command.h]h%EIO Drive failed the command.}(hjH&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjD&ubah}(h]h ]h"]h$]h&]uh1hhj%ubeh}(h]h ]h"]h$]h&]jj uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj$"ubeh}(h]h ]h"]h$]h&]uh1jhj!ubh)}(hnotes:h]hnotes:}(hjt&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubj5)}(h[1] DEV bit (0x10) of SELECT register is ignored and the appropriate value for the drive is used. All other bits are used unaltered. h]h)}(h[1] DEV bit (0x10) of SELECT register is ignored and the appropriate value for the drive is used. All other bits are used unaltered.h]h[1] DEV bit (0x10) of SELECT register is ignored and the appropriate value for the drive is used. All other bits are used unaltered.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1j4hhhMhj!ubeh}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hX{HDIO_SET_32BIT change io_32bit flags usage:: int val; ioctl(fd, HDIO_SET_32BIT, val); inputs: New value for io_32bit flag outputs: none error return: - EINVAL Called on a partition instead of the whole disk device - EACCES Access denied: requires CAP_SYS_ADMIN - EINVAL value out of range [0 3] - EBUSY Controller busyh](j)}(hHDIO_SET_32BITh]hHDIO_SET_32BIT}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM"hj&ubj)}(hhh](h)}(hchange io_32bit flagsh]hchange io_32bit flags}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj&ubh)}(husage::h]husage:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubj)}(h)int val; ioctl(fd, HDIO_SET_32BIT, val);h]h)int val; ioctl(fd, HDIO_SET_32BIT, val);}hj&sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj&ubj)}(hhh](j)}(h&inputs: New value for io_32bit flag h](j)}(hinputs:h]hinputs:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj&ubj)}(hhh]h)}(hNew value for io_32bit flagh]hNew value for io_32bit flag}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj&ubj)}(houtputs: none h](j)}(houtputs:h]houtputs:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj'ubj)}(hhh]h)}(hnoneh]hnone}(hj,'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj&ubj)}(herror return: - EINVAL Called on a partition instead of the whole disk device - EACCES Access denied: requires CAP_SYS_ADMIN - EINVAL value out of range [0 3] - EBUSY Controller busyh](j)}(h error return:h]h error return:}(hjJ'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM"hjF'ubj)}(hhh]h)}(hhh](h)}(hBEINVAL Called on a partition instead of the whole disk deviceh]h)}(hj`'h]hBEINVAL Called on a partition instead of the whole disk device}(hjb'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj^'ubah}(h]h ]h"]h$]h&]uh1hhj['ubh)}(h2EACCES Access denied: requires CAP_SYS_ADMINh]h)}(hjw'h]h2EACCES Access denied: requires CAP_SYS_ADMIN}(hjy'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hju'ubah}(h]h ]h"]h$]h&]uh1hhj['ubh)}(h$EINVAL value out of range [0 3]h]h)}(hj'h]h$EINVAL value out of range [0 3]}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhh M"hj'ubah}(h]h ]h"]h$]h&]uh1hhj['ubh)}(hEBUSY Controller busyh]h)}(hj'h]hEBUSY Controller busy}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj'ubah}(h]h ]h"]h$]h&]uh1hhj['ubeh}(h]h ]h"]h$]h&]jj uh1hhhhM hjX'ubah}(h]h ]h"]h$]h&]uh1jhjF'ubeh}(h]h ]h"]h$]h&]uh1jhhhM"hj&ubeh}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhM"hjhhubeh}(h]h ]h"]h$]h&]uh1jhhhhhNhNubeh}(h]summary-of-hdio-ioctl-callsah ]h"]summary of hdio_ ioctl callsah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjvfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj(error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j'j's nametypes}j'sh}j'hs footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.