1. 20 5月, 2011 1 次提交
    • J
      HID: hiddev: fix race between hiddev_disconnect and hiddev_release · 6cb4b040
      Jiri Kosina 提交于
      When hiddev_disconnect() runs with chardev open, it will proceed with
      usbhid_close(). When userspace in parallel runs the hiddev_release(),
      it sees !hiddev->exists (as it has been already set so by
      hiddev_disconnect()) and kfrees hiddev while hiddev_disconnect() hasn't
      finished yet.
      
      Serialize the access to hiddev->exists and hiddev->open by existancelock.
      
      Reported-by: mike-@cinci.rr.com
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      6cb4b040
  2. 18 5月, 2011 4 次提交
    • J
      HID: assorted usage updates from hut 1.12 · 437f3b19
      Jarod Wilson 提交于
      I've got a Tivo Slide bluetooth remote/dongle, which uses a fair number
      of hid usages that aren't currently mapped in hid-input.c. I'd initially
      written additions to hid-input.c with just this device in mind,
      including some bits that were specific to the device. This go around,
      I'm looking at adding/correcting as many generic HID usages from the HID
      Usage Tables, version 1.12, as I can -- which also serves to enable all
      but four of the buttons on the Tivo Slide remote[*].
      
      Outside of fixing the obviously incorrect mapping of 0xc 0x45 from
      KEY_RADIO to KEY_RIGHT, and making use of the new KEY_IMAGES (just added
      in 2.6.39-rc4) for AL Image Browser instead of KEY_MEDIA, these are
      purely additions, and thus should have no negative impact on any already
      functional HID devices. Most of the added mappings seemed to be
      perfectly logical to me, but there were a few that were mapped on more
      of an "I think this makes the most sense" basis.
      
      [*] I'll handle the last four tivo buttons via an hid-tivo.c follow-up.
      
      CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      CC: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      437f3b19
    • J
      Merge branch 'master' into upstream. · 6b7b8e48
      Jiri Kosina 提交于
      This is sync with Linus' tree to receive KEY_IMAGES definition
      that went in through input tree.
      6b7b8e48
    • S
      HID: roccat: fix actual/startup profile sysfs attribute in koneplus · b50f315c
      Stefan Achatz 提交于
      startup_profile and actual_profile didn't work as expected. Also
      as the actual profile is persistent, the distinction between the
      two was ambiguous, so both use the same code now and startup_profile
      has been deprecated. Also the event is now propagated through
      chardev. The userland tool has been updated to support this change.
      Signed-off-by: NStefan Achatz <erazor_de@users.sourceforge.net>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      b50f315c
    • D
      HID: 'name' and 'phys' in 'struct hid_device' can never be NULL · dd2ed487
      Daniel Mack 提交于
      As they are static members of fix size, there is no need to NULL-check them.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      dd2ed487
  3. 17 5月, 2011 7 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · c1d10d18
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        net: Change netdev_fix_features messages loglevel
        vmxnet3: Fix inconsistent LRO state after initialization
        sfc: Fix oops in register dump after mapping change
        IPVS: fix netns if reading ip_vs_* procfs entries
        bridge: fix forwarding of IPv6
      c1d10d18
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 477de0de
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
        Revert "mmc: fix a race between card-detect rescan and clock-gate work instances"
      477de0de
    • R
      mm: fix kernel-doc warning in page_alloc.c · b5e6ab58
      Randy Dunlap 提交于
      Fix new kernel-doc warning in mm/page_alloc.c:
      
        Warning(mm/page_alloc.c:2370): No description found for parameter 'nid'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b5e6ab58
    • Y
      PCI: Clear bridge resource flags if requested size is 0 · 93d2175d
      Yinghai Lu 提交于
      During pci remove/rescan testing found:
      
        pci 0000:c0:03.0: PCI bridge to [bus c4-c9]
        pci 0000:c0:03.0:   bridge window [io  0x1000-0x0fff]
        pci 0000:c0:03.0:   bridge window [mem 0xf0000000-0xf00fffff]
        pci 0000:c0:03.0:   bridge window [mem 0xfc180000000-0xfc197ffffff 64bit pref]
        pci 0000:c0:03.0: device not available (can't reserve [io  0x1000-0x0fff])
        pci 0000:c0:03.0: Error enabling bridge (-22), continuing
        pci 0000:c0:03.0: enabling bus mastering
        pci 0000:c0:03.0: setting latency timer to 64
        pcieport 0000:c0:03.0: device not available (can't reserve [io  0x1000-0x0fff])
        pcieport: probe of 0000:c0:03.0 failed with error -22
      
      This bug was caused by commit c8adf9a3 ("PCI: pre-allocate
      additional resources to devices only after successful allocation of
      essential resources.")
      
      After that commit, pci_hotplug_io_size is changed to additional_io_size
      from minium size.  So it will not go through resource_size(res) != 0
      path, and will not be reset.
      
      The root cause is: pci_bridge_check_ranges will set RESOURCE_IO flag for
      pci bridge, and later if children do not need IO resource.  those bridge
      resources will not need to be allocated.  but flags is still there.
      that will confuse the the pci_enable_bridges later.
      
      related code:
      
         static void assign_requested_resources_sorted(struct resource_list *head,
                                          struct resource_list_x *fail_head)
         {
                 struct resource *res;
                 struct resource_list *list;
                 int idx;
      
                 for (list = head->next; list; list = list->next) {
                         res = list->res;
                         idx = res - &list->dev->resource[0];
                         if (resource_size(res) && pci_assign_resource(list->dev, idx)) {
         ...
                                 reset_resource(res);
                         }
                 }
         }
      
      At last, We have to clear the flags in pbus_size_mem/io when requested
      size == 0 and !add_head.  becasue this case it will not go through
      adjust_resources_sorted().
      
      Just make size1 = size0 when !add_head. it will make flags get cleared.
      
      At the same time when requested size == 0, add_size != 0, will still
      have in head and add_list.  because we do not clear the flags for it.
      
      After this, we will get right result:
      
        pci 0000:c0:03.0: PCI bridge to [bus c4-c9]
        pci 0000:c0:03.0:   bridge window [io  disabled]
        pci 0000:c0:03.0:   bridge window [mem 0xf0000000-0xf00fffff]
        pci 0000:c0:03.0:   bridge window [mem 0xfc180000000-0xfc197ffffff 64bit pref]
        pci 0000:c0:03.0: enabling bus mastering
        pci 0000:c0:03.0: setting latency timer to 64
        pcieport 0000:c0:03.0: setting latency timer to 64
        pcieport 0000:c0:03.0: irq 160 for MSI/MSI-X
        pcieport 0000:c0:03.0: Signaling PME through PCIe PME interrupt
        pci 0000:c4:00.0: Signaling PME through PCIe PME interrupt
        pcie_pme 0000:c0:03.0:pcie01: service driver pcie_pme loaded
        aer 0000:c0:03.0:pcie02: service driver aer loaded
        pciehp 0000:c0:03.0:pcie04: Hotplug Controller:
      
      v3: more simple fix. also fix one typo in pbus_size_mem
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Reviewed-by: NRam Pai <linuxram@us.ibm.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      93d2175d
    • M
      net: Change netdev_fix_features messages loglevel · 6f404e44
      Michał Mirosław 提交于
      Those reduced to DEBUG can possibly be triggered by unprivileged processes
      and are nothing exceptional. Illegal checksum combinations can only be
      caused by driver bug, so promote those messages to WARN.
      
      Since GSO without SG will now only cause DEBUG message from
      netdev_fix_features(), remove the workaround from register_netdevice().
      Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f404e44
    • T
      vmxnet3: Fix inconsistent LRO state after initialization · ebde6f8a
      Thomas Jarosch 提交于
      During initialization of vmxnet3, the state of LRO
      gets out of sync with netdev->features.
      
      This leads to very poor TCP performance in a IP forwarding
      setup and is hitting many VMware users.
      
      Simplified call sequence:
      1. vmxnet3_declare_features() initializes "adapter->lro" to true.
      
      2. The kernel automatically disables LRO if IP forwarding is enabled,
      so vmxnet3_set_flags() gets called. This also updates netdev->features.
      
      3. Now vmxnet3_setup_driver_shared() is called. "adapter->lro" is still
      set to true and LRO gets enabled again, even though
      netdev->features shows it's disabled.
      
      Fix it by updating "adapter->lro", too.
      
      The private vmxnet3 adapter flags are scheduled for removal
      in net-next, see commit a0d2730c
      "net: vmxnet3: convert to hw_features".
      
      Patch applies to 2.6.37 / 2.6.38 and 2.6.39-rc6.
      
      Please CC: comments.
      Signed-off-by: NThomas Jarosch <thomas.jarosch@intra2net.com>
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebde6f8a
    • B
      sfc: Fix oops in register dump after mapping change · 867955f5
      Ben Hutchings 提交于
      Commit 747df225 ('sfc: Always map MCDI
      shared memory as uncacheable') introduced a separate mapping for the
      MCDI shared memory (MC_TREG_SMEM).  This means we can no longer easily
      include it in the register dump.  Since it is not particularly useful
      in debugging, substitute a recognisable dummy value.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      867955f5
  4. 16 5月, 2011 8 次提交
  5. 15 5月, 2011 15 次提交
  6. 14 5月, 2011 5 次提交