Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Andrew Vasquez | fa90c54 | 2005-10-27 11:10:08 -0700 | [diff] [blame] | 2 | * QLogic Fibre Channel HBA Driver |
| 3 | * Copyright (C) 2003 Christoph Hellwig. |
| 4 | * Copyright (c) 2003-2005 QLogic Corporation |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | * |
Andrew Vasquez | fa90c54 | 2005-10-27 11:10:08 -0700 | [diff] [blame] | 6 | * See LICENSE.qla2xxx for copyright and licensing details. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | #include <linux/init.h> |
| 9 | #include <linux/module.h> |
| 10 | #include <linux/pci.h> |
| 11 | |
| 12 | #include "qla_def.h" |
| 13 | |
| 14 | static char qla_driver_name[] = "qla2300"; |
| 15 | |
| 16 | extern unsigned char fw2300ipx_version[]; |
| 17 | extern unsigned char fw2300ipx_version_str[]; |
| 18 | extern unsigned short fw2300ipx_addr01; |
| 19 | extern unsigned short fw2300ipx_code01[]; |
| 20 | extern unsigned short fw2300ipx_length01; |
| 21 | |
| 22 | static struct qla_fw_info qla_fw_tbl[] = { |
| 23 | { |
| 24 | .addressing = FW_INFO_ADDR_NORMAL, |
| 25 | .fwcode = &fw2300ipx_code01[0], |
| 26 | .fwlen = &fw2300ipx_length01, |
| 27 | .fwstart = &fw2300ipx_addr01, |
| 28 | }, |
| 29 | { FW_INFO_ADDR_NOMORE, }, |
| 30 | }; |
| 31 | |
| 32 | static struct qla_board_info qla_board_tbl[] = { |
| 33 | { |
| 34 | .drv_name = qla_driver_name, |
| 35 | .isp_name = "ISP2300", |
| 36 | .fw_info = qla_fw_tbl, |
| 37 | }, |
| 38 | { |
| 39 | .drv_name = qla_driver_name, |
| 40 | .isp_name = "ISP2312", |
| 41 | .fw_info = qla_fw_tbl, |
| 42 | }, |
andrew.vasquez@qlogic.com | 48c02fd | 2006-03-09 14:27:18 -0800 | [diff] [blame] | 43 | { |
| 44 | .drv_name = qla_driver_name, |
| 45 | .isp_name = "ISP6312", |
| 46 | .fw_info = qla_fw_tbl, |
| 47 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | }; |
| 49 | |
| 50 | static struct pci_device_id qla2300_pci_tbl[] = { |
| 51 | { |
| 52 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 53 | .device = PCI_DEVICE_ID_QLOGIC_ISP2300, |
| 54 | .subvendor = PCI_ANY_ID, |
| 55 | .subdevice = PCI_ANY_ID, |
| 56 | .driver_data = (unsigned long)&qla_board_tbl[0], |
| 57 | }, |
| 58 | { |
| 59 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 60 | .device = PCI_DEVICE_ID_QLOGIC_ISP2312, |
| 61 | .subvendor = PCI_ANY_ID, |
| 62 | .subdevice = PCI_ANY_ID, |
| 63 | .driver_data = (unsigned long)&qla_board_tbl[1], |
| 64 | }, |
andrew.vasquez@qlogic.com | 48c02fd | 2006-03-09 14:27:18 -0800 | [diff] [blame] | 65 | { |
| 66 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 67 | .device = PCI_DEVICE_ID_QLOGIC_ISP6312, |
| 68 | .subvendor = PCI_ANY_ID, |
| 69 | .subdevice = PCI_ANY_ID, |
| 70 | .driver_data = (unsigned long)&qla_board_tbl[2], |
| 71 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | {0, 0}, |
| 73 | }; |
| 74 | MODULE_DEVICE_TABLE(pci, qla2300_pci_tbl); |
| 75 | |
| 76 | static int __devinit |
| 77 | qla2300_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 78 | { |
| 79 | return qla2x00_probe_one(pdev, |
| 80 | (struct qla_board_info *)id->driver_data); |
| 81 | } |
| 82 | |
| 83 | static void __devexit |
| 84 | qla2300_remove_one(struct pci_dev *pdev) |
| 85 | { |
| 86 | qla2x00_remove_one(pdev); |
| 87 | } |
| 88 | |
| 89 | static struct pci_driver qla2300_pci_driver = { |
| 90 | .name = "qla2300", |
| 91 | .id_table = qla2300_pci_tbl, |
| 92 | .probe = qla2300_probe_one, |
| 93 | .remove = __devexit_p(qla2300_remove_one), |
| 94 | }; |
| 95 | |
| 96 | static int __init |
| 97 | qla2300_init(void) |
| 98 | { |
| 99 | return pci_module_init(&qla2300_pci_driver); |
| 100 | } |
| 101 | |
| 102 | static void __exit |
| 103 | qla2300_exit(void) |
| 104 | { |
| 105 | pci_unregister_driver(&qla2300_pci_driver); |
| 106 | } |
| 107 | |
| 108 | module_init(qla2300_init); |
| 109 | module_exit(qla2300_exit); |
| 110 | |
| 111 | MODULE_AUTHOR("QLogic Corporation"); |
| 112 | MODULE_DESCRIPTION("QLogic ISP23xx FC-SCSI Host Bus Adapter driver"); |
| 113 | MODULE_LICENSE("GPL"); |
| 114 | MODULE_VERSION(QLA2XXX_VERSION); |