Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
4.1 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1991 - 1999
  3. Module Name:
  4. Abstract:
  5. Environment:
  6. Notes:
  7. Revision History:
  8. --*/
  9. #include "ntddk.h"
  10. #include "classpnp.h"
  11. #include "trace.h"
  12. #include "data.tmh"
  13. #ifdef ALLOC_DATA_PRAGMA
  14. #pragma data_seg("PAGE")
  15. #endif
  16. /*
  17. #define CDROM_HACK_DEC_RRD (0x00000001)
  18. #define CDROM_HACK_FUJITSU_FMCD_10x (0x00000002)
  19. #define CDROM_HACK_HITACHI_1750 (0x00000004)
  20. #define CDROM_HACK_HITACHI_GD_2000 (0x00000008)
  21. #define CDROM_HACK_TOSHIBA_SD_W1101 (0x00000010)
  22. #define CDROM_HACK_TOSHIBA_XM_3xx (0x00000020)
  23. #define CDROM_HACK_NEC_CDDA (0x00000040)
  24. #define CDROM_HACK_PLEXTOR_CDDA (0x00000080)
  25. #define CDROM_HACK_BAD_GET_CONFIG_SUPPORT (0x00000100)
  26. #define CDROM_HACK_FORCE_READ_CD_DETECTION (0x00000200)
  27. #define CDROM_HACK_READ_CD_SUPPORTED (0x00000400)
  28. */
  29. CLASSPNP_SCAN_FOR_SPECIAL_INFO CdromHackItems[] = {
  30. // digital put out drives using 512 byte block sizes,
  31. // and needed us to send a mode page to set the sector
  32. // size back to 2048.
  33. { "DEC" , "RRD" , NULL, 0x0001 },
  34. // these fujitsu drives take longer than ten seconds to
  35. // timeout commands when audio discs are placed in them
  36. { "FUJITSU" , "FMCD-101" , NULL, 0x0002 },
  37. { "FUJITSU" , "FMCD-102" , NULL, 0x0002 },
  38. // these hitachi drives don't work properly in PIO mode
  39. { "HITACHI ", "CDR-1750S" , NULL, 0x0004 },
  40. { "HITACHI ", "CDR-3650/1650S" , NULL, 0x0004 },
  41. // this particular gem doesn't automatcially spin up
  42. // on some media access commands.
  43. { "" , "HITACHI GD-2000" , NULL, 0x0008 },
  44. { "" , "HITACHI DVD-ROM GD-2000" , NULL, 0x0008 },
  45. // this particular drive doesn't support DVD playback.
  46. // just print an error message in CHK builds.
  47. { "TOSHIBA ", "SD-W1101 DVD-RAM" , NULL, 0x0010 },
  48. // not sure what this device's issue was. seems to
  49. // require mode selects at various times.
  50. { "TOSHIBA ", "CD-ROM XM-3" , NULL, 0x0020 },
  51. // NEC defined a "READ_CD" type command before there was
  52. // a standard, so fall back on this as an option.
  53. { "NEC" , NULL , NULL, 0x0040 },
  54. // plextor defined a "READ_CD" type command before there was
  55. // a standard, so fall back on this as an option.
  56. { "PLEXTOR ", NULL , NULL, 0x0080 },
  57. // this drive times out and sometimes disappears from the bus
  58. // when send GET_CONFIGURATION commands. don't send them.
  59. { "" , "LG DVD-ROM DRD-840B" , NULL, 0x0100 },
  60. { "" , "SAMSUNG DVD-ROM SD-608" , NULL, 0x0300 },
  61. // these drives should have supported READ_CD, but at least
  62. // some firmware revisions did not. force READ_CD detection.
  63. { "" , "SAMSUNG DVD-ROM SD-" , NULL, 0x2000 },
  64. // the mitsumi drive below doesn't follow the block-only spec,
  65. // and we end up hanging when sending it commands it doesn't
  66. // understand. this causes complications later, also.
  67. { "MITSUMI ", "CR-4802TE " , NULL, 0x0100 },
  68. // some drives return various funky errors (such as 3/2/0 NO_SEEK_COMPLETE)
  69. // during the detection of READ_CD support, resulting in iffy detection.
  70. // since they probably don't support mode switching, which is really old
  71. // legacy stuff anyways, the ability to read digitally is lost when
  72. // these drives return unexpected error codes. note: MMC compliant drives
  73. // are presumed to support READ_CD, as are DVD drives, and anything
  74. // connected to a bus type other than IDE or SCSI, and therefore don't
  75. // need to be here.
  76. { "YAMAHA ", "CRW8424S " , NULL, 0x0400 },
  77. // and finally, a place to finish the list. :)
  78. { NULL , NULL , NULL, 0x0000 }
  79. };
  80. #ifdef ALLOC_DATA_PRAGMA
  81. #pragma data_seg()
  82. #endif