xref: /openbmc/linux/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h (revision 6f7efaab)
16f7efaabSkxie@chelsio.com /*
26f7efaabSkxie@chelsio.com  * cxgb3i.h: Chelsio S3xx iSCSI driver.
36f7efaabSkxie@chelsio.com  *
46f7efaabSkxie@chelsio.com  * Copyright (c) 2008 Chelsio Communications, Inc.
56f7efaabSkxie@chelsio.com  *
66f7efaabSkxie@chelsio.com  * This program is free software; you can redistribute it and/or modify
76f7efaabSkxie@chelsio.com  * it under the terms of the GNU General Public License as published by
86f7efaabSkxie@chelsio.com  * the Free Software Foundation.
96f7efaabSkxie@chelsio.com  *
106f7efaabSkxie@chelsio.com  * Written by: Karen Xie (kxie@chelsio.com)
116f7efaabSkxie@chelsio.com  */
126f7efaabSkxie@chelsio.com 
136f7efaabSkxie@chelsio.com #ifndef __CXGB3I_H__
146f7efaabSkxie@chelsio.com #define __CXGB3I_H__
156f7efaabSkxie@chelsio.com 
166f7efaabSkxie@chelsio.com #define CXGB3I_SCSI_HOST_QDEPTH 1024
176f7efaabSkxie@chelsio.com #define CXGB3I_MAX_LUN		512
186f7efaabSkxie@chelsio.com #define ISCSI_PDU_NONPAYLOAD_MAX \
196f7efaabSkxie@chelsio.com 	(sizeof(struct iscsi_hdr) + ISCSI_MAX_AHS_SIZE + 2*ISCSI_DIGEST_SIZE)
206f7efaabSkxie@chelsio.com 
216f7efaabSkxie@chelsio.com /*for TX: a skb must have a headroom of at least TX_HEADER_LEN bytes */
226f7efaabSkxie@chelsio.com #define CXGB3I_TX_HEADER_LEN \
236f7efaabSkxie@chelsio.com 	(sizeof(struct tx_data_wr) + sizeof(struct sge_opaque_hdr))
246f7efaabSkxie@chelsio.com 
256f7efaabSkxie@chelsio.com extern cxgb3_cpl_handler_func cxgb3i_cpl_handlers[NUM_CPL_CMDS];
266f7efaabSkxie@chelsio.com 
276f7efaabSkxie@chelsio.com #define cxgb3i_get_private_ipv4addr(ndev) \
286f7efaabSkxie@chelsio.com 	(((struct port_info *)(netdev_priv(ndev)))->iscsi_ipv4addr)
296f7efaabSkxie@chelsio.com #define cxgb3i_set_private_ipv4addr(ndev, addr) \
306f7efaabSkxie@chelsio.com 	(((struct port_info *)(netdev_priv(ndev)))->iscsi_ipv4addr) = addr
316f7efaabSkxie@chelsio.com 
326f7efaabSkxie@chelsio.com struct cpl_iscsi_hdr_norss {
336f7efaabSkxie@chelsio.com 	union opcode_tid ot;
346f7efaabSkxie@chelsio.com 	u16 pdu_len_ddp;
356f7efaabSkxie@chelsio.com 	u16 len;
366f7efaabSkxie@chelsio.com 	u32 seq;
376f7efaabSkxie@chelsio.com 	u16 urg;
386f7efaabSkxie@chelsio.com 	u8 rsvd;
396f7efaabSkxie@chelsio.com 	u8 status;
406f7efaabSkxie@chelsio.com };
416f7efaabSkxie@chelsio.com 
426f7efaabSkxie@chelsio.com struct cpl_rx_data_ddp_norss {
436f7efaabSkxie@chelsio.com 	union opcode_tid ot;
446f7efaabSkxie@chelsio.com 	u16 urg;
456f7efaabSkxie@chelsio.com 	u16 len;
466f7efaabSkxie@chelsio.com 	u32 seq;
476f7efaabSkxie@chelsio.com 	u32 nxt_seq;
486f7efaabSkxie@chelsio.com 	u32 ulp_crc;
496f7efaabSkxie@chelsio.com 	u32 ddp_status;
506f7efaabSkxie@chelsio.com };
516f7efaabSkxie@chelsio.com #endif
52