Skip to content

Commit

Permalink
[SCSI] cxgb3i: fixed connection problem with iscsi private ip
Browse files Browse the repository at this point in the history
fixed the connection problem when the private iscsi ipv4 address is
provisioned on the interface.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
kxie@chelsio.com authored and James Bottomley committed Jan 24, 2011
1 parent d38e19d commit 716163f
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions drivers/scsi/cxgbi/cxgb3i/cxgb3i.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,21 @@

extern cxgb3_cpl_handler_func cxgb3i_cpl_handlers[NUM_CPL_CMDS];

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

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 {
union opcode_tid ot;
Expand Down

0 comments on commit 716163f

Please sign in to comment.