1. 18 2月, 2011 8 次提交
    • S
      USB: isp1760: Implement solution for erratum 2 · b14e840d
      Sebastian Andrzej Siewior 提交于
      The document says:
      |2.1 Problem description
      |    When at least two USB devices are simultaneously running, it is observed that
      |    sometimes the INT corresponding to one of the USB devices stops occurring. This may
      |    be observed sometimes with USB-to-serial or USB-to-network devices.
      |    The problem is not noticed when only USB mass storage devices are running.
      |2.2 Implication
      |    This issue is because of the clearing of the respective Done Map bit on reading the ATL
      |    PTD Done Map register when an INT is generated by another PTD completion, but is not
      |    found set on that read access. In this situation, the respective Done Map bit will remain
      |    reset and no further INT will be asserted so the data transfer corresponding to that USB
      |    device will stop.
      |2.3 Workaround
      |    An SOF INT can be used instead of an ATL INT with polling on Done bits. A time-out can
      |    be implemented and if a certain Done bit is never set, verification of the PTD completion
      |    can be done by reading PTD contents (valid bit).
      |    This is a proven workaround implemented in software.
      
      Russell King run into this with an USB-to-serial converter. This patch
      implements his suggestion to enable the high frequent SOF interrupt only
      at the time we have ATL packages queued. It goes even one step further
      and enables the SOF interrupt only if we have more than one ATL packet
      queued at the same time.
      
      Cc: <stable@kernel.org> # [2.6.35.x, 2.6.36.x, 2.6.37.x]
      Tested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b14e840d
    • M
      USB: Mark EHCI LPM functions as __maybe_unused · 4f9e6c64
      Maksim Rayskiy 提交于
      ehci_lpm_set_da and ehci_lpm_check are EHCI 1.1 specific functions which
      are not used on many platforms but do generate annoying gcc warnings
      Signed-off-by: NMaksim Rayskiy <mrayskiy@broadcom.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4f9e6c64
    • D
      usb: fusb300_udc: add more "ep%d" names · 6b2e30c0
      Dan Carpenter 提交于
      We need FUSB300_MAX_NUM_EP (16) names otherwise the last 8 names get
      initialized to garbage values in fusb300_probe().
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6b2e30c0
    • F
      USB: s3c2410_udc: Add handling for S3C244X dual-packet mode · 16f08a08
      Fabian Godehardt 提交于
      This is a patch that seems to make the USB hangs on the S3C244X go away.
      At least a good amount of ping torture didn't make them come back so far.
      
      The issue is that, if there are several back-to-back packets, sometimes no
      interrupt is generated for one of them. This seems to be caused by the
      mysterious dual packet mode, which the USB hardware enters automatically
      if the endpoint size is half that of the FIFO. (On the 244X, this is the
      normal situation for bulk data endpoints.)
      
      There is also a timing factor in this. It seems that what happens is that
      the USB hardware automatically sends an acknowledgement if there is only one
      packet in the FIFO (the FIFO has space for two). If another packet arrives
      before the host has retrieved and acknowledged the previous one, no interrupt
      is generated for that second one.
      
      However, there may be an indication. There is one undocumented bit (none
      of the 244x manuals document it), OUT_CRS1_REG[1], that seems to be set
      suspiciously often when this condition occurs. There is also
      CLR_DATA_TOGGLE, OUT_CRS1_REG[7], which may have a function related to
      this. (The Samsung manual is rather terse on that, as usual.)
      
      This needs to be examined further. For now, the patch seems to do the
      trick.
      Signed-off-by: NVasily Khoruzhick <anarsoul@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      16f08a08
    • T
      usb: pch_udc: Fixed issue which does not work with g_ether · c17f459c
      Toshiharu Okada 提交于
      This PCH_UDC driver does not work normally when "Ethernet gadget" is used.
      
      This patch fixed this issue.
      The following was modified.
       - The FIFO flush process.
       - The descriptor creation process.
       - The adjustment of DMA buffer align.
      
      Currently the PCH_UDC driver can work normally with "Ethernet gadget",
      "Serial gadget" or "File-backed Storage Gadget".
      Signed-off-by: NToshiharu Okada <toshiharu-linux@dsn.okisemi.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c17f459c
    • J
      USB: Gadget: Reorder driver name assignment · 05c3eebd
      Jassi Brar 提交于
      Reorder the driver->name assignment so the 'iProduct' could be initialized
      as well if both 'name' and 'iProduct' come as NULL by default.
      
      Also, remove the misplaced 'extern' keyword.
      Signed-off-by: NJassi Brar <jassi.brar@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      05c3eebd
    • J
      USB: Gadget: Composite: Debug interface comparison · ff085de7
      Jassi Brar 提交于
      While checking valid interface number we should compare MAX_CONFIG_INTERFACES
      with the variable 'intf' (which holds the lower 8bits of w_index) rather than
      'w_index'
      Signed-off-by: NJassi Brar <jassi.brar@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ff085de7
    • G
      Revert "USB host: Move AMD PLL quirk to pci-quirks.c" · 479b46b5
      Greg Kroah-Hartman 提交于
      This reverts commit b7d5b439.
      It conflicts with commit baab93af "USB:
      EHCI: ASPM quirk of ISOC on AMD Hudson" and merging the two just doesn't
      work properly.
      
      Cc: Andiry Xu <andiry.xu@amd.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Alex He <alex.he@amd.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      479b46b5
  2. 16 2月, 2011 1 次提交
  3. 15 2月, 2011 5 次提交
  4. 14 2月, 2011 17 次提交
  5. 13 2月, 2011 1 次提交
  6. 12 2月, 2011 7 次提交
    • M
      ACPI / Video: Probe for output switch method when searching video devices. · ed764e7c
      Michael Karcher 提交于
      This patch reverts one hunk of 677bd810
      "ACPI video: remove output switching control", namely the removal of
      probing for _DOS/_DOD when searching for video devices.
      
      This is needed on some Fujitsu Laptops (at least S7110, P8010) for the
      ACPI backlight interface to work, as an these machines, neither ROM nor
      posting methods are available, and after removal of output switching,
      none of the caps triggers, which prevents the backlight search from
      being entered.
      
      Tested on a Fujitsu Lifebook S7110 and Fujitsu Lifebook P8010.
      This probably fixes https://bugzilla.kernel.org/show_bug.cgi?id=27312
      for the people who have no entry in /sys/class/backlight.
      
      This is the complete list of public (starting with "_") methods implemented
      on the S7110, BIOS rev 1.34:
      
      \_SB_.PCI0.GFX0._ADR
      \_SB_.PCI0.GFX0._DOS
      \_SB_.PCI0.GFX0._DOD
      \_SB_.PCI0.GFX0.CRT._ADR
      \_SB_.PCI0.GFX0.CRT._DCS
      \_SB_.PCI0.GFX0.CRT._DGS
      \_SB_.PCI0.GFX0.CRT._DSS
      \_SB_.PCI0.GFX0.LCD._ADR
      \_SB_.PCI0.GFX0.LCD._BCL
      \_SB_.PCI0.GFX0.LCD._BCM
      \_SB_.PCI0.GFX0.LCD._BQC
      \_SB_.PCI0.GFX0.LCD._DCS
      \_SB_.PCI0.GFX0.LCD._DGS
      \_SB_.PCI0.GFX0.LCD._DSS
      \_SB_.PCI0.GFX0.LCD._PS0
      \_SB_.PCI0.GFX0.LCD._PS3
      \_SB_.PCI0.GFX0.TV._ADR
      \_SB_.PCI0.GFX0.TV._DCS
      \_SB_.PCI0.GFX0.TV._DGS
      \_SB_.PCI0.GFX0.TV._DSS
      \_SB_.PCI0.GFX0.DVI._ADR
      \_SB_.PCI0.GFX0.DVI._DCS
      \_SB_.PCI0.GFX0.DVI._DGS
      \_SB_.PCI0.GFX0.DVI._DSS
      Signed-off-by: NMichael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
      Acked-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      ed764e7c
    • R
      ACPI / Wakeup: Enable button GPEs unconditionally during initialization · 2a5d2428
      Rafael J. Wysocki 提交于
      Commit 9630bdd9 (ACPI: Use GPE reference counting to support shared
      GPEs) introduced a suspend regression where boxes resume immediately
      after being suspended due to the lid or sleep button wakeup status
      not being cleared properly.  This happens if the GPEs corresponding
      to those devices are not enabled all the time, which apparently is
      expected by some BIOSes.
      
      To fix this problem, enable button and lid GPEs unconditionally
      during initialization and keep them enabled all the time, regardless
      of whether or not the ACPI button driver is used.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=27372Reported-and-tested-by: NFerenc Wágner <wferi@niif.hu>
      Cc: stable@kernel.org
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      2a5d2428
    • R
      ACPI / ACPICA: Avoid crashing if _PRW is defined for the root object · 2d559513
      Rafael J. Wysocki 提交于
      Some ACPI BIOSes define _PRW for the root object which causes
      acpi_setup_gpe_for_wake() to crash when trying to dereference the
      bogus device_node pointer.  Avoid the crash by checking if
      wake_device is not the root object before attempting to set up the
      "implicit notify" mechanism for it.
      
      The problem was introduced by commit bba63a29
      (ACPICA: Implicit notify support) that added the wake_device argument
      to acpi_setup_gpe_for_wake().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      2d559513
    • J
      drivers/w1/masters/omap_hdq.c: add missing clk_put · 80d02d27
      Julia Lawall 提交于
      This code makes two calls to clk_get, then test both return values and
      fails if either failed.
      
      The problem is that in the first inner if, where the first call to
      clk_get has failed, it don't know if the second call has failed as well.
      So it don't know whether clk_get should be called on the result of the
      second call.  Of course, it would be possible to test that value again.
      A simpler solution is just to test the result of calling clk_get
      directly after each call.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      position p1,p2;
      expression e;
      statement S;
      @@
      
      e = clk_get@p1(...)
      ...
      if@p2 (IS_ERR(e)) S
      
      @@
      expression e;
      statement S;
      identifier l;
      position r.p1, p2 != r.p2;
      @@
      
      *e = clk_get@p1(...)
      ... when != clk_put(e)
      *if@p2 (...)
      {
        ... when != clk_put(e)
      * return ...;
      }// </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NAmit Kucheria <amit.kucheria@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      80d02d27
    • S
      nbd: remove module-level ioctl mutex · de1f016f
      Soren Hansen 提交于
      Commit 2a48fc0a ("block: autoconvert trivial BKL users to private
      mutex") replaced uses of the BKL in the nbd driver with mutex
      operations.  Since then, I've been been seeing these lock ups:
      
       INFO: task qemu-nbd:16115 blocked for more than 120 seconds.
       "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
       qemu-nbd      D 0000000000000001     0 16115  16114 0x00000004
        ffff88007d775d98 0000000000000082 ffff88007d775fd8 ffff88007d774000
        0000000000013a80 ffff8800020347e0 ffff88007d775fd8 0000000000013a80
        ffff880133730000 ffff880002034440 ffffea0004333db8 ffffffffa071c020
       Call Trace:
        [<ffffffff815b9997>] __mutex_lock_slowpath+0xf7/0x180
        [<ffffffff815b93eb>] mutex_lock+0x2b/0x50
        [<ffffffffa071a21c>] nbd_ioctl+0x6c/0x1c0 [nbd]
        [<ffffffff812cb970>] blkdev_ioctl+0x230/0x730
        [<ffffffff811967a1>] block_ioctl+0x41/0x50
        [<ffffffff81175c03>] do_vfs_ioctl+0x93/0x370
        [<ffffffff81175f61>] sys_ioctl+0x81/0xa0
        [<ffffffff8100c0c2>] system_call_fastpath+0x16/0x1b
      
      Instrumenting the nbd module's ioctl handler with some extra logging
      clearly shows the NBD_DO_IT ioctl being invoked which is a long-lived
      ioctl in the sense that it doesn't return until another ioctl asks the
      driver to disconnect.  However, that other ioctl blocks, waiting for the
      module-level mutex that replaced the BKL, and then we're stuck.
      
      This patch removes the module-level mutex altogether.  It's clearly
      wrong, and as far as I can see, it's entirely unnecessary, since the nbd
      driver maintains per-device mutexes, and I don't see anything that would
      require a module-level (or kernel-level, for that matter) mutex.
      Signed-off-by: NSoren Hansen <soren@linux2go.dk>
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Acked-by: NPaul Clements <paul.clements@steeleye.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: <stable@kernel.org>		[2.6.37.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      de1f016f
    • A
      drivers/rtc/rtc-proc.c: add module_put on error path in rtc_proc_open() · 24a6f5b8
      Alexander Strakh 提交于
      In file drivers/rtc/rtc-proc.c seq_open() can return -ENOMEM.
      
       86        if (!try_module_get(THIS_MODULE))
       87                return -ENODEV;
       88
       89        return single_open(file, rtc_proc_show, rtc);
      
      In this case before exiting (line 89) from rtc_proc_open the
      module_put(THIS_MODULE) must be called.
      
      Found by Linux Device Drivers Verification Project
      Signed-off-by: NAlexander Strakh <strakh@ispras.ru>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      24a6f5b8
    • R
      drivers/gpio/pca953x.c: add a mutex to fix race condition · 6e20fb18
      Roland Stigge 提交于
      Add a mutex to register communication and handling.  Without the mutex,
      GPIOs didn't switch as expected when toggled in a fast sequence of
      status changes of multiple outputs.
      Signed-off-by: NRoland Stigge <stigge@antcom.de>
      Acked-by: NEric Miao <eric.y.miao@gmail.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Marc Zyngier <maz@misterjones.org>
      Cc: Ben Gardner <bgardner@wabtec.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6e20fb18
  7. 11 2月, 2011 1 次提交