1. 10 2月, 2012 17 次提交
    • G
      usb: fold usb_generic_handle_packet into usb_handle_packet · 1977f93d
      Gerd Hoffmann 提交于
      There is no reason to have a separate usb_generic_handle_packet function
      any more, fold it into usb_handle_packet().  Also call the do_token_*
      functions which handle control transfer emulation for control pipe
      packets only.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      1977f93d
    • G
      usb: kill handle_packet callback · 7f74a56b
      Gerd Hoffmann 提交于
      All drivers except usb-hub use usb_generic_handle_packet.  The only
      reason the usb hub has its own function is that it used to be called
      with packets which are intended for downstream devices.  With the new,
      separate device lookup step this doesn't happen any more, so the need
      for a different handle_packet callback is gone.
      
      So we can kill the handle_packet callback and just call
      usb_generic_handle_packet directly.  The special hub handling in
      usb_handle_packet() can go away for the same reason.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7f74a56b
    • G
      usb-xhci: switch to usb_find_device() · e74495e3
      Gerd Hoffmann 提交于
      Switch over xHCI to use the new usb_find_device()
      function for device lookup.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e74495e3
    • G
      usb-musb: switch to usb_find_device() · 87e043f1
      Gerd Hoffmann 提交于
      Switch over musb to use the new usb_find_device()
      function for device lookup.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      87e043f1
    • G
      usb-ohci: switch to usb_find_device() · 993048bb
      Gerd Hoffmann 提交于
      Switch over OHCI to use the new usb_find_device()
      function for device lookup.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      993048bb
    • G
      usb-ehci: switch to usb_find_device() · 828143c6
      Gerd Hoffmann 提交于
      Switch over EHCI to use the new usb_find_device()
      function for device lookup.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      828143c6
    • G
      usb-uhci: switch to usb_find_device() · 461700c1
      Gerd Hoffmann 提交于
      Switch over UHCI to use the new usb_find_device()
      function for device lookup.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      461700c1
    • G
      usb: handle dev == NULL in usb_handle_packet() · 98861f51
      Gerd Hoffmann 提交于
      Allow passing in a NULL pointer, return USB_RET_NODEV in that case.
      Removes the burden to to a NULL pointer check from the callers.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      98861f51
    • G
      usb-hub: implement find_device · 06c75088
      Gerd Hoffmann 提交于
      Implement the find_device callback for the usb hub.  It'll loop over all
      ports, calling usb_find_device for all enabled ports until it finds a
      matching device.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      06c75088
    • G
      usb: add usb_find_device() · 73796fe6
      Gerd Hoffmann 提交于
      Add usb_find_device().  This function will check whenever a device with
      a specific address is connected to the specified port.  Usually this
      will just check state and address of the device hooked up to the port,
      but in case of a hub it will ask the hub to check all hub ports for a
      matching device.
      
      This patch doesn't put the code into use yet, see the following patches
      for details.
      
      The master plan is to separate device lookup and packet processing.
      Right now the usb code simply walks all devices, calls
      usb_handle_packet() on each until one accepts the packet (by returning
      something different that USB_RET_NODEV).  I want to have a device lookup
      first, then call usb_handle_packet() once, for the device which actually
      processes the packet.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      73796fe6
    • G
      usb: kill usb_send_msg · 70fc20d4
      Gerd Hoffmann 提交于
      No users left.  Zap it.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      70fc20d4
    • G
      usb: kill USB_MSG_RESET · d28f4e2d
      Gerd Hoffmann 提交于
      The USB subsystem pipes internal reset notifications through
      usb_handle_packet() with a special magic PID.  This indirection
      is a pretty pointless excercise as it ends up being handled by
      usb_generic_handle_packet anyway.
      
      Replace the USB_MSG_RESET with a usb_device_reset() function
      which can be called directly.  Also rename the existing usb_reset()
      function to usb_port_reset() to avoid confusion.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      d28f4e2d
    • G
      usb: kill USB_MSG_{ATTACH,DETACH} · d1f8b536
      Gerd Hoffmann 提交于
      The USB subsystem pipes internal attach/detach notifications through
      usb_handle_packet() with a special magic PID.  This indirection is a
      pretty pointless excercise as it ends up being handled by
      usb_generic_handle_packet anyway.  Remove it.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      d1f8b536
    • H
      usb-redir: Add the posibility to filter out certain devices from redirecion · 6af16589
      Hans de Goede 提交于
      This patch adds the posibility to filter out certain devices from redirecion.
      To use this pass the filter property to -device usb-redir.  The filter
      property takes a string consisting of filter rules, the format for a rule is:
      <class>:<vendor>:<product>:<version>:<allow>
      
      -1 can be used to allow any value for a field.
      
      Muliple rules can be concatonated using | as a separator. Note that if
      a device matches none of the passed in rules, redirecting it will not be
      allowed!
      
      Example:
      -device usb-redir,filter='-1:0x0781:0x5567:-1:0|0x08:-1:-1:-1:1'
      
      This example will deny the Sandisk Cruzer Blade being redirected, as it
      has a usb id of 0781:5567, it will allow any other usb mass storage devices,
      and it will deny any other devices (the default for devices not matching any
      of the rules.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      6af16589
    • H
      usb-ehci: Clear the portstatus powner bit on device disconnect · f76e1d81
      Hans de Goede 提交于
      According to the EHCI spec port ownership should revert to the EHCI controller
      on device disconnect. This fixes the problem of a port getting stuck on USB 1
      when using redirection and plugging in a USB 2 device after a USB 1 device
      has been redirected.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      f76e1d81
    • G
      usb-uhci: implement bandwidth management · 3200d108
      Gerd Hoffmann 提交于
      The OS is allowed to make the UHCI Controller run in circles.  That is
      usually done to serve multiple connected USB devices in a robin-round
      fashion, so the available USB bandwidth is evenly distributed between
      devices.
      
      The uhci emulation handles this in a very poor way though.  When it
      figures it runs in circles it stops processing unconditionally, so
      it usually processes at most a single transfer desriptor per queue,
      even if there are multiple transfer descriptors are queued up.
      
      This patch makes uhci act in a more sophisticated way.  It keeps track
      of successful processed transfer descriptors and transfered bytes.  Then
      it will stop processing when there is nothing to do (no transfer
      descriptor was completed the last round) or when the transfered data
      reaches the usb bandwidth limit.
      
      Result is that the usb-storage devices connected to uhci are ten times
      faster, mkfs.vfat time for a 64M stick goes down from five seconds to
      a half second.  Reason for this is that we are now processing up to 20
      transfer descriptors (with 64 bytes each) per frame instead of a single
      one.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      3200d108
    • S
      make: Remove duplicate use of GLIB_CFLAGS · 57c83dac
      Stefan Weil 提交于
      Makefile, Makefile.hw, Makefile.target and libcacard/Makefile
      added GLIB_CFLAGS to QEMU_CFLAGS.
      
      Makefile.objs does this, too, and is included by all other
      Makefiles, so GLIB_CFLAGS were added twice (reported by malc).
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      57c83dac
  2. 09 2月, 2012 1 次提交
  3. 08 2月, 2012 6 次提交
    • A
      Merge remote-tracking branch 'bonzini/qdev-props-for-anthony' into staging · a6421530
      Anthony Liguori 提交于
      * bonzini/qdev-props-for-anthony: (25 commits)
        qdev: remove unused fields from PropertyInfo
        qdev: initialize properties via QOM
        qdev: inline qdev_prop_set into qdev_prop_set_ptr
        qdev: access properties via QOM
        qdev: fix off-by-one
        qdev: let QOM free properties
        qdev: remove parse/print methods for pointer properties
        qdev: make the non-legacy pci address property accept an integer
        qdev: remove parse/print methods for mac properties
        qdev: remove print/parse methods from LostTickPolicy properties
        qdev: remove parse method for string properties
        qdev: allow reusing get/set for legacy property
        qdev: remove direct calls to print/parse
        qom: add property get/set wrappers for links
        qom: fix canonical paths vs. interfaces
        qom: use object_resolve_path_type for links
        qom: add object_resolve_path_type
        qom: fix off-by-one
        qom: add property get/set wrappers for C types
        qom: add QObject-based property get/set wrappers
        ...
      a6421530
    • A
      Merge remote-tracking branch 'aneesh/for-upstream' into staging · dc717bfd
      Anthony Liguori 提交于
      * aneesh/for-upstream:
        hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode
        hw/9pfs: Update MAINTAINERS file
        fsdev: Fix parameter parsing for proxy helper
        hw/9pfs: Fix crash when mounting with synthfs
        hw/9pfs: Preserve S_ISGID
        hw/9pfs: Add new security model mapped-file.
      dc717bfd
    • A
      Merge remote-tracking branch 'sweil/w32' into staging · a283b1b8
      Anthony Liguori 提交于
      * sweil/w32:
        w32: Initialise critical section before starting thread (fix #922131)
        w32: Build windows and console executables
      a283b1b8
    • M
      Restore consistent formatting · cf4dc461
      malc 提交于
      Signed-off-by: Nmalc <av1474@comtv.ru>
      cf4dc461
    • S
      w32: Initialise critical section before starting thread (fix #922131) · edc1de97
      Stefan Weil 提交于
      This patch was contributed by Bogdan Harjoc. I added some assertions.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      edc1de97
    • S
      w32: Build windows and console executables · 0fa5491e
      Stefan Weil 提交于
      System emulation executables with SDL are typically windows
      executables. Sometimes console executables are more useful,
      so create both variants if linker option -mwindows was detected.
      
      v2:
      This version uses QEMU_PROGW / QEMU_PROG instead of QEMU_PROG / QEMU_PROGC.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      0fa5491e
  4. 07 2月, 2012 16 次提交