linux_hdio.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* $OpenBSD: linux_hdio.h,v 1.2 2011/04/05 22:54:30 pirofti Exp $ */
  2. /* $NetBSD: linux_hdio.h,v 1.1 2000/12/10 14:12:17 fvdl Exp $ */
  3. /*
  4. * Copyright (c) 2000 Wasabi Systems, Inc.
  5. * All rights reserved.
  6. *
  7. * Written by Frank van der Linden for Wasabi Systems, Inc.
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions
  11. * are met:
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. * 3. All advertising materials mentioning features or use of this software
  18. * must display the following acknowledgement:
  19. * This product includes software developed for the NetBSD Project by
  20. * Wasabi Systems, Inc.
  21. * 4. The name of Wasabi Systems, Inc. may not be used to endorse
  22. * or promote products derived from this software without specific prior
  23. * written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
  26. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  27. * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  28. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
  29. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  30. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  31. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  32. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  33. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  34. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  35. * POSSIBILITY OF SUCH DAMAGE.
  36. */
  37. #ifndef _LINUX_HDIO_H_
  38. #define _LINUX_HDIO_H_
  39. /*
  40. * Linux 'hd' (mostly really IDE disk) ioctl calls.
  41. */
  42. #define LINUX_HDIO_GETGEO 0x0301
  43. #define LINUX_HDIO_GETGEO_BIG 0x0330
  44. #define LINUX_HDIO_GETGEO_BIG_RAW 0x0331
  45. #define LINUX_HDIO_GET_UNMASKINTR 0x0302
  46. #define LINUX_HDIO_GET_MULTCOUNT 0x0304
  47. #define LINUX_HDIO_OBSOLETE_IDENTITY 0x0307
  48. #define LINUX_HDIO_GET_KEEPSETTINGS 0x0308
  49. #define LINUX_HDIO_GET_32BIT 0x0309
  50. #define LINUX_HDIO_GET_NOWERR 0x030a
  51. #define LINUX_HDIO_GET_DMA 0x030b
  52. #define LINUX_HDIO_GET_NICE 0x030c
  53. #define LINUX_HDIO_GET_IDENTITY 0x030d
  54. #define LINUX_HDIO_DRIVE_RESET 0x031c
  55. #define LINUX_HDIO_TRISTATE_HWIF 0x031d
  56. #define LINUX_HDIO_DRIVE_TASK 0x031e
  57. #define LINUX_HDIO_DRIVE_CMD 0x031f
  58. #define LINUX_HDIO_SET_MULTCOUNT 0x0321
  59. #define LINUX_HDIO_SET_UNMASKINTR 0x0322
  60. #define LINUX_HDIO_SET_KEEPSETTINGS 0x0323
  61. #define LINUX_HDIO_SET_32BIT 0x0324
  62. #define LINUX_HDIO_SET_NOWERR 0x0325
  63. #define LINUX_HDIO_SET_DMA 0x0326
  64. #define LINUX_HDIO_SET_PIO_MODE 0x0327
  65. #define LINUX_HDIO_SCAN_HWIF 0x0328
  66. #define LINUX_HDIO_SET_NICE 0x0329
  67. #define LINUX_HDIO_UNREGISTER_HWIF 0x032a
  68. struct linux_hd_geometry {
  69. u_char heads;
  70. u_char sectors;
  71. u_short cylinders;
  72. u_long start;
  73. };
  74. struct linux_hd_big_geometry {
  75. u_char heads;
  76. u_char sectors;
  77. u_int cylinders;
  78. u_long start;
  79. };
  80. #endif /* _LINUX_HDIO_H_ */