From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYur0-0007Wg-6V for qemu-devel@nongnu.org; Thu, 15 Nov 2012 03:31:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYuqx-0007uk-4k for qemu-devel@nongnu.org; Thu, 15 Nov 2012 03:31:18 -0500 Received: from david.siemens.de ([192.35.17.14]:28493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYuqw-0007uS-Pm for qemu-devel@nongnu.org; Thu, 15 Nov 2012 03:31:15 -0500 Message-ID: <50A4A851.5000000@siemens.com> Date: Thu, 15 Nov 2012 09:31:13 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <50A4A682.2010508@siemens.com> <50A4A7C8.8010904@redhat.com> In-Reply-To: <50A4A7C8.8010904@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] usb: host-linux: Ignore parsing errors of the device descriptors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel On 2012-11-15 09:28, Gerd Hoffmann wrote: > On 11/15/12 09:23, Jan Kiszka wrote: >> The Linux is more tolerant here as well: Just stop parsing the device >> descriptors when an error is detected but do not reset what was found >> so far. This allows to run buggy devices with partially invalid >> descriptors. > >> -error: >> - usb_ep_reset(&s->dev); >> - return 1; > > I'd prefer to keep the error jump target to handle the parse error here. > Dumping the reset there is fine with me, but I'd prefer this event being > logged (trace point or stderr message or both) to ease trouble shooting > in case a device doesn't behave as expected. That would be "over-logging" as we already record the individual reasons. There is simply no code to jump to after the refactoring. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux