Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * QLogic ISP6312 device driver for Linux 2.6.x |
Andrew Vasquez | ae91193 | 2005-07-06 10:32:27 -0700 | [diff] [blame^] | 3 | * Copyright (C) 2003-2005 QLogic Corporation (www.qlogic.com) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * |
| 5 | * Released under GPL v2. |
| 6 | */ |
| 7 | |
| 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[] = "qla6312"; |
| 15 | |
| 16 | extern unsigned char fw2300flx_version[]; |
| 17 | extern unsigned char fw2300flx_version_str[]; |
| 18 | extern unsigned short fw2300flx_addr01; |
| 19 | extern unsigned short fw2300flx_code01[]; |
| 20 | extern unsigned short fw2300flx_length01; |
| 21 | |
| 22 | static struct qla_fw_info qla_fw_tbl[] = { |
| 23 | { |
| 24 | .addressing = FW_INFO_ADDR_NORMAL, |
| 25 | .fwcode = &fw2300flx_code01[0], |
| 26 | .fwlen = &fw2300flx_length01, |
| 27 | .fwstart = &fw2300flx_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 = "ISP6312", |
| 36 | .fw_info = qla_fw_tbl, |
| 37 | }, |
| 38 | { |
| 39 | .drv_name = qla_driver_name, |
| 40 | .isp_name = "ISP6322", |
| 41 | .fw_info = qla_fw_tbl, |
| 42 | }, |
| 43 | }; |
| 44 | |
| 45 | static struct pci_device_id qla6312_pci_tbl[] = { |
| 46 | { |
| 47 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 48 | .device = PCI_DEVICE_ID_QLOGIC_ISP6312, |
| 49 | .subvendor = PCI_ANY_ID, |
| 50 | .subdevice = PCI_ANY_ID, |
| 51 | .driver_data = (unsigned long)&qla_board_tbl[0], |
| 52 | }, |
| 53 | { |
| 54 | .vendor = PCI_VENDOR_ID_QLOGIC, |
| 55 | .device = PCI_DEVICE_ID_QLOGIC_ISP6322, |
| 56 | .subvendor = PCI_ANY_ID, |
| 57 | .subdevice = PCI_ANY_ID, |
| 58 | .driver_data = (unsigned long)&qla_board_tbl[1], |
| 59 | }, |
| 60 | {0, 0}, |
| 61 | }; |
| 62 | MODULE_DEVICE_TABLE(pci, qla6312_pci_tbl); |
| 63 | |
| 64 | static int __devinit |
| 65 | qla6312_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 66 | { |
| 67 | return qla2x00_probe_one(pdev, |
| 68 | (struct qla_board_info *)id->driver_data); |
| 69 | } |
| 70 | |
| 71 | static void __devexit |
| 72 | qla6312_remove_one(struct pci_dev *pdev) |
| 73 | { |
| 74 | qla2x00_remove_one(pdev); |
| 75 | } |
| 76 | |
| 77 | static struct pci_driver qla6312_pci_driver = { |
| 78 | .name = "qla6312", |
| 79 | .id_table = qla6312_pci_tbl, |
| 80 | .probe = qla6312_probe_one, |
| 81 | .remove = __devexit_p(qla6312_remove_one), |
| 82 | }; |
| 83 | |
| 84 | static int __init |
| 85 | qla6312_init(void) |
| 86 | { |
| 87 | return pci_module_init(&qla6312_pci_driver); |
| 88 | } |
| 89 | |
| 90 | static void __exit |
| 91 | qla6312_exit(void) |
| 92 | { |
| 93 | pci_unregister_driver(&qla6312_pci_driver); |
| 94 | } |
| 95 | |
| 96 | module_init(qla6312_init); |
| 97 | module_exit(qla6312_exit); |
| 98 | |
| 99 | MODULE_AUTHOR("QLogic Corporation"); |
| 100 | MODULE_DESCRIPTION("QLogic ISP63xx FC-SCSI Host Bus Adapter driver"); |
| 101 | MODULE_LICENSE("GPL"); |
| 102 | MODULE_VERSION(QLA2XXX_VERSION); |