diff options
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 51 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.h | 14 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 23 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 91 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 35 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_version.h | 2 |
8 files changed, 175 insertions, 49 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index ee75a71f3c66..285c8e8ff1a0 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -379,21 +379,37 @@ static struct bin_attribute sysfs_sfp_attr = { | |||
379 | .read = qla2x00_sysfs_read_sfp, | 379 | .read = qla2x00_sysfs_read_sfp, |
380 | }; | 380 | }; |
381 | 381 | ||
382 | static struct sysfs_entry { | ||
383 | char *name; | ||
384 | struct bin_attribute *attr; | ||
385 | int is4GBp_only; | ||
386 | } bin_file_entries[] = { | ||
387 | { "fw_dump", &sysfs_fw_dump_attr, }, | ||
388 | { "nvram", &sysfs_nvram_attr, }, | ||
389 | { "optrom", &sysfs_optrom_attr, }, | ||
390 | { "optrom_ctl", &sysfs_optrom_ctl_attr, }, | ||
391 | { "vpd", &sysfs_vpd_attr, 1 }, | ||
392 | { "sfp", &sysfs_sfp_attr, 1 }, | ||
393 | { 0 }, | ||
394 | }; | ||
395 | |||
382 | void | 396 | void |
383 | qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha) | 397 | qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha) |
384 | { | 398 | { |
385 | struct Scsi_Host *host = ha->host; | 399 | struct Scsi_Host *host = ha->host; |
400 | struct sysfs_entry *iter; | ||
401 | int ret; | ||
386 | 402 | ||
387 | sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_fw_dump_attr); | 403 | for (iter = bin_file_entries; iter->name; iter++) { |
388 | sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_nvram_attr); | 404 | if (iter->is4GBp_only && (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))) |
389 | sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_optrom_attr); | 405 | continue; |
390 | sysfs_create_bin_file(&host->shost_gendev.kobj, | 406 | |
391 | &sysfs_optrom_ctl_attr); | 407 | ret = sysfs_create_bin_file(&host->shost_gendev.kobj, |
392 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | 408 | iter->attr); |
393 | sysfs_create_bin_file(&host->shost_gendev.kobj, | 409 | if (ret) |
394 | &sysfs_vpd_attr); | 410 | qla_printk(KERN_INFO, ha, |
395 | sysfs_create_bin_file(&host->shost_gendev.kobj, | 411 | "Unable to create sysfs %s binary attribute " |
396 | &sysfs_sfp_attr); | 412 | "(%d).\n", iter->name, ret); |
397 | } | 413 | } |
398 | } | 414 | } |
399 | 415 | ||
@@ -401,17 +417,14 @@ void | |||
401 | qla2x00_free_sysfs_attr(scsi_qla_host_t *ha) | 417 | qla2x00_free_sysfs_attr(scsi_qla_host_t *ha) |
402 | { | 418 | { |
403 | struct Scsi_Host *host = ha->host; | 419 | struct Scsi_Host *host = ha->host; |
420 | struct sysfs_entry *iter; | ||
421 | |||
422 | for (iter = bin_file_entries; iter->name; iter++) { | ||
423 | if (iter->is4GBp_only && (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))) | ||
424 | continue; | ||
404 | 425 | ||
405 | sysfs_remove_bin_file(&host->shost_gendev.kobj, &sysfs_fw_dump_attr); | ||
406 | sysfs_remove_bin_file(&host->shost_gendev.kobj, &sysfs_nvram_attr); | ||
407 | sysfs_remove_bin_file(&host->shost_gendev.kobj, &sysfs_optrom_attr); | ||
408 | sysfs_remove_bin_file(&host->shost_gendev.kobj, | ||
409 | &sysfs_optrom_ctl_attr); | ||
410 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | ||
411 | sysfs_remove_bin_file(&host->shost_gendev.kobj, | ||
412 | &sysfs_vpd_attr); | ||
413 | sysfs_remove_bin_file(&host->shost_gendev.kobj, | 426 | sysfs_remove_bin_file(&host->shost_gendev.kobj, |
414 | &sysfs_sfp_attr); | 427 | iter->attr); |
415 | } | 428 | } |
416 | 429 | ||
417 | if (ha->beacon_blink_led == 1) | 430 | if (ha->beacon_blink_led == 1) |
diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h index 90dad7e88985..5b12278968e0 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.h +++ b/drivers/scsi/qla2xxx/qla_dbg.h | |||
@@ -38,7 +38,7 @@ | |||
38 | * Macros use for debugging the driver. | 38 | * Macros use for debugging the driver. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #define DEBUG(x) do { if (qla2_extended_error_logging) { x; } } while (0) | 41 | #define DEBUG(x) do { if (ql2xextended_error_logging) { x; } } while (0) |
42 | 42 | ||
43 | #if defined(QL_DEBUG_LEVEL_1) | 43 | #if defined(QL_DEBUG_LEVEL_1) |
44 | #define DEBUG1(x) do {x;} while (0) | 44 | #define DEBUG1(x) do {x;} while (0) |
@@ -46,12 +46,12 @@ | |||
46 | #define DEBUG1(x) do {} while (0) | 46 | #define DEBUG1(x) do {} while (0) |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #define DEBUG2(x) do { if (qla2_extended_error_logging) { x; } } while (0) | 49 | #define DEBUG2(x) do { if (ql2xextended_error_logging) { x; } } while (0) |
50 | #define DEBUG2_3(x) do { if (qla2_extended_error_logging) { x; } } while (0) | 50 | #define DEBUG2_3(x) do { if (ql2xextended_error_logging) { x; } } while (0) |
51 | #define DEBUG2_3_11(x) do { if (qla2_extended_error_logging) { x; } } while (0) | 51 | #define DEBUG2_3_11(x) do { if (ql2xextended_error_logging) { x; } } while (0) |
52 | #define DEBUG2_9_10(x) do { if (qla2_extended_error_logging) { x; } } while (0) | 52 | #define DEBUG2_9_10(x) do { if (ql2xextended_error_logging) { x; } } while (0) |
53 | #define DEBUG2_11(x) do { if (qla2_extended_error_logging) { x; } } while (0) | 53 | #define DEBUG2_11(x) do { if (ql2xextended_error_logging) { x; } } while (0) |
54 | #define DEBUG2_13(x) do { if (qla2_extended_error_logging) { x; } } while (0) | 54 | #define DEBUG2_13(x) do { if (ql2xextended_error_logging) { x; } } while (0) |
55 | 55 | ||
56 | #if defined(QL_DEBUG_LEVEL_3) | 56 | #if defined(QL_DEBUG_LEVEL_3) |
57 | #define DEBUG3(x) do {x;} while (0) | 57 | #define DEBUG3(x) do {x;} while (0) |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index bab33f6d0bdb..c4fc40f8e8ca 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -1545,6 +1545,9 @@ typedef struct fc_port { | |||
1545 | spinlock_t rport_lock; | 1545 | spinlock_t rport_lock; |
1546 | struct fc_rport *rport, *drport; | 1546 | struct fc_rport *rport, *drport; |
1547 | u32 supported_classes; | 1547 | u32 supported_classes; |
1548 | |||
1549 | unsigned long last_queue_full; | ||
1550 | unsigned long last_ramp_up; | ||
1548 | } fc_port_t; | 1551 | } fc_port_t; |
1549 | 1552 | ||
1550 | /* | 1553 | /* |
@@ -2255,6 +2258,7 @@ typedef struct scsi_qla_host { | |||
2255 | uint16_t mgmt_svr_loop_id; | 2258 | uint16_t mgmt_svr_loop_id; |
2256 | 2259 | ||
2257 | uint32_t login_retry_count; | 2260 | uint32_t login_retry_count; |
2261 | int max_q_depth; | ||
2258 | 2262 | ||
2259 | /* Fibre Channel Device List. */ | 2263 | /* Fibre Channel Device List. */ |
2260 | struct list_head fcports; | 2264 | struct list_head fcports; |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 7da69832d74c..32ebeec45ff0 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -48,6 +48,7 @@ extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); | |||
48 | extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *); | 48 | extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *); |
49 | 49 | ||
50 | extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *); | 50 | extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *); |
51 | extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *); | ||
51 | 52 | ||
52 | /* | 53 | /* |
53 | * Global Data in qla_os.c source file. | 54 | * Global Data in qla_os.c source file. |
@@ -60,7 +61,8 @@ extern int ql2xplogiabsentdevice; | |||
60 | extern int ql2xloginretrycount; | 61 | extern int ql2xloginretrycount; |
61 | extern int ql2xfdmienable; | 62 | extern int ql2xfdmienable; |
62 | extern int ql2xallocfwdump; | 63 | extern int ql2xallocfwdump; |
63 | extern int qla2_extended_error_logging; | 64 | extern int ql2xextended_error_logging; |
65 | extern int ql2xqfullrampup; | ||
64 | 66 | ||
65 | extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); | 67 | extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); |
66 | 68 | ||
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 833b93085fd3..08cb5e3fb553 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1644,7 +1644,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1644 | * Set host adapter parameters. | 1644 | * Set host adapter parameters. |
1645 | */ | 1645 | */ |
1646 | if (nv->host_p[0] & BIT_7) | 1646 | if (nv->host_p[0] & BIT_7) |
1647 | qla2_extended_error_logging = 1; | 1647 | ql2xextended_error_logging = 1; |
1648 | ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); | 1648 | ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); |
1649 | /* Always load RISC code on non ISP2[12]00 chips. */ | 1649 | /* Always load RISC code on non ISP2[12]00 chips. */ |
1650 | if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) | 1650 | if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) |
@@ -3948,3 +3948,24 @@ qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr) | |||
3948 | fail_fw_integrity: | 3948 | fail_fw_integrity: |
3949 | return QLA_FUNCTION_FAILED; | 3949 | return QLA_FUNCTION_FAILED; |
3950 | } | 3950 | } |
3951 | |||
3952 | void | ||
3953 | qla2x00_try_to_stop_firmware(scsi_qla_host_t *ha) | ||
3954 | { | ||
3955 | int ret, retries; | ||
3956 | |||
3957 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) | ||
3958 | return; | ||
3959 | |||
3960 | ret = qla2x00_stop_firmware(ha); | ||
3961 | for (retries = 5; ret != QLA_SUCCESS && retries ; retries--) { | ||
3962 | qla2x00_reset_chip(ha); | ||
3963 | if (qla2x00_chip_diag(ha) != QLA_SUCCESS) | ||
3964 | continue; | ||
3965 | if (qla2x00_setup_chip(ha) != QLA_SUCCESS) | ||
3966 | continue; | ||
3967 | qla_printk(KERN_INFO, ha, | ||
3968 | "Attempting retry of stop-firmware command...\n"); | ||
3969 | ret = qla2x00_stop_firmware(ha); | ||
3970 | } | ||
3971 | } | ||
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 626c7178a434..d3b6df4d55c8 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -6,6 +6,8 @@ | |||
6 | */ | 6 | */ |
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | 8 | ||
9 | #include <scsi/scsi_tcq.h> | ||
10 | |||
9 | static void qla2x00_mbx_completion(scsi_qla_host_t *, uint16_t); | 11 | static void qla2x00_mbx_completion(scsi_qla_host_t *, uint16_t); |
10 | static void qla2x00_async_event(scsi_qla_host_t *, uint16_t *); | 12 | static void qla2x00_async_event(scsi_qla_host_t *, uint16_t *); |
11 | static void qla2x00_process_completed_request(struct scsi_qla_host *, uint32_t); | 13 | static void qla2x00_process_completed_request(struct scsi_qla_host *, uint32_t); |
@@ -593,6 +595,67 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
593 | } | 595 | } |
594 | } | 596 | } |
595 | 597 | ||
598 | static void | ||
599 | qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, void *data) | ||
600 | { | ||
601 | fc_port_t *fcport = data; | ||
602 | |||
603 | if (fcport->ha->max_q_depth <= sdev->queue_depth) | ||
604 | return; | ||
605 | |||
606 | if (sdev->ordered_tags) | ||
607 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, | ||
608 | sdev->queue_depth + 1); | ||
609 | else | ||
610 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, | ||
611 | sdev->queue_depth + 1); | ||
612 | |||
613 | fcport->last_ramp_up = jiffies; | ||
614 | |||
615 | DEBUG2(qla_printk(KERN_INFO, fcport->ha, | ||
616 | "scsi(%ld:%d:%d:%d): Queue depth adjusted-up to %d.\n", | ||
617 | fcport->ha->host_no, sdev->channel, sdev->id, sdev->lun, | ||
618 | sdev->queue_depth)); | ||
619 | } | ||
620 | |||
621 | static void | ||
622 | qla2x00_adjust_sdev_qdepth_down(struct scsi_device *sdev, void *data) | ||
623 | { | ||
624 | fc_port_t *fcport = data; | ||
625 | |||
626 | if (!scsi_track_queue_full(sdev, sdev->queue_depth - 1)) | ||
627 | return; | ||
628 | |||
629 | DEBUG2(qla_printk(KERN_INFO, fcport->ha, | ||
630 | "scsi(%ld:%d:%d:%d): Queue depth adjusted-down to %d.\n", | ||
631 | fcport->ha->host_no, sdev->channel, sdev->id, sdev->lun, | ||
632 | sdev->queue_depth)); | ||
633 | } | ||
634 | |||
635 | static inline void | ||
636 | qla2x00_ramp_up_queue_depth(scsi_qla_host_t *ha, srb_t *sp) | ||
637 | { | ||
638 | fc_port_t *fcport; | ||
639 | struct scsi_device *sdev; | ||
640 | |||
641 | sdev = sp->cmd->device; | ||
642 | if (sdev->queue_depth >= ha->max_q_depth) | ||
643 | return; | ||
644 | |||
645 | fcport = sp->fcport; | ||
646 | if (time_before(jiffies, | ||
647 | fcport->last_ramp_up + ql2xqfullrampup * HZ)) | ||
648 | return; | ||
649 | if (time_before(jiffies, | ||
650 | fcport->last_queue_full + ql2xqfullrampup * HZ)) | ||
651 | return; | ||
652 | |||
653 | spin_unlock_irq(&ha->hardware_lock); | ||
654 | starget_for_each_device(sdev->sdev_target, fcport, | ||
655 | qla2x00_adjust_sdev_qdepth_up); | ||
656 | spin_lock_irq(&ha->hardware_lock); | ||
657 | } | ||
658 | |||
596 | /** | 659 | /** |
597 | * qla2x00_process_completed_request() - Process a Fast Post response. | 660 | * qla2x00_process_completed_request() - Process a Fast Post response. |
598 | * @ha: SCSI driver HA context | 661 | * @ha: SCSI driver HA context |
@@ -624,6 +687,8 @@ qla2x00_process_completed_request(struct scsi_qla_host *ha, uint32_t index) | |||
624 | 687 | ||
625 | /* Save ISP completion status */ | 688 | /* Save ISP completion status */ |
626 | sp->cmd->result = DID_OK << 16; | 689 | sp->cmd->result = DID_OK << 16; |
690 | |||
691 | qla2x00_ramp_up_queue_depth(ha, sp); | ||
627 | qla2x00_sp_compl(ha, sp); | 692 | qla2x00_sp_compl(ha, sp); |
628 | } else { | 693 | } else { |
629 | DEBUG2(printk("scsi(%ld): Invalid ISP SCSI completion handle\n", | 694 | DEBUG2(printk("scsi(%ld): Invalid ISP SCSI completion handle\n", |
@@ -823,6 +888,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
823 | */ | 888 | */ |
824 | switch (comp_status) { | 889 | switch (comp_status) { |
825 | case CS_COMPLETE: | 890 | case CS_COMPLETE: |
891 | case CS_QUEUE_FULL: | ||
826 | if (scsi_status == 0) { | 892 | if (scsi_status == 0) { |
827 | cp->result = DID_OK << 16; | 893 | cp->result = DID_OK << 16; |
828 | break; | 894 | break; |
@@ -849,6 +915,20 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
849 | } | 915 | } |
850 | cp->result = DID_OK << 16 | lscsi_status; | 916 | cp->result = DID_OK << 16 | lscsi_status; |
851 | 917 | ||
918 | if (lscsi_status == SAM_STAT_TASK_SET_FULL) { | ||
919 | DEBUG2(printk(KERN_INFO | ||
920 | "scsi(%ld): QUEUE FULL status detected " | ||
921 | "0x%x-0x%x.\n", ha->host_no, comp_status, | ||
922 | scsi_status)); | ||
923 | |||
924 | /* Adjust queue depth for all luns on the port. */ | ||
925 | fcport->last_queue_full = jiffies; | ||
926 | spin_unlock_irq(&ha->hardware_lock); | ||
927 | starget_for_each_device(cp->device->sdev_target, | ||
928 | fcport, qla2x00_adjust_sdev_qdepth_down); | ||
929 | spin_lock_irq(&ha->hardware_lock); | ||
930 | break; | ||
931 | } | ||
852 | if (lscsi_status != SS_CHECK_CONDITION) | 932 | if (lscsi_status != SS_CHECK_CONDITION) |
853 | break; | 933 | break; |
854 | 934 | ||
@@ -1066,17 +1146,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1066 | qla2x00_mark_device_lost(ha, fcport, 1, 1); | 1146 | qla2x00_mark_device_lost(ha, fcport, 1, 1); |
1067 | break; | 1147 | break; |
1068 | 1148 | ||
1069 | case CS_QUEUE_FULL: | ||
1070 | DEBUG2(printk(KERN_INFO | ||
1071 | "scsi(%ld): QUEUE FULL status detected 0x%x-0x%x.\n", | ||
1072 | ha->host_no, comp_status, scsi_status)); | ||
1073 | |||
1074 | /* SCSI Mid-Layer handles device queue full */ | ||
1075 | |||
1076 | cp->result = DID_OK << 16 | lscsi_status; | ||
1077 | |||
1078 | break; | ||
1079 | |||
1080 | default: | 1149 | default: |
1081 | DEBUG3(printk("scsi(%ld): Error detected (unknown status) " | 1150 | DEBUG3(printk("scsi(%ld): Error detected (unknown status) " |
1082 | "0x%x-0x%x.\n", ha->host_no, comp_status, scsi_status)); | 1151 | "0x%x-0x%x.\n", ha->host_no, comp_status, scsi_status)); |
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 | ||
64 | int qla2_extended_error_logging; | 64 | int ql2xextended_error_logging; |
65 | module_param(qla2_extended_error_logging, int, S_IRUGO|S_IRUSR); | 65 | module_param(ql2xextended_error_logging, int, S_IRUGO|S_IRUSR); |
66 | MODULE_PARM_DESC(qla2_extended_error_logging, | 66 | MODULE_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 | ||
81 | static int ql2xmaxqdepth = MAX_Q_DEPTH; | ||
82 | module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR); | ||
83 | MODULE_PARM_DESC(ql2xmaxqdepth, | ||
84 | "Maximum queue depth to report for target devices."); | ||
85 | |||
86 | int ql2xqfullrampup = 120; | ||
87 | module_param(ql2xqfullrampup, int, S_IRUGO|S_IWUSR); | ||
88 | MODULE_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 = |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index e57bf45a3393..1fa0bce6b24e 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.01.07-k2" | 10 | #define QLA2XXX_VERSION "8.01.07-k3" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 1 | 13 | #define QLA_DRIVER_MINOR_VER 1 |