Commit Graph

3234 Commits

Author SHA1 Message Date
Linas Vepstas 6475191001 [PATCH] powerpc/cell spidernet release all descrs
Bugfix: rx descriptor release function fails to visit
the last entry while walking receive descriptor ring.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:27 -04:00
Linas Vepstas 348bc2a6e3 [PATCH] powerpc/cell spidernet DMA direction fix
The ring buffer descriptors are DMA-accessed bidirectionally,
but are not declared in this way.  Fix this.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:27 -04:00
Linas Vepstas 66c097165c [PATCH] powerpc/cell spidernet variable name change
Cosmetic patch: give the variable holding the numer of descriptors
a more descriptive name, so to avoid confusion.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:27 -04:00
Linas Vepstas a664ccf430 [PATCH] powerpc/cell spidernet reduce DMA kicking
The current code attempts to start the TX dma every time a packet
is queued. This is too conservative, and wastes CPU time. This
patch changes behaviour to call the kick-dma function less often,
only when the tx queue is at risk of emptying.

This reduces cpu usage, improves performance.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:26 -04:00
Linas Vepstas 499eea1872 [PATCH] powerpc/cell spidernet
Remove a dummy register read that is not needed.
This reduces CPU usage notably during transmit.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:26 -04:00
Linas Vepstas 9cc7bf7edf [PATCH] powerpc/cell spidernet refine locking
The transmit side of the spider ethernet driver currently
places locks around some very large chunks of code. This
results in a fair amount of lock contention is some cases.
This patch makes the locks much more fine-grained, protecting
only the cirtical sections. One lock is used to protect
three locations: the queue head and tail pointers, and the
queue low-watermark location.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:26 -04:00
Linas Vepstas 68a8c609b3 [PATCH] powerpc/cell spidernet NAPI polling info.
This patch moves transmit queue cleanup code out of the
interrupt context, and into the NAPI polling routine.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:26 -04:00
Linas Vepstas 204e5fa17c [PATCH] powerpc/cell spidernet low watermark patch.
Implement basic low-watermark support for the transmit queue.
Hardware low-watermarks allow a properly configured kernel
to continously stream data to a device and not have to handle
any interrupts at all in doing so. Correct zero-interrupt
operation can be actually observed for this driver, when the
socket buffer is made large enough.

The basic idea of a low-watermark interrupt is as follows.
The device driver queues up a bunch of packets for the hardware
to transmit, and then kicks the hardware to get it started.
As the hardware drains the queue of pending, untransmitted
packets, the device driver will want to know when the queue
is almost empty, so that it can queue some more packets.

If the queue drains down to the low waterark, then an interrupt
will be generated. However, if the kernel/driver continues
to add enough packets to keep the queue partially filled,
no interrupt will actually be generated, and the hardware
can continue streaming packets indefinitely in this mode.

The impelmentation is done by setting the DESCR_TXDESFLG flag
in one of the packets. When the hardware sees this flag, it will
interrupt the device driver. Because this flag is on a fixed
packet, rather than at  fixed location in the queue, the
code below needs to move the flag as more packets are
queued up. This implementation attempts to keep the flag
at about 1/4 from "empty".

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: James K Lewis <jklewis@us.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:26 -04:00
Linas Vepstas b21606a773 [PATCH] powerpc/cell spidernet incorrect offset
Bugfix -- the rx chain is in memory after the tx chain --
the offset being used was wrong, resulting in memory corruption
when the size of the rx and tx rings weren't exactly the same.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:26 -04:00
Linas Vepstas 98b9040c74 [PATCH] powerpc/cell spidernet stop error printing patch.
Turn off mis-interpretation of the queue-empty interrupt
status bit as an error.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: James K Lewis <jklewis@us.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:26 -04:00
Linas Vepstas 37aad7500b [PATCH] powerpc/cell spidernet fix error interrupt print
The print message associated with the descriptor chain end interrupt
prints a bogs value. Fix that.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:26 -04:00
Linas Vepstas 43932d938d [PATCH] powerpc/cell spidernet bogus rx interrupt bit
The current receive interrupt mask sets a bogus bit that doesn't even
belong to the definition of this register. Remove it.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:25 -04:00
Linas Vepstas 313ef4b76c [PATCH] Spidernet stop queue when queue is full.
This patch adds a call to netif_stop_queue() when there is
no more room for more packets on the transmit queue.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:25 -04:00
Linas Vepstas ded8028a0b [PATCH] Spidernet fix register field definitions
This patch fixes the names of a few fields in the DMA control
register. There is no functional change.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:25 -04:00
Linas Vepstas 917a5b8e64 [PATCH] powerpc/cell spidernet add missing netdev watchdog
Set the netdev watchdog timer.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:25 -04:00
Linas Vepstas 808999c9a4 [PATCH] powerpc/cell spidernet zlen min packet length
Polite device drivers pad short packets to 60 bytes,
so that mean-spirited users don't accidentally DOS
some other OS that can't handle short packets.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:25 -04:00
Linas Vepstas c3fee4c559 [PATCH] powerpc/cell spidernet force-end fix
Bugfix: when cleaning up the transmit queue upon device close,
be sure to walk the entire queue.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:25 -04:00
Linas Vepstas e2874f2e8c [PATCH] Spidernet module parm permissions
The module param permsissions should bw read-only, not writable.

From: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:25 -04:00
Linas Vepstas a02d601dd5 [PATCH] powerpc/cell spidernet burst alignment patch.
This patch increases the Burst Address alignment from 64 to 1024 in the
Spidernet driver. This improves transmit performance for large packets.

From: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:25 -04:00
Linas Vepstas 90f1084118 [PATCH] powerpc/cell spidernet ethtool -i version number info.
This patch adds version information as reported by
ethtool -i to the Spidernet driver.

From: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: James K Lewis <jklewis@us.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:04:24 -04:00
Jan-Bernd Themann bff0a55f34 [PATCH] ehea: fix port state notification, default queue sizes
This patch includes a bug fix for the port state notification
and fixes the default queue sizes.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 03:58:26 -04:00
Jan-Bernd Themann 08093c8fd6 [PATCH] ehea: firmware (hvcall) interface changes
This eHEA patch covers required changes related to Anton Blanchard's new hvcall interface.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 03:58:26 -04:00
Andrew Morton 5f77113c01 [PATCH] ibmveth irq fix
drivers/net/ibmveth.c:939: error: too many arguments to function `ibmveth_interrupt'

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 03:56:33 -04:00
Michael Buesch 6f62768344 [PATCH] b44: fix eeprom endianess issue
This fixes eeprom read on big-endian architectures.

readw returns the data in CPU order.  With cpu_to_le16 we convert it to little
endian, because "ptr" is a pointer to a _byte_ arrray.  See the cast above.  A
byte array is little endian.

The bug is:

Reading u16 values with readw, casting them into an u8 array and accessing
this u8 array as an u8 (byte) array.  The correct fix is to swap the
CPU-ordering value returned by readw into little endian, as the u8 array is
little endian.

This compiles to nothing on little endian hardware (so it does not change b44
code on LE hardware), but _fixes_ code on BE hardware.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 03:56:33 -04:00
Deepak Saxena 12f417ee95 [PATCH] Update smc91x driver with ARM Versatile board info
We need to specify a Versatile-specific SMC_IRQ_FLAGS value or the new
generic IRQ layer will complain thusly:

No IRQF_TRIGGER set_type function for IRQ 25 (<NULL>)

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Nicolas Pitre <nico@cam.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 03:56:33 -04:00
Jeff Garzik 24fcbacedb Merge branch 'master' into upstream-fixes 2006-10-11 03:56:12 -04:00
Jeff Garzik 15e541feb3 [PATCH] irda: donauboe fixes, cleanups
- fix: toshoboe_invalid_dev() was recently removed, but not all callers
  were updated, causing the obvious linker error.  Remove caller,
  because the check (like the one removed) isn't used.

- fix: propagate request_irq() return value

- cleanup: remove void* casts

- cleanup: remove impossible ASSERTs

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 16:29:37 -07:00
Al Viro 107c3a73e0 [PATCH] endianness annotations in s2io
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 16:15:34 -07:00
Alexey Dobriyan 7359bbfd85 [PATCH] chelsio: add endian annotations
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 16:15:33 -07:00
Linus Torvalds 5a43c09d1b Merge branch 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  drivers/isdn/act2000: kill irq2card_map
  drivers/net/eepro: kill dead code
  Various drivers' irq handlers: kill dead code, needless casts
  drivers/net: eliminate irq handler impossible checks, needless casts
  arch/i386/kernel/time: don't shadow 'irq' function arg
2006-10-09 14:21:45 -07:00
Al Viro 9da3b1ad7b [PATCH] misc ppc pt_regs fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-08 12:32:36 -07:00
Al Viro 2843114699 [PATCH] misc arm pt_regs fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-08 12:32:36 -07:00
Al Viro 9c8e7f5cc9 [PATCH] m32r pt_regs fixes
... and now with irq_regs.h not forgotten...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-07 10:51:15 -07:00
Al Viro 2850bc2737 [PATCH] m68k pt_regs fixes
m68k_handle_int() split in two functions: __m68k_handle_int() takes
pt_regs * and does set_irq_regs(); m68k_handle_int() doesn't get pt_regs
*.

Places where we used to call m68k_handle_int() recursively with the same
pt_regs have simply lost the second argument, the rest is switched to
__m68k_handle_int().

The rest of patch is just dropping pt_regs * where needed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-07 10:51:14 -07:00
Matthew Wilcox be577a5220 Build fixes for struct pt_regs removal
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
2006-10-06 20:47:23 -06:00
Jeff Garzik 8f4aff6cb1 drivers/net/eepro: kill dead code
The irq2dev_map has not been used for a long time.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-06 15:03:04 -04: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 2f614fe04f [netdrvr] b44: handle excessive multicast groups
If there are more than B44_MCAST_TABLE_SIZE groups in the dev->mc_list,
it will only listen to the first B44_MCAST_TABLE_SIZE that it sees.

This change makes the driver go into RXCONFIG_ALLMULTI mode if there
are more than B44_MCAST_TABLE_SIZE groups being subscribed to, similar
to other network drivers.

Noticed by Bill Helfinstine <bhelf@flitterfly.whirpon.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 07:10:38 -04:00
Karsten Keil 39984a9fad [PATCH] bonding: fix deadlock on high loads in bond_alb_monitor()
In bond_alb_monitor the bond->curr_slave_lock write lock is taken
and then dev_set_promiscuity maybe called which can take some time,
depending on the network HW. If a network IRQ for this card come in
the softirq handler maybe try to deliver more packets which end up in
a request to the read lock of bond->curr_slave_lock -> deadlock.
This issue was found by a test lab during network stress tests, this patch
disable the softirq handler for this case and solved the issue.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 07:01:25 -04:00
Peter Zijlstra 0a07bc645e [PATCH] forcedeth: hardirq lockdep warning
BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)

Call Trace:
 show_trace
 dump_stack
 trace_hardirqs_on
 :forcedeth:nv_nic_irq_other
 handle_IRQ_event
 __do_IRQ
 do_IRQ
 ret_from_intr
DWARF2 barf
 default_idle
 cpu_idle
 rest_init
 start_kernel
 _sinittext

These 3 functions nv_nic_irq_tx(), nv_nic_irq_rx() and nv_nic_irq_other()
are reachable from IRQ context and process context. Make use of the
irq-save/restore spinlock variant.

(Compile tested only, since I do not have the hardware)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 06:48:25 -04:00
Maxime Bizon 70fbf32703 [PATCH] mv643xx_eth: Fix ethtool stats
Some stats reported by ethtool -S on mv643xx_eth device are cleared
between each call.  This patch fixes it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 06:43:24 -04:00
Santiago Leon 751ae21c6c [PATCH] ibmveth: fix int rollover panic
This patch fixes a nasty bug that has been sitting there since the
very first versions of the driver, but is generating a panic because
we changed the number of 2K buffers for 2.6.16.

The consumer_index and producer_index are u32's that get incremented
on every buffer emptied and replenished respectively.  We use
the {producer,consumer}_index mod'ed with the size of the pool to
pick out an entry in the free_map.  The problem happens when the
u32 rolls over and the number of the buffers in the pool is not a
perfect divisor of 2^32.  i.e. if the number of 2K buffers is 0x300,
before the consumer_index rolls over,  our index to the free map =
0xffffffff mod 0x300 = 0xff.  The next time a buffer is emptied, we
want the index to the free map to be 0x100, but 0x0 mod 0x300 is 0x0.

This patch assigns the mod'ed result back to the consumer and producer
indexes so that they never roll over.  The second chunk of the patch
covers the unlikely case where the consumer_index has just been reset
to 0x0 and the hypervisor is not able to accept that buffer.

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 06:43:24 -04:00
Santiago Leon 03a85d0907 [PATCH] ibmveth: rename proc entry name
This patch changes the name of the proc file for each ibmveth adapter
from the network device name to the slot number in the virtual bus.

The proc file is created when the device is probed, so a change
in the name of the device will not be reflected in the name of the
proc file giving problems when identifying and removing the adapter.
The slot number is a property that does not change through the life
of the adapter so we use that instead.

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 06:43:23 -04:00
Santiago Leon 4347ef15f7 [PATCH] ibmveth: kdump interrupt fix
This patch fixes a race that panics the kernel when opening the
device after a kdump.  Without this patch there is a window where the
hypervisor can send an interrupt before all the structures for the
kdump ibmveth module are ready (because the hypervisor is not aware
that the partition crashed and that the virtual driver is reloading).
We close this window by disabling the interrupts before registering
the adapter to the hypervisor.

This patch depends on the "ibmveth: Harden driver initilisation" patch.

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 06:43:23 -04:00
Santiago Leon 6b42237488 [PATCH] ibmveth: Add netpoll function
This patch adds the net poll controller function to ibmveth to support
netconsole and netdump.

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 06:43:23 -04:00
Michael Ellerman bbedefccc6 [PATCH] ibmveth: Harden driver initilisation
This patch has been floating around for a while now, Santi originally
sent it in March: http://www.spinics.net/lists/netdev/msg00471.html

After a kexec the ibmveth driver will fail when trying to register
with the Hypervisor because the previous kernel has not unregistered.

So if the registration fails, we unregister and then try again.

We don't unconditionally unregister, because we don't want to disturb
the regular code path for 99% of users.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 06:43:23 -04:00
Stephen Hemminger 489b10c1f6 [PATCH] sky2: incorrect length on receive packets
The previous change to do fragmented receive (post 2.6.18) introduced a bug
where packets are passed up with size set to the size of the receive buffer
not the actual received data.  IP silently trims this so it didn't show up
right away.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05 06:43:23 -04:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Eric Sesterhenn 644c12d7f6 BUG_ON cleanup in drivers/net/tokenring/
This patch converts one if() BUG(); to BUG_ON();
so it can be safely optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:34:11 +02:00