aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c35
1 files changed, 26 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 3f20d765563e..208607be78c7 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -61,9 +61,9 @@ MODULE_PARM_DESC(ql2xallocfwdump,
61 "during HBA initialization. Memory allocation requirements " 61 "during HBA initialization. Memory allocation requirements "
62 "vary by ISP type. Default is 1 - allocate memory."); 62 "vary by ISP type. Default is 1 - allocate memory.");
63 63
64int qla2_extended_error_logging; 64int ql2xextended_error_logging;
65module_param(qla2_extended_error_logging, int, S_IRUGO|S_IRUSR); 65module_param(ql2xextended_error_logging, int, S_IRUGO|S_IRUSR);
66MODULE_PARM_DESC(qla2_extended_error_logging, 66MODULE_PARM_DESC(ql2xextended_error_logging,
67 "Option to enable extended error logging, " 67 "Option to enable extended error logging, "
68 "Default is 0 - no logging. 1 - log errors."); 68 "Default is 0 - no logging. 1 - log errors.");
69 69
@@ -77,6 +77,19 @@ MODULE_PARM_DESC(ql2xfdmienable,
77 "Enables FDMI registratons " 77 "Enables FDMI registratons "
78 "Default is 0 - no FDMI. 1 - perfom FDMI."); 78 "Default is 0 - no FDMI. 1 - perfom FDMI.");
79 79
80#define MAX_Q_DEPTH 32
81static int ql2xmaxqdepth = MAX_Q_DEPTH;
82module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR);
83MODULE_PARM_DESC(ql2xmaxqdepth,
84 "Maximum queue depth to report for target devices.");
85
86int ql2xqfullrampup = 120;
87module_param(ql2xqfullrampup, int, S_IRUGO|S_IWUSR);
88MODULE_PARM_DESC(ql2xqfullrampup,
89 "Number of seconds to wait to begin to ramp-up the queue "
90 "depth for a device after a queue-full condition has been "
91 "detected. Default is 120 seconds.");
92
80/* 93/*
81 * SCSI host template entry points 94 * SCSI host template entry points
82 */ 95 */
@@ -1104,9 +1117,9 @@ qla2xxx_slave_configure(struct scsi_device *sdev)
1104 struct fc_rport *rport = starget_to_rport(sdev->sdev_target); 1117 struct fc_rport *rport = starget_to_rport(sdev->sdev_target);
1105 1118
1106 if (sdev->tagged_supported) 1119 if (sdev->tagged_supported)
1107 scsi_activate_tcq(sdev, 32); 1120 scsi_activate_tcq(sdev, ha->max_q_depth);
1108 else 1121 else
1109 scsi_deactivate_tcq(sdev, 32); 1122 scsi_deactivate_tcq(sdev, ha->max_q_depth);
1110 1123
1111 rport->dev_loss_tmo = ha->port_down_retry_count + 5; 1124 rport->dev_loss_tmo = ha->port_down_retry_count + 5;
1112 1125
@@ -1413,6 +1426,10 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1413 ha->link_data_rate = PORT_SPEED_UNKNOWN; 1426 ha->link_data_rate = PORT_SPEED_UNKNOWN;
1414 ha->optrom_size = OPTROM_SIZE_2300; 1427 ha->optrom_size = OPTROM_SIZE_2300;
1415 1428
1429 ha->max_q_depth = MAX_Q_DEPTH;
1430 if (ql2xmaxqdepth != 0 && ql2xmaxqdepth <= 0xffffU)
1431 ha->max_q_depth = ql2xmaxqdepth;
1432
1416 /* Assign ISP specific operations. */ 1433 /* Assign ISP specific operations. */
1417 ha->isp_ops.pci_config = qla2100_pci_config; 1434 ha->isp_ops.pci_config = qla2100_pci_config;
1418 ha->isp_ops.reset_chip = qla2x00_reset_chip; 1435 ha->isp_ops.reset_chip = qla2x00_reset_chip;
@@ -1712,8 +1729,10 @@ qla2x00_free_device(scsi_qla_host_t *ha)
1712 if (ha->eft) 1729 if (ha->eft)
1713 qla2x00_trace_control(ha, TC_DISABLE, 0, 0); 1730 qla2x00_trace_control(ha, TC_DISABLE, 0, 0);
1714 1731
1732 ha->flags.online = 0;
1733
1715 /* Stop currently executing firmware. */ 1734 /* Stop currently executing firmware. */
1716 qla2x00_stop_firmware(ha); 1735 qla2x00_try_to_stop_firmware(ha);
1717 1736
1718 /* turn-off interrupts on the card */ 1737 /* turn-off interrupts on the card */
1719 if (ha->interrupts_on) 1738 if (ha->interrupts_on)
@@ -1721,8 +1740,6 @@ qla2x00_free_device(scsi_qla_host_t *ha)
1721 1740
1722 qla2x00_mem_free(ha); 1741 qla2x00_mem_free(ha);
1723 1742
1724 ha->flags.online = 0;
1725
1726 /* Detach interrupts */ 1743 /* Detach interrupts */
1727 if (ha->host->irq) 1744 if (ha->host->irq)
1728 free_irq(ha->host->irq, ha); 1745 free_irq(ha->host->irq, ha);
@@ -2697,7 +2714,7 @@ qla2x00_module_init(void)
2697 2714
2698 /* Derive version string. */ 2715 /* Derive version string. */
2699 strcpy(qla2x00_version_str, QLA2XXX_VERSION); 2716 strcpy(qla2x00_version_str, QLA2XXX_VERSION);
2700 if (qla2_extended_error_logging) 2717 if (ql2xextended_error_logging)
2701 strcat(qla2x00_version_str, "-debug"); 2718 strcat(qla2x00_version_str, "-debug");
2702 2719
2703 qla2xxx_transport_template = 2720 qla2xxx_transport_template =