18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2008 Cisco Systems, Inc. All rights reserved. 38c2ecf20Sopenharmony_ci * Copyright 2007 Nuova Systems, Inc. All rights reserved. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * This program is free software; you may redistribute it and/or modify 68c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License as published by 78c2ecf20Sopenharmony_ci * the Free Software Foundation; version 2 of the License. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 108c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 118c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 128c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 138c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 148c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 158c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 168c2ecf20Sopenharmony_ci * SOFTWARE. 178c2ecf20Sopenharmony_ci */ 188c2ecf20Sopenharmony_ci#ifndef _VNIC_SCSI_H_ 198c2ecf20Sopenharmony_ci#define _VNIC_SCSI_H_ 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define VNIC_FNIC_WQ_COPY_COUNT_MIN 1 228c2ecf20Sopenharmony_ci#define VNIC_FNIC_WQ_COPY_COUNT_MAX 1 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define VNIC_FNIC_WQ_DESCS_MIN 64 258c2ecf20Sopenharmony_ci#define VNIC_FNIC_WQ_DESCS_MAX 128 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#define VNIC_FNIC_WQ_COPY_DESCS_MIN 64 288c2ecf20Sopenharmony_ci#define VNIC_FNIC_WQ_COPY_DESCS_MAX 512 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define VNIC_FNIC_RQ_DESCS_MIN 64 318c2ecf20Sopenharmony_ci#define VNIC_FNIC_RQ_DESCS_MAX 128 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#define VNIC_FNIC_EDTOV_MIN 1000 348c2ecf20Sopenharmony_ci#define VNIC_FNIC_EDTOV_MAX 255000 358c2ecf20Sopenharmony_ci#define VNIC_FNIC_EDTOV_DEF 2000 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define VNIC_FNIC_RATOV_MIN 1000 388c2ecf20Sopenharmony_ci#define VNIC_FNIC_RATOV_MAX 255000 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define VNIC_FNIC_MAXDATAFIELDSIZE_MIN 256 418c2ecf20Sopenharmony_ci#define VNIC_FNIC_MAXDATAFIELDSIZE_MAX 2112 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#define VNIC_FNIC_FLOGI_RETRIES_MIN 0 448c2ecf20Sopenharmony_ci#define VNIC_FNIC_FLOGI_RETRIES_MAX 0xffffffff 458c2ecf20Sopenharmony_ci#define VNIC_FNIC_FLOGI_RETRIES_DEF 0xffffffff 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#define VNIC_FNIC_FLOGI_TIMEOUT_MIN 1000 488c2ecf20Sopenharmony_ci#define VNIC_FNIC_FLOGI_TIMEOUT_MAX 255000 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#define VNIC_FNIC_PLOGI_RETRIES_MIN 0 518c2ecf20Sopenharmony_ci#define VNIC_FNIC_PLOGI_RETRIES_MAX 255 528c2ecf20Sopenharmony_ci#define VNIC_FNIC_PLOGI_RETRIES_DEF 8 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci#define VNIC_FNIC_PLOGI_TIMEOUT_MIN 1000 558c2ecf20Sopenharmony_ci#define VNIC_FNIC_PLOGI_TIMEOUT_MAX 255000 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#define VNIC_FNIC_IO_THROTTLE_COUNT_MIN 1 588c2ecf20Sopenharmony_ci#define VNIC_FNIC_IO_THROTTLE_COUNT_MAX 2048 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#define VNIC_FNIC_LINK_DOWN_TIMEOUT_MIN 0 618c2ecf20Sopenharmony_ci#define VNIC_FNIC_LINK_DOWN_TIMEOUT_MAX 240000 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci#define VNIC_FNIC_PORT_DOWN_TIMEOUT_MIN 0 648c2ecf20Sopenharmony_ci#define VNIC_FNIC_PORT_DOWN_TIMEOUT_MAX 240000 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci#define VNIC_FNIC_PORT_DOWN_IO_RETRIES_MIN 0 678c2ecf20Sopenharmony_ci#define VNIC_FNIC_PORT_DOWN_IO_RETRIES_MAX 255 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci#define VNIC_FNIC_LUNS_PER_TARGET_MIN 1 708c2ecf20Sopenharmony_ci#define VNIC_FNIC_LUNS_PER_TARGET_MAX 1024 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci/* Device-specific region: scsi configuration */ 738c2ecf20Sopenharmony_cistruct vnic_fc_config { 748c2ecf20Sopenharmony_ci u64 node_wwn; 758c2ecf20Sopenharmony_ci u64 port_wwn; 768c2ecf20Sopenharmony_ci u32 flags; 778c2ecf20Sopenharmony_ci u32 wq_enet_desc_count; 788c2ecf20Sopenharmony_ci u32 wq_copy_desc_count; 798c2ecf20Sopenharmony_ci u32 rq_desc_count; 808c2ecf20Sopenharmony_ci u32 flogi_retries; 818c2ecf20Sopenharmony_ci u32 flogi_timeout; 828c2ecf20Sopenharmony_ci u32 plogi_retries; 838c2ecf20Sopenharmony_ci u32 plogi_timeout; 848c2ecf20Sopenharmony_ci u32 io_throttle_count; 858c2ecf20Sopenharmony_ci u32 link_down_timeout; 868c2ecf20Sopenharmony_ci u32 port_down_timeout; 878c2ecf20Sopenharmony_ci u32 port_down_io_retries; 888c2ecf20Sopenharmony_ci u32 luns_per_tgt; 898c2ecf20Sopenharmony_ci u16 maxdatafieldsize; 908c2ecf20Sopenharmony_ci u16 ed_tov; 918c2ecf20Sopenharmony_ci u16 ra_tov; 928c2ecf20Sopenharmony_ci u16 intr_timer; 938c2ecf20Sopenharmony_ci u8 intr_timer_type; 948c2ecf20Sopenharmony_ci}; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci#define VFCF_FCP_SEQ_LVL_ERR 0x1 /* Enable FCP-2 Error Recovery */ 978c2ecf20Sopenharmony_ci#define VFCF_PERBI 0x2 /* persistent binding info available */ 988c2ecf20Sopenharmony_ci#define VFCF_FIP_CAPABLE 0x4 /* firmware can handle FIP */ 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci#endif /* _VNIC_SCSI_H_ */ 101