blob: 70b6d75ed6348ad8ac559fd3f5e172bf8269e92c [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * QLogic ISP2322 device driver for Linux 2.6.x
3 * Copyright (C) 2003-2004 QLogic Corporation (www.qlogic.com)
4 *
5 * Released under GPL v2.
6 */
7
8#include <linux/init.h>
9#include <linux/module.h>
10#include <linux/pci.h>
11
12#include "qla_def.h"
13
14static char qla_driver_name[] = "qla2322";
15
16extern unsigned char fw2322ipx_version[];
17extern unsigned char fw2322ipx_version_str[];
18extern unsigned short fw2322ipx_addr01;
19extern unsigned short fw2322ipx_code01[];
20extern unsigned short fw2322ipx_length01;
21extern unsigned long rseqipx_code_addr01;
22extern unsigned short rseqipx_code01[];
23extern unsigned short rseqipx_code_length01;
24extern unsigned long xseqipx_code_addr01;
25extern unsigned short xseqipx_code01[];
26extern unsigned short xseqipx_code_length01;
27
28static struct qla_fw_info qla_fw_tbl[] = {
29 {
30 .addressing = FW_INFO_ADDR_NORMAL,
31 .fwcode = &fw2322ipx_code01[0],
32 .fwlen = &fw2322ipx_length01,
33 .fwstart = &fw2322ipx_addr01,
34 },
35 {
36 .addressing = FW_INFO_ADDR_EXTENDED,
37 .fwcode = &rseqipx_code01[0],
38 .fwlen = &rseqipx_code_length01,
39 .lfwstart = &rseqipx_code_addr01,
40 },
41 {
42 .addressing = FW_INFO_ADDR_EXTENDED,
43 .fwcode = &xseqipx_code01[0],
44 .fwlen = &xseqipx_code_length01,
45 .lfwstart = &xseqipx_code_addr01,
46 },
47 { FW_INFO_ADDR_NOMORE, },
48};
49
50static struct qla_board_info qla_board_tbl[] = {
51 {
52 .drv_name = qla_driver_name,
53 .isp_name = "ISP2322",
54 .fw_info = qla_fw_tbl,
55 },
56};
57
58static struct pci_device_id qla2322_pci_tbl[] = {
59 {
60 .vendor = PCI_VENDOR_ID_QLOGIC,
61 .device = PCI_DEVICE_ID_QLOGIC_ISP2322,
62 .subvendor = PCI_ANY_ID,
63 .subdevice = PCI_ANY_ID,
64 .driver_data = (unsigned long)&qla_board_tbl[0],
65 },
66 {0, 0},
67};
68MODULE_DEVICE_TABLE(pci, qla2322_pci_tbl);
69
70static int __devinit
71qla2322_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
72{
73 return qla2x00_probe_one(pdev,
74 (struct qla_board_info *)id->driver_data);
75}
76
77static void __devexit
78qla2322_remove_one(struct pci_dev *pdev)
79{
80 qla2x00_remove_one(pdev);
81}
82
83static struct pci_driver qla2322_pci_driver = {
84 .name = "qla2322",
85 .id_table = qla2322_pci_tbl,
86 .probe = qla2322_probe_one,
87 .remove = __devexit_p(qla2322_remove_one),
88};
89
90static int __init
91qla2322_init(void)
92{
93 return pci_module_init(&qla2322_pci_driver);
94}
95
96static void __exit
97qla2322_exit(void)
98{
99 pci_unregister_driver(&qla2322_pci_driver);
100}
101
102module_init(qla2322_init);
103module_exit(qla2322_exit);
104
105MODULE_AUTHOR("QLogic Corporation");
106MODULE_DESCRIPTION("QLogic ISP2322 FC-SCSI Host Bus Adapter driver");
107MODULE_LICENSE("GPL");
108MODULE_VERSION(QLA2XXX_VERSION);