Skip to contentSkip to conversation

cxgb3 - add control to access embedded images

PATCH Applied Divy Le Ray 2 participants 2 messages Dec 22, 2008 – Dec 26, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cxgb3 - add control to access embedded images

From: Divy Le Ray <[email protected]>

Update contol path between cxgb3 and ULP modules (iWARP, iSCSI) to provide access to firware and protocol engine info.

---

 drivers/net/cxgb3/cxgb3_ctl_defs.h |   10 ++++++++++
 drivers/net/cxgb3/cxgb3_offload.c  |    9 +++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)
drivers/net/cxgb3/cxgb3_ctl_defs.h +10 -0
index 55099eb..369fe71 100644
@@ -58,6 +58,8 @@ enum {
 
 	GET_RX_PAGE_INFO	= 50,
 	GET_ISCSI_IPV4ADDR	= 51,
+
+	GET_EMBEDDED_INFO	= 70,
 };
 
 /*
@@ -176,4 +178,12 @@ struct ofld_page_info {
 	unsigned int page_size;  /* Page size, should be a power of 2 */
 	unsigned int num;        /* Number of pages */
 };
+
+/*
+ * Structure used to get firmware and protocol engine versions.
+ */
+struct ch_embedded_info {
+	u32 fw_vers;
+	u32 tp_vers;
+};
 #endif				/* _CXGB3_OFFLOAD_CTL_DEFS_H */
drivers/net/cxgb3/cxgb3_offload.c +9 -0
index 1ce69b7..2d7f69a 100644
@@ -438,6 +438,15 @@ static int cxgb_offload_ctl(struct t3cdev *tdev, unsigned int req, void *data)
 		p->ipv4addr = pi->iscsi_ipv4addr;
 		break;
 	}
+	case GET_EMBEDDED_INFO: {
+		struct ch_embedded_info *e = data;
+
+		spin_lock(&adapter->stats_lock);
+		t3_get_fw_version(adapter, &e->fw_vers);
+		t3_get_tp_version(adapter, &e->tp_vers);
+		spin_unlock(&adapter->stats_lock);
+		break;
+	}
 	default:
 		return -EOPNOTSUPP;
 	}