11 Oct, 2007
5 commits
-
These have been superceded by the new ->get_sset_count() hook.
Signed-off-by: Jeff Garzik
Signed-off-by: David S. Miller -
Signed-off-by: Michael Buesch
Signed-off-by: John W. Linville -
This is nicer than the MAC_FMT stuff.
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
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
Signed-off-by: Jeff Garzik
Signed-off-by: David S. Miller -
Several devices have multiple independant RX queues per net
device, and some have a single interrupt doorbell for several
queues.In either case, it's easier to support layouts like that if the
structure representing the poll is independant from the net
device itself.The signature of the ->poll() call back goes from:
int foo_poll(struct net_device *dev, int *budget)
to
int foo_poll(struct napi_struct *napi, int budget)
The caller is returned the number of RX packets processed (or
the number of "NAPI credits" consumed if you want to get
abstract). The callee no longer messes around bumping
dev->quota, *budget, etc. because that is all handled in the
caller upon return.The napi_struct is to be embedded in the device driver private data
structures.Furthermore, it is the driver's responsibility to disable all NAPI
instances in it's ->stop() device close handler. Since the
napi_struct is privatized into the driver's private data structures,
only the driver knows how to get at all of the napi_struct instances
it may have per-device.With lots of help and suggestions from Rusty Russell, Roland Dreier,
Michael Chan, Jeff Garzik, and Jamal Hadi Salim.Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.[ Ported to current tree and all drivers converted. Integrated
Stephen's follow-on kerneldoc additions, and restored poll_list
handling to the old style to fix mutual exclusion issues. -DaveM ]Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
01 Aug, 2007
1 commit
-
All drivers implement ethtool get_perm_addr the same way -- by calling
the generic function. So we can inline the generic function into the
caller and avoid going through the drivers.Signed-off-by: Matthew Wilcox
Signed-off-by: David S. Miller
20 Jul, 2007
1 commit
-
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).
Here is a short excerpt of the semantic patch performing
this transformation:@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);@@
expression E1,E2,E3;
@@- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Russell King
Cc: Bryan Wu
Acked-by: Jiri Slaby
Cc: Dave Airlie
Acked-by: Roland Dreier
Cc: Jiri Kosina
Acked-by: Dmitry Torokhov
Cc: Benjamin Herrenschmidt
Acked-by: Mauro Carvalho Chehab
Acked-by: Pierre Ossman
Cc: Jeff Garzik
Cc: "David S. Miller"
Acked-by: Greg KH
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Jul, 2007
4 commits
-
Use netdev_alloc_skb rather than dev_alloc_skb when allocating
receive buffers.Signed-off-by: Stephen Hemminger
Signed-off-by: Jeff Garzik -
The receive buffer offset is constant in this driver.
Signed-off-by: Stephen Hemminger
Signed-off-by: Jeff Garzik -
No need to grap full size MTU buffer for possibly small transmit
bounce buffers.Signed-off-by: Stephen Hemminger
Signed-off-by: Jeff Garzik -
Make the PHY and statistic timer run on one second boundary
for powersaving.On resume, the driver should check for link up immediately, to
get online faster (rather than waiting for the next second).Signed-off-by: Stephen Hemminger
Signed-off-by: Jeff Garzik
26 Apr, 2007
2 commits
-
To clearly state the intent of copying from linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.Signed-off-by: Arnaldo Carvalho de Melo
-
One less thing for drivers writers to worry about.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller
04 Apr, 2007
1 commit
-
If you set the IFF_ALLMULTI flag on a b44 device, or if you join more than
B44_MCAST_TABLE_SIZE multicast groups, the device will stop receiving unicast
messages. This is because the __b44_set_mac_addr call sets the zeroth CAM
entry to the MAC address of the device, and then the loop at line 1722
proceeds to overwrite it unless the value of i is set by the __b44_load_mcast
call. However, when IFF_ALLMULTI is set, that call is bypassed, leaving i set
to zero.Fixed by starting the loop at 1 to make it skip the CAM entry for the MAC
address.Signed-off-by: Bill Helfinstine
Signed-off-by: Jeff Garzik
18 Feb, 2007
2 commits
-
The b44 Enet control disable bit may take longer to clear on some
systems, so the loop count is increased with this patch. Functionality
is not compromised, but a debug message can be seen when the bit is not
cleared within the count value.
Thanks to Vasileios Lourdas who reported the problem.Signed-off by: Gary Zambrano
Signed-off-by: Jeff Garzik
-
Replaced B44_DMA_MASK with DMA_30BIT_MASK.
Signed-off by: Gary Zambrano
Signed-off-by: Jeff Garzik
07 Feb, 2007
1 commit
-
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik
30 Jan, 2007
3 commits
-
Some issues in b44_resume().
- Return value of pci_enable_device() was ignored.
- If request_irq() has failed we have to just disable device and exit.
Signed-off-by: Dmitriy Monakhov
Signed-off-by: Andrew Morton
Signed-off-by: Jeff Garzik -
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik -
This fixes the issue of frequent link changes under heavy traffic reported
below:http://bugzilla.kernel.org/show_bug.cgi?id=7696
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216338The b44 chip occasionally needs to be reset when ISTAT_ERRORS are
encountered. The reset sequence includes a PHY reset that will take many
seconds to complete and cause the link to go down and up. By skipping the
PHY reset, it will greatly reduce the interruption when ISTAT_ERRORS are
encountered.Change the full_reset parameter to reset_kind parameter in b44_init_hw().
This will allow PHY reset to be skipped when ISTAT_ERRORS are encountered.Signed-off-by: Michael Chan
Signed-off-by: Andrew Morton
Signed-off-by: Jeff Garzik
27 Dec, 2006
1 commit
-
net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
it is available. As netconsole can be used from almost any context,
IRQ must not be enabled blindly in the NAPI handler of a driver which
supports netpoll.b57bd06655a028aba7b92e1c19c2093e7fcfb341 fixed the issue for the
8139too.c driver.Signed-off-by: Francois Romieu
Signed-off-by: Jeff Garzik
07 Nov, 2006
1 commit
-
Through some experimentation with the similarly built bcm43xx I came to
the conclusion that if the hw/firmware sets a bit in the interrupt
register, an interrupt will only be raised if that bit is included in
the interrupt mask. Hence, the interrupt mask is more like an interrupt
control mask.This patch changes the comment to reflect that.
Signed-off-by: Johannes Berg
Signed-off-by: Jeff Garzik
11 Oct, 2006
2 commits
-
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
Cc: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Jeff Garzik
05 Oct, 2006
2 commits
-
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
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit) -
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
Signed-off-by: Jeff Garzik
14 Sep, 2006
1 commit
-
Signed-off-by: Jeff Garzik
20 Aug, 2006
1 commit
-
From: Michal Piotrowski
Signed-off-by: Michal Piotrowski
Signed-off-by: Jeff Garzik
06 Jul, 2006
2 commits
-
Suggested by Jiri Slaby.
Signed-off-by: Jeff Garzik
-
For messages prior to register_netdev(), prefer dev_printk() because
that prints out both our driver name and our [PCI | whatever] bus id.Updates: 8139{cp,too}, b44, bnx2, cassini, {eepro,epic}100, fealnx,
hamachi, ne2k-pci, ns83820, pci-skeleton, r8169.Signed-off-by: Jeff Garzik
03 Jul, 2006
1 commit
-
Signed-off-by: Thomas Gleixner
Cc: Ingo Molnar
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Cc: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jun, 2006
5 commits
-
Update the driver version to 1.01
Signed-off-by: Gary Zambrano
Signed-off-by: Jeff Garzik -
This patch adds wol support for the older 440x nics that use pattern matching.
This patch is a redo thanks to feedback from Michael Chan and Francois Romieu.Signed-off-by: Gary Zambrano
Signed-off-by: Jeff Garzik -
This patch adds a parameter to init_hw() to not completely initialize
the nic for wol.Signed-off-by: Gary Zambrano
Signed-off-by: Jeff Garzik -
Adds wol to the driver.
This is a redo of a previous patch thanks to feedback from Francois Romieu.Signed-off-by Gary Zambrano
Signed-off-by: Jeff Garzik
-
Fixes for speed/duplex/autoneg settings and driver settings info.
This is a redo of a previous patch thanks to feedback from Jeff Garzik.Signed-off-by: Gary Zambrano
Signed-off-by: Jeff Garzik
16 May, 2006
1 commit
-
Needed for interaction with the nommu code in x86-64 which
will return bad_dma_address if the address exceeds dma_mask.Cc: netdev@vger.kernel.org
Signed-off-by: Andi Kleen
Signed-off-by: Linus Torvalds
13 Apr, 2006
3 commits
-
Signed-off-by: Jeff Garzik
-
Disable default tx pause frame support.
The b44 controller has a bug that generates excessive tx pause
frames.Signed-off-by: Gary Zambrano
Signed-off-by: Jeff Garzik