ql2300.c 2.5 KB

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