1
0
Fork 0
Commit Graph

15 Commits (ceb51361370c003e13f782edb7171a8383e5c849)

Author SHA1 Message Date
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
Maciej W. Rozycki 257b346d20 mips: declance: Driver model for the PMAD-A
This is a set of changes that converts the PMAD-A support to the driver model.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-07 18:49:11 -05:00
Maciej W. Rozycki e8f7f7f11d [PATCH] declance: Support the I/O ASIC LANCE w/o TURBOchannel
The onboard LANCE of I/O ASIC systems is not a TURBOchannel device, at
least from the software point of view.  Therefore it does not rely on any
kernel TURBOchannel bus services and can be supported even if support for
TURBOchannel has not been enabled in the configuration.

Tested with the onboard LANCE of a DECstation 5000/133.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-04 18:36:02 -05:00
Maciej W. Rozycki 3b6e8fe7ec [PATCH] declance: Fix PMAX and PMAD support
The shared buffer used by the LANCE on the PMAX only supports halfword
(16-bit) accesses.  And the PMAD has the buffer wired differently.  This is
a change to fix these issues.

Tested with a DECstation 2100 (thanks Flo for making this possible) and a
DECstation 5000/133 (both the PMAD and the onboard LANCE).

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-04 18:36:02 -05:00
Jeff Garzik c31f28e778 drivers/net: eliminate irq handler impossible checks, needless casts
- Eliminate check for irq handler 'dev_id==NULL' where the
  condition never occurs.

- Eliminate needless casts to/from void*

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-06 14:56:04 -04: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
Ralf Baechle b07db75a9f [PATCH] Fix freeing of net device
Plus optical sugar.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 14:08:08 -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
Herbert Xu 5b057c6b1a [NET]: Avoid allocating skb in skb_pad
First of all it is unnecessary to allocate a new skb in skb_pad since
the existing one is not shared.  More importantly, our hard_start_xmit
interface does not allow a new skb to be allocated since that breaks
requeueing.

This patch uses pskb_expand_head to expand the existing skb and linearize
it if needed.  Actually, someone should sift through every instance of
skb_pad on a non-linear skb as they do not fit the reasons why this was
originally created.

Incidentally, this fixes a minor bug when the skb is cloned (tcpdump,
TCP, etc.).  As it is skb_pad will simply write over a cloned skb.  Because
of the position of the write it is unlikely to cause problems but still
it's best if we don't do it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-23 02:06:41 -07:00
Ralf Baechle 36156cdff1 [PATCH] declance: Use physical addresses at the interface level.
Use physical addresses at the interface level, letting drivers remap
them as appropriate.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 drivers/net/declance.c |   26 ++++++++++----------------
 1 files changed, 10 insertions(+), 16 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18 18:03:48 -04:00
Ralf Baechle 4569504a36 [PATCH] declance: Deal with the bloody KSEG vs CKSEG horror...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 drivers/net/declance.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18 18:03:48 -04:00
Ralf Baechle 6684b4e282 [PATCH] declance: Fix mapping of device.
These should really be addresses obtained with ioremap() or some
bus-specific backend, but for now...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 drivers/net/declance.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18 18:03:48 -04:00
Ralf Baechle da848ec37d [PATCH] declance: Convert to irqreturn_t.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 drivers/net/declance.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18 18:03:47 -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