Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933386AbbLVRLU (ORCPT ); Tue, 22 Dec 2015 12:11:20 -0500 Received: from dehamd003.servertools24.de ([31.47.254.18]:48503 "EHLO dehamd003.servertools24.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932360AbbLVRLS (ORCPT ); Tue, 22 Dec 2015 12:11:18 -0500 Subject: Re: [PATCH 1/2] usb: gadget: f_midi: refactor state machine To: "Felipe F. Tonello" , linux-usb@vger.kernel.org References: <1450800486-18150-1-git-send-email-eu@felipetonello.com> Cc: linux-kernel@vger.kernel.org, Felipe Balbi , Greg Kroah-Hartman , Robert Baldyga From: Clemens Ladisch Message-ID: <5679840F.5010805@ladisch.de> Date: Tue, 22 Dec 2015 18:10:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1450800486-18150-1-git-send-email-eu@felipetonello.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <20151222171112.919741.45688@dehamd003.servertools24.de> X-PPP-Vhost: ladisch.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 910 Lines: 26 Felipe F. Tonello wrote: > This refactor includes the following: > * Cleaner state machine code; It does not correctly handle system real time messages inserted between the status and data bytes of other messages. > * Reset state if MIDI message parsed is non-conformant; Why? In a byte stream like "C1 C3 44", where the data byte of the first message was lost, the reset would also drop the second message. > * Fixed bug when a conformant MIDI message was followed by a non-conformant > causing the MIDI-USB message to use old temporary data (port->data[0..1]), > thus packing a wrong MIDI-USB request. Running status is feature. Regards, Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/