The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Neil Horman <nhorman@txudriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
No need to put ethtool_ops in data, they should be const.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Due to I modified the corresponding platform device name,
so I make the patch to rename MAC platform driver
for w90p910 platform.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
I fixed up my mac driver, which relatives to previous
mac driver actually in the tree.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
at91ether_probe lives in .init.text, so using platform_driver_register
to register it is wrong because binding a device after the init memory
is discarded (e.g. via sysfs) results in an oops.
As requested by David Brownell platform_driver_probe is used instead of
moving the probe function to .devinit.text as proposed initially.
This saves some memory, but devices registered after the driver is
probed are not bound (probably there are none) and binding via sysfs
isn't possible.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: David S. Miller <davem@davemloft.net>
Add mac driver support for evaluation board based on w90p910.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
alloc_etherdev() used to install a default implementation of this
operation, but it must now be explicitly installed in struct
net_device_ops.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
alloc_etherdev() used to install default implementations of these
operations, but they must now be explicitly installed in struct
net_device_ops.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This replaces dma_sync_single() with dma_sync_single_for_cpu() because
dma_sync_single() is an obsolete API; include/linux/dma-mapping.h says:
/* Backwards compat, remove in 2.7.x */
#define dma_sync_single dma_sync_single_for_cpu
#define dma_sync_sg dma_sync_sg_for_cpu
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
bonding: fix panic if initialization fails
IXP4xx: complete Ethernet netdev setup before calling register_netdev().
IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.
ipvs: Fix IPv4 FWMARK virtual services
ipv4: Make INET_LRO a bool instead of tristate.
net: remove stale reference to fastroute from Kconfig help text
net: update skb_recycle_check() for hardware timestamping changes
bnx2: Fix panic in bnx2_poll_work().
net-sched: fix bfifo default limit
igb: resolve panic on shutdown when SR-IOV is enabled
wimax: oops: wimax_dev_add() is the only one that can initialize the state
wimax: fix oops if netlink fails to add attribute
Bluetooth: Move dev_set_name() to a context that can sleep
netfilter: ctnetlink: fix wrong message type in user updates
netfilter: xt_cluster: fix use of cluster match with 32 nodes
netfilter: ip6t_ipv6header: fix match on packets ending with NEXTHDR_NONE
netfilter: add missing linux/types.h include to xt_LED.h
mac80211: pid, fix memory corruption
mac80211: minstrel, fix memory corruption
cfg80211: fix comment on regulatory hint processing
...
* master.kernel.org:/home/rmk/linux-2.6-arm: (48 commits)
[ARM] S3C24XX: ADC: Check pending queue before freeing adc client
[ARM] S3C: Fix ADC driver sparse warning
[ARM] Osiris: Fix double initialisation in machine block
[ARM] Anubis: Fix sparse warnings for items that should be static
[ARM] JIVE: Fix sparse warnings about items which should be static
[ARM] S3C: Fix sparse warning from missing 's3c_device_hwmon'
[ARM] S3C24XX: Fix sparse error in gpiolib.c
[ARM] 5455/1: Fix IRQ noise from VIC code
[ARM] 5454/1: ep93xx_eth: fix sparse warnings
[ARM] remove .gitignore from include/asm-arm
Update MAINTAINERS
mxc defconfig updates
mx31ads: Mark as having full regulatoion constraints with 1133-EV1 board
mx31ads: Depend on all the WM8350 core dependencies for WM1133-EV1 board
Fix ifdef in plat-mxc/irc.c
MX1ADS: remove I2C ifdefs
qong: remove AIPS[12] mappings from machine-specific iotable
mx31ads: imoux pins should be passed in as unsigned int
MXC: remove orphan imx_init_uart() definition
mx31: pin definition for csi
...
Fix 50+ sparse warnings in the ep93xx ethernet driver.
warning: incorrect type in argument 1 (different address spaces)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
with while (timeout-- > 0); timeout reaches -1 after the loop, so the tests
below are off by one. also don't do an '< 0' test on an unsigned.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The 8390 driver was structured by Al Viro to allow the flexibility
required by platforms. lib8390.c contains the core code which drivers
explicitly include:
- 8390.c includes lib8390.c to provide the standard ISA based driver.
- etherh.c includes it with the accessors defined for RiscPC platforms,
where it is addressed via the MMIO accessors with a device dependent
register spacing.
Other platform drivers do something similar.
However, b9a9b4b caused the kernel to contain not only the etherh
private build of lib8390 (included in etherh.c) but also lib8390.c
itself, and referred the new net_device_ops methods to the ISA version.
The result of this is is not pretty:
Unable to handle kernel paging request at virtual address 12032030
pgd = c8330000
[12032030] *pgd=00000000
Internal error: Oops: 18331805 [#1]
Modules linked in: ipv6
CPU: 0 Not tainted (2.6.29-rc3 #167)
PC is at do_set_multicast_list+0xd0/0x190
LR is at bitrev32+0x28/0x34
pc : [<c017aab4>] lr : [<c0139120>] psr: a0000093
sp : c8321d9c ip : c8321d84 fp : c8321dbc
r10: c80c6800 r9 : 00000000 r8 : c80c6b60
r7 : c80c6b80 r6 : cc80c800 r5 : c80c6800 r4 : 00000000
r3 : cc80c80c r2 : 00000004 r1 : 00000007 r0 : e0000000
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
...
Fix up b9a9b4b by making etherh's net_device_ops refer to the internal
lib8390 functions, and remove the build of the ISA 8390.c driver.
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Further to a71558d, this is round five of fixes to make etherh work
again. As mainline kernels stand, the fixes in b9a9b4b were the wrong
approach.
The 8390 driver was structured by Al Viro to allow the flexibility required
by platforms. lib8390.c contains the core code which drivers explicitly
include:
- 8390.c includes lib8390.c to provide the standard ISA based driver.
- etherh.c includes it with the accessors defined for RiscPC platforms,
where it is addressed via the MMIO accessors with a device dependent
register spacing.
Other platform drivers do something similar.
However, b9a9b4b caused the kernel to contain not only the etherh private
build of lib8390 (included in etherh.c) but also lib8390.c itself, and
referred the new net_device_ops methods to the ISA version. The result
of this is is not pretty:
Unable to handle kernel paging request at virtual address 12032030
pgd = c8330000
[12032030] *pgd=00000000
Internal error: Oops: 18331805 [#1]
Modules linked in: ipv6
CPU: 0 Not tainted (2.6.29-rc3 #167)
PC is at do_set_multicast_list+0xd0/0x190
LR is at bitrev32+0x28/0x34
pc : [<c017aab4>] lr : [<c0139120>] psr: a0000093
sp : c8321d9c ip : c8321d84 fp : c8321dbc
r10: c80c6800 r9 : 00000000 r8 : c80c6b60
r7 : c80c6b80 r6 : cc80c800 r5 : c80c6800 r4 : 00000000
r3 : cc80c80c r2 : 00000004 r1 : 00000007 r0 : e0000000
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
...
Fix up b9a9b4b by making etherh's net_device_ops refer to the internal
lib8390 functions, and remove the build of the ISA 8390.c driver.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Further to 483a2b3a31, also fix:
drivers/net/arm/etherh.c:649: error: 'eth_set_mac_addr' undeclared here (not in a function)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
spin_lock functions take a pointer to the lock, not the lock itself.
This error was noticed by compiling ebsa110_defconfig for linux-rt where
the locking functions obviously are more picky about their arguments.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Roel Kluin <12o3l@tiscali.nl>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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 <bhutchings@solarflare.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Reported by Russell King:
drivers/net/arm/etherh.c:649: error: unknown field 'ndo_set_mac_addr' specified in initializer
Signed-off-by: David S. Miller <davem@davemloft.net>
Some devices were converted incorrectly and are missing the validate
address hooks.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Many drivers lost the ability to set ethernet address accidently
during the net_device_ops conversion.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Removed duplicated include in drivers/net/arm/ks8695net.c.
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>