ql2200.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * QLogic ISP2200 device driver for Linux 2.6.x
  3. * Copyright (C) 2003 Christoph Hellwig.
  4. * Copyright (C) 2003-2005 QLogic Corporation (www.qlogic.com)
  5. *
  6. * Released under GPL v2.
  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[] = "qla2200";
  13. extern unsigned char fw2200tp_version[];
  14. extern unsigned char fw2200tp_version_str[];
  15. extern unsigned short fw2200tp_addr01;
  16. extern unsigned short fw2200tp_code01[];
  17. extern unsigned short fw2200tp_length01;
  18. static struct qla_fw_info qla_fw_tbl[] = {
  19. {
  20. .addressing = FW_INFO_ADDR_NORMAL,
  21. .fwcode = &fw2200tp_code01[0],
  22. .fwlen = &fw2200tp_length01,
  23. .fwstart = &fw2200tp_addr01,
  24. },
  25. { FW_INFO_ADDR_NOMORE, },
  26. };
  27. static struct qla_board_info qla_board_tbl = {
  28. .drv_name = qla_driver_name,
  29. .isp_name = "ISP2200",
  30. .fw_info = qla_fw_tbl,
  31. };
  32. static struct pci_device_id qla2200_pci_tbl[] = {
  33. {
  34. .vendor = PCI_VENDOR_ID_QLOGIC,
  35. .device = PCI_DEVICE_ID_QLOGIC_ISP2200,
  36. .subvendor = PCI_ANY_ID,
  37. .subdevice = PCI_ANY_ID,
  38. .driver_data = (unsigned long)&qla_board_tbl,
  39. },
  40. {0, 0},
  41. };
  42. MODULE_DEVICE_TABLE(pci, qla2200_pci_tbl);
  43. static int __devinit
  44. qla2200_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
  45. {
  46. return qla2x00_probe_one(pdev,
  47. (struct qla_board_info *)id->driver_data);
  48. }
  49. static void __devexit
  50. qla2200_remove_one(struct pci_dev *pdev)
  51. {
  52. qla2x00_remove_one(pdev);
  53. }
  54. static struct pci_driver qla2200_pci_driver = {
  55. .name = "qla2200",
  56. .id_table = qla2200_pci_tbl,
  57. .probe = qla2200_probe_one,
  58. .remove = __devexit_p(qla2200_remove_one),
  59. };
  60. static int __init
  61. qla2200_init(void)
  62. {
  63. return pci_module_init(&qla2200_pci_driver);
  64. }
  65. static void __exit
  66. qla2200_exit(void)
  67. {
  68. pci_unregister_driver(&qla2200_pci_driver);
  69. }
  70. module_init(qla2200_init);
  71. module_exit(qla2200_exit);
  72. MODULE_AUTHOR("QLogic Corporation");
  73. MODULE_DESCRIPTION("QLogic ISP22xx FC-SCSI Host Bus Adapter driver");
  74. MODULE_LICENSE("GPL");
  75. MODULE_VERSION(QLA2XXX_VERSION);