Andrew Vasquez | 331e347 | 2005-11-09 15:49:19 -0800 | [diff] [blame] | 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[] = "qla2400"; |
| 14 | |
| 15 | extern uint32_t fw2400_version_str[]; |
| 16 | extern uint32_t fw2400_addr01; |
| 17 | extern uint32_t fw2400_code01[]; |
| 18 | extern uint32_t fw2400_length01; |
| 19 | extern uint32_t fw2400_addr02; |
| 20 | extern uint32_t fw2400_code02[]; |
| 21 | extern uint32_t fw2400_length02; |
| 22 | |
| 23 | static struct qla_fw_info qla_fw_tbl[] = { |
| 24 | { |
| 25 | .addressing = FW_INFO_ADDR_EXTENDED, |
| 26 | .fwcode = (unsigned short *)&fw2400_code01[0], |
| 27 | .fwlen = (unsigned short *)&fw2400_length01, |
| 28 | .lfwstart = (unsigned long *)&fw2400_addr01, |
| 29 | }, |
| 30 | { |
| 31 | .addressing = FW_INFO_ADDR_EXTENDED, |
| 32 | .fwcode = (unsigned short *)&fw2400_code02[0], |
| 33 | .fwlen = (unsigned short *)&fw2400_length02, |
| 34 | .lfwstart = (unsigned long *)&fw2400_addr02, |
| 35 | }, |
| 36 | { FW_INFO_ADDR_NOMORE, }, |
| 37 | }; |
| 38 | |
| 39 | static struct qla_board_info qla_board_tbl[] = { |
| 40 | { |
| 41 | .drv_name = qla_driver_name, |
| 42 | .isp_name = "ISP2422", |
| 43 | .fw_info = qla_fw_tbl, |
| 44 | .fw_fname = "ql2400_fw.bin", |
| 45 | }, |
| 46 | { |
| 47 | .drv_name = qla_driver_name, |
| 48 | .isp_name = "ISP2432", |
| 49 | .fw_info = qla_fw_tbl, |
| 50 | .fw_fname = "ql2400_fw.bin", |
| 51 | }, |
andrew.vasquez@qlogic.com | 044cc6c | 2006-03-09 14:27:13 -0800 | [diff] [blame] | 52 | { |
| 53 | .drv_name = qla_driver_name, |
| 54 | .isp_name = "ISP5422", |
| 55 | .fw_info = qla_fw_tbl, |
| 56 | .fw_fname = "ql2400_fw.bin", |
| 57 | }, |
| 58 | { |
| 59 | .drv_name = qla_driver_name, |
| 60 | .isp_name = "ISP5432", |
| 61 | .fw_info = qla_fw_tbl, |
| 62 | .fw_fname = "ql2400_fw.bin", |
| 63 | }, |
Andrew Vasquez | 331e347 | 2005-11-09 15:49:19 -0800 | [diff] [blame] | 64 | }; |
| 65 | |
| 66 | static struct pci_device_id qla24xx_pci_tbl[] = { |
| 67 | { |
| 68 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 69 | .device = PCI_DEVICE_ID_QLOGIC_ISP2422, |
| 70 | .subvendor = PCI_ANY_ID, |
| 71 | .subdevice = PCI_ANY_ID, |
| 72 | .driver_data = (unsigned long)&qla_board_tbl[0], |
| 73 | }, |
| 74 | { |
| 75 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 76 | .device = PCI_DEVICE_ID_QLOGIC_ISP2432, |
| 77 | .subvendor = PCI_ANY_ID, |
| 78 | .subdevice = PCI_ANY_ID, |
| 79 | .driver_data = (unsigned long)&qla_board_tbl[1], |
| 80 | }, |
andrew.vasquez@qlogic.com | 044cc6c | 2006-03-09 14:27:13 -0800 | [diff] [blame] | 81 | { |
| 82 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 83 | .device = PCI_DEVICE_ID_QLOGIC_ISP5422, |
| 84 | .subvendor = PCI_ANY_ID, |
| 85 | .subdevice = PCI_ANY_ID, |
| 86 | .driver_data = (unsigned long)&qla_board_tbl[2], |
| 87 | }, |
| 88 | { |
| 89 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 90 | .device = PCI_DEVICE_ID_QLOGIC_ISP5432, |
| 91 | .subvendor = PCI_ANY_ID, |
| 92 | .subdevice = PCI_ANY_ID, |
| 93 | .driver_data = (unsigned long)&qla_board_tbl[3], |
| 94 | }, |
| 95 | |
Andrew Vasquez | 331e347 | 2005-11-09 15:49:19 -0800 | [diff] [blame] | 96 | {0, 0}, |
| 97 | }; |
| 98 | MODULE_DEVICE_TABLE(pci, qla24xx_pci_tbl); |
| 99 | |
| 100 | static int __devinit |
| 101 | qla24xx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 102 | { |
| 103 | return qla2x00_probe_one(pdev, |
| 104 | (struct qla_board_info *)id->driver_data); |
| 105 | } |
| 106 | |
| 107 | static void __devexit |
| 108 | qla24xx_remove_one(struct pci_dev *pdev) |
| 109 | { |
| 110 | qla2x00_remove_one(pdev); |
| 111 | } |
| 112 | |
| 113 | static struct pci_driver qla24xx_pci_driver = { |
| 114 | .name = "qla2400", |
| 115 | .id_table = qla24xx_pci_tbl, |
| 116 | .probe = qla24xx_probe_one, |
| 117 | .remove = __devexit_p(qla24xx_remove_one), |
| 118 | }; |
| 119 | |
| 120 | static int __init |
| 121 | qla24xx_init(void) |
| 122 | { |
| 123 | return pci_module_init(&qla24xx_pci_driver); |
| 124 | } |
| 125 | |
| 126 | static void __exit |
| 127 | qla24xx_exit(void) |
| 128 | { |
| 129 | pci_unregister_driver(&qla24xx_pci_driver); |
| 130 | } |
| 131 | |
| 132 | module_init(qla24xx_init); |
| 133 | module_exit(qla24xx_exit); |
| 134 | |
| 135 | MODULE_AUTHOR("QLogic Corporation"); |
| 136 | MODULE_DESCRIPTION("QLogic ISP24xx FC-SCSI Host Bus Adapter driver"); |
| 137 | MODULE_LICENSE("GPL"); |
| 138 | MODULE_VERSION(QLA2XXX_VERSION); |