summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/ar8216.c
Commit message (Collapse)AuthorAgeFilesLines
...
* generic: ar8216: don't use 0 as default VID on AR8327Gabor Juhos2012-12-221-1/+3
| | | | | | | | VID0 is reserved for priority-tagged packets. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34862
* generic: ar8316: allow to configure port 6 via platform data on AR8327Gabor Juhos2012-12-221-17/+18
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34847
* generic: ar8216: rename cpuport_cfg to port0_cfg in ar8327_platform_dataGabor Juhos2012-12-221-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34846
* generic: ar8216: set delay values for SGMII mode on AR8327Gabor Juhos2012-11-231-0/+14
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34315
* generic: ar8216: introduce ar8216_mib_op helperGabor Juhos2012-11-221-26/+9
| | | | | | | | | | | | | The ar8216_mib_{capture,flush} functions are similar. Move the common code into a helper and use that from the original functions. This change also fixes a lockdep warning in ar8216_mib_flush. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34297
* generic: ar8216: fix port number check in 'ar8xxx_mib_work_func'Gabor Juhos2012-11-201-1/+3
| | | | | | | | Also add a WARN_ON to 'ar8216_mib_fetch_port_stat' Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34283
* generic: ar8216: remove an unblanced mutex_unlock callGabor Juhos2012-11-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following warning: [ 94.080000] [ 94.080000] ===================================== [ 94.080000] [ BUG: bad unlock balance detected! ] [ 94.080000] 3.3.8 #2 Tainted: G O [ 94.080000] ------------------------------------- [ 94.080000] swconfig/1220 is trying to release lock (&priv->mib_lock) at: [ 94.080000] [<801df8f4>] ar8216_sw_get_port_mib+0x138/0x16c [ 94.080000] but there are no more locks to release! [ 94.080000] [ 94.080000] other info that might help us debug this: [ 94.080000] 2 locks held by swconfig/1220: [ 94.080000] #0: (genl_mutex){+.+...}, at: [<80222430>] genl_rcv+0x14/0x34 [ 94.080000] #1: (&dev->sw_mutex){+.+...}, at: [<801da018>] swconfig_get_dev+0x88/0xb4 [ 94.080000] [ 94.080000] stack backtrace: [ 94.080000] Call Trace: [ 94.080000] [<8028dc58>] dump_stack+0x8/0x34 [ 94.080000] [<800a5128>] print_unlock_inbalance_bug+0xe0/0xfc [ 94.080000] [<800a82c0>] lock_release+0x18c/0x1c8 [ 94.080000] [<80292074>] __mutex_unlock_slowpath+0xd8/0x17c [ 94.080000] [<801df8f4>] ar8216_sw_get_port_mib+0x138/0x16c [ 94.080000] [<801db688>] swconfig_get_attr+0xbc/0x394 [ 94.080000] [<8022261c>] genl_rcv_msg+0x1cc/0x214 [ 94.080000] [<80221a18>] netlink_rcv_skb+0x6c/0xe8 [ 94.080000] [<80222440>] genl_rcv+0x24/0x34 [ 94.080000] [<80221370>] netlink_unicast+0x15c/0x22c [ 94.080000] [<8022175c>] netlink_sendmsg+0x240/0x2d0 [ 94.080000] [<801ef544>] sock_sendmsg+0x84/0x9c [ 94.080000] [<801f0648>] __sys_sendmsg+0x1cc/0x270 [ 94.080000] [<801f207c>] sys_sendmsg+0x48/0x7c [ 94.080000] [<8006ad78>] stack_done+0x20/0x40 [ 94.080000] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34282
* generic: ar8216: add missing locking callsGabor Juhos2012-11-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following lockdep warning: [ 19.160000] ------------[ cut here ]------------ [ 19.160000] WARNING: at drivers/net/phy/ar8216.c:322 ar8216_rmw+0x54/0xa4() [ 19.170000] Modules linked in: nf_defrag_ipv4 nf_conntrack ehci_hcd sd_mod pppox ipt_REJECT xt_TCPMSS ipt_LOG xt_comment xt_multip ort xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc ath9k(O) ath9k_common(O) at h9k_hw(O) ath(O) mac80211(O) usbcore usb_common scsi_mod nls_base crc7 crc_itu_t crc_ccitt cfg80211(O) compat(O) arc4 aes_generic cry pto_blkcipher cryptomgr aead crypto_hash crypto_algapi ledtrig_timer ledtrig_default_on leds_gpio gpio_button_hotplug(O) [ 19.210000] Call Trace: [ 19.220000] [<8028dc38>] dump_stack+0x8/0x34 [ 19.220000] [<80072da0>] warn_slowpath_common+0x78/0xa4 [ 19.230000] [<80072de4>] warn_slowpath_null+0x18/0x24 [ 19.230000] [<801de820>] ar8216_rmw+0x54/0xa4 [ 19.240000] [<801df460>] ar8216_mib_capture+0x70/0xd0 [ 19.240000] [<801df944>] ar8xxx_mib_work_func+0x34/0x98 [ 19.250000] [<80089a7c>] process_one_work+0x28c/0x460 [ 19.250000] [<8008a630>] worker_thread+0x22c/0x334 [ 19.260000] [<8008e544>] kthread+0x88/0x90 [ 19.260000] [<80065020>] kernel_thread_helper+0x10/0x18 [ 19.270000] [ 19.270000] ---[ end trace 22e9d696adfa6a08 ]--- Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34281
* generic: ar8216: add MIB counter support for the AR8216 switch as wellGabor Juhos2012-11-181-1/+49
| | | | | | | | Thanks to Jonas Gorski for the reference URL. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34245
* generic: ar8216: rename AR8216_*_STATS_* definesGabor Juhos2012-11-181-40/+40
| | | | | | | | | | | The names are misleading, those are only valid from AR8236. The AR8216 chip uses different offsets. Thanks to Jonas Gorski for the report. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34244
* generic ar8216: allow to read/reset MIB counters via swconfigGabor Juhos2012-11-181-7/+431
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34243
* generic: ar8216: use dynamically allocated private data in ar8216_probeGabor Juhos2012-11-181-3/+12
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34242
* generic: ar8216: start aneg on each PHY of the AR8327Gabor Juhos2012-07-051-1/+13
| | | | SVN-Revision: 32604
* generic: ar8216: allow to configure AR8327 LEDs via platform dataGabor Juhos2012-06-191-1/+22
| | | | SVN-Revision: 32456
* generic: ar8216: add revision specific PHY fixups for AR8327Gabor Juhos2012-05-291-8/+39
| | | | SVN-Revision: 32000
* generic: ar8216: replace chip_type field with chip_{ver,rev} in ar8216_privGabor Juhos2012-05-291-22/+25
| | | | SVN-Revision: 31999
* generic: ar8216: add chip_is_ar8{216,236,316,327} helpersGabor Juhos2012-05-291-8/+28
| | | | SVN-Revision: 31998
* kernel: rewrite the phy packet hook, put it in the network stack to avoid ↵Felix Fietkau2012-05-061-49/+17
| | | | | | having to keep non-upstream ethernet driver changes SVN-Revision: 31637
* ar8216: enable forwarding of multicast frames to the cpu port on ar8327 ↵Felix Fietkau2012-04-221-0/+1
| | | | | | (thx, SeG) SVN-Revision: 31441
* fixes breakage introduced in 776722ce36ac95877efb7fd771dde2f6ffc96433John Crispin2012-03-221-2/+2
| | | | SVN-Revision: 31054
* generic: ar8216: add support for the AR8327 chipGabor Juhos2012-03-181-2/+322
| | | | SVN-Revision: 31011
* generic: ar8216: allow to use more portsGabor Juhos2012-03-181-2/+3
| | | | SVN-Revision: 31010
* generic: ar8216: reorder chip specific functionsGabor Juhos2012-03-181-72/+72
| | | | SVN-Revision: 31009
* generic: ar8216: reorder switch_dev specific functionsGabor Juhos2012-03-181-218/+216
| | | | SVN-Revision: 31008
* generic: ar8216: use ar8216_sw_ prefix for switchdev related functionsGabor Juhos2012-03-181-29/+29
| | | | SVN-Revision: 31007
* generic: ar8216: use switch_dev->ports in for loopsGabor Juhos2012-03-181-6/+6
| | | | SVN-Revision: 31006
* generic: ar8216: add read_port_status field to ar8xxx_chipGabor Juhos2012-03-181-1/+11
| | | | SVN-Revision: 31005
* generic: ar8216: add init_globals field to ar8xxx_chipGabor Juhos2012-03-181-21/+30
| | | | SVN-Revision: 31004
* generic: ar8216: add caps field to ar8xxx_chipGabor Juhos2012-03-181-5/+19
| | | | SVN-Revision: 31003
* generic: ar8216: add vtu_load_vlan field to ar8xxx_chipGabor Juhos2012-03-181-4/+15
| | | | SVN-Revision: 31002
* generic: ar8216: add vtu_flush field to ar8xxx_chipGabor Juhos2012-03-181-1/+11
| | | | SVN-Revision: 31001
* generic: ar8216: add init_port field to ar8xxx_chipGabor Juhos2012-03-181-4/+22
| | | | SVN-Revision: 31000
* generic: ar8216: add setup_port field to ar8xxx_chipGabor Juhos2012-03-181-6/+7
| | | | SVN-Revision: 30999
* generic: ar8216: add hw_init field to ar8xxx_chipGabor Juhos2012-03-181-8/+7
| | | | SVN-Revision: 30998
* generic: ar8216: add a separate structure for chip specific stuffGabor Juhos2012-03-181-0/+16
| | | | | | Also add a hw_init function into that. SVN-Revision: 30997
* generic: ar8216: rename chip field of struct ar8216Gabor Juhos2012-03-181-20/+20
| | | | SVN-Revision: 30996
* generic: ar8216: move ar8216_id_chip functionGabor Juhos2012-03-181-52/+51
| | | | | | Also remove the inline annotation. SVN-Revision: 30995
* generic: ar8216: rename ar8216_ops to ar8216_sw_opsGabor Juhos2012-03-181-2/+2
| | | | SVN-Revision: 30994
* ar8216: fix a MTU related regressionFelix Fietkau2012-03-151-19/+29
| | | | | | | | Switch reset on AR8316 appears to clobber the MTU configuration register and possibly other global config registers. Move global configuration register init writes back to the reset callback. SVN-Revision: 30951
* generic: ar8216: merge multiple if statements in ar8216_hw_applyGabor Juhos2012-03-131-10/+4
| | | | SVN-Revision: 30928
* generic: ar8216: use usleep_range in ar8216_mii_{read,write}Gabor Juhos2012-03-111-2/+2
| | | | | | msleep(1) can sleep for up to 20ms. SVN-Revision: 30885
* generic: ar8216: add a helper function for writing PHY debug registersGabor Juhos2012-03-111-6/+15
| | | | SVN-Revision: 30884
* generic: ar8216: add lockep assertion to ar8216_rmwGabor Juhos2012-03-111-0/+3
| | | | SVN-Revision: 30883
* generic: ar8216: coding style cleanupGabor Juhos2012-03-081-23/+24
| | | | SVN-Revision: 30857
* generic: ar8216: don't use static variable in ar8236_hw_initGabor Juhos2012-03-081-3/+2
| | | | SVN-Revision: 30856
* generic: ar8216: move register inititalization into hw_initGabor Juhos2012-03-081-18/+25
| | | | SVN-Revision: 30855
* generic: ar8216: set chip type directly in ar8216_id_chipGabor Juhos2012-03-081-14/+18
| | | | SVN-Revision: 30854
* generic: ar8216: simplify ar8216_config_initGabor Juhos2012-03-081-22/+15
| | | | SVN-Revision: 30853
* generic: ar8216: move port initialization into a separate functionGabor Juhos2012-03-071-24/+31
| | | | SVN-Revision: 30848
* generic: ar8216: improve ar8216_wait_bit functionGabor Juhos2012-03-071-9/+14
| | | | SVN-Revision: 30847