mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tony Olech <tony.olech@elandigitalsystems.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux USB Mailing List <inux-usb@vger.kernel.org>
Subject: is WARN_ON(irqs_disabled) in dma_free_coherent() spurious ??
Date: Fri, 04 Sep 2009 11:52:34 +0100	[thread overview]
Message-ID: <1252061554.6449.1552.camel@dell-laptop> (raw)

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??

Many thanks,

Tony Olech

Elan Digital Systems Ltd


                 reply	other threads:[~2009-09-04 10:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1252061554.6449.1552.camel@dell-laptop \
    --to=tony.olech@elandigitalsystems.com \
    --cc=inux-usb@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®