linux_dsm_epyc7002/drivers
Fabio Estevam e2f8d555ec net: fec: Fix division by zero
commit 7f7d6c282 (net: fec: Ensure that initialization is done prior to
request_irq()) placed fec_ptp_init() into a point that ptp clock was not
available, which causes a division by zero in fec_ptp_start_cyclecounter():

[   17.895723] Division by zero in kernel.
[   17.899571] Backtrace:
[   17.902094] [<80012564>] (dump_backtrace+0x0/0x10c) from [<8056deec>]
(dump_stack+0x18/0x1c)
[   17.910539]  r6:bfba8500 r5:8075c950 r4:bfba8000 r3:bfbd0000
[   17.916284] [<8056ded4>] (dump_stack+0x0/0x1c) from [<80012688>]
(__div0+0x18/0x20)
[   17.923968] [<80012670>] (__div0+0x0/0x20) from [<802829c4>] (Ldiv0+0x8/0x10)
[   17.931140] [<80398534>] (fec_ptp_start_cyclecounter+0x0/0x110) from
[<80394f64>] (fec_restart+0x6c8/0x754)
[   17.940898] [<8039489c>] (fec_restart+0x0/0x754) from [<803969a0>]
(fec_enet_adjust_link+0xdc/0x108)
[   17.950046] [<803968c4>] (fec_enet_adjust_link+0x0/0x108) from [<80390bc4>]
(phy_state_machine+0x178/0x534)
...

Fix this by rearraging the code so that fec_ptp_init() is called only after
the clocks have been properly acquired.

Tested on both mx53 and mx6 platforms.

Reported-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-22 15:10:19 -05:00
..
accessibility
acpi ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
amba
ata ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
atm atm/iphase: rename fregt_t -> ffreg_t 2013-02-08 14:22:05 -05:00
auxdisplay
base ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
bcma Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-02-14 14:23:33 -05:00
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2013-02-20 14:27:00 -08:00
bluetooth
bus
cdrom
char Merge branch 'acpi-cleanup' 2013-02-15 13:58:30 +01:00
clk ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
clocksource
connector net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
cpufreq Merge branch 'pm-cpufreq' 2013-02-17 14:38:13 +01:00
cpuidle
crypto
dca
devfreq
dio
dma
edac EDAC updates for 3.9 2013-02-20 11:28:50 -08:00
eisa
extcon
firewire
firmware
gpio Device tree changes for v3.9 2013-02-20 11:04:46 -08:00
gpu Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile into akpm 2013-02-12 15:13:42 -08:00
hid
hsi
hv x86, hyperv: HYPERV depends on X86_LOCAL_APIC 2013-02-12 17:46:23 -08:00
hwmon ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
hwspinlock
i2c
ide
idle intel_idle: export both C1 and C1E 2013-02-13 18:22:08 -05:00
iio
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
input ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
iommu Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-19 19:07:27 -08:00
ipack
irqchip
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-02-20 18:58:50 -08:00
leds
lguest
macintosh
mailbox
md
media Revert "[media] dvb_frontend: return -ENOTTY for unimplement IOCTL" 2013-02-15 12:11:23 -08:00
memory
memstick
message
mfd - Four new drivers: 2013-02-20 10:19:07 -08:00
misc x86, uv, uv3: Check current gru hub support for SGI UV3 2013-02-11 17:18:19 -08:00
mmc Merge branches 'fixes' and 'mmci' into for-linus 2013-02-20 14:35:45 +00:00
mtd
net net: fec: Fix division by zero 2013-02-22 15:10:19 -05:00
nfc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2013-02-18 13:47:13 -05:00
nubus
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-02-20 18:58:50 -08:00
oprofile
parisc
parport
pci ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
pcmcia
pinctrl These are the main pinctrl changes for the v3.9 merge window: 2013-02-20 09:23:30 -08:00
platform ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
pnp
power - Four new drivers: 2013-02-20 10:19:07 -08:00
pps
ps3
ptp
pwm
rapidio
regulator Merge remote-tracking branch 'regulator/topic/tps65090' into regulator-next 2013-02-19 12:43:12 +00:00
remoteproc
rpmsg
rtc Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-19 19:05:45 -08:00
s390
sbus
scsi
sfi
sh
sn
spi Device tree changes for v3.9 2013-02-20 11:04:46 -08:00
ssb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-02-14 14:23:33 -05:00
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-02-20 18:58:50 -08:00
target
tc
thermal
tty Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-02-20 11:00:43 -08:00
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
uwb
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-09 07:55:24 +11:00
video ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
virt
virtio
vlynq
vme
w1
watchdog
xen ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
zorro
Kconfig
Makefile