blob: 0eef72dc8da0d70b43b915017e7ba88b83d4a0f6 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Andrew Vasquezfa90c542005-10-27 11:10:08 -07002 * QLogic Fibre Channel HBA Driver
3 * Copyright (C) 2003 Christoph Hellwig.
4 * Copyright (c) 2003-2005 QLogic Corporation
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 *
Andrew Vasquezfa90c542005-10-27 11:10:08 -07006 * See LICENSE.qla2xxx for copyright and licensing details.
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07008#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[] = "qla2200";
15
16extern unsigned char fw2200tp_version[];
17extern unsigned char fw2200tp_version_str[];
18extern unsigned short fw2200tp_addr01;
19extern unsigned short fw2200tp_code01[];
20extern unsigned short fw2200tp_length01;
21
22static struct qla_fw_info qla_fw_tbl[] = {
23 {
24 .addressing = FW_INFO_ADDR_NORMAL,
25 .fwcode = &fw2200tp_code01[0],
26 .fwlen = &fw2200tp_length01,
27 .fwstart = &fw2200tp_addr01,
28 },
29
30 { FW_INFO_ADDR_NOMORE, },
31};
32
33static struct qla_board_info qla_board_tbl = {
34 .drv_name = qla_driver_name,
35
36 .isp_name = "ISP2200",
37 .fw_info = qla_fw_tbl,
38};
39
40static struct pci_device_id qla2200_pci_tbl[] = {
41 {
42 .vendor = PCI_VENDOR_ID_QLOGIC,
43 .device = PCI_DEVICE_ID_QLOGIC_ISP2200,
44 .subvendor = PCI_ANY_ID,
45 .subdevice = PCI_ANY_ID,
46 .driver_data = (unsigned long)&qla_board_tbl,
47 },
48
49 {0, 0},
50};
51MODULE_DEVICE_TABLE(pci, qla2200_pci_tbl);
52
53static int __devinit
54qla2200_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
55{
56 return qla2x00_probe_one(pdev,
57 (struct qla_board_info *)id->driver_data);
58}
59
60static void __devexit
61qla2200_remove_one(struct pci_dev *pdev)
62{
63 qla2x00_remove_one(pdev);
64}
65
66static struct pci_driver qla2200_pci_driver = {
67 .name = "qla2200",
68 .id_table = qla2200_pci_tbl,
69 .probe = qla2200_probe_one,
70 .remove = __devexit_p(qla2200_remove_one),
71};
72
73static int __init
74qla2200_init(void)
75{
76 return pci_module_init(&qla2200_pci_driver);
77}
78
79static void __exit
80qla2200_exit(void)
81{
82 pci_unregister_driver(&qla2200_pci_driver);
83}
84
85module_init(qla2200_init);
86module_exit(qla2200_exit);
87
88MODULE_AUTHOR("QLogic Corporation");
89MODULE_DESCRIPTION("QLogic ISP22xx FC-SCSI Host Bus Adapter driver");
90MODULE_LICENSE("GPL");
91MODULE_VERSION(QLA2XXX_VERSION);