Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2010 12:40:31 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        Claude Buisson <clbuisson@orange.fr>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: ATA CDROM no more detected with ATA_CAM under VMWare WS
Message-ID:  <4B87A51F.1010603@FreeBSD.org>
In-Reply-To: <4B87046C.80308@orange.fr>
References:  <1267114982.00223400.1267102202@10.7.7.3> <4B86DAD4.1050607@FreeBSD.org> <4B87046C.80308@orange.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030206010409000205050300
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Claude Buisson wrote:
> Here it is:
> 
> root@zaza# camcontrol identify cd0 -v
> pass1: Raw identify data:
>    0: 85c4 0000 0000 0000 0000 0000 0000 0000

Attached patch should fix the issue.

-- 
Alexander Motin

--------------030206010409000205050300
Content-Type: text/plain;
 name="puis.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="puis.patch"

--- sys/ata.h.prev	2010-02-03 19:41:43.000000000 +0200
+++ sys/ata.h	2010-02-26 11:59:24.000000000 +0200
@@ -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;
--- cam/ata/ata_xpt.c.prev	2010-02-26 12:06:33.000000000 +0200
+++ cam/ata/ata_xpt.c	2010-02-26 12:17:39.000000000 +0200
@@ -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);

--------------030206010409000205050300--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B87A51F.1010603>