707 sata framework is unsure of bitwise ops
authorGarrett D'Amore <garrett@nexenta.com>
Mon, 11 Apr 2011 12:15:48 -0700
changeset 13336 194dde734096
parent 13335 a8b9fb2737b8
child 13337 d584565e3743
707 sata framework is unsure of bitwise ops Reviewed by: Dan McDonald <[email protected]> Reviewed by: Albert Lee <[email protected]> Reviewed by: Roland Mainz <[email protected]> Reviewed by: Richard Elling <[email protected]> Approved by: Albert Lee <[email protected]>
usr/src/uts/common/io/sata/impl/sata.c
--- a/usr/src/uts/common/io/sata/impl/sata.c	Thu Apr 07 21:19:00 2011 -0400
+++ b/usr/src/uts/common/io/sata/impl/sata.c	Mon Apr 11 12:15:48 2011 -0700
@@ -8107,7 +8107,7 @@
 	page->mode_page.code = MODEPAGE_POWER_COND;
 	page->mode_page.length = sizeof (struct mode_info_power_cond);
 
-	if (sata_id->ai_cap && SATA_STANDBYTIMER) {
+	if (sata_id->ai_cap & SATA_STANDBYTIMER) {
 		page->standby = 1;
 		bcopy(sdinfo->satadrv_standby_timer, page->standby_cond_timer,
 		    sizeof (uchar_t) * 4);
@@ -8513,7 +8513,7 @@
 
 	/* If parmlen is too short or the feature is not supported, drop it */
 	if ((len < parmlen) || (page->idle == 1) ||
-	    (!(sata_id->ai_cap && SATA_STANDBYTIMER) && page->standby == 1)) {
+	    (!(sata_id->ai_cap & SATA_STANDBYTIMER) && page->standby == 1)) {
 		*scsipkt->pkt_scbp = STATUS_CHECK;
 		sense = sata_arq_sense(spx);
 		sense->es_key = KEY_ILLEGAL_REQUEST;
@@ -12279,7 +12279,7 @@
 			}
 
 			if ((SATA_PMPORT_DEV_TYPE(sata_hba_inst, cport,
-			    pmport) && SATA_VALID_DEV_TYPE) == 0) {
+			    pmport) & SATA_VALID_DEV_TYPE) == 0) {
 				rval = -1;
 				goto out;
 			}