diff options
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 9d46fcbe7755..9d5a56c4b332 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -1209,6 +1209,13 @@ _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc) | |||
1209 | u16 message_control; | 1209 | u16 message_control; |
1210 | 1210 | ||
1211 | 1211 | ||
1212 | /* Check whether controller SAS2008 B0 controller, | ||
1213 | if it is SAS2008 B0 controller use IO-APIC instead of MSIX */ | ||
1214 | if (ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2008 && | ||
1215 | ioc->pdev->revision == 0x01) { | ||
1216 | return -EINVAL; | ||
1217 | } | ||
1218 | |||
1212 | base = pci_find_capability(ioc->pdev, PCI_CAP_ID_MSIX); | 1219 | base = pci_find_capability(ioc->pdev, PCI_CAP_ID_MSIX); |
1213 | if (!base) { | 1220 | if (!base) { |
1214 | dfailprintk(ioc, printk(MPT2SAS_INFO_FMT "msix not " | 1221 | dfailprintk(ioc, printk(MPT2SAS_INFO_FMT "msix not " |
@@ -2424,10 +2431,13 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) | |||
2424 | } | 2431 | } |
2425 | 2432 | ||
2426 | /* command line tunables for max controller queue depth */ | 2433 | /* command line tunables for max controller queue depth */ |
2427 | if (max_queue_depth != -1) | 2434 | if (max_queue_depth != -1 && max_queue_depth != 0) { |
2428 | max_request_credit = (max_queue_depth < facts->RequestCredit) | 2435 | max_request_credit = min_t(u16, max_queue_depth + |
2429 | ? max_queue_depth : facts->RequestCredit; | 2436 | ioc->hi_priority_depth + ioc->internal_depth, |
2430 | else | 2437 | facts->RequestCredit); |
2438 | if (max_request_credit > MAX_HBA_QUEUE_DEPTH) | ||
2439 | max_request_credit = MAX_HBA_QUEUE_DEPTH; | ||
2440 | } else | ||
2431 | max_request_credit = min_t(u16, facts->RequestCredit, | 2441 | max_request_credit = min_t(u16, facts->RequestCredit, |
2432 | MAX_HBA_QUEUE_DEPTH); | 2442 | MAX_HBA_QUEUE_DEPTH); |
2433 | 2443 | ||
@@ -2502,7 +2512,7 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) | |||
2502 | /* set the scsi host can_queue depth | 2512 | /* set the scsi host can_queue depth |
2503 | * with some internal commands that could be outstanding | 2513 | * with some internal commands that could be outstanding |
2504 | */ | 2514 | */ |
2505 | ioc->shost->can_queue = ioc->scsiio_depth - (2); | 2515 | ioc->shost->can_queue = ioc->scsiio_depth; |
2506 | dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "scsi host: " | 2516 | dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "scsi host: " |
2507 | "can_queue depth (%d)\n", ioc->name, ioc->shost->can_queue)); | 2517 | "can_queue depth (%d)\n", ioc->name, ioc->shost->can_queue)); |
2508 | 2518 | ||