aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/phy
AgeCommit message (Collapse)Author
2008-12-09phy: Add LSI ET1011C PHY driverChaithrika U S
Adds LSI ET1011C PHY driver. This driver is used by TI DM646x EVM. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28phy: add the ST ste10Xp PHYsGiuseppe Cavallaro
This patch adds the STMicroelectronics ste10xp PHY device driver. It supports both the ste100p and the ste101p devices. Suspend/resume alredy added. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28phy: Add file missed in previous commit.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28phy: power management supportGiuseppe Cavallaro
This patch adds the power management support into the physical abstraction layer. Suspend and resume functions respectively turns on/off the bit 11 into the PHY Basic mode control register. Generic PHY device starts supporting PM. In order to support the wake-on LAN and avoid to put in power down the PHY device, the MDIO is aware of what the Ethernet device wants to do. Voluntary, no CONFIG_PM defines were added into the sources. Also generic suspend/resume functions are exported to allow other drivers use them (such as genphy_config_aneg etc.). Within the phy_driver_register function, we need to remove the memset. It overrides the device driver owner and it is not good. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28phy: add natsemi PHY driverGiuseppe Cavallaro
This patch adds the PHY device driver for the National Semiconductor DP83865 Gig PHYTER. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/hp-plus.c drivers/net/wireless/ath5k/base.c drivers/net/wireless/ath9k/recv.c net/wireless/reg.c
2008-11-25phylib: Add Vitesse VSC8221 SGMII PHYTrent Piepho
PHY is mostly compatible with the existing VSC8244 PHY. The init sequence is different and the interrupt mask lacks some bits present in the VSC8244. Rather than making a copy of the existing VSC234x config_intr function and change one constant, I modify it to select the interrupt mask based on which driver is calling it. This lets it be used by both drivers. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21broadcom: Add 57780 supportMatt Carlson
This patch adds the 57780 PHY ID to the broadcom module. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20phy: fix phy_id detection also for broken hardware.Giuseppe Cavallaro
This patch fixes the case when the phy_ids is mostly Fs and in some case 0x0 due to broken hardware. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ixgbe/ixgbe_main.c include/net/mac80211.h net/phonet/af_phonet.c
2008-11-19phylib: Fix auto-negotiation restart avoidanceTrent Piepho
A previous patch, 51e2a3846eab18711f4eb59cd0a4c33054e2980a, made genphy_config_aneg() not restart aneg by calling genphy_restart_aneg() if the advertisement hadn't changed. But, genphy_restart_aneg() doesn't just restart aneg, it may also *enable* aneg or un-isolate the PHY from the MII (those functions are controlled by the same register). The code to avoid calling genphy_restart_aneg() didn't consider this. So, modify genphy_config_aneg() to also check if the PHY needs to have aneg enabled or be un-isolated before deciding not to restart aneg. This caused a problem with certain Davicom PHYs, as that driver isolates the PHY (why?) before calling genphy_config_aneg() and expects the PHY to be un-isolated by that function. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Reported-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-18Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
2008-11-16phylib: make mdio-gpio work without OF (v4)Paulius Zaleckas
make mdio-gpio work with non OpenFirmware gpio implementation. Aditional changes to mdio-gpio: - use gpio_request() and gpio_free() - place irq[] array in struct mdio_gpio_info - add module description, author and license - add note about compiling this driver as module - rename mdc and mdio function (were ugly names) - change MII to MDIO in bus name - add __init __exit to module (un)loading functions - probe fails if no phys added to the bus - kzalloc bitbang with sizeof(*bitbang) Changes since v3: - keep bus naming "%x" to be compatible with existing drivers. Changes since v2: - more #ifdefs reduction - platform driver will be registered on OF platforms also - unified platform and OF bus_id to phy%i Changes since v1: - removed NO_IRQ - reduced #idefs Laurent, please test this driver under OF. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-16phylib: rename mdio-ofgpio to mdio-gpioPaulius Zaleckas
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-16phy: fix phy address bugGiulio Benetti
PHYID returns 0xffff and not 0xffffffff when not found and in some case(at91sam9263) 0x0. Maybe this patch could be useful. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-15phy: Add support for Marvell 88E1118 PHYRon Madrid
This patch will add support for the Marvell 88E1118 PHY which supports gigabit ethernet among other things. Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-14phylib: fix premature freeing of struct mii_busLennert Buytenhek
Commit 46abc02175b3c246dd5141d878f565a8725060c9 ("phylib: give mdio buses a device tree presence") added a call to device_unregister() in a situation where the caller did not intend for the device to be freed yet, but apart from just unregistering the device from the system, device_unregister() does an additional put_device() that is intended to free it. The right function to use in this situation is device_del(), which unregisters the device from the system like device_unregister() does, but without dropping the reference count an additional time. Bug report from Bryan Wu <cooloney@kernel.org>. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Tested-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-11-10net: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-06SMSC LAN911x and LAN921x vendor driverSteve Glendinning
Attached is a driver for SMSC's LAN911x and LAN921x families of embedded ethernet controllers. There is an existing smc911x driver in the tree; this is intended to replace it. Dustin McIntire (the author of the smc911x driver) has expressed his support for switching to this driver. This driver contains workarounds for all known hardware issues, and has been tested on all flavours of the chip on multiple architectures. This driver now uses phylib, so this patch also adds support for the device's internal phy Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Bahadir Balban <Bahadir.Balban@arm.com> Signed-off-by: Dustin Mcintire <dustin@sensoria.com> Signed-off-by: Bill Gatliff <bgat@billgatliff.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-11-03broadcom: Add support for BCM50610Matt Carlson
This patch adds the BCM50610 to the list of phys supported by the broadcom driver. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03broadcom: Refine expansion register access routineMatt Carlson
This patch makes the expansion register access routines a little more formal. They will be used by the following bcm50610 support patch. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03broadcom: Add flow control supportMatt Carlson
This patch adds flow control support to Broadcom phys. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-16NET: convert the phy_device file to use bus_find_device_by_nameGreg Kroah-Hartman
The driver core now has this helper function, so might as well use it instead of forcing the phy code to roll their own version. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-13net: export genphy_restart_anegAdrian Bunk
This patch fixes the following build error caused by commit ed94493fb38a665cebcf750dfabe8a6dd13e136f (mv643xx_eth: convert to phylib): <-- snip --> ... Building modules, stage 2. MODPOST 1280 modules ERROR: "genphy_restart_aneg" [drivers/net/mv643xx_eth.ko] undefined! ... make[2]: *** [__modpost] Error 1 <-- snip --> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13net/phy: add missing kernel-docRandy Dunlap
Fix kernel-doc warning, missing description: Warning(lin2627-g3-kdocfixes//drivers/net/phy/mdio_bus.c:63): No description found for parameter 'd' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-09phylib: two dynamic mii_bus allocation fallout fixesLennert Buytenhek
1. arch/powerpc/platforms/pasemi/gpio_mdio.c also needs to be converted over to mdiobus_{alloc,free}(). 2. drivers/net/phy/fixed.c used to embed a struct mii_bus into its struct fixed_mdio_bus and then use container_of() to go from the former to the latter. Since mii bus structures are no longer embedded, we need to do something like use the mii bus private pointer to go from mii_bus to fixed_mdio_bus instead. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-08phylib: add mdiobus_{read,write}Lennert Buytenhek
Add mdiobus_{read,write} routines to allow direct reading/writing of registers on an mii bus without having to go through the PHY abstraction, and make phy_{read,write} use these primitives. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-08phylib: give mdio buses a device tree presenceLennert Buytenhek
Introduce the mdio_bus class, and give each 'struct mii_bus' its own 'struct device', so that mii_bus objects are represented in the device tree and can be found by querying the device tree. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-08phylib: move to dynamic allocation of struct mii_busLennert Buytenhek
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 <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Andy Fleming <afleming@freescale.com>
2008-10-08phylib: rename mii_bus::dev to mii_bus::parentLennert Buytenhek
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 <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Andy Fleming <afleming@freescale.com>
2008-10-08phylib: Wake PHY state machine on interruptTrent Piepho
This way the phy layer will respond to a change in phy state immediately, instead of up to one second later when the state machine timer runs. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-08PHY: Avoid unnecessary aneg restartsTrent Piepho
The PHY's aneg is configured and restarted whenever the link is brought up, e.g. when DHCP is started after the kernel has booted. This can take the link down for several seconds while auto-negotiation is redone. If the advertised features haven't changed, then it shouldn't be necessary to bring down the link and start auto-negotiation over again. genphy_config_advert() is enhanced to return 0 when the advertised features haven't been changed and >0 when they have been. genphy_config_aneg() then uses this information to not call genphy_restart_aneg() if there has been no change. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-08phylib: phy_mii_ioctl() fixesLennert Buytenhek
Make the SIOCGMIIPHY case fall through properly (it is supposed to not only return the ID of the default PHY but also to read from that PHY), and make phy_mii_ioctl() return the same error code as generic_mii_ioctl() in case of an unsupported operation. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19phylib: allow incremental scanning of an mii busLennert Buytenhek
This patch splits the bus scanning code in mdiobus_register() off into a separate function, and makes this function available for calling from external code. This allows incrementally scanning an mii bus, e.g. as information about which addresses are 'safe' to scan becomes available. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Andy Fleming <afleming@freescale.com>
2008-07-22net/phy: Fix 88e1111 copper/fiber selection in RGMII modeWang Jian
MII_M1111_HWCFG_FIBER_COPPER_RES is a bit of MII_M1111_PHY_EXT_SR, not MII_M1111_PHY_EXT_CR. Signed-off-by: Wang Jian <lark@linux.net.cn> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22net/phy: Fix copper/fiber auto-selection for 88e1111Wang Jian
The 27.15 bit (MII_M1111_HWCFG_FIBER_COPPER_AUTO) is disable bit. When set to 1, copper/fiber auto selection is disabled. The current code to enable but actually disable auto selection. Signed-off-by: Wang Jian <lark@linux.net.cn> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11Fix missing exports for net/phy/mdio-bitbang.cTakashi Iwai
{alloc,free}_mdio_bitbang() are not exported while they are used in mdio-ofgpio driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30net: OpenFirmware GPIO based MDIO bitbang driverLaurent Pinchart
This patch adds an MDIO bitbang driver that uses the GPIO library and its OF bindings to access the bus I/Os. Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-29Merge branch 'upstream-next-davem' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2008-05-22phylib: do EXPORT_SYMBOL on get_phy_idPaul Gortmaker
Commit cac1f3c8 factored out the code for get_phy_id so that it could be reused in multiple places. Turns out that some of the users can be modular, so we need to export this symbol as well. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-22PHYLIB: Kconfig: Complete the list of Broadcom PHYs supportedMaciej W. Rozycki
Add Broadcom PHYs supported missing from the description. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-22PHYLIB: Add 1000Base-X support for Broadcom bcm5482Nate Case
Configure the BCM5482S secondary SerDes for 1000Base-X mode when the appropriate dev_flags are passed in to phy_connect(). This is needed when the PHY is used for fiber and backplane connections. Signed-off-by: Nate Case <ncase@xes-inc.com> Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-22PHYLIB: Kconfig: Fix the dependency on S390Maciej W. Rozycki
PHYLIB was first marked as BROKEN on S390, then the enclosing menu marked as non-S390, then the two dependencies merged with the conversion to menuconfig. Reduce to non-S390. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-06phylib: Fix some sparse warningsAndy Fleming
Declared some things static, declared some things in the header. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29Add support for SMSC LAN8187 and LAN8700 PHYsSteve Glendinning
Add support for two additional SMSC PHY models with identical interrupt source and mask registers to the LAN83C185 Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29Rename SMSC phy functions to be more genericSteve Glendinning
Several models of SMSC PHY have the same interrupt status and mask registers as the LAN83C185, so these functions can service multiple different PHY drivers. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29drivers/net/phy: fix kernel-doc notationRandy Dunlap
Fix kernel-doc warning: Warning(linux-2.6.25-git11//drivers/net/phy/phy_device.c:275): No description found for parameter 'bus_id' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25phylib: Add support for board-level PHY fixupsAndy Fleming
Sometimes the specific interaction between the platform and the PHY requires special handling. For instance, to change where the PHY's clock input is, or to add a delay to account for latency issues in the data path. We add a mechanism for registering a callback with the PHY Lib to be called on matching PHYs when they are brought up, or reset. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17phylib: factor out get_phy_id from within get_phy_devicePaul Gortmaker
We were already doing what amounts to a get_phy_id from within get_phy_device, and rather than duplicate this for the TBIPA probing, we might as well just factor it out and make it available instead. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17PHY: add BCM5464 support to broadcom PHY driverPaul Gortmaker
The BCM5464 can be used with the current broadcom PHY driver by just adding the appropriate chip ID and using the existing support within. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>