From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Darren Hart <dvhart@linux.intel.com>
Cc: Linux Net Dev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com>,
Joe Perches <joe@perches.com>
Subject: Re: [PATCH V3 net-next 2/2] pch_gbe: Add MinnowBoard support
Date: Thu, 25 Jul 2013 11:00:58 +0300 [thread overview]
Message-ID: <1374739258.31118.63.camel@smile> (raw)
In-Reply-To: <4d6af18d01b977c9db13c3d8052631c97e099ea0.1374728627.git.dvhart@linux.intel.com>
On Wed, 2013-07-24 at 22:10 -0700, Darren Hart wrote:
> The MinnowBoard uses an AR803x PHY with the PCH GBE which requires
> special handling. Use the MinnowBoard PCI Subsystem ID to detect this
> and add a pci_device_id.driver_data structure and functions to handle
> platform setup.
>
> The AR803x does not implement the RGMII 2ns TX clock delay in the trace
> routing nor via strapping. Add a detection method for the board and the
> PHY and enable the TX clock delay via the registers.
>
> This PHY will hibernate without link for 10 seconds. Ensure the PHY is
> awake for probe and then disable hibernation. A future improvement would
> be to convert pch_gbe to using PHYLIB and making sure we can wake the
> PHY at the necessary times rather than permanently disabling it.
Couple of nitpicks.
> --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
> +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
> @@ -582,6 +582,19 @@ struct pch_gbe_hw_stats {
> };
>
> /**
> + * struct pch_gbe_privdata - PCI Device ID driver data
> + * @phy_tx_clk_delay: Bool, configure the PHY TX delay in software
> + * @phy_disable_hibernate: Bool, disable PHY hibernation
> + * @platform_init: Platform initialization callback, called from
> + * probe, prior to PHY initialization.
> + */
> +struct pch_gbe_privdata {
> + bool phy_tx_clk_delay;
> + bool phy_disable_hibernate;
> + int(*platform_init)(struct pci_dev *pdev);
I think space after "int" will be good.
> --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> @@ -23,6 +23,8 @@
> #include <linux/module.h>
> #include <linux/net_tstamp.h>
> #include <linux/ptp_classify.h>
> +#include <linux/gpio.h>
> +#include <linux/mod_devicetable.h>
You do not need to include that file directly since pci.h includes it,
and pci.h is included via pch_gbe.h.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2013-07-25 8:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 5:10 [PATCH V3 net-next 0/2] pch_gbe: Add MinnowBoard support Darren Hart
2013-07-25 5:10 ` [PATCH net-next 1/2] pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32 Darren Hart
2013-07-25 5:10 ` [PATCH V3 net-next 2/2] pch_gbe: Add MinnowBoard support Darren Hart
2013-07-25 8:00 ` Andy Shevchenko [this message]
2013-07-25 14:04 ` [PATCH V3 net-next 0/2] " Darren Hart
2013-07-28 5:13 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374739258.31118.63.camel@smile \
--to=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=dvhart@linux.intel.com \
--cc=hpa@zytor.com \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.