10 Jun, 2011
1 commit
-
Several fixes as well where the +1 was missing.
Done via coccinelle scripts like:
@@
struct resource *ptr;
@@- ptr->end - ptr->start + 1
+ resource_size(ptr)and some grep and typing.
Mostly uncompiled, no cross-compilers.
Signed-off-by: Joe Perches
Signed-off-by: Jiri Kosina
23 May, 2011
1 commit
-
After discovering that wide use of prefetch on modern CPUs
could be a net loss instead of a win, net drivers which were
relying on the implicit inclusion of prefetch.h via the list
headers showed up in the resulting cleanup fallout. Give
them an explicit include via the following $0.02 script.=========================================
#!/bin/bash
MANUAL=""
for i in `git grep -l 'prefetch(.*)' .` ; do
grep -q '' $i
if [ $? = 0 ] ; then
continue
fi( echo '?^#include '
echo .
echo w
echo q
) | ed -s $i > /dev/null 2>&1
if [ $? != 0 ]; then
echo $i needs manual fixup
MANUAL="$i $MANUAL"
fi
done
echo ------------------- 8\
[ Fixed up some incorrect #include placements, and added some
non-network drivers and the fib_trie.c case - Linus ]
Signed-off-by: Linus Torvalds
25 Oct, 2010
1 commit
-
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
Update broken web addresses in arch directory.
Update broken web addresses in the kernel.
Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
Revert "Fix typo: configuation => configuration" partially
ida: document IDA_BITMAP_LONGS calculation
ext2: fix a typo on comment in ext2/inode.c
drivers/scsi: Remove unnecessary casts of private_data
drivers/s390: Remove unnecessary casts of private_data
net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
drivers/infiniband: Remove unnecessary casts of private_data
drivers/gpu/drm: Remove unnecessary casts of private_data
kernel/pm_qos_params.c: Remove unnecessary casts of private_data
fs/ecryptfs: Remove unnecessary casts of private_data
fs/seq_file.c: Remove unnecessary casts of private_data
arm: uengine.c: remove C99 comments
arm: scoop.c: remove C99 comments
Fix typo configue => configure in comments
Fix typo: configuation => configuration
Fix typo interrest[ing|ed] => interest[ing|ed]
Fix various typos of valid in comments
...Fix up trivial conflicts in:
drivers/char/ipmi/ipmi_si_intf.c
drivers/usb/gadget/rndis.c
net/irda/irnet/irnet_ppp.c
23 Sep, 2010
1 commit
-
Signed-off-by: Thomas Weber
Acked-by: David S. Miller
Signed-off-by: Jiri Kosina
03 Sep, 2010
1 commit
-
fresh skbs have ip_summed set to CHECKSUM_NONE (0)
We can avoid setting again skb->ip_summed to CHECKSUM_NONE in drivers.
Introduce skb_checksum_none_assert() helper so that we keep this
assertion documented in driver sources.Change most occurrences of :
skb->ip_summed = CHECKSUM_NONE;
by :
skb_checksum_none_assert(skb);
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
19 Jul, 2010
1 commit
-
The phy_mii_ioctl() function unnecessarily throws away the original ifreq.
We need access to the ifreq in order to support PHYs that can perform
hardware time stamping.Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl().
This is unnecessary since phylib will check the command in any case.Signed-off-by: Richard Cochran
Signed-off-by: David S. Miller
08 Jul, 2010
1 commit
-
Signed-off-by: Ralf Baechle
drivers/net/sb1250-mac.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
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
03 May, 2010
1 commit
29 Apr, 2010
1 commit
-
"ifconfig eth0 up && ifconfig eth0 down" triggers:
| kobject (a8000000cfa5a480): tried to init an initialized object, something is seriously wrong.
| Call Trace:
| [] dump_stack+0x8/0x34
| [] kobject_init+0xe8/0xf0
| [] device_initialize+0x2c/0x98
| [] device_register+0x14/0x28
| [] mdiobus_register+0xdc/0x1e0
| [] sbmac_open+0x58/0x220
| [] __dev_open+0x11c/0x180
| [] __dev_change_flags+0x120/0x180
| [] dev_change_flags+0x20/0x78
| [] devinet_ioctl+0x7cc/0x820
| [] sock_do_ioctl+0x38/0x90
| [] compat_sock_ioctl_trans+0x408/0x1030
| [] compat_sock_ioctl+0xb0/0xd0
| [] compat_sys_ioctl+0xa0/0x18b8
| [] handle_sys+0x114/0x130
|
| sb1250-mac-mdio: probedmdiobus_register() calls device_register() which initializes the kobj of
the device. mdiobus_unregister() calls only device_del() so we have one
reference left. That one is leaving with mdiobus_free() which is only
called on remove.
Since I don't see any reason why mdiobus_register()/mdiobus_unregister()
should happen in ->open()/->close() I move them to probe & exit.Signed-off-by: Sebastian Andrzej Siewior
Signed-off-by: David S. Miller
28 Apr, 2010
2 commits
-
doing it within the driver does not look good.
And surely isn't how platform devices were meat to be used.Acked-by: Ralf Baechle
Signed-off-by: Sebastian Andrzej Siewior
Signed-off-by: David S. Miller -
CONFIG_SIBYTE_STANDALONE is gone since v2.6.31-rc1 ("MIPS: Sibyte:
Remove standalone kernel support")
This is a missing piece.Signed-off-by: Sebastian Andrzej Siewior
Signed-off-by: David S. Miller
06 Apr, 2010
1 commit
-
Signed-off-by: Ralf Baechle
Signed-off-by: David S. Miller
04 Apr, 2010
1 commit
-
Converts the list and the core manipulating with it to be the same as uc_list.
+uses two functions for adding/removing mc address (normal and "global"
variant) instead of a function parameter.
+removes dev_mcast.c completely.
+exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
manipulation with lists on a sandbox (used in bonding and 80211 drivers)Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
19 Feb, 2010
1 commit
-
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
19 Nov, 2009
1 commit
-
Not as fancy as coccinelle. Checkpatch errors ignored.
Compile tested allyesconfig x86, not all files compiled.grep -rPl --include=*.[ch] "\brequest_irq\s*\([^,\)]+,\s*\&" drivers/net | while read file ; do \
perl -i -e 'local $/; while (<>) { s@(\brequest_irq\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\
doneSigned-off-by: Joe Perches
Signed-off-by: David S. Miller
13 Oct, 2009
1 commit
-
The bit V_MAC_RX_PL_THRSH(4) was already set a few lines higher.
Signed-off-by: Roel Kluin
Signed-off-by: David S. Miller
24 Jul, 2009
1 commit
-
A pointer to sbmac_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: Weiwei Wang
Cc: Jeff Garzik
Cc: David S. Miller
Cc: Stephen Hemminger
Acked-by: Maciej W. Rozycki
Cc: Andrew Morton
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
13 Jun, 2009
1 commit
-
Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively.
0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases
where its in direct proximity to one of the other values.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
05 May, 2009
1 commit
-
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.Signed-off-by: Greg Kroah-Hartman
Signed-off-by: David S. Miller
16 Apr, 2009
1 commit
-
Signed-off-by: Alexander Beregalov
Signed-off-by: David S. Miller
30 Mar, 2009
1 commit
-
Fix misspelling of firmware.
Signed-off-by: Nick Andrew
Signed-off-by: Jiri Kosina
27 Jan, 2009
1 commit
-
Signed-off-by: Kay Sievers
Acked-by: Greg Kroah-Hartman
Signed-off-by: David S. Miller
22 Jan, 2009
1 commit
-
Following the removal of the unused struct net_device * parameter from
the NAPI functions named *netif_rx_* in commit 908a7a1, they are
exactly equivalent to the corresponding *napi_* functions and are
therefore redundant.Signed-off-by: Ben Hutchings
Acked-by: Neil Horman
Signed-off-by: David S. Miller
23 Dec, 2008
1 commit
-
When the napi api was changed to separate its 1:1 binding to the net_device
struct, the netif_rx_[prep|schedule|complete] api failed to remove the now
vestigual net_device structure parameter. This patch cleans up that api by
properly removing it..Signed-off-by: Neil Horman
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
09 Oct, 2008
2 commits
-
This patch introduces mdiobus_alloc() and mdiobus_free(), and
makes all mdio bus drivers use these functions to allocate their
struct mii_bus'es dynamically.Signed-off-by: Lennert Buytenhek
Signed-off-by: David S. Miller
Acked-by: Andy Fleming -
In preparation of giving mii_bus objects a device tree presence of
their own, rename struct mii_bus's ->dev argument to ->parent, since
having a 'struct device *dev' that points to our parent device
conflicts with introducing a 'struct device dev' representing our own
device.Signed-off-by: Lennert Buytenhek
Signed-off-by: David S. Miller
Acked-by: Andy Fleming
25 Sep, 2008
1 commit
-
Netpoll will call the interrupt handler with interrupts
disabled when using kgdboe, so spin_lock_irqsave() should
be used instead of spin_lock_irq() to prevent interrupts
from being incorrectly enabled.Signed-off-by: Weiwei Wang
Signed-off-by: Jeff Garzik
26 May, 2008
1 commit
-
Conflicts:
drivers/net/cpmac.c
net/mac80211/mlme.c
22 May, 2008
1 commit
-
Use netdev_alloc_skb. This sets skb->dev and allows arch specific
allocation. Also simplify and cleanup the alignment code.Signed-off-by: Stephen Hemminger
Signed-off-by: Maciej W. Rozycki
Signed-off-by: Jeff Garzik
13 May, 2008
1 commit
-
Signed-off-by: Jeff Garzik
17 Apr, 2008
1 commit
-
Having the id field be an int was making more complex bus topologies
excessively difficult. For now, just convert it to a string, and
change all instances of "bus->id = val" to
snprintf(id, MII_BUS_ID_LEN, "%x", val).Signed-off-by: Andy Fleming
Signed-off-by: Jeff Garzik
11 Oct, 2007
6 commits
-
A driver model and phylib update. It includes the following changes:
1. Removal of unused module options.
2. Phylib support and the resulting removal of generic bits for handling
the PHY.3. Proper reserving of device resources and using ioremap()ped handles
to access MAC registers rather than platform-specific macros.4. Handling of the device using the driver model.
Signed-off-by: Maciej W. Rozycki
Signed-off-by: Jeff Garzik -
Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc(). Also reformat the surrounding clutter.Signed-off-by: Maciej W. Rozycki
Signed-off-by: Jeff Garzik -
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 -
Signed-off-by: Mariusz Kozlowski
drivers/net/sb1250-mac.c | 76286 -> 76199 (-87 bytes)
drivers/net/sb1250-mac.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Signed-off-by: Jeff Garzik -
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