aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/cxgb3/cxgb3_ctl_defs.h10
-rw-r--r--drivers/net/cxgb3/cxgb3_offload.c9
2 files changed, 19 insertions, 0 deletions
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 {
58 58
59 GET_RX_PAGE_INFO = 50, 59 GET_RX_PAGE_INFO = 50,
60 GET_ISCSI_IPV4ADDR = 51, 60 GET_ISCSI_IPV4ADDR = 51,
61
62 GET_EMBEDDED_INFO = 70,
61}; 63};
62 64
63/* 65/*
@@ -176,4 +178,12 @@ struct ofld_page_info {
176 unsigned int page_size; /* Page size, should be a power of 2 */ 178 unsigned int page_size; /* Page size, should be a power of 2 */
177 unsigned int num; /* Number of pages */ 179 unsigned int num; /* Number of pages */
178}; 180};
181
182/*
183 * Structure used to get firmware and protocol engine versions.
184 */
185struct ch_embedded_info {
186 u32 fw_vers;
187 u32 tp_vers;
188};
179#endif /* _CXGB3_OFFLOAD_CTL_DEFS_H */ 189#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)
438 p->ipv4addr = pi->iscsi_ipv4addr; 438 p->ipv4addr = pi->iscsi_ipv4addr;
439 break; 439 break;
440 } 440 }
441 case GET_EMBEDDED_INFO: {
442 struct ch_embedded_info *e = data;
443
444 spin_lock(&adapter->stats_lock);
445 t3_get_fw_version(adapter, &e->fw_vers);
446 t3_get_tp_version(adapter, &e->tp_vers);
447 spin_unlock(&adapter->stats_lock);
448 break;
449 }
441 default: 450 default:
442 return -EOPNOTSUPP; 451 return -EOPNOTSUPP;
443 } 452 }