[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] usb: host-linux: Ignore parsing errors of the d
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH] usb: host-linux: Ignore parsing errors of the device descriptors |
Date: |
Thu, 15 Nov 2012 09:31:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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