Commit Graph

32 Commits (3af9a77af9e2b72366363864bfcd3d51465ff98a)

Author SHA1 Message Date
Joe Perches 0795af5729 [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:42 -07:00
Denis Cheng ff8ac60948 drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:15 -07:00
Ralf Baechle 10d024c1b2 [NET]: Nuke SET_MODULE_OWNER macro.
It's been a useless no-op for long enough in 2.6 so I figured it's time to
remove it.  The number of people that could object because they're
maintaining unified 2.4 and 2.6 drivers is probably rather small.

[ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:13 -07:00
Arnaldo Carvalho de Melo 4c13eb6657 [ETH]: Make eth_type_trans set skb->dev like the other *_type_trans
One less thing for drivers writers to worry about.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25 22:24:30 -07:00
Al Viro afc8eb46c0 [PATCH] trivial missing __init in drivers/net/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 16:07:19 -05:00
George G. Davis 9e1402ab89 [PATCH] Fix an offset error when reading the CS89x0 ADD_PORT register
Fix an offset error when reading the CS89x0 ADD_PORT register.

Signed-off-by: George G. Davis
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-11-30 06:15:08 -05:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Jeff Garzik 6aa20a2235 drivers/net: Trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-13 13:24:59 -04:00
Andrew Morton e26c129a49 [PATCH] cs89x0 section fix
WARNING: drivers/net/cs89x0.o - Section mismatch: reference to .init.data:version from .text between 'init_module' (at offset 0x13d8) and 'net_get_stats'
WARNING: drivers/net/cs89x0.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x1634) and 'net_get_stats'
WARNING: drivers/net/cs89x0.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x1a1f) and 'net_get_stats'

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-19 17:40:15 -04:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Lennert Buytenhek 5aeebe01cb [PATCH] cs89x0: credit Dmitry Pervushin
Credit Dmitry Pervushin for the PNX010X platform support.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:32 -08:00
Deepak Saxena 9c878967d3 [PATCH] cs89x0: add ixdp2351 support
This patch adds support for the Intel IXDP2351 to the CS89x0 driver.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:13 -08:00
Lennert Buytenhek a07f0dbec0 [PATCH] cs89x0: use u16 for device register data
cs89x0 inconsistently used 'int' and 'u32' for device register data.
As the cs89x0 is a 16-bit chip, change the I/O accessors over to 'u16'.
(Spotted by Deepak Saxena.)

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:13 -08:00
Lennert Buytenhek 580d7b8cc5 [PATCH] cs89x0: use #elif instead of #else/#if/#endif
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:13 -08:00
Lennert Buytenhek 032874e492 [PATCH] cs89x0: credit Dmitry Pervushin
Credit Dmitry Pervushin for the PNX010X platform support.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:13 -08:00
Lennert Buytenhek 91e1c46356 [PATCH] cs89x0: fix setting of ALLOW_DMA
There's an ifdef in cs89x0.c that seems to have been the wrong way round
since it was merged (and noone seems to have noticed) -- the IXDP2x01
doesn't support ISA-style DMA, but when building for IXDP2x01, cs89x0's
ALLOW_DMA is set to 1, and when building for another platform, ALLOW_DMA is
set to 0.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 18:42:11 -08:00
Lennert Buytenhek 277cb103e3 [PATCH] cs89x0: fix up after pnx0105 Kconfig symbol renaming
The Kconfig symbol for pnx0105 was recently renamed to ARCH_PNX010X.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:12:46 -08:00
Lennert Buytenhek 084f746a01 [PATCH] cs89x0: switch {in,out}sw to {read,write}words
Implement readwords/writewords that use readword/writeword, and switch the
rest of the driver over to use these.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:12:46 -08:00
Lennert Buytenhek 3b68d70dff [PATCH] cs89x0: cleanly implement ixdp2x01 and pnx0501 support
Implement suitable versions of the readword/writeword macros for ixdp2x01 and
pnx0501.  Handle the 32-bit spacing of the registers in these functions
instead of in the header file.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:12:45 -08:00
Lennert Buytenhek 3eaa5e7dcc [PATCH] cs89x0: make {read,write}reg use {read,write}word
Make readreg/writereg use readword/writeword.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:12:45 -08:00
Lennert Buytenhek 0d5affcfe2 [PATCH] cs89x0: swap {read,write}reg and {read,write}word
Reverse the order of readreg/writereg and readword/writeword in the
file, so that we can make readreg/writereg use readword/writeword.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:12:45 -08:00
Lennert Buytenhek fc8c7d79b1 [PATCH] cs89x0: convert {inw,outw} calls to {read,write}word
Switch all occurences of inw/outw in the driver over to readword/writeword.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:12:45 -08:00
Lennert Buytenhek 974dffc2dd [PATCH] cs89x0: make {read,write}word take base_addr
readword() and writeword() take a 'struct net_device *' and deref its
->base_addr member.  Make them take the base_addr directly instead, so
that we can switch the other occurences of inw/outw in the file over
to readword/writeword as well.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:12:45 -08:00
Russell King e399822da0 [PATCH] ARM: Reverted 2919/1: CS8900A ethernet driver modifications for the Comdial MP1000
No longer maintained
2005-11-04 17:26:56 +00:00
Jon Ringle 917f68f816 [ARM] 2919/1: CS8900A ethernet driver modifications for the Comdial MP1000
Patch from Jon Ringle

This patch gives support for the CS8900A ethernet chip on the Comdial MP1000

Signed-off-by: Jon Ringle
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:19:38 +01:00
Al Viro 7625d483a4 [PATCH] missing asm/irq.h (cs89x0)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-26 18:29:49 -07:00
Deepak Saxena 6f519165a9 [PATCH] cs89x0: add netpoll support
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:32 -07:00
Denis Vlasenko 01bdc0336f [PATCH] silence cs89x0
cs89x0 talks a lot at boot.  Seems like debug leftover.  This patch
downgrades printks to KERN_DEBUG.  While we're at it, make these messages a
bit less obscure.

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-01 19:14:01 -07:00
Ian Campbell e1699f508a [PATCH] cs89x0: collect tx_bytes statistics
Signed-off-by: Ian Campbell <icampbell@arcom.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-28 08:39:02 -07:00
dmitry pervushin 0dd3c78147 [PATCH] cs89x0.c: support for Philips' pnx0105 network adapter
This patch is to provide support for cs89x0-based network device on
Philips' pnx0105 board.

Signed-off-by: dmitry pervushin <dpervushin@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-06-27 00:21:03 -04:00
b1fc5505e0 [netdrvr] Fix register_netdev() races in older ISA net drivers 2005-05-12 20:11:55 -04:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00