From a109a5b916bc180e14fad0d1e9c37a08c85652c0 Mon Sep 17 00:00:00 2001 From: Karen Xie Date: Thu, 18 Dec 2008 22:56:20 -0800 Subject: cxgb3: manage private iSCSI IP address The accelerated iSCSI traffic could use a private IP address unknown to the OS: - The IP address is required in both drivers to manage ARP requests and connection set up. - Added an control call to retrieve the ip address. - Reply to ARP requests dedicated to the private IP address. Signed-off-by: Divy Le Ray Signed-off-by: Karen Xie Signed-off-by: David S. Miller --- drivers/net/cxgb3/cxgb3_ctl_defs.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/net/cxgb3/cxgb3_ctl_defs.h') diff --git a/drivers/net/cxgb3/cxgb3_ctl_defs.h b/drivers/net/cxgb3/cxgb3_ctl_defs.h index 1d8d46eb3c96..55099eb3c70e 100644 --- a/drivers/net/cxgb3/cxgb3_ctl_defs.h +++ b/drivers/net/cxgb3/cxgb3_ctl_defs.h @@ -57,6 +57,7 @@ enum { RDMA_GET_MIB = 19, GET_RX_PAGE_INFO = 50, + GET_ISCSI_IPV4ADDR = 51, }; /* @@ -86,6 +87,12 @@ struct iff_mac { u16 vlan_tag; }; +/* Structure used to request a port's iSCSI IPv4 address */ +struct iscsi_ipv4addr { + struct net_device *dev; /* the net_device */ + __be32 ipv4addr; /* the return iSCSI IPv4 address */ +}; + struct pci_dev; /* -- cgit v1.2.3 From 4d8cd002602987ddc9507b5390800343f820ac92 Mon Sep 17 00:00:00 2001 From: Divy Le Ray Date: Fri, 26 Dec 2008 01:16:39 -0800 Subject: cxgb3: add control to access embedded images Update contol path between cxgb3 and ULP modules (iWARP, iSCSI) to provide access to firware and protocol engine info. Signed-off-by: Divy Le Ray Signed-off-by: David S. Miller --- drivers/net/cxgb3/cxgb3_ctl_defs.h | 10 ++++++++++ drivers/net/cxgb3/cxgb3_offload.c | 9 +++++++++ 2 files changed, 19 insertions(+) (limited to 'drivers/net/cxgb3/cxgb3_ctl_defs.h') diff --git a/drivers/net/cxgb3/cxgb3_ctl_defs.h b/drivers/net/cxgb3/cxgb3_ctl_defs.h index 55099eb3c70e..369fe711fd7f 100644 --- a/drivers/net/cxgb3/cxgb3_ctl_defs.h +++ b/drivers/net/cxgb3/cxgb3_ctl_defs.h @@ -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 */ diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index 1ce69b742804..2d7f69aff1d9 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c @@ -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; } -- cgit v1.2.3