ql6312.c 2.2 KB

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