0e55d5b
From f0a8c95426d21413d9980d31740e193208e3280e Mon Sep 17 00:00:00 2001
0e55d5b
From: Eddie Wai <eddie.wai@broadcom.com>
0e55d5b
Date: Wed, 5 Sep 2012 14:14:20 -0700
0e55d5b
Subject: ISCSISTART: Bring up the corresponding network interface for iboot
0e55d5b
0e55d5b
This is needed for the iSCSI offload boot.
0e55d5b
0e55d5b
Snip from M. Christie:
0e55d5b
Note that we must bring up the interface before iface_setup_from_boot_context,
0e55d5b
because we will want iscsi_sysfs_get_host_no_from_hwaddress to be able to match
0e55d5b
a MAC to a iscsi host.  For some bnx2i cards, the card has to be ifupd for the
0e55d5b
iscsi interface to have a MAC. If it is not ifupd we have seen MACs with all
0e55d5b
zeros or no iscsi_hosts on different cards.
0e55d5b
0e55d5b
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
0e55d5b
---
0e55d5b
 usr/iface.c | 4 ++++
0e55d5b
 1 file changed, 4 insertions(+)
0e55d5b
0e55d5b
diff --git a/usr/iface.c b/usr/iface.c
0e55d5b
index 3a9582e..4028e34 100644
0e55d5b
--- a/usr/iface.c
0e55d5b
+++ b/usr/iface.c
0e55d5b
@@ -917,6 +917,10 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
0e55d5b
 							transport_name))
0e55d5b
 			t = iscsi_sysfs_get_transport_by_name(transport_name);
0e55d5b
 
0e55d5b
+		if (net_ifup_netdev(context->iface))
0e55d5b
+			log_warning("Could not bring up netdev %s for boot",
0e55d5b
+				    context->iface);
0e55d5b
+
0e55d5b
 		hostno = iscsi_sysfs_get_host_no_from_hwaddress(context->mac,
0e55d5b
 								&rc);
0e55d5b
 		if (rc) {
0e55d5b
-- 
0e55d5b
1.7.11.7
0e55d5b