You may add a flag to USBPacket and raise it upon your ohci_async_cancel_packet. ohci_async_complete_packet will check this flag and do nothing if it is up. Am I missing something?
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Salil Bijur Sent: Thursday, November 08, 2007 12:47 PM To: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] No cancel callback for usb-ohci Hi Arnon, On Nov 8, 2007 3:28 PM, Arnon Gilboa <[EMAIL PROTECTED]> wrote: > Seems like an ugly bug (common also to uhci), which I haven't noticed > before. > I guess this scenario has never happened to me. Can you please > describe it? What I'm trying to do is to prevent the lag caused by the USBDEVFS_BULK ioctl and instead send the bulk transfers asynchronously using the USBDEVFS_SUBMITURB ioctl. I'm taking the help of the patch you had sent for isochronous packets. This scenario occurs when the usb bluetooth dongle is added to the linux guest and its interface is brought up. > Call usb_defer_packet with cancel_cb which flags the packet, so the > following usb_packet_complete will be ignored. To call usb_defer_packet, there needs to be a callback function like the usb_msd_cancel_io function used in hw/usb-msd.c: usb_defer_packet(p, usb_msd_cancel_io, s); There doesn't seem to be a similar cancel_cb callback for ohci. An empty stub function prevents this crash, but should it be doing more stuff like the msd one does? Salil > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Salil Bijur > Sent: Thursday, November 08, 2007 8:51 AM > To: qemu-devel@nongnu.org > Subject: [Qemu-devel] No cancel callback for usb-ohci > > Hello, > > There is a call to the function usb_cancel_packet in hw/usb-ohci.c. > However, there is no cancel_cb callback registered for the > ohci->usb_packet resulting in a segmentation fault. > > Are there any plans to implement this cancel callback? > > Thanks, > Salil > > > > >