[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7

Mike Christie michaelc at cs.wisc.edu
Sat Apr 7 15:44:16 UTC 2012


The following commit has been merged in the upstream-mnc branch:
commit 95081724e8eef2a82a197e4d6802d642612e9835
Author: Mike Christie <michaelc at cs.wisc.edu>
Date:   Thu Mar 22 01:01:01 2012 -0400

    iscsi tools: print and load boot transport
    
    This patch makes sure that when bnx2i/cxgb*i type of offload
    engines are used for boot that the offload module gets loaded
    and that we print the transport type when running iscsistart -f
    or iscsiadm -m fw.

diff --git a/usr/iface.c b/usr/iface.c
index 5942ac0..3a9582e 100644
--- a/usr/iface.c
+++ b/usr/iface.c
@@ -893,7 +893,8 @@ void iface_link_ifaces(struct list_head *ifaces)
 int iface_setup_from_boot_context(struct iface_rec *iface,
 				   struct boot_context *context)
 {
-	struct iscsi_transport *t;
+	struct iscsi_transport *t = NULL;
+	char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN];
 	uint32_t hostno;
 
 	if (strlen(context->initiatorname))
@@ -909,6 +910,13 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
 	} else if (strlen(context->iface)) {
 /* this ifdef is only temp until distros and firmwares are updated */
 #ifdef OFFLOAD_BOOT_SUPPORTED
+
+		memset(transport_name, 0, ISCSI_TRANSPORT_NAME_MAXLEN);
+		/* make sure offload driver is loaded */
+		if (!net_get_transport_name_from_netdev(context->iface,
+							transport_name))
+			t = iscsi_sysfs_get_transport_by_name(transport_name);
+
 		hostno = iscsi_sysfs_get_host_no_from_hwaddress(context->mac,
 								&rc);
 		if (rc) {
@@ -932,7 +940,8 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
 	/*
 	 * set up for access through a offload card.
 	 */
-	t = iscsi_sysfs_get_transport_by_hba(hostno);
+	if (!t)
+		t = iscsi_sysfs_get_transport_by_hba(hostno);
 	if (!t) {
 		log_error("Could not get transport for host%u. "
 			  "Make sure the iSCSI driver is loaded.",
diff --git a/utils/fwparam_ibft/fw_entry.c b/utils/fwparam_ibft/fw_entry.c
index f5b361e..b6f05c1 100644
--- a/utils/fwparam_ibft/fw_entry.c
+++ b/utils/fwparam_ibft/fw_entry.c
@@ -35,6 +35,8 @@
 #include "idbm_fields.h"
 #include "iscsi_net_util.h"
 #include "iscsi_err.h"
+#include "config.h"
+#include "iface.h"
 
 /**
  * fw_setup_nics - setup nics (ethXs) based on ibft net info
@@ -146,11 +148,19 @@ void fw_free_targets(struct list_head *list)
 
 static void dump_initiator(struct boot_context *context)
 {
+	struct iface_rec iface;
+
+	memset(&iface, 0, sizeof(iface));
+	iface_setup_defaults(&iface);
+	iface_setup_from_boot_context(&iface, context);
+
 	if (strlen(context->initiatorname))
 		printf("%s = %s\n", IFACE_INAME, context->initiatorname);
 
 	if (strlen(context->isid))
 		printf("%s = %s\n", IFACE_ISID, context->isid);
+
+	printf("%s = %s\n", IFACE_TRANSPORTNAME, iface.transport_name);
 }
 
 static void dump_target(struct boot_context *context)

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list