* Re: [RFC 70/72] netx: Move the netx driver
From: Sascha Hauer @ 2011-06-27 9:45 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: davem, netdev
In-Reply-To: <1309010363-22750-71-git-send-email-jeffrey.t.kirsher@intel.com>
On Sat, Jun 25, 2011 at 06:59:21AM -0700, Jeff Kirsher wrote:
> Move the netx driver into drivers/net/ethernet/ and make the
> necessary Kconfig and Makefile changes.
>
> CC: Sascha Hauer <s.hauer@pengutronix.de>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/net/Kconfig | 10 ----------
> drivers/net/Makefile | 1 -
> drivers/net/ethernet/Kconfig | 10 ++++++++++
> drivers/net/ethernet/Makefile | 1 +
> drivers/net/{ => ethernet}/netx-eth.c | 0
> 5 files changed, 11 insertions(+), 11 deletions(-)
> rename drivers/net/{ => ethernet}/netx-eth.c (100%)
>
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index 4ddc389..dfae2ec 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -236,16 +236,6 @@ config SH_ETH
> This driver supporting CPUs are:
> - SH7710, SH7712, SH7763, SH7619, SH7724, and SH7757.
>
> -config NET_NETX
> - tristate "NetX Ethernet support"
> - select MII
> - depends on ARCH_NETX
> - help
> - This is support for the Hilscher netX builtin Ethernet ports
> -
> - To compile this driver as a module, choose M here. The module
> - will be called netx-eth.
> -
> config NET_PCI
> bool "EISA, VLB, PCI and on board controllers"
> depends on ISA || EISA || PCI
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 83075d4..c24b5ef 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -52,7 +52,6 @@ obj-$(CONFIG_DEFXX) += defxx.o
> obj-$(CONFIG_EQUALIZER) += eql.o
> obj-$(CONFIG_TUN) += tun.o
> obj-$(CONFIG_VETH) += veth.o
> -obj-$(CONFIG_NET_NETX) += netx-eth.o
>
> obj-$(CONFIG_DEV_APPLETALK) += appletalk/
> obj-$(CONFIG_ETHERNET) += ethernet/
> diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
> index 3ec1903..b7d8d9b 100644
> --- a/drivers/net/ethernet/Kconfig
> +++ b/drivers/net/ethernet/Kconfig
> @@ -176,6 +176,16 @@ config FEALNX
> source "drivers/net/ethernet/natsemi/Kconfig"
> source "drivers/net/ethernet/8390/Kconfig"
>
> +config NET_NETX
> + tristate "NetX Ethernet support"
> + depends on ARCH_NETX
> + select MII
> + ---help---
> + This is support for the Hilscher netX builtin Ethernet ports
> +
> + To compile this driver as a module, choose M here. The module
> + will be called netx-eth.
> +
> config FORCEDETH
> tristate "nForce Ethernet support"
> depends on PCI
> diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
> index 3b2a35a..c1a1c61 100644
> --- a/drivers/net/ethernet/Makefile
> +++ b/drivers/net/ethernet/Makefile
> @@ -42,6 +42,7 @@ obj-$(CONFIG_NET_VENDOR_MOTOROLA) += motorola/
> obj-$(CONFIG_NET_VENDOR_MYRI) += myricom/
> obj-$(CONFIG_FEALNX) += fealnx.o
> obj-$(CONFIG_NET_VENDOR_NATSEMI) += natsemi/
> +obj-$(CONFIG_NET_NETX) += netx-eth.o
> obj-$(CONFIG_FORCEDETH) += forcedeth.o
> obj-$(CONFIG_OCTEON_MGMT_ETHERNET) += octeon/
> obj-$(CONFIG_ETHOC) += ethoc.o
> diff --git a/drivers/net/netx-eth.c b/drivers/net/ethernet/netx-eth.c
> similarity index 100%
> rename from drivers/net/netx-eth.c
> rename to drivers/net/ethernet/netx-eth.c
> --
> 1.7.5.4
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* Re: [RFC 69/72] dm9000: Move the Davicom driver
From: Sascha Hauer @ 2011-06-27 9:45 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: davem, netdev, Ben Dooks
In-Reply-To: <1309010363-22750-70-git-send-email-jeffrey.t.kirsher@intel.com>
On Sat, Jun 25, 2011 at 06:59:20AM -0700, Jeff Kirsher wrote:
> Move the Davicom driver into drivers/net/ethernet/davicom/ and
> make the necessary Kconfig and Makefile changes.
>
> CC: Ben Dooks <ben@simtec.co.uk>
> CC: Sascha Hauer <s.hauer@pengutronix.de>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/net/Kconfig | 28 ------------------------
> drivers/net/Makefile | 1 -
> drivers/net/ethernet/Kconfig | 1 +
> drivers/net/ethernet/Makefile | 1 +
> drivers/net/ethernet/davicom/Kconfig | 31 +++++++++++++++++++++++++++
> drivers/net/ethernet/davicom/Makefile | 5 ++++
> drivers/net/{ => ethernet/davicom}/dm9000.c | 0
> drivers/net/{ => ethernet/davicom}/dm9000.h | 0
> 8 files changed, 38 insertions(+), 29 deletions(-)
> create mode 100644 drivers/net/ethernet/davicom/Kconfig
> create mode 100644 drivers/net/ethernet/davicom/Makefile
> rename drivers/net/{ => ethernet/davicom}/dm9000.c (100%)
> rename drivers/net/{ => ethernet/davicom}/dm9000.h (100%)
>
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index d1bcd23..4ddc389 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -246,34 +246,6 @@ config NET_NETX
> To compile this driver as a module, choose M here. The module
> will be called netx-eth.
>
> -config DM9000
> - tristate "DM9000 support"
> - depends on ARM || BLACKFIN || MIPS
> - select CRC32
> - select MII
> - ---help---
> - Support for DM9000 chipset.
> -
> - To compile this driver as a module, choose M here. The module
> - will be called dm9000.
> -
> -config DM9000_DEBUGLEVEL
> - int "DM9000 maximum debug level"
> - depends on DM9000
> - default 4
> - help
> - The maximum level of debugging code compiled into the DM9000
> - driver.
> -
> -config DM9000_FORCE_SIMPLE_PHY_POLL
> - bool "Force simple NSR based PHY polling"
> - depends on DM9000
> - ---help---
> - This configuration forces the DM9000 to use the NSR's LinkStatus
> - bit to determine if the link is up or down instead of the more
> - costly MII PHY reads. Note, this will not work if the chip is
> - operating with an external PHY.
> -
> config NET_PCI
> bool "EISA, VLB, PCI and on board controllers"
> depends on ISA || EISA || PCI
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index b647529..83075d4 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -53,7 +53,6 @@ obj-$(CONFIG_EQUALIZER) += eql.o
> obj-$(CONFIG_TUN) += tun.o
> obj-$(CONFIG_VETH) += veth.o
> obj-$(CONFIG_NET_NETX) += netx-eth.o
> -obj-$(CONFIG_DM9000) += dm9000.o
>
> obj-$(CONFIG_DEV_APPLETALK) += appletalk/
> obj-$(CONFIG_ETHERNET) += ethernet/
> diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
> index ac88e7c..3ec1903 100644
> --- a/drivers/net/ethernet/Kconfig
> +++ b/drivers/net/ethernet/Kconfig
> @@ -73,6 +73,7 @@ source "drivers/net/ethernet/broadcom/Kconfig"
> source "drivers/net/ethernet/brocade/Kconfig"
> source "drivers/net/ethernet/chelsio/Kconfig"
> source "drivers/net/ethernet/cisco/Kconfig"
> +source "drivers/net/ethernet/davicom/Kconfig"
>
> config DNET
> tristate "Dave ethernet support (DNET)"
> diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
> index afbb0ff..3b2a35a 100644
> --- a/drivers/net/ethernet/Makefile
> +++ b/drivers/net/ethernet/Makefile
> @@ -19,6 +19,7 @@ obj-$(CONFIG_NET_VENDOR_BROADCOM) += broadcom/
> obj-$(CONFIG_NET_VENDOR_BROCADE) += brocade/
> obj-$(CONFIG_NET_VENDOR_CHELSIO) += chelsio/
> obj-$(CONFIG_NET_VENDOR_CISCO) += cisco/
> +obj-$(CONFIG_DM9000) += davicom/
> obj-$(CONFIG_DNET) += dnet.o
> obj-$(CONFIG_DEPCA) += depca.o
> obj-$(CONFIG_NET_VENDOR_DLINK) += dlink/
> diff --git a/drivers/net/ethernet/davicom/Kconfig b/drivers/net/ethernet/davicom/Kconfig
> new file mode 100644
> index 0000000..0a03b0b
> --- /dev/null
> +++ b/drivers/net/ethernet/davicom/Kconfig
> @@ -0,0 +1,31 @@
> +#
> +# Davicom device configuration
> +#
> +
> +config DM9000
> + tristate "DM9000 support"
> + depends on ARM || BLACKFIN || MIPS
> + select CRC32
> + select MII
> + ---help---
> + Support for DM9000 chipset.
> +
> + To compile this driver as a module, choose M here. The module
> + will be called dm9000.
> +
> +config DM9000_DEBUGLEVEL
> + int "DM9000 maximum debug level"
> + depends on DM9000
> + default 4
> + help
> + The maximum level of debugging code compiled into the DM9000
> + driver.
> +
> +config DM9000_FORCE_SIMPLE_PHY_POLL
> + bool "Force simple NSR based PHY polling"
> + depends on DM9000
> + ---help---
> + This configuration forces the DM9000 to use the NSR's LinkStatus
> + bit to determine if the link is up or down instead of the more
> + costly MII PHY reads. Note, this will not work if the chip is
> + operating with an external PHY.
> diff --git a/drivers/net/ethernet/davicom/Makefile b/drivers/net/ethernet/davicom/Makefile
> new file mode 100644
> index 0000000..74b31f0
> --- /dev/null
> +++ b/drivers/net/ethernet/davicom/Makefile
> @@ -0,0 +1,5 @@
> +#
> +# Makefile for the Davicom device drivers.
> +#
> +
> +obj-$(CONFIG_DM9000) += dm9000.o
> diff --git a/drivers/net/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
> similarity index 100%
> rename from drivers/net/dm9000.c
> rename to drivers/net/ethernet/davicom/dm9000.c
> diff --git a/drivers/net/dm9000.h b/drivers/net/ethernet/davicom/dm9000.h
> similarity index 100%
> rename from drivers/net/dm9000.h
> rename to drivers/net/ethernet/davicom/dm9000.h
> --
> 1.7.5.4
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* Re: SKB paged fragment lifecycle on receive
From: Ian Campbell @ 2011-06-27 9:41 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Jeremy Fitzhardinge, xen-devel, netdev@vger.kernel.org,
mashirle@us.ibm.com, Russell, Rusty
In-Reply-To: <20110626102543.GA4961@redhat.com>
On Sun, 2011-06-26 at 11:25 +0100, Michael S. Tsirkin wrote:
> On Fri, Jun 24, 2011 at 04:43:22PM +0100, Ian Campbell wrote:
> > In this mode guest data pages ("foreign pages") were mapped into the
> > backend domain (using Xen grant-table functionality) and placed into the
> > skb's paged frag list (skb_shinfo(skb)->frags, I hope I am using the
> > right term). Once the page is finished with netback unmaps it in order
> > to return it to the guest (we really want to avoid returning such pages
> > to the general allocation pool!).
>
> Are the pages writeable by the source guest while netback processes
> them? If yes, firewalling becomes unreliable as the packet can be
> modified after it's checked, right?
We only map the paged frags, the linear area is always copied (enough to
cover maximally sized TCP/IP, including options), for this reason.
> Also, for guest to guest communication, do you wait for
> the destination to stop looking at the packet in order
> to return it to the source? If yes, can source guest
> networking be disrupted by a slow destination?
There is a timeout which ultimately does a copy into dom0 memory and
frees up the domain grant for return to the sending guest.
> > Jeremy Fitzhardinge and I subsequently
> > looked at the possibility of a no-clone skb flag (i.e. always forcing a
> > copy instead of a clone)
>
> I think this is the approach that the patchset
> 'macvtap/vhost TX zero-copy support' takes.
That's TX from the guests PoV, the same as I am looking at here,
correct?
I should definitely check this work out, thanks for the pointer. Is V7
(http://marc.info/?l=linux-kernel&m=130661128431312&w=2) the most recent
posting?
I suppose one difference with this is that it deals with data from
"dom0" userspace buffers rather than (what looks like) kernel memory,
although I don't know if that matters yet. Also it hangs off of struct
sock which netback doesn't have. Anyway I'll check it out.
> > but IIRC honouring it universally turned into a
> > very twisty maze with a number of nasty corner cases etc.
>
> Any examples? Are they covered by the patchset above?
It was quite a while ago so I don't remember many of the specifics.
Jeremy might remember better but for example any broadcast traffic
hitting a bridge (a very interesting case for Xen), seems like a likely
case? pcap was another one which I do remember, but that's obviously
less critical.
I presume with the TX zero-copy support the "copying due to attempted
clone" rate is low?
> > FWIW I proposed a session on the subject for LPC this year.
> We also plan to discuss this on kvm forum 2011
> (colocated with linuxcon 2011).
> http://www.linux-kvm.org/page/KVM_Forum_2011
I had already considered coming to LinuxCon for other reasons but
unfortunately I have family commitments around then :-(
Ian.
^ permalink raw reply
* Re: [RFC 56/72] macb: Move the Atmel driver
From: Jamie Iles @ 2011-06-27 9:29 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: Jeff Kirsher, davem, netdev, Jamie Iles
In-Reply-To: <4E083572.6050302@atmel.com>
On Mon, Jun 27, 2011 at 09:46:58AM +0200, Nicolas Ferre wrote:
> Hi,
>
> Le 25/06/2011 15:59, Jeff Kirsher :
> > Move the Atmel driver into drivers/net/ethernet/atmel/ and
>
> I am not sure that "atmel" is the proper name for a directory containing
> the macb.c driver. This controller has not been made by atmel and will
> be shared with others soon (Cf. paches by Jamie Iles).
>
> So two questions remains:
> - will we need to have a directory for this driver?
> - what will be the name of this directory?
The MACB is actually a Cadence IP block and I have a set of patches that
add support for the Cadence GEM so personally I'd be happy with
drivers/net/ethernet/cadence.
Jamie
^ permalink raw reply
* Re: [PATCH] NET: AX88796: Tighten up Kconfig dependencies
From: Sergei Shtylyov @ 2011-06-27 9:17 UTC (permalink / raw)
To: Ralf Baechle
Cc: linux-mips, Russell King, Jeff Garzik, linux-sh, netdev,
Magnus Damm, linux-kernel, Paul Mundt, Ben Dooks, Eric Miao,
David S. Miller, linux-arm-kernel
In-Reply-To: <20110625180050.GA9620@linux-mips.org>
Hello.
On 25-06-2011 22:00, Ralf Baechle wrote:
> In def47c5095d53814512bb0c62ec02dfdec769db1 the AX88796 driver got
Please also specify the summary of that commit.
> restricted to just be build for ARM and MIPS on the sole merrit that it
Merit?
> was written for some ARM sytems and the driver had the missfortune to
Misfortune?
> just build on MIPS, so MIPS was throw into the dependency for a good
> measure. Later 8687991a734a67f1638782c968f46fff0f94bb1f added SH but
Summary here too, please.
> only one in-tree SH system actually has an AX88796.
> Tighten up dependencies by using an auxilliary config sysmbol
> HAS_NET_AX88796 which is selected only by the platforms that actually
> have or may have an AX88796. This also means the driver won't be built
> anymore for any MIPS platform.
> Signed-off-by: Ralf Baechle<ralf@linux-mips.org>
WBR, Sergei
^ permalink raw reply
* Re: [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK is too aggressive
From: Thomas Graf @ 2011-06-27 9:11 UTC (permalink / raw)
To: Vladislav Yasevich; +Cc: Sridhar Samudrala, linux-sctp, netdev
In-Reply-To: <4E04AB67.1040407@hp.com>
On Fri, Jun 24, 2011 at 11:21:11AM -0400, Vladislav Yasevich wrote:
> We, instead of trying to underestimate the window size, try to over-estimate it.
> Almost every implementation has some kind of overhead and we don't know how
> that overhead will impact the window. As such we try to temporarily account for this
> overhead.
I looked into this some more and it turns out that adding per-packet
overhead is difficult because when we mark chunks for retransmissions
we have to add its data size to the peer rwnd again but we have no
idea how many packets were used for the initial transmission. Therefore
if we add an overhead, we can only do so per chunk.
> If we treat the window as strictly available data, then we may end up sending a lot more traffic
> then the window can take thus causing us to enter 0 window probe and potential retransmission
> issues that will trigger congestion control.
> We'd like to avoid that so we put some overhead into our computations. It may not be ideal
> since we do this on a per-chunk basis. It could probably be done on per-packet basis instead.
> This way, we'll essentially over-estimate but under-subscribe our current view of the peers
> window. So in one shot, we are not going to over-fill it and will get an updated view next
> time the SACK arrives.
What kind of configuration showed this behaviour? Did you observe that
issue with Linux peers? If a peer announces an a_rwnd which it cannot
handle then that is a implementation bug of the receiver and not of the
sender.
We won't go into zero window probe mode that easily, remember it's only
one packet allowed in flight while rwnd is 0. We always take into
account outstanding bytes when updating rwnd with a_rwnd so our view of
the peer's rwnd is very accurate.
In fact the RFC clearly states when and how to update the peer rwnd:
B) Any time a DATA chunk is transmitted (or retransmitted) to a peer,
the endpoint subtracts the data size of the chunk from the rwnd of
that peer.
I would like to try and reproduce the behaviour you have observed and
fix it without cutting our ability to produce pmtu maxed packets with
small data chunks.
^ permalink raw reply
* winner
From: Microsoft @ 2011-06-26 15:53 UTC (permalink / raw)
You have won 500.000 GBP
send your phone number
and address
^ permalink raw reply
* Re: [PATCH] net/can: activate bit-timing calculation and netlink based drivers by default
From: Marc Kleine-Budde @ 2011-06-27 8:04 UTC (permalink / raw)
To: Wolfgang Grandegger
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
socketcan-users-0fE9KPoRgkgATYTw5x5z8w,
davem-fT/PcQaiUtIeIZ0/mPfg9Q
In-Reply-To: <4E083930.50102-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 572 bytes --]
On 06/27/2011 10:02 AM, Wolfgang Grandegger wrote:
> Acked-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
>
> Ahh, ohh, a trivial fix for a long-standing problem. Would be nice if
> Kbuild would report such invalid default settings.
ACK, Marc
Send patches :)
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
[-- Attachment #2: Type: text/plain, Size: 191 bytes --]
_______________________________________________
Socketcan-users mailing list
Socketcan-users-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-users
^ permalink raw reply
* Re: [PATCH] net/can: activate bit-timing calculation and netlink based drivers by default
From: Wolfgang Grandegger @ 2011-06-27 8:02 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
socketcan-users-0fE9KPoRgkgATYTw5x5z8w,
davem-fT/PcQaiUtIeIZ0/mPfg9Q
In-Reply-To: <1309160391-22486-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Hi Marc,
On 06/27/2011 09:39 AM, Marc Kleine-Budde wrote:
> The two options "CAN bit-timing calculation" and
> "Platform CAN drivers with Netlink support" have a "default Y". In order to
> activate them by default, change to "default y".
>
> Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> drivers/net/can/Kconfig | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
> index bbf06f7..f1f9fd9 100644
> --- a/drivers/net/can/Kconfig
> +++ b/drivers/net/can/Kconfig
> @@ -36,7 +36,7 @@ config CAN_SLCAN
> config CAN_DEV
> tristate "Platform CAN drivers with Netlink support"
> depends on CAN
> - default Y
> + default y
> ---help---
> Enables the common framework for platform CAN drivers with Netlink
> support. This is the standard library for CAN drivers.
> @@ -45,7 +45,7 @@ config CAN_DEV
> config CAN_CALC_BITTIMING
> bool "CAN bit-timing calculation"
> depends on CAN_DEV
> - default Y
> + default y
> ---help---
> If enabled, CAN bit-timing parameters will be calculated for the
> bit-rate specified via Netlink argument "bitrate" when the device
Acked-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
Ahh, ohh, a trivial fix for a long-standing problem. Would be nice if
Kbuild would report such invalid default settings.
Thanks,
Wolfgang.
^ permalink raw reply
* Re: [RFC 56/72] macb: Move the Atmel driver
From: Nicolas Ferre @ 2011-06-27 7:46 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: davem, netdev, Jamie Iles
In-Reply-To: <1309010363-22750-57-git-send-email-jeffrey.t.kirsher@intel.com>
Hi,
Le 25/06/2011 15:59, Jeff Kirsher :
> Move the Atmel driver into drivers/net/ethernet/atmel/ and
I am not sure that "atmel" is the proper name for a directory containing
the macb.c driver. This controller has not been made by atmel and will
be shared with others soon (Cf. paches by Jamie Iles).
So two questions remains:
- will we need to have a directory for this driver?
- what will be the name of this directory?
Best regards,
> make the necessary Kconfig and Makefile changes.
>
> CC: Nicolas Ferre <nicolas.ferre@atmel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> MAINTAINERS | 2 +-
> drivers/net/Kconfig | 14 -------------
> drivers/net/Makefile | 1 -
> drivers/net/ethernet/Kconfig | 1 +
> drivers/net/ethernet/Makefile | 1 +
> drivers/net/ethernet/atmel/Kconfig | 32 +++++++++++++++++++++++++++++++
> drivers/net/ethernet/atmel/Makefile | 5 ++++
> drivers/net/{ => ethernet/atmel}/macb.c | 0
> drivers/net/{ => ethernet/atmel}/macb.h | 0
> 9 files changed, 40 insertions(+), 16 deletions(-)
> create mode 100644 drivers/net/ethernet/atmel/Kconfig
> create mode 100644 drivers/net/ethernet/atmel/Makefile
> rename drivers/net/{ => ethernet/atmel}/macb.c (100%)
> rename drivers/net/{ => ethernet/atmel}/macb.h (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 506d4d0..9ddb715 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1303,7 +1303,7 @@ F: include/video/atmel_lcdc.h
> ATMEL MACB ETHERNET DRIVER
> M: Nicolas Ferre <nicolas.ferre@atmel.com>
> S: Supported
> -F: drivers/net/macb.*
> +F: drivers/net/ethernet/atmel/
>
> ATMEL SPI DRIVER
> M: Nicolas Ferre <nicolas.ferre@atmel.com>
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index 9709106..7063b9c 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -2,9 +2,6 @@
> # Network device configuration
> #
>
> -config HAVE_NET_MACB
> - bool
> -
> menuconfig NETDEVICES
> default y if UML
> depends on NET
> @@ -224,17 +221,6 @@ menuconfig NET_ETHERNET
>
> if NET_ETHERNET
>
> -config MACB
> - tristate "Atmel MACB support"
> - depends on HAVE_NET_MACB
> - select PHYLIB
> - help
> - The Atmel MACB ethernet interface is found on many AT32 and AT91
> - parts. Say Y to include support for the MACB chip.
> -
> - To compile this driver as a module, choose M here: the module
> - will be called macb.
> -
> config SH_ETH
> tristate "Renesas SuperH Ethernet support"
> depends on SUPERH && \
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 5c189ab..a2a1e0a 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -68,7 +68,6 @@ obj-$(CONFIG_ETHOC) += ethoc.o
> obj-$(CONFIG_GRETH) += greth.o
>
> obj-$(CONFIG_DNET) += dnet.o
> -obj-$(CONFIG_MACB) += macb.o
>
> obj-$(CONFIG_DEV_APPLETALK) += appletalk/
> obj-$(CONFIG_ETHERNET) += ethernet/
> diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
> index fede911..e7c5f0b 100644
> --- a/drivers/net/ethernet/Kconfig
> +++ b/drivers/net/ethernet/Kconfig
> @@ -39,6 +39,7 @@ config ARIADNE
>
> source "drivers/net/ethernet/arm/Kconfig"
> source "drivers/net/ethernet/atheros/Kconfig"
> +source "drivers/net/ethernet/atmel/Kconfig"
> source "drivers/net/ethernet/blackfin/Kconfig"
> source "drivers/net/ethernet/broadcom/Kconfig"
> source "drivers/net/ethernet/brocade/Kconfig"
> diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
> index b8cc6ef..6c69e98 100644
> --- a/drivers/net/ethernet/Makefile
> +++ b/drivers/net/ethernet/Makefile
> @@ -10,6 +10,7 @@ obj-$(CONFIG_NET_VENDOR_APPLE) += apple/
> obj-$(CONFIG_ARIADNE) += ariadne.o
> obj-$(CONFIG_NET_ARM) += arm/
> obj-$(CONFIG_NET_VENDOR_ATHEROS) += atheros/
> +obj-$(CONFIG_NET_ATMEL) += atmel/
> obj-$(CONFIG_NET_BFIN) += blackfin/
> obj-$(CONFIG_NET_VENDOR_BROADCOM) += broadcom/
> obj-$(CONFIG_NET_VENDOR_BROCADE) += brocade/
> diff --git a/drivers/net/ethernet/atmel/Kconfig b/drivers/net/ethernet/atmel/Kconfig
> new file mode 100644
> index 0000000..a8c11ea
> --- /dev/null
> +++ b/drivers/net/ethernet/atmel/Kconfig
> @@ -0,0 +1,32 @@
> +#
> +# Atmel device configuration
> +#
> +
> +config HAVE_NET_MACB
> + bool
> +
> +config NET_ATMEL
> + bool "Atmel devices"
> + depends on HAVE_NET_MACB
> + ---help---
> + If you have a network (Ethernet) card belonging to this class, say Y.
> + Make sure you know the name of your card. Read the Ethernet-HOWTO,
> + available from <http://www.tldp.org/docs.html#howto>.
> +
> + If unsure, say Y.
> +
> + Note that the answer to this question doesn't directly affect the
> + kernel: saying N will just cause the configurator to skip all
> + the remaining Atmel network card questions. If you say Y, you will be
> + asked for your specific card in the following questions.
> +
> +config MACB
> + tristate "Atmel MACB support"
> + depends on NET_ATMEL && HAVE_NET_MACB
> + select PHYLIB
> + ---help---
> + The Atmel MACB ethernet interface is found on many AT32 and AT91
> + parts. Say Y to include support for the MACB chip.
> +
> + To compile this driver as a module, choose M here: the module
> + will be called macb.
> diff --git a/drivers/net/ethernet/atmel/Makefile b/drivers/net/ethernet/atmel/Makefile
> new file mode 100644
> index 0000000..91f79b1
> --- /dev/null
> +++ b/drivers/net/ethernet/atmel/Makefile
> @@ -0,0 +1,5 @@
> +#
> +# Makefile for the Atmel network device drivers.
> +#
> +
> +obj-$(CONFIG_MACB) += macb.o
> diff --git a/drivers/net/macb.c b/drivers/net/ethernet/atmel/macb.c
> similarity index 100%
> rename from drivers/net/macb.c
> rename to drivers/net/ethernet/atmel/macb.c
> diff --git a/drivers/net/macb.h b/drivers/net/ethernet/atmel/macb.h
> similarity index 100%
> rename from drivers/net/macb.h
> rename to drivers/net/ethernet/atmel/macb.h
--
Nicolas Ferre
^ permalink raw reply
* Re: [PATCH 1/2] can: bfin_can: simplify xmit id1 setup
From: Kurt Van Dijck @ 2011-06-27 7:43 UTC (permalink / raw)
To: Mike Frysinger
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA, David S. Miller,
Wolfgang Grandegger,
uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b
In-Reply-To: <1308925982-14645-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
On Fri, Jun 24, 2011 at 10:33:01AM -0400, Mike Frysinger wrote:
> If we look closely, the 4 writes to TRANSMIT_CHL.id1 can be collapsed
> down into much simpler code. So do just that.
>
> This also fixes a build failure due to the I/O macros no longer
> getting pulled in. Their minor (and accidental) usage here gets
> dropped as part of the unification.
>
> Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Nice cleanup.
Acked-by: Kurt Van Dijck <kurt.van.dijck-/BeEPy95v10@public.gmane.org>
^ permalink raw reply
* [PATCH] net/can: activate bit-timing calculation and netlink based drivers by default
From: Marc Kleine-Budde @ 2011-06-27 7:39 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
socketcan-users-0fE9KPoRgkgATYTw5x5z8w, wg-5Yr1BZd7O62+XT7JhA+gdA
The two options "CAN bit-timing calculation" and
"Platform CAN drivers with Netlink support" have a "default Y". In order to
activate them by default, change to "default y".
Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
drivers/net/can/Kconfig | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
index bbf06f7..f1f9fd9 100644
--- a/drivers/net/can/Kconfig
+++ b/drivers/net/can/Kconfig
@@ -36,7 +36,7 @@ config CAN_SLCAN
config CAN_DEV
tristate "Platform CAN drivers with Netlink support"
depends on CAN
- default Y
+ default y
---help---
Enables the common framework for platform CAN drivers with Netlink
support. This is the standard library for CAN drivers.
@@ -45,7 +45,7 @@ config CAN_DEV
config CAN_CALC_BITTIMING
bool "CAN bit-timing calculation"
depends on CAN_DEV
- default Y
+ default y
---help---
If enabled, CAN bit-timing parameters will be calculated for the
bit-rate specified via Netlink argument "bitrate" when the device
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH] net_sched: fix dequeuer fairness
From: David Miller @ 2011-06-27 7:15 UTC (permalink / raw)
To: jhs, hadi; +Cc: eric.dumazet, herbert, netdev, adi, joe
In-Reply-To: <1309112034.5134.66.camel@mojatatu>
From: jamal <hadi@cyberus.ca>
Date: Sun, 26 Jun 2011 14:13:54 -0400
> [PATCH] net_sched: fix dequeuer fairness
Applied, thanks!
^ permalink raw reply
* Re: [net-next 0/9][pull request] Intel Wired LAN Driver Update
From: David Miller @ 2011-06-27 7:08 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo
In-Reply-To: <1308986546-12964-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat, 25 Jun 2011 00:22:17 -0700
> The following series contains updates to ixgbe. The changes are mainly
> cleanup/update of the ixgbe driver.
>
> The following are changes since commit c6af9c406ceb3434281cf230938453931dcbab75:
> net: wimax: Remove of unused 'rfkill_input' pointer
> and are available in the git repository at:
> master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6 master
I'll pull this, thanks Jeff.
^ permalink raw reply
* Re: [PATCH 0/8] wan: Use current logging forms
From: David Miller @ 2011-06-27 7:08 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1309150683.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Sun, 26 Jun 2011 22:01:27 -0700
> Joe Perches (8):
> generic_hdlc: Update to current logging forms
> cosa: Update to current logging forms
> cyclom: Update to current logging forms
> frame relay dlci/frad: Update to current logging forms
> dscc4: Update to current logging forms
> farsync: Update to current logging forms
> ixp4xx_hss: Update to current logging forms
> wan: Update to current logging forms
All applied, thanks Joe.
^ permalink raw reply
* Re: [PATCH net-next-2.6 3/3] be2net: fix initialization of vlan_prio_bmap
From: David Miller @ 2011-06-27 7:07 UTC (permalink / raw)
To: sathya.perla; +Cc: netdev
In-Reply-To: <9126f0fa-e344-4bf8-afe2-270985b37d75@exht1.ad.emulex.com>
From: Sathya Perla <sathya.perla@emulex.com>
Date: Mon, 27 Jun 2011 12:11:53 +0530
> Initialization of this field to "all priorities" must be done before MCC queue
> creation. As soon as the MCC queue is created, an event modifying this value
> may be received.
>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 2/3] be2net: get rid of multi_rxq module param
From: David Miller @ 2011-06-27 7:07 UTC (permalink / raw)
To: sathya.perla; +Cc: netdev
In-Reply-To: <737fdf75-9b60-476b-b5a5-bf8adac5501a@exht1.ad.emulex.com>
From: Sathya Perla <sathya.perla@emulex.com>
Date: Mon, 27 Jun 2011 12:11:25 +0530
>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 1/3] be2net: fix netdev_stats_update
From: David Miller @ 2011-06-27 7:07 UTC (permalink / raw)
To: eric.dumazet; +Cc: sathya.perla, netdev
In-Reply-To: <1309157789.2532.77.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 27 Jun 2011 08:56:29 +0200
> Le lundi 27 juin 2011 à 12:10 +0530, Sathya Perla a écrit :
>> Problem initially reproted and fixed by Eric Dumazet <eric.dumazet@gmail.com>
>>
>> netdev_stats_update() resets netdev->stats and then accumulates stats from
>> various rings. This is wrong as stats readers can sometimes catch zero values.
>> Use temporary variables instead for accumulating per-ring values.
>>
>> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
>> ---
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 1/3] be2net: fix netdev_stats_update
From: Eric Dumazet @ 2011-06-27 6:56 UTC (permalink / raw)
To: Sathya Perla; +Cc: netdev
In-Reply-To: <4da4117c-a24a-4512-9b79-fbed126e03bc@exht1.ad.emulex.com>
Le lundi 27 juin 2011 à 12:10 +0530, Sathya Perla a écrit :
> Problem initially reproted and fixed by Eric Dumazet <eric.dumazet@gmail.com>
>
> netdev_stats_update() resets netdev->stats and then accumulates stats from
> various rings. This is wrong as stats readers can sometimes catch zero values.
> Use temporary variables instead for accumulating per-ring values.
>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> ---
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Thanks
^ permalink raw reply
* Re: [PATCH 2/8] cosa: Update to current logging forms
From: Jan Yenya Kasprzak @ 2011-06-27 6:43 UTC (permalink / raw)
To: Joe Perches; +Cc: netdev, linux-kernel
In-Reply-To: <61af65d0325575eea0bbd7af411e6ea29e1cc443.1309150684.git.joe@perches.com>
Hello,
Joe Perches wrote:
: Use pr_fmt, pr_<level> and netdev_<level> as appropriate.
:
: Signed-off-by: Joe Perches <joe@perches.com>
I am not sure whether the formatting changes
in the conditional expressions (in debug_status_out|in) are worth it,
but whatever.
Acked-By: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Thanks!
-Yenya
: ---
: drivers/net/wan/cosa.c | 226 ++++++++++++++++++++++-------------------------
: 1 files changed, 106 insertions(+), 120 deletions(-)
:
: diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
: index 6fb6f8e..6aed238 100644
: --- a/drivers/net/wan/cosa.c
: +++ b/drivers/net/wan/cosa.c
: @@ -74,6 +74,8 @@
: * The Sync PPP/Cisco HDLC layer (syncppp.c) ported to Linux by Alan Cox
: */
:
: +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
: +
: #include <linux/module.h>
: #include <linux/kernel.h>
: #include <linux/sched.h>
: @@ -361,14 +363,13 @@ static int __init cosa_init(void)
:
: if (cosa_major > 0) {
: if (register_chrdev(cosa_major, "cosa", &cosa_fops)) {
: - printk(KERN_WARNING "cosa: unable to get major %d\n",
: - cosa_major);
: + pr_warn("unable to get major %d\n", cosa_major);
: err = -EIO;
: goto out;
: }
: } else {
: if (!(cosa_major=register_chrdev(0, "cosa", &cosa_fops))) {
: - printk(KERN_WARNING "cosa: unable to register chardev\n");
: + pr_warn("unable to register chardev\n");
: err = -EIO;
: goto out;
: }
: @@ -378,7 +379,7 @@ static int __init cosa_init(void)
: for (i=0; io[i] != 0 && i < MAX_CARDS; i++)
: cosa_probe(io[i], irq[i], dma[i]);
: if (!nr_cards) {
: - printk(KERN_WARNING "cosa: no devices found.\n");
: + pr_warn("no devices found\n");
: unregister_chrdev(cosa_major, "cosa");
: err = -ENODEV;
: goto out;
: @@ -447,26 +448,25 @@ static int cosa_probe(int base, int irq, int dma)
: /* Checking validity of parameters: */
: /* IRQ should be 2-7 or 10-15; negative IRQ means autoprobe */
: if ((irq >= 0 && irq < 2) || irq > 15 || (irq < 10 && irq > 7)) {
: - printk (KERN_INFO "cosa_probe: invalid IRQ %d\n", irq);
: + pr_info("invalid IRQ %d\n", irq);
: return -1;
: }
: /* I/O address should be between 0x100 and 0x3ff and should be
: * multiple of 8. */
: if (base < 0x100 || base > 0x3ff || base & 0x7) {
: - printk (KERN_INFO "cosa_probe: invalid I/O address 0x%x\n",
: - base);
: + pr_info("invalid I/O address 0x%x\n", base);
: return -1;
: }
: /* DMA should be 0,1 or 3-7 */
: if (dma < 0 || dma == 4 || dma > 7) {
: - printk (KERN_INFO "cosa_probe: invalid DMA %d\n", dma);
: + pr_info("invalid DMA %d\n", dma);
: return -1;
: }
: /* and finally, on 16-bit COSA DMA should be 4-7 and
: * I/O base should not be multiple of 0x10 */
: if (((base & 0x8) && dma < 4) || (!(base & 0x8) && dma > 3)) {
: - printk (KERN_INFO "cosa_probe: 8/16 bit base and DMA mismatch"
: - " (base=0x%x, dma=%d)\n", base, dma);
: + pr_info("8/16 bit base and DMA mismatch (base=0x%x, dma=%d)\n",
: + base, dma);
: return -1;
: }
:
: @@ -479,7 +479,7 @@ static int cosa_probe(int base, int irq, int dma)
: return -1;
:
: if (cosa_reset_and_read_id(cosa, cosa->id_string) < 0) {
: - printk(KERN_DEBUG "cosa: probe at 0x%x failed.\n", base);
: + printk(KERN_DEBUG "probe at 0x%x failed.\n", base);
: err = -1;
: goto err_out;
: }
: @@ -492,8 +492,7 @@ static int cosa_probe(int base, int irq, int dma)
: else {
: /* Print a warning only if we are not autoprobing */
: #ifndef COSA_ISA_AUTOPROBE
: - printk(KERN_INFO "cosa: valid signature not found at 0x%x.\n",
: - base);
: + pr_info("valid signature not found at 0x%x\n", base);
: #endif
: err = -1;
: goto err_out;
: @@ -501,14 +500,14 @@ static int cosa_probe(int base, int irq, int dma)
: /* Update the name of the region now we know the type of card */
: release_region(base, is_8bit(cosa)?2:4);
: if (!request_region(base, is_8bit(cosa)?2:4, cosa->type)) {
: - printk(KERN_DEBUG "cosa: changing name at 0x%x failed.\n", base);
: + printk(KERN_DEBUG "changing name at 0x%x failed.\n", base);
: return -1;
: }
:
: /* Now do IRQ autoprobe */
: if (irq < 0) {
: unsigned long irqs;
: -/* printk(KERN_INFO "IRQ autoprobe\n"); */
: +/* pr_info("IRQ autoprobe\n"); */
: irqs = probe_irq_on();
: /*
: * Enable interrupt on tx buffer empty (it sure is)
: @@ -526,13 +525,13 @@ static int cosa_probe(int base, int irq, int dma)
: cosa_getdata8(cosa);
:
: if (irq < 0) {
: - printk (KERN_INFO "cosa IRQ autoprobe: multiple interrupts obtained (%d, board at 0x%x)\n",
: + pr_info("multiple interrupts obtained (%d, board at 0x%x)\n",
: irq, cosa->datareg);
: err = -1;
: goto err_out;
: }
: if (irq == 0) {
: - printk (KERN_INFO "cosa IRQ autoprobe: no interrupt obtained (board at 0x%x)\n",
: + pr_info("no interrupt obtained (board at 0x%x)\n",
: cosa->datareg);
: /* return -1; */
: }
: @@ -579,8 +578,7 @@ static int cosa_probe(int base, int irq, int dma)
:
: /* Register the network interface */
: if (!(chan->netdev = alloc_hdlcdev(chan))) {
: - printk(KERN_WARNING "%s: alloc_hdlcdev failed.\n",
: - chan->name);
: + pr_warn("%s: alloc_hdlcdev failed\n", chan->name);
: goto err_hdlcdev;
: }
: dev_to_hdlc(chan->netdev)->attach = cosa_net_attach;
: @@ -591,14 +589,14 @@ static int cosa_probe(int base, int irq, int dma)
: chan->netdev->irq = chan->cosa->irq;
: chan->netdev->dma = chan->cosa->dma;
: if (register_hdlc_device(chan->netdev)) {
: - printk(KERN_WARNING "%s: register_hdlc_device()"
: - " failed.\n", chan->netdev->name);
: + netdev_warn(chan->netdev,
: + "register_hdlc_device() failed\n");
: free_netdev(chan->netdev);
: goto err_hdlcdev;
: }
: }
:
: - printk (KERN_INFO "cosa%d: %s (%s at 0x%x irq %d dma %d), %d channels\n",
: + pr_info("cosa%d: %s (%s at 0x%x irq %d dma %d), %d channels\n",
: cosa->num, cosa->id_string, cosa->type,
: cosa->datareg, cosa->irq, cosa->dma, cosa->nchannels);
:
: @@ -618,8 +616,7 @@ err_out1:
: free_irq(cosa->irq, cosa);
: err_out:
: release_region(cosa->datareg,is_8bit(cosa)?2:4);
: - printk(KERN_NOTICE "cosa%d: allocating resources failed\n",
: - cosa->num);
: + pr_notice("cosa%d: allocating resources failed\n", cosa->num);
: return err;
: }
:
: @@ -641,14 +638,14 @@ static int cosa_net_open(struct net_device *dev)
: unsigned long flags;
:
: if (!(chan->cosa->firmware_status & COSA_FW_START)) {
: - printk(KERN_NOTICE "%s: start the firmware first (status %d)\n",
: - chan->cosa->name, chan->cosa->firmware_status);
: + pr_notice("%s: start the firmware first (status %d)\n",
: + chan->cosa->name, chan->cosa->firmware_status);
: return -EPERM;
: }
: spin_lock_irqsave(&chan->cosa->lock, flags);
: if (chan->usage != 0) {
: - printk(KERN_WARNING "%s: cosa_net_open called with usage count"
: - " %d\n", chan->name, chan->usage);
: + pr_warn("%s: cosa_net_open called with usage count %d\n",
: + chan->name, chan->usage);
: spin_unlock_irqrestore(&chan->cosa->lock, flags);
: return -EBUSY;
: }
: @@ -736,8 +733,7 @@ static char *cosa_net_setup_rx(struct channel_data *chan, int size)
: kfree_skb(chan->rx_skb);
: chan->rx_skb = dev_alloc_skb(size);
: if (chan->rx_skb == NULL) {
: - printk(KERN_NOTICE "%s: Memory squeeze, dropping packet\n",
: - chan->name);
: + pr_notice("%s: Memory squeeze, dropping packet\n", chan->name);
: chan->netdev->stats.rx_dropped++;
: return NULL;
: }
: @@ -748,8 +744,7 @@ static char *cosa_net_setup_rx(struct channel_data *chan, int size)
: static int cosa_net_rx_done(struct channel_data *chan)
: {
: if (!chan->rx_skb) {
: - printk(KERN_WARNING "%s: rx_done with empty skb!\n",
: - chan->name);
: + pr_warn("%s: rx_done with empty skb!\n", chan->name);
: chan->netdev->stats.rx_errors++;
: chan->netdev->stats.rx_frame_errors++;
: return 0;
: @@ -768,8 +763,7 @@ static int cosa_net_rx_done(struct channel_data *chan)
: static int cosa_net_tx_done(struct channel_data *chan, int size)
: {
: if (!chan->tx_skb) {
: - printk(KERN_WARNING "%s: tx_done with empty skb!\n",
: - chan->name);
: + pr_warn("%s: tx_done with empty skb!\n", chan->name);
: chan->netdev->stats.tx_errors++;
: chan->netdev->stats.tx_aborted_errors++;
: return 1;
: @@ -794,15 +788,15 @@ static ssize_t cosa_read(struct file *file,
: char *kbuf;
:
: if (!(cosa->firmware_status & COSA_FW_START)) {
: - printk(KERN_NOTICE "%s: start the firmware first (status %d)\n",
: - cosa->name, cosa->firmware_status);
: + pr_notice("%s: start the firmware first (status %d)\n",
: + cosa->name, cosa->firmware_status);
: return -EPERM;
: }
: if (mutex_lock_interruptible(&chan->rlock))
: return -ERESTARTSYS;
:
: if ((chan->rxdata = kmalloc(COSA_MTU, GFP_DMA|GFP_KERNEL)) == NULL) {
: - printk(KERN_INFO "%s: cosa_read() - OOM\n", cosa->name);
: + pr_info("%s: cosa_read() - OOM\n", cosa->name);
: mutex_unlock(&chan->rlock);
: return -ENOMEM;
: }
: @@ -869,8 +863,8 @@ static ssize_t cosa_write(struct file *file,
: char *kbuf;
:
: if (!(cosa->firmware_status & COSA_FW_START)) {
: - printk(KERN_NOTICE "%s: start the firmware first (status %d)\n",
: - cosa->name, cosa->firmware_status);
: + pr_notice("%s: start the firmware first (status %d)\n",
: + cosa->name, cosa->firmware_status);
: return -EPERM;
: }
: if (down_interruptible(&chan->wsem))
: @@ -881,8 +875,8 @@ static ssize_t cosa_write(struct file *file,
:
: /* Allocate the buffer */
: if ((kbuf = kmalloc(count, GFP_KERNEL|GFP_DMA)) == NULL) {
: - printk(KERN_NOTICE "%s: cosa_write() OOM - dropping packet\n",
: - cosa->name);
: + pr_notice("%s: cosa_write() OOM - dropping packet\n",
: + cosa->name);
: up(&chan->wsem);
: return -ENOMEM;
: }
: @@ -932,7 +926,7 @@ static int chrdev_tx_done(struct channel_data *chan, int size)
:
: static unsigned int cosa_poll(struct file *file, poll_table *poll)
: {
: - printk(KERN_INFO "cosa_poll is here\n");
: + pr_info("cosa_poll is here\n");
: return 0;
: }
:
: @@ -1017,15 +1011,14 @@ static inline int cosa_reset(struct cosa_data *cosa)
: {
: char idstring[COSA_MAX_ID_STRING];
: if (cosa->usage > 1)
: - printk(KERN_INFO "cosa%d: WARNING: reset requested with cosa->usage > 1 (%d). Odd things may happen.\n",
: + pr_info("cosa%d: WARNING: reset requested with cosa->usage > 1 (%d). Odd things may happen.\n",
: cosa->num, cosa->usage);
: cosa->firmware_status &= ~(COSA_FW_RESET|COSA_FW_START);
: if (cosa_reset_and_read_id(cosa, idstring) < 0) {
: - printk(KERN_NOTICE "cosa%d: reset failed\n", cosa->num);
: + pr_notice("cosa%d: reset failed\n", cosa->num);
: return -EIO;
: }
: - printk(KERN_INFO "cosa%d: resetting device: %s\n", cosa->num,
: - idstring);
: + pr_info("cosa%d: resetting device: %s\n", cosa->num, idstring);
: cosa->firmware_status |= COSA_FW_RESET;
: return 0;
: }
: @@ -1037,11 +1030,11 @@ static inline int cosa_download(struct cosa_data *cosa, void __user *arg)
: int i;
:
: if (cosa->usage > 1)
: - printk(KERN_INFO "%s: WARNING: download of microcode requested with cosa->usage > 1 (%d). Odd things may happen.\n",
: + pr_info("%s: WARNING: download of microcode requested with cosa->usage > 1 (%d). Odd things may happen.\n",
: cosa->name, cosa->usage);
: if (!(cosa->firmware_status & COSA_FW_RESET)) {
: - printk(KERN_NOTICE "%s: reset the card first (status %d).\n",
: - cosa->name, cosa->firmware_status);
: + pr_notice("%s: reset the card first (status %d)\n",
: + cosa->name, cosa->firmware_status);
: return -EPERM;
: }
:
: @@ -1059,11 +1052,11 @@ static inline int cosa_download(struct cosa_data *cosa, void __user *arg)
:
: i = download(cosa, d.code, d.len, d.addr);
: if (i < 0) {
: - printk(KERN_NOTICE "cosa%d: microcode download failed: %d\n",
: - cosa->num, i);
: + pr_notice("cosa%d: microcode download failed: %d\n",
: + cosa->num, i);
: return -EIO;
: }
: - printk(KERN_INFO "cosa%d: downloading microcode - 0x%04x bytes at 0x%04x\n",
: + pr_info("cosa%d: downloading microcode - 0x%04x bytes at 0x%04x\n",
: cosa->num, d.len, d.addr);
: cosa->firmware_status |= COSA_FW_RESET|COSA_FW_DOWNLOAD;
: return 0;
: @@ -1076,12 +1069,11 @@ static inline int cosa_readmem(struct cosa_data *cosa, void __user *arg)
: int i;
:
: if (cosa->usage > 1)
: - printk(KERN_INFO "cosa%d: WARNING: readmem requested with "
: - "cosa->usage > 1 (%d). Odd things may happen.\n",
: + pr_info("cosa%d: WARNING: readmem requested with cosa->usage > 1 (%d). Odd things may happen.\n",
: cosa->num, cosa->usage);
: if (!(cosa->firmware_status & COSA_FW_RESET)) {
: - printk(KERN_NOTICE "%s: reset the card first (status %d).\n",
: - cosa->name, cosa->firmware_status);
: + pr_notice("%s: reset the card first (status %d)\n",
: + cosa->name, cosa->firmware_status);
: return -EPERM;
: }
:
: @@ -1093,11 +1085,10 @@ static inline int cosa_readmem(struct cosa_data *cosa, void __user *arg)
:
: i = readmem(cosa, d.code, d.len, d.addr);
: if (i < 0) {
: - printk(KERN_NOTICE "cosa%d: reading memory failed: %d\n",
: - cosa->num, i);
: + pr_notice("cosa%d: reading memory failed: %d\n", cosa->num, i);
: return -EIO;
: }
: - printk(KERN_INFO "cosa%d: reading card memory - 0x%04x bytes at 0x%04x\n",
: + pr_info("cosa%d: reading card memory - 0x%04x bytes at 0x%04x\n",
: cosa->num, d.len, d.addr);
: cosa->firmware_status |= COSA_FW_RESET;
: return 0;
: @@ -1109,23 +1100,22 @@ static inline int cosa_start(struct cosa_data *cosa, int address)
: int i;
:
: if (cosa->usage > 1)
: - printk(KERN_INFO "cosa%d: WARNING: start microcode requested with cosa->usage > 1 (%d). Odd things may happen.\n",
: + pr_info("cosa%d: WARNING: start microcode requested with cosa->usage > 1 (%d). Odd things may happen.\n",
: cosa->num, cosa->usage);
:
: if ((cosa->firmware_status & (COSA_FW_RESET|COSA_FW_DOWNLOAD))
: != (COSA_FW_RESET|COSA_FW_DOWNLOAD)) {
: - printk(KERN_NOTICE "%s: download the microcode and/or reset the card first (status %d).\n",
: - cosa->name, cosa->firmware_status);
: + pr_notice("%s: download the microcode and/or reset the card first (status %d)\n",
: + cosa->name, cosa->firmware_status);
: return -EPERM;
: }
: cosa->firmware_status &= ~COSA_FW_RESET;
: if ((i=startmicrocode(cosa, address)) < 0) {
: - printk(KERN_NOTICE "cosa%d: start microcode at 0x%04x failed: %d\n",
: - cosa->num, address, i);
: + pr_notice("cosa%d: start microcode at 0x%04x failed: %d\n",
: + cosa->num, address, i);
: return -EIO;
: }
: - printk(KERN_INFO "cosa%d: starting microcode at 0x%04x\n",
: - cosa->num, address);
: + pr_info("cosa%d: starting microcode at 0x%04x\n", cosa->num, address);
: cosa->startaddr = address;
: cosa->firmware_status |= COSA_FW_START;
: return 0;
: @@ -1255,11 +1245,11 @@ static int cosa_start_tx(struct channel_data *chan, char *buf, int len)
: #ifdef DEBUG_DATA
: int i;
:
: - printk(KERN_INFO "cosa%dc%d: starting tx(0x%x)", chan->cosa->num,
: - chan->num, len);
: + pr_info("cosa%dc%d: starting tx(0x%x)",
: + chan->cosa->num, chan->num, len);
: for (i=0; i<len; i++)
: - printk(" %02x", buf[i]&0xff);
: - printk("\n");
: + pr_cont(" %02x", buf[i]&0xff);
: + pr_cont("\n");
: #endif
: spin_lock_irqsave(&cosa->lock, flags);
: chan->txbuf = buf;
: @@ -1353,7 +1343,7 @@ static void cosa_kick(struct cosa_data *cosa)
: if (test_bit(TXBIT, &cosa->rxtx))
: s = "TX DMA";
:
: - printk(KERN_INFO "%s: %s timeout - restarting.\n", cosa->name, s);
: + pr_info("%s: %s timeout - restarting\n", cosa->name, s);
: spin_lock_irqsave(&cosa->lock, flags);
: cosa->rxtx = 0;
:
: @@ -1387,7 +1377,7 @@ static int cosa_dma_able(struct channel_data *chan, char *buf, int len)
: return 0;
: if ((b^ (b+len)) & 0x10000) {
: if (count++ < 5)
: - printk(KERN_INFO "%s: packet spanning a 64k boundary\n",
: + pr_info("%s: packet spanning a 64k boundary\n",
: chan->name);
: return 0;
: }
: @@ -1498,8 +1488,7 @@ static int readmem(struct cosa_data *cosa, char __user *microcode, int length, i
: char c;
: int i;
: if ((i=get_wait_data(cosa)) == -1) {
: - printk (KERN_INFO "cosa: 0x%04x bytes remaining\n",
: - length);
: + pr_info("0x%04x bytes remaining\n", length);
: return -11;
: }
: c=i;
: @@ -1582,14 +1571,15 @@ static int get_wait_data(struct cosa_data *cosa)
: short r;
: r = cosa_getdata8(cosa);
: #if 0
: - printk(KERN_INFO "cosa: get_wait_data returning after %d retries\n", 999-retries);
: + pr_info("get_wait_data returning after %d retries\n",
: + 999-retries);
: #endif
: return r;
: }
: /* sleep if not ready to read */
: schedule_timeout_interruptible(1);
: }
: - printk(KERN_INFO "cosa: timeout in get_wait_data (status 0x%x)\n",
: + pr_info("timeout in get_wait_data (status 0x%x)\n",
: cosa_getstatus(cosa));
: return -1;
: }
: @@ -1607,7 +1597,7 @@ static int put_wait_data(struct cosa_data *cosa, int data)
: if (cosa_getstatus(cosa) & SR_TX_RDY) {
: cosa_putdata8(cosa, data);
: #if 0
: - printk(KERN_INFO "Putdata: %d retries\n", 999-retries);
: + pr_info("Putdata: %d retries\n", 999-retries);
: #endif
: return 0;
: }
: @@ -1616,7 +1606,7 @@ static int put_wait_data(struct cosa_data *cosa, int data)
: schedule_timeout_interruptible(1);
: #endif
: }
: - printk(KERN_INFO "cosa%d: timeout in put_wait_data (status 0x%x)\n",
: + pr_info("cosa%d: timeout in put_wait_data (status 0x%x)\n",
: cosa->num, cosa_getstatus(cosa));
: return -1;
: }
: @@ -1636,13 +1626,13 @@ static int puthexnumber(struct cosa_data *cosa, int number)
: sprintf(temp, "%04X", number);
: for (i=0; i<4; i++) {
: if (put_wait_data(cosa, temp[i]) == -1) {
: - printk(KERN_NOTICE "cosa%d: puthexnumber failed to write byte %d\n",
: - cosa->num, i);
: + pr_notice("cosa%d: puthexnumber failed to write byte %d\n",
: + cosa->num, i);
: return -1-2*i;
: }
: if (get_wait_data(cosa) != temp[i]) {
: - printk(KERN_NOTICE "cosa%d: puthexhumber failed to read echo of byte %d\n",
: - cosa->num, i);
: + pr_notice("cosa%d: puthexhumber failed to read echo of byte %d\n",
: + cosa->num, i);
: return -2-2*i;
: }
: }
: @@ -1687,8 +1677,7 @@ static inline void tx_interrupt(struct cosa_data *cosa, int status)
: {
: unsigned long flags, flags1;
: #ifdef DEBUG_IRQS
: - printk(KERN_INFO "cosa%d: SR_DOWN_REQUEST status=0x%04x\n",
: - cosa->num, status);
: + pr_info("cosa%d: SR_DOWN_REQUEST status=0x%04x\n", cosa->num, status);
: #endif
: spin_lock_irqsave(&cosa->lock, flags);
: set_bit(TXBIT, &cosa->rxtx);
: @@ -1696,8 +1685,7 @@ static inline void tx_interrupt(struct cosa_data *cosa, int status)
: /* flow control, see the comment above */
: int i=0;
: if (!cosa->txbitmap) {
: - printk(KERN_WARNING "%s: No channel wants data "
: - "in TX IRQ. Expect DMA timeout.",
: + pr_warn("%s: No channel wants data in TX IRQ. Expect DMA timeout.\n",
: cosa->name);
: put_driver_status_nolock(cosa);
: clear_bit(TXBIT, &cosa->rxtx);
: @@ -1780,14 +1768,14 @@ static inline void tx_interrupt(struct cosa_data *cosa, int status)
: if (cosa->busmaster) {
: unsigned long addr = virt_to_bus(cosa->txbuf);
: int count=0;
: - printk(KERN_INFO "busmaster IRQ\n");
: + pr_info("busmaster IRQ\n");
: while (!(cosa_getstatus(cosa)&SR_TX_RDY)) {
: count++;
: udelay(10);
: if (count > 1000) break;
: }
: - printk(KERN_INFO "status %x\n", cosa_getstatus(cosa));
: - printk(KERN_INFO "ready after %d loops\n", count);
: + pr_info("status %x\n", cosa_getstatus(cosa));
: + pr_info("ready after %d loops\n", count);
: cosa_putdata16(cosa, (addr >> 16)&0xffff);
:
: count = 0;
: @@ -1796,7 +1784,7 @@ static inline void tx_interrupt(struct cosa_data *cosa, int status)
: if (count > 1000) break;
: udelay(10);
: }
: - printk(KERN_INFO "ready after %d loops\n", count);
: + pr_info("ready after %d loops\n", count);
: cosa_putdata16(cosa, addr &0xffff);
: flags1 = claim_dma_lock();
: set_dma_mode(cosa->dma, DMA_MODE_CASCADE);
: @@ -1824,7 +1812,7 @@ static inline void rx_interrupt(struct cosa_data *cosa, int status)
: {
: unsigned long flags;
: #ifdef DEBUG_IRQS
: - printk(KERN_INFO "cosa%d: SR_UP_REQUEST\n", cosa->num);
: + pr_info("cosa%d: SR_UP_REQUEST\n", cosa->num);
: #endif
:
: spin_lock_irqsave(&cosa->lock, flags);
: @@ -1847,7 +1835,7 @@ static inline void rx_interrupt(struct cosa_data *cosa, int status)
: debug_data_in(cosa, cosa->rxsize & 0xff);
: #endif
: #if 0
: - printk(KERN_INFO "cosa%d: receive rxsize = (0x%04x).\n",
: + pr_info("cosa%d: receive rxsize = (0x%04x)\n",
: cosa->num, cosa->rxsize);
: #endif
: }
: @@ -1857,12 +1845,12 @@ static inline void rx_interrupt(struct cosa_data *cosa, int status)
: debug_data_in(cosa, cosa->rxsize);
: #endif
: #if 0
: - printk(KERN_INFO "cosa%d: receive rxsize = (0x%04x).\n",
: + pr_info("cosa%d: receive rxsize = (0x%04x)\n",
: cosa->num, cosa->rxsize);
: #endif
: }
: if (((cosa->rxsize & 0xe000) >> 13) >= cosa->nchannels) {
: - printk(KERN_WARNING "%s: rx for unknown channel (0x%04x)\n",
: + pr_warn("%s: rx for unknown channel (0x%04x)\n",
: cosa->name, cosa->rxsize);
: spin_unlock_irqrestore(&cosa->lock, flags);
: goto reject;
: @@ -1877,7 +1865,7 @@ static inline void rx_interrupt(struct cosa_data *cosa, int status)
:
: if (!cosa->rxbuf) {
: reject: /* Reject the packet */
: - printk(KERN_INFO "cosa%d: rejecting packet on channel %d\n",
: + pr_info("cosa%d: rejecting packet on channel %d\n",
: cosa->num, cosa->rxchan->num);
: cosa->rxbuf = cosa->bouncebuf;
: }
: @@ -1924,11 +1912,11 @@ static inline void eot_interrupt(struct cosa_data *cosa, int status)
: #ifdef DEBUG_DATA
: {
: int i;
: - printk(KERN_INFO "cosa%dc%d: done rx(0x%x)", cosa->num,
: - cosa->rxchan->num, cosa->rxsize);
: + pr_info("cosa%dc%d: done rx(0x%x)",
: + cosa->num, cosa->rxchan->num, cosa->rxsize);
: for (i=0; i<cosa->rxsize; i++)
: - printk (" %02x", cosa->rxbuf[i]&0xff);
: - printk("\n");
: + pr_cont(" %02x", cosa->rxbuf[i]&0xff);
: + pr_cont("\n");
: }
: #endif
: /* Packet for unknown channel? */
: @@ -1940,8 +1928,7 @@ static inline void eot_interrupt(struct cosa_data *cosa, int status)
: if (cosa->rxchan->rx_done(cosa->rxchan))
: clear_bit(cosa->rxchan->num, &cosa->rxbitmap);
: } else {
: - printk(KERN_NOTICE "cosa%d: unexpected EOT interrupt\n",
: - cosa->num);
: + pr_notice("cosa%d: unexpected EOT interrupt\n", cosa->num);
: }
: /*
: * Clear the RXBIT, TXBIT and IRQBIT (the latest should be
: @@ -1963,8 +1950,7 @@ static irqreturn_t cosa_interrupt(int irq, void *cosa_)
: again:
: status = cosa_getstatus(cosa);
: #ifdef DEBUG_IRQS
: - printk(KERN_INFO "cosa%d: got IRQ, status 0x%02x\n", cosa->num,
: - status & 0xff);
: + pr_info("cosa%d: got IRQ, status 0x%02x\n", cosa->num, status & 0xff);
: #endif
: #ifdef DEBUG_IO
: debug_status_in(cosa, status);
: @@ -1985,15 +1971,15 @@ again:
: udelay(100);
: goto again;
: }
: - printk(KERN_INFO "cosa%d: unknown status 0x%02x in IRQ after %d retries\n",
: + pr_info("cosa%d: unknown status 0x%02x in IRQ after %d retries\n",
: cosa->num, status & 0xff, count);
: }
: #ifdef DEBUG_IRQS
: if (count)
: - printk(KERN_INFO "%s: %d-times got unknown status in IRQ\n",
: + pr_info("%s: %d-times got unknown status in IRQ\n",
: cosa->name, count);
: else
: - printk(KERN_INFO "%s: returning from IRQ\n", cosa->name);
: + pr_info("%s: returning from IRQ\n", cosa->name);
: #endif
: return IRQ_HANDLED;
: }
: @@ -2024,41 +2010,41 @@ static void debug_status_in(struct cosa_data *cosa, int status)
: s = "NO_REQ";
: break;
: }
: - printk(KERN_INFO "%s: IO: status -> 0x%02x (%s%s%s%s)\n",
: + pr_info("%s: IO: status -> 0x%02x (%s%s%s%s)\n",
: cosa->name,
: status,
: - status & SR_USR_RQ ? "USR_RQ|":"",
: - status & SR_TX_RDY ? "TX_RDY|":"",
: - status & SR_RX_RDY ? "RX_RDY|":"",
: + status & SR_USR_RQ ? "USR_RQ|" : "",
: + status & SR_TX_RDY ? "TX_RDY|" : "",
: + status & SR_RX_RDY ? "RX_RDY|" : "",
: s);
: }
:
: static void debug_status_out(struct cosa_data *cosa, int status)
: {
: - printk(KERN_INFO "%s: IO: status <- 0x%02x (%s%s%s%s%s%s)\n",
: + pr_info("%s: IO: status <- 0x%02x (%s%s%s%s%s%s)\n",
: cosa->name,
: status,
: - status & SR_RX_DMA_ENA ? "RXDMA|":"!rxdma|",
: - status & SR_TX_DMA_ENA ? "TXDMA|":"!txdma|",
: - status & SR_RST ? "RESET|":"",
: - status & SR_USR_INT_ENA ? "USRINT|":"!usrint|",
: - status & SR_TX_INT_ENA ? "TXINT|":"!txint|",
: - status & SR_RX_INT_ENA ? "RXINT":"!rxint");
: + status & SR_RX_DMA_ENA ? "RXDMA|" : "!rxdma|",
: + status & SR_TX_DMA_ENA ? "TXDMA|" : "!txdma|",
: + status & SR_RST ? "RESET|" : "",
: + status & SR_USR_INT_ENA ? "USRINT|" : "!usrint|",
: + status & SR_TX_INT_ENA ? "TXINT|" : "!txint|",
: + status & SR_RX_INT_ENA ? "RXINT" : "!rxint");
: }
:
: static void debug_data_in(struct cosa_data *cosa, int data)
: {
: - printk(KERN_INFO "%s: IO: data -> 0x%04x\n", cosa->name, data);
: + pr_info("%s: IO: data -> 0x%04x\n", cosa->name, data);
: }
:
: static void debug_data_out(struct cosa_data *cosa, int data)
: {
: - printk(KERN_INFO "%s: IO: data <- 0x%04x\n", cosa->name, data);
: + pr_info("%s: IO: data <- 0x%04x\n", cosa->name, data);
: }
:
: static void debug_data_cmd(struct cosa_data *cosa, int data)
: {
: - printk(KERN_INFO "%s: IO: data <- 0x%04x (%s|%s)\n",
: + pr_info("%s: IO: data <- 0x%04x (%s|%s)\n",
: cosa->name, data,
: data & SR_RDY_RCV ? "RX_RDY" : "!rx_rdy",
: data & SR_RDY_SND ? "TX_RDY" : "!tx_rdy");
: --
: 1.7.6.rc1
--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Journal: http://www.fi.muni.cz/~kas/blog/ |
Please don't top post and in particular don't attach entire digests to your
mail or we'll all soon be using bittorrent to read the list. --Alan Cox
^ permalink raw reply
* [PATCH net-next-2.6 3/3] be2net: fix initialization of vlan_prio_bmap
From: Sathya Perla @ 2011-06-27 6:41 UTC (permalink / raw)
To: netdev; +Cc: Sathya Perla
Initialization of this field to "all priorities" must be done before MCC queue
creation. As soon as the MCC queue is created, an event modifying this value
may be received.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
drivers/net/benet/be_main.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 2373d39..ae281de 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -2554,6 +2554,9 @@ static int be_setup(struct be_adapter *adapter)
if (status != 0)
goto tx_qs_destroy;
+ /* Allow all priorities by default. A GRP5 evt may modify this */
+ adapter->vlan_prio_bmap = 0xff;
+
status = be_mcc_queues_create(adapter);
if (status != 0)
goto rx_qs_destroy;
@@ -3419,10 +3422,6 @@ static int __devinit be_probe(struct pci_dev *pdev,
}
dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num);
- /* By default all priorities are enabled.
- * Needed in case of no GRP5 evt support
- */
- adapter->vlan_prio_bmap = 0xff;
schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
return 0;
--
1.7.4
^ permalink raw reply related
* [PATCH net-next-2.6 2/3] be2net: get rid of multi_rxq module param
From: Sathya Perla @ 2011-06-27 6:41 UTC (permalink / raw)
To: netdev; +Cc: Sathya Perla
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
drivers/net/benet/be_main.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 5ca06b0..2373d39 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -33,10 +33,6 @@ module_param(num_vfs, uint, S_IRUGO);
MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data.");
MODULE_PARM_DESC(num_vfs, "Number of PCI VFs to initialize");
-static bool multi_rxq = true;
-module_param(multi_rxq, bool, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(multi_rxq, "Multi Rx Queue support. Enabled by default");
-
static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = {
{ PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) },
{ PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID2) },
@@ -1785,7 +1781,7 @@ static void be_rx_queues_destroy(struct be_adapter *adapter)
static u32 be_num_rxqs_want(struct be_adapter *adapter)
{
- if (multi_rxq && (adapter->function_caps & BE_FUNCTION_CAPS_RSS) &&
+ if ((adapter->function_caps & BE_FUNCTION_CAPS_RSS) &&
!adapter->sriov_enabled && !(adapter->function_mode & 0x400)) {
return 1 + MAX_RSS_QS; /* one default non-RSS queue */
} else {
--
1.7.4
^ permalink raw reply related
* [PATCH net-next-2.6 1/3] be2net: fix netdev_stats_update
From: Sathya Perla @ 2011-06-27 6:40 UTC (permalink / raw)
To: netdev; +Cc: Sathya Perla
Problem initially reproted and fixed by Eric Dumazet <eric.dumazet@gmail.com>
netdev_stats_update() resets netdev->stats and then accumulates stats from
various rings. This is wrong as stats readers can sometimes catch zero values.
Use temporary variables instead for accumulating per-ring values.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
drivers/net/benet/be_main.c | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index c4f564c..5ca06b0 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -428,33 +428,38 @@ void netdev_stats_update(struct be_adapter *adapter)
struct net_device_stats *dev_stats = &adapter->netdev->stats;
struct be_rx_obj *rxo;
struct be_tx_obj *txo;
+ unsigned long pkts = 0, bytes = 0, mcast = 0, drops = 0;
int i;
- memset(dev_stats, 0, sizeof(*dev_stats));
for_all_rx_queues(adapter, rxo, i) {
- dev_stats->rx_packets += rx_stats(rxo)->rx_pkts;
- dev_stats->rx_bytes += rx_stats(rxo)->rx_bytes;
- dev_stats->multicast += rx_stats(rxo)->rx_mcast_pkts;
+ pkts += rx_stats(rxo)->rx_pkts;
+ bytes += rx_stats(rxo)->rx_bytes;
+ mcast += rx_stats(rxo)->rx_mcast_pkts;
/* no space in linux buffers: best possible approximation */
if (adapter->generation == BE_GEN3) {
if (!(lancer_chip(adapter))) {
- struct be_erx_stats_v1 *erx_stats =
+ struct be_erx_stats_v1 *erx =
be_erx_stats_from_cmd(adapter);
- dev_stats->rx_dropped +=
- erx_stats->rx_drops_no_fragments[rxo->q.id];
+ drops += erx->rx_drops_no_fragments[rxo->q.id];
}
} else {
- struct be_erx_stats_v0 *erx_stats =
+ struct be_erx_stats_v0 *erx =
be_erx_stats_from_cmd(adapter);
- dev_stats->rx_dropped +=
- erx_stats->rx_drops_no_fragments[rxo->q.id];
+ drops += erx->rx_drops_no_fragments[rxo->q.id];
}
}
+ dev_stats->rx_packets = pkts;
+ dev_stats->rx_bytes = bytes;
+ dev_stats->multicast = mcast;
+ dev_stats->rx_dropped = drops;
+ pkts = bytes = 0;
for_all_tx_queues(adapter, txo, i) {
- dev_stats->tx_packets += tx_stats(txo)->be_tx_pkts;
- dev_stats->tx_bytes += tx_stats(txo)->be_tx_bytes;
+ pkts += tx_stats(txo)->be_tx_pkts;
+ bytes += tx_stats(txo)->be_tx_bytes;
}
+ dev_stats->tx_packets = pkts;
+ dev_stats->tx_bytes = bytes;
/* bad pkts received */
dev_stats->rx_errors = drvs->rx_crc_errors +
--
1.7.4
^ permalink raw reply related
* Re: [PATCH net-next-2.6 1/3] be2net: fix netdev_stats_update
From: David Miller @ 2011-06-27 6:11 UTC (permalink / raw)
To: Sathya.Perla; +Cc: eric.dumazet, netdev
In-Reply-To: <3367B80B08154D42A3B2BC708B5D41F63F188EE7A3@EXMAIL.ad.emulex.com>
From: <Sathya.Perla@Emulex.Com>
Date: Sun, 26 Jun 2011 22:19:13 -0700
> Dave, Sure, I'm fine with that. Could you apply this patch by replacing
> my name with Eric's? Or should I do the same and send you another one...
Please resubmit the entire series with everything fixed, thanks.
^ permalink raw reply
* RE: [PATCH net-next-2.6 1/3] be2net: fix netdev_stats_update
From: Eric Dumazet @ 2011-06-27 6:05 UTC (permalink / raw)
To: Sathya.Perla; +Cc: davem, netdev
In-Reply-To: <3367B80B08154D42A3B2BC708B5D41F63F188EE7A3@EXMAIL.ad.emulex.com>
Le dimanche 26 juin 2011 à 22:19 -0700, Sathya.Perla@Emulex.Com a
écrit :
> >-----Original Message-----
> >From: David Miller [mailto:davem@davemloft.net]
> >Sent: Saturday, June 25, 2011 1:29 AM
> >To: eric.dumazet@gmail.com
> >Cc: Perla, Sathya; netdev@vger.kernel.org
> >Subject: Re: [PATCH net-next-2.6 1/3] be2net: fix netdev_stats_update
> >
> >From: Eric Dumazet <eric.dumazet@gmail.com>
> >Date: Fri, 24 Jun 2011 12:32:00 +0200
> >
> >> Hmm, isnt it a patch I provided 10 days ago ?
> >>
> >> I find very strange so few people are able to properly attribute work
> >> today...
> >
> >Sathya, if this patch is almost entriely the same as Eric's patch,
> >and you only made small minor changes, then it isn't your work.
>
> Dave, Sure, I'm fine with that. Could you apply this patch by replacing
> my name with Eric's? Or should I do the same and send you another one...
Please resend the patch, I am fine with you being the committer, but
please add in Changelog _some_ attribution, like :
Problem initialy reported and fixed by Eric Dumazet.
You see, there is a difference if you at least acknowledge fact that
someone spent some time before you on the problem.
Correct attribution is an incent for people to look at your drivers and
fix their bugs, its a win-win.
^ 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