linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Keith Packard <keithp@keithp.com>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Regression: Revert "Bluetooth: use buffer priority to mark URB_ISO_ASAP flag"
Date: Mon, 23 Jan 2012 10:03:35 +0100	[thread overview]
Message-ID: <1327309415.1955.87.camel@aeonflux> (raw)
In-Reply-To: <1327298281-2502-1-git-send-email-keithp@keithp.com>

Hi Keith,

> URB_ISO_ASAP may only be used with iso end points, but this patch was
> attempting to use it with a bulk endpoint. When DEBUG is defined in
> the USB stack, it checks for invalid flags and returns -EINVAL instead
> of actually transmitting the data.
> 
> Signed-off-by: Keith Packard <keithp@keithp.com>
> ---

a version of this patch should be already upstream or in stable trees.
If you are sending this again, then it might slipped through. Johan?

> Ok, so this is a comedy of errors. The Bluetooth code is trying to use
> an iso-specific flag (URB_ISO_ASAP) on a bulk endpoint, which is
> invalid, but normally harmless. Unless the USB code is compiled for
> debugging, in which case it checks a bunch for incorrect usage and
> discards URBs which are wrong.
> 
> As far as I'm concerned, #ifdef DEBUG code should never ever change
> the behaviour of the code, and so I'd say the USB code is even more
> broken than the bluetooth code...

And yes, this one is hilarious.

Regards

Marcel



  reply	other threads:[~2012-01-23  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23  5:58 [PATCH] Regression: Revert "Bluetooth: use buffer priority to mark URB_ISO_ASAP flag" Keith Packard
2012-01-23  9:03 ` Marcel Holtmann [this message]
2012-01-23  9:18   ` Johan Hedberg
2012-01-23 15:23 ` Alan Stern
2012-01-23 17:16   ` Keith Packard
2012-02-02 10:50 ` Pavel Machek

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=1327309415.1955.87.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=keithp@keithp.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@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;
as well as URLs for NNTP newsgroup(s).