Re: [PATCH 1/2] [v4] net: emac: emac gigabit ethernet controller driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Florian Fainelli wrote:
The Ethernet MAC should be started in ndo_open() and stopped in
ndo_close(), in between, there are link state changes, but you are not
supposed to stop or start your Ethernet MAC and its DMA for instance
during link change, if that is a HW requirement, your HW is pretty funky.

I think the problem is that the current driver seems to be too eager to start/stop the MAC.

Please take a look at emac_work_thread_link_check() at https://lkml.org/lkml/2016/4/13/670. Every time the PHY link goes up, it does this:

if (phy->link_up) {
	if (netif_carrier_ok(netdev))
		goto link_task_done;

	pm_runtime_get_sync(netdev->dev.parent);
	netif_info(adpt, timer, adpt->netdev, "NIC Link is Up %s\n",
		   speed);

	emac_mac_start(adpt);
	netif_carrier_on(netdev);
	netif_wake_queue(netdev);


The call to emac_mac_start seems wrong to me here.

--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux