bfa_defs_boot.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
  3. * All rights reserved
  4. * www.brocade.com
  5. *
  6. * Linux driver for Brocade Fibre Channel Host Bus Adapter.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License (GPL) Version 2 as
  10. * published by the Free Software Foundation
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. */
  17. #ifndef __BFA_DEFS_BOOT_H__
  18. #define __BFA_DEFS_BOOT_H__
  19. #include <protocol/types.h>
  20. #include <defs/bfa_defs_types.h>
  21. #include <defs/bfa_defs_pport.h>
  22. enum {
  23. BFA_BOOT_BOOTLUN_MAX = 4, /* maximum boot lun per IOC */
  24. };
  25. #define BOOT_CFG_REV1 1
  26. /**
  27. * Boot options setting. Boot options setting determines from where
  28. * to get the boot lun information
  29. */
  30. enum bfa_boot_bootopt {
  31. BFA_BOOT_AUTO_DISCOVER = 0, /* Boot from blun provided by fabric */
  32. BFA_BOOT_STORED_BLUN = 1, /* Boot from bluns stored in flash */
  33. BFA_BOOT_FIRST_LUN = 2, /* Boot from first discovered blun */
  34. };
  35. /**
  36. * Boot lun information.
  37. */
  38. struct bfa_boot_bootlun_s {
  39. wwn_t pwwn; /* port wwn of target */
  40. lun_t lun; /* 64-bit lun */
  41. };
  42. /**
  43. * BOOT boot configuraton
  44. */
  45. struct bfa_boot_cfg_s {
  46. u8 version;
  47. u8 rsvd1;
  48. u16 chksum;
  49. u8 enable; /* enable/disable SAN boot */
  50. u8 speed; /* boot speed settings */
  51. u8 topology; /* boot topology setting */
  52. u8 bootopt; /* bfa_boot_bootopt_t */
  53. u32 nbluns; /* number of boot luns */
  54. u32 rsvd2;
  55. struct bfa_boot_bootlun_s blun[BFA_BOOT_BOOTLUN_MAX];
  56. struct bfa_boot_bootlun_s blun_disc[BFA_BOOT_BOOTLUN_MAX];
  57. };
  58. #endif /* __BFA_DEFS_BOOT_H__ */