1. 15 1月, 2011 5 次提交
    • S
      xhci: Use GFP_NOIO during device reset. · a6d940dd
      Sarah Sharp 提交于
      When xhci_discover_or_reset_device() is called after a host controller
      power loss, the virtual device may need to be reallocated.  Make sure
      xhci_alloc_dev() uses GFP_NOIO.  This avoid causing a deadlock by allowing
      the kernel to flush pending I/O while reallocating memory for a virtual
      device for a USB mass storage device that's holding the backing store for
      dirty memory buffers.
      
      This patch should be queued for the 2.6.37 stable tree.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      a6d940dd
    • S
      usb: Realloc xHCI structures after a hub is verified. · 653a39d1
      Sarah Sharp 提交于
      When there's an xHCI host power loss after a suspend from memory, the USB
      core attempts to reset and verify the USB devices that are attached to the
      system.  The xHCI driver has to reallocate those devices, since the
      hardware lost all knowledge of them during the power loss.
      
      When a hub is plugged in, and the host loses power, the xHCI hardware
      structures are not updated to say the device is a hub.  This is usually
      done in hub_configure() when the USB hub is detected.  That function is
      skipped during a reset and verify by the USB core, since the core restores
      the old configuration and alternate settings, and the hub driver has no
      idea this happened.  This bug makes the xHCI host controller reject the
      enumeration of low speed devices under the resumed hub.
      
      Therefore, make the USB core re-setup the internal xHCI hub device
      information by calling update_hub_device() when hub_activate() is called
      for a hub reset resume.  After a host power loss, all devices under the
      roothub get a reset-resume or a disconnect.
      
      This patch should be queued for the 2.6.37 stable tree.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      653a39d1
    • Z
      xhci: Do not run xhci_cleanup_msix with irq disabled · 40a9fb17
      Zhang Rui 提交于
      when unloading xhci_hcd, I got:
      [  134.856813] xhci_hcd 0000:02:00.0: remove, state 4
      [  134.858140] usb usb3: USB disconnect, address 1
      [  134.874956] xhci_hcd 0000:02:00.0: Host controller not halted, aborting reset.
      [  134.876351] BUG: sleeping function called from invalid context at kernel/mutex.c:85
      [  134.877657] in_atomic(): 0, irqs_disabled(): 1, pid: 1451, name: modprobe
      [  134.878975] Pid: 1451, comm: modprobe Not tainted 2.6.37-rc5+ #162
      [  134.880298] Call Trace:
      [  134.881602]  [<ffffffff8104156a>] __might_sleep+0xeb/0xf0
      [  134.882921]  [<ffffffff814763dc>] mutex_lock+0x24/0x50
      [  134.884229]  [<ffffffff810a745c>] free_desc+0x2e/0x5f
      [  134.885538]  [<ffffffff810a74c8>] irq_free_descs+0x3b/0x71
      [  134.886853]  [<ffffffff8102584d>] free_irq_at+0x31/0x36
      [  134.888167]  [<ffffffff8102723f>] destroy_irq+0x69/0x71
      [  134.889486]  [<ffffffff8102747a>] native_teardown_msi_irq+0xe/0x10
      [  134.890820]  [<ffffffff8124c382>] default_teardown_msi_irqs+0x57/0x80
      [  134.892158]  [<ffffffff8124be46>] free_msi_irqs+0x8b/0xe9
      [  134.893504]  [<ffffffff8124cd46>] pci_disable_msix+0x35/0x39
      [  134.894844]  [<ffffffffa01b444a>] xhci_cleanup_msix+0x31/0x51 [xhci_hcd]
      [  134.896186]  [<ffffffffa01b4b3a>] xhci_stop+0x3a/0x80 [xhci_hcd]
      [  134.897521]  [<ffffffff81341dd4>] usb_remove_hcd+0xfd/0x14a
      [  134.898859]  [<ffffffff813500ae>] usb_hcd_pci_remove+0x5c/0xc6
      [  134.900193]  [<ffffffff8123c606>] pci_device_remove+0x3f/0x91
      [  134.901535]  [<ffffffff812e7ea4>] __device_release_driver+0x83/0xd9
      [  134.902899]  [<ffffffff812e8571>] driver_detach+0x86/0xad
      [  134.904222]  [<ffffffff812e7d56>] bus_remove_driver+0xb2/0xd8
      [  134.905540]  [<ffffffff812e8633>] driver_unregister+0x6c/0x74
      [  134.906839]  [<ffffffff8123c8e4>] pci_unregister_driver+0x44/0x89
      [  134.908121]  [<ffffffffa01b940e>] xhci_unregister_pci+0x15/0x17 [xhci_hcd]
      [  134.909396]  [<ffffffffa01bd7d2>] xhci_hcd_cleanup+0xe/0x10 [xhci_hcd]
      [  134.910652]  [<ffffffff8107fcd1>] sys_delete_module+0x1ca/0x23b
      [  134.911882]  [<ffffffff81123932>] ? path_put+0x22/0x26
      [  134.913104]  [<ffffffff8109a800>] ? audit_syscall_entry+0x2c/0x148
      [  134.914333]  [<ffffffff8100ac82>] system_call_fastpath+0x16/0x1b
      [  134.915658] xhci_hcd 0000:02:00.0: USB bus 3 deregistered
      [  134.916465] xhci_hcd 0000:02:00.0: PCI INT A disabled
      
      and the same issue when xhci_suspend is invoked.  (Note from Sarah: That's
      fixed by Andiry's patch before this, by synchronizing the irqs rather than
      freeing them on suspend.)
      
      Do not run xhci_cleanup_msix with irq disabled.
      
      This patch should be queued for the 2.6.37 stable tree.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      40a9fb17
    • A
      xHCI: synchronize irq in xhci_suspend() · 0029227f
      Andiry Xu 提交于
      Synchronize the interrupts instead of free them in xhci_suspend(). This will
      prevent a double free when the host is suspended and then the card removed.
      
      Set the flag hcd->msix_enabled when using MSI-X, and check the flag in
      suspend_common(). MSI-X synchronization will be handled by xhci_suspend(),
      and MSI/INTx will be synchronized in suspend_common().
      
      This patch should be queued for the 2.6.37 stable tree.
      Reported-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      0029227f
    • S
      xhci: Resume bus on any port status change. · 7111ebc9
      Sarah Sharp 提交于
      The original code that resumed the USB bus on a port status change would
      only do so when there was a device connected to the port.  If a device was
      just disconnected, the event would be queued for khubd, but khubd wouldn't
      run.  That would leave the connect status change (CSC) bit set.
      
      If a USB device was plugged into that same port, the xHCI host controller
      would set the current connect status (CCS) bit.  But since the CSC bit was
      already set, it would not generate an interrupt for a port status change
      event.  That would mean the user could "Safely Remove" a device, have the
      bus suspend, disconnect the device, re-plug it in, and then the device
      would never be enumerated.
      
      Plugging in a different device on another port would cause the bus to
      resume, and khubd would notice the re-connected device.  Running lsusb
      would also resume the bus, leading users to report the problem "went away"
      when using diagnostic tools.
      
      The solution is to resume the bus when a port status change event is
      received, regardless of the port status.
      
      Thank you very much to Maddog for helping me track down this Heisenbug.
      
      This patch should be queued for the 2.6.37 stable tree.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: NJon 'maddog' Hall <maddog@li.org>
      Tested-by: NAndiry Xu <andiry.xu@amd.com>
      Cc: stable@kernel.org
      7111ebc9
  2. 11 1月, 2011 16 次提交
    • L
      Merge branch 'for-linus' of... · e0e736fc
      Linus Torvalds 提交于
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (30 commits)
        MAINTAINERS: Add tomoyo-dev-en ML.
        SELinux: define permissions for DCB netlink messages
        encrypted-keys: style and other cleanup
        encrypted-keys: verify datablob size before converting to binary
        trusted-keys: kzalloc and other cleanup
        trusted-keys: additional TSS return code and other error handling
        syslog: check cap_syslog when dmesg_restrict
        Smack: Transmute labels on specified directories
        selinux: cache sidtab_context_to_sid results
        SELinux: do not compute transition labels on mountpoint labeled filesystems
        This patch adds a new security attribute to Smack called SMACK64EXEC. It defines label that is used while task is running.
        SELinux: merge policydb_index_classes and policydb_index_others
        selinux: convert part of the sym_val_to_name array to use flex_array
        selinux: convert type_val_to_struct to flex_array
        flex_array: fix flex_array_put_ptr macro to be valid C
        SELinux: do not set automatic i_ino in selinuxfs
        selinux: rework security_netlbl_secattr_to_sid
        SELinux: standardize return code handling in selinuxfs.c
        SELinux: standardize return code handling in selinuxfs.c
        SELinux: standardize return code handling in policydb.c
        ...
      e0e736fc
    • L
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging · a0894881
      Linus Torvalds 提交于
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: (44 commits)
        hwmon: Support for Dallas Semiconductor DS620
        hwmon: driver for Sensirion SHT21 humidity and temperature sensor
        hwmon: Add humidity attribute to sysfs ABI
        hwmon: sysfs ABI updates
        hwmon: (via-cputemp) sync hotplug handling with coretemp/pkgtemp
        hwmon: (lm95241) Rewrite to avoid using macros
        hwmon: (applesmc) Fix checkpatch errors and fix value range checks
        hwmon: (applesmc) Update copyright information
        hwmon: (applesmc) Silence driver
        hwmon: (applesmc) Simplify feature sysfs handling
        hwmon: (applesmc) Dynamic creation of fan files
        hwmon: (applesmc) Extract all features generically
        hwmon: (applesmc) Handle new temperature format
        hwmon: (applesmc) Dynamic creation of temperature files
        hwmon: (applesmc) Introduce a register lookup table
        hwmon: (applesmc) Use pr_fmt and pr_<level>
        hwmon: (applesmc) Relax the severity of device init failure
        hwmon: (applesmc) Add MacBookAir3,1(3,2) support
        hwmon: (w83627hf) Use pr_fmt and pr_<level>
        hwmon: (w83627ehf) Use pr_fmt and pr_<level>
        ...
      a0894881
    • L
      Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 · 0bd2cbcd
      Linus Torvalds 提交于
      * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
        of/flattree: forward declare struct device_node in of_fdt.h
        ipmi: explicitly include of_address.h and of_irq.h
        sparc: explicitly cast negative phandle checks to s32
        powerpc/405: Fix missing #{address,size}-cells in i2c node
        powerpc/5200: dts: refactor dts files
        powerpc/5200: dts: Change combatible strings on localbus
        powerpc/5200: dts: remove unused properties
        powerpc/5200: dts: rename nodes to prepare for refactoring dts files
        of/flattree: Update dtc to current mainline.
        of/device: Don't register disabled devices
        powerpc/dts: fix syntax bugs in bluestone.dts
        of: Fixes for OF probing on little endian systems
        of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
        of/flattree: Add of_flat_dt_match() helper function
        of_serial: explicitly include of_irq.h
        of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
        of/flattree: Reorder unflatten_dt_node
        of/flattree: Refactor unflatten_dt_node
        of/flattree: Add non-boottime device tree functions
        of/flattree: Add Kconfig for EARLY_FLATTREE
        ...
      
      Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.
      0bd2cbcd
    • A
      headers: kobject.h redux · 57cc7215
      Alexey Dobriyan 提交于
      Remove kobject.h from files which don't need it, notably,
      sched.h and fs.h.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      57cc7215
    • A
      headers: path.h redux · 37721e1b
      Alexey Dobriyan 提交于
      Remove path.h from sched.h and other files.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      37721e1b
    • L
      Merge branch 'stable/bug-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen · 9f99a2f0
      Linus Torvalds 提交于
      * 'stable/bug-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/event: validate irq before get evtchn by irq
        xen/fb: fix potential memory leak
        xen/fb: fix xenfb suspend/resume race.
        xen: disable ACPI NUMA for PV guests
        xen/irq: Cleanup the find_unbound_irq
      9f99a2f0
    • L
      Merge branch 'stable/generic' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen · 8c8ae4e8
      Linus Torvalds 提交于
      * 'stable/generic' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen: HVM X2APIC support
        apic: Move hypervisor detection of x2apic to hypervisor.h
      8c8ae4e8
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 · a1e8fad5
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
        slub: Fix a crash during slabinfo -v
        tracing/slab: Move kmalloc tracepoint out of inline code
        slub: Fix slub_lock down/up imbalance
        slub: Fix build breakage in Documentation/vm
        slub tracing: move trace calls out of always inlined functions to reduce kernel code size
        slub: move slabinfo.c to tools/slub/slabinfo.c
      a1e8fad5
    • L
      Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 · e3166331
      Linus Torvalds 提交于
      * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
        Documentation/kbuild: add info that 'choice' can have a symbol name
        kbuild: add numeric --set-val option to scripts/config
        headers_check: Fix warning text
        headers_check: better search for functions in headers
        scripts/coccinelle: update for compatability with Coccinelle 0.2.4
        tags: put function prototypes back!
        Kconfig: fix single letter command in scripts/config
        gitignore: add scripts/recordmcount
      e3166331
    • L
      Merge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 · 1693ed28
      Linus Torvalds 提交于
      * 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
        deb-pkg: s/hdr/kernel_headers_/ && s/header/libc_headers_/
        deb-pkg: Make deb-pkg generate a seperate linux-libc-dev deb
        kbuild: create linux-headers package in deb-pkg
        kbuild, deb-pkg: support overriding userland architecture
        kbuild, deb-pkg: select userland architecture based on UTS_MACHINE
        kbuild, deb-pkg: Fix build with paranoid umask
      1693ed28
    • L
      Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 · f28b1c8a
      Linus Torvalds 提交于
      * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
        nconf: handle comment entries within choice/endchoice
        kconfig: fix warning
        kconfig: Make expr_copy() take a const argument
        kconfig: simplify select-with-unmet-direct-dependency warning
        kconfig: add more S_INT and S_HEX consistency checks
        kconfig: fix `zconfdebug' extern declaration
        kconfig/conf: merge duplicate switch's case
        kconfig: fix typos
        kbuild/gconf: add dummy inline for bind_textdomain_codeset()
        kbuild/nconf: fix spaces damage
        kconfig: nuke second argument of conf_write_symbol()
        kconfig: do not define AUTOCONF_INCLUDED
        kconfig: the day kconfig warns about "select"-abuse has come
      f28b1c8a
    • L
      Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 · 0c05384a
      Linus Torvalds 提交于
      * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
        mkuboot.sh: Fail if mkimage is missing
        gen_init_cpio: checkpatch fixes
        gen_init_cpio: Avoid race between call to stat() and call to open()
        modpost: Fix address calculation in reloc_location()
        Make fixdep error handling more explicit
        checksyscalls: Fix stand-alone usage
        modpost: Put .zdebug* section on white list
        kbuild: fix interaction of CONFIG_IKCONFIG and KCONFIG_CONFIG
        kbuild: export linux/{a.out,kvm,kvm_para}.h on headers_install_all
        kbuild: introduce HDR_ARCH_LIST for headers_install_all
        headers_install: check exit status of unifdef
        gen_init_cpio: remove leading `/' from file names
        scripts/genksyms: fix header usage
        fixdep: use hash table instead of a single array
      0c05384a
    • L
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 1542dec1
      Linus Torvalds 提交于
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        pata_platform: Remove CONFIG_HAVE_PATA_PLATFORM's dependencies.
        pata_hpt37x: actually limit HPT370 to UltraDMA/66
        pata_hpt3x2n: coding style cleanup
        pata_hpt37x: coding style cleanup
        pata_hpt366: coding style cleanup
        pata_hpt3x2n: calculate average f_CNT
        pata_hpt3x2n: clarify about HPT371N support
        pata_hpt{37x|3x2n}: SATA mode filtering
        [libata] avoid needlessly passing around ptr to SCSI completion func
        [libata] new driver acard_ahci, for ATP8620 host controller
      1542dec1
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · facc7a96
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits)
        HID: roccat: Update sysfs attribute doc
        HID: roccat: don't use #pragma pack
        HID: roccat: Add support for Roccat Kone[+] v2
        HID: roccat: reduce number of functions in kone and pyra drivers
        HID: roccat: declare meaning of pack pragma usage in driver headers
        HID: roccat: use class for char device for sysfs attribute creation
        sysfs: Introducing binary attributes for struct class
        HID: hidraw: add compatibility ioctl() for 32-bit applications.
        HID: hid-picolcd: Fix memory leak in picolcd_debug_out_report()
        HID: picolcd: fix misuse of logical operation in place of bitop
        HID: usbhid: base runtime PM on modern API
        HID: replace offsets values with their corresponding BTN_* defines
        HID: hid-mosart: support suspend/resume
        HID: hid-mosart: ignore buttons report
        HID: hid-picolcd: don't use flush_scheduled_work()
        HID: simplify an index check in hid_lookup_collection
        HID: Hoist assigns from ifs
        HID: Remove superfluous __inline__
        HID: Use vzalloc for vmalloc/memset(,0...)
        HID: Add and use hid_<level>: dev_<level> equivalents
        ...
      facc7a96
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 · c8940eca
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
        spi / PM: Support dev_pm_ops
        PM: Prototype the pm_generic_ operations
        PM / Runtime: Generic resume shouldn't set RPM_ACTIVE unconditionally
        PM: Use dev_name() in core device suspend and resume routines
        PM: Permit registration of parentless devices during system suspend
        PM: Replace the device power.status field with a bit field
        PM: Remove redundant checks from core device resume routines
        PM: Use a different list of devices for each stage of device suspend
        PM: Avoid compiler warning in pm_noirq_op()
        PM: Use pm_wakeup_pending() in __device_suspend()
        PM / Wakeup: Replace pm_check_wakeup_events() with pm_wakeup_pending()
        PM: Prevent dpm_prepare() from returning errors unnecessarily
        PM: Fix references to basic-pm-debugging.txt in drivers-testing.txt
        PM / Runtime: Add synchronous runtime interface for interrupt handlers (v3)
        PM / Hibernate: When failed, in_suspend should be reset
        PM / Hibernate: hibernation_ops->leave should be checked too
        Freezer: Fix a race during freezing of TASK_STOPPED tasks
        PM: Use proper ccflag flag in kernel/power/Makefile
        PM / Runtime: Fix comments to match runtime callback code
      c8940eca
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 · 78c92a9f
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
        firewire: use split transaction timeout only for split transactions
        firewire: ohci: consolidate context status flags
        firewire: ohci: cache the context run bit
        firewire: ohci: flush AT contexts after bus reset - addendum
        firewire: ohci: flush AT contexts after bus reset for OHCI 1.2
        firewire: net: set carrier state at ifup
        firewire: net: add carrier detection
        firewire: net: ratelimit error messages
        firewire: ohci: restart iso DMA contexts on resume from low power mode
        firewire: ohci: restore GUID on resume.
        firewire: ohci: use common buffer for self IDs and AR descriptors
        firewire: ohci: optimize iso context checks in the interrupt handler
        firewire: make PHY packet header format consistent
        firewire: ohci: properly clear posted write errors
        firewire: ohci: flush MMIO writes in the interrupt handler
        firewire: ohci: fix AT context initialization error handling
        firewire: ohci: Asynchronous Reception rewrite
        firewire: core: Update WARN uses
        firewire: nosy: char device is not seekable
      78c92a9f
  3. 10 1月, 2011 19 次提交