diff options
Diffstat (limited to 'drivers/scsi/mvsas')
-rw-r--r-- | drivers/scsi/mvsas/mv_94xx.h | 14 | ||||
-rw-r--r-- | drivers/scsi/mvsas/mv_sas.h | 2 |
2 files changed, 3 insertions, 13 deletions
diff --git a/drivers/scsi/mvsas/mv_94xx.h b/drivers/scsi/mvsas/mv_94xx.h index 8f7eb4f21140..487aa6f97412 100644 --- a/drivers/scsi/mvsas/mv_94xx.h +++ b/drivers/scsi/mvsas/mv_94xx.h | |||
@@ -258,21 +258,11 @@ enum sas_sata_phy_regs { | |||
258 | #define SPI_ADDR_VLD_94XX (1U << 1) | 258 | #define SPI_ADDR_VLD_94XX (1U << 1) |
259 | #define SPI_CTRL_SpiStart_94XX (1U << 0) | 259 | #define SPI_CTRL_SpiStart_94XX (1U << 0) |
260 | 260 | ||
261 | #define mv_ffc(x) ffz(x) | ||
262 | |||
263 | static inline int | 261 | static inline int |
264 | mv_ffc64(u64 v) | 262 | mv_ffc64(u64 v) |
265 | { | 263 | { |
266 | int i; | 264 | u64 x = ~v; |
267 | i = mv_ffc((u32)v); | 265 | return x ? __ffs64(x) : -1; |
268 | if (i >= 0) | ||
269 | return i; | ||
270 | i = mv_ffc((u32)(v>>32)); | ||
271 | |||
272 | if (i != 0) | ||
273 | return 32 + i; | ||
274 | |||
275 | return -1; | ||
276 | } | 266 | } |
277 | 267 | ||
278 | #define r_reg_set_enable(i) \ | 268 | #define r_reg_set_enable(i) \ |
diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h index c04a4f5b5972..da249553858c 100644 --- a/drivers/scsi/mvsas/mv_sas.h +++ b/drivers/scsi/mvsas/mv_sas.h | |||
@@ -69,7 +69,7 @@ extern struct kmem_cache *mvs_task_list_cache; | |||
69 | #define DEV_IS_EXPANDER(type) \ | 69 | #define DEV_IS_EXPANDER(type) \ |
70 | ((type == EDGE_DEV) || (type == FANOUT_DEV)) | 70 | ((type == EDGE_DEV) || (type == FANOUT_DEV)) |
71 | 71 | ||
72 | #define bit(n) ((u32)1 << n) | 72 | #define bit(n) ((u64)1 << n) |
73 | 73 | ||
74 | #define for_each_phy(__lseq_mask, __mc, __lseq) \ | 74 | #define for_each_phy(__lseq_mask, __mc, __lseq) \ |
75 | for ((__mc) = (__lseq_mask), (__lseq) = 0; \ | 75 | for ((__mc) = (__lseq_mask), (__lseq) = 0; \ |