1. 08 8月, 2009 2 次提交
  2. 29 7月, 2009 19 次提交
  3. 13 7月, 2009 9 次提交
  4. 04 7月, 2009 1 次提交
  5. 16 6月, 2009 9 次提交
    • P
      USB: xhci depends on PCI. · 1b6ed69f
      Paul Mundt 提交于
      While it looks like xhci was written with both PCI and non-PCI in mind,
      apparently only the former has seen any testing. xhci-mem.o can be "fixed"
      with a linux/dmapool.h include, but there are still parts of the code that
      make use of struct pci_dev directly. So, at least more work is needed before
      this can be turned on for non-PCI builds:
      
        CC      drivers/usb/host/xhci-mem.o
      drivers/usb/host/xhci-mem.c: In function 'xhci_segment_alloc':
      drivers/usb/host/xhci-mem.c:45: error: implicit declaration of function 'dma_pool_alloc'
      drivers/usb/host/xhci-mem.c:45: warning: assignment makes pointer from integer without a cast
      drivers/usb/host/xhci-mem.c: In function 'xhci_segment_free':
      drivers/usb/host/xhci-mem.c:67: error: implicit declaration of function 'dma_pool_free'
      drivers/usb/host/xhci-mem.c: In function 'xhci_alloc_virt_device':
      drivers/usb/host/xhci-mem.c:239: warning: assignment makes pointer from integer without a cast
      drivers/usb/host/xhci-mem.c:248: warning: assignment makes pointer from integer without a cast
      drivers/usb/host/xhci-mem.c: In function 'xhci_mem_cleanup':
      drivers/usb/host/xhci-mem.c:578: error: implicit declaration of function 'dma_pool_destroy'
      drivers/usb/host/xhci-mem.c: In function 'xhci_mem_init':
      drivers/usb/host/xhci-mem.c:657: error: implicit declaration of function 'dma_pool_create'
      drivers/usb/host/xhci-mem.c:658: warning: assignment makes pointer from integer without a cast
      drivers/usb/host/xhci-mem.c:663: warning: assignment makes pointer from integer without a cast
      make[3]: *** [drivers/usb/host/xhci-mem.o] Error 1
      
        CC      drivers/usb/host/xhci-pci.o
      drivers/usb/host/xhci-pci.c: In function 'xhci_pci_reinit':
      drivers/usb/host/xhci-pci.c:39: error: implicit declaration of function 'pci_set_mwi'
      drivers/usb/host/xhci-pci.c: At top level:
      drivers/usb/host/xhci-pci.c:151: error: 'usb_hcd_pci_probe' undeclared here (not in a function)
      drivers/usb/host/xhci-pci.c:152: error: 'usb_hcd_pci_remove' undeclared here (not in a function)
      drivers/usb/host/xhci-pci.c:155: error: 'usb_hcd_pci_shutdown' undeclared here (not in a function)
      drivers/usb/host/xhci-pci.c:159: warning: function declaration isn't a prototype
      drivers/usb/host/xhci-pci.c:164: warning: function declaration isn't a prototype
      make[3]: *** [drivers/usb/host/xhci-pci.o] Error 1
      
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      1b6ed69f
    • S
      USB: xhci: Add Makefile, MAINTAINERS, and Kconfig entries. · eb6bab13
      Sarah Sharp 提交于
      Add Makefile and Kconfig entries for the xHCI host controller driver.
      List Sarah Sharp as the maintainer for the xHCI driver.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eb6bab13
    • S
      USB: xhci: Respect critical sections. · f88ba78d
      Sarah Sharp 提交于
      Narrow down time spent holding the xHCI spinlock so that it's only used to
      protect the xHCI rings, not as mutual exclusion.  Stop allocating memory
      while holding the spinlock and calling xhci_alloc_virt_device() and
      xhci_endpoint_init().
      
      The USB core should have locking in it to prevent device state to be
      manipulated by more than one kernel thread.  E.g. you can't free a device
      while you're in the middle of setting a new configuration.  So removing
      the locks from the sections where xhci_alloc_dev() and
      xhci_reset_bandwidth() touch xHCI's representation of the device should be
      OK.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f88ba78d
    • S
      USB: xHCI: Fix interrupt moderation. · a4d88302
      Sarah Sharp 提交于
      Mask off the lower 16 bits of the interrupt control register, instead of
      masking off the upper 16 bits.  The interrupt moderation interval field is
      the lower 16 bytes, and is set to 0x4000 (1ms) by default.  The previous
      code was adding 40 us to the default value, instead of setting it to 40
      us.  This makes performance really bad.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a4d88302
    • S
      USB: xhci: Remove packed attribute from structures. · 98441973
      Sarah Sharp 提交于
      The packed attribute allows gcc to muck with the alignment of data
      structures, which may lead to byte-wise writes that break atomicity of
      writes.  Packed should only be used when the compile may add undesired
      padding to the structure.  Each element of the structure will be aligned
      by C based on its size and the size of the elements around it.  E.g. a u64
      would be aligned on an 8 byte boundary, the next u32 would be aligned on a
      four byte boundary, etc.
      
      Since most of the xHCI structures contain only u32 bit values, removing
      the packed attribute for them should be harmless.  (A future patch will
      change some of the twin 32-bit address fields to one 64-bit field, but all
      those places have an even number of 32-bit fields before them, so the
      alignment should be correct.)  Add BUILD_BUG_ON statements to check that
      the compiler doesn't add padding to the data structures that have a
      hardware-defined layout.
      
      While we're modifying the registers, change the name of intr_reg to
      xhci_intr_reg to avoid global conflicts.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      98441973
    • S
      usb; xhci: Fix TRB offset calculations. · 6071d836
      Sarah Sharp 提交于
      Greg KH introduced a bug into xhci_trb_virt_to_dma() when he changed the
      type of offset to dma_addr_t from unsigned int and dropped the casts to
      unsigned int around the virtual address pointer subtraction.
      
      trb and seg->trbs are both valid pointers to virtual addresses, so the
      compiler will mod the subtraction by the size of union trb (16 bytes).
      segment_offset is an unsigned long, which is guaranteed to be at least as
      big as a void *.
      
      Drop the void * casts in the first if statement because trb and seg->trbs
      are both pointers of the same type (pointers to union trb).
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6071d836
    • S
      USB: xhci: Make xhci-mem.c include linux/dmapool.h · 527c6d7f
      Sarah Sharp 提交于
      xhci-mem.c includes calls to dma_pool_alloc() and other functions defined
      in linux/dmapool.h.  Make sure to include that header file.
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      527c6d7f
    • S
      USB: xhci: drop spinlock in xhci_urb_enqueue() error path. · c7959fb2
      Sarah Sharp 提交于
      Make sure the error path in xhci_urb_enqueue() releases the spinlock
      before it returns.  Reported by Oliver in
      	http://marc.info/?l=linux-usb&m=124091637311832&w=2Reported-by: NOliver Neukum <oliver@neukum.org>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c7959fb2
    • S
      USB: Change names of SuperSpeed ep companion descriptor structs. · f0058c62
      Sarah Sharp 提交于
      Differentiate between SuperSpeed endpoint companion descriptor and the
      wireless USB endpoint companion descriptor.  Make all structure names for
      this descriptor have "ss" (SuperSpeed) in them.  David Vrabel asked for
      this change in http://marc.info/?l=linux-usb&m=124091465109367&w=2Reported-by: NDavid Vrabel <david.vrabel@csr.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f0058c62