Pull release into acpica branch
[linux-2.6] / drivers / scsi / qla2xxx / ql6312.c
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
13 static char qla_driver_name[] = "qla6312";
14
15 extern unsigned char  fw2300flx_version[];
16 extern unsigned char  fw2300flx_version_str[];
17 extern unsigned short fw2300flx_addr01;
18 extern unsigned short fw2300flx_code01[];
19 extern unsigned short fw2300flx_length01;
20
21 static struct qla_fw_info qla_fw_tbl[] = {
22         {
23                 .addressing     = FW_INFO_ADDR_NORMAL,
24                 .fwcode         = &fw2300flx_code01[0],
25                 .fwlen          = &fw2300flx_length01,
26                 .fwstart        = &fw2300flx_addr01,
27         },
28         { FW_INFO_ADDR_NOMORE, },
29 };
30
31 static struct qla_board_info qla_board_tbl[] = {
32         {
33                 .drv_name       = qla_driver_name,
34                 .isp_name       = "ISP6312",
35                 .fw_info        = qla_fw_tbl,
36         },
37         {
38                 .drv_name       = qla_driver_name,
39                 .isp_name       = "ISP6322",
40                 .fw_info        = qla_fw_tbl,
41         },
42 };
43
44 static struct pci_device_id qla6312_pci_tbl[] = {
45         {
46                 .vendor         = PCI_VENDOR_ID_QLOGIC,
47                 .device         = PCI_DEVICE_ID_QLOGIC_ISP6312,
48                 .subvendor      = PCI_ANY_ID,
49                 .subdevice      = PCI_ANY_ID,
50                 .driver_data    = (unsigned long)&qla_board_tbl[0],
51         },
52         {
53                 .vendor         = PCI_VENDOR_ID_QLOGIC,
54                 .device         = PCI_DEVICE_ID_QLOGIC_ISP6322,
55                 .subvendor      = PCI_ANY_ID,
56                 .subdevice      = PCI_ANY_ID,
57                 .driver_data    = (unsigned long)&qla_board_tbl[1],
58         },
59         {0, 0},
60 };
61 MODULE_DEVICE_TABLE(pci, qla6312_pci_tbl);
62
63 static int __devinit
64 qla6312_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
65 {
66         return qla2x00_probe_one(pdev,
67             (struct qla_board_info *)id->driver_data);
68 }
69
70 static void __devexit
71 qla6312_remove_one(struct pci_dev *pdev)
72 {
73         qla2x00_remove_one(pdev);
74 }
75
76 static struct pci_driver qla6312_pci_driver = {
77         .name           = "qla6312",
78         .id_table       = qla6312_pci_tbl,
79         .probe          = qla6312_probe_one,
80         .remove         = __devexit_p(qla6312_remove_one),
81 };
82
83 static int __init
84 qla6312_init(void)
85 {
86         return pci_module_init(&qla6312_pci_driver);
87 }
88
89 static void __exit
90 qla6312_exit(void)
91 {
92         pci_unregister_driver(&qla6312_pci_driver);
93 }
94
95 module_init(qla6312_init);
96 module_exit(qla6312_exit);
97
98 MODULE_AUTHOR("QLogic Corporation");
99 MODULE_DESCRIPTION("QLogic ISP63xx FC-SCSI Host Bus Adapter driver");
100 MODULE_LICENSE("GPL");
101 MODULE_VERSION(QLA2XXX_VERSION);