aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-11 10:46:09 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-11 10:46:09 -0400
commitcabe456902e709095ebf1481342ea89910887d60 (patch)
treec906ff1a07786fa09d203acbc7b9023a981be121 /drivers/scsi
parent0d4cbb5e7f60b2f1a4d8b7f6ea4cc264262c7a01 (diff)
parent6724add1b5cfb020ba8f5532efe430d1ccd5fc30 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] libiscsi: sync up iscsi and scsi eh's access to the connection [SCSI] libiscsi: fix null ptr regression when aborting a command with data to transfer [SCSI] qla2xxx: Update version number to 8.02.00-k3. [SCSI] qla2xxx: Correct mailbox register dump for FWI2 capable ISPs. [SCSI] qla2xxx: Correct 8GB iIDMA support. [SCSI] qla2xxx: Correct management-server login-state synchronization issue. [SCSI] qla2xxx: Don't modify parity bits during ISP25XX restart. [SCSI] qla2xxx: Allocate enough space for the full PCI descriptor. [SCSI] zfcp: fix the data buffer accessor patch [SCSI] zfcp: allocate gid_pn_data objects from gid_pn_cache [SCSI] zfcp: fix memory leak
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libiscsi.c65
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c21
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h1
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c28
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c51
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c1
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_version.h2
8 files changed, 98 insertions, 73 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 5606d1e62978..efceed451b46 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -737,12 +737,19 @@ check_mgmt:
737 */ 737 */
738 conn->ctask = list_entry(conn->xmitqueue.next, 738 conn->ctask = list_entry(conn->xmitqueue.next,
739 struct iscsi_cmd_task, running); 739 struct iscsi_cmd_task, running);
740 if (conn->ctask->state == ISCSI_TASK_PENDING) { 740 switch (conn->ctask->state) {
741 case ISCSI_TASK_ABORTING:
742 break;
743 case ISCSI_TASK_PENDING:
741 iscsi_prep_scsi_cmd_pdu(conn->ctask); 744 iscsi_prep_scsi_cmd_pdu(conn->ctask);
742 conn->session->tt->init_cmd_task(conn->ctask); 745 conn->session->tt->init_cmd_task(conn->ctask);
746 /* fall through */
747 default:
748 conn->ctask->state = ISCSI_TASK_RUNNING;
749 break;
743 } 750 }
744 conn->ctask->state = ISCSI_TASK_RUNNING;
745 list_move_tail(conn->xmitqueue.next, &conn->run_list); 751 list_move_tail(conn->xmitqueue.next, &conn->run_list);
752
746 rc = iscsi_xmit_ctask(conn); 753 rc = iscsi_xmit_ctask(conn);
747 if (rc) 754 if (rc)
748 goto again; 755 goto again;
@@ -1049,7 +1056,9 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
1049 ctask->mtask = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)hdr, 1056 ctask->mtask = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)hdr,
1050 NULL, 0); 1057 NULL, 0);
1051 if (!ctask->mtask) { 1058 if (!ctask->mtask) {
1059 spin_unlock_bh(&session->lock);
1052 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 1060 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
1061 spin_lock_bh(&session->lock)
1053 debug_scsi("abort sent failure [itt 0x%x]\n", ctask->itt); 1062 debug_scsi("abort sent failure [itt 0x%x]\n", ctask->itt);
1054 return -EPERM; 1063 return -EPERM;
1055 } 1064 }
@@ -1066,6 +1075,7 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
1066 debug_scsi("abort set timeout [itt 0x%x]\n", ctask->itt); 1075 debug_scsi("abort set timeout [itt 0x%x]\n", ctask->itt);
1067 } 1076 }
1068 spin_unlock_bh(&session->lock); 1077 spin_unlock_bh(&session->lock);
1078 mutex_unlock(&session->eh_mutex);
1069 scsi_queue_work(session->host, &conn->xmitwork); 1079 scsi_queue_work(session->host, &conn->xmitwork);
1070 1080
1071 /* 1081 /*
@@ -1083,6 +1093,7 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
1083 if (signal_pending(current)) 1093 if (signal_pending(current))
1084 flush_signals(current); 1094 flush_signals(current);
1085 del_timer_sync(&conn->tmabort_timer); 1095 del_timer_sync(&conn->tmabort_timer);
1096 mutex_lock(&session->eh_mutex);
1086 spin_lock_bh(&session->lock); 1097 spin_lock_bh(&session->lock);
1087 return 0; 1098 return 0;
1088} 1099}
@@ -1158,31 +1169,45 @@ static void fail_command(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask,
1158 __iscsi_put_ctask(ctask); 1169 __iscsi_put_ctask(ctask);
1159} 1170}
1160 1171
1172static void iscsi_suspend_tx(struct iscsi_conn *conn)
1173{
1174 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1175 scsi_flush_work(conn->session->host);
1176}
1177
1178static void iscsi_start_tx(struct iscsi_conn *conn)
1179{
1180 clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1181 scsi_queue_work(conn->session->host, &conn->xmitwork);
1182}
1183
1161int iscsi_eh_abort(struct scsi_cmnd *sc) 1184int iscsi_eh_abort(struct scsi_cmnd *sc)
1162{ 1185{
1186 struct Scsi_Host *host = sc->device->host;
1187 struct iscsi_session *session = iscsi_hostdata(host->hostdata);
1163 struct iscsi_cmd_task *ctask; 1188 struct iscsi_cmd_task *ctask;
1164 struct iscsi_conn *conn; 1189 struct iscsi_conn *conn;
1165 struct iscsi_session *session;
1166 int rc; 1190 int rc;
1167 1191
1192 mutex_lock(&session->eh_mutex);
1193 spin_lock_bh(&session->lock);
1168 /* 1194 /*
1169 * if session was ISCSI_STATE_IN_RECOVERY then we may not have 1195 * if session was ISCSI_STATE_IN_RECOVERY then we may not have
1170 * got the command. 1196 * got the command.
1171 */ 1197 */
1172 if (!sc->SCp.ptr) { 1198 if (!sc->SCp.ptr) {
1173 debug_scsi("sc never reached iscsi layer or it completed.\n"); 1199 debug_scsi("sc never reached iscsi layer or it completed.\n");
1200 spin_unlock_bh(&session->lock);
1201 mutex_unlock(&session->eh_mutex);
1174 return SUCCESS; 1202 return SUCCESS;
1175 } 1203 }
1176 1204
1177 ctask = (struct iscsi_cmd_task *)sc->SCp.ptr; 1205 ctask = (struct iscsi_cmd_task *)sc->SCp.ptr;
1178 conn = ctask->conn; 1206 conn = ctask->conn;
1179 session = conn->session;
1180 1207
1181 conn->eh_abort_cnt++; 1208 conn->eh_abort_cnt++;
1182 debug_scsi("aborting [sc %p itt 0x%x]\n", sc, ctask->itt); 1209 debug_scsi("aborting [sc %p itt 0x%x]\n", sc, ctask->itt);
1183 1210
1184 spin_lock_bh(&session->lock);
1185
1186 /* 1211 /*
1187 * If we are not logged in or we have started a new session 1212 * If we are not logged in or we have started a new session
1188 * then let the host reset code handle this 1213 * then let the host reset code handle this
@@ -1219,6 +1244,7 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
1219 switch (conn->tmabort_state) { 1244 switch (conn->tmabort_state) {
1220 case TMABORT_SUCCESS: 1245 case TMABORT_SUCCESS:
1221 spin_unlock_bh(&session->lock); 1246 spin_unlock_bh(&session->lock);
1247 iscsi_suspend_tx(conn);
1222 /* 1248 /*
1223 * clean up task if aborted. grab the recv lock as a writer 1249 * clean up task if aborted. grab the recv lock as a writer
1224 */ 1250 */
@@ -1227,11 +1253,7 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
1227 fail_command(conn, ctask, DID_ABORT << 16); 1253 fail_command(conn, ctask, DID_ABORT << 16);
1228 spin_unlock(&session->lock); 1254 spin_unlock(&session->lock);
1229 write_unlock_bh(conn->recv_lock); 1255 write_unlock_bh(conn->recv_lock);
1230 /* 1256 iscsi_start_tx(conn);
1231 * make sure xmit thread is not still touching the
1232 * ctask/scsi_cmnd
1233 */
1234 scsi_flush_work(session->host);
1235 goto success_unlocked; 1257 goto success_unlocked;
1236 case TMABORT_NOT_FOUND: 1258 case TMABORT_NOT_FOUND:
1237 if (!ctask->sc) { 1259 if (!ctask->sc) {
@@ -1251,12 +1273,14 @@ success:
1251 spin_unlock_bh(&session->lock); 1273 spin_unlock_bh(&session->lock);
1252success_unlocked: 1274success_unlocked:
1253 debug_scsi("abort success [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); 1275 debug_scsi("abort success [sc %lx itt 0x%x]\n", (long)sc, ctask->itt);
1276 mutex_unlock(&session->eh_mutex);
1254 return SUCCESS; 1277 return SUCCESS;
1255 1278
1256failed: 1279failed:
1257 spin_unlock_bh(&session->lock); 1280 spin_unlock_bh(&session->lock);
1258failed_unlocked: 1281failed_unlocked:
1259 debug_scsi("abort failed [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); 1282 debug_scsi("abort failed [sc %lx itt 0x%x]\n", (long)sc, ctask->itt);
1283 mutex_unlock(&session->eh_mutex);
1260 return FAILED; 1284 return FAILED;
1261} 1285}
1262EXPORT_SYMBOL_GPL(iscsi_eh_abort); 1286EXPORT_SYMBOL_GPL(iscsi_eh_abort);
@@ -1403,6 +1427,7 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
1403 session->max_cmdsn = initial_cmdsn + 1; 1427 session->max_cmdsn = initial_cmdsn + 1;
1404 session->max_r2t = 1; 1428 session->max_r2t = 1;
1405 session->tt = iscsit; 1429 session->tt = iscsit;
1430 mutex_init(&session->eh_mutex);
1406 1431
1407 /* initialize SCSI PDU commands pool */ 1432 /* initialize SCSI PDU commands pool */
1408 if (iscsi_pool_init(&session->cmdpool, session->cmds_max, 1433 if (iscsi_pool_init(&session->cmdpool, session->cmds_max,
@@ -1736,9 +1761,22 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
1736{ 1761{
1737 int old_stop_stage; 1762 int old_stop_stage;
1738 1763
1764 mutex_lock(&session->eh_mutex);
1739 spin_lock_bh(&session->lock); 1765 spin_lock_bh(&session->lock);
1740 if (conn->stop_stage == STOP_CONN_TERM) { 1766 if (conn->stop_stage == STOP_CONN_TERM) {
1741 spin_unlock_bh(&session->lock); 1767 spin_unlock_bh(&session->lock);
1768 mutex_unlock(&session->eh_mutex);
1769 return;
1770 }
1771
1772 /*
1773 * The LLD either freed/unset the lock on us, or userspace called
1774 * stop but did not create a proper connection (connection was never
1775 * bound or it was unbound then stop was called).
1776 */
1777 if (!conn->recv_lock) {
1778 spin_unlock_bh(&session->lock);
1779 mutex_unlock(&session->eh_mutex);
1742 return; 1780 return;
1743 } 1781 }
1744 1782
@@ -1755,9 +1793,9 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
1755 old_stop_stage = conn->stop_stage; 1793 old_stop_stage = conn->stop_stage;
1756 conn->stop_stage = flag; 1794 conn->stop_stage = flag;
1757 conn->c_stage = ISCSI_CONN_STOPPED; 1795 conn->c_stage = ISCSI_CONN_STOPPED;
1758 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1759 spin_unlock_bh(&session->lock); 1796 spin_unlock_bh(&session->lock);
1760 scsi_flush_work(session->host); 1797
1798 iscsi_suspend_tx(conn);
1761 1799
1762 write_lock_bh(conn->recv_lock); 1800 write_lock_bh(conn->recv_lock);
1763 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx); 1801 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
@@ -1786,6 +1824,7 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
1786 fail_all_commands(conn); 1824 fail_all_commands(conn);
1787 flush_control_queues(session, conn); 1825 flush_control_queues(session, conn);
1788 spin_unlock_bh(&session->lock); 1826 spin_unlock_bh(&session->lock);
1827 mutex_unlock(&session->eh_mutex);
1789} 1828}
1790 1829
1791void iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) 1830void iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 563d18f4ff50..c6680348b648 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -2050,21 +2050,18 @@ qla25xx_fw_dump_failed:
2050void 2050void
2051qla2x00_dump_regs(scsi_qla_host_t *ha) 2051qla2x00_dump_regs(scsi_qla_host_t *ha)
2052{ 2052{
2053 int i;
2053 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 2054 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
2055 struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24;
2056 uint16_t __iomem *mbx_reg;
2057
2058 mbx_reg = IS_FWI2_CAPABLE(ha) ? &reg24->mailbox0:
2059 MAILBOX_REG(ha, reg, 0);
2054 2060
2055 printk("Mailbox registers:\n"); 2061 printk("Mailbox registers:\n");
2056 printk("scsi(%ld): mbox 0 0x%04x \n", 2062 for (i = 0; i < 6; i++)
2057 ha->host_no, RD_MAILBOX_REG(ha, reg, 0)); 2063 printk("scsi(%ld): mbox %d 0x%04x \n", ha->host_no, i,
2058 printk("scsi(%ld): mbox 1 0x%04x \n", 2064 RD_REG_WORD(mbx_reg++));
2059 ha->host_no, RD_MAILBOX_REG(ha, reg, 1));
2060 printk("scsi(%ld): mbox 2 0x%04x \n",
2061 ha->host_no, RD_MAILBOX_REG(ha, reg, 2));
2062 printk("scsi(%ld): mbox 3 0x%04x \n",
2063 ha->host_no, RD_MAILBOX_REG(ha, reg, 3));
2064 printk("scsi(%ld): mbox 4 0x%04x \n",
2065 ha->host_no, RD_MAILBOX_REG(ha, reg, 4));
2066 printk("scsi(%ld): mbox 5 0x%04x \n",
2067 ha->host_no, RD_MAILBOX_REG(ha, reg, 5));
2068} 2065}
2069 2066
2070 2067
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 27ae3a532a55..c1964866a423 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1502,7 +1502,6 @@ typedef struct {
1502 uint8_t node_name[WWN_SIZE]; 1502 uint8_t node_name[WWN_SIZE];
1503 uint8_t port_name[WWN_SIZE]; 1503 uint8_t port_name[WWN_SIZE];
1504 uint8_t fabric_port_name[WWN_SIZE]; 1504 uint8_t fabric_port_name[WWN_SIZE];
1505 uint16_t fp_speeds;
1506 uint16_t fp_speed; 1505 uint16_t fp_speed;
1507} sw_info_t; 1506} sw_info_t;
1508 1507
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index b06cbb8580d3..a7e23583f899 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -295,6 +295,8 @@ qla2x00_gid_pt(scsi_qla_host_t *ha, sw_info_t *list)
295 list[i].d_id.b.domain = gid_data->port_id[0]; 295 list[i].d_id.b.domain = gid_data->port_id[0];
296 list[i].d_id.b.area = gid_data->port_id[1]; 296 list[i].d_id.b.area = gid_data->port_id[1];
297 list[i].d_id.b.al_pa = gid_data->port_id[2]; 297 list[i].d_id.b.al_pa = gid_data->port_id[2];
298 memset(list[i].fabric_port_name, 0, WWN_SIZE);
299 list[i].fp_speed = PORT_SPEED_UNKNOWN;
298 300
299 /* Last one exit. */ 301 /* Last one exit. */
300 if (gid_data->control_byte & BIT_7) { 302 if (gid_data->control_byte & BIT_7) {
@@ -1707,8 +1709,6 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list)
1707 1709
1708 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { 1710 for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
1709 /* Issue GFPN_ID */ 1711 /* Issue GFPN_ID */
1710 memset(list[i].fabric_port_name, 0, WWN_SIZE);
1711
1712 /* Prepare common MS IOCB */ 1712 /* Prepare common MS IOCB */
1713 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, 1713 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GFPN_ID_REQ_SIZE,
1714 GFPN_ID_RSP_SIZE); 1714 GFPN_ID_RSP_SIZE);
@@ -1821,8 +1821,6 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
1821 1821
1822 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { 1822 for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
1823 /* Issue GFPN_ID */ 1823 /* Issue GFPN_ID */
1824 list[i].fp_speeds = list[i].fp_speed = 0;
1825
1826 /* Prepare common MS IOCB */ 1824 /* Prepare common MS IOCB */
1827 ms_pkt = qla24xx_prep_ms_fm_iocb(ha, GPSC_REQ_SIZE, 1825 ms_pkt = qla24xx_prep_ms_fm_iocb(ha, GPSC_REQ_SIZE,
1828 GPSC_RSP_SIZE); 1826 GPSC_RSP_SIZE);
@@ -1858,9 +1856,21 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
1858 } 1856 }
1859 rval = QLA_FUNCTION_FAILED; 1857 rval = QLA_FUNCTION_FAILED;
1860 } else { 1858 } else {
1861 /* Save portname */ 1859 /* Save port-speed */
1862 list[i].fp_speeds = ct_rsp->rsp.gpsc.speeds; 1860 switch (be16_to_cpu(ct_rsp->rsp.gpsc.speed)) {
1863 list[i].fp_speed = ct_rsp->rsp.gpsc.speed; 1861 case BIT_15:
1862 list[i].fp_speed = PORT_SPEED_1GB;
1863 break;
1864 case BIT_14:
1865 list[i].fp_speed = PORT_SPEED_2GB;
1866 break;
1867 case BIT_13:
1868 list[i].fp_speed = PORT_SPEED_4GB;
1869 break;
1870 case BIT_11:
1871 list[i].fp_speed = PORT_SPEED_8GB;
1872 break;
1873 }
1864 1874
1865 DEBUG2_3(printk("scsi(%ld): GPSC ext entry - " 1875 DEBUG2_3(printk("scsi(%ld): GPSC ext entry - "
1866 "fpn %02x%02x%02x%02x%02x%02x%02x%02x speeds=%04x " 1876 "fpn %02x%02x%02x%02x%02x%02x%02x%02x speeds=%04x "
@@ -1873,8 +1883,8 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
1873 list[i].fabric_port_name[5], 1883 list[i].fabric_port_name[5],
1874 list[i].fabric_port_name[6], 1884 list[i].fabric_port_name[6],
1875 list[i].fabric_port_name[7], 1885 list[i].fabric_port_name[7],
1876 be16_to_cpu(list[i].fp_speeds), 1886 be16_to_cpu(ct_rsp->rsp.gpsc.speeds),
1877 be16_to_cpu(list[i].fp_speed))); 1887 be16_to_cpu(ct_rsp->rsp.gpsc.speed)));
1878 } 1888 }
1879 1889
1880 /* Last device exit. */ 1890 /* Last device exit. */
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 374abe19b547..1a058ec9bd0c 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2079,17 +2079,7 @@ qla2x00_configure_local_loop(scsi_qla_host_t *ha)
2079 } 2079 }
2080 2080
2081 /* Base iIDMA settings on HBA port speed. */ 2081 /* Base iIDMA settings on HBA port speed. */
2082 switch (ha->link_data_rate) { 2082 fcport->fp_speed = ha->link_data_rate;
2083 case PORT_SPEED_1GB:
2084 fcport->fp_speed = cpu_to_be16(BIT_15);
2085 break;
2086 case PORT_SPEED_2GB:
2087 fcport->fp_speed = cpu_to_be16(BIT_14);
2088 break;
2089 case PORT_SPEED_4GB:
2090 fcport->fp_speed = cpu_to_be16(BIT_13);
2091 break;
2092 }
2093 2083
2094 qla2x00_update_fcport(ha, fcport); 2084 qla2x00_update_fcport(ha, fcport);
2095 2085
@@ -2130,38 +2120,25 @@ static void
2130qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) 2120qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
2131{ 2121{
2132#define LS_UNKNOWN 2 2122#define LS_UNKNOWN 2
2133 static char *link_speeds[5] = { "1", "2", "?", "4" }; 2123 static char *link_speeds[5] = { "1", "2", "?", "4", "8" };
2134 int rval; 2124 int rval;
2135 uint16_t port_speed, mb[6]; 2125 uint16_t mb[6];
2136 2126
2137 if (!IS_IIDMA_CAPABLE(ha)) 2127 if (!IS_IIDMA_CAPABLE(ha))
2138 return; 2128 return;
2139 2129
2140 switch (be16_to_cpu(fcport->fp_speed)) { 2130 if (fcport->fp_speed == PORT_SPEED_UNKNOWN) {
2141 case BIT_15:
2142 port_speed = PORT_SPEED_1GB;
2143 break;
2144 case BIT_14:
2145 port_speed = PORT_SPEED_2GB;
2146 break;
2147 case BIT_13:
2148 port_speed = PORT_SPEED_4GB;
2149 break;
2150 default:
2151 DEBUG2(printk("scsi(%ld): %02x%02x%02x%02x%02x%02x%02x%02x -- " 2131 DEBUG2(printk("scsi(%ld): %02x%02x%02x%02x%02x%02x%02x%02x -- "
2152 "unsupported FM port operating speed (%04x).\n", 2132 "unsupported FM port operating speed.\n",
2153 ha->host_no, fcport->port_name[0], fcport->port_name[1], 2133 ha->host_no, fcport->port_name[0], fcport->port_name[1],
2154 fcport->port_name[2], fcport->port_name[3], 2134 fcport->port_name[2], fcport->port_name[3],
2155 fcport->port_name[4], fcport->port_name[5], 2135 fcport->port_name[4], fcport->port_name[5],
2156 fcport->port_name[6], fcport->port_name[7], 2136 fcport->port_name[6], fcport->port_name[7]));
2157 be16_to_cpu(fcport->fp_speed)));
2158 port_speed = PORT_SPEED_UNKNOWN;
2159 break;
2160 }
2161 if (port_speed == PORT_SPEED_UNKNOWN)
2162 return; 2137 return;
2138 }
2163 2139
2164 rval = qla2x00_set_idma_speed(ha, fcport->loop_id, port_speed, mb); 2140 rval = qla2x00_set_idma_speed(ha, fcport->loop_id, fcport->fp_speed,
2141 mb);
2165 if (rval != QLA_SUCCESS) { 2142 if (rval != QLA_SUCCESS) {
2166 DEBUG2(printk("scsi(%ld): Unable to adjust iIDMA " 2143 DEBUG2(printk("scsi(%ld): Unable to adjust iIDMA "
2167 "%02x%02x%02x%02x%02x%02x%02x%02x -- %04x %x %04x %04x.\n", 2144 "%02x%02x%02x%02x%02x%02x%02x%02x -- %04x %x %04x %04x.\n",
@@ -2169,12 +2146,12 @@ qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
2169 fcport->port_name[2], fcport->port_name[3], 2146 fcport->port_name[2], fcport->port_name[3],
2170 fcport->port_name[4], fcport->port_name[5], 2147 fcport->port_name[4], fcport->port_name[5],
2171 fcport->port_name[6], fcport->port_name[7], rval, 2148 fcport->port_name[6], fcport->port_name[7], rval,
2172 port_speed, mb[0], mb[1])); 2149 fcport->fp_speed, mb[0], mb[1]));
2173 } else { 2150 } else {
2174 DEBUG2(qla_printk(KERN_INFO, ha, 2151 DEBUG2(qla_printk(KERN_INFO, ha,
2175 "iIDMA adjusted to %s GB/s on " 2152 "iIDMA adjusted to %s GB/s on "
2176 "%02x%02x%02x%02x%02x%02x%02x%02x.\n", 2153 "%02x%02x%02x%02x%02x%02x%02x%02x.\n",
2177 link_speeds[port_speed], fcport->port_name[0], 2154 link_speeds[fcport->fp_speed], fcport->port_name[0],
2178 fcport->port_name[1], fcport->port_name[2], 2155 fcport->port_name[1], fcport->port_name[2],
2179 fcport->port_name[3], fcport->port_name[4], 2156 fcport->port_name[3], fcport->port_name[4],
2180 fcport->port_name[5], fcport->port_name[6], 2157 fcport->port_name[5], fcport->port_name[6],
@@ -3354,7 +3331,8 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
3354 3331
3355 spin_lock_irqsave(&ha->hardware_lock, flags); 3332 spin_lock_irqsave(&ha->hardware_lock, flags);
3356 3333
3357 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) { 3334 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
3335 !IS_QLA25XX(ha)) {
3358 /* 3336 /*
3359 * Disable SRAM, Instruction RAM and GP RAM 3337 * Disable SRAM, Instruction RAM and GP RAM
3360 * parity. 3338 * parity.
@@ -3370,7 +3348,8 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
3370 3348
3371 spin_lock_irqsave(&ha->hardware_lock, flags); 3349 spin_lock_irqsave(&ha->hardware_lock, flags);
3372 3350
3373 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) { 3351 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
3352 !IS_QLA25XX(ha)) {
3374 /* Enable proper parity */ 3353 /* Enable proper parity */
3375 if (IS_QLA2300(ha)) 3354 if (IS_QLA2300(ha))
3376 /* SRAM parity */ 3355 /* SRAM parity */
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 50539da467bf..eecae9905ece 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -490,6 +490,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
490 set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); 490 set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags);
491 491
492 ha->flags.gpsc_supported = 1; 492 ha->flags.gpsc_supported = 1;
493 ha->flags.management_server_logged_in = 0;
493 break; 494 break;
494 495
495 case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ 496 case MBA_CHG_IN_CONNECTION: /* Change in connection mode */
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 93c0c7e4f08f..acca898ce0a2 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1564,7 +1564,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1564 struct Scsi_Host *host; 1564 struct Scsi_Host *host;
1565 scsi_qla_host_t *ha; 1565 scsi_qla_host_t *ha;
1566 unsigned long flags = 0; 1566 unsigned long flags = 0;
1567 char pci_info[20]; 1567 char pci_info[30];
1568 char fw_str[30]; 1568 char fw_str[30];
1569 struct scsi_host_template *sht; 1569 struct scsi_host_template *sht;
1570 1570
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index dd1f8ceb79c4..18095b9b76f4 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.00-k2" 10#define QLA2XXX_VERSION "8.02.00-k3"
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