Hi, Can somebody give me a pointer as to what i am possibly doing wrong. The module loads fine.. The module unloads fine.. But i get a "free free IRQ" on free_irq().. I do a cat /proc/interrupts .. I get an Oops.. Attached dmesg [1]I did an Oops trace down to vsprintf.c, using make EXTRA_CFLAGS="-g -Wa,-a,-ad" lib/vsprintf.o > lib/vsprintf.asm, but still couldn't find what the real bug is.
Thanks, Manu [1] dmesg_cat_int_kern_debug.txt
DEVPATH=/bus/pci/drivers/3c59x SUBSYSTEM=drivers [ 48.016174] 3c59x: Donald Becker and others. www.scyld.com/network/vortex.html [ 48.016183] 0000:02:0a.0: 3Com PCI 3c905C Tornado at 0xdc00. Vers LK1.1.19 [ 48.037817] kobject eth0: registering. parent: net, set: class_obj [ 48.037852] kobject_hotplug [ 48.037858] fill_kobj_path: path = '/class/net/eth0' [ 48.037863] fill_kobj_path: path = '/devices/pci0000:00/0000:00:1e.0/0000:02:0a.0' [ 48.037869] kobject_hotplug: /bin/true net seq=767 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/net/eth0 SUBSYSTEM=net [ 52.929876] kobject_hotplug [ 52.929885] fill_kobj_path: path = '/class/vc/vcs1' [ 52.929890] kobject_hotplug: /sbin/hotplug vc seq=768 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcs1 SUBSYSTEM=vc [ 52.930806] kobject vcs1: cleaning up [ 52.930814] kobject_hotplug [ 52.930820] fill_kobj_path: path = '/class/vc/vcsa1' [ 52.930825] kobject_hotplug: /sbin/hotplug vc seq=769 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcsa1 SUBSYSTEM=vc [ 52.931633] kobject vcsa1: cleaning up [ 52.960992] kobject vcs1: registering. parent: vc, set: class_obj [ 52.961012] kobject_hotplug [ 52.961019] fill_kobj_path: path = '/class/vc/vcs1' [ 52.961024] kobject_hotplug: /sbin/hotplug vc seq=770 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs1 SUBSYSTEM=vc [ 52.977237] kobject vcsa1: registering. parent: vc, set: class_obj [ 52.977254] kobject_hotplug [ 52.977261] fill_kobj_path: path = '/class/vc/vcsa1' [ 52.977266] kobject_hotplug: /sbin/hotplug vc seq=771 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa1 SUBSYSTEM=vc [ 53.027411] kobject vcs3: registering. parent: vc, set: class_obj [ 53.027438] kobject_hotplug [ 53.027445] fill_kobj_path: path = '/class/vc/vcs3' [ 53.027450] kobject_hotplug: /sbin/hotplug vc seq=772 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs3 SUBSYSTEM=vc [ 53.042249] kobject vcsa3: registering. parent: vc, set: class_obj [ 53.042268] kobject_hotplug [ 53.042274] fill_kobj_path: path = '/class/vc/vcsa3' [ 53.042280] kobject_hotplug: /sbin/hotplug vc seq=773 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa3 SUBSYSTEM=vc [ 53.057455] kobject_hotplug [ 53.057464] fill_kobj_path: path = '/class/vc/vcs3' [ 53.057469] kobject_hotplug: /sbin/hotplug vc seq=774 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcs3 SUBSYSTEM=vc [ 53.058354] kobject vcs3: cleaning up [ 53.058362] kobject_hotplug [ 53.058368] fill_kobj_path: path = '/class/vc/vcsa3' [ 53.058372] kobject_hotplug: /sbin/hotplug vc seq=775 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcsa3 SUBSYSTEM=vc [ 53.059174] kobject vcsa3: cleaning up [ 53.086977] kobject vcs3: registering. parent: vc, set: class_obj [ 53.086995] kobject_hotplug [ 53.087002] fill_kobj_path: path = '/class/vc/vcs3' [ 53.087007] kobject_hotplug: /sbin/hotplug vc seq=776 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs3 SUBSYSTEM=vc [ 53.102045] kobject vcsa3: registering. parent: vc, set: class_obj [ 53.102063] kobject_hotplug [ 53.102070] fill_kobj_path: path = '/class/vc/vcsa3' [ 53.102075] kobject_hotplug: /sbin/hotplug vc seq=777 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa3 SUBSYSTEM=vc [ 53.119860] kobject vcs2: registering. parent: vc, set: class_obj [ 53.119876] kobject_hotplug [ 53.119883] fill_kobj_path: path = '/class/vc/vcs2' [ 53.119888] kobject_hotplug: /sbin/hotplug vc seq=778 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs2 SUBSYSTEM=vc [ 53.134609] kobject vcsa2: registering. parent: vc, set: class_obj [ 53.134626] kobject_hotplug [ 53.134633] fill_kobj_path: path = '/class/vc/vcsa2' [ 53.134638] kobject_hotplug: /sbin/hotplug vc seq=779 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa2 SUBSYSTEM=vc [ 53.149755] kobject_hotplug [ 53.149764] fill_kobj_path: path = '/class/vc/vcs2' [ 53.149769] kobject_hotplug: /sbin/hotplug vc seq=780 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcs2 SUBSYSTEM=vc [ 53.150595] kobject vcs2: cleaning up [ 53.150603] kobject_hotplug [ 53.150609] fill_kobj_path: path = '/class/vc/vcsa2' [ 53.150614] kobject_hotplug: /sbin/hotplug vc seq=781 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcsa2 SUBSYSTEM=vc [ 53.151406] kobject vcsa2: cleaning up [ 53.179977] kobject vcs2: registering. parent: vc, set: class_obj [ 53.179994] kobject_hotplug [ 53.180001] fill_kobj_path: path = '/class/vc/vcs2' [ 53.180006] kobject_hotplug: /sbin/hotplug vc seq=782 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs2 SUBSYSTEM=vc [ 53.194865] kobject vcsa2: registering. parent: vc, set: class_obj [ 53.194882] kobject_hotplug [ 53.194889] fill_kobj_path: path = '/class/vc/vcsa2' [ 53.194894] kobject_hotplug: /sbin/hotplug vc seq=783 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa2 SUBSYSTEM=vc [ 53.211319] kobject vcs4: registering. parent: vc, set: class_obj [ 53.211336] kobject_hotplug [ 53.211342] fill_kobj_path: path = '/class/vc/vcs4' [ 53.211348] kobject_hotplug: /sbin/hotplug vc seq=784 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs4 SUBSYSTEM=vc [ 53.228170] kobject vcs5: registering. parent: vc, set: class_obj [ 53.228187] kobject_hotplug [ 53.228195] fill_kobj_path: path = '/class/vc/vcs5' [ 53.228200] kobject_hotplug: /sbin/hotplug vc seq=785 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs5 SUBSYSTEM=vc [ 53.244342] kobject vcs6: registering. parent: vc, set: class_obj [ 53.244359] kobject_hotplug [ 53.244366] fill_kobj_path: path = '/class/vc/vcs6' [ 53.244371] kobject_hotplug: /sbin/hotplug vc seq=786 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs6 SUBSYSTEM=vc [ 53.259735] kobject vcsa4: registering. parent: vc, set: class_obj [ 53.259752] kobject_hotplug [ 53.259759] fill_kobj_path: path = '/class/vc/vcsa4' [ 53.259764] kobject_hotplug: /sbin/hotplug vc seq=787 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa4 SUBSYSTEM=vc [ 53.274530] kobject_hotplug [ 53.274538] fill_kobj_path: path = '/class/vc/vcs4' [ 53.274544] kobject_hotplug: /sbin/hotplug vc seq=788 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcs4 SUBSYSTEM=vc [ 53.275366] kobject vcs4: cleaning up [ 53.275373] kobject_hotplug [ 53.275379] fill_kobj_path: path = '/class/vc/vcsa4' [ 53.275384] kobject_hotplug: /sbin/hotplug vc seq=789 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcsa4 SUBSYSTEM=vc [ 53.276169] kobject vcsa4: cleaning up [ 53.304566] kobject vcs4: registering. parent: vc, set: class_obj [ 53.304583] kobject_hotplug [ 53.304590] fill_kobj_path: path = '/class/vc/vcs4' [ 53.304595] kobject_hotplug: /sbin/hotplug vc seq=790 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs4 SUBSYSTEM=vc [ 53.319918] kobject vcsa4: registering. parent: vc, set: class_obj [ 53.319936] kobject_hotplug [ 53.319943] fill_kobj_path: path = '/class/vc/vcsa4' [ 53.319948] kobject_hotplug: /sbin/hotplug vc seq=791 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa4 SUBSYSTEM=vc [ 53.335003] kobject vcsa5: registering. parent: vc, set: class_obj [ 53.335021] kobject_hotplug [ 53.335028] fill_kobj_path: path = '/class/vc/vcsa5' [ 53.335033] kobject_hotplug: /sbin/hotplug vc seq=792 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa5 SUBSYSTEM=vc [ 53.350739] kobject_hotplug [ 53.350748] fill_kobj_path: path = '/class/vc/vcs5' [ 53.350753] kobject_hotplug: /sbin/hotplug vc seq=793 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcs5 SUBSYSTEM=vc [ 53.351581] kobject vcs5: cleaning up [ 53.351588] kobject_hotplug [ 53.351595] fill_kobj_path: path = '/class/vc/vcsa5' [ 53.351599] kobject_hotplug: /sbin/hotplug vc seq=794 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcsa5 SUBSYSTEM=vc [ 53.352399] kobject vcsa5: cleaning up [ 53.362783] kobject vcs5: registering. parent: vc, set: class_obj [ 53.362800] kobject_hotplug [ 53.362825] fill_kobj_path: path = '/class/vc/vcs5' [ 53.362830] kobject_hotplug: /sbin/hotplug vc seq=795 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs5 SUBSYSTEM=vc [ 53.365582] kobject vcsa5: registering. parent: vc, set: class_obj [ 53.365604] kobject_hotplug [ 53.365610] fill_kobj_path: path = '/class/vc/vcsa5' [ 53.365616] kobject_hotplug: /sbin/hotplug vc seq=796 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa5 SUBSYSTEM=vc [ 53.367241] kobject vcsa6: registering. parent: vc, set: class_obj [ 53.367264] kobject_hotplug [ 53.367270] fill_kobj_path: path = '/class/vc/vcsa6' [ 53.367275] kobject_hotplug: /sbin/hotplug vc seq=797 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa6 SUBSYSTEM=vc [ 53.382643] kobject_hotplug [ 53.382651] fill_kobj_path: path = '/class/vc/vcs6' [ 53.382656] kobject_hotplug: /sbin/hotplug vc seq=798 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcs6 SUBSYSTEM=vc [ 53.383493] kobject vcs6: cleaning up [ 53.383501] kobject_hotplug [ 53.383507] fill_kobj_path: path = '/class/vc/vcsa6' [ 53.383512] kobject_hotplug: /sbin/hotplug vc seq=799 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/class/vc/vcsa6 SUBSYSTEM=vc [ 53.384316] kobject vcsa6: cleaning up [ 53.412410] kobject vcs6: registering. parent: vc, set: class_obj [ 53.412428] kobject_hotplug [ 53.412435] fill_kobj_path: path = '/class/vc/vcs6' [ 53.412440] kobject_hotplug: /sbin/hotplug vc seq=800 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcs6 SUBSYSTEM=vc [ 53.427499] kobject vcsa6: registering. parent: vc, set: class_obj [ 53.427516] kobject_hotplug [ 53.427523] fill_kobj_path: path = '/class/vc/vcsa6' [ 53.427528] kobject_hotplug: /sbin/hotplug vc seq=801 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/class/vc/vcsa6 SUBSYSTEM=vc [ 66.053903] kobject mb86a15: registering. parent: <NULL>, set: module [ 66.053928] kobject_hotplug [ 66.053938] fill_kobj_path: path = '/module/mb86a15' [ 66.053942] kobject_hotplug: /sbin/hotplug module seq=802 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/module/mb86a15 SUBSYSTEM=module [ 66.080182] kobject i2c_core: registering. parent: <NULL>, set: module [ 66.080210] kobject_hotplug [ 66.080218] fill_kobj_path: path = '/module/i2c_core' [ 66.080222] kobject_hotplug: /sbin/hotplug module seq=803 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/module/i2c_core SUBSYSTEM=module [ 66.095640] subsystem i2c: registering [ 66.095645] kobject i2c: registering. parent: <NULL>, set: bus [ 66.095664] kobject devices: registering. parent: i2c, set: <NULL> [ 66.095681] kobject drivers: registering. parent: i2c, set: <NULL> [ 66.095699] kobject i2c_adapter: registering. parent: <NULL>, set: drivers [ 66.095716] kobject_hotplug [ 66.095722] fill_kobj_path: path = '/bus/i2c/drivers/i2c_adapter' [ 66.095727] kobject_hotplug: /sbin/hotplug drivers seq=804 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/bus/i2c/drivers/i2c_adapter SUBSYSTEM=drivers [ 66.111371] subsystem i2c-adapter: registering [ 66.111377] kobject i2c-adapter: registering. parent: <NULL>, set: class [ 66.166071] kobject dvb_core: registering. parent: <NULL>, set: module [ 66.166099] kobject_hotplug [ 66.166106] fill_kobj_path: path = '/module/dvb_core' [ 66.166111] kobject_hotplug: /sbin/hotplug module seq=805 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/module/dvb_core SUBSYSTEM=module [ 66.181805] subsystem dvb: registering [ 66.181811] kobject dvb: registering. parent: <NULL>, set: class [ 66.231633] kobject mantis: registering. parent: <NULL>, set: module [ 66.231665] kobject_hotplug [ 66.231672] fill_kobj_path: path = '/module/mantis' [ 66.231677] kobject_hotplug: /sbin/hotplug module seq=806 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/module/mantis SUBSYSTEM=module [ 66.247491] kobject mantis: registering. parent: <NULL>, set: drivers [ 66.247509] kobject_hotplug [ 66.247516] fill_kobj_path: path = '/bus/pci/drivers/mantis' [ 66.247520] kobject_hotplug: /sbin/hotplug drivers seq=807 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add DEVPATH=/bus/pci/drivers/mantis SUBSYSTEM=drivers [ 66.263094] mantis_pci_probe: Got a device [ 66.263277] mantis_pci_probe: We got an IRQ [ 85.837263] Trying to free free IRQ23 [ 85.837423] kobject mantis: unregistering [ 85.837426] kobject_hotplug [ 85.837437] fill_kobj_path: path = '/bus/pci/drivers/mantis' [ 85.837442] kobject_hotplug: /sbin/hotplug drivers seq=808 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/bus/pci/drivers/mantis SUBSYSTEM=drivers [ 85.853153] kobject mantis: cleaning up [ 85.853541] kobject mantis: unregistering [ 85.853545] kobject_hotplug [ 85.853551] fill_kobj_path: path = '/module/mantis' [ 85.853556] kobject_hotplug: /sbin/hotplug module seq=809 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove DEVPATH=/module/mantis SUBSYSTEM=module [ 85.869299] kobject mantis: cleaning up [ 91.576833] Unable to handle kernel paging request at virtual address f92b83ea [ 91.577132] printing eip: [ 91.577242] c0207487 [ 91.577332] *pde = 01bc4067 [ 91.577446] *pte = 00000000 [ 91.577559] Oops: 0000 [#1] [ 91.577672] SMP DEBUG_PAGEALLOC [ 91.577819] Modules linked in: dvb_core i2c_core mb86a15 3c59x piix sd_mod [ 91.578166] CPU: 0 [ 91.578167] EIP: 0060:[<c0207487>] Not tainted VLI [ 91.578168] EFLAGS: 00010097 (2.6.13) [ 91.578634] EIP is at vsnprintf+0x337/0x4c0 [ 91.578807] eax: f92b83ea ebx: 0000000a ecx: f92b83ea edx: fffffffe [ 91.579071] esi: f082e122 edi: 00000000 ebp: f0956ee4 esp: f0956eac [ 91.579341] ds: 007b es: 007b ss: 0068 [ 91.579506] Process cat (pid: 2337, threadinfo=f0956000 task=f4ca8b00) [ 91.579765] Stack: f0956ef4 f082efff 00000000 00000000 0000000a fffffffd 00000000 00000000 [ 91.580186] ffffffff ffffffff f082efff f4190de0 f09c385c 00000017 f0956f00 c01804f6 [ 91.580604] f082e120 00000ee0 c036756e f0956f14 00000008 f0956f28 c0105a04 f4190de0 [ 91.581024] Call Trace: [ 91.581135] [<c0103e6f>] show_stack+0x7f/0xa0 [ 91.581333] [<c0104020>] show_registers+0x160/0x1d0 [ 91.581549] [<c0104250>] die+0x100/0x180 [ 91.581729] [<c0114ee9>] do_page_fault+0x369/0x6ed [ 91.581950] [<c0103a93>] error_code+0x4f/0x54 [ 91.582152] [<c01804f6>] seq_printf+0x36/0x60 [ 91.582355] [<c0105a04>] show_interrupts+0x2d4/0x3d0 [ 91.582579] [<c017fff9>] seq_read+0x1c9/0x2c0 [ 91.582778] [<c015ead8>] vfs_read+0xb8/0x190 [ 91.582974] [<c015ee8b>] sys_read+0x4b/0x80 [ 91.583169] [<c0102f23>] sysenter_past_esp+0x54/0x75 [ 91.583389] Code: ff c7 45 ec 08 00 00 00 83 cf 01 eb ba 8b 45 14 8b 55 e8 83 45 14 04 8b 08 b8 c5 6b 36 c0 81 f9 ff 0f 00 00 0f 46 c8 89 c8 eb 06 <80> 38 00 74 07 40 4a 83 fa ff 75 f4 29 c8 83 e7 10 89 c3 75 1d [ 91.584807]
#include <asm/io.h> #include <asm/pgtable.h> #include <asm/page.h> #include <linux/kmod.h> #include <linux/vmalloc.h> #include <linux/init.h> #include <linux/device.h> #include "mantis_common.h" #include "mantis_dma.h" #include "mantis_i2c.h" #include "mantis_eeprom.h" #include <asm/irq.h> #include <linux/signal.h> #include <linux/sched.h> #include <linux/interrupt.h> unsigned int verbose = 1; module_param(verbose, int, 0644); MODULE_PARM_DESC(verbose, "verbose startup messages, default is 1 (yes)"); #define PCI_VENDOR_ID_MANTIS 0x1822 #define PCI_DEVICE_ID_MANTIS_R11 0x4e35 #define DRIVER_NAME "mantis" static struct pci_device_id mantis_pci_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_MANTIS, PCI_DEVICE_ID_MANTIS_R11) }, { 0 }, }; MODULE_DEVICE_TABLE(pci, mantis_pci_table); static irqreturn_t mantis_pci_irq(int irq, void *dev_id, struct pt_regs *regs) { struct mantis_pci *mantis; dprintk(verbose, MANTIS_DEBUG, 1, "Mantis PCI IRQ"); mantis = (struct mantis_pci *) dev_id; if (mantis == NULL) dprintk(verbose, MANTIS_DEBUG, 1, "Aeio, mantis ISR"); return IRQ_NONE; // temporarily } static int mantis_i2c_setup(struct mantis_pci *mantis) { u32 config; // mmwrite(0x80, MANTIS_DMA_CTL); // MCU i2c read config = mmread(MANTIS_DMA_CTL); dprintk(verbose, MANTIS_DEBUG, 1, "Mantis Ctl reg=0x%04x", config); return 0; } static int mantis_reg_dump(struct mantis_pci *mantis) { u32 ctlreg, intstat, intmask, i2cdata; ctlreg = mmread(MANTIS_DMA_CTL); intstat = mmread(MANTIS_INT_STAT); intmask = mmread(MANTIS_INT_MASK); i2cdata = mmread(MANTIS_I2C_DATA); dprintk(verbose, MANTIS_DEBUG, 1, "CTL_REG=0x%04x, INT_STAT=0x%04x, \ INT_MASK=0x%04x, I2C_DATA=0x%04x", ctlreg, intstat, \ intmask, i2cdata); return 0; } static int __devinit mantis_pci_probe(struct pci_dev *pdev, const struct pci_device_id *mantis_pci_table) { u8 revision, latency; struct mantis_pci *mantis; mantis = (struct mantis_pci *) kmalloc(sizeof (struct mantis_pci), GFP_KERNEL); if (mantis == NULL) { dprintk(verbose, MANTIS_ERROR, 1, "Out of memory"); return -ENOMEM; } dprintk(verbose, MANTIS_ERROR, 1, "Got a device"); if (request_irq(pdev->irq, mantis_pci_irq, SA_SHIRQ | SA_INTERRUPT, DRIVER_NAME, mantis) < 0) { dprintk(verbose, MANTIS_ERROR, 1, "Mantis IRQ reg failed"); goto err; } dprintk(verbose, MANTIS_DEBUG, 1, "We got an IRQ"); return 0; err: dprintk(verbose, MANTIS_DEBUG, 1, "<freak out>"); kfree(mantis); return -ENODEV; } static void __devexit mantis_pci_remove(struct pci_dev *pdev) { free_irq(pdev->irq, pdev); } static struct pci_driver mantis_pci_driver = { .name = DRIVER_NAME, .id_table = mantis_pci_table, .probe = mantis_pci_probe, .remove = mantis_pci_remove, }; static int __devinit mantis_pci_init(void) { return pci_register_driver(&mantis_pci_driver); } static void __devexit mantis_pci_exit(void) { pci_unregister_driver(&mantis_pci_driver); } module_init(mantis_pci_init); module_exit(mantis_pci_exit); MODULE_DESCRIPTION("Mantis PCI DTV bridge driver"); MODULE_AUTHOR("Manu Abraham"); MODULE_LICENSE("GPL");
Attachment:
vsprintf.asm.bz2
Description: application/bzip
337 .L34: 92:lib/vsprintf.c **** base = 8; 93:lib/vsprintf.c **** cp++; 94:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 95:lib/vsprintf.c **** cp++; 96:lib/vsprintf.c **** base = 16; 97:lib/vsprintf.c **** } 98:lib/vsprintf.c **** } 99:lib/vsprintf.c **** } else if (base == 16) { 100:lib/vsprintf.c **** if (cp[0] == '0' && toupper(cp[1]) == 'X')
- Follow-Ups:
- Re: free free irq and Oops on cat /proc/interrupts (2)
- From: Jiri Slaby <[email protected]>
- Re: free free irq and Oops on cat /proc/interrupts (2)
- From: Sergey Vlasov <[email protected]>
- Re: free free irq and Oops on cat /proc/interrupts (2)
- Prev by Date: Re: [HELP] netfilter Kconfig dependency nightmare
- Next by Date: Re: [HELP] netfilter Kconfig dependency nightmare
- Previous by thread: [PATCH] Move flags for preprocessing linker scripts to rule
- Next by thread: Re: free free irq and Oops on cat /proc/interrupts (2)
- Index(es):