stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Dr Nicholas J Bailey <nicholas.bailey@glasgow.ac.uk>,
	Takashi Iwai <tiwai@suse.de>, Daniel Mack <zonque@gmail.com>,
	fzu@wemgehoertderstaat.de
Subject: [ 01/11] ALSA: snd-usb-usx2y: remove bogus frame checks
Date: Fri, 18 Oct 2013 12:53:30 -0700	[thread overview]
Message-ID: <20131018195049.170465632@linuxfoundation.org> (raw)
In-Reply-To: <20131018195049.069623827@linuxfoundation.org>

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Daniel Mack <zonque@gmail.com>

commit a9d14bc0b188a822e42787d01e56c06fe9750162 upstream.

The frame check in i_usX2Y_urb_complete() and
i_usX2Y_usbpcm_urb_complete() is bogus and produces false positives as
described in this LAU thread:

  http://linuxaudio.org/mailarchive/lau/2013/5/20/200177

This patch removes the check code entirely.

Cc: fzu@wemgehoertderstaat.de
Reported-by: Dr Nicholas J Bailey <nicholas.bailey@glasgow.ac.uk>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/usx2y/usbusx2yaudio.c |   22 +++-------------------
 sound/usb/usx2y/usx2yhwdeppcm.c |    7 +------
 2 files changed, 4 insertions(+), 25 deletions(-)

--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -295,19 +295,6 @@ static void usX2Y_error_urb_status(struc
 	usX2Y_clients_stop(usX2Y);
 }
 
-static void usX2Y_error_sequence(struct usX2Ydev *usX2Y,
-				 struct snd_usX2Y_substream *subs, struct urb *urb)
-{
-	snd_printk(KERN_ERR
-"Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n"
-"Most probably some urb of usb-frame %i is still missing.\n"
-"Cause could be too long delays in usb-hcd interrupt handling.\n",
-		   usb_get_current_frame_number(usX2Y->dev),
-		   subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out",
-		   usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame);
-	usX2Y_clients_stop(usX2Y);
-}
-
 static void i_usX2Y_urb_complete(struct urb *urb)
 {
 	struct snd_usX2Y_substream *subs = urb->context;
@@ -324,12 +311,9 @@ static void i_usX2Y_urb_complete(struct
 		usX2Y_error_urb_status(usX2Y, subs, urb);
 		return;
 	}
-	if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
-		subs->completed_urb = urb;
-	else {
-		usX2Y_error_sequence(usX2Y, subs, urb);
-		return;
-	}
+
+	subs->completed_urb = urb;
+
 	{
 		struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE],
 			*playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
--- a/sound/usb/usx2y/usx2yhwdeppcm.c
+++ b/sound/usb/usx2y/usx2yhwdeppcm.c
@@ -244,13 +244,8 @@ static void i_usX2Y_usbpcm_urb_complete(
 		usX2Y_error_urb_status(usX2Y, subs, urb);
 		return;
 	}
-	if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
-		subs->completed_urb = urb;
-	else {
-		usX2Y_error_sequence(usX2Y, subs, urb);
-		return;
-	}
 
+	subs->completed_urb = urb;
 	capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
 	capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
 	playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];



  reply	other threads:[~2013-10-18 19:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
2013-10-18 19:53 ` Greg Kroah-Hartman [this message]
2013-10-18 19:53 ` [ 02/11] ALSA: hda - Add fixup for ASUS N56VZ Greg Kroah-Hartman
2013-10-18 19:53 ` [ 03/11] random: run random_int_secret_init() run after all late_initcalls Greg Kroah-Hartman
2013-10-18 19:53 ` [ 04/11] vfs: allow O_PATH file descriptors for fstatfs() Greg Kroah-Hartman
2013-10-18 19:53 ` [ 05/11] ext4: fix memory leak in xattr Greg Kroah-Hartman
2013-10-21 16:37   ` Dave Jones
2013-10-18 19:53 ` [ 06/11] KVM: PPC: Book3S HV: Fix typo in saving DSCR Greg Kroah-Hartman
2013-10-18 19:53 ` [ 07/11] parisc: fix interruption handler to respect pagefault_disable() Greg Kroah-Hartman
2013-10-18 19:53 ` [ 08/11] watchdog: ts72xx_wdt: locking bug in ioctl Greg Kroah-Hartman
2013-10-18 19:53 ` [ 09/11] drm/radeon: fix hw contexts for SUMO2 asics Greg Kroah-Hartman
2013-10-18 19:53 ` [ 10/11] mm/mmap: check for RLIMIT_AS before unmapping Greg Kroah-Hartman
2013-10-18 19:53 ` [ 11/11] mm: do not grow the stack vma just because of an overrun on preceding vma Greg Kroah-Hartman
2013-10-18 20:49 ` [ 00/11] 3.4.67-stable review Guenter Roeck
2013-10-18 21:25   ` Greg Kroah-Hartman
2013-10-19  3:41 ` Shuah Khan
2013-10-19  4:49   ` Greg Kroah-Hartman

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=20131018195049.170465632@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=fzu@wemgehoertderstaat.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicholas.bailey@glasgow.ac.uk \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=zonque@gmail.com \
    /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).