aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/ql2400.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2005-11-09 18:49:19 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-13 20:11:19 -0500
commit331e34768657ead5a5b169337351e045305cafcb (patch)
tree952cb2dc4cb8ba3966d2de18e9830f3ca99f1464 /drivers/scsi/qla2xxx/ql2400.c
parent5433383ef33ed40c9c8a86a4355da344234af2a5 (diff)
[SCSI] qla2xxx: Add support for embedded ISP24xx firmware.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/ql2400.c')
-rw-r--r--drivers/scsi/qla2xxx/ql2400.c111
1 files changed, 111 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/ql2400.c b/drivers/scsi/qla2xxx/ql2400.c
new file mode 100644
index 000000000000..6c7165f47e29
--- /dev/null
+++ b/drivers/scsi/qla2xxx/ql2400.c
@@ -0,0 +1,111 @@
1/*
2 * QLogic Fibre Channel HBA Driver
3 * Copyright (c) 2003-2005 QLogic Corporation
4 *
5 * See LICENSE.qla2xxx for copyright and licensing details.
6 */
7#include <linux/init.h>
8#include <linux/module.h>
9#include <linux/pci.h>
10
11#include "qla_def.h"
12
13static char qla_driver_name[] = "qla2400";
14
15extern uint32_t fw2400_version_str[];
16extern uint32_t fw2400_addr01;
17extern uint32_t fw2400_code01[];
18extern uint32_t fw2400_length01;
19extern uint32_t fw2400_addr02;
20extern uint32_t fw2400_code02[];
21extern uint32_t fw2400_length02;
22
23static struct qla_fw_info qla_fw_tbl[] = {
24 {
25 .addressing = FW_INFO_ADDR_EXTENDED,
26 .fwcode = (unsigned short *)&fw2400_code01[0],
27 .fwlen = (unsigned short *)&fw2400_length01,
28 .lfwstart = (unsigned long *)&fw2400_addr01,
29 },
30 {
31 .addressing = FW_INFO_ADDR_EXTENDED,
32 .fwcode = (unsigned short *)&fw2400_code02[0],
33 .fwlen = (unsigned short *)&fw2400_length02,
34 .lfwstart = (unsigned long *)&fw2400_addr02,
35 },
36 { FW_INFO_ADDR_NOMORE, },
37};
38
39static struct qla_board_info qla_board_tbl[] = {
40 {
41 .drv_name = qla_driver_name,
42 .isp_name = "ISP2422",
43 .fw_info = qla_fw_tbl,
44 .fw_fname = "ql2400_fw.bin",
45 },
46 {
47 .drv_name = qla_driver_name,
48 .isp_name = "ISP2432",
49 .fw_info = qla_fw_tbl,
50 .fw_fname = "ql2400_fw.bin",
51 },
52};
53
54static struct pci_device_id qla24xx_pci_tbl[] = {
55 {
56 .vendor = PCI_VENDOR_ID_QLOGIC,
57 .device = PCI_DEVICE_ID_QLOGIC_ISP2422,
58 .subvendor = PCI_ANY_ID,
59 .subdevice = PCI_ANY_ID,
60 .driver_data = (unsigned long)&qla_board_tbl[0],
61 },
62 {
63 .vendor = PCI_VENDOR_ID_QLOGIC,
64 .device = PCI_DEVICE_ID_QLOGIC_ISP2432,
65 .subvendor = PCI_ANY_ID,
66 .subdevice = PCI_ANY_ID,
67 .driver_data = (unsigned long)&qla_board_tbl[1],
68 },
69 {0, 0},
70};
71MODULE_DEVICE_TABLE(pci, qla24xx_pci_tbl);
72
73static int __devinit
74qla24xx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
75{
76 return qla2x00_probe_one(pdev,
77 (struct qla_board_info *)id->driver_data);
78}
79
80static void __devexit
81qla24xx_remove_one(struct pci_dev *pdev)
82{
83 qla2x00_remove_one(pdev);
84}
85
86static struct pci_driver qla24xx_pci_driver = {
87 .name = "qla2400",
88 .id_table = qla24xx_pci_tbl,
89 .probe = qla24xx_probe_one,
90 .remove = __devexit_p(qla24xx_remove_one),
91};
92
93static int __init
94qla24xx_init(void)
95{
96 return pci_module_init(&qla24xx_pci_driver);
97}
98
99static void __exit
100qla24xx_exit(void)
101{
102 pci_unregister_driver(&qla24xx_pci_driver);
103}
104
105module_init(qla24xx_init);
106module_exit(qla24xx_exit);
107
108MODULE_AUTHOR("QLogic Corporation");
109MODULE_DESCRIPTION("QLogic ISP24xx FC-SCSI Host Bus Adapter driver");
110MODULE_LICENSE("GPL");
111MODULE_VERSION(QLA2XXX_VERSION);