Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77020
b: refs/heads/master
c: 14faea9
h: refs/heads/master
v: v3
  • Loading branch information
bo yang authored and James Bottomley committed Jan 12, 2008
1 parent c15eddb commit 4fadfae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31ea7088974c2405e19d72f17c2afb103ef19e02
refs/heads/master: 14faea9f7fe1e8805629b50cf14a65a85fe4a4fd
14 changes: 9 additions & 5 deletions trunk/drivers/scsi/megaraid/megaraid_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -1890,6 +1890,7 @@ static int megasas_init_mfi(struct megasas_instance *instance)
u32 reply_q_sz;
u32 max_sectors_1;
u32 max_sectors_2;
u32 tmp_sectors;
struct megasas_register_set __iomem *reg_set;
struct megasas_ctrl_info *ctrl_info;
/*
Expand Down Expand Up @@ -1982,17 +1983,20 @@ static int megasas_init_mfi(struct megasas_instance *instance)
* Note that older firmwares ( < FW ver 30) didn't report information
* to calculate max_sectors_1. So the number ended up as zero always.
*/
tmp_sectors = 0;
if (ctrl_info && !megasas_get_ctrl_info(instance, ctrl_info)) {

max_sectors_1 = (1 << ctrl_info->stripe_sz_ops.min) *
ctrl_info->max_strips_per_io;
max_sectors_2 = ctrl_info->max_request_size;

instance->max_sectors_per_req = (max_sectors_1 < max_sectors_2)
? max_sectors_1 : max_sectors_2;
} else
instance->max_sectors_per_req = instance->max_num_sge *
PAGE_SIZE / 512;
tmp_sectors = min_t(u32, max_sectors_1 , max_sectors_2);
}

instance->max_sectors_per_req = instance->max_num_sge *
PAGE_SIZE / 512;
if (tmp_sectors && (instance->max_sectors_per_req > tmp_sectors))
instance->max_sectors_per_req = tmp_sectors;

kfree(ctrl_info);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/megaraid/megaraid_sas.h
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ struct megasas_ctrl_info {
#define IS_DMA64 (sizeof(dma_addr_t) == 8)

#define MFI_OB_INTR_STATUS_MASK 0x00000002
#define MFI_POLL_TIMEOUT_SECS 10
#define MFI_POLL_TIMEOUT_SECS 60

#define MFI_REPLY_1078_MESSAGE_INTERRUPT 0x80000000

Expand Down

0 comments on commit 4fadfae

Please sign in to comment.