* [PATCH] cxgb3i: fixed connection problem with iscsi private ip
@ 2011-01-10 23:15 kxie
0 siblings, 0 replies; only message in thread
From: kxie @ 2011-01-10 23:15 UTC (permalink / raw)
To: netdev, linux-scsi, open-iscsi; +Cc: kxie, davem, James.Bottomley, michaelc
[PATCH] cxgb3i: fixed connection problem with iscsi private ip
From: Karen Xie <kxie@chelsio.com>
fixed the connection problem when the private iscsi ipv4 address is provisioned on the interface.
Signed-off-by: Karen Xie <kxie@chelsio.com>
---
drivers/scsi/cxgbi/cxgb3i/cxgb3i.h | 18 ++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h
index 5f5e339..bed14db 100644
--- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h
+++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.h
@@ -24,10 +24,20 @@
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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-10 23:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-10 23:15 [PATCH] cxgb3i: fixed connection problem with iscsi private ip kxie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox