From: Pradeep Dalvi <pradeep@linsyssoft.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: "Linsys Contractor Amit S. Kale" <amitkale@unminc.com>,
Kernel Netdev Mailing List <netdev@vger.kernel.org>,
Sanjeev Jorapur <sanjeev@netxen.com>,
UNM Project Staff <unmproj@linsyssoft.com>
Subject: Re: [PATCH 1/9] Resending NetXen 1G/10G NIC driver patch
Date: Fri, 26 May 2006 14:14:32 +0000 [thread overview]
Message-ID: <1148652872.3453.100.camel@arya.linsyssoft.com> (raw)
In-Reply-To: <20060525093349.3f42220a@dxpl.pdx.osdl.net>
Following are the minor changes for [PATCH 1/9] in accordance with the
given suggestions.
Regards,
pradeep
diff -u linux-2.6.16.18/drivers/net/netxen/netxen_nic_ethtool.c
linux-2.6.16.18/drivers/net/netxen/netxen_nic_ethtool.c
--- linux-2.6.16.18/drivers/net/netxen/netxen_nic_ethtool.c
2006-05-25 02:43:22.000000000 -0700
+++ linux-2.6.16.18/drivers/net/netxen/netxen_nic_ethtool.c
2006-05-26 04:05:34.000000000 -0700
@@ -145,7 +145,7 @@
ecmd->port = PORT_TP;
- if (port->state) {
+ if (dev->flags & IFF_UP) {
ecmd->speed = port->link_speed;
ecmd->duplex = port->link_duplex;
} else
@@ -512,16 +512,6 @@
ring->rx_jumbo_pending = 0;
}
-/*
- * Note: This change will be reflected in all the four ports as there
is
- * only one common adapter.
- */
-static int
-netxen_nic_set_ringparam(struct net_device *dev, struct
ethtool_ringparam *ring)
-{
- return 0;
-}
-
static void
netxen_nic_get_pauseparam(struct net_device *dev,
struct ethtool_pauseparam *pause)
@@ -781,7 +771,6 @@
.get_eeprom_len = netxen_nic_get_eeprom_len,
.get_eeprom = netxen_nic_get_eeprom,
.get_ringparam = netxen_nic_get_ringparam,
- .set_ringparam = netxen_nic_set_ringparam,
.get_pauseparam = netxen_nic_get_pauseparam,
.set_pauseparam = netxen_nic_set_pauseparam,
.get_rx_csum = netxen_nic_get_rx_csum,
On Thu, 2006-05-25 at 09:33 -0700, Stephen Hemminger wrote:
> Minor nits.
>
> On Thu, 25 May 2006 03:48:38 -0700 (PDT)
> "Linsys Contractor Amit S. Kale" <amitkale@unminc.com> wrote:
>
> > +/*
> > + * Note: This change will be reflected in all the four ports as there is
> > + * only one common adapter.
> > + */
> > +static int
> > +netxen_nic_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
> > +{
> > + return 0;
> > +}
>
> Why not just return have no hook if you can't set parameters. Then the ioctl
> will return not supported -EOPNOTSUPP
>
> >
> > +static u32 netxen_nic_get_rx_csum(struct net_device *dev)
> > +{
> > + return (dev->features & NETIF_F_HW_CSUM);
> > +}
>
>
> You got receive and transmit checksum confused. You need to separate
> checksumming on output (dev->features & NETIF_F_HW_CSUM) versus receive
> checksum (controlled by hardware and usually a flag in private data structure).
>
> > +static int netxen_nic_set_rx_csum(struct net_device *dev, u32 data)
> > +{
> > + if (data)
> > + dev->features |= NETIF_F_HW_CSUM;
> > + else
> > + dev->features &= (~NETIF_F_HW_CSUM);
> > +
> > + if (netif_running(dev)) {
> > + dev->stop(dev); /* verify */
> > + dev->open(dev);
>
> What if open fail fails? Then you have an "interesting" recovery
> situation.
> > + }
> > + return 0;
> > +}
> >
>
--
pradeep
next prev parent reply other threads:[~2006-05-26 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 10:48 [PATCH 1/9] Resending NetXen 1G/10G NIC driver patch Linsys Contractor Amit S. Kale
2006-05-25 16:33 ` Stephen Hemminger
2006-05-26 14:14 ` Pradeep Dalvi [this message]
2006-05-26 15:04 ` Stephen Hemminger
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=1148652872.3453.100.camel@arya.linsyssoft.com \
--to=pradeep@linsyssoft.com \
--cc=amitkale@unminc.com \
--cc=netdev@vger.kernel.org \
--cc=sanjeev@netxen.com \
--cc=shemminger@osdl.org \
--cc=unmproj@linsyssoft.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 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).