* [PATCH] [SCSI] hpsa: fix non-x86 builds
@ 2014-06-26 13:44 Arnd Bergmann
2014-06-26 14:34 ` scameron at beardog.cce.hp.com
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2014-06-26 13:44 UTC (permalink / raw)
To: linux-arm-kernel
commit 28e134464734 "[SCSI] hpsa: enable unit attention reporting"
turns on unit attention notifications, but got the change wrong for
all architectures other than x86, which now store an uninitialized
value into the device register.
Gcc helpfully warns about this:
../drivers/scsi/hpsa.c: In function 'hpsa_set_driver_support_bits':
../drivers/scsi/hpsa.c:6373:17: warning: 'driver_support' is used uninitialized in this function [-Wuninitialized]
driver_support |= ENABLE_UNIT_ATTN;
^
This moves the #ifdef so only the prefetch-enable is conditional
on x86, not also reading the initial register contents.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 28e134464734 "[SCSI] hpsa: enable unit attention reporting"
Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Cc: stable at vger.kernel.org # v3.14+
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 31184b3..d0e487c 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6365,9 +6365,9 @@ static inline void hpsa_set_driver_support_bits(struct ctlr_info *h)
{
u32 driver_support;
-#ifdef CONFIG_X86
- /* Need to enable prefetch in the SCSI core for 6400 in x86 */
driver_support = readl(&(h->cfgtable->driver_support));
+ /* Need to enable prefetch in the SCSI core for 6400 in x86 */
+#ifdef CONFIG_X86
driver_support |= ENABLE_SCSI_PREFETCH;
#endif
driver_support |= ENABLE_UNIT_ATTN;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] [SCSI] hpsa: fix non-x86 builds
2014-06-26 13:44 [PATCH] [SCSI] hpsa: fix non-x86 builds Arnd Bergmann
@ 2014-06-26 14:34 ` scameron at beardog.cce.hp.com
2014-07-03 8:43 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: scameron at beardog.cce.hp.com @ 2014-06-26 14:34 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jun 26, 2014 at 03:44:52PM +0200, Arnd Bergmann wrote:
> commit 28e134464734 "[SCSI] hpsa: enable unit attention reporting"
> turns on unit attention notifications, but got the change wrong for
> all architectures other than x86, which now store an uninitialized
> value into the device register.
>
> Gcc helpfully warns about this:
>
> ../drivers/scsi/hpsa.c: In function 'hpsa_set_driver_support_bits':
> ../drivers/scsi/hpsa.c:6373:17: warning: 'driver_support' is used uninitialized in this function [-Wuninitialized]
> driver_support |= ENABLE_UNIT_ATTN;
> ^
>
> This moves the #ifdef so only the prefetch-enable is conditional
> on x86, not also reading the initial register contents.
>
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 28e134464734 "[SCSI] hpsa: enable unit attention reporting"
> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com>
> Cc: stable at vger.kernel.org # v3.14+
>
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 31184b3..d0e487c 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -6365,9 +6365,9 @@ static inline void hpsa_set_driver_support_bits(struct ctlr_info *h)
> {
> u32 driver_support;
>
> -#ifdef CONFIG_X86
> - /* Need to enable prefetch in the SCSI core for 6400 in x86 */
> driver_support = readl(&(h->cfgtable->driver_support));
> + /* Need to enable prefetch in the SCSI core for 6400 in x86 */
> +#ifdef CONFIG_X86
> driver_support |= ENABLE_SCSI_PREFETCH;
> #endif
> driver_support |= ENABLE_UNIT_ATTN;
Thanks.
-- steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] [SCSI] hpsa: fix non-x86 builds
2014-06-26 14:34 ` scameron at beardog.cce.hp.com
@ 2014-07-03 8:43 ` Christoph Hellwig
2014-07-03 13:19 ` scameron at beardog.cce.hp.com
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2014-07-03 8:43 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jun 26, 2014 at 09:34:45AM -0500, scameron at beardog.cce.hp.com wrote:
> Thanks.
Do you plan to include this with the next hpsa update, or should I take
this as an ACK and apply it?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] [SCSI] hpsa: fix non-x86 builds
2014-07-03 8:43 ` Christoph Hellwig
@ 2014-07-03 13:19 ` scameron at beardog.cce.hp.com
0 siblings, 0 replies; 4+ messages in thread
From: scameron at beardog.cce.hp.com @ 2014-07-03 13:19 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jul 03, 2014 at 01:43:48AM -0700, Christoph Hellwig wrote:
> On Thu, Jun 26, 2014 at 09:34:45AM -0500, scameron at beardog.cce.hp.com wrote:
> > Thanks.
>
> Do you plan to include this with the next hpsa update, or should I take
> this as an ACK and apply it?
Take it as an ACK. I should have been clearer.
-- steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-03 13:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 13:44 [PATCH] [SCSI] hpsa: fix non-x86 builds Arnd Bergmann
2014-06-26 14:34 ` scameron at beardog.cce.hp.com
2014-07-03 8:43 ` Christoph Hellwig
2014-07-03 13:19 ` scameron at beardog.cce.hp.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).