]> git.baikalelectronics.ru Git - kernel.git/commit
IBiser: Fix wrong mask when sizeof (dma_addr_t) > sizeof (unsigned long)
authorOr Gerlitz <ogerlitz@mellanox.com>
Mon, 1 Aug 2011 21:12:09 +0000 (21:12 +0000)
committerRoland Dreier <roland@purestorage.com>
Wed, 17 Aug 2011 16:40:55 +0000 (09:40 -0700)
commitfccc686e6b7531104ac763bab32089cefadc8c9b
tree2606a343505441fe0c1f4cf638c6ebc9bb9929b5
parent6f084776661252a9941d390d78f6b95e258d97a6
IBiser: Fix wrong mask when sizeof (dma_addr_t) > sizeof (unsigned long)

The code that prepares the SG associated with SCSI command for FMR was
buggy for systems with DMA addresses that don't fit in unsigned long,
e.g under the 32-bit based XenServer dom0 sizeof(dma_addr_t) is 8.

Fix that by casting to unsigned long long a masking constant used by
the code. This resolves a crash in iser_sg_to_page_vec on this system.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/iser/iscsi_iser.h