ql2400.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. #include "qla_def.h"
  11. static char qla_driver_name[] = "qla2400";
  12. extern uint32_t fw2400_version_str[];
  13. extern uint32_t fw2400_addr01;
  14. extern uint32_t fw2400_code01[];
  15. extern uint32_t fw2400_length01;
  16. extern uint32_t fw2400_addr02;
  17. extern uint32_t fw2400_code02[];
  18. extern uint32_t fw2400_length02;
  19. static struct qla_fw_info qla_fw_tbl[] = {
  20. {
  21. .addressing = FW_INFO_ADDR_EXTENDED,
  22. .fwcode = (unsigned short *)&fw2400_code01[0],
  23. .fwlen = (unsigned short *)&fw2400_length01,
  24. .lfwstart = (unsigned long *)&fw2400_addr01,
  25. },
  26. {
  27. .addressing = FW_INFO_ADDR_EXTENDED,
  28. .fwcode = (unsigned short *)&fw2400_code02[0],
  29. .fwlen = (unsigned short *)&fw2400_length02,
  30. .lfwstart = (unsigned long *)&fw2400_addr02,
  31. },
  32. { FW_INFO_ADDR_NOMORE, },
  33. };
  34. static struct qla_board_info qla_board_tbl[] = {
  35. {
  36. .drv_name = qla_driver_name,
  37. .isp_name = "ISP2422",
  38. .fw_info = qla_fw_tbl,
  39. .fw_fname = "ql2400_fw.bin",
  40. },
  41. {
  42. .drv_name = qla_driver_name,
  43. .isp_name = "ISP2432",
  44. .fw_info = qla_fw_tbl,
  45. .fw_fname = "ql2400_fw.bin",
  46. },
  47. };
  48. static struct pci_device_id qla24xx_pci_tbl[] = {
  49. {
  50. .vendor = PCI_VENDOR_ID_QLOGIC,
  51. .device = PCI_DEVICE_ID_QLOGIC_ISP2422,
  52. .subvendor = PCI_ANY_ID,
  53. .subdevice = PCI_ANY_ID,
  54. .driver_data = (unsigned long)&qla_board_tbl[0],
  55. },
  56. {
  57. .vendor = PCI_VENDOR_ID_QLOGIC,
  58. .device = PCI_DEVICE_ID_QLOGIC_ISP2432,
  59. .subvendor = PCI_ANY_ID,
  60. .subdevice = PCI_ANY_ID,
  61. .driver_data = (unsigned long)&qla_board_tbl[1],
  62. },
  63. {0, 0},
  64. };
  65. MODULE_DEVICE_TABLE(pci, qla24xx_pci_tbl);
  66. static int __devinit
  67. qla24xx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
  68. {
  69. return qla2x00_probe_one(pdev,
  70. (struct qla_board_info *)id->driver_data);
  71. }
  72. static void __devexit
  73. qla24xx_remove_one(struct pci_dev *pdev)
  74. {
  75. qla2x00_remove_one(pdev);
  76. }
  77. static struct pci_driver qla24xx_pci_driver = {
  78. .name = "qla2400",
  79. .id_table = qla24xx_pci_tbl,
  80. .probe = qla24xx_probe_one,
  81. .remove = __devexit_p(qla24xx_remove_one),
  82. };
  83. static int __init
  84. qla24xx_init(void)
  85. {
  86. return pci_module_init(&qla24xx_pci_driver);
  87. }
  88. static void __exit
  89. qla24xx_exit(void)
  90. {
  91. pci_unregister_driver(&qla24xx_pci_driver);
  92. }
  93. module_init(qla24xx_init);
  94. module_exit(qla24xx_exit);
  95. MODULE_AUTHOR("QLogic Corporation");
  96. MODULE_DESCRIPTION("QLogic ISP24xx FC-SCSI Host Bus Adapter driver");
  97. MODULE_LICENSE("GPL");
  98. MODULE_VERSION(QLA2XXX_VERSION);