Commit 9e598a65 authored by Igor Russkikh's avatar Igor Russkikh Committed by David S. Miller
Browse files

Revert "aqc111: fix writing to the phy on BE"



This reverts commit 369b46e9.

The required temporary storage is already done inside of write32/16
helpers.

Signed-off-by: default avatarIgor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5aee080f
Loading
Loading
Loading
Loading
+6 −17
Original line number Diff line number Diff line
@@ -320,7 +320,6 @@ static int aqc111_get_link_ksettings(struct net_device *net,
static void aqc111_set_phy_speed(struct usbnet *dev, u8 autoneg, u16 speed)
{
	struct aqc111_data *aqc111_data = dev->driver_priv;
	u32 phy_on_the_wire;

	aqc111_data->phy_cfg &= ~AQ_ADV_MASK;
	aqc111_data->phy_cfg |= AQ_PAUSE;
@@ -362,8 +361,7 @@ static void aqc111_set_phy_speed(struct usbnet *dev, u8 autoneg, u16 speed)
		}
	}

	phy_on_the_wire = aqc111_data->phy_cfg;
	aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, &phy_on_the_wire);
	aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, &aqc111_data->phy_cfg);
}

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)
{
	struct aqc111_data *aqc111_data = dev->driver_priv;
	u16 reg16;
	u32 phy_on_the_wire;

	/* Force bz */
	reg16 = SFR_PHYPWR_RSTCTL_BZ;
@@ -771,9 +768,8 @@ static void aqc111_unbind(struct usbnet *dev, struct usb_interface *intf)
	aqc111_data->phy_cfg &= ~AQ_ADV_MASK;
	aqc111_data->phy_cfg |= AQ_LOW_POWER;
	aqc111_data->phy_cfg &= ~AQ_PHY_POWER_EN;
	phy_on_the_wire = aqc111_data->phy_cfg;
	aqc111_write32_cmd_nopm(dev, AQ_PHY_OPS, 0, 0,
				&phy_on_the_wire);
				&aqc111_data->phy_cfg);

	kfree(aqc111_data);
}
@@ -996,7 +992,6 @@ static int aqc111_reset(struct usbnet *dev)
{
	struct aqc111_data *aqc111_data = dev->driver_priv;
	u8 reg8 = 0;
	u32 phy_on_the_wire;

	dev->rx_urb_size = URB_SIZE;

@@ -1009,9 +1004,8 @@ static int aqc111_reset(struct usbnet *dev)

	/* Power up ethernet PHY */
	aqc111_data->phy_cfg = AQ_PHY_POWER_EN;
	phy_on_the_wire = aqc111_data->phy_cfg;
	aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0,
			   &phy_on_the_wire);
			   &aqc111_data->phy_cfg);

	/* Set the MAC address */
	aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, ETH_ALEN,
@@ -1042,7 +1036,6 @@ static int aqc111_stop(struct usbnet *dev)
{
	struct aqc111_data *aqc111_data = dev->driver_priv;
	u16 reg16 = 0;
	u32 phy_on_the_wire;

	aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE,
			  2, &reg16);
@@ -1054,9 +1047,8 @@ static int aqc111_stop(struct usbnet *dev)

	/* Put PHY to low power*/
	aqc111_data->phy_cfg |= AQ_LOW_POWER;
	phy_on_the_wire = aqc111_data->phy_cfg;
	aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0,
			   &phy_on_the_wire);
			   &aqc111_data->phy_cfg);

	netif_carrier_off(dev->net);

@@ -1332,7 +1324,6 @@ static int aqc111_suspend(struct usb_interface *intf, pm_message_t message)
	u16 temp_rx_ctrl = 0x00;
	u16 reg16;
	u8 reg8;
	u32 phy_on_the_wire;

	usbnet_suspend(intf, message);

@@ -1404,14 +1395,12 @@ static int aqc111_suspend(struct usb_interface *intf, pm_message_t message)

		aqc111_write_cmd(dev, AQ_WOL_CFG, 0, 0,
				 WOL_CFG_SIZE, &wol_cfg);
		phy_on_the_wire = aqc111_data->phy_cfg;
		aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0,
				   &phy_on_the_wire);
				   &aqc111_data->phy_cfg);
	} else {
		aqc111_data->phy_cfg |= AQ_LOW_POWER;
		phy_on_the_wire = aqc111_data->phy_cfg;
		aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0,
				   &phy_on_the_wire);
				   &aqc111_data->phy_cfg);

		/* Disable RX path */
		aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC,