aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla1280.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-07-04 11:48:46 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-08-02 12:43:49 -0400
commit5c79d6154f335543ea4c4a555f645a1f76b5d117 (patch)
tree4bde198147590c878fd322c947fc745a55acd429 /drivers/scsi/qla1280.c
parent748422d92a55faadf3184e5aa8487da88c1ee849 (diff)
[SCSI] qla1280: always load microcode
we have the most recent microcode, make sure to always load it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla1280.c')
-rw-r--r--drivers/scsi/qla1280.c72
1 files changed, 1 insertions, 71 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 3732230b2e3a..9f975f7c1ea8 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -1733,69 +1733,6 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha)
1733 return status; 1733 return status;
1734} 1734}
1735 1735
1736
1737/*
1738 * ISP Firmware Test
1739 * Checks if present version of RISC firmware is older than
1740 * driver firmware.
1741 *
1742 * Input:
1743 * ha = adapter block pointer.
1744 *
1745 * Returns:
1746 * 0 = firmware does not need to be loaded.
1747 */
1748static int
1749qla1280_isp_firmware(struct scsi_qla_host *ha)
1750{
1751 struct nvram *nv = (struct nvram *) ha->response_ring;
1752 int status = 0; /* dg 2/27 always loads RISC */
1753 uint16_t mb[MAILBOX_REGISTER_COUNT];
1754
1755 ENTER("qla1280_isp_firmware");
1756
1757 dprintk(1, "scsi(%li): Determining if RISC is loaded\n", ha->host_no);
1758
1759 /* Bad NVRAM data, load RISC code. */
1760 if (!ha->nvram_valid) {
1761 ha->flags.disable_risc_code_load = 0;
1762 } else
1763 ha->flags.disable_risc_code_load =
1764 nv->cntr_flags_1.disable_loading_risc_code;
1765
1766 if (ha->flags.disable_risc_code_load) {
1767 dprintk(3, "qla1280_isp_firmware: Telling RISC to verify "
1768 "checksum of loaded BIOS code.\n");
1769
1770 /* Verify checksum of loaded RISC code. */
1771 mb[0] = MBC_VERIFY_CHECKSUM;
1772 /* mb[1] = ql12_risc_code_addr01; */
1773 mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
1774
1775 if (!(status =
1776 qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]))) {
1777 /* Start firmware execution. */
1778 dprintk(3, "qla1280_isp_firmware: Startng F/W "
1779 "execution.\n");
1780
1781 mb[0] = MBC_EXECUTE_FIRMWARE;
1782 /* mb[1] = ql12_risc_code_addr01; */
1783 mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
1784 qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
1785 } else
1786 printk(KERN_INFO "qla1280: RISC checksum failed.\n");
1787 } else {
1788 dprintk(1, "qla1280: NVRAM configured to load RISC load.\n");
1789 status = 1;
1790 }
1791
1792 if (status)
1793 dprintk(2, "qla1280_isp_firmware: **** Load RISC code ****\n");
1794
1795 LEAVE("qla1280_isp_firmware");
1796 return status;
1797}
1798
1799/* 1736/*
1800 * Chip diagnostics 1737 * Chip diagnostics
1801 * Test chip for proper operation. 1738 * Test chip for proper operation.
@@ -2080,14 +2017,7 @@ qla1280_start_firmware(struct scsi_qla_host *ha)
2080static int 2017static int
2081qla1280_load_firmware(struct scsi_qla_host *ha) 2018qla1280_load_firmware(struct scsi_qla_host *ha)
2082{ 2019{
2083 int err = -ENODEV; 2020 int err;
2084
2085 /* If firmware needs to be loaded */
2086 if (!qla1280_isp_firmware(ha)) {
2087 printk(KERN_ERR "scsi(%li): isp_firmware() failed!\n",
2088 ha->host_no);
2089 goto out;
2090 }
2091 2021
2092 err = qla1280_chip_diag(ha); 2022 err = qla1280_chip_diag(ha);
2093 if (err) 2023 if (err)