lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 30 Nov 2010 16:36:04 +0100
From:	Tomas Henzl <thenzl@...hat.com>
To:	"Yang, Bo" <Bo.Yang@....com>
CC:	"'James.Bottomley@...senPartnership.com'" 
	<James.Bottomley@...senPartnership.com>,
	"'linux-scsi@...r.kernel.org'" <linux-scsi@...r.kernel.org>,
	"'akpm@...l.org'" <akpm@...l.org>,
	"'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/9] scsi: megaraid_sas -  Add the online reset to iMR
 chip

On 11/19/2010 06:29 PM, Yang, Bo wrote:
> Driver added the OCR (online controller reset) support to megaraid sas iMR chip.
>
> Signed-off-by Bo Yang<bo.yang@....com>
>
> ---
> drivers/scsi/megaraid/megaraid_sas.c |   74 ++++++++++++++++++++---------------
> drivers/scsi/megaraid/megaraid_sas.h |    5 +-
>  2 files changed, 47 insertions(+), 32 deletions(-)
>   
> @@ -497,6 +503,8 @@ static int megasas_clear_intr_skinny(struct
> megasas_register_set __iomem *regs) { u32 status; + u32 mfiStatus = 0;
> + /* * Check if it is our interrupt */ @@ -507,6 +515,15 @@
> megasas_clear_intr_skinny(struct megasas } /* + * Check if it is our
> interrupt + */ + if ((megasas_read_fw_status_reg_gen2( regs) &
> MFI_STATE_MASK ) == + MFI_STATE_FAULT ) { + mfiStatus |=
> MFI_INTR_FLAG_FIRMWARE_STATE_CHANGE; + } else + mfiStatus |=
> MFI_INTR_FLAG_REPLY_MESSAGE; + + /* * Clear the interrupt by writing
> back the same value */ writel(status, &regs->outbound_intr_status); 
In the hunk above you use the '|=' which is not needed, a simple
assignment is more readable, see below.

Tomas

@@ -493,6 +499,8 @@ static int
 megasas_clear_intr_skinny(struct megasas_register_set __iomem *regs)
 {
 	u32 status;
+	u32 mfiStatus;
+
 	/*
 	 * Check if it is our interrupt
 	 */
@@ -503,6 +511,15 @@ megasas_clear_intr_skinny(struct megasas_register_set __iomem *regs)
 	}
 
 	/*
+	 * Check if it is our interrupt
+	 */
+	if ((megasas_read_fw_status_reg_gen2( regs) & MFI_STATE_MASK) ==
+						MFI_STATE_FAULT)
+		mfiStatus = MFI_INTR_FLAG_FIRMWARE_STATE_CHANGE;
+	else
+		mfiStatus = MFI_INTR_FLAG_REPLY_MESSAGE;
+
+	/*
 	 * Clear the interrupt by writing back the same value
 	 */
 	writel(status, &regs->outbound_intr_status);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ