Received: by 10.213.65.68 with SMTP id h4csp1769596imn; Mon, 19 Mar 2018 12:46:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELvR8bTh2j4QKVqAfKxCO4K1twrAd4xQfvLj5dDM1KHyqyhaqT+dlNHd8leNA0Jr+L/hRLvD X-Received: by 10.98.171.7 with SMTP id p7mr10881659pff.71.1521488794255; Mon, 19 Mar 2018 12:46:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521488794; cv=none; d=google.com; s=arc-20160816; b=h7vOVoZrtodvkcNa0uD28HqGv+Ho1senP3Z9Mufrh7IfMPwDm3YYbqdO8ghZDLKuRz yxX5KTc7530aNdqH4r3yUGJ1uGD7Ttye4WPSR9PFzdGMoeBNPxX46TVqkzpOfv2Ao8vs r/VvyclE2/MMSzKWpqh0Dd2nLcjPBD9IsdyOR6F/E3mGA6/Rkg6l51fwrUax4+ME5RBQ 2PRb/Oa5XmBCqEWgZiTpVtJ2oqVS14gAQCD9aErgGsL+x249uZy7BsPmsmLdSmuw3w81 hPUpSnD2wuiCpnYsogcIan0FxZOmGbhZm3pMLFdjMV2hJaMpMKfy3XebGbNeeGCd6SWh PkFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/kZv9rNjqwFGPiPzk1R3hyGwxB1c895M4KfplsvTph4=; b=V4lZY/FWQoN4bH6Vcb5i6WUX52msTfRgp7UYRjtkuFXHK+tUPxaEPWn9MA354SLr70 S1ygd2CoNmxd67X4wjpjY1AugUfp87Rcezdz8lNiXhsmBYtNEEjMyElNdACihGkZFwQz Ma6ZRTOvhg0dT0H7AiWeMDbye838OCVYqHMCD7S9LgF9HBT4NiuPLtKrg81JKfP0EZnP J6NiBPC+byzzjlLBJxzP/lMhI1by7r2OjcRr6+SSlZMJgX5XuaRTPYdir1sq7CiNTF5/ 3BiqCSDfY3d9DxMTJo7Yrl1XNgn7ZC9/tIxHOXA7dpQeu/QjoPB1sPT5zI7rT63h95k2 4vng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e39-v6si546490plg.364.2018.03.19.12.46.20; Mon, 19 Mar 2018 12:46:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936171AbeCSTnn (ORCPT + 99 others); Mon, 19 Mar 2018 15:43:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48012 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031056AbeCSSVM (ORCPT ); Mon, 19 Mar 2018 14:21:12 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8DC0E1247; Mon, 19 Mar 2018 18:21:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Sakamoto , Takashi Iwai , Sasha Levin Subject: [PATCH 4.9 075/241] ALSA: firewire-lib: add a quirk of packet without valid EOH in CIP format Date: Mon, 19 Mar 2018 19:05:40 +0100 Message-Id: <20180319180754.309225360@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Sakamoto [ Upstream commit 2128f78f75a36a34dfef0e127273c2f820c5c904 ] In IEC 61883-1, when two quadlets CIP header is used, the most significant bit in second CIP header stands. However, packets from units with MOTU protocol version 3 have a quirk without this flag. Current packet streaming layer handles this as protocol error. This commit adds a new enumeration constant for this quirk, to handle MOTU protocol version 3. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- sound/firewire/amdtp-stream.c | 5 +++-- sound/firewire/amdtp-stream.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -471,8 +471,9 @@ static int handle_in_packet(struct amdtp * This module supports 'Two-quadlet CIP header with SYT field'. * For convenience, also check FMT field is AM824 or not. */ - if (((cip_header[0] & CIP_EOH_MASK) == CIP_EOH) || - ((cip_header[1] & CIP_EOH_MASK) != CIP_EOH)) { + if ((((cip_header[0] & CIP_EOH_MASK) == CIP_EOH) || + ((cip_header[1] & CIP_EOH_MASK) != CIP_EOH)) && + (!(s->flags & CIP_HEADER_WITHOUT_EOH))) { dev_info_ratelimited(&s->unit->device, "Invalid CIP header for AMDTP: %08X:%08X\n", cip_header[0], cip_header[1]); --- a/sound/firewire/amdtp-stream.h +++ b/sound/firewire/amdtp-stream.h @@ -29,6 +29,8 @@ * @CIP_JUMBO_PAYLOAD: Only for in-stream. The number of data blocks in an * packet is larger than IEC 61883-6 defines. Current implementation * allows 5 times as large as IEC 61883-6 defines. + * @CIP_HEADER_WITHOUT_EOH: Only for in-stream. CIP Header doesn't include + * valid EOH. */ enum cip_flags { CIP_NONBLOCKING = 0x00, @@ -39,6 +41,7 @@ enum cip_flags { CIP_SKIP_DBC_ZERO_CHECK = 0x10, CIP_EMPTY_HAS_WRONG_DBC = 0x20, CIP_JUMBO_PAYLOAD = 0x40, + CIP_HEADER_WITHOUT_EOH = 0x80, }; /**