Netdev List
 help / color / mirror / Atom feed
* [PATCH 1/2] iwlwifi: use pci_dev->revision, again
From: Sergei Shtylyov @ 2011-06-23 14:41 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA, linville-2XuSBdqkA4R54TAoqtyWWQ,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w, ilw-VuQAYsv1563Yd54FQh9/CA

Commit ff938e43d39e926de74b32a3656c190f979ab642 (net: use pci_dev->revision,
again) already converted this driver to using the 'revision' field of 'struct
pci_dev' but commit c2974a1d18832a9fffb2eb389c3878f5c4ed92f1 (iwlagn: remove
rev_id) later reverted that change for no reason. Now restore the change...

Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>

---
The patch is against the recent Linus' tree.

 drivers/net/wireless/iwlwifi/iwl-agn.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/net/wireless/iwlwifi/iwl-agn.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ linux-2.6/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3275,10 +3275,9 @@ struct ieee80211_ops iwlagn_hw_ops = {
 
 static u32 iwl_hw_detect(struct iwl_priv *priv)
 {
-	u8 rev_id;
+	IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n",
+		       priv->pci_dev->revision);
 
-	pci_read_config_byte(priv->pci_dev, PCI_REVISION_ID, &rev_id);
-	IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", rev_id);
 	return iwl_read32(priv, CSR_HW_REV);
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] net/usb: kalmia: Various fixes for better support of non-x86 architectures.
From: Alan Stern @ 2011-06-23 14:28 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Marius B. Kotsbak, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	Marius B. Kotsbak
In-Reply-To: <4E03198A.2060600-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>

On Thu, 23 Jun 2011, Sergei Shtylyov wrote:

> Hello.
> 
> On 22-06-2011 19:26, Marius B. Kotsbak wrote:
> 
> > -Support for big endian.
> > -Do not use USB buffers at the stack.
> > -Safer/more efficient code for local constants.
> 
> > Signed-off-by: Marius B. Kotsbak<marius-iy5w9mehe2BBDgjK7y7TUQ@public.gmane.org>
> > ---
> >   drivers/net/usb/kalmia.c |   40 ++++++++++++++++++++++++----------------
> >   1 files changed, 24 insertions(+), 16 deletions(-)
> 
> > diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c
> > index d965fb1..d4edeb2 100644
> > --- a/drivers/net/usb/kalmia.c
> > +++ b/drivers/net/usb/kalmia.c
> > @@ -100,27 +100,35 @@ kalmia_send_init_packet(struct usbnet *dev, u8 *init_msg, u8 init_msg_len,
> >   static int
> >   kalmia_init_and_get_ethernet_addr(struct usbnet *dev, u8 *ethernet_addr)
> >   {
> > -	char init_msg_1[] =
> > +	const static char init_msg_1[] =
> >   		{ 0x57, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
> >   		0x00, 0x00 };
> > -	char init_msg_2[] =
> > +	const static char init_msg_2[] =
> >   		{ 0x57, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf4,
> >   		0x00, 0x00 };
> 
>     Actually 'const' alone should've been enough for the variable to be placed 
> in the data section ISO stack.

I don't understand what "ISO stack" means here.

I would think that "const" might or might not cause the array to be 
allocated statically.  All it really tells the compiler is that the 
function will not change the contents of the array.

To be certain that the array is allocated statically (not on the 
stack), it's best to use "static".

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [RFC] Moving files around in drivers/net
From: Giuseppe CAVALLARO @ 2011-06-23 13:30 UTC (permalink / raw)
  To: Jon Mason
  Cc: Joe Perches, Jeff Kirsher, netdev, David Miller, Paul Gortmaker,
	Jan Engelhardt, Andrew Gallatin
In-Reply-To: <BANLkTin0QzAscKcN0Yw6rc7fUh5d5q143w@mail.gmail.com>

On 6/16/2011 5:03 PM, Jon Mason wrote:
>> stmmac may not be a good name.  Maybe stmicro.

Hello and sorry for the delay of this reply.

concerning the stmmac, in the past, I had thought to rename it as synmac
because the driver, although was initially designed to work on ST
platforms, today it runs on other platforms.
The driver indeed is generic enough and is for MAC 10/100/1000 core by
Synopsys.
This is just an idea.

Moreover, sorry if I'm missing some details of this thread, I can do
rework if you agree, so let me know how proceed.
IIUC new patches should be built against:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-organize

Regards
Peppe


>>
>> enic may not be a good name.  Maybe cisco.
>>
>> mlx4 may be mellanox
>>
>> sfc may be solarflare
>>
>> bna may be brocade
>>
>> cheers, Joe
>>
>> $ git log --stat -M b7c7deeb4c77538577f0b6a724f10ce8693eb648..
>> commit 743b1f134daef72805cb10e74d82dcbb95cd2568
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Tue Jun 14 14:02:57 2011 -0700
>>
>>    hamachi/yellowfin: Move the packet engine drivers
>>
>>    Move the packet engine drivers to drivers/net/ethernet/pktgen/ and
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Donald Becker <becker@scyld.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                           |   26 ---------------
>>  drivers/net/Makefile                          |    2 -
>>  drivers/net/ethernet/Kconfig                  |    1 +
>>  drivers/net/ethernet/Makefile                 |    1 +
>>  drivers/net/ethernet/pkteng/Kconfig           |   42 +++++++++++++++++++++++++
>>  drivers/net/ethernet/pkteng/Makefile          |    6 +++
>>  drivers/net/{ => ethernet/pkteng}/hamachi.c   |    0
>>  drivers/net/{ => ethernet/pkteng}/yellowfin.c |    0
>>  8 files changed, 50 insertions(+), 28 deletions(-)
>>
>> commit a7ce0b86340574f90bd24c460c3495ae3e06f5fb
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Tue Jun 14 13:35:31 2011 -0700
>>
>>    ixp2000: Move the Radisys driver
>>
>>    Move the Radisys driver into drivers/net/ethernet/ixp2000/ and
>>    make the necessary Kconfig and Makefile changes
>>
>>    CC: Lennert Buytenhek <kernel@wantstofly.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    2 +-
>>  drivers/net/Kconfig                                |    2 --
>>  drivers/net/Makefile                               |    1 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/{ => ethernet}/ixp2000/Kconfig         |    0
>>  drivers/net/{ => ethernet}/ixp2000/Makefile        |    0
>>  drivers/net/{ => ethernet}/ixp2000/caleb.c         |    0
>>  drivers/net/{ => ethernet}/ixp2000/caleb.h         |    0
>>  drivers/net/{ => ethernet}/ixp2000/enp2611.c       |    0
>>  drivers/net/{ => ethernet}/ixp2000/ixp2400-msf.c   |    0
>>  drivers/net/{ => ethernet}/ixp2000/ixp2400-msf.h   |    0
>>  drivers/net/{ => ethernet}/ixp2000/ixp2400_rx.uc   |    0
>>  .../net/{ => ethernet}/ixp2000/ixp2400_rx.ucode    |    0
>>  drivers/net/{ => ethernet}/ixp2000/ixp2400_tx.uc   |    0
>>  .../net/{ => ethernet}/ixp2000/ixp2400_tx.ucode    |    0
>>  drivers/net/{ => ethernet}/ixp2000/ixpdev.c        |    0
>>  drivers/net/{ => ethernet}/ixp2000/ixpdev.h        |    0
>>  drivers/net/{ => ethernet}/ixp2000/ixpdev_priv.h   |    0
>>  drivers/net/{ => ethernet}/ixp2000/pm3386.c        |    0
>>  drivers/net/{ => ethernet}/ixp2000/pm3386.h        |    0
>>  21 files changed, 3 insertions(+), 4 deletions(-)
>>
>> commit 73091715bc0690f82ef9489f3589ad9b2d747cc0
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Tue Jun 14 12:56:50 2011 -0700
>>
>>    tlan/cpmac: Move the TI drivers
>>
>>    Move the TI drivers to drivers/net/ethernet/ti/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Samuel Chessman <chessman@tux.org>
>>    CC: <torben.mathiasen@compaq.com>
>>    CC: Eugene Konev <ejka@imfi.kspu.ru>
>>    CC: Florian Fainelli <florian@openwrt.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                           |    4 +-
>>  drivers/net/Kconfig                   |   25 --------------------
>>  drivers/net/Makefile                  |    2 -
>>  drivers/net/ethernet/Kconfig          |    1 +
>>  drivers/net/ethernet/Makefile         |    1 +
>>  drivers/net/ethernet/ti/Kconfig       |   41 +++++++++++++++++++++++++++++++++
>>  drivers/net/ethernet/ti/Makefile      |    6 +++++
>>  drivers/net/{ => ethernet/ti}/cpmac.c |    0
>>  drivers/net/{ => ethernet/ti}/tlan.c  |    0
>>  drivers/net/{ => ethernet/ti}/tlan.h  |    0
>>  10 files changed, 51 insertions(+), 29 deletions(-)
>>
>> commit 035a452c66dbc0aa7873a12cfe057c74eaf89111
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Mon Jun 13 10:51:34 2011 -0700
>>
>>    s6gmac/tsi108_eth: Move the s6gmac/tsi108_eth drivers
>>
>>    Move the s6gmac/tsi108_eth drivers to drivers/net/ethernet/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: Oskar Schirmer <os@emlix.com>
>>    CC: Kong Lai <kong.lai@tundra.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                     |   19 -------------------
>>  drivers/net/Makefile                    |    2 --
>>  drivers/net/ethernet/Kconfig            |   21 +++++++++++++++++++++
>>  drivers/net/ethernet/Makefile           |    2 ++
>>  drivers/net/{ => ethernet}/s6gmac.c     |    0
>>  drivers/net/{ => ethernet}/tsi108_eth.c |    0
>>  drivers/net/{ => ethernet}/tsi108_eth.h |    0
>>  7 files changed, 23 insertions(+), 21 deletions(-)
>>
>> commit 4f9d3b9af95ced49b9ad9d5fb222f5216bf0adbb
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Mon Jun 13 10:03:01 2011 -0700
>>
>>    a2065/ariadne: Move the a2065/ariadne drivers
>>
>>    Move the a2065/ariadne drivers to drivers/net/ethernet/ and make
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Geert Uytterhoeven <geert@linux-m68k.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                  |   21 ---------------------
>>  drivers/net/Makefile                 |    2 --
>>  drivers/net/ethernet/Kconfig         |   23 +++++++++++++++++++++++
>>  drivers/net/ethernet/Makefile        |    2 ++
>>  drivers/net/{ => ethernet}/a2065.c   |    0
>>  drivers/net/{ => ethernet}/a2065.h   |    0
>>  drivers/net/{ => ethernet}/ariadne.c |    0
>>  drivers/net/{ => ethernet}/ariadne.h |    0
>>  8 files changed, 25 insertions(+), 23 deletions(-)
>>
>> commit aead66521a701f08e3ae91aec7c9c8863a07a511
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Mon Jun 13 09:43:17 2011 -0700
>>
>>    82586.c/fec*: Move the Motorola drivers
>>
>>    Move the Motorola drivers into drivers/net/ethernet/motorola/ and
>>    make the necessary Kconfig and Makefile changes
>>
>>    CC: Dan Malek <dmalek@jlc.net>
>>    CC: Sylvain Munaut <tnt@246tNt.com>
>>    CC: Richard Hirst <richard@sleepie.demon.co.uk>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                                |   49 --------------
>>  drivers/net/Makefile                               |    7 --
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/{ => ethernet/motorola}/82596.c        |    0
>>  drivers/net/ethernet/motorola/Kconfig              |   68 ++++++++++++++++++++
>>  drivers/net/ethernet/motorola/Makefile             |   11 +++
>>  drivers/net/{ => ethernet/motorola}/fec.c          |    0
>>  drivers/net/{ => ethernet/motorola}/fec.h          |    0
>>  drivers/net/{ => ethernet/motorola}/fec_mpc52xx.c  |    0
>>  drivers/net/{ => ethernet/motorola}/fec_mpc52xx.h  |    0
>>  .../net/{ => ethernet/motorola}/fec_mpc52xx_phy.c  |    0
>>  12 files changed, 81 insertions(+), 56 deletions(-)
>>
>> commit aebcb70982c66b54605fbd242f6ac035b2e205b3
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Mon Jun 13 08:43:49 2011 -0700
>>
>>    sis*: Move the Silicon Integrated Systems (SiS) drivers
>>
>>    Move the SiS drivers into drivers/net/ethernet/sis/ and make the
>>    necessary Kconfig and Makefile changes
>>
>>    CC: Daniele Venzano <venza@brownhat.org>
>>    CC: Francois Romieu <romieu@fr.zoreil.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                             |    4 +-
>>  drivers/net/Kconfig                     |   30 --------------------
>>  drivers/net/Makefile                    |    2 -
>>  drivers/net/ethernet/Kconfig            |    1 +
>>  drivers/net/ethernet/Makefile           |    1 +
>>  drivers/net/ethernet/sis/Kconfig        |   46 +++++++++++++++++++++++++++++++
>>  drivers/net/ethernet/sis/Makefile       |    6 ++++
>>  drivers/net/{ => ethernet/sis}/sis190.c |    0
>>  drivers/net/{ => ethernet/sis}/sis900.c |    0
>>  drivers/net/{ => ethernet/sis}/sis900.h |    0
>>  10 files changed, 56 insertions(+), 34 deletions(-)
>>
>> commit 826bef22759e1f78b284c9dc53ea442d348dbc88
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Mon Jun 13 08:23:31 2011 -0700
>>
>>    spider_net: Move the spider_net (IBM) driver
>>
>>    Move the spider_net (IBM) driver into drivers/net/ethernet/ibm/ and
>>    make the necessary Kconfig and Makefile changes
>>
>>    CC: Utz Bacher <utz.bacher@de.ibm.com>
>>    CC: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
>>    CC: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    2 +-
>>  drivers/net/Kconfig                                |    8 --------
>>  drivers/net/Makefile                               |    2 --
>>  drivers/net/ethernet/ibm/Kconfig                   |   11 ++++++++++-
>>  drivers/net/ethernet/ibm/Makefile                  |    2 ++
>>  drivers/net/{ => ethernet/ibm}/spider_net.c        |    0
>>  drivers/net/{ => ethernet/ibm}/spider_net.h        |    2 +-
>>  .../net/{ => ethernet/ibm}/spider_net_ethtool.c    |    0
>>  8 files changed, 14 insertions(+), 13 deletions(-)
>>
>> commit 776fae874e79c3bf3b6fd81eceb23993fef76c01
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Mon Jun 13 07:56:34 2011 -0700
>>
>>    mv643xx/pxa168: Move the Marvell drivers
>>
>>    Move the Marvell drivers into driver/net/ethernet/marvell and make
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Sachin Sanap <ssanap@marvell.com>
>>    CC: Zhangfei Gao <zgao6@marvell.com>
>>    CC: Philip Rakity <prakity@marvell.com>
>>    CC: Mark Brown <markb@marvell.com>
>>    CC: Lennert Buytenhek <buytenh@marvell.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                      |    2 +-
>>  drivers/net/Kconfig                              |   23 ------------
>>  drivers/net/Makefile                             |    2 -
>>  drivers/net/ethernet/Kconfig                     |    1 +
>>  drivers/net/ethernet/Makefile                    |    1 +
>>  drivers/net/ethernet/marvell/Kconfig             |   40 ++++++++++++++++++++++
>>  drivers/net/ethernet/marvell/Makefile            |    6 +++
>>  drivers/net/{ => ethernet/marvell}/mv643xx_eth.c |    0
>>  drivers/net/{ => ethernet/marvell}/pxa168_eth.c  |    0
>>  9 files changed, 49 insertions(+), 26 deletions(-)
>>
>> commit 4153aed9e3020693985219d471f8eb230a8eaefa
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Sat Jun 11 03:26:31 2011 -0700
>>
>>    ks8*/ksz8*: Move the Micrel drivers
>>
>>    Move the Micrel drivers into drivers/net/ethernet/micrel/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: Ben Dooks <ben@simtec.co.uk>
>>    CC: Tristram Ha <Tristram.Ha@micrel.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                            |   35 ----------------
>>  drivers/net/Makefile                           |    4 --
>>  drivers/net/ethernet/Kconfig                   |    1 +
>>  drivers/net/ethernet/Makefile                  |    1 +
>>  drivers/net/ethernet/micrel/Kconfig            |   51 ++++++++++++++++++++++++
>>  drivers/net/ethernet/micrel/Makefile           |    8 ++++
>>  drivers/net/{ => ethernet/micrel}/ks8842.c     |    0
>>  drivers/net/{ => ethernet/micrel}/ks8851.c     |    0
>>  drivers/net/{ => ethernet/micrel}/ks8851.h     |    0
>>  drivers/net/{ => ethernet/micrel}/ks8851_mll.c |    0
>>  drivers/net/{ => ethernet/micrel}/ksz884x.c    |    0
>>  11 files changed, 61 insertions(+), 39 deletions(-)
>>
>> commit 518f5abc833cb0c30b79161c071b7c93ed458c6d
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Sat Jun 11 02:29:36 2011 -0700
>>
>>    fsl_*/gianfar*/ucc_*: Move the Freescale drivers
>>
>>    Move the Freescale driver into drivers/net/ethernet/freescale/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: Sandeep Gopalpet <sandeep.kumar@freescale.com>
>>    CC: Andy Fleming <afleming@freescale.com>
>>    CC: Shlomi Gridish <gridish@freescale.com>
>>    CC: Li Yang <leoli@freescale.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    2 +-
>>  drivers/net/Kconfig                                |   33 -------------
>>  drivers/net/Makefile                               |   14 ------
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/freescale/Kconfig             |   48 ++++++++++++++++++++
>>  drivers/net/ethernet/freescale/Makefile            |   13 +++++
>>  .../net/{ => ethernet/freescale}/fs_enet/Kconfig   |    2 +-
>>  .../net/{ => ethernet/freescale}/fs_enet/Makefile  |    0
>>  drivers/net/{ => ethernet/freescale}/fs_enet/fec.h |    0
>>  .../freescale}/fs_enet/fs_enet-main.c              |    0
>>  .../net/{ => ethernet/freescale}/fs_enet/fs_enet.h |    0
>>  .../net/{ => ethernet/freescale}/fs_enet/mac-fcc.c |    0
>>  .../net/{ => ethernet/freescale}/fs_enet/mac-fec.c |    0
>>  .../net/{ => ethernet/freescale}/fs_enet/mac-scc.c |    0
>>  .../{ => ethernet/freescale}/fs_enet/mii-bitbang.c |    0
>>  .../net/{ => ethernet/freescale}/fs_enet/mii-fec.c |    0
>>  drivers/net/{ => ethernet/freescale}/fsl_pq_mdio.c |    0
>>  drivers/net/{ => ethernet/freescale}/fsl_pq_mdio.h |    0
>>  drivers/net/{ => ethernet/freescale}/gianfar.c     |    0
>>  drivers/net/{ => ethernet/freescale}/gianfar.h     |    0
>>  .../net/{ => ethernet/freescale}/gianfar_ethtool.c |    0
>>  drivers/net/{ => ethernet/freescale}/gianfar_ptp.c |    0
>>  .../net/{ => ethernet/freescale}/gianfar_sysfs.c   |    0
>>  drivers/net/{ => ethernet/freescale}/ucc_geth.c    |    0
>>  drivers/net/{ => ethernet/freescale}/ucc_geth.h    |    0
>>  .../{ => ethernet/freescale}/ucc_geth_ethtool.c    |    0
>>  27 files changed, 65 insertions(+), 49 deletions(-)
>>
>> commit dbf507c912fcc804a20d86d2194fc4a4298f39df
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Sat Jun 11 01:13:22 2011 -0700
>>
>>    eepro/eexpress/eth16i/ewrk3/lp486e/seeq8005/znet: Move the ISA drivers
>>
>>    Move the ISA drivers into drivers/net/ethernet/isa/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Philip Blundell <philb@gnu.org>
>>    CC: Mika Kuoppala <miku@iki.fi>
>>    CC: <bao.ha@srs.gov>
>>    CC: <aris@cathedrallabs.org>
>>    CC: David Davies <davies@maniac.ultranet.com>
>>    CC: <aeb@cwi.nl>
>>    CC: Hamish Coleman <hamish@zot.apana.org.au>
>>    CC: Donald Becker <becker@scyld.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                               |    4 +-
>>  drivers/net/Kconfig                       |   98 ----------------------------
>>  drivers/net/Makefile                      |   10 ---
>>  drivers/net/ethernet/Kconfig              |    1 +
>>  drivers/net/ethernet/Makefile             |    1 +
>>  drivers/net/ethernet/isa/Kconfig          |  101 +++++++++++++++++++++++++++++
>>  drivers/net/ethernet/isa/Makefile         |   11 +++
>>  drivers/net/{ => ethernet/isa}/eepro.c    |    0
>>  drivers/net/{ => ethernet/isa}/eexpress.c |    0
>>  drivers/net/{ => ethernet/isa}/eexpress.h |    0
>>  drivers/net/{ => ethernet/isa}/eth16i.c   |    0
>>  drivers/net/{ => ethernet/isa}/ewrk3.c    |    0
>>  drivers/net/{ => ethernet/isa}/ewrk3.h    |    0
>>  drivers/net/{ => ethernet/isa}/lp486e.c   |    0
>>  drivers/net/{ => ethernet/isa}/seeq8005.c |    0
>>  drivers/net/{ => ethernet/isa}/seeq8005.h |    0
>>  drivers/net/{ => ethernet/isa}/znet.c     |    0
>>  17 files changed, 116 insertions(+), 110 deletions(-)
>>
>> commit b8a6199b8d692ae17932b8c8cc709898255a51ad
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 20 20:43:09 2011 -0700
>>
>>    via-*: Move the VIA drivers
>>
>>    Move the VIA drivers into drivers/net/ethernet/via/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Roger Luethi <rl@hellgate.ch>
>>    CC: Francois Romieu <romieu@fr.zoreil.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                   |    4 +-
>>  drivers/net/Kconfig                           |   36 -----------------
>>  drivers/net/Makefile                          |    2 -
>>  drivers/net/ethernet/Kconfig                  |    1 +
>>  drivers/net/ethernet/Makefile                 |    1 +
>>  drivers/net/ethernet/via/Kconfig              |   52 +++++++++++++++++++++++++
>>  drivers/net/ethernet/via/Makefile             |    6 +++
>>  drivers/net/{ => ethernet/via}/via-rhine.c    |    0
>>  drivers/net/{ => ethernet/via}/via-velocity.c |    0
>>  drivers/net/{ => ethernet/via}/via-velocity.h |    0
>>  10 files changed, 62 insertions(+), 40 deletions(-)
>>
>> commit 0cc82a49e423bc0b2ee19c49ad24376d1ffccdc5
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 20 20:18:55 2011 -0700
>>
>>    skge/sky2: Move the SysKonnect Ethernet drivers
>>
>>    Move the SysKonnect (Ethernet only) drivers into drivers/net/ethernet/syskonnect/
>>    and make the necessary Kconfig and Makefile changes.
>>
>>    CC: Stephen Hemminger <shemminger@linux-foundation.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                  |    3 +-
>>  drivers/net/Kconfig                          |   58 --------------------
>>  drivers/net/Makefile                         |    2 -
>>  drivers/net/ethernet/Kconfig                 |    1 +
>>  drivers/net/ethernet/Makefile                |    1 +
>>  drivers/net/ethernet/syskonnect/Kconfig      |   74 ++++++++++++++++++++++++++
>>  drivers/net/ethernet/syskonnect/Makefile     |    6 ++
>>  drivers/net/{ => ethernet/syskonnect}/skge.c |    0
>>  drivers/net/{ => ethernet/syskonnect}/skge.h |    0
>>  drivers/net/{ => ethernet/syskonnect}/sky2.c |    0
>>  drivers/net/{ => ethernet/syskonnect}/sky2.h |    0
>>  11 files changed, 83 insertions(+), 62 deletions(-)
>>
>> commit c9e8faa7214a8911a22281e6e688e0cc69bb54b8
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 20 19:48:55 2011 -0700
>>
>>    pch_gbe: Move the OKI driver
>>
>>    Move the OKI driver into driver/net/ethernet/pch_gbe/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    Note: there is no documented maintainer for this driver, so I CC'd
>>    the last 2 major contributors.
>>
>>    CC: Tomoya <tomoya-linux@dsn.okisemi.com>
>>    CC: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                                |   19 -------------------
>>  drivers/net/Makefile                               |    1 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/pch_gbe/Kconfig               |   20 ++++++++++++++++++++
>>  drivers/net/{ => ethernet}/pch_gbe/Makefile        |    0
>>  drivers/net/{ => ethernet}/pch_gbe/pch_gbe.h       |    0
>>  drivers/net/{ => ethernet}/pch_gbe/pch_gbe_api.c   |    0
>>  drivers/net/{ => ethernet}/pch_gbe/pch_gbe_api.h   |    0
>>  .../net/{ => ethernet}/pch_gbe/pch_gbe_ethtool.c   |    0
>>  drivers/net/{ => ethernet}/pch_gbe/pch_gbe_main.c  |    0
>>  drivers/net/{ => ethernet}/pch_gbe/pch_gbe_param.c |    0
>>  drivers/net/{ => ethernet}/pch_gbe/pch_gbe_phy.c   |    0
>>  drivers/net/{ => ethernet}/pch_gbe/pch_gbe_phy.h   |    0
>>  14 files changed, 22 insertions(+), 20 deletions(-)
>>
>> commit 63e70fbc3837e36fbcc3e5b3d12eed74919e3beb
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 20 07:50:27 2011 -0700
>>
>>    ioc3-eth/meth/sgiseeq: Move the SGI drivers
>>
>>    Move the SGI drivers into drivers/net/ethernet/sgi/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Ralf Baechle <ralf@linux-mips.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                               |    2 +-
>>  drivers/net/Kconfig                       |   21 ----------------
>>  drivers/net/Makefile                      |    3 --
>>  drivers/net/ethernet/Kconfig              |    1 +
>>  drivers/net/ethernet/Makefile             |    1 +
>>  drivers/net/ethernet/sgi/Kconfig          |   37 +++++++++++++++++++++++++++++
>>  drivers/net/ethernet/sgi/Makefile         |    7 +++++
>>  drivers/net/{ => ethernet/sgi}/ioc3-eth.c |    0
>>  drivers/net/{ => ethernet/sgi}/meth.c     |    0
>>  drivers/net/{ => ethernet/sgi}/meth.h     |    0
>>  drivers/net/{ => ethernet/sgi}/sgiseeq.c  |    0
>>  drivers/net/{ => ethernet/sgi}/sgiseeq.h  |    0
>>  12 files changed, 47 insertions(+), 25 deletions(-)
>>
>> commit 33bb1962fa6983fb17a7c95a5b44be697878783b
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 20 07:15:19 2011 -0700
>>
>>    tulip: Move the tulip drivers
>>
>>    Move the tulip driver into drivers/net/ethernet/tulip/ and make
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Tobias Ringstrom <tori@unhappy.mine.nu>
>>    CC: Grant Grundler <grundler@parisc-linux.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                    |    4 ++--
>>  drivers/net/Kconfig                            |    2 --
>>  drivers/net/Makefile                           |    1 -
>>  drivers/net/ethernet/Kconfig                   |    2 ++
>>  drivers/net/ethernet/Makefile                  |    1 +
>>  drivers/net/{ => ethernet}/tulip/21142.c       |    0
>>  drivers/net/{ => ethernet}/tulip/Kconfig       |    0
>>  drivers/net/{ => ethernet}/tulip/Makefile      |    0
>>  drivers/net/{ => ethernet}/tulip/de2104x.c     |    0
>>  drivers/net/{ => ethernet}/tulip/de4x5.c       |    0
>>  drivers/net/{ => ethernet}/tulip/de4x5.h       |    0
>>  drivers/net/{ => ethernet}/tulip/dmfe.c        |    0
>>  drivers/net/{ => ethernet}/tulip/eeprom.c      |    0
>>  drivers/net/{ => ethernet}/tulip/interrupt.c   |    0
>>  drivers/net/{ => ethernet}/tulip/media.c       |    0
>>  drivers/net/{ => ethernet}/tulip/pnic.c        |    0
>>  drivers/net/{ => ethernet}/tulip/pnic2.c       |    0
>>  drivers/net/{ => ethernet}/tulip/timer.c       |    0
>>  drivers/net/{ => ethernet}/tulip/tulip.h       |    0
>>  drivers/net/{ => ethernet}/tulip/tulip_core.c  |    0
>>  drivers/net/{ => ethernet}/tulip/uli526x.c     |    0
>>  drivers/net/{ => ethernet}/tulip/winbond-840.c |    0
>>  drivers/net/{ => ethernet}/tulip/xircom_cb.c   |    0
>>  23 files changed, 5 insertions(+), 5 deletions(-)
>>
>> commit 9091cea3242dcc16138cef784c4880a819b28c1e
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 20 06:55:16 2011 -0700
>>
>>    atl*: Move the Atheros drivers
>>
>>    Move the Atheros drivers into drivers/net/ethernet/atheros/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: Jay Cliburn <jcliburn@gmail.com>
>>    CC: Chris Snook <chris.snook@gmail.com>
>>    CC: Jie Yang <jie.yang@atheros.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    2 +-
>>  drivers/net/Kconfig                                |   45 --------------
>>  drivers/net/Makefile                               |    4 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/atheros/Kconfig               |   61 ++++++++++++++++++++
>>  drivers/net/ethernet/atheros/Makefile              |    8 +++
>>  drivers/net/{ => ethernet/atheros}/atl1c/Makefile  |    0
>>  drivers/net/{ => ethernet/atheros}/atl1c/atl1c.h   |    0
>>  .../{ => ethernet/atheros}/atl1c/atl1c_ethtool.c   |    0
>>  .../net/{ => ethernet/atheros}/atl1c/atl1c_hw.c    |    0
>>  .../net/{ => ethernet/atheros}/atl1c/atl1c_hw.h    |    0
>>  .../net/{ => ethernet/atheros}/atl1c/atl1c_main.c  |    0
>>  drivers/net/{ => ethernet/atheros}/atl1e/Makefile  |    0
>>  drivers/net/{ => ethernet/atheros}/atl1e/atl1e.h   |    0
>>  .../{ => ethernet/atheros}/atl1e/atl1e_ethtool.c   |    0
>>  .../net/{ => ethernet/atheros}/atl1e/atl1e_hw.c    |    0
>>  .../net/{ => ethernet/atheros}/atl1e/atl1e_hw.h    |    0
>>  .../net/{ => ethernet/atheros}/atl1e/atl1e_main.c  |    0
>>  .../net/{ => ethernet/atheros}/atl1e/atl1e_param.c |    0
>>  drivers/net/{ => ethernet/atheros}/atlx/Makefile   |    0
>>  drivers/net/{ => ethernet/atheros}/atlx/atl1.c     |    0
>>  drivers/net/{ => ethernet/atheros}/atlx/atl1.h     |    0
>>  drivers/net/{ => ethernet/atheros}/atlx/atl2.c     |    0
>>  drivers/net/{ => ethernet/atheros}/atlx/atl2.h     |    0
>>  drivers/net/{ => ethernet/atheros}/atlx/atlx.c     |    0
>>  drivers/net/{ => ethernet/atheros}/atlx/atlx.h     |    0
>>  27 files changed, 72 insertions(+), 50 deletions(-)
>>
>> commit c97cb6d3434e3a3fa4d415f436e04475df39e443
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 20 00:04:35 2011 -0700
>>
>>    de6*/dl2k: Move the D-Link drivers
>>
>>    Move the D-Link drivers into drivers/net/ethernet/dlink/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: Bjorn Ekwall <bj0rn@blox.se>
>>    CC: Donald Becker <becker@scyld.com>
>>    CC: Edward Peng <edward_peng@dlink.com.tw>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                      |   44 ----------------------
>>  drivers/net/Makefile                     |    3 -
>>  drivers/net/ethernet/Kconfig             |    1 +
>>  drivers/net/ethernet/Makefile            |    1 +
>>  drivers/net/ethernet/dlink/Kconfig       |   60 ++++++++++++++++++++++++++++++
>>  drivers/net/ethernet/dlink/Makefile      |    7 +++
>>  drivers/net/{ => ethernet/dlink}/de600.c |    0
>>  drivers/net/{ => ethernet/dlink}/de600.h |    0
>>  drivers/net/{ => ethernet/dlink}/de620.c |    0
>>  drivers/net/{ => ethernet/dlink}/de620.h |    0
>>  drivers/net/{ => ethernet/dlink}/dl2k.c  |    0
>>  drivers/net/{ => ethernet/dlink}/dl2k.h  |    0
>>  12 files changed, 69 insertions(+), 47 deletions(-)
>>
>> commit 268a0fa7d7159b37d1123d68343c555f44221510
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu May 19 23:27:55 2011 -0700
>>
>>    8139*/atp/r8169: Move the Realtek drivers
>>
>>    Move the Realtek drivers into drivers/net/ethernet/realtek/ and make
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Realtek linux nic maintainers <nic_swsd@realtek.com>
>>    CC: Francois Romieu <romieu@fr.zoreil.com>
>>    CC: Jeff Garzik <jgarzik@pobox.com>
>>    CC: Donald Becker <becker@scyld.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                  |    2 +-
>>  drivers/net/Kconfig                          |   94 ----------------------
>>  drivers/net/Makefile                         |    4 -
>>  drivers/net/ethernet/Kconfig                 |    1 +
>>  drivers/net/ethernet/Makefile                |    1 +
>>  drivers/net/{ => ethernet/realtek}/8139cp.c  |    0
>>  drivers/net/{ => ethernet/realtek}/8139too.c |    0
>>  drivers/net/ethernet/realtek/Kconfig         |  110 ++++++++++++++++++++++++++
>>  drivers/net/ethernet/realtek/Makefile        |    8 ++
>>  drivers/net/{ => ethernet/realtek}/atp.c     |    0
>>  drivers/net/{ => ethernet/realtek}/atp.h     |    0
>>  drivers/net/{ => ethernet/realtek}/r8169.c   |    0
>>  12 files changed, 121 insertions(+), 99 deletions(-)
>>
>> commit 5fe875b9e93af6b5a099b37471bebb541f1ba0c6
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu May 19 22:06:03 2011 -0700
>>
>>    arm: Move the ARM/ACORN drivers
>>
>>    Move the ARM/ACORN drivers into drivers/net/ethernet/arm/ and make the
>>    necessary Kconfig and Makefile changes.
>>    There were 4 drivers (TI Davinci & ftmac100) not in the
>>    drivers/net/arm/ which should have been since they are only supported
>>    under ARM, so they were added to the new directory structure.
>>
>>    NOTE: There are no "maintainers" for the TI Davinci drivers, so I am
>>    CC'ing the last 3 major contributors from TI.
>>
>>    CC: Sriram <srk@ti.com>
>>    CC: Vinay Hegde <vinay.hegde@ti.com>
>>    CC: Cyril Chemparathy <cyril@ti.com>
>>    CC: Russell King <linux@arm.linux.org.uk>
>>    CC: Wan ZongShun <mcuos.com@gmail.com>
>>    CC: Lennert Buytenhek <kernel@wantstofly.org>
>>    CC: Krzysztof Halasa <khc@pm.waw.pl>
>>    CC: Po-Yu Chuang <ratbert@faraday-tech.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                    |   10 +-
>>  drivers/net/Kconfig                            |   51 ---------
>>  drivers/net/Makefile                           |    7 --
>>  drivers/net/arm/Kconfig                        |   74 -------------
>>  drivers/net/ethernet/Kconfig                   |    1 +
>>  drivers/net/ethernet/Makefile                  |    1 +
>>  drivers/net/ethernet/arm/Kconfig               |  138 ++++++++++++++++++++++++
>>  drivers/net/{ => ethernet}/arm/Makefile        |    6 +-
>>  drivers/net/{ => ethernet}/arm/am79c961a.c     |    0
>>  drivers/net/{ => ethernet}/arm/am79c961a.h     |    0
>>  drivers/net/{ => ethernet}/arm/at91_ether.c    |    0
>>  drivers/net/{ => ethernet}/arm/at91_ether.h    |    0
>>  drivers/net/{ => ethernet/arm}/davinci_cpdma.c |    0
>>  drivers/net/{ => ethernet/arm}/davinci_cpdma.h |    0
>>  drivers/net/{ => ethernet/arm}/davinci_emac.c  |    0
>>  drivers/net/{ => ethernet/arm}/davinci_mdio.c  |    0
>>  drivers/net/{ => ethernet}/arm/ep93xx_eth.c    |    0
>>  drivers/net/{ => ethernet}/arm/ether1.c        |    0
>>  drivers/net/{ => ethernet}/arm/ether1.h        |    0
>>  drivers/net/{ => ethernet}/arm/ether3.c        |    0
>>  drivers/net/{ => ethernet}/arm/ether3.h        |    0
>>  drivers/net/{ => ethernet}/arm/etherh.c        |    0
>>  drivers/net/{ => ethernet/arm}/ftgmac100.c     |    0
>>  drivers/net/{ => ethernet/arm}/ftgmac100.h     |    0
>>  drivers/net/{ => ethernet/arm}/ftmac100.c      |    0
>>  drivers/net/{ => ethernet/arm}/ftmac100.h      |    0
>>  drivers/net/{ => ethernet}/arm/ixp4xx_eth.c    |    0
>>  drivers/net/{ => ethernet}/arm/ks8695net.c     |    0
>>  drivers/net/{ => ethernet}/arm/ks8695net.h     |    0
>>  drivers/net/{ => ethernet}/arm/w90p910_ether.c |    0
>>  30 files changed, 150 insertions(+), 138 deletions(-)
>>
>> commit 17c347d9648541503aef09b95b207737b151ddea
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu May 19 20:18:50 2011 -0700
>>
>>    smsc*/smc911x: Move the SMSC drivers
>>
>>    Move the SMSC drivers into drivers/net/ethernet/smsc/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Dustin McIntire <dustin@sensoria.com>
>>    CC: Steve Glendinning <steve.glendinning@smsc.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                |    4 +-
>>  drivers/net/Kconfig                        |   54 ---------------------
>>  drivers/net/Makefile                       |    3 -
>>  drivers/net/ethernet/Kconfig               |    1 +
>>  drivers/net/ethernet/Makefile              |    1 +
>>  drivers/net/ethernet/smsc/Kconfig          |   71 ++++++++++++++++++++++++++++
>>  drivers/net/ethernet/smsc/Makefile         |    7 +++
>>  drivers/net/{ => ethernet/smsc}/smc911x.c  |    0
>>  drivers/net/{ => ethernet/smsc}/smc911x.h  |    0
>>  drivers/net/{ => ethernet/smsc}/smsc911x.c |    0
>>  drivers/net/{ => ethernet/smsc}/smsc911x.h |    0
>>  drivers/net/{ => ethernet/smsc}/smsc9420.c |    0
>>  drivers/net/{ => ethernet/smsc}/smsc9420.h |    0
>>  13 files changed, 82 insertions(+), 59 deletions(-)
>>
>> commit f93707a2948f67da9fbe12ff93f6c5a95d6fb23d
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Wed May 18 05:14:22 2011 -0700
>>
>>    *sonic/natsemi/ns83829: Move the National Semi-conductor drivers
>>
>>    Move the National Semi-conductor drivers into drivers/net/ethernet/natsemi/
>>    and make the necessary Kconfig and Makefile changes.  Also moved the 8390
>>    (National Semi-conductor) devices as a sub-menu of National Semi-conductor
>>    devices.
>>
>>    CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
>>    CC: Harald Welte <laforge@gnumonks.org>
>>    CC: Tim Hockin <thockin@hockin.org>
>>    CC: <linux-ns83820@kvack.org>
>>    CC: Kevin Chea <kchea@yahoo.com>
>>    CC: Marc Gauthier <marc@linux-xtensa.org>
>>    CC: Chris Zankel <chris@zankel.net>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                    |    4 +-
>>  drivers/net/Kconfig                            |   47 ------------------
>>  drivers/net/Makefile                           |    6 --
>>  drivers/net/ethernet/8390/Kconfig              |    6 +-
>>  drivers/net/ethernet/Kconfig                   |    3 +-
>>  drivers/net/ethernet/Makefile                  |    1 +
>>  drivers/net/ethernet/natsemi/Kconfig           |   63 ++++++++++++++++++++++++
>>  drivers/net/ethernet/natsemi/Makefile          |    9 +++
>>  drivers/net/{ => ethernet/natsemi}/jazzsonic.c |    0
>>  drivers/net/{ => ethernet/natsemi}/macsonic.c  |    0
>>  drivers/net/{ => ethernet/natsemi}/natsemi.c   |    0
>>  drivers/net/{ => ethernet/natsemi}/ns83820.c   |    0
>>  drivers/net/{ => ethernet/natsemi}/sonic.c     |    0
>>  drivers/net/{ => ethernet/natsemi}/sonic.h     |    0
>>  drivers/net/{ => ethernet/natsemi}/xtsonic.c   |    0
>>  15 files changed, 80 insertions(+), 59 deletions(-)
>>
>> commit 8a352394d237f49f4d142874057d4179a1169607
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Mon May 16 01:39:01 2011 -0700
>>
>>    bmac/mace/macmace/mac89x0/cs89x0: Move the Macintosh (Apple) drivers
>>
>>    Move the Apple drivers into driver/net/ethernet/apple/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Paul Mackerras <paulus@samba.org>
>>    CC: Paul Mackerras <paulus@au.ibm.com>
>>    CC: Russell Nelson <nelson@crynwr.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                        |   75 ----------------------
>>  drivers/net/Makefile                       |    6 --
>>  drivers/net/ethernet/Kconfig               |    1 +
>>  drivers/net/ethernet/Makefile              |    1 +
>>  drivers/net/ethernet/apple/Kconfig         |   92 ++++++++++++++++++++++++++++
>>  drivers/net/ethernet/apple/Makefile        |    9 +++
>>  drivers/net/{ => ethernet/apple}/bmac.c    |    0
>>  drivers/net/{ => ethernet/apple}/bmac.h    |    0
>>  drivers/net/{ => ethernet/apple}/cs89x0.c  |    0
>>  drivers/net/{ => ethernet/apple}/cs89x0.h  |    0
>>  drivers/net/{ => ethernet/apple}/mac89x0.c |    0
>>  drivers/net/{ => ethernet/apple}/mace.c    |    0
>>  drivers/net/{ => ethernet/apple}/mace.h    |    0
>>  drivers/net/{ => ethernet/apple}/macmace.c |    0
>>  14 files changed, 103 insertions(+), 81 deletions(-)
>>
>> commit 0222c318a10195f618d82f9f7c4e0d61564bcc5d
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Mon May 16 00:05:19 2011 -0700
>>
>>    stmmac: Move the STMicroelectronics driver
>>
>>    Move the STMicroelectronics driver into driver/net/ethernet/stmmac/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: Giuseppe Cavallaro <peppe.cavallaro@st.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    2 +-
>>  drivers/net/Kconfig                                |    2 --
>>  drivers/net/Makefile                               |    1 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/{ => ethernet}/stmmac/Kconfig          |    0
>>  drivers/net/{ => ethernet}/stmmac/Makefile         |    0
>>  drivers/net/{ => ethernet}/stmmac/common.h         |    0
>>  drivers/net/{ => ethernet}/stmmac/descs.h          |    0
>>  drivers/net/{ => ethernet}/stmmac/dwmac100.h       |    0
>>  drivers/net/{ => ethernet}/stmmac/dwmac1000.h      |    0
>>  drivers/net/{ => ethernet}/stmmac/dwmac1000_core.c |    0
>>  drivers/net/{ => ethernet}/stmmac/dwmac1000_dma.c  |    0
>>  drivers/net/{ => ethernet}/stmmac/dwmac100_core.c  |    0
>>  drivers/net/{ => ethernet}/stmmac/dwmac100_dma.c   |    0
>>  drivers/net/{ => ethernet}/stmmac/dwmac_dma.h      |    0
>>  drivers/net/{ => ethernet}/stmmac/dwmac_lib.c      |    0
>>  drivers/net/{ => ethernet}/stmmac/enh_desc.c       |    0
>>  drivers/net/{ => ethernet}/stmmac/norm_desc.c      |    0
>>  drivers/net/{ => ethernet}/stmmac/stmmac.h         |    0
>>  drivers/net/{ => ethernet}/stmmac/stmmac_ethtool.c |    0
>>  drivers/net/{ => ethernet}/stmmac/stmmac_main.c    |    0
>>  drivers/net/{ => ethernet}/stmmac/stmmac_mdio.c    |    0
>>  drivers/net/{ => ethernet}/stmmac/stmmac_timer.c   |    0
>>  drivers/net/{ => ethernet}/stmmac/stmmac_timer.h   |    0
>>  25 files changed, 3 insertions(+), 4 deletions(-)
>>
>> commit c9979075eda1f39b3cf73b51b4da05e2bc1a7a3f
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Sun May 15 21:46:41 2011 -0700
>>
>>    tehuti: Move the Tehuti driver
>>
>>    Move the Tehuti driver into drivers/net/ethernet/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Alexander Indenbaum <baum@tehutinetworks.net>
>>    CC: Andy Gospodarek <andy@greyhouse.net>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                         |    2 +-
>>  drivers/net/Kconfig                 |    6 ------
>>  drivers/net/Makefile                |    1 -
>>  drivers/net/ethernet/Kconfig        |    6 ++++++
>>  drivers/net/ethernet/Makefile       |    1 +
>>  drivers/net/{ => ethernet}/tehuti.c |    0
>>  drivers/net/{ => ethernet}/tehuti.h |    0
>>  7 files changed, 8 insertions(+), 8 deletions(-)
>>
>> commit 9b8448aa63ea26e8cbe23df6064146b2bcf1429c
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Sun May 15 20:56:37 2011 -0700
>>
>>    pasemic_mac*: Move the PA Semi driver
>>
>>    Move the PA Semi driver into drivers/net/ethernet/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Olof Johansson <olof@lixom.net>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                     |    2 +-
>>  drivers/net/Kconfig                             |    9 ---------
>>  drivers/net/Makefile                            |    2 --
>>  drivers/net/ethernet/Kconfig                    |   10 ++++++++++
>>  drivers/net/ethernet/Makefile                   |    1 +
>>  drivers/net/{ => ethernet}/pasemi_mac.c         |    0
>>  drivers/net/{ => ethernet}/pasemi_mac.h         |    0
>>  drivers/net/{ => ethernet}/pasemi_mac_ethtool.c |    0
>>  8 files changed, 12 insertions(+), 12 deletions(-)
>>
>> commit 8f45b84e5a50e13e530ccd7277e87e21bf9d3824
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 13 22:20:35 2011 -0700
>>
>>    enic: Move the Cisco driver
>>
>>    Move the Cisco driver into drivers/net/ethernet/enic/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Scott Feldman <scofeldm@cisco.com>
>>    CC: Christian Benvenuti <benve@cisco.com>
>>    CC: Vasanthy Kolluri <vkolluri@cisco.com>
>>    CC: Roopa Prabhu <roprabhu@cisco.com>
>>    CC: David Wang <dwang2@cisco.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                     |    2 +-
>>  drivers/net/Kconfig                             |    6 ------
>>  drivers/net/Makefile                            |    1 -
>>  drivers/net/ethernet/Kconfig                    |    1 +
>>  drivers/net/ethernet/Makefile                   |    1 +
>>  drivers/net/ethernet/enic/Kconfig               |    9 +++++++++
>>  drivers/net/{ => ethernet}/enic/Makefile        |    0
>>  drivers/net/{ => ethernet}/enic/cq_desc.h       |    0
>>  drivers/net/{ => ethernet}/enic/cq_enet_desc.h  |    0
>>  drivers/net/{ => ethernet}/enic/enic.h          |    0
>>  drivers/net/{ => ethernet}/enic/enic_dev.c      |    0
>>  drivers/net/{ => ethernet}/enic/enic_dev.h      |    0
>>  drivers/net/{ => ethernet}/enic/enic_main.c     |    0
>>  drivers/net/{ => ethernet}/enic/enic_pp.c       |    0
>>  drivers/net/{ => ethernet}/enic/enic_pp.h       |    0
>>  drivers/net/{ => ethernet}/enic/enic_res.c      |    0
>>  drivers/net/{ => ethernet}/enic/enic_res.h      |    0
>>  drivers/net/{ => ethernet}/enic/rq_enet_desc.h  |    0
>>  drivers/net/{ => ethernet}/enic/vnic_cq.c       |    0
>>  drivers/net/{ => ethernet}/enic/vnic_cq.h       |    0
>>  drivers/net/{ => ethernet}/enic/vnic_dev.c      |    0
>>  drivers/net/{ => ethernet}/enic/vnic_dev.h      |    0
>>  drivers/net/{ => ethernet}/enic/vnic_devcmd.h   |    0
>>  drivers/net/{ => ethernet}/enic/vnic_enet.h     |    0
>>  drivers/net/{ => ethernet}/enic/vnic_intr.c     |    0
>>  drivers/net/{ => ethernet}/enic/vnic_intr.h     |    0
>>  drivers/net/{ => ethernet}/enic/vnic_nic.h      |    0
>>  drivers/net/{ => ethernet}/enic/vnic_resource.h |    0
>>  drivers/net/{ => ethernet}/enic/vnic_rq.c       |    0
>>  drivers/net/{ => ethernet}/enic/vnic_rq.h       |    0
>>  drivers/net/{ => ethernet}/enic/vnic_rss.h      |    0
>>  drivers/net/{ => ethernet}/enic/vnic_stats.h    |    0
>>  drivers/net/{ => ethernet}/enic/vnic_vic.c      |    0
>>  drivers/net/{ => ethernet}/enic/vnic_vic.h      |    0
>>  drivers/net/{ => ethernet}/enic/vnic_wq.c       |    0
>>  drivers/net/{ => ethernet}/enic/vnic_wq.h       |    0
>>  drivers/net/{ => ethernet}/enic/wq_enet_desc.h  |    0
>>  37 files changed, 12 insertions(+), 8 deletions(-)
>>
>> commit 21b49617eef3976ebbd73cb4bf1a1f2f6902dbbf
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 13 14:29:12 2011 -0700
>>
>>    ehea/ibm*: Move the IBM drivers
>>
>>    Move the IBM drivers into drivers/net/ethernet/ibm/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Christoph Raisch <raisch@de.ibm.com>
>>    CC: Alfred Arnold <alfred.arnold@lancom.de>
>>    CC: Santiago Leon <santil@linux.vnet.ibm.com>
>>    CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    4 +-
>>  drivers/net/Kconfig                                |   37 --------------
>>  drivers/net/Makefile                               |    4 --
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/ibm/Kconfig                   |   53 ++++++++++++++++++++
>>  drivers/net/ethernet/ibm/Makefile                  |    8 +++
>>  drivers/net/{ => ethernet/ibm}/ehea/Makefile       |    0
>>  drivers/net/{ => ethernet/ibm}/ehea/ehea.h         |    0
>>  drivers/net/{ => ethernet/ibm}/ehea/ehea_ethtool.c |    0
>>  drivers/net/{ => ethernet/ibm}/ehea/ehea_hw.h      |    0
>>  drivers/net/{ => ethernet/ibm}/ehea/ehea_main.c    |    0
>>  drivers/net/{ => ethernet/ibm}/ehea/ehea_phyp.c    |    0
>>  drivers/net/{ => ethernet/ibm}/ehea/ehea_phyp.h    |    0
>>  drivers/net/{ => ethernet/ibm}/ehea/ehea_qmr.c     |    0
>>  drivers/net/{ => ethernet/ibm}/ehea/ehea_qmr.h     |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/Kconfig |    2 +-
>>  .../net/{ => ethernet/ibm}/ibm_newemac/Makefile    |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/core.c  |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/core.h  |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/debug.c |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/debug.h |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/emac.h  |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/mal.c   |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/mal.h   |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/phy.c   |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/phy.h   |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/rgmii.c |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/rgmii.h |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/tah.c   |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/tah.h   |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/zmii.c  |    0
>>  drivers/net/{ => ethernet/ibm}/ibm_newemac/zmii.h  |    0
>>  drivers/net/{ => ethernet/ibm}/ibmlana.c           |    0
>>  drivers/net/{ => ethernet/ibm}/ibmlana.h           |    0
>>  drivers/net/{ => ethernet/ibm}/ibmveth.c           |    0
>>  drivers/net/{ => ethernet/ibm}/ibmveth.h           |    0
>>  37 files changed, 66 insertions(+), 44 deletions(-)
>>
>> commit a5c1daab860bc137dafadc061e48f4153ce89a31
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 13 02:51:01 2011 -0700
>>
>>    s2io/vxge: Move the Exar drivers
>>
>>    Move the Exar drivers into drivers/net/ethernet/exar/ and make the
>>    necessary Kconfig and Makefile changes.
>>
>>    CC: Jon Mason <jdmason@kudzu.us>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    3 +-
>>  drivers/net/Kconfig                                |   34 -------------
>>  drivers/net/Makefile                               |    2 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/exar/Kconfig                  |   50 ++++++++++++++++++++
>>  drivers/net/ethernet/exar/Makefile                 |    6 ++
>>  drivers/net/{ => ethernet/exar}/s2io-regs.h        |    0
>>  drivers/net/{ => ethernet/exar}/s2io.c             |    0
>>  drivers/net/{ => ethernet/exar}/s2io.h             |    0
>>  drivers/net/{ => ethernet/exar}/vxge/Makefile      |    0
>>  drivers/net/{ => ethernet/exar}/vxge/vxge-config.c |    0
>>  drivers/net/{ => ethernet/exar}/vxge/vxge-config.h |    0
>>  .../net/{ => ethernet/exar}/vxge/vxge-ethtool.c    |    0
>>  .../net/{ => ethernet/exar}/vxge/vxge-ethtool.h    |    0
>>  drivers/net/{ => ethernet/exar}/vxge/vxge-main.c   |    0
>>  drivers/net/{ => ethernet/exar}/vxge/vxge-main.h   |    0
>>  drivers/net/{ => ethernet/exar}/vxge/vxge-reg.h    |    0
>>  .../net/{ => ethernet/exar}/vxge/vxge-traffic.c    |    0
>>  .../net/{ => ethernet/exar}/vxge/vxge-traffic.h    |    0
>>  .../net/{ => ethernet/exar}/vxge/vxge-version.h    |    0
>>  21 files changed, 59 insertions(+), 38 deletions(-)
>>
>> commit 83df87d655e25119eafaeb4225bc5eedaa82c6e0
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 13 02:24:46 2011 -0700
>>
>>    myri*: Move the Myricom drivers
>>
>>    Move the Myricom drivers into drivers/net/ethernet/myricom/ and make
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Andrew Gallatin <gallatin@myri.com>
>>    CC: Brice Goglin <brice@myri.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    2 +-
>>  drivers/net/Kconfig                                |   35 -------------
>>  drivers/net/Makefile                               |    3 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/myricom/Kconfig               |   51 ++++++++++++++++++++
>>  drivers/net/ethernet/myricom/Makefile              |    6 ++
>>  .../net/{ => ethernet/myricom}/myri10ge/Makefile   |    0
>>  .../net/{ => ethernet/myricom}/myri10ge/myri10ge.c |    0
>>  .../{ => ethernet/myricom}/myri10ge/myri10ge_mcp.h |    0
>>  .../myricom}/myri10ge/myri10ge_mcp_gen_header.h    |    0
>>  drivers/net/{ => ethernet/myricom}/myri_sbus.c     |    0
>>  drivers/net/{ => ethernet/myricom}/myri_sbus.h     |    0
> 
> /me puts on Myricom hat
> 
> I believe we want to put the driver above in the sbus/legacy
> directory.  Better yet, move this driver to /dev/null.  There is no
> possibility of ethernet mode on this adapter, so it's Myrinet only.
> It won't inter-op with modern versions of Myrinet, and thus can only
> work with legacy adapters.  There are no drivers for the PCI version
> of this adapter, so it only can work on ~15year old hardware.  It's
> long in the tooth, let's take it to the knackers.
> 
> Thanks,
> Jon
> 
>>  13 files changed, 60 insertions(+), 39 deletions(-)
>>
>> commit c04bd079e4ab82c5ee8fd0cb526f16e9ffce9360
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 13 01:32:22 2011 -0700
>>
>>    mlx4: Move the Mellanox driver
>>
>>    Moves the Mellanox driver into drivers/net/ethernet/mlx4/ and make
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Roland Dreier <roland@kernel.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                            |   24 ---------------------
>>  drivers/net/Makefile                           |    1 -
>>  drivers/net/ethernet/Kconfig                   |    1 +
>>  drivers/net/ethernet/Makefile                  |    1 +
>>  drivers/net/ethernet/mlx4/Kconfig              |   27 ++++++++++++++++++++++++
>>  drivers/net/{ => ethernet}/mlx4/Makefile       |    0
>>  drivers/net/{ => ethernet}/mlx4/alloc.c        |    0
>>  drivers/net/{ => ethernet}/mlx4/catas.c        |    0
>>  drivers/net/{ => ethernet}/mlx4/cmd.c          |    0
>>  drivers/net/{ => ethernet}/mlx4/cq.c           |    0
>>  drivers/net/{ => ethernet}/mlx4/en_cq.c        |    0
>>  drivers/net/{ => ethernet}/mlx4/en_ethtool.c   |    0
>>  drivers/net/{ => ethernet}/mlx4/en_main.c      |    0
>>  drivers/net/{ => ethernet}/mlx4/en_netdev.c    |    0
>>  drivers/net/{ => ethernet}/mlx4/en_port.c      |    0
>>  drivers/net/{ => ethernet}/mlx4/en_port.h      |    0
>>  drivers/net/{ => ethernet}/mlx4/en_resources.c |    0
>>  drivers/net/{ => ethernet}/mlx4/en_rx.c        |    0
>>  drivers/net/{ => ethernet}/mlx4/en_selftest.c  |    0
>>  drivers/net/{ => ethernet}/mlx4/en_tx.c        |    0
>>  drivers/net/{ => ethernet}/mlx4/eq.c           |    0
>>  drivers/net/{ => ethernet}/mlx4/fw.c           |    0
>>  drivers/net/{ => ethernet}/mlx4/fw.h           |    0
>>  drivers/net/{ => ethernet}/mlx4/icm.c          |    0
>>  drivers/net/{ => ethernet}/mlx4/icm.h          |    0
>>  drivers/net/{ => ethernet}/mlx4/intf.c         |    0
>>  drivers/net/{ => ethernet}/mlx4/main.c         |    0
>>  drivers/net/{ => ethernet}/mlx4/mcg.c          |    0
>>  drivers/net/{ => ethernet}/mlx4/mlx4.h         |    0
>>  drivers/net/{ => ethernet}/mlx4/mlx4_en.h      |    0
>>  drivers/net/{ => ethernet}/mlx4/mr.c           |    0
>>  drivers/net/{ => ethernet}/mlx4/pd.c           |    0
>>  drivers/net/{ => ethernet}/mlx4/port.c         |    0
>>  drivers/net/{ => ethernet}/mlx4/profile.c      |    0
>>  drivers/net/{ => ethernet}/mlx4/qp.c           |    0
>>  drivers/net/{ => ethernet}/mlx4/reset.c        |    0
>>  drivers/net/{ => ethernet}/mlx4/sense.c        |    0
>>  drivers/net/{ => ethernet}/mlx4/srq.c          |    0
>>  38 files changed, 29 insertions(+), 25 deletions(-)
>>
>> commit d911fd7be681f8833f8ff12efade39df79970653
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 13 01:00:03 2011 -0700
>>
>>    bna: Move the Brocade driver
>>
>>    Moves the Brocade driver into drivers/net/ethernet/bna/ and make
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Rasesh Mody <rmody@brocade.com>
>>    CC: Debashis Dutt <ddutt@brocade.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/bna/Kconfig                   |   17 +++++++++++++++++
>>  drivers/net/{ => ethernet}/bna/Makefile            |    0
>>  drivers/net/{ => ethernet}/bna/bfa_cee.c           |    0
>>  drivers/net/{ => ethernet}/bna/bfa_cee.h           |    0
>>  drivers/net/{ => ethernet}/bna/bfa_defs.h          |    0
>>  drivers/net/{ => ethernet}/bna/bfa_defs_cna.h      |    0
>>  drivers/net/{ => ethernet}/bna/bfa_defs_mfg_comm.h |    0
>>  drivers/net/{ => ethernet}/bna/bfa_defs_status.h   |    0
>>  drivers/net/{ => ethernet}/bna/bfa_ioc.c           |    0
>>  drivers/net/{ => ethernet}/bna/bfa_ioc.h           |    0
>>  drivers/net/{ => ethernet}/bna/bfa_ioc_ct.c        |    0
>>  drivers/net/{ => ethernet}/bna/bfa_sm.h            |    0
>>  drivers/net/{ => ethernet}/bna/bfa_wc.h            |    0
>>  drivers/net/{ => ethernet}/bna/bfi.h               |    0
>>  drivers/net/{ => ethernet}/bna/bfi_cna.h           |    0
>>  drivers/net/{ => ethernet}/bna/bfi_ctreg.h         |    0
>>  drivers/net/{ => ethernet}/bna/bfi_ll.h            |    0
>>  drivers/net/{ => ethernet}/bna/bna.h               |    0
>>  drivers/net/{ => ethernet}/bna/bna_ctrl.c          |    0
>>  drivers/net/{ => ethernet}/bna/bna_hw.h            |    0
>>  drivers/net/{ => ethernet}/bna/bna_txrx.c          |    0
>>  drivers/net/{ => ethernet}/bna/bna_types.h         |    0
>>  drivers/net/{ => ethernet}/bna/bnad.c              |    0
>>  drivers/net/{ => ethernet}/bna/bnad.h              |    0
>>  drivers/net/{ => ethernet}/bna/bnad_ethtool.c      |    0
>>  drivers/net/{ => ethernet}/bna/cna.h               |    0
>>  drivers/net/{ => ethernet}/bna/cna_fwimg.c         |    0
>>  32 files changed, 20 insertions(+), 16 deletions(-)
>>
>> commit 931da59411e60574a1235d0ad2d63ebd1638a859
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 13 00:37:27 2011 -0700
>>
>>    be2net: Move the BladeEngine 2 driver
>>
>>    Moves the Server Engine driver into drivers/net/ethernet/benet/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: Sathya Perla <sathya.perla@emulex.com>
>>    CC: Subbu Seetharaman <subbu.seetharaman@emulex.com>
>>    CC: Ajit Khaparde <ajit.khaparde@emulex.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                   |    2 +-
>>  drivers/net/Kconfig                           |    2 --
>>  drivers/net/Makefile                          |    1 -
>>  drivers/net/ethernet/Kconfig                  |    1 +
>>  drivers/net/ethernet/Makefile                 |    1 +
>>  drivers/net/{ => ethernet}/benet/Kconfig      |    0
>>  drivers/net/{ => ethernet}/benet/Makefile     |    0
>>  drivers/net/{ => ethernet}/benet/be.h         |    0
>>  drivers/net/{ => ethernet}/benet/be_cmds.c    |    0
>>  drivers/net/{ => ethernet}/benet/be_cmds.h    |    0
>>  drivers/net/{ => ethernet}/benet/be_ethtool.c |    0
>>  drivers/net/{ => ethernet}/benet/be_hw.h      |    0
>>  drivers/net/{ => ethernet}/benet/be_main.c    |    0
>>  13 files changed, 3 insertions(+), 4 deletions(-)
>>
>> commit 64648e513185522cd665bfece6d024d3c05588ed
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri May 13 00:17:42 2011 -0700
>>
>>    sfc: Move the Solarflare drivers
>>
>>    Moves the Solarflare drivers into drivers/net/ethernet/sfc/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: Steve Hodgson <shodgson@solarflare.com>
>>    CC: Ben Hutchings <bhutchings@solarflare.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                    |    2 +-
>>  drivers/net/Kconfig                            |    2 --
>>  drivers/net/Makefile                           |    1 -
>>  drivers/net/ethernet/Kconfig                   |    1 +
>>  drivers/net/ethernet/Makefile                  |    1 +
>>  drivers/net/{ => ethernet}/sfc/Kconfig         |    0
>>  drivers/net/{ => ethernet}/sfc/Makefile        |    0
>>  drivers/net/{ => ethernet}/sfc/bitfield.h      |    0
>>  drivers/net/{ => ethernet}/sfc/efx.c           |    0
>>  drivers/net/{ => ethernet}/sfc/efx.h           |    0
>>  drivers/net/{ => ethernet}/sfc/enum.h          |    0
>>  drivers/net/{ => ethernet}/sfc/ethtool.c       |    0
>>  drivers/net/{ => ethernet}/sfc/falcon.c        |    0
>>  drivers/net/{ => ethernet}/sfc/falcon_boards.c |    0
>>  drivers/net/{ => ethernet}/sfc/falcon_xmac.c   |    0
>>  drivers/net/{ => ethernet}/sfc/filter.c        |    0
>>  drivers/net/{ => ethernet}/sfc/filter.h        |    0
>>  drivers/net/{ => ethernet}/sfc/io.h            |    0
>>  drivers/net/{ => ethernet}/sfc/mac.h           |    0
>>  drivers/net/{ => ethernet}/sfc/mcdi.c          |    0
>>  drivers/net/{ => ethernet}/sfc/mcdi.h          |    0
>>  drivers/net/{ => ethernet}/sfc/mcdi_mac.c      |    0
>>  drivers/net/{ => ethernet}/sfc/mcdi_pcol.h     |    0
>>  drivers/net/{ => ethernet}/sfc/mcdi_phy.c      |    0
>>  drivers/net/{ => ethernet}/sfc/mdio_10g.c      |    0
>>  drivers/net/{ => ethernet}/sfc/mdio_10g.h      |    0
>>  drivers/net/{ => ethernet}/sfc/mtd.c           |    0
>>  drivers/net/{ => ethernet}/sfc/net_driver.h    |    0
>>  drivers/net/{ => ethernet}/sfc/nic.c           |    0
>>  drivers/net/{ => ethernet}/sfc/nic.h           |    0
>>  drivers/net/{ => ethernet}/sfc/phy.h           |    0
>>  drivers/net/{ => ethernet}/sfc/qt202x_phy.c    |    0
>>  drivers/net/{ => ethernet}/sfc/regs.h          |    0
>>  drivers/net/{ => ethernet}/sfc/rx.c            |    0
>>  drivers/net/{ => ethernet}/sfc/selftest.c      |    0
>>  drivers/net/{ => ethernet}/sfc/selftest.h      |    0
>>  drivers/net/{ => ethernet}/sfc/siena.c         |    0
>>  drivers/net/{ => ethernet}/sfc/spi.h           |    0
>>  drivers/net/{ => ethernet}/sfc/tenxpress.c     |    0
>>  drivers/net/{ => ethernet}/sfc/tx.c            |    0
>>  drivers/net/{ => ethernet}/sfc/txc43128_phy.c  |    0
>>  drivers/net/{ => ethernet}/sfc/workarounds.h   |    0
>>  42 files changed, 3 insertions(+), 4 deletions(-)
>>
>> commit a9f8e9475d4f7c91880050634e923d62e369a0ed
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu May 12 23:04:46 2011 -0700
>>
>>    cassini/niu/sun*: Move the Sun drivers
>>
>>    Moves the Sun drivers into drivers/net/ethernet/sun/ and make
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Sam Creasey <sammy@sammy.net>
>>    CC: Adrian Sun <asun@darksunrising.com>
>>    CC: Benjamin Herrenscmidt <benh@kernel.crashing.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                 |    1 +
>>  drivers/net/Kconfig                         |   75 ----------------------
>>  drivers/net/Makefile                        |   10 +---
>>  drivers/net/ethernet/Kconfig                |    1 +
>>  drivers/net/ethernet/Makefile               |    1 +
>>  drivers/net/ethernet/sun/Kconfig            |   91 +++++++++++++++++++++++++++
>>  drivers/net/ethernet/sun/Makefile           |   12 ++++
>>  drivers/net/{ => ethernet/sun}/cassini.c    |    0
>>  drivers/net/{ => ethernet/sun}/cassini.h    |    0
>>  drivers/net/{ => ethernet/sun}/niu.c        |    0
>>  drivers/net/{ => ethernet/sun}/niu.h        |    0
>>  drivers/net/{ => ethernet/sun}/sun3_82586.c |    0
>>  drivers/net/{ => ethernet/sun}/sun3_82586.h |    0
>>  drivers/net/{ => ethernet/sun}/sunbmac.c    |    0
>>  drivers/net/{ => ethernet/sun}/sunbmac.h    |    0
>>  drivers/net/{ => ethernet/sun}/sungem.c     |    0
>>  drivers/net/{ => ethernet/sun}/sungem.h     |    0
>>  drivers/net/{ => ethernet/sun}/sungem_phy.c |    0
>>  drivers/net/{ => ethernet/sun}/sungem_phy.h |    0
>>  drivers/net/{ => ethernet/sun}/sunhme.c     |    0
>>  drivers/net/{ => ethernet/sun}/sunhme.h     |    0
>>  drivers/net/{ => ethernet/sun}/sunqe.c      |    0
>>  drivers/net/{ => ethernet/sun}/sunqe.h      |    0
>>  drivers/net/{ => ethernet/sun}/sunvnet.c    |    0
>>  drivers/net/{ => ethernet/sun}/sunvnet.h    |    0
>>  drivers/net/spider_net.h                    |    2 +-
>>  26 files changed, 108 insertions(+), 85 deletions(-)
>>
>> commit c1b4800864efcbacb0f02047609b41c9ab5290e6
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu May 12 21:21:33 2011 -0700
>>
>>    ni5*/ni65: Move the Racal-Interlan (Micom) drivers
>>
>>    Moves the Racal-Interlan drivers into drivers/net/ethernet/racal/ and
>>    make the necessary Kconfig and Makefile changes.
>>
>>    CC: "Jan-Pascal van Best" <janpascal@vanbest.org>
>>    CC: Andreas Mohr <andi@lisas.de>
>>    CC: "M.Hipp" <hippm@informatik.uni-tuebingen.de>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                               |    2 +-
>>  drivers/net/Kconfig                       |   47 ---------------------------
>>  drivers/net/Makefile                      |    3 --
>>  drivers/net/ethernet/Kconfig              |    1 +
>>  drivers/net/ethernet/Makefile             |    1 +
>>  drivers/net/ethernet/racal/Kconfig        |   50 +++++++++++++++++++++++++++++
>>  drivers/net/ethernet/racal/Makefile       |    7 ++++
>>  drivers/net/{ => ethernet/racal}/ni5010.c |    0
>>  drivers/net/{ => ethernet/racal}/ni5010.h |    0
>>  drivers/net/{ => ethernet/racal}/ni52.c   |    0
>>  drivers/net/{ => ethernet/racal}/ni52.h   |    0
>>  drivers/net/{ => ethernet/racal}/ni65.c   |    0
>>  drivers/net/{ => ethernet/racal}/ni65.h   |    0
>>  13 files changed, 60 insertions(+), 51 deletions(-)
>>
>> commit 671dc5b8fb145ff8748cdc2aeffd1ef56af8bd67
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu May 12 20:21:07 2011 -0700
>>
>>    smc: Move the SMC drivers
>>
>>    Moves the SMC drivers into drivers/net/ethernet/smc/ and the
>>    necessary Kconfig and Makefile changes.  Also did some cleanup
>>    of NET_VENDOR_SMC Kconfig tag for the 8390 based drivers.
>>
>>    CC: Nicolas Pitre <nico@fluxnic.net>
>>    CC: Donald Becker <becker@scyld.com>
>>    CC: Erik Stahlman <erik@vt.edu>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                              |    2 +-
>>  drivers/net/Kconfig                      |   51 -------------------------
>>  drivers/net/Makefile                     |    4 --
>>  drivers/net/ethernet/8390/Kconfig        |   21 ++--------
>>  drivers/net/ethernet/Kconfig             |    1 +
>>  drivers/net/ethernet/Makefile            |    1 +
>>  drivers/net/ethernet/qlogic/Kconfig      |    7 +++
>>  drivers/net/ethernet/qlogic/Makefile     |    1 +
>>  drivers/net/ethernet/smc/Kconfig         |   61 ++++++++++++++++++++++++++++++
>>  drivers/net/ethernet/smc/Makefile        |    7 +++
>>  drivers/net/{ => ethernet/smc}/epic100.c |    0
>>  drivers/net/{ => ethernet/smc}/smc9194.c |    0
>>  drivers/net/{ => ethernet/smc}/smc9194.h |    0
>>  drivers/net/{ => ethernet/smc}/smc91x.c  |    0
>>  drivers/net/{ => ethernet/smc}/smc91x.h  |    0
>>  15 files changed, 83 insertions(+), 73 deletions(-)
>>
>> commit e9f8a5c9b5f8f469bcfae06ddd10e9dc9537f7bb
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Fri Apr 8 19:06:30 2011 -0700
>>
>>    qlogic: Move the QLogic drivers
>>
>>    Moves the QLogic drivers into drivers/net/ethernet/qlogic/ and
>>    the necessary Kconfig and Makefile changes.
>>
>>    CC: Ron Mercer <ron.mercer@qlogic.com>
>>    CC: Amit Kumar Salecha <amit.salecha@qlogic.com>
>>    CC: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    6 +-
>>  drivers/net/Kconfig                                |   26 ------------
>>  drivers/net/Makefile                               |    3 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/qlogic/Kconfig                |   42 ++++++++++++++++++++
>>  drivers/net/ethernet/qlogic/Makefile               |    7 +++
>>  drivers/net/{ => ethernet/qlogic}/netxen/Makefile  |    0
>>  .../net/{ => ethernet/qlogic}/netxen/netxen_nic.h  |    0
>>  .../{ => ethernet/qlogic}/netxen/netxen_nic_ctx.c  |    0
>>  .../qlogic}/netxen/netxen_nic_ethtool.c            |    0
>>  .../{ => ethernet/qlogic}/netxen/netxen_nic_hdr.h  |    0
>>  .../{ => ethernet/qlogic}/netxen/netxen_nic_hw.c   |    0
>>  .../{ => ethernet/qlogic}/netxen/netxen_nic_hw.h   |    0
>>  .../{ => ethernet/qlogic}/netxen/netxen_nic_init.c |    0
>>  .../{ => ethernet/qlogic}/netxen/netxen_nic_main.c |    0
>>  drivers/net/{ => ethernet/qlogic}/qla3xxx.c        |    0
>>  drivers/net/{ => ethernet/qlogic}/qla3xxx.h        |    0
>>  drivers/net/{ => ethernet/qlogic}/qlcnic/Makefile  |    0
>>  drivers/net/{ => ethernet/qlogic}/qlcnic/qlcnic.h  |    0
>>  .../net/{ => ethernet/qlogic}/qlcnic/qlcnic_ctx.c  |    0
>>  .../{ => ethernet/qlogic}/qlcnic/qlcnic_ethtool.c  |    0
>>  .../net/{ => ethernet/qlogic}/qlcnic/qlcnic_hdr.h  |    0
>>  .../net/{ => ethernet/qlogic}/qlcnic/qlcnic_hw.c   |    0
>>  .../net/{ => ethernet/qlogic}/qlcnic/qlcnic_init.c |    0
>>  .../net/{ => ethernet/qlogic}/qlcnic/qlcnic_main.c |    0
>>  drivers/net/{ => ethernet/qlogic}/qlge/Makefile    |    0
>>  drivers/net/{ => ethernet/qlogic}/qlge/qlge.h      |    0
>>  drivers/net/{ => ethernet/qlogic}/qlge/qlge_dbg.c  |    0
>>  .../net/{ => ethernet/qlogic}/qlge/qlge_ethtool.c  |    0
>>  drivers/net/{ => ethernet/qlogic}/qlge/qlge_main.c |    0
>>  drivers/net/{ => ethernet/qlogic}/qlge/qlge_mpi.c  |    0
>>  32 files changed, 54 insertions(+), 32 deletions(-)
>>
>> commit f8e68b0056ef20887bdfdc31ff061d67e81308e2
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu Apr 7 07:42:33 2011 -0700
>>
>>    intel: Move the Intel wired LAN drivers
>>
>>    Moves the Intel wired LAN drivers into drivers/net/ethernet/intel/ and
>>    the necessary Kconfig and Makefile changes.
>>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |   11 +-
>>  drivers/net/Kconfig                                |  200 ------------------
>>  drivers/net/Makefile                               |    8 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/intel/Kconfig                 |  216 ++++++++++++++++++++
>>  drivers/net/ethernet/intel/Makefile                |   12 +
>>  drivers/net/{ => ethernet/intel}/e100.c            |    0
>>  drivers/net/{ => ethernet/intel}/e1000/Makefile    |    0
>>  drivers/net/{ => ethernet/intel}/e1000/e1000.h     |    0
>>  .../net/{ => ethernet/intel}/e1000/e1000_ethtool.c |    0
>>  drivers/net/{ => ethernet/intel}/e1000/e1000_hw.c  |    0
>>  drivers/net/{ => ethernet/intel}/e1000/e1000_hw.h  |    0
>>  .../net/{ => ethernet/intel}/e1000/e1000_main.c    |    0
>>  .../net/{ => ethernet/intel}/e1000/e1000_osdep.h   |    0
>>  .../net/{ => ethernet/intel}/e1000/e1000_param.c   |    0
>>  .../intel/e1000e/80003es2lan.c}                    |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/82571.c    |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/Makefile   |    2 +-
>>  drivers/net/{ => ethernet/intel}/e1000e/defines.h  |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/e1000.h    |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/ethtool.c  |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/hw.h       |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/ich8lan.c  |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/lib.c      |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/netdev.c   |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/param.c    |    0
>>  drivers/net/{ => ethernet/intel}/e1000e/phy.c      |    0
>>  drivers/net/{ => ethernet/intel}/igb/Makefile      |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_82575.c |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_82575.h |    0
>>  .../net/{ => ethernet/intel}/igb/e1000_defines.h   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_hw.h    |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_mac.c   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_mac.h   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_mbx.c   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_mbx.h   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_nvm.c   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_nvm.h   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_phy.c   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_phy.h   |    0
>>  drivers/net/{ => ethernet/intel}/igb/e1000_regs.h  |    0
>>  drivers/net/{ => ethernet/intel}/igb/igb.h         |    0
>>  drivers/net/{ => ethernet/intel}/igb/igb_ethtool.c |    0
>>  drivers/net/{ => ethernet/intel}/igb/igb_main.c    |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/Makefile    |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/defines.h   |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/ethtool.c   |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/igbvf.h     |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/mbx.c       |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/mbx.h       |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/netdev.c    |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/regs.h      |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/vf.c        |    0
>>  drivers/net/{ => ethernet/intel}/igbvf/vf.h        |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/Makefile     |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb.h       |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb_ee.c    |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb_ee.h    |    0
>>  .../net/{ => ethernet/intel}/ixgb/ixgb_ethtool.c   |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb_hw.c    |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb_hw.h    |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb_ids.h   |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb_main.c  |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb_osdep.h |    0
>>  drivers/net/{ => ethernet/intel}/ixgb/ixgb_param.c |    0
>>  drivers/net/{ => ethernet/intel}/ixgbe/Makefile    |    0
>>  drivers/net/{ => ethernet/intel}/ixgbe/ixgbe.h     |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_82598.c   |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_82599.c   |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_common.c  |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_common.h  |    0
>>  drivers/net/{ => ethernet/intel}/ixgbe/ixgbe_dcb.c |    0
>>  drivers/net/{ => ethernet/intel}/ixgbe/ixgbe_dcb.h |    0
>>  .../{ => ethernet/intel}/ixgbe/ixgbe_dcb_82598.c   |    0
>>  .../{ => ethernet/intel}/ixgbe/ixgbe_dcb_82598.h   |    0
>>  .../{ => ethernet/intel}/ixgbe/ixgbe_dcb_82599.c   |    0
>>  .../{ => ethernet/intel}/ixgbe/ixgbe_dcb_82599.h   |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_dcb_nl.c  |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_ethtool.c |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_fcoe.c    |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_fcoe.h    |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_main.c    |    0
>>  drivers/net/{ => ethernet/intel}/ixgbe/ixgbe_mbx.c |    0
>>  drivers/net/{ => ethernet/intel}/ixgbe/ixgbe_mbx.h |    0
>>  drivers/net/{ => ethernet/intel}/ixgbe/ixgbe_phy.c |    0
>>  drivers/net/{ => ethernet/intel}/ixgbe/ixgbe_phy.h |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_sriov.c   |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_sriov.h   |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_type.h    |    0
>>  .../net/{ => ethernet/intel}/ixgbe/ixgbe_x540.c    |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/Makefile  |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/defines.h |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/ethtool.c |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/ixgbevf.h |    0
>>  .../{ => ethernet/intel}/ixgbevf/ixgbevf_main.c    |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/mbx.c     |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/mbx.h     |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/regs.h    |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/vf.c      |    0
>>  drivers/net/{ => ethernet/intel}/ixgbevf/vf.h      |    0
>>  101 files changed, 233 insertions(+), 218 deletions(-)
>>
>> commit e9518ae90966c061c0efa161e885ba23bda6c0a8
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu Apr 7 06:57:17 2011 -0700
>>
>>    chelsio: Move the Chelsio drivers
>>
>>    Moves the drivers for the Chelsio chipsets into
>>    drivers/net/ethernet/chelsio/ and the necessary Kconfig and Makefile
>>    changes.
>>
>>    CC: Divy Le Ray <divy@chelsio.com>
>>    CC: Dimitris Michailidis <dm@chelsio.com>
>>    CC: Casey Leedom <leedom@chelsio.com>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |    6 +-
>>  drivers/net/Kconfig                                |   86 ----------------
>>  drivers/net/Makefile                               |    4 -
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/chelsio/Kconfig               |  102 ++++++++++++++++++++
>>  drivers/net/ethernet/chelsio/Makefile              |    8 ++
>>  .../{chelsio => ethernet/chelsio/cxgb}/Makefile    |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/common.h    |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/cphy.h  |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/cpl5_cmd.h  |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/cxgb2.c |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/elmer0.h    |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/espi.c  |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/espi.h  |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/fpga_defs.h |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/gmac.h  |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/mv88e1xxx.c |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/mv88e1xxx.h |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/mv88x201x.c |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/my3126.c    |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/pm3393.c    |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/regs.h  |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/sge.c   |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/sge.h   |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/subr.c  |    0
>>  .../chelsio/cxgb}/suni1x10gexp_regs.h              |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/tp.c    |    0
>>  .../net/{chelsio => ethernet/chelsio/cxgb}/tp.h    |    0
>>  .../{chelsio => ethernet/chelsio/cxgb}/vsc7326.c   |    0
>>  .../chelsio/cxgb}/vsc7326_reg.h                    |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/Makefile  |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/adapter.h |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/ael1002.c |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/aq100x.c  |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/common.h  |    0
>>  .../{ => ethernet/chelsio}/cxgb3/cxgb3_ctl_defs.h  |    0
>>  .../net/{ => ethernet/chelsio}/cxgb3/cxgb3_defs.h  |    0
>>  .../net/{ => ethernet/chelsio}/cxgb3/cxgb3_ioctl.h |    0
>>  .../net/{ => ethernet/chelsio}/cxgb3/cxgb3_main.c  |    0
>>  .../{ => ethernet/chelsio}/cxgb3/cxgb3_offload.c   |    0
>>  .../{ => ethernet/chelsio}/cxgb3/cxgb3_offload.h   |    0
>>  .../chelsio}/cxgb3/firmware_exports.h              |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/l2t.c     |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/l2t.h     |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/mc5.c     |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/regs.h    |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/sge.c     |    0
>>  .../net/{ => ethernet/chelsio}/cxgb3/sge_defs.h    |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/t3_cpl.h  |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/t3_hw.c   |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/t3cdev.h  |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/version.h |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/vsc8211.c |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb3/xgmac.c   |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/Makefile  |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/cxgb4.h   |    0
>>  .../net/{ => ethernet/chelsio}/cxgb4/cxgb4_main.c  |    0
>>  .../net/{ => ethernet/chelsio}/cxgb4/cxgb4_uld.h   |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/l2t.c     |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/l2t.h     |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/sge.c     |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/t4_hw.c   |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/t4_hw.h   |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/t4_msg.h  |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4/t4_regs.h |    0
>>  .../net/{ => ethernet/chelsio}/cxgb4/t4fw_api.h    |    0
>>  .../net/{ => ethernet/chelsio}/cxgb4vf/Makefile    |    0
>>  .../net/{ => ethernet/chelsio}/cxgb4vf/adapter.h   |    0
>>  .../{ => ethernet/chelsio}/cxgb4vf/cxgb4vf_main.c  |    0
>>  drivers/net/{ => ethernet/chelsio}/cxgb4vf/sge.c   |    0
>>  .../{ => ethernet/chelsio}/cxgb4vf/t4vf_common.h   |    0
>>  .../net/{ => ethernet/chelsio}/cxgb4vf/t4vf_defs.h |    0
>>  .../net/{ => ethernet/chelsio}/cxgb4vf/t4vf_hw.c   |    0
>>  74 files changed, 115 insertions(+), 93 deletions(-)
>>
>> commit 1e954aa058cd1496b47b914878509e9ecf136d05
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Thu Apr 7 06:03:04 2011 -0700
>>
>>    broadcom: Move the Broadcom drivers
>>
>>    Moves the drivers for Broadcom devices into
>>    drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile
>>    changes.
>>
>>    CC: Eilon Greenstein <eilong@broadcom.com>
>>    CC: Michael Chan <mchan@broadcom.com>
>>    CC: Matt Carlson <mcarlson@broadcom.com>
>>    CC: Gary Zambrano <zambrano@broadcom.com>
>>    CC: "Maciej W. Rozycki" <macro@linux-mips.org>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                        |   10 +-
>>  drivers/net/Kconfig                                |   99 -----------------
>>  drivers/net/Makefile                               |    7 --
>>  drivers/net/ethernet/Kconfig                       |    1 +
>>  drivers/net/ethernet/Makefile                      |    1 +
>>  drivers/net/ethernet/broadcom/Kconfig              |  114 ++++++++++++++++++++
>>  drivers/net/ethernet/broadcom/Makefile             |   11 ++
>>  drivers/net/{ => ethernet/broadcom}/b44.c          |    0
>>  drivers/net/{ => ethernet/broadcom}/b44.h          |    0
>>  drivers/net/{ => ethernet/broadcom}/bcm63xx_enet.c |    0
>>  drivers/net/{ => ethernet/broadcom}/bcm63xx_enet.h |    0
>>  drivers/net/{ => ethernet/broadcom}/bnx2.c         |    0
>>  drivers/net/{ => ethernet/broadcom}/bnx2.h         |    0
>>  drivers/net/{ => ethernet/broadcom}/bnx2_fw.h      |    0
>>  drivers/net/{ => ethernet/broadcom}/bnx2x/Makefile |    0
>>  drivers/net/{ => ethernet/broadcom}/bnx2x/bnx2x.h  |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_cmn.c  |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_cmn.h  |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_dcb.c  |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_dcb.h  |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_dump.h |    0
>>  .../{ => ethernet/broadcom}/bnx2x/bnx2x_ethtool.c  |    0
>>  .../{ => ethernet/broadcom}/bnx2x/bnx2x_fw_defs.h  |    0
>>  .../broadcom}/bnx2x/bnx2x_fw_file_hdr.h            |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_hsi.h  |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_init.h |    0
>>  .../{ => ethernet/broadcom}/bnx2x/bnx2x_init_ops.h |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_link.c |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_link.h |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_main.c |    0
>>  .../net/{ => ethernet/broadcom}/bnx2x/bnx2x_reg.h  |    0
>>  .../{ => ethernet/broadcom}/bnx2x/bnx2x_stats.c    |    0
>>  .../{ => ethernet/broadcom}/bnx2x/bnx2x_stats.h    |    0
>>  drivers/net/{ => ethernet/broadcom}/cnic.c         |    4 +-
>>  drivers/net/{ => ethernet/broadcom}/cnic.h         |    0
>>  drivers/net/{ => ethernet/broadcom}/cnic_defs.h    |    0
>>  drivers/net/{ => ethernet/broadcom}/cnic_if.h      |    0
>>  drivers/net/{ => ethernet/broadcom}/sb1250-mac.c   |    0
>>  drivers/net/{ => ethernet/broadcom}/tg3.c          |    0
>>  drivers/net/{ => ethernet/broadcom}/tg3.h          |    0
>>  40 files changed, 134 insertions(+), 113 deletions(-)
>>
>> commit 29072561a23c3802112a94fa0a9383773056f19a
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Sat Apr 2 06:20:12 2011 -0700
>>
>>    8390: Move the 8390 related drivers
>>
>>    Moves the drivers for the National Semi-conductor 8390 chipset into
>>    drivers/net/ethernet/8390/ and the necessary Kconfig and Makefile
>>    changes.
>>
>>    CC: Donald Becker <becker@scyld.com>
>>    CC: Paul Gortmaker <paul.gortmaker@windriver.com>
>>    CC: Alain Malek <alain.malek@cryogen.com>
>>    CC: Peter De Schrijver <p2@mind.be>
>>    CC: "David Huggins-Daines" <dhd@debian.org>
>>    CC: Wim Dumon <wimpie@kotnet.org>
>>    CC: Yoshinori Sato <ysato@users.sourceforge.jp>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                                   |    5 +-
>>  drivers/net/Kconfig                           |  283 -----------------------
>>  drivers/net/Makefile                          |   22 --
>>  drivers/net/ethernet/3com/Makefile            |    2 +-
>>  drivers/net/{ => ethernet/8390}/8390.c        |    0
>>  drivers/net/{ => ethernet/8390}/8390.h        |    0
>>  drivers/net/{ => ethernet/8390}/8390p.c       |    0
>>  drivers/net/ethernet/8390/Kconfig             |  301 +++++++++++++++++++++++++
>>  drivers/net/ethernet/8390/Makefile            |   26 +++
>>  drivers/net/{ => ethernet/8390}/ac3200.c      |    0
>>  drivers/net/{ => ethernet/8390}/apne.c        |    0
>>  drivers/net/{ => ethernet/8390}/ax88796.c     |    0
>>  drivers/net/{ => ethernet/8390}/e2100.c       |    0
>>  drivers/net/{ => ethernet/8390}/es3210.c      |    0
>>  drivers/net/{ => ethernet/8390}/hp-plus.c     |    0
>>  drivers/net/{ => ethernet/8390}/hp.c          |    0
>>  drivers/net/{ => ethernet/8390}/hydra.c       |    0
>>  drivers/net/{ => ethernet/8390}/lib8390.c     |    0
>>  drivers/net/{ => ethernet/8390}/lne390.c      |    0
>>  drivers/net/{ => ethernet/8390}/mac8390.c     |    0
>>  drivers/net/{ => ethernet/8390}/ne-h8300.c    |    0
>>  drivers/net/{ => ethernet/8390}/ne.c          |    0
>>  drivers/net/{ => ethernet/8390}/ne2k-pci.c    |    0
>>  drivers/net/{ => ethernet/8390}/ne3210.c      |    0
>>  drivers/net/{ => ethernet/8390}/smc-mca.c     |    0
>>  drivers/net/{ => ethernet/8390}/smc-ultra.c   |    0
>>  drivers/net/{ => ethernet/8390}/smc-ultra32.c |    0
>>  drivers/net/{ => ethernet/8390}/stnic.c       |    0
>>  drivers/net/{ => ethernet/8390}/wd.c          |    0
>>  drivers/net/{ => ethernet/8390}/zorro8390.c   |    0
>>  drivers/net/ethernet/Kconfig                  |    1 +
>>  drivers/net/ethernet/Makefile                 |    1 +
>>  32 files changed, 332 insertions(+), 309 deletions(-)
>>
>> commit 6b9ef2886e37d62018cd72dcdd2918e9fb982aed
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Wed Mar 30 07:46:36 2011 -0700
>>
>>    amd8111e/pcnet32/*lance/mvme147: Move AMD chipset drivers
>>
>>    Moves the drivers for the AMD chipsets into drivers/net/ethernet/amd/
>>    and the necessary Kconfig and Makfile changes.
>>
>>    CC: Peter Maydell <pmaydell@chiark.greenend.org.uk>
>>    CC: Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
>>    CC: "Maciej W. Rozycki" <macro@linux-mips.org>
>>    CC: Donald Becker <becker@scyld.com>
>>    CC: Sam Creasey <sammy@users.qual.net>
>>    CC: Miguel de Icaza <miguel@nuclecu.unam.mx>
>>    CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig                         |   99 -----------------------
>>  drivers/net/Makefile                        |    9 --
>>  drivers/net/ethernet/Kconfig                |    1 +
>>  drivers/net/ethernet/Makefile               |    1 +
>>  drivers/net/{ => ethernet/amd}/7990.c       |    0
>>  drivers/net/{ => ethernet/amd}/7990.h       |    0
>>  drivers/net/ethernet/amd/Kconfig            |  115 +++++++++++++++++++++++++++
>>  drivers/net/ethernet/amd/Makefile           |   13 +++
>>  drivers/net/{ => ethernet/amd}/amd8111e.c   |    0
>>  drivers/net/{ => ethernet/amd}/amd8111e.h   |    0
>>  drivers/net/{ => ethernet/amd}/atarilance.c |    0
>>  drivers/net/{ => ethernet/amd}/declance.c   |    0
>>  drivers/net/{ => ethernet/amd}/hplance.c    |    0
>>  drivers/net/{ => ethernet/amd}/hplance.h    |    0
>>  drivers/net/{ => ethernet/amd}/lance.c      |    0
>>  drivers/net/{ => ethernet/amd}/mvme147.c    |    0
>>  drivers/net/{ => ethernet/amd}/pcnet32.c    |    0
>>  drivers/net/{ => ethernet/amd}/sun3lance.c  |    0
>>  drivers/net/{ => ethernet/amd}/sunlance.c   |    0
>>  19 files changed, 130 insertions(+), 108 deletions(-)
>>
>> commit b2ee2cf62d14c842272db622d6be6374bc6d622a
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Wed Mar 30 03:47:06 2011 -0700
>>
>>    3c*/acenic/typhoon: Move 3Com Ethernet drivers
>>
>>    Moves the 3Com drivers into drivers/net/ethernet/3com/ and the necessary
>>    Kconfig and Makefile changes.
>>
>>    CC: Philip Blundell <philb@gnu.org>
>>    CC: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
>>    CC: David Dillow <dave@thedillows.org>
>>    CC: Jes Sorensen <jes@trained-monkey.org>
>>    CC: Alan Cox <alan@linux.intel.com>
>>    CC: Donald Becker <becker@scyld.com>
>>    CC: Craig Southeren <craigs@ineluki.apana.org.au>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  MAINTAINERS                               |    8 +-
>>  drivers/net/Kconfig                       |  177 ----------------------------
>>  drivers/net/Makefile                      |   12 +--
>>  drivers/net/{ => ethernet/3com}/3c501.c   |    0
>>  drivers/net/{ => ethernet/3com}/3c501.h   |    0
>>  drivers/net/{ => ethernet/3com}/3c503.c   |    0
>>  drivers/net/{ => ethernet/3com}/3c503.h   |    0
>>  drivers/net/{ => ethernet/3com}/3c505.c   |    0
>>  drivers/net/{ => ethernet/3com}/3c505.h   |    0
>>  drivers/net/{ => ethernet/3com}/3c507.c   |    0
>>  drivers/net/{ => ethernet/3com}/3c509.c   |    0
>>  drivers/net/{ => ethernet/3com}/3c515.c   |    0
>>  drivers/net/{ => ethernet/3com}/3c523.c   |    0
>>  drivers/net/{ => ethernet/3com}/3c523.h   |    0
>>  drivers/net/{ => ethernet/3com}/3c527.c   |    0
>>  drivers/net/{ => ethernet/3com}/3c527.h   |    0
>>  drivers/net/{ => ethernet/3com}/3c59x.c   |    0
>>  drivers/net/ethernet/3com/Kconfig         |  180 +++++++++++++++++++++++++++++
>>  drivers/net/ethernet/3com/Makefile        |   15 +++
>>  drivers/net/{ => ethernet/3com}/acenic.c  |    0
>>  drivers/net/{ => ethernet/3com}/acenic.h  |    0
>>  drivers/net/{ => ethernet/3com}/typhoon.c |    0
>>  drivers/net/{ => ethernet/3com}/typhoon.h |    0
>>  drivers/net/ethernet/Kconfig              |    2 +
>>  drivers/net/ethernet/Makefile             |    1 +
>>  25 files changed, 203 insertions(+), 192 deletions(-)
>>
>> commit b918e3bb62b873c5436d413b99f593b3eed78901
>> Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date:   Tue Mar 29 18:25:21 2011 -0700
>>
>>    drivers/net/ethernet: Add ethernet dir and config option
>>
>>    This is the initial patch to organize the drivers/net directory
>>    structure and networking device driver config options.  This patch
>>    does the following:
>>      - add drivers/net/ethernet/Kconfig
>>      - integrate the new files into the existing config
>>
>>    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>  drivers/net/Kconfig           |    2 ++
>>  drivers/net/Makefile          |    2 +-
>>  drivers/net/ethernet/Kconfig  |   14 ++++++++++++++
>>  drivers/net/ethernet/Makefile |    4 ++++
>>  4 files changed, 21 insertions(+), 1 deletions(-)
>>
>>
>>
>> --
>> 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
>>
> --
> 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
> 


^ permalink raw reply

* Re: linux-next: build failure after merge of the final tree (net tree related)
From: Alexey Dobriyan @ 2011-06-23 13:04 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David Miller, netdev, linux-next, linux-kernel
In-Reply-To: <20110623152920.31b28b00.sfr@canb.auug.org.au>

On Thu, Jun 23, 2011 at 8:29 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:

I build on all powerpc defconfigs, somehow this driver is not pinned
by any of them :^)

> drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'

^ permalink raw reply

* bridge: Only flood unregistered groups to routers
From: Herbert Xu @ 2011-06-23 12:39 UTC (permalink / raw)
  To: David S. Miller, netdev

Hi:

bridge: Only flood traffic for unregistered groups to routers

The bridge currently floods packets to groups that we have never
seen before to all ports.  This is not required by RFC4541 and
in fact it is not desirable in environment where traffic to
unregistered group is always present.

This patch changes the behaviour so that we only send traffic
to unregistered groups to ports marked as routers.

The user can always force flooding behaviour to any given port
by marking it as a router.

Note that this change does not apply to traffic to 224.0.0.X
as traffic to those groups must always be flooded to all ports.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 29b9812..2d85ca7 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1379,8 +1379,11 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,
 	if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
 		return -EINVAL;
 
-	if (iph->protocol != IPPROTO_IGMP)
+	if (iph->protocol != IPPROTO_IGMP) {
+		if ((iph->daddr & IGMP_LOCAL_GROUP_MASK) != IGMP_LOCAL_GROUP)
+			BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
 		return 0;
+	}
 
 	len = ntohs(iph->tot_len);
 	if (skb->len < len || len < ip_hdrlen(skb))

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related

* Re: [PATCH 4/5] pm: move pm notifiers into suspend.h
From: Rafael J. Wysocki @ 2011-06-23 12:04 UTC (permalink / raw)
  To: Cong Wang
  Cc: linux-kernel, akpm, netdev, Chris Ball, Len Brown, Pavel Machek,
	Ohad Ben-Cohen, Linus Walleij, Philip Rakity, David S. Miller,
	Lucas De Marchi, Paul E. McKenney, Josh Triplett, linux-mmc,
	linux-pm
In-Reply-To: <4E02C93A.7010601@redhat.com>

On Thursday, June 23, 2011, Cong Wang wrote:
> 于 2011年06月23日 03:49, Rafael J. Wysocki 写道:
> >> +#ifdef CONFIG_PM
> >> >  +#include<linux/suspend.h>
> >> >  +#endif
> > I don't think the #ifdef in necessary.  Any dependencies on CONFIG_PM
> > (or CONFIG_SUSPEND etc.) should be taken care of inside of suspend.h.
> > This file should be fixed if they aren't.
> >
> 
> Ok, please check the updated version below.

That's fine by me.  Please feel free to add my ACK to the patch.

Thanks,
Rafael

^ permalink raw reply

* Re: [PATCH] net/usb: kalmia: Various fixes for better support of non-x86 architectures.
From: Sergei Shtylyov @ 2011-06-23 10:46 UTC (permalink / raw)
  To: Marius B. Kotsbak
  Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Marius B. Kotsbak
In-Reply-To: <1308756376-9920-1-git-send-email-marius-iy5w9mehe2BBDgjK7y7TUQ@public.gmane.org>

Hello.

On 22-06-2011 19:26, Marius B. Kotsbak wrote:

> -Support for big endian.
> -Do not use USB buffers at the stack.
> -Safer/more efficient code for local constants.

> Signed-off-by: Marius B. Kotsbak<marius-iy5w9mehe2BBDgjK7y7TUQ@public.gmane.org>
> ---
>   drivers/net/usb/kalmia.c |   40 ++++++++++++++++++++++++----------------
>   1 files changed, 24 insertions(+), 16 deletions(-)

> diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c
> index d965fb1..d4edeb2 100644
> --- a/drivers/net/usb/kalmia.c
> +++ b/drivers/net/usb/kalmia.c
> @@ -100,27 +100,35 @@ kalmia_send_init_packet(struct usbnet *dev, u8 *init_msg, u8 init_msg_len,
>   static int
>   kalmia_init_and_get_ethernet_addr(struct usbnet *dev, u8 *ethernet_addr)
>   {
> -	char init_msg_1[] =
> +	const static char init_msg_1[] =
>   		{ 0x57, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
>   		0x00, 0x00 };
> -	char init_msg_2[] =
> +	const static char init_msg_2[] =
>   		{ 0x57, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf4,
>   		0x00, 0x00 };

    Actually 'const' alone should've been enough for the variable to be placed 
in the data section ISO stack.

> -	char receive_buf[28];
> +	const static int buflen = 28;

    Why declare it at all, when it's used only once?

> +	char *usb_buf;
>   	int status;
>
> -	status = kalmia_send_init_packet(dev, init_msg_1, sizeof(init_msg_1)
> -		/ sizeof(init_msg_1[0]), receive_buf, 24);
> +	usb_buf = kmalloc(buflen, GFP_DMA | GFP_KERNEL);
> +	if (!usb_buf)
> +		return -ENOMEM;
> +
> +	memcpy(usb_buf, init_msg_1, 12);

    s/12/sizeof(init_msg_1)/

> +	status = kalmia_send_init_packet(dev, usb_buf, sizeof(init_msg_1)
> +		/ sizeof(init_msg_1[0]), usb_buf, 24);

    There's ARRAY_SIZE() macro to replace:

sizeof(init_msg_1) / sizeof(init_msg_1[0])

    and why not use just sizeof(init_msg_1)?

>   	if (status != 0)
>   		return status;
>
> -	status = kalmia_send_init_packet(dev, init_msg_2, sizeof(init_msg_2)
> -		/ sizeof(init_msg_2[0]), receive_buf, 28);
> +	memcpy(usb_buf, init_msg_2, 12);

    s/12/sizeof(init_msg_2)/

> +	status = kalmia_send_init_packet(dev, usb_buf, sizeof(init_msg_2)
> +		/ sizeof(init_msg_2[0]), usb_buf, 28);

    The same comment here about:

sizeof(init_msg_2) / sizeof(init_msg_2[0])

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [patch] net/usb/kalmia: signedness bug in kalmia_bind()
From: David Miller @ 2011-06-23 10:15 UTC (permalink / raw)
  To: error27-Re5JQEeQqe8AvxtiuMwx3w
  Cc: gregkh-l3A5Bk7waGM, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20110623055637.GL14591-z0WHZYlhLlzP0Z7Jsv878P8+0UxHXcjY@public.gmane.org>

From: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Thu, 23 Jun 2011 08:56:37 +0300

> "status" should be an int here for the error handling to work.
> 
> Signed-off-by: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [patch -next] dcb: use nlmsg_free() instead of kfree()
From: David Miller @ 2011-06-23 10:14 UTC (permalink / raw)
  To: error27; +Cc: john.r.fastabend, shmulikr, netdev, kernel-janitors
In-Reply-To: <20110623055802.GN14591@shale.localdomain>

From: Dan Carpenter <error27@gmail.com>
Date: Thu, 23 Jun 2011 08:58:02 +0300

> These sk_buff structs were allocated with nlmsg_new() so they should
> be freed with nlmsg_free().
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied, thanks Dan.

^ permalink raw reply

* Re: [PATCH net-next] bonding: add min links parameter to 802.3ad
From: David Miller @ 2011-06-23  9:13 UTC (permalink / raw)
  To: andy; +Cc: shemminger, fbl, fubar, netdev
In-Reply-To: <20110623015806.GO21309@gospo.rdu.redhat.com>

From: Andy Gospodarek <andy@greyhouse.net>
Date: Wed, 22 Jun 2011 21:58:06 -0400

> On Wed, Jun 22, 2011 at 12:54:39PM -0700, Stephen Hemminger wrote:
>> This adds support for a configuring the minimum number of links that
>> must be active before asserting carrier. It is similar to the Cisco
>> EtherChannel min-links feature. This allows setting the minimum number
>> of member ports that must be up (link-up state) before marking the
>> bond device as up (carrier on). This is useful for situations where
>> higher level services such as clustering want to ensure a minimum
>> number of low bandwidth links are active before switchover.
>> 
>> See:
>>    http://bugzilla.vyatta.com/show_bug.cgi?id=7196
>> 
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>> 
>> ---
>> v2 - need to transition to carrier_off if insufficient number of links
>>      and whitespace cleanup
>> 
> 
> Looks good.  Thanks for fixing bond_3ad_set_carrier.
> 
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>

Applied, thanks everyone.

^ permalink raw reply

* [PATCH 7/8] lib8390: Remove unnecessary extern
From: Joe Perches @ 2011-06-23  6:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1308810463.git.joe@perches.com>

Already declared in 8390.h

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/lib8390.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 946b255..05ae214 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -108,7 +108,6 @@ int ei_debug = 1;
 /* Index to functions. */
 static void ei_tx_intr(struct net_device *dev);
 static void ei_tx_err(struct net_device *dev);
-void ei_tx_timeout(struct net_device *dev);
 static void ei_receive(struct net_device *dev);
 static void ei_rx_overrun(struct net_device *dev);
 
-- 
1.7.6.rc3


^ permalink raw reply related

* [PATCH 1/8] ariadne: Update style, neaten, restructure to eliminate prototypes
From: Joe Perches @ 2011-06-23  6:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1308810463.git.joe@perches.com>

Convert to current logging styles.
Move code blocks to eliminate need for prototypes.
Use tabs for code indent and sandardize spacing.
Comment neatening.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ariadne.c | 1267 +++++++++++++++++++++++--------------------------
 1 files changed, 601 insertions(+), 666 deletions(-)

diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c
index b7f45cd..7ed78f4 100644
--- a/drivers/net/ariadne.c
+++ b/drivers/net/ariadne.c
@@ -34,6 +34,9 @@
  *	- an MC68230 Parallel Interface/Timer configured as 2 parallel ports
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+/*#define DEBUG*/
+
 #include <linux/module.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
@@ -54,802 +57,734 @@
 
 #include "ariadne.h"
 
-
 #ifdef ARIADNE_DEBUG
 int ariadne_debug = ARIADNE_DEBUG;
 #else
 int ariadne_debug = 1;
 #endif
 
+/* Macros to Fix Endianness problems */
 
-    /*
-     *	Macros to Fix Endianness problems
-     */
-
-				/* Swap the Bytes in a WORD */
-#define swapw(x)	(((x>>8)&0x00ff)|((x<<8)&0xff00))
-				/* Get the Low BYTE in a WORD */
-#define lowb(x)		(x&0xff)
-				/* Get the Swapped High WORD in a LONG */
-#define swhighw(x)	((((x)>>8)&0xff00)|(((x)>>24)&0x00ff))
-				/* Get the Swapped Low WORD in a LONG */
-#define swloww(x)	((((x)<<8)&0xff00)|(((x)>>8)&0x00ff))
+/* Swap the Bytes in a WORD */
+#define swapw(x)	(((x >> 8) & 0x00ff) | ((x << 8) & 0xff00))
+/* Get the Low BYTE in a WORD */
+#define lowb(x)		(x & 0xff)
+/* Get the Swapped High WORD in a LONG */
+#define swhighw(x)	((((x) >> 8) & 0xff00) | (((x) >> 24) & 0x00ff))
+/* Get the Swapped Low WORD in a LONG */
+#define swloww(x)	((((x) << 8) & 0xff00) | (((x) >> 8) & 0x00ff))
 
-
-    /*
-     *	Transmit/Receive Ring Definitions
-     */
+/* Transmit/Receive Ring Definitions */
 
 #define TX_RING_SIZE	5
 #define RX_RING_SIZE	16
 
 #define PKT_BUF_SIZE	1520
 
-
-    /*
-     *	Private Device Data
-     */
+/* Private Device Data */
 
 struct ariadne_private {
-    volatile struct TDRE *tx_ring[TX_RING_SIZE];
-    volatile struct RDRE *rx_ring[RX_RING_SIZE];
-    volatile u_short *tx_buff[TX_RING_SIZE];
-    volatile u_short *rx_buff[RX_RING_SIZE];
-    int cur_tx, cur_rx;			/* The next free ring entry */
-    int dirty_tx;			/* The ring entries to be free()ed. */
-    char tx_full;
+	volatile struct TDRE *tx_ring[TX_RING_SIZE];
+	volatile struct RDRE *rx_ring[RX_RING_SIZE];
+	volatile u_short *tx_buff[TX_RING_SIZE];
+	volatile u_short *rx_buff[RX_RING_SIZE];
+	int cur_tx, cur_rx;		/* The next free ring entry */
+	int dirty_tx;			/* The ring entries to be free()ed */
+	char tx_full;
 };
 
-
-    /*
-     *	Structure Created in the Ariadne's RAM Buffer
-     */
+/* Structure Created in the Ariadne's RAM Buffer */
 
 struct lancedata {
-    struct TDRE tx_ring[TX_RING_SIZE];
-    struct RDRE rx_ring[RX_RING_SIZE];
-    u_short tx_buff[TX_RING_SIZE][PKT_BUF_SIZE/sizeof(u_short)];
-    u_short rx_buff[RX_RING_SIZE][PKT_BUF_SIZE/sizeof(u_short)];
+	struct TDRE tx_ring[TX_RING_SIZE];
+	struct RDRE rx_ring[RX_RING_SIZE];
+	u_short tx_buff[TX_RING_SIZE][PKT_BUF_SIZE / sizeof(u_short)];
+	u_short rx_buff[RX_RING_SIZE][PKT_BUF_SIZE / sizeof(u_short)];
 };
 
-static int ariadne_open(struct net_device *dev);
-static void ariadne_init_ring(struct net_device *dev);
-static netdev_tx_t ariadne_start_xmit(struct sk_buff *skb,
-				      struct net_device *dev);
-static void ariadne_tx_timeout(struct net_device *dev);
-static int ariadne_rx(struct net_device *dev);
-static void ariadne_reset(struct net_device *dev);
-static irqreturn_t ariadne_interrupt(int irq, void *data);
-static int ariadne_close(struct net_device *dev);
-static struct net_device_stats *ariadne_get_stats(struct net_device *dev);
-static void set_multicast_list(struct net_device *dev);
-
-
 static void memcpyw(volatile u_short *dest, u_short *src, int len)
 {
-    while (len >= 2) {
-	*(dest++) = *(src++);
-	len -= 2;
-    }
-    if (len == 1)
-	*dest = (*(u_char *)src)<<8;
+	while (len >= 2) {
+		*(dest++) = *(src++);
+		len -= 2;
+	}
+	if (len == 1)
+		*dest = (*(u_char *)src) << 8;
 }
 
+static void ariadne_init_ring(struct net_device *dev)
+{
+	struct ariadne_private *priv = netdev_priv(dev);
+	volatile struct lancedata *lancedata = (struct lancedata *)dev->mem_start;
+	int i;
 
-static int __devinit ariadne_init_one(struct zorro_dev *z,
-				      const struct zorro_device_id *ent);
-static void __devexit ariadne_remove_one(struct zorro_dev *z);
-
-
-static struct zorro_device_id ariadne_zorro_tbl[] __devinitdata = {
-    { ZORRO_PROD_VILLAGE_TRONIC_ARIADNE },
-    { 0 }
-};
-MODULE_DEVICE_TABLE(zorro, ariadne_zorro_tbl);
+	netif_stop_queue(dev);
 
-static struct zorro_driver ariadne_driver = {
-    .name	= "ariadne",
-    .id_table	= ariadne_zorro_tbl,
-    .probe	= ariadne_init_one,
-    .remove	= __devexit_p(ariadne_remove_one),
-};
+	priv->tx_full = 0;
+	priv->cur_rx = priv->cur_tx = 0;
+	priv->dirty_tx = 0;
+
+	/* Set up TX Ring */
+	for (i = 0; i < TX_RING_SIZE; i++) {
+		volatile struct TDRE *t = &lancedata->tx_ring[i];
+		t->TMD0 = swloww(ARIADNE_RAM +
+				 offsetof(struct lancedata, tx_buff[i]));
+		t->TMD1 = swhighw(ARIADNE_RAM +
+				  offsetof(struct lancedata, tx_buff[i])) |
+			TF_STP | TF_ENP;
+		t->TMD2 = swapw((u_short)-PKT_BUF_SIZE);
+		t->TMD3 = 0;
+		priv->tx_ring[i] = &lancedata->tx_ring[i];
+		priv->tx_buff[i] = lancedata->tx_buff[i];
+		netdev_dbg(dev, "TX Entry %2d at %p, Buf at %p\n",
+			   i, &lancedata->tx_ring[i], lancedata->tx_buff[i]);
+	}
 
-static const struct net_device_ops ariadne_netdev_ops = {
-	.ndo_open		= ariadne_open,
-	.ndo_stop		= ariadne_close,
-	.ndo_start_xmit		= ariadne_start_xmit,
-	.ndo_tx_timeout		= ariadne_tx_timeout,
-	.ndo_get_stats		= ariadne_get_stats,
-	.ndo_set_multicast_list	= set_multicast_list,
-	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_change_mtu		= eth_change_mtu,
-	.ndo_set_mac_address	= eth_mac_addr,
-};
+	/* Set up RX Ring */
+	for (i = 0; i < RX_RING_SIZE; i++) {
+		volatile struct RDRE *r = &lancedata->rx_ring[i];
+		r->RMD0 = swloww(ARIADNE_RAM +
+				 offsetof(struct lancedata, rx_buff[i]));
+		r->RMD1 = swhighw(ARIADNE_RAM +
+				  offsetof(struct lancedata, rx_buff[i])) |
+			RF_OWN;
+		r->RMD2 = swapw((u_short)-PKT_BUF_SIZE);
+		r->RMD3 = 0x0000;
+		priv->rx_ring[i] = &lancedata->rx_ring[i];
+		priv->rx_buff[i] = lancedata->rx_buff[i];
+		netdev_dbg(dev, "RX Entry %2d at %p, Buf at %p\n",
+			   i, &lancedata->rx_ring[i], lancedata->rx_buff[i]);
+	}
+}
 
-static int __devinit ariadne_init_one(struct zorro_dev *z,
-				      const struct zorro_device_id *ent)
+static int ariadne_rx(struct net_device *dev)
 {
-    unsigned long board = z->resource.start;
-    unsigned long base_addr = board+ARIADNE_LANCE;
-    unsigned long mem_start = board+ARIADNE_RAM;
-    struct resource *r1, *r2;
-    struct net_device *dev;
-    struct ariadne_private *priv;
-    int err;
-
-    r1 = request_mem_region(base_addr, sizeof(struct Am79C960), "Am79C960");
-    if (!r1)
-	return -EBUSY;
-    r2 = request_mem_region(mem_start, ARIADNE_RAM_SIZE, "RAM");
-    if (!r2) {
-	release_mem_region(base_addr, sizeof(struct Am79C960));
-	return -EBUSY;
-    }
-
-    dev = alloc_etherdev(sizeof(struct ariadne_private));
-    if (dev == NULL) {
-	release_mem_region(base_addr, sizeof(struct Am79C960));
-	release_mem_region(mem_start, ARIADNE_RAM_SIZE);
-	return -ENOMEM;
-    }
-
-    priv = netdev_priv(dev);
-
-    r1->name = dev->name;
-    r2->name = dev->name;
-
-    dev->dev_addr[0] = 0x00;
-    dev->dev_addr[1] = 0x60;
-    dev->dev_addr[2] = 0x30;
-    dev->dev_addr[3] = (z->rom.er_SerialNumber>>16) & 0xff;
-    dev->dev_addr[4] = (z->rom.er_SerialNumber>>8) & 0xff;
-    dev->dev_addr[5] = z->rom.er_SerialNumber & 0xff;
-    dev->base_addr = ZTWO_VADDR(base_addr);
-    dev->mem_start = ZTWO_VADDR(mem_start);
-    dev->mem_end = dev->mem_start+ARIADNE_RAM_SIZE;
-
-    dev->netdev_ops = &ariadne_netdev_ops;
-    dev->watchdog_timeo = 5*HZ;
-
-    err = register_netdev(dev);
-    if (err) {
-	release_mem_region(base_addr, sizeof(struct Am79C960));
-	release_mem_region(mem_start, ARIADNE_RAM_SIZE);
-	free_netdev(dev);
-	return err;
-    }
-    zorro_set_drvdata(z, dev);
+	struct ariadne_private *priv = netdev_priv(dev);
+	int entry = priv->cur_rx % RX_RING_SIZE;
+	int i;
 
-    printk(KERN_INFO "%s: Ariadne at 0x%08lx, Ethernet Address %pM\n",
-           dev->name, board, dev->dev_addr);
+	/* If we own the next entry, it's a new packet. Send it up */
+	while (!(lowb(priv->rx_ring[entry]->RMD1) & RF_OWN)) {
+		int status = lowb(priv->rx_ring[entry]->RMD1);
+
+		if (status != (RF_STP | RF_ENP)) {	/* There was an error */
+			/* There is a tricky error noted by
+			 * John Murphy <murf@perftech.com> to Russ Nelson:
+			 * Even with full-sized buffers it's possible for a
+			 * jabber packet to use two buffers, with only the
+			 * last correctly noting the error
+			 */
+			/* Only count a general error at the end of a packet */
+			if (status & RF_ENP)
+				dev->stats.rx_errors++;
+			if (status & RF_FRAM)
+				dev->stats.rx_frame_errors++;
+			if (status & RF_OFLO)
+				dev->stats.rx_over_errors++;
+			if (status & RF_CRC)
+				dev->stats.rx_crc_errors++;
+			if (status & RF_BUFF)
+				dev->stats.rx_fifo_errors++;
+			priv->rx_ring[entry]->RMD1 &= 0xff00 | RF_STP | RF_ENP;
+		} else {
+			/* Malloc up new buffer, compatible with net-3 */
+			short pkt_len = swapw(priv->rx_ring[entry]->RMD3);
+			struct sk_buff *skb;
+
+			skb = dev_alloc_skb(pkt_len + 2);
+			if (skb == NULL) {
+				netdev_warn(dev, "Memory squeeze, deferring packet\n");
+				for (i = 0; i < RX_RING_SIZE; i++)
+					if (lowb(priv->rx_ring[(entry + i) % RX_RING_SIZE]->RMD1) & RF_OWN)
+						break;
+
+				if (i > RX_RING_SIZE - 2) {
+					dev->stats.rx_dropped++;
+					priv->rx_ring[entry]->RMD1 |= RF_OWN;
+					priv->cur_rx++;
+				}
+				break;
+			}
+
+
+			skb_reserve(skb, 2);	/* 16 byte align */
+			skb_put(skb, pkt_len);	/* Make room */
+			skb_copy_to_linear_data(skb,
+						(const void *)priv->rx_buff[entry],
+						pkt_len);
+			skb->protocol = eth_type_trans(skb, dev);
+			netdev_dbg(dev, "RX pkt type 0x%04x from %pM to %pM data 0x%08x len %d\n",
+				   ((u_short *)skb->data)[6],
+				   skb->data + 6, skb->data,
+				   (int)skb->data, (int)skb->len);
+
+			netif_rx(skb);
+			dev->stats.rx_packets++;
+			dev->stats.rx_bytes += pkt_len;
+		}
 
-    return 0;
-}
+		priv->rx_ring[entry]->RMD1 |= RF_OWN;
+		entry = (++priv->cur_rx) % RX_RING_SIZE;
+	}
 
+	priv->cur_rx = priv->cur_rx % RX_RING_SIZE;
 
-static int ariadne_open(struct net_device *dev)
-{
-    volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
-    u_short in;
-    u_long version;
-    int i;
-
-    /* Reset the LANCE */
-    in = lance->Reset;
-
-    /* Stop the LANCE */
-    lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
-    lance->RDP = STOP;
-
-    /* Check the LANCE version */
-    lance->RAP = CSR88;		/* Chip ID */
-    version = swapw(lance->RDP);
-    lance->RAP = CSR89;		/* Chip ID */
-    version |= swapw(lance->RDP)<<16;
-    if ((version & 0x00000fff) != 0x00000003) {
-	printk(KERN_WARNING "ariadne_open: Couldn't find AMD Ethernet Chip\n");
-	return -EAGAIN;
-    }
-    if ((version & 0x0ffff000) != 0x00003000) {
-	printk(KERN_WARNING "ariadne_open: Couldn't find Am79C960 (Wrong part "
-	       "number = %ld)\n", (version & 0x0ffff000)>>12);
-	return -EAGAIN;
-    }
-#if 0
-    printk(KERN_DEBUG "ariadne_open: Am79C960 (PCnet-ISA) Revision %ld\n",
-	   (version & 0xf0000000)>>28);
-#endif
+	/* We should check that at least two ring entries are free.
+	 * If not, we should free one and mark stats->rx_dropped++
+	 */
 
-    ariadne_init_ring(dev);
-
-    /* Miscellaneous Stuff */
-    lance->RAP = CSR3;		/* Interrupt Masks and Deferral Control */
-    lance->RDP = 0x0000;
-    lance->RAP = CSR4;		/* Test and Features Control */
-    lance->RDP = DPOLL|APAD_XMT|MFCOM|RCVCCOM|TXSTRTM|JABM;
-
-    /* Set the Multicast Table */
-    lance->RAP = CSR8;		/* Logical Address Filter, LADRF[15:0] */
-    lance->RDP = 0x0000;
-    lance->RAP = CSR9;		/* Logical Address Filter, LADRF[31:16] */
-    lance->RDP = 0x0000;
-    lance->RAP = CSR10;		/* Logical Address Filter, LADRF[47:32] */
-    lance->RDP = 0x0000;
-    lance->RAP = CSR11;		/* Logical Address Filter, LADRF[63:48] */
-    lance->RDP = 0x0000;
-
-    /* Set the Ethernet Hardware Address */
-    lance->RAP = CSR12;		/* Physical Address Register, PADR[15:0] */
-    lance->RDP = ((u_short *)&dev->dev_addr[0])[0];
-    lance->RAP = CSR13;		/* Physical Address Register, PADR[31:16] */
-    lance->RDP = ((u_short *)&dev->dev_addr[0])[1];
-    lance->RAP = CSR14;		/* Physical Address Register, PADR[47:32] */
-    lance->RDP = ((u_short *)&dev->dev_addr[0])[2];
-
-    /* Set the Init Block Mode */
-    lance->RAP = CSR15;		/* Mode Register */
-    lance->RDP = 0x0000;
-
-    /* Set the Transmit Descriptor Ring Pointer */
-    lance->RAP = CSR30;		/* Base Address of Transmit Ring */
-    lance->RDP = swloww(ARIADNE_RAM+offsetof(struct lancedata, tx_ring));
-    lance->RAP = CSR31;		/* Base Address of transmit Ring */
-    lance->RDP = swhighw(ARIADNE_RAM+offsetof(struct lancedata, tx_ring));
-
-    /* Set the Receive Descriptor Ring Pointer */
-    lance->RAP = CSR24;		/* Base Address of Receive Ring */
-    lance->RDP = swloww(ARIADNE_RAM+offsetof(struct lancedata, rx_ring));
-    lance->RAP = CSR25;		/* Base Address of Receive Ring */
-    lance->RDP = swhighw(ARIADNE_RAM+offsetof(struct lancedata, rx_ring));
-
-    /* Set the Number of RX and TX Ring Entries */
-    lance->RAP = CSR76;		/* Receive Ring Length */
-    lance->RDP = swapw(((u_short)-RX_RING_SIZE));
-    lance->RAP = CSR78;		/* Transmit Ring Length */
-    lance->RDP = swapw(((u_short)-TX_RING_SIZE));
-
-    /* Enable Media Interface Port Auto Select (10BASE-2/10BASE-T) */
-    lance->RAP = ISACSR2;	/* Miscellaneous Configuration */
-    lance->IDP = ASEL;
-
-    /* LED Control */
-    lance->RAP = ISACSR5;	/* LED1 Status */
-    lance->IDP = PSE|XMTE;
-    lance->RAP = ISACSR6;	/* LED2 Status */
-    lance->IDP = PSE|COLE;
-    lance->RAP = ISACSR7;	/* LED3 Status */
-    lance->IDP = PSE|RCVE;
-
-    netif_start_queue(dev);
-
-    i = request_irq(IRQ_AMIGA_PORTS, ariadne_interrupt, IRQF_SHARED,
-                    dev->name, dev);
-    if (i) return i;
-
-    lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
-    lance->RDP = INEA|STRT;
-
-    return 0;
+	return 0;
 }
 
-
-static void ariadne_init_ring(struct net_device *dev)
+static irqreturn_t ariadne_interrupt(int irq, void *data)
 {
-    struct ariadne_private *priv = netdev_priv(dev);
-    volatile struct lancedata *lancedata = (struct lancedata *)dev->mem_start;
-    int i;
-
-    netif_stop_queue(dev);
-
-    priv->tx_full = 0;
-    priv->cur_rx = priv->cur_tx = 0;
-    priv->dirty_tx = 0;
-
-    /* Set up TX Ring */
-    for (i = 0; i < TX_RING_SIZE; i++) {
-	volatile struct TDRE *t = &lancedata->tx_ring[i];
-	t->TMD0 = swloww(ARIADNE_RAM+offsetof(struct lancedata, tx_buff[i]));
-	t->TMD1 = swhighw(ARIADNE_RAM+offsetof(struct lancedata, tx_buff[i])) |
-		  TF_STP | TF_ENP;
-	t->TMD2 = swapw((u_short)-PKT_BUF_SIZE);
-	t->TMD3 = 0;
-	priv->tx_ring[i] = &lancedata->tx_ring[i];
-	priv->tx_buff[i] = lancedata->tx_buff[i];
-#if 0
-	printk(KERN_DEBUG "TX Entry %2d at %p, Buf at %p\n", i,
-	       &lancedata->tx_ring[i], lancedata->tx_buff[i]);
-#endif
-    }
-
-    /* Set up RX Ring */
-    for (i = 0; i < RX_RING_SIZE; i++) {
-	volatile struct RDRE *r = &lancedata->rx_ring[i];
-	r->RMD0 = swloww(ARIADNE_RAM+offsetof(struct lancedata, rx_buff[i]));
-	r->RMD1 = swhighw(ARIADNE_RAM+offsetof(struct lancedata, rx_buff[i])) |
-		  RF_OWN;
-	r->RMD2 = swapw((u_short)-PKT_BUF_SIZE);
-	r->RMD3 = 0x0000;
-	priv->rx_ring[i] = &lancedata->rx_ring[i];
-	priv->rx_buff[i] = lancedata->rx_buff[i];
-#if 0
-	printk(KERN_DEBUG "RX Entry %2d at %p, Buf at %p\n", i,
-	       &lancedata->rx_ring[i], lancedata->rx_buff[i]);
+	struct net_device *dev = (struct net_device *)data;
+	volatile struct Am79C960 *lance = (struct Am79C960 *)dev->base_addr;
+	struct ariadne_private *priv;
+	int csr0, boguscnt;
+	int handled = 0;
+
+	lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
+
+	if (!(lance->RDP & INTR))	/* Check if any interrupt has been */
+		return IRQ_NONE;	/* generated by the board */
+
+	priv = netdev_priv(dev);
+
+	boguscnt = 10;
+	while ((csr0 = lance->RDP) & (ERR | RINT | TINT) && --boguscnt >= 0) {
+		/* Acknowledge all of the current interrupt sources ASAP */
+		lance->RDP = csr0 & ~(INEA | TDMD | STOP | STRT | INIT);
+
+#ifdef DEBUG
+		if (ariadne_debug > 5) {
+			netdev_dbg(dev, "interrupt  csr0=%#02x new csr=%#02x [",
+				   csr0, lance->RDP);
+			if (csr0 & INTR)
+				pr_cont(" INTR");
+			if (csr0 & INEA)
+				pr_cont(" INEA");
+			if (csr0 & RXON)
+				pr_cont(" RXON");
+			if (csr0 & TXON)
+				pr_cont(" TXON");
+			if (csr0 & TDMD)
+				pr_cont(" TDMD");
+			if (csr0 & STOP)
+				pr_cont(" STOP");
+			if (csr0 & STRT)
+				pr_cont(" STRT");
+			if (csr0 & INIT)
+				pr_cont(" INIT");
+			if (csr0 & ERR)
+				pr_cont(" ERR");
+			if (csr0 & BABL)
+				pr_cont(" BABL");
+			if (csr0 & CERR)
+				pr_cont(" CERR");
+			if (csr0 & MISS)
+				pr_cont(" MISS");
+			if (csr0 & MERR)
+				pr_cont(" MERR");
+			if (csr0 & RINT)
+				pr_cont(" RINT");
+			if (csr0 & TINT)
+				pr_cont(" TINT");
+			if (csr0 & IDON)
+				pr_cont(" IDON");
+			pr_cont(" ]\n");
+		}
 #endif
-    }
-}
 
+		if (csr0 & RINT) {	/* Rx interrupt */
+			handled = 1;
+			ariadne_rx(dev);
+		}
 
-static int ariadne_close(struct net_device *dev)
-{
-    volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
+		if (csr0 & TINT) {	/* Tx-done interrupt */
+			int dirty_tx = priv->dirty_tx;
+
+			handled = 1;
+			while (dirty_tx < priv->cur_tx) {
+				int entry = dirty_tx % TX_RING_SIZE;
+				int status = lowb(priv->tx_ring[entry]->TMD1);
+
+				if (status & TF_OWN)
+					break;	/* It still hasn't been Txed */
+
+				priv->tx_ring[entry]->TMD1 &= 0xff00;
+
+				if (status & TF_ERR) {
+					/* There was an major error, log it */
+					int err_status = priv->tx_ring[entry]->TMD3;
+					dev->stats.tx_errors++;
+					if (err_status & EF_RTRY)
+						dev->stats.tx_aborted_errors++;
+					if (err_status & EF_LCAR)
+						dev->stats.tx_carrier_errors++;
+					if (err_status & EF_LCOL)
+						dev->stats.tx_window_errors++;
+					if (err_status & EF_UFLO) {
+						/* Ackk!  On FIFO errors the Tx unit is turned off! */
+						dev->stats.tx_fifo_errors++;
+						/* Remove this verbosity later! */
+						netdev_err(dev, "Tx FIFO error! Status %04x\n",
+							   csr0);
+						/* Restart the chip */
+						lance->RDP = STRT;
+					}
+				} else {
+					if (status & (TF_MORE | TF_ONE))
+						dev->stats.collisions++;
+					dev->stats.tx_packets++;
+				}
+				dirty_tx++;
+			}
 
-    netif_stop_queue(dev);
+#ifndef final_version
+			if (priv->cur_tx - dirty_tx >= TX_RING_SIZE) {
+				netdev_err(dev, "out-of-sync dirty pointer, %d vs. %d, full=%d\n",
+					   dirty_tx, priv->cur_tx,
+					   priv->tx_full);
+				dirty_tx += TX_RING_SIZE;
+			}
+#endif
 
-    lance->RAP = CSR112;	/* Missed Frame Count */
-    dev->stats.rx_missed_errors = swapw(lance->RDP);
-    lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
+			if (priv->tx_full && netif_queue_stopped(dev) &&
+			    dirty_tx > priv->cur_tx - TX_RING_SIZE + 2) {
+				/* The ring is no longer full */
+				priv->tx_full = 0;
+				netif_wake_queue(dev);
+			}
 
-    if (ariadne_debug > 1) {
-	printk(KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n",
-	       dev->name, lance->RDP);
-	printk(KERN_DEBUG "%s: %lu packets missed\n", dev->name,
-	       dev->stats.rx_missed_errors);
-    }
+			priv->dirty_tx = dirty_tx;
+		}
 
-    /* We stop the LANCE here -- it occasionally polls memory if we don't. */
-    lance->RDP = STOP;
+		/* Log misc errors */
+		if (csr0 & BABL) {
+			handled = 1;
+			dev->stats.tx_errors++;	/* Tx babble */
+		}
+		if (csr0 & MISS) {
+			handled = 1;
+			dev->stats.rx_errors++;	/* Missed a Rx frame */
+		}
+		if (csr0 & MERR) {
+			handled = 1;
+			netdev_err(dev, "Bus master arbitration failure, status %04x\n",
+				   csr0);
+			/* Restart the chip */
+			lance->RDP = STRT;
+		}
+	}
 
-    free_irq(IRQ_AMIGA_PORTS, dev);
+	/* Clear any other interrupt, and set interrupt enable */
+	lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
+	lance->RDP = INEA | BABL | CERR | MISS | MERR | IDON;
 
-    return 0;
-}
+	if (ariadne_debug > 4)
+		netdev_dbg(dev, "exiting interrupt, csr%d=%#04x\n",
+			   lance->RAP, lance->RDP);
 
+	return IRQ_RETVAL(handled);
+}
 
-static inline void ariadne_reset(struct net_device *dev)
+static int ariadne_open(struct net_device *dev)
 {
-    volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
-
-    lance->RAP = CSR0;	/* PCnet-ISA Controller Status */
-    lance->RDP = STOP;
-    ariadne_init_ring(dev);
-    lance->RDP = INEA|STRT;
-    netif_start_queue(dev);
-}
+	volatile struct Am79C960 *lance = (struct Am79C960 *)dev->base_addr;
+	u_short in;
+	u_long version;
+	int i;
 
+	/* Reset the LANCE */
+	in = lance->Reset;
+
+	/* Stop the LANCE */
+	lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
+	lance->RDP = STOP;
+
+	/* Check the LANCE version */
+	lance->RAP = CSR88;		/* Chip ID */
+	version = swapw(lance->RDP);
+	lance->RAP = CSR89;		/* Chip ID */
+	version |= swapw(lance->RDP) << 16;
+	if ((version & 0x00000fff) != 0x00000003) {
+		pr_warn("Couldn't find AMD Ethernet Chip\n");
+		return -EAGAIN;
+	}
+	if ((version & 0x0ffff000) != 0x00003000) {
+		pr_warn("Couldn't find Am79C960 (Wrong part number = %ld)\n",
+		       (version & 0x0ffff000) >> 12);
+		return -EAGAIN;
+	}
 
-static irqreturn_t ariadne_interrupt(int irq, void *data)
-{
-    struct net_device *dev = (struct net_device *)data;
-    volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
-    struct ariadne_private *priv;
-    int csr0, boguscnt;
-    int handled = 0;
+	netdev_dbg(dev, "Am79C960 (PCnet-ISA) Revision %ld\n",
+		   (version & 0xf0000000) >> 28);
 
-    lance->RAP = CSR0;			/* PCnet-ISA Controller Status */
+	ariadne_init_ring(dev);
 
-    if (!(lance->RDP & INTR))		/* Check if any interrupt has been */
-	return IRQ_NONE;		/* generated by the board. */
+	/* Miscellaneous Stuff */
+	lance->RAP = CSR3;		/* Interrupt Masks and Deferral Control */
+	lance->RDP = 0x0000;
+	lance->RAP = CSR4;		/* Test and Features Control */
+	lance->RDP = DPOLL | APAD_XMT | MFCOM | RCVCCOM | TXSTRTM | JABM;
 
-    priv = netdev_priv(dev);
+	/* Set the Multicast Table */
+	lance->RAP = CSR8;		/* Logical Address Filter, LADRF[15:0] */
+	lance->RDP = 0x0000;
+	lance->RAP = CSR9;		/* Logical Address Filter, LADRF[31:16] */
+	lance->RDP = 0x0000;
+	lance->RAP = CSR10;		/* Logical Address Filter, LADRF[47:32] */
+	lance->RDP = 0x0000;
+	lance->RAP = CSR11;		/* Logical Address Filter, LADRF[63:48] */
+	lance->RDP = 0x0000;
 
-    boguscnt = 10;
-    while ((csr0 = lance->RDP) & (ERR|RINT|TINT) && --boguscnt >= 0) {
-	/* Acknowledge all of the current interrupt sources ASAP. */
-	lance->RDP = csr0 & ~(INEA|TDMD|STOP|STRT|INIT);
+	/* Set the Ethernet Hardware Address */
+	lance->RAP = CSR12;		/* Physical Address Register, PADR[15:0] */
+	lance->RDP = ((u_short *)&dev->dev_addr[0])[0];
+	lance->RAP = CSR13;		/* Physical Address Register, PADR[31:16] */
+	lance->RDP = ((u_short *)&dev->dev_addr[0])[1];
+	lance->RAP = CSR14;		/* Physical Address Register, PADR[47:32] */
+	lance->RDP = ((u_short *)&dev->dev_addr[0])[2];
 
-#if 0
-	if (ariadne_debug > 5) {
-	    printk(KERN_DEBUG "%s: interrupt  csr0=%#2.2x new csr=%#2.2x.",
-		   dev->name, csr0, lance->RDP);
-	    printk("[");
-	    if (csr0 & INTR)
-		printk(" INTR");
-	    if (csr0 & INEA)
-		printk(" INEA");
-	    if (csr0 & RXON)
-		printk(" RXON");
-	    if (csr0 & TXON)
-		printk(" TXON");
-	    if (csr0 & TDMD)
-		printk(" TDMD");
-	    if (csr0 & STOP)
-		printk(" STOP");
-	    if (csr0 & STRT)
-		printk(" STRT");
-	    if (csr0 & INIT)
-		printk(" INIT");
-	    if (csr0 & ERR)
-		printk(" ERR");
-	    if (csr0 & BABL)
-		printk(" BABL");
-	    if (csr0 & CERR)
-		printk(" CERR");
-	    if (csr0 & MISS)
-		printk(" MISS");
-	    if (csr0 & MERR)
-		printk(" MERR");
-	    if (csr0 & RINT)
-		printk(" RINT");
-	    if (csr0 & TINT)
-		printk(" TINT");
-	    if (csr0 & IDON)
-		printk(" IDON");
-	    printk(" ]\n");
-	}
-#endif
+	/* Set the Init Block Mode */
+	lance->RAP = CSR15;		/* Mode Register */
+	lance->RDP = 0x0000;
 
-	if (csr0 & RINT) {	/* Rx interrupt */
-	    handled = 1;
-	    ariadne_rx(dev);
-	}
+	/* Set the Transmit Descriptor Ring Pointer */
+	lance->RAP = CSR30;		/* Base Address of Transmit Ring */
+	lance->RDP = swloww(ARIADNE_RAM + offsetof(struct lancedata, tx_ring));
+	lance->RAP = CSR31;		/* Base Address of transmit Ring */
+	lance->RDP = swhighw(ARIADNE_RAM + offsetof(struct lancedata, tx_ring));
+
+	/* Set the Receive Descriptor Ring Pointer */
+	lance->RAP = CSR24;		/* Base Address of Receive Ring */
+	lance->RDP = swloww(ARIADNE_RAM + offsetof(struct lancedata, rx_ring));
+	lance->RAP = CSR25;		/* Base Address of Receive Ring */
+	lance->RDP = swhighw(ARIADNE_RAM + offsetof(struct lancedata, rx_ring));
+
+	/* Set the Number of RX and TX Ring Entries */
+	lance->RAP = CSR76;		/* Receive Ring Length */
+	lance->RDP = swapw(((u_short)-RX_RING_SIZE));
+	lance->RAP = CSR78;		/* Transmit Ring Length */
+	lance->RDP = swapw(((u_short)-TX_RING_SIZE));
+
+	/* Enable Media Interface Port Auto Select (10BASE-2/10BASE-T) */
+	lance->RAP = ISACSR2;		/* Miscellaneous Configuration */
+	lance->IDP = ASEL;
+
+	/* LED Control */
+	lance->RAP = ISACSR5;		/* LED1 Status */
+	lance->IDP = PSE|XMTE;
+	lance->RAP = ISACSR6;	/* LED2 Status */
+	lance->IDP = PSE|COLE;
+	lance->RAP = ISACSR7;	/* LED3 Status */
+	lance->IDP = PSE|RCVE;
+
+	netif_start_queue(dev);
+
+	i = request_irq(IRQ_AMIGA_PORTS, ariadne_interrupt, IRQF_SHARED,
+			dev->name, dev);
+	if (i)
+		return i;
+
+	lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
+	lance->RDP = INEA | STRT;
+
+	return 0;
+}
 
-	if (csr0 & TINT) {	/* Tx-done interrupt */
-	    int dirty_tx = priv->dirty_tx;
-
-	    handled = 1;
-	    while (dirty_tx < priv->cur_tx) {
-		int entry = dirty_tx % TX_RING_SIZE;
-		int status = lowb(priv->tx_ring[entry]->TMD1);
-
-		if (status & TF_OWN)
-		    break;	/* It still hasn't been Txed */
-
-		priv->tx_ring[entry]->TMD1 &= 0xff00;
-
-		if (status & TF_ERR) {
-		    /* There was an major error, log it. */
-		    int err_status = priv->tx_ring[entry]->TMD3;
-		    dev->stats.tx_errors++;
-		    if (err_status & EF_RTRY)
-			dev->stats.tx_aborted_errors++;
-		    if (err_status & EF_LCAR)
-			dev->stats.tx_carrier_errors++;
-		    if (err_status & EF_LCOL)
-			dev->stats.tx_window_errors++;
-		    if (err_status & EF_UFLO) {
-			/* Ackk!  On FIFO errors the Tx unit is turned off! */
-			dev->stats.tx_fifo_errors++;
-			/* Remove this verbosity later! */
-			printk(KERN_ERR "%s: Tx FIFO error! Status %4.4x.\n",
-			       dev->name, csr0);
-			/* Restart the chip. */
-			lance->RDP = STRT;
-		    }
-		} else {
-		    if (status & (TF_MORE|TF_ONE))
-			dev->stats.collisions++;
-		    dev->stats.tx_packets++;
-		}
-		dirty_tx++;
-	    }
+static int ariadne_close(struct net_device *dev)
+{
+	volatile struct Am79C960 *lance = (struct Am79C960 *)dev->base_addr;
 
-#ifndef final_version
-	    if (priv->cur_tx - dirty_tx >= TX_RING_SIZE) {
-		printk(KERN_ERR "out-of-sync dirty pointer, %d vs. %d, "
-		       "full=%d.\n", dirty_tx, priv->cur_tx, priv->tx_full);
-		dirty_tx += TX_RING_SIZE;
-	    }
-#endif
+	netif_stop_queue(dev);
 
-	    if (priv->tx_full && netif_queue_stopped(dev) &&
-		dirty_tx > priv->cur_tx - TX_RING_SIZE + 2) {
-		/* The ring is no longer full. */
-		priv->tx_full = 0;
-		netif_wake_queue(dev);
-	    }
+	lance->RAP = CSR112;		/* Missed Frame Count */
+	dev->stats.rx_missed_errors = swapw(lance->RDP);
+	lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
 
-	    priv->dirty_tx = dirty_tx;
+	if (ariadne_debug > 1) {
+		netdev_dbg(dev, "Shutting down ethercard, status was %02x\n",
+			   lance->RDP);
+		netdev_dbg(dev, "%lu packets missed\n",
+			   dev->stats.rx_missed_errors);
 	}
 
-	/* Log misc errors. */
-	if (csr0 & BABL) {
-	    handled = 1;
-	    dev->stats.tx_errors++;	/* Tx babble. */
-	}
-	if (csr0 & MISS) {
-	    handled = 1;
-	    dev->stats.rx_errors++;	/* Missed a Rx frame. */
-	}
-	if (csr0 & MERR) {
-	    handled = 1;
-	    printk(KERN_ERR "%s: Bus master arbitration failure, status "
-		   "%4.4x.\n", dev->name, csr0);
-	    /* Restart the chip. */
-	    lance->RDP = STRT;
-	}
-    }
+	/* We stop the LANCE here -- it occasionally polls memory if we don't */
+	lance->RDP = STOP;
 
-    /* Clear any other interrupt, and set interrupt enable. */
-    lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
-    lance->RDP = INEA|BABL|CERR|MISS|MERR|IDON;
+	free_irq(IRQ_AMIGA_PORTS, dev);
 
-#if 0
-    if (ariadne_debug > 4)
-	printk(KERN_DEBUG "%s: exiting interrupt, csr%d=%#4.4x.\n", dev->name,
-	       lance->RAP, lance->RDP);
-#endif
-    return IRQ_RETVAL(handled);
+	return 0;
 }
 
+static inline void ariadne_reset(struct net_device *dev)
+{
+	volatile struct Am79C960 *lance = (struct Am79C960 *)dev->base_addr;
+
+	lance->RAP = CSR0;	/* PCnet-ISA Controller Status */
+	lance->RDP = STOP;
+	ariadne_init_ring(dev);
+	lance->RDP = INEA | STRT;
+	netif_start_queue(dev);
+}
 
 static void ariadne_tx_timeout(struct net_device *dev)
 {
-    volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
+	volatile struct Am79C960 *lance = (struct Am79C960 *)dev->base_addr;
 
-    printk(KERN_ERR "%s: transmit timed out, status %4.4x, resetting.\n",
-	   dev->name, lance->RDP);
-    ariadne_reset(dev);
-    netif_wake_queue(dev);
+	netdev_err(dev, "transmit timed out, status %04x, resetting\n",
+		   lance->RDP);
+	ariadne_reset(dev);
+	netif_wake_queue(dev);
 }
 
-
 static netdev_tx_t ariadne_start_xmit(struct sk_buff *skb,
 				      struct net_device *dev)
 {
-    struct ariadne_private *priv = netdev_priv(dev);
-    volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
-    int entry;
-    unsigned long flags;
-    int len = skb->len;
-
-#if 0
-    if (ariadne_debug > 3) {
-	lance->RAP = CSR0;	/* PCnet-ISA Controller Status */
-	printk(KERN_DEBUG "%s: ariadne_start_xmit() called, csr0 %4.4x.\n",
-	       dev->name, lance->RDP);
-	lance->RDP = 0x0000;
-    }
-#endif
-
-    /* FIXME: is the 79C960 new enough to do its own padding right ? */
-    if (skb->len < ETH_ZLEN)
-    {
-    	if (skb_padto(skb, ETH_ZLEN))
-    	    return NETDEV_TX_OK;
-    	len = ETH_ZLEN;
-    }
-
-    /* Fill in a Tx ring entry */
+	struct ariadne_private *priv = netdev_priv(dev);
+	volatile struct Am79C960 *lance = (struct Am79C960 *)dev->base_addr;
+	int entry;
+	unsigned long flags;
+	int len = skb->len;
 
 #if 0
-{
-    printk(KERN_DEBUG "TX pkt type 0x%04x from %pM to %pM "
-	   " data 0x%08x len %d\n",
-	   ((u_short *)skb->data)[6],
-	   skb->data + 6, skb->data,
-	   (int)skb->data, (int)skb->len);
-}
+	if (ariadne_debug > 3) {
+		lance->RAP = CSR0;	/* PCnet-ISA Controller Status */
+		netdev_dbg(dev, "%s: csr0 %04x\n", __func__, lance->RDP);
+		lance->RDP = 0x0000;
+	}
 #endif
 
-    local_irq_save(flags);
-
-    entry = priv->cur_tx % TX_RING_SIZE;
-
-    /* Caution: the write order is important here, set the base address with
-		the "ownership" bits last. */
-
-    priv->tx_ring[entry]->TMD2 = swapw((u_short)-skb->len);
-    priv->tx_ring[entry]->TMD3 = 0x0000;
-    memcpyw(priv->tx_buff[entry], (u_short *)skb->data, len);
-
-#if 0
-    {
-	int i, len;
-
-	len = skb->len > 64 ? 64 : skb->len;
-	len >>= 1;
-	for (i = 0; i < len; i += 8) {
-	    int j;
-	    printk(KERN_DEBUG "%04x:", i);
-	    for (j = 0; (j < 8) && ((i+j) < len); j++) {
-		if (!(j & 1))
-		    printk(" ");
-		printk("%04x", priv->tx_buff[entry][i+j]);
-	    }
-	    printk("\n");
+	/* FIXME: is the 79C960 new enough to do its own padding right ? */
+	if (skb->len < ETH_ZLEN) {
+		if (skb_padto(skb, ETH_ZLEN))
+			return NETDEV_TX_OK;
+		len = ETH_ZLEN;
 	}
-    }
-#endif
 
-    priv->tx_ring[entry]->TMD1 = (priv->tx_ring[entry]->TMD1&0xff00)|TF_OWN|TF_STP|TF_ENP;
+	/* Fill in a Tx ring entry */
 
-    dev_kfree_skb(skb);
+	netdev_dbg(dev, "TX pkt type 0x%04x from %pM to %pM data 0x%08x len %d\n",
+		   ((u_short *)skb->data)[6],
+		   skb->data + 6, skb->data,
+		   (int)skb->data, (int)skb->len);
 
-    priv->cur_tx++;
-    if ((priv->cur_tx >= TX_RING_SIZE) && (priv->dirty_tx >= TX_RING_SIZE)) {
+	local_irq_save(flags);
 
-#if 0
-	printk(KERN_DEBUG "*** Subtracting TX_RING_SIZE from cur_tx (%d) and "
-	       "dirty_tx (%d)\n", priv->cur_tx, priv->dirty_tx);
-#endif
+	entry = priv->cur_tx % TX_RING_SIZE;
 
-	priv->cur_tx -= TX_RING_SIZE;
-	priv->dirty_tx -= TX_RING_SIZE;
-    }
-    dev->stats.tx_bytes += len;
+	/* Caution: the write order is important here, set the base address with
+	   the "ownership" bits last */
 
-    /* Trigger an immediate send poll. */
-    lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
-    lance->RDP = INEA|TDMD;
+	priv->tx_ring[entry]->TMD2 = swapw((u_short)-skb->len);
+	priv->tx_ring[entry]->TMD3 = 0x0000;
+	memcpyw(priv->tx_buff[entry], (u_short *)skb->data, len);
 
-    if (lowb(priv->tx_ring[(entry+1) % TX_RING_SIZE]->TMD1) != 0) {
-	netif_stop_queue(dev);
-	priv->tx_full = 1;
-    }
-    local_irq_restore(flags);
+#ifdef DEBUG
+	print_hex_dump(KERN_DEBUG, "tx_buff: ", DUMP_PREFIX_OFFSET, 16, 1,
+		       (void *)priv->tx_buff[entry],
+		       skb->len > 64 ? 64 : skb->len, true);
+#endif
 
-    return NETDEV_TX_OK;
-}
+	priv->tx_ring[entry]->TMD1 = (priv->tx_ring[entry]->TMD1 & 0xff00)
+		| TF_OWN | TF_STP | TF_ENP;
 
+	dev_kfree_skb(skb);
 
-static int ariadne_rx(struct net_device *dev)
-{
-    struct ariadne_private *priv = netdev_priv(dev);
-    int entry = priv->cur_rx % RX_RING_SIZE;
-    int i;
-
-    /* If we own the next entry, it's a new packet. Send it up. */
-    while (!(lowb(priv->rx_ring[entry]->RMD1) & RF_OWN)) {
-	int status = lowb(priv->rx_ring[entry]->RMD1);
-
-	if (status != (RF_STP|RF_ENP)) {	/* There was an error. */
-	    /* There is a tricky error noted by John Murphy,
-		<murf@perftech.com> to Russ Nelson: Even with full-sized
-		buffers it's possible for a jabber packet to use two
-		buffers, with only the last correctly noting the error. */
-	    if (status & RF_ENP)
-		/* Only count a general error at the end of a packet.*/
-		dev->stats.rx_errors++;
-	    if (status & RF_FRAM)
-		dev->stats.rx_frame_errors++;
-	    if (status & RF_OFLO)
-		dev->stats.rx_over_errors++;
-	    if (status & RF_CRC)
-		dev->stats.rx_crc_errors++;
-	    if (status & RF_BUFF)
-		dev->stats.rx_fifo_errors++;
-	    priv->rx_ring[entry]->RMD1 &= 0xff00|RF_STP|RF_ENP;
-	} else {
-	    /* Malloc up new buffer, compatible with net-3. */
-	    short pkt_len = swapw(priv->rx_ring[entry]->RMD3);
-	    struct sk_buff *skb;
-
-	    skb = dev_alloc_skb(pkt_len+2);
-	    if (skb == NULL) {
-		printk(KERN_WARNING "%s: Memory squeeze, deferring packet.\n",
-		       dev->name);
-		for (i = 0; i < RX_RING_SIZE; i++)
-		    if (lowb(priv->rx_ring[(entry+i) % RX_RING_SIZE]->RMD1) & RF_OWN)
-			break;
-
-		if (i > RX_RING_SIZE-2) {
-		    dev->stats.rx_dropped++;
-		    priv->rx_ring[entry]->RMD1 |= RF_OWN;
-		    priv->cur_rx++;
-		}
-		break;
-	    }
+	priv->cur_tx++;
+	if ((priv->cur_tx >= TX_RING_SIZE) &&
+	    (priv->dirty_tx >= TX_RING_SIZE)) {
 
+		netdev_dbg(dev, "*** Subtracting TX_RING_SIZE from cur_tx (%d) and dirty_tx (%d)\n",
+			   priv->cur_tx, priv->dirty_tx);
 
-	    skb_reserve(skb,2);		/* 16 byte align */
-	    skb_put(skb,pkt_len);	/* Make room */
-	    skb_copy_to_linear_data(skb, (char *)priv->rx_buff[entry], pkt_len);
-	    skb->protocol=eth_type_trans(skb,dev);
-#if 0
-{
-	    printk(KERN_DEBUG "RX pkt type 0x%04x from ",
-		   ((u_short *)skb->data)[6]);
-	    {
-		u_char *ptr = &((u_char *)skb->data)[6];
-		printk("%pM", ptr);
-	    }
-	    printk(" to ");
-	    {
-		u_char *ptr = (u_char *)skb->data;
-		printk("%pM", ptr);
-	    }
-	    printk(" data 0x%08x len %d\n", (int)skb->data, (int)skb->len);
-}
-#endif
-
-	    netif_rx(skb);
-	    dev->stats.rx_packets++;
-	    dev->stats.rx_bytes += pkt_len;
+		priv->cur_tx -= TX_RING_SIZE;
+		priv->dirty_tx -= TX_RING_SIZE;
 	}
+	dev->stats.tx_bytes += len;
 
-	priv->rx_ring[entry]->RMD1 |= RF_OWN;
-	entry = (++priv->cur_rx) % RX_RING_SIZE;
-    }
+	/* Trigger an immediate send poll */
+	lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
+	lance->RDP = INEA | TDMD;
 
-    priv->cur_rx = priv->cur_rx % RX_RING_SIZE;
-
-    /* We should check that at least two ring entries are free.	 If not,
-       we should free one and mark stats->rx_dropped++. */
+	if (lowb(priv->tx_ring[(entry + 1) % TX_RING_SIZE]->TMD1) != 0) {
+		netif_stop_queue(dev);
+		priv->tx_full = 1;
+	}
+	local_irq_restore(flags);
 
-    return 0;
+	return NETDEV_TX_OK;
 }
 
-
 static struct net_device_stats *ariadne_get_stats(struct net_device *dev)
 {
-    volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
-    short saved_addr;
-    unsigned long flags;
-
-    local_irq_save(flags);
-    saved_addr = lance->RAP;
-    lance->RAP = CSR112;		/* Missed Frame Count */
-    dev->stats.rx_missed_errors = swapw(lance->RDP);
-    lance->RAP = saved_addr;
-    local_irq_restore(flags);
-
-    return &dev->stats;
+	volatile struct Am79C960 *lance = (struct Am79C960 *)dev->base_addr;
+	short saved_addr;
+	unsigned long flags;
+
+	local_irq_save(flags);
+	saved_addr = lance->RAP;
+	lance->RAP = CSR112;		/* Missed Frame Count */
+	dev->stats.rx_missed_errors = swapw(lance->RDP);
+	lance->RAP = saved_addr;
+	local_irq_restore(flags);
+
+	return &dev->stats;
 }
 
-
 /* Set or clear the multicast filter for this adaptor.
-    num_addrs == -1	Promiscuous mode, receive all packets
-    num_addrs == 0	Normal mode, clear multicast list
-    num_addrs > 0	Multicast mode, receive normal and MC packets, and do
-			best-effort filtering.
+ * num_addrs == -1	Promiscuous mode, receive all packets
+ * num_addrs == 0	Normal mode, clear multicast list
+ * num_addrs > 0	Multicast mode, receive normal and MC packets,
+ * 			and do best-effort filtering.
  */
 static void set_multicast_list(struct net_device *dev)
 {
-    volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
+	volatile struct Am79C960 *lance = (struct Am79C960 *)dev->base_addr;
 
-    if (!netif_running(dev))
-	return;
+	if (!netif_running(dev))
+		return;
 
-    netif_stop_queue(dev);
+	netif_stop_queue(dev);
 
-    /* We take the simple way out and always enable promiscuous mode. */
-    lance->RAP = CSR0;			/* PCnet-ISA Controller Status */
-    lance->RDP = STOP;			/* Temporarily stop the lance. */
-    ariadne_init_ring(dev);
+	/* We take the simple way out and always enable promiscuous mode */
+	lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
+	lance->RDP = STOP;		/* Temporarily stop the lance */
+	ariadne_init_ring(dev);
 
-    if (dev->flags & IFF_PROMISC) {
-	lance->RAP = CSR15;		/* Mode Register */
-	lance->RDP = PROM;		/* Set promiscuous mode */
-    } else {
-	short multicast_table[4];
-	int num_addrs = netdev_mc_count(dev);
-	int i;
-	/* We don't use the multicast table, but rely on upper-layer filtering. */
-	memset(multicast_table, (num_addrs == 0) ? 0 : -1,
-	       sizeof(multicast_table));
-	for (i = 0; i < 4; i++) {
-	    lance->RAP = CSR8+(i<<8);	/* Logical Address Filter */
-	    lance->RDP = swapw(multicast_table[i]);
+	if (dev->flags & IFF_PROMISC) {
+		lance->RAP = CSR15;	/* Mode Register */
+		lance->RDP = PROM;	/* Set promiscuous mode */
+	} else {
+		short multicast_table[4];
+		int num_addrs = netdev_mc_count(dev);
+		int i;
+		/* We don't use the multicast table,
+		 * but rely on upper-layer filtering
+		 */
+		memset(multicast_table, (num_addrs == 0) ? 0 : -1,
+		       sizeof(multicast_table));
+		for (i = 0; i < 4; i++) {
+			lance->RAP = CSR8 + (i << 8);
+					/* Logical Address Filter */
+			lance->RDP = swapw(multicast_table[i]);
+		}
+		lance->RAP = CSR15;	/* Mode Register */
+		lance->RDP = 0x0000;	/* Unset promiscuous mode */
 	}
-	lance->RAP = CSR15;		/* Mode Register */
-	lance->RDP = 0x0000;		/* Unset promiscuous mode */
-    }
 
-    lance->RAP = CSR0;			/* PCnet-ISA Controller Status */
-    lance->RDP = INEA|STRT|IDON;	/* Resume normal operation. */
+	lance->RAP = CSR0;		/* PCnet-ISA Controller Status */
+	lance->RDP = INEA | STRT | IDON;/* Resume normal operation */
 
-    netif_wake_queue(dev);
+	netif_wake_queue(dev);
 }
 
 
 static void __devexit ariadne_remove_one(struct zorro_dev *z)
 {
-    struct net_device *dev = zorro_get_drvdata(z);
+	struct net_device *dev = zorro_get_drvdata(z);
 
-    unregister_netdev(dev);
-    release_mem_region(ZTWO_PADDR(dev->base_addr), sizeof(struct Am79C960));
-    release_mem_region(ZTWO_PADDR(dev->mem_start), ARIADNE_RAM_SIZE);
-    free_netdev(dev);
+	unregister_netdev(dev);
+	release_mem_region(ZTWO_PADDR(dev->base_addr), sizeof(struct Am79C960));
+	release_mem_region(ZTWO_PADDR(dev->mem_start), ARIADNE_RAM_SIZE);
+	free_netdev(dev);
 }
 
+static struct zorro_device_id ariadne_zorro_tbl[] __devinitdata = {
+	{ ZORRO_PROD_VILLAGE_TRONIC_ARIADNE },
+	{ 0 }
+};
+MODULE_DEVICE_TABLE(zorro, ariadne_zorro_tbl);
+
+static const struct net_device_ops ariadne_netdev_ops = {
+	.ndo_open		= ariadne_open,
+	.ndo_stop		= ariadne_close,
+	.ndo_start_xmit		= ariadne_start_xmit,
+	.ndo_tx_timeout		= ariadne_tx_timeout,
+	.ndo_get_stats		= ariadne_get_stats,
+	.ndo_set_multicast_list	= set_multicast_list,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address	= eth_mac_addr,
+};
+
+static int __devinit ariadne_init_one(struct zorro_dev *z,
+				      const struct zorro_device_id *ent)
+{
+	unsigned long board = z->resource.start;
+	unsigned long base_addr = board + ARIADNE_LANCE;
+	unsigned long mem_start = board + ARIADNE_RAM;
+	struct resource *r1, *r2;
+	struct net_device *dev;
+	struct ariadne_private *priv;
+	int err;
+
+	r1 = request_mem_region(base_addr, sizeof(struct Am79C960), "Am79C960");
+	if (!r1)
+		return -EBUSY;
+	r2 = request_mem_region(mem_start, ARIADNE_RAM_SIZE, "RAM");
+	if (!r2) {
+		release_mem_region(base_addr, sizeof(struct Am79C960));
+		return -EBUSY;
+	}
+
+	dev = alloc_etherdev(sizeof(struct ariadne_private));
+	if (dev == NULL) {
+		release_mem_region(base_addr, sizeof(struct Am79C960));
+		release_mem_region(mem_start, ARIADNE_RAM_SIZE);
+		return -ENOMEM;
+	}
+
+	priv = netdev_priv(dev);
+
+	r1->name = dev->name;
+	r2->name = dev->name;
+
+	dev->dev_addr[0] = 0x00;
+	dev->dev_addr[1] = 0x60;
+	dev->dev_addr[2] = 0x30;
+	dev->dev_addr[3] = (z->rom.er_SerialNumber >> 16) & 0xff;
+	dev->dev_addr[4] = (z->rom.er_SerialNumber >> 8) & 0xff;
+	dev->dev_addr[5] = z->rom.er_SerialNumber & 0xff;
+	dev->base_addr = ZTWO_VADDR(base_addr);
+	dev->mem_start = ZTWO_VADDR(mem_start);
+	dev->mem_end = dev->mem_start + ARIADNE_RAM_SIZE;
+
+	dev->netdev_ops = &ariadne_netdev_ops;
+	dev->watchdog_timeo = 5 * HZ;
+
+	err = register_netdev(dev);
+	if (err) {
+		release_mem_region(base_addr, sizeof(struct Am79C960));
+		release_mem_region(mem_start, ARIADNE_RAM_SIZE);
+		free_netdev(dev);
+		return err;
+	}
+	zorro_set_drvdata(z, dev);
+
+	netdev_info(dev, "Ariadne at 0x%08lx, Ethernet Address %pM\n",
+		    board, dev->dev_addr);
+
+	return 0;
+}
+
+static struct zorro_driver ariadne_driver = {
+	.name		= "ariadne",
+	.id_table	= ariadne_zorro_tbl,
+	.probe		= ariadne_init_one,
+	.remove		= __devexit_p(ariadne_remove_one),
+};
+
 static int __init ariadne_init_module(void)
 {
-    return zorro_register_driver(&ariadne_driver);
+	return zorro_register_driver(&ariadne_driver);
 }
 
 static void __exit ariadne_cleanup_module(void)
 {
-    zorro_unregister_driver(&ariadne_driver);
+	zorro_unregister_driver(&ariadne_driver);
 }
 
 module_init(ariadne_init_module);
-- 
1.7.6.rc3


^ permalink raw reply related

* [PATCH 4/8] lib8390: Indent braces appropriately
From: Joe Perches @ 2011-06-23  6:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1308810463.git.joe@perches.com>

Move the braces around to conform to kernel standard style.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/lib8390.c |  119 ++++++++++++++++---------------------------------
 1 files changed, 38 insertions(+), 81 deletions(-)

diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 59d5414..9ace5a7 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -272,8 +272,7 @@ static void __ei_tx_timeout(struct net_device *dev)
 		   (isr) ? "lost interrupt?" : "cable problem?",
 		   txsr, isr, tickssofar);
 
-	if (!isr && !dev->stats.tx_packets)
-	{
+	if (!isr && !dev->stats.tx_packets) {
 		/* The 8390 probably hasn't gotten on the cable yet. */
 		ei_local->interface_num ^= 1;   /* Try a different xcvr.  */
 	}
@@ -345,24 +344,19 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
 	 * card, leaving a substantial gap between each transmitted packet.
 	 */
 
-	if (ei_local->tx1 == 0)
-	{
+	if (ei_local->tx1 == 0) {
 		output_page = ei_local->tx_start_page;
 		ei_local->tx1 = send_length;
 		if (ei_debug  &&  ei_local->tx2 > 0)
 			netdev_dbg(dev, "idle transmitter tx2=%d, lasttx=%d, txing=%d\n",
 				   ei_local->tx2, ei_local->lasttx, ei_local->txing);
-	}
-	else if (ei_local->tx2 == 0)
-	{
+	} else if (ei_local->tx2 == 0) {
 		output_page = ei_local->tx_start_page + TX_PAGES/2;
 		ei_local->tx2 = send_length;
 		if (ei_debug  &&  ei_local->tx1 > 0)
 			netdev_dbg(dev, "idle transmitter, tx1=%d, lasttx=%d, txing=%d\n",
 				   ei_local->tx1, ei_local->lasttx, ei_local->txing);
-	}
-	else
-	{	/* We should never get here. */
+	} else {			/* We should never get here. */
 		if (ei_debug)
 			netdev_dbg(dev, "No Tx buffers free! tx1=%d tx2=%d last=%d\n",
 				   ei_local->tx1, ei_local->tx2, ei_local->lasttx);
@@ -383,22 +377,18 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
 
 	ei_block_output(dev, send_length, data, output_page);
 
-	if (! ei_local->txing)
-	{
+	if (! ei_local->txing) {
 		ei_local->txing = 1;
 		NS8390_trigger_send(dev, send_length, output_page);
-		if (output_page == ei_local->tx_start_page)
-		{
+		if (output_page == ei_local->tx_start_page) {
 			ei_local->tx1 = -1;
 			ei_local->lasttx = -1;
-		}
-		else
-		{
+		} else {
 			ei_local->tx2 = -1;
 			ei_local->lasttx = -2;
 		}
-	}
-	else ei_local->txqueue++;
+	} else
+		ei_local->txqueue++;
 
 	if (ei_local->tx1  &&  ei_local->tx2)
 		netif_stop_queue(dev);
@@ -443,8 +433,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 
 	spin_lock(&ei_local->page_lock);
 
-	if (ei_local->irqlock)
-	{
+	if (ei_local->irqlock) {
 		/*
 		 * This might just be an interrupt for a PCI device sharing
 		 * this line
@@ -464,8 +453,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 
 	/* !!Assumption!! -- we stay in page 0.	 Don't break this. */
 	while ((interrupts = ei_inb_p(e8390_base + EN0_ISR)) != 0 &&
-	       ++nr_serviced < MAX_SERVICE)
-	{
+	       ++nr_serviced < MAX_SERVICE) {
 		if (!netif_running(dev)) {
 			netdev_warn(dev, "interrupt from stopped card\n");
 			/* rmk - acknowledge the interrupts */
@@ -475,8 +463,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 		}
 		if (interrupts & ENISR_OVER)
 			ei_rx_overrun(dev);
-		else if (interrupts & (ENISR_RX+ENISR_RX_ERR))
-		{
+		else if (interrupts & (ENISR_RX+ENISR_RX_ERR)) {
 			/* Got a good (?) packet. */
 			ei_receive(dev);
 		}
@@ -486,8 +473,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 		else if (interrupts & ENISR_TX_ERR)
 			ei_tx_err(dev);
 
-		if (interrupts & ENISR_COUNTERS)
-		{
+		if (interrupts & ENISR_COUNTERS) {
 			dev->stats.rx_frame_errors += ei_inb_p(e8390_base + EN0_COUNTER0);
 			dev->stats.rx_crc_errors   += ei_inb_p(e8390_base + EN0_COUNTER1);
 			dev->stats.rx_missed_errors+= ei_inb_p(e8390_base + EN0_COUNTER2);
@@ -496,18 +482,14 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 
 		/* Ignore any RDC interrupts that make it back to here. */
 		if (interrupts & ENISR_RDC)
-		{
 			ei_outb_p(ENISR_RDC, e8390_base + EN0_ISR);
-		}
 
 		ei_outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base + E8390_CMD);
 	}
 
-	if (interrupts && ei_debug)
-	{
+	if (interrupts && ei_debug) {
 		ei_outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base + E8390_CMD);
-		if (nr_serviced >= MAX_SERVICE)
-		{
+		if (nr_serviced >= MAX_SERVICE) {
 			/* 0xFF is valid for a card removal */
 			if(interrupts!=0xFF)
 				netdev_warn(dev, "Too much work at interrupt, status %#2.2x\n",
@@ -572,8 +554,7 @@ static void ei_tx_err(struct net_device *dev)
 
 	if (tx_was_aborted)
 		ei_tx_intr(dev);
-	else
-	{
+	else {
 		dev->stats.tx_errors++;
 		if (txsr & ENTSR_CRS) dev->stats.tx_carrier_errors++;
 		if (txsr & ENTSR_CDH) dev->stats.tx_heartbeat_errors++;
@@ -603,37 +584,31 @@ static void ei_tx_intr(struct net_device *dev)
 	 */
 	ei_local->txqueue--;
 
-	if (ei_local->tx1 < 0)
-	{
+	if (ei_local->tx1 < 0) {
 		if (ei_local->lasttx != 1 && ei_local->lasttx != -1)
 			pr_err("%s: bogus last_tx_buffer %d, tx1=%d\n",
 			       ei_local->name, ei_local->lasttx, ei_local->tx1);
 		ei_local->tx1 = 0;
-		if (ei_local->tx2 > 0)
-		{
+		if (ei_local->tx2 > 0) {
 			ei_local->txing = 1;
 			NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6);
 			dev->trans_start = jiffies;
 			ei_local->tx2 = -1,
 			ei_local->lasttx = 2;
-		}
-		else ei_local->lasttx = 20, ei_local->txing = 0;
-	}
-	else if (ei_local->tx2 < 0)
-	{
+		} else
+			ei_local->lasttx = 20, ei_local->txing = 0;
+	} else if (ei_local->tx2 < 0) {
 		if (ei_local->lasttx != 2  &&  ei_local->lasttx != -2)
 			pr_err("%s: bogus last_tx_buffer %d, tx2=%d\n",
 			       ei_local->name, ei_local->lasttx, ei_local->tx2);
 		ei_local->tx2 = 0;
-		if (ei_local->tx1 > 0)
-		{
+		if (ei_local->tx1 > 0) {
 			ei_local->txing = 1;
 			NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page);
 			dev->trans_start = jiffies;
 			ei_local->tx1 = -1;
 			ei_local->lasttx = 1;
-		}
-		else
+		} else
 			ei_local->lasttx = 10, ei_local->txing = 0;
 	}
 //	else printk(KERN_WARNING "%s: unexpected TX-done interrupt, lasttx=%d.\n",
@@ -644,11 +619,9 @@ static void ei_tx_intr(struct net_device *dev)
 		dev->stats.collisions++;
 	if (status & ENTSR_PTX)
 		dev->stats.tx_packets++;
-	else
-	{
+	else {
 		dev->stats.tx_errors++;
-		if (status & ENTSR_ABT)
-		{
+		if (status & ENTSR_ABT) {
 			dev->stats.tx_aborted_errors++;
 			dev->stats.collisions += 16;
 		}
@@ -682,8 +655,7 @@ static void ei_receive(struct net_device *dev)
 	struct e8390_pkt_hdr rx_frame;
 	int num_rx_pages = ei_local->stop_page-ei_local->rx_start_page;
 
-	while (++rx_pkt_count < 10)
-	{
+	while (++rx_pkt_count < 10) {
 		int pkt_len, pkt_stat;
 
 		/* Get the rx page (incoming packet pointer). */
@@ -730,30 +702,24 @@ static void ei_receive(struct net_device *dev)
 			continue;
 		}
 
-		if (pkt_len < 60  ||  pkt_len > 1518)
-		{
+		if (pkt_len < 60  ||  pkt_len > 1518) {
 			if (ei_debug)
 				netdev_dbg(dev, "bogus packet size: %d, status=%#2x nxpg=%#2x\n",
 					   rx_frame.count, rx_frame.status,
 					   rx_frame.next);
 			dev->stats.rx_errors++;
 			dev->stats.rx_length_errors++;
-		}
-		 else if ((pkt_stat & 0x0F) == ENRSR_RXOK)
-		{
+		} else if ((pkt_stat & 0x0F) == ENRSR_RXOK) {
 			struct sk_buff *skb;
 
 			skb = dev_alloc_skb(pkt_len+2);
-			if (skb == NULL)
-			{
+			if (skb == NULL) {
 				if (ei_debug > 1)
 					netdev_dbg(dev, "Couldn't allocate a sk_buff of size %d\n",
 						   pkt_len);
 				dev->stats.rx_dropped++;
 				break;
-			}
-			else
-			{
+			} else {
 				skb_reserve(skb,2);	/* IP headers on 16 byte boundaries */
 				skb_put(skb, pkt_len);	/* Make room */
 				ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame));
@@ -765,9 +731,7 @@ static void ei_receive(struct net_device *dev)
 				if (pkt_stat & ENRSR_PHY)
 					dev->stats.multicast++;
 			}
-		}
-		else
-		{
+		} else {
 			if (ei_debug)
 				netdev_dbg(dev, "bogus packet: status=%#2x nxpg=%#2x size=%d\n",
 					   rx_frame.status, rx_frame.next,
@@ -845,8 +809,7 @@ static void ei_rx_overrun(struct net_device *dev)
 	 * step is vital, and skipping it will cause no end of havoc.
 	 */
 
-	if (was_txing)
-	{
+	if (was_txing) {
 		unsigned char tx_completed = ei_inb_p(e8390_base+EN0_ISR) & (ENISR_TX+ENISR_TX_ERR);
 		if (!tx_completed)
 			must_resend = 1;
@@ -930,13 +893,11 @@ static void do_set_multicast_list(struct net_device *dev)
 	int i;
 	struct ei_device *ei_local = netdev_priv(dev);
 
-	if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
-	{
+	if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) {
 		memset(ei_local->mcfilter, 0, 8);
 		if (!netdev_mc_empty(dev))
 			make_mc_bits(ei_local->mcfilter, dev);
-	}
-	else
+	} else
 		memset(ei_local->mcfilter, 0xFF, 8);	/* mcast set to accept-all */
 
 	/*
@@ -955,8 +916,7 @@ static void do_set_multicast_list(struct net_device *dev)
 	if (netif_running(dev))
 		ei_outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
 	ei_outb_p(E8390_NODMA + E8390_PAGE1, e8390_base + E8390_CMD);
-	for(i = 0; i < 8; i++)
-	{
+	for(i = 0; i < 8; i++) {
 		ei_outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i));
 #ifndef BUG_83C690
 		if(ei_inb_p(e8390_base + EN1_MULT_SHIFT(i))!=ei_local->mcfilter[i])
@@ -1069,8 +1029,7 @@ static void __NS8390_init(struct net_device *dev, int startp)
 	/* Copy the station address into the DS8390 registers. */
 
 	ei_outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP, e8390_base+E8390_CMD); /* 0x61 */
-	for(i = 0; i < 6; i++)
-	{
+	for(i = 0; i < 6; i++) {
 		ei_outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i));
 		if (ei_debug > 1 && ei_inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i])
 			netdev_err(dev, "Hw. address read/write mismap %d\n", i);
@@ -1082,8 +1041,7 @@ static void __NS8390_init(struct net_device *dev, int startp)
 	ei_local->tx1 = ei_local->tx2 = 0;
 	ei_local->txing = 0;
 
-	if (startp)
-	{
+	if (startp) {
 		ei_outb_p(0xff,  e8390_base + EN0_ISR);
 		ei_outb_p(ENISR_ALL,  e8390_base + EN0_IMR);
 		ei_outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base+E8390_CMD);
@@ -1105,8 +1063,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
 
 	ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
 
-	if (ei_inb_p(e8390_base + E8390_CMD) & E8390_TRANS)
-	{
+	if (ei_inb_p(e8390_base + E8390_CMD) & E8390_TRANS) {
 		netdev_warn(dev, "trigger_send() called with the transmitter busy\n");
 		return;
 	}
-- 
1.7.6.rc3


^ permalink raw reply related

* [PATCH 8/8] zorro8390: Update style, neaten, restructure to eliminate prototypes
From: Joe Perches @ 2011-06-23  6:39 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1308810463.git.joe@perches.com>

Convert to current logging styles.
Move code blocks to eliminate need for prototypes.
Use tabs for code indent and standardize spacing.
Comment neatening.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/zorro8390.c |  673 +++++++++++++++++++++++------------------------
 1 files changed, 333 insertions(+), 340 deletions(-)

diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c
index 8c7c522..15e7751a 100644
--- a/drivers/net/zorro8390.c
+++ b/drivers/net/zorro8390.c
@@ -19,6 +19,8 @@
  *  Ethernet Controllers.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -34,115 +36,242 @@
 #include <asm/amigaints.h>
 #include <asm/amigahw.h>
 
-#define EI_SHIFT(x)	(ei_local->reg_offset[x])
-#define ei_inb(port)   in_8(port)
-#define ei_outb(val,port)  out_8(port,val)
-#define ei_inb_p(port)   in_8(port)
-#define ei_outb_p(val,port)  out_8(port,val)
+#define EI_SHIFT(x)		(ei_local->reg_offset[x])
+#define ei_inb(port)		in_8(port)
+#define ei_outb(val, port)	out_8(port, val)
+#define ei_inb_p(port)		in_8(port)
+#define ei_outb_p(val, port)	out_8(port, val)
 
 static const char version[] =
-    "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
+	"8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include "lib8390.c"
 
 #define DRV_NAME	"zorro8390"
 
 #define NE_BASE		(dev->base_addr)
-#define NE_CMD		(0x00*2)
-#define NE_DATAPORT	(0x10*2)	/* NatSemi-defined port window offset. */
-#define NE_RESET	(0x1f*2)	/* Issue a read to reset, a write to clear. */
-#define NE_IO_EXTENT	(0x20*2)
-
-#define NE_EN0_ISR	(0x07*2)
-#define NE_EN0_DCFG	(0x0e*2)
-
-#define NE_EN0_RSARLO	(0x08*2)
-#define NE_EN0_RSARHI	(0x09*2)
-#define NE_EN0_RCNTLO	(0x0a*2)
-#define NE_EN0_RXCR	(0x0c*2)
-#define NE_EN0_TXCR	(0x0d*2)
-#define NE_EN0_RCNTHI	(0x0b*2)
-#define NE_EN0_IMR	(0x0f*2)
+#define NE_CMD		(0x00 * 2)
+#define NE_DATAPORT	(0x10 * 2)	/* NatSemi-defined port window offset */
+#define NE_RESET	(0x1f * 2)	/* Issue a read to reset,
+					 * a write to clear. */
+#define NE_IO_EXTENT	(0x20 * 2)
+
+#define NE_EN0_ISR	(0x07 * 2)
+#define NE_EN0_DCFG	(0x0e * 2)
+
+#define NE_EN0_RSARLO	(0x08 * 2)
+#define NE_EN0_RSARHI	(0x09 * 2)
+#define NE_EN0_RCNTLO	(0x0a * 2)
+#define NE_EN0_RXCR	(0x0c * 2)
+#define NE_EN0_TXCR	(0x0d * 2)
+#define NE_EN0_RCNTHI	(0x0b * 2)
+#define NE_EN0_IMR	(0x0f * 2)
 
 #define NESM_START_PG	0x40	/* First page of TX buffer */
 #define NESM_STOP_PG	0x80	/* Last page +1 of RX ring */
 
-
-#define WORDSWAP(a)	((((a)>>8)&0xff) | ((a)<<8))
-
+#define WORDSWAP(a)	((((a) >> 8) & 0xff) | ((a) << 8))
 
 static struct card_info {
-    zorro_id id;
-    const char *name;
-    unsigned int offset;
+	zorro_id id;
+	const char *name;
+	unsigned int offset;
 } cards[] __devinitdata = {
-    { ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2, "Ariadne II", 0x0600 },
-    { ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF, "X-Surf", 0x8600 },
+	{ ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2, "Ariadne II", 0x0600 },
+	{ ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF, "X-Surf", 0x8600 },
 };
 
-static int __devinit zorro8390_init_one(struct zorro_dev *z,
-					const struct zorro_device_id *ent);
-static int __devinit zorro8390_init(struct net_device *dev,
-				    unsigned long board, const char *name,
-				    unsigned long ioaddr);
-static int zorro8390_open(struct net_device *dev);
-static int zorro8390_close(struct net_device *dev);
-static void zorro8390_reset_8390(struct net_device *dev);
+/* Hard reset the card.  This used to pause for the same period that a
+ * 8390 reset command required, but that shouldn't be necessary.
+ */
+static void zorro8390_reset_8390(struct net_device *dev)
+{
+	unsigned long reset_start_time = jiffies;
+
+	if (ei_debug > 1)
+		netdev_dbg(dev, "resetting - t=%ld...\n", jiffies);
+
+	z_writeb(z_readb(NE_BASE + NE_RESET), NE_BASE + NE_RESET);
+
+	ei_status.txing = 0;
+	ei_status.dmaing = 0;
+
+	/* This check _should_not_ be necessary, omit eventually. */
+	while ((z_readb(NE_BASE + NE_EN0_ISR) & ENISR_RESET) == 0)
+		if (time_after(jiffies, reset_start_time + 2 * HZ / 100)) {
+			netdev_warn(dev, "%s: did not complete\n", __func__);
+			break;
+		}
+	z_writeb(ENISR_RESET, NE_BASE + NE_EN0_ISR);	/* Ack intr */
+}
+
+/* Grab the 8390 specific header. Similar to the block_input routine, but
+ * we don't need to be concerned with ring wrap as the header will be at
+ * the start of a page, so we optimize accordingly.
+ */
 static void zorro8390_get_8390_hdr(struct net_device *dev,
-				   struct e8390_pkt_hdr *hdr, int ring_page);
+				   struct e8390_pkt_hdr *hdr, int ring_page)
+{
+	int nic_base = dev->base_addr;
+	int cnt;
+	short *ptrs;
+
+	/* This *shouldn't* happen.
+	 * If it does, it's the last thing you'll see
+	 */
+	if (ei_status.dmaing) {
+		netdev_err(dev, "%s: DMAing conflict [DMAstat:%d][irqlock:%d]\n",
+			   __func__, ei_status.dmaing, ei_status.irqlock);
+		return;
+	}
+
+	ei_status.dmaing |= 0x01;
+	z_writeb(E8390_NODMA + E8390_PAGE0 + E8390_START, nic_base + NE_CMD);
+	z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);
+	z_writeb(sizeof(struct e8390_pkt_hdr), nic_base + NE_EN0_RCNTLO);
+	z_writeb(0, nic_base + NE_EN0_RCNTHI);
+	z_writeb(0, nic_base + NE_EN0_RSARLO);		/* On page boundary */
+	z_writeb(ring_page, nic_base + NE_EN0_RSARHI);
+	z_writeb(E8390_RREAD+E8390_START, nic_base + NE_CMD);
+
+	ptrs = (short *)hdr;
+	for (cnt = 0; cnt < sizeof(struct e8390_pkt_hdr) >> 1; cnt++)
+		*ptrs++ = z_readw(NE_BASE + NE_DATAPORT);
+
+	z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);	/* Ack intr */
+
+	hdr->count = WORDSWAP(hdr->count);
+
+	ei_status.dmaing &= ~0x01;
+}
+
+/* Block input and output, similar to the Crynwr packet driver.
+ * If you are porting to a new ethercard, look at the packet driver source
+ * for hints. The NEx000 doesn't share the on-board packet memory --
+ * you have to put the packet out through the "remote DMA" dataport
+ * using z_writeb.
+ */
 static void zorro8390_block_input(struct net_device *dev, int count,
-				  struct sk_buff *skb, int ring_offset);
-static void zorro8390_block_output(struct net_device *dev, const int count,
+				  struct sk_buff *skb, int ring_offset)
+{
+	int nic_base = dev->base_addr;
+	char *buf = skb->data;
+	short *ptrs;
+	int cnt;
+
+	/* This *shouldn't* happen.
+	 * If it does, it's the last thing you'll see
+	 */
+	if (ei_status.dmaing) {
+		netdev_err(dev, "%s: DMAing conflict [DMAstat:%d][irqlock:%d]\n",
+			   __func__, ei_status.dmaing, ei_status.irqlock);
+		return;
+	}
+	ei_status.dmaing |= 0x01;
+	z_writeb(E8390_NODMA + E8390_PAGE0 + E8390_START, nic_base + NE_CMD);
+	z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);
+	z_writeb(count & 0xff, nic_base + NE_EN0_RCNTLO);
+	z_writeb(count >> 8, nic_base + NE_EN0_RCNTHI);
+	z_writeb(ring_offset & 0xff, nic_base + NE_EN0_RSARLO);
+	z_writeb(ring_offset >> 8, nic_base + NE_EN0_RSARHI);
+	z_writeb(E8390_RREAD+E8390_START, nic_base + NE_CMD);
+	ptrs = (short *)buf;
+	for (cnt = 0; cnt < count >> 1; cnt++)
+		*ptrs++ = z_readw(NE_BASE + NE_DATAPORT);
+	if (count & 0x01)
+		buf[count - 1] = z_readb(NE_BASE + NE_DATAPORT);
+
+	z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);	/* Ack intr */
+	ei_status.dmaing &= ~0x01;
+}
+
+static void zorro8390_block_output(struct net_device *dev, int count,
 				   const unsigned char *buf,
-				   const int start_page);
-static void __devexit zorro8390_remove_one(struct zorro_dev *z);
+				   const int start_page)
+{
+	int nic_base = NE_BASE;
+	unsigned long dma_start;
+	short *ptrs;
+	int cnt;
+
+	/* Round the count up for word writes.  Do we need to do this?
+	 * What effect will an odd byte count have on the 8390?
+	 * I should check someday.
+	 */
+	if (count & 0x01)
+		count++;
+
+	/* This *shouldn't* happen.
+	 * If it does, it's the last thing you'll see
+	 */
+	if (ei_status.dmaing) {
+		netdev_err(dev, "%s: DMAing conflict [DMAstat:%d][irqlock:%d]\n",
+			   __func__, ei_status.dmaing, ei_status.irqlock);
+		return;
+	}
+	ei_status.dmaing |= 0x01;
+	/* We should already be in page 0, but to be safe... */
+	z_writeb(E8390_PAGE0+E8390_START+E8390_NODMA, nic_base + NE_CMD);
+
+	z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);
+
+	/* Now the normal output. */
+	z_writeb(count & 0xff, nic_base + NE_EN0_RCNTLO);
+	z_writeb(count >> 8,   nic_base + NE_EN0_RCNTHI);
+	z_writeb(0x00, nic_base + NE_EN0_RSARLO);
+	z_writeb(start_page, nic_base + NE_EN0_RSARHI);
+
+	z_writeb(E8390_RWRITE + E8390_START, nic_base + NE_CMD);
+	ptrs = (short *)buf;
+	for (cnt = 0; cnt < count >> 1; cnt++)
+		z_writew(*ptrs++, NE_BASE + NE_DATAPORT);
+
+	dma_start = jiffies;
+
+	while ((z_readb(NE_BASE + NE_EN0_ISR) & ENISR_RDC) == 0)
+		if (time_after(jiffies, dma_start + 2 * HZ / 100)) {
+					/* 20ms */
+			netdev_err(dev, "timeout waiting for Tx RDC\n");
+			zorro8390_reset_8390(dev);
+			__NS8390_init(dev, 1);
+			break;
+		}
+
+	z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);	/* Ack intr */
+	ei_status.dmaing &= ~0x01;
+}
 
-static struct zorro_device_id zorro8390_zorro_tbl[] __devinitdata = {
-    { ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2, },
-    { ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF, },
-    { 0 }
-};
-MODULE_DEVICE_TABLE(zorro, zorro8390_zorro_tbl);
+static int zorro8390_open(struct net_device *dev)
+{
+	__ei_open(dev);
+	return 0;
+}
 
-static struct zorro_driver zorro8390_driver = {
-    .name	= "zorro8390",
-    .id_table	= zorro8390_zorro_tbl,
-    .probe	= zorro8390_init_one,
-    .remove	= __devexit_p(zorro8390_remove_one),
-};
+static int zorro8390_close(struct net_device *dev)
+{
+	if (ei_debug > 1)
+		netdev_dbg(dev, "Shutting down ethercard\n");
+	__ei_close(dev);
+	return 0;
+}
 
-static int __devinit zorro8390_init_one(struct zorro_dev *z,
-					const struct zorro_device_id *ent)
+static void __devexit zorro8390_remove_one(struct zorro_dev *z)
 {
-    struct net_device *dev;
-    unsigned long board, ioaddr;
-    int err, i;
-
-    for (i = ARRAY_SIZE(cards)-1; i >= 0; i--)
-	if (z->id == cards[i].id)
-	    break;
-    if (i < 0)
-        return -ENODEV;
-
-    board = z->resource.start;
-    ioaddr = board+cards[i].offset;
-    dev = ____alloc_ei_netdev(0);
-    if (!dev)
-	return -ENOMEM;
-    if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) {
-	free_netdev(dev);
-	return -EBUSY;
-    }
-    if ((err = zorro8390_init(dev, board, cards[i].name,
-			      ZTWO_VADDR(ioaddr)))) {
-	release_mem_region(ioaddr, NE_IO_EXTENT*2);
+	struct net_device *dev = zorro_get_drvdata(z);
+
+	unregister_netdev(dev);
+	free_irq(IRQ_AMIGA_PORTS, dev);
+	release_mem_region(ZTWO_PADDR(dev->base_addr), NE_IO_EXTENT * 2);
 	free_netdev(dev);
-	return err;
-    }
-    zorro_set_drvdata(z, dev);
-    return 0;
 }
 
+static struct zorro_device_id zorro8390_zorro_tbl[] __devinitdata = {
+	{ ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2, },
+	{ ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF, },
+	{ 0 }
+};
+MODULE_DEVICE_TABLE(zorro, zorro8390_zorro_tbl);
+
 static const struct net_device_ops zorro8390_netdev_ops = {
 	.ndo_open		= zorro8390_open,
 	.ndo_stop		= zorro8390_close,
@@ -151,7 +280,7 @@ static const struct net_device_ops zorro8390_netdev_ops = {
 	.ndo_get_stats		= __ei_get_stats,
 	.ndo_set_multicast_list = __ei_set_multicast_list,
 	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_set_mac_address	= eth_mac_addr,
 	.ndo_change_mtu		= eth_change_mtu,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= __ei_poll,
@@ -162,295 +291,159 @@ static int __devinit zorro8390_init(struct net_device *dev,
 				    unsigned long board, const char *name,
 				    unsigned long ioaddr)
 {
-    int i;
-    int err;
-    unsigned char SA_prom[32];
-    int start_page, stop_page;
-    static u32 zorro8390_offsets[16] = {
-	0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
-	0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
-    };
-
-    /* Reset card. Who knows what dain-bramaged state it was left in. */
-    {
-	unsigned long reset_start_time = jiffies;
-
-	z_writeb(z_readb(ioaddr + NE_RESET), ioaddr + NE_RESET);
-
-	while ((z_readb(ioaddr + NE_EN0_ISR) & ENISR_RESET) == 0)
-	    if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
-		printk(KERN_WARNING " not found (no reset ack).\n");
-		return -ENODEV;
-	    }
-
-	z_writeb(0xff, ioaddr + NE_EN0_ISR);		/* Ack all intr. */
-    }
-
-    /* Read the 16 bytes of station address PROM.
-       We must first initialize registers, similar to NS8390_init(eifdev, 0).
-       We can't reliably read the SAPROM address without this.
-       (I learned the hard way!). */
-    {
-	struct {
-	    u32 value;
-	    u32 offset;
-	} program_seq[] = {
-	    {E8390_NODMA+E8390_PAGE0+E8390_STOP, NE_CMD}, /* Select page 0*/
-	    {0x48,	NE_EN0_DCFG},	/* Set byte-wide (0x48) access. */
-	    {0x00,	NE_EN0_RCNTLO},	/* Clear the count regs. */
-	    {0x00,	NE_EN0_RCNTHI},
-	    {0x00,	NE_EN0_IMR},	/* Mask completion irq. */
-	    {0xFF,	NE_EN0_ISR},
-	    {E8390_RXOFF, NE_EN0_RXCR},	/* 0x20  Set to monitor */
-	    {E8390_TXOFF, NE_EN0_TXCR},	/* 0x02  and loopback mode. */
-	    {32,	NE_EN0_RCNTLO},
-	    {0x00,	NE_EN0_RCNTHI},
-	    {0x00,	NE_EN0_RSARLO},	/* DMA starting at 0x0000. */
-	    {0x00,	NE_EN0_RSARHI},
-	    {E8390_RREAD+E8390_START, NE_CMD},
+	int i;
+	int err;
+	unsigned char SA_prom[32];
+	int start_page, stop_page;
+	static u32 zorro8390_offsets[16] = {
+		0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
+		0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
 	};
-	for (i = 0; i < ARRAY_SIZE(program_seq); i++) {
-	    z_writeb(program_seq[i].value, ioaddr + program_seq[i].offset);
-	}
-    }
-    for (i = 0; i < 16; i++) {
-	SA_prom[i] = z_readb(ioaddr + NE_DATAPORT);
-	(void)z_readb(ioaddr + NE_DATAPORT);
-    }
 
-    /* We must set the 8390 for word mode. */
-    z_writeb(0x49, ioaddr + NE_EN0_DCFG);
-    start_page = NESM_START_PG;
-    stop_page = NESM_STOP_PG;
+	/* Reset card. Who knows what dain-bramaged state it was left in. */
+	{
+		unsigned long reset_start_time = jiffies;
 
-    dev->base_addr = ioaddr;
-    dev->irq = IRQ_AMIGA_PORTS;
+		z_writeb(z_readb(ioaddr + NE_RESET), ioaddr + NE_RESET);
 
-    /* Install the Interrupt handler */
-    i = request_irq(IRQ_AMIGA_PORTS, __ei_interrupt, IRQF_SHARED, DRV_NAME, dev);
-    if (i) return i;
+		while ((z_readb(ioaddr + NE_EN0_ISR) & ENISR_RESET) == 0)
+			if (time_after(jiffies,
+				       reset_start_time + 2 * HZ / 100)) {
+				netdev_warn(dev, "not found (no reset ack)\n");
+				return -ENODEV;
+			}
 
-    for(i = 0; i < ETHER_ADDR_LEN; i++)
-	dev->dev_addr[i] = SA_prom[i];
-
-#ifdef DEBUG
-    printk("%pM", dev->dev_addr);
-#endif
+		z_writeb(0xff, ioaddr + NE_EN0_ISR);	/* Ack all intr. */
+	}
 
-    ei_status.name = name;
-    ei_status.tx_start_page = start_page;
-    ei_status.stop_page = stop_page;
-    ei_status.word16 = 1;
+	/* Read the 16 bytes of station address PROM.
+	 * We must first initialize registers,
+	 * similar to NS8390_init(eifdev, 0).
+	 * We can't reliably read the SAPROM address without this.
+	 * (I learned the hard way!).
+	 */
+	{
+		static const struct {
+			u32 value;
+			u32 offset;
+		} program_seq[] = {
+			{E8390_NODMA + E8390_PAGE0 + E8390_STOP, NE_CMD},
+						/* Select page 0 */
+			{0x48,	NE_EN0_DCFG},	/* 0x48: Set byte-wide access */
+			{0x00,	NE_EN0_RCNTLO},	/* Clear the count regs */
+			{0x00,	NE_EN0_RCNTHI},
+			{0x00,	NE_EN0_IMR},	/* Mask completion irq */
+			{0xFF,	NE_EN0_ISR},
+			{E8390_RXOFF, NE_EN0_RXCR}, /* 0x20 Set to monitor */
+			{E8390_TXOFF, NE_EN0_TXCR}, /* 0x02 and loopback mode */
+			{32,	NE_EN0_RCNTLO},
+			{0x00,	NE_EN0_RCNTHI},
+			{0x00,	NE_EN0_RSARLO},	/* DMA starting at 0x0000 */
+			{0x00,	NE_EN0_RSARHI},
+			{E8390_RREAD + E8390_START, NE_CMD},
+		};
+		for (i = 0; i < ARRAY_SIZE(program_seq); i++)
+			z_writeb(program_seq[i].value,
+				 ioaddr + program_seq[i].offset);
+	}
+	for (i = 0; i < 16; i++) {
+		SA_prom[i] = z_readb(ioaddr + NE_DATAPORT);
+		(void)z_readb(ioaddr + NE_DATAPORT);
+	}
 
-    ei_status.rx_start_page = start_page + TX_PAGES;
+	/* We must set the 8390 for word mode. */
+	z_writeb(0x49, ioaddr + NE_EN0_DCFG);
+	start_page = NESM_START_PG;
+	stop_page = NESM_STOP_PG;
 
-    ei_status.reset_8390 = &zorro8390_reset_8390;
-    ei_status.block_input = &zorro8390_block_input;
-    ei_status.block_output = &zorro8390_block_output;
-    ei_status.get_8390_hdr = &zorro8390_get_8390_hdr;
-    ei_status.reg_offset = zorro8390_offsets;
+	dev->base_addr = ioaddr;
+	dev->irq = IRQ_AMIGA_PORTS;
 
-    dev->netdev_ops = &zorro8390_netdev_ops;
-    __NS8390_init(dev, 0);
-    err = register_netdev(dev);
-    if (err) {
-	free_irq(IRQ_AMIGA_PORTS, dev);
-	return err;
-    }
+	/* Install the Interrupt handler */
+	i = request_irq(IRQ_AMIGA_PORTS, __ei_interrupt,
+			IRQF_SHARED, DRV_NAME, dev);
+	if (i)
+		return i;
 
-    printk(KERN_INFO "%s: %s at 0x%08lx, Ethernet Address %pM\n",
-	   dev->name, name, board, dev->dev_addr);
+	for (i = 0; i < ETHER_ADDR_LEN; i++)
+		dev->dev_addr[i] = SA_prom[i];
 
-    return 0;
-}
+	pr_debug("Found ethernet address: %pM\n", dev->dev_addr);
 
-static int zorro8390_open(struct net_device *dev)
-{
-    __ei_open(dev);
-    return 0;
-}
+	ei_status.name = name;
+	ei_status.tx_start_page = start_page;
+	ei_status.stop_page = stop_page;
+	ei_status.word16 = 1;
 
-static int zorro8390_close(struct net_device *dev)
-{
-    if (ei_debug > 1)
-	printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name);
-    __ei_close(dev);
-    return 0;
-}
+	ei_status.rx_start_page = start_page + TX_PAGES;
 
-/* Hard reset the card.  This used to pause for the same period that a
-   8390 reset command required, but that shouldn't be necessary. */
-static void zorro8390_reset_8390(struct net_device *dev)
-{
-    unsigned long reset_start_time = jiffies;
+	ei_status.reset_8390 = zorro8390_reset_8390;
+	ei_status.block_input = zorro8390_block_input;
+	ei_status.block_output = zorro8390_block_output;
+	ei_status.get_8390_hdr = zorro8390_get_8390_hdr;
+	ei_status.reg_offset = zorro8390_offsets;
 
-    if (ei_debug > 1)
-	printk(KERN_DEBUG "resetting the 8390 t=%ld...\n", jiffies);
-
-    z_writeb(z_readb(NE_BASE + NE_RESET), NE_BASE + NE_RESET);
-
-    ei_status.txing = 0;
-    ei_status.dmaing = 0;
-
-    /* This check _should_not_ be necessary, omit eventually. */
-    while ((z_readb(NE_BASE+NE_EN0_ISR) & ENISR_RESET) == 0)
-	if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
-	    printk(KERN_WARNING "%s: ne_reset_8390() did not complete.\n",
-		   dev->name);
-	    break;
+	dev->netdev_ops = &zorro8390_netdev_ops;
+	__NS8390_init(dev, 0);
+	err = register_netdev(dev);
+	if (err) {
+		free_irq(IRQ_AMIGA_PORTS, dev);
+		return err;
 	}
-    z_writeb(ENISR_RESET, NE_BASE + NE_EN0_ISR);	/* Ack intr. */
-}
 
-/* Grab the 8390 specific header. Similar to the block_input routine, but
-   we don't need to be concerned with ring wrap as the header will be at
-   the start of a page, so we optimize accordingly. */
+	netdev_info(dev, "%s at 0x%08lx, Ethernet Address %pM\n",
+		    name, board, dev->dev_addr);
 
-static void zorro8390_get_8390_hdr(struct net_device *dev,
-				   struct e8390_pkt_hdr *hdr, int ring_page)
-{
-    int nic_base = dev->base_addr;
-    int cnt;
-    short *ptrs;
-
-    /* This *shouldn't* happen. If it does, it's the last thing you'll see */
-    if (ei_status.dmaing) {
-	printk(KERN_ERR "%s: DMAing conflict in ne_get_8390_hdr "
-	   "[DMAstat:%d][irqlock:%d].\n", dev->name, ei_status.dmaing,
-	   ei_status.irqlock);
-	return;
-    }
-
-    ei_status.dmaing |= 0x01;
-    z_writeb(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base+ NE_CMD);
-    z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);
-    z_writeb(sizeof(struct e8390_pkt_hdr), nic_base + NE_EN0_RCNTLO);
-    z_writeb(0, nic_base + NE_EN0_RCNTHI);
-    z_writeb(0, nic_base + NE_EN0_RSARLO);		/* On page boundary */
-    z_writeb(ring_page, nic_base + NE_EN0_RSARHI);
-    z_writeb(E8390_RREAD+E8390_START, nic_base + NE_CMD);
-
-    ptrs = (short*)hdr;
-    for (cnt = 0; cnt < (sizeof(struct e8390_pkt_hdr)>>1); cnt++)
-	*ptrs++ = z_readw(NE_BASE + NE_DATAPORT);
-
-    z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);	/* Ack intr. */
-
-    hdr->count = WORDSWAP(hdr->count);
-
-    ei_status.dmaing &= ~0x01;
+	return 0;
 }
 
-/* Block input and output, similar to the Crynwr packet driver.  If you
-   are porting to a new ethercard, look at the packet driver source for hints.
-   The NEx000 doesn't share the on-board packet memory -- you have to put
-   the packet out through the "remote DMA" dataport using z_writeb. */
-
-static void zorro8390_block_input(struct net_device *dev, int count,
-				 struct sk_buff *skb, int ring_offset)
+static int __devinit zorro8390_init_one(struct zorro_dev *z,
+					const struct zorro_device_id *ent)
 {
-    int nic_base = dev->base_addr;
-    char *buf = skb->data;
-    short *ptrs;
-    int cnt;
-
-    /* This *shouldn't* happen. If it does, it's the last thing you'll see */
-    if (ei_status.dmaing) {
-	printk(KERN_ERR "%s: DMAing conflict in ne_block_input "
-	   "[DMAstat:%d][irqlock:%d].\n",
-	   dev->name, ei_status.dmaing, ei_status.irqlock);
-	return;
-    }
-    ei_status.dmaing |= 0x01;
-    z_writeb(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base+ NE_CMD);
-    z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);
-    z_writeb(count & 0xff, nic_base + NE_EN0_RCNTLO);
-    z_writeb(count >> 8, nic_base + NE_EN0_RCNTHI);
-    z_writeb(ring_offset & 0xff, nic_base + NE_EN0_RSARLO);
-    z_writeb(ring_offset >> 8, nic_base + NE_EN0_RSARHI);
-    z_writeb(E8390_RREAD+E8390_START, nic_base + NE_CMD);
-    ptrs = (short*)buf;
-    for (cnt = 0; cnt < (count>>1); cnt++)
-	*ptrs++ = z_readw(NE_BASE + NE_DATAPORT);
-    if (count & 0x01)
-	buf[count-1] = z_readb(NE_BASE + NE_DATAPORT);
-
-    z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);	/* Ack intr. */
-    ei_status.dmaing &= ~0x01;
-}
+	struct net_device *dev;
+	unsigned long board, ioaddr;
+	int err, i;
+
+	for (i = ARRAY_SIZE(cards) - 1; i >= 0; i--)
+		if (z->id == cards[i].id)
+			break;
+	if (i < 0)
+		return -ENODEV;
 
-static void zorro8390_block_output(struct net_device *dev, int count,
-				   const unsigned char *buf,
-				   const int start_page)
-{
-    int nic_base = NE_BASE;
-    unsigned long dma_start;
-    short *ptrs;
-    int cnt;
-
-    /* Round the count up for word writes.  Do we need to do this?
-       What effect will an odd byte count have on the 8390?
-       I should check someday. */
-    if (count & 0x01)
-	count++;
-
-    /* This *shouldn't* happen. If it does, it's the last thing you'll see */
-    if (ei_status.dmaing) {
-	printk(KERN_ERR "%s: DMAing conflict in ne_block_output."
-	   "[DMAstat:%d][irqlock:%d]\n", dev->name, ei_status.dmaing,
-	   ei_status.irqlock);
-	return;
-    }
-    ei_status.dmaing |= 0x01;
-    /* We should already be in page 0, but to be safe... */
-    z_writeb(E8390_PAGE0+E8390_START+E8390_NODMA, nic_base + NE_CMD);
-
-    z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);
-
-   /* Now the normal output. */
-    z_writeb(count & 0xff, nic_base + NE_EN0_RCNTLO);
-    z_writeb(count >> 8,   nic_base + NE_EN0_RCNTHI);
-    z_writeb(0x00, nic_base + NE_EN0_RSARLO);
-    z_writeb(start_page, nic_base + NE_EN0_RSARHI);
-
-    z_writeb(E8390_RWRITE+E8390_START, nic_base + NE_CMD);
-    ptrs = (short*)buf;
-    for (cnt = 0; cnt < count>>1; cnt++)
-	z_writew(*ptrs++, NE_BASE+NE_DATAPORT);
-
-    dma_start = jiffies;
-
-    while ((z_readb(NE_BASE + NE_EN0_ISR) & ENISR_RDC) == 0)
-	if (time_after(jiffies, dma_start + 2*HZ/100)) {	/* 20ms */
-		printk(KERN_ERR "%s: timeout waiting for Tx RDC.\n",
-		       dev->name);
-		zorro8390_reset_8390(dev);
-		__NS8390_init(dev,1);
-		break;
+	board = z->resource.start;
+	ioaddr = board + cards[i].offset;
+	dev = ____alloc_ei_netdev(0);
+	if (!dev)
+		return -ENOMEM;
+	if (!request_mem_region(ioaddr, NE_IO_EXTENT * 2, DRV_NAME)) {
+		free_netdev(dev);
+		return -EBUSY;
 	}
-
-    z_writeb(ENISR_RDC, nic_base + NE_EN0_ISR);	/* Ack intr. */
-    ei_status.dmaing &= ~0x01;
+	err = zorro8390_init(dev, board, cards[i].name, ZTWO_VADDR(ioaddr));
+	if (err) {
+		release_mem_region(ioaddr, NE_IO_EXTENT * 2);
+		free_netdev(dev);
+		return err;
+	}
+	zorro_set_drvdata(z, dev);
+	return 0;
 }
 
-static void __devexit zorro8390_remove_one(struct zorro_dev *z)
-{
-    struct net_device *dev = zorro_get_drvdata(z);
-
-    unregister_netdev(dev);
-    free_irq(IRQ_AMIGA_PORTS, dev);
-    release_mem_region(ZTWO_PADDR(dev->base_addr), NE_IO_EXTENT*2);
-    free_netdev(dev);
-}
+static struct zorro_driver zorro8390_driver = {
+	.name		= "zorro8390",
+	.id_table	= zorro8390_zorro_tbl,
+	.probe		= zorro8390_init_one,
+	.remove		= __devexit_p(zorro8390_remove_one),
+};
 
 static int __init zorro8390_init_module(void)
 {
-    return zorro_register_driver(&zorro8390_driver);
+	return zorro_register_driver(&zorro8390_driver);
 }
 
 static void __exit zorro8390_cleanup_module(void)
 {
-    zorro_unregister_driver(&zorro8390_driver);
+	zorro_unregister_driver(&zorro8390_driver);
 }
 
 module_init(zorro8390_init_module);
-- 
1.7.6.rc3

^ permalink raw reply related

* [PATCH 6/8] lib8390: Convert include <asm to include <linux
From: Joe Perches @ 2011-06-23  6:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1308810463.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/lib8390.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index b0ee6f6..946b255 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -58,8 +58,8 @@
 #include <linux/string.h>
 #include <linux/bitops.h>
 #include <asm/system.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
+#include <linux/uaccess.h>
+#include <linux/io.h>
 #include <asm/irq.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
-- 
1.7.6.rc3

^ permalink raw reply related

* [PATCH 5/8] lib8390: Normalize source code spacing
From: Joe Perches @ 2011-06-23  6:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1308810463.git.joe@perches.com>

Make more conformant to normal kernel style.

Long line lengths > 80 columns ignored.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/lib8390.c |   81 ++++++++++++++++++++++++++----------------------
 1 files changed, 44 insertions(+), 37 deletions(-)

diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 9ace5a7..b0ee6f6 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -36,7 +36,7 @@
   Paul Gortmaker	: tweak ANK's above multicast changes a bit.
   Paul Gortmaker	: update packet statistics for v2.1.x
   Alan Cox		: support arbitrary stupid port mappings on the
-  			  68K Macintosh. Support >16bit I/O spaces
+			  68K Macintosh. Support >16bit I/O spaces
   Paul Gortmaker	: add kmod support for auto-loading of the 8390
 			  module by all drivers that require it.
   Alan Cox		: Spinlocking work, added 'BUG_83C690'
@@ -206,19 +206,19 @@ static int __ei_open(struct net_device *dev)
 	struct ei_device *ei_local = netdev_priv(dev);
 
 	if (dev->watchdog_timeo <= 0)
-		 dev->watchdog_timeo = TX_TIMEOUT;
+		dev->watchdog_timeo = TX_TIMEOUT;
 
 	/*
 	 *	Grab the page lock so we own the register set, then call
 	 *	the init function.
 	 */
 
-      	spin_lock_irqsave(&ei_local->page_lock, flags);
+	spin_lock_irqsave(&ei_local->page_lock, flags);
 	__NS8390_init(dev, 1);
 	/* Set the flag before we drop the lock, That way the IRQ arrives
 	   after its set and we get no silly warnings */
 	netif_start_queue(dev);
-      	spin_unlock_irqrestore(&ei_local->page_lock, flags);
+	spin_unlock_irqrestore(&ei_local->page_lock, flags);
 	ei_local->irqlock = 0;
 	return 0;
 }
@@ -238,9 +238,9 @@ static int __ei_close(struct net_device *dev)
 	 *	Hold the page lock during close
 	 */
 
-      	spin_lock_irqsave(&ei_local->page_lock, flags);
+	spin_lock_irqsave(&ei_local->page_lock, flags);
 	__NS8390_init(dev, 0);
-      	spin_unlock_irqrestore(&ei_local->page_lock, flags);
+	spin_unlock_irqrestore(&ei_local->page_lock, flags);
 	netif_stop_queue(dev);
 	return 0;
 }
@@ -377,7 +377,7 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
 
 	ei_block_output(dev, send_length, data, output_page);
 
-	if (! ei_local->txing) {
+	if (!ei_local->txing) {
 		ei_local->txing = 1;
 		NS8390_trigger_send(dev, send_length, output_page);
 		if (output_page == ei_local->tx_start_page) {
@@ -402,7 +402,7 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
 	spin_unlock(&ei_local->page_lock);
 	enable_irq_lockdep_irqrestore(dev->irq, &flags);
 	skb_tx_timestamp(skb);
-	dev_kfree_skb (skb);
+	dev_kfree_skb(skb);
 	dev->stats.tx_bytes += send_length;
 
 	return NETDEV_TX_OK;
@@ -476,7 +476,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 		if (interrupts & ENISR_COUNTERS) {
 			dev->stats.rx_frame_errors += ei_inb_p(e8390_base + EN0_COUNTER0);
 			dev->stats.rx_crc_errors   += ei_inb_p(e8390_base + EN0_COUNTER1);
-			dev->stats.rx_missed_errors+= ei_inb_p(e8390_base + EN0_COUNTER2);
+			dev->stats.rx_missed_errors += ei_inb_p(e8390_base + EN0_COUNTER2);
 			ei_outb_p(ENISR_COUNTERS, e8390_base + EN0_ISR); /* Ack intr. */
 		}
 
@@ -491,7 +491,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 		ei_outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base + E8390_CMD);
 		if (nr_serviced >= MAX_SERVICE) {
 			/* 0xFF is valid for a card removal */
-			if(interrupts!=0xFF)
+			if (interrupts != 0xFF)
 				netdev_warn(dev, "Too much work at interrupt, status %#2.2x\n",
 					    interrupts);
 			ei_outb_p(ENISR_ALL, e8390_base + EN0_ISR); /* Ack. most intrs. */
@@ -556,9 +556,12 @@ static void ei_tx_err(struct net_device *dev)
 		ei_tx_intr(dev);
 	else {
 		dev->stats.tx_errors++;
-		if (txsr & ENTSR_CRS) dev->stats.tx_carrier_errors++;
-		if (txsr & ENTSR_CDH) dev->stats.tx_heartbeat_errors++;
-		if (txsr & ENTSR_OWC) dev->stats.tx_window_errors++;
+		if (txsr & ENTSR_CRS)
+			dev->stats.tx_carrier_errors++;
+		if (txsr & ENTSR_CDH)
+			dev->stats.tx_heartbeat_errors++;
+		if (txsr & ENTSR_OWC)
+			dev->stats.tx_window_errors++;
 	}
 }
 
@@ -610,9 +613,10 @@ static void ei_tx_intr(struct net_device *dev)
 			ei_local->lasttx = 1;
 		} else
 			ei_local->lasttx = 10, ei_local->txing = 0;
-	}
-//	else printk(KERN_WARNING "%s: unexpected TX-done interrupt, lasttx=%d.\n",
-//			dev->name, ei_local->lasttx);
+	} /* else
+		netdev_warn(dev, "unexpected TX-done interrupt, lasttx=%d\n",
+			    ei_local->lasttx);
+*/
 
 	/* Minimize Tx latency: update the statistics after we restart TXing. */
 	if (status & ENTSR_COL)
@@ -674,7 +678,9 @@ static void ei_receive(struct net_device *dev)
 		   Keep quiet if it looks like a card removal. One problem here
 		   is that some clones crash in roughly the same way.
 		 */
-		if (ei_debug > 0  &&  this_frame != ei_local->current_page && (this_frame!=0x0 || rxing_page!=0xFF))
+		if (ei_debug > 0 &&
+		    this_frame != ei_local->current_page &&
+		    (this_frame != 0x0 || rxing_page != 0xFF))
 			netdev_err(dev, "mismatched read page pointers %2x vs %2x\n",
 				   this_frame, ei_local->current_page);
 
@@ -720,10 +726,10 @@ static void ei_receive(struct net_device *dev)
 				dev->stats.rx_dropped++;
 				break;
 			} else {
-				skb_reserve(skb,2);	/* IP headers on 16 byte boundaries */
+				skb_reserve(skb, 2);	/* IP headers on 16 byte boundaries */
 				skb_put(skb, pkt_len);	/* Make room */
 				ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame));
-				skb->protocol=eth_type_trans(skb,dev);
+				skb->protocol = eth_type_trans(skb, dev);
 				if (!skb_defer_rx_timestamp(skb))
 					netif_rx(skb);
 				dev->stats.rx_packets++;
@@ -833,7 +839,7 @@ static void ei_rx_overrun(struct net_device *dev)
 	 */
 	ei_outb_p(E8390_TXCONFIG, e8390_base + EN0_TXCR);
 	if (must_resend)
-    		ei_outb_p(E8390_NODMA + E8390_PAGE0 + E8390_START + E8390_TRANS, e8390_base + E8390_CMD);
+		ei_outb_p(E8390_NODMA + E8390_PAGE0 + E8390_START + E8390_TRANS, e8390_base + E8390_CMD);
 }
 
 /*
@@ -850,11 +856,11 @@ static struct net_device_stats *__ei_get_stats(struct net_device *dev)
 	if (!netif_running(dev))
 		return &dev->stats;
 
-	spin_lock_irqsave(&ei_local->page_lock,flags);
+	spin_lock_irqsave(&ei_local->page_lock, flags);
 	/* Read the counter registers, assuming we are in page 0. */
-	dev->stats.rx_frame_errors += ei_inb_p(ioaddr + EN0_COUNTER0);
-	dev->stats.rx_crc_errors   += ei_inb_p(ioaddr + EN0_COUNTER1);
-	dev->stats.rx_missed_errors+= ei_inb_p(ioaddr + EN0_COUNTER2);
+	dev->stats.rx_frame_errors  += ei_inb_p(ioaddr + EN0_COUNTER0);
+	dev->stats.rx_crc_errors    += ei_inb_p(ioaddr + EN0_COUNTER1);
+	dev->stats.rx_missed_errors += ei_inb_p(ioaddr + EN0_COUNTER2);
 	spin_unlock_irqrestore(&ei_local->page_lock, flags);
 
 	return &dev->stats;
@@ -916,23 +922,23 @@ static void do_set_multicast_list(struct net_device *dev)
 	if (netif_running(dev))
 		ei_outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
 	ei_outb_p(E8390_NODMA + E8390_PAGE1, e8390_base + E8390_CMD);
-	for(i = 0; i < 8; i++) {
+	for (i = 0; i < 8; i++) {
 		ei_outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i));
 #ifndef BUG_83C690
-		if(ei_inb_p(e8390_base + EN1_MULT_SHIFT(i))!=ei_local->mcfilter[i])
+		if (ei_inb_p(e8390_base + EN1_MULT_SHIFT(i)) != ei_local->mcfilter[i])
 			netdev_err(dev, "Multicast filter read/write mismap %d\n",
 				   i);
 #endif
 	}
 	ei_outb_p(E8390_NODMA + E8390_PAGE0, e8390_base + E8390_CMD);
 
-  	if(dev->flags&IFF_PROMISC)
-  		ei_outb_p(E8390_RXCONFIG | 0x18, e8390_base + EN0_RXCR);
+	if (dev->flags&IFF_PROMISC)
+		ei_outb_p(E8390_RXCONFIG | 0x18, e8390_base + EN0_RXCR);
 	else if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev))
-  		ei_outb_p(E8390_RXCONFIG | 0x08, e8390_base + EN0_RXCR);
-  	else
-  		ei_outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
- }
+		ei_outb_p(E8390_RXCONFIG | 0x08, e8390_base + EN0_RXCR);
+	else
+		ei_outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
+}
 
 /*
  *	Called without lock held. This is invoked from user context and may
@@ -1004,8 +1010,8 @@ static void __NS8390_init(struct net_device *dev, int startp)
 	    ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0))
 	    : 0x48;
 
-	if(sizeof(struct e8390_pkt_hdr)!=4)
-    		panic("8390.c: header struct mispacked\n");
+	if (sizeof(struct e8390_pkt_hdr) != 4)
+		panic("8390.c: header struct mispacked\n");
 	/* Follow National Semi's recommendations for initing the DP83902. */
 	ei_outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD); /* 0x21 */
 	ei_outb_p(endcfg, e8390_base + EN0_DCFG);	/* 0x48 or 0x49 */
@@ -1029,9 +1035,10 @@ static void __NS8390_init(struct net_device *dev, int startp)
 	/* Copy the station address into the DS8390 registers. */
 
 	ei_outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP, e8390_base+E8390_CMD); /* 0x61 */
-	for(i = 0; i < 6; i++) {
+	for (i = 0; i < 6; i++) {
 		ei_outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i));
-		if (ei_debug > 1 && ei_inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i])
+		if (ei_debug > 1 &&
+		    ei_inb_p(e8390_base + EN1_PHYS_SHIFT(i)) != dev->dev_addr[i])
 			netdev_err(dev, "Hw. address read/write mismap %d\n", i);
 	}
 
@@ -1059,7 +1066,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
 								int start_page)
 {
 	unsigned long e8390_base = dev->base_addr;
- 	struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);
+	struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);
 
 	ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
 
-- 
1.7.6.rc3

^ permalink raw reply related

* [PATCH 3/8] lib8390: Use pr_<level> and netdev_<level>
From: Joe Perches @ 2011-06-23  6:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1308810463.git.joe@perches.com>

Use the current logging styles.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/lib8390.c |   86 ++++++++++++++++++++++++------------------------
 1 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 70eb207..59d5414 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -267,9 +267,10 @@ static void __ei_tx_timeout(struct net_device *dev)
 	isr = ei_inb(e8390_base+EN0_ISR);
 	spin_unlock_irqrestore(&ei_local->page_lock, flags);
 
-	printk(KERN_DEBUG "%s: Tx timed out, %s TSR=%#2x, ISR=%#2x, t=%d.\n",
-		dev->name, (txsr & ENTSR_ABT) ? "excess collisions." :
-		(isr) ? "lost interrupt?" : "cable problem?", txsr, isr, tickssofar);
+	netdev_dbg(dev, "Tx timed out, %s TSR=%#2x, ISR=%#2x, t=%d\n",
+		   (txsr & ENTSR_ABT) ? "excess collisions." :
+		   (isr) ? "lost interrupt?" : "cable problem?",
+		   txsr, isr, tickssofar);
 
 	if (!isr && !dev->stats.tx_packets)
 	{
@@ -349,22 +350,22 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
 		output_page = ei_local->tx_start_page;
 		ei_local->tx1 = send_length;
 		if (ei_debug  &&  ei_local->tx2 > 0)
-			printk(KERN_DEBUG "%s: idle transmitter tx2=%d, lasttx=%d, txing=%d.\n",
-				dev->name, ei_local->tx2, ei_local->lasttx, ei_local->txing);
+			netdev_dbg(dev, "idle transmitter tx2=%d, lasttx=%d, txing=%d\n",
+				   ei_local->tx2, ei_local->lasttx, ei_local->txing);
 	}
 	else if (ei_local->tx2 == 0)
 	{
 		output_page = ei_local->tx_start_page + TX_PAGES/2;
 		ei_local->tx2 = send_length;
 		if (ei_debug  &&  ei_local->tx1 > 0)
-			printk(KERN_DEBUG "%s: idle transmitter, tx1=%d, lasttx=%d, txing=%d.\n",
-				dev->name, ei_local->tx1, ei_local->lasttx, ei_local->txing);
+			netdev_dbg(dev, "idle transmitter, tx1=%d, lasttx=%d, txing=%d\n",
+				   ei_local->tx1, ei_local->lasttx, ei_local->txing);
 	}
 	else
 	{	/* We should never get here. */
 		if (ei_debug)
-			printk(KERN_DEBUG "%s: No Tx buffers free! tx1=%d tx2=%d last=%d\n",
-				dev->name, ei_local->tx1, ei_local->tx2, ei_local->lasttx);
+			netdev_dbg(dev, "No Tx buffers free! tx1=%d tx2=%d last=%d\n",
+				   ei_local->tx1, ei_local->tx2, ei_local->lasttx);
 		ei_local->irqlock = 0;
 		netif_stop_queue(dev);
 		ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
@@ -448,9 +449,8 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 		 * This might just be an interrupt for a PCI device sharing
 		 * this line
 		 */
-		printk("%s: Interrupted while interrupts are masked!"
-			   " isr=%#2x imr=%#2x.\n",
-			   dev->name, ei_inb_p(e8390_base + EN0_ISR),
+		netdev_err(dev, "Interrupted while interrupts are masked! isr=%#2x imr=%#2x\n",
+			   ei_inb_p(e8390_base + EN0_ISR),
 			   ei_inb_p(e8390_base + EN0_IMR));
 		spin_unlock(&ei_local->page_lock);
 		return IRQ_NONE;
@@ -459,7 +459,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 	/* Change to page 0 and read the intr status reg. */
 	ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base + E8390_CMD);
 	if (ei_debug > 3)
-		printk(KERN_DEBUG "%s: interrupt(isr=%#2.2x).\n", dev->name,
+		netdev_dbg(dev, "interrupt(isr=%#2.2x)\n",
 			   ei_inb_p(e8390_base + EN0_ISR));
 
 	/* !!Assumption!! -- we stay in page 0.	 Don't break this. */
@@ -467,7 +467,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 	       ++nr_serviced < MAX_SERVICE)
 	{
 		if (!netif_running(dev)) {
-			printk(KERN_WARNING "%s: interrupt from stopped card\n", dev->name);
+			netdev_warn(dev, "interrupt from stopped card\n");
 			/* rmk - acknowledge the interrupts */
 			ei_outb_p(interrupts, e8390_base + EN0_ISR);
 			interrupts = 0;
@@ -510,11 +510,11 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 		{
 			/* 0xFF is valid for a card removal */
 			if(interrupts!=0xFF)
-				printk(KERN_WARNING "%s: Too much work at interrupt, status %#2.2x\n",
-				   dev->name, interrupts);
+				netdev_warn(dev, "Too much work at interrupt, status %#2.2x\n",
+					    interrupts);
 			ei_outb_p(ENISR_ALL, e8390_base + EN0_ISR); /* Ack. most intrs. */
 		} else {
-			printk(KERN_WARNING "%s: unknown interrupt %#2x\n", dev->name, interrupts);
+			netdev_warn(dev, "unknown interrupt %#2x\n", interrupts);
 			ei_outb_p(0xff, e8390_base + EN0_ISR); /* Ack. all intrs. */
 		}
 	}
@@ -554,18 +554,18 @@ static void ei_tx_err(struct net_device *dev)
 	unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU);
 
 #ifdef VERBOSE_ERROR_DUMP
-	printk(KERN_DEBUG "%s: transmitter error (%#2x): ", dev->name, txsr);
+	netdev_dbg(dev, "transmitter error (%#2x):", txsr);
 	if (txsr & ENTSR_ABT)
-		printk("excess-collisions ");
+		pr_cont(" excess-collisions ");
 	if (txsr & ENTSR_ND)
-		printk("non-deferral ");
+		pr_cont(" non-deferral ");
 	if (txsr & ENTSR_CRS)
-		printk("lost-carrier ");
+		pr_cont(" lost-carrier ");
 	if (txsr & ENTSR_FU)
-		printk("FIFO-underrun ");
+		pr_cont(" FIFO-underrun ");
 	if (txsr & ENTSR_CDH)
-		printk("lost-heartbeat ");
-	printk("\n");
+		pr_cont(" lost-heartbeat ");
+	pr_cont("\n");
 #endif
 
 	ei_outb_p(ENISR_TX_ERR, e8390_base + EN0_ISR); /* Ack intr. */
@@ -606,8 +606,8 @@ static void ei_tx_intr(struct net_device *dev)
 	if (ei_local->tx1 < 0)
 	{
 		if (ei_local->lasttx != 1 && ei_local->lasttx != -1)
-			printk(KERN_ERR "%s: bogus last_tx_buffer %d, tx1=%d.\n",
-				ei_local->name, ei_local->lasttx, ei_local->tx1);
+			pr_err("%s: bogus last_tx_buffer %d, tx1=%d\n",
+			       ei_local->name, ei_local->lasttx, ei_local->tx1);
 		ei_local->tx1 = 0;
 		if (ei_local->tx2 > 0)
 		{
@@ -622,8 +622,8 @@ static void ei_tx_intr(struct net_device *dev)
 	else if (ei_local->tx2 < 0)
 	{
 		if (ei_local->lasttx != 2  &&  ei_local->lasttx != -2)
-			printk("%s: bogus last_tx_buffer %d, tx2=%d.\n",
-				ei_local->name, ei_local->lasttx, ei_local->tx2);
+			pr_err("%s: bogus last_tx_buffer %d, tx2=%d\n",
+			       ei_local->name, ei_local->lasttx, ei_local->tx2);
 		ei_local->tx2 = 0;
 		if (ei_local->tx1 > 0)
 		{
@@ -703,8 +703,8 @@ static void ei_receive(struct net_device *dev)
 		   is that some clones crash in roughly the same way.
 		 */
 		if (ei_debug > 0  &&  this_frame != ei_local->current_page && (this_frame!=0x0 || rxing_page!=0xFF))
-			printk(KERN_ERR "%s: mismatched read page pointers %2x vs %2x.\n",
-				   dev->name, this_frame, ei_local->current_page);
+			netdev_err(dev, "mismatched read page pointers %2x vs %2x\n",
+				   this_frame, ei_local->current_page);
 
 		if (this_frame == rxing_page)	/* Read all the frames? */
 			break;				/* Done for now */
@@ -733,8 +733,8 @@ static void ei_receive(struct net_device *dev)
 		if (pkt_len < 60  ||  pkt_len > 1518)
 		{
 			if (ei_debug)
-				printk(KERN_DEBUG "%s: bogus packet size: %d, status=%#2x nxpg=%#2x.\n",
-					   dev->name, rx_frame.count, rx_frame.status,
+				netdev_dbg(dev, "bogus packet size: %d, status=%#2x nxpg=%#2x\n",
+					   rx_frame.count, rx_frame.status,
 					   rx_frame.next);
 			dev->stats.rx_errors++;
 			dev->stats.rx_length_errors++;
@@ -747,8 +747,8 @@ static void ei_receive(struct net_device *dev)
 			if (skb == NULL)
 			{
 				if (ei_debug > 1)
-					printk(KERN_DEBUG "%s: Couldn't allocate a sk_buff of size %d.\n",
-						   dev->name, pkt_len);
+					netdev_dbg(dev, "Couldn't allocate a sk_buff of size %d\n",
+						   pkt_len);
 				dev->stats.rx_dropped++;
 				break;
 			}
@@ -769,8 +769,8 @@ static void ei_receive(struct net_device *dev)
 		else
 		{
 			if (ei_debug)
-				printk(KERN_DEBUG "%s: bogus packet: status=%#2x nxpg=%#2x size=%d\n",
-					   dev->name, rx_frame.status, rx_frame.next,
+				netdev_dbg(dev, "bogus packet: status=%#2x nxpg=%#2x size=%d\n",
+					   rx_frame.status, rx_frame.next,
 					   rx_frame.count);
 			dev->stats.rx_errors++;
 			/* NB: The NIC counts CRC, frame and missed errors. */
@@ -781,8 +781,8 @@ static void ei_receive(struct net_device *dev)
 
 		/* This _should_ never happen: it's here for avoiding bad clones. */
 		if (next_frame >= ei_local->stop_page) {
-			printk("%s: next frame inconsistency, %#2x\n", dev->name,
-				   next_frame);
+			netdev_notice(dev, "next frame inconsistency, %#2x\n",
+				      next_frame);
 			next_frame = ei_local->rx_start_page;
 		}
 		ei_local->current_page = next_frame;
@@ -822,7 +822,7 @@ static void ei_rx_overrun(struct net_device *dev)
 	ei_outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD);
 
 	if (ei_debug > 1)
-		printk(KERN_DEBUG "%s: Receiver overrun.\n", dev->name);
+		netdev_dbg(dev, "Receiver overrun\n");
 	dev->stats.rx_over_errors++;
 
 	/*
@@ -960,7 +960,8 @@ static void do_set_multicast_list(struct net_device *dev)
 		ei_outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i));
 #ifndef BUG_83C690
 		if(ei_inb_p(e8390_base + EN1_MULT_SHIFT(i))!=ei_local->mcfilter[i])
-			printk(KERN_ERR "Multicast filter read/write mismap %d\n",i);
+			netdev_err(dev, "Multicast filter read/write mismap %d\n",
+				   i);
 #endif
 	}
 	ei_outb_p(E8390_NODMA + E8390_PAGE0, e8390_base + E8390_CMD);
@@ -1072,7 +1073,7 @@ static void __NS8390_init(struct net_device *dev, int startp)
 	{
 		ei_outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i));
 		if (ei_debug > 1 && ei_inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i])
-			printk(KERN_ERR "Hw. address read/write mismap %d\n",i);
+			netdev_err(dev, "Hw. address read/write mismap %d\n", i);
 	}
 
 	ei_outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG);
@@ -1106,8 +1107,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
 
 	if (ei_inb_p(e8390_base + E8390_CMD) & E8390_TRANS)
 	{
-		printk(KERN_WARNING "%s: trigger_send() called with the transmitter busy.\n",
-			dev->name);
+		netdev_warn(dev, "trigger_send() called with the transmitter busy\n");
 		return;
 	}
 	ei_outb_p(length & 0xff, e8390_base + EN0_TCNTLO);
-- 
1.7.6.rc3

^ permalink raw reply related

* [PATCH 2/8] a2065: Use pr_fmt, pr_<level> and netdev_<level>
From: Joe Perches @ 2011-06-23  6:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1308810463.git.joe@perches.com>

Use current logging styles.

Other miscellaneous cleanups:

Space removal and additions for checkpatch warnings.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/a2065.c |  336 +++++++++++++++++++++++++--------------------------
 1 files changed, 162 insertions(+), 174 deletions(-)

diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
index 25ea98a..7d9a1a6 100644
--- a/drivers/net/a2065.c
+++ b/drivers/net/a2065.c
@@ -37,6 +37,11 @@
  *	  both 10BASE-2 (thin coax) and AUI (DB-15) connectors
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+/*#define DEBUG*/
+/*#define TEST_HITS*/
+
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
@@ -58,29 +63,22 @@
 
 #include "a2065.h"
 
-
-	/*
-	 *		Transmit/Receive Ring Definitions
-	 */
+/* Transmit/Receive Ring Definitions */
 
 #define LANCE_LOG_TX_BUFFERS	(2)
 #define LANCE_LOG_RX_BUFFERS	(4)
 
-#define TX_RING_SIZE		(1<<LANCE_LOG_TX_BUFFERS)
-#define RX_RING_SIZE		(1<<LANCE_LOG_RX_BUFFERS)
+#define TX_RING_SIZE		(1 << LANCE_LOG_TX_BUFFERS)
+#define RX_RING_SIZE		(1 << LANCE_LOG_RX_BUFFERS)
 
-#define TX_RING_MOD_MASK	(TX_RING_SIZE-1)
-#define RX_RING_MOD_MASK	(RX_RING_SIZE-1)
+#define TX_RING_MOD_MASK	(TX_RING_SIZE - 1)
+#define RX_RING_MOD_MASK	(RX_RING_SIZE - 1)
 
 #define PKT_BUF_SIZE		(1544)
 #define RX_BUFF_SIZE            PKT_BUF_SIZE
 #define TX_BUFF_SIZE            PKT_BUF_SIZE
 
-
-	/*
-	 *		Layout of the Lance's RAM Buffer
-	 */
-
+/* Layout of the Lance's RAM Buffer */
 
 struct lance_init_block {
 	unsigned short mode;		/* Pre-set mode (reg. 15) */
@@ -97,14 +95,11 @@ struct lance_init_block {
 	struct lance_rx_desc brx_ring[RX_RING_SIZE];
 	struct lance_tx_desc btx_ring[TX_RING_SIZE];
 
-	char   rx_buf [RX_RING_SIZE][RX_BUFF_SIZE];
-	char   tx_buf [TX_RING_SIZE][TX_BUFF_SIZE];
+	char rx_buf[RX_RING_SIZE][RX_BUFF_SIZE];
+	char tx_buf[TX_RING_SIZE][TX_BUFF_SIZE];
 };
 
-
-	/*
-	 *		Private Device Data
-	 */
+/* Private Device Data */
 
 struct lance_private {
 	char *name;
@@ -129,21 +124,14 @@ struct lance_private {
 	struct timer_list         multicast_timer;
 };
 
-#define TX_BUFFS_AVAIL ((lp->tx_old<=lp->tx_new)?\
-			lp->tx_old+lp->tx_ring_mod_mask-lp->tx_new:\
-			lp->tx_old - lp->tx_new-1)
-
-
 #define LANCE_ADDR(x) ((int)(x) & ~0xff000000)
 
 /* Load the CSR registers */
-static void load_csrs (struct lance_private *lp)
+static void load_csrs(struct lance_private *lp)
 {
 	volatile struct lance_regs *ll = lp->ll;
 	volatile struct lance_init_block *aib = lp->lance_init_block;
-	int leptr;
-
-	leptr = LANCE_ADDR (aib);
+	int leptr = LANCE_ADDR(aib);
 
 	ll->rap = LE_CSR1;
 	ll->rdp = (leptr & 0xFFFF);
@@ -156,19 +144,16 @@ static void load_csrs (struct lance_private *lp)
 	ll->rap = LE_CSR0;
 }
 
-#define ZERO 0
-
 /* Setup the Lance Rx and Tx rings */
-static void lance_init_ring (struct net_device *dev)
+static void lance_init_ring(struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_init_block *ib = lp->init_block;
-	volatile struct lance_init_block *aib; /* for LANCE_ADDR computations */
+	volatile struct lance_init_block *aib = lp->lance_init_block;
+					/* for LANCE_ADDR computations */
 	int leptr;
 	int i;
 
-	aib = lp->lance_init_block;
-
 	/* Lock out other processes while setting up hardware */
 	netif_stop_queue(dev);
 	lp->rx_new = lp->tx_new = 0;
@@ -179,41 +164,38 @@ static void lance_init_ring (struct net_device *dev)
 	/* Copy the ethernet address to the lance init block
 	 * Note that on the sparc you need to swap the ethernet address.
 	 */
-	ib->phys_addr [0] = dev->dev_addr [1];
-	ib->phys_addr [1] = dev->dev_addr [0];
-	ib->phys_addr [2] = dev->dev_addr [3];
-	ib->phys_addr [3] = dev->dev_addr [2];
-	ib->phys_addr [4] = dev->dev_addr [5];
-	ib->phys_addr [5] = dev->dev_addr [4];
-
-	if (ZERO)
-		printk(KERN_DEBUG "TX rings:\n");
+	ib->phys_addr[0] = dev->dev_addr[1];
+	ib->phys_addr[1] = dev->dev_addr[0];
+	ib->phys_addr[2] = dev->dev_addr[3];
+	ib->phys_addr[3] = dev->dev_addr[2];
+	ib->phys_addr[4] = dev->dev_addr[5];
+	ib->phys_addr[5] = dev->dev_addr[4];
 
 	/* Setup the Tx ring entries */
-	for (i = 0; i <= (1<<lp->lance_log_tx_bufs); i++) {
+	netdev_dbg(dev, "TX rings:\n");
+	for (i = 0; i <= 1 << lp->lance_log_tx_bufs; i++) {
 		leptr = LANCE_ADDR(&aib->tx_buf[i][0]);
-		ib->btx_ring [i].tmd0      = leptr;
-		ib->btx_ring [i].tmd1_hadr = leptr >> 16;
-		ib->btx_ring [i].tmd1_bits = 0;
-		ib->btx_ring [i].length    = 0xf000; /* The ones required by tmd2 */
-		ib->btx_ring [i].misc      = 0;
-		if (i < 3 && ZERO)
-			printk(KERN_DEBUG "%d: 0x%8.8x\n", i, leptr);
+		ib->btx_ring[i].tmd0      = leptr;
+		ib->btx_ring[i].tmd1_hadr = leptr >> 16;
+		ib->btx_ring[i].tmd1_bits = 0;
+		ib->btx_ring[i].length    = 0xf000; /* The ones required by tmd2 */
+		ib->btx_ring[i].misc      = 0;
+		if (i < 3)
+			netdev_dbg(dev, "%d: 0x%08x\n", i, leptr);
 	}
 
 	/* Setup the Rx ring entries */
-	if (ZERO)
-		printk(KERN_DEBUG "RX rings:\n");
-	for (i = 0; i < (1<<lp->lance_log_rx_bufs); i++) {
+	netdev_dbg(dev, "RX rings:\n");
+	for (i = 0; i < 1 << lp->lance_log_rx_bufs; i++) {
 		leptr = LANCE_ADDR(&aib->rx_buf[i][0]);
 
-		ib->brx_ring [i].rmd0      = leptr;
-		ib->brx_ring [i].rmd1_hadr = leptr >> 16;
-		ib->brx_ring [i].rmd1_bits = LE_R1_OWN;
-		ib->brx_ring [i].length    = -RX_BUFF_SIZE | 0xf000;
-		ib->brx_ring [i].mblength  = 0;
-		if (i < 3 && ZERO)
-			printk(KERN_DEBUG "%d: 0x%8.8x\n", i, leptr);
+		ib->brx_ring[i].rmd0      = leptr;
+		ib->brx_ring[i].rmd1_hadr = leptr >> 16;
+		ib->brx_ring[i].rmd1_bits = LE_R1_OWN;
+		ib->brx_ring[i].length    = -RX_BUFF_SIZE | 0xf000;
+		ib->brx_ring[i].mblength  = 0;
+		if (i < 3)
+			netdev_dbg(dev, "%d: 0x%08x\n", i, leptr);
 	}
 
 	/* Setup the initialization block */
@@ -222,22 +204,20 @@ static void lance_init_ring (struct net_device *dev)
 	leptr = LANCE_ADDR(&aib->brx_ring);
 	ib->rx_len = (lp->lance_log_rx_bufs << 13) | (leptr >> 16);
 	ib->rx_ptr = leptr;
-	if (ZERO)
-		printk(KERN_DEBUG "RX ptr: %8.8x\n", leptr);
+	netdev_dbg(dev, "RX ptr: %08x\n", leptr);
 
 	/* Setup tx descriptor pointer */
 	leptr = LANCE_ADDR(&aib->btx_ring);
 	ib->tx_len = (lp->lance_log_tx_bufs << 13) | (leptr >> 16);
 	ib->tx_ptr = leptr;
-	if (ZERO)
-		printk(KERN_DEBUG "TX ptr: %8.8x\n", leptr);
+	netdev_dbg(dev, "TX ptr: %08x\n", leptr);
 
 	/* Clear the multicast filter */
-	ib->filter [0] = 0;
-	ib->filter [1] = 0;
+	ib->filter[0] = 0;
+	ib->filter[1] = 0;
 }
 
-static int init_restart_lance (struct lance_private *lp)
+static int init_restart_lance(struct lance_private *lp)
 {
 	volatile struct lance_regs *ll = lp->ll;
 	int i;
@@ -249,8 +229,7 @@ static int init_restart_lance (struct lance_private *lp)
 	for (i = 0; (i < 100) && !(ll->rdp & (LE_C0_ERR | LE_C0_IDON)); i++)
 		barrier();
 	if ((i == 100) || (ll->rdp & LE_C0_ERR)) {
-		printk(KERN_ERR "LANCE unopened after %d ticks, csr0=%4.4x.\n",
-		       i, ll->rdp);
+		pr_err("unopened after %d ticks, csr0=%04x\n", i, ll->rdp);
 		return -EIO;
 	}
 
@@ -261,7 +240,7 @@ static int init_restart_lance (struct lance_private *lp)
 	return 0;
 }
 
-static int lance_rx (struct net_device *dev)
+static int lance_rx(struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_init_block *ib = lp->init_block;
@@ -271,22 +250,24 @@ static int lance_rx (struct net_device *dev)
 
 #ifdef TEST_HITS
 	int i;
-	printk(KERN_DEBUG "[");
+	char buf[RX_RING_SIZE + 1];
+
 	for (i = 0; i < RX_RING_SIZE; i++) {
+		char r1_own = ib->brx_ring[i].rmd1_bits & LE_R1_OWN;
 		if (i == lp->rx_new)
-			printk ("%s",
-				ib->brx_ring [i].rmd1_bits & LE_R1_OWN ? "_" : "X");
+			buf[i] = r1_own ? '_' : 'X';
 		else
-			printk ("%s",
-				ib->brx_ring [i].rmd1_bits & LE_R1_OWN ? "." : "1");
+			buf[i] = r1_own ? '.' : '1';
 	}
-	printk ("]\n");
+	buf[RX_RING_SIZE] = 0;
+
+	pr_debug("RxRing TestHits: [%s]\n", buf);
 #endif
 
-	ll->rdp = LE_C0_RINT|LE_C0_INEA;
-	for (rd = &ib->brx_ring [lp->rx_new];
+	ll->rdp = LE_C0_RINT | LE_C0_INEA;
+	for (rd = &ib->brx_ring[lp->rx_new];
 	     !((bits = rd->rmd1_bits) & LE_R1_OWN);
-	     rd = &ib->brx_ring [lp->rx_new]) {
+	     rd = &ib->brx_ring[lp->rx_new]) {
 
 		/* We got an incomplete frame? */
 		if ((bits & LE_R1_POK) != LE_R1_POK) {
@@ -297,18 +278,22 @@ static int lance_rx (struct net_device *dev)
 			/* Count only the end frame as a rx error,
 			 * not the beginning
 			 */
-			if (bits & LE_R1_BUF) dev->stats.rx_fifo_errors++;
-			if (bits & LE_R1_CRC) dev->stats.rx_crc_errors++;
-			if (bits & LE_R1_OFL) dev->stats.rx_over_errors++;
-			if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++;
-			if (bits & LE_R1_EOP) dev->stats.rx_errors++;
+			if (bits & LE_R1_BUF)
+				dev->stats.rx_fifo_errors++;
+			if (bits & LE_R1_CRC)
+				dev->stats.rx_crc_errors++;
+			if (bits & LE_R1_OFL)
+				dev->stats.rx_over_errors++;
+			if (bits & LE_R1_FRA)
+				dev->stats.rx_frame_errors++;
+			if (bits & LE_R1_EOP)
+				dev->stats.rx_errors++;
 		} else {
 			int len = (rd->mblength & 0xfff) - 4;
-			struct sk_buff *skb = dev_alloc_skb (len+2);
+			struct sk_buff *skb = dev_alloc_skb(len + 2);
 
 			if (!skb) {
-				printk(KERN_WARNING "%s: Memory squeeze, "
-				       "deferring packet.\n", dev->name);
+				netdev_warn(dev, "Memory squeeze, deferring packet\n");
 				dev->stats.rx_dropped++;
 				rd->mblength = 0;
 				rd->rmd1_bits = LE_R1_OWN;
@@ -316,13 +301,13 @@ static int lance_rx (struct net_device *dev)
 				return 0;
 			}
 
-			skb_reserve (skb, 2);		/* 16 byte align */
-			skb_put (skb, len);		/* make room */
+			skb_reserve(skb, 2);		/* 16 byte align */
+			skb_put(skb, len);		/* make room */
 			skb_copy_to_linear_data(skb,
-					 (unsigned char *)&(ib->rx_buf [lp->rx_new][0]),
-					 len);
-			skb->protocol = eth_type_trans (skb, dev);
-			netif_rx (skb);
+				 (unsigned char *)&ib->rx_buf[lp->rx_new][0],
+				 len);
+			skb->protocol = eth_type_trans(skb, dev);
+			netif_rx(skb);
 			dev->stats.rx_packets++;
 			dev->stats.rx_bytes += len;
 		}
@@ -335,7 +320,7 @@ static int lance_rx (struct net_device *dev)
 	return 0;
 }
 
-static int lance_tx (struct net_device *dev)
+static int lance_tx(struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_init_block *ib = lp->init_block;
@@ -350,7 +335,7 @@ static int lance_tx (struct net_device *dev)
 
 	j = lp->tx_old;
 	for (i = j; i != lp->tx_new; i = j) {
-		td = &ib->btx_ring [i];
+		td = &ib->btx_ring[i];
 
 		/* If we hit a packet not owned by us, stop */
 		if (td->tmd1_bits & LE_T1_OWN)
@@ -360,45 +345,44 @@ static int lance_tx (struct net_device *dev)
 			status = td->misc;
 
 			dev->stats.tx_errors++;
-			if (status & LE_T3_RTY)  dev->stats.tx_aborted_errors++;
-			if (status & LE_T3_LCOL) dev->stats.tx_window_errors++;
+			if (status & LE_T3_RTY)
+				dev->stats.tx_aborted_errors++;
+			if (status & LE_T3_LCOL)
+				dev->stats.tx_window_errors++;
 
 			if (status & LE_T3_CLOS) {
 				dev->stats.tx_carrier_errors++;
 				if (lp->auto_select) {
 					lp->tpe = 1 - lp->tpe;
-					printk(KERN_ERR "%s: Carrier Lost, "
-					       "trying %s\n", dev->name,
-					       lp->tpe?"TPE":"AUI");
+					netdev_err(dev, "Carrier Lost, trying %s\n",
+						   lp->tpe ? "TPE" : "AUI");
 					/* Stop the lance */
 					ll->rap = LE_CSR0;
 					ll->rdp = LE_C0_STOP;
-					lance_init_ring (dev);
-					load_csrs (lp);
-					init_restart_lance (lp);
+					lance_init_ring(dev);
+					load_csrs(lp);
+					init_restart_lance(lp);
 					return 0;
 				}
 			}
 
-			/* buffer errors and underflows turn off the transmitter */
-			/* Restart the adapter */
-			if (status & (LE_T3_BUF|LE_T3_UFL)) {
+			/* buffer errors and underflows turn off
+			 * the transmitter, so restart the adapter
+			 */
+			if (status & (LE_T3_BUF | LE_T3_UFL)) {
 				dev->stats.tx_fifo_errors++;
 
-				printk(KERN_ERR "%s: Tx: ERR_BUF|ERR_UFL, "
-				       "restarting\n", dev->name);
+				netdev_err(dev, "Tx: ERR_BUF|ERR_UFL, restarting\n");
 				/* Stop the lance */
 				ll->rap = LE_CSR0;
 				ll->rdp = LE_C0_STOP;
-				lance_init_ring (dev);
-				load_csrs (lp);
-				init_restart_lance (lp);
+				lance_init_ring(dev);
+				load_csrs(lp);
+				init_restart_lance(lp);
 				return 0;
 			}
 		} else if ((td->tmd1_bits & LE_T1_POK) == LE_T1_POK) {
-			/*
-			 * So we don't count the packet more than once.
-			 */
+			/* So we don't count the packet more than once. */
 			td->tmd1_bits &= ~(LE_T1_POK);
 
 			/* One collision before packet was sent. */
@@ -419,7 +403,14 @@ static int lance_tx (struct net_device *dev)
 	return 0;
 }
 
-static irqreturn_t lance_interrupt (int irq, void *dev_id)
+static int lance_tx_buffs_avail(struct lance_private *lp)
+{
+	if (lp->tx_old <= lp->tx_new)
+		return lp->tx_old + lp->tx_ring_mod_mask - lp->tx_new;
+	return lp->tx_old - lp->tx_new - 1;
+}
+
+static irqreturn_t lance_interrupt(int irq, void *dev_id)
 {
 	struct net_device *dev = dev_id;
 	struct lance_private *lp = netdev_priv(dev);
@@ -433,19 +424,19 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
 		return IRQ_NONE;	/* been generated by the Lance. */
 
 	/* Acknowledge all the interrupt sources ASAP */
-	ll->rdp = csr0 & ~(LE_C0_INEA|LE_C0_TDMD|LE_C0_STOP|LE_C0_STRT|
+	ll->rdp = csr0 & ~(LE_C0_INEA | LE_C0_TDMD | LE_C0_STOP | LE_C0_STRT |
 			   LE_C0_INIT);
 
-	if ((csr0 & LE_C0_ERR)) {
+	if (csr0 & LE_C0_ERR) {
 		/* Clear the error condition */
-		ll->rdp = LE_C0_BABL|LE_C0_ERR|LE_C0_MISS|LE_C0_INEA;
+		ll->rdp = LE_C0_BABL | LE_C0_ERR | LE_C0_MISS | LE_C0_INEA;
 	}
 
 	if (csr0 & LE_C0_RINT)
-		lance_rx (dev);
+		lance_rx(dev);
 
 	if (csr0 & LE_C0_TINT)
-		lance_tx (dev);
+		lance_tx(dev);
 
 	/* Log misc errors. */
 	if (csr0 & LE_C0_BABL)
@@ -453,22 +444,22 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
 	if (csr0 & LE_C0_MISS)
 		dev->stats.rx_errors++;       /* Missed a Rx frame. */
 	if (csr0 & LE_C0_MERR) {
-		printk(KERN_ERR "%s: Bus master arbitration failure, status "
-		       "%4.4x.\n", dev->name, csr0);
+		netdev_err(dev, "Bus master arbitration failure, status %04x\n",
+			   csr0);
 		/* Restart the chip. */
 		ll->rdp = LE_C0_STRT;
 	}
 
-	if (netif_queue_stopped(dev) && TX_BUFFS_AVAIL > 0)
+	if (netif_queue_stopped(dev) && lance_tx_buffs_avail(lp) > 0)
 		netif_wake_queue(dev);
 
 	ll->rap = LE_CSR0;
-	ll->rdp = LE_C0_BABL|LE_C0_CERR|LE_C0_MISS|LE_C0_MERR|
-					LE_C0_IDON|LE_C0_INEA;
+	ll->rdp = (LE_C0_BABL | LE_C0_CERR | LE_C0_MISS | LE_C0_MERR |
+		   LE_C0_IDON | LE_C0_INEA);
 	return IRQ_HANDLED;
 }
 
-static int lance_open (struct net_device *dev)
+static int lance_open(struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_regs *ll = lp->ll;
@@ -481,17 +472,18 @@ static int lance_open (struct net_device *dev)
 	/* Install the Interrupt handler */
 	ret = request_irq(IRQ_AMIGA_PORTS, lance_interrupt, IRQF_SHARED,
 			  dev->name, dev);
-	if (ret) return ret;
+	if (ret)
+		return ret;
 
-	load_csrs (lp);
-	lance_init_ring (dev);
+	load_csrs(lp);
+	lance_init_ring(dev);
 
 	netif_start_queue(dev);
 
-	return init_restart_lance (lp);
+	return init_restart_lance(lp);
 }
 
-static int lance_close (struct net_device *dev)
+static int lance_close(struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_regs *ll = lp->ll;
@@ -507,7 +499,7 @@ static int lance_close (struct net_device *dev)
 	return 0;
 }
 
-static inline int lance_reset (struct net_device *dev)
+static inline int lance_reset(struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_regs *ll = lp->ll;
@@ -517,16 +509,15 @@ static inline int lance_reset (struct net_device *dev)
 	ll->rap = LE_CSR0;
 	ll->rdp = LE_C0_STOP;
 
-	load_csrs (lp);
+	load_csrs(lp);
 
-	lance_init_ring (dev);
+	lance_init_ring(dev);
 	dev->trans_start = jiffies; /* prevent tx timeout */
 	netif_start_queue(dev);
 
-	status = init_restart_lance (lp);
-#ifdef DEBUG_DRIVER
-	printk(KERN_DEBUG "Lance restart=%d\n", status);
-#endif
+	status = init_restart_lance(lp);
+	netdev_dbg(dev, "Lance restart=%d\n", status);
+
 	return status;
 }
 
@@ -535,14 +526,13 @@ static void lance_tx_timeout(struct net_device *dev)
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_regs *ll = lp->ll;
 
-	printk(KERN_ERR "%s: transmit timed out, status %04x, reset\n",
-	       dev->name, ll->rdp);
+	netdev_err(dev, "transmit timed out, status %04x, reset\n", ll->rdp);
 	lance_reset(dev);
 	netif_wake_queue(dev);
 }
 
-static netdev_tx_t lance_start_xmit (struct sk_buff *skb,
-				     struct net_device *dev)
+static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
+				    struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_regs *ll = lp->ll;
@@ -557,33 +547,33 @@ static netdev_tx_t lance_start_xmit (struct sk_buff *skb,
 
 	local_irq_save(flags);
 
-	if (!TX_BUFFS_AVAIL){
+	if (!lance_tx_buffs_avail(lp)) {
 		local_irq_restore(flags);
 		return NETDEV_TX_LOCKED;
 	}
 
-#ifdef DEBUG_DRIVER
+#ifdef DEBUG
 	/* dump the packet */
 	print_hex_dump(KERN_DEBUG, "skb->data: ", DUMP_PREFIX_NONE,
 		       16, 1, skb->data, 64, true);
 #endif
 	entry = lp->tx_new & lp->tx_ring_mod_mask;
-	ib->btx_ring [entry].length = (-skblen) | 0xf000;
-	ib->btx_ring [entry].misc = 0;
+	ib->btx_ring[entry].length = (-skblen) | 0xf000;
+	ib->btx_ring[entry].misc = 0;
 
-	skb_copy_from_linear_data(skb, (void *)&ib->tx_buf [entry][0], skblen);
+	skb_copy_from_linear_data(skb, (void *)&ib->tx_buf[entry][0], skblen);
 
 	/* Now, give the packet to the lance */
-	ib->btx_ring [entry].tmd1_bits = (LE_T1_POK|LE_T1_OWN);
+	ib->btx_ring[entry].tmd1_bits = (LE_T1_POK | LE_T1_OWN);
 	lp->tx_new = (lp->tx_new+1) & lp->tx_ring_mod_mask;
 	dev->stats.tx_bytes += skblen;
 
-	if (TX_BUFFS_AVAIL <= 0)
+	if (lance_tx_buffs_avail(lp) <= 0)
 		netif_stop_queue(dev);
 
 	/* Kick the lance: transmit now */
 	ll->rdp = LE_C0_INEA | LE_C0_TDMD;
-	dev_kfree_skb (skb);
+	dev_kfree_skb(skb);
 
 	local_irq_restore(flags);
 
@@ -591,7 +581,7 @@ static netdev_tx_t lance_start_xmit (struct sk_buff *skb,
 }
 
 /* taken from the depca driver */
-static void lance_load_multicast (struct net_device *dev)
+static void lance_load_multicast(struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_init_block *ib = lp->init_block;
@@ -601,14 +591,14 @@ static void lance_load_multicast (struct net_device *dev)
 	u32 crc;
 
 	/* set all multicast bits */
-	if (dev->flags & IFF_ALLMULTI){
-		ib->filter [0] = 0xffffffff;
-		ib->filter [1] = 0xffffffff;
+	if (dev->flags & IFF_ALLMULTI) {
+		ib->filter[0] = 0xffffffff;
+		ib->filter[1] = 0xffffffff;
 		return;
 	}
 	/* clear the multicast filter */
-	ib->filter [0] = 0;
-	ib->filter [1] = 0;
+	ib->filter[0] = 0;
+	ib->filter[1] = 0;
 
 	/* Add addresses */
 	netdev_for_each_mc_addr(ha, dev) {
@@ -620,11 +610,11 @@ static void lance_load_multicast (struct net_device *dev)
 
 		crc = ether_crc_le(6, addrs);
 		crc = crc >> 26;
-		mcast_table [crc >> 4] |= 1 << (crc & 0xf);
+		mcast_table[crc >> 4] |= 1 << (crc & 0xf);
 	}
 }
 
-static void lance_set_multicast (struct net_device *dev)
+static void lance_set_multicast(struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_init_block *ib = lp->init_block;
@@ -643,16 +633,16 @@ static void lance_set_multicast (struct net_device *dev)
 
 	ll->rap = LE_CSR0;
 	ll->rdp = LE_C0_STOP;
-	lance_init_ring (dev);
+	lance_init_ring(dev);
 
 	if (dev->flags & IFF_PROMISC) {
 		ib->mode |= LE_MO_PROM;
 	} else {
 		ib->mode &= ~LE_MO_PROM;
-		lance_load_multicast (dev);
+		lance_load_multicast(dev);
 	}
-	load_csrs (lp);
-	init_restart_lance (lp);
+	load_csrs(lp);
+	init_restart_lance(lp);
 	netif_wake_queue(dev);
 }
 
@@ -692,14 +682,12 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
 {
 	struct net_device *dev;
 	struct lance_private *priv;
-	unsigned long board, base_addr, mem_start;
+	unsigned long board = z->resource.start;
+	unsigned long base_addr = board + A2065_LANCE;
+	unsigned long mem_start = board + A2065_RAM;
 	struct resource *r1, *r2;
 	int err;
 
-	board = z->resource.start;
-	base_addr = board+A2065_LANCE;
-	mem_start = board+A2065_RAM;
-
 	r1 = request_mem_region(base_addr, sizeof(struct lance_regs),
 				"Am7990");
 	if (!r1)
@@ -730,12 +718,12 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
 		dev->dev_addr[1] = 0x00;
 		dev->dev_addr[2] = 0x9f;
 	}
-	dev->dev_addr[3] = (z->rom.er_SerialNumber>>16) & 0xff;
-	dev->dev_addr[4] = (z->rom.er_SerialNumber>>8) & 0xff;
+	dev->dev_addr[3] = (z->rom.er_SerialNumber >> 16) & 0xff;
+	dev->dev_addr[4] = (z->rom.er_SerialNumber >> 8) & 0xff;
 	dev->dev_addr[5] = z->rom.er_SerialNumber & 0xff;
 	dev->base_addr = ZTWO_VADDR(base_addr);
 	dev->mem_start = ZTWO_VADDR(mem_start);
-	dev->mem_end = dev->mem_start+A2065_RAM_SIZE;
+	dev->mem_end = dev->mem_start + A2065_RAM_SIZE;
 
 	priv->ll = (volatile struct lance_regs *)dev->base_addr;
 	priv->init_block = (struct lance_init_block *)dev->mem_start;
@@ -755,7 +743,7 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
 	init_timer(&priv->multicast_timer);
 	priv->multicast_timer.data = (unsigned long) dev;
 	priv->multicast_timer.function =
-		(void (*)(unsigned long)) &lance_set_multicast;
+		(void (*)(unsigned long))lance_set_multicast;
 
 	err = register_netdev(dev);
 	if (err) {
@@ -766,8 +754,8 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
 	}
 	zorro_set_drvdata(z, dev);
 
-	printk(KERN_INFO "%s: A2065 at 0x%08lx, Ethernet Address "
-	       "%pM\n", dev->name, board, dev->dev_addr);
+	netdev_info(dev, "A2065 at 0x%08lx, Ethernet Address %pM\n",
+		    board, dev->dev_addr);
 
 	return 0;
 }
-- 
1.7.6.rc3

^ permalink raw reply related

* [PATCH 0/8] 8390: Neatening
From: Joe Perches @ 2011-06-23  6:38 UTC (permalink / raw)
  To: Geert Uytterhoeven, netdev; +Cc: linux-kernel

Some updates requested by Geert Uytterhoeven

Joe Perches (8):
  ariadne: Update style, neaten, restructure to eliminate prototypes
  a2065: Use pr_fmt, pr_<level> and netdev_<level>
  lib8390: Use pr_<level> and netdev_<level>
  lib8390: Indent braces appropriately
  lib8390: Normalize source code spacing
  lib8390: Convert include <asm to include <linux
  lib8390: Remove unnecessary extern
  zorro8390: Restructure and eliminate prototypes

 drivers/net/a2065.c     |  336 ++++++-------
 drivers/net/ariadne.c   | 1267 ++++++++++++++++++++++-------------------------
 drivers/net/lib8390.c   |  285 +++++------
 drivers/net/zorro8390.c |  673 +++++++++++++-------------
 4 files changed, 1220 insertions(+), 1341 deletions(-)

-- 
1.7.6.rc3

^ permalink raw reply

* [patch -next] dcb: use nlmsg_free() instead of kfree()
From: Dan Carpenter @ 2011-06-23  5:58 UTC (permalink / raw)
  To: John Fastabend
  Cc: David S. Miller, Shmulik Ravid, open list:NETWORKING [GENERAL],
	kernel-janitors

These sk_buff structs were allocated with nlmsg_new() so they should
be freed with nlmsg_free().

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index e954d4c..fc56e85 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1329,7 +1329,7 @@ int dcbnl_notify(struct net_device *dev, int event, int cmd,
 
 	nlh = nlmsg_put(skb, pid, 0, event, sizeof(*dcb), 0);
 	if (nlh == NULL) {
-		kfree(skb);
+		nlmsg_free(skb);
 		return -EMSGSIZE;
 	}
 
@@ -1434,7 +1434,7 @@ static int dcbnl_ieee_get(struct net_device *netdev, struct nlattr **tb,
 
 	nlh = nlmsg_put(skb, pid, seq, RTM_GETDCB, sizeof(*dcb), flags);
 	if (nlh == NULL) {
-		kfree(skb);
+		nlmsg_free(skb);
 		return -EMSGSIZE;
 	}
 

^ permalink raw reply related

* [patch] net/usb/kalmia: signedness bug in kalmia_bind()
From: Dan Carpenter @ 2011-06-23  5:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: open list:USB SUBSYSTEM, open list:NETWORKING DRIVERS,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

"status" should be an int here for the error handling to work.

Signed-off-by: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c
index d965fb1..c08fecf 100644
--- a/drivers/net/usb/kalmia.c
+++ b/drivers/net/usb/kalmia.c
@@ -127,7 +127,7 @@ kalmia_init_and_get_ethernet_addr(struct usbnet *dev, u8 *ethernet_addr)
 static int
 kalmia_bind(struct usbnet *dev, struct usb_interface *intf)
 {
-	u8 status;
+	int status;
 	u8 ethernet_addr[ETH_ALEN];
 
 	/* Don't bind to AT command interface */
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: unintended ipv4 broadcast policy change
From: David Miller @ 2011-06-23  5:41 UTC (permalink / raw)
  To: herbert; +Cc: netdev
In-Reply-To: <20110622.194158.820637934689036237.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Wed, 22 Jun 2011 19:41:58 -0700 (PDT)

> From: Herbert Xu <herbert@gondor.hengli.com.au>
> Date: Thu, 23 Jun 2011 08:41:34 +0800
> 
>> On Wed, Jun 22, 2011 at 04:39:35PM -0700, David Miller wrote:
>>> This subtle new behavior is interesting because it means that
>>> a DHCP client could be implemented entirely with plain UDP
>>> sockets.
>> 
>> Yes this is indeed possible.  However, for compatibility purposes
>> I'm not sure whether we can safely rely on this new behaviour.
>> Maybe if we add the disable_ipv4 sysctl we can use it to signal
>> the presence of this new behaviour.
> 
> The easiest thing to do is to have the DHCP server first go:
> 
> 	ip addr add 0.0.0.0/0 broadcast 255.255.255.255 dev $(DEVICE)
> 
> and in fact this is essentially what ISC DHCP does on NetBSD and
> similar.

Except that my experiments show that we don't allow this.

In fact, it fails silently because of the code in __inet_insert_ifa()
that goes:

	if (!ifa->ifa_local) {
		inet_free_ifa(ifa);
		return 0;
	}

Sigh...

The only problematic case is receiving the initial broadcast
responses.

Sends are easy because if you use SO_BINDTODEVICE and MSG_DONTROUTE we
can convince the kernel to build us a route, even if no addresses and
routes are configured on the interface.

Will think about this some more.

^ permalink raw reply

* linux-next: build failure after merge of the final tree (net tree related)
From: Stephen Rothwell @ 2011-06-23  5:29 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/ll_temac_main.c: In function 'temac_dma_bd_release':
drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'
drivers/net/ll_temac_main.c:215:3: error: implicit declaration of function 'dma_free_coherent'
drivers/net/ll_temac_main.c: In function 'temac_dma_bd_init':
drivers/net/ll_temac_main.c:243:2: error: implicit declaration of function 'dma_alloc_coherent'
drivers/net/ll_temac_main.c:243:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:251:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:280:3: error: implicit declaration of function 'dma_map_single'
drivers/net/ll_temac_main.c: In function 'temac_start_xmit_done':
drivers/net/ll_temac_main.c:628:22: warning: cast to pointer from integer of different size

I suspect that this was caused by commit b7f080cfe223 ("net: remove mm.h
inclusion from netdevice.h").

I have left the build broken for now since it is also broken for other
reasons.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* linux-next: build failure after merge of the final tree (net tree related)
From: Stephen Rothwell @ 2011-06-23  5:25 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast

Since this file has not been changed recently, I suspect that this was
caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
netdevice.h").

I have left the build broken for now since it is also broken for other
reasons.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: [PATCH 4/5] pm: move pm notifiers into suspend.h
From: Cong Wang @ 2011-06-23  5:03 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-kernel, akpm, netdev, Chris Ball, Len Brown, Pavel Machek,
	Ohad Ben-Cohen, Linus Walleij, Philip Rakity, David S. Miller,
	Lucas De Marchi, Paul E. McKenney, Josh Triplett, linux-mmc,
	linux-pm
In-Reply-To: <201106222149.28252.rjw@sisk.pl>

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

于 2011年06月23日 03:49, Rafael J. Wysocki 写道:
>> +#ifdef CONFIG_PM
>> >  +#include<linux/suspend.h>
>> >  +#endif
> I don't think the #ifdef in necessary.  Any dependencies on CONFIG_PM
> (or CONFIG_SUSPEND etc.) should be taken care of inside of suspend.h.
> This file should be fixed if they aren't.
>

Ok, please check the updated version below.

Thanks.


[-- Attachment #2: pm-move-pm-notifiers-into-suspend.h.patch --]
[-- Type: text/plain, Size: 2376 bytes --]

Author: Amerigo Wang <amwang@redhat.com>

    pm: move pm notifiers into suspend.h

Signed-off-by: WANG Cong <amwang@redhat.com>

---
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 68091dd..503dbc9 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -23,6 +23,7 @@
 #include <linux/log2.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
+#include <linux/suspend.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/host.h>
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 145c436..ae8f7d9 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -191,15 +191,9 @@ static inline int notifier_to_errno(int ret)
 
 /* reboot notifiers are defined in include/linux/reboot.h. */
 
-#define NETLINK_URELEASE	0x0001	/* Unicast netlink socket released */
+/* Hibernation and suspend events are defined in include/linux/suspend.h. */
 
-/* Hibernation and suspend events */
-#define PM_HIBERNATION_PREPARE	0x0001 /* Going to hibernate */
-#define PM_POST_HIBERNATION	0x0002 /* Hibernation finished */
-#define PM_SUSPEND_PREPARE	0x0003 /* Going to suspend the system */
-#define PM_POST_SUSPEND		0x0004 /* Suspend finished */
-#define PM_RESTORE_PREPARE	0x0005 /* Going to restore a saved image */
-#define PM_POST_RESTORE		0x0006 /* Restore failed */
+#define NETLINK_URELEASE	0x0001	/* Unicast netlink socket released */
 
 /* Console keyboard events.
  * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 083ffea..95bc81c 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -260,6 +260,14 @@ static inline int hibernate(void) { return -ENOSYS; }
 static inline bool system_entering_hibernation(void) { return false; }
 #endif /* CONFIG_HIBERNATION */
 
+/* Hibernation and suspend events */
+#define PM_HIBERNATION_PREPARE	0x0001 /* Going to hibernate */
+#define PM_POST_HIBERNATION	0x0002 /* Hibernation finished */
+#define PM_SUSPEND_PREPARE	0x0003 /* Going to suspend the system */
+#define PM_POST_SUSPEND		0x0004 /* Suspend finished */
+#define PM_RESTORE_PREPARE	0x0005 /* Going to restore a saved image */
+#define PM_POST_RESTORE		0x0006 /* Restore failed */
+
 #ifdef CONFIG_PM_SLEEP
 void save_processor_state(void);
 void restore_processor_state(void);

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox