* [PATCH net-next v2] netxen: explicity handle pause autoneg parameter
@ 2012-10-27 0:39 Flavio Leitner
2012-10-28 19:39 ` Rajesh Borundia
0 siblings, 1 reply; 2+ messages in thread
From: Flavio Leitner @ 2012-10-27 0:39 UTC (permalink / raw)
To: netdev; +Cc: Sony Chacko, Rajesh Borundia, Ben Hutchings, Flavio Leitner
The hardware doesn't support controlling pause frames autoneg, so
report that back correctly to userspace.
Signed-off-by: Flavio Leitner <fbl@redhat.com>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 7 +++++++
1 file changed, 7 insertions(+)
I don't have the hardware handy to test this, so I appreciate
if someone could do it.
Changelog:
v2:
fixed to not use AUTONEG_DISABLE
fixed to return -EINVAL instead of -EOPNOTSUPP
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
index 10468e7..6bf73e1 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
@@ -488,6 +488,8 @@ netxen_nic_get_pauseparam(struct net_device *dev,
__u32 val;
int port = adapter->physical_port;
+ pause->autoneg = 0;
+
if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
return;
@@ -532,6 +534,11 @@ netxen_nic_set_pauseparam(struct net_device *dev,
struct netxen_adapter *adapter = netdev_priv(dev);
__u32 val;
int port = adapter->physical_port;
+
+ /* not supported */
+ if (pause->autoneg)
+ return -EINVAL;
+
/* read mode */
if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
--
1.7.11.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH net-next v2] netxen: explicity handle pause autoneg parameter
2012-10-27 0:39 [PATCH net-next v2] netxen: explicity handle pause autoneg parameter Flavio Leitner
@ 2012-10-28 19:39 ` Rajesh Borundia
0 siblings, 0 replies; 2+ messages in thread
From: Rajesh Borundia @ 2012-10-28 19:39 UTC (permalink / raw)
To: Flavio Leitner, netdev; +Cc: Sony Chacko, Ben Hutchings
>-----Original Message-----
>From: Flavio Leitner [mailto:fbl@redhat.com]
>Sent: Saturday, October 27, 2012 6:10 AM
>To: netdev
>Cc: Sony Chacko; Rajesh Borundia; Ben Hutchings; Flavio Leitner
>Subject: [PATCH net-next v2] netxen: explicity handle pause autoneg
>parameter
>
>The hardware doesn't support controlling pause frames autoneg, so
>report that back correctly to userspace.
>
>Signed-off-by: Flavio Leitner <fbl@redhat.com>
>---
> drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> I don't have the hardware handy to test this, so I appreciate
> if someone could do it.
Yes the hardware does not support pause autoneg.
I have tested the patch.
Acked-by : Rajesh Borundia <rajesh.borundia@qlogic.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-28 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-27 0:39 [PATCH net-next v2] netxen: explicity handle pause autoneg parameter Flavio Leitner
2012-10-28 19:39 ` Rajesh Borundia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).