changeset 13336:194dde734096

707 sata framework is unsure of bitwise ops Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Albert Lee <trisk@nexenta.com> Reviewed by: Roland Mainz <roland.mainz@nexenta.com> Reviewed by: Richard Elling <richard.elling@nexenta.com> Approved by: Albert Lee <trisk@nexenta.com>
author Garrett D'Amore <garrett@nexenta.com>
date Mon, 11 Apr 2011 12:15:48 -0700
parents a8b9fb2737b8
children d584565e3743
files usr/src/uts/common/io/sata/impl/sata.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;
 			}