31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
27 Oct, 2010
1 commit
-
If we continue on error, we'd likely free the IRQ that we
didn't get, right?Signed-off-by: Nicolas Kaiser
Signed-off-by: David S. Miller
27 Sep, 2010
1 commit
-
Freeing netdev without free_netdev() leads to net, tx leaks.
I might lead to dereferencing freed pointer.The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)@@
struct net_device* dev;
@@-kfree(dev)
+free_netdev(dev)Signed-off-by: David S. Miller
10 May, 2010
1 commit
-
Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Drivers can avoid one cache miss
(on dev->trans_start) in their start_xmit() handler.Exceptions are NETIF_F_LLTX drivers
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
06 Apr, 2010
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
smc91c92_cs: fix the problem of "Unable to find hardware address"
r8169: clean up my printk uglyness
net: Hook up cxgb4 to Kconfig and Makefile
cxgb4: Add main driver file and driver Makefile
cxgb4: Add remaining driver headers and L2T management
cxgb4: Add packet queues and packet DMA code
cxgb4: Add HW and FW support code
cxgb4: Add register, message, and FW definitions
netlabel: Fix several rcu_dereference() calls used without RCU read locks
bonding: fix potential deadlock in bond_uninit()
net: check the length of the socket address passed to connect(2)
stmmac: add documentation for the driver.
stmmac: fix kconfig for crc32 build error
be2net: fix bug in vlan rx path for big endian architecture
be2net: fix flashing on big endian architectures
be2net: fix a bug in flashing the redboot section
bonding: bond_xmit_roundrobin() fix
drivers/net: Add missing unlock
net: gianfar - align BD ring size console messages
net: gianfar - initialize per-queue statistics
...
31 Mar, 2010
1 commit
-
Unlock the lock before leaving the function.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@r exists@
expression E1;
identifier f;
@@f (...) { }
//Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
13 Feb, 2010
1 commit
-
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.Jirka
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
14 Oct, 2009
1 commit
-
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
02 Oct, 2009
1 commit
-
The function sgiseeq_remove is defined using __exit, so don't use
__devexit_p but __exit_p to wrap it.Signed-off-by: Uwe Kleine-König
Cc: David S. Miller
Cc: Wang Chen
Cc: Ralf Baechle
Cc: Patrick McHardy
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller
24 Jul, 2009
1 commit
-
A pointer to sgiseeq_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.Signed-off-by: Uwe Kleine-König
Cc: Wang Chen
Cc: David S. Miller
Cc: Andrew Morton
Cc: Jeff Garzik
Cc: Thomas Bogendoerfer
Acked-by: Ralf Baechle
Cc: Greg Kroah-Hartman
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller
06 Jul, 2009
1 commit
-
This patch is the result of an automatic spatch transformation to convert
all ndo_start_xmit() return values of 0 to NETDEV_TX_OK.Some occurences are missed by the automatic conversion, those will be
handled in a seperate patch.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
16 Apr, 2009
1 commit
-
Signed-off-by: Alexander Beregalov
Signed-off-by: David S. Miller
13 Nov, 2008
1 commit
-
We have some reasons to kill netdev->priv:
1. netdev->priv is equal to netdev_priv().
2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
netdev_priv() is more flexible than netdev->priv.
But we cann't kill netdev->priv, because so many drivers reference to it
directly.This patch is a safe convert for netdev->priv to netdev_priv(netdev).
Since all of the netdev->priv is only for read.
But it is too big to be sent in one mail.
I split it to 4 parts and make every part smaller than 100,000 bytes,
which is max size allowed by vger.Signed-off-by: Wang Chen
Signed-off-by: David S. Miller
04 Nov, 2008
1 commit
-
The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.Drivers need not do it any more.
Some cases had to be skipped over because the drivers
were making use of the ->last_rx value themselves.Signed-off-by: David S. Miller
28 Oct, 2008
1 commit
-
This converts pretty much everything to print_mac. There were
a few things that had conflicts which I have just dropped for
now, no harm done.I've built an allyesconfig with this and looked at the files
that weren't built very carefully, but it's a huge patch.Signed-off-by: Johannes Berg
Signed-off-by: David S. Miller
25 Apr, 2008
1 commit
-
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable network
platform drivers, to re-enable auto loading.NOTE: didn't change drivers/net/fs_enet/fs_enet-main.c "old binding" support.
That looks problematic in the first place (it even uses the ancient "struct
device_driver" binding scheme for platform_bus!) and I suspect it will vanish
soonish when arch/powerpc rules the world. Also, drivers/net/ne.c would have
needed more thought to sort out.[akpm@linux-foundation.org: fix sgiseeq.c]
[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers
Signed-off-by: David Brownell
Cc: Scott Wood
Cc: Vitaly Bordug
Cc: Dale Farnsworth
Cc: Ben Dooks
Cc: Ralf Baechle
Cc: Andrew Victor
Cc: Bryan Wu
Signed-off-by: Andrew Morton
Signed-off-by: Jeff Garzik
29 Jan, 2008
3 commits
-
When doing init_ring checking whether a new skb needs to be allocated
was wrong.Signed-off-by: Thomas Bogendoerfer
Signed-off-by: Jeff Garzik -
- Use inline functions for dma_sync_* instead of macros
- added Kconfig change to make selection for similair SGI boxes easierSigned-off-by: Thomas Bogendoerfer
Acked-by: Ralf Baechle
Signed-off-by: Jeff Garzik -
SGI IP28 machines would need special treatment (enable adding addtional
wait states) when accessing memory uncached. To avoid this pain I changed
the driver to use only cached access to memory.Signed-off-by: Thomas Bogendoerfer
Signed-off-by: Jeff Garzik
11 Oct, 2007
3 commits
-
This is nicer than the MAC_FMT stuff.
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
We now have struct net_device_stats embedded in struct net_device,
and the default ->get_stats() hook does the obvious thing for us.Run through drivers/net/* and remove the driver-local storage of
statistics, and driver-local ->get_stats() hook where applicable.This was just the low-hanging fruit in drivers/net; plenty more drivers
remain to be updated.[ Resolved conflicts with napi_struct changes and fix sunqe build
regression... -DaveM ]Signed-off-by: Jeff Garzik
Signed-off-by: David S. Miller -
The sgiseeq driver is one of the few remaining users of the ancient
cache banging DMA API. Replaced with the modern days DMA API.Signed-off-by: Ralf Baechle
Signed-off-by: Jeff Garzik
25 Aug, 2007
1 commit
-
The driver remove method needs to return an int not void. This was just
never noticed because usually this driver is not being built as a module.Signed-off-by: Ralf Baechle
Signed-off-by: Jeff Garzik
11 Jul, 2007
1 commit
-
It hasn't "summed" anything in over 7 years, and it's
just a straight mempcy ala skb_copy_to_linear_data()
so just get rid of it.Signed-off-by: David S. Miller
12 May, 2007
1 commit
-
Signed-off-by: Ralf Baechle
28 Apr, 2007
1 commit
-
Thanks to Jö Fahlke for donating hardware.
Signed-off-by: Ladislav Michl
Forward porting of Ladis' 2.4 patch.
Signed-off-by: Ralf Baechle
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
27 Feb, 2007
1 commit
-
Signed-off-by: Ralf Baechle
Signed-off-by: Jeff Garzik
05 Oct, 2006
1 commit
-
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)
12 Mar, 2006
1 commit
-
o Make sgiseeq_dump_rings static.
o Delete unused sgiseeq_my_reset.
o Move DEBUG define to beginning where it's easier to spot and will be
seen by as well.
o Use NULL for pointer initialization.Signed-off-by: Ralf Baechle
Signed-off-by: Jeff Garzik
19 Oct, 2005
2 commits
-
Signed-off-by: Ralf Baechle
drivers/net/sgiseeq.c | 28 ++++++++++++++--------------
include/asm-mips/sgi/hpc3.h | 40 ++++++++++++++++++++--------------------
2 files changed, 34 insertions(+), 34 deletions(-)
Signed-off-by: Jeff Garzik -
Signed-off-by: Ralf Baechle
drivers/net/sgiseeq.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
Signed-off-by: Jeff Garzik
17 Apr, 2005
1 commit
-
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!