diff options
author | kxie@chelsio.com <kxie@chelsio.com> | 2011-01-10 19:45:07 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-01-24 12:45:17 -0500 |
commit | 716163ff908be72f6b74752ad0796cc7c00b047a (patch) | |
tree | 5f28e6934fbe8f8d5d60bfbadc039ab1e1b458cf /drivers/scsi/cxgbi | |
parent | d38e19d00fe8c3591591e140d80dea785af5f1fe (diff) |
[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: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r-- | drivers/scsi/cxgbi/cxgb3i/cxgb3i.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h index 5f5e3394b594..20593fd69d8f 100644 --- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h +++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h | |||
@@ -24,10 +24,21 @@ | |||
24 | 24 | ||
25 | extern cxgb3_cpl_handler_func cxgb3i_cpl_handlers[NUM_CPL_CMDS]; | 25 | extern cxgb3_cpl_handler_func cxgb3i_cpl_handlers[NUM_CPL_CMDS]; |
26 | 26 | ||
27 | #define cxgb3i_get_private_ipv4addr(ndev) \ | 27 | static inline unsigned int cxgb3i_get_private_ipv4addr(struct net_device *ndev) |
28 | (((struct port_info *)(netdev_priv(ndev)))->iscsi_ipv4addr) | 28 | { |
29 | #define cxgb3i_set_private_ipv4addr(ndev, addr) \ | 29 | return ((struct port_info *)(netdev_priv(ndev)))->iscsi_ipv4addr; |
30 | (((struct port_info *)(netdev_priv(ndev)))->iscsi_ipv4addr) = addr | 30 | } |
31 | |||
32 | static inline void cxgb3i_set_private_ipv4addr(struct net_device *ndev, | ||
33 | unsigned int addr) | ||
34 | { | ||
35 | struct port_info *pi = (struct port_info *)netdev_priv(ndev); | ||
36 | |||
37 | pi->iscsic.flags = addr ? 1 : 0; | ||
38 | pi->iscsi_ipv4addr = addr; | ||
39 | if (addr) | ||
40 | memcpy(pi->iscsic.mac_addr, ndev->dev_addr, ETH_ALEN); | ||
41 | } | ||
31 | 42 | ||
32 | struct cpl_iscsi_hdr_norss { | 43 | struct cpl_iscsi_hdr_norss { |
33 | union opcode_tid ot; | 44 | union opcode_tid ot; |