1. 24 Jun, 2008 1 commit
  2. 30 May, 2008 20 commits
  3. 29 May, 2008 19 commits
    • Li Yang's avatar
      USB: fsl_usb2_udc: fix recursive lock · 185e3dea
      Li Yang authored
      UDC needs to release lock before calling out to gadget driver, since
      it may need to reenter.  The change fixes kernel BUG observed on rt
      kernel.
      
      > kernel BUG at kernel/rtmutex.c:683!
      > stopped custom tracer.
      > Oops: Exception in kernel mode, sig: 5 [#1]
      > PREEMPT MPC834x ITX
      > NIP: c021629c LR: c0216270 CTR: 00000000
      > REGS: df761d70 TRAP: 0700   Not tainted  (2.6.23.9-rt13)
      > MSR: 00021032 <ME,IR,DR>  CR: 28000022  XER: 00000000
      > TASK = df632080[241] 'IRQ-38' THREAD: df760000
      > GPR00: 00000001 df761e20 df632080 00000000 11111111 00000000 df761e6c
      > 00000000
      > GPR08: df761e48 00000000 df761e50 00000000 80000000 ede5cdde 1fffd000
      > 00800000
      > GPR16: ffffffff 00000000 007fff00 00000040 00000000 007ffeb0 00000000
      > 1fff8b08
      > GPR24: 00000000 00000026 00000000 df79a320 c026b2e8 c02240bc 00009032
      > df79a320
      > NIP [c021629c] rt_spin_lock_slowlock+0x9c/0x200
      > LR [c0216270] rt_spin_lock_slowlock+0x70/0x200
      > Call Trace:
      > [df761e20] [c0216270] rt_spin_lock_slowlock+0x70/0x200 (unreliable)
      > [df761e90] [c0182828] fsl_ep_disable+0xcc/0x154
      > [df761eb0] [c0184d30] eth_reset_config+0x88/0x1d0
      > [df761ed0] [c0184ec0] eth_disconnect+0x48/0x64
      > [df761ef0] [c01831a4] reset_queues+0x60/0x78
      > [df761f00] [c0183b74] fsl_udc_irq+0x9b8/0xa58
      > [df761f50] [c003ef30] handle_IRQ_event+0x64/0x100
      > [df761f80] [c003f758] thread_simple_irq+0x6c/0xc8
      > [df761fa0] [c003f888] do_irqd+0xd4/0x2e4
      > [df761fd0] [c0032284] kthread+0x50/0x8c
      > [df761ff0] [c000f9b4] kernel_thread+0x44/0x60
      Signed-off-by: default avatarLi Yang <leoli@freescale.com>
      Cc: Eugene T. Bordenkircher <Eugene_Bordenkircher@selinc.com>
      Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      185e3dea
    • Michael Karcher's avatar
      USB: usb-serial: option: Don't match Huawei driver CD images · a7f3872c
      Michael Karcher authored
      Add the interface info matching to all Huawei cards, as they all also
      contain a Mass Storage Device interface (usually containing Windows
      drivers) which should not get bound by this driver.
      
      See also drivers/usb/storage/unusual_devs.h
      Signed-off-by: default avatarMichael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a7f3872c
    • Steve Murphy's avatar
      USB: pl2303: another product ID · 4be2fa18
      Steve Murphy authored
      I've just got a USB GPRS/EDGE modem branded Manufacturer Micromax Model
      MMX610U (see http://www.airtel.in/level2_t3data.aspx?path=1/106/179)
      working by adding another product ID to pl2303.  Modem info reports same
      module as  Max Arnold's i.e.SIMCOM SIM600  but  with product ID 0x0612
      (cf Ox0611).
      
      From: Steve Murphy <steve@gnusis.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4be2fa18
    • René Rebe's avatar
      USB: add another scanner quirk · 598eff6d
      René Rebe authored
      Like the HP53{00,70} scanner other devices of the OEM Avision require
      the USB_QUIRK_STRING_FETCH_255 to correct set a configuration with
      "recent" Linux kernels.
      Signed-off-by: default avatarRené Rebe <rene@exactcode.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      598eff6d
    • Javier Smaldone's avatar
      USB: Add support for ROKR W5 in unusual_devs.h · 2a8bc9e7
      Javier Smaldone authored
      This patch adds support for rev 2 of an existing unusual_devs entry
      enabling ROKR W5s to work. Greg, please apply.
      
      From: Javier Smaldone <javier@smaldone.com.ar>
      Signed-off-by: default avatarPhil Dibowitz <phil@ipom.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2a8bc9e7
    • Phil Dibowitz's avatar
      USB: Fix M600i unusual_devs entry · c5f23b0e
      Phil Dibowitz authored
      It turns out that the unusual_devs entry for the Motorola M600i needs
      another flag. This patch adds it. Thanks to Atte André Jensen
      <atte@ballbreaker.dk>.
      Signed-off-by: default avatarPhil Dibowitz <phil@ipom.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c5f23b0e
    • Alan Stern's avatar
      USB: usb-storage: unusual_devs update for Cypress ATACB · c7257bd2
      Alan Stern authored
      This patch (as1101) updates the unusual_devs entry for the Cypress
      ATACB pass-through.  The protocol field is changed from US_PR_BULK to
      US_PR_DEVICE, since the Cypress devices already set bInterfaceProtocol
      to Bulk-only.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c7257bd2
    • Alan Stern's avatar
      USB: EHCI: fix performance regression · fa38dfcc
      Alan Stern authored
      This patch (as1099) fixes a performance regression in ehci-hcd.  The
      fundamental problem is that queue headers get removed from the
      schedule too quickly, since the code checks for a counter advancing
      rather than making an actual time-based check.  The latency involved
      in removing the queue header and then relinking it can severely
      degrade certain kinds of workloads.
      
      The patch replaces a simple counter with a timestamp derived from the
      controller's uframe value.  In addition, the delay for unlinking an
      idle queue header is increased from 5 ms to 10 ms; since some
      controllers (nVidia) have a latency of up to 1 ms for unlinking, this
      reduces the relative impact from 20% to 10%.
      
      Finally, a logical error left over from the IAA watchdog-timer
      conversion is corrected.  Now the driver will always either unlink an
      idle queue header or set up a timer to unlink it later.  The old code
      would sometimes fail to do either.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Leonid <leonidv11@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fa38dfcc
    • Alan Stern's avatar
      USB: EHCI: fix bug in Iso scheduling · b40e43fc
      Alan Stern authored
      This patch (as1098) changes the way ehci-hcd schedules its periodic
      Iso transfers.  That the current scheduling code is wrong is clear on
      the face of it: Sometimes it returns -EL2NSYNC (meaning that an URB
      couldn't be scheduled because it was submitted too late), but it does
      this even when the URB_ISO_ASAP flag is set (meaning the URB should be
      scheduled as soon as possible).
      
      The new code properly implements as-soon-as-possible scheduling,
      assigning the next unexpired slot as the URB's starting point.  It
      also is more careful about checking for Iso URB completion: It doesn't
      bother to check for activity during frames that are already over,
      and it allows for the possibility that some of the URB's packets may
      have raced the hardware when they were submitted and so never got used
      (the packet status is set to -EXDEV).
      
      This fixes problems several people have experienced with USB video
      applications.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b40e43fc
    • Alan Stern's avatar
      USB: EHCI: fix remote-wakeup regression · d1f114d1
      Alan Stern authored
      This patch (as1097) fixes a bug in the remote-wakeup handling in
      ehci-hcd.  The driver currently does not keep track of whether the
      change-suspend feature is enabled for each port; the feature is
      automatically reset the first time it is read.  But recent changes to
      the hub driver require that the feature be read at least twice in
      order to work properly.
      
      A bit-vector is added for storing the change-suspend feature values.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d1f114d1
    • Alan Stern's avatar
      USB: EHCI: suppress unwanted error messages · 3a31155c
      Alan Stern authored
      This patch (as1096) fixes an annoying problem: When a full-speed or
      low-speed device is plugged into an EHCI controller, it fails to
      enumerate at high speed and then is handed over to the companion
      controller.  But usbcore logs a misleading and unwanted error message
      when the high-speed enumeration fails.
      
      The patch adds a new HCD method, port_handed_over, which asks whether
      a port has been handed over to a companion controller.  If it has, the
      error message is suppressed.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3a31155c
    • Alan Stern's avatar
      USB: EHCI: fix up root-hub TT mess · a8e51775
      Alan Stern authored
      This patch (as1095) cleans up the HCD glue and several of the EHCI
      bus-glue files.  The ehci->is_tdi_rh_tt flag is redundant, since it
      means the same thing as the hcd->has_tt flag, so it is removed and the
      other flag used in its place.
      
      Some of the bus-glue files didn't get the relinquish_port method added
      to their hc_driver structures.  Although that routine currently
      doesn't do anything for controllers with an integrated TT, in the
      future it might.  So the patch adds it where it is missing.
      
      Lastly, some of the bus-glue files have erroneous entries for their
      hc_driver's suspend and resume methods.  These method pointers are
      specific to PCI and shouldn't be used otherwise.
      
      (The patch also includes an invisible whitespace fix.)
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      a8e51775
    • Alan Stern's avatar
      USB: add all configs to the "descriptors" attribute · 217a9081
      Alan Stern authored
      This patch (as1094) changes the output of the "descriptors" binary
      attribute.  Now it will contain the device descriptor followed by all
      the configuration descriptors, not just the descriptor for the current
      config.
      
      Userspace libraries want to have access to the kernel's cached
      descriptor information, so they can learn about device characteristics
      without having to wake up suspended devices.  So far the only user of
      this attribute is the new libusb-1.0 library; thus changing its
      contents shouldn't cause any problems.
      
      This should be considered for 2.6.26, if for no other reason than to
      minimize the range of releases in which the attribute contains only the
      current config descriptor.
      
      Also, it doesn't hurt that the patch removes the device locking --
      which was formerly needed in order to know for certain which config was
      indeed current.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      217a9081
    • Alan Stern's avatar
      USB: fix possible deadlock involving sysfs attributes · e16362a0
      Alan Stern authored
      There is a potential deadlock when the usb_generic driver is unbound
      from a device.  The problem is that generic_disconnect() is called
      with the device lock held, and it removes a bunch of device attributes
      from sysfs.  If a user task happens to be running an attribute method
      at the time, the removal will block until the method returns.  But at
      least one of the attribute methods (the store routine for power/level)
      needs to acquire the device lock!
      
      This patch (as1093) eliminates the deadlock by moving the calls to
      create and remove the sysfs attributes from the usb_generic driver
      into usb_new_device() and usb_disconnect(), where they can be invoked
      without holding the device lock.
      
      Besides, the other sysfs attributes are created when the device is
      registered and removed when the device is unregistered.  So it seems
      only fitting for the extra attributes to be created and removed at the
      same time.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e16362a0
    • Matthew Garrett's avatar
      USB: Firmware loader driver for USB Apple iSight camera · 62d104d0
      Matthew Garrett authored
      Uninitialised Apple iSight drivers present with a distinctive USB ID.
      Once firmware has been uploaded, they disconnect and reconnect with a
      new ID. At this point they can be driven by the uvcvideo driver. As this
      is unique to the Apple cameras and not functionality shared by any other
      UVC devices, it makes sense to provide the firmware loading
      functionality in a separate driver. This driver will read an isight.fw
      file extracted from the Apple driver using the tools at
      http://bersace03.free.fr/ift/ and upload it to the camera. It will also
      handle the case where the device loses its firmware during hibernation
      and must have it reloaded.
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      62d104d0
    • Ray Molenkamp's avatar
      USB: FTDI_SIO : Add support for Matrix Orbital PID Range · ebb3770c
      Ray Molenkamp authored
      This patch adds support for the range of PIDs
      that have been allocated for FTDI based devices
      at Matrix Orbital.
      
      A small number of units have been shipped early 2008
      with a faulty USB Descriptor.  Products that may have
      this issue have been marked with the existing quirk to
      work around the problem.
      Signed-off-by: default avatarR. Molenkamp <rmolenkamp@matrixorbital.ca>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ebb3770c
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq · 4bd27972
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
        [CPUFREQ] fix double unlock of cpu_policy_rwsem in drivers/cpufreq/cpufreq.c
      4bd27972
    • Linus Torvalds's avatar
      Merge branch 'sched-fixes-for-linus' of... · a7f75d3b
      Linus Torvalds authored
      Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        sched: re-tune NUMA topologies
        sched: stop wake_affine from causing serious imbalance
        sched: fix sched_clock_cpu()
        revert ("sched: fair-group: SMP-nice for group scheduling")
        sched: cleanup
        show_schedstat(): fix memleak
        sched: unite unlikely pairs in rt_policy() and schedule_debug()
        revert ("sched: fair: weight calculations")
      a7f75d3b
    • Lothar Waßmann's avatar
      [CPUFREQ] fix double unlock of cpu_policy_rwsem in drivers/cpufreq/cpufreq.c · dca02613
      Lothar Waßmann authored
      In drivers/cpufreq/cpufreq.c the function cpufreq_add_dev() takes the
      error exit 'err_out_unregister' from different places once with the
      'cpu_policy_rwsem' lock held, once with the lock released:
      |		if (ret)
      |			goto err_out_unregister;
      |	}
      |
      |	policy->governor = NULL; /* to assure that the starting sequence is
      |				  * run in cpufreq_set_policy */
      |
      |	/* set default policy */
      |	ret = __cpufreq_set_policy(policy, &new_policy);
      |	policy->user_policy.policy = policy->policy;
      |	policy->user_policy.governor = policy->governor;
      |
      |	unlock_policy_rwsem_write(cpu);
      |
      |	if (ret) {
      |		dprintk("setting policy failed\n");
      |		goto err_out_unregister;
      |	}
      
      This leads to the following error message in case of a failing
      __cpufreq_set_policy() call:
      =====================================
      [ BUG: bad unlock balance detected! ]
      -------------------------------------
      swapper/1 is trying to release lock (&per_cpu(cpu_policy_rwsem, cpu)) at:
      [<c01b4564>] unlock_policy_rwsem_write+0x30/0x40
      but there are no more locks to release!
      
      other info that might help us debug this:
      1 lock held by swapper/1:
       #0:  (sysdev_drivers_lock){--..}, at: [<c018fd18>] sysdev_driver_register+0x74/0x130
      
      stack backtrace:
      [<c002f588>] (dump_stack+0x0/0x14) from [<c00692fc>] (print_unlock_inbalance_bug+0xc8/0x104)
      [<c0069234>] (print_unlock_inbalance_bug+0x0/0x104) from [<c006b7ac>] (lock_release_non_nested+0xc4/0x19c)
       r6:00000028 r5:c3c1ab80 r4:c01b4564
      [<c006b6e8>] (lock_release_non_nested+0x0/0x19c) from [<c006b9e0>] (lock_release+0x15c/0x18c)
       r8:60000013 r7:00000001 r6:c01b4564 r5:c0541bb4 r4:c3c1ab80
      [<c006b884>] (lock_release+0x0/0x18c) from [<c0061ba0>] (up_write+0x24/0x30)
       r8:c0541b80 r7:00000000 r6:ffffffea r5:c3c34828 r4:c0541b8c
      [<c0061b7c>] (up_write+0x0/0x30) from [<c01b4564>] (unlock_policy_rwsem_write+0x30/0x40)
       r4:c3c34884
      [<c01b4534>] (unlock_policy_rwsem_write+0x0/0x40) from [<c01b4c40>] (cpufreq_add_dev+0x324/0x398)
      [<c01b491c>] (cpufreq_add_dev+0x0/0x398) from [<c018fd64>] (sysdev_driver_register+0xc0/0x130)
      [<c018fca4>] (sysdev_driver_register+0x0/0x130) from [<c01b3574>] (cpufreq_register_driver+0xbc/0x174)
      Signed-off-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      dca02613