* [PATCH V2 0/1] DSA: Enable cascading for multiple 6131 chips
From: Barry Grussling @ 2011-06-21 14:55 UTC (permalink / raw)
To: netdev; +Cc: buytenh, Barry Grussling
I found that the Cascade Port field of the 6131 was always set
to 0xe which results in from_cpu frames being discarded. This
means cascading style multi chip DSA configuration didn't work
for me. I am a little confused by this since we configure the
DSA routing table a little further down in the function.
It seems like we need to enable cascading by setting the
Cascade Port field to 0xf if we are in a multi-chip scenario.
V2 changes are for whitespace to meet coding style.
Barry Grussling (1):
Allow cascading to work with 6131 chip
net/dsa/mv88e6131.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
^ permalink raw reply
* [PATCH V2 1/1] Allow cascading to work with 6131 chip
From: Barry Grussling @ 2011-06-21 14:55 UTC (permalink / raw)
To: netdev; +Cc: buytenh, Barry Grussling
In-Reply-To: <cover.1308667895.git.barry@grussling.com>
---
net/dsa/mv88e6131.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 45f7411..dc43419 100644
--- a/net/dsa/mv88e6131.c
+++ b/net/dsa/mv88e6131.c
@@ -118,10 +118,14 @@ static int mv88e6131_setup_global(struct dsa_switch *ds)
REG_WRITE(REG_GLOBAL, 0x1a, (dsa_upstream_port(ds) * 0x1100) | 0x00f0);
/*
- * Disable cascade port functionality, and set the switch's
+ * Disable cascade port functionality unless this device is
+ * used in a cascade configuration, and set the switch's
* DSA device number.
*/
- REG_WRITE(REG_GLOBAL, 0x1c, 0xe000 | (ds->index & 0x1f));
+ if (ds->dst->pd->nr_chips > 1)
+ REG_WRITE(REG_GLOBAL, 0x1c, 0xf000 | (ds->index & 0x1f));
+ else
+ REG_WRITE(REG_GLOBAL, 0x1c, 0xe000 | (ds->index & 0x1f));
/*
* Send all frames with destination addresses matching
--
1.7.0.4
^ permalink raw reply related
* Re: RFT: virtio_net: limit xmit polling
From: Tom Lendacky @ 2011-06-21 15:23 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Krishna Kumar2, habanero-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
lguest-uLR06cmDAlY/bJ5BZ2RsiQ, Shirley Ma,
kvm-u79uwXL29TY76Z2rM5mHXA, Carsten Otte,
linux-s390-u79uwXL29TY76Z2rM5mHXA, Heiko Carstens,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
steved-r/Jw6+rmf7HQT0dZR+AlfA, Christian Borntraeger,
netdev-u79uwXL29TY76Z2rM5mHXA, Martin Schwidefsky,
linux390-tA70FqPdS9bQT0dZR+AlfA, roprabhu-FYB4Gu1CFyUAvxtiuMwx3w
In-Reply-To: <20110619102700.GA11198-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Sunday, June 19, 2011 05:27:00 AM Michael S. Tsirkin wrote:
> OK, different people seem to test different trees. In the hope to get
> everyone on the same page, I created several variants of this patch so
> they can be compared. Whoever's interested, please check out the
> following, and tell me how these compare:
I'm in the process of testing these patches. Base and v0 are complete
and v1 is near complete with v2 to follow. I'm testing with a variety
of TCP_RR and TCP_STREAM/TCP_MAERTS tests involving local guest-to-guest
tests and remote host-to-guest tests. I'll post the results in the next
day or two when the tests finish.
Thanks,
Tom
>
> kernel:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
>
> virtio-net-limit-xmit-polling/base - this is net-next baseline to test
> against virtio-net-limit-xmit-polling/v0 - fixes checks on out of capacity
> virtio-net-limit-xmit-polling/v1 - previous revision of the patch
> this does xmit,free,xmit,2*free,free
> virtio-net-limit-xmit-polling/v2 - new revision of the patch
> this does free,xmit,2*free,free
>
> There's also this on top:
> virtio-net-limit-xmit-polling/v3 -> don't delay avail index update
> I don't think it's important to test this one, yet
>
> Userspace to use: event index work is not yet merged upstream
> so the revision to use is still this:
> git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu-kvm.git
> virtio-net-event-idx-v3
^ permalink raw reply
* Re: [Xen-devel] [PATCH net-next 4/5] xen: convert to 64 bit stats interface
From: Stephen Hemminger @ 2011-06-21 15:29 UTC (permalink / raw)
To: Ian Campbell
Cc: davem@davemloft.net, Jeremy Fitzhardinge, netdev@vger.kernel.org,
xen-devel@lists.xensource.com
In-Reply-To: <1308665154.6920.46.camel@zakaz.uk.xensource.com>
On Tue, 21 Jun 2011 15:05:54 +0100
Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Mon, 2011-06-20 at 21:35 +0100, Stephen Hemminger wrote:
> > Convert xen driver to 64 bit statistics interface.
> > Use stats_sync to ensure that 64 bit update is read atomically
> > on 32 bit platform. Put hot statistics into per-cpu table.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> Thanks Stephen.
>
> > @@ -867,12 +882,13 @@ static int handle_incoming_queue(struct
> > if (checksum_setup(dev, skb)) {
> > kfree_skb(skb);
> > packets_dropped++;
> > - dev->stats.rx_errors++;
>
> Why is this dropped? We should be counting these somehow, I think.
>
> [...]
>
> > >From shemminger@vyatta.com Mon Jun 20 13:36:03 2011
> > Message-Id: <20110620203603.019928129@vyatta.com>
> > User-Agent: quilt/0.48-1
> > Date: Mon, 20 Jun 2011 13:35:11 -0700
> > From: Stephen Hemminger <shemminger@vyatta.com>
> > To: davem@davemloft.net
> > Cc: netdev@vger.kernel.org
> > Subject: [PATCH net-next 5/5] ifb: convert to 64 bit stats
> > References: <20110620203506.363818794@vyatta.com>
> > Content-Disposition: inline; filename=ifb-stats64.patch
> >
> > Convert input functional block device to use 64 bit stats.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> >
> > ---
> > v2 - add stats_sync
> >
> >
> > --- a/drivers/net/ifb.c 2011-06-09 14:39:25.000000000 -0700
> > +++ b/drivers/net/ifb.c 2011-06-20 13:30:30.135992612 -0700
>
> This entire patch was appended in the mail I got -- something up with
> your scripting?
Bad mbox file to quilt, merged two patches
^ permalink raw reply
* Re: [Xen-devel] [PATCH net-next 4/5] xen: convert to 64 bit stats interface
From: Stephen Hemminger @ 2011-06-21 15:35 UTC (permalink / raw)
To: Ian Campbell
Cc: davem@davemloft.net, Jeremy Fitzhardinge, netdev@vger.kernel.org,
xen-devel@lists.xensource.com
In-Reply-To: <1308665154.6920.46.camel@zakaz.uk.xensource.com>
Convert xen driver to 64 bit statistics interface.
Use stats_sync to ensure that 64 bit update is read atomically on 32 bit platform.
Put hot statistics into per-cpu table.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
v2 - add stats_sync and per-cpu
v2.1 - keep rx_errors on checksum error
--- a/drivers/net/xen-netfront.c 2011-06-20 14:50:01.271989938 -0700
+++ b/drivers/net/xen-netfront.c 2011-06-21 08:33:12.851953760 -0700
@@ -70,6 +70,14 @@ struct netfront_cb {
#define NET_RX_RING_SIZE __CONST_RING_SIZE(xen_netif_rx, PAGE_SIZE)
#define TX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
+struct netfront_stats {
+ u64 rx_packets;
+ u64 tx_packets;
+ u64 rx_bytes;
+ u64 tx_bytes;
+ struct u64_stats_sync syncp;
+};
+
struct netfront_info {
struct list_head list;
struct net_device *netdev;
@@ -122,6 +130,8 @@ struct netfront_info {
struct mmu_update rx_mmu[NET_RX_RING_SIZE];
/* Statistics */
+ struct netfront_stats __percpu *stats;
+
unsigned long rx_gso_checksum_fixup;
};
@@ -468,6 +478,7 @@ static int xennet_start_xmit(struct sk_b
{
unsigned short id;
struct netfront_info *np = netdev_priv(dev);
+ struct netfront_stats *stats = this_cpu_ptr(np->stats);
struct xen_netif_tx_request *tx;
struct xen_netif_extra_info *extra;
char *data = skb->data;
@@ -552,8 +563,10 @@ static int xennet_start_xmit(struct sk_b
if (notify)
notify_remote_via_irq(np->netdev->irq);
- dev->stats.tx_bytes += skb->len;
- dev->stats.tx_packets++;
+ u64_stats_update_begin(&stats->syncp);
+ stats->tx_bytes += skb->len;
+ stats->tx_packets++;
+ u64_stats_update_end(&stats->syncp);
/* Note: It is not safe to access skb after xennet_tx_buf_gc()! */
xennet_tx_buf_gc(dev);
@@ -847,6 +860,8 @@ out:
static int handle_incoming_queue(struct net_device *dev,
struct sk_buff_head *rxq)
{
+ struct netfront_info *np = netdev_priv(dev);
+ struct netfront_stats *stats = this_cpu_ptr(np->stats);
int packets_dropped = 0;
struct sk_buff *skb;
@@ -871,8 +886,10 @@ static int handle_incoming_queue(struct
continue;
}
- dev->stats.rx_packets++;
- dev->stats.rx_bytes += skb->len;
+ u64_stats_update_begin(&stats->syncp);
+ stats->rx_packets++;
+ stats->rx_bytes += skb->len;
+ u64_stats_update_end(&stats->syncp);
/* Pass it up. */
netif_receive_skb(skb);
@@ -1034,6 +1051,38 @@ static int xennet_change_mtu(struct net_
return 0;
}
+static struct rtnl_link_stats64 *xennet_get_stats64(struct net_device *dev,
+ struct rtnl_link_stats64 *tot)
+{
+ struct netfront_info *np = netdev_priv(dev);
+ int cpu;
+
+ for_each_possible_cpu(cpu) {
+ struct netfront_stats *stats = per_cpu_ptr(np->stats, cpu);
+ u64 rx_packets, rx_bytes, tx_packets, tx_bytes;
+ unsigned int start;
+
+ do {
+ start = u64_stats_fetch_begin_bh(&stats->syncp);
+
+ rx_packets = stats->rx_packets;
+ tx_packets = stats->tx_packets;
+ rx_bytes = stats->rx_bytes;
+ tx_bytes = stats->tx_bytes;
+ } while (u64_stats_fetch_retry_bh(&stats->syncp, start));
+
+ tot->rx_packets += rx_packets;
+ tot->tx_packets += tx_packets;
+ tot->rx_bytes += rx_bytes;
+ tot->tx_bytes += tx_bytes;
+ }
+
+ tot->rx_errors = dev->stats.rx_errors;
+ tot->tx_dropped = dev->stats.tx_dropped;
+
+ return tot;
+}
+
static void xennet_release_tx_bufs(struct netfront_info *np)
{
struct sk_buff *skb;
@@ -1182,6 +1231,7 @@ static const struct net_device_ops xenne
.ndo_stop = xennet_close,
.ndo_start_xmit = xennet_start_xmit,
.ndo_change_mtu = xennet_change_mtu,
+ .ndo_get_stats64 = xennet_get_stats64,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_fix_features = xennet_fix_features,
@@ -1216,6 +1266,11 @@ static struct net_device * __devinit xen
np->rx_refill_timer.data = (unsigned long)netdev;
np->rx_refill_timer.function = rx_refill_timeout;
+ err = -ENOMEM;
+ np->stats = alloc_percpu(struct netfront_stats);
+ if (np->stats == NULL)
+ goto exit;
+
/* Initialise tx_skbs as a free chain containing every entry. */
np->tx_skb_freelist = 0;
for (i = 0; i < NET_TX_RING_SIZE; i++) {
@@ -1234,7 +1289,7 @@ static struct net_device * __devinit xen
&np->gref_tx_head) < 0) {
printk(KERN_ALERT "#### netfront can't alloc tx grant refs\n");
err = -ENOMEM;
- goto exit;
+ goto exit_free_stats;
}
/* A grant for every rx ring slot */
if (gnttab_alloc_grant_references(RX_MAX_TARGET,
@@ -1270,6 +1325,8 @@ static struct net_device * __devinit xen
exit_free_tx:
gnttab_free_grant_references(np->gref_tx_head);
+ exit_free_stats:
+ free_percpu(np->stats);
exit:
free_netdev(netdev);
return ERR_PTR(err);
@@ -1869,6 +1926,8 @@ static int __devexit xennet_remove(struc
xennet_sysfs_delif(info->netdev);
+ free_percpu(info->stats);
+
free_netdev(info->netdev);
return 0;
^ permalink raw reply
* Re: [Xen-devel] [PATCH net-next 4/5] xen: convert to 64 bit stats interface
From: Ian Campbell @ 2011-06-21 15:38 UTC (permalink / raw)
To: Stephen Hemminger
Cc: davem@davemloft.net, Jeremy Fitzhardinge, netdev@vger.kernel.org,
xen-devel@lists.xensource.com
In-Reply-To: <20110621083531.00442d7f@nehalam.ftrdhcpuser.net>
On Tue, 2011-06-21 at 16:35 +0100, Stephen Hemminger wrote:
> Convert xen driver to 64 bit statistics interface.
> Use stats_sync to ensure that 64 bit update is read atomically on 32 bit platform.
> Put hot statistics into per-cpu table.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> ---
> v2 - add stats_sync and per-cpu
> v2.1 - keep rx_errors on checksum error
Thanks. Looks good to me from the Xen side.
Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> --- a/drivers/net/xen-netfront.c 2011-06-20 14:50:01.271989938 -0700
> +++ b/drivers/net/xen-netfront.c 2011-06-21 08:33:12.851953760 -0700
> @@ -70,6 +70,14 @@ struct netfront_cb {
> #define NET_RX_RING_SIZE __CONST_RING_SIZE(xen_netif_rx, PAGE_SIZE)
> #define TX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
>
> +struct netfront_stats {
> + u64 rx_packets;
> + u64 tx_packets;
> + u64 rx_bytes;
> + u64 tx_bytes;
> + struct u64_stats_sync syncp;
> +};
> +
> struct netfront_info {
> struct list_head list;
> struct net_device *netdev;
> @@ -122,6 +130,8 @@ struct netfront_info {
> struct mmu_update rx_mmu[NET_RX_RING_SIZE];
>
> /* Statistics */
> + struct netfront_stats __percpu *stats;
> +
> unsigned long rx_gso_checksum_fixup;
> };
>
> @@ -468,6 +478,7 @@ static int xennet_start_xmit(struct sk_b
> {
> unsigned short id;
> struct netfront_info *np = netdev_priv(dev);
> + struct netfront_stats *stats = this_cpu_ptr(np->stats);
> struct xen_netif_tx_request *tx;
> struct xen_netif_extra_info *extra;
> char *data = skb->data;
> @@ -552,8 +563,10 @@ static int xennet_start_xmit(struct sk_b
> if (notify)
> notify_remote_via_irq(np->netdev->irq);
>
> - dev->stats.tx_bytes += skb->len;
> - dev->stats.tx_packets++;
> + u64_stats_update_begin(&stats->syncp);
> + stats->tx_bytes += skb->len;
> + stats->tx_packets++;
> + u64_stats_update_end(&stats->syncp);
>
> /* Note: It is not safe to access skb after xennet_tx_buf_gc()! */
> xennet_tx_buf_gc(dev);
> @@ -847,6 +860,8 @@ out:
> static int handle_incoming_queue(struct net_device *dev,
> struct sk_buff_head *rxq)
> {
> + struct netfront_info *np = netdev_priv(dev);
> + struct netfront_stats *stats = this_cpu_ptr(np->stats);
> int packets_dropped = 0;
> struct sk_buff *skb;
>
> @@ -871,8 +886,10 @@ static int handle_incoming_queue(struct
> continue;
> }
>
> - dev->stats.rx_packets++;
> - dev->stats.rx_bytes += skb->len;
> + u64_stats_update_begin(&stats->syncp);
> + stats->rx_packets++;
> + stats->rx_bytes += skb->len;
> + u64_stats_update_end(&stats->syncp);
>
> /* Pass it up. */
> netif_receive_skb(skb);
> @@ -1034,6 +1051,38 @@ static int xennet_change_mtu(struct net_
> return 0;
> }
>
> +static struct rtnl_link_stats64 *xennet_get_stats64(struct net_device *dev,
> + struct rtnl_link_stats64 *tot)
> +{
> + struct netfront_info *np = netdev_priv(dev);
> + int cpu;
> +
> + for_each_possible_cpu(cpu) {
> + struct netfront_stats *stats = per_cpu_ptr(np->stats, cpu);
> + u64 rx_packets, rx_bytes, tx_packets, tx_bytes;
> + unsigned int start;
> +
> + do {
> + start = u64_stats_fetch_begin_bh(&stats->syncp);
> +
> + rx_packets = stats->rx_packets;
> + tx_packets = stats->tx_packets;
> + rx_bytes = stats->rx_bytes;
> + tx_bytes = stats->tx_bytes;
> + } while (u64_stats_fetch_retry_bh(&stats->syncp, start));
> +
> + tot->rx_packets += rx_packets;
> + tot->tx_packets += tx_packets;
> + tot->rx_bytes += rx_bytes;
> + tot->tx_bytes += tx_bytes;
> + }
> +
> + tot->rx_errors = dev->stats.rx_errors;
> + tot->tx_dropped = dev->stats.tx_dropped;
> +
> + return tot;
> +}
> +
> static void xennet_release_tx_bufs(struct netfront_info *np)
> {
> struct sk_buff *skb;
> @@ -1182,6 +1231,7 @@ static const struct net_device_ops xenne
> .ndo_stop = xennet_close,
> .ndo_start_xmit = xennet_start_xmit,
> .ndo_change_mtu = xennet_change_mtu,
> + .ndo_get_stats64 = xennet_get_stats64,
> .ndo_set_mac_address = eth_mac_addr,
> .ndo_validate_addr = eth_validate_addr,
> .ndo_fix_features = xennet_fix_features,
> @@ -1216,6 +1266,11 @@ static struct net_device * __devinit xen
> np->rx_refill_timer.data = (unsigned long)netdev;
> np->rx_refill_timer.function = rx_refill_timeout;
>
> + err = -ENOMEM;
> + np->stats = alloc_percpu(struct netfront_stats);
> + if (np->stats == NULL)
> + goto exit;
> +
> /* Initialise tx_skbs as a free chain containing every entry. */
> np->tx_skb_freelist = 0;
> for (i = 0; i < NET_TX_RING_SIZE; i++) {
> @@ -1234,7 +1289,7 @@ static struct net_device * __devinit xen
> &np->gref_tx_head) < 0) {
> printk(KERN_ALERT "#### netfront can't alloc tx grant refs\n");
> err = -ENOMEM;
> - goto exit;
> + goto exit_free_stats;
> }
> /* A grant for every rx ring slot */
> if (gnttab_alloc_grant_references(RX_MAX_TARGET,
> @@ -1270,6 +1325,8 @@ static struct net_device * __devinit xen
>
> exit_free_tx:
> gnttab_free_grant_references(np->gref_tx_head);
> + exit_free_stats:
> + free_percpu(np->stats);
> exit:
> free_netdev(netdev);
> return ERR_PTR(err);
> @@ -1869,6 +1926,8 @@ static int __devexit xennet_remove(struc
>
> xennet_sysfs_delif(info->netdev);
>
> + free_percpu(info->stats);
> +
> free_netdev(info->netdev);
>
> return 0;
>
^ permalink raw reply
* TCP new-reno support?
From: Ben Greear @ 2011-06-21 15:50 UTC (permalink / raw)
To: netdev
I see a large number of TCP congestion algorithms supported, but
nothing that explicitly says newreno. Is it actually supported?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH iproute2] ss: fix autobound filter
From: Stephen Hemminger @ 2011-06-21 15:54 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
In-Reply-To: <1308316911.2780.6.camel@edumazet-laptop>
On Fri, 17 Jun 2011 15:21:51 +0200
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Fixes following error. We currently provide garbage data to kernel, that
> can abort the validation process or produce unexpected results.
>
> $ ss -a autobound
> State Recv-Q Send-Q Local Address:Port Peer Address:Port
> TCPDIAG answers: Invalid argument
>
> After patch:
>
> $ misc/ss -a autobound
> State Recv-Q Send-Q Local Address:Port Peer Address:Port
> LISTEN 0 128 *:44624 *:*
> ESTAB 0 0 192.168.1.21:47141 74.125.79.109:imaps
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied thanks
^ permalink raw reply
* Dear Webmail Subscriber
From: WEBMAIL MANAGEMENT SERVICE @ 2011-06-21 12:18 UTC (permalink / raw)
Dear Webmail Subscribers,
webmail service has upgraded its security level to prevent hackers,
viruses and spywares from getting into your mailbox.
In order to complete this security update, We encourage you to clik on
this link just to upgrad your webmail account
https://spreadsheets.google.com/spreadsheet/viewform?formkey=dGl6cmV1WEFSYTdJTU9SM0l2TkNtSnc6MQ
We hope you'll enjoy our approach to webmail service.
Please don't reply directly to this automatically-generated e-mail message.
Sincerely,
WEBMAIL MANAGEMENT SERVICE!
^ permalink raw reply
* Re: [PATCH] netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
From: Randy Dunlap @ 2011-06-21 16:12 UTC (permalink / raw)
To: WANG Cong, Ben Hutchings; +Cc: netdev, Andrew Morton, davem, hilld
In-Reply-To: <itq425$lqb$1@dough.gmane.org>
On Tue, 21 Jun 2011 12:50:14 +0000 (UTC) WANG Cong wrote:
> On Mon, 20 Jun 2011 21:25:04 -0700, Randy Dunlap wrote:
>
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> >
> > When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in
> > netconsole:
> >
> > drivers/built-in.o: In function `drop_netconsole_target':
> > netconsole.c:(.text+0x1a100f): undefined reference to `config_item_put'
> > drivers/built-in.o: In function `make_netconsole_target':
> > netconsole.c:(.text+0x1a10b9): undefined reference to
> > `config_item_init_type_name' drivers/built-in.o: In function
> > `write_msg': netconsole.c:(.text+0x1a11a4): undefined reference to
> > `config_item_get' netconsole.c:(.text+0x1a1211): undefined reference to
> > `config_item_put' drivers/built-in.o: In function
> > `netconsole_netdev_event': netconsole.c:(.text+0x1a12cc): undefined
> > reference to `config_item_put' netconsole.c:(.text+0x1a12ec): undefined
> > reference to `config_item_get' netconsole.c:(.text+0x1a1366): undefined
> > reference to `config_item_put' drivers/built-in.o: In function
> > `init_netconsole': netconsole.c:(.init.text+0x953a): undefined reference
> > to `config_group_init' netconsole.c:(.init.text+0x9560): undefined
> > reference to `configfs_register_subsystem' drivers/built-in.o: In
> > function `dynamic_netconsole_exit': netconsole.c:(.exit.text+0x809):
> > undefined reference to `configfs_unregister_subsystem'
> >
> > so make NETCONSOLE_DYNAMIC require CONFIGFS_FS=y to fix the build
> > errors.
> >
> > This is one possible fix.
> > Fixes https://bugzilla.kernel.org/show_bug.cgi?id=37992
> >
> > Reported-by: David Hill <hilld@binarystorm.net> Signed-off-by: Randy
> > Dunlap <randy.dunlap@oracle.com> ---
> > drivers/net/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- lnx-30-rc3.orig/drivers/net/Kconfig +++
> > lnx-30-rc3/drivers/net/Kconfig
> > @@ -3416,7 +3416,7 @@ config NETCONSOLE
> >
> > config NETCONSOLE_DYNAMIC
> > bool "Dynamic reconfiguration of logging targets"
> > - depends on NETCONSOLE && SYSFS && CONFIGFS_FS
> > + depends on NETCONSOLE
> > && SYSFS && CONFIGFS_FS=y
>
> I recall someone already fixed this by adding "select CONFIGFS_FS",
> who removed it again... :-/
Hi,
Thanks for the reminder. I'll try Ben Hutchings' suggestion.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: TCP new-reno support?
From: Alexander Zimmermann @ 2011-06-21 16:32 UTC (permalink / raw)
To: Ben Greear; +Cc: netdev
In-Reply-To: <4E00BDAB.1040309@candelatech.com>
[-- Attachment #1: Type: text/plain, Size: 958 bytes --]
Hi,
Am 21.06.2011 um 17:50 schrieb Ben Greear:
> I see a large number of TCP congestion algorithms supported, but
> nothing that explicitly says newreno.
It's implicit :-)
> Is it actually supported?
tcp_congestion_control=reno
tcp_dsack=0
tcp_fack=0
tcp_sack=0
tcp_frto=0
then, you get NewReno. And, yes, it's not possible to get Reno
Alex
>
> Thanks,
> Ben
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc http://www.candelatech.com
>
> --
> 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
//
// Dipl.-Inform. Alexander Zimmermann
// Department of Computer Science, Informatik 4
// RWTH Aachen University
// Ahornstr. 55, 52056 Aachen, Germany
// phone: (49-241) 80-21422, fax: (49-241) 80-22222
// email: zimmermann@cs.rwth-aachen.de
// web: http://www.umic-mesh.net
//
[-- Attachment #2: Signierter Teil der Nachricht --]
[-- Type: application/pgp-signature, Size: 243 bytes --]
^ permalink raw reply
* Re: TCP new-reno support?
From: Ben Greear @ 2011-06-21 16:35 UTC (permalink / raw)
To: Alexander Zimmermann; +Cc: netdev
In-Reply-To: <A6200100-A147-481C-8230-9782822EA1F7@comsys.rwth-aachen.de>
On 06/21/2011 09:32 AM, Alexander Zimmermann wrote:
> Hi,
>
> Am 21.06.2011 um 17:50 schrieb Ben Greear:
>
>> I see a large number of TCP congestion algorithms supported, but
>> nothing that explicitly says newreno.
>
> It's implicit :-)
>
>> Is it actually supported?
>
> tcp_congestion_control=reno
> tcp_dsack=0
> tcp_fack=0
> tcp_sack=0
> tcp_frto=0
>
> then, you get NewReno. And, yes, it's not possible to get Reno
Thanks!
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* [RFC 3/7] ixgbe: use netdev_irqname
From: Stephen Hemminger @ 2011-06-21 17:05 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20110621170541.309890798@vyatta.com>
[-- Attachment #1: ixgbe-use-irq-name.patch --]
[-- Type: text/plain, Size: 1563 bytes --]
New standard function for generating irq names.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/ixgbe/ixgbe_main.c 2011-06-21 09:30:35.327952251 -0700
+++ b/drivers/net/ixgbe/ixgbe_main.c 2011-06-21 09:32:33.483952184 -0700
@@ -2352,20 +2352,19 @@ static int ixgbe_request_msix_irqs(struc
struct ixgbe_q_vector *q_vector = adapter->q_vector[vector];
handler = SET_HANDLER(q_vector);
- if (handler == &ixgbe_msix_clean_rx) {
- snprintf(q_vector->name, sizeof(q_vector->name) - 1,
- "%s-%s-%d", netdev->name, "rx", ri++);
- } else if (handler == &ixgbe_msix_clean_tx) {
- snprintf(q_vector->name, sizeof(q_vector->name) - 1,
- "%s-%s-%d", netdev->name, "tx", ti++);
- } else if (handler == &ixgbe_msix_clean_many) {
- snprintf(q_vector->name, sizeof(q_vector->name) - 1,
- "%s-%s-%d", netdev->name, "TxRx", ri++);
+ if (handler == &ixgbe_msix_clean_rx)
+ netdev_irqname(q_vector->name, sizeof(q_vector->name),
+ netdev, NETIF_IRQ_RX, ri++);
+ else if (handler == &ixgbe_msix_clean_tx)
+ netdev_irqname(q_vector->name, sizeof(q_vector->name),
+ netdev, NETIF_IRQ_TX, ti++);
+ else if (handler == &ixgbe_msix_clean_many) {
+ netdev_irqname(q_vector->name, sizeof(q_vector->name),
+ netdev, NETIF_IRQ_TXRX, ri++);
ti++;
- } else {
- /* skip this unused q_vector */
+ } else /* skip this unused q_vector */
continue;
- }
+
err = request_irq(adapter->msix_entries[vector].vector,
handler, 0, q_vector->name,
q_vector);
^ permalink raw reply
* [RFC 0/7] network device irq naming
From: Stephen Hemminger @ 2011-06-21 17:05 UTC (permalink / raw)
To: davem; +Cc: netdev
This is a proposal for a wrapper routine to cause
network devices to have standard convention for IRQ naming.
Includes a subset of devices to show how it would be used
and some of the existing problems.
^ permalink raw reply
* [RFC 1/7] netdev: add standardized irq naming function
From: Stephen Hemminger @ 2011-06-21 17:05 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20110621170541.309890798@vyatta.com>
[-- Attachment #1: netdev-irq-name.patch --]
[-- Type: text/plain, Size: 1561 bytes --]
To force driver developers to use a standard convention for naming
network device IRQ's, provide a standardized method for creating
the name.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/include/linux/netdevice.h 2011-06-21 08:58:32.207953328 -0700
+++ b/include/linux/netdevice.h 2011-06-21 09:12:12.155952869 -0700
@@ -2631,6 +2631,46 @@ static inline const char *netdev_name(co
return dev->name;
}
+/* function bits for netdev_irqname */
+#define NETIF_IRQ_TX 1
+#define NETIF_IRQ_RX 2
+#define NETIF_IRQ_TXRX 3
+#define NETIF_IRQ_OTHER 0 /* none of the above */
+
+/**
+ * netdev_irqname - generate name for irq
+ * @buf: space to store result
+ * @buflen: sizeof buf
+ * @dev: network device
+ * @queue: assoctiated network queue
+ * @function: function of irq
+ *
+ * Format a IRQ name according to standard convention to be passed
+ * to request_irq().
+ */
+static inline const char *netdev_irqname(char *buf, size_t buflen,
+ const struct net_device *dev,
+ unsigned queue,
+ unsigned function)
+{
+ switch (function) {
+ case NETIF_IRQ_TX:
+ snprintf(buf, buflen, "%s-tx-%u", dev->name, queue);
+ break;
+ case NETIF_IRQ_RX:
+ snprintf(buf, buflen, "%s-rx-%u", dev->name, queue);
+ break;
+ case NETIF_IRQ_TXRX:
+ snprintf(buf, buflen, "%s-%u", dev->name, queue);
+ break;
+ default:
+ snprintf(buf, buflen, "%s", dev->name);
+ }
+
+ return buf;
+}
+
+
extern int netdev_printk(const char *level, const struct net_device *dev,
const char *format, ...)
__attribute__ ((format (printf, 3, 4)));
^ permalink raw reply
* [RFC 6/7] niu: use netdev_irqname
From: Stephen Hemminger @ 2011-06-21 17:05 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20110621170541.309890798@vyatta.com>
[-- Attachment #1: niu-use-irqname.patch --]
[-- Type: text/plain, Size: 841 bytes --]
This device also has some other IRQ's unrelated to rings
which are named with another convention.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/niu.c 2011-06-21 09:57:00.739951363 -0700
+++ b/drivers/net/niu.c 2011-06-21 09:59:22.683951282 -0700
@@ -6048,11 +6048,12 @@ static void niu_set_irq_name(struct niu
for (i = 0; i < np->num_ldg - j; i++) {
if (i < np->num_rx_rings)
- sprintf(np->irq_name[i+j], "%s-rx-%d",
- np->dev->name, i);
+ netdev_irqname(np->irq_name[i+j], IFNAMSIZ+6,
+ np->dev, NETIF_IRQ_RX, i);
else if (i < np->num_tx_rings + np->num_rx_rings)
- sprintf(np->irq_name[i+j], "%s-tx-%d", np->dev->name,
- i - np->num_rx_rings);
+ netdev_irqname(np->irq_name[i+j], IFNAMSIZ+6,
+ np->dev, NETIF_IRQ_TX,
+ i - np->num_rx_rings);
}
}
^ permalink raw reply
* [RFC 2/7] igb: use netdev_irqname
From: Stephen Hemminger @ 2011-06-21 17:05 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20110621170541.309890798@vyatta.com>
[-- Attachment #1: igb-use-irq-name.patch --]
[-- Type: text/plain, Size: 1563 bytes --]
This is an example of usage of netdev_irqname to create standard
IRQ names. There is a change of behavior, the driver will now skip
unused IRQ vectors (similar to ixgbe).
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/igb/igb_main.c 2011-06-21 09:12:49.567952849 -0700
+++ b/drivers/net/igb/igb_main.c 2011-06-21 09:29:48.211952277 -0700
@@ -920,16 +920,20 @@ static int igb_request_msix(struct igb_a
q_vector->itr_register = hw->hw_addr + E1000_EITR(vector);
if (q_vector->rx_ring && q_vector->tx_ring)
- sprintf(q_vector->name, "%s-TxRx-%u", netdev->name,
- q_vector->rx_ring->queue_index);
+ netdev_irqname(q_vector->name, sizeof(q_vector->name),
+ netdev, NETIF_IRQ_TXRX,
+ q_vector->rx_ring->queue_index);
else if (q_vector->tx_ring)
- sprintf(q_vector->name, "%s-tx-%u", netdev->name,
- q_vector->tx_ring->queue_index);
+ netdev_irqname(q_vector->name, sizeof(q_vector->name),
+ netdev, NETIF_IRQ_TX,
+ q_vector->tx_ring->queue_index);
else if (q_vector->rx_ring)
- sprintf(q_vector->name, "%s-rx-%u", netdev->name,
- q_vector->rx_ring->queue_index);
- else
- sprintf(q_vector->name, "%s-unused", netdev->name);
+ netdev_irqname(q_vector->name, sizeof(q_vector->name),
+ netdev, NETIF_IRQ_RX,
+ q_vector->rx_ring->queue_index);
+ else /* skip this unused q_vector */
+ continue;
+
err = request_irq(adapter->msix_entries[vector].vector,
igb_msix_ring, 0, q_vector->name,
^ permalink raw reply
* [RFC 5/7] bnx2: use netdev_irqname
From: Stephen Hemminger @ 2011-06-21 17:05 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20110621170541.309890798@vyatta.com>
[-- Attachment #1: bnx2-use-irqname.patch --]
[-- Type: text/plain, Size: 1006 bytes --]
Also increase size of irq name to account for longer device names.
Original code was broken for full size names.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/bnx2.c 2011-06-21 09:52:00.527951530 -0700
+++ b/drivers/net/bnx2.c 2011-06-21 09:52:58.807951497 -0700
@@ -6173,7 +6173,8 @@ bnx2_enable_msix(struct bnx2 *bp, int ms
bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI;
for (i = 0; i < total_vecs; i++) {
bp->irq_tbl[i].vector = msix_ent[i].vector;
- snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i);
+ netdev_irqname(bp->irq_tbl[i].name, len,
+ dev, NETIF_IRQ_TXRX, i);
bp->irq_tbl[i].handler = bnx2_msi_1shot;
}
}
--- a/drivers/net/bnx2.h 2011-06-21 09:53:18.331951487 -0700
+++ b/drivers/net/bnx2.h 2011-06-21 09:53:51.723951469 -0700
@@ -6657,7 +6657,7 @@ struct bnx2_irq {
irq_handler_t handler;
unsigned int vector;
u8 requested;
- char name[IFNAMSIZ + 2];
+ char name[32];
};
struct bnx2_tx_ring_info {
^ permalink raw reply
* [RFC 4/7] benet: use irq naming standard
From: Stephen Hemminger @ 2011-06-21 17:05 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20110621170541.309890798@vyatta.com>
[-- Attachment #1: benet-use-irqname.patch --]
[-- Type: text/plain, Size: 1687 bytes --]
Use the standard for network device IRQ nameing for multiqueue devices.
It appears, this device has one transmit interrup, but multiple receive
interrupts. They will now be named:
ethX-tx-0 ethX-rx-0 ethX-rx-1 ...
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/benet/be_main.c 2011-06-21 09:34:01.407952135 -0700
+++ b/drivers/net/benet/be_main.c 2011-06-21 09:41:03.643951899 -0700
@@ -2196,13 +2196,16 @@ static inline int be_msix_vec_get(struct
}
static int be_request_irq(struct be_adapter *adapter,
- struct be_eq_obj *eq_obj,
- void *handler, char *desc, void *context)
+ struct be_eq_obj *eq_obj,
+ unsigned int usage, unsigned int queue,
+ irq_handler_t handler, void *context)
{
struct net_device *netdev = adapter->netdev;
int vec;
- sprintf(eq_obj->desc, "%s-%s", netdev->name, desc);
+ netdev_irqname(eq_obj->desc, sizeof(eq_obj->desc),
+ netdev, usage, queue);
+
vec = be_msix_vec_get(adapter, eq_obj);
return request_irq(vec, handler, 0, eq_obj->desc, context);
}
@@ -2218,17 +2221,17 @@ static int be_msix_register(struct be_ad
{
struct be_rx_obj *rxo;
int status, i;
- char qname[10];
- status = be_request_irq(adapter, &adapter->tx_eq, be_msix_tx_mcc, "tx",
- adapter);
+ status = be_request_irq(adapter, &adapter->tx_eq,
+ NETIF_IRQ_TX, 0,
+ be_msix_tx_mcc, adapter);
if (status)
goto err;
for_all_rx_queues(adapter, rxo, i) {
- sprintf(qname, "rxq%d", i);
- status = be_request_irq(adapter, &rxo->rx_eq, be_msix_rx,
- qname, rxo);
+ status = be_request_irq(adapter, &rxo->rx_eq,
+ NETIF_IRQ_RX, i,
+ be_msix_rx, rxo);
if (status)
goto err_msix;
}
^ permalink raw reply
* [RFC 7/7] netxen: use netdev_irqname
From: Stephen Hemminger @ 2011-06-21 17:05 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20110621170541.309890798@vyatta.com>
[-- Attachment #1: netxen-use-irqname.patch --]
[-- Type: text/plain, Size: 763 bytes --]
Use the new netdev_irqname to cause network device interrupts to
be named according to the standard convention of "ethX-N".
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/netxen/netxen_nic_main.c 2011-06-21 10:00:10.223951255 -0700
+++ b/drivers/net/netxen/netxen_nic_main.c 2011-06-21 10:02:46.695951169 -0700
@@ -955,7 +955,8 @@ netxen_nic_request_irq(struct netxen_ada
for (ring = 0; ring < adapter->max_sds_rings; ring++) {
sds_ring = &recv_ctx->sds_rings[ring];
- sprintf(sds_ring->name, "%s[%d]", netdev->name, ring);
+ netdev_irqname(sds_ring->name, sizeof(sds_ring->name),
+ netdev, NETIF_IRQ_TXRX, ring);
err = request_irq(sds_ring->irq, handler,
flags, sds_ring->name, sds_ring);
if (err)
^ permalink raw reply
* Re: [PATCH]: Add Network Sysrq Support
From: Stephen Hemminger @ 2011-06-21 17:08 UTC (permalink / raw)
To: Prarit Bhargava; +Cc: netdev, davem, agospoda, nhorman, lwoodman
In-Reply-To: <20110621130040.12035.62533.sendpatchset@prarit.bos.redhat.com>
On Tue, 21 Jun 2011 09:00:40 -0400
Prarit Bhargava <prarit@redhat.com> wrote:
> Add Network Sysrq Support
>
> In some circumstances, a system can hang/lockup in such a way that the system
> is completely unresponsive to keyboard or console input but is still
> responsive to ping. The config option, CONFIG_SYSRQ_PING, builds
> net/ipv4/sysrq-ping.ko which allows a root user to configure the system for
> a remote sysrq.
>
> To use this do:
>
> mount -t debugfs none /sys/kernel/debug/
> echo 1 > /proc/sys/kernel/sysrq
> echo <hex digit val> > /sys/kernel/debug/network_sysrq_magic
> echo 1 > /sys/kernel/debug/network_sysrq_enable
>
> Then on another system on the network you can do:
>
> ping -c 1 -p <up to 30 hex digit val><hex val of sysrq> <target_system_name>
>
> ex) sysrq-m, m is ascii 0x6d
>
> ping -c 1 p 1623a06f554d46d676d <target_system_name>
>
> Note that the network sysrq automatically disables after the receipt of
> the ping, ie) it is single-shot mode. If you want to use this again, you
> must complete the above four steps again.
>
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Isn't same functionality already available with netconsole?
^ permalink raw reply
* Re: [PATCH 1/2] udp: add tracepoints for queueing skb to rcvbuf
From: Steven Rostedt @ 2011-06-21 17:14 UTC (permalink / raw)
To: Hagen Paul Pfeifer
Cc: Neil Horman, Satoru Moriya, netdev, Seiji Aguchi, Ingo Molnar
In-Reply-To: <5b828bb3667480edda9a4a77918007ee@localhost>
On Tue, 2011-06-21 at 16:48 +0200, Hagen Paul Pfeifer wrote:
> On Tue, 21 Jun 2011 09:50:09 -0400, Neil Horman wrote:
>
> > I hadn't really thought about that much, but yes, I suppose I could
> migrate
> > dropwatch to export kfree_skb data via perf. Admittedly I don't know
> much
> > about
> > the perf api. Do you have any pointers on its use (to save me time in
> > figuring
> > out how it all works)? If so I'll start looking into it.
>
> http://git.kernel.org/?p=status/powertop/powertop.git;a=tree;f=perf;hb=HEAD
Please please do not copy this code and reuse it. You will end up
forcing us to this ABI forever!
Please read this for background:
http://lwn.net/Articles/442113/
I plan on doing a libperf.so that will allow any tool to interact with
trace events in the kernel the proper way. Yes trace-cmd currently has
its own library that deals with this properly, but the library is not
shipped with distros.
I plan on taking the trace-cmd library (which perf even uses - an older
verion) and make it into the libperf.so that distros will ship. But
unfortunately, my work has gotten in the way (the work that actually
pays me) and I'm doing other things at the moment.
-- Steve
>
> is probably a good starting point. Especially
> perf_bundle.cpp:handle_trace_point(). But I am not sure if this is the most
> clever way. The direct us of the perf api is somewhat dodgy (not sure if
> the ABI will change). IIRC Steven Rostedt wrote about a user space library
> (I CC'ed Steven). BUT: tracing via /sys/kernel/debug/tracing/* may be
> enough, eventually there is no need for perf at all. Then trace-cmd may
> provide some nice ideas how to wrap the /sys/kernel/debug/tracing interface
> programmatically.
>
> The idea behind dropwatch is great! There is currently to much
> unconsolidated information. It takes a genius to understand where and later
> why packets are dropped. A userspace tool where no kernel patch is required
> is a big plus! ;-)
>
> Hagen
^ permalink raw reply
* RE: [RFC 2/2] ethtool: Add support for DMA Coalescing feature config to ethtool.
From: Wyborny, Carolyn @ 2011-06-21 17:23 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, bhutchings@solarflare.com
In-Reply-To: <20110617.145420.866989290749857501.davem@davemloft.net>
>-----Original Message-----
>From: David Miller [mailto:davem@davemloft.net]
>Sent: Friday, June 17, 2011 11:54 AM
>To: Wyborny, Carolyn
>Cc: netdev@vger.kernel.org; bhutchings@solarflare.com
>Subject: Re: [RFC 2/2] ethtool: Add support for DMA Coalescing feature
>config to ethtool.
>
>From: "Wyborny, Carolyn" <carolyn.wyborny@intel.com>
>Date: Fri, 17 Jun 2011 08:50:11 -0700
>
>> I will add a fuller description of the feature in my updated patch.
>> I thought the feature was more well known. Quick description is that
>> it's a power saving feature that causes the adapter to coalesce its
>> DMA writes at low traffic times to save power on the platform by
>> reducing wakeups. The parameter is intended as a simple u32 value,
>> not just an on or off, but also to allow a variety of configuration
>> by adapter vendors, with validation of the input on the driver side.
>> Since I left out the implementation in my patch, this wasn't clear.
>> I will also fix this in my next submission.
>
>The value cannot have adapter specific meaning, you must define it
>precisely and in a generic manner, such that the user can specify the
>same setting across different card types.
Ok, good point. I will refine the definition of the parameter in the next submission, once the dust clears on the major revisions in progress.
Thanks,
Carolyn
Carolyn Wyborny
Linux Development
LAN Access Division
Intel Corporation
^ permalink raw reply
* [PATCH] mcp251x: Fix duplicate transmissions
From: Ken Ballentine @ 2011-06-21 17:28 UTC (permalink / raw)
To: wg-5Yr1BZd7O62+XT7JhA+gdA
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1.1: Type: text/plain, Size: 383 bytes --]
Use the RTS SPI instruction instead of setting the TXREQ bit. This works
around errata item 5 for the MCP2515, as described by Microchip in
http://ww1.microchip.com/downloads/en/DeviceDoc/80179g.pdf.
Signed-off-by: Ken Ballentine <ken.ballentine-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
Signed-off-by: Michael Williamson <michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
[-- Attachment #1.2: Type: text/html, Size: 631 bytes --]
[-- Attachment #2: mcp251x.patch --]
[-- Type: application/octet-stream, Size: 1289 bytes --]
diff -uNr linux-2.6.39.1.orig/drivers/net/can/mcp251x.c linux-2.6.39.1.new/drivers/net/can/mcp251x.c
--- linux-2.6.39.1.orig/drivers/net/can/mcp251x.c 2011-06-02 20:34:20.000000000 -0400
+++ linux-2.6.39.1.new/drivers/net/can/mcp251x.c 2011-06-21 12:07:43.720708907 -0400
@@ -82,6 +82,7 @@
#define INSTRUCTION_BIT_MODIFY 0x05
#define INSTRUCTION_LOAD_TXB(n) (0x40 + 2 * (n))
#define INSTRUCTION_READ_RXB(n) (((n) == 0) ? 0x90 : 0x94)
+#define INSTRUCTION_RTS(n) (0x80 | (1 << n))
#define INSTRUCTION_RESET 0xC0
/* MPC251x registers */
@@ -377,6 +378,15 @@
mcp251x_spi_trans(spi, 4);
}
+static void mcp251x_write_rts(struct spi_device *spi, int tx_buf_idx)
+{
+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+
+ priv->spi_tx_buf[0] = INSTRUCTION_RTS(tx_buf_idx);
+
+ mcp251x_spi_trans(spi, 1);
+}
+
static void mcp251x_hw_tx_frame(struct spi_device *spi, u8 *buf,
int len, int tx_buf_idx)
{
@@ -418,7 +428,7 @@
buf[TXBDLC_OFF] = (rtr << DLC_RTR_SHIFT) | frame->can_dlc;
memcpy(buf + TXBDAT_OFF, frame->data, frame->can_dlc);
mcp251x_hw_tx_frame(spi, buf, frame->can_dlc, tx_buf_idx);
- mcp251x_write_reg(spi, TXBCTRL(tx_buf_idx), TXBCTRL_TXREQ);
+ mcp251x_write_rts(spi, tx_buf_idx);
}
static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf,
[-- Attachment #3: Type: text/plain, Size: 188 bytes --]
_______________________________________________
Socketcan-core mailing list
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-core
^ permalink raw reply
* Re: [RFC 1/7] netdev: add standardized irq naming function
From: Michał Mirosław @ 2011-06-21 17:30 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, netdev
In-Reply-To: <20110621170658.395370414@vyatta.com>
2011/6/21 Stephen Hemminger <shemminger@vyatta.com>:
> To force driver developers to use a standard convention for naming
> network device IRQ's, provide a standardized method for creating
> the name.
Can this be modified to track netdev renames?
Best Regards,
Michał Mirosław
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox