aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2i/bnx2i_hwi.c
diff options
context:
space:
mode:
authorAnil Veerabhadrappa <anilgv@broadcom.com>2009-09-11 13:38:26 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-10-02 10:45:34 -0400
commit53203244a4f9988f132ef481867ff47d6bd055b5 (patch)
tree585b47f57d771c859e70fb4afcf51ad900dff5a3 /drivers/scsi/bnx2i/bnx2i_hwi.c
parent3bfc13c239fd56ebc1ac98a914c6c6b8b0045478 (diff)
[SCSI] bnx2i: Fix context mapping issue for architectures with PAGE_SIZE != 4096
5706/5708/5709 devices allow driver/user to set page size. By default it is set to 4096. Current drivers do not program this register based on architecture type (e.g. x86 = 4K, IA64 = 16K) and by choice lets device use the defaults. So while mapping connection context memory (doorebll registers), driver has to match page size used by the device. Included change fixes the issue we uncovered during IA64 testing Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bnx2i/bnx2i_hwi.c')
-rw-r--r--drivers/scsi/bnx2i/bnx2i_hwi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index 41e1b0e7e2ef..5c8d7630c13e 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -2386,7 +2386,7 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep)
2386 ctx_sz = (config2 & BNX2_MQ_CONFIG2_CONT_SZ) >> 3; 2386 ctx_sz = (config2 & BNX2_MQ_CONFIG2_CONT_SZ) >> 3;
2387 if (ctx_sz) 2387 if (ctx_sz)
2388 reg_off = CTX_OFFSET + MAX_CID_CNT * MB_KERNEL_CTX_SIZE 2388 reg_off = CTX_OFFSET + MAX_CID_CNT * MB_KERNEL_CTX_SIZE
2389 + PAGE_SIZE * 2389 + BNX2I_570X_PAGE_SIZE_DEFAULT *
2390 (((cid_num - first_l4l5) / ctx_sz) + 256); 2390 (((cid_num - first_l4l5) / ctx_sz) + 256);
2391 else 2391 else
2392 reg_off = CTX_OFFSET + (MB_KERNEL_CTX_SIZE * cid_num); 2392 reg_off = CTX_OFFSET + (MB_KERNEL_CTX_SIZE * cid_num);