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
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
27 Sep, 2010
1 commit
-
Change "return (EXPR);" to "return EXPR;"
return is not a function, parentheses are not required.
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
14 Jul, 2010
1 commit
-
This reverts commit b31fb86815153be3bc94e8ffb9dbf6e9d7694b2d.
pcim_*() managed drivers do not need explicit resource
releasing like this.Signed-off-by: David S. Miller
13 Jul, 2010
1 commit
-
If tc35815_init_one() fails we must unmap mapped regions.
Signed-off-by: Kulikov Vasiliy
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
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
26 Feb, 2010
3 commits
-
Isolate spinlock for tx and rx to resolve double-locking.
This is potential bug while this controller does not exist on any
SMP platforms, but lockdep or rt-preempt reveals this bug.Reported-by: Ralf Roesch
Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller -
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
23 Feb, 2010
1 commit
-
The netif_wake_queue() is called correctly (i.e. only on !txfull
condition) from txdone routine. So Unconditional call to the
netif_wake_queue() here is wrong. This might cause calling of
start_xmit routine on txfull state and trigger BUG_ON.This bug does not happen when NAPI disabled. After txdone there
must be at least one free tx slot. But with NAPI, this is not
true anymore and the BUG_ON can hits on heavy load.In this driver NAPI was enabled on 2.6.33-rc1 so this is
regression from 2.6.32 kernel.Reported-by: Ralf Roesch
Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller
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
08 Jan, 2010
1 commit
-
Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section
in every case.Signed-off-by: Alexey Dobriyan
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
03 Nov, 2009
2 commits
-
- TC35815_DMA_SYNC_ONDEMAND is always enabled.
- WORKAROUND_LOSTCAR is always enabled.
- WORKAROUND_100HALF_PROMISC is always enabled.
- GATHER_TXINT is always enabled.
- TC35815_USE_PACKEDBUFFER is always disabled.
- NO_CHECK_CARRIER is always disabled.Signed-off-by: David S. Miller
-
Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller
28 Oct, 2009
2 commits
-
This driver has NAPI code but it has been disabled. Enable it now.
The non-napi code will be removed lator.Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller -
Return received count correctly even if tx completed at the same time.
Currently NAPI is disabled for this driver so this patch does not fix
any real problem.Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller
07 Aug, 2009
5 commits
-
The datasheet say "When not enabling packing, the MinFrag value must
remain at 0". Do not set value to RxFragSize register if
TC35815_USE_PACKEDBUFFER disabled.This is not a bugfix. No real problem reported on this.
Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller -
The Miss_Cnt register is cleared by reading. Accumulate its value to
rx_missed_errors count.Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller -
The current timeout value is too short for very high-load condition
which jiffies might jump up in busy-loop.
Also add minimum delay before checking completion of MDIO.Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller -
Clear Int_BLEx / Int_FDAEx after (not before) processing Rx interrupt.
This will reduce number of unnecessary interrupts.
Also print rx error messages only if netif_msg_rx_err() enabled.Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller -
It seems Rx_StripCRC cause trouble on recovering from the BLEx (Buffer
List Exhaust) or FDAEx (Free Descriptor Area Exhaust) condition.
Do not use it.Also bump version number up.
Reported-by: Ralf Roesch
Signed-off-by: Atsushi Nemoto
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
18 May, 2009
1 commit
-
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
14 Apr, 2009
1 commit
-
Signed-off-by: Alexander Beregalov
Signed-off-by: David S. Miller
02 Apr, 2009
1 commit
-
This driver contains experimental NAPI code disabled by default.
The commit bea3348ee ("[NET]: Make NAPI polling independent of struct
net_device objects.") converted the NAPI path of this driver but that
conversion was not complete. This patch fixes a build error
introduced by the commit.Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller
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
12 Dec, 2008
1 commit
-
The chip can strip CRC automatically on receiving. Enable it.
Also fix potential RX_BUF_SIZE calculation bug which was obscured by
alignment. And use proper symbols (NET_IP_ALIGN, ETH_FCS_LEN, etc.)
instead of magic numbers.Signed-off-by: Atsushi Nemoto
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
31 Oct, 2008
1 commit
-
Signed-off-by: Atsushi Nemoto
Signed-off-by: Jeff Garzik
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
13 Oct, 2008
1 commit
-
Fix an obvious typo introduced by
commit 298cf9beb9679522de995e249eccbd82f7c51999
(phylib: move to dynamic allocation of struct mii_bus)....
CC drivers/net/tc35815.o
drivers/net/tc35815.c: In function 'tc_mii_init':
drivers/net/tc35815.c:799: error: 'err_out_free_mii_bus' undeclared (first use in this function)
drivers/net/tc35815.c:799: error: (Each undeclared identifier is reported only once
drivers/net/tc35815.c:799: error: for each function it appears in.)
drivers/net/tc35815.c:781: error: label 'err_out_free_mii_bus' used but not defined
make[3]: *** [drivers/net/tc35815.o] Error 1Signed-off-by: Adrian Bunk
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
27 Jul, 2008
1 commit
-
Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
architecture does:This enables us to cleanly fix the Calgary IOMMU issue that some devices
are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).I think that per-device dma_mapping_ops support would be also helpful for
KVM people to support PCI passthrough but Andi thinks that this makes it
difficult to support the PCI passthrough (see the above thread). So I
CC'ed this to KVM camp. Comments are appreciated.A pointer to dma_mapping_ops to struct dev_archdata is added. If the
pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's
NULL, the system-wide dma_ops pointer is used as before.If it's useful for KVM people, I plan to implement a mechanism to register
a hook called when a new pci (or dma capable) device is created (it works
with hot plugging). It enables IOMMUs to set up an appropriate
dma_mapping_ops per device.The major obstacle is that dma_mapping_error doesn't take a pointer to the
device unlike other DMA operations. So x86 can't have dma_mapping_ops per
device. Note all the POWER IOMMUs use the same dma_mapping_error function
so this is not a problem for POWER but x86 IOMMUs use different
dma_mapping_error functions.The first patch adds the device argument to dma_mapping_error. The patch
is trivial but large since it touches lots of drivers and dma-mapping.h in
all the architecture.This patch:
dma_mapping_error() doesn't take a pointer to the device unlike other DMA
operations. So we can't have dma_mapping_ops per device.Note that POWER already has dma_mapping_ops per device but all the POWER
IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device
argument.[akpm@linux-foundation.org: fix sge]
[akpm@linux-foundation.org: fix svc_rdma]
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix bnx2x]
[akpm@linux-foundation.org: fix s2io]
[akpm@linux-foundation.org: fix pasemi_mac]
[akpm@linux-foundation.org: fix sdhci]
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix sparc]
[akpm@linux-foundation.org: fix ibmvscsi]
Signed-off-by: FUJITA Tomonori
Cc: Muli Ben-Yehuda
Cc: Andi Kleen
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Avi Kivity
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jul, 2008
1 commit
-
The drivers were touching net queue before it has been started, so
without this patch, the drivers will potentially WARN at
net/core/dev.c:1328.I don't have the hardware for the drivers below, so this patch is
untested, and thus should be carefully peer reviewed.tc35815.c
au1000_eth.c
bfin_mac.c
macb.c
^ The four drivers are using phylib, they're calling netif_start_queue()
in open() callback. So trivially remove netif_tx_schedule_all().
Phylib will handle netif_carrier_*().cpmac.c
fec_mpc52xx.c
fs_enet/fs_enet-main.c
sh_eth.c
^ The same as above, but these were also needlessly calling
netif_carrier_*() functions. So removed queue calls and also remove
carrier calls, since phylib will handle it. fs_enet-main.c also didn't
call netif_start_queue() at open(), this is fixed now.Signed-off-by: Anton Vorontsov
Signed-off-by: David S. Miller