Reboot at insmod of cf card driver
Lehmann, Hans (Ritter Elektronik)
hans.lehmann at ritter-elektronik.de
Fri Jan 25 00:07:16 EST 2008
Hi at all,
i have strange problems with my cf_card driver on our MPC5200b board. Because of our board schematic the cf card is mapped to memory space.
The interrupt is routed to IRQ1. IRQ1 is rising edge sensitive.
First the driver was written for Kernel 2.6.14 with device_driver structure and run pretty. Now i have ported it to Kernel 2.6.23 with of_platform_driver structure to get indepent of ppc.
Now my problem:
After I load my modul, the kernel start to reboot at command probe_hwif_init.
The failure occurs exatly in function "actual_try_to_identify" in ide-probe.c when kernel send the identify command to status/command register of ide device "(hwif->outb(cmd, DIE_COMMAND_REG);".
By accident I figured out that no reboot occurs when I change interrupt behauviour (level sensitive). But then several errors occured as followed:
root at RITTER_EL392:/lib/modules> insmod el392_cf_disk_drv.ko
[ 72.306114] IDE: EL392 IDE/ATA driver
[ 72.397169] Base address: d0000000, IO Size: 00020000
[ 72.413994] Memory remapped: 0xd0000000 -> 0xc5040000
[ 72.666923] cmd: 0x0ec , Adresse IDE_REG_COMMAND: 0xc5041006
[ 72.804238] hda: ELITE PRO CF CARD 1GB, CFA DISK drive
[ 73.126941] cmd: 0x0a1 , Adresse IDE_REG_COMMAND: 0xc5041006
[ 73.313920] cmd: 0x0a1 , Adresse IDE_REG_COMMAND: 0xc5041006
[ 73.503065] ide0 at 0xc5041008-0xc504100f,0xc504100f on irq 70
[ 73.521193] ------------[ cut here ]------------
[ 73.530365] Badness at c0105298 [verbose debug info unavailable]
[ 73.542244] NIP: c0105298 LR: c0104260 CTR: 00000000
[ 73.552071] REGS: c374dc30 TRAP: 0700 Not tainted (2.6.23.1-rt5-pcm030-1trunk)
[ 73.566867] MSR: 00029032 <EE,ME,IR,DR> CR: 84004484 XER: 00000000
[ 73.579487] TASK = c36d6000[231] 'insmod' THREAD: c374c000
[ 73.589988] GPR00: 00000001 c374dce0 c36d6000 c02c0ab0 c02396c4 c02bf9b4 c02395ec 00000242
[ 73.606564] GPR08: c36d6000 00000002 00000001 c02c05dc 84004484 100decc4 c50235a8 c3d0c280
[ 73.623139] GPR16: c5022e6c c5022e94 00000000 00000035 00000124 00000000 c5022ac4 c5022ebc
[ 73.639713] GPR24: c0048214 c02c0544 00000015 c028c49c c0240000 c0200000 00000000 c02c0a98
[ 73.656636] NIP [c0105298] kref_get+0xc/0x24
[ 73.665152] LR [c0104260] kobject_get+0x20/0x38
[ 73.674125] Call Trace:
[ 73.678955] [c374dce0] [c02c0428] 0xc02c0428 (unreliable)
[ 73.689660] [c374dcf0] [c01280b4] get_device+0x20/0x38
[ 73.699858] [c374dd00] [c0128f14] device_add+0x6c/0x518
[ 73.710214] [c374dd40] [c0144130] probe_hwif_init_with_fixup+0x80/0xb0
[ 73.723171] [c374dd60] [c5025304] el392_ata_probe+0x210/0x258 [el392_cf_disk_drv]
[ 73.738017] [c374dda0] [c015fc18] of_platform_device_probe+0x58/0x80
[ 73.750632] [c374ddc0] [c012b9ac] driver_probe_device+0xb8/0x1ec
[ 73.762543] [c374dde0] [c012bb64] __driver_attach+0x84/0x88
[ 73.773584] [c374de00] [c012ac88] bus_for_each_dev+0x58/0x94
[ 73.784798] [c374de30] [c012b7bc] driver_attach+0x24/0x34
[ 73.795495] [c374de40] [c012b0e4] bus_add_driver+0x98/0x1d8
[ 73.806536] [c374de60] [c012bd0c] driver_register+0x58/0xa0
[ 73.817577] [c374de70] [c000a0e0] of_register_platform_driver+0x28/0x38
[ 73.830709] [c374de80] [c5028024] el392_ata_init+0x24/0x78 [el392_cf_disk_drv]
[ 73.845022] [c374de90] [c0049550] sys_init_module+0x16c/0x14b0
[ 73.856604] [c374df40] [c000f670] ret_from_syscall+0x0/0x38
[ 73.867662] --- Exception: c01 at 0xff26d98
[ 73.875941] LR = 0x1002ebdc
[ 73.882143] Instruction dump:
[ 73.888009] 409e0010 7c8903a6 4e800421 38000001 7c030378 80010014 38210010 7c0803a6
[ 73.903381] 4e800020 80030000 7c000034 5400d97e <0f000000> 7d201828 31290001 7d20192d
[ 73.923415] Unable to handle kernel paging request for data at address 0x00000024
[ 73.945442] Faulting instruction address: 0xc00b8d08
[ 73.960258] stopped custom tracer.
[ 73.970940] Oops: Kernel access of bad area, sig: 11 [#1]
[ 73.981635] PREEMPT ritter_el392
[ 73.988015] Modules linked in: el392_cf_disk_drv
[ 73.997165] NIP: c00b8d08 LR: c00b8d04 CTR: 00000000
[ 74.006990] REGS: c374dbc0 TRAP: 0300 Not tainted (2.6.23.1-rt5-pcm030-1trunk)
[ 74.021787] MSR: 00009032 <EE,ME,IR,DR> CR: 24004442 XER: 00000000
[ 74.034404] DAR: 00000024, DSISR: 20000000
[ 74.042501] TASK = c36d6000[231] 'insmod' THREAD: c374c000
[ 74.053003] GPR00: c00b8d04 c374dc70 c36d6000 c029b248 00000004 00000000 00000000 00000380
[ 74.069578] GPR08: c36d6000 c02b0000 00000000 00000000 24004488 100decc4 c50235a8 c3d0c280
[ 74.086154] GPR16: c5022e6c c5022e94 00000000 00000035 00000124 00000000 c5022ac4 c5022ebc
[ 74.102730] GPR24: c0048214 c02c0544 c374dcc8 c374dc98 c02c04f0 00000000 c029b248 c374dc98
[ 74.119654] NIP [c00b8d08] sysfs_addrm_start+0x40/0xcc
[ 74.129883] LR [c00b8d04] sysfs_addrm_start+0x3c/0xcc
[ 74.139887] Call Trace:
[ 74.144717] [c374dc70] [c00b8d04] sysfs_addrm_start+0x3c/0xcc (unreliable)
[ 74.158347] [c374dc90] [c00b956c] create_dir+0x50/0xd8
[ 74.168530] [c374dcc0] [c00b962c] sysfs_create_dir+0x38/0x9c
[ 74.179739] [c374dce0] [c01044ac] kobject_shadow_add+0xb0/0x1c0
[ 74.191504] [c374dd00] [c0128f60] device_add+0xb8/0x518
[ 74.201874] [c374dd40] [c0144130] probe_hwif_init_with_fixup+0x80/0xb0
[ 74.214831] [c374dd60] [c5025304] el392_ata_probe+0x210/0x258 [el392_cf_disk_drv]
[ 74.229679] [c374dda0] [c015fc18] of_platform_device_probe+0x58/0x80
[ 74.242300] [c374ddc0] [c012b9ac] driver_probe_device+0xb8/0x1ec
[ 74.254211] [c374dde0] [c012bb64] __driver_attach+0x84/0x88
[ 74.265252] [c374de00] [c012ac88] bus_for_each_dev+0x58/0x94
[ 74.276466] [c374de30] [c012b7bc] driver_attach+0x24/0x34
[ 74.287164] [c374de40] [c012b0e4] bus_add_driver+0x98/0x1d8
[ 74.298205] [c374de60] [c012bd0c] driver_register+0x58/0xa0
[ 74.309247] [c374de70] [c000a0e0] of_register_platform_driver+0x28/0x38
[ 74.322380] [c374de80] [c5028024] el392_ata_init+0x24/0x78 [el392_cf_disk_drv]
[ 74.336693] [c374de90] [c0049550] sys_init_module+0x16c/0x14b0
[ 74.348276] [c374df40] [c000f670] ret_from_syscall+0x0/0x38
[ 74.359334] --- Exception: c01 at 0xff26d98
[ 74.367612] LR = 0x1002ebdc
[ 74.373816] Instruction dump:
[ 74.379683] 7c7f1b78 3bc9b248 90010024 38000000 7c9d2378 9003000c 90030004 90030008
[ 74.395056] 7fc3f378 909f0000 4813b041 3d20c02b <809d0024> 3ca0c00c 8069f5a4 38a5897c
Segmentation fault
root at RITTER_EL392:/lib/modules>
Thanks anybody for help.
Mit freundlichen Grüßen
Hans Lehmann
Dipl.-Ing. Elektrotechnik
RITTER Elektronik GmbH
Leverkuser Strasse 65
D-42897 Remscheid
Tel. +49 (0) 2191 - 67 32 40
Fax +49 (0) 2191 - 67 14 29
Email hans.lehmann at ritter-elektronik.de
Homepage www.ritter-elektronik.de
Geschäftsführer: Manfred A. Wagner, Dr. Uwe Baader
Sitz der Gesellschaft: Oberhausen
HRB 17168 Duisburg USt-ID DE 814009849
<<el392_cf_disk_drv.h>> <<el392_cf_disk_drv.c>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: el392_cf_disk_drv.h
Type: application/octet-stream
Size: 3511 bytes
Desc: el392_cf_disk_drv.h
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080124/aefe3aab/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: el392_cf_disk_drv.c
Type: application/octet-stream
Size: 5474 bytes
Desc: el392_cf_disk_drv.c
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080124/aefe3aab/attachment-0001.obj>
More information about the Linuxppc-dev
mailing list