From: Hans de Goede <hdegoede@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 26/26] usbredir: Add support for buffered bulk input
Date: Wed, 19 Dec 2012 12:48:26 +0100 [thread overview]
Message-ID: <50D1A98A.5070707@redhat.com> (raw)
In-Reply-To: <50D18E2D.9050905@redhat.com>
Hi,
On 12/19/2012 10:51 AM, Gerd Hoffmann wrote:
> Hi,
>
>> These 2 are 1 on 1 copies from the kernel:
>>
>> hw/usb/redirect-ftdi-ids.h | 1255
>> ++++++++++++++++++++++++++++++++++++++++++
>> hw/usb/redirect-pl2303-ids.h | 150 +++++
>>
>> They contain "boring" stuff like:
>>
>> #define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */
>> #define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */
>
> We have header files copyed from linux already (linux-headers/), did you
> look into placing them there? Could be it doesn't work that easily due
> to internal / user interface split of the kernel headers, but worth
> checking ...
That seem to be only headers from under linux/include. And not from
under linux/drivers/usb/.... like I'm doing, so for now I'm just
going to leave the headers in hw/usb.
>
>> This one:
>> hw/usb/redirect-usb-ids.h
>>
>> Contains the usb-id tables copied from the kernel, as stated
>> in the comments:
>
> Manual process or scripted? If case of the latter we should put the
> scripts into scripts/ for easy future updates.
>
>> So updating them can be done by emptying the list and then copying in
>> the new list from the latest kernel, this is an (easy) manual procedure
>> for now.
>
> Ah, manual. ok.
>
>>> I also think this shouldn't be tied to redir, I think it is better to
>>> have a hw/usb/quirks.c file where the device id database and helper
>>> functions to match devices against the list are living.
>>
>> Makes sense, one problem I see though is that right now I've
>> 2 id tables, named usbredir_raw_serial_ids and usbredir_ftdi_serial_ids
>> since ftdi based adapters need some extra special handling (a quirk
>> to the quirk).
>>
>> Once we start working with quirk tables it makes sense to have 1 large
>> table with an extra uint32_t field which contains the actual quirks as
>> bitmask. All perfectly sensible, but this breaks the easy copy and
>> paste syncing of the tables from the Linux kernel ...
>>
>> So any good ideas for this from you ?
>
> With a scripted update we could add the bitmask easily I guess.
>
> But I think for now we can stick to two lists. Just make sure
> usb-quirks.c has a sensible interface. Pass in device ids+class, get
> back a quicks bitmask. Then we can create the bitmask by just checking
> which list has the device in question.
>
> And when we figure some day this becomes too messy we can switch to a
> model where where we have the quirk bits next to the devices in the
> table and just do a lookup, without users noticing the change.
Ok, I'll send a new version with this implemented.
Regards,
Hans
prev parent reply other threads:[~2012-12-19 11:55 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 13:35 [Qemu-devel] [PATCH 00/26] usb: Hans' pending qemu usb patches Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 01/26] ehci: Add a ehci_writeback_async_complete_packet helper function Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 02/26] ehci: Add ehci_verify_qh and ehci_verify_qtd helper functions Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 03/26] ehci: Verify guest does not change the token of inflight qtd-s Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 04/26] ehci: Move get / put_dwords upwards Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 05/26] ehci: writeback_async_complete_packet: verify qh and qtd Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 06/26] ehci: Verify qtd for async completed packets Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 07/26] ehci: Add an ehci_get_pid helper function Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 08/26] ehci: Verify a queue's ep direction does not change Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 09/26] ehci: Use uframe precision for interrupt threshold checking Hans de Goede
2012-12-17 13:16 ` Gerd Hoffmann
2012-12-17 14:23 ` Hans de Goede
2012-12-17 14:39 ` Gerd Hoffmann
2012-12-17 14:47 ` Hans de Goede
2012-12-17 14:51 ` Gerd Hoffmann
2012-12-18 10:20 ` Hans de Goede
2012-12-18 11:03 ` Gerd Hoffmann
2012-12-18 11:30 ` Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 10/26] ehci: Further speedup rescanning if async schedule after raising an interrupt Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 11/26] ehci: Don't call commit_irq after raising PCD Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 12/26] uhci: Fix 1 ms delay in interrupt reporting to the guest Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 13/26] uhci: Fix pending interrupts getting lost on migration Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 14/26] uhci: Add a QH_VALID define Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 15/26] uhci: Limit amount of frames processed in one go Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 16/26] uhci: Maximize how many frames we catch up when behind Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 17/26] hid: Change idle handling to use a timer Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 18/26] usb: Fix usb_ep_find_packet_by_id Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 19/26] usb: Add an usb_device_ep_stopped USBDevice method Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 20/26] usbredir: Add an usbredir_stop_ep helper function Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 21/26] usbredir: Add USBEP2I and I2USBEP helper macros Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 22/26] usbredir: Add ep_stopped USBDevice method Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 23/26] usbredir: Verify we have 32 bits bulk length cap when redirecting to xhci Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 24/26] usbredir: Add usbredir_init_endpoints() helper Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 25/26] usb-redir: Add debugging to bufpq save / restore Hans de Goede
2012-12-14 13:35 ` [Qemu-devel] [PATCH 26/26] usbredir: Add support for buffered bulk input Hans de Goede
2012-12-18 13:36 ` Gerd Hoffmann
2012-12-19 9:27 ` Hans de Goede
2012-12-19 9:51 ` Gerd Hoffmann
2012-12-19 11:48 ` Hans de Goede [this message]
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=50D1A98A.5070707@redhat.com \
--to=hdegoede@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).