aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/phy
AgeCommit message (Collapse)AuthorFilesLines
2012-02-23irq_domain/x86: Convert x86 (embedded) to use common irq_domainGrant Likely1-2/+2
This patch removes the x86-specific definition of irq_domain and replaces it with the common implementation. Signed-off-by: Grant Likely <[email protected]> Acked-by: Sebastian Andrzej Siewior <[email protected]> Cc: Rob Herring <[email protected]> Cc: Thomas Gleixner <[email protected]>
2012-02-13drivers/net: Remove boolean comparisons to true/falseJoe Perches1-4/+2
Booleans should not be compared to true or false but be directly tested or tested with !. Done via cocci script: @@ bool t; @@ - t == true + t @@ bool t; @@ - t != true + !t @@ bool t; @@ - t == false + !t @@ bool t; @@ - t != false + t Signed-off-by: Joe Perches <[email protected]> Reviewed-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-02Merge 3.3-rc2 into the driver-core-next branch.Greg Kroah-Hartman1-3/+2
This was done to resolve a merge and build problem with the drivers/acpi/processor_driver.c file. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-01-24Remove useless get_driver()/put_driver() callsAlan Stern1-5/+1
As part of the removal of get_driver()/put_driver(), this patch (as1512) gets rid of various useless and unnecessary calls in several drivers. In some cases it may be desirable to pin the driver by calling try_module_get(), but that can be done later. Signed-off-by: Alan Stern <[email protected]> CC: "David S. Miller" <[email protected]> CC: Konrad Rzeszutek Wilk <[email protected]> CC: Michael Buesch <[email protected]> CC: Joerg Roedel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-01-22kernel-doc: fix new warning in net/phy/mdio_bus.cRandy Dunlap1-3/+2
Fix new kernel-doc warning: Warning(drivers/net/phy/mdio_bus.c:49): No description found for parameter 'size' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-12dp83640: Fix NOHZ local_softirq_pending 08 warningManfred Rudigier1-1/+1
Similar problem as in 481a8199142c050b72bff8a1956a49fd0a75bbe0 ("can: fix NOHZ local_softirq_pending 08 warning"). This fix replaces netif_rx() with netif_rx_ni() which has to be used from process/softirq context. Signed-off-by: Manfred Rudigier <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-12phylib: introduce mdiobus_alloc_size()Timur Tabi1-5/+19
Introduce function mdiobus_alloc_size() as an alternative to mdiobus_alloc(). Most callers of mdiobus_alloc() also allocate a private data structure, and then manually point bus->priv to this object. mdiobus_alloc_size() combines the two operations into one, which simplifies memory management. The original mdiobus_alloc() now just calls mdiobus_alloc_size(0). Signed-off-by: Timur Tabi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-10mdio-octeon: use an unique MDIO bus name.Florian Fainelli1-1/+2
Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-10mdio-gpio: use an unique MDIO bus name.Florian Fainelli1-1/+1
Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-10phy/fixed: use an unique MDIO bus name.Florian Fainelli1-1/+1
Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-03net: phy: smsc: Move SMSC PHY constants to <linux/smscphy.h>Javier Martinez Canillas1-20/+1
SMSC generation 4 LAN chips integrate an IEEE 802.3 ethernet physical layer. The ethernet driver for this family of devices needs to access the SMSC PHY registers and bit-fields. So, this patch moves these constants to a place where it can be used for both the PHY and LAN drivers. Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-19phy: Micrel KS8995MA 5-ports 10/100 managed Ethernet switch support addedFrederic LAMBERT3-0/+380
Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: Frederic Lambert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Conflicts: net/ipv4/inet_diag.c
2011-11-26net: Revert ARCNET and PHYLIB to tristate optionsBen Hutchings1-1/+1
commit 88491d8103498a6166f70d5999902fec70924314 ("drivers/net: Kconfig & Makefile cleanup") changed the type of these options to bool, but they select code that could (and still can) be built as modules. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-21net: Change mii to ethtool advertisement function namesMatt Carlson1-2/+2
This patch implements advice by Ben Hutchings to change the mii side of the function names to look more like the register whose values they convert. New LPA translation functions have been added as well. Signed-off-by: Matt Carlson <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-16net: Add ethtool to mii advertisment conversion helpersMatt Carlson1-17/+3
Translating between ethtool advertisement settings and MII advertisements are common operations for ethernet drivers. This patch adds a set of helper functions that implements the conversion. The patch then modifies a couple of the drivers to use the new functions. Signed-off-by: Matt Carlson <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-15mdio-gpio: Add reset functionality to mdio-gpio driver(v2).Srinivas Kandagatla2-0/+10
This patch adds phy reset functionality to mdio-gpio driver. Now mdio_gpio_platform_data has new member as function pointer which can be filled at the bsp level for a callback from phy infrastructure. Also the mdio-bitbang driver fills-in the reset function of mii_bus structure. Without this patch the bsp level code has to takecare of the reseting PHY's on the bus, which become bit hacky for every bsp and phy-infrastructure is ignored aswell. Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-31drivers/net: Add module.h to drivers who were implicitly using itPaul Gortmaker1-0/+1
The device.h header was including module.h, making it present for most of these drivers. But we want to clean that up. Call out the include of module.h in the modular network drivers. Signed-off-by: Paul Gortmaker <[email protected]>
2011-10-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds6-69/+287
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits) dp83640: free packet queues on remove dp83640: use proper function to free transmit time stamping packets ipv6: Do not use routes from locally generated RAs |PATCH net-next] tg3: add tx_dropped counter be2net: don't create multiple RX/TX rings in multi channel mode be2net: don't create multiple TXQs in BE2 be2net: refactor VF setup/teardown code into be_vf_setup/clear() be2net: add vlan/rx-mode/flow-control config to be_setup() net_sched: cls_flow: use skb_header_pointer() ipv4: avoid useless call of the function check_peer_pmtu TCP: remove TCP_DEBUG net: Fix driver name for mdio-gpio.c ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces ipv4: fix ipsec forward performance regression jme: fix irq storm after suspend/resume route: fix ICMP redirect validation net: hold sock reference while processing tx timestamps tcp: md5: add more const attributes Add ethtool -g support to virtio_net ... Fix up conflicts in: - drivers/net/Kconfig: The split-up generated a trivial conflict with removal of a stale reference to Documentation/networking/net-modules.txt. Remove it from the new location instead. - fs/sysfs/dir.c: Fairly nasty conflicts with the sysfs rb-tree usage, conflicting with Eric Biederman's changes for tagged directories.
2011-10-25Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (59 commits) MAINTAINERS: linux-m32r is moderated for non-subscribers [email protected] is moderated for non-subscribers Drop default from "DM365 codec select" choice parisc: Kconfig: cleanup Kernel page size default Kconfig: remove redundant CONFIG_ prefix on two symbols cris: remove arch/cris/arch-v32/lib/nand_init.S microblaze: add missing CONFIG_ prefixes h8300: drop puzzling Kconfig dependencies MAINTAINERS: [email protected] is moderated for non-subscribers tty: drop superfluous dependency in Kconfig ARM: mxc: fix Kconfig typo 'i.MX51' Fix file references in Kconfig files aic7xxx: fix Kconfig references to READMEs Fix file references in drivers/ide/ thinkpad_acpi: Fix printk typo 'bluestooth' bcmring: drop commented out line in Kconfig btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888' doc: raw1394: Trivial typo fix CIFS: Don't free volume_info->UNC until we are entirely done with it. treewide: Correct spelling of successfully in comments ...
2011-10-24dp83640: free packet queues on removeRichard Cochran1-0/+7
If the PHY should disappear (for example, on an USB Ethernet MAC), then the driver would leak any undelivered time stamp packets. This commit fixes the issue by calling the appropriate functions to free any packets left in the transmit and receive queues. The driver first appeared in v3.0. Signed-off-by: Richard Cochran <[email protected]> Acked-by: Eric Dumazet <[email protected]> Cc: <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-24dp83640: use proper function to free transmit time stamping packetsRichard Cochran1-2/+2
The previous commit enforces a new rule for handling the cloned packets for transmit time stamping. These packets must not be freed using any other function than skb_complete_tx_timestamp. This commit fixes the one and only driver using this API. The driver first appeared in v3.0. Signed-off-by: Richard Cochran <[email protected]> Acked-by: Eric Dumazet <[email protected]> Cc: <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-24Merge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
2011-10-24net: Fix driver name for mdio-gpio.cDirk Eibach1-1/+1
Since commit "7488876... dt/net: Eliminate users of of_platform_{,un}register_driver" there are two platform drivers named "mdio-gpio" registered. I renamed the of variant to "mdio-ofgpio". Signed-off-by: Dirk Eibach <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-19phylib: Modify Vitesse RGMII skew settingsAndy Fleming1-12/+22
The Vitesse driver was using the RGMII_ID interface type to determine if skew was necessary. However, we want to move away from using that interface type, as it's really a property of the board's PHY connection. However, some boards depend on it, so we want to support it, while allowing new boards to use the more flexible "fixups" approach. To do this, we extract the code which adds skew into its own function, and call that function when RGMII_ID has been selected. Another side-effect of this change is that if your PHY has skew set already, it doesn't clear it. This way, the fixup code can modify the register without config_init then clearing it. Signed-off-by: Andy Fleming <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-18net/phy: extra delay only for RGMII interfaces for IC+ IP 1001Giuseppe CAVALLARO1-5/+8
The extra delay of 2ns to adjust RX clock phase is actually needed in RGMII mode. Tested on the HDK7108 (STx7108c2). Signed-off-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-07Merge branch 'master' of github.com:davem330/netDavid S. Miller1-2/+2
Conflicts: net/batman-adv/soft-interface.c
2011-09-30netdev/phy/icplus: Use mdiobus_write() and mdiobus_read() for proper locking.David Daney1-7/+7
Usually you have to take the bus lock. Why not here too? I saw this when working on something else. Not even compile tested. Signed-off-by: David Daney <[email protected]> Cc: Greg Dietsche <[email protected]> Cc: "Uwe Kleine-Konig" <[email protected]> Cc: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-30netdev/phy: Use mdiobus_read() so that proper locks are taken.David Daney1-2/+2
Accesses to the mdio busses must be done with the mdio_lock to ensure proper operation. Conveniently we have the helper function mdiobus_read() to do that for us. Lets use it in get_phy_id() instead of accessing the bus without the lock held. Signed-off-by: David Daney <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-29dp83640: reduce driver noiseRichard Cochran1-2/+2
The driver has two warning messages that might be triggered by normal use cases. When they appear, the messages give the impression of a never ending series of errors. This commit changes them to debug messages instead. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-27treewide: Correct spelling of successfully in commentsJoe Perches1-1/+1
Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-09-26dp83640: add time stamp insertion for sync messagesRichard Cochran1-13/+57
This commit adds one step support to the phyter. When enabled, the hardware does not provide time stamps for transmitted sync messages but instead inserts the stamp into the outgoing packet. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-26dp83640: enable six external events and one periodic outputRichard Cochran1-19/+116
This patch enables six external event channels and one periodic output. One GPIO is reserved for synchronizing multiple PHYs. The assignment of GPIO functions can be changed via a module parameter. The code supports multiple simultaneous events by inducing a PTP clock event for every channel marked in the PHY's extended status word. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-22Merge branch 'master' of github.com:davem330/netDavid S. Miller1-6/+11
Conflicts: MAINTAINERS drivers/net/Kconfig drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c drivers/net/ethernet/broadcom/tg3.c drivers/net/wireless/iwlwifi/iwl-pci.c drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c drivers/net/wireless/rt2x00/rt2800usb.c drivers/net/wireless/wl12xx/main.c
2011-09-20net/phy: add IC+ IP101A and support APS.Giuseppe CAVALLARO1-11/+68
This patch adds the IC+ IP101A Single port 10/100 PHY and supports the APS (i.e. power saving mode while link is down) for both IP1001 and IP101A (where this mode is supported). Signed-off-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-27drivers/net: Kconfig & Makefile cleanupJeff Kirsher1-1/+1
The is does a general cleanup of the drivers/net/ Kconfig and Makefile. This patch create a "core" option and places all the networking core drivers into this option (default is yes for this option). In addition, it alphabitizes the Kconfig driver options. As a side cleanup, found that the arcnet, token ring, and PHY Kconfig options were a tri-state option and should have been a bool option. Signed-off-by: Jeff Kirsher <[email protected]>
2011-08-26net/phy: fix DP83865 phy interrupt handlerGiuseppe CAVALLARO1-6/+11
According to the DP83865 datasheet we need to clear the interrupt status bit by writing a 1 to the corresponding bit in INT_CLEAR (2:0 are reserved). Proposed and tested by Thorsten. Signed-off-by: Thorsten Schubert <[email protected]> Signed-off-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-07dp83640: increase receive time stamp buffer sizeRichard Cochran1-3/+2
The dp83640 buffers receive time stamps from special PHY status frames, matching them to received PTP packets in a work queue. Because the timeout for orphaned time stamps is so long and the buffer is so small, the driver can drop time stamps under moderate PTP traffic. This commit fixes the issue by decreasing the timeout to (at least) one timer tick and increasing the buffer size. Signed-off-by: Richard Cochran <[email protected]> Cc: <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-26atomic: use <linux/atomic.h>Arun Sharma1-1/+1
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: David Miller <[email protected]> Cc: Eric Dumazet <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-06-20Merge branch 'master' of ↵David S. Miller2-7/+18
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-agn-rxon.c drivers/net/wireless/rtlwifi/pci.c net/netfilter/ipvs/ip_vs_core.c
2011-06-17net: icplus: remove unnecessary codeGreg Dietsche1-5/+1
Compile tested. remove unnecessary code that matches this coccinelle pattern if (...) return ret; return ret; Signed-off-by: Greg Dietsche <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-06-16dp83640: drop PHY status frames in the driver.Richard Cochran1-2/+2
The dp83640 PHY provides time stamp and other information via special PHY status frames. Previously, the driver decoded the frames and then let the network stack drop them. This works fine when the PTP messages come over UDP. However, when receiving PTP messages via L2 packets, this creates a problem. The status frames use the official PTP destination MAC address, and so they are delivered to user space along with the "real" frames, causing confusion for applications. This commit fixes the issue by simply dropping the PHY status frames in the driver. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-06-16dp83640: fix phy status frame event parsingRichard Cochran1-5/+15
If two eternal time stamp events occur at nearly the same time, the phyter will add an extra word into the status frame. This commit fixes the parsing code to recognize and skip over the extra word. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-06-16phylib: Allow BCM63XX PHY to be selected only on BCM63XX.Ralf Baechle1-0/+1
This PHY is available integrated into BCM63xx series SOCs only. Signed-off-by: Ralf Baechle <[email protected]> drivers/net/phy/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Acked-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-23ptp: Fix dp83640 build warning when building staticallyJohn Stultz1-1/+1
If the dp83640 driver is not built as a module, the MODULE_DEVICE_TABLE reference to dp83640_tbl nops out. Since the table isn't referenced elsewhere, it it causes the following warning: drivers/net/phy/dp83640.c:1095: warning: ‘dp83640_tbl’ defined but not used This apparently is common with mdio_device_id table structures, and is avoided by using __maybe_unused annotation. Signed-off-by: John Stultz <[email protected]>
2011-05-23ptp: Added a clock driver for the National Semiconductor PHYTER.Richard Cochran3-0/+1368
This patch adds support for the PTP clock found on the DP83640. The basic clock operations and one external time stamp have been implemented. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: John Stultz <[email protected]>
2011-04-29ethtool: cosmetic: Use ethtool ethtool_cmd_speed APIDavid Decotigny1-1/+1
This updates the network drivers so that they don't access the ethtool_cmd::speed field directly, but use ethtool_cmd_speed() instead. For most of the drivers, these changes are purely cosmetic and don't fix any problem, such as for those 1GbE/10GbE drivers that indirectly call their own ethtool get_settings()/mii_ethtool_gset(). The changes are meant to enforce code consistency and provide robustness with future larger throughputs, at the expense of a few CPU cycles for each ethtool operation. All drivers compiled with make allyesconfig ion x86_64 have been updated. Tested: make allyesconfig on x86_64 + e1000e/bnx2x work Signed-off-by: David Decotigny <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-29ethtool: Use full 32 bit speed range in ethtool's set_settingsDavid Decotigny1-4/+6
This makes sure the ethtool's set_settings() callback of network drivers don't ignore the 16 most significant bits when ethtool calls their set_settings(). All drivers compiled with make allyesconfig on x86_64 have been updated. Signed-off-by: David Decotigny <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-07Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6Linus Torvalds1-2/+2
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6: Fix common misspellings
2011-03-31Fix common misspellingsLucas De Marchi1-2/+2
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <[email protected]>