diff options
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 11 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 8 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 14 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 18 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_version.h | 2 |
8 files changed, 39 insertions, 18 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index a319a20ed440..45e7dcb4b34d 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -993,6 +993,17 @@ qla2x00_terminate_rport_io(struct fc_rport *rport) | |||
993 | { | 993 | { |
994 | fc_port_t *fcport = *(fc_port_t **)rport->dd_data; | 994 | fc_port_t *fcport = *(fc_port_t **)rport->dd_data; |
995 | 995 | ||
996 | /* | ||
997 | * At this point all fcport's software-states are cleared. Perform any | ||
998 | * final cleanup of firmware resources (PCBs and XCBs). | ||
999 | */ | ||
1000 | if (fcport->loop_id != FC_NO_LOOP_ID) { | ||
1001 | fcport->ha->isp_ops->fabric_logout(fcport->ha, fcport->loop_id, | ||
1002 | fcport->d_id.b.domain, fcport->d_id.b.area, | ||
1003 | fcport->d_id.b.al_pa); | ||
1004 | fcport->loop_id = FC_NO_LOOP_ID; | ||
1005 | } | ||
1006 | |||
996 | qla2x00_abort_fcport_cmds(fcport); | 1007 | qla2x00_abort_fcport_cmds(fcport); |
997 | scsi_target_unblock(&rport->dev); | 1008 | scsi_target_unblock(&rport->dev); |
998 | } | 1009 | } |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 6da31ba94404..94a720eabfd8 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2237,6 +2237,7 @@ typedef struct scsi_qla_host { | |||
2237 | #define REGISTER_FDMI_NEEDED 26 | 2237 | #define REGISTER_FDMI_NEEDED 26 |
2238 | #define FCPORT_UPDATE_NEEDED 27 | 2238 | #define FCPORT_UPDATE_NEEDED 27 |
2239 | #define VP_DPC_NEEDED 28 /* wake up for VP dpc handling */ | 2239 | #define VP_DPC_NEEDED 28 /* wake up for VP dpc handling */ |
2240 | #define UNLOADING 29 | ||
2240 | 2241 | ||
2241 | uint32_t device_flags; | 2242 | uint32_t device_flags; |
2242 | #define DFLG_LOCAL_DEVICES BIT_0 | 2243 | #define DFLG_LOCAL_DEVICES BIT_0 |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 601a6b29750c..ee89ddd64aae 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -976,8 +976,9 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) | |||
976 | &ha->fw_attributes, &ha->fw_memory_size); | 976 | &ha->fw_attributes, &ha->fw_memory_size); |
977 | qla2x00_resize_request_q(ha); | 977 | qla2x00_resize_request_q(ha); |
978 | ha->flags.npiv_supported = 0; | 978 | ha->flags.npiv_supported = 0; |
979 | if ((IS_QLA24XX(ha) || IS_QLA25XX(ha)) && | 979 | if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) || |
980 | (ha->fw_attributes & BIT_2)) { | 980 | IS_QLA84XX(ha)) && |
981 | (ha->fw_attributes & BIT_2)) { | ||
981 | ha->flags.npiv_supported = 1; | 982 | ha->flags.npiv_supported = 1; |
982 | if ((!ha->max_npiv_vports) || | 983 | if ((!ha->max_npiv_vports) || |
983 | ((ha->max_npiv_vports + 1) % | 984 | ((ha->max_npiv_vports + 1) % |
@@ -3251,6 +3252,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3251 | { | 3252 | { |
3252 | int rval; | 3253 | int rval; |
3253 | uint8_t status = 0; | 3254 | uint8_t status = 0; |
3255 | scsi_qla_host_t *vha; | ||
3254 | 3256 | ||
3255 | if (ha->flags.online) { | 3257 | if (ha->flags.online) { |
3256 | ha->flags.online = 0; | 3258 | ha->flags.online = 0; |
@@ -3265,6 +3267,8 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3265 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { | 3267 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { |
3266 | atomic_set(&ha->loop_state, LOOP_DOWN); | 3268 | atomic_set(&ha->loop_state, LOOP_DOWN); |
3267 | qla2x00_mark_all_devices_lost(ha, 0); | 3269 | qla2x00_mark_all_devices_lost(ha, 0); |
3270 | list_for_each_entry(vha, &ha->vp_list, vp_list) | ||
3271 | qla2x00_mark_all_devices_lost(vha, 0); | ||
3268 | } else { | 3272 | } else { |
3269 | if (!atomic_read(&ha->loop_down_timer)) | 3273 | if (!atomic_read(&ha->loop_down_timer)) |
3270 | atomic_set(&ha->loop_down_timer, | 3274 | atomic_set(&ha->loop_down_timer, |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 874d802edb7d..45a3b93eed57 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -879,11 +879,12 @@ qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t sense_len) | |||
879 | sp->request_sense_ptr += sense_len; | 879 | sp->request_sense_ptr += sense_len; |
880 | sp->request_sense_length -= sense_len; | 880 | sp->request_sense_length -= sense_len; |
881 | if (sp->request_sense_length != 0) | 881 | if (sp->request_sense_length != 0) |
882 | sp->ha->status_srb = sp; | 882 | sp->fcport->ha->status_srb = sp; |
883 | 883 | ||
884 | DEBUG5(printk("%s(): Check condition Sense data, scsi(%ld:%d:%d:%d) " | 884 | DEBUG5(printk("%s(): Check condition Sense data, scsi(%ld:%d:%d:%d) " |
885 | "cmd=%p pid=%ld\n", __func__, sp->ha->host_no, cp->device->channel, | 885 | "cmd=%p pid=%ld\n", __func__, sp->fcport->ha->host_no, |
886 | cp->device->id, cp->device->lun, cp, cp->serial_number)); | 886 | cp->device->channel, cp->device->id, cp->device->lun, cp, |
887 | cp->serial_number)); | ||
887 | if (sense_len) | 888 | if (sense_len) |
888 | DEBUG5(qla2x00_dump_buffer(cp->sense_buffer, | 889 | DEBUG5(qla2x00_dump_buffer(cp->sense_buffer, |
889 | CMD_ACTUAL_SNSLEN(cp))); | 890 | CMD_ACTUAL_SNSLEN(cp))); |
@@ -1184,9 +1185,8 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1184 | atomic_read(&fcport->state))); | 1185 | atomic_read(&fcport->state))); |
1185 | 1186 | ||
1186 | cp->result = DID_BUS_BUSY << 16; | 1187 | cp->result = DID_BUS_BUSY << 16; |
1187 | if (atomic_read(&fcport->state) == FCS_ONLINE) { | 1188 | if (atomic_read(&fcport->state) == FCS_ONLINE) |
1188 | qla2x00_mark_device_lost(ha, fcport, 1, 1); | 1189 | qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1); |
1189 | } | ||
1190 | break; | 1190 | break; |
1191 | 1191 | ||
1192 | case CS_RESET: | 1192 | case CS_RESET: |
@@ -1229,7 +1229,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1229 | 1229 | ||
1230 | /* Check to see if logout occurred. */ | 1230 | /* Check to see if logout occurred. */ |
1231 | if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT)) | 1231 | if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT)) |
1232 | qla2x00_mark_device_lost(ha, fcport, 1, 1); | 1232 | qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1); |
1233 | break; | 1233 | break; |
1234 | 1234 | ||
1235 | default: | 1235 | default: |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index bc90d6b8d0a0..813bc7784c0a 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -2686,7 +2686,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *ha, | |||
2686 | set_bit(VP_IDX_ACQUIRED, &vha->vp_flags); | 2686 | set_bit(VP_IDX_ACQUIRED, &vha->vp_flags); |
2687 | set_bit(VP_DPC_NEEDED, &ha->dpc_flags); | 2687 | set_bit(VP_DPC_NEEDED, &ha->dpc_flags); |
2688 | 2688 | ||
2689 | wake_up_process(ha->dpc_thread); | 2689 | qla2xxx_wake_dpc(ha); |
2690 | } | 2690 | } |
2691 | } | 2691 | } |
2692 | 2692 | ||
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 50baf6a1d67c..93560cd72784 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -6,7 +6,6 @@ | |||
6 | */ | 6 | */ |
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | 8 | ||
9 | #include <linux/version.h> | ||
10 | #include <linux/moduleparam.h> | 9 | #include <linux/moduleparam.h> |
11 | #include <linux/vmalloc.h> | 10 | #include <linux/vmalloc.h> |
12 | #include <linux/smp_lock.h> | 11 | #include <linux/smp_lock.h> |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 7c8af7ed2a5d..26afe44265c7 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -780,7 +780,8 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha, unsigned int t, | |||
780 | sp = pha->outstanding_cmds[cnt]; | 780 | sp = pha->outstanding_cmds[cnt]; |
781 | if (!sp) | 781 | if (!sp) |
782 | continue; | 782 | continue; |
783 | if (ha->vp_idx != sp->ha->vp_idx) | 783 | |
784 | if (ha->vp_idx != sp->fcport->ha->vp_idx) | ||
784 | continue; | 785 | continue; |
785 | match = 0; | 786 | match = 0; |
786 | switch (type) { | 787 | switch (type) { |
@@ -1080,9 +1081,7 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *ha, int res) | |||
1080 | sp = ha->outstanding_cmds[cnt]; | 1081 | sp = ha->outstanding_cmds[cnt]; |
1081 | if (sp) { | 1082 | if (sp) { |
1082 | ha->outstanding_cmds[cnt] = NULL; | 1083 | ha->outstanding_cmds[cnt] = NULL; |
1083 | sp->flags = 0; | ||
1084 | sp->cmd->result = res; | 1084 | sp->cmd->result = res; |
1085 | sp->cmd->host_scribble = (unsigned char *)NULL; | ||
1086 | qla2x00_sp_compl(ha, sp); | 1085 | qla2x00_sp_compl(ha, sp); |
1087 | } | 1086 | } |
1088 | } | 1087 | } |
@@ -1776,10 +1775,15 @@ probe_out: | |||
1776 | static void | 1775 | static void |
1777 | qla2x00_remove_one(struct pci_dev *pdev) | 1776 | qla2x00_remove_one(struct pci_dev *pdev) |
1778 | { | 1777 | { |
1779 | scsi_qla_host_t *ha; | 1778 | scsi_qla_host_t *ha, *vha, *temp; |
1780 | 1779 | ||
1781 | ha = pci_get_drvdata(pdev); | 1780 | ha = pci_get_drvdata(pdev); |
1782 | 1781 | ||
1782 | list_for_each_entry_safe(vha, temp, &ha->vp_list, vp_list) | ||
1783 | fc_vport_terminate(vha->fc_vport); | ||
1784 | |||
1785 | set_bit(UNLOADING, &ha->dpc_flags); | ||
1786 | |||
1783 | qla2x00_dfs_remove(ha); | 1787 | qla2x00_dfs_remove(ha); |
1784 | 1788 | ||
1785 | qla84xx_put_chip(ha); | 1789 | qla84xx_put_chip(ha); |
@@ -2451,8 +2455,10 @@ qla2x00_do_dpc(void *data) | |||
2451 | void | 2455 | void |
2452 | qla2xxx_wake_dpc(scsi_qla_host_t *ha) | 2456 | qla2xxx_wake_dpc(scsi_qla_host_t *ha) |
2453 | { | 2457 | { |
2454 | if (ha->dpc_thread) | 2458 | struct task_struct *t = ha->dpc_thread; |
2455 | wake_up_process(ha->dpc_thread); | 2459 | |
2460 | if (!test_bit(UNLOADING, &ha->dpc_flags) && t) | ||
2461 | wake_up_process(t); | ||
2456 | } | 2462 | } |
2457 | 2463 | ||
2458 | /* | 2464 | /* |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 676c390db354..4160e4caa7b9 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.02.01-k6" | 10 | #define QLA2XXX_VERSION "8.02.01-k7" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 2 | 13 | #define QLA_DRIVER_MINOR_VER 2 |