projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford...
[cascardo/linux.git]
/
drivers
/
net
/
ethernet
/
hisilicon
/
hns
/
hns_enet.c
diff --git
a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index
a7abe11
..
dff7b60
100644
(file)
--- a/
drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/
drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@
-1015,10
+1015,10
@@
static void hns_nic_adjust_link(struct net_device *ndev)
struct hnae_handle *h = priv->ae_handle;
int state = 1;
struct hnae_handle *h = priv->ae_handle;
int state = 1;
- if (
priv->phy
) {
+ if (
ndev->phydev
) {
h->dev->ops->adjust_link(h, ndev->phydev->speed,
ndev->phydev->duplex);
h->dev->ops->adjust_link(h, ndev->phydev->speed,
ndev->phydev->duplex);
- state =
priv->phy
->link;
+ state =
ndev->phydev
->link;
}
state = state && h->dev->ops->get_status(h);
}
state = state && h->dev->ops->get_status(h);
@@
-1043,7
+1043,6
@@
static void hns_nic_adjust_link(struct net_device *ndev)
*/
int hns_nic_init_phy(struct net_device *ndev, struct hnae_handle *h)
{
*/
int hns_nic_init_phy(struct net_device *ndev, struct hnae_handle *h)
{
- struct hns_nic_priv *priv = netdev_priv(ndev);
struct phy_device *phy_dev = h->phy_dev;
int ret;
struct phy_device *phy_dev = h->phy_dev;
int ret;
@@
-1067,8
+1066,6
@@
int hns_nic_init_phy(struct net_device *ndev, struct hnae_handle *h)
if (h->phy_if == PHY_INTERFACE_MODE_XGMII)
phy_dev->autoneg = false;
if (h->phy_if == PHY_INTERFACE_MODE_XGMII)
phy_dev->autoneg = false;
- priv->phy = phy_dev;
-
return 0;
}
return 0;
}
@@
-1245,8
+1242,8
@@
static int hns_nic_net_up(struct net_device *ndev)
if (ret)
goto out_start_err;
if (ret)
goto out_start_err;
- if (
priv->phy
)
- phy_start(
priv->phy
);
+ if (
ndev->phydev
)
+ phy_start(
ndev->phydev
);
clear_bit(NIC_STATE_DOWN, &priv->state);
(void)mod_timer(&priv->service_timer, jiffies + SERVICE_TIMER_HZ);
clear_bit(NIC_STATE_DOWN, &priv->state);
(void)mod_timer(&priv->service_timer, jiffies + SERVICE_TIMER_HZ);
@@
-1280,8
+1277,8
@@
static void hns_nic_net_down(struct net_device *ndev)
netif_tx_disable(ndev);
priv->link = 0;
netif_tx_disable(ndev);
priv->link = 0;
- if (
priv->phy
)
- phy_stop(
priv->phy
);
+ if (
ndev->phydev
)
+ phy_stop(
ndev->phydev
);
ops = priv->ae_handle->dev->ops;
ops = priv->ae_handle->dev->ops;
@@
-1380,8
+1377,7
@@
static void hns_nic_net_timeout(struct net_device *ndev)
static int hns_nic_do_ioctl(struct net_device *netdev, struct ifreq *ifr,
int cmd)
{
static int hns_nic_do_ioctl(struct net_device *netdev, struct ifreq *ifr,
int cmd)
{
- struct hns_nic_priv *priv = netdev_priv(netdev);
- struct phy_device *phy_dev = priv->phy;
+ struct phy_device *phy_dev = netdev->phydev;
if (!netif_running(netdev))
return -EINVAL;
if (!netif_running(netdev))
return -EINVAL;
@@
-2056,9
+2052,8
@@
static int hns_nic_dev_remove(struct platform_device *pdev)
hns_nic_uninit_ring_data(priv);
priv->ring_data = NULL;
hns_nic_uninit_ring_data(priv);
priv->ring_data = NULL;
- if (priv->phy)
- phy_disconnect(priv->phy);
- priv->phy = NULL;
+ if (ndev->phydev)
+ phy_disconnect(ndev->phydev);
if (!IS_ERR_OR_NULL(priv->ae_handle))
hnae_put_handle(priv->ae_handle);
if (!IS_ERR_OR_NULL(priv->ae_handle))
hnae_put_handle(priv->ae_handle);