From owner-svn-src-head@FreeBSD.ORG Fri Feb 26 10:42:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFEE0106566B; Fri, 26 Feb 2010 10:42:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEDDA8FC1C; Fri, 26 Feb 2010 10:42:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1QAgk9S015260; Fri, 26 Feb 2010 10:42:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1QAgkEx015257; Fri, 26 Feb 2010 10:42:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002261042.o1QAgkEx015257@svn.freebsd.org> From: Alexander Motin Date: Fri, 26 Feb 2010 10:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204354 - in head/sys: cam/ata sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2010 10:42:46 -0000 Author: mav Date: Fri Feb 26 10:42:46 2010 New Revision: 204354 URL: http://svn.freebsd.org/changeset/base/204354 Log: Make PUIS detection more strict. Previous implementation caused false positives on VMWare's virtual CD-ROMs. Modified: head/sys/cam/ata/ata_xpt.c head/sys/sys/ata.h Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Fri Feb 26 10:33:48 2010 (r204353) +++ head/sys/cam/ata/ata_xpt.c Fri Feb 26 10:42:46 2010 (r204354) @@ -788,11 +788,10 @@ noerror: 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); Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Fri Feb 26 10:33:48 2010 (r204353) +++ head/sys/sys/ata.h Fri Feb 26 10:42:46 2010 (r204354) @@ -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;