[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/28] usb-musb: switch to usb_find_device()
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 13/28] usb-musb: switch to usb_find_device() |
Date: |
Fri, 10 Feb 2012 12:43:09 +0100 |
Switch over musb to use the new usb_find_device()
function for device lookup.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb-musb.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/usb-musb.c b/hw/usb-musb.c
index c2753c9..ecac631 100644
--- a/hw/usb-musb.c
+++ b/hw/usb-musb.c
@@ -605,6 +605,7 @@ static int musb_timeout(int ttype, int speed, int val)
static void musb_packet(MUSBState *s, MUSBEndPoint *ep,
int epnum, int pid, int len, USBCallback cb, int dir)
{
+ USBDevice *dev;
int ret;
int idx = epnum && dir;
int ttype;
@@ -628,10 +629,8 @@ static void musb_packet(MUSBState *s, MUSBEndPoint *ep,
ep->packey[dir].ep = ep;
ep->packey[dir].dir = dir;
- if (s->port.dev)
- ret = usb_handle_packet(s->port.dev, &ep->packey[dir].p);
- else
- ret = USB_RET_NODEV;
+ dev = usb_find_device(&s->port, ep->packey[dir].p.devaddr);
+ ret = usb_handle_packet(dev, &ep->packey[dir].p);
if (ret == USB_RET_ASYNC) {
ep->status[dir] = len;
--
1.7.1
- [Qemu-devel] [PATCH 14/28] usb-xhci: switch to usb_find_device(), (continued)
- [Qemu-devel] [PATCH 14/28] usb-xhci: switch to usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 23/28] xhci: signal low- and fullspeed support, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 15/28] usb: kill handle_packet callback, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 12/28] usb-ohci: switch to usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 05/28] usb: kill USB_MSG_RESET, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 16/28] usb: fold usb_generic_handle_packet into usb_handle_packet, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 26/28] xhci: kill port arg from xhci_setup_packet, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 09/28] usb: handle dev == NULL in usb_handle_packet(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 11/28] usb-ehci: switch to usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 20/28] usb: maintain async packet list per endpoint, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 13/28] usb-musb: switch to usb_find_device(),
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 27/28] xhci: remote wakeup support, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 21/28] usb: pass USBEndpoint to usb_wakeup, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 17/28] usb: USBPacket: add status, rename owner -> ep, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 25/28] xhci: stop on errors, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 19/28] usb: Set USBEndpoint in usb_packet_setup()., Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 28/28] xhci: handle USB_RET_NAK, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 24/28] xhci: add trb type name lookup support., Gerd Hoffmann, 2012/02/10
- Re: [Qemu-devel] [PULL 00/28] usb patch queue, Anthony Liguori, 2012/02/15