Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754752AbYJQBAz (ORCPT ); Thu, 16 Oct 2008 21:00:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751322AbYJQBAq (ORCPT ); Thu, 16 Oct 2008 21:00:46 -0400 Received: from gw.goop.org ([64.81.55.164]:58957 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbYJQBAo (ORCPT ); Thu, 16 Oct 2008 21:00:44 -0400 Message-ID: <48F7E3B8.2090106@goop.org> Date: Thu, 16 Oct 2008 18:00:40 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: Alan Stern CC: Linux Kernel Mailing List , linux-usb Subject: Re: Oops in UHCI when encountering "host controller process error" References: In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9150 Lines: 200 Alan Stern wrote: > And at that point qh must be equal to uhci->next_qh. There are only > about five places where uhci->next_qh is assigned to; you could test > each of them for NULL. > OK. >> OK, with uhci-hcd.debug=2 on the kernel command line I still get an >> oops, but in a different function. I guess the qh list is corrupt >> either way? >> > > It sure looks that way. > > >> uhci_hcd 0000:00:1d.0: host controller process error, something bad happened! >> usb usb2: default language 0x0409 >> uhci_hcd 0000:00:1d.0: host controller halted, very bad! >> BUG: unable to handle kernel NULL pointer dereference<7>usb usb2: uevent >> at 0000000000000020 >> IP: [] uhci_show_qh+0x228/0x59d >> > > I guess you also better add code to uhci_sprint_schedule() in > uhci-debug.c to check each assignment to qh (there are only two) for > NULL, and jump directly to the next iteration of the "for i" loop when > you see it. > Looks like this is the relevent detail: "uhci->skelqh[1]->node.next is NULL" for all the queues. Haven't looked into it yet. hub 4-0:1.0: 2 ports detected hub 4-0:1.0: standalone hub hub 4-0:1.0: no power switching (usb 1.0) hub 4-0:1.0: individual port over-current protection hub 4-0:1.0: power on to power good time: 2ms hub 4-0:1.0: local power source is good hub 4-0:1.0: trying to enable port power on non-switchable hub /home/jeremy/hg/xen/paravirt/linux/drivers/usb/core/inode.c: creating file '001' usb usb4: New USB device found, idVendor=1d6b, idProduct=0001 usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb4: Product: UHCI Host Controller usb usb4: Manufacturer: Linux 2.6.27-tip uhci_hcd usb usb4: SerialNumber: 0000:00:1d.2 PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12 [] ? try_to_wake_up+0x198/0x1aa [] ? default_wake_function+0xd/0xf [] ? pvclock_clocksource_read+0x42/0x7e [] ? _spin_unlock_irqrestore+0x1b/0x20 [] ? pvclock_clocksource_read+0x42/0x7e [] ? xen_clocksource_read+0x21/0x23 [] ? run_posix_cpu_timers+0x27/0x73d [] ? pvclock_clocksource_read+0x42/0x7e [] ? pvclock_clocksource_read+0x42/0x7e [] uhci_scan_schedule+0xb7/0x9a3 [] ? xen_vcpuop_set_next_event+0x52/0x66 [] ? _raw_spin_lock+0x68/0x10b [] uhci_hub_status_data+0x38/0x179 [] usb_hcd_poll_rh_status+0x49/0x14f [] ? rh_timer_func+0x0/0xb [] rh_timer_func+0x9/0xb [] run_timer_softirq+0x175/0x1ef [] __do_softirq+0x8a/0x150 serio: i8042 KBD port at 0x60,0x64 irq 1 mice: PS/2 mouse device common for all mice [] call_softirq+0x1c/0x28 [] do_softirq+0x44/0x8b [] irq_exit+0x3f/0x82 [] xen_evtchn_do_upcall+0x19d/0x1be [] xen_do_hypervisor_callback+0x1e/0x30 [] ? _stext+0x22a/0x1000 [] ? _stext+0x22a/0x1000 [] ? xen_restore_fl+0x39/0x3b [] ? vprintk+0x2e5/0x312 [] ? urb_destroy+0x0/0x28 [] ? kref_put+0x43/0x4f [] ? usb_free_urb+0x15/0x17 [] ? printk+0x67/0x6e [] ? usb_control_msg+0xe0/0xf1 [] ? hub_probe+0x3c4/0xa3a [] ? usb_match_one_id+0x2b/0x88 [] ? usb_probe_interface+0x13c/0x16a [] ? driver_probe_device+0xc0/0x16e [] ? __device_attach+0x0/0xb [] ? __device_attach+0x9/0xb [] ? bus_for_each_drv+0x51/0x88 [] ? device_attach+0x64/0x7b [] ? bus_attach_device+0x28/0x59 [] ? device_add+0x3a9/0x54f [] ? kfree+0xed/0xfa [] ? usb_set_configuration+0x4c7/0x521 [] ? generic_probe+0x55/0x9b [] ? usb_probe_device+0x64/0x69 [] ? driver_probe_device+0xc0/0x16e [] ? __device_attach+0x0/0xb [] ? __device_attach+0x9/0xb [] ? bus_for_each_drv+0x51/0x88 [] ? device_attach+0x64/0x7b [] ? bus_attach_device+0x28/0x59 [] ? device_add+0x3a9/0x54f [] ? usb_new_device+0x5b/0x16b [] ? _raw_spin_lock+0x68/0x10b [] ? hub_thread+0xc9b/0x127c [] ? xen_leave_lazy+0x15/0x17 [] ? autoremove_wake_function+0x0/0x38 [] ? hub_thread+0x0/0x127c [] ? kthread+0x49/0x76 [] ? child_rip+0xa/0x11 [] ? retint_restore_args+0x5/0x20 [] ? child_rip+0x0/0x11 ---[ end trace 7c092a45d81b69fc ]--- ------------[ cut here ]------------ WARNING: at /home/jeremy/hg/xen/paravirt/linux/drivers/usb/host/uhci-q.c:1744 uhci_scan_schedule+0xb7/0x9a3() uhci->skelqh[1]->node.next is NULL Modules linked in: Pid: 125, comm: khubd Tainted: G W 2.6.27-tip #241 Call Trace: [] warn_slowpath+0xae/0xd7 [] ? try_to_wake_up+0x198/0x1aa [] ? default_wake_function+0xd/0xf [] ? pvclock_clocksource_read+0x42/0x7e [] ? _spin_unlock_irqrestore+0x1b/0x20 [] ? pvclock_clocksource_read+0x42/0x7e [] ? xen_clocksource_read+0x21/0x23 [] ? run_posix_cpu_timers+0x27/0x73d [] ? pvclock_clocksource_read+0x42/0x7e [] ? pvclock_clocksource_read+0x42/0x7e [] uhci_scan_schedule+0xb7/0x9a3 [] ? xen_vcpuop_set_next_event+0x52/0x66 [] ? _raw_spin_lock+0x68/0x10b [] uhci_hub_status_data+0x38/0x179 [] usb_hcd_poll_rh_status+0x49/0x14f [] ? rh_timer_func+0x0/0xb [] rh_timer_func+0x9/0xb [] run_timer_softirq+0x175/0x1ef [] __do_softirq+0x8a/0x150 [] call_softirq+0x1c/0x28 [] do_softirq+0x44/0x8b [] irq_exit+0x3f/0x82 [] xen_evtchn_do_upcall+0x19d/0x1be [] xen_do_hypervisor_callback+0x1e/0x30 [] ? _stext+0x22a/0x1000 [] ? _stext+0x22a/0x1000 [] ? xen_restore_fl+0x39/0x3b [] ? vprintk+0x2e5/0x312 [] ? urb_destroy+0x0/0x28 [] ? kref_put+0x43/0x4f [] ? usb_free_urb+0x15/0x17 [] ? printk+0x67/0x6e [] ? usb_control_msg+0xe0/0xf1 [] ? hub_probe+0x3c4/0xa3a [] ? usb_match_one_id+0x2b/0x88 [] ? usb_probe_interface+0x13c/0x16a [] ? driver_probe_device+0xc0/0x16e [] ? __device_attach+0x0/0xb [] ? __device_attach+0x9/0xb [] ? bus_for_each_drv+0x51/0x88 [] ? device_attach+0x64/0x7b [] ? bus_attach_device+0x28/0x59 [] ? device_add+0x3a9/0x54f [] ? kfree+0xed/0xfa [] ? usb_set_configuration+0x4c7/0x521 [] ? generic_probe+0x55/0x9b [] ? usb_probe_device+0x64/0x69 [] ? driver_probe_device+0xc0/0x16e [] ? __device_attach+0x0/0xb [] ? __device_attach+0x9/0xb [] ? bus_for_each_drv+0x51/0x88 [] ? device_attach+0x64/0x7b [] ? bus_attach_device+0x28/0x59 [] ? device_add+0x3a9/0x54f [] ? usb_new_device+0x5b/0x16b [] ? _raw_spin_lock+0x68/0x10b [] ? hub_thread+0xc9b/0x127c [] ? xen_leave_lazy+0x15/0x17 [] ? autoremove_wake_function+0x0/0x38 [] ? hub_thread+0x0/0x127c [] ? kthread+0x49/0x76 [] ? child_rip+0xa/0x11 [] ? retint_restore_args+0x5/0x20 [] ? child_rip+0x0/0x11 > Maybe make this change first, since it will be easier and it might give > a good idea of where to look in uhci-q.c. > > By the way, would there be any problem caused by the fact that the > hardware can only use 32-bit DMA addresses? > No. I'm explicitly asking for memory under 4G (and this machine only has 2G anyway). J -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/