Commit 95114344 authored by Rahul Verma's avatar Rahul Verma Committed by David S. Miller

qed*: remove version dependency

Inbox drivers don't need versioning scheme in order to guarantee
compatibility, as both qed and qede are compiled from same codebase.
Signed-off-by: default avatarRahul Verma <rahul.verma@qlogic.com>
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c61403d
...@@ -507,6 +507,4 @@ u32 qed_unzip_data(struct qed_hwfn *p_hwfn, ...@@ -507,6 +507,4 @@ u32 qed_unzip_data(struct qed_hwfn *p_hwfn,
int qed_slowpath_irq_req(struct qed_hwfn *hwfn); int qed_slowpath_irq_req(struct qed_hwfn *hwfn);
#define QED_ETH_INTERFACE_VERSION 300
#endif /* _QED_H */ #endif /* _QED_H */
...@@ -2043,14 +2043,8 @@ static const struct qed_eth_ops qed_eth_ops_pass = { ...@@ -2043,14 +2043,8 @@ static const struct qed_eth_ops qed_eth_ops_pass = {
.get_vport_stats = &qed_get_vport_stats, .get_vport_stats = &qed_get_vport_stats,
}; };
const struct qed_eth_ops *qed_get_eth_ops(u32 version) const struct qed_eth_ops *qed_get_eth_ops(void)
{ {
if (version != QED_ETH_INTERFACE_VERSION) {
pr_notice("Cannot supply ethtool operations [%08x != %08x]\n",
version, QED_ETH_INTERFACE_VERSION);
return NULL;
}
return &qed_eth_ops_pass; return &qed_eth_ops_pass;
} }
EXPORT_SYMBOL(qed_get_eth_ops); EXPORT_SYMBOL(qed_get_eth_ops);
......
...@@ -1172,14 +1172,3 @@ const struct qed_common_ops qed_common_ops_pass = { ...@@ -1172,14 +1172,3 @@ const struct qed_common_ops qed_common_ops_pass = {
.chain_free = &qed_chain_free, .chain_free = &qed_chain_free,
.set_led = &qed_set_led, .set_led = &qed_set_led,
}; };
u32 qed_get_protocol_version(enum qed_protocol protocol)
{
switch (protocol) {
case QED_PROTOCOL_ETH:
return QED_ETH_INTERFACE_VERSION;
default:
return 0;
}
}
EXPORT_SYMBOL(qed_get_protocol_version);
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
__stringify(QEDE_REVISION_VERSION) "." \ __stringify(QEDE_REVISION_VERSION) "." \
__stringify(QEDE_ENGINEERING_VERSION) __stringify(QEDE_ENGINEERING_VERSION)
#define QEDE_ETH_INTERFACE_VERSION 300
#define DRV_MODULE_SYM qede #define DRV_MODULE_SYM qede
struct qede_stats { struct qede_stats {
......
...@@ -141,19 +141,10 @@ static ...@@ -141,19 +141,10 @@ static
int __init qede_init(void) int __init qede_init(void)
{ {
int ret; int ret;
u32 qed_ver;
pr_notice("qede_init: %s\n", version); pr_notice("qede_init: %s\n", version);
qed_ver = qed_get_protocol_version(QED_PROTOCOL_ETH); qed_ops = qed_get_eth_ops();
if (qed_ver != QEDE_ETH_INTERFACE_VERSION) {
pr_notice("Version mismatch [%08x != %08x]\n",
qed_ver,
QEDE_ETH_INTERFACE_VERSION);
return -EINVAL;
}
qed_ops = qed_get_eth_ops(QEDE_ETH_INTERFACE_VERSION);
if (!qed_ops) { if (!qed_ops) {
pr_notice("Failed to get qed ethtool operations\n"); pr_notice("Failed to get qed ethtool operations\n");
return -EINVAL; return -EINVAL;
......
...@@ -167,7 +167,7 @@ struct qed_eth_ops { ...@@ -167,7 +167,7 @@ struct qed_eth_ops {
struct qed_eth_stats *stats); struct qed_eth_stats *stats);
}; };
const struct qed_eth_ops *qed_get_eth_ops(u32 version); const struct qed_eth_ops *qed_get_eth_ops(void);
void qed_put_eth_ops(void); void qed_put_eth_ops(void);
#endif #endif
...@@ -271,15 +271,6 @@ struct qed_common_ops { ...@@ -271,15 +271,6 @@ struct qed_common_ops {
enum qed_led_mode mode); enum qed_led_mode mode);
}; };
/**
* @brief qed_get_protocol_version
*
* @param protocol
*
* @return version supported by qed for given protocol driver
*/
u32 qed_get_protocol_version(enum qed_protocol protocol);
#define MASK_FIELD(_name, _value) \ #define MASK_FIELD(_name, _value) \
((_value) &= (_name ## _MASK)) ((_value) &= (_name ## _MASK))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment