projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netdev: convert bulk of drivers to netdev_tx_t
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
drivers
/
net
/
sfc
/
selftest.c
diff --git
a/drivers/net/sfc/selftest.c
b/drivers/net/sfc/selftest.c
index 0a598084c5133a64cdb4dd4bb342b2fedc976b66..817c7efc11e09b74bffb1f25e84b6e1035225f12 100644
(file)
--- a/
drivers/net/sfc/selftest.c
+++ b/
drivers/net/sfc/selftest.c
@@
-80,39
+80,38
@@
struct efx_loopback_state {
*
**************************************************************************/
*
**************************************************************************/
-static int efx_test_m
ii
(struct efx_nic *efx, struct efx_self_tests *tests)
+static int efx_test_m
dio
(struct efx_nic *efx, struct efx_self_tests *tests)
{
int rc = 0;
{
int rc = 0;
+ int devad = __ffs(efx->mdio.mmds);
u16 physid1, physid2;
u16 physid1, physid2;
- struct mii_if_info *mii = &efx->mii;
- struct net_device *net_dev = efx->net_dev;
if (efx->phy_type == PHY_TYPE_NONE)
return 0;
mutex_lock(&efx->mac_lock);
if (efx->phy_type == PHY_TYPE_NONE)
return 0;
mutex_lock(&efx->mac_lock);
- tests->m
ii
= -1;
+ tests->m
dio
= -1;
- physid1 =
mii->mdio_read(net_dev, mii->phy_id, MII_PHYS
ID1);
- physid2 =
mii->mdio_read(net_dev, mii->phy_id, MII_PHYS
ID2);
+ physid1 =
efx_mdio_read(efx, devad, MDIO_DEV
ID1);
+ physid2 =
efx_mdio_read(efx, devad, MDIO_DEV
ID2);
if ((physid1 == 0x0000) || (physid1 == 0xffff) ||
(physid2 == 0x0000) || (physid2 == 0xffff)) {
if ((physid1 == 0x0000) || (physid1 == 0xffff) ||
(physid2 == 0x0000) || (physid2 == 0xffff)) {
- EFX_ERR(efx, "no M
II
PHY present with ID %d\n",
-
mii->phy_i
d);
+ EFX_ERR(efx, "no M
DIO
PHY present with ID %d\n",
+
efx->mdio.prta
d);
rc = -EINVAL;
goto out;
}
if (EFX_IS10G(efx)) {
rc = -EINVAL;
goto out;
}
if (EFX_IS10G(efx)) {
- rc =
mdio_clause45
_check_mmds(efx, efx->phy_op->mmds, 0);
+ rc =
efx_mdio
_check_mmds(efx, efx->phy_op->mmds, 0);
if (rc)
goto out;
}
out:
mutex_unlock(&efx->mac_lock);
if (rc)
goto out;
}
out:
mutex_unlock(&efx->mac_lock);
- tests->m
ii
= rc ? -1 : 1;
+ tests->m
dio
= rc ? -1 : 1;
return rc;
}
return rc;
}
@@
-401,7
+400,8
@@
static int efx_begin_loopback(struct efx_tx_queue *tx_queue)
struct efx_loopback_state *state = efx->loopback_selftest;
struct efx_loopback_payload *payload;
struct sk_buff *skb;
struct efx_loopback_state *state = efx->loopback_selftest;
struct efx_loopback_payload *payload;
struct sk_buff *skb;
- int i, rc;
+ int i;
+ netdev_tx_t rc;
/* Transmit N copies of buffer */
for (i = 0; i < state->packet_count; i++) {
/* Transmit N copies of buffer */
for (i = 0; i < state->packet_count; i++) {
@@
-439,6
+439,7
@@
static int efx_begin_loopback(struct efx_tx_queue *tx_queue)
kfree_skb(skb);
return -EPIPE;
}
kfree_skb(skb);
return -EPIPE;
}
+ efx->net_dev->trans_start = jiffies;
}
return 0;
}
return 0;
@@
-673,7
+674,7
@@
int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
/* Online (i.e. non-disruptive) testing
* This checks interrupt generation, event delivery and PHY presence. */
/* Online (i.e. non-disruptive) testing
* This checks interrupt generation, event delivery and PHY presence. */
- rc = efx_test_m
ii
(efx, tests);
+ rc = efx_test_m
dio
(efx, tests);
if (rc && !rc_test)
rc_test = rc;
if (rc && !rc_test)
rc_test = rc;