]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/scsi/qla2xxx/ql2300.c
Linux-2.6.12-rc2
[mirror_ubuntu-artful-kernel.git] / drivers / scsi / qla2xxx / ql2300.c
1 /*
2 * QLogic ISP2300 device driver for Linux 2.6.x
3 * Copyright (C) 2003 Christoph Hellwig.
4 * Copyright (C) 2003-2004 QLogic Corporation (www.qlogic.com)
5 *
6 * Released under GPL v2.
7 */
8
9 #include <linux/init.h>
10 #include <linux/module.h>
11 #include <linux/pci.h>
12
13 #include "qla_def.h"
14
15 static char qla_driver_name[] = "qla2300";
16
17 extern unsigned char fw2300ipx_version[];
18 extern unsigned char fw2300ipx_version_str[];
19 extern unsigned short fw2300ipx_addr01;
20 extern unsigned short fw2300ipx_code01[];
21 extern unsigned short fw2300ipx_length01;
22
23 static struct qla_fw_info qla_fw_tbl[] = {
24 {
25 .addressing = FW_INFO_ADDR_NORMAL,
26 .fwcode = &fw2300ipx_code01[0],
27 .fwlen = &fw2300ipx_length01,
28 .fwstart = &fw2300ipx_addr01,
29 },
30 { FW_INFO_ADDR_NOMORE, },
31 };
32
33 static struct qla_board_info qla_board_tbl[] = {
34 {
35 .drv_name = qla_driver_name,
36 .isp_name = "ISP2300",
37 .fw_info = qla_fw_tbl,
38 },
39 {
40 .drv_name = qla_driver_name,
41 .isp_name = "ISP2312",
42 .fw_info = qla_fw_tbl,
43 },
44 };
45
46 static struct pci_device_id qla2300_pci_tbl[] = {
47 {
48 .vendor = PCI_VENDOR_ID_QLOGIC,
49 .device = PCI_DEVICE_ID_QLOGIC_ISP2300,
50 .subvendor = PCI_ANY_ID,
51 .subdevice = PCI_ANY_ID,
52 .driver_data = (unsigned long)&qla_board_tbl[0],
53 },
54 {
55 .vendor = PCI_VENDOR_ID_QLOGIC,
56 .device = PCI_DEVICE_ID_QLOGIC_ISP2312,
57 .subvendor = PCI_ANY_ID,
58 .subdevice = PCI_ANY_ID,
59 .driver_data = (unsigned long)&qla_board_tbl[1],
60 },
61 {0, 0},
62 };
63 MODULE_DEVICE_TABLE(pci, qla2300_pci_tbl);
64
65 static int __devinit
66 qla2300_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
67 {
68 return qla2x00_probe_one(pdev,
69 (struct qla_board_info *)id->driver_data);
70 }
71
72 static void __devexit
73 qla2300_remove_one(struct pci_dev *pdev)
74 {
75 qla2x00_remove_one(pdev);
76 }
77
78 static struct pci_driver qla2300_pci_driver = {
79 .name = "qla2300",
80 .id_table = qla2300_pci_tbl,
81 .probe = qla2300_probe_one,
82 .remove = __devexit_p(qla2300_remove_one),
83 };
84
85 static int __init
86 qla2300_init(void)
87 {
88 return pci_module_init(&qla2300_pci_driver);
89 }
90
91 static void __exit
92 qla2300_exit(void)
93 {
94 pci_unregister_driver(&qla2300_pci_driver);
95 }
96
97 module_init(qla2300_init);
98 module_exit(qla2300_exit);
99
100 MODULE_AUTHOR("QLogic Corporation");
101 MODULE_DESCRIPTION("QLogic ISP23xx FC-SCSI Host Bus Adapter driver");
102 MODULE_LICENSE("GPL");
103 MODULE_VERSION(QLA2XXX_VERSION);