aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-05 18:37:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-05 18:37:12 -0400
commit7da23b86e14b77c094b11a9fa5ef5b3758fc9193 (patch)
tree3da1b6c3c105daf61f1fe1c785821213ab6a9dde /drivers/scsi
parent749d229761ff0135cc4e16b8a28b41ae2f6b2c35 (diff)
parent421e33d0045ac0aa119c033b78742e0fbf4c3b21 (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] qla1280: retain firmware for error recovery [SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init [SCSI] advansys: fix regression with request_firmware change [SCSI] qla2xxx: Updated version number to 8.03.02-k2. [SCSI] qla2xxx: Prevent sending mbx commands from sysfs during isp reset. [SCSI] qla2xxx: Disable MSI on qla24xx chips other than QLA2432. [SCSI] qla2xxx: Check to make sure multique and CPU affinity support is not enabled at the same time. [SCSI] qla2xxx: Correct vp_idx checking during PORT_UPDATE processing. [SCSI] qla2xxx: Honour "Extended BB credits" bit for CNAs. [SCSI] scsi_transport_fc: Make sure commands are completed when rport is offline [SCSI] libiscsi: Fix recovery slowdown regression
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/advansys.c8
-rw-r--r--drivers/scsi/libiscsi.c5
-rw-r--r--drivers/scsi/qla1280.c161
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c6
-rw-r--r--drivers/scsi/qla2xxx/qla_fw.h18
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c37
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c8
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_version.h4
-rw-r--r--drivers/scsi/scsi_transport_fc.c4
10 files changed, 171 insertions, 84 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 22626abdb630..9201afe65609 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -4781,12 +4781,14 @@ static ushort AscInitAsc1000Driver(ASC_DVC_VAR *asc_dvc)
4781 if (err) { 4781 if (err) {
4782 printk(KERN_ERR "Failed to load image \"%s\" err %d\n", 4782 printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
4783 fwname, err); 4783 fwname, err);
4784 asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
4784 return err; 4785 return err;
4785 } 4786 }
4786 if (fw->size < 4) { 4787 if (fw->size < 4) {
4787 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", 4788 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n",
4788 fw->size, fwname); 4789 fw->size, fwname);
4789 release_firmware(fw); 4790 release_firmware(fw);
4791 asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
4790 return -EINVAL; 4792 return -EINVAL;
4791 } 4793 }
4792 chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | 4794 chksum = (fw->data[3] << 24) | (fw->data[2] << 16) |
@@ -5110,12 +5112,14 @@ static int AdvInitAsc3550Driver(ADV_DVC_VAR *asc_dvc)
5110 if (err) { 5112 if (err) {
5111 printk(KERN_ERR "Failed to load image \"%s\" err %d\n", 5113 printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
5112 fwname, err); 5114 fwname, err);
5115 asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM;
5113 return err; 5116 return err;
5114 } 5117 }
5115 if (fw->size < 4) { 5118 if (fw->size < 4) {
5116 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", 5119 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n",
5117 fw->size, fwname); 5120 fw->size, fwname);
5118 release_firmware(fw); 5121 release_firmware(fw);
5122 asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM;
5119 return -EINVAL; 5123 return -EINVAL;
5120 } 5124 }
5121 chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | 5125 chksum = (fw->data[3] << 24) | (fw->data[2] << 16) |
@@ -5624,12 +5628,14 @@ static int AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc)
5624 if (err) { 5628 if (err) {
5625 printk(KERN_ERR "Failed to load image \"%s\" err %d\n", 5629 printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
5626 fwname, err); 5630 fwname, err);
5631 asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM;
5627 return err; 5632 return err;
5628 } 5633 }
5629 if (fw->size < 4) { 5634 if (fw->size < 4) {
5630 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", 5635 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n",
5631 fw->size, fwname); 5636 fw->size, fwname);
5632 release_firmware(fw); 5637 release_firmware(fw);
5638 asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM;
5633 return -EINVAL; 5639 return -EINVAL;
5634 } 5640 }
5635 chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | 5641 chksum = (fw->data[3] << 24) | (fw->data[2] << 16) |
@@ -6124,12 +6130,14 @@ static int AdvInitAsc38C1600Driver(ADV_DVC_VAR *asc_dvc)
6124 if (err) { 6130 if (err) {
6125 printk(KERN_ERR "Failed to load image \"%s\" err %d\n", 6131 printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
6126 fwname, err); 6132 fwname, err);
6133 asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM;
6127 return err; 6134 return err;
6128 } 6135 }
6129 if (fw->size < 4) { 6136 if (fw->size < 4) {
6130 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", 6137 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n",
6131 fw->size, fwname); 6138 fw->size, fwname);
6132 release_firmware(fw); 6139 release_firmware(fw);
6140 asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM;
6133 return -EINVAL; 6141 return -EINVAL;
6134 } 6142 }
6135 chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | 6143 chksum = (fw->data[3] << 24) | (fw->data[2] << 16) |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index abdb66d30eb6..6d5ae4474bb3 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -3088,14 +3088,15 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
3088 session->state = ISCSI_STATE_TERMINATE; 3088 session->state = ISCSI_STATE_TERMINATE;
3089 else if (conn->stop_stage != STOP_CONN_RECOVER) 3089 else if (conn->stop_stage != STOP_CONN_RECOVER)
3090 session->state = ISCSI_STATE_IN_RECOVERY; 3090 session->state = ISCSI_STATE_IN_RECOVERY;
3091
3092 old_stop_stage = conn->stop_stage;
3093 conn->stop_stage = flag;
3091 spin_unlock_bh(&session->lock); 3094 spin_unlock_bh(&session->lock);
3092 3095
3093 del_timer_sync(&conn->transport_timer); 3096 del_timer_sync(&conn->transport_timer);
3094 iscsi_suspend_tx(conn); 3097 iscsi_suspend_tx(conn);
3095 3098
3096 spin_lock_bh(&session->lock); 3099 spin_lock_bh(&session->lock);
3097 old_stop_stage = conn->stop_stage;
3098 conn->stop_stage = flag;
3099 conn->c_stage = ISCSI_CONN_STOPPED; 3100 conn->c_stage = ISCSI_CONN_STOPPED;
3100 spin_unlock_bh(&session->lock); 3101 spin_unlock_bh(&session->lock);
3101 3102
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 8ef87781e51d..b8166ecfd0e3 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -17,9 +17,11 @@
17* General Public License for more details. 17* General Public License for more details.
18* 18*
19******************************************************************************/ 19******************************************************************************/
20#define QLA1280_VERSION "3.27" 20#define QLA1280_VERSION "3.27.1"
21/***************************************************************************** 21/*****************************************************************************
22 Revision History: 22 Revision History:
23 Rev 3.27.1, February 8, 2010, Michael Reed
24 - Retain firmware image for error recovery.
23 Rev 3.27, February 10, 2009, Michael Reed 25 Rev 3.27, February 10, 2009, Michael Reed
24 - General code cleanup. 26 - General code cleanup.
25 - Improve error recovery. 27 - Improve error recovery.
@@ -537,9 +539,9 @@ __setup("qla1280=", qla1280_setup);
537/*****************************************/ 539/*****************************************/
538 540
539struct qla_boards { 541struct qla_boards {
540 unsigned char name[9]; /* Board ID String */ 542 char *name; /* Board ID String */
541 int numPorts; /* Number of SCSI ports */ 543 int numPorts; /* Number of SCSI ports */
542 char *fwname; /* firmware name */ 544 int fw_index; /* index into qla1280_fw_tbl for firmware */
543}; 545};
544 546
545/* NOTE: the last argument in each entry is used to index ql1280_board_tbl */ 547/* NOTE: the last argument in each entry is used to index ql1280_board_tbl */
@@ -560,15 +562,30 @@ static struct pci_device_id qla1280_pci_tbl[] = {
560}; 562};
561MODULE_DEVICE_TABLE(pci, qla1280_pci_tbl); 563MODULE_DEVICE_TABLE(pci, qla1280_pci_tbl);
562 564
565DEFINE_MUTEX(qla1280_firmware_mutex);
566
567struct qla_fw {
568 char *fwname;
569 const struct firmware *fw;
570};
571
572#define QL_NUM_FW_IMAGES 3
573
574struct qla_fw qla1280_fw_tbl[QL_NUM_FW_IMAGES] = {
575 {"qlogic/1040.bin", NULL}, /* image 0 */
576 {"qlogic/1280.bin", NULL}, /* image 1 */
577 {"qlogic/12160.bin", NULL}, /* image 2 */
578};
579
580/* NOTE: Order of boards in this table must match order in qla1280_pci_tbl */
563static struct qla_boards ql1280_board_tbl[] = { 581static struct qla_boards ql1280_board_tbl[] = {
564 /* Name , Number of ports, FW details */ 582 {.name = "QLA12160", .numPorts = 2, .fw_index = 2},
565 {"QLA12160", 2, "qlogic/12160.bin"}, 583 {.name = "QLA1040" , .numPorts = 1, .fw_index = 0},
566 {"QLA1040", 1, "qlogic/1040.bin"}, 584 {.name = "QLA1080" , .numPorts = 1, .fw_index = 1},
567 {"QLA1080", 1, "qlogic/1280.bin"}, 585 {.name = "QLA1240" , .numPorts = 2, .fw_index = 1},
568 {"QLA1240", 2, "qlogic/1280.bin"}, 586 {.name = "QLA1280" , .numPorts = 2, .fw_index = 1},
569 {"QLA1280", 2, "qlogic/1280.bin"}, 587 {.name = "QLA10160", .numPorts = 1, .fw_index = 2},
570 {"QLA10160", 1, "qlogic/12160.bin"}, 588 {.name = " ", .numPorts = 0, .fw_index = -1},
571 {" ", 0, " "},
572}; 589};
573 590
574static int qla1280_verbose = 1; 591static int qla1280_verbose = 1;
@@ -1511,6 +1528,63 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha)
1511} 1528}
1512 1529
1513/* 1530/*
1531 * qla1280_request_firmware
1532 * Acquire firmware for chip. Retain in memory
1533 * for error recovery.
1534 *
1535 * Input:
1536 * ha = adapter block pointer.
1537 *
1538 * Returns:
1539 * Pointer to firmware image or an error code
1540 * cast to pointer via ERR_PTR().
1541 */
1542static const struct firmware *
1543qla1280_request_firmware(struct scsi_qla_host *ha)
1544{
1545 const struct firmware *fw;
1546 int err;
1547 int index;
1548 char *fwname;
1549
1550 spin_unlock_irq(ha->host->host_lock);
1551 mutex_lock(&qla1280_firmware_mutex);
1552
1553 index = ql1280_board_tbl[ha->devnum].fw_index;
1554 fw = qla1280_fw_tbl[index].fw;
1555 if (fw)
1556 goto out;
1557
1558 fwname = qla1280_fw_tbl[index].fwname;
1559 err = request_firmware(&fw, fwname, &ha->pdev->dev);
1560
1561 if (err) {
1562 printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
1563 fwname, err);
1564 fw = ERR_PTR(err);
1565 goto unlock;
1566 }
1567 if ((fw->size % 2) || (fw->size < 6)) {
1568 printk(KERN_ERR "Invalid firmware length %zu in image \"%s\"\n",
1569 fw->size, fwname);
1570 release_firmware(fw);
1571 fw = ERR_PTR(-EINVAL);
1572 goto unlock;
1573 }
1574
1575 qla1280_fw_tbl[index].fw = fw;
1576
1577 out:
1578 ha->fwver1 = fw->data[0];
1579 ha->fwver2 = fw->data[1];
1580 ha->fwver3 = fw->data[2];
1581 unlock:
1582 mutex_unlock(&qla1280_firmware_mutex);
1583 spin_lock_irq(ha->host->host_lock);
1584 return fw;
1585}
1586
1587/*
1514 * Chip diagnostics 1588 * Chip diagnostics
1515 * Test chip for proper operation. 1589 * Test chip for proper operation.
1516 * 1590 *
@@ -1633,30 +1707,18 @@ qla1280_chip_diag(struct scsi_qla_host *ha)
1633static int 1707static int
1634qla1280_load_firmware_pio(struct scsi_qla_host *ha) 1708qla1280_load_firmware_pio(struct scsi_qla_host *ha)
1635{ 1709{
1710 /* enter with host_lock acquired */
1711
1636 const struct firmware *fw; 1712 const struct firmware *fw;
1637 const __le16 *fw_data; 1713 const __le16 *fw_data;
1638 uint16_t risc_address, risc_code_size; 1714 uint16_t risc_address, risc_code_size;
1639 uint16_t mb[MAILBOX_REGISTER_COUNT], i; 1715 uint16_t mb[MAILBOX_REGISTER_COUNT], i;
1640 int err; 1716 int err = 0;
1717
1718 fw = qla1280_request_firmware(ha);
1719 if (IS_ERR(fw))
1720 return PTR_ERR(fw);
1641 1721
1642 spin_unlock_irq(ha->host->host_lock);
1643 err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname,
1644 &ha->pdev->dev);
1645 spin_lock_irq(ha->host->host_lock);
1646 if (err) {
1647 printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
1648 ql1280_board_tbl[ha->devnum].fwname, err);
1649 return err;
1650 }
1651 if ((fw->size % 2) || (fw->size < 6)) {
1652 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n",
1653 fw->size, ql1280_board_tbl[ha->devnum].fwname);
1654 err = -EINVAL;
1655 goto out;
1656 }
1657 ha->fwver1 = fw->data[0];
1658 ha->fwver2 = fw->data[1];
1659 ha->fwver3 = fw->data[2];
1660 fw_data = (const __le16 *)&fw->data[0]; 1722 fw_data = (const __le16 *)&fw->data[0];
1661 ha->fwstart = __le16_to_cpu(fw_data[2]); 1723 ha->fwstart = __le16_to_cpu(fw_data[2]);
1662 1724
@@ -1674,11 +1736,10 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha)
1674 if (err) { 1736 if (err) {
1675 printk(KERN_ERR "scsi(%li): Failed to load firmware\n", 1737 printk(KERN_ERR "scsi(%li): Failed to load firmware\n",
1676 ha->host_no); 1738 ha->host_no);
1677 goto out; 1739 break;
1678 } 1740 }
1679 } 1741 }
1680out: 1742
1681 release_firmware(fw);
1682 return err; 1743 return err;
1683} 1744}
1684 1745
@@ -1686,6 +1747,7 @@ out:
1686static int 1747static int
1687qla1280_load_firmware_dma(struct scsi_qla_host *ha) 1748qla1280_load_firmware_dma(struct scsi_qla_host *ha)
1688{ 1749{
1750 /* enter with host_lock acquired */
1689 const struct firmware *fw; 1751 const struct firmware *fw;
1690 const __le16 *fw_data; 1752 const __le16 *fw_data;
1691 uint16_t risc_address, risc_code_size; 1753 uint16_t risc_address, risc_code_size;
@@ -1700,24 +1762,10 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha)
1700 return -ENOMEM; 1762 return -ENOMEM;
1701#endif 1763#endif
1702 1764
1703 spin_unlock_irq(ha->host->host_lock); 1765 fw = qla1280_request_firmware(ha);
1704 err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname, 1766 if (IS_ERR(fw))
1705 &ha->pdev->dev); 1767 return PTR_ERR(fw);
1706 spin_lock_irq(ha->host->host_lock); 1768
1707 if (err) {
1708 printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
1709 ql1280_board_tbl[ha->devnum].fwname, err);
1710 return err;
1711 }
1712 if ((fw->size % 2) || (fw->size < 6)) {
1713 printk(KERN_ERR "Bogus length %zu in image \"%s\"\n",
1714 fw->size, ql1280_board_tbl[ha->devnum].fwname);
1715 err = -EINVAL;
1716 goto out;
1717 }
1718 ha->fwver1 = fw->data[0];
1719 ha->fwver2 = fw->data[1];
1720 ha->fwver3 = fw->data[2];
1721 fw_data = (const __le16 *)&fw->data[0]; 1769 fw_data = (const __le16 *)&fw->data[0];
1722 ha->fwstart = __le16_to_cpu(fw_data[2]); 1770 ha->fwstart = __le16_to_cpu(fw_data[2]);
1723 1771
@@ -1802,7 +1850,6 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha)
1802#if DUMP_IT_BACK 1850#if DUMP_IT_BACK
1803 pci_free_consistent(ha->pdev, 8000, tbuf, p_tbuf); 1851 pci_free_consistent(ha->pdev, 8000, tbuf, p_tbuf);
1804#endif 1852#endif
1805 release_firmware(fw);
1806 return err; 1853 return err;
1807} 1854}
1808 1855
@@ -1841,6 +1888,7 @@ qla1280_start_firmware(struct scsi_qla_host *ha)
1841static int 1888static int
1842qla1280_load_firmware(struct scsi_qla_host *ha) 1889qla1280_load_firmware(struct scsi_qla_host *ha)
1843{ 1890{
1891 /* enter with host_lock taken */
1844 int err; 1892 int err;
1845 1893
1846 err = qla1280_chip_diag(ha); 1894 err = qla1280_chip_diag(ha);
@@ -4419,7 +4467,16 @@ qla1280_init(void)
4419static void __exit 4467static void __exit
4420qla1280_exit(void) 4468qla1280_exit(void)
4421{ 4469{
4470 int i;
4471
4422 pci_unregister_driver(&qla1280_pci_driver); 4472 pci_unregister_driver(&qla1280_pci_driver);
4473 /* release any allocated firmware images */
4474 for (i = 0; i < QL_NUM_FW_IMAGES; i++) {
4475 if (qla1280_fw_tbl[i].fw) {
4476 release_firmware(qla1280_fw_tbl[i].fw);
4477 qla1280_fw_tbl[i].fw = NULL;
4478 }
4479 }
4423} 4480}
4424 4481
4425module_init(qla1280_init); 4482module_init(qla1280_init);
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 29414df87c3d..359e9a71a021 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1275,7 +1275,11 @@ qla2x00_fw_state_show(struct device *dev, struct device_attribute *attr,
1275 int rval = QLA_FUNCTION_FAILED; 1275 int rval = QLA_FUNCTION_FAILED;
1276 uint16_t state[5]; 1276 uint16_t state[5];
1277 1277
1278 if (!vha->hw->flags.eeh_busy) 1278 if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
1279 test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags))
1280 DEBUG2_3_11(printk("%s(%ld): isp reset in progress.\n",
1281 __func__, vha->host_no));
1282 else if (!vha->hw->flags.eeh_busy)
1279 rval = qla2x00_get_firmware_state(vha, state); 1283 rval = qla2x00_get_firmware_state(vha, state);
1280 if (rval != QLA_SUCCESS) 1284 if (rval != QLA_SUCCESS)
1281 memset(state, -1, sizeof(state)); 1285 memset(state, -1, sizeof(state));
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index cebf4f1bb7d9..42c5587cc50c 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -1592,10 +1592,22 @@ struct nvram_81xx {
1592 1592
1593 /* Offset 384. */ 1593 /* Offset 384. */
1594 uint8_t reserved_21[16]; 1594 uint8_t reserved_21[16];
1595 uint16_t reserved_22[8]; 1595 uint16_t reserved_22[3];
1596
1597 /*
1598 * BIT 0 = Extended BB credits for LR
1599 * BIT 1 = Virtual Fabric Enable
1600 * BIT 2 = Enhanced Features Unused
1601 * BIT 3-7 = Enhanced Features Reserved
1602 */
1603 /* Enhanced Features */
1604 uint8_t enhanced_features;
1605
1606 uint8_t reserved_23;
1607 uint16_t reserved_24[4];
1596 1608
1597 /* Offset 416. */ 1609 /* Offset 416. */
1598 uint16_t reserved_23[32]; 1610 uint16_t reserved_25[32];
1599 1611
1600 /* Offset 480. */ 1612 /* Offset 480. */
1601 uint8_t model_name[16]; 1613 uint8_t model_name[16];
@@ -1603,7 +1615,7 @@ struct nvram_81xx {
1603 /* Offset 496. */ 1615 /* Offset 496. */
1604 uint16_t feature_mask_l; 1616 uint16_t feature_mask_l;
1605 uint16_t feature_mask_h; 1617 uint16_t feature_mask_h;
1606 uint16_t reserved_24[2]; 1618 uint16_t reserved_26[2];
1607 1619
1608 uint16_t subsystem_vendor_id; 1620 uint16_t subsystem_vendor_id;
1609 uint16_t subsystem_device_id; 1621 uint16_t subsystem_device_id;
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 875adb45e751..db539b0c3dae 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -621,11 +621,10 @@ skip_rio:
621 * vp_idx does not match 621 * vp_idx does not match
622 * Event is not global, vp_idx does not match 622 * Event is not global, vp_idx does not match
623 */ 623 */
624 if ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff) 624 if (IS_QLA2XXX_MIDTYPE(ha) &&
625 || (mb[1] != 0xffff)) { 625 ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff) ||
626 if (vha->vp_idx != (mb[3] & 0xff)) 626 (mb[1] != 0xffff)) && vha->vp_idx != (mb[3] & 0xff))
627 break; 627 break;
628 }
629 628
630 /* Global event -- port logout or port unavailable. */ 629 /* Global event -- port logout or port unavailable. */
631 if (mb[1] == 0xffff && mb[2] == 0x7) { 630 if (mb[1] == 0xffff && mb[2] == 0x7) {
@@ -2273,30 +2272,28 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)
2273 2272
2274 /* If possible, enable MSI-X. */ 2273 /* If possible, enable MSI-X. */
2275 if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && 2274 if (!IS_QLA2432(ha) && !IS_QLA2532(ha) &&
2276 !IS_QLA8432(ha) && !IS_QLA8001(ha)) 2275 !IS_QLA8432(ha) && !IS_QLA8001(ha))
2277 goto skip_msix; 2276 goto skip_msi;
2277
2278 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP &&
2279 (ha->pdev->subsystem_device == 0x7040 ||
2280 ha->pdev->subsystem_device == 0x7041 ||
2281 ha->pdev->subsystem_device == 0x1705)) {
2282 DEBUG2(qla_printk(KERN_WARNING, ha,
2283 "MSI-X: Unsupported ISP2432 SSVID/SSDID (0x%X,0x%X).\n",
2284 ha->pdev->subsystem_vendor,
2285 ha->pdev->subsystem_device));
2286 goto skip_msi;
2287 }
2278 2288
2279 if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX || 2289 if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX ||
2280 !QLA_MSIX_FW_MODE_1(ha->fw_attributes))) { 2290 !QLA_MSIX_FW_MODE_1(ha->fw_attributes))) {
2281 DEBUG2(qla_printk(KERN_WARNING, ha, 2291 DEBUG2(qla_printk(KERN_WARNING, ha,
2282 "MSI-X: Unsupported ISP2432 (0x%X, 0x%X).\n", 2292 "MSI-X: Unsupported ISP2432 (0x%X, 0x%X).\n",
2283 ha->pdev->revision, ha->fw_attributes)); 2293 ha->pdev->revision, ha->fw_attributes));
2284
2285 goto skip_msix; 2294 goto skip_msix;
2286 } 2295 }
2287 2296
2288 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP &&
2289 (ha->pdev->subsystem_device == 0x7040 ||
2290 ha->pdev->subsystem_device == 0x7041 ||
2291 ha->pdev->subsystem_device == 0x1705)) {
2292 DEBUG2(qla_printk(KERN_WARNING, ha,
2293 "MSI-X: Unsupported ISP2432 SSVID/SSDID (0x%X, 0x%X).\n",
2294 ha->pdev->subsystem_vendor,
2295 ha->pdev->subsystem_device));
2296
2297 goto skip_msi;
2298 }
2299
2300 ret = qla24xx_enable_msix(ha, rsp); 2297 ret = qla24xx_enable_msix(ha, rsp);
2301 if (!ret) { 2298 if (!ret) {
2302 DEBUG2(qla_printk(KERN_INFO, ha, 2299 DEBUG2(qla_printk(KERN_INFO, ha,
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index e95ebab58679..42eb7ffd5942 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -340,6 +340,7 @@ qla2x00_load_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t risc_addr,
340 return rval; 340 return rval;
341} 341}
342 342
343#define EXTENDED_BB_CREDITS BIT_0
343/* 344/*
344 * qla2x00_execute_fw 345 * qla2x00_execute_fw
345 * Start adapter firmware. 346 * Start adapter firmware.
@@ -372,7 +373,12 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)
372 mcp->mb[1] = MSW(risc_addr); 373 mcp->mb[1] = MSW(risc_addr);
373 mcp->mb[2] = LSW(risc_addr); 374 mcp->mb[2] = LSW(risc_addr);
374 mcp->mb[3] = 0; 375 mcp->mb[3] = 0;
375 mcp->mb[4] = 0; 376 if (IS_QLA81XX(ha)) {
377 struct nvram_81xx *nv = ha->nvram;
378 mcp->mb[4] = (nv->enhanced_features &
379 EXTENDED_BB_CREDITS);
380 } else
381 mcp->mb[4] = 0;
376 mcp->out_mb |= MBX_4|MBX_3|MBX_2|MBX_1; 382 mcp->out_mb |= MBX_4|MBX_3|MBX_2|MBX_1;
377 mcp->in_mb |= MBX_1; 383 mcp->in_mb |= MBX_1;
378 } else { 384 } else {
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index b696cffb82e0..48c37e38ed01 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1677,9 +1677,11 @@ skip_pio:
1677 1677
1678 /* Determine queue resources */ 1678 /* Determine queue resources */
1679 ha->max_req_queues = ha->max_rsp_queues = 1; 1679 ha->max_req_queues = ha->max_rsp_queues = 1;
1680 if ((ql2xmaxqueues <= 1 || ql2xmultique_tag < 1) && 1680 if ((ql2xmaxqueues <= 1 && !ql2xmultique_tag) ||
1681 (ql2xmaxqueues > 1 && ql2xmultique_tag) ||
1681 (!IS_QLA25XX(ha) && !IS_QLA81XX(ha))) 1682 (!IS_QLA25XX(ha) && !IS_QLA81XX(ha)))
1682 goto mqiobase_exit; 1683 goto mqiobase_exit;
1684
1683 ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 3), 1685 ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 3),
1684 pci_resource_len(ha->pdev, 3)); 1686 pci_resource_len(ha->pdev, 3));
1685 if (ha->mqiobase) { 1687 if (ha->mqiobase) {
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index 8d2fc2fa7a6b..109068df933f 100644
--- a/drivers/scsi/qla2xxx/qla_version.h
+++ b/drivers/scsi/qla2xxx/qla_version.h
@@ -7,9 +7,9 @@
7/* 7/*
8 * Driver version 8 * Driver version
9 */ 9 */
10#define QLA2XXX_VERSION "8.03.02-k1" 10#define QLA2XXX_VERSION "8.03.02-k2"
11 11
12#define QLA_DRIVER_MAJOR_VER 8 12#define QLA_DRIVER_MAJOR_VER 8
13#define QLA_DRIVER_MINOR_VER 3 13#define QLA_DRIVER_MINOR_VER 3
14#define QLA_DRIVER_PATCH_VER 2 14#define QLA_DRIVER_PATCH_VER 2
15#define QLA_DRIVER_BETA_VER 1 15#define QLA_DRIVER_BETA_VER 2
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index a895a0e76d13..6cfffc88022a 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -3853,7 +3853,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
3853 if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) { 3853 if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) {
3854 req->errors = -ENXIO; 3854 req->errors = -ENXIO;
3855 spin_unlock_irq(q->queue_lock); 3855 spin_unlock_irq(q->queue_lock);
3856 blk_end_request(req, -ENXIO, blk_rq_bytes(req)); 3856 blk_end_request_all(req, -ENXIO);
3857 spin_lock_irq(q->queue_lock); 3857 spin_lock_irq(q->queue_lock);
3858 continue; 3858 continue;
3859 } 3859 }
@@ -3863,7 +3863,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
3863 ret = fc_req_to_bsgjob(shost, rport, req); 3863 ret = fc_req_to_bsgjob(shost, rport, req);
3864 if (ret) { 3864 if (ret) {
3865 req->errors = ret; 3865 req->errors = ret;
3866 blk_end_request(req, ret, blk_rq_bytes(req)); 3866 blk_end_request_all(req, ret);
3867 spin_lock_irq(q->queue_lock); 3867 spin_lock_irq(q->queue_lock);
3868 continue; 3868 continue;
3869 } 3869 }