1. Setting the max_sectors_per_req based on max SGL supported by the FW. Prior versions calculated
this value from controller info's max_sectors_1, max_sectors_2. For certain controllers/FW,
this was resulting in a value greater than max SGL supported by the FW. Now we take the min
of max sgl from FW and max_sectors calculation.
2. Increased MFI_POLL_TIMEOUT_SECS to 60 seconds from 10. FW may take a max of 60 seconds to
respond to the INIT cmd.
Signed-off-by: Bo Yang <bo.yang@lsi.com>
---
drivers/scsi/megaraid/megaraid_sas.c | 14 +++++++++-----
drivers/scsi/megaraid/megaraid_sas.h | 2 +-
2 files changed, 10 insertions(+), 6 deletions(-)
diff -uprN linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.c
--- linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.c 2007-10-01 02:42:25.000000000 -0700
+++ linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.c 2007-10-01 05:19:06.000000000 -0700
@@ -1979,6 +1979,7 @@ static int megasas_init_mfi(struct megas
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;
/*
@@ -2071,17 +2072,20 @@ static int megasas_init_mfi(struct megas
* 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);
diff -uprN linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.h linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.h
--- linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.h 2007-10-01 00:03:59.000000000 -0700
+++ linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.h 2007-10-01 00:03:59.000000000 -0700
@@ -572,7 +572,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
-
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Glauber de Oliveira Costa | [PATCH 0/19] desc_struct integration |
| Paolo Ornati | Re: [patch 00/69] -stable review |
| Ingo Molnar | [patch] CFS scheduler, -v6 |
git: | |
| Denis Bueno | git-instaweb portability issue (maybe?) |
| Jon Smirl | Re: Inconsistencies with git log |
| Johannes Schindelin | Re: [PATCH] Fix premature call to git_config() causing t1020-subdirectory to fail |
| Dan Farina | backup or mirror a repository |
| Marc Espie | Re: That whole "Linux stealing our code" thing |
| Ray Percival | Re: Real men don't attack straw men |
| askthelist | Packets Per Second Limit? |
| Didier Wiroth | how can I "find xyz | xargs tar" ... like gtar |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Giacomo A. Catenazzi | Re: [BUG] New Kernel Bugs |
| Tilman Schmidt | Re: 2.6.25-rc8: FTP transfer errors |
| Ingo Oeser | Re: [PATCH]: Third (final?) release of Sun Neptune driver |
| high memory | 10 hours ago | Linux kernel |
| semaphore access speed | 13 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 14 hours ago | Linux kernel |
| Easter Eggs in windows XP | 16 hours ago | Windows |
| Shared swap partition | 17 hours ago | Linux general |
| Root password | 18 hours ago | Linux general |
| Where/when DNOTIFY is used? | 19 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 22 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 22 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
