1. 11 12月, 2008 2 次提交
  2. 01 12月, 2008 2 次提交
  3. 20 11月, 2008 1 次提交
  4. 14 11月, 2008 5 次提交
    • A
      USB: EHCI: fix divide-by-zero bug · 372dd6e8
      Alan Stern 提交于
      This patch (as1164) fixes a bug in the EHCI scheduler.  The interval
      value it uses is already in linear format, not logarithmically coded.
      The existing code can sometimes crash the system by trying to divide
      by zero.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      372dd6e8
    • A
      USB: EHCI: fix handling of dead controllers · 67b2e029
      Alan Stern 提交于
      This patch (as1165) makes a few small changes in the logic used by
      ehci-hcd when it encounters a controller error:
      
      	Instead of printing out the masked status, it prints the
      	original status as read directly from the hardware.
      
      	It doesn't check for the STS_HALT status bit before taking
      	action.  The mere fact that the STS_FATAL bit is set means
      	that something bad has happened and the controller needs to
      	be reset.  With the old code this test could never succeed
      	because the STS_HALT bit was masked out from the status.
      
      I anticipate that this will prevent the occasional "irq X: nobody cared"
      problem people encounter when their EHCI controllers die.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      67b2e029
    • Y
      usb: r8a66597-hcd: fix wrong data access in SuperH on-chip USB · 58639646
      Yoshihiro Shimoda 提交于
      When I used SuperH on-chip USB, there was the problem that accessed
      r8a66597_root_hub which was not allocated.
      Signed-off-by: NYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      58639646
    • S
      USB: remove optional bus bindings in isp1760, fixing runtime warning · ff30bf1c
      Sebastian Andrzej Siewior 提交于
      Roland Reported the following:
      | kmem_cache_create: duplicate cache isp1760_qtd
      | Pid: 461, comm: modprobe Tainted: G        W  2.6.28-rc2-git3-default #4
      | Call Trace:
      |  [<c017540e>] kmem_cache_create+0xc9/0x3a3
      |  [<c0159a8d>] free_pages_bulk+0x16c/0x1c9
      |  [<f165c05f>] isp1760_init+0x0/0xb [isp1760]
      |  [<f165c018>] init_kmem_once+0x18/0x5f [isp1760]
      |  [<f165c064>] isp1760_init+0x5/0xb [isp1760]
      |  [<c010113d>] _stext+0x4d/0x148
      |  [<c0142936>] load_module+0x12cd/0x142e
      |  [<c01743c4>] kmem_cache_destroy+0x0/0xd7
      |  [<c0142b1e>] sys_init_module+0x87/0x176
      |  [<c01039eb>] sysenter_do_call+0x12/0x2f
      
      The reason, is that ret is initialized with ENODEV instead of 0 _or_
      the kmem cache is not freed in error case with no bus binding.
      
      The difference between OF+PCI and OF only is
      | 15148     804      32   15984    3e70 isp1760-of-pci.o
      | 13748     676       8   14432    3860 isp1760-of.o
      
      about 1.5 KiB.
      
      Until there is a checkbox where the user *must* select atleast one item,
      and may select multiple entries I don't make it selectable anymore.
      Having a driver which can't be used under any circumstances is broken
      anyway and I've seen distros shipping it that way.
      Reported-by: NRoland Kletzing <devzero@web.de>
      Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>a
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ff30bf1c
    • G
      USB: Fix PS3 USB shutdown problems · ddcb01ff
      Geoff Levand 提交于
      Add ehci_shutdown() or ohci_shutdown() calls to the USB
      PS3 bus glue.  ehci_shutdown() and ohci_shutdown() do some
      controller specific cleanups not done by usb_remove_hcd().
      
      Fixes errors on shutdown or reboot similar to these:
      
        ps3-ehci-driver sb_07: HC died; cleaning up
        irq 51: nobody cared (try booting with the "irqpoll" option)
      
      Related bugzilla reports:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=11819
        http://bugzilla.terrasoftsolutions.com/show_bug.cgi?id=317Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ddcb01ff
  5. 12 11月, 2008 1 次提交
  6. 23 10月, 2008 1 次提交
  7. 21 10月, 2008 1 次提交
  8. 18 10月, 2008 15 次提交
    • G
      USB: remove err() macro from more usb drivers · 802f389a
      Greg Kroah-Hartman 提交于
      USB should not be having it's own printk macros, so remove err() and
      use the system-wide standard of dev_err() wherever possible.  In the
      few places that will not work out, use a basic printk().
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      802f389a
    • G
      USB: remove info() macro from remaining usb drivers · 5909f6ea
      Greg Kroah-Hartman 提交于
      USB should not be having it's own printk macros, so remove info() and
      use the system-wide standard of dev_info() wherever possible.  In the
      few places that will not work out, use a basic printk().
      
      Clean up the remaining usages of this in the drivers/usb/ directory.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5909f6ea
    • A
      USB: OHCI: fix endless polling behavior · 71b7497c
      Alan Stern 提交于
      This patch (as1149) fixes an obscure problem in OHCI polling.  In the
      current code, if the RHSC interrupt status flag turns on at a time
      when RHSC interrupts are disabled, it will remain on forever:
      
      	The interrupt handler is the only place where RHSC status
      	gets turned back off;
      
      	The interrupt handler won't turn RHSC status off because it
      	doesn't turn off status flags if the corresponding interrupt
      	isn't enabled;
      
      	RHSC interrupts will never get enabled because
      	ohci_root_hub_state_changes() doesn't reenable RHSC if RHSC
      	status is on!
      
      As a result we will continue polling indefinitely instead of reverting
      to interrupt-driven operation, and the root hub will not autosuspend.
      This particular sequence of events is not at all unusual; in fact
      plugging a USB device into an OHCI controller will usually cause it to
      occur.
      
      Of course, this is a bug.  The proper thing to do is to turn off RHSC
      status just before reading the actual port status values.  That way
      either a port status change will be detected (if it occurs before the
      status read) or it will turn RHSC back on.  Possibly both, but that
      won't hurt anything.
      
      We can still check for systems in which RHSC is totally broken, by
      re-reading RHSC after clearing it and before reading the port
      statuses.  (This re-read has to be done anyway, to post the earlier
      write.)  If RHSC is on but no port-change statuses are set, then we
      know that RHSC is broken and we can avoid re-enabling it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      71b7497c
    • A
      USB: EHCI: fix remote-wakeup support for ARC/TDI core · eafe5b99
      Alan Stern 提交于
      This patch (as1147) fixes the remote-wakeup support for EHCI
      controllers using the ARC/TDI "embedded-TT" core.  These controllers
      turn off the RESUME bit by themselves when a port resume is complete;
      hence we need to keep separate track of which ports are suspended or
      in the process of resuming.
      
      The patch also makes a couple of small improvements in ehci_irq(),
      replacing reads of the command register with the value already stored
      in a local variable.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NThomas Reitmayr <treitmayr@devbase.at>
      CC: David Brownell <david-b@pacbell.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eafe5b99
    • A
      USB: EHCI: log a warning if ehci-hcd is not loaded first · 9beeee65
      Alan Stern 提交于
      This patch (as1139) adds a warning to the system log whenever ehci-hcd
      is loaded after ohci-hcd or uhci-hcd.  Nowadays most distributions are
      pretty good about not doing this; maybe the warning will help convince
      anyone still doing it wrong.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>  [2.6.27]
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9beeee65
    • A
      USB: EHCI, OHCI, UHCI: remove version numbers · 2b70f073
      Alan Stern 提交于
      This patch (as1145) removes the essentially useless driver-version
      strings from ehci-hcd, ohci-hcd, and uhci-hcd.  It also unifies the
      form of the banner lines they display upon loading and adds a missing
      test for usb_disabled() to ehci-hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2b70f073
    • J
      USB: isp1760: Use an IS_ERR test rather than a NULL test · ce5dee50
      Julien Brunel 提交于
      In case of error, the function isp1760_register returns an ERR
      pointer, but never returns a NULL pointer. So after a call to this
      function, a NULL test should be replaced by an IS_ERR test. Moreover,
      we have noticed that:
      (1) the result of isp1760_register is assigned through the function
      pci_set_drvdata without an error test,
      (2) if the call to isp1760_register fails, the current function
      (isp1761_pci_probe) returns 0, and if it succeeds, it returns -ENOMEM,
      which seems odd.
      
      Thus, we suggest to move the test before the call to pci_set_drvdata
      to correct (1), and to turn it into a non IS_ERR test to correct (2).
      
      The semantic match that finds this problem is as follows: 
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @bad_null_test@
      expression x,E;
      statement S1, S2;
      @@
      x =  isp1760_register(...)
      ... when != x = E
      * if (x == NULL)
      S1 else S2
      // </smpl>
      Signed-off-by: NJulien Brunel <brunel@diku.dk>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ce5dee50
    • Y
      USB: improve ehci_watchdog's side effect in CPU power management · f0d781d5
      Yi Yang 提交于
      ehci_watchdog will wake up CPU very frequently so that CPU
      stays at C3 very short, average residence time is about 50
      ms on Aspire One, but we expect it should be about 1 second
      or more, so this kind of periodic timer is very bad for power
      saving.
      
      We can't remove this timer because of some bad USB controller
      chipset, but at least we should reduce its side effect to as
      possible as low.
      
      This patch can make CPU stay at C3 longer, average residence time
      is about twice as long as original. 
      
      Please consider to apply it, thanks
      Signed-off-by: NYi Yang <yi.y.yang@intel.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f0d781d5
    • A
      USB: UHCI: improve scheduling of interrupt URBs · e58dcebc
      Alan Stern 提交于
      This patch (as1140) adds a little intelligence to the interrupt-URB
      scheduler in uhci-hcd.  Right now the scheduler is stupid; every URB
      having the same period is assigned to the same slot.  Thus a large
      group of period-N URBs can fill their slot and cause -ENOSPC errors
      even when all the lower-period slots are empty.
      
      With the patch, if an URB doesn't fit in its assigned slot then the
      scheduler will try using lower-period slots.  This will provide
      greater flexibility.  As an example, the driver will be able to handle
      more than just three or four mice, which the current driver cannot.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e58dcebc
    • T
      USB: ohci-omap: handle other omap15xx chips · 9b466c3b
      Tony Lindgren 提交于
      Sync up USB parts of the ohci-omap support in mainline with the OMAP tree.
      This patch supports another first generation OMAP1 part: not just the
      OMAP 1510 (and its catalog version, the OMAP 5910), but also OMAP 310.
      
      From: Tony Lindgren <tony@atomide.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9b466c3b
    • K
      usb: remove code associated with !CONFIG_PPC_MERGE · cede969f
      Kumar Gala 提交于
      Now that arch/ppc is gone we don't need CONFIG_PPC_MERGE anymore remove
      the dead code associated with !CONFIG_PPC_MERGE.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cede969f
    • M
      USB: ehci-dbg: fix reading less content of periodic file · 3c4bb71f
      Ming Lei 提交于
      This patch fix 2 problems about reading periodic file:
      
      1. The "..." after a interrupt qh is missed because buffer pointer is
         not moved.
      
      2. After setting p.ptr as NULL, its next qh or itd will be omited and
         can't be stored in debug buffer.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3c4bb71f
    • M
      USB: ehci-dbg: increase debug buffer size for periodic file · 3c04e20e
      Ming Lei 提交于
      This patch is based on the following ideas:
      
      1. Some usb devices (such as usb video class) have endpoints of high
         interval attribute, so reading "periodic" file need more debug buffer
         to accommodate the qh or itd schedule information.  For example, 4KB
         buffer is not enough for a single interrupt qh of 2ms period.
      
      2. print a %p need 16 byte buffer on 64-bits arch, but 8 byte on 32-bits
         arch. Add a extra bonus for 64-bits arch.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3c04e20e
    • A
      OHCI: Allow broken controllers to auto-stop · 4a511bc3
      Alan Stern 提交于
      This patch (as1134) attempts to improve the way we handle OHCI
      controllers with broken Root Hub Status Change interrupt support.  In
      these controllers the RHSC interrupt bit essentially never turns off,
      making RHSC interrupts useless -- they have to remain permanently
      disabled.
      
      Such controllers should still be allowed to turn off their root hubs
      when no devices are attached.  Polling for new connections can
      continue while the root hub is suspended.  The patch implements this
      feature.  (It won't have much effect unless CONFIG_PM is enabled and
      CONFIG_USB_SUSPEND is disabled, but since the overhead is very small
      we may as well do it.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a511bc3
    • M
      USB: Let some USB host controllers get IRQ flags from resource · 27140219
      Marc Zyngier 提交于
      [This version fixes a thinko in the r8a66597 driver]
      
      This patch let a few discrete USB host controllers drivers (isp116x-hcd,
      r8a66597-hcd and sl811-hcd) obtain IRQ flags from their IORESOURCE_IRQ
      resource if configured as such, much like it's been done for the smc91x
      driver.
      
      It spares people writing support for specific boards the burden to
      configure the interrupt controller independantly, and keeps all IRQ
      related information in a single resource.
      
      HCD that are integrally part of a SoC have been left aside, as there
      is probably no "wiring" options...
      
      Tested on an Xscale PXA-255 based platform with isp116x-hcd.
      Signed-off-by: NMarc Zyngier <marc.zyngier@altran.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      27140219
  9. 17 10月, 2008 1 次提交
  10. 10 10月, 2008 1 次提交
  11. 08 10月, 2008 5 次提交
  12. 24 9月, 2008 2 次提交
    • D
      USB: fix EHCI periodic transfers · 01c17142
      David Brownell 提交于
      As noted by Stefan Neis <Stefan.Neis@kobil.com>, we had a recent
      regression with EHCI periodic transfers, in some (seemingly not
      all that common) cases.
      
      The root cause was that the schedule activation was only loosely
      coupled to the addition or removal of transfers, so two different
      execution contexts could both think they had to deactivate (or
      conversely activate) the schedule.  So this fix tightens that
      coupling, managing it more like a refcount.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      01c17142
    • D
      USB: ehci: fix some ehci hangs and crashes · 0bcfeb3e
      David Brownell 提交于
      I noticed that the "Refactor "if (handshake()) state = HC_STATE_HALT"
      patch from earlier this year perpetuated a potential problem:  it can
      mark the controller as halted when it's still running (but not acting
      as, perhaps wrongly, expected).
      
      That caused some hangs and crashes, rather than more polite failure
      modes of a truly halted controller.  This patch forces a true halt,
      and emits a (previously missing) diagnostic.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0bcfeb3e
  13. 17 9月, 2008 3 次提交