blob: ea136a61af407d96d1c8f97d3834e858393faf43 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * QLogic ISP2100 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
15static char qla_driver_name[] = "qla2100";
16
17extern unsigned char fw2100tp_version[];
18extern unsigned char fw2100tp_version_str[];
19extern unsigned short fw2100tp_addr01;
20extern unsigned short fw2100tp_code01[];
21extern unsigned short fw2100tp_length01;
22
23static struct qla_fw_info qla_fw_tbl[] = {
24 {
25 .addressing = FW_INFO_ADDR_NORMAL,
26 .fwcode = &fw2100tp_code01[0],
27 .fwlen = &fw2100tp_length01,
28 .fwstart = &fw2100tp_addr01,
29 },
30
31 { FW_INFO_ADDR_NOMORE, },
32};
33
34static struct qla_board_info qla_board_tbl = {
35 .drv_name = qla_driver_name,
36
37 .isp_name = "ISP2100",
38 .fw_info = qla_fw_tbl,
39};
40
41static struct pci_device_id qla2100_pci_tbl[] = {
42 {
43 .vendor = PCI_VENDOR_ID_QLOGIC,
44 .device = PCI_DEVICE_ID_QLOGIC_ISP2100,
45 .subvendor = PCI_ANY_ID,
46 .subdevice = PCI_ANY_ID,
47 .driver_data = (unsigned long)&qla_board_tbl,
48 },
49
50 {0, 0},
51};
52MODULE_DEVICE_TABLE(pci, qla2100_pci_tbl);
53
54static int __devinit
55qla2100_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
56{
57 return qla2x00_probe_one(pdev,
58 (struct qla_board_info *)id->driver_data);
59}
60
61static void __devexit
62qla2100_remove_one(struct pci_dev *pdev)
63{
64 qla2x00_remove_one(pdev);
65}
66
67static struct pci_driver qla2100_pci_driver = {
68 .name = "qla2100",
69 .id_table = qla2100_pci_tbl,
70 .probe = qla2100_probe_one,
71 .remove = __devexit_p(qla2100_remove_one),
72};
73
74static int __init
75qla2100_init(void)
76{
77 return pci_module_init(&qla2100_pci_driver);
78}
79
80static void __exit
81qla2100_exit(void)
82{
83 pci_unregister_driver(&qla2100_pci_driver);
84}
85
86module_init(qla2100_init);
87module_exit(qla2100_exit);
88
89MODULE_AUTHOR("QLogic Corporation");
90MODULE_DESCRIPTION("QLogic ISP21xx FC-SCSI Host Bus Adapter driver");
91MODULE_LICENSE("GPL");
92MODULE_VERSION(QLA2XXX_VERSION);