kernel-ark/drivers
Eugene Surovegin 5bb96e9f24 ibm_emac: improved PHY support
Original patch is from Jeff Haran  <jharan@brocade.com> with my minor style
fixes. His comments follow:

The first problem was in the function that configures the PHY for
autonegotiation, genmii_setup_aneg(). The original code does a
read/modify/write of the autonegotiation advertizement register (reg 4),
followed by a read/modify/write of the control register (reg 0). While
the original code follows the proper procedure as per reading the IEEE
specs, what I found is that on at least one PHY model (National DP83843)
the read of the control register comes back with the soft reset bit set
(bit 15). Because of the read/modify/write operation, this causes the
write to write a 1 back to the reset bit, which initiates a software
reset of the PHY. This software reset causes the PHY to return to its
power up state which advertizes all modes of operation, thus negating
the write to the autoneg advertizement register. The modification is to
spin reading the control register until the soft reset bit is clear
before doing the modify/write.
The second problem was in the function that configures the PHY for
forced operation, genmii_setup_forced(). The original code initiates a
software reset operation via a write of a 1 to bit 15 of the control
register (reg 0), but then proceeds to do a second write to that same
register without waiting until that reset bit is cleared by the PHY
itself (which according to the IEEE specs indicates that the PHY reset
is complete). This is a violation of how one is supposed to use this
software reset feature of these PHYs and I believe was the cause of
mysterious, difficult to reproduce link failures that we've observed on
some of our systems that use this driver. The fix is to modify the
function so that it spins waiting for the reset bit to clear after doing
the soft reset and before doing the subsequent write.

Signed-off-by: Jeff Haran <jharan@brocade.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-17 20:43:14 -04:00
..
acorn
acpi acpi: fix potential call to a freed memory section. 2007-05-17 05:23:04 -07:00
amba
ata libata: track spindown status and skip spindown_compat if possible 2007-05-16 01:18:31 -04:00
atm Use menuconfig objects II - netdev/atm 2007-05-11 17:53:21 -04:00
auxdisplay [S390] Kconfig: refine depends statements. 2007-05-10 15:46:07 +02:00
base Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
block fix deadlock in loop.c 2007-05-13 09:44:05 -07:00
bluetooth [Bluetooth] Fix unintentional fall-through in HCI line discipline 2007-05-10 23:45:06 -07:00
cdrom
char Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2007-05-15 12:10:26 -07:00
clocksource
connector
cpufreq Add suspend-related notifications for CPU hotplug 2007-05-09 12:30:56 -07:00
crypto [S390] Kconfig: use common Kconfig files for s390. 2007-05-10 15:46:08 +02:00
dio
dma [S390] Kconfig: unwanted menus for s390. 2007-05-10 15:46:07 +02:00
edac [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
eisa
fc4
firewire missing mm.h in fw-ohci 2007-05-15 18:56:37 -07:00
firmware
hid USB HID: hiddev - fix race between hiddev_send_event() and hiddev_release() 2007-05-10 08:45:56 +02:00
hwmon Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2007-05-10 11:50:51 -07:00
i2c Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2007-05-10 11:50:51 -07:00
ide Use menuconfig objects: IDE 2007-05-16 00:51:46 +02:00
ieee1394 Merge branch 'juju' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2007-05-10 13:30:08 -07:00
infiniband Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2007-05-15 09:52:31 -07:00
input missing dependencies for USB drivers in input 2007-05-15 18:56:37 -07:00
isdn [S390] Kconfig: unwanted menus for s390. 2007-05-10 15:46:07 +02:00
kvm [S390] Kconfig: refine depends statements. 2007-05-10 15:46:07 +02:00
leds [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
macintosh Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 2007-05-09 15:41:31 -07:00
mca mca: add integrated device bus matching 2007-05-09 12:30:49 -07:00
md md: improve the is_mddev_idle test 2007-05-11 08:29:37 -07:00
media em28xx and ivtv should depend on PCI 2007-05-15 18:56:37 -07:00
message [S390] Kconfig: refine depends statements. 2007-05-10 15:46:07 +02:00
mfd [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
misc Pull misc-for-upstream into release branch 2007-05-10 04:06:12 -04:00
mmc pxamci: fix PXA27x MMC workaround for bad CRC with 136 bit response 2007-05-14 18:51:48 +02:00
mtd Remove SLAB_CTOR_CONSTRUCTOR 2007-05-17 05:23:04 -07:00
net ibm_emac: improved PHY support 2007-05-17 20:43:14 -04:00
nubus
oprofile
parisc
parport parport_pc needs dma-mapping.h 2007-05-16 21:19:15 -07:00
pci rpadlpar breakage - fallout of struct subsystem removal 2007-05-15 18:56:37 -07:00
pcmcia
pnp [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
ps3
rapidio
rtc rtc kconfig clarification 2007-05-17 05:23:05 -07:00
s390 [S390] Kconfig: use common Kconfig files for s390. 2007-05-10 15:46:08 +02:00
sbus [SPARC] SBUS: display7seg.c needs asm/io.h 2007-05-13 22:22:47 -07:00
scsi [SCSI]: Add help text for SCSI_ESP_CORE. 2007-05-13 23:52:14 -07:00
serial NS16550A: Restore HS settings in EXCR2 on resume 2007-05-17 05:25:49 -07:00
sh
sn
spi spi: fix spidev for >sizeof(long)/32 devices 2007-05-16 21:19:15 -07:00
tc
telephony [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
usb [ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors. 2007-05-11 21:07:54 +01:00
video Refine SCREEN_INFO sanity check for vgacon initialization 2007-05-17 05:23:04 -07:00
w1 [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
zorro
Kconfig
Makefile Merge branch 'juju' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2007-05-10 13:30:08 -07:00