Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/usb/asix_common.c drivers/net/usb/sr9800.c drivers/net/usb/usbnet.c include/linux/usb/usbnet.h net/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c The TCP conflicts were overlapping changes. In 'net' we added a READ_ONCE() to the socket cached RX route read, whilst in 'net-next' Eric Dumazet touched the surrounding code dealing with how mini sockets are handled. With USB, it's a case of the same bug fix first going into net-next and then I cherry picked it back into net. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1954,6 +1954,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
|
||||
struct fec_enet_private *fep = netdev_priv(ndev);
|
||||
struct device_node *node;
|
||||
int err = -ENXIO, i;
|
||||
u32 mii_speed, holdtime;
|
||||
|
||||
/*
|
||||
* The i.MX28 dual fec interfaces are not equal.
|
||||
@@ -1991,10 +1992,33 @@ static int fec_enet_mii_init(struct platform_device *pdev)
|
||||
* Reference Manual has an error on this, and gets fixed on i.MX6Q
|
||||
* document.
|
||||
*/
|
||||
fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk_ipg), 5000000);
|
||||
mii_speed = DIV_ROUND_UP(clk_get_rate(fep->clk_ipg), 5000000);
|
||||
if (fep->quirks & FEC_QUIRK_ENET_MAC)
|
||||
fep->phy_speed--;
|
||||
fep->phy_speed <<= 1;
|
||||
mii_speed--;
|
||||
if (mii_speed > 63) {
|
||||
dev_err(&pdev->dev,
|
||||
"fec clock (%lu) to fast to get right mii speed\n",
|
||||
clk_get_rate(fep->clk_ipg));
|
||||
err = -EINVAL;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
/*
|
||||
* The i.MX28 and i.MX6 types have another filed in the MSCR (aka
|
||||
* MII_SPEED) register that defines the MDIO output hold time. Earlier
|
||||
* versions are RAZ there, so just ignore the difference and write the
|
||||
* register always.
|
||||
* The minimal hold time according to IEE802.3 (clause 22) is 10 ns.
|
||||
* HOLDTIME + 1 is the number of clk cycles the fec is holding the
|
||||
* output.
|
||||
* The HOLDTIME bitfield takes values between 0 and 7 (inclusive).
|
||||
* Given that ceil(clkrate / 5000000) <= 64, the calculation for
|
||||
* holdtime cannot result in a value greater than 3.
|
||||
*/
|
||||
holdtime = DIV_ROUND_UP(clk_get_rate(fep->clk_ipg), 100000000) - 1;
|
||||
|
||||
fep->phy_speed = mii_speed << 1 | holdtime << 8;
|
||||
|
||||
writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
|
||||
|
||||
fep->mii_bus = mdiobus_alloc();
|
||||
|
@@ -3893,6 +3893,9 @@ static int ucc_geth_probe(struct platform_device* ofdev)
|
||||
ugeth->phy_interface = phy_interface;
|
||||
ugeth->max_speed = max_speed;
|
||||
|
||||
/* Carrier starts down, phylib will bring it up */
|
||||
netif_carrier_off(dev);
|
||||
|
||||
err = register_netdev(dev);
|
||||
if (err) {
|
||||
if (netif_msg_probe(ugeth))
|
||||
|
Reference in New Issue
Block a user