diff mbox

[V4,net-next,05/26] bfin_mac: Support the get_ts_info ethtool method.

Message ID 88e5b2cfcabda03826bb576b21e2e1d990f07117.1333529506.git.richardcochran@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Richard Cochran April 4, 2012, 8:59 a.m. UTC
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
 drivers/net/ethernet/adi/bfin_mac.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

Comments

Paul Gortmaker April 6, 2012, 4:08 a.m. UTC | #1
On Wed, Apr 4, 2012 at 4:59 AM, Richard Cochran
<richardcochran@gmail.com> wrote:
> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
> ---
>  drivers/net/ethernet/adi/bfin_mac.c |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
> index ab4daec..db22278 100644
> --- a/drivers/net/ethernet/adi/bfin_mac.c
> +++ b/drivers/net/ethernet/adi/bfin_mac.c
> @@ -548,6 +548,25 @@ static int bfin_mac_ethtool_setwol(struct net_device *dev,
>        return 0;
>  }
>
> +static int bfin_mac_ethtool_get_ts_info(struct net_device *dev,
> +       struct ethtool_ts_info *info);

   ----------------------------------->  ^^^^^^^

Trailing semicolon.  Compile fail in linux-next due to a85bbddd.

http://kisskb.ellerman.id.au/kisskb/buildresult/6040086/
http://kisskb.ellerman.id.au/kisskb/buildresult/6040080/
http://kisskb.ellerman.id.au/kisskb/buildresult/6040087/

Thanks.
Paul.

> +{
> +       info->so_timestamping =
> +               SOF_TIMESTAMPING_TX_HARDWARE |
> +               SOF_TIMESTAMPING_RX_HARDWARE |
> +               SOF_TIMESTAMPING_SYS_HARDWARE;
> +       info->phc_index = -1;
> +       info->tx_types =
> +               (1 << HWTSTAMP_TX_OFF) |
> +               (1 << HWTSTAMP_TX_ON);
> +       info->rx_filters =
> +               (1 << HWTSTAMP_FILTER_NONE) |
> +               (1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
> +               (1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
> +               (1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT);
> +       return 0;
> +}
> +
>  static const struct ethtool_ops bfin_mac_ethtool_ops = {
>        .get_settings = bfin_mac_ethtool_getsettings,
>        .set_settings = bfin_mac_ethtool_setsettings,
> @@ -555,6 +574,7 @@ static const struct ethtool_ops bfin_mac_ethtool_ops = {
>        .get_drvinfo = bfin_mac_ethtool_getdrvinfo,
>        .get_wol = bfin_mac_ethtool_getwol,
>        .set_wol = bfin_mac_ethtool_setwol,
> +       .get_ts_info = bfin_mac_ethtool_get_ts_info,
>  };
>
>  /**************************************************************************/
> --
> 1.7.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller April 6, 2012, 4:18 a.m. UTC | #2
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Fri, 6 Apr 2012 00:08:52 -0400

> On Wed, Apr 4, 2012 at 4:59 AM, Richard Cochran
> <richardcochran@gmail.com> wrote:
>> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
>> ---
>>  drivers/net/ethernet/adi/bfin_mac.c |   20 ++++++++++++++++++++
>>  1 files changed, 20 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
>> index ab4daec..db22278 100644
>> --- a/drivers/net/ethernet/adi/bfin_mac.c
>> +++ b/drivers/net/ethernet/adi/bfin_mac.c
>> @@ -548,6 +548,25 @@ static int bfin_mac_ethtool_setwol(struct net_device *dev,
>>        return 0;
>>  }
>>
>> +static int bfin_mac_ethtool_get_ts_info(struct net_device *dev,
>> +       struct ethtool_ts_info *info);
> 
>    ----------------------------------->  ^^^^^^^
> 
> Trailing semicolon.  Compile fail in linux-next due to a85bbddd.

I just pushed out the obvious fix for this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Richard Cochran April 6, 2012, 7:04 a.m. UTC | #3
On Fri, Apr 06, 2012 at 12:18:05AM -0400, David Miller wrote:
> > Trailing semicolon.  Compile fail in linux-next due to a85bbddd.
> 
> I just pushed out the obvious fix for this.

Paul, thanks for compile testing, and David, thanks for fixing these.
Next time I promise to do at least the compile testing for the various
different architectures.

Richard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index ab4daec..db22278 100644
--- a/drivers/net/ethernet/adi/bfin_mac.c
+++ b/drivers/net/ethernet/adi/bfin_mac.c
@@ -548,6 +548,25 @@  static int bfin_mac_ethtool_setwol(struct net_device *dev,
 	return 0;
 }
 
+static int bfin_mac_ethtool_get_ts_info(struct net_device *dev,
+	struct ethtool_ts_info *info);
+{
+	info->so_timestamping =
+		SOF_TIMESTAMPING_TX_HARDWARE |
+		SOF_TIMESTAMPING_RX_HARDWARE |
+		SOF_TIMESTAMPING_SYS_HARDWARE;
+	info->phc_index = -1;
+	info->tx_types =
+		(1 << HWTSTAMP_TX_OFF) |
+		(1 << HWTSTAMP_TX_ON);
+	info->rx_filters =
+		(1 << HWTSTAMP_FILTER_NONE) |
+		(1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
+		(1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
+		(1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT);
+	return 0;
+}
+
 static const struct ethtool_ops bfin_mac_ethtool_ops = {
 	.get_settings = bfin_mac_ethtool_getsettings,
 	.set_settings = bfin_mac_ethtool_setsettings,
@@ -555,6 +574,7 @@  static const struct ethtool_ops bfin_mac_ethtool_ops = {
 	.get_drvinfo = bfin_mac_ethtool_getdrvinfo,
 	.get_wol = bfin_mac_ethtool_getwol,
 	.set_wol = bfin_mac_ethtool_setwol,
+	.get_ts_info = bfin_mac_ethtool_get_ts_info,
 };
 
 /**************************************************************************/