* [Qemu-devel] [PULL] usb patch queue @ 2011-10-13 11:08 Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 1/9] usb-storage: fix NULL pointer dereference Gerd Hoffmann ` (9 more replies) 0 siblings, 10 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, Here comes the usb patch queue with a bunch of bug fixes. Check the individual patches for details. please pull, Gerd The following changes since commit ebffe2afceb1a17b5d134b5debf553955fe5ea1a: Merge remote-tracking branch 'qmp/queue/qmp' into staging (2011-10-10 08:21:46 -0500) are available in the git repository at: git://git.kraxel.org/qemu usb.28 Gerd Hoffmann (7): usb-storage: fix NULL pointer dereference. usb-hub: need to check dev->attached usb: fix port reset usb-host: factor out code usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSY usb-hid: activate usb tablet / mouse after migration. usb-hub: don't trigger assert on packet completion. Peter Maydell (2): hw/usb-ohci: Fix OHCI_TD_T1 bit position definition hw/usb-ohci: Honour endpoint maximum packet size hw/usb-ehci.c | 4 +- hw/usb-hid.c | 11 ++++ hw/usb-hub.c | 12 +++- hw/usb-msd.c | 5 +- hw/usb-ohci.c | 41 +++++++++---- hw/usb-uhci.c | 2 +- hw/usb.c | 12 ++++ hw/usb.h | 1 + usb-linux.c | 176 ++++++++++++++++++++++++++++++++++++--------------------- 9 files changed, 180 insertions(+), 84 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 1/9] usb-storage: fix NULL pointer dereference. 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 2/9] usb-hub: need to check dev->attached Gerd Hoffmann ` (8 subsequent siblings) 9 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann When a usb packet is canceled we need to check whenever we actually have a scsi request in flight before we try to cancel it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb-msd.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/usb-msd.c b/hw/usb-msd.c index e92434c..08d2d2a 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -325,7 +325,10 @@ static int usb_msd_handle_control(USBDevice *dev, USBPacket *p, static void usb_msd_cancel_io(USBDevice *dev, USBPacket *p) { MSDState *s = DO_UPCAST(MSDState, dev, dev); - scsi_req_cancel(s->req); + + if (s->req) { + scsi_req_cancel(s->req); + } } static int usb_msd_handle_data(USBDevice *dev, USBPacket *p) -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 2/9] usb-hub: need to check dev->attached 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 1/9] usb-storage: fix NULL pointer dereference Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 3/9] usb: fix port reset Gerd Hoffmann ` (7 subsequent siblings) 9 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a did that for all host controllers, the usb hub was left out by accident. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb-hub.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb-hub.c b/hw/usb-hub.c index 286e3ad..39382c7 100644 --- a/hw/usb-hub.c +++ b/hw/usb-hub.c @@ -289,7 +289,7 @@ static int usb_hub_handle_control(USBDevice *dev, USBPacket *p, port->wPortStatus |= PORT_STAT_SUSPEND; break; case PORT_RESET: - if (dev) { + if (dev && dev->attached) { usb_send_msg(dev, USB_MSG_RESET); port->wPortChange |= PORT_STAT_C_RESET; /* set enable bit */ @@ -429,7 +429,7 @@ static int usb_hub_broadcast_packet(USBHubState *s, USBPacket *p) for(i = 0; i < NUM_PORTS; i++) { port = &s->ports[i]; dev = port->port.dev; - if (dev && (port->wPortStatus & PORT_STAT_ENABLE)) { + if (dev && dev->attached && (port->wPortStatus & PORT_STAT_ENABLE)) { ret = usb_handle_packet(dev, p); if (ret != USB_RET_NODEV) { return ret; -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 3/9] usb: fix port reset 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 1/9] usb-storage: fix NULL pointer dereference Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 2/9] usb-hub: need to check dev->attached Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 4/9] usb-host: factor out code Gerd Hoffmann ` (6 subsequent siblings) 9 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a removed the implicit detach before (re-)attaching in usb_attach(). Some usb host controllers used that behavior though to do a port reset by a detach+attach sequence. This patch establishes old behavior by adding a new usb_reset() function for port resets and putting it into use, thereby also unifying port reset behavior of all host controllers. The patch also adds asserts to usb_attach() and usb_detach() to make sure the calls are symmetrical. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb-ehci.c | 4 ++-- hw/usb-ohci.c | 2 +- hw/usb-uhci.c | 2 +- hw/usb.c | 12 ++++++++++++ hw/usb.h | 1 + 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 27376a2..bd374c1 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -880,6 +880,7 @@ static void ehci_reset(void *opaque) } if (devs[i] && devs[i]->attached) { usb_attach(&s->ports[i]); + usb_send_msg(devs[i], USB_MSG_RESET); } } ehci_queues_rip_all(s); @@ -978,8 +979,7 @@ static void handle_port_status_write(EHCIState *s, int port, uint32_t val) if (!(val & PORTSC_PRESET) &&(*portsc & PORTSC_PRESET)) { trace_usb_ehci_port_reset(port, 0); if (dev && dev->attached) { - usb_attach(&s->ports[port]); - usb_send_msg(dev, USB_MSG_RESET); + usb_reset(&s->ports[port]); *portsc &= ~PORTSC_CSC; } diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index c3be65a..5e10e21 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -449,7 +449,7 @@ static void ohci_reset(void *opaque) port = &ohci->rhport[i]; port->ctrl = 0; if (port->port.dev && port->port.dev->attached) { - usb_attach(&port->port); + usb_reset(&port->port); } } if (ohci->async_td) { diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 17992cf..171d787 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -341,7 +341,7 @@ static void uhci_reset(void *opaque) port = &s->ports[i]; port->ctrl = 0x0080; if (port->port.dev && port->port.dev->attached) { - usb_attach(&port->port); + usb_reset(&port->port); } } diff --git a/hw/usb.c b/hw/usb.c index fa90204..2216efe 100644 --- a/hw/usb.c +++ b/hw/usb.c @@ -33,6 +33,7 @@ void usb_attach(USBPort *port) assert(dev != NULL); assert(dev->attached); + assert(dev->state == USB_STATE_NOTATTACHED); port->ops->attach(port); usb_send_msg(dev, USB_MSG_ATTACH); } @@ -42,10 +43,21 @@ void usb_detach(USBPort *port) USBDevice *dev = port->dev; assert(dev != NULL); + assert(dev->state != USB_STATE_NOTATTACHED); port->ops->detach(port); usb_send_msg(dev, USB_MSG_DETACH); } +void usb_reset(USBPort *port) +{ + USBDevice *dev = port->dev; + + assert(dev != NULL); + usb_detach(port); + usb_attach(port); + usb_send_msg(dev, USB_MSG_RESET); +} + void usb_wakeup(USBDevice *dev) { if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) { diff --git a/hw/usb.h b/hw/usb.h index c08d469..c6e1870 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -306,6 +306,7 @@ void usb_cancel_packet(USBPacket * p); void usb_attach(USBPort *port); void usb_detach(USBPort *port); +void usb_reset(USBPort *port); void usb_wakeup(USBDevice *dev); int usb_generic_handle_packet(USBDevice *s, USBPacket *p); void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p); -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 4/9] usb-host: factor out code 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann ` (2 preceding siblings ...) 2011-10-13 11:08 ` [Qemu-devel] [PATCH 3/9] usb: fix port reset Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 5/9] usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSY Gerd Hoffmann ` (5 subsequent siblings) 9 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Move code to claim usb ports and to disconnect usb interfaces into usb_host_claim_port and usb_host_disconnect_ifaces functions. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- usb-linux.c | 140 ++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 77 insertions(+), 63 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 2075c4c..ff1a29c 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -411,6 +411,80 @@ static void usb_host_async_cancel(USBDevice *dev, USBPacket *p) } } +static int usb_host_claim_port(USBHostDevice *s) +{ +#ifdef USBDEVFS_CLAIM_PORT + char *h, hub_name[64], line[1024]; + int hub_addr, portnr, ret; + + snprintf(hub_name, sizeof(hub_name), "%d-%s", + s->match.bus_num, s->match.port); + + /* try strip off last ".$portnr" to get hub */ + h = strrchr(hub_name, '.'); + if (h != NULL) { + portnr = atoi(h+1); + *h = '\0'; + } else { + /* no dot in there -> it is the root hub */ + snprintf(hub_name, sizeof(hub_name), "usb%d", + s->match.bus_num); + portnr = atoi(s->match.port); + } + + if (!usb_host_read_file(line, sizeof(line), "devnum", + hub_name)) { + return -1; + } + if (sscanf(line, "%d", &hub_addr) != 1) { + return -1; + } + + if (!usb_host_device_path) { + return -1; + } + snprintf(line, sizeof(line), "%s/%03d/%03d", + usb_host_device_path, s->match.bus_num, hub_addr); + s->hub_fd = open(line, O_RDWR | O_NONBLOCK); + if (s->hub_fd < 0) { + return -1; + } + + ret = ioctl(s->hub_fd, USBDEVFS_CLAIM_PORT, &portnr); + if (ret < 0) { + close(s->hub_fd); + s->hub_fd = -1; + return -1; + } + + trace_usb_host_claim_port(s->match.bus_num, hub_addr, portnr); + return 0; +#else + return -1; +#endif +} + +static int usb_host_disconnect_ifaces(USBHostDevice *dev, int nb_interfaces) +{ + /* earlier Linux 2.4 do not support that */ +#ifdef USBDEVFS_DISCONNECT + struct usbdevfs_ioctl ctrl; + int ret, interface; + + for (interface = 0; interface < nb_interfaces; interface++) { + ctrl.ioctl_code = USBDEVFS_DISCONNECT; + ctrl.ifno = interface; + ctrl.data = 0; + ret = ioctl(dev->fd, USBDEVFS_IOCTL, &ctrl); + if (ret < 0 && errno != ENODATA) { + perror("USBDEVFS_DISCONNECT"); + return -1; + } + } +#endif + return 0; +} + static int usb_host_claim_interfaces(USBHostDevice *dev, int configuration) { const char *op = NULL; @@ -462,22 +536,9 @@ static int usb_host_claim_interfaces(USBHostDevice *dev, int configuration) } nb_interfaces = dev->descr[i + 4]; -#ifdef USBDEVFS_DISCONNECT - /* earlier Linux 2.4 do not support that */ - { - struct usbdevfs_ioctl ctrl; - for (interface = 0; interface < nb_interfaces; interface++) { - ctrl.ioctl_code = USBDEVFS_DISCONNECT; - ctrl.ifno = interface; - ctrl.data = 0; - op = "USBDEVFS_DISCONNECT"; - ret = ioctl(dev->fd, USBDEVFS_IOCTL, &ctrl); - if (ret < 0 && errno != ENODATA) { - goto fail; - } - } + if (usb_host_disconnect_ifaces(dev, nb_interfaces) < 0) { + goto fail; } -#endif /* XXX: only grab if all interfaces are free */ for (interface = 0; interface < nb_interfaces; interface++) { @@ -1301,56 +1362,9 @@ static int usb_host_initfn(USBDevice *dev) qemu_add_exit_notifier(&s->exit); usb_host_auto_check(NULL); -#ifdef USBDEVFS_CLAIM_PORT if (s->match.bus_num != 0 && s->match.port != NULL) { - char *h, hub_name[64], line[1024]; - int hub_addr, portnr, ret; - - snprintf(hub_name, sizeof(hub_name), "%d-%s", - s->match.bus_num, s->match.port); - - /* try strip off last ".$portnr" to get hub */ - h = strrchr(hub_name, '.'); - if (h != NULL) { - portnr = atoi(h+1); - *h = '\0'; - } else { - /* no dot in there -> it is the root hub */ - snprintf(hub_name, sizeof(hub_name), "usb%d", - s->match.bus_num); - portnr = atoi(s->match.port); - } - - if (!usb_host_read_file(line, sizeof(line), "devnum", - hub_name)) { - goto out; - } - if (sscanf(line, "%d", &hub_addr) != 1) { - goto out; - } - - if (!usb_host_device_path) { - goto out; - } - snprintf(line, sizeof(line), "%s/%03d/%03d", - usb_host_device_path, s->match.bus_num, hub_addr); - s->hub_fd = open(line, O_RDWR | O_NONBLOCK); - if (s->hub_fd < 0) { - goto out; - } - - ret = ioctl(s->hub_fd, USBDEVFS_CLAIM_PORT, &portnr); - if (ret < 0) { - close(s->hub_fd); - s->hub_fd = -1; - goto out; - } - - trace_usb_host_claim_port(s->match.bus_num, hub_addr, portnr); + usb_host_claim_port(s); } -out: -#endif - return 0; } -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 5/9] usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSY 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann ` (3 preceding siblings ...) 2011-10-13 11:08 ` [Qemu-devel] [PATCH 4/9] usb-host: factor out code Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 6/9] hw/usb-ohci: Fix OHCI_TD_T1 bit position definition Gerd Hoffmann ` (4 subsequent siblings) 9 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann In case the host uses the usb device usbfs will refuse to set the configuration due to the device being busy. Handle this case by disconnection the interfaces, then trying again. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- usb-linux.c | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index ff1a29c..7d4d1d7 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -485,6 +485,26 @@ static int usb_host_disconnect_ifaces(USBHostDevice *dev, int nb_interfaces) return 0; } +static int usb_linux_get_num_interfaces(USBHostDevice *s) +{ + char device_name[64], line[1024]; + int num_interfaces = 0; + + if (usb_fs_type != USB_FS_SYS) { + return -1; + } + + sprintf(device_name, "%d-%s", s->bus_num, s->port); + if (!usb_host_read_file(line, sizeof(line), "bNumInterfaces", + device_name)) { + return -1; + } + if (sscanf(line, "%d", &num_interfaces) != 1) { + return -1; + } + return num_interfaces; +} + static int usb_host_claim_interfaces(USBHostDevice *dev, int configuration) { const char *op = NULL; @@ -901,14 +921,28 @@ static int usb_host_set_address(USBHostDevice *s, int addr) static int usb_host_set_config(USBHostDevice *s, int config) { + int ret, first = 1; + trace_usb_host_set_config(s->bus_num, s->addr, config); usb_host_release_interfaces(s); - int ret = ioctl(s->fd, USBDEVFS_SETCONFIGURATION, &config); +again: + ret = ioctl(s->fd, USBDEVFS_SETCONFIGURATION, &config); DPRINTF("husb: ctrl set config %d ret %d errno %d\n", config, ret, errno); + if (ret < 0 && errno == EBUSY && first) { + /* happens if usb device is in use by host drivers */ + int count = usb_linux_get_num_interfaces(s); + if (count > 0) { + DPRINTF("husb: busy -> disconnecting %d interfaces\n", count); + usb_host_disconnect_ifaces(s, count); + first = 0; + goto again; + } + } + if (ret < 0) { return ctrl_error(); } -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 6/9] hw/usb-ohci: Fix OHCI_TD_T1 bit position definition 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann ` (4 preceding siblings ...) 2011-10-13 11:08 ` [Qemu-devel] [PATCH 5/9] usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSY Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 7/9] hw/usb-ohci: Honour endpoint maximum packet size Gerd Hoffmann ` (3 subsequent siblings) 9 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Gerd Hoffmann From: Peter Maydell <peter.maydell@linaro.org> The OHCI Transfer Descriptor T (DataToggle) bits are 24 and 25; fix an error which accidentally overlaid them both on the same bit. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb-ohci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 5e10e21..e14ced8 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -150,7 +150,7 @@ static void ohci_async_cancel_device(OHCIState *ohci, USBDevice *dev); #define OHCI_TD_DI_SHIFT 21 #define OHCI_TD_DI_MASK (7<<OHCI_TD_DI_SHIFT) #define OHCI_TD_T0 (1<<24) -#define OHCI_TD_T1 (1<<24) +#define OHCI_TD_T1 (1<<25) #define OHCI_TD_EC_SHIFT 26 #define OHCI_TD_EC_MASK (3<<OHCI_TD_EC_SHIFT) #define OHCI_TD_CC_SHIFT 28 -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 7/9] hw/usb-ohci: Honour endpoint maximum packet size 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann ` (5 preceding siblings ...) 2011-10-13 11:08 ` [Qemu-devel] [PATCH 6/9] hw/usb-ohci: Fix OHCI_TD_T1 bit position definition Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 8/9] usb-hid: activate usb tablet / mouse after migration Gerd Hoffmann ` (2 subsequent siblings) 9 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Gerd Hoffmann From: Peter Maydell <peter.maydell@linaro.org> Honour the maximum packet size for endpoints; this applies when sending non-isochronous data and means we transfer only as much as the endpoint allows, leaving the transfer descriptor on the list for another go next time around. This allows usb-net to work when connected to an OHCI controller model. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb-ohci.c | 37 +++++++++++++++++++++++++++---------- 1 files changed, 27 insertions(+), 10 deletions(-) diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index e14ced8..c2981c5 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -872,7 +872,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) { int dir; - size_t len = 0; + size_t len = 0, pktlen = 0; #ifdef DEBUG_PACKET const char *str = NULL; #endif @@ -940,20 +940,30 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) len = (td.be - td.cbp) + 1; } - if (len && dir != OHCI_TD_DIR_IN && !completion) { - ohci_copy_td(ohci, &td, ohci->usb_buf, len, 0); + pktlen = len; + if (len && dir != OHCI_TD_DIR_IN) { + /* The endpoint may not allow us to transfer it all now */ + pktlen = (ed->flags & OHCI_ED_MPS_MASK) >> OHCI_ED_MPS_SHIFT; + if (pktlen > len) { + pktlen = len; + } + if (!completion) { + ohci_copy_td(ohci, &td, ohci->usb_buf, pktlen, 0); + } } } flag_r = (td.flags & OHCI_TD_R) != 0; #ifdef DEBUG_PACKET - DPRINTF(" TD @ 0x%.8x %" PRId64 " bytes %s r=%d cbp=0x%.8x be=0x%.8x\n", - addr, (int64_t)len, str, flag_r, td.cbp, td.be); + DPRINTF(" TD @ 0x%.8x %" PRId64 " of %" PRId64 + " bytes %s r=%d cbp=0x%.8x be=0x%.8x\n", + addr, (int64_t)pktlen, (int64_t)len, str, flag_r, td.cbp, td.be); - if (len > 0 && dir != OHCI_TD_DIR_IN) { + if (pktlen > 0 && dir != OHCI_TD_DIR_IN) { DPRINTF(" data:"); - for (i = 0; i < len; i++) + for (i = 0; i < pktlen; i++) { printf(" %.2x", ohci->usb_buf[i]); + } DPRINTF("\n"); } #endif @@ -982,7 +992,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) usb_packet_setup(&ohci->usb_packet, pid, OHCI_BM(ed->flags, ED_FA), OHCI_BM(ed->flags, ED_EN)); - usb_packet_addbuf(&ohci->usb_packet, ohci->usb_buf, len); + usb_packet_addbuf(&ohci->usb_packet, ohci->usb_buf, pktlen); ret = usb_handle_packet(dev, &ohci->usb_packet); if (ret != USB_RET_NODEV) break; @@ -1005,12 +1015,12 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) DPRINTF("\n"); #endif } else { - ret = len; + ret = pktlen; } } /* Writeback */ - if (ret == len || (dir == OHCI_TD_DIR_IN && ret >= 0 && flag_r)) { + if (ret == pktlen || (dir == OHCI_TD_DIR_IN && ret >= 0 && flag_r)) { /* Transmission succeeded. */ if (ret == len) { td.cbp = 0; @@ -1026,6 +1036,12 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) OHCI_SET_BM(td.flags, TD_CC, OHCI_CC_NOERROR); OHCI_SET_BM(td.flags, TD_EC, 0); + if ((dir != OHCI_TD_DIR_IN) && (ret != len)) { + /* Partial packet transfer: TD not ready to retire yet */ + goto exit_no_retire; + } + + /* Setting ED_C is part of the TD retirement process */ ed->head &= ~OHCI_ED_C; if (td.flags & OHCI_TD_T0) ed->head |= OHCI_ED_C; @@ -1066,6 +1082,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) i = OHCI_BM(td.flags, TD_DI); if (i < ohci->done_count) ohci->done_count = i; +exit_no_retire: ohci_put_td(ohci, addr, &td); return OHCI_BM(td.flags, TD_CC) != OHCI_CC_NOERROR; } -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 8/9] usb-hid: activate usb tablet / mouse after migration. 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann ` (6 preceding siblings ...) 2011-10-13 11:08 ` [Qemu-devel] [PATCH 7/9] hw/usb-ohci: Honour endpoint maximum packet size Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 9/9] usb-hub: don't trigger assert on packet completion Gerd Hoffmann 2011-10-14 16:25 ` [Qemu-devel] [PULL] usb patch queue Anthony Liguori 9 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann qemu uses the ps/2 mouse by default. The usb tablet (or mouse) is activated as soon as qemu sees some guest activity on the device, i.e. polling for HID events. That used to work fine for both fresh boot and migration. Remote wakeup support changed the picture though: There will be no polling after migration in case the guest suspended the usb bus, waiting for wakeup events. Result is that the ps/2 mouse stays active. Fix this by activating the usb tablet / mouse in post_load() in case the guest enabled remote wakeup. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb-hid.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/usb-hid.c b/hw/usb-hid.c index ba79466..a110c74 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -527,10 +527,21 @@ static int usb_keyboard_initfn(USBDevice *dev) return usb_hid_initfn(dev, HID_KEYBOARD); } +static int usb_ptr_post_load(void *opaque, int version_id) +{ + USBHIDState *s = opaque; + + if (s->dev.remote_wakeup) { + hid_pointer_activate(&s->hid); + } + return 0; +} + static const VMStateDescription vmstate_usb_ptr = { .name = "usb-ptr", .version_id = 1, .minimum_version_id = 1, + .post_load = usb_ptr_post_load, .fields = (VMStateField []) { VMSTATE_USB_DEVICE(dev, USBHIDState), VMSTATE_HID_POINTER_DEVICE(hid, USBHIDState), -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [Qemu-devel] [PATCH 9/9] usb-hub: don't trigger assert on packet completion. 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann ` (7 preceding siblings ...) 2011-10-13 11:08 ` [Qemu-devel] [PATCH 8/9] usb-hid: activate usb tablet / mouse after migration Gerd Hoffmann @ 2011-10-13 11:08 ` Gerd Hoffmann 2011-10-13 11:34 ` Gerd Hoffmann 2011-10-14 16:25 ` [Qemu-devel] [PULL] usb patch queue Anthony Liguori 9 siblings, 1 reply; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:08 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Calling usb_packet_complete() recursively when passing up the completion event up the chain for devices connected via usb hub will trigger an assert. So don't do that, make the usb hub emulation call the upstream completion callback directly instead. Based on a patch from Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb-hub.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/usb-hub.c b/hw/usb-hub.c index 39382c7..dab8f51 100644 --- a/hw/usb-hub.c +++ b/hw/usb-hub.c @@ -207,10 +207,14 @@ static void usb_hub_complete(USBPort *port, USBPacket *packet) /* * Just pass it along upstream for now. * - * If we ever inplement usb 2.0 split transactions this will + * If we ever implement usb 2.0 split transactions this will * become a little more complicated ... + * + * Can't use usb_packet_complete() here because packet->owner is + * cleared already, go call the ->complete() callback directly + * instead. */ - usb_packet_complete(&s->dev, packet); + s->dev.port->ops->complete(&s->dev.port, packet); } static void usb_hub_handle_reset(USBDevice *dev) -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PATCH 9/9] usb-hub: don't trigger assert on packet completion. 2011-10-13 11:08 ` [Qemu-devel] [PATCH 9/9] usb-hub: don't trigger assert on packet completion Gerd Hoffmann @ 2011-10-13 11:34 ` Gerd Hoffmann 0 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-10-13 11:34 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 312 bytes --] Hi, > - usb_packet_complete(&s->dev, packet); > + s->dev.port->ops->complete(&s->dev.port, packet); Oops, that doesn't compile. Got sidetracked wile waiting for the test build finish, then forgot to check the results :( Updated patch attached. Branch for pulling updated inplace. cheers, Gerd [-- Attachment #2: 0001-usb-hub-don-t-trigger-assert-on-packet-completion.patch --] [-- Type: text/plain, Size: 1433 bytes --] From 80cf7cf74f29a219e02b50f27c12b1c792ebf99b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann <kraxel@redhat.com> Date: Thu, 13 Oct 2011 12:52:47 +0200 Subject: [PATCH] usb-hub: don't trigger assert on packet completion. Calling usb_packet_complete() recursively when passing up the completion event up the chain for devices connected via usb hub will trigger an assert. So don't do that, make the usb hub emulation call the upstream completion callback directly instead. Based on a patch from Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb-hub.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/usb-hub.c b/hw/usb-hub.c index 39382c7..09c6516 100644 --- a/hw/usb-hub.c +++ b/hw/usb-hub.c @@ -207,10 +207,14 @@ static void usb_hub_complete(USBPort *port, USBPacket *packet) /* * Just pass it along upstream for now. * - * If we ever inplement usb 2.0 split transactions this will + * If we ever implement usb 2.0 split transactions this will * become a little more complicated ... + * + * Can't use usb_packet_complete() here because packet->owner is + * cleared already, go call the ->complete() callback directly + * instead. */ - usb_packet_complete(&s->dev, packet); + s->dev.port->ops->complete(s->dev.port, packet); } static void usb_hub_handle_reset(USBDevice *dev) -- 1.7.1 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann ` (8 preceding siblings ...) 2011-10-13 11:08 ` [Qemu-devel] [PATCH 9/9] usb-hub: don't trigger assert on packet completion Gerd Hoffmann @ 2011-10-14 16:25 ` Anthony Liguori 9 siblings, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2011-10-14 16:25 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 10/13/2011 06:08 AM, Gerd Hoffmann wrote: > Hi, > > Here comes the usb patch queue with a bunch of bug fixes. > Check the individual patches for details. > > please pull, > Gerd Pulled. Thanks. Regards, Anthony Liguori > > The following changes since commit ebffe2afceb1a17b5d134b5debf553955fe5ea1a: > > Merge remote-tracking branch 'qmp/queue/qmp' into staging (2011-10-10 08:21:46 -0500) > > are available in the git repository at: > > git://git.kraxel.org/qemu usb.28 > > Gerd Hoffmann (7): > usb-storage: fix NULL pointer dereference. > usb-hub: need to check dev->attached > usb: fix port reset > usb-host: factor out code > usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSY > usb-hid: activate usb tablet / mouse after migration. > usb-hub: don't trigger assert on packet completion. > > Peter Maydell (2): > hw/usb-ohci: Fix OHCI_TD_T1 bit position definition > hw/usb-ohci: Honour endpoint maximum packet size > > hw/usb-ehci.c | 4 +- > hw/usb-hid.c | 11 ++++ > hw/usb-hub.c | 12 +++- > hw/usb-msd.c | 5 +- > hw/usb-ohci.c | 41 +++++++++---- > hw/usb-uhci.c | 2 +- > hw/usb.c | 12 ++++ > hw/usb.h | 1 + > usb-linux.c | 176 ++++++++++++++++++++++++++++++++++++--------------------- > 9 files changed, 180 insertions(+), 84 deletions(-) > > ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2012-02-28 10:20 Gerd Hoffmann 2012-02-29 21:07 ` Anthony Liguori 0 siblings, 1 reply; 34+ messages in thread From: Gerd Hoffmann @ 2012-02-28 10:20 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, Next batch of usb updates. This one brings packet queuing for uhci and xhci, so we have per-endpoint queues at usb-bus level now. Need to bring those to the usb drivers as next step, so they (especially usb-host) can pipeline requests. Also a bunch of bugfixes in ehci, smartcard emulation and usb redirect. cheers, Gerd The following changes since commit b4bd0b168e9f4898b98308f4a8a089f647a86d16: audio: Add some fall through comments (2012-02-25 18:16:11 +0400) are available in the git repository at: git://git.kraxel.org/qemu usb.39 Alon Levy (4): usb-desc: fix user trigerrable segfaults (!config) libcacard: link with glib for g_strndup usb-ccid: advertise SELF_POWERED libcacard: fix reported ATR length Gerd Hoffmann (10): usb-hid: fix tablet activation usb-ehci: fix reset usb-uhci: cleanup UHCIAsync allocation & initialization. usb-uhci: add UHCIQueue usb-uhci: process uhci_handle_td return code via switch. usb-uhci: implement packet queuing usb-xhci: enable packet queuing usb: add tracepoint for usb packet state changes. usb-ehci: sanity-check iso xfers ehci: drop old stuff Hans de Goede (6): usb-ehci: Handle ISO packets failing with an error other then NAK usb-redir: Fix printing of device version usb-redir: Always clear device state on filter reject usb-redir: Let the usb-host know about our device filtering usb-redir: Limit return values returned by iso packets usb-redir: Return USB_RET_NAK when we've no data for an interrupt endpoint Jan Kiszka (1): usb: Resolve warnings about unassigned bus on usb device creation configure | 6 +- hw/usb-bt.c | 4 +- hw/usb-bus.c | 18 +--- hw/usb-ccid.c | 2 +- hw/usb-desc.c | 20 +++- hw/usb-ehci.c | 71 ++++++------- hw/usb-hid.c | 3 + hw/usb-msd.c | 4 +- hw/usb-net.c | 4 +- hw/usb-serial.c | 8 +- hw/usb-uhci.c | 314 +++++++++++++++++++++++++++++++--------------------- hw/usb-xhci.c | 6 - hw/usb.c | 27 +---- hw/usb.h | 7 +- libcacard/vcardt.h | 4 +- trace-events | 3 + usb-bsd.c | 4 +- usb-linux.c | 4 +- usb-redir.c | 46 ++++++-- vl.c | 7 +- 20 files changed, 317 insertions(+), 245 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2012-02-28 10:20 Gerd Hoffmann @ 2012-02-29 21:07 ` Anthony Liguori 0 siblings, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2012-02-29 21:07 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 02/28/2012 04:20 AM, Gerd Hoffmann wrote: > Hi, > > Next batch of usb updates. This one brings packet queuing for uhci and > xhci, so we have per-endpoint queues at usb-bus level now. Need to > bring those to the usb drivers as next step, so they (especially > usb-host) can pipeline requests. > > Also a bunch of bugfixes in ehci, smartcard emulation and usb redirect. Regards, Anthony Liguori > > cheers, > Gerd > > The following changes since commit b4bd0b168e9f4898b98308f4a8a089f647a86d16: > > audio: Add some fall through comments (2012-02-25 18:16:11 +0400) > > are available in the git repository at: > git://git.kraxel.org/qemu usb.39 > > Alon Levy (4): > usb-desc: fix user trigerrable segfaults (!config) > libcacard: link with glib for g_strndup > usb-ccid: advertise SELF_POWERED > libcacard: fix reported ATR length > > Gerd Hoffmann (10): > usb-hid: fix tablet activation > usb-ehci: fix reset > usb-uhci: cleanup UHCIAsync allocation& initialization. > usb-uhci: add UHCIQueue > usb-uhci: process uhci_handle_td return code via switch. > usb-uhci: implement packet queuing > usb-xhci: enable packet queuing > usb: add tracepoint for usb packet state changes. > usb-ehci: sanity-check iso xfers > ehci: drop old stuff > > Hans de Goede (6): > usb-ehci: Handle ISO packets failing with an error other then NAK > usb-redir: Fix printing of device version > usb-redir: Always clear device state on filter reject > usb-redir: Let the usb-host know about our device filtering > usb-redir: Limit return values returned by iso packets > usb-redir: Return USB_RET_NAK when we've no data for an interrupt endpoint > > Jan Kiszka (1): > usb: Resolve warnings about unassigned bus on usb device creation > > configure | 6 +- > hw/usb-bt.c | 4 +- > hw/usb-bus.c | 18 +--- > hw/usb-ccid.c | 2 +- > hw/usb-desc.c | 20 +++- > hw/usb-ehci.c | 71 ++++++------- > hw/usb-hid.c | 3 + > hw/usb-msd.c | 4 +- > hw/usb-net.c | 4 +- > hw/usb-serial.c | 8 +- > hw/usb-uhci.c | 314 +++++++++++++++++++++++++++++++--------------------- > hw/usb-xhci.c | 6 - > hw/usb.c | 27 +---- > hw/usb.h | 7 +- > libcacard/vcardt.h | 4 +- > trace-events | 3 + > usb-bsd.c | 4 +- > usb-linux.c | 4 +- > usb-redir.c | 46 ++++++-- > vl.c | 7 +- > 20 files changed, 317 insertions(+), 245 deletions(-) > > ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2011-11-01 14:56 Gerd Hoffmann 2011-11-01 18:13 ` Anthony Liguori 0 siblings, 1 reply; 34+ messages in thread From: Gerd Hoffmann @ 2011-11-01 14:56 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, Three little usb patches for 1.0. please pull, Gerd The following changes since commit ff74c5a9a91c6dbf1017195462aa4176f7381240: Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging (2011-10-31 15:05:40 -0500) are available in the git repository at: git://git.kraxel.org/qemu usb.29 Gerd Hoffmann (2): usb-hub: wakeup on attach usb-host: fix host close Roy Tam (1): usb: change VID/PID for usb-hub and usb-msd to prevent conflict hw/usb-hub.c | 5 +++-- hw/usb-msd.c | 4 ++-- usb-linux.c | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-11-01 14:56 Gerd Hoffmann @ 2011-11-01 18:13 ` Anthony Liguori 0 siblings, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2011-11-01 18:13 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 11/01/2011 09:56 AM, Gerd Hoffmann wrote: > Hi, > > Three little usb patches for 1.0. > > please pull, > Gerd > > The following changes since commit ff74c5a9a91c6dbf1017195462aa4176f7381240: > > Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging (2011-10-31 15:05:40 -0500) Pulled. Thanks. Regards, Anthony Liguori > are available in the git repository at: > > git://git.kraxel.org/qemu usb.29 > > Gerd Hoffmann (2): > usb-hub: wakeup on attach > usb-host: fix host close > > Roy Tam (1): > usb: change VID/PID for usb-hub and usb-msd to prevent conflict > > hw/usb-hub.c | 5 +++-- > hw/usb-msd.c | 4 ++-- > usb-linux.c | 6 ++++-- > 3 files changed, 9 insertions(+), 6 deletions(-) > > ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2011-09-02 9:56 Gerd Hoffmann 2011-09-07 8:41 ` Gerd Hoffmann 2011-09-08 14:23 ` Anthony Liguori 0 siblings, 2 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-09-02 9:56 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, This is the current use patch queue with the following changes: * musb improvements (qdev windup) * fix ehci emulation for FreeBSD guests. * a bunch if usb-host fixes. * misc minir tweaks. please pull, Gerd Gerd Hoffmann (15): usb-host: start tracing support usb-host: reapurb error report fix usb-host: fix halted endpoints usb-host: limit open retries usb-host: fix configuration tracking. usb-host: claim port usb-host: endpoint table fixup usb-ehci: handle siTDs usb-host: constify port usb-host: parse port in /proc/bus/usb/devices scan usb: fix use after free usb-ccid: switch to USBDesc* usb-ccid: remote wakeup support usb: claim port at device initialization time. usb-host: tag as unmigratable Juha Riihimäki (1): usb-musb: Add reset function Peter Maydell (2): usb: Remove leading underscores from __musb_irq_max usb-musb: Take a DeviceState* in init function hw/tusb6010.c | 11 +- hw/usb-bus.c | 110 ++++++++------ hw/usb-ccid.c | 248 +++++++++++--------------------- hw/usb-desc.h | 2 +- hw/usb-ehci.c | 65 +++++++-- hw/usb-hub.c | 12 +-- hw/usb-musb.c | 26 +++- hw/usb-ohci.c | 4 +- hw/usb-uhci.c | 11 +- hw/usb.c | 37 +++--- hw/usb.h | 11 +- trace-events | 32 ++++ usb-linux.c | 448 ++++++++++++++++++++++++++++++++++----------------------- 13 files changed, 561 insertions(+), 456 deletions(-) The following changes since commit 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b: Merge remote-tracking branch 'stefanha/trivial-patches' into staging (2011-09-01 13:57:19 -0500) are available in the git repository at: git://git.kraxel.org/qemu usb.25 Gerd Hoffmann (15): usb-host: start tracing support usb-host: reapurb error report fix usb-host: fix halted endpoints usb-host: limit open retries usb-host: fix configuration tracking. usb-host: claim port usb-host: endpoint table fixup usb-ehci: handle siTDs usb-host: constify port usb-host: parse port in /proc/bus/usb/devices scan usb: fix use after free usb-ccid: switch to USBDesc* usb-ccid: remote wakeup support usb: claim port at device initialization time. usb-host: tag as unmigratable Juha Riihimäki (1): usb-musb: Add reset function Peter Maydell (2): usb: Remove leading underscores from __musb_irq_max usb-musb: Take a DeviceState* in init function hw/tusb6010.c | 11 +- hw/usb-bus.c | 110 ++++++++------ hw/usb-ccid.c | 248 +++++++++++--------------------- hw/usb-desc.h | 2 +- hw/usb-ehci.c | 65 +++++++-- hw/usb-hub.c | 12 +-- hw/usb-musb.c | 26 +++- hw/usb-ohci.c | 4 +- hw/usb-uhci.c | 11 +- hw/usb.c | 37 +++--- hw/usb.h | 11 +- trace-events | 32 ++++ usb-linux.c | 448 ++++++++++++++++++++++++++++++++++----------------------- 13 files changed, 561 insertions(+), 456 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-09-02 9:56 Gerd Hoffmann @ 2011-09-07 8:41 ` Gerd Hoffmann 2011-09-08 14:23 ` Anthony Liguori 1 sibling, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-09-07 8:41 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel Hi, > are available in the git repository at: > > git://git.kraxel.org/qemu usb.25 Pushed new branch usb.26. Rebased to latest master, solved conflicts due to tracing merge, adapted to tracing changes ("disabled" not needed any more in trace-events). Squashed in a warning fix (init port variable) here: > usb-host: parse port in /proc/bus/usb/devices scan Don't feel like spamming the list with these minor changes. But can do a full repost if prefered. please pull, Gerd ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-09-02 9:56 Gerd Hoffmann 2011-09-07 8:41 ` Gerd Hoffmann @ 2011-09-08 14:23 ` Anthony Liguori 1 sibling, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2011-09-08 14:23 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 09/02/2011 04:56 AM, Gerd Hoffmann wrote: > Hi, > > This is the current use patch queue with the following changes: > > * musb improvements (qdev windup) > * fix ehci emulation for FreeBSD guests. > * a bunch if usb-host fixes. > * misc minir tweaks. > > please pull, > Gerd Pulled. Thanks. Regards, Anthony Liguori > > Gerd Hoffmann (15): > usb-host: start tracing support > usb-host: reapurb error report fix > usb-host: fix halted endpoints > usb-host: limit open retries > usb-host: fix configuration tracking. > usb-host: claim port > usb-host: endpoint table fixup > usb-ehci: handle siTDs > usb-host: constify port > usb-host: parse port in /proc/bus/usb/devices scan > usb: fix use after free > usb-ccid: switch to USBDesc* > usb-ccid: remote wakeup support > usb: claim port at device initialization time. > usb-host: tag as unmigratable > > Juha Riihimäki (1): > usb-musb: Add reset function > > Peter Maydell (2): > usb: Remove leading underscores from __musb_irq_max > usb-musb: Take a DeviceState* in init function > > hw/tusb6010.c | 11 +- > hw/usb-bus.c | 110 ++++++++------ > hw/usb-ccid.c | 248 +++++++++++--------------------- > hw/usb-desc.h | 2 +- > hw/usb-ehci.c | 65 +++++++-- > hw/usb-hub.c | 12 +-- > hw/usb-musb.c | 26 +++- > hw/usb-ohci.c | 4 +- > hw/usb-uhci.c | 11 +- > hw/usb.c | 37 +++--- > hw/usb.h | 11 +- > trace-events | 32 ++++ > usb-linux.c | 448 ++++++++++++++++++++++++++++++++++----------------------- > 13 files changed, 561 insertions(+), 456 deletions(-) > > The following changes since commit 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b: > > Merge remote-tracking branch 'stefanha/trivial-patches' into staging (2011-09-01 13:57:19 -0500) > > are available in the git repository at: > > git://git.kraxel.org/qemu usb.25 > > Gerd Hoffmann (15): > usb-host: start tracing support > usb-host: reapurb error report fix > usb-host: fix halted endpoints > usb-host: limit open retries > usb-host: fix configuration tracking. > usb-host: claim port > usb-host: endpoint table fixup > usb-ehci: handle siTDs > usb-host: constify port > usb-host: parse port in /proc/bus/usb/devices scan > usb: fix use after free > usb-ccid: switch to USBDesc* > usb-ccid: remote wakeup support > usb: claim port at device initialization time. > usb-host: tag as unmigratable > > Juha Riihimäki (1): > usb-musb: Add reset function > > Peter Maydell (2): > usb: Remove leading underscores from __musb_irq_max > usb-musb: Take a DeviceState* in init function > > hw/tusb6010.c | 11 +- > hw/usb-bus.c | 110 ++++++++------ > hw/usb-ccid.c | 248 +++++++++++--------------------- > hw/usb-desc.h | 2 +- > hw/usb-ehci.c | 65 +++++++-- > hw/usb-hub.c | 12 +-- > hw/usb-musb.c | 26 +++- > hw/usb-ohci.c | 4 +- > hw/usb-uhci.c | 11 +- > hw/usb.c | 37 +++--- > hw/usb.h | 11 +- > trace-events | 32 ++++ > usb-linux.c | 448 ++++++++++++++++++++++++++++++++++----------------------- > 13 files changed, 561 insertions(+), 456 deletions(-) > > ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2011-08-11 7:03 Gerd Hoffmann 2011-08-12 7:02 ` Michael Tokarev 2011-08-12 13:04 ` Anthony Liguori 0 siblings, 2 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-08-11 7:03 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, More usb and hid bits. Fixes a usb tablet regression with windows xp. milkymist goes use the new, splitted hid code directly instead of (ab-)using the usb-kbd device, which in turn allows to kill the usb_hid_datain_cb callback as no users are left. please pull, Gerd The following changes since commit b9c6cbff76061537b722d55f0e321dde2a612a23: Merge remote-tracking branch 'pm-arm/for-upstream' into pm (2011-08-09 19:16:43 +0200) are available in the git repository at: git://git.kraxel.org/qemu usb.23 Gerd Hoffmann (2): usb/hid: add hid_pointer_activate, use it usb-hid: remove usb_hid_datain_cb Michael Walle (4): hid: register kbd hander in init() hid: introduce hid vmstate macros usb-hid: use hid vmstate macro milkymist-softusb: use hid code directly hw/hid.c | 76 +++++++++++++++++++++++++++-- hw/hid.h | 1 + hw/hw.h | 20 ++++++++ hw/milkymist-softusb.c | 122 +++++++++++++++--------------------------------- hw/usb-hid.c | 58 ++--------------------- hw/usb.h | 3 - 6 files changed, 134 insertions(+), 146 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-08-11 7:03 Gerd Hoffmann @ 2011-08-12 7:02 ` Michael Tokarev 2011-08-12 7:57 ` Gerd Hoffmann 2011-08-12 13:04 ` Anthony Liguori 1 sibling, 1 reply; 34+ messages in thread From: Michael Tokarev @ 2011-08-12 7:02 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel 11.08.2011 11:03, Gerd Hoffmann wrote: > Hi, > > More usb and hid bits. Fixes a usb tablet regression with windows xp. > milkymist goes use the new, splitted hid code directly instead of > (ab-)using the usb-kbd device, which in turn allows to kill the > usb_hid_datain_cb callback as no users are left. The same question as about spice queue: should at least the regression fix go to stable? Thanks, /mjt ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-08-12 7:02 ` Michael Tokarev @ 2011-08-12 7:57 ` Gerd Hoffmann 0 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-08-12 7:57 UTC (permalink / raw) To: Michael Tokarev; +Cc: qemu-devel On 08/12/11 09:02, Michael Tokarev wrote: > 11.08.2011 11:03, Gerd Hoffmann wrote: >> Hi, >> >> More usb and hid bits. Fixes a usb tablet regression with windows xp. >> milkymist goes use the new, splitted hid code directly instead of >> (ab-)using the usb-kbd device, which in turn allows to kill the >> usb_hid_datain_cb callback as no users are left. > > The same question as about spice queue: should > at least the regression fix go to stable? Same answer ;) The regression is present in master only, so no. cheers, Gerd ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-08-11 7:03 Gerd Hoffmann 2011-08-12 7:02 ` Michael Tokarev @ 2011-08-12 13:04 ` Anthony Liguori 1 sibling, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2011-08-12 13:04 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 08/11/2011 02:03 AM, Gerd Hoffmann wrote: > Hi, > > More usb and hid bits. Fixes a usb tablet regression with windows xp. > milkymist goes use the new, splitted hid code directly instead of > (ab-)using the usb-kbd device, which in turn allows to kill the > usb_hid_datain_cb callback as no users are left. > > please pull, > Gerd > > The following changes since commit b9c6cbff76061537b722d55f0e321dde2a612a23: > > Merge remote-tracking branch 'pm-arm/for-upstream' into pm (2011-08-09 19:16:43 +0200) Pulled. Thanks. Regards, Anthony Liguori > > are available in the git repository at: > > git://git.kraxel.org/qemu usb.23 > > Gerd Hoffmann (2): > usb/hid: add hid_pointer_activate, use it > usb-hid: remove usb_hid_datain_cb > > Michael Walle (4): > hid: register kbd hander in init() > hid: introduce hid vmstate macros > usb-hid: use hid vmstate macro > milkymist-softusb: use hid code directly > > hw/hid.c | 76 +++++++++++++++++++++++++++-- > hw/hid.h | 1 + > hw/hw.h | 20 ++++++++ > hw/milkymist-softusb.c | 122 +++++++++++++++--------------------------------- > hw/usb-hid.c | 58 ++--------------------- > hw/usb.h | 3 - > 6 files changed, 134 insertions(+), 146 deletions(-) > > ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2011-07-20 10:23 Gerd Hoffmann 0 siblings, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-07-20 10:23 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, Tiny usb patch queue with two small fixes. please pull for 0.15, Gerd The following changes since commit 03ff09580ef6cbc4a893b6e3e6bbff33180ec70a: Merge remote-tracking branch 'agraf/xen-next' into staging (2011-07-19 08:04:35 -0500) are available in the git repository at: git://git.kraxel.org/qemu usb.20 Gerd Hoffmann (2): usb-hid: fixup changed tracking. usb-uhci: fix irq handling on error. hw/usb-hid.c | 9 ++++----- hw/usb-uhci.c | 6 ++++++ 2 files changed, 10 insertions(+), 5 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2011-07-08 9:50 Gerd Hoffmann 2011-07-12 14:52 ` Gerd Hoffmann 2011-07-19 15:59 ` Anthony Liguori 0 siblings, 2 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-07-08 9:50 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, Here is the current usb patch queue. Most noteworthy is the usb companion controller support added. There are also a bunch of bug fixes, some from Hans which he found while doing the companion controller work and some have been found in patch review. please pull, Gerd The following changes since commit 9312805d33e8b106bae356d13a8071fb37d75554: pxa2xx_lcd: add proper rotation support (2011-07-04 22:12:21 +0200) are available in the git repository at: git://git.kraxel.org/qemu usb.19 Gerd Hoffmann (8): pci: add ich9 usb controller ids uhci: add ich9 controllers ehci: fix port count. ehci: add ich9 controller. usb: update documentation usb: fixup bluetooth descriptors usb-hub: remove unused descriptor arrays usb-ohci: raise interrupt on attach Hans de Goede (13): usb: Add a usb_fill_port helper function usb: Move (initial) call of usb_port_location to usb_fill_port usb: Add a register_companion USB bus op. usb: Make port wakeup and complete ops take a USBPort instead of a Device usb: Replace device_destroy bus op with a child_detach port op usb-ehci: drop unused num-ports state member usb-ehci: Connect Status bit is read only, don't allow changing it by the guest usb-ehci: cleanup port reset handling usb: assert on calling usb_attach(port, NULL) on a port without a dev usb-ehci: Fix handling of PED and PEDC port status bits usb-ehci: Add support for registering companion controllers usb-uhci: Add support for being a companion controller usb-ohci: Add support for being a companion controller Jes Sorensen (1): usb_register_port(): do not set port->opaque and port->index twice Peter Maydell (1): hw/usb-musb.c: Don't misuse usb_packet_complete() docs/ich9-ehci-uhci.cfg | 37 +++++++ docs/usb2.txt | 33 +++++- hw/milkymist-softusb.c | 9 ++- hw/pci_ids.h | 8 ++ hw/usb-bt.c | 24 ++-- hw/usb-bus.c | 46 +++++++- hw/usb-ehci.c | 270 ++++++++++++++++++++++++++++++++++------------- hw/usb-hub.c | 90 +++------------- hw/usb-musb.c | 24 +++-- hw/usb-ohci.c | 89 +++++++++++----- hw/usb-uhci.c | 95 +++++++++++++---- hw/usb.c | 13 +-- hw/usb.h | 20 +++- 13 files changed, 523 insertions(+), 235 deletions(-) create mode 100644 docs/ich9-ehci-uhci.cfg ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-07-08 9:50 Gerd Hoffmann @ 2011-07-12 14:52 ` Gerd Hoffmann 2011-07-19 15:59 ` Anthony Liguori 1 sibling, 0 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-07-12 14:52 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 07/08/11 11:50, Gerd Hoffmann wrote: > Hi, > > Here is the current usb patch queue. Most noteworthy is the usb > companion controller support added. There are also a bunch of bug > fixes, some from Hans which he found while doing the companion > controller work and some have been found in patch review. > > please pull, > Gerd > > The following changes since commit 9312805d33e8b106bae356d13a8071fb37d75554: > > pxa2xx_lcd: add proper rotation support (2011-07-04 22:12:21 +0200) > > are available in the git repository at: > git://git.kraxel.org/qemu usb.19 ping? cheers, Gerd ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-07-08 9:50 Gerd Hoffmann 2011-07-12 14:52 ` Gerd Hoffmann @ 2011-07-19 15:59 ` Anthony Liguori 1 sibling, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2011-07-19 15:59 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 07/08/2011 04:50 AM, Gerd Hoffmann wrote: > Hi, > > Here is the current usb patch queue. Most noteworthy is the usb > companion controller support added. There are also a bunch of bug > fixes, some from Hans which he found while doing the companion > controller work and some have been found in patch review. Pulled. Thanks. Regards, Anthony Liguori > > please pull, > Gerd > > The following changes since commit 9312805d33e8b106bae356d13a8071fb37d75554: > > pxa2xx_lcd: add proper rotation support (2011-07-04 22:12:21 +0200) > > are available in the git repository at: > git://git.kraxel.org/qemu usb.19 > > Gerd Hoffmann (8): > pci: add ich9 usb controller ids > uhci: add ich9 controllers > ehci: fix port count. > ehci: add ich9 controller. > usb: update documentation > usb: fixup bluetooth descriptors > usb-hub: remove unused descriptor arrays > usb-ohci: raise interrupt on attach > > Hans de Goede (13): > usb: Add a usb_fill_port helper function > usb: Move (initial) call of usb_port_location to usb_fill_port > usb: Add a register_companion USB bus op. > usb: Make port wakeup and complete ops take a USBPort instead of a Device > usb: Replace device_destroy bus op with a child_detach port op > usb-ehci: drop unused num-ports state member > usb-ehci: Connect Status bit is read only, don't allow changing it by the guest > usb-ehci: cleanup port reset handling > usb: assert on calling usb_attach(port, NULL) on a port without a dev > usb-ehci: Fix handling of PED and PEDC port status bits > usb-ehci: Add support for registering companion controllers > usb-uhci: Add support for being a companion controller > usb-ohci: Add support for being a companion controller > > Jes Sorensen (1): > usb_register_port(): do not set port->opaque and port->index twice > > Peter Maydell (1): > hw/usb-musb.c: Don't misuse usb_packet_complete() > > docs/ich9-ehci-uhci.cfg | 37 +++++++ > docs/usb2.txt | 33 +++++- > hw/milkymist-softusb.c | 9 ++- > hw/pci_ids.h | 8 ++ > hw/usb-bt.c | 24 ++-- > hw/usb-bus.c | 46 +++++++- > hw/usb-ehci.c | 270 ++++++++++++++++++++++++++++++++++------------- > hw/usb-hub.c | 90 +++------------- > hw/usb-musb.c | 24 +++-- > hw/usb-ohci.c | 89 +++++++++++----- > hw/usb-uhci.c | 95 +++++++++++++---- > hw/usb.c | 13 +-- > hw/usb.h | 20 +++- > 13 files changed, 523 insertions(+), 235 deletions(-) > create mode 100644 docs/ich9-ehci-uhci.cfg > > ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2011-06-24 10:59 Gerd Hoffmann 2011-06-24 13:30 ` Hans de Goede 2011-06-27 20:19 ` Anthony Liguori 0 siblings, 2 replies; 34+ messages in thread From: Gerd Hoffmann @ 2011-06-24 10:59 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, Here comes the USB patch queue. Nothing major, just a bunch of little fixes and improvements. please pull, Gerd The following changes since commit 48e2faf222cbf4abab7c8e4b3f44229ec98eae7f: net: Warn about "-net nic" options which were ignored (2011-06-22 07:18:39 -0500) are available in the git repository at: git://git.kraxel.org/qemu usb.17 Gerd Hoffmann (6): usb-linux: add get_endp() usb-linux: make iso urb count contigurable usb-linux: track inflight iso urb count ehci: add freq + maxframes properties ehci: switch to nanoseconds usb: ignore USB_DT_DEBUG Hans de Goede (5): usb-bus: Don't allow attaching a device to a bus with no free ports usb: Proper error propagation for usb_device_attach errors usb: Add a speedmask to devices usb-linux: allow "compatible" high speed devices to connect at fullspeed usb-bus: Don't allow speed mismatch while attaching devices Markus Armbruster (1): usb-storage: Turn drive serial into a qdev property usb-storage.serial Peter Maydell (1): hw/usb-ohci.c: Fix handling of remote wakeup corner cases hw/usb-bus.c | 31 ++++++++++----- hw/usb-ccid.c | 1 + hw/usb-desc.c | 14 ++++++ hw/usb-ehci.c | 43 +++++++++++--------- hw/usb-msd.c | 19 ++++++-- hw/usb-ohci.c | 17 ++++++- hw/usb.h | 4 ++ usb-bsd.c | 2 + usb-linux.c | 124 +++++++++++++++++++++++++++++++++++++++++++++------------ 9 files changed, 191 insertions(+), 64 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-06-24 10:59 Gerd Hoffmann @ 2011-06-24 13:30 ` Hans de Goede 2011-06-27 20:19 ` Anthony Liguori 1 sibling, 0 replies; 34+ messages in thread From: Hans de Goede @ 2011-06-24 13:30 UTC (permalink / raw) To: qemu-devel Hi, Entire series looks good to me, including my own patches ;) Ack series. Regards, Hans On 06/24/2011 12:59 PM, Gerd Hoffmann wrote: > Hi, > > Here comes the USB patch queue. Nothing major, just a bunch of little > fixes and improvements. > > please pull, > Gerd > > The following changes since commit 48e2faf222cbf4abab7c8e4b3f44229ec98eae7f: > > net: Warn about "-net nic" options which were ignored (2011-06-22 07:18:39 -0500) > > are available in the git repository at: > git://git.kraxel.org/qemu usb.17 > > Gerd Hoffmann (6): > usb-linux: add get_endp() > usb-linux: make iso urb count contigurable > usb-linux: track inflight iso urb count > ehci: add freq + maxframes properties > ehci: switch to nanoseconds > usb: ignore USB_DT_DEBUG > > Hans de Goede (5): > usb-bus: Don't allow attaching a device to a bus with no free ports > usb: Proper error propagation for usb_device_attach errors > usb: Add a speedmask to devices > usb-linux: allow "compatible" high speed devices to connect at fullspeed > usb-bus: Don't allow speed mismatch while attaching devices > > Markus Armbruster (1): > usb-storage: Turn drive serial into a qdev property usb-storage.serial > > Peter Maydell (1): > hw/usb-ohci.c: Fix handling of remote wakeup corner cases > > hw/usb-bus.c | 31 ++++++++++----- > hw/usb-ccid.c | 1 + > hw/usb-desc.c | 14 ++++++ > hw/usb-ehci.c | 43 +++++++++++--------- > hw/usb-msd.c | 19 ++++++-- > hw/usb-ohci.c | 17 ++++++- > hw/usb.h | 4 ++ > usb-bsd.c | 2 + > usb-linux.c | 124 +++++++++++++++++++++++++++++++++++++++++++++------------ > 9 files changed, 191 insertions(+), 64 deletions(-) > ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-06-24 10:59 Gerd Hoffmann 2011-06-24 13:30 ` Hans de Goede @ 2011-06-27 20:19 ` Anthony Liguori 1 sibling, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2011-06-27 20:19 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 06/24/2011 05:59 AM, Gerd Hoffmann wrote: > Hi, > > Here comes the USB patch queue. Nothing major, just a bunch of little > fixes and improvements. > > please pull, Pulled. Thanks. Regards, Anthony Liguori > Gerd > > The following changes since commit 48e2faf222cbf4abab7c8e4b3f44229ec98eae7f: > > net: Warn about "-net nic" options which were ignored (2011-06-22 07:18:39 -0500) > > are available in the git repository at: > git://git.kraxel.org/qemu usb.17 > > Gerd Hoffmann (6): > usb-linux: add get_endp() > usb-linux: make iso urb count contigurable > usb-linux: track inflight iso urb count > ehci: add freq + maxframes properties > ehci: switch to nanoseconds > usb: ignore USB_DT_DEBUG > > Hans de Goede (5): > usb-bus: Don't allow attaching a device to a bus with no free ports > usb: Proper error propagation for usb_device_attach errors > usb: Add a speedmask to devices > usb-linux: allow "compatible" high speed devices to connect at fullspeed > usb-bus: Don't allow speed mismatch while attaching devices > > Markus Armbruster (1): > usb-storage: Turn drive serial into a qdev property usb-storage.serial > > Peter Maydell (1): > hw/usb-ohci.c: Fix handling of remote wakeup corner cases > > hw/usb-bus.c | 31 ++++++++++----- > hw/usb-ccid.c | 1 + > hw/usb-desc.c | 14 ++++++ > hw/usb-ehci.c | 43 +++++++++++--------- > hw/usb-msd.c | 19 ++++++-- > hw/usb-ohci.c | 17 ++++++- > hw/usb.h | 4 ++ > usb-bsd.c | 2 + > usb-linux.c | 124 +++++++++++++++++++++++++++++++++++++++++++++------------ > 9 files changed, 191 insertions(+), 64 deletions(-) > > ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2011-06-14 11:05 Gerd Hoffmann 2011-06-15 14:17 ` Anthony Liguori 0 siblings, 1 reply; 34+ messages in thread From: Gerd Hoffmann @ 2011-06-14 11:05 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, The USB patch queue has been rebased, got a minor fix (wrong comment in patch #8, spotted by David Ahern) and three new patches. I'm just posting the three new patches to avoid spamming the list with 30 identical patches ... please pull, Gerd The following changes since commit 0b862cedf36d927818c50584ddd611b0370673df: configure: Detect and don't try to use older libcurl (2011-06-13 21:16:27 +0200) are available in the git repository at: git://git.kraxel.org/qemu usb.16 Brad Hards (3): usb: Add defines for USB Serial Bus Release Number register usb: Use defines for serial bus release number register for UHCI usb: Use defines for serial bus release number register for EHCI Gerd Hoffmann (18): usb-linux: catch ENODEV in more places. usb-ehci: trace mmio and usbsts usb-ehci: trace state machine changes usb-ehci: trace port state usb-ehci: improve mmio tracing usb-ehci: trace buffer copy usb-ehci: add queue data struct usb-ehci: multiqueue support usb-ehci: fix offset writeback in ehci_buffer_rw usb-ehci: fix error handling. usb: cancel async packets on unplug usb-ehci: drop EXECUTING checks. usb-ehci: itd handling fixes. usb-ehci: split trace calls to handle arg count limits usb: documentation update usb-linux: only cleanup in host_close when host_open was successful. usb: don't call usb_host_device_open from vl.c usb-uhci: fix expire time initialization. Hans de Goede (9): ehci: fix a number of unused-but-set-variable warnings (new with gcc-4.6) usb-linux: Get speed from sysfs rather then from the connectinfo ioctl usb-linux: Teach about super speed usb-linux: Don't do perror when errno is not set usb-linux: Ensure devep != 0 usb-linux: Don't try to open the same device twice usb-linux: Enlarge buffer for descriptors to 8192 bytes usb-bus: Add knowledge of USB_SPEED_SUPER to usb_speed helper usb-bus: Don't detach non attached devices on device exit Kevin O'Connor (2): Fix USB mouse Set_Protocol behavior The USB tablet should not claim boot protocol support. Peter Maydell (2): hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register hw/usb-ohci.c: Implement remote wakeup docs/usb2.txt | 85 ++++ hw/milkymist-softusb.c | 10 +- hw/usb-bus.c | 10 +- hw/usb-ehci.c | 1198 ++++++++++++++++++++++++++++-------------------- hw/usb-hid.c | 5 +- hw/usb-musb.c | 23 +- hw/usb-ohci.c | 37 ++- hw/usb-uhci.c | 32 ++- hw/usb.h | 14 +- trace-events | 20 + usb-linux.c | 96 +++-- vl.c | 6 +- 12 files changed, 990 insertions(+), 546 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-06-14 11:05 Gerd Hoffmann @ 2011-06-15 14:17 ` Anthony Liguori 0 siblings, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2011-06-15 14:17 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 06/14/2011 06:05 AM, Gerd Hoffmann wrote: > Hi, > > The USB patch queue has been rebased, got a minor fix (wrong comment in > patch #8, spotted by David Ahern) and three new patches. I'm just > posting the three new patches to avoid spamming the list with 30 > identical patches ... > > please pull, > Gerd Pulled. Thanks. Regards, Anthony Liguori > > The following changes since commit 0b862cedf36d927818c50584ddd611b0370673df: > > configure: Detect and don't try to use older libcurl (2011-06-13 21:16:27 +0200) > > are available in the git repository at: > git://git.kraxel.org/qemu usb.16 > > Brad Hards (3): > usb: Add defines for USB Serial Bus Release Number register > usb: Use defines for serial bus release number register for UHCI > usb: Use defines for serial bus release number register for EHCI > > Gerd Hoffmann (18): > usb-linux: catch ENODEV in more places. > usb-ehci: trace mmio and usbsts > usb-ehci: trace state machine changes > usb-ehci: trace port state > usb-ehci: improve mmio tracing > usb-ehci: trace buffer copy > usb-ehci: add queue data struct > usb-ehci: multiqueue support > usb-ehci: fix offset writeback in ehci_buffer_rw > usb-ehci: fix error handling. > usb: cancel async packets on unplug > usb-ehci: drop EXECUTING checks. > usb-ehci: itd handling fixes. > usb-ehci: split trace calls to handle arg count limits > usb: documentation update > usb-linux: only cleanup in host_close when host_open was successful. > usb: don't call usb_host_device_open from vl.c > usb-uhci: fix expire time initialization. > > Hans de Goede (9): > ehci: fix a number of unused-but-set-variable warnings (new with gcc-4.6) > usb-linux: Get speed from sysfs rather then from the connectinfo ioctl > usb-linux: Teach about super speed > usb-linux: Don't do perror when errno is not set > usb-linux: Ensure devep != 0 > usb-linux: Don't try to open the same device twice > usb-linux: Enlarge buffer for descriptors to 8192 bytes > usb-bus: Add knowledge of USB_SPEED_SUPER to usb_speed helper > usb-bus: Don't detach non attached devices on device exit > > Kevin O'Connor (2): > Fix USB mouse Set_Protocol behavior > The USB tablet should not claim boot protocol support. > > Peter Maydell (2): > hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register > hw/usb-ohci.c: Implement remote wakeup > > docs/usb2.txt | 85 ++++ > hw/milkymist-softusb.c | 10 +- > hw/usb-bus.c | 10 +- > hw/usb-ehci.c | 1198 ++++++++++++++++++++++++++++-------------------- > hw/usb-hid.c | 5 +- > hw/usb-musb.c | 23 +- > hw/usb-ohci.c | 37 ++- > hw/usb-uhci.c | 32 ++- > hw/usb.h | 14 +- > trace-events | 20 + > usb-linux.c | 96 +++-- > vl.c | 6 +- > 12 files changed, 990 insertions(+), 546 deletions(-) > > ^ permalink raw reply [flat|nested] 34+ messages in thread
* [Qemu-devel] [PULL] usb patch queue @ 2011-05-04 15:41 Gerd Hoffmann 2011-05-05 18:28 ` Anthony Liguori 0 siblings, 1 reply; 34+ messages in thread From: Gerd Hoffmann @ 2011-05-04 15:41 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, The USB patch queue is back! I'm still busy catching up with the backlog, I know I didn't pick up everything from the list yet. If in doubt it doesn't hurt to resend usb related patches, with me being Cc'ed. This pull brings old stuff, most of the patches are several months old already. Finally the usb-host fixes from Hans are queued up for merge. Some async packet handling cleanups are in there to. Oh, and one more bugfix for the usb mass storage device. please pull, Gerd The following changes since commit d2d979c628e4b2c4a3cb71a31841875795c79043: NBD: Avoid leaking a couple of strings when the NBD device is closed (2011-05-03 11:29:21 +0200) are available in the git repository at: git://git.kraxel.org/qemu usb.7.pull Gerd Hoffmann (6): uhci: switch to QTAILQ uhci: keep uhci state pointer in async packet struct. ohci: get ohci state via container_of() musb: get musb state via container_of() usb: move complete callback to port ops usb: mass storage fix Hans de Goede (8): usb-linux: introduce a usb_linux_alt_setting function usb-linux: Get the alt. setting from sysfs rather then asking the dev usb-linux: Add support for buffering iso usb packets usb-linux: Refuse packets for endpoints which are not in the usb descriptor usb-linux: Refuse iso packets when max packet size is 0 (alt setting 0) usb-linux: We only need to keep track of 15 endpoints usb-linux: Add support for buffering iso out usb packets usb: control buffer fixes hw/usb-hub.c | 14 ++ hw/usb-msd.c | 5 +- hw/usb-musb.c | 75 ++++++----- hw/usb-ohci.c | 9 +- hw/usb-uhci.c | 82 ++++-------- hw/usb.c | 6 + hw/usb.h | 9 +- usb-linux.c | 394 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 8 files changed, 445 insertions(+), 149 deletions(-) ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [Qemu-devel] [PULL] usb patch queue 2011-05-04 15:41 Gerd Hoffmann @ 2011-05-05 18:28 ` Anthony Liguori 0 siblings, 0 replies; 34+ messages in thread From: Anthony Liguori @ 2011-05-05 18:28 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 05/04/2011 10:41 AM, Gerd Hoffmann wrote: > Hi, > > The USB patch queue is back! I'm still busy catching up with the > backlog, I know I didn't pick up everything from the list yet. If in > doubt it doesn't hurt to resend usb related patches, with me being > Cc'ed. > > This pull brings old stuff, most of the patches are several months old > already. Finally the usb-host fixes from Hans are queued up for merge. > Some async packet handling cleanups are in there to. Oh, and one more > bugfix for the usb mass storage device. > > please pull, > Gerd Pulled. Thanks. Regards, Anthony Liguori > > The following changes since commit d2d979c628e4b2c4a3cb71a31841875795c79043: > > NBD: Avoid leaking a couple of strings when the NBD device is closed (2011-05-03 11:29:21 +0200) > > are available in the git repository at: > git://git.kraxel.org/qemu usb.7.pull > > Gerd Hoffmann (6): > uhci: switch to QTAILQ > uhci: keep uhci state pointer in async packet struct. > ohci: get ohci state via container_of() > musb: get musb state via container_of() > usb: move complete callback to port ops > usb: mass storage fix > > Hans de Goede (8): > usb-linux: introduce a usb_linux_alt_setting function > usb-linux: Get the alt. setting from sysfs rather then asking the dev > usb-linux: Add support for buffering iso usb packets > usb-linux: Refuse packets for endpoints which are not in the usb descriptor > usb-linux: Refuse iso packets when max packet size is 0 (alt setting 0) > usb-linux: We only need to keep track of 15 endpoints > usb-linux: Add support for buffering iso out usb packets > usb: control buffer fixes > > hw/usb-hub.c | 14 ++ > hw/usb-msd.c | 5 +- > hw/usb-musb.c | 75 ++++++----- > hw/usb-ohci.c | 9 +- > hw/usb-uhci.c | 82 ++++-------- > hw/usb.c | 6 + > hw/usb.h | 9 +- > usb-linux.c | 394 ++++++++++++++++++++++++++++++++++++++++++++++++++------- > 8 files changed, 445 insertions(+), 149 deletions(-) > > ^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2012-02-29 21:07 UTC | newest] Thread overview: 34+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-10-13 11:08 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 1/9] usb-storage: fix NULL pointer dereference Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 2/9] usb-hub: need to check dev->attached Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 3/9] usb: fix port reset Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 4/9] usb-host: factor out code Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 5/9] usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSY Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 6/9] hw/usb-ohci: Fix OHCI_TD_T1 bit position definition Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 7/9] hw/usb-ohci: Honour endpoint maximum packet size Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 8/9] usb-hid: activate usb tablet / mouse after migration Gerd Hoffmann 2011-10-13 11:08 ` [Qemu-devel] [PATCH 9/9] usb-hub: don't trigger assert on packet completion Gerd Hoffmann 2011-10-13 11:34 ` Gerd Hoffmann 2011-10-14 16:25 ` [Qemu-devel] [PULL] usb patch queue Anthony Liguori -- strict thread matches above, loose matches on Subject: below -- 2012-02-28 10:20 Gerd Hoffmann 2012-02-29 21:07 ` Anthony Liguori 2011-11-01 14:56 Gerd Hoffmann 2011-11-01 18:13 ` Anthony Liguori 2011-09-02 9:56 Gerd Hoffmann 2011-09-07 8:41 ` Gerd Hoffmann 2011-09-08 14:23 ` Anthony Liguori 2011-08-11 7:03 Gerd Hoffmann 2011-08-12 7:02 ` Michael Tokarev 2011-08-12 7:57 ` Gerd Hoffmann 2011-08-12 13:04 ` Anthony Liguori 2011-07-20 10:23 Gerd Hoffmann 2011-07-08 9:50 Gerd Hoffmann 2011-07-12 14:52 ` Gerd Hoffmann 2011-07-19 15:59 ` Anthony Liguori 2011-06-24 10:59 Gerd Hoffmann 2011-06-24 13:30 ` Hans de Goede 2011-06-27 20:19 ` Anthony Liguori 2011-06-14 11:05 Gerd Hoffmann 2011-06-15 14:17 ` Anthony Liguori 2011-05-04 15:41 Gerd Hoffmann 2011-05-05 18:28 ` Anthony Liguori
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).