Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Divy Le Ray and committed by
David S. Miller
4d8cd002 6dd01480

+19
+10
drivers/net/cxgb3/cxgb3_ctl_defs.h
··· 58 58 59 59 GET_RX_PAGE_INFO = 50, 60 60 GET_ISCSI_IPV4ADDR = 51, 61 + 62 + GET_EMBEDDED_INFO = 70, 61 63 }; 62 64 63 65 /* ··· 177 175 struct ofld_page_info { 178 176 unsigned int page_size; /* Page size, should be a power of 2 */ 179 177 unsigned int num; /* Number of pages */ 178 + }; 179 + 180 + /* 181 + * Structure used to get firmware and protocol engine versions. 182 + */ 183 + struct ch_embedded_info { 184 + u32 fw_vers; 185 + u32 tp_vers; 180 186 }; 181 187 #endif /* _CXGB3_OFFLOAD_CTL_DEFS_H */
+9
drivers/net/cxgb3/cxgb3_offload.c
··· 438 438 p->ipv4addr = pi->iscsi_ipv4addr; 439 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 450 default: 442 451 return -EOPNOTSUPP; 443 452 }