1adfc5217SJeff Kirsher /* cnic_if.h: Broadcom CNIC core network driver. 2adfc5217SJeff Kirsher * 323021c21SMichael Chan * Copyright (c) 2006-2012 Broadcom Corporation 4adfc5217SJeff Kirsher * 5adfc5217SJeff Kirsher * This program is free software; you can redistribute it and/or modify 6adfc5217SJeff Kirsher * it under the terms of the GNU General Public License as published by 7adfc5217SJeff Kirsher * the Free Software Foundation. 8adfc5217SJeff Kirsher * 9adfc5217SJeff Kirsher */ 10adfc5217SJeff Kirsher 11adfc5217SJeff Kirsher 12adfc5217SJeff Kirsher #ifndef CNIC_IF_H 13adfc5217SJeff Kirsher #define CNIC_IF_H 14adfc5217SJeff Kirsher 152e499d3cSBarak Witkowski #include "bnx2x/bnx2x_mfw_req.h" 162e499d3cSBarak Witkowski 174bd9b0ffSMichael Chan #define CNIC_MODULE_VERSION "2.5.16" 184bd9b0ffSMichael Chan #define CNIC_MODULE_RELDATE "Dec 05, 2012" 19adfc5217SJeff Kirsher 20adfc5217SJeff Kirsher #define CNIC_ULP_RDMA 0 21adfc5217SJeff Kirsher #define CNIC_ULP_ISCSI 1 22adfc5217SJeff Kirsher #define CNIC_ULP_FCOE 2 23adfc5217SJeff Kirsher #define CNIC_ULP_L4 3 24adfc5217SJeff Kirsher #define MAX_CNIC_ULP_TYPE_EXT 3 25adfc5217SJeff Kirsher #define MAX_CNIC_ULP_TYPE 4 26adfc5217SJeff Kirsher 27adfc5217SJeff Kirsher struct kwqe { 28adfc5217SJeff Kirsher u32 kwqe_op_flag; 29adfc5217SJeff Kirsher 30adfc5217SJeff Kirsher #define KWQE_QID_SHIFT 8 31adfc5217SJeff Kirsher #define KWQE_OPCODE_MASK 0x00ff0000 32adfc5217SJeff Kirsher #define KWQE_OPCODE_SHIFT 16 33adfc5217SJeff Kirsher #define KWQE_OPCODE(x) ((x & KWQE_OPCODE_MASK) >> KWQE_OPCODE_SHIFT) 34adfc5217SJeff Kirsher #define KWQE_LAYER_MASK 0x70000000 35adfc5217SJeff Kirsher #define KWQE_LAYER_SHIFT 28 36adfc5217SJeff Kirsher #define KWQE_FLAGS_LAYER_MASK_L2 (2<<28) 37adfc5217SJeff Kirsher #define KWQE_FLAGS_LAYER_MASK_L3 (3<<28) 38adfc5217SJeff Kirsher #define KWQE_FLAGS_LAYER_MASK_L4 (4<<28) 39adfc5217SJeff Kirsher #define KWQE_FLAGS_LAYER_MASK_L5_RDMA (5<<28) 40adfc5217SJeff Kirsher #define KWQE_FLAGS_LAYER_MASK_L5_ISCSI (6<<28) 41adfc5217SJeff Kirsher #define KWQE_FLAGS_LAYER_MASK_L5_FCOE (7<<28) 42adfc5217SJeff Kirsher 43adfc5217SJeff Kirsher u32 kwqe_info0; 44adfc5217SJeff Kirsher u32 kwqe_info1; 45adfc5217SJeff Kirsher u32 kwqe_info2; 46adfc5217SJeff Kirsher u32 kwqe_info3; 47adfc5217SJeff Kirsher u32 kwqe_info4; 48adfc5217SJeff Kirsher u32 kwqe_info5; 49adfc5217SJeff Kirsher u32 kwqe_info6; 50adfc5217SJeff Kirsher }; 51adfc5217SJeff Kirsher 52adfc5217SJeff Kirsher struct kwqe_16 { 53adfc5217SJeff Kirsher u32 kwqe_info0; 54adfc5217SJeff Kirsher u32 kwqe_info1; 55adfc5217SJeff Kirsher u32 kwqe_info2; 56adfc5217SJeff Kirsher u32 kwqe_info3; 57adfc5217SJeff Kirsher }; 58adfc5217SJeff Kirsher 59adfc5217SJeff Kirsher struct kcqe { 60adfc5217SJeff Kirsher u32 kcqe_info0; 61adfc5217SJeff Kirsher u32 kcqe_info1; 62adfc5217SJeff Kirsher u32 kcqe_info2; 63adfc5217SJeff Kirsher u32 kcqe_info3; 64adfc5217SJeff Kirsher u32 kcqe_info4; 65adfc5217SJeff Kirsher u32 kcqe_info5; 66adfc5217SJeff Kirsher u32 kcqe_info6; 67adfc5217SJeff Kirsher u32 kcqe_op_flag; 68adfc5217SJeff Kirsher #define KCQE_RAMROD_COMPLETION (0x1<<27) /* Everest */ 69adfc5217SJeff Kirsher #define KCQE_FLAGS_LAYER_MASK (0x7<<28) 70adfc5217SJeff Kirsher #define KCQE_FLAGS_LAYER_MASK_MISC (0<<28) 71adfc5217SJeff Kirsher #define KCQE_FLAGS_LAYER_MASK_L2 (2<<28) 72adfc5217SJeff Kirsher #define KCQE_FLAGS_LAYER_MASK_L3 (3<<28) 73adfc5217SJeff Kirsher #define KCQE_FLAGS_LAYER_MASK_L4 (4<<28) 74adfc5217SJeff Kirsher #define KCQE_FLAGS_LAYER_MASK_L5_RDMA (5<<28) 75adfc5217SJeff Kirsher #define KCQE_FLAGS_LAYER_MASK_L5_ISCSI (6<<28) 76adfc5217SJeff Kirsher #define KCQE_FLAGS_LAYER_MASK_L5_FCOE (7<<28) 77adfc5217SJeff Kirsher #define KCQE_FLAGS_NEXT (1<<31) 78adfc5217SJeff Kirsher #define KCQE_FLAGS_OPCODE_MASK (0xff<<16) 79adfc5217SJeff Kirsher #define KCQE_FLAGS_OPCODE_SHIFT (16) 80adfc5217SJeff Kirsher #define KCQE_OPCODE(op) \ 81adfc5217SJeff Kirsher (((op) & KCQE_FLAGS_OPCODE_MASK) >> KCQE_FLAGS_OPCODE_SHIFT) 82adfc5217SJeff Kirsher }; 83adfc5217SJeff Kirsher 84adfc5217SJeff Kirsher #define MAX_CNIC_CTL_DATA 64 85adfc5217SJeff Kirsher #define MAX_DRV_CTL_DATA 64 86adfc5217SJeff Kirsher 87adfc5217SJeff Kirsher #define CNIC_CTL_STOP_CMD 1 88adfc5217SJeff Kirsher #define CNIC_CTL_START_CMD 2 89adfc5217SJeff Kirsher #define CNIC_CTL_COMPLETION_CMD 3 90adfc5217SJeff Kirsher #define CNIC_CTL_STOP_ISCSI_CMD 4 911d187b34SBarak Witkowski #define CNIC_CTL_FCOE_STATS_GET_CMD 5 921d187b34SBarak Witkowski #define CNIC_CTL_ISCSI_STATS_GET_CMD 6 93adfc5217SJeff Kirsher 94adfc5217SJeff Kirsher #define DRV_CTL_IO_WR_CMD 0x101 95adfc5217SJeff Kirsher #define DRV_CTL_IO_RD_CMD 0x102 96adfc5217SJeff Kirsher #define DRV_CTL_CTX_WR_CMD 0x103 97adfc5217SJeff Kirsher #define DRV_CTL_CTXTBL_WR_CMD 0x104 98adfc5217SJeff Kirsher #define DRV_CTL_RET_L5_SPQ_CREDIT_CMD 0x105 99adfc5217SJeff Kirsher #define DRV_CTL_START_L2_CMD 0x106 100adfc5217SJeff Kirsher #define DRV_CTL_STOP_L2_CMD 0x107 101adfc5217SJeff Kirsher #define DRV_CTL_RET_L2_SPQ_CREDIT_CMD 0x10c 102adfc5217SJeff Kirsher #define DRV_CTL_ISCSI_STOPPED_CMD 0x10d 1031d187b34SBarak Witkowski #define DRV_CTL_ULP_REGISTER_CMD 0x10e 1041d187b34SBarak Witkowski #define DRV_CTL_ULP_UNREGISTER_CMD 0x10f 105adfc5217SJeff Kirsher 106adfc5217SJeff Kirsher struct cnic_ctl_completion { 107adfc5217SJeff Kirsher u32 cid; 108adfc5217SJeff Kirsher u8 opcode; 109adfc5217SJeff Kirsher u8 error; 110adfc5217SJeff Kirsher }; 111adfc5217SJeff Kirsher 112adfc5217SJeff Kirsher struct cnic_ctl_info { 113adfc5217SJeff Kirsher int cmd; 114adfc5217SJeff Kirsher union { 115adfc5217SJeff Kirsher struct cnic_ctl_completion comp; 116adfc5217SJeff Kirsher char bytes[MAX_CNIC_CTL_DATA]; 117adfc5217SJeff Kirsher } data; 118adfc5217SJeff Kirsher }; 119adfc5217SJeff Kirsher 120adfc5217SJeff Kirsher struct drv_ctl_spq_credit { 121adfc5217SJeff Kirsher u32 credit_count; 122adfc5217SJeff Kirsher }; 123adfc5217SJeff Kirsher 124adfc5217SJeff Kirsher struct drv_ctl_io { 125adfc5217SJeff Kirsher u32 cid_addr; 126adfc5217SJeff Kirsher u32 offset; 127adfc5217SJeff Kirsher u32 data; 128adfc5217SJeff Kirsher dma_addr_t dma_addr; 129adfc5217SJeff Kirsher }; 130adfc5217SJeff Kirsher 131adfc5217SJeff Kirsher struct drv_ctl_l2_ring { 132adfc5217SJeff Kirsher u32 client_id; 133adfc5217SJeff Kirsher u32 cid; 134adfc5217SJeff Kirsher }; 135adfc5217SJeff Kirsher 1362e499d3cSBarak Witkowski struct drv_ctl_register_data { 1372e499d3cSBarak Witkowski int ulp_type; 1382e499d3cSBarak Witkowski struct fcoe_capabilities fcoe_features; 1392e499d3cSBarak Witkowski }; 1402e499d3cSBarak Witkowski 141adfc5217SJeff Kirsher struct drv_ctl_info { 142adfc5217SJeff Kirsher int cmd; 143adfc5217SJeff Kirsher union { 144adfc5217SJeff Kirsher struct drv_ctl_spq_credit credit; 145adfc5217SJeff Kirsher struct drv_ctl_io io; 146adfc5217SJeff Kirsher struct drv_ctl_l2_ring ring; 1471d187b34SBarak Witkowski int ulp_type; 1482e499d3cSBarak Witkowski struct drv_ctl_register_data register_data; 149adfc5217SJeff Kirsher char bytes[MAX_DRV_CTL_DATA]; 150adfc5217SJeff Kirsher } data; 151adfc5217SJeff Kirsher }; 152adfc5217SJeff Kirsher 153adfc5217SJeff Kirsher struct cnic_ops { 154adfc5217SJeff Kirsher struct module *cnic_owner; 155adfc5217SJeff Kirsher /* Calls to these functions are protected by RCU. When 156adfc5217SJeff Kirsher * unregistering, we wait for any calls to complete before 157adfc5217SJeff Kirsher * continuing. 158adfc5217SJeff Kirsher */ 159adfc5217SJeff Kirsher int (*cnic_handler)(void *, void *); 160adfc5217SJeff Kirsher int (*cnic_ctl)(void *, struct cnic_ctl_info *); 161adfc5217SJeff Kirsher }; 162adfc5217SJeff Kirsher 163adfc5217SJeff Kirsher #define MAX_CNIC_VEC 8 164adfc5217SJeff Kirsher 165adfc5217SJeff Kirsher struct cnic_irq { 166adfc5217SJeff Kirsher unsigned int vector; 167adfc5217SJeff Kirsher void *status_blk; 168adfc5217SJeff Kirsher u32 status_blk_num; 169adfc5217SJeff Kirsher u32 status_blk_num2; 170adfc5217SJeff Kirsher u32 irq_flags; 171adfc5217SJeff Kirsher #define CNIC_IRQ_FL_MSIX 0x00000001 172adfc5217SJeff Kirsher }; 173adfc5217SJeff Kirsher 174adfc5217SJeff Kirsher struct cnic_eth_dev { 175adfc5217SJeff Kirsher struct module *drv_owner; 176adfc5217SJeff Kirsher u32 drv_state; 177adfc5217SJeff Kirsher #define CNIC_DRV_STATE_REGD 0x00000001 178adfc5217SJeff Kirsher #define CNIC_DRV_STATE_USING_MSIX 0x00000002 179adfc5217SJeff Kirsher #define CNIC_DRV_STATE_NO_ISCSI_OOO 0x00000004 180adfc5217SJeff Kirsher #define CNIC_DRV_STATE_NO_ISCSI 0x00000008 181adfc5217SJeff Kirsher #define CNIC_DRV_STATE_NO_FCOE 0x00000010 182adfc5217SJeff Kirsher u32 chip_id; 183adfc5217SJeff Kirsher u32 max_kwqe_pending; 184adfc5217SJeff Kirsher struct pci_dev *pdev; 185adfc5217SJeff Kirsher void __iomem *io_base; 186adfc5217SJeff Kirsher void __iomem *io_base2; 187adfc5217SJeff Kirsher const void *iro_arr; 188adfc5217SJeff Kirsher 189adfc5217SJeff Kirsher u32 ctx_tbl_offset; 190adfc5217SJeff Kirsher u32 ctx_tbl_len; 191adfc5217SJeff Kirsher int ctx_blk_size; 192adfc5217SJeff Kirsher u32 starting_cid; 193adfc5217SJeff Kirsher u32 max_iscsi_conn; 194adfc5217SJeff Kirsher u32 max_fcoe_conn; 195adfc5217SJeff Kirsher u32 max_rdma_conn; 196adfc5217SJeff Kirsher u32 fcoe_init_cid; 197adfc5217SJeff Kirsher u32 fcoe_wwn_port_name_hi; 198adfc5217SJeff Kirsher u32 fcoe_wwn_port_name_lo; 199adfc5217SJeff Kirsher u32 fcoe_wwn_node_name_hi; 200adfc5217SJeff Kirsher u32 fcoe_wwn_node_name_lo; 201adfc5217SJeff Kirsher 202adfc5217SJeff Kirsher u16 iscsi_l2_client_id; 203adfc5217SJeff Kirsher u16 iscsi_l2_cid; 204adfc5217SJeff Kirsher u8 iscsi_mac[ETH_ALEN]; 205adfc5217SJeff Kirsher 206adfc5217SJeff Kirsher int num_irq; 207adfc5217SJeff Kirsher struct cnic_irq irq_arr[MAX_CNIC_VEC]; 208adfc5217SJeff Kirsher int (*drv_register_cnic)(struct net_device *, 209adfc5217SJeff Kirsher struct cnic_ops *, void *); 210adfc5217SJeff Kirsher int (*drv_unregister_cnic)(struct net_device *); 211adfc5217SJeff Kirsher int (*drv_submit_kwqes_32)(struct net_device *, 212adfc5217SJeff Kirsher struct kwqe *[], u32); 213adfc5217SJeff Kirsher int (*drv_submit_kwqes_16)(struct net_device *, 214adfc5217SJeff Kirsher struct kwqe_16 *[], u32); 215adfc5217SJeff Kirsher int (*drv_ctl)(struct net_device *, struct drv_ctl_info *); 216adfc5217SJeff Kirsher unsigned long reserved1[2]; 2171d187b34SBarak Witkowski union drv_info_to_mcp *addr_drv_info_to_mcp; 218adfc5217SJeff Kirsher }; 219adfc5217SJeff Kirsher 220adfc5217SJeff Kirsher struct cnic_sockaddr { 221adfc5217SJeff Kirsher union { 222adfc5217SJeff Kirsher struct sockaddr_in v4; 223adfc5217SJeff Kirsher struct sockaddr_in6 v6; 224adfc5217SJeff Kirsher } local; 225adfc5217SJeff Kirsher union { 226adfc5217SJeff Kirsher struct sockaddr_in v4; 227adfc5217SJeff Kirsher struct sockaddr_in6 v6; 228adfc5217SJeff Kirsher } remote; 229adfc5217SJeff Kirsher }; 230adfc5217SJeff Kirsher 231adfc5217SJeff Kirsher struct cnic_sock { 232adfc5217SJeff Kirsher struct cnic_dev *dev; 233adfc5217SJeff Kirsher void *context; 234adfc5217SJeff Kirsher u32 src_ip[4]; 235adfc5217SJeff Kirsher u32 dst_ip[4]; 236adfc5217SJeff Kirsher u16 src_port; 237adfc5217SJeff Kirsher u16 dst_port; 238adfc5217SJeff Kirsher u16 vlan_id; 239adfc5217SJeff Kirsher unsigned char old_ha[6]; 240adfc5217SJeff Kirsher unsigned char ha[6]; 241adfc5217SJeff Kirsher u32 mtu; 242adfc5217SJeff Kirsher u32 cid; 243adfc5217SJeff Kirsher u32 l5_cid; 244adfc5217SJeff Kirsher u32 pg_cid; 245adfc5217SJeff Kirsher int ulp_type; 246adfc5217SJeff Kirsher 247adfc5217SJeff Kirsher u32 ka_timeout; 248adfc5217SJeff Kirsher u32 ka_interval; 249adfc5217SJeff Kirsher u8 ka_max_probe_count; 250adfc5217SJeff Kirsher u8 tos; 251adfc5217SJeff Kirsher u8 ttl; 252adfc5217SJeff Kirsher u8 snd_seq_scale; 253adfc5217SJeff Kirsher u32 rcv_buf; 254adfc5217SJeff Kirsher u32 snd_buf; 255adfc5217SJeff Kirsher u32 seed; 256adfc5217SJeff Kirsher 257adfc5217SJeff Kirsher unsigned long tcp_flags; 258adfc5217SJeff Kirsher #define SK_TCP_NO_DELAY_ACK 0x1 259adfc5217SJeff Kirsher #define SK_TCP_KEEP_ALIVE 0x2 260adfc5217SJeff Kirsher #define SK_TCP_NAGLE 0x4 261adfc5217SJeff Kirsher #define SK_TCP_TIMESTAMP 0x8 262adfc5217SJeff Kirsher #define SK_TCP_SACK 0x10 263adfc5217SJeff Kirsher #define SK_TCP_SEG_SCALING 0x20 264adfc5217SJeff Kirsher unsigned long flags; 265adfc5217SJeff Kirsher #define SK_F_INUSE 0 266adfc5217SJeff Kirsher #define SK_F_OFFLD_COMPLETE 1 267adfc5217SJeff Kirsher #define SK_F_OFFLD_SCHED 2 268adfc5217SJeff Kirsher #define SK_F_PG_OFFLD_COMPLETE 3 269adfc5217SJeff Kirsher #define SK_F_CONNECT_START 4 270adfc5217SJeff Kirsher #define SK_F_IPV6 5 271adfc5217SJeff Kirsher #define SK_F_CLOSING 7 27223021c21SMichael Chan #define SK_F_HW_ERR 8 273adfc5217SJeff Kirsher 274adfc5217SJeff Kirsher atomic_t ref_count; 275adfc5217SJeff Kirsher u32 state; 276adfc5217SJeff Kirsher struct kwqe kwqe1; 277adfc5217SJeff Kirsher struct kwqe kwqe2; 278adfc5217SJeff Kirsher struct kwqe kwqe3; 279adfc5217SJeff Kirsher }; 280adfc5217SJeff Kirsher 281adfc5217SJeff Kirsher struct cnic_dev { 282adfc5217SJeff Kirsher struct net_device *netdev; 283adfc5217SJeff Kirsher struct pci_dev *pcidev; 284adfc5217SJeff Kirsher void __iomem *regview; 285adfc5217SJeff Kirsher struct list_head list; 286adfc5217SJeff Kirsher 287adfc5217SJeff Kirsher int (*register_device)(struct cnic_dev *dev, int ulp_type, 288adfc5217SJeff Kirsher void *ulp_ctx); 289adfc5217SJeff Kirsher int (*unregister_device)(struct cnic_dev *dev, int ulp_type); 290adfc5217SJeff Kirsher int (*submit_kwqes)(struct cnic_dev *dev, struct kwqe *wqes[], 291adfc5217SJeff Kirsher u32 num_wqes); 292adfc5217SJeff Kirsher int (*submit_kwqes_16)(struct cnic_dev *dev, struct kwqe_16 *wqes[], 293adfc5217SJeff Kirsher u32 num_wqes); 294adfc5217SJeff Kirsher 295adfc5217SJeff Kirsher int (*cm_create)(struct cnic_dev *, int, u32, u32, struct cnic_sock **, 296adfc5217SJeff Kirsher void *); 297adfc5217SJeff Kirsher int (*cm_destroy)(struct cnic_sock *); 298adfc5217SJeff Kirsher int (*cm_connect)(struct cnic_sock *, struct cnic_sockaddr *); 299adfc5217SJeff Kirsher int (*cm_abort)(struct cnic_sock *); 300adfc5217SJeff Kirsher int (*cm_close)(struct cnic_sock *); 301adfc5217SJeff Kirsher struct cnic_dev *(*cm_select_dev)(struct sockaddr_in *, int ulp_type); 302adfc5217SJeff Kirsher int (*iscsi_nl_msg_recv)(struct cnic_dev *dev, u32 msg_type, 303adfc5217SJeff Kirsher char *data, u16 data_size); 304adfc5217SJeff Kirsher unsigned long flags; 305adfc5217SJeff Kirsher #define CNIC_F_CNIC_UP 1 306adfc5217SJeff Kirsher #define CNIC_F_BNX2_CLASS 3 307adfc5217SJeff Kirsher #define CNIC_F_BNX2X_CLASS 4 308adfc5217SJeff Kirsher atomic_t ref_count; 309adfc5217SJeff Kirsher u8 mac_addr[6]; 310adfc5217SJeff Kirsher 311adfc5217SJeff Kirsher int max_iscsi_conn; 312adfc5217SJeff Kirsher int max_fcoe_conn; 313adfc5217SJeff Kirsher int max_rdma_conn; 314adfc5217SJeff Kirsher 3151d187b34SBarak Witkowski union drv_info_to_mcp *stats_addr; 3162e499d3cSBarak Witkowski struct fcoe_capabilities *fcoe_cap; 3171d187b34SBarak Witkowski 318adfc5217SJeff Kirsher void *cnic_priv; 319adfc5217SJeff Kirsher }; 320adfc5217SJeff Kirsher 321adfc5217SJeff Kirsher #define CNIC_WR(dev, off, val) writel(val, dev->regview + off) 322adfc5217SJeff Kirsher #define CNIC_WR16(dev, off, val) writew(val, dev->regview + off) 323adfc5217SJeff Kirsher #define CNIC_WR8(dev, off, val) writeb(val, dev->regview + off) 324adfc5217SJeff Kirsher #define CNIC_RD(dev, off) readl(dev->regview + off) 325adfc5217SJeff Kirsher #define CNIC_RD16(dev, off) readw(dev->regview + off) 326adfc5217SJeff Kirsher 327adfc5217SJeff Kirsher struct cnic_ulp_ops { 328adfc5217SJeff Kirsher /* Calls to these functions are protected by RCU. When 329adfc5217SJeff Kirsher * unregistering, we wait for any calls to complete before 330adfc5217SJeff Kirsher * continuing. 331adfc5217SJeff Kirsher */ 332adfc5217SJeff Kirsher 333adfc5217SJeff Kirsher void (*cnic_init)(struct cnic_dev *dev); 334adfc5217SJeff Kirsher void (*cnic_exit)(struct cnic_dev *dev); 335adfc5217SJeff Kirsher void (*cnic_start)(void *ulp_ctx); 336adfc5217SJeff Kirsher void (*cnic_stop)(void *ulp_ctx); 337adfc5217SJeff Kirsher void (*indicate_kcqes)(void *ulp_ctx, struct kcqe *cqes[], 338adfc5217SJeff Kirsher u32 num_cqes); 339adfc5217SJeff Kirsher void (*indicate_netevent)(void *ulp_ctx, unsigned long event, u16 vid); 340adfc5217SJeff Kirsher void (*cm_connect_complete)(struct cnic_sock *); 341adfc5217SJeff Kirsher void (*cm_close_complete)(struct cnic_sock *); 342adfc5217SJeff Kirsher void (*cm_abort_complete)(struct cnic_sock *); 343adfc5217SJeff Kirsher void (*cm_remote_close)(struct cnic_sock *); 344adfc5217SJeff Kirsher void (*cm_remote_abort)(struct cnic_sock *); 345adfc5217SJeff Kirsher int (*iscsi_nl_send_msg)(void *ulp_ctx, u32 msg_type, 346adfc5217SJeff Kirsher char *data, u16 data_size); 3471d187b34SBarak Witkowski int (*cnic_get_stats)(void *ulp_ctx); 348adfc5217SJeff Kirsher struct module *owner; 349adfc5217SJeff Kirsher atomic_t ref_count; 350adfc5217SJeff Kirsher }; 351adfc5217SJeff Kirsher 352adfc5217SJeff Kirsher extern int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops); 353adfc5217SJeff Kirsher 354adfc5217SJeff Kirsher extern int cnic_unregister_driver(int ulp_type); 355adfc5217SJeff Kirsher 356adfc5217SJeff Kirsher #endif 357