On Fri, 2009-09-04 at 10:34 -0400, Alan Stern wrote: > On Fri, 4 Sep 2009, Tony Olech wrote: > > Hi > > I am trying to develop a linux kernel driver for a USB > > device and I am initially following the example driver > > usb-skeleton.c and also the driver usblcd.c > > > > The sequence: > > > > in the file operation ..write(): > > usb_alloc_urb() > > usb_buffer_alloc(a big buffer) > > usb_fill_bulk_urb(for an OUT pipe) > > usb_submit_urb() > > usb_free_urb() > > then in the completion ..callback(): > > usb_buffer_free() > > the routine dma_free_coherent() is called which calls > > WARN_ON(irqs_disabled) > > > > and because I am running the kernel with all the debugs > > and warnings switched on I get a stack dump in the system > > log. > > > > Because I do not want to see warnings unless I am doing > > something wrong I have to investigate the (possible) > > problem. As far as I can tell the WARN_ON() is completely > > spurious. Is that correct?? If so what is the solution > > and who will change the drivers that use the same algorithm?? > > I'm not an expert on this... As I recall, the WARN_ON is not spurious; > some architectures (ARM maybe?) do require interrupts to be enabled in > dma_free_coherent(). Basically it is a bug in their DMA > implementation. > > Alan Stern So if that is the case, what is the procedure for getting all those USB device drivers changed so that they do not call usb_buffer_free() from the BULK OUT completed callback ?? Tony Olech -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html