All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bnx2i: fix the bit manipulation when setting the error mask
@ 2012-07-03  8:08 Tomas Henzl
  2012-07-03 16:45 ` Eddie Wai
  2012-12-11  3:09 ` Eddie Wai
  0 siblings, 2 replies; 3+ messages in thread
From: Tomas Henzl @ 2012-07-03  8:08 UTC (permalink / raw)
  To: 'linux-scsi@vger.kernel.org'
  Cc: eddie.wai, 'James.Bottomley@HansenPartnership.com', mchan

The intention in bnx2i_send_fw_iscsi_init_msg was to zero out
only the lower 32bits, but instead the whole mask64 is zeroed.
This patch fixes it.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index ece47e5..1cbf402 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -1314,7 +1314,7 @@ int bnx2i_send_fw_iscsi_init_msg(struct bnx2i_hba *hba)
 		(1ULL << ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_LUN));
 	if (error_mask1) {
 		iscsi_init2.error_bit_map[0] = error_mask1;
-		mask64 &= (u32)(~mask64);
+		mask64 ^= (u32)(mask64);
 		mask64 |= error_mask1;
 	} else
 		iscsi_init2.error_bit_map[0] = (u32) mask64;



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bnx2i: fix the bit manipulation when setting the error mask
  2012-07-03  8:08 [PATCH] bnx2i: fix the bit manipulation when setting the error mask Tomas Henzl
@ 2012-07-03 16:45 ` Eddie Wai
  2012-12-11  3:09 ` Eddie Wai
  1 sibling, 0 replies; 3+ messages in thread
From: Eddie Wai @ 2012-07-03 16:45 UTC (permalink / raw)
  To: Tomas Henzl
  Cc: 'linux-scsi@vger.kernel.org',
	'James.Bottomley@HansenPartnership.com', mchan


On Tue, 2012-07-03 at 10:08 +0200, Tomas Henzl wrote:
> The intention in bnx2i_send_fw_iscsi_init_msg was to zero out
> only the lower 32bits, but instead the whole mask64 is zeroed.
> This patch fixes it.
> 
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> ---
> diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
> index ece47e5..1cbf402 100644
> --- a/drivers/scsi/bnx2i/bnx2i_hwi.c
> +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
> @@ -1314,7 +1314,7 @@ int bnx2i_send_fw_iscsi_init_msg(struct bnx2i_hba *hba)
>  		(1ULL << ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_LUN));
>  	if (error_mask1) {
>  		iscsi_init2.error_bit_map[0] = error_mask1;
> -		mask64 &= (u32)(~mask64);
> +		mask64 ^= (u32)(mask64);
>  		mask64 |= error_mask1;
>  	} else
>  		iscsi_init2.error_bit_map[0] = (u32) mask64;
> 
> 
> 
Looks good.  Thanks.

Acked-by: Eddie Wai <eddie.wai@broadcom.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bnx2i: fix the bit manipulation when setting the error mask
  2012-07-03  8:08 [PATCH] bnx2i: fix the bit manipulation when setting the error mask Tomas Henzl
  2012-07-03 16:45 ` Eddie Wai
@ 2012-12-11  3:09 ` Eddie Wai
  1 sibling, 0 replies; 3+ messages in thread
From: Eddie Wai @ 2012-12-11  3:09 UTC (permalink / raw)
  To: Tomas Henzl
  Cc: 'linux-scsi@vger.kernel.org',
	'James.Bottomley@HansenPartnership.com', mchan

Hello James,

I'm re-sending this patch fix by Tomas as it hasn't made it upstream yet
in any of the trees.

Thanks,
Eddie

On Tue, 2012-07-03 at 10:08 +0200, Tomas Henzl wrote:
> The intention in bnx2i_send_fw_iscsi_init_msg was to zero out
> only the lower 32bits, but instead the whole mask64 is zeroed.
> This patch fixes it.
> 
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> ---
> diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
> index ece47e5..1cbf402 100644
> --- a/drivers/scsi/bnx2i/bnx2i_hwi.c
> +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
> @@ -1314,7 +1314,7 @@ int bnx2i_send_fw_iscsi_init_msg(struct bnx2i_hba *hba)
>  		(1ULL << ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_LUN));
>  	if (error_mask1) {
>  		iscsi_init2.error_bit_map[0] = error_mask1;
> -		mask64 &= (u32)(~mask64);
> +		mask64 ^= (u32)(mask64);
>  		mask64 |= error_mask1;
>  	} else
>  		iscsi_init2.error_bit_map[0] = (u32) mask64;
> 
> 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-11  3:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-03  8:08 [PATCH] bnx2i: fix the bit manipulation when setting the error mask Tomas Henzl
2012-07-03 16:45 ` Eddie Wai
2012-12-11  3:09 ` Eddie Wai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.