Gabor Juhos
2c4e3cf33a
ar71xx: ag71xx: get max_frame_len and desc_pktlen_mask from platform data
...
This will allow to use SoC specific values for both.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39145
2013-12-20 11:41:17 +00:00
Gabor Juhos
9be1e508f9
ar71xx: ag71xx: store descriptor packet length mask in ag71xx struct
...
The currently used bitmask is not correct for all SoCs.
Introduce a new field in struct ag71xx and store the
bitmask in that. Use the current value for now, it will
be adjusted for each SoCs in further patches.
Aslo use the new field directly in the ag71xx_rx_packets
and ag71xx_hard_start_xmit() functions and remove the
ag71xx_desc_pktlen() helper.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39144
2013-12-20 11:41:16 +00:00
Gabor Juhos
8b712436f3
ar71xx: implement callback in mdio reset
...
This enables us to add fixups to the board specific code for boards that
require special treatment of PHYs on mdio bus reset.
Signed-off-by: Felix Kaechele <heffer@fedoraproject.org>
http://patchwork.openwrt.org/patch/4614/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39127
2013-12-17 22:14:10 +00:00
Gabor Juhos
31de995025
ar71xx: ag71xx: compute the RX buffer size from the maximum frame size
...
Currently, the AG71XX_RX_PKT_SIZE value limits the received
frame size to 1514/1516 bytes with/without a VLAN header
respectively. However the hardware limit is controlled by
the value the AG71XX_REG_MAC_MFL register which contains
the value of the max_frame_len field.
Compute the RX buffer size from the max_frame_len field
to get rid of the 1514/1516 byte limitation. Also remove
the unused AG71XX_RX_PKT_SIZE definition.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39121
2013-12-17 16:27:46 +00:00
Gabor Juhos
b35e0da0f4
ar71xx: ag71xx: store RX buffer size in the ag71xx struct
...
This allows to change the value dynamically.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39120
2013-12-17 16:27:44 +00:00
Gabor Juhos
6072e777e9
ar71xx: ag71xx: store maximum frame length in the ag71xx struct
...
This will allow to use different values for the
different SoCs.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39117
2013-12-17 15:18:16 +00:00
Gabor Juhos
ea89cc9250
ar71xx: ag71xx: use mdio bus name in ar7240_probe messages
...
The ar7240_probe function uses the network device name
in the kernel log messages, however the name is not yet
initialized when the ar7240_probe function is called.
Use the mdio bus name in the messages to avoid ugly
log lines like the following one:
eth%d: Found an AR7240/AR9330 built-in switch
Reported-by: Ronald Wahl <ronald.wahl@raritan.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39116
2013-12-17 15:12:52 +00:00
Gabor Juhos
0d7a6748e1
ag71xx: ag71xx: use device name for debugfs entry
...
The ag71xx debugfs code uses the network device name
for the device specific debugfs directory. Since r38689
'ar71xx: ag71xx: fix a race involving netdev registration'
the debugfs initialization happens before the ethernet
device gets registered and the network device name contains
'eth%d' at this point. If the board setup code registers
multiple ag71xx devices, the debugfs code tries to create
the device specific dir with the same name which causes
an error like this:
eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
ag71xx: probe of ag71xx.0 failed with error -12
Use the device name for the debugfs directory to avoid the
collisions. Also add an error message and change the return
code if the debugfs_create_dir call fails.
Reported-by: Ronald Wahl <ronald.wahl@raritan.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39115
2013-12-17 15:12:50 +00:00
Gabor Juhos
ec09569b17
ar71xx: ag71xx: fix ag71xx_probe error path
...
Signed-off-by: Catalin Patulea <cat@vv.carleton.ca>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 38716
2013-11-11 07:47:00 +00:00
Gabor Juhos
7bd3a7bc7b
ar71xx: ag71xx: fix a race involving netdev registration
...
In particular, phy_connect before register_netdev. This is because
register_netdev runs the netdev notifiers, which can race with the rest of
the initialization in ag71xx_probe. In my case this manifested in two ways:
1) If ag71xx is compiled as a module and inserted after netifd has started,
netifd is notified by register_netdev before the call to
ag71xx_phy_connect. netifd tries to bring the interface up, which calls
ag71xx_open, which in turn enters ag71xx_phy_start. This keys off
ag->phy_dev (which is still NULL) and thinks this is a fixed-link board,
and enters ag71xx_link_adjust. This looks at ag->speed which is not yet
initialized and hits the BUG() in the switch (ag->speed) in
ag71xx_link_adjust.
This is the wrong code path for ag71xx_phy_start - my board has PHYs that
need to be brought up with phy_start. Doing ag71xx_phy_connect before
register_netdev ensures that ag->phy_dev is non-NULL before
ag71xx_phy_start is ever called.
2) When ag71xx is built into the kernel, and netconsole is enabled, there
is a gap in the initial burst of replayed printks right after the netdev
comes up. My assumption is that netconsole is also triggered by a netdev
notifier, and part of this printk burst happens before the call into
ag71xx_phy_connect, so part of the burst is lost while the PHY comes up.
This patch fixes the gap - all the printks before eth0 comes up are bursted
in full when netconsole initializes.
ag71xx_phy_connect_xxx no longer runs with a registered netdev, so the
logging has been adjusted accordingly to avoid "unregistered net_device" or
"eth%d" messages in dmesg.
Signed-off-by: Catalin Patulea <cat@vv.carleton.ca>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 38689
2013-11-08 08:17:54 +00:00
Felix Fietkau
bbd4d4c8b8
ar71xx: ethernet: reduce tx dma ring size further to improve cache footprint
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37765
2013-08-13 10:35:10 +00:00
Felix Fietkau
58e049ea80
ar71xx: ethernet: reduce tx and rx DMA ring size to improve cache footprint
...
256 entries is a bit excessive, even for gigabit speeds
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37762
2013-08-12 17:26:03 +00:00
Felix Fietkau
f43b4ea962
ar71xx: ethernet: cache skb->len in the tx function to avoid accessing it again in completion
...
Improves ethernet performance, especially during bridging
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37761
2013-08-12 17:26:00 +00:00
Felix Fietkau
53c3b2a193
ar71xx: fix typo
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37759
2013-08-12 12:41:53 +00:00
Felix Fietkau
f18fd5512e
ar71xx: ethernet: skip calls to netdev_completed_queue and netif_wake_queue if no tx cleanup was done
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37758
2013-08-12 11:44:35 +00:00
Felix Fietkau
81cfb9e5ed
ar71xx: ethernet: do not update the unused dev->last_rx field
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37757
2013-08-12 11:44:31 +00:00
Felix Fietkau
104ff48e25
ar71xx: add missing return statement in ethernet mtu change op
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37756
2013-08-12 11:44:28 +00:00
Felix Fietkau
7b05fe59a4
ar71xx: allow mtu > 1500 based on the configured tx/rx mtu register value
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37748
2013-08-10 15:31:38 +00:00
Felix Fietkau
64dde7d981
ar71xx: add linux 3.10
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37214
2013-07-09 12:52:18 +00:00
Gabor Juhos
4341b11f3e
ar71xx: remove __dev{init,exit} annotations from kernel files
...
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 35687
2013-02-19 20:52:06 +00:00
Felix Fietkau
2e7a4b088d
ar71xx: allow unknown multicast frames to pass to the CPU on AR934x
...
SVN-Revision: 35564
2013-02-11 18:59:05 +00:00
Gabor Juhos
1dc2b6e8fa
ar71xx: ag71xx: show PHY interface mode in dmesg
...
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34880
2012-12-25 18:45:29 +00:00
Gabor Juhos
9edcd9d3a3
ar71xx: ag71xx: fix mii_bus_dev sanity check
...
The mii_bus device is not required if phy_mask is zero.
The driver will use a fixed connection if it is not
specified.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34849
2012-12-22 12:12:41 +00:00
Gabor Juhos
ad0f03d250
ar71xx: ag71xx: don't start/stop built-in switch w/o mii_bus_dev
...
Trying to do that causes a NULL pointer dereference:
CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 801d170c, ra == 801d18d4
Oops[#1 ]:
Cpu 0
$ 0 : 00000000 00000000 00000000 00000001
$ 4 : 00000000 802e6390 ffff8f45 00000001
$ 8 : 804b5360 ffffff80 802f93bc 00000000
$12 : 802f93e8 00000000 00000000 00000000
$16 : 8381aba0 8381aba0 00000000 00000000
$20 : 8295eff0 00000032 80000000 004101b8
$24 : 00000000 777265b0
$28 : 82936000 82937cf0 00420000 801d18d4
Hi : 00000000
Lo : 00000001
epc : 801d170c ar7240sw_reset+0x1c/0x19c
Tainted: G O
ra : 801d18d4 ag71xx_ar7240_start+0x28/0xc0
Status: 1100fc03 KERNEL EXL IE
Cause : 00800008
BadVA : 00000000
PrId : 00019750 (MIPS 74Kc)
Modules linked in: ath79_wdt ohci_hcd ledtrig_usbdev ledtrig_netdev
nf_nat_irc nf_nat_ftp nf_conntrack_irc nf_conntrack_ftp
ipt_MASQUERADE iptable_nat nf_nat pppoe xt_conntrack xt_CT xt_NOTRACK
iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack
ehci_hcd pppox ipt_REJECT xt_TCPMSS xt_LOG xt_comment xt_multiport
xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tab
les ppp_async ppp_generic slhc ath9k(O) ath9k_common(O) ath9k_hw(O)
ath(O) mac80211(O) usbcore usb_common nls_base crc_ccitt cfg80211(O) c
ompat(O) arc4 aes_generic crypto_blkcipher cryptomgr aead crypto_hash
crypto_algapi ledtrig_timer ledtrig_default_on leds_gpio gpio_button
_hotplug(O)
Process netifd (pid: 677, threadinfo=82936000, task=82cbe140, tls=77803750)
Stack : ffffffff 80087900 00000001 82937d74 8381aba0 8381aba0 00000000 00000000
8295eff0 801d18d4 8295eff0 801fa4a4 00420000 80092158 00000002 8381aba0
8381a800 00000000 00000080 801cf900 8027e720 00000000 00000000 8009223c
8381a800 8381a82c 8027e720 00000000 00000000 7f9d14f0 00420000 801ec08c
8381a800 801ebfb0 33000000 82937e30 00000001 8381a800 00001003 801ec348
...
Call Trace:
[<801d170c>] ar7240sw_reset+0x1c/0x19c
[<801d18d4>] ag71xx_ar7240_start+0x28/0xc0
[<801cf900>] ag71xx_open+0x1d0/0x258
[<801ec08c>] __dev_open+0xcc/0x130
[<801ec348>] __dev_change_flags+0xc0/0x160
[<801ec490>] dev_change_flags+0x20/0x6c
[<801ec5c8>] dev_ifsioc+0xec/0x348
[<801ecdb8>] dev_ioctl+0x594/0x67c
[<800ec00c>] do_vfs_ioctl+0x598/0x5ec
[<800ec0b0>] sys_ioctl+0x50/0x90
[<8006a3c4>] stack_done+0x20/0x40
Code: afbf0024 afb40020 afb10014 <8c910000> 00809021 24100104 24130704 8e440000 02002821
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34848
2012-12-22 12:12:40 +00:00
Gabor Juhos
e2ec99889e
ar71xx: ag71xx: fix build_skb arguments for 3.6
...
Also add a compatibility patch for 3.3
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 33969
2012-10-27 17:11:06 +00:00
Gabor Juhos
7592057774
ar71xx: add dynamic MDIO clock calculation
...
SVN-Revision: 33342
2012-09-09 14:05:17 +00:00
Gabor Juhos
b8618fd3f2
ar71xx: improve MDIO busy wait code
...
SVN-Revision: 32586
2012-07-03 15:24:02 +00:00
Felix Fietkau
a9cd8446f3
ar71xx: do not override the mdio clock for ar9330. the override value (obtained from an atheros driver) seems to break ethernet functionality
...
SVN-Revision: 31956
2012-05-28 20:39:50 +00:00
Felix Fietkau
367e4b3994
ar71xx: improve rx performance of the ethernet driver by using build_skb to deliver a cache-hot skb to the network stack
...
SVN-Revision: 31934
2012-05-28 02:55:59 +00:00
Felix Fietkau
8039a1bbb2
ar71xx: fix MII clock settings for various chips, improves ethernet stability on AR934x
...
SVN-Revision: 31925
2012-05-27 21:02:41 +00:00
Felix Fietkau
a3f2fd187b
ar71xx: remove AG71XX_RX_PKT_RESERVE, it is no longer necessary (found by Eric Dumazet)
...
SVN-Revision: 31736
2012-05-15 10:36:39 +00:00
Felix Fietkau
0ff3c396d3
kernel: rewrite the phy packet hook, put it in the network stack to avoid having to keep non-upstream ethernet driver changes
...
SVN-Revision: 31637
2012-05-06 21:19:14 +00:00
Gabor Juhos
3e3a4d3d6b
ar71xx: allow to disable link polling on unused PHYs
...
SVN-Revision: 31533
2012-04-29 18:29:24 +00:00
Gabor Juhos
a447f1810c
ar71xx: enable MIB counters in the built-in switch of the AR934x
...
SVN-Revision: 31476
2012-04-25 13:02:11 +00:00
Gabor Juhos
c00b53f3d0
ar71xx: move micrel PHY driver to the generic linux target
...
SVN-Revision: 30946
2012-03-15 09:25:53 +00:00
Gabor Juhos
ff909edf94
ar71xx: ag71xx: fix ARP frame reception on AR934x switch ports
...
SVN-Revision: 30926
2012-03-13 17:29:38 +00:00
Gabor Juhos
cd6a4cde13
ar71xx: ag71xx: start aneg on switch PHYs after reset
...
SVN-Revision: 30925
2012-03-13 17:29:37 +00:00
Gabor Juhos
7c9534cfd7
ar71xx: ag71xx: poll PHY status of all available switch ports
...
SVN-Revision: 30924
2012-03-13 17:29:36 +00:00
Gabor Juhos
8449eecf5f
ar71xx: ag71xx: allow to use port 5 of the AR934x built-in switch
...
SVN-Revision: 30923
2012-03-13 17:29:34 +00:00
Gabor Juhos
c455a0f7be
ar71xx: ag71xx: fix get_port_link callback
...
SVN-Revision: 30841
2012-03-07 16:32:35 +00:00
Gabor Juhos
5a83b3a5c7
ar71xx: ag71xx: use the generic get_port_link implementation
...
SVN-Revision: 30840
2012-03-07 16:32:34 +00:00
Gabor Juhos
7052847972
ar71xx: ag71xx: keep VLAN tags if VLAN is not enabled
...
SVN-Revision: 30768
2012-03-01 19:49:05 +00:00
Gabor Juhos
766999085a
ar71xx: ag71xx: add BQL support
...
It will be usable only from linux-3.3.
Based on a patch by Dave Taht <dave.taht@bufferbloat.net>
SVN-Revision: 30417
2012-02-10 14:56:47 +00:00
Gabor Juhos
32a18a05f8
ar71xx: add preliminary support for 3.3
...
SVN-Revision: 30410
2012-02-10 11:53:56 +00:00
Gabor Juhos
d72bde99cd
ar71xx: merge files-3.2 to files
...
SVN-Revision: 30405
2012-02-10 08:19:31 +00:00
Gabor Juhos
386cbfe45b
ar71xx: move arch specific files to files-2.6.39
...
SVN-Revision: 29867
2012-01-22 22:38:11 +00:00
Gabor Juhos
f90e578903
ar71xx: include linux/module.h in the micrel phy driver
...
SVN-Revision: 29848
2012-01-22 13:51:49 +00:00
Gabor Juhos
8c2482f76e
ar71xx: ag71xx: implement get_port_{link,stats} callbacks
...
SVN-Revision: 29626
2011-12-31 15:02:26 +00:00
Felix Fietkau
db0a1db257
ar71xx: set a reserved bit that resets to 1 when writing the address table control register on the ar7240 switch (should fix #10547 )
...
SVN-Revision: 29598
2011-12-22 05:43:53 +00:00
Gabor Juhos
36bc2c2c80
ar71xx: ag71xx: fix switch port setup for AR934X
...
SVN-Revision: 29554
2011-12-15 22:25:32 +00:00
Gabor Juhos
00667c3846
ar71xx: ag71xx: allow to connect PHY4 to the CPU on AR934X
...
SVN-Revision: 29553
2011-12-15 22:25:30 +00:00
Gabor Juhos
0540970345
ar71xx: ag71xx: setup switch interface mode on AR934X
...
SVN-Revision: 29552
2011-12-15 22:25:29 +00:00
Gabor Juhos
44014110b8
ar71xx: ag71xx: detect the built-in switch of the AR934X SoCs
...
SVN-Revision: 29551
2011-12-15 22:25:28 +00:00
Gabor Juhos
9ae65588d8
ar71xx: introduce ar71xx_switch_data
...
SVN-Revision: 29549
2011-12-15 22:25:11 +00:00
Gabor Juhos
b7d7481b07
ar71xx: ag71xx: check PHY IDs before accessing the switch registers
...
SVN-Revision: 29541
2011-12-15 13:25:23 +00:00
Gabor Juhos
0655552860
ar71xx: ag71xx: don't use port 4 of the switch, it is not connected on ar724x
...
SVN-Revision: 29540
2011-12-15 13:25:21 +00:00
Gabor Juhos
204fc6bed5
ar71xx: ag71xx: nuke ar7240sw_init
...
SVN-Revision: 29539
2011-12-15 13:25:20 +00:00
Gabor Juhos
d2316b2a45
ar71xx: ag71xx: add support for getting switch port link status
...
SVN-Revision: 29017
2011-11-13 11:27:04 +00:00
Gabor Juhos
34015ed6e8
ar71xx: ag71xx: remove unused mii_ctrl field from struct ag71xx
...
SVN-Revision: 29015
2011-11-13 11:27:01 +00:00
Gabor Juhos
2d882cff23
ar71xx: ag71xx: remove unused mii_cfg related functions and defines
...
SVN-Revision: 29014
2011-11-13 11:27:00 +00:00
Gabor Juhos
538a9493b9
ar71xx: set MII interface speed from the set_speed callbacks
...
SVN-Revision: 29013
2011-11-13 11:26:59 +00:00
Gabor Juhos
93cd46be13
ar71xx: rename set_pll callback to set_speed in ag71xx_platform_data
...
Also rename the corresponding callback functions.
SVN-Revision: 29012
2011-11-13 11:26:57 +00:00
Gabor Juhos
9579bb4267
ar71xx: ag71xx: remove MII interface setup code
...
SVN-Revision: 29011
2011-11-13 11:26:56 +00:00
Gabor Juhos
2f9e535e89
ar71xx: ag71xx: use fixed link parameters if the mii bus is not registered
...
SVN-Revision: 28977
2011-11-12 10:54:16 +00:00
Felix Fietkau
7a2efd8c28
ar71xx: remove dead code
...
SVN-Revision: 28851
2011-11-08 00:33:20 +00:00
Felix Fietkau
94309039b7
ar71xx: on ar7240, exclude ports from their own port vlan destination mask
...
SVN-Revision: 28850
2011-11-08 00:33:15 +00:00
Jonas Gorski
c674c874b7
ag71xx: close a race between the phy state machine and link state
...
A fast stop/start cycle could leave the ag71xx interrupts and tx engine
disabled when using a phy driver with a fixed link and the start/stop
happens between two phy state machine polls.
Prevent this by always forcing the link down on stop regardless of phy
state and having a phy connected.
SVN-Revision: 28380
2011-10-08 11:37:14 +00:00
Felix Fietkau
1bdf65f580
ar71xx: fix register range check for DMA stuck checks (thx, Frédéric Moulins)
...
SVN-Revision: 28213
2011-09-11 17:44:12 +00:00
Felix Fietkau
12c84f8eeb
ar71xx: add some code to detect DMA stuck conditions on ar7240
...
SVN-Revision: 27975
2011-08-13 22:30:14 +00:00
Felix Fietkau
85ccc74e1b
ar71xx: on ar724x only reset the link status in the restart handler, the fast reset takes care of DMA stuck issues
...
SVN-Revision: 27973
2011-08-13 21:49:46 +00:00
Felix Fietkau
4b75394056
ar71xx: fix ethernet FIFO state corruption on ar7240
...
When starting/stopping DMA sometimes the FIFO state gets corrupted,
leading to wildly fluctuating latencies or packet data corruption.
Fix this by issuing a fast MAC reset as soon as the link is detected
as up. Fixes #9689 , #9405
SVN-Revision: 27896
2011-08-04 17:36:31 +00:00
Felix Fietkau
d2aeca6b6d
ag71xx: fix memory corruption issues on ar7240 on ethernet start/stop
...
When the DMA engine state gets corrupted due to a hardware issues, it
often won't stop rx until a full reset is issued. In that case the hardware
must keep a valid descriptor, otherwise it will write to random places in
system RAM, triggering random crashes. To fix this, keep a dummy descriptor
without a buffer that keeps the DMA engine in a sane state until the reset
is done
SVN-Revision: 27895
2011-08-04 17:36:27 +00:00
Felix Fietkau
500c3a1475
ar71xx: fix MAC/MDIO reset mask handling
...
SVN-Revision: 27894
2011-08-04 17:36:23 +00:00
Felix Fietkau
c7173a211d
ar71xx: reinitialize global switch settings after reset on ar7240
...
SVN-Revision: 27705
2011-07-20 14:39:47 +00:00
Felix Fietkau
ca473833c4
ar71xx: configure address aging on ar7240
...
SVN-Revision: 27704
2011-07-20 14:39:42 +00:00
Felix Fietkau
fefc79f3cb
ar71xx: reset the phy in the ethernet init on ar724x
...
SVN-Revision: 27703
2011-07-20 12:04:34 +00:00
Felix Fietkau
005fe5d1fd
ar71xx: make sure that rx and interrupts are disabled before issuing the hardware reset
...
SVN-Revision: 27702
2011-07-20 12:04:29 +00:00
Felix Fietkau
e7ab000008
ar71xx: increase the delay after the ethernet MAC reset
...
SVN-Revision: 27701
2011-07-20 12:04:25 +00:00
Felix Fietkau
255dcaa3a6
ar71xx: fix an unused variable warning
...
SVN-Revision: 27700
2011-07-20 12:04:20 +00:00
Felix Fietkau
f3d693c0ee
ar71xx: do not reset the hardware on transmit timeout - this would mess up the up the PHY state
...
SVN-Revision: 27568
2011-07-09 06:30:13 +00:00
Felix Fietkau
2806c75c07
ag71xx: keep the rx engine stopped while the link is not up, should hopefully fix stability issues from #9405
...
SVN-Revision: 27567
2011-07-09 06:29:46 +00:00
Felix Fietkau
31dd60689e
Revert "ar71xx: only enable the rx engine after the link is up..."
...
It messes up the DMA state when the link goes down
SVN-Revision: 27088
2011-06-01 18:15:43 +00:00
Gabor Juhos
60d5abbc27
ar71xx: ag71xx: make ring sizes configurable via ethtool
...
SVN-Revision: 27041
2011-05-31 22:53:10 +00:00
Gabor Juhos
7a2651f633
ar71xx: ag71xx: prepare to make ring sizes configurable
...
SVN-Revision: 27040
2011-05-31 22:53:09 +00:00
Gabor Juhos
669aba3871
ar71xx: ag71xx: nuke unused AG71XX_TX_FIFO_LEN define
...
Reported-by: Dave Täht <dave.taht@gmail.com>
SVN-Revision: 27039
2011-05-31 22:53:07 +00:00
Felix Fietkau
2b5402d128
ar71xx: only enable the rx engine after the link is up, fixes a race condition that got rx stuck when the interface is brought up during lots of inbound traffic (thx, matteo)
...
SVN-Revision: 27035
2011-05-30 23:08:01 +00:00
Felix Fietkau
0ebc93831f
ar71xx: disable flow control for ar724x, it can get stuck in a loop of continously sending MAC pause frames
...
SVN-Revision: 27034
2011-05-30 23:07:57 +00:00
Matteo Croce
4deecea26b
ar71xx: detect link on LAN ports
...
SVN-Revision: 26922
2011-05-17 11:12:56 +00:00
Matteo Croce
c0c2e18452
use correct macros and frame size in ag71xx
...
SVN-Revision: 26890
2011-05-14 23:10:06 +00:00
Gabor Juhos
5d77f370d6
ar71xx: ag71xx: make switch register access atomic
...
Reading of the PHY registers occasionally returns with bogus values
under heavy load. This misleads the PHY driver and thus causes false
link/speed change notifications which leads to performance loss.
This is easily noticable during an iperf session:
...
[ 3] 52.0-53.0 sec 11.3 MBytes 94.4 Mbits/sec
[ 3] 53.0-54.0 sec 11.4 MBytes 95.4 Mbits/sec
eth1: link down
br-lan: port 2(eth1) entering forwarding state
eth1: link up (100Mbps/Full duplex)
br-lan: port 2(eth1) entering forwarding state
br-lan: port 2(eth1) entering forwarding state
[ 3] 54.0-55.0 sec 6.75 MBytes 56.6 Mbits/sec
[ 3] 55.0-56.0 sec 0.00 Bytes 0.00 bits/sec
[ 3] 56.0-57.0 sec 10.5 MBytes 88.1 Mbits/sec
...
[ 3] 169.0-170.0 sec 11.4 MBytes 95.4 Mbits/sec
[ 3] 170.0-171.0 sec 11.4 MBytes 95.4 Mbits/sec
eth1: link up (10Mbps/Half duplex)
[ 3] 171.0-172.0 sec 7.63 MBytes 64.0 Mbits/sec
[ 3] 172.0-173.0 sec 9.38 MBytes 78.6 Mbits/sec
eth1: link up (100Mbps/Full duplex)
[ 3] 173.0-174.0 sec 11.3 MBytes 94.4 Mbits/sec
[ 3] 174.0-175.0 sec 11.4 MBytes 95.4 Mbits/sec
SVN-Revision: 26856
2011-05-08 16:32:53 +00:00
Gabor Juhos
3711658281
ar71xx: ag71xx: fix section mismatch warnings
...
The function __devinit ag71xx_probe() references
a function __devexit ag71xx_phy_disconnect().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
ag71xx_phy_disconnect() so it may be used outside an exit section.
The function ag71xx_phy_disconnect() references a function in an exit
section.
Often the function ag71xx_ar7240_cleanup() has valid usage outside the
exit section
and the fix is to remove the __devexit annotation of
ag71xx_ar7240_cleanup.
SVN-Revision: 26855
2011-05-08 13:30:36 +00:00
Gabor Juhos
ef53029870
ar71xx: ag71xx: fix build error if debugfs is enabled
...
SVN-Revision: 26854
2011-05-08 13:30:26 +00:00
Gabor Juhos
8b67d748cb
ar71xx: ag71xx: add debugfs entry for [rt]x_ring
...
SVN-Revision: 26845
2011-05-07 12:40:34 +00:00
Gabor Juhos
2166432ba0
ar71xx: ag71xx: add timestamps to ag71xx_buf
...
SVN-Revision: 26844
2011-05-07 12:40:28 +00:00
Gabor Juhos
896e1d1ab4
ar71xx: ag71xx: use dynamically allocated buffer for napi_stats
...
SVN-Revision: 26843
2011-05-07 12:40:26 +00:00
Gabor Juhos
a6708d20d1
ar71xx: ag71xx: use debugfs_remove_recursive
...
SVN-Revision: 26842
2011-05-07 12:40:25 +00:00
Felix Fietkau
41ee4a283c
ar71xx: only allow internal access to the ar7240 switch, export the MDIO bus behind the switch instead
...
SVN-Revision: 26393
2011-04-02 00:47:29 +00:00
Felix Fietkau
acbb3e50e7
ar71xx: frequent ethernet mac resets upset the MDIO bus on ar7240, so do not run them on every device open, only on tx timeouts
...
SVN-Revision: 26392
2011-04-02 00:47:25 +00:00
Gabor Juhos
3106aea40b
ar71xx: drivers/ag71xx: remove deprecated usage of IRQF_SAMPLE_RANDOM
...
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
SVN-Revision: 23982
2010-11-12 18:52:28 +00:00
Gabor Juhos
30ef7d55fc
ar71xx: use pr_* functions in drivers
...
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
SVN-Revision: 23981
2010-11-12 18:52:12 +00:00