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 18#ifndef __BFA_DEFS_BOOT_H__ 19#define __BFA_DEFS_BOOT_H__ 20 21#include <protocol/types.h> 22#include <defs/bfa_defs_types.h> 23#include <defs/bfa_defs_pport.h> 24 25enum { 26 BFA_BOOT_BOOTLUN_MAX = 4, /* maximum boot lun per IOC */ 27 BFA_PREBOOT_BOOTLUN_MAX = 8, /* maximum preboot lun per IOC */ 28 29}; 30 31#define BOOT_CFG_REV1 1 32 33/** 34 * Boot options setting. Boot options setting determines from where 35 * to get the boot lun information 36 */ 37enum bfa_boot_bootopt { 38 BFA_BOOT_AUTO_DISCOVER = 0, /* Boot from blun provided by fabric */ 39 BFA_BOOT_STORED_BLUN = 1, /* Boot from bluns stored in flash */ 40 BFA_BOOT_FIRST_LUN = 2, /* Boot from first discovered blun */ 41}; 42 43/** 44 * Boot lun information. 45 */ 46struct bfa_boot_bootlun_s { 47 wwn_t pwwn; /* port wwn of target */ 48 lun_t lun; /* 64-bit lun */ 49}; 50 51/** 52 * BOOT boot configuraton 53 */ 54struct bfa_boot_cfg_s { 55 u8 version; 56 u8 rsvd1; 57 u16 chksum; 58 59 u8 enable; /* enable/disable SAN boot */ 60 u8 speed; /* boot speed settings */ 61 u8 topology; /* boot topology setting */ 62 u8 bootopt; /* bfa_boot_bootopt_t */ 63 64 u32 nbluns; /* number of boot luns */ 65 66 u32 rsvd2; 67 68 struct bfa_boot_bootlun_s blun[BFA_BOOT_BOOTLUN_MAX]; 69 struct bfa_boot_bootlun_s blun_disc[BFA_BOOT_BOOTLUN_MAX]; 70}; 71 72struct bfa_boot_pbc_s { 73 u8 enable; /* enable/disable SAN boot */ 74 u8 speed; /* boot speed settings */ 75 u8 topology; /* boot topology setting */ 76 u8 rsvd1; 77 u32 nbluns; /* number of boot luns */ 78 struct bfa_boot_bootlun_s pblun[BFA_PREBOOT_BOOTLUN_MAX]; 79}; 80 81#endif /* __BFA_DEFS_BOOT_H__ */ 82