Commit 441d1072 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Remove obsolete firmware-loader-module support.

Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 4971cd22
No related merge requests found
......@@ -24,48 +24,3 @@ config SCSI_QLA_FC
Firmware images can be retrieved from:
ftp://ftp.qlogic.com/outgoing/linux/firmware/
NOTE: The original method of building firmware-loader
modules has been deprecated as the firmware-images will
be removed from the kernel sources.
config SCSI_QLA2XXX_EMBEDDED_FIRMWARE
bool " Use firmware-loader modules (DEPRECATED)"
depends on SCSI_QLA_FC
help
This option offers you the deprecated firmware-loader
modules that have been obsoleted by the usage of the
Firmware Loader interface in the qla2xxx driver.
config SCSI_QLA21XX
tristate " Build QLogic ISP2100 firmware-module"
depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE
---help---
This driver supports the QLogic 21xx (ISP2100) host adapter family.
config SCSI_QLA22XX
tristate " Build QLogic ISP2200 firmware-module"
depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE
---help---
This driver supports the QLogic 22xx (ISP2200) host adapter family.
config SCSI_QLA2300
tristate " Build QLogic ISP2300/ISP6312 firmware-module"
depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE
---help---
This driver supports the QLogic 2300 (ISP2300, ISP2312 and
ISP6312) host adapter family.
config SCSI_QLA2322
tristate " Build QLogic ISP2322/ISP6322 firmware-module"
depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE
---help---
This driver supports the QLogic 2322 (ISP2322 and ISP6322) host
adapter family.
config SCSI_QLA24XX
tristate " Build QLogic ISP24xx firmware-module"
depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE
---help---
This driver supports the QLogic 24xx (ISP2422 and ISP2432) host
adapter family.
EXTRA_CFLAGS += -DUNIQUE_FW_NAME
qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
qla_dbg.o qla_sup.o qla_attr.o
obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o
qla2100-y := ql2100.o ql2100_fw.o
qla2200-y := ql2200.o ql2200_fw.o
qla2300-y := ql2300.o ql2300_fw.o
qla2322-y := ql2322.o ql2322_fw.o
qla2400-y := ql2400.o ql2400_fw.o
obj-$(CONFIG_SCSI_QLA21XX) += qla2xxx.o qla2100.o
obj-$(CONFIG_SCSI_QLA22XX) += qla2xxx.o qla2200.o
obj-$(CONFIG_SCSI_QLA2300) += qla2xxx.o qla2300.o
obj-$(CONFIG_SCSI_QLA2322) += qla2xxx.o qla2322.o
obj-$(CONFIG_SCSI_QLA24XX) += qla2xxx.o qla2400.o
/*
* QLogic Fibre Channel HBA Driver
* Copyright (C) 2003 Christoph Hellwig.
* Copyright (c) 2003-2005 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
#include "qla_def.h"
static char qla_driver_name[] = "qla2100";
extern unsigned char fw2100tp_version[];
extern unsigned char fw2100tp_version_str[];
extern unsigned short fw2100tp_addr01;
extern unsigned short fw2100tp_code01[];
extern unsigned short fw2100tp_length01;
static struct qla_fw_info qla_fw_tbl[] = {
{
.addressing = FW_INFO_ADDR_NORMAL,
.fwcode = &fw2100tp_code01[0],
.fwlen = &fw2100tp_length01,
.fwstart = &fw2100tp_addr01,
},
{ FW_INFO_ADDR_NOMORE, },
};
static struct qla_board_info qla_board_tbl = {
.drv_name = qla_driver_name,
.isp_name = "ISP2100",
.fw_info = qla_fw_tbl,
};
static struct pci_device_id qla2100_pci_tbl[] = {
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP2100,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl,
},
{0, 0},
};
MODULE_DEVICE_TABLE(pci, qla2100_pci_tbl);
static int __devinit
qla2100_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
return qla2x00_probe_one(pdev,
(struct qla_board_info *)id->driver_data);
}
static void __devexit
qla2100_remove_one(struct pci_dev *pdev)
{
qla2x00_remove_one(pdev);
}
static struct pci_driver qla2100_pci_driver = {
.name = "qla2100",
.id_table = qla2100_pci_tbl,
.probe = qla2100_probe_one,
.remove = __devexit_p(qla2100_remove_one),
};
static int __init
qla2100_init(void)
{
return pci_module_init(&qla2100_pci_driver);
}
static void __exit
qla2100_exit(void)
{
pci_unregister_driver(&qla2100_pci_driver);
}
module_init(qla2100_init);
module_exit(qla2100_exit);
MODULE_AUTHOR("QLogic Corporation");
MODULE_DESCRIPTION("QLogic ISP21xx FC-SCSI Host Bus Adapter driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(QLA2XXX_VERSION);
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* QLogic Fibre Channel HBA Driver
* Copyright (C) 2003 Christoph Hellwig.
* Copyright (c) 2003-2005 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
#include "qla_def.h"
static char qla_driver_name[] = "qla2200";
extern unsigned char fw2200tp_version[];
extern unsigned char fw2200tp_version_str[];
extern unsigned short fw2200tp_addr01;
extern unsigned short fw2200tp_code01[];
extern unsigned short fw2200tp_length01;
static struct qla_fw_info qla_fw_tbl[] = {
{
.addressing = FW_INFO_ADDR_NORMAL,
.fwcode = &fw2200tp_code01[0],
.fwlen = &fw2200tp_length01,
.fwstart = &fw2200tp_addr01,
},
{ FW_INFO_ADDR_NOMORE, },
};
static struct qla_board_info qla_board_tbl = {
.drv_name = qla_driver_name,
.isp_name = "ISP2200",
.fw_info = qla_fw_tbl,
};
static struct pci_device_id qla2200_pci_tbl[] = {
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP2200,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl,
},
{0, 0},
};
MODULE_DEVICE_TABLE(pci, qla2200_pci_tbl);
static int __devinit
qla2200_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
return qla2x00_probe_one(pdev,
(struct qla_board_info *)id->driver_data);
}
static void __devexit
qla2200_remove_one(struct pci_dev *pdev)
{
qla2x00_remove_one(pdev);
}
static struct pci_driver qla2200_pci_driver = {
.name = "qla2200",
.id_table = qla2200_pci_tbl,
.probe = qla2200_probe_one,
.remove = __devexit_p(qla2200_remove_one),
};
static int __init
qla2200_init(void)
{
return pci_module_init(&qla2200_pci_driver);
}
static void __exit
qla2200_exit(void)
{
pci_unregister_driver(&qla2200_pci_driver);
}
module_init(qla2200_init);
module_exit(qla2200_exit);
MODULE_AUTHOR("QLogic Corporation");
MODULE_DESCRIPTION("QLogic ISP22xx FC-SCSI Host Bus Adapter driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(QLA2XXX_VERSION);
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* QLogic Fibre Channel HBA Driver
* Copyright (C) 2003 Christoph Hellwig.
* Copyright (c) 2003-2005 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
#include "qla_def.h"
static char qla_driver_name[] = "qla2300";
extern unsigned char fw2300ipx_version[];
extern unsigned char fw2300ipx_version_str[];
extern unsigned short fw2300ipx_addr01;
extern unsigned short fw2300ipx_code01[];
extern unsigned short fw2300ipx_length01;
static struct qla_fw_info qla_fw_tbl[] = {
{
.addressing = FW_INFO_ADDR_NORMAL,
.fwcode = &fw2300ipx_code01[0],
.fwlen = &fw2300ipx_length01,
.fwstart = &fw2300ipx_addr01,
},
{ FW_INFO_ADDR_NOMORE, },
};
static struct qla_board_info qla_board_tbl[] = {
{
.drv_name = qla_driver_name,
.isp_name = "ISP2300",
.fw_info = qla_fw_tbl,
},
{
.drv_name = qla_driver_name,
.isp_name = "ISP2312",
.fw_info = qla_fw_tbl,
},
{
.drv_name = qla_driver_name,
.isp_name = "ISP6312",
.fw_info = qla_fw_tbl,
},
};
static struct pci_device_id qla2300_pci_tbl[] = {
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP2300,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[0],
},
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP2312,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[1],
},
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP6312,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[2],
},
{0, 0},
};
MODULE_DEVICE_TABLE(pci, qla2300_pci_tbl);
static int __devinit
qla2300_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
return qla2x00_probe_one(pdev,
(struct qla_board_info *)id->driver_data);
}
static void __devexit
qla2300_remove_one(struct pci_dev *pdev)
{
qla2x00_remove_one(pdev);
}
static struct pci_driver qla2300_pci_driver = {
.name = "qla2300",
.id_table = qla2300_pci_tbl,
.probe = qla2300_probe_one,
.remove = __devexit_p(qla2300_remove_one),
};
static int __init
qla2300_init(void)
{
return pci_module_init(&qla2300_pci_driver);
}
static void __exit
qla2300_exit(void)
{
pci_unregister_driver(&qla2300_pci_driver);
}
module_init(qla2300_init);
module_exit(qla2300_exit);
MODULE_AUTHOR("QLogic Corporation");
MODULE_DESCRIPTION("QLogic ISP23xx FC-SCSI Host Bus Adapter driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(QLA2XXX_VERSION);
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2005 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
#include "qla_def.h"
static char qla_driver_name[] = "qla2322";
extern unsigned char fw2322ipx_version[];
extern unsigned char fw2322ipx_version_str[];
extern unsigned short fw2322ipx_addr01;
extern unsigned short fw2322ipx_code01[];
extern unsigned short fw2322ipx_length01;
extern unsigned long rseqipx_code_addr01;
extern unsigned short rseqipx_code01[];
extern unsigned short rseqipx_code_length01;
extern unsigned long xseqipx_code_addr01;
extern unsigned short xseqipx_code01[];
extern unsigned short xseqipx_code_length01;
static struct qla_fw_info qla_fw_tbl[] = {
{
.addressing = FW_INFO_ADDR_NORMAL,
.fwcode = &fw2322ipx_code01[0],
.fwlen = &fw2322ipx_length01,
.fwstart = &fw2322ipx_addr01,
},
{
.addressing = FW_INFO_ADDR_EXTENDED,
.fwcode = &rseqipx_code01[0],
.fwlen = &rseqipx_code_length01,
.lfwstart = &rseqipx_code_addr01,
},
{
.addressing = FW_INFO_ADDR_EXTENDED,
.fwcode = &xseqipx_code01[0],
.fwlen = &xseqipx_code_length01,
.lfwstart = &xseqipx_code_addr01,
},
{ FW_INFO_ADDR_NOMORE, },
};
static struct qla_board_info qla_board_tbl[] = {
{
.drv_name = qla_driver_name,
.isp_name = "ISP2322",
.fw_info = qla_fw_tbl,
},
{
.drv_name = qla_driver_name,
.isp_name = "ISP6322",
.fw_info = qla_fw_tbl,
},
};
static struct pci_device_id qla2322_pci_tbl[] = {
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP2322,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[0],
},
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP6322,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[1],
},
{0, 0},
};
MODULE_DEVICE_TABLE(pci, qla2322_pci_tbl);
static int __devinit
qla2322_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
return qla2x00_probe_one(pdev,
(struct qla_board_info *)id->driver_data);
}
static void __devexit
qla2322_remove_one(struct pci_dev *pdev)
{
qla2x00_remove_one(pdev);
}
static struct pci_driver qla2322_pci_driver = {
.name = "qla2322",
.id_table = qla2322_pci_tbl,
.probe = qla2322_probe_one,
.remove = __devexit_p(qla2322_remove_one),
};
static int __init
qla2322_init(void)
{
return pci_module_init(&qla2322_pci_driver);
}
static void __exit
qla2322_exit(void)
{
pci_unregister_driver(&qla2322_pci_driver);
}
module_init(qla2322_init);
module_exit(qla2322_exit);
MODULE_AUTHOR("QLogic Corporation");
MODULE_DESCRIPTION("QLogic ISP2322 FC-SCSI Host Bus Adapter driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(QLA2XXX_VERSION);
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2005 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
#include "qla_def.h"
static char qla_driver_name[] = "qla2400";
extern uint32_t fw2400_version_str[];
extern uint32_t fw2400_addr01;
extern uint32_t fw2400_code01[];
extern uint32_t fw2400_length01;
extern uint32_t fw2400_addr02;
extern uint32_t fw2400_code02[];
extern uint32_t fw2400_length02;
static struct qla_fw_info qla_fw_tbl[] = {
{
.addressing = FW_INFO_ADDR_EXTENDED,
.fwcode = (unsigned short *)&fw2400_code01[0],
.fwlen = (unsigned short *)&fw2400_length01,
.lfwstart = (unsigned long *)&fw2400_addr01,
},
{
.addressing = FW_INFO_ADDR_EXTENDED,
.fwcode = (unsigned short *)&fw2400_code02[0],
.fwlen = (unsigned short *)&fw2400_length02,
.lfwstart = (unsigned long *)&fw2400_addr02,
},
{ FW_INFO_ADDR_NOMORE, },
};
static struct qla_board_info qla_board_tbl[] = {
{
.drv_name = qla_driver_name,
.isp_name = "ISP2422",
.fw_info = qla_fw_tbl,
.fw_fname = "ql2400_fw.bin",
},
{
.drv_name = qla_driver_name,
.isp_name = "ISP2432",
.fw_info = qla_fw_tbl,
.fw_fname = "ql2400_fw.bin",
},
{
.drv_name = qla_driver_name,
.isp_name = "ISP5422",
.fw_info = qla_fw_tbl,
.fw_fname = "ql2400_fw.bin",
},
{
.drv_name = qla_driver_name,
.isp_name = "ISP5432",
.fw_info = qla_fw_tbl,
.fw_fname = "ql2400_fw.bin",
},
};
static struct pci_device_id qla24xx_pci_tbl[] = {
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP2422,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[0],
},
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP2432,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[1],
},
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP5422,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[2],
},
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP5432,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long)&qla_board_tbl[3],
},
{0, 0},
};
MODULE_DEVICE_TABLE(pci, qla24xx_pci_tbl);
static int __devinit
qla24xx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
return qla2x00_probe_one(pdev,
(struct qla_board_info *)id->driver_data);
}
static void __devexit
qla24xx_remove_one(struct pci_dev *pdev)
{
qla2x00_remove_one(pdev);
}
static struct pci_driver qla24xx_pci_driver = {
.name = "qla2400",
.id_table = qla24xx_pci_tbl,
.probe = qla24xx_probe_one,
.remove = __devexit_p(qla24xx_remove_one),
};
static int __init
qla24xx_init(void)
{
return pci_module_init(&qla24xx_pci_driver);
}
static void __exit
qla24xx_exit(void)
{
pci_unregister_driver(&qla24xx_pci_driver);
}
module_init(qla24xx_init);
module_exit(qla24xx_exit);
MODULE_AUTHOR("QLogic Corporation");
MODULE_DESCRIPTION("QLogic ISP24xx FC-SCSI Host Bus Adapter driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(QLA2XXX_VERSION);
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1938,26 +1938,6 @@ struct sns_cmd_pkt {
} p;
};
struct qla_fw_info {
unsigned short addressing; /* addressing method used to load fw */
#define FW_INFO_ADDR_NORMAL 0
#define FW_INFO_ADDR_EXTENDED 1
#define FW_INFO_ADDR_NOMORE 0xffff
unsigned short *fwcode; /* pointer to FW array */
unsigned short *fwlen; /* number of words in array */
unsigned short *fwstart; /* start address for F/W */
unsigned long *lfwstart; /* start address (long) for F/W */
};
struct qla_board_info {
char *drv_name;
char isp_name[8];
struct qla_fw_info *fw_info;
char *fw_fname;
struct scsi_host_template *sht;
};
struct fw_blob {
char *name;
uint32_t segs[4];
......@@ -2305,13 +2285,16 @@ typedef struct scsi_qla_host {
mbx_cmd_t mc;
/* Basic firmware related information. */
struct qla_board_info *brd_info;
uint16_t fw_major_version;
uint16_t fw_minor_version;
uint16_t fw_subminor_version;
uint16_t fw_attributes;
uint32_t fw_memory_size;
uint32_t fw_transfer_size;
uint32_t fw_srisc_address;
#define RISC_START_ADDRESS_2100 0x1000
#define RISC_START_ADDRESS_2300 0x800
#define RISC_START_ADDRESS_2400 0x100000
uint16_t fw_options[16]; /* slots: 1,2,3,10,11 */
uint8_t fw_seriallink_options[4];
......
......@@ -7,7 +7,6 @@
#ifndef __QLA_FW_H
#define __QLA_FW_H
#define RISC_SADDRESS 0x100000
#define MBS_CHECKSUM_ERROR 0x4010
/*
......
......@@ -9,9 +9,6 @@
#include <linux/interrupt.h>
extern void qla2x00_remove_one(struct pci_dev *);
extern int qla2x00_probe_one(struct pci_dev *, struct qla_board_info *);
/*
* Global Function Prototypes in qla_init.c source file.
*/
......
......@@ -383,9 +383,7 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha)
qla_printk(KERN_INFO, ha, "RISC CODE NOT loaded\n");
/* Verify checksum of loaded RISC code. */
rval = qla2x00_verify_checksum(ha,
IS_QLA24XX(ha) || IS_QLA54XX(ha) ? RISC_SADDRESS :
*ha->brd_info->fw_info[0].fwstart);
rval = qla2x00_verify_checksum(ha, ha->fw_srisc_address);
}
if (rval) {
......@@ -3545,135 +3543,6 @@ qla24xx_load_risc_flash(scsi_qla_host_t *ha, uint32_t *srisc_addr)
return rval;
}
#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE)
int
qla2x00_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr)
{
int rval, num, i;
uint32_t cnt;
uint16_t *risc_code;
uint32_t risc_addr, risc_size;
uint16_t *req_ring;
struct qla_fw_info *fw_iter;
rval = QLA_SUCCESS;
/* Load firmware sequences */
fw_iter = ha->brd_info->fw_info;
*srisc_addr = *ha->brd_info->fw_info->fwstart;
while (fw_iter->addressing != FW_INFO_ADDR_NOMORE) {
risc_code = fw_iter->fwcode;
risc_size = *fw_iter->fwlen;
if (fw_iter->addressing == FW_INFO_ADDR_NORMAL)
risc_addr = *fw_iter->fwstart;
else
risc_addr = *fw_iter->lfwstart;
num = 0;
rval = 0;
while (risc_size > 0 && !rval) {
cnt = (uint16_t)(ha->fw_transfer_size >> 1);
if (cnt > risc_size)
cnt = risc_size;
DEBUG7(printk("scsi(%ld): Loading risc segment@ "
"addr %p, number of bytes 0x%x, offset 0x%lx.\n",
ha->host_no, risc_code, cnt, risc_addr));
req_ring = (uint16_t *)ha->request_ring;
for (i = 0; i < cnt; i++)
req_ring[i] = cpu_to_le16(risc_code[i]);
rval = qla2x00_load_ram(ha, ha->request_dma, risc_addr,
cnt);
if (rval) {
DEBUG(printk("scsi(%ld): [ERROR] Failed to "
"load segment %d of firmware\n",
ha->host_no, num));
qla_printk(KERN_WARNING, ha,
"[ERROR] Failed to load segment %d of "
"firmware\n", num);
qla2x00_dump_regs(ha);
break;
}
risc_code += cnt;
risc_addr += cnt;
risc_size -= cnt;
num++;
}
/* Next firmware sequence */
fw_iter++;
}
return rval;
}
int
qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr)
{
int rval, num, i;
uint32_t cnt;
uint32_t *risc_code;
uint32_t risc_addr, risc_size;
uint32_t *req_ring;
struct qla_fw_info *fw_iter;
rval = QLA_SUCCESS;
/* Load firmware sequences */
fw_iter = ha->brd_info->fw_info;
*srisc_addr = *((uint32_t *)fw_iter->lfwstart);
while (fw_iter->addressing != FW_INFO_ADDR_NOMORE) {
risc_code = (uint32_t *)fw_iter->fwcode;
risc_size = *((uint32_t *)fw_iter->fwlen);
risc_addr = *((uint32_t *)fw_iter->lfwstart);
num = 0;
rval = 0;
while (risc_size > 0 && !rval) {
cnt = (uint32_t)(ha->fw_transfer_size >> 2);
if (cnt > risc_size)
cnt = risc_size;
DEBUG7(printk("scsi(%ld): Loading risc segment@ "
"addr %p, number of bytes 0x%x, offset 0x%lx.\n",
ha->host_no, risc_code, cnt, risc_addr));
req_ring = (uint32_t *)ha->request_ring;
for (i = 0; i < cnt; i++)
req_ring[i] = cpu_to_le32(risc_code[i]);
rval = qla2x00_load_ram(ha, ha->request_dma, risc_addr,
cnt);
if (rval) {
DEBUG(printk("scsi(%ld): [ERROR] Failed to "
"load segment %d of firmware\n",
ha->host_no, num));
qla_printk(KERN_WARNING, ha,
"[ERROR] Failed to load segment %d of "
"firmware\n", num);
qla2x00_dump_regs(ha);
break;
}
risc_code += cnt;
risc_addr += cnt;
risc_size -= cnt;
num++;
}
/* Next firmware sequence */
fw_iter++;
}
return rval;
}
#else /* !defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) */
#define QLA_FW_URL "ftp://ftp.qlogic.com/outgoing/linux/firmware/"
int
......@@ -3884,4 +3753,3 @@ qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr)
fail_fw_integrity:
return QLA_FUNCTION_FAILED;
}
#endif
......@@ -54,13 +54,6 @@ module_param(ql2xloginretrycount, int, S_IRUGO|S_IRUSR);
MODULE_PARM_DESC(ql2xloginretrycount,
"Specify an alternate value for the NVRAM login retry count.");
#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE)
int ql2xfwloadflash;
module_param(ql2xfwloadflash, int, S_IRUGO|S_IRUSR);
MODULE_PARM_DESC(ql2xfwloadflash,
"Load ISP24xx firmware image from FLASH (onboard memory).");
#endif
static void qla2x00_free_device(scsi_qla_host_t *);
static void qla2x00_config_dma_addressing(scsi_qla_host_t *ha);
......@@ -1150,18 +1143,22 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha)
case PCI_DEVICE_ID_QLOGIC_ISP2100:
ha->device_type |= DT_ISP2100;
ha->device_type &= ~DT_EXTENDED_IDS;
ha->fw_srisc_address = RISC_START_ADDRESS_2100;
break;
case PCI_DEVICE_ID_QLOGIC_ISP2200:
ha->device_type |= DT_ISP2200;
ha->device_type &= ~DT_EXTENDED_IDS;
ha->fw_srisc_address = RISC_START_ADDRESS_2100;
break;
case PCI_DEVICE_ID_QLOGIC_ISP2300:
ha->device_type |= DT_ISP2300;
ha->device_type |= DT_ZIO_SUPPORTED;
ha->fw_srisc_address = RISC_START_ADDRESS_2300;
break;
case PCI_DEVICE_ID_QLOGIC_ISP2312:
ha->device_type |= DT_ISP2312;
ha->device_type |= DT_ZIO_SUPPORTED;
ha->fw_srisc_address = RISC_START_ADDRESS_2300;
break;
case PCI_DEVICE_ID_QLOGIC_ISP2322:
ha->device_type |= DT_ISP2322;
......@@ -1169,26 +1166,33 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha)
if (ha->pdev->subsystem_vendor == 0x1028 &&
ha->pdev->subsystem_device == 0x0170)
ha->device_type |= DT_OEM_001;
ha->fw_srisc_address = RISC_START_ADDRESS_2300;
break;
case PCI_DEVICE_ID_QLOGIC_ISP6312:
ha->device_type |= DT_ISP6312;
ha->fw_srisc_address = RISC_START_ADDRESS_2300;
break;
case PCI_DEVICE_ID_QLOGIC_ISP6322:
ha->device_type |= DT_ISP6322;
ha->fw_srisc_address = RISC_START_ADDRESS_2300;
break;
case PCI_DEVICE_ID_QLOGIC_ISP2422:
ha->device_type |= DT_ISP2422;
ha->device_type |= DT_ZIO_SUPPORTED;
ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break;
case PCI_DEVICE_ID_QLOGIC_ISP2432:
ha->device_type |= DT_ISP2432;
ha->device_type |= DT_ZIO_SUPPORTED;
ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break;
case PCI_DEVICE_ID_QLOGIC_ISP5422:
ha->device_type |= DT_ISP5422;
ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break;
case PCI_DEVICE_ID_QLOGIC_ISP5432:
ha->device_type |= DT_ISP5432;
ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break;
}
}
......@@ -1235,7 +1239,7 @@ qla2x00_iospace_config(scsi_qla_host_t *ha)
goto iospace_error_exit;
}
if (pci_request_regions(ha->pdev, ha->brd_info->drv_name)) {
if (pci_request_regions(ha->pdev, "qla2xxx")) {
qla_printk(KERN_WARNING, ha,
"Failed to reserve PIO/MMIO regions (%s)\n",
pci_name(ha->pdev));
......@@ -1317,7 +1321,7 @@ qla24xx_disable_intrs(scsi_qla_host_t *ha)
/*
* PCI driver interface
*/
int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
static int qla2x00_probe_one(struct pci_dev *pdev)
{
int ret = -ENODEV;
device_reg_t __iomem *reg;
......@@ -1351,8 +1355,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
ha->pdev = pdev;
ha->host = host;
ha->host_no = host->host_no;
ha->brd_info = brd_info;
sprintf(ha->host_str, "%s_%ld", ha->brd_info->drv_name, ha->host_no);
sprintf(ha->host_str, "qla2xxx_%ld", ha->host_no);
/* Set ISP-type information. */
qla2x00_set_isp_flags(ha);
......@@ -1449,10 +1452,6 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
ha->isp_ops.nvram_config = qla24xx_nvram_config;
ha->isp_ops.update_fw_options = qla24xx_update_fw_options;
ha->isp_ops.load_risc = qla24xx_load_risc;
#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE)
if (ql2xfwloadflash)
ha->isp_ops.load_risc = qla24xx_load_risc_flash;
#endif
ha->isp_ops.pci_info_str = qla24xx_pci_info_str;
ha->isp_ops.fw_version_str = qla24xx_fw_version_str;
ha->isp_ops.intr_handler = qla24xx_intr_handler;
......@@ -1539,7 +1538,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
host->transportt = qla2xxx_transport_template;
ret = request_irq(pdev->irq, ha->isp_ops.intr_handler,
SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha);
SA_INTERRUPT|SA_SHIRQ, "qla2xxx", ha);
if (ret) {
qla_printk(KERN_WARNING, ha,
"Failed to reserve interrupt %d already in use.\n",
......@@ -1637,9 +1636,8 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
probe_out:
return ret;
}
EXPORT_SYMBOL_GPL(qla2x00_probe_one);
void qla2x00_remove_one(struct pci_dev *pdev)
static void qla2x00_remove_one(struct pci_dev *pdev)
{
scsi_qla_host_t *ha;
......@@ -1657,7 +1655,6 @@ void qla2x00_remove_one(struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL);
}
EXPORT_SYMBOL_GPL(qla2x00_remove_one);
static void
qla2x00_free_device(scsi_qla_host_t *ha)
......@@ -2539,14 +2536,6 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout)
return -ETIMEDOUT;
}
#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE)
#define qla2x00_release_firmware() do { } while (0)
#define qla2x00_pci_module_init() (0)
#define qla2x00_pci_module_exit() do { } while (0)
#else /* !defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) */
/* Firmware interface routines. */
#define FW_BLOBS 5
......@@ -2613,10 +2602,6 @@ qla2x00_release_firmware(void)
up(&qla_fw_lock);
}
static struct qla_board_info qla_board_tbl = {
.drv_name = "qla2xxx",
};
static struct pci_device_id qla2xxx_pci_tbl[] = {
{ PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100,
PCI_ANY_ID, PCI_ANY_ID, },
......@@ -2647,7 +2632,7 @@ MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl);
static int __devinit
qla2xxx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
return qla2x00_probe_one(pdev, &qla_board_tbl);
return qla2x00_probe_one(pdev);
}
static void __devexit
......@@ -2678,8 +2663,6 @@ qla2x00_pci_module_exit(void)
pci_unregister_driver(&qla2xxx_pci_driver);
}
#endif
/**
* qla2x00_module_init - Module initialization.
**/
......@@ -2699,9 +2682,6 @@ qla2x00_module_init(void)
/* Derive version string. */
strcpy(qla2x00_version_str, QLA2XXX_VERSION);
#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE)
strcat(qla2x00_version_str, "-fw");
#endif
#if DEBUG_QLA2100
strcat(qla2x00_version_str, "-debug");
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment