android_kernel_xiaomi_sm8350/drivers
Maxime Bizon 3269bb63eb i2c-mv64xxx: Fix random oops at boot
I have a Marvell board which has the same i2c hw block than mv64xxx, so
I'm trying to use i2c-mv64xxx driver.

But I get the following random oops at boot:

Unable to handle kernel NULL pointer dereference at virtual address 00000002
Backtrace: 
[<c0397e4c>] (mv64xxx_i2c_intr+0x0/0x2b8) from [<c02879c4>] (__do_irq+0x4c/0x8c)
[<c0287978>] (__do_irq+0x0/0x8c) from [<c0287c0c>] (do_level_IRQ+0x68/0xc0)
 r8 = C0501E08  r7 = 00000005  r6 = C0501E08  r5 = 00000005
 r4 = C048BB78 
[<c0287ba4>] (do_level_IRQ+0x0/0xc0) from [<c02885f8>] (asm_do_IRQ+0x50/0x134)
 r6 = C0449C78  r5 = F1020000  r4 = FFFFFFFF 
[<c02885a8>] (asm_do_IRQ+0x0/0x134) from [<c02869c4>] (__irq_svc+0x24/0x100)
 r8 = C1CAC400  r7 = 00000005  r6 = 00000002  r5 = F1020000
 r4 = FFFFFFFF 
[<c0287efc>] (setup_irq+0x0/0x124) from [<c02880d0>] (request_irq+0xb0/0xd0)
 r7 = C041B2AC  r6 = C0397E4C  r5 = 00000000  r4 = 00000005
[<c0288020>] (request_irq+0x0/0xd0) from [<c03985f4>] (mv64xxx_i2c_probe+0x148/0x244)
[<c03984ac>] (mv64xxx_i2c_probe+0x0/0x244) from [<c038bedc>] (platform_drv_probe+0x20/0x24)


The oops is caused by a spurious interrupt that occurs when request_irq
is called. mv64xxx_i2c_fsm() tries to read drv_data->msg, which is NULL.

I noticed that hardware init is done after requesting irq. Thus any
pending irq from previous hardware usage may cause this.

The following patch fixes it:


Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-01-05 17:54:05 +01:00
..
acorn
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2006-12-22 18:46:56 -08:00
amba
ata [PATCH] libata: fix combined mode 2007-01-02 08:20:51 -08:00
atm [ATM] drivers/atm/fore200e.c: Cleanups. 2006-12-22 11:12:00 -08:00
base [PATCH] fix kernel-doc warnings in 2.6.20-rc1 2006-12-22 08:55:47 -08:00
block [PATCH] cciss: build with PROC_FS=n 2006-12-30 10:56:42 -08:00
bluetooth [PATCH] bluetooth: add support for another Kensington dongle 2006-12-20 11:29:29 -08:00
cdrom [PATCH] cdrom: set default timeout to 7 seconds 2007-01-03 17:32:54 -08:00
char Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2007-01-03 17:34:54 -08:00
clocksource
connector [CONNECTOR]: Replace delayed work with usual work queue. 2006-12-18 01:53:58 -08:00
cpufreq [CPUFREQ] Bug fix for acpi-cpufreq and cpufreq_stats oops on frequency change notification 2006-12-22 22:45:41 -05:00
crypto
dio
dma
edac
eisa
fc4
firmware
hid
hwmon
i2c i2c-mv64xxx: Fix random oops at boot 2007-01-05 17:54:05 +01:00
ide [PATCH] PIIX/SLC90E66: PIO mode fallback fix 2006-12-30 10:56:43 -08:00
ieee1394 ieee1394: sbp2: fix bogus dma mapping 2006-12-30 14:26:59 +01:00
infiniband [PATCH] IB/mthca: Fix FMR breakage caused by kmemdup() conversion 2006-12-30 10:55:55 -08:00
input [SPARC64]: Fix of_iounmap() region release. 2006-12-31 14:06:05 -08:00
isdn [PATCH] Call init_timer() for ISDN PPP CCP reset state timer 2006-12-22 14:31:24 -08:00
kvm [PATCH] kvm: fix GFP_KERNEL allocation in atomic section in kvm_dev_ioctl_create_vcpu() 2006-12-30 10:56:44 -08:00
leds
macintosh [PATCH] Fix compilation of via-pmu-backlight 2006-12-30 10:56:41 -08:00
mca
md [PATCH] md: fix a few problems with the interface (sysfs and ioctl) to md 2006-12-22 08:55:51 -08:00
media V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging 2006-12-27 14:23:58 -02:00
message [PATCH] fix kernel-doc warnings in 2.6.20-rc1 2006-12-22 08:55:47 -08:00
mfd
misc Pull platform-drivers into test branch 2006-12-20 02:52:17 -05:00
mmc
mtd [PATCH] SPI/MTD: mtd_dataflash oops prevention 2006-12-30 10:56:42 -08:00
net Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2006-12-29 10:03:54 -08:00
nubus
oprofile
parisc
parport
pci [PATCH] pci/probe: fix macro that confuses kernel-doc 2006-12-30 10:55:55 -08:00
pcmcia
pnp
ps3
rapidio
rtc
s390 [S390] cio: fix stsch_reset. 2006-12-28 00:35:36 +01:00
sbus
scsi [PATCH] powerpc iseries link error in allmodconfig 2006-12-30 10:55:54 -08:00
serial [SPARC64]: Fix of_iounmap() region release. 2006-12-31 14:06:05 -08:00
sh
sn
spi [PATCH] spi_s3c24xx_gpio: use right header 2006-12-30 10:56:43 -08:00
tc
telephony
usb [PATCH] make fn_keys work again on power/macbooks 2006-12-30 10:55:55 -08:00
video [SPARC64]: Fix of_iounmap() region release. 2006-12-31 14:06:05 -08:00
w1
zorro
Kconfig
Makefile