diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-15 14:37:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-15 14:37:40 -0500 |
commit | c98114db2d70bc670206878e92bb88da9cf6f8f2 (patch) | |
tree | 0b3f0720d0821414510c0f9eadf36fc2e43bd0db /drivers | |
parent | 52168e60f7d86d83124903098ac8c2dba93cd1c4 (diff) | |
parent | df81d2371aeca0f7474f197a3090830899016e39 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] dpt_i2o: fix transferred data length for scsi_set_resid()
[SCSI] scsi_error regression: Fix idempotent command handling
[SCSI] zfcp: Fix hexdump data in s390dbf traces
[SCSI] zfcp: fix erp timeout cleanup for port open requests
[SCSI] zfcp: Wait for port scan to complete when setting adapter online
[SCSI] zfcp: Fix cast warning
[SCSI] zfcp: Fix request list handling in error path
[SCSI] zfcp: fix mempool usage for status_read requests
[SCSI] zfcp: fix req_list_locking.
[SCSI] zfcp: Dont clear reference from SCSI device to unit
[SCSI] qla2xxx: Update version number to 8.02.01-k9.
[SCSI] qla2xxx: Return a FAILED status when abort mailbox-command fails.
[SCSI] qla2xxx: Do not honour max_vports from firmware for 2G ISPs and below.
[SCSI] qla2xxx: Use pci_disable_rom() to manipulate PCI config space.
[SCSI] qla2xxx: Correct Atmel flash-part handling.
[SCSI] megaraid: fix mega_internal_command oops
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 3 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 4 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 42 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.h | 8 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 23 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 12 | ||||
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 4 | ||||
-rw-r--r-- | drivers/scsi/megaraid.c | 11 | ||||
-rw-r--r-- | drivers/scsi/megaraid.h | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 26 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 19 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_version.h | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 5 |
17 files changed, 67 insertions, 99 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 3b56220fb900..3d4e3e3f3fc0 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -610,7 +610,8 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn, | |||
610 | atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status); | 610 | atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status); |
611 | atomic_set(&port->refcount, 0); | 611 | atomic_set(&port->refcount, 0); |
612 | 612 | ||
613 | dev_set_name(&port->sysfs_device, "0x%016llx", wwpn); | 613 | dev_set_name(&port->sysfs_device, "0x%016llx", |
614 | (unsigned long long)wwpn); | ||
614 | port->sysfs_device.parent = &adapter->ccw_device->dev; | 615 | port->sysfs_device.parent = &adapter->ccw_device->dev; |
615 | 616 | ||
616 | port->sysfs_device.release = zfcp_sysfs_port_release; | 617 | port->sysfs_device.release = zfcp_sysfs_port_release; |
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index b04038c74786..951a8d409d1d 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -116,7 +116,9 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
116 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, | 116 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, |
117 | NULL); | 117 | NULL); |
118 | zfcp_erp_wait(adapter); | 118 | zfcp_erp_wait(adapter); |
119 | goto out; | 119 | up(&zfcp_data.config_sema); |
120 | flush_work(&adapter->scan_work); | ||
121 | return 0; | ||
120 | 122 | ||
121 | out_scsi_register: | 123 | out_scsi_register: |
122 | zfcp_erp_thread_kill(adapter); | 124 | zfcp_erp_thread_kill(adapter); |
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 060f5f2352ec..31012d58cfb7 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -30,7 +30,7 @@ static void zfcp_dbf_hexdump(debug_info_t *dbf, void *to, int to_len, | |||
30 | dump->offset = offset; | 30 | dump->offset = offset; |
31 | dump->size = min(from_len - offset, room); | 31 | dump->size = min(from_len - offset, room); |
32 | memcpy(dump->data, from + offset, dump->size); | 32 | memcpy(dump->data, from + offset, dump->size); |
33 | debug_event(dbf, level, dump, dump->size); | 33 | debug_event(dbf, level, dump, dump->size + sizeof(*dump)); |
34 | } | 34 | } |
35 | } | 35 | } |
36 | 36 | ||
@@ -108,7 +108,7 @@ static int zfcp_dbf_view_header(debug_info_t *id, struct debug_view *view, | |||
108 | t.tv_sec, t.tv_nsec); | 108 | t.tv_sec, t.tv_nsec); |
109 | zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid); | 109 | zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid); |
110 | } else { | 110 | } else { |
111 | zfcp_dbf_outd(&p, NULL, dump->data, dump->size, dump->offset, | 111 | zfcp_dbf_outd(&p, "", dump->data, dump->size, dump->offset, |
112 | dump->total_size); | 112 | dump->total_size); |
113 | if ((dump->offset + dump->size) == dump->total_size) | 113 | if ((dump->offset + dump->size) == dump->total_size) |
114 | p += sprintf(p, "\n"); | 114 | p += sprintf(p, "\n"); |
@@ -366,6 +366,7 @@ static void zfcp_hba_dbf_view_response(char **p, | |||
366 | break; | 366 | break; |
367 | zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); | 367 | zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); |
368 | zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial); | 368 | zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial); |
369 | p += sprintf(*p, "\n"); | ||
369 | break; | 370 | break; |
370 | 371 | ||
371 | case FSF_QTCB_OPEN_PORT_WITH_DID: | 372 | case FSF_QTCB_OPEN_PORT_WITH_DID: |
@@ -465,7 +466,8 @@ static int zfcp_hba_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
465 | else if (strncmp(r->tag, "berr", ZFCP_DBF_TAG_SIZE) == 0) | 466 | else if (strncmp(r->tag, "berr", ZFCP_DBF_TAG_SIZE) == 0) |
466 | zfcp_hba_dbf_view_berr(&p, &r->u.berr); | 467 | zfcp_hba_dbf_view_berr(&p, &r->u.berr); |
467 | 468 | ||
468 | p += sprintf(p, "\n"); | 469 | if (strncmp(r->tag, "resp", ZFCP_DBF_TAG_SIZE) != 0) |
470 | p += sprintf(p, "\n"); | ||
469 | return p - out_buf; | 471 | return p - out_buf; |
470 | } | 472 | } |
471 | 473 | ||
@@ -880,6 +882,7 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) | |||
880 | struct ct_hdr *hdr = sg_virt(ct->req); | 882 | struct ct_hdr *hdr = sg_virt(ct->req); |
881 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; | 883 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; |
882 | struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req; | 884 | struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req; |
885 | int level = 3; | ||
883 | unsigned long flags; | 886 | unsigned long flags; |
884 | 887 | ||
885 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); | 888 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); |
@@ -896,9 +899,10 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) | |||
896 | oct->options = hdr->options; | 899 | oct->options = hdr->options; |
897 | oct->max_res_size = hdr->max_res_size; | 900 | oct->max_res_size = hdr->max_res_size; |
898 | oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr), | 901 | oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr), |
899 | ZFCP_DBF_CT_PAYLOAD); | 902 | ZFCP_DBF_SAN_MAX_PAYLOAD); |
900 | memcpy(oct->payload, (void *)hdr + sizeof(struct ct_hdr), oct->len); | 903 | debug_event(adapter->san_dbf, level, r, sizeof(*r)); |
901 | debug_event(adapter->san_dbf, 3, r, sizeof(*r)); | 904 | zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level, |
905 | (void *)hdr + sizeof(struct ct_hdr), oct->len); | ||
902 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 906 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
903 | } | 907 | } |
904 | 908 | ||
@@ -914,6 +918,7 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) | |||
914 | struct ct_hdr *hdr = sg_virt(ct->resp); | 918 | struct ct_hdr *hdr = sg_virt(ct->resp); |
915 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; | 919 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; |
916 | struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp; | 920 | struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp; |
921 | int level = 3; | ||
917 | unsigned long flags; | 922 | unsigned long flags; |
918 | 923 | ||
919 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); | 924 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); |
@@ -929,9 +934,10 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) | |||
929 | rct->expl = hdr->reason_code_expl; | 934 | rct->expl = hdr->reason_code_expl; |
930 | rct->vendor_unique = hdr->vendor_unique; | 935 | rct->vendor_unique = hdr->vendor_unique; |
931 | rct->len = min((int)ct->resp->length - (int)sizeof(struct ct_hdr), | 936 | rct->len = min((int)ct->resp->length - (int)sizeof(struct ct_hdr), |
932 | ZFCP_DBF_CT_PAYLOAD); | 937 | ZFCP_DBF_SAN_MAX_PAYLOAD); |
933 | memcpy(rct->payload, (void *)hdr + sizeof(struct ct_hdr), rct->len); | 938 | debug_event(adapter->san_dbf, level, r, sizeof(*r)); |
934 | debug_event(adapter->san_dbf, 3, r, sizeof(*r)); | 939 | zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level, |
940 | (void *)hdr + sizeof(struct ct_hdr), rct->len); | ||
935 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 941 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
936 | } | 942 | } |
937 | 943 | ||
@@ -954,7 +960,7 @@ static void zfcp_san_dbf_event_els(const char *tag, int level, | |||
954 | rec->u.els.ls_code = ls_code; | 960 | rec->u.els.ls_code = ls_code; |
955 | debug_event(adapter->san_dbf, level, rec, sizeof(*rec)); | 961 | debug_event(adapter->san_dbf, level, rec, sizeof(*rec)); |
956 | zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level, | 962 | zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level, |
957 | buffer, min(buflen, ZFCP_DBF_ELS_MAX_PAYLOAD)); | 963 | buffer, min(buflen, ZFCP_DBF_SAN_MAX_PAYLOAD)); |
958 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 964 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
959 | } | 965 | } |
960 | 966 | ||
@@ -1008,8 +1014,6 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1008 | char *out_buf, const char *in_buf) | 1014 | char *out_buf, const char *in_buf) |
1009 | { | 1015 | { |
1010 | struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf; | 1016 | struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf; |
1011 | char *buffer = NULL; | ||
1012 | int buflen = 0, total = 0; | ||
1013 | char *p = out_buf; | 1017 | char *p = out_buf; |
1014 | 1018 | ||
1015 | if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0) | 1019 | if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0) |
@@ -1029,9 +1033,6 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1029 | zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype); | 1033 | zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype); |
1030 | zfcp_dbf_out(&p, "options", "0x%02x", ct->options); | 1034 | zfcp_dbf_out(&p, "options", "0x%02x", ct->options); |
1031 | zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size); | 1035 | zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size); |
1032 | total = ct->len; | ||
1033 | buffer = ct->payload; | ||
1034 | buflen = min(total, ZFCP_DBF_CT_PAYLOAD); | ||
1035 | } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) { | 1036 | } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) { |
1036 | struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp; | 1037 | struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp; |
1037 | zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code); | 1038 | zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code); |
@@ -1039,23 +1040,12 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1039 | zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code); | 1040 | zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code); |
1040 | zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl); | 1041 | zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl); |
1041 | zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique); | 1042 | zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique); |
1042 | total = ct->len; | ||
1043 | buffer = ct->payload; | ||
1044 | buflen = min(total, ZFCP_DBF_CT_PAYLOAD); | ||
1045 | } else if (strncmp(r->tag, "oels", ZFCP_DBF_TAG_SIZE) == 0 || | 1043 | } else if (strncmp(r->tag, "oels", ZFCP_DBF_TAG_SIZE) == 0 || |
1046 | strncmp(r->tag, "rels", ZFCP_DBF_TAG_SIZE) == 0 || | 1044 | strncmp(r->tag, "rels", ZFCP_DBF_TAG_SIZE) == 0 || |
1047 | strncmp(r->tag, "iels", ZFCP_DBF_TAG_SIZE) == 0) { | 1045 | strncmp(r->tag, "iels", ZFCP_DBF_TAG_SIZE) == 0) { |
1048 | struct zfcp_san_dbf_record_els *els = &r->u.els; | 1046 | struct zfcp_san_dbf_record_els *els = &r->u.els; |
1049 | zfcp_dbf_out(&p, "ls_code", "0x%02x", els->ls_code); | 1047 | zfcp_dbf_out(&p, "ls_code", "0x%02x", els->ls_code); |
1050 | total = els->len; | ||
1051 | buffer = els->payload; | ||
1052 | buflen = min(total, ZFCP_DBF_ELS_PAYLOAD); | ||
1053 | } | 1048 | } |
1054 | |||
1055 | zfcp_dbf_outd(&p, "payload", buffer, buflen, 0, total); | ||
1056 | if (buflen == total) | ||
1057 | p += sprintf(p, "\n"); | ||
1058 | |||
1059 | return p - out_buf; | 1049 | return p - out_buf; |
1060 | } | 1050 | } |
1061 | 1051 | ||
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h index e8f450801fea..5d6b2dff855b 100644 --- a/drivers/s390/scsi/zfcp_dbf.h +++ b/drivers/s390/scsi/zfcp_dbf.h | |||
@@ -163,8 +163,6 @@ struct zfcp_san_dbf_record_ct_request { | |||
163 | u8 options; | 163 | u8 options; |
164 | u16 max_res_size; | 164 | u16 max_res_size; |
165 | u32 len; | 165 | u32 len; |
166 | #define ZFCP_DBF_CT_PAYLOAD 24 | ||
167 | u8 payload[ZFCP_DBF_CT_PAYLOAD]; | ||
168 | } __attribute__ ((packed)); | 166 | } __attribute__ ((packed)); |
169 | 167 | ||
170 | struct zfcp_san_dbf_record_ct_response { | 168 | struct zfcp_san_dbf_record_ct_response { |
@@ -174,15 +172,11 @@ struct zfcp_san_dbf_record_ct_response { | |||
174 | u8 expl; | 172 | u8 expl; |
175 | u8 vendor_unique; | 173 | u8 vendor_unique; |
176 | u32 len; | 174 | u32 len; |
177 | u8 payload[ZFCP_DBF_CT_PAYLOAD]; | ||
178 | } __attribute__ ((packed)); | 175 | } __attribute__ ((packed)); |
179 | 176 | ||
180 | struct zfcp_san_dbf_record_els { | 177 | struct zfcp_san_dbf_record_els { |
181 | u8 ls_code; | 178 | u8 ls_code; |
182 | u32 len; | 179 | u32 len; |
183 | #define ZFCP_DBF_ELS_PAYLOAD 32 | ||
184 | #define ZFCP_DBF_ELS_MAX_PAYLOAD 1024 | ||
185 | u8 payload[ZFCP_DBF_ELS_PAYLOAD]; | ||
186 | } __attribute__ ((packed)); | 180 | } __attribute__ ((packed)); |
187 | 181 | ||
188 | struct zfcp_san_dbf_record { | 182 | struct zfcp_san_dbf_record { |
@@ -196,6 +190,8 @@ struct zfcp_san_dbf_record { | |||
196 | struct zfcp_san_dbf_record_ct_response ct_resp; | 190 | struct zfcp_san_dbf_record_ct_response ct_resp; |
197 | struct zfcp_san_dbf_record_els els; | 191 | struct zfcp_san_dbf_record_els els; |
198 | } u; | 192 | } u; |
193 | #define ZFCP_DBF_SAN_MAX_PAYLOAD 1024 | ||
194 | u8 payload[32]; | ||
199 | } __attribute__ ((packed)); | 195 | } __attribute__ ((packed)); |
200 | 196 | ||
201 | struct zfcp_scsi_dbf_record { | 197 | struct zfcp_scsi_dbf_record { |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 9040f738ff33..35364f64da7f 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -472,6 +472,7 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) | |||
472 | ZFCP_STATUS_ERP_TIMEDOUT)) { | 472 | ZFCP_STATUS_ERP_TIMEDOUT)) { |
473 | act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; | 473 | act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; |
474 | zfcp_rec_dbf_event_action(142, act); | 474 | zfcp_rec_dbf_event_action(142, act); |
475 | act->fsf_req->erp_action = NULL; | ||
475 | } | 476 | } |
476 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) | 477 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) |
477 | zfcp_rec_dbf_event_action(143, act); | 478 | zfcp_rec_dbf_event_action(143, act); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 5ae1d497e5ed..d024442ee128 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -683,6 +683,7 @@ static struct zfcp_fsf_req *zfcp_fsf_alloc_noqtcb(mempool_t *pool) | |||
683 | if (!req) | 683 | if (!req) |
684 | return NULL; | 684 | return NULL; |
685 | memset(req, 0, sizeof(*req)); | 685 | memset(req, 0, sizeof(*req)); |
686 | req->pool = pool; | ||
686 | return req; | 687 | return req; |
687 | } | 688 | } |
688 | 689 | ||
@@ -769,28 +770,24 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_adapter *adapter, | |||
769 | static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) | 770 | static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) |
770 | { | 771 | { |
771 | struct zfcp_adapter *adapter = req->adapter; | 772 | struct zfcp_adapter *adapter = req->adapter; |
772 | struct zfcp_qdio_queue *req_q = &adapter->req_q; | 773 | unsigned long flags; |
773 | int idx; | 774 | int idx; |
774 | 775 | ||
775 | /* put allocated FSF request into hash table */ | 776 | /* put allocated FSF request into hash table */ |
776 | spin_lock(&adapter->req_list_lock); | 777 | spin_lock_irqsave(&adapter->req_list_lock, flags); |
777 | idx = zfcp_reqlist_hash(req->req_id); | 778 | idx = zfcp_reqlist_hash(req->req_id); |
778 | list_add_tail(&req->list, &adapter->req_list[idx]); | 779 | list_add_tail(&req->list, &adapter->req_list[idx]); |
779 | spin_unlock(&adapter->req_list_lock); | 780 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); |
780 | 781 | ||
781 | req->qdio_outb_usage = atomic_read(&req_q->count); | 782 | req->qdio_outb_usage = atomic_read(&adapter->req_q.count); |
782 | req->issued = get_clock(); | 783 | req->issued = get_clock(); |
783 | if (zfcp_qdio_send(req)) { | 784 | if (zfcp_qdio_send(req)) { |
784 | /* Queues are down..... */ | ||
785 | del_timer(&req->timer); | 785 | del_timer(&req->timer); |
786 | spin_lock(&adapter->req_list_lock); | 786 | spin_lock_irqsave(&adapter->req_list_lock, flags); |
787 | zfcp_reqlist_remove(adapter, req); | 787 | /* lookup request again, list might have changed */ |
788 | spin_unlock(&adapter->req_list_lock); | 788 | if (zfcp_reqlist_find_safe(adapter, req)) |
789 | /* undo changes in request queue made for this request */ | 789 | zfcp_reqlist_remove(adapter, req); |
790 | atomic_add(req->sbal_number, &req_q->count); | 790 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); |
791 | req_q->first -= req->sbal_number; | ||
792 | req_q->first += QDIO_MAX_BUFFERS_PER_Q; | ||
793 | req_q->first %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ | ||
794 | zfcp_erp_adapter_reopen(adapter, 0, 116, req); | 791 | zfcp_erp_adapter_reopen(adapter, 0, 116, req); |
795 | return -EIO; | 792 | return -EIO; |
796 | } | 793 | } |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index ca8f85f3dad4..e46fd3e9f68f 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -24,14 +24,10 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) | |||
24 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | 24 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) |
25 | { | 25 | { |
26 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; | 26 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; |
27 | WARN_ON(!unit); | 27 | atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); |
28 | if (unit) { | 28 | unit->device = NULL; |
29 | atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); | 29 | zfcp_erp_unit_failed(unit, 12, NULL); |
30 | sdpnt->hostdata = NULL; | 30 | zfcp_unit_put(unit); |
31 | unit->device = NULL; | ||
32 | zfcp_erp_unit_failed(unit, 12, NULL); | ||
33 | zfcp_unit_put(unit); | ||
34 | } | ||
35 | } | 31 | } |
36 | 32 | ||
37 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) | 33 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) |
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 8aba4fdfb522..6194ed5d02c4 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -2445,7 +2445,7 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) | |||
2445 | hba_status = detailed_status >> 8; | 2445 | hba_status = detailed_status >> 8; |
2446 | 2446 | ||
2447 | // calculate resid for sg | 2447 | // calculate resid for sg |
2448 | scsi_set_resid(cmd, scsi_bufflen(cmd) - readl(reply+5)); | 2448 | scsi_set_resid(cmd, scsi_bufflen(cmd) - readl(reply+20)); |
2449 | 2449 | ||
2450 | pHba = (adpt_hba*) cmd->device->host->hostdata[0]; | 2450 | pHba = (adpt_hba*) cmd->device->host->hostdata[0]; |
2451 | 2451 | ||
@@ -2456,7 +2456,7 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) | |||
2456 | case I2O_SCSI_DSC_SUCCESS: | 2456 | case I2O_SCSI_DSC_SUCCESS: |
2457 | cmd->result = (DID_OK << 16); | 2457 | cmd->result = (DID_OK << 16); |
2458 | // handle underflow | 2458 | // handle underflow |
2459 | if(readl(reply+5) < cmd->underflow ) { | 2459 | if (readl(reply+20) < cmd->underflow) { |
2460 | cmd->result = (DID_ERROR <<16); | 2460 | cmd->result = (DID_ERROR <<16); |
2461 | printk(KERN_WARNING"%s: SCSI CMD underflow\n",pHba->name); | 2461 | printk(KERN_WARNING"%s: SCSI CMD underflow\n",pHba->name); |
2462 | } | 2462 | } |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 28c9da7d4a5c..7dc62deb4087 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -4402,6 +4402,10 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) | |||
4402 | scb_t *scb; | 4402 | scb_t *scb; |
4403 | int rval; | 4403 | int rval; |
4404 | 4404 | ||
4405 | scmd = scsi_allocate_command(GFP_KERNEL); | ||
4406 | if (!scmd) | ||
4407 | return -ENOMEM; | ||
4408 | |||
4405 | /* | 4409 | /* |
4406 | * The internal commands share one command id and hence are | 4410 | * The internal commands share one command id and hence are |
4407 | * serialized. This is so because we want to reserve maximum number of | 4411 | * serialized. This is so because we want to reserve maximum number of |
@@ -4412,12 +4416,11 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) | |||
4412 | scb = &adapter->int_scb; | 4416 | scb = &adapter->int_scb; |
4413 | memset(scb, 0, sizeof(scb_t)); | 4417 | memset(scb, 0, sizeof(scb_t)); |
4414 | 4418 | ||
4415 | scmd = &adapter->int_scmd; | ||
4416 | memset(scmd, 0, sizeof(Scsi_Cmnd)); | ||
4417 | |||
4418 | sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL); | 4419 | sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL); |
4419 | scmd->device = sdev; | 4420 | scmd->device = sdev; |
4420 | 4421 | ||
4422 | memset(adapter->int_cdb, 0, sizeof(adapter->int_cdb)); | ||
4423 | scmd->cmnd = adapter->int_cdb; | ||
4421 | scmd->device->host = adapter->host; | 4424 | scmd->device->host = adapter->host; |
4422 | scmd->host_scribble = (void *)scb; | 4425 | scmd->host_scribble = (void *)scb; |
4423 | scmd->cmnd[0] = MEGA_INTERNAL_CMD; | 4426 | scmd->cmnd[0] = MEGA_INTERNAL_CMD; |
@@ -4456,6 +4459,8 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) | |||
4456 | 4459 | ||
4457 | mutex_unlock(&adapter->int_mtx); | 4460 | mutex_unlock(&adapter->int_mtx); |
4458 | 4461 | ||
4462 | scsi_free_command(GFP_KERNEL, scmd); | ||
4463 | |||
4459 | return rval; | 4464 | return rval; |
4460 | } | 4465 | } |
4461 | 4466 | ||
diff --git a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h index ee70bd4ae4ba..795201fa0b48 100644 --- a/drivers/scsi/megaraid.h +++ b/drivers/scsi/megaraid.h | |||
@@ -888,8 +888,8 @@ typedef struct { | |||
888 | 888 | ||
889 | u8 sglen; /* f/w supported scatter-gather list length */ | 889 | u8 sglen; /* f/w supported scatter-gather list length */ |
890 | 890 | ||
891 | unsigned char int_cdb[MAX_COMMAND_SIZE]; | ||
891 | scb_t int_scb; | 892 | scb_t int_scb; |
892 | Scsi_Cmnd int_scmd; | ||
893 | struct mutex int_mtx; /* To synchronize the internal | 893 | struct mutex int_mtx; /* To synchronize the internal |
894 | commands */ | 894 | commands */ |
895 | struct completion int_waitq; /* wait queue for internal | 895 | struct completion int_waitq; /* wait queue for internal |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index f25f41a499e5..b97194096d8e 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2547,7 +2547,6 @@ typedef struct scsi_qla_host { | |||
2547 | uint8_t fcode_revision[16]; | 2547 | uint8_t fcode_revision[16]; |
2548 | uint32_t fw_revision[4]; | 2548 | uint32_t fw_revision[4]; |
2549 | 2549 | ||
2550 | uint16_t fdt_odd_index; | ||
2551 | uint32_t fdt_wrt_disable; | 2550 | uint32_t fdt_wrt_disable; |
2552 | uint32_t fdt_erase_cmd; | 2551 | uint32_t fdt_erase_cmd; |
2553 | uint32_t fdt_block_size; | 2552 | uint32_t fdt_block_size; |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index a470f2d3270d..4218f20f5ed5 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -140,7 +140,6 @@ int | |||
140 | qla2100_pci_config(scsi_qla_host_t *ha) | 140 | qla2100_pci_config(scsi_qla_host_t *ha) |
141 | { | 141 | { |
142 | uint16_t w; | 142 | uint16_t w; |
143 | uint32_t d; | ||
144 | unsigned long flags; | 143 | unsigned long flags; |
145 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 144 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
146 | 145 | ||
@@ -151,10 +150,7 @@ qla2100_pci_config(scsi_qla_host_t *ha) | |||
151 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); | 150 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); |
152 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); | 151 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); |
153 | 152 | ||
154 | /* Reset expansion ROM address decode enable */ | 153 | pci_disable_rom(ha->pdev); |
155 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
156 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
157 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
158 | 154 | ||
159 | /* Get PCI bus information. */ | 155 | /* Get PCI bus information. */ |
160 | spin_lock_irqsave(&ha->hardware_lock, flags); | 156 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -174,7 +170,6 @@ int | |||
174 | qla2300_pci_config(scsi_qla_host_t *ha) | 170 | qla2300_pci_config(scsi_qla_host_t *ha) |
175 | { | 171 | { |
176 | uint16_t w; | 172 | uint16_t w; |
177 | uint32_t d; | ||
178 | unsigned long flags = 0; | 173 | unsigned long flags = 0; |
179 | uint32_t cnt; | 174 | uint32_t cnt; |
180 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 175 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
@@ -236,10 +231,7 @@ qla2300_pci_config(scsi_qla_host_t *ha) | |||
236 | 231 | ||
237 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); | 232 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); |
238 | 233 | ||
239 | /* Reset expansion ROM address decode enable */ | 234 | pci_disable_rom(ha->pdev); |
240 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
241 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
242 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
243 | 235 | ||
244 | /* Get PCI bus information. */ | 236 | /* Get PCI bus information. */ |
245 | spin_lock_irqsave(&ha->hardware_lock, flags); | 237 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -259,7 +251,6 @@ int | |||
259 | qla24xx_pci_config(scsi_qla_host_t *ha) | 251 | qla24xx_pci_config(scsi_qla_host_t *ha) |
260 | { | 252 | { |
261 | uint16_t w; | 253 | uint16_t w; |
262 | uint32_t d; | ||
263 | unsigned long flags = 0; | 254 | unsigned long flags = 0; |
264 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 255 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
265 | 256 | ||
@@ -281,10 +272,7 @@ qla24xx_pci_config(scsi_qla_host_t *ha) | |||
281 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) | 272 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) |
282 | pcie_set_readrq(ha->pdev, 2048); | 273 | pcie_set_readrq(ha->pdev, 2048); |
283 | 274 | ||
284 | /* Reset expansion ROM address decode enable */ | 275 | pci_disable_rom(ha->pdev); |
285 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
286 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
287 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
288 | 276 | ||
289 | ha->chip_revision = ha->pdev->revision; | 277 | ha->chip_revision = ha->pdev->revision; |
290 | 278 | ||
@@ -306,7 +294,6 @@ int | |||
306 | qla25xx_pci_config(scsi_qla_host_t *ha) | 294 | qla25xx_pci_config(scsi_qla_host_t *ha) |
307 | { | 295 | { |
308 | uint16_t w; | 296 | uint16_t w; |
309 | uint32_t d; | ||
310 | 297 | ||
311 | pci_set_master(ha->pdev); | 298 | pci_set_master(ha->pdev); |
312 | pci_try_set_mwi(ha->pdev); | 299 | pci_try_set_mwi(ha->pdev); |
@@ -320,10 +307,7 @@ qla25xx_pci_config(scsi_qla_host_t *ha) | |||
320 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) | 307 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) |
321 | pcie_set_readrq(ha->pdev, 2048); | 308 | pcie_set_readrq(ha->pdev, 2048); |
322 | 309 | ||
323 | /* Reset expansion ROM address decode enable */ | 310 | pci_disable_rom(ha->pdev); |
324 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
325 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
326 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
327 | 311 | ||
328 | ha->chip_revision = ha->pdev->revision; | 312 | ha->chip_revision = ha->pdev->revision; |
329 | 313 | ||
@@ -980,7 +964,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) | |||
980 | &ha->fw_minor_version, | 964 | &ha->fw_minor_version, |
981 | &ha->fw_subminor_version, | 965 | &ha->fw_subminor_version, |
982 | &ha->fw_attributes, &ha->fw_memory_size); | 966 | &ha->fw_attributes, &ha->fw_memory_size); |
983 | qla2x00_resize_request_q(ha); | ||
984 | ha->flags.npiv_supported = 0; | 967 | ha->flags.npiv_supported = 0; |
985 | if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) || | 968 | if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) || |
986 | IS_QLA84XX(ha)) && | 969 | IS_QLA84XX(ha)) && |
@@ -992,6 +975,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) | |||
992 | ha->max_npiv_vports = | 975 | ha->max_npiv_vports = |
993 | MIN_MULTI_ID_FABRIC - 1; | 976 | MIN_MULTI_ID_FABRIC - 1; |
994 | } | 977 | } |
978 | qla2x00_resize_request_q(ha); | ||
995 | 979 | ||
996 | if (ql2xallocfwdump) | 980 | if (ql2xallocfwdump) |
997 | qla2x00_alloc_fw_dump(ha); | 981 | qla2x00_alloc_fw_dump(ha); |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 36bc6851e23d..3402746ec128 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -1964,7 +1964,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt, | |||
1964 | *cur_iocb_cnt = mcp->mb[7]; | 1964 | *cur_iocb_cnt = mcp->mb[7]; |
1965 | if (orig_iocb_cnt) | 1965 | if (orig_iocb_cnt) |
1966 | *orig_iocb_cnt = mcp->mb[10]; | 1966 | *orig_iocb_cnt = mcp->mb[10]; |
1967 | if (max_npiv_vports) | 1967 | if (ha->flags.npiv_supported && max_npiv_vports) |
1968 | *max_npiv_vports = mcp->mb[11]; | 1968 | *max_npiv_vports = mcp->mb[11]; |
1969 | } | 1969 | } |
1970 | 1970 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 21dd182ad512..35567203ef61 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -728,6 +728,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
728 | if (ha->isp_ops->abort_command(ha, sp)) { | 728 | if (ha->isp_ops->abort_command(ha, sp)) { |
729 | DEBUG2(printk("%s(%ld): abort_command " | 729 | DEBUG2(printk("%s(%ld): abort_command " |
730 | "mbx failed.\n", __func__, ha->host_no)); | 730 | "mbx failed.\n", __func__, ha->host_no)); |
731 | ret = FAILED; | ||
731 | } else { | 732 | } else { |
732 | DEBUG3(printk("%s(%ld): abort_command " | 733 | DEBUG3(printk("%s(%ld): abort_command " |
733 | "mbx success.\n", __func__, ha->host_no)); | 734 | "mbx success.\n", __func__, ha->host_no)); |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 90a13211717f..e4af678eb2d6 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -722,6 +722,7 @@ done: | |||
722 | static void | 722 | static void |
723 | qla2xxx_get_fdt_info(scsi_qla_host_t *ha) | 723 | qla2xxx_get_fdt_info(scsi_qla_host_t *ha) |
724 | { | 724 | { |
725 | #define FLASH_BLK_SIZE_4K 0x1000 | ||
725 | #define FLASH_BLK_SIZE_32K 0x8000 | 726 | #define FLASH_BLK_SIZE_32K 0x8000 |
726 | #define FLASH_BLK_SIZE_64K 0x10000 | 727 | #define FLASH_BLK_SIZE_64K 0x10000 |
727 | const char *loc, *locations[] = { "MID", "FDT" }; | 728 | const char *loc, *locations[] = { "MID", "FDT" }; |
@@ -755,7 +756,6 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *ha) | |||
755 | loc = locations[1]; | 756 | loc = locations[1]; |
756 | mid = le16_to_cpu(fdt->man_id); | 757 | mid = le16_to_cpu(fdt->man_id); |
757 | fid = le16_to_cpu(fdt->id); | 758 | fid = le16_to_cpu(fdt->id); |
758 | ha->fdt_odd_index = mid == 0x1f; | ||
759 | ha->fdt_wrt_disable = fdt->wrt_disable_bits; | 759 | ha->fdt_wrt_disable = fdt->wrt_disable_bits; |
760 | ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd); | 760 | ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd); |
761 | ha->fdt_block_size = le32_to_cpu(fdt->block_size); | 761 | ha->fdt_block_size = le32_to_cpu(fdt->block_size); |
@@ -788,8 +788,7 @@ no_flash_data: | |||
788 | ha->fdt_block_size = FLASH_BLK_SIZE_64K; | 788 | ha->fdt_block_size = FLASH_BLK_SIZE_64K; |
789 | break; | 789 | break; |
790 | case 0x1f: /* Atmel 26DF081A. */ | 790 | case 0x1f: /* Atmel 26DF081A. */ |
791 | ha->fdt_odd_index = 1; | 791 | ha->fdt_block_size = FLASH_BLK_SIZE_4K; |
792 | ha->fdt_block_size = FLASH_BLK_SIZE_64K; | ||
793 | ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320); | 792 | ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320); |
794 | ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339); | 793 | ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339); |
795 | ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336); | 794 | ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336); |
@@ -801,9 +800,9 @@ no_flash_data: | |||
801 | } | 800 | } |
802 | done: | 801 | done: |
803 | DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x " | 802 | DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x " |
804 | "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", loc, mid, fid, | 803 | "pro=%x upro=%x wrtd=0x%x blk=0x%x.\n", loc, mid, fid, |
805 | ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd, | 804 | ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd, |
806 | ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable, | 805 | ha->fdt_unprotect_sec_cmd, ha->fdt_wrt_disable, |
807 | ha->fdt_block_size)); | 806 | ha->fdt_block_size)); |
808 | } | 807 | } |
809 | 808 | ||
@@ -987,13 +986,9 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, | |||
987 | qla24xx_unprotect_flash(ha); | 986 | qla24xx_unprotect_flash(ha); |
988 | 987 | ||
989 | for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) { | 988 | for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) { |
990 | if (ha->fdt_odd_index) { | 989 | |
991 | findex = faddr << 2; | 990 | findex = faddr; |
992 | fdata = findex & sec_mask; | 991 | fdata = (findex & sec_mask) << 2; |
993 | } else { | ||
994 | findex = faddr; | ||
995 | fdata = (findex & sec_mask) << 2; | ||
996 | } | ||
997 | 992 | ||
998 | /* Are we at the beginning of a sector? */ | 993 | /* Are we at the beginning of a sector? */ |
999 | if ((findex & rest_addr) == 0) { | 994 | if ((findex & rest_addr) == 0) { |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index be5e299df528..eea6720adf16 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-k8" | 10 | #define QLA2XXX_VERSION "8.02.01-k9" |
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 |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 94ed262bdf0c..386361778ebb 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1340,9 +1340,10 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) | |||
1340 | * LLD/transport was disrupted during processing of the IO. | 1340 | * LLD/transport was disrupted during processing of the IO. |
1341 | * The transport class is now blocked/blocking, | 1341 | * The transport class is now blocked/blocking, |
1342 | * and the transport will decide what to do with the IO | 1342 | * and the transport will decide what to do with the IO |
1343 | * based on its timers and recovery capablilities. | 1343 | * based on its timers and recovery capablilities if |
1344 | * there are enough retries. | ||
1344 | */ | 1345 | */ |
1345 | return ADD_TO_MLQUEUE; | 1346 | goto maybe_retry; |
1346 | case DID_TRANSPORT_FAILFAST: | 1347 | case DID_TRANSPORT_FAILFAST: |
1347 | /* | 1348 | /* |
1348 | * The transport decided to failfast the IO (most likely | 1349 | * The transport decided to failfast the IO (most likely |