* Patch to add ethtool -g to Spidernet network driver
@ 2006-08-05 15:36 Jim Lewis
2006-08-14 18:02 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Jim Lewis @ 2006-08-05 15:36 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, Andrew Morton
This patch adds ethtool -g (show ring sizes) support to the Spidernet
network driver.
Signed-off-by: James K Lewis <jklewis@us.ibm.com>
---
drivers/net/spider_net.c | 12 +++++++-----
drivers/net/spider_net.h | 3 +++
drivers/net/spider_net_ethtool.c | 13 +++++++++++++
3 files changed, 23 insertions(+), 5 deletions(-)
Index: linux-2.6.18-rc2/drivers/net/spider_net.c
===================================================================
--- linux-2.6.18-rc2.orig/drivers/net/spider_net.c 2006-08-03
12:03:01.000000000 -0500
+++ linux-2.6.18-rc2/drivers/net/spider_net.c 2006-08-04
14:48:28.000000000 -0500
@@ -1612,13 +1612,12 @@ spider_net_open(struct net_device *netde
int result;
result = -ENOMEM;
- if (spider_net_init_chain(card, &card->tx_chain,
- card->descr,
- PCI_DMA_TODEVICE, tx_descriptors))
+ if (spider_net_init_chain(card, &card->tx_chain, card->descr,
+ PCI_DMA_TODEVICE, card->tx_desc))
goto alloc_tx_failed;
if (spider_net_init_chain(card, &card->rx_chain,
- card->descr + tx_descriptors,
- PCI_DMA_FROMDEVICE, rx_descriptors))
+ card->descr + card->rx_desc,
+ PCI_DMA_FROMDEVICE, card->rx_desc))
goto alloc_rx_failed;
/* allocate rx skbs */
@@ -2006,6 +2005,9 @@ spider_net_setup_netdev(struct spider_ne
card->options.rx_csum = SPIDER_NET_RX_CSUM_DEFAULT;
+ card->tx_desc = tx_descriptors;
+ card->rx_desc = rx_descriptors;
+
spider_net_setup_netdev_ops(netdev);
netdev->features = NETIF_F_HW_CSUM | NETIF_F_LLTX;
Index: linux-2.6.18-rc2/drivers/net/spider_net.h
===================================================================
--- linux-2.6.18-rc2.orig/drivers/net/spider_net.h 2006-08-03
12:03:01.000000000 -0500
+++ linux-2.6.18-rc2/drivers/net/spider_net.h 2006-08-04
14:48:26.000000000 -0500
@@ -441,6 +441,9 @@ struct spider_net_card {
/* for ethtool */
int msg_enable;
+ int rx_desc;
+ int tx_desc;
+
struct spider_net_descr descr[0];
};
Index: linux-2.6.18-rc2/drivers/net/spider_net_ethtool.c
===================================================================
--- linux-2.6.18-rc2.orig/drivers/net/spider_net_ethtool.c 2006-08-03
12:03:01.000000000 -0500
+++ linux-2.6.18-rc2/drivers/net/spider_net_ethtool.c 2006-08-04
15:00:22.000000000 -0500
@@ -130,6 +130,18 @@ spider_net_ethtool_set_tx_csum(struct ne
return 0;
}
+static void
+spider_net_ethtool_get_ringparam(struct net_device *netdev,
+ struct ethtool_ringparam *ering)
+{
+ struct spider_net_card *card = netdev->priv;
+
+ ering->tx_max_pending = SPIDER_NET_TX_DESCRIPTORS_MAX;
+ ering->tx_pending = card->tx_desc;
+ ering->rx_max_pending = SPIDER_NET_RX_DESCRIPTORS_MAX;
+ ering->rx_pending = card->rx_desc;
+}
+
struct ethtool_ops spider_net_ethtool_ops = {
.get_settings = spider_net_ethtool_get_settings,
.get_drvinfo = spider_net_ethtool_get_drvinfo,
@@ -141,5 +153,6 @@ struct ethtool_ops spider_net_ethtool_op
.set_rx_csum = spider_net_ethtool_set_rx_csum,
.get_tx_csum = spider_net_ethtool_get_tx_csum,
.set_tx_csum = spider_net_ethtool_set_tx_csum,
+ .get_ringparam = spider_net_ethtool_get_ringparam,
};
--
Jim Lewis
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Patch to add ethtool -g to Spidernet network driver
2006-08-05 15:36 Patch to add ethtool -g to Spidernet network driver Jim Lewis
@ 2006-08-14 18:02 ` Jeff Garzik
2006-08-14 18:14 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2006-08-14 18:02 UTC (permalink / raw)
To: jim; +Cc: netdev, Andrew Morton
Jim Lewis wrote:
>
> This patch adds ethtool -g (show ring sizes) support to the Spidernet
> network driver.
>
> Signed-off-by: James K Lewis <jklewis@us.ibm.com>
ACK, but does not apply:
Applying 'Patch to add ethtool -g to Spidernet network driver'
error: patch fragment without header at line 13: @@ -1612,13 +1612,12 @@
spider_net_open(struct net_device *netde
error: patch fragment without header at line 31: @@ -2006,6 +2005,9 @@
spider_net_setup_netdev(struct spider_ne
error: patch fragment without header at line 47: @@ -441,6 +441,9 @@
struct spider_net_card {
error: patch fragment without header at line 63: @@ -130,6 +130,18 @@
spider_net_ethtool_set_tx_csum(struct ne
error: patch fragment without header at line 82: @@ -141,5 +153,6 @@
struct ethtool_ops spider_net_ethtool_op
fatal: No changes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Patch to add ethtool -g to Spidernet network driver
2006-08-14 18:02 ` Jeff Garzik
@ 2006-08-14 18:14 ` Andrew Morton
2006-08-14 18:25 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2006-08-14 18:14 UTC (permalink / raw)
To: Jeff Garzik; +Cc: jim, netdev
On Mon, 14 Aug 2006 14:02:26 -0400
Jeff Garzik <jgarzik@pobox.com> wrote:
> Jim Lewis wrote:
> >
> > This patch adds ethtool -g (show ring sizes) support to the Spidernet
> > network driver.
> >
> > Signed-off-by: James K Lewis <jklewis@us.ibm.com>
>
> ACK, but does not apply:
I added it to rc4-mm1. I probably fixed it up by hand - I forget - it
happens so often :(
I have a really large pile of patches to send out to the subsystem
maintainers, so this'll be coming back at you soon via that route.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Patch to add ethtool -g to Spidernet network driver
2006-08-14 18:14 ` Andrew Morton
@ 2006-08-14 18:25 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2006-08-14 18:25 UTC (permalink / raw)
To: Andrew Morton; +Cc: jim, netdev
Andrew Morton wrote:
> I have a really large pile of patches to send out to the subsystem
> maintainers, so this'll be coming back at you soon via that route.
Great, I had hoped that might be the case.
Thanks,
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-08-14 18:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-05 15:36 Patch to add ethtool -g to Spidernet network driver Jim Lewis
2006-08-14 18:02 ` Jeff Garzik
2006-08-14 18:14 ` Andrew Morton
2006-08-14 18:25 ` Jeff Garzik
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).