Make PUIS detection more strict. Previous implementation caused false

positives on VMWare's virtual CD-ROMs.
This commit is contained in:
Alexander Motin 2010-02-26 10:42:46 +00:00
parent 0aacc53526
commit 1254b6802f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204354
2 changed files with 5 additions and 6 deletions

View File

@ -788,11 +788,10 @@ device_fail: if ((!softc->restart) &&
ata_btrim(ident_buf->serial, sizeof(ident_buf->serial));
ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial));
/* Device may need spin-up before IDENTIFY become valid. */
if ((ident_buf->config & ATA_RESP_INCOMPLETE) ||
((ident_buf->support.command2 & ATA_SUPPORT_STANDBY) &&
(ident_buf->enabled.command2 & ATA_SUPPORT_STANDBY) &&
(ident_buf->support.command2 & ATA_SUPPORT_SPINUP) &&
softc->spinup == 0)) {
if ((ident_buf->specconf == 0x37c8 ||
ident_buf->specconf == 0x738c) &&
((ident_buf->config & ATA_RESP_INCOMPLETE) ||
softc->spinup == 0)) {
PROBE_SET_ACTION(softc, PROBE_SPINUP);
xpt_release_ccb(done_ccb);
xpt_schedule(periph, priority);

View File

@ -51,7 +51,7 @@ struct ata_params {
#define ATA_RESP_INCOMPLETE 0x0004
/*001*/ u_int16_t cylinders; /* # of cylinders */
u_int16_t reserved2;
/*002*/ u_int16_t specconf; /* specific configuration */
/*003*/ u_int16_t heads; /* # heads */
u_int16_t obsolete4;
u_int16_t obsolete5;