Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 716163ff authored by kxie@chelsio.com's avatar kxie@chelsio.com Committed by James Bottomley
Browse files

[SCSI] cxgb3i: fixed connection problem with iscsi private ip



fixed the connection problem when the private iscsi ipv4 address is
provisioned on the interface.

Signed-off-by: default avatarKaren Xie <kxie@chelsio.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent d38e19d0
Loading
Loading
Loading
Loading
+15 −4
Original line number Original line Diff line number Diff line
@@ -24,10 +24,21 @@


extern cxgb3_cpl_handler_func cxgb3i_cpl_handlers[NUM_CPL_CMDS];
extern cxgb3_cpl_handler_func cxgb3i_cpl_handlers[NUM_CPL_CMDS];


#define cxgb3i_get_private_ipv4addr(ndev) \
static inline unsigned int cxgb3i_get_private_ipv4addr(struct net_device *ndev)
	(((struct port_info *)(netdev_priv(ndev)))->iscsi_ipv4addr)
{
#define cxgb3i_set_private_ipv4addr(ndev, addr) \
	return ((struct port_info *)(netdev_priv(ndev)))->iscsi_ipv4addr;
	(((struct port_info *)(netdev_priv(ndev)))->iscsi_ipv4addr) = addr
}

static inline void cxgb3i_set_private_ipv4addr(struct net_device *ndev,
						unsigned int addr)
{
	struct port_info *pi =  (struct port_info *)netdev_priv(ndev);

	pi->iscsic.flags = addr ? 1 : 0;
	pi->iscsi_ipv4addr = addr;
	if (addr)
		memcpy(pi->iscsic.mac_addr, ndev->dev_addr, ETH_ALEN);
}


struct cpl_iscsi_hdr_norss {
struct cpl_iscsi_hdr_norss {
	union opcode_tid ot;
	union opcode_tid ot;