linux/drivers/scsi/mvsas
Xi Wang beecadea1b [SCSI] mvsas: fix undefined bit shift
The macro bit(n) is defined as ((u32)1 << n), and thus it doesn't work
with n >= 32, such as in mvs_94xx_assign_reg_set():

	if (i >= 32) {
		mvi->sata_reg_set |= bit(i);
		...
	}

The shift ((u32)1 << n) with n >= 32 also leads to undefined behavior.
The result varies depending on the architecture.

This patch changes bit(n) to do a 64-bit shift.  It also simplifies
mv_ffc64() using __ffs64(), since invoking ffz() with ~0 is undefined.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Acked-by: Xiangliang Yu <yuxiangl@marvell.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-11-30 09:20:17 +00:00
..
Kconfig
Makefile
mv_64xx.c
mv_64xx.h
mv_94xx.c [SCSI] mvsas: fixed SMP request watchdog timeout issue. 2011-10-02 13:18:01 -05:00
mv_94xx.h [SCSI] mvsas: fix undefined bit shift 2012-11-30 09:20:17 +00:00
mv_chips.h
mv_defs.h [SCSI] mvsas: fixed SMP request watchdog timeout issue. 2011-10-02 13:18:01 -05:00
mv_init.c [SCSI] libsas: async ata scanning 2012-02-29 15:35:41 -06:00
mv_sas.c [SCSI] mvsas: Fix oops when ata commond timeout. 2012-09-14 14:48:32 +01:00
mv_sas.h [SCSI] mvsas: fix undefined bit shift 2012-11-30 09:20:17 +00:00