diff options
author | Igor Russkikh <Igor.Russkikh@aquantia.com> | 2019-05-16 10:52:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-16 17:22:13 -0400 |
commit | 9e598a65b9f7ecf52fee0923747d18b1897270db (patch) | |
tree | 90ad766c904ae4cd66cc77da80424fd2668c0566 /drivers/net/usb | |
parent | 5aee080f2cf18215dfc10ad2bb4be29fa7381050 (diff) |
Revert "aqc111: fix writing to the phy on BE"
This reverts commit 369b46e9fbcfa5136f2cb5f486c90e5f7fa92630.
The required temporary storage is already done inside of write32/16
helpers.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/aqc111.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/net/usb/aqc111.c b/drivers/net/usb/aqc111.c index 599d560a8450..408df2d335e3 100644 --- a/drivers/net/usb/aqc111.c +++ b/drivers/net/usb/aqc111.c | |||
@@ -320,7 +320,6 @@ static int aqc111_get_link_ksettings(struct net_device *net, | |||
320 | static void aqc111_set_phy_speed(struct usbnet *dev, u8 autoneg, u16 speed) | 320 | static void aqc111_set_phy_speed(struct usbnet *dev, u8 autoneg, u16 speed) |
321 | { | 321 | { |
322 | struct aqc111_data *aqc111_data = dev->driver_priv; | 322 | struct aqc111_data *aqc111_data = dev->driver_priv; |
323 | u32 phy_on_the_wire; | ||
324 | 323 | ||
325 | aqc111_data->phy_cfg &= ~AQ_ADV_MASK; | 324 | aqc111_data->phy_cfg &= ~AQ_ADV_MASK; |
326 | aqc111_data->phy_cfg |= AQ_PAUSE; | 325 | aqc111_data->phy_cfg |= AQ_PAUSE; |
@@ -362,8 +361,7 @@ static void aqc111_set_phy_speed(struct usbnet *dev, u8 autoneg, u16 speed) | |||
362 | } | 361 | } |
363 | } | 362 | } |
364 | 363 | ||
365 | phy_on_the_wire = aqc111_data->phy_cfg; | 364 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, &aqc111_data->phy_cfg); |
366 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, &phy_on_the_wire); | ||
367 | } | 365 | } |
368 | 366 | ||
369 | static int aqc111_set_link_ksettings(struct net_device *net, | 367 | static int aqc111_set_link_ksettings(struct net_device *net, |
@@ -757,7 +755,6 @@ static void aqc111_unbind(struct usbnet *dev, struct usb_interface *intf) | |||
757 | { | 755 | { |
758 | struct aqc111_data *aqc111_data = dev->driver_priv; | 756 | struct aqc111_data *aqc111_data = dev->driver_priv; |
759 | u16 reg16; | 757 | u16 reg16; |
760 | u32 phy_on_the_wire; | ||
761 | 758 | ||
762 | /* Force bz */ | 759 | /* Force bz */ |
763 | reg16 = SFR_PHYPWR_RSTCTL_BZ; | 760 | reg16 = SFR_PHYPWR_RSTCTL_BZ; |
@@ -771,9 +768,8 @@ static void aqc111_unbind(struct usbnet *dev, struct usb_interface *intf) | |||
771 | aqc111_data->phy_cfg &= ~AQ_ADV_MASK; | 768 | aqc111_data->phy_cfg &= ~AQ_ADV_MASK; |
772 | aqc111_data->phy_cfg |= AQ_LOW_POWER; | 769 | aqc111_data->phy_cfg |= AQ_LOW_POWER; |
773 | aqc111_data->phy_cfg &= ~AQ_PHY_POWER_EN; | 770 | aqc111_data->phy_cfg &= ~AQ_PHY_POWER_EN; |
774 | phy_on_the_wire = aqc111_data->phy_cfg; | ||
775 | aqc111_write32_cmd_nopm(dev, AQ_PHY_OPS, 0, 0, | 771 | aqc111_write32_cmd_nopm(dev, AQ_PHY_OPS, 0, 0, |
776 | &phy_on_the_wire); | 772 | &aqc111_data->phy_cfg); |
777 | 773 | ||
778 | kfree(aqc111_data); | 774 | kfree(aqc111_data); |
779 | } | 775 | } |
@@ -996,7 +992,6 @@ static int aqc111_reset(struct usbnet *dev) | |||
996 | { | 992 | { |
997 | struct aqc111_data *aqc111_data = dev->driver_priv; | 993 | struct aqc111_data *aqc111_data = dev->driver_priv; |
998 | u8 reg8 = 0; | 994 | u8 reg8 = 0; |
999 | u32 phy_on_the_wire; | ||
1000 | 995 | ||
1001 | dev->rx_urb_size = URB_SIZE; | 996 | dev->rx_urb_size = URB_SIZE; |
1002 | 997 | ||
@@ -1009,9 +1004,8 @@ static int aqc111_reset(struct usbnet *dev) | |||
1009 | 1004 | ||
1010 | /* Power up ethernet PHY */ | 1005 | /* Power up ethernet PHY */ |
1011 | aqc111_data->phy_cfg = AQ_PHY_POWER_EN; | 1006 | aqc111_data->phy_cfg = AQ_PHY_POWER_EN; |
1012 | phy_on_the_wire = aqc111_data->phy_cfg; | ||
1013 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, | 1007 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, |
1014 | &phy_on_the_wire); | 1008 | &aqc111_data->phy_cfg); |
1015 | 1009 | ||
1016 | /* Set the MAC address */ | 1010 | /* Set the MAC address */ |
1017 | aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, ETH_ALEN, | 1011 | aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, ETH_ALEN, |
@@ -1042,7 +1036,6 @@ static int aqc111_stop(struct usbnet *dev) | |||
1042 | { | 1036 | { |
1043 | struct aqc111_data *aqc111_data = dev->driver_priv; | 1037 | struct aqc111_data *aqc111_data = dev->driver_priv; |
1044 | u16 reg16 = 0; | 1038 | u16 reg16 = 0; |
1045 | u32 phy_on_the_wire; | ||
1046 | 1039 | ||
1047 | aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, | 1040 | aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, |
1048 | 2, ®16); | 1041 | 2, ®16); |
@@ -1054,9 +1047,8 @@ static int aqc111_stop(struct usbnet *dev) | |||
1054 | 1047 | ||
1055 | /* Put PHY to low power*/ | 1048 | /* Put PHY to low power*/ |
1056 | aqc111_data->phy_cfg |= AQ_LOW_POWER; | 1049 | aqc111_data->phy_cfg |= AQ_LOW_POWER; |
1057 | phy_on_the_wire = aqc111_data->phy_cfg; | ||
1058 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, | 1050 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, |
1059 | &phy_on_the_wire); | 1051 | &aqc111_data->phy_cfg); |
1060 | 1052 | ||
1061 | netif_carrier_off(dev->net); | 1053 | netif_carrier_off(dev->net); |
1062 | 1054 | ||
@@ -1332,7 +1324,6 @@ static int aqc111_suspend(struct usb_interface *intf, pm_message_t message) | |||
1332 | u16 temp_rx_ctrl = 0x00; | 1324 | u16 temp_rx_ctrl = 0x00; |
1333 | u16 reg16; | 1325 | u16 reg16; |
1334 | u8 reg8; | 1326 | u8 reg8; |
1335 | u32 phy_on_the_wire; | ||
1336 | 1327 | ||
1337 | usbnet_suspend(intf, message); | 1328 | usbnet_suspend(intf, message); |
1338 | 1329 | ||
@@ -1404,14 +1395,12 @@ static int aqc111_suspend(struct usb_interface *intf, pm_message_t message) | |||
1404 | 1395 | ||
1405 | aqc111_write_cmd(dev, AQ_WOL_CFG, 0, 0, | 1396 | aqc111_write_cmd(dev, AQ_WOL_CFG, 0, 0, |
1406 | WOL_CFG_SIZE, &wol_cfg); | 1397 | WOL_CFG_SIZE, &wol_cfg); |
1407 | phy_on_the_wire = aqc111_data->phy_cfg; | ||
1408 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, | 1398 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, |
1409 | &phy_on_the_wire); | 1399 | &aqc111_data->phy_cfg); |
1410 | } else { | 1400 | } else { |
1411 | aqc111_data->phy_cfg |= AQ_LOW_POWER; | 1401 | aqc111_data->phy_cfg |= AQ_LOW_POWER; |
1412 | phy_on_the_wire = aqc111_data->phy_cfg; | ||
1413 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, | 1402 | aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, |
1414 | &phy_on_the_wire); | 1403 | &aqc111_data->phy_cfg); |
1415 | 1404 | ||
1416 | /* Disable RX path */ | 1405 | /* Disable RX path */ |
1417 | aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC, | 1406 | aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC, |