summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-05-23 11:20:07 +0200
committerDenys Dmytriyenko <denys@ti.com>2012-05-30 13:49:03 -0400
commit2177f80076ebc15cc58fb521b58e49c83315f34e (patch)
tree3690868d86f360c07c79ea21269ec198293dbec2
parentd9d51a11b8ff53c5ee7ef12e221479a24e071f13 (diff)
downloadmeta-ti-2177f80076ebc15cc58fb521b58e49c83315f34e.tar.gz
linux-ti33x-psp 3.2: update to 3.2.18
Duplicate patches between PSP and 3.2.17 have been dropped from the 3.2.17 series Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r--conf/machine/include/ti33x.inc2
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0001-crypto-sha512-Fix-byte-counter-overflow-in-SHA-512.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0002-ALSA-hda-conexant-Don-t-set-HP-pin-control-bit-uncon.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0003-ALSA-hda-conexant-Set-up-the-missing-docking-station.patch99
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0004-ARM-clps711x-serial-driver-hungs-are-a-result-of-cal.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0006-mmc-fixes-for-eMMC-v4.5-discard-operation.patch72
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0007-mmc-fixes-for-eMMC-v4.5-sanitize-operation.patch136
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0008-mmc-unbreak-sdhci-esdhc-imx-on-i.MX25.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0009-xen-gntdev-do-not-set-VM_PFNMAP.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0010-xen-xenbus-Add-quirk-to-deal-with-misconfigured-back.patch151
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0011-USB-yurex-Remove-allocation-of-coherent-buffer-for-s.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0012-USB-yurex-Fix-missing-URB_NO_TRANSFER_DMA_MAP-flag-i.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0013-uwb-fix-use-of-del_timer_sync-in-interrupt.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0014-uwb-fix-error-handling.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0015-davinci_mdio-Fix-MDIO-timeout-check.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0016-mwifiex-update-pcie8766-scratch-register-addresses.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0017-brcm80211-smac-resume-transmit-fifo-upon-receiving-f.patch57
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0018-rc-core-set-mode-for-winbond-cir.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0019-drxk-Does-not-unlock-mutex-if-sanity-check-failed-in.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0020-cfg80211-fix-interface-combinations-check.patch30
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0021-Fix-modpost-failures-in-fedora-17.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0022-mm-fix-s390-BUG-by-__set_page_dirty_no_writeback-on-.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0023-md-fix-possible-corruption-of-array-metadata-on-shut.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0025-USB-serial-cp210x-Fixed-usb_control_msg-timeout-valu.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0027-drivers-tty-amiserial.c-add-missing-tty_unlock.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0028-USB-sierra-avoid-QMI-wwan-interface-on-MC77xx.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0029-EHCI-fix-criterion-for-resuming-the-root-hub.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0030-EHCI-always-clear-the-STS_FLR-status-bit.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0031-USB-fix-deadlock-in-bConfigurationValue-attribute-me.patch116
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0032-usb-gadget-eliminate-NULL-pointer-dereference-bugfix.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0033-usb-musb-omap-fix-crash-when-musb-glue-omap-gets-ini.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0034-usb-musb-omap-fix-the-error-check-for-pm_runtime_get.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0035-PCI-Add-quirk-for-still-enabled-interrupts-on-Intel-.patch89
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0036-ext4-fix-endianness-breakage-in-ext4_split_extent_at.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0037-KVM-unmap-pages-from-the-iommu-when-slots-are-remove.patch109
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0038-dell-laptop-add-3-machines-that-has-touchpad-LED.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0039-dell-laptop-touchpad-LED-should-persist-its-status-a.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0040-Bluetooth-Add-support-for-Atheros-04ca-3005.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0041-Don-t-limit-non-nested-epoll-paths.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0042-spi-Fix-device-unregistration-when-unregistering-the.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0043-spi-mpc83xx-fix-NULL-pdata-dereference-bug.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0044-rt2800-Add-support-for-the-Fujitsu-Stylistic-Q550.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0045-rt2x00-Identify-rt2800usb-chipsets.patch148
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0046-nfsd-fix-b0rken-error-value-for-setattr-on-read-only.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0047-nfsd-fix-error-values-returned-by-nfsd4_lockt-when-n.patch73
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0048-nfsd-fix-endianness-breakage-in-TEST_STATEID-handlin.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0049-nfsd-fix-compose_entry_fh-failure-exits.patch92
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0050-btrfs-btrfs_root_readonly-broken-on-big-endian.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0051-ocfs2-l_next_free_req-breakage-on-big-endian.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0052-ocfs-rl_used-breakage-on-big-endian.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0053-ocfs2-rl_count-endianness-breakage.patch31
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0054-ocfs2-e_leaf_clusters-endianness-breakage.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0055-lockd-fix-the-endianness-bug.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0056-usb-dwc3-ep0-increment-actual-on-bounced-ep0-case.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0057-net-fix-proc-net-dev-regression.patch185
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0058-nfsd-don-t-fail-unchecked-creates-of-non-special-fil.patch75
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0059-ppp-Don-t-stop-and-restart-queue-on-every-TX-packet.patch65
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0060-tcp-allow-splice-to-build-full-TSO-packets.patch129
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0061-sctp-Allow-struct-sctp_event_subscribe-to-grow-witho.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0062-bridge-Do-not-send-queries-on-multicast-group-leaves.patch199
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0063-ipv6-fix-array-index-in-ip6_mc_add_src.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0064-phonet-Check-input-from-user-before-allocating.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0065-bonding-properly-unset-current_arp_slave-on-slave-li.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0066-wimax-i2400m-prevent-a-possible-kernel-bug-due-to-mi.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0067-netlink-fix-races-after-skb-queueing.patch82
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0068-net-fix-a-race-in-sock_queue_err_skb.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0069-tcp-fix-tcp_rcv_rtt_update-use-of-an-unscaled-RTT-sa.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0070-net-allow-pskb_expand_head-to-get-maximum-tailroom.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0071-tcp-fix-tcp_trim_head.patch57
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0072-tcp-avoid-order-1-allocations-on-wifi-and-tx-path.patch134
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0073-atl1-fix-kernel-panic-in-case-of-DMA-errors.patch106
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0074-8139cp-set-intr-mask-after-its-handler-is-registered.patch67
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0075-net-smsc911x-fix-skb-handling-in-receive-path.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0076-net-ethernet-ks8851_mll-fix-rx-frame-buffer-overflow.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0077-net_sched-gred-Fix-oops-in-gred_dump-in-WRED-mode.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0078-net-usb-smsc75xx-fix-mtu.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0079-dummy-Add-ndo_uninit.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0080-tcp-fix-tcp_grow_window-for-large-incoming-frames.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0081-netns-do-not-leak-net_generic-data-on-failed-init.patch79
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0082-ksz884x-don-t-copy-too-much-in-netdev_set_mac_addres.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0083-net-ax25-Reorder-ax25_exit-to-remove-races.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0084-tcp-fix-TCP_MAXSEG-for-established-IPv6-passive-sock.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0085-nfs-Enclose-hostname-in-brackets-when-needed-in-nfs_.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0086-NFSv4-Ensure-that-the-LOCK-code-sets-exception-inode.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0087-NFSv4-Ensure-that-we-check-lock-exclusive-shared-typ.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0088-NFS-put-open-context-on-error-in-nfs_pagein_multi.patch30
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0089-NFS-put-open-context-on-error-in-nfs_flush_multi.patch30
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0090-x86-microcode-Fix-sysfs-warning-during-module-unload.patch71
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0091-x86-apic-APIC-code-touches-invalid-MSR-on-P5-class-m.patch91
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0092-Revert-autofs-work-around-unhappy-compat-problem-on-.patch135
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0093-xen-correctly-check-for-pending-events-when-restorin.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0094-xen-smp-Fix-crash-when-booting-with-ACPI-hotplug-CPU.patch99
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0095-ASoC-dapm-Ensure-power-gets-managed-for-line-widgets.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0096-ASoC-wm8994-Improve-sequencing-of-AIF-channel-enable.patch389
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0097-dmaengine-at_hdmac-remove-clear-on-read-in-atc_dosta.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0098-sched-Fix-OOPS-when-build_sched_domains-percpu-alloc.patch85
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0099-tracing-Fix-stacktrace-of-latency-tracers-irqsoff-an.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0100-hwmon-fam15h_power-fix-bogus-values-with-current-BIO.patch93
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0101-hwmon-fam15h_power-Fix-pci_device_id-array.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0102-dell-laptop-Terminate-quirks-list-properly.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0103-drm-radeon-kms-need-to-set-up-ss-on-DP-bridges-as-we.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0104-drm-i915-handle-input-output-sdvo-timings-separately.patch182
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0105-drm-i915-relative_constants_mode-race-fix.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0106-drm-i915-Force-sync-command-ordering-Gen6.patch98
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0107-drm-i915-Set-the-Stencil-Cache-eviction-policy-to-no.patch69
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0108-drm-i915-fix-integer-overflow-in-i915_gem_execbuffer.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0109-drm-i915-fix-integer-overflow-in-i915_gem_do_execbuf.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0110-nl80211-ensure-interface-is-up-in-various-APIs.patch152
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0111-ALSA-HDA-Add-external-mic-quirk-for-Asus-Zenbook-UX3.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0112-USB-cdc-wdm-fix-race-leading-leading-to-memory-corru.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0113-USB-EHCI-fix-crash-during-suspend-on-ASUS-computers.patch97
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0114-USB-gadget-storage-gadgets-send-wrong-error-code-for.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0115-usb-gadget-dummy-do-not-call-pullup-on-udc_stop.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0116-usb-gadget-uvc-uvc_request_data-length-field-must-be.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0117-pipes-add-a-packetized-pipe-mode-for-writing.patch143
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0118-autofs-make-the-autofsv5-packet-file-descriptor-use-.patch117
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0119-ARM-7396-1-errata-only-handle-ARM-erratum-326103-on-.patch89
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch69
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0122-ARM-7403-1-tls-remove-covert-channel-via-TPIDRURW.patch52
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0123-ARM-7406-1-hotplug-copy-the-affinity-mask-when-force.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0124-libsas-fix-sas_find_bcast_phy-in-the-presence-of-vac.patch59
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0125-libsas-fix-false-positive-device-attached-conditions.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0126-efi-Add-new-variable-attributes.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0127-efi-Validate-UEFI-boot-variables.patch231
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0128-PM-Hibernate-fix-the-number-of-pages-used-for-hibern.patch100
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0129-drm-i915-enable-dip-before-writing-data-on-gen4.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0130-sched-Fix-nohz-load-accounting-again.patch133
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0131-efivars-Improve-variable-validation.patch142
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0133-Fix-__read_seqcount_begin-to-use-ACCESS_ONCE-for-seq.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0134-hwmon-coretemp-Increase-CPU-core-limit.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0135-nouveau-initialise-has_optimus-variable.patch31
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0136-hwmon-coretemp-fix-oops-on-cpu-unplug.patch77
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0137-libata-skip-old-error-history-when-counting-probe-tr.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0138-b43-only-reload-config-after-successful-initializati.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0139-i2c-pnx-Disable-clk-in-suspend.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0140-ipw2200-Fix-race-condition-in-the-command-completion.patch74
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0141-mac80211-fix-AP-mode-EAP-tx-for-VLAN-stations.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0142-rtlwifi-Fix-oops-on-unload.patch67
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0143-wl1251-fix-crash-on-remove-due-to-premature-kfree.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0144-wl1251-fix-crash-on-remove-due-to-leftover-work-item.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0145-iwlwifi-do-not-nulify-ctx-vif-on-reset.patch85
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0146-iwlwifi-fix-hardware-queue-programming.patch114
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0147-hfsplus-Fix-potential-buffer-overflows.patch79
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0148-ASoC-tlv312aic23-unbreak-resume.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0149-asm-generic-Use-__BITS_PER_LONG-in-statfs.h.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0150-x86-relocs-Remove-an-unused-variable.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0151-ARM-7410-1-Add-extra-clobber-registers-for-assembly-.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0152-ARM-7414-1-SMP-prevent-use-of-the-console-when-using.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0153-drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0154-drm-i915-Do-no-set-Stencil-Cache-eviction-LRA-w-a-on.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0155-xen-pte-Fix-crashes-when-trying-to-see-non-existent-.patch63
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0156-xen-pci-don-t-use-PCI-BIOS-service-for-configuration.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0157-percpu-x86-don-t-use-PMD_SIZE-as-embedded-atom_size-.patch68
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0158-iwlagn-allow-up-to-uCode-API-6-for-6000-devices.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0159-iwlwifi-use-correct-released-ucode-version.patch159
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0160-iwlwifi-use-6000G2B-for-6030-device-series.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0161-exit_signal-simplify-the-we-have-changed-execution-d.patch75
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0162-exit_signal-fix-the-parent-has-changed-security-doma.patch77
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0163-staging-r8712u-Fix-regression-caused-by-commit-8c213.patch66
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0164-smsc95xx-mark-link-down-on-startup-and-let-PHY-inter.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0165-Linux-3.2.17.patch24
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch52
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch57
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0011-netem-fix-possible-skb-leak.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch136
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0016-sungem-Fix-WakeOnLan.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch67
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch124
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch74
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch70
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0025-rc-Postpone-ISR-registration.patch325
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch75
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch103
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch187
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0037-ia64-Add-accept4-syscall.patch57
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch73
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch29
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch222
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch57
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0054-pktgen-fix-crash-at-module-unload.patch72
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0055-pktgen-fix-module-unload-for-good.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0056-Linux-3.2.18.patch24
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp_3.2.bb223
223 files changed, 14794 insertions, 2 deletions
diff --git a/conf/machine/include/ti33x.inc b/conf/machine/include/ti33x.inc
index e04da03b..61ee65eb 100644
--- a/conf/machine/include/ti33x.inc
+++ b/conf/machine/include/ti33x.inc
@@ -4,7 +4,7 @@ require conf/machine/include/soc-family.inc
4require conf/machine/include/tune-cortexa8.inc 4require conf/machine/include/tune-cortexa8.inc
5PREFERRED_PROVIDER_virtual/kernel = "linux-ti33x-psp" 5PREFERRED_PROVIDER_virtual/kernel = "linux-ti33x-psp"
6# Increase this everytime you change something in the kernel 6# Increase this everytime you change something in the kernel
7MACHINE_KERNEL_PR = "r11" 7MACHINE_KERNEL_PR = "r12"
8 8
9KERNEL_IMAGETYPE = "uImage" 9KERNEL_IMAGETYPE = "uImage"
10 10
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0001-crypto-sha512-Fix-byte-counter-overflow-in-SHA-512.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0001-crypto-sha512-Fix-byte-counter-overflow-in-SHA-512.patch
new file mode 100644
index 00000000..55b03246
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0001-crypto-sha512-Fix-byte-counter-overflow-in-SHA-512.patch
@@ -0,0 +1,37 @@
1From 56ff3a4557bf6cd95220c643eb6fdf28db222370 Mon Sep 17 00:00:00 2001
2From: Kent Yoder <key@linux.vnet.ibm.com>
3Date: Thu, 5 Apr 2012 20:34:20 +0800
4Subject: [PATCH 001/165] crypto: sha512 - Fix byte counter overflow in
5 SHA-512
6
7commit 25c3d30c918207556ae1d6e663150ebdf902186b upstream.
8
9The current code only increments the upper 64 bits of the SHA-512 byte
10counter when the number of bytes hashed happens to hit 2^64 exactly.
11
12This patch increments the upper 64 bits whenever the lower 64 bits
13overflows.
14
15Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
16Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 crypto/sha512_generic.c | 2 +-
20 1 files changed, 1 insertions(+), 1 deletions(-)
21
22diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
23index 107f6f7..dd30f40 100644
24--- a/crypto/sha512_generic.c
25+++ b/crypto/sha512_generic.c
26@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, const u8 *data, unsigned int len)
27 index = sctx->count[0] & 0x7f;
28
29 /* Update number of bytes */
30- if (!(sctx->count[0] += len))
31+ if ((sctx->count[0] += len) < len)
32 sctx->count[1]++;
33
34 part_len = 128 - index;
35--
361.7.7.6
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0002-ALSA-hda-conexant-Don-t-set-HP-pin-control-bit-uncon.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0002-ALSA-hda-conexant-Don-t-set-HP-pin-control-bit-uncon.patch
new file mode 100644
index 00000000..c03a4a32
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0002-ALSA-hda-conexant-Don-t-set-HP-pin-control-bit-uncon.patch
@@ -0,0 +1,43 @@
1From b5fdd927a3527e8ed9a882d3c72e32435fa71dd3 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Thu, 19 Apr 2012 15:15:25 +0200
4Subject: [PATCH 002/165] ALSA: hda/conexant - Don't set HP pin-control bit
5 unconditionally
6
7commit ca3649de026ff95c6f2847e8d096cf2f411c02b3 upstream.
8
9Some output pins on Conexant chips have no HP control bit, but the
10auto-parser initializes these pins unconditionally with PIN_HP.
11
12Check the pin-capability and avoid the HP bit if not supported.
13
14Signed-off-by: Takashi Iwai <tiwai@suse.de>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 sound/pci/hda/patch_conexant.c | 9 +++++++--
18 1 files changed, 7 insertions(+), 2 deletions(-)
19
20diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
21index ae94929..99a3378 100644
22--- a/sound/pci/hda/patch_conexant.c
23+++ b/sound/pci/hda/patch_conexant.c
24@@ -4003,9 +4003,14 @@ static void cx_auto_init_output(struct hda_codec *codec)
25 int i;
26
27 mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids);
28- for (i = 0; i < cfg->hp_outs; i++)
29+ for (i = 0; i < cfg->hp_outs; i++) {
30+ unsigned int val = PIN_OUT;
31+ if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) &
32+ AC_PINCAP_HP_DRV)
33+ val |= AC_PINCTL_HP_EN;
34 snd_hda_codec_write(codec, cfg->hp_pins[i], 0,
35- AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP);
36+ AC_VERB_SET_PIN_WIDGET_CONTROL, val);
37+ }
38 mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
39 mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
40 mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);
41--
421.7.7.6
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0003-ALSA-hda-conexant-Set-up-the-missing-docking-station.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0003-ALSA-hda-conexant-Set-up-the-missing-docking-station.patch
new file mode 100644
index 00000000..b3065903
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0003-ALSA-hda-conexant-Set-up-the-missing-docking-station.patch
@@ -0,0 +1,99 @@
1From 859f08d45339917d263a366170476c1f8389a2ea Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Thu, 19 Apr 2012 15:18:08 +0200
4Subject: [PATCH 003/165] ALSA: hda/conexant - Set up the missing
5 docking-station pins
6
7commit d70f363222ef373c2037412f09a600357cfa1c7a upstream.
8
9ThinkPad 410,420,510,520 and X201 with cx50585 & co chips have the
10docking-station ports, but BIOS doesn't initialize for these pins.
11Thus, like the former X200, we need to set up the pins manually in the
12driver.
13
14The odd part is that the same PCI SSID is used for X200 and T400, thus
15we need to prepare individual fixup tables for cx5051 and others.
16
17Bugzilla entries:
18 https://bugzilla.redhat.com/show_bug.cgi?id=808559
19 https://bugzilla.redhat.com/show_bug.cgi?id=806217
20 https://bugzilla.redhat.com/show_bug.cgi?id=810697
21
22Reported-by: Josh Boyer <jwboyer@redhat.com>
23Reported-by: Jens Taprogge <jens.taprogge@taprogge.org>
24Tested-by: Jens Taprogge <jens.taprogge@taprogge.org>
25Signed-off-by: Takashi Iwai <tiwai@suse.de>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 sound/pci/hda/patch_conexant.c | 28 +++++++++++++++++++++++++---
29 1 files changed, 25 insertions(+), 3 deletions(-)
30
31diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
32index 99a3378..51a1afc 100644
33--- a/sound/pci/hda/patch_conexant.c
34+++ b/sound/pci/hda/patch_conexant.c
35@@ -4413,8 +4413,10 @@ static void apply_pin_fixup(struct hda_codec *codec,
36
37 enum {
38 CXT_PINCFG_LENOVO_X200,
39+ CXT_PINCFG_LENOVO_TP410,
40 };
41
42+/* ThinkPad X200 & co with cxt5051 */
43 static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
44 { 0x16, 0x042140ff }, /* HP (seq# overridden) */
45 { 0x17, 0x21a11000 }, /* dock-mic */
46@@ -4422,15 +4424,33 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
47 {}
48 };
49
50+/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
51+static const struct cxt_pincfg cxt_pincfg_lenovo_tp410[] = {
52+ { 0x19, 0x042110ff }, /* HP (seq# overridden) */
53+ { 0x1a, 0x21a190f0 }, /* dock-mic */
54+ { 0x1c, 0x212140ff }, /* dock-HP */
55+ {}
56+};
57+
58 static const struct cxt_pincfg *cxt_pincfg_tbl[] = {
59 [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200,
60+ [CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410,
61 };
62
63-static const struct snd_pci_quirk cxt_fixups[] = {
64+static const struct snd_pci_quirk cxt5051_fixups[] = {
65 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
66 {}
67 };
68
69+static const struct snd_pci_quirk cxt5066_fixups[] = {
70+ SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
71+ SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
72+ SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
73+ SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
74+ SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
75+ {}
76+};
77+
78 /* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
79 * can be created (bko#42825)
80 */
81@@ -4467,11 +4487,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
82 break;
83 case 0x14f15051:
84 add_cx5051_fake_mutes(codec);
85+ apply_pin_fixup(codec, cxt5051_fixups, cxt_pincfg_tbl);
86+ break;
87+ default:
88+ apply_pin_fixup(codec, cxt5066_fixups, cxt_pincfg_tbl);
89 break;
90 }
91
92- apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
93-
94 err = cx_auto_search_adcs(codec);
95 if (err < 0)
96 return err;
97--
981.7.7.6
99
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0004-ARM-clps711x-serial-driver-hungs-are-a-result-of-cal.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0004-ARM-clps711x-serial-driver-hungs-are-a-result-of-cal.patch
new file mode 100644
index 00000000..39e5ef54
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0004-ARM-clps711x-serial-driver-hungs-are-a-result-of-cal.patch
@@ -0,0 +1,54 @@
1From 36a5e353678eb6856bf90e322b815865abf4c660 Mon Sep 17 00:00:00 2001
2From: Alexander Shiyan <shc_work@mail.ru>
3Date: Tue, 27 Mar 2012 12:22:49 +0400
4Subject: [PATCH 004/165] ARM: clps711x: serial driver hungs are a result of
5 call disable_irq within ISR
6
7commit 7a6fbc9a887193a1e9f8658703881c528040afbc upstream.
8
9Since 2.6.30-rc1 clps711x serial driver hungs system. This is a result
10of call disable_irq from ISR. synchronize_irq waits for end of interrupt
11and goes to infinite loop. This patch fix this problem.
12
13Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/tty/serial/clps711x.c | 14 ++++++++------
18 1 files changed, 8 insertions(+), 6 deletions(-)
19
20diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
21index e6c3dbd..836fe273 100644
22--- a/drivers/tty/serial/clps711x.c
23+++ b/drivers/tty/serial/clps711x.c
24@@ -154,10 +154,9 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
25 port->x_char = 0;
26 return IRQ_HANDLED;
27 }
28- if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
29- clps711xuart_stop_tx(port);
30- return IRQ_HANDLED;
31- }
32+
33+ if (uart_circ_empty(xmit) || uart_tx_stopped(port))
34+ goto disable_tx_irq;
35
36 count = port->fifosize >> 1;
37 do {
38@@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
39 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
40 uart_write_wakeup(port);
41
42- if (uart_circ_empty(xmit))
43- clps711xuart_stop_tx(port);
44+ if (uart_circ_empty(xmit)) {
45+ disable_tx_irq:
46+ disable_irq_nosync(TX_IRQ(port));
47+ tx_enabled(port) = 0;
48+ }
49
50 return IRQ_HANDLED;
51 }
52--
531.7.7.6
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch
new file mode 100644
index 00000000..b7a22c41
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch
@@ -0,0 +1,58 @@
1From 69c74a3f01d30c6dd44991f6413a4f317f4591a7 Mon Sep 17 00:00:00 2001
2From: Paul Walmsley <paul@pwsan.com>
3Date: Tue, 10 Apr 2012 18:36:02 -0600
4Subject: [PATCH 005/165] ARM: OMAP1: DMTIMER: fix broken timer clock source
5 selection
6
7commit 6aaec67da1e41a0752a2b903b989e73b9f02e182 upstream.
8
9DMTIMER source selection on OMAP1 is broken. omap1_dm_timer_set_src()
10tries to use __raw_{read,write}l() to read from and write to physical
11addresses, but those functions take virtual addresses.
12
13sparse caught this:
14
15arch/arm/mach-omap1/timer.c:50:13: warning: incorrect type in argument 1 (different base types)
16arch/arm/mach-omap1/timer.c:50:13: expected void const volatile [noderef] <asn:2>*<noident>
17arch/arm/mach-omap1/timer.c:50:13: got unsigned int
18arch/arm/mach-omap1/timer.c:52:9: warning: incorrect type in argument 1 (different base types)
19arch/arm/mach-omap1/timer.c:52:9: expected void const volatile [noderef] <asn:2>*<noident>
20arch/arm/mach-omap1/timer.c:52:9: got unsigned int
21
22Fix by using omap_{read,writel}(), just like the other users of the
23MOD_CONF_CTRL_1 register in the OMAP1 codebase. Of course, in the long term,
24removing omap_{read,write}l() is the appropriate thing to do; but
25this will take some work to do this cleanly.
26
27Looks like this was caused by 97933d6 (ARM: OMAP1: dmtimer: conversion
28to platform devices) that dangerously moved code and changed it in
29the same patch.
30
31Signed-off-by: Paul Walmsley <paul@pwsan.com>
32Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
33[tony@atomide.com: updated comments to include the breaking commit]
34Signed-off-by: Tony Lindgren <tony@atomide.com>
35Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
36---
37 arch/arm/mach-omap1/timer.c | 4 ++--
38 1 files changed, 2 insertions(+), 2 deletions(-)
39
40diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
41index 6e90665..fb202af 100644
42--- a/arch/arm/mach-omap1/timer.c
43+++ b/arch/arm/mach-omap1/timer.c
44@@ -47,9 +47,9 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev,
45 int n = (pdev->id - 1) << 1;
46 u32 l;
47
48- l = __raw_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
49+ l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
50 l |= source << n;
51- __raw_writel(l, MOD_CONF_CTRL_1);
52+ omap_writel(l, MOD_CONF_CTRL_1);
53
54 return 0;
55 }
56--
571.7.7.6
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0006-mmc-fixes-for-eMMC-v4.5-discard-operation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0006-mmc-fixes-for-eMMC-v4.5-discard-operation.patch
new file mode 100644
index 00000000..061a8f9f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0006-mmc-fixes-for-eMMC-v4.5-discard-operation.patch
@@ -0,0 +1,72 @@
1From 23e70c192386ff8d0e33f9b9225d984ae5eea97b Mon Sep 17 00:00:00 2001
2From: Adrian Hunter <adrian.hunter@intel.com>
3Date: Thu, 5 Apr 2012 14:45:47 +0300
4Subject: [PATCH 006/165] mmc: fixes for eMMC v4.5 discard operation
5
6commit 7194efb8f063ee3aa0cb50d9002348887e68ec10 upstream.
7
8eMMC v4.5 discard operation is significantly different from the
9existing trim operation because it is not guaranteed to work with
10the new sanitize operation. Consequently mmc_can_trim() is
11separated from mmc_can_discard().
12
13Also the new discard operation does not result in the sectors being
14set to all-zeros, so discard_zeroes_data must not be set.
15
16In addition, the new discard has the same timeout as trim, but from
17v4.5 trim is defined to use the hc timeout. The timeout calculation
18is adjusted accordingly.
19
20Fixes apply to linux 3.2 on.
21
22Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
23Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
24Acked-by: Linus Walleij <linus.walleij@linaro.org>
25Signed-off-by: Chris Ball <cjb@laptop.org>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 drivers/mmc/card/queue.c | 2 +-
29 drivers/mmc/core/core.c | 7 ++++---
30 2 files changed, 5 insertions(+), 4 deletions(-)
31
32diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
33index dcad59c..78690f2 100644
34--- a/drivers/mmc/card/queue.c
35+++ b/drivers/mmc/card/queue.c
36@@ -134,7 +134,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
37
38 queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
39 q->limits.max_discard_sectors = max_discard;
40- if (card->erased_byte == 0)
41+ if (card->erased_byte == 0 && !mmc_can_discard(card))
42 q->limits.discard_zeroes_data = 1;
43 q->limits.discard_granularity = card->pref_erase << 9;
44 /* granularity must not be greater than max. discard */
45diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
46index 950b97d..c420a9e 100644
47--- a/drivers/mmc/core/core.c
48+++ b/drivers/mmc/core/core.c
49@@ -1516,7 +1516,10 @@ static unsigned int mmc_mmc_erase_timeout(struct mmc_card *card,
50 {
51 unsigned int erase_timeout;
52
53- if (card->ext_csd.erase_group_def & 1) {
54+ if (arg == MMC_DISCARD_ARG ||
55+ (arg == MMC_TRIM_ARG && card->ext_csd.rev >= 6)) {
56+ erase_timeout = card->ext_csd.trim_timeout;
57+ } else if (card->ext_csd.erase_group_def & 1) {
58 /* High Capacity Erase Group Size uses HC timeouts */
59 if (arg == MMC_TRIM_ARG)
60 erase_timeout = card->ext_csd.trim_timeout;
61@@ -1788,8 +1791,6 @@ int mmc_can_trim(struct mmc_card *card)
62 {
63 if (card->ext_csd.sec_feature_support & EXT_CSD_SEC_GB_CL_EN)
64 return 1;
65- if (mmc_can_discard(card))
66- return 1;
67 return 0;
68 }
69 EXPORT_SYMBOL(mmc_can_trim);
70--
711.7.7.6
72
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0007-mmc-fixes-for-eMMC-v4.5-sanitize-operation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0007-mmc-fixes-for-eMMC-v4.5-sanitize-operation.patch
new file mode 100644
index 00000000..602f2932
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0007-mmc-fixes-for-eMMC-v4.5-sanitize-operation.patch
@@ -0,0 +1,136 @@
1From 6e1972f1214d5827d22d15985bb50d1e05307e7e Mon Sep 17 00:00:00 2001
2From: Adrian Hunter <adrian.hunter@intel.com>
3Date: Thu, 5 Apr 2012 14:45:48 +0300
4Subject: [PATCH 007/165] mmc: fixes for eMMC v4.5 sanitize operation
5
6commit 283028122db37621b124f079ca8eae5b64807ad4 upstream.
7
8eMMC v4.5 sanitize operation erases all copies of unmapped
9data. However trim or erase operations must be used first
10to unmap the required sectors. That was not being done.
11
12Fixes apply to linux 3.2 on.
13
14Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
15Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
16Acked-by: Linus Walleij <linus.walleij@linaro.org>
17Signed-off-by: Chris Ball <cjb@laptop.org>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/mmc/card/block.c | 54 ++++++++++++++++++++++++++++++++-------------
21 drivers/mmc/core/core.c | 2 +
22 2 files changed, 40 insertions(+), 16 deletions(-)
23
24diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
25index 60e8951..6679c4f 100644
26--- a/drivers/mmc/card/block.c
27+++ b/drivers/mmc/card/block.c
28@@ -799,7 +799,7 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq,
29 {
30 struct mmc_blk_data *md = mq->data;
31 struct mmc_card *card = md->queue.card;
32- unsigned int from, nr, arg;
33+ unsigned int from, nr, arg, trim_arg, erase_arg;
34 int err = 0, type = MMC_BLK_SECDISCARD;
35
36 if (!(mmc_can_secure_erase_trim(card) || mmc_can_sanitize(card))) {
37@@ -807,20 +807,26 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq,
38 goto out;
39 }
40
41+ from = blk_rq_pos(req);
42+ nr = blk_rq_sectors(req);
43+
44 /* The sanitize operation is supported at v4.5 only */
45 if (mmc_can_sanitize(card)) {
46- err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
47- EXT_CSD_SANITIZE_START, 1, 0);
48- goto out;
49+ erase_arg = MMC_ERASE_ARG;
50+ trim_arg = MMC_TRIM_ARG;
51+ } else {
52+ erase_arg = MMC_SECURE_ERASE_ARG;
53+ trim_arg = MMC_SECURE_TRIM1_ARG;
54 }
55
56- from = blk_rq_pos(req);
57- nr = blk_rq_sectors(req);
58-
59- if (mmc_can_trim(card) && !mmc_erase_group_aligned(card, from, nr))
60- arg = MMC_SECURE_TRIM1_ARG;
61- else
62- arg = MMC_SECURE_ERASE_ARG;
63+ if (mmc_erase_group_aligned(card, from, nr))
64+ arg = erase_arg;
65+ else if (mmc_can_trim(card))
66+ arg = trim_arg;
67+ else {
68+ err = -EINVAL;
69+ goto out;
70+ }
71 retry:
72 if (card->quirks & MMC_QUIRK_INAND_CMD38) {
73 err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
74@@ -830,25 +836,41 @@ retry:
75 INAND_CMD38_ARG_SECERASE,
76 0);
77 if (err)
78- goto out;
79+ goto out_retry;
80 }
81+
82 err = mmc_erase(card, from, nr, arg);
83- if (!err && arg == MMC_SECURE_TRIM1_ARG) {
84+ if (err == -EIO)
85+ goto out_retry;
86+ if (err)
87+ goto out;
88+
89+ if (arg == MMC_SECURE_TRIM1_ARG) {
90 if (card->quirks & MMC_QUIRK_INAND_CMD38) {
91 err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
92 INAND_CMD38_ARG_EXT_CSD,
93 INAND_CMD38_ARG_SECTRIM2,
94 0);
95 if (err)
96- goto out;
97+ goto out_retry;
98 }
99+
100 err = mmc_erase(card, from, nr, MMC_SECURE_TRIM2_ARG);
101+ if (err == -EIO)
102+ goto out_retry;
103+ if (err)
104+ goto out;
105 }
106-out:
107- if (err == -EIO && !mmc_blk_reset(md, card->host, type))
108+
109+ if (mmc_can_sanitize(card))
110+ err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
111+ EXT_CSD_SANITIZE_START, 1, 0);
112+out_retry:
113+ if (err && !mmc_blk_reset(md, card->host, type))
114 goto retry;
115 if (!err)
116 mmc_blk_reset_success(md, type);
117+out:
118 spin_lock_irq(&md->lock);
119 __blk_end_request(req, err, blk_rq_bytes(req));
120 spin_unlock_irq(&md->lock);
121diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
122index c420a9e..411a994 100644
123--- a/drivers/mmc/core/core.c
124+++ b/drivers/mmc/core/core.c
125@@ -1809,6 +1809,8 @@ EXPORT_SYMBOL(mmc_can_discard);
126
127 int mmc_can_sanitize(struct mmc_card *card)
128 {
129+ if (!mmc_can_trim(card) && !mmc_can_erase(card))
130+ return 0;
131 if (card->ext_csd.sec_feature_support & EXT_CSD_SEC_SANITIZE)
132 return 1;
133 return 0;
134--
1351.7.7.6
136
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0008-mmc-unbreak-sdhci-esdhc-imx-on-i.MX25.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0008-mmc-unbreak-sdhci-esdhc-imx-on-i.MX25.patch
new file mode 100644
index 00000000..d3adbdb7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0008-mmc-unbreak-sdhci-esdhc-imx-on-i.MX25.patch
@@ -0,0 +1,40 @@
1From 5c4111343e2cb543a436cd23d7633a513fd8385d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
3Date: Wed, 18 Apr 2012 02:30:20 +0200
4Subject: [PATCH 008/165] mmc: unbreak sdhci-esdhc-imx on i.MX25
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit b89152824f993a9572b47eb31f4579feadeac34c upstream.
10
11This was broken by me in 37865fe91582582a6f6c00652f6a2b1ff71f8a78
12("mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci") where more
13extensive tests would have shown that read or write of data to the
14card were failing (even if the partition table was correctly read).
15
16Signed-off-by: Eric Bénard <eric@eukrea.com>
17Acked-by: Wolfram Sang <w.sang@pengutronix.de>
18Signed-off-by: Chris Ball <cjb@laptop.org>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 drivers/mmc/host/sdhci-esdhc-imx.c | 3 +--
22 1 files changed, 1 insertions(+), 2 deletions(-)
23
24diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
25index 4540e37..1b47937 100644
26--- a/drivers/mmc/host/sdhci-esdhc-imx.c
27+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
28@@ -467,8 +467,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
29 clk_enable(clk);
30 pltfm_host->clk = clk;
31
32- if (!is_imx25_esdhc(imx_data))
33- host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
34+ host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
35
36 if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data))
37 /* Fix errata ENGcm07207 present on i.MX25 and i.MX35 */
38--
391.7.7.6
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0009-xen-gntdev-do-not-set-VM_PFNMAP.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0009-xen-gntdev-do-not-set-VM_PFNMAP.patch
new file mode 100644
index 00000000..06bb9fe1
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0009-xen-gntdev-do-not-set-VM_PFNMAP.patch
@@ -0,0 +1,37 @@
1From ccc1f53caca147badfafce099bd995a33d04880a Mon Sep 17 00:00:00 2001
2From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
3Date: Tue, 3 Apr 2012 18:05:47 +0100
4Subject: [PATCH 009/165] xen/gntdev: do not set VM_PFNMAP
5
6commit e8e937be971d706061dc56220ff3605ab77622a7 upstream.
7
8Since we are using the m2p_override we do have struct pages
9corresponding to the user vma mmap'ed by gntdev.
10
11Removing the VM_PFNMAP flag makes get_user_pages work on that vma.
12An example test case would be using a Xen userspace block backend
13(QDISK) on a file on NFS using O_DIRECT.
14
15Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/xen/gntdev.c | 2 +-
20 1 files changed, 1 insertions(+), 1 deletions(-)
21
22diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
23index afca14d..625890c 100644
24--- a/drivers/xen/gntdev.c
25+++ b/drivers/xen/gntdev.c
26@@ -692,7 +692,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)
27 vma->vm_flags |= VM_RESERVED|VM_DONTEXPAND;
28
29 if (use_ptemod)
30- vma->vm_flags |= VM_DONTCOPY|VM_PFNMAP;
31+ vma->vm_flags |= VM_DONTCOPY;
32
33 vma->vm_private_data = map;
34
35--
361.7.7.6
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0010-xen-xenbus-Add-quirk-to-deal-with-misconfigured-back.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0010-xen-xenbus-Add-quirk-to-deal-with-misconfigured-back.patch
new file mode 100644
index 00000000..916237d7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0010-xen-xenbus-Add-quirk-to-deal-with-misconfigured-back.patch
@@ -0,0 +1,151 @@
1From a3da8d9a1658c86fb74dbd35b8bda473d8fe0717 Mon Sep 17 00:00:00 2001
2From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
3Date: Tue, 17 Apr 2012 22:21:38 -0400
4Subject: [PATCH 010/165] xen/xenbus: Add quirk to deal with misconfigured
5 backends.
6
7commit 3066616ce23aad5719c23a0f21f32676402cb44b upstream.
8
9A rather annoying and common case is when booting a PVonHVM guest
10and exposing the PV KBD and PV VFB - as broken toolstacks don't
11always initialize the backends correctly.
12
13Normally The HVM guest is using the VGA driver and the emulated
14keyboard for this (though upstream version of QEMU implements
15PV KBD, but still uses a VGA driver). We provide a very basic
16two-stage wait mechanism - where we wait for 30 seconds for all
17devices, and then for 270 for all them except the two mentioned.
18
19That allows us to wait for the essential devices, like network
20or disk for the full 6 minutes.
21
22To trigger this, put this in your guest config:
23
24vfb = [ 'vnc=1, vnclisten=0.0.0.0 ,vncunused=1']
25
26instead of this:
27vnc=1
28vnclisten="0.0.0.0"
29
30Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
31[v3: Split delay in non-essential (30 seconds) and essential
32 devices per Ian and Stefano suggestion]
33[v4: Added comments per Stefano suggestion]
34Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
35Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
36---
37 drivers/xen/xenbus/xenbus_probe_frontend.c | 69 +++++++++++++++++++++------
38 1 files changed, 53 insertions(+), 16 deletions(-)
39
40diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c
41index 2f73195..2ce95c0 100644
42--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
43+++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
44@@ -129,7 +129,7 @@ static int read_backend_details(struct xenbus_device *xendev)
45 return xenbus_read_otherend_details(xendev, "backend-id", "backend");
46 }
47
48-static int is_device_connecting(struct device *dev, void *data)
49+static int is_device_connecting(struct device *dev, void *data, bool ignore_nonessential)
50 {
51 struct xenbus_device *xendev = to_xenbus_device(dev);
52 struct device_driver *drv = data;
53@@ -146,16 +146,41 @@ static int is_device_connecting(struct device *dev, void *data)
54 if (drv && (dev->driver != drv))
55 return 0;
56
57+ if (ignore_nonessential) {
58+ /* With older QEMU, for PVonHVM guests the guest config files
59+ * could contain: vfb = [ 'vnc=1, vnclisten=0.0.0.0']
60+ * which is nonsensical as there is no PV FB (there can be
61+ * a PVKB) running as HVM guest. */
62+
63+ if ((strncmp(xendev->nodename, "device/vkbd", 11) == 0))
64+ return 0;
65+
66+ if ((strncmp(xendev->nodename, "device/vfb", 10) == 0))
67+ return 0;
68+ }
69 xendrv = to_xenbus_driver(dev->driver);
70 return (xendev->state < XenbusStateConnected ||
71 (xendev->state == XenbusStateConnected &&
72 xendrv->is_ready && !xendrv->is_ready(xendev)));
73 }
74+static int essential_device_connecting(struct device *dev, void *data)
75+{
76+ return is_device_connecting(dev, data, true /* ignore PV[KBB+FB] */);
77+}
78+static int non_essential_device_connecting(struct device *dev, void *data)
79+{
80+ return is_device_connecting(dev, data, false);
81+}
82
83-static int exists_connecting_device(struct device_driver *drv)
84+static int exists_essential_connecting_device(struct device_driver *drv)
85 {
86 return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
87- is_device_connecting);
88+ essential_device_connecting);
89+}
90+static int exists_non_essential_connecting_device(struct device_driver *drv)
91+{
92+ return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
93+ non_essential_device_connecting);
94 }
95
96 static int print_device_status(struct device *dev, void *data)
97@@ -186,6 +211,23 @@ static int print_device_status(struct device *dev, void *data)
98 /* We only wait for device setup after most initcalls have run. */
99 static int ready_to_wait_for_devices;
100
101+static bool wait_loop(unsigned long start, unsigned int max_delay,
102+ unsigned int *seconds_waited)
103+{
104+ if (time_after(jiffies, start + (*seconds_waited+5)*HZ)) {
105+ if (!*seconds_waited)
106+ printk(KERN_WARNING "XENBUS: Waiting for "
107+ "devices to initialise: ");
108+ *seconds_waited += 5;
109+ printk("%us...", max_delay - *seconds_waited);
110+ if (*seconds_waited == max_delay)
111+ return true;
112+ }
113+
114+ schedule_timeout_interruptible(HZ/10);
115+
116+ return false;
117+}
118 /*
119 * On a 5-minute timeout, wait for all devices currently configured. We need
120 * to do this to guarantee that the filesystems and / or network devices
121@@ -209,19 +251,14 @@ static void wait_for_devices(struct xenbus_driver *xendrv)
122 if (!ready_to_wait_for_devices || !xen_domain())
123 return;
124
125- while (exists_connecting_device(drv)) {
126- if (time_after(jiffies, start + (seconds_waited+5)*HZ)) {
127- if (!seconds_waited)
128- printk(KERN_WARNING "XENBUS: Waiting for "
129- "devices to initialise: ");
130- seconds_waited += 5;
131- printk("%us...", 300 - seconds_waited);
132- if (seconds_waited == 300)
133- break;
134- }
135-
136- schedule_timeout_interruptible(HZ/10);
137- }
138+ while (exists_non_essential_connecting_device(drv))
139+ if (wait_loop(start, 30, &seconds_waited))
140+ break;
141+
142+ /* Skips PVKB and PVFB check.*/
143+ while (exists_essential_connecting_device(drv))
144+ if (wait_loop(start, 270, &seconds_waited))
145+ break;
146
147 if (seconds_waited)
148 printk("\n");
149--
1501.7.7.6
151
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0011-USB-yurex-Remove-allocation-of-coherent-buffer-for-s.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0011-USB-yurex-Remove-allocation-of-coherent-buffer-for-s.patch
new file mode 100644
index 00000000..c8f316ae
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0011-USB-yurex-Remove-allocation-of-coherent-buffer-for-s.patch
@@ -0,0 +1,48 @@
1From 607a2c7f4e227d472b7b1c6b69ec7112f5e8b142 Mon Sep 17 00:00:00 2001
2From: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
3Date: Fri, 30 Mar 2012 08:51:28 +0900
4Subject: [PATCH 011/165] USB: yurex: Remove allocation of coherent buffer for
5 setup-packet buffer
6
7commit 523fc5c14f6cad283e5a266eba0e343aed6e73d5 upstream.
8
9Removes allocation of coherent buffer for the control-request setup-packet
10buffer from the yurex driver. Using coherent buffers for setup-packet is
11obsolete and does not work with some USB host implementations.
12
13Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/usb/misc/yurex.c | 8 ++------
18 1 files changed, 2 insertions(+), 6 deletions(-)
19
20diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c
21index ac5bfd6..24bff37 100644
22--- a/drivers/usb/misc/yurex.c
23+++ b/drivers/usb/misc/yurex.c
24@@ -99,9 +99,7 @@ static void yurex_delete(struct kref *kref)
25 usb_put_dev(dev->udev);
26 if (dev->cntl_urb) {
27 usb_kill_urb(dev->cntl_urb);
28- if (dev->cntl_req)
29- usb_free_coherent(dev->udev, YUREX_BUF_SIZE,
30- dev->cntl_req, dev->cntl_urb->setup_dma);
31+ kfree(dev->cntl_req);
32 if (dev->cntl_buffer)
33 usb_free_coherent(dev->udev, YUREX_BUF_SIZE,
34 dev->cntl_buffer, dev->cntl_urb->transfer_dma);
35@@ -234,9 +232,7 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_
36 }
37
38 /* allocate buffer for control req */
39- dev->cntl_req = usb_alloc_coherent(dev->udev, YUREX_BUF_SIZE,
40- GFP_KERNEL,
41- &dev->cntl_urb->setup_dma);
42+ dev->cntl_req = kmalloc(YUREX_BUF_SIZE, GFP_KERNEL);
43 if (!dev->cntl_req) {
44 err("Could not allocate cntl_req");
45 goto error;
46--
471.7.7.6
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0012-USB-yurex-Fix-missing-URB_NO_TRANSFER_DMA_MAP-flag-i.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0012-USB-yurex-Fix-missing-URB_NO_TRANSFER_DMA_MAP-flag-i.patch
new file mode 100644
index 00000000..b922644a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0012-USB-yurex-Fix-missing-URB_NO_TRANSFER_DMA_MAP-flag-i.patch
@@ -0,0 +1,35 @@
1From 52f84b7d4cbfe7fc0ed467312e405df648bb1dca Mon Sep 17 00:00:00 2001
2From: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
3Date: Fri, 30 Mar 2012 08:51:36 +0900
4Subject: [PATCH 012/165] USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag
5 in urb
6
7commit 532f17b5d59bf0deb6f1ff9bc1fb27d5b5011c09 upstream.
8
9Current probing code is setting URB_NO_TRANSFER_DMA_MAP flag into a wrong urb
10structure, and this causes BUG_ON with some USB host implementations.
11This patch fixes the issue.
12
13Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/usb/misc/yurex.c | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c
21index 24bff37..2504694 100644
22--- a/drivers/usb/misc/yurex.c
23+++ b/drivers/usb/misc/yurex.c
24@@ -282,7 +282,7 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_
25 usb_rcvintpipe(dev->udev, dev->int_in_endpointAddr),
26 dev->int_buffer, YUREX_BUF_SIZE, yurex_interrupt,
27 dev, 1);
28- dev->cntl_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
29+ dev->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
30 if (usb_submit_urb(dev->urb, GFP_KERNEL)) {
31 retval = -EIO;
32 err("Could not submitting URB");
33--
341.7.7.6
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0013-uwb-fix-use-of-del_timer_sync-in-interrupt.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0013-uwb-fix-use-of-del_timer_sync-in-interrupt.patch
new file mode 100644
index 00000000..0fbd2366
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0013-uwb-fix-use-of-del_timer_sync-in-interrupt.patch
@@ -0,0 +1,64 @@
1From 73b80f793567a6056f9265c82599b47bc5856db8 Mon Sep 17 00:00:00 2001
2From: Oliver Neukum <oliver@neukum.org>
3Date: Mon, 16 Apr 2012 15:28:28 +0200
4Subject: [PATCH 013/165] uwb: fix use of del_timer_sync() in interrupt
5
6commit 9426cd05682745d1024dbabdec5631309bd2f480 upstream.
7
8del_timer_sync() cannot be used in interrupt.
9Replace it with del_timer() and a flag
10
11Signed-off-by: Oliver Neukum <oneukum@suse.de>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 drivers/uwb/neh.c | 12 +++++++++++-
16 1 files changed, 11 insertions(+), 1 deletions(-)
17
18diff --git a/drivers/uwb/neh.c b/drivers/uwb/neh.c
19index a269937..8cb71bb 100644
20--- a/drivers/uwb/neh.c
21+++ b/drivers/uwb/neh.c
22@@ -107,6 +107,7 @@ struct uwb_rc_neh {
23 u8 evt_type;
24 __le16 evt;
25 u8 context;
26+ u8 completed;
27 uwb_rc_cmd_cb_f cb;
28 void *arg;
29
30@@ -409,6 +410,7 @@ static void uwb_rc_neh_grok_event(struct uwb_rc *rc, struct uwb_rceb *rceb, size
31 struct device *dev = &rc->uwb_dev.dev;
32 struct uwb_rc_neh *neh;
33 struct uwb_rceb *notif;
34+ unsigned long flags;
35
36 if (rceb->bEventContext == 0) {
37 notif = kmalloc(size, GFP_ATOMIC);
38@@ -422,7 +424,11 @@ static void uwb_rc_neh_grok_event(struct uwb_rc *rc, struct uwb_rceb *rceb, size
39 } else {
40 neh = uwb_rc_neh_lookup(rc, rceb);
41 if (neh) {
42- del_timer_sync(&neh->timer);
43+ spin_lock_irqsave(&rc->neh_lock, flags);
44+ /* to guard against a timeout */
45+ neh->completed = 1;
46+ del_timer(&neh->timer);
47+ spin_unlock_irqrestore(&rc->neh_lock, flags);
48 uwb_rc_neh_cb(neh, rceb, size);
49 } else
50 dev_warn(dev, "event 0x%02x/%04x/%02x (%zu bytes): nobody cared\n",
51@@ -568,6 +574,10 @@ static void uwb_rc_neh_timer(unsigned long arg)
52 unsigned long flags;
53
54 spin_lock_irqsave(&rc->neh_lock, flags);
55+ if (neh->completed) {
56+ spin_unlock_irqrestore(&rc->neh_lock, flags);
57+ return;
58+ }
59 if (neh->context)
60 __uwb_rc_neh_rm(rc, neh);
61 else
62--
631.7.7.6
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0014-uwb-fix-error-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0014-uwb-fix-error-handling.patch
new file mode 100644
index 00000000..f4bf93c6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0014-uwb-fix-error-handling.patch
@@ -0,0 +1,34 @@
1From 8a03e18a4ff4ab7f3a6da08bd3f564f8a7aa2c4e Mon Sep 17 00:00:00 2001
2From: Oliver Neukum <oliver@neukum.org>
3Date: Wed, 18 Apr 2012 10:05:55 +0200
4Subject: [PATCH 014/165] uwb: fix error handling
5
6commit 5bd7b419ef2eb4989b207753e088c3437159618a upstream.
7
8Fatal errors such as a device disconnect must not trigger
9error handling. The error returns must be checked.
10
11Signed-off-by: Oliver Neukum <oneukum@suse.de>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 drivers/uwb/hwa-rc.c | 3 ++-
16 1 files changed, 2 insertions(+), 1 deletions(-)
17
18diff --git a/drivers/uwb/hwa-rc.c b/drivers/uwb/hwa-rc.c
19index 2babcd4..86685e9 100644
20--- a/drivers/uwb/hwa-rc.c
21+++ b/drivers/uwb/hwa-rc.c
22@@ -645,7 +645,8 @@ void hwarc_neep_cb(struct urb *urb)
23 dev_err(dev, "NEEP: URB error %d\n", urb->status);
24 }
25 result = usb_submit_urb(urb, GFP_ATOMIC);
26- if (result < 0) {
27+ if (result < 0 && result != -ENODEV && result != -EPERM) {
28+ /* ignoring unrecoverable errors */
29 dev_err(dev, "NEEP: Can't resubmit URB (%d) resetting device\n",
30 result);
31 goto error;
32--
331.7.7.6
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0015-davinci_mdio-Fix-MDIO-timeout-check.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0015-davinci_mdio-Fix-MDIO-timeout-check.patch
new file mode 100644
index 00000000..fab7b50a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0015-davinci_mdio-Fix-MDIO-timeout-check.patch
@@ -0,0 +1,44 @@
1From e132279cab18984918fc3cc9f8f02c8bd71e2931 Mon Sep 17 00:00:00 2001
2From: Christian Riesch <christian.riesch@omicron.at>
3Date: Mon, 16 Apr 2012 04:35:25 +0000
4Subject: [PATCH 015/165] davinci_mdio: Fix MDIO timeout check
5
6commit 5b76d0600b2b08eef77f8e9226938b7b6bde3099 upstream.
7
8Under heavy load (flood ping) it is possible for the MDIO timeout to
9expire before the loop checks the GO bit again. This patch adds an
10additional check whether the operation was done before actually
11returning -ETIMEDOUT.
12
13To reproduce this bug, flood ping the device, e.g., ping -f -l 1000
14After some time, a "timed out waiting for user access" warning
15may appear. And even worse, link may go down since the PHY reported a
16timeout.
17
18Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
19Cc: Cyril Chemparathy <cyril@ti.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/net/ethernet/ti/davinci_mdio.c | 5 +++++
24 1 files changed, 5 insertions(+), 0 deletions(-)
25
26diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
27index 1f14be6..3802de3 100644
28--- a/drivers/net/ethernet/ti/davinci_mdio.c
29+++ b/drivers/net/ethernet/ti/davinci_mdio.c
30@@ -185,6 +185,11 @@ static inline int wait_for_user_access(struct davinci_mdio_data *data)
31 __davinci_mdio_reset(data);
32 return -EAGAIN;
33 }
34+
35+ reg = __raw_readl(&regs->user[0].access);
36+ if ((reg & USERACCESS_GO) == 0)
37+ return 0;
38+
39 dev_err(data->dev, "timed out waiting for user access\n");
40 return -ETIMEDOUT;
41 }
42--
431.7.7.6
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0016-mwifiex-update-pcie8766-scratch-register-addresses.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0016-mwifiex-update-pcie8766-scratch-register-addresses.patch
new file mode 100644
index 00000000..fa25fb1b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0016-mwifiex-update-pcie8766-scratch-register-addresses.patch
@@ -0,0 +1,50 @@
1From f0553ecfc94510617f6b54a980e86a197e0746ac Mon Sep 17 00:00:00 2001
2From: Bing Zhao <bzhao@marvell.com>
3Date: Thu, 12 Apr 2012 19:00:35 -0700
4Subject: [PATCH 016/165] mwifiex: update pcie8766 scratch register addresses
5
6commit 428ca8a7065354877db63ceabfc493107686eebe upstream.
7
8The scratch register addresses have been changed for newer chips.
9Since the old chip was never shipped and it will not be supported
10any more, just update register addresses to support the new chips.
11
12Signed-off-by: Bing Zhao <bzhao@marvell.com>
13Signed-off-by: John W. Linville <linville@tuxdriver.com>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 drivers/net/wireless/mwifiex/pcie.h | 18 +++++++++---------
17 1 files changed, 9 insertions(+), 9 deletions(-)
18
19diff --git a/drivers/net/wireless/mwifiex/pcie.h b/drivers/net/wireless/mwifiex/pcie.h
20index 445ff21..2f218f9 100644
21--- a/drivers/net/wireless/mwifiex/pcie.h
22+++ b/drivers/net/wireless/mwifiex/pcie.h
23@@ -48,15 +48,15 @@
24 #define PCIE_HOST_INT_STATUS_MASK 0xC3C
25 #define PCIE_SCRATCH_2_REG 0xC40
26 #define PCIE_SCRATCH_3_REG 0xC44
27-#define PCIE_SCRATCH_4_REG 0xCC0
28-#define PCIE_SCRATCH_5_REG 0xCC4
29-#define PCIE_SCRATCH_6_REG 0xCC8
30-#define PCIE_SCRATCH_7_REG 0xCCC
31-#define PCIE_SCRATCH_8_REG 0xCD0
32-#define PCIE_SCRATCH_9_REG 0xCD4
33-#define PCIE_SCRATCH_10_REG 0xCD8
34-#define PCIE_SCRATCH_11_REG 0xCDC
35-#define PCIE_SCRATCH_12_REG 0xCE0
36+#define PCIE_SCRATCH_4_REG 0xCD0
37+#define PCIE_SCRATCH_5_REG 0xCD4
38+#define PCIE_SCRATCH_6_REG 0xCD8
39+#define PCIE_SCRATCH_7_REG 0xCDC
40+#define PCIE_SCRATCH_8_REG 0xCE0
41+#define PCIE_SCRATCH_9_REG 0xCE4
42+#define PCIE_SCRATCH_10_REG 0xCE8
43+#define PCIE_SCRATCH_11_REG 0xCEC
44+#define PCIE_SCRATCH_12_REG 0xCF0
45
46 #define CPU_INTR_DNLD_RDY BIT(0)
47 #define CPU_INTR_DOOR_BELL BIT(1)
48--
491.7.7.6
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0017-brcm80211-smac-resume-transmit-fifo-upon-receiving-f.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0017-brcm80211-smac-resume-transmit-fifo-upon-receiving-f.patch
new file mode 100644
index 00000000..cbc4a07d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0017-brcm80211-smac-resume-transmit-fifo-upon-receiving-f.patch
@@ -0,0 +1,57 @@
1From 97f7538da8a6b3e8cef6322b2024817759393079 Mon Sep 17 00:00:00 2001
2From: Arend van Spriel <arend@broadcom.com>
3Date: Wed, 11 Apr 2012 11:52:51 +0200
4Subject: [PATCH 017/165] brcm80211: smac: resume transmit fifo upon receiving
5 frames
6
7commit badc4f07622f0f7093a201638f45e85765f1b5e4 upstream.
8
9There have been reports about not being able to use access-points
10on channel 12 and 13 or having connectivity issues when these channels
11were part of the selected regulatory domain. Upon switching to these
12channels the brcmsmac driver suspends the transmit dma fifos. This
13patch resumes them upon handing over the first received beacon to
14mac80211.
15
16This patch is to be applied to the stable tree for kernel versions
173.2 and 3.3.
18
19Tested-by: Francesco Saverio Schiavarelli <fschiava@libero.it>
20Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
21Reviewed-by: Brett Rudley <brudley@broadcom.com>
22Signed-off-by: Arend van Spriel <arend@broadcom.com>
23Signed-off-by: John W. Linville <linville@tuxdriver.com>
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 drivers/net/wireless/brcm80211/brcmsmac/main.c | 8 ++++++++
27 1 files changed, 8 insertions(+), 0 deletions(-)
28
29diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
30index 453f58e..f98becc 100644
31--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
32+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
33@@ -7865,6 +7865,7 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh,
34 {
35 int len_mpdu;
36 struct ieee80211_rx_status rx_status;
37+ struct ieee80211_hdr *hdr;
38
39 memset(&rx_status, 0, sizeof(rx_status));
40 prep_mac80211_status(wlc, rxh, p, &rx_status);
41@@ -7874,6 +7875,13 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh,
42 skb_pull(p, D11_PHY_HDR_LEN);
43 __skb_trim(p, len_mpdu);
44
45+ /* unmute transmit */
46+ if (wlc->hw->suspended_fifos) {
47+ hdr = (struct ieee80211_hdr *)p->data;
48+ if (ieee80211_is_beacon(hdr->frame_control))
49+ brcms_b_mute(wlc->hw, false);
50+ }
51+
52 memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status));
53 ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p);
54 }
55--
561.7.7.6
57
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0018-rc-core-set-mode-for-winbond-cir.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0018-rc-core-set-mode-for-winbond-cir.patch
new file mode 100644
index 00000000..9e59a209
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0018-rc-core-set-mode-for-winbond-cir.patch
@@ -0,0 +1,37 @@
1From 6dd8dc1e17571cbe55630e5d1e85aa7e27a0b257 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?David=20H=C3=A4rdeman?= <david@hardeman.nu>
3Date: Sun, 8 Apr 2012 06:13:04 -0300
4Subject: [PATCH 018/165] rc-core: set mode for winbond-cir
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit d9b786955f80fb306471fdb9ea24c6d03af6ca36 upstream.
10
11Setting the correct mode is required by rc-core or scancodes won't be
12generated (which isn't very user-friendly).
13
14This one-line fix should be suitable for 3.4-rc2.
15
16Signed-off-by: David Härdeman <david@hardeman.nu>
17Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/media/rc/winbond-cir.c | 1 +
21 1 files changed, 1 insertions(+), 0 deletions(-)
22
23diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
24index 13f54b5..a7e7d6f 100644
25--- a/drivers/media/rc/winbond-cir.c
26+++ b/drivers/media/rc/winbond-cir.c
27@@ -1046,6 +1046,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
28 goto exit_unregister_led;
29 }
30
31+ data->dev->driver_type = RC_DRIVER_IR_RAW;
32 data->dev->driver_name = WBCIR_NAME;
33 data->dev->input_name = WBCIR_NAME;
34 data->dev->input_phys = "wbcir/cir0";
35--
361.7.7.6
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0019-drxk-Does-not-unlock-mutex-if-sanity-check-failed-in.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0019-drxk-Does-not-unlock-mutex-if-sanity-check-failed-in.patch
new file mode 100644
index 00000000..430687cb
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0019-drxk-Does-not-unlock-mutex-if-sanity-check-failed-in.patch
@@ -0,0 +1,41 @@
1From d5cc94665b578e3e5e87884fb802e49b2f276298 Mon Sep 17 00:00:00 2001
2From: Alexey Khoroshilov <khoroshilov@ispras.ru>
3Date: Thu, 5 Apr 2012 18:53:20 -0300
4Subject: [PATCH 019/165] drxk: Does not unlock mutex if sanity check failed
5 in scu_command()
6
7commit e4459e1682c107d7ee1bf102c1ba534230e9b50b upstream.
8
9If sanity check fails in scu_command(), goto error leads to unlock of
10an unheld mutex. The check should not fail in reality, but it nevertheless
11worth fixing.
12
13Found by Linux Driver Verification project (linuxtesting.org).
14
15Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
16Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/media/dvb/frontends/drxk_hard.c | 6 ++++--
20 1 files changed, 4 insertions(+), 2 deletions(-)
21
22diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
23index f6431ef..a1f5e3d 100644
24--- a/drivers/media/dvb/frontends/drxk_hard.c
25+++ b/drivers/media/dvb/frontends/drxk_hard.c
26@@ -1523,8 +1523,10 @@ static int scu_command(struct drxk_state *state,
27 dprintk(1, "\n");
28
29 if ((cmd == 0) || ((parameterLen > 0) && (parameter == NULL)) ||
30- ((resultLen > 0) && (result == NULL)))
31- goto error;
32+ ((resultLen > 0) && (result == NULL))) {
33+ printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__);
34+ return status;
35+ }
36
37 mutex_lock(&state->mutex);
38
39--
401.7.7.6
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0020-cfg80211-fix-interface-combinations-check.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0020-cfg80211-fix-interface-combinations-check.patch
new file mode 100644
index 00000000..f1969a4c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0020-cfg80211-fix-interface-combinations-check.patch
@@ -0,0 +1,30 @@
1From 9080bb10c5fa9dc3a8c358eec3bffc5e0dd29ea8 Mon Sep 17 00:00:00 2001
2From: Lukasz Kucharczyk <lukasz.kucharczyk@tieto.com>
3Date: Wed, 11 Apr 2012 14:55:10 +0200
4Subject: [PATCH 020/165] cfg80211: fix interface combinations check.
5
6commit e55a4046dab28c440c96890bdddcf02dc8981f2d upstream.
7
8Signed-off-by: Lukasz Kucharczyk <lukasz.kucharczyk@tieto.com>
9Signed-off-by: John W. Linville <linville@tuxdriver.com>
10Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
11---
12 net/wireless/util.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15diff --git a/net/wireless/util.c b/net/wireless/util.c
16index 4dde429..8bf8902 100644
17--- a/net/wireless/util.c
18+++ b/net/wireless/util.c
19@@ -996,7 +996,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,
20 if (rdev->wiphy.software_iftypes & BIT(iftype))
21 continue;
22 for (j = 0; j < c->n_limits; j++) {
23- if (!(limits[j].types & iftype))
24+ if (!(limits[j].types & BIT(iftype)))
25 continue;
26 if (limits[j].max < num[iftype])
27 goto cont;
28--
291.7.7.6
30
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0021-Fix-modpost-failures-in-fedora-17.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0021-Fix-modpost-failures-in-fedora-17.patch
new file mode 100644
index 00000000..5de8b33f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0021-Fix-modpost-failures-in-fedora-17.patch
@@ -0,0 +1,54 @@
1From 3ff39b2411c6722c1ee6c490ac4ec7f90f026d64 Mon Sep 17 00:00:00 2001
2From: David Miller <davem@davemloft.net>
3Date: Wed, 25 Apr 2012 19:41:32 -0500
4Subject: [PATCH 021/165] Fix modpost failures in fedora 17
5
6commit e88aa7bbbe3046a125ea1936b16bb921cc9c6349 upstream.
7
8The symbol table on x86-64 starts to have entries that have names
9like:
10
11_GLOBAL__sub_I_65535_0___mod_x86cpu_device_table
12
13They are of type STT_FUNCTION and this one had a length of 18. This
14matched the device ID validation logic and it barfed because the
15length did not meet the device type's criteria.
16
17--------------------
18FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18.
19Fix definition of struct x86cpu_device_id in mod_devicetable.h
20--------------------
21
22These are some kind of compiler tool internal stuff being emitted and
23not something we want to inspect in modpost's device ID table
24validation code.
25
26So skip the symbol if it is not of type STT_OBJECT.
27
28Signed-off-by: David S. Miller <davem@davemloft.net>
29Acked-by: Sam Ravnborg <sam@ravnborg.org>
30Signed-off-by: Michal Marek <mmarek@suse.cz>
31Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
32Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
33---
34 scripts/mod/file2alias.c | 4 ++++
35 1 files changed, 4 insertions(+), 0 deletions(-)
36
37diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
38index f936d1f..d1d0ae8 100644
39--- a/scripts/mod/file2alias.c
40+++ b/scripts/mod/file2alias.c
41@@ -926,6 +926,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
42 if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections)
43 return;
44
45+ /* We're looking for an object */
46+ if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
47+ return;
48+
49 /* Handle all-NULL symbols allocated into .bss */
50 if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) {
51 zeros = calloc(1, sym->st_size);
52--
531.7.7.6
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0022-mm-fix-s390-BUG-by-__set_page_dirty_no_writeback-on-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0022-mm-fix-s390-BUG-by-__set_page_dirty_no_writeback-on-.patch
new file mode 100644
index 00000000..4ba10abc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0022-mm-fix-s390-BUG-by-__set_page_dirty_no_writeback-on-.patch
@@ -0,0 +1,60 @@
1From 8afb43e5f076643f012d0267aebb215cc0f0767b Mon Sep 17 00:00:00 2001
2From: Hugh Dickins <hughd@google.com>
3Date: Mon, 23 Apr 2012 11:14:50 -0700
4Subject: [PATCH 022/165] mm: fix s390 BUG by __set_page_dirty_no_writeback on
5 swap
6
7commit aca50bd3b4c4bb5528a1878158ba7abce41de534 upstream.
8
9Mel reports a BUG_ON(slot == NULL) in radix_tree_tag_set() on s390
103.0.13: called from __set_page_dirty_nobuffers() when page_remove_rmap()
11tries to transfer dirty flag from s390 storage key to struct page and
12radix_tree.
13
14That would be because of reclaim's shrink_page_list() calling
15add_to_swap() on this page at the same time: first PageSwapCache is set
16(causing page_mapping(page) to appear as &swapper_space), then
17page->private set, then tree_lock taken, then page inserted into
18radix_tree - so there's an interval before taking the lock when the
19radix_tree slot is empty.
20
21We could fix this by moving __add_to_swap_cache()'s spin_lock_irq up
22before the SetPageSwapCache. But a better fix is simply to do what's
23five years overdue: Ken Chen introduced __set_page_dirty_no_writeback()
24(if !PageDirty TestSetPageDirty) for tmpfs to skip all the radix_tree
25overhead, and swap is just the same - it ignores the radix_tree tag, and
26does not participate in dirty page accounting, so should be using
27__set_page_dirty_no_writeback() too.
28
29s390 testing now confirms that this does indeed fix the problem.
30
31Reported-by: Mel Gorman <mgorman@suse.de>
32Signed-off-by: Hugh Dickins <hughd@google.com>
33Acked-by: Mel Gorman <mgorman@suse.de>
34Cc: Andrew Morton <akpm@linux-foundation.org>
35Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
36Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
37Cc: Rik van Riel <riel@redhat.com>
38Cc: Ken Chen <kenchen@google.com>
39Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
40Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
41---
42 mm/swap_state.c | 2 +-
43 1 files changed, 1 insertions(+), 1 deletions(-)
44
45diff --git a/mm/swap_state.c b/mm/swap_state.c
46index 78cc4d1..7704d9c 100644
47--- a/mm/swap_state.c
48+++ b/mm/swap_state.c
49@@ -27,7 +27,7 @@
50 */
51 static const struct address_space_operations swap_aops = {
52 .writepage = swap_writepage,
53- .set_page_dirty = __set_page_dirty_nobuffers,
54+ .set_page_dirty = __set_page_dirty_no_writeback,
55 .migratepage = migrate_page,
56 };
57
58--
591.7.7.6
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0023-md-fix-possible-corruption-of-array-metadata-on-shut.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0023-md-fix-possible-corruption-of-array-metadata-on-shut.patch
new file mode 100644
index 00000000..62b6bfd5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0023-md-fix-possible-corruption-of-array-metadata-on-shut.patch
@@ -0,0 +1,51 @@
1From fd272b3336e1e535826cc345e10353eb104363e8 Mon Sep 17 00:00:00 2001
2From: NeilBrown <neilb@suse.de>
3Date: Tue, 24 Apr 2012 10:23:16 +1000
4Subject: [PATCH 023/165] md: fix possible corruption of array metadata on
5 shutdown.
6
7commit 30b8aa9172dfeaac6d77897c67ee9f9fc574cdbb upstream.
8
9commit c744a65c1e2d59acc54333ce8
10 md: don't set md arrays to readonly on shutdown.
11
12removed the possibility of a 'BUG' when data is written to an array
13that has just been switched to read-only, but also introduced the
14possibility that the array metadata could be corrupted.
15
16If, when md_notify_reboot gets the mddev lock, the array is
17in a state where it is assembled but hasn't been started (as can
18happen if the personality module is not available, or in other unusual
19situations), then incorrect metadata will be written out making it
20impossible to re-assemble the array.
21
22So only call __md_stop_writes() if the array has actually been
23activated.
24
25This patch is needed for any stable kernel which has had the above
26commit applied.
27
28Reported-by: Christoph Nelles <evilazrael@evilazrael.de>
29Signed-off-by: NeilBrown <neilb@suse.de>
30Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
31---
32 drivers/md/md.c | 3 ++-
33 1 files changed, 2 insertions(+), 1 deletions(-)
34
35diff --git a/drivers/md/md.c b/drivers/md/md.c
36index 6f37aa4..065ab4f 100644
37--- a/drivers/md/md.c
38+++ b/drivers/md/md.c
39@@ -8100,7 +8100,8 @@ static int md_notify_reboot(struct notifier_block *this,
40
41 for_each_mddev(mddev, tmp) {
42 if (mddev_trylock(mddev)) {
43- __md_stop_writes(mddev);
44+ if (mddev->pers)
45+ __md_stop_writes(mddev);
46 mddev->safemode = 2;
47 mddev_unlock(mddev);
48 }
49--
501.7.7.6
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch
new file mode 100644
index 00000000..2c66b9a8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch
@@ -0,0 +1,45 @@
1From 6556e20032c10ba45a6101a9454265c0f8c0fbc6 Mon Sep 17 00:00:00 2001
2From: Shaohua Li <shli@kernel.org>
3Date: Fri, 13 Apr 2012 10:27:35 +0800
4Subject: [PATCH 024/165] jbd2: use GFP_NOFS for blkdev_issue_flush
5
6commit 99aa78466777083255b876293e9e83dec7cd809a upstream.
7
8flush request is issued in transaction commit code path, so looks using
9GFP_KERNEL to allocate memory for flush request bio falls into the classic
10deadlock issue. I saw btrfs and dm get it right, but ext4, xfs and md are
11using GFP.
12
13Signed-off-by: Shaohua Li <shli@fusionio.com>
14Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15Reviewed-by: Jan Kara <jack@suse.cz>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 fs/jbd2/commit.c | 4 ++--
19 1 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
22index 68d704d..d751f04 100644
23--- a/fs/jbd2/commit.c
24+++ b/fs/jbd2/commit.c
25@@ -683,7 +683,7 @@ start_journal_io:
26 if (commit_transaction->t_need_data_flush &&
27 (journal->j_fs_dev != journal->j_dev) &&
28 (journal->j_flags & JBD2_BARRIER))
29- blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
30+ blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS, NULL);
31
32 /* Done it all: now write the commit record asynchronously. */
33 if (JBD2_HAS_INCOMPAT_FEATURE(journal,
34@@ -819,7 +819,7 @@ wait_for_iobuf:
35 if (JBD2_HAS_INCOMPAT_FEATURE(journal,
36 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) &&
37 journal->j_flags & JBD2_BARRIER) {
38- blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL);
39+ blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL);
40 }
41
42 if (err)
43--
441.7.7.6
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0025-USB-serial-cp210x-Fixed-usb_control_msg-timeout-valu.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0025-USB-serial-cp210x-Fixed-usb_control_msg-timeout-valu.patch
new file mode 100644
index 00000000..027f7e74
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0025-USB-serial-cp210x-Fixed-usb_control_msg-timeout-valu.patch
@@ -0,0 +1,54 @@
1From f9515bb74e74a5f3f7cb963984bdd8c8731495ff Mon Sep 17 00:00:00 2001
2From: Yuri Matylitski <ym@tekinsoft.com>
3Date: Fri, 20 Apr 2012 12:38:32 +0300
4Subject: [PATCH 025/165] USB: serial: cp210x: Fixed usb_control_msg timeout
5 values
6
7commit 2d5733fcd33dd451022d197cb6b476e970519ca7 upstream.
8
9Fixed too small hardcoded timeout values for usb_control_msg
10in driver for SiliconLabs cp210x-based usb-to-serial adapters.
11Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT.
12
13Signed-off-by: Yuri Matylitski <ym@tekinsoft.com>
14Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/usb/serial/cp210x.c | 9 ++++++---
19 1 files changed, 6 insertions(+), 3 deletions(-)
20
21diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
22index 4c12404..f2c57e0 100644
23--- a/drivers/usb/serial/cp210x.c
24+++ b/drivers/usb/serial/cp210x.c
25@@ -285,7 +285,8 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,
26 /* Issue the request, attempting to read 'size' bytes */
27 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
28 request, REQTYPE_DEVICE_TO_HOST, 0x0000,
29- port_priv->bInterfaceNumber, buf, size, 300);
30+ port_priv->bInterfaceNumber, buf, size,
31+ USB_CTRL_GET_TIMEOUT);
32
33 /* Convert data into an array of integers */
34 for (i = 0; i < length; i++)
35@@ -335,12 +336,14 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,
36 result = usb_control_msg(serial->dev,
37 usb_sndctrlpipe(serial->dev, 0),
38 request, REQTYPE_HOST_TO_DEVICE, 0x0000,
39- port_priv->bInterfaceNumber, buf, size, 300);
40+ port_priv->bInterfaceNumber, buf, size,
41+ USB_CTRL_SET_TIMEOUT);
42 } else {
43 result = usb_control_msg(serial->dev,
44 usb_sndctrlpipe(serial->dev, 0),
45 request, REQTYPE_HOST_TO_DEVICE, data[0],
46- port_priv->bInterfaceNumber, NULL, 0, 300);
47+ port_priv->bInterfaceNumber, NULL, 0,
48+ USB_CTRL_SET_TIMEOUT);
49 }
50
51 kfree(buf);
52--
531.7.7.6
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch
new file mode 100644
index 00000000..e150ebb7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch
@@ -0,0 +1,55 @@
1From 069f7216ddee90ddca6e1d040e58b6735f89fca6 Mon Sep 17 00:00:00 2001
2From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
3Date: Thu, 12 Apr 2012 10:47:50 +0900
4Subject: [PATCH 026/165] pch_uart: Fix dma channel unallocated issue
5
6commit af6d17cdc8c89aeb3101f0d27cd32fc0592b40b2 upstream.
7
8This driver anticipates pch_uart_verify_port() is not called
9during installation.
10However, actually pch_uart_verify_port() is called during
11installation.
12As a result, memory access violation occurs like below.
13
140. initial value: use_dma=0
151. starup()
16 - dma channel is not allocated because use_dma=0
172. pch_uart_verify_port()
18 - Set use_dma=1
193. UART processing acts DMA mode because use_dma=1
20 - memory access violation occurs!
21
22This patch fixes the issue.
23
24Solution:
25Whenever pch_uart_verify_port() is called and then
26dma channel is not allocated, the channel should be allocated.
27
28Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
29Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30[bwh: Backported to 3.2: adjust context]
31Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
32---
33 drivers/tty/serial/pch_uart.c | 4 +++-
34 1 files changed, 3 insertions(+), 1 deletions(-)
35
36diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
37index da776a0..a4b192d 100644
38--- a/drivers/tty/serial/pch_uart.c
39+++ b/drivers/tty/serial/pch_uart.c
40@@ -1356,9 +1356,11 @@ static int pch_uart_verify_port(struct uart_port *port,
41 __func__);
42 return -EOPNOTSUPP;
43 #endif
44- priv->use_dma = 1;
45 priv->use_dma_flag = 1;
46 dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n");
47+ if (!priv->use_dma)
48+ pch_request_dma(port);
49+ priv->use_dma = 1;
50 }
51
52 return 0;
53--
541.7.7.6
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0027-drivers-tty-amiserial.c-add-missing-tty_unlock.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0027-drivers-tty-amiserial.c-add-missing-tty_unlock.patch
new file mode 100644
index 00000000..4b935aa8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0027-drivers-tty-amiserial.c-add-missing-tty_unlock.patch
@@ -0,0 +1,36 @@
1From fefc2c6916651c05eed1882c3a59a6468d91e417 Mon Sep 17 00:00:00 2001
2From: Julia Lawall <Julia.Lawall@lip6.fr>
3Date: Thu, 19 Apr 2012 18:12:40 +0200
4Subject: [PATCH 027/165] drivers/tty/amiserial.c: add missing tty_unlock
5
6commit d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 upstream.
7
8tty_unlock is used on all other exits from the function.
9
10Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
11Acked-by: Jiri Slaby <jslaby@suse.cz>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 drivers/tty/amiserial.c | 4 +++-
16 1 files changed, 3 insertions(+), 1 deletions(-)
17
18diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
19index b84c834..8daf073 100644
20--- a/drivers/tty/amiserial.c
21+++ b/drivers/tty/amiserial.c
22@@ -1113,8 +1113,10 @@ static int set_serial_info(struct async_struct * info,
23 (new_serial.close_delay != state->close_delay) ||
24 (new_serial.xmit_fifo_size != state->xmit_fifo_size) ||
25 ((new_serial.flags & ~ASYNC_USR_MASK) !=
26- (state->flags & ~ASYNC_USR_MASK)))
27+ (state->flags & ~ASYNC_USR_MASK))) {
28+ tty_unlock();
29 return -EPERM;
30+ }
31 state->flags = ((state->flags & ~ASYNC_USR_MASK) |
32 (new_serial.flags & ASYNC_USR_MASK));
33 info->flags = ((info->flags & ~ASYNC_USR_MASK) |
34--
351.7.7.6
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0028-USB-sierra-avoid-QMI-wwan-interface-on-MC77xx.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0028-USB-sierra-avoid-QMI-wwan-interface-on-MC77xx.patch
new file mode 100644
index 00000000..2158fa88
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0028-USB-sierra-avoid-QMI-wwan-interface-on-MC77xx.patch
@@ -0,0 +1,60 @@
1From 769a100618c82ac6e8e284cc14a5fbffe13e31ce Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Tue, 17 Apr 2012 21:37:29 +0200
4Subject: [PATCH 028/165] USB: sierra: avoid QMI/wwan interface on MC77xx
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 749541d19e70905e3971f2a08335a206a98e4d0c upstream.
10
11These devices have a number of non serial interfaces as well. Use
12the existing "Direct IP" blacklist to prevent binding to interfaces
13which are handled by other drivers.
14
15We also extend the "Direct IP" blacklist with with interfaces only
16seen in "QMI" mode, assuming that these devices use the same
17interface numbers for serial interfaces both in "Direct IP" and in
18"QMI" mode.
19
20Signed-off-by: Bjørn Mork <bjorn@mork.no>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
23---
24 drivers/usb/serial/sierra.c | 6 ++++--
25 1 files changed, 4 insertions(+), 2 deletions(-)
26
27diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
28index 7c3ec9e..e093585 100644
29--- a/drivers/usb/serial/sierra.c
30+++ b/drivers/usb/serial/sierra.c
31@@ -221,7 +221,7 @@ static const struct sierra_iface_info typeB_interface_list = {
32 };
33
34 /* 'blacklist' of interfaces not served by this driver */
35-static const u8 direct_ip_non_serial_ifaces[] = { 7, 8, 9, 10, 11 };
36+static const u8 direct_ip_non_serial_ifaces[] = { 7, 8, 9, 10, 11, 19, 20 };
37 static const struct sierra_iface_info direct_ip_interface_blacklist = {
38 .infolen = ARRAY_SIZE(direct_ip_non_serial_ifaces),
39 .ifaceinfo = direct_ip_non_serial_ifaces,
40@@ -289,7 +289,6 @@ static const struct usb_device_id id_table[] = {
41 { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */
42 { USB_DEVICE(0x1199, 0x6859) }, /* Sierra Wireless AirCard 885 E */
43 { USB_DEVICE(0x1199, 0x685A) }, /* Sierra Wireless AirCard 885 E */
44- { USB_DEVICE(0x1199, 0x68A2) }, /* Sierra Wireless MC7710 */
45 /* Sierra Wireless C885 */
46 { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6880, 0xFF, 0xFF, 0xFF)},
47 /* Sierra Wireless C888, Air Card 501, USB 303, USB 304 */
48@@ -299,6 +298,9 @@ static const struct usb_device_id id_table[] = {
49 /* Sierra Wireless HSPA Non-Composite Device */
50 { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6892, 0xFF, 0xFF, 0xFF)},
51 { USB_DEVICE(0x1199, 0x6893) }, /* Sierra Wireless Device */
52+ { USB_DEVICE(0x1199, 0x68A2), /* Sierra Wireless MC77xx in QMI mode */
53+ .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
54+ },
55 { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */
56 .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
57 },
58--
591.7.7.6
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0029-EHCI-fix-criterion-for-resuming-the-root-hub.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0029-EHCI-fix-criterion-for-resuming-the-root-hub.patch
new file mode 100644
index 00000000..ca463cc4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0029-EHCI-fix-criterion-for-resuming-the-root-hub.patch
@@ -0,0 +1,48 @@
1From 611589daeef0bd0f6b36f1fbb17f34b6abf05568 Mon Sep 17 00:00:00 2001
2From: Alan Stern <stern@rowland.harvard.edu>
3Date: Tue, 17 Apr 2012 15:24:15 -0400
4Subject: [PATCH 029/165] EHCI: fix criterion for resuming the root hub
5
6commit dc75ce9d929aabeb0843a6b1a4ab320e58ba1597 upstream.
7
8This patch (as1542) changes the criterion ehci-hcd uses to tell when
9it needs to resume the controller's root hub. A resume is needed when
10a port status change is detected, obviously, but only if the root hub
11is currently suspended.
12
13Right now the driver tests whether the root hub is running, and that
14is not the correct test. In particular, if the controller has died
15then the root hub should not be restarted. In addition, some buggy
16hardware occasionally requires the root hub to be running and
17sending out SOF packets even while it is nominally supposed to be
18suspended.
19
20In the end, the test needs to be changed. Rather than checking whether
21the root hub is currently running, the driver will now check whether
22the root hub is currently suspended. This will yield the correct
23behavior in all cases.
24
25Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
26CC: Peter Chen <B29397@freescale.com>
27Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
29---
30 drivers/usb/host/ehci-hcd.c | 2 +-
31 1 files changed, 1 insertions(+), 1 deletions(-)
32
33diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
34index 3ff9f82..ffbbf54 100644
35--- a/drivers/usb/host/ehci-hcd.c
36+++ b/drivers/usb/host/ehci-hcd.c
37@@ -867,7 +867,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
38 pcd_status = status;
39
40 /* resume root hub? */
41- if (!(cmd & CMD_RUN))
42+ if (ehci->rh_state == EHCI_RH_SUSPENDED)
43 usb_hcd_resume_root_hub(hcd);
44
45 /* get per-port change detect bits */
46--
471.7.7.6
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0030-EHCI-always-clear-the-STS_FLR-status-bit.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0030-EHCI-always-clear-the-STS_FLR-status-bit.patch
new file mode 100644
index 00000000..3775ae04
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0030-EHCI-always-clear-the-STS_FLR-status-bit.patch
@@ -0,0 +1,46 @@
1From 2259a159b9b3861dcc0c8cd9c52ef85cb11ad2a5 Mon Sep 17 00:00:00 2001
2From: Alan Stern <stern@rowland.harvard.edu>
3Date: Wed, 18 Apr 2012 11:33:00 -0400
4Subject: [PATCH 030/165] EHCI: always clear the STS_FLR status bit
5
6commit 2fbe2bf1fd37f9d99950bd8d8093623cf22cf08b upstream.
7
8This patch (as1544) fixes a problem affecting some EHCI controllers.
9They can generate interrupts whenever the STS_FLR status bit is turned
10on, even though that bit is masked out in the Interrupt Enable
11register.
12
13Since the driver doesn't use STS_FLR anyway, the patch changes the
14interrupt routine to clear that bit whenever it is set, rather than
15leaving it alone.
16
17Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
18Reported-and-tested-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 drivers/usb/host/ehci-hcd.c | 7 ++++++-
23 1 files changed, 6 insertions(+), 1 deletions(-)
24
25diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
26index ffbbf54..da2f711 100644
27--- a/drivers/usb/host/ehci-hcd.c
28+++ b/drivers/usb/host/ehci-hcd.c
29@@ -815,8 +815,13 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
30 goto dead;
31 }
32
33+ /*
34+ * We don't use STS_FLR, but some controllers don't like it to
35+ * remain on, so mask it out along with the other status bits.
36+ */
37+ masked_status = status & (INTR_MASK | STS_FLR);
38+
39 /* Shared IRQ? */
40- masked_status = status & INTR_MASK;
41 if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {
42 spin_unlock(&ehci->lock);
43 return IRQ_NONE;
44--
451.7.7.6
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0031-USB-fix-deadlock-in-bConfigurationValue-attribute-me.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0031-USB-fix-deadlock-in-bConfigurationValue-attribute-me.patch
new file mode 100644
index 00000000..629cb816
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0031-USB-fix-deadlock-in-bConfigurationValue-attribute-me.patch
@@ -0,0 +1,116 @@
1From 770feb782844457789a51d13d2933cca141bb487 Mon Sep 17 00:00:00 2001
2From: Alan Stern <stern@rowland.harvard.edu>
3Date: Tue, 17 Apr 2012 15:22:39 -0400
4Subject: [PATCH 031/165] USB: fix deadlock in bConfigurationValue attribute
5 method
6
7commit 8963c487a80b4688c9e68dcc504a90074aacc145 upstream.
8
9This patch (as154) fixes a self-deadlock that occurs when userspace
10writes to the bConfigurationValue sysfs attribute for a hub with
11children. The task tries to lock the bandwidth_mutex at a time when
12it already owns the lock:
13
14 The attribute's method calls usb_set_configuration(),
15 which calls usb_disable_device() with the bandwidth_mutex
16 held.
17
18 usb_disable_device() unregisters the existing interfaces,
19 which causes the hub driver to be unbound.
20
21 The hub_disconnect() routine calls hub_quiesce(), which
22 calls usb_disconnect() for each of the hub's children.
23
24 usb_disconnect() attempts to acquire the bandwidth_mutex
25 around a call to usb_disable_device().
26
27The solution is to make usb_disable_device() acquire the mutex for
28itself instead of requiring the caller to hold it. Then the mutex can
29cover only the bandwidth deallocation operation and not the region
30where the interfaces are unregistered.
31
32This has the potential to change system behavior slightly when a
33config change races with another config or altsetting change. Some of
34the bandwidth released from the old config might get claimed by the
35other config or altsetting, make it impossible to restore the old
36config in case of a failure. But since we don't try to recover from
37config-change failures anyway, this doesn't matter.
38
39[This should be marked for stable kernels that contain the commit
40fccf4e86200b8f5edd9a65da26f150e32ba79808 "USB: Free bandwidth when
41usb_disable_device is called."
42That commit was marked for stable kernels as old as 2.6.32.]
43
44Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
45Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
46Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
47Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
48---
49 drivers/usb/core/hub.c | 3 ---
50 drivers/usb/core/message.c | 6 +++---
51 2 files changed, 3 insertions(+), 6 deletions(-)
52
53diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
54index 18373ec..ab4e49f 100644
55--- a/drivers/usb/core/hub.c
56+++ b/drivers/usb/core/hub.c
57@@ -1644,7 +1644,6 @@ void usb_disconnect(struct usb_device **pdev)
58 {
59 struct usb_device *udev = *pdev;
60 int i;
61- struct usb_hcd *hcd = bus_to_hcd(udev->bus);
62
63 /* mark the device as inactive, so any further urb submissions for
64 * this device (and any of its children) will fail immediately.
65@@ -1667,9 +1666,7 @@ void usb_disconnect(struct usb_device **pdev)
66 * so that the hardware is now fully quiesced.
67 */
68 dev_dbg (&udev->dev, "unregistering device\n");
69- mutex_lock(hcd->bandwidth_mutex);
70 usb_disable_device(udev, 0);
71- mutex_unlock(hcd->bandwidth_mutex);
72 usb_hcd_synchronize_unlinks(udev);
73
74 usb_remove_ep_devs(&udev->ep0);
75diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
76index aed3e07..ca717da 100644
77--- a/drivers/usb/core/message.c
78+++ b/drivers/usb/core/message.c
79@@ -1136,8 +1136,6 @@ void usb_disable_interface(struct usb_device *dev, struct usb_interface *intf,
80 * Deallocates hcd/hardware state for the endpoints (nuking all or most
81 * pending urbs) and usbcore state for the interfaces, so that usbcore
82 * must usb_set_configuration() before any interfaces could be used.
83- *
84- * Must be called with hcd->bandwidth_mutex held.
85 */
86 void usb_disable_device(struct usb_device *dev, int skip_ep0)
87 {
88@@ -1190,7 +1188,9 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
89 usb_disable_endpoint(dev, i + USB_DIR_IN, false);
90 }
91 /* Remove endpoints from the host controller internal state */
92+ mutex_lock(hcd->bandwidth_mutex);
93 usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL);
94+ mutex_unlock(hcd->bandwidth_mutex);
95 /* Second pass: remove endpoint pointers */
96 }
97 for (i = skip_ep0; i < 16; ++i) {
98@@ -1750,7 +1750,6 @@ free_interfaces:
99 /* if it's already configured, clear out old state first.
100 * getting rid of old interfaces means unbinding their drivers.
101 */
102- mutex_lock(hcd->bandwidth_mutex);
103 if (dev->state != USB_STATE_ADDRESS)
104 usb_disable_device(dev, 1); /* Skip ep0 */
105
106@@ -1763,6 +1762,7 @@ free_interfaces:
107 * host controller will not allow submissions to dropped endpoints. If
108 * this call fails, the device state is unchanged.
109 */
110+ mutex_lock(hcd->bandwidth_mutex);
111 ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL);
112 if (ret < 0) {
113 mutex_unlock(hcd->bandwidth_mutex);
114--
1151.7.7.6
116
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0032-usb-gadget-eliminate-NULL-pointer-dereference-bugfix.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0032-usb-gadget-eliminate-NULL-pointer-dereference-bugfix.patch
new file mode 100644
index 00000000..5d5852dc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0032-usb-gadget-eliminate-NULL-pointer-dereference-bugfix.patch
@@ -0,0 +1,56 @@
1From fadd4263bca7146d233ff944c17cb0f42a6e2112 Mon Sep 17 00:00:00 2001
2From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
3Date: Wed, 28 Mar 2012 09:30:50 +0200
4Subject: [PATCH 032/165] usb: gadget: eliminate NULL pointer dereference
5 (bugfix)
6
7commit 92b0abf80c5c5f0e0d71d1309688a330fd74731b upstream.
8
9usb: gadget: eliminate NULL pointer dereference (bugfix)
10
11This patch fixes a bug which causes NULL pointer dereference in
12ffs_ep0_ioctl. The bug happens when the FunctionFS is not bound (either
13has not been bound yet or has been bound and then unbound) and can be
14reproduced with running the following commands:
15
16$ insmod g_ffs.ko
17$ mount -t functionfs func /dev/usbgadget
18$ ./null
19
20where null.c is:
21
22#include <fcntl.h>
23#include <linux/usb/functionfs.h>
24
25int main(void)
26{
27 int fd = open("/dev/usbgadget/ep0", O_RDWR);
28 ioctl(fd, FUNCTIONFS_CLEAR_HALT);
29
30 return 0;
31}
32
33Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
34Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
35Signed-off-by: Felipe Balbi <balbi@ti.com>
36Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
37---
38 drivers/usb/gadget/f_fs.c | 2 +-
39 1 files changed, 1 insertions(+), 1 deletions(-)
40
41diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
42index acb3800..0e641a1 100644
43--- a/drivers/usb/gadget/f_fs.c
44+++ b/drivers/usb/gadget/f_fs.c
45@@ -712,7 +712,7 @@ static long ffs_ep0_ioctl(struct file *file, unsigned code, unsigned long value)
46 if (code == FUNCTIONFS_INTERFACE_REVMAP) {
47 struct ffs_function *func = ffs->func;
48 ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
49- } else if (gadget->ops->ioctl) {
50+ } else if (gadget && gadget->ops->ioctl) {
51 ret = gadget->ops->ioctl(gadget, code, value);
52 } else {
53 ret = -ENOTTY;
54--
551.7.7.6
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0033-usb-musb-omap-fix-crash-when-musb-glue-omap-gets-ini.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0033-usb-musb-omap-fix-crash-when-musb-glue-omap-gets-ini.patch
new file mode 100644
index 00000000..f8fdb7b6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0033-usb-musb-omap-fix-crash-when-musb-glue-omap-gets-ini.patch
@@ -0,0 +1,44 @@
1From 839226b88ef2954d750d72f3ce2c6657393b8a09 Mon Sep 17 00:00:00 2001
2From: Kishon Vijay Abraham I <kishon@ti.com>
3Date: Wed, 21 Mar 2012 21:30:20 +0530
4Subject: [PATCH 033/165] usb: musb: omap: fix crash when musb glue (omap)
5 gets initialized
6
7commit 3006dc8c627d738693e910c159630e4368c9e86c upstream.
8
9pm_runtime_enable is being called after omap2430_musb_init. Hence
10pm_runtime_get_sync in omap2430_musb_init does not have any effect (does
11not enable clocks) resulting in a crash during register access. It is
12fixed here.
13
14Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
15Signed-off-by: Felipe Balbi <balbi@ti.com>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/usb/musb/omap2430.c | 4 ++--
19 1 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
22index dd907d5..bd93e9f 100644
23--- a/drivers/usb/musb/omap2430.c
24+++ b/drivers/usb/musb/omap2430.c
25@@ -463,14 +463,14 @@ static int __init omap2430_probe(struct platform_device *pdev)
26 goto err2;
27 }
28
29+ pm_runtime_enable(&pdev->dev);
30+
31 ret = platform_device_add(musb);
32 if (ret) {
33 dev_err(&pdev->dev, "failed to register musb device\n");
34 goto err2;
35 }
36
37- pm_runtime_enable(&pdev->dev);
38-
39 return 0;
40
41 err2:
42--
431.7.7.6
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0034-usb-musb-omap-fix-the-error-check-for-pm_runtime_get.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0034-usb-musb-omap-fix-the-error-check-for-pm_runtime_get.patch
new file mode 100644
index 00000000..035b0002
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0034-usb-musb-omap-fix-the-error-check-for-pm_runtime_get.patch
@@ -0,0 +1,48 @@
1From 150f1a9111e30cc70efdac57e72af7d537754099 Mon Sep 17 00:00:00 2001
2From: Shubhrajyoti D <shubhrajyoti@ti.com>
3Date: Thu, 22 Mar 2012 12:48:06 +0530
4Subject: [PATCH 034/165] usb: musb: omap: fix the error check for
5 pm_runtime_get_sync
6
7commit ad579699c4f0274bf522a9252ff9b20c72197e48 upstream.
8
9pm_runtime_get_sync returns a signed integer. In case of errors
10it returns a negative value. This patch fixes the error check
11by making it signed instead of unsigned thus preventing register
12access if get_sync_fails. Also passes the error cause to the
13debug message.
14
15Cc: Kishon Vijay Abraham I <kishon@ti.com>
16Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
17Signed-off-by: Felipe Balbi <balbi@ti.com>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/usb/musb/omap2430.c | 5 +++--
21 1 files changed, 3 insertions(+), 2 deletions(-)
22
23diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
24index bd93e9f..522ac37 100644
25--- a/drivers/usb/musb/omap2430.c
26+++ b/drivers/usb/musb/omap2430.c
27@@ -283,7 +283,8 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
28
29 static int omap2430_musb_init(struct musb *musb)
30 {
31- u32 l, status = 0;
32+ u32 l;
33+ int status = 0;
34 struct device *dev = musb->controller;
35 struct musb_hdrc_platform_data *plat = dev->platform_data;
36 struct omap_musb_board_data *data = plat->board_data;
37@@ -302,7 +303,7 @@ static int omap2430_musb_init(struct musb *musb)
38
39 status = pm_runtime_get_sync(dev);
40 if (status < 0) {
41- dev_err(dev, "pm_runtime_get_sync FAILED");
42+ dev_err(dev, "pm_runtime_get_sync FAILED %d\n", status);
43 goto err1;
44 }
45
46--
471.7.7.6
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0035-PCI-Add-quirk-for-still-enabled-interrupts-on-Intel-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0035-PCI-Add-quirk-for-still-enabled-interrupts-on-Intel-.patch
new file mode 100644
index 00000000..5fc8b646
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0035-PCI-Add-quirk-for-still-enabled-interrupts-on-Intel-.patch
@@ -0,0 +1,89 @@
1From 9a9c948f1f3fdf421e090b10dc1fe15308d325d0 Mon Sep 17 00:00:00 2001
2From: Thomas Jarosch <thomas.jarosch@intra2net.com>
3Date: Wed, 7 Dec 2011 22:08:11 +0100
4Subject: [PATCH 035/165] PCI: Add quirk for still enabled interrupts on Intel
5 Sandy Bridge GPUs
6
7commit f67fd55fa96f7d7295b43ffbc4a97d8f55e473aa upstream.
8
9Some BIOS implementations leave the Intel GPU interrupts enabled,
10even though no one is handling them (f.e. i915 driver is never loaded).
11Additionally the interrupt destination is not set up properly
12and the interrupt ends up -somewhere-.
13
14These spurious interrupts are "sticky" and the kernel disables
15the (shared) interrupt line after 100.000+ generated interrupts.
16
17Fix it by disabling the still enabled interrupts.
18This resolves crashes often seen on monitor unplug.
19
20Tested on the following boards:
21- Intel DH61CR: Affected
22- Intel DH67BL: Affected
23- Intel S1200KP server board: Affected
24- Asus P8H61-M LE: Affected, but system does not crash.
25 Probably the IRQ ends up somewhere unnoticed.
26
27According to reports on the net, the Intel DH61WW board is also affected.
28
29Many thanks to Jesse Barnes from Intel for helping
30with the register configuration and to Intel in general
31for providing public hardware documentation.
32
33Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
34Tested-by: Charlie Suffin <charlie.suffin@stratus.com>
35Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
36[bwh: Backported to 3.2: adjust context]
37Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
38---
39 drivers/pci/quirks.c | 34 ++++++++++++++++++++++++++++++++++
40 1 files changed, 34 insertions(+), 0 deletions(-)
41
42diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
43index 6476547..78fda9c 100644
44--- a/drivers/pci/quirks.c
45+++ b/drivers/pci/quirks.c
46@@ -2906,6 +2906,40 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f8, quirk_intel_mc_errata);
47 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
48 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
49
50+/*
51+ * Some BIOS implementations leave the Intel GPU interrupts enabled,
52+ * even though no one is handling them (f.e. i915 driver is never loaded).
53+ * Additionally the interrupt destination is not set up properly
54+ * and the interrupt ends up -somewhere-.
55+ *
56+ * These spurious interrupts are "sticky" and the kernel disables
57+ * the (shared) interrupt line after 100.000+ generated interrupts.
58+ *
59+ * Fix it by disabling the still enabled interrupts.
60+ * This resolves crashes often seen on monitor unplug.
61+ */
62+#define I915_DEIER_REG 0x4400c
63+static void __devinit disable_igfx_irq(struct pci_dev *dev)
64+{
65+ void __iomem *regs = pci_iomap(dev, 0, 0);
66+ if (regs == NULL) {
67+ dev_warn(&dev->dev, "igfx quirk: Can't iomap PCI device\n");
68+ return;
69+ }
70+
71+ /* Check if any interrupt line is still enabled */
72+ if (readl(regs + I915_DEIER_REG) != 0) {
73+ dev_warn(&dev->dev, "BIOS left Intel GPU interrupts enabled; "
74+ "disabling\n");
75+
76+ writel(0, regs + I915_DEIER_REG);
77+ }
78+
79+ pci_iounmap(dev, regs);
80+}
81+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
82+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
83+
84 static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
85 struct pci_fixup *end)
86 {
87--
881.7.7.6
89
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0036-ext4-fix-endianness-breakage-in-ext4_split_extent_at.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0036-ext4-fix-endianness-breakage-in-ext4_split_extent_at.patch
new file mode 100644
index 00000000..a2dfb9d6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0036-ext4-fix-endianness-breakage-in-ext4_split_extent_at.patch
@@ -0,0 +1,33 @@
1From 7ae05a044d79254f47ba9cb8772f5c3137a9d17d Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Thu, 12 Apr 2012 20:32:25 -0400
4Subject: [PATCH 036/165] ext4: fix endianness breakage in
5 ext4_split_extent_at()
6
7commit af1584f570b19b0285e4402a0b54731495d31784 upstream.
8
9->ee_len is __le16, so assigning cpu_to_le32() to it is going to do
10Bad Things(tm) on big-endian hosts...
11
12Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 fs/ext4/extents.c | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
19index c2a2012..54f2bdc 100644
20--- a/fs/ext4/extents.c
21+++ b/fs/ext4/extents.c
22@@ -2812,7 +2812,7 @@ static int ext4_split_extent_at(handle_t *handle,
23 if (err)
24 goto fix_extent_len;
25 /* update the extent length and mark as initialized */
26- ex->ee_len = cpu_to_le32(ee_len);
27+ ex->ee_len = cpu_to_le16(ee_len);
28 ext4_ext_try_to_merge(inode, path, ex);
29 err = ext4_ext_dirty(handle, inode, path + depth);
30 goto out;
31--
321.7.7.6
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0037-KVM-unmap-pages-from-the-iommu-when-slots-are-remove.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0037-KVM-unmap-pages-from-the-iommu-when-slots-are-remove.patch
new file mode 100644
index 00000000..937853cd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0037-KVM-unmap-pages-from-the-iommu-when-slots-are-remove.patch
@@ -0,0 +1,109 @@
1From f6b20107e527f8d57ec7c2c745109f4609d68abf Mon Sep 17 00:00:00 2001
2From: Alex Williamson <alex.williamson@redhat.com>
3Date: Fri, 27 Apr 2012 16:54:08 -0500
4Subject: [PATCH 037/165] KVM: unmap pages from the iommu when slots are
5 removed
6
7commit 32f6daad4651a748a58a3ab6da0611862175722f upstream.
8
9We've been adding new mappings, but not destroying old mappings.
10This can lead to a page leak as pages are pinned using
11get_user_pages, but only unpinned with put_page if they still
12exist in the memslots list on vm shutdown. A memslot that is
13destroyed while an iommu domain is enabled for the guest will
14therefore result in an elevated page reference count that is
15never cleared.
16
17Additionally, without this fix, the iommu is only programmed
18with the first translation for a gpa. This can result in
19peer-to-peer errors if a mapping is destroyed and replaced by a
20new mapping at the same gpa as the iommu will still be pointing
21to the original, pinned memory address.
22
23Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
24Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
25Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 include/linux/kvm_host.h | 6 ++++++
29 virt/kvm/iommu.c | 12 ++++++++----
30 virt/kvm/kvm_main.c | 5 +++--
31 3 files changed, 17 insertions(+), 6 deletions(-)
32
33diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
34index d526231..35410ef 100644
35--- a/include/linux/kvm_host.h
36+++ b/include/linux/kvm_host.h
37@@ -562,6 +562,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id);
38
39 #ifdef CONFIG_IOMMU_API
40 int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot);
41+void kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot);
42 int kvm_iommu_map_guest(struct kvm *kvm);
43 int kvm_iommu_unmap_guest(struct kvm *kvm);
44 int kvm_assign_device(struct kvm *kvm,
45@@ -575,6 +576,11 @@ static inline int kvm_iommu_map_pages(struct kvm *kvm,
46 return 0;
47 }
48
49+static inline void kvm_iommu_unmap_pages(struct kvm *kvm,
50+ struct kvm_memory_slot *slot)
51+{
52+}
53+
54 static inline int kvm_iommu_map_guest(struct kvm *kvm)
55 {
56 return -ENODEV;
57diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
58index a195c07..fd817a2 100644
59--- a/virt/kvm/iommu.c
60+++ b/virt/kvm/iommu.c
61@@ -309,6 +309,11 @@ static void kvm_iommu_put_pages(struct kvm *kvm,
62 }
63 }
64
65+void kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot)
66+{
67+ kvm_iommu_put_pages(kvm, slot->base_gfn, slot->npages);
68+}
69+
70 static int kvm_iommu_unmap_memslots(struct kvm *kvm)
71 {
72 int i, idx;
73@@ -317,10 +322,9 @@ static int kvm_iommu_unmap_memslots(struct kvm *kvm)
74 idx = srcu_read_lock(&kvm->srcu);
75 slots = kvm_memslots(kvm);
76
77- for (i = 0; i < slots->nmemslots; i++) {
78- kvm_iommu_put_pages(kvm, slots->memslots[i].base_gfn,
79- slots->memslots[i].npages);
80- }
81+ for (i = 0; i < slots->nmemslots; i++)
82+ kvm_iommu_unmap_pages(kvm, &slots->memslots[i]);
83+
84 srcu_read_unlock(&kvm->srcu, idx);
85
86 return 0;
87diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
88index d9cfb78..e401c1b 100644
89--- a/virt/kvm/kvm_main.c
90+++ b/virt/kvm/kvm_main.c
91@@ -802,12 +802,13 @@ skip_lpage:
92 if (r)
93 goto out_free;
94
95- /* map the pages in iommu page table */
96+ /* map/unmap the pages in iommu page table */
97 if (npages) {
98 r = kvm_iommu_map_pages(kvm, &new);
99 if (r)
100 goto out_free;
101- }
102+ } else
103+ kvm_iommu_unmap_pages(kvm, &old);
104
105 r = -ENOMEM;
106 slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL);
107--
1081.7.7.6
109
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0038-dell-laptop-add-3-machines-that-has-touchpad-LED.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0038-dell-laptop-add-3-machines-that-has-touchpad-LED.patch
new file mode 100644
index 00000000..4955043f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0038-dell-laptop-add-3-machines-that-has-touchpad-LED.patch
@@ -0,0 +1,58 @@
1From bbfc688f2500196757c1d7334d25e335308798c5 Mon Sep 17 00:00:00 2001
2From: AceLan Kao <acelan.kao@canonical.com>
3Date: Thu, 17 Nov 2011 15:30:42 +0800
4Subject: [PATCH 038/165] dell-laptop: add 3 machines that has touchpad LED
5
6commit 2a748853ca395c48ea75baa250f7cea6f0f23dbf upstream.
7
8Add "Vostro 3555", "Inspiron N311z", and "Inspiron M5110" into quirks,
9so that they could have touchpad LED function work.
10
11Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
12Signed-off-by: Matthew Garrett <mjg@redhat.com>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 drivers/platform/x86/dell-laptop.c | 27 +++++++++++++++++++++++++++
16 1 files changed, 27 insertions(+), 0 deletions(-)
17
18diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
19index d93e962..7621ac2 100644
20--- a/drivers/platform/x86/dell-laptop.c
21+++ b/drivers/platform/x86/dell-laptop.c
22@@ -184,6 +184,33 @@ static struct dmi_system_id __devinitdata dell_quirks[] = {
23 },
24 .driver_data = &quirk_dell_vostro_v130,
25 },
26+ {
27+ .callback = dmi_matched,
28+ .ident = "Dell Vostro 3555",
29+ .matches = {
30+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
31+ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 3555"),
32+ },
33+ .driver_data = &quirk_dell_vostro_v130,
34+ },
35+ {
36+ .callback = dmi_matched,
37+ .ident = "Dell Inspiron N311z",
38+ .matches = {
39+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
40+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron N311z"),
41+ },
42+ .driver_data = &quirk_dell_vostro_v130,
43+ },
44+ {
45+ .callback = dmi_matched,
46+ .ident = "Dell Inspiron M5110",
47+ .matches = {
48+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
49+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron M5110"),
50+ },
51+ .driver_data = &quirk_dell_vostro_v130,
52+ },
53 };
54
55 static struct calling_interface_buffer *buffer;
56--
571.7.7.6
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0039-dell-laptop-touchpad-LED-should-persist-its-status-a.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0039-dell-laptop-touchpad-LED-should-persist-its-status-a.patch
new file mode 100644
index 00000000..7c8a194c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0039-dell-laptop-touchpad-LED-should-persist-its-status-a.patch
@@ -0,0 +1,34 @@
1From 7a2e5d46e7959528fb4a7b45fc3ca55339a2445f Mon Sep 17 00:00:00 2001
2From: AceLan Kao <acelan.kao@canonical.com>
3Date: Tue, 17 Jan 2012 16:18:06 +0800
4Subject: [PATCH 039/165] dell-laptop: touchpad LED should persist its status
5 after S3
6
7commit 2d5de9e84928e35b4d9b46b4d8d5dcaac1cff1fa upstream.
8
9Touchpad LED will not turn on after S3, it will make the touchpad status
10doesn't consist with the LED.
11By adding one flag to let the LED device restore it's status.
12
13Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
14Signed-off-by: Matthew Garrett <mjg@redhat.com>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/platform/x86/dell-laptop.c | 1 +
18 1 files changed, 1 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
21index 7621ac2..92e42d4 100644
22--- a/drivers/platform/x86/dell-laptop.c
23+++ b/drivers/platform/x86/dell-laptop.c
24@@ -642,6 +642,7 @@ static void touchpad_led_set(struct led_classdev *led_cdev,
25 static struct led_classdev touchpad_led = {
26 .name = "dell-laptop::touchpad",
27 .brightness_set = touchpad_led_set,
28+ .flags = LED_CORE_SUSPENDRESUME,
29 };
30
31 static int __devinit touchpad_led_init(struct device *dev)
32--
331.7.7.6
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0040-Bluetooth-Add-support-for-Atheros-04ca-3005.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0040-Bluetooth-Add-support-for-Atheros-04ca-3005.patch
new file mode 100644
index 00000000..3fe4be1c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0040-Bluetooth-Add-support-for-Atheros-04ca-3005.patch
@@ -0,0 +1,64 @@
1From cfa160178e6da132b537331ff5fc6f091a02e44a Mon Sep 17 00:00:00 2001
2From: AceLan Kao <acelan.kao@canonical.com>
3Date: Wed, 28 Mar 2012 10:25:36 +0800
4Subject: [PATCH 040/165] Bluetooth: Add support for Atheros [04ca:3005]
5
6commit 55ed7d4d1469eafbe3ad7e8fcd44f5af27845a81 upstream.
7
8Add another vendor specific ID for Atheros AR3012 device.
9This chip is wrapped by Lite-On Technology Corp.
10
11output of usb-devices:
12T: Bus=04 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
13D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
14P: Vendor=04ca ProdID=3005 Rev=00.02
15S: Manufacturer=Atheros Communications
16S: Product=Bluetooth USB Host Controller
17S: SerialNumber=Alaska Day 2006
18C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
19I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
20I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
21
22Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
23Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 drivers/bluetooth/ath3k.c | 2 ++
27 drivers/bluetooth/btusb.c | 1 +
28 2 files changed, 3 insertions(+), 0 deletions(-)
29
30diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
31index 003cd8d..99fefbd 100644
32--- a/drivers/bluetooth/ath3k.c
33+++ b/drivers/bluetooth/ath3k.c
34@@ -73,6 +73,7 @@ static struct usb_device_id ath3k_table[] = {
35 { USB_DEVICE(0x0CF3, 0x3004) },
36 { USB_DEVICE(0x0CF3, 0x311D) },
37 { USB_DEVICE(0x13d3, 0x3375) },
38+ { USB_DEVICE(0x04CA, 0x3005) },
39
40 /* Atheros AR5BBU12 with sflash firmware */
41 { USB_DEVICE(0x0489, 0xE02C) },
42@@ -91,6 +92,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
43 { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
44 { USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
45 { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
46+ { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
47
48 { } /* Terminating entry */
49 };
50diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
51index db44ad5..e56da6a 100644
52--- a/drivers/bluetooth/btusb.c
53+++ b/drivers/bluetooth/btusb.c
54@@ -129,6 +129,7 @@ static struct usb_device_id blacklist_table[] = {
55 { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
56 { USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
57 { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
58+ { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
59
60 /* Atheros AR5BBU12 with sflash firmware */
61 { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
62--
631.7.7.6
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0041-Don-t-limit-non-nested-epoll-paths.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0041-Don-t-limit-non-nested-epoll-paths.patch
new file mode 100644
index 00000000..0a59b941
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0041-Don-t-limit-non-nested-epoll-paths.patch
@@ -0,0 +1,45 @@
1From 53d02f37f9e87191afdb511e740fa506af1fe2fb Mon Sep 17 00:00:00 2001
2From: Jason Baron <jbaron@redhat.com>
3Date: Fri, 16 Mar 2012 16:34:03 -0400
4Subject: [PATCH 041/165] Don't limit non-nested epoll paths
5
6commit 93dc6107a76daed81c07f50215fa6ae77691634f upstream.
7
8Commit 28d82dc1c4ed ("epoll: limit paths") that I did to limit the
9number of possible wakeup paths in epoll is causing a few applications
10to longer work (dovecot for one).
11
12The original patch is really about limiting the amount of epoll nesting
13(since epoll fds can be attached to other fds). Thus, we probably can
14allow an unlimited number of paths of depth 1. My current patch limits
15it at 1000. And enforce the limits on paths that have a greater depth.
16
17This is captured in: https://bugzilla.redhat.com/show_bug.cgi?id=681578
18
19Signed-off-by: Jason Baron <jbaron@redhat.com>
20Cc: Andrew Morton <akpm@linux-foundation.org>
21Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
23Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
24---
25 fs/eventpoll.c | 4 ++++
26 1 files changed, 4 insertions(+), 0 deletions(-)
27
28diff --git a/fs/eventpoll.c b/fs/eventpoll.c
29index ea54cde..4d9d3a4 100644
30--- a/fs/eventpoll.c
31+++ b/fs/eventpoll.c
32@@ -988,6 +988,10 @@ static int path_count[PATH_ARR_SIZE];
33
34 static int path_count_inc(int nests)
35 {
36+ /* Allow an arbitrary number of depth 1 paths */
37+ if (nests == 0)
38+ return 0;
39+
40 if (++path_count[nests] > path_limits[nests])
41 return -1;
42 return 0;
43--
441.7.7.6
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0042-spi-Fix-device-unregistration-when-unregistering-the.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0042-spi-Fix-device-unregistration-when-unregistering-the.patch
new file mode 100644
index 00000000..54fbbfd3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0042-spi-Fix-device-unregistration-when-unregistering-the.patch
@@ -0,0 +1,38 @@
1From e98347051c4edde97c0dfbc704660d9d0e4e0641 Mon Sep 17 00:00:00 2001
2From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3Date: Mon, 12 Dec 2011 01:15:06 +0100
4Subject: [PATCH 042/165] spi: Fix device unregistration when unregistering
5 the bus master
6
7commit 178db7d30f94707efca1a189753c105ef69942ed upstream.
8
9Device are added as children of the bus master's parent device, but
10spi_unregister_master() looks for devices to unregister in the bus
11master's children. This results in the child devices not being
12unregistered.
13
14Fix this by registering devices as direct children of the bus master.
15
16Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
17Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/spi/spi.c | 2 +-
21 1 files changed, 1 insertions(+), 1 deletions(-)
22
23diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
24index 77eae99..b2ccdea 100644
25--- a/drivers/spi/spi.c
26+++ b/drivers/spi/spi.c
27@@ -319,7 +319,7 @@ struct spi_device *spi_alloc_device(struct spi_master *master)
28 }
29
30 spi->master = master;
31- spi->dev.parent = dev;
32+ spi->dev.parent = &master->dev;
33 spi->dev.bus = &spi_bus_type;
34 spi->dev.release = spidev_release;
35 device_initialize(&spi->dev);
36--
371.7.7.6
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0043-spi-mpc83xx-fix-NULL-pdata-dereference-bug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0043-spi-mpc83xx-fix-NULL-pdata-dereference-bug.patch
new file mode 100644
index 00000000..c8577003
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0043-spi-mpc83xx-fix-NULL-pdata-dereference-bug.patch
@@ -0,0 +1,42 @@
1From bc5969d96482b42246a0143d3f36744c8d06c8cf Mon Sep 17 00:00:00 2001
2From: Kenth Eriksson <kenth.eriksson@transmode.com>
3Date: Fri, 30 Mar 2012 17:05:30 +0200
4Subject: [PATCH 043/165] spi/mpc83xx: fix NULL pdata dereference bug
5
6commit 5039a86973cd35bdb2f64d28ee12f13fe2bb5a4c upstream.
7
8Commit 178db7d3, "spi: Fix device unregistration when unregistering
9the bus master", changed device initialization to be children of the
10bus master, not children of the bus masters parent device. The pdata
11pointer used in fsl_spi_chipselect must updated to reflect the changed
12initialization.
13
14Signed-off-by: Kenth Eriksson <kenth.eriksson@transmode.com>
15Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
16Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/spi/spi-fsl-spi.c | 4 +++-
20 1 files changed, 3 insertions(+), 1 deletions(-)
21
22diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
23index 24cacff..5f748c0 100644
24--- a/drivers/spi/spi-fsl-spi.c
25+++ b/drivers/spi/spi-fsl-spi.c
26@@ -139,10 +139,12 @@ static void fsl_spi_change_mode(struct spi_device *spi)
27 static void fsl_spi_chipselect(struct spi_device *spi, int value)
28 {
29 struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
30- struct fsl_spi_platform_data *pdata = spi->dev.parent->platform_data;
31+ struct fsl_spi_platform_data *pdata;
32 bool pol = spi->mode & SPI_CS_HIGH;
33 struct spi_mpc8xxx_cs *cs = spi->controller_state;
34
35+ pdata = spi->dev.parent->parent->platform_data;
36+
37 if (value == BITBANG_CS_INACTIVE) {
38 if (pdata->cs_control)
39 pdata->cs_control(spi, !pol);
40--
411.7.7.6
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0044-rt2800-Add-support-for-the-Fujitsu-Stylistic-Q550.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0044-rt2800-Add-support-for-the-Fujitsu-Stylistic-Q550.patch
new file mode 100644
index 00000000..cfced925
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0044-rt2800-Add-support-for-the-Fujitsu-Stylistic-Q550.patch
@@ -0,0 +1,33 @@
1From 81eef1db7c237ecc52f165049d7b128f081bc1f1 Mon Sep 17 00:00:00 2001
2From: Alan Cox <alan@linux.intel.com>
3Date: Mon, 19 Dec 2011 21:07:33 +0000
4Subject: [PATCH 044/165] rt2800: Add support for the Fujitsu Stylistic Q550
5
6commit 3ac44670ad0fca8b6c43b3e4d8494c67c419f494 upstream.
7
8Just another USB identifier.
9
10Signed-off-by: Alan Cox <alan@linux.intel.com>
11Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
12Signed-off-by: John W. Linville <linville@tuxdriver.com>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 drivers/net/wireless/rt2x00/rt2800usb.c | 2 ++
16 1 files changed, 2 insertions(+), 0 deletions(-)
17
18diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
19index cb71e88..c49b8bf 100644
20--- a/drivers/net/wireless/rt2x00/rt2800usb.c
21+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
22@@ -1161,6 +1161,8 @@ static struct usb_device_id rt2800usb_device_table[] = {
23 { USB_DEVICE(0x7392, 0x7722) },
24 /* Encore */
25 { USB_DEVICE(0x203d, 0x14a1) },
26+ /* Fujitsu Stylistic 550 */
27+ { USB_DEVICE(0x1690, 0x0761) },
28 /* Gemtek */
29 { USB_DEVICE(0x15a9, 0x0010) },
30 /* Gigabyte */
31--
321.7.7.6
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0045-rt2x00-Identify-rt2800usb-chipsets.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0045-rt2x00-Identify-rt2800usb-chipsets.patch
new file mode 100644
index 00000000..f29f428c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0045-rt2x00-Identify-rt2800usb-chipsets.patch
@@ -0,0 +1,148 @@
1From 5d35a9613dc2f1483a1b1c8327f7050299363dee Mon Sep 17 00:00:00 2001
2From: Gertjan van Wingerde <gwingerde@gmail.com>
3Date: Wed, 28 Dec 2011 01:53:18 +0100
4Subject: [PATCH 045/165] rt2x00: Identify rt2800usb chipsets.
5
6commit bc93eda7e903ff75cefcb6e247ed9b8e9f8e9783 upstream.
7
8According to the latest USB ID database these are all RT2770 / RT2870 / RT307x
9devices.
10
11Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
12Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
13Signed-off-by: John W. Linville <linville@tuxdriver.com>
14[bwh: Backported to 3.2: adjust context for previously cherry-picked
15 commit d42a179b941a9e4cc6cf41d0f3cbadd75fc48a89 'rt2x00: Add support
16 for D-Link DWA-127 to rt2800usb']
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/net/wireless/rt2x00/rt2800usb.c | 26 ++++++++++++--------------
20 1 files changed, 12 insertions(+), 14 deletions(-)
21
22diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
23index c49b8bf..0ffa111 100644
24--- a/drivers/net/wireless/rt2x00/rt2800usb.c
25+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
26@@ -914,12 +914,14 @@ static struct usb_device_id rt2800usb_device_table[] = {
27 { USB_DEVICE(0x050d, 0x8053) },
28 { USB_DEVICE(0x050d, 0x805c) },
29 { USB_DEVICE(0x050d, 0x815c) },
30+ { USB_DEVICE(0x050d, 0x825a) },
31 { USB_DEVICE(0x050d, 0x825b) },
32 { USB_DEVICE(0x050d, 0x935a) },
33 { USB_DEVICE(0x050d, 0x935b) },
34 /* Buffalo */
35 { USB_DEVICE(0x0411, 0x00e8) },
36 { USB_DEVICE(0x0411, 0x0158) },
37+ { USB_DEVICE(0x0411, 0x015d) },
38 { USB_DEVICE(0x0411, 0x016f) },
39 { USB_DEVICE(0x0411, 0x01a2) },
40 /* Corega */
41@@ -934,6 +936,8 @@ static struct usb_device_id rt2800usb_device_table[] = {
42 { USB_DEVICE(0x07d1, 0x3c0e) },
43 { USB_DEVICE(0x07d1, 0x3c0f) },
44 { USB_DEVICE(0x07d1, 0x3c11) },
45+ { USB_DEVICE(0x07d1, 0x3c13) },
46+ { USB_DEVICE(0x07d1, 0x3c15) },
47 { USB_DEVICE(0x07d1, 0x3c16) },
48 { USB_DEVICE(0x2001, 0x3c1b) },
49 /* Draytek */
50@@ -944,6 +948,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
51 { USB_DEVICE(0x7392, 0x7711) },
52 { USB_DEVICE(0x7392, 0x7717) },
53 { USB_DEVICE(0x7392, 0x7718) },
54+ { USB_DEVICE(0x7392, 0x7722) },
55 /* Encore */
56 { USB_DEVICE(0x203d, 0x1480) },
57 { USB_DEVICE(0x203d, 0x14a9) },
58@@ -978,6 +983,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
59 { USB_DEVICE(0x1737, 0x0070) },
60 { USB_DEVICE(0x1737, 0x0071) },
61 { USB_DEVICE(0x1737, 0x0077) },
62+ { USB_DEVICE(0x1737, 0x0078) },
63 /* Logitec */
64 { USB_DEVICE(0x0789, 0x0162) },
65 { USB_DEVICE(0x0789, 0x0163) },
66@@ -1001,9 +1007,13 @@ static struct usb_device_id rt2800usb_device_table[] = {
67 { USB_DEVICE(0x0db0, 0x871b) },
68 { USB_DEVICE(0x0db0, 0x871c) },
69 { USB_DEVICE(0x0db0, 0x899a) },
70+ /* Ovislink */
71+ { USB_DEVICE(0x1b75, 0x3071) },
72+ { USB_DEVICE(0x1b75, 0x3072) },
73 /* Para */
74 { USB_DEVICE(0x20b8, 0x8888) },
75 /* Pegatron */
76+ { USB_DEVICE(0x1d4d, 0x0002) },
77 { USB_DEVICE(0x1d4d, 0x000c) },
78 { USB_DEVICE(0x1d4d, 0x000e) },
79 { USB_DEVICE(0x1d4d, 0x0011) },
80@@ -1056,7 +1066,9 @@ static struct usb_device_id rt2800usb_device_table[] = {
81 /* Sparklan */
82 { USB_DEVICE(0x15a9, 0x0006) },
83 /* Sweex */
84+ { USB_DEVICE(0x177f, 0x0153) },
85 { USB_DEVICE(0x177f, 0x0302) },
86+ { USB_DEVICE(0x177f, 0x0313) },
87 /* U-Media */
88 { USB_DEVICE(0x157e, 0x300e) },
89 { USB_DEVICE(0x157e, 0x3013) },
90@@ -1140,25 +1152,20 @@ static struct usb_device_id rt2800usb_device_table[] = {
91 { USB_DEVICE(0x13d3, 0x3322) },
92 /* Belkin */
93 { USB_DEVICE(0x050d, 0x1003) },
94- { USB_DEVICE(0x050d, 0x825a) },
95 /* Buffalo */
96 { USB_DEVICE(0x0411, 0x012e) },
97 { USB_DEVICE(0x0411, 0x0148) },
98 { USB_DEVICE(0x0411, 0x0150) },
99- { USB_DEVICE(0x0411, 0x015d) },
100 /* Corega */
101 { USB_DEVICE(0x07aa, 0x0041) },
102 { USB_DEVICE(0x07aa, 0x0042) },
103 { USB_DEVICE(0x18c5, 0x0008) },
104 /* D-Link */
105 { USB_DEVICE(0x07d1, 0x3c0b) },
106- { USB_DEVICE(0x07d1, 0x3c13) },
107- { USB_DEVICE(0x07d1, 0x3c15) },
108 { USB_DEVICE(0x07d1, 0x3c17) },
109 { USB_DEVICE(0x2001, 0x3c17) },
110 /* Edimax */
111 { USB_DEVICE(0x7392, 0x4085) },
112- { USB_DEVICE(0x7392, 0x7722) },
113 /* Encore */
114 { USB_DEVICE(0x203d, 0x14a1) },
115 /* Fujitsu Stylistic 550 */
116@@ -1174,19 +1181,13 @@ static struct usb_device_id rt2800usb_device_table[] = {
117 /* LevelOne */
118 { USB_DEVICE(0x1740, 0x0605) },
119 { USB_DEVICE(0x1740, 0x0615) },
120- /* Linksys */
121- { USB_DEVICE(0x1737, 0x0078) },
122 /* Logitec */
123 { USB_DEVICE(0x0789, 0x0168) },
124 { USB_DEVICE(0x0789, 0x0169) },
125 /* Motorola */
126 { USB_DEVICE(0x100d, 0x9032) },
127- /* Ovislink */
128- { USB_DEVICE(0x1b75, 0x3071) },
129- { USB_DEVICE(0x1b75, 0x3072) },
130 /* Pegatron */
131 { USB_DEVICE(0x05a6, 0x0101) },
132- { USB_DEVICE(0x1d4d, 0x0002) },
133 { USB_DEVICE(0x1d4d, 0x0010) },
134 /* Planex */
135 { USB_DEVICE(0x2019, 0x5201) },
136@@ -1205,9 +1206,6 @@ static struct usb_device_id rt2800usb_device_table[] = {
137 { USB_DEVICE(0x083a, 0xc522) },
138 { USB_DEVICE(0x083a, 0xd522) },
139 { USB_DEVICE(0x083a, 0xf511) },
140- /* Sweex */
141- { USB_DEVICE(0x177f, 0x0153) },
142- { USB_DEVICE(0x177f, 0x0313) },
143 /* Zyxel */
144 { USB_DEVICE(0x0586, 0x341a) },
145 #endif
146--
1471.7.7.6
148
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0046-nfsd-fix-b0rken-error-value-for-setattr-on-read-only.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0046-nfsd-fix-b0rken-error-value-for-setattr-on-read-only.patch
new file mode 100644
index 00000000..dd849746
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0046-nfsd-fix-b0rken-error-value-for-setattr-on-read-only.patch
@@ -0,0 +1,45 @@
1From 41e39c9a0a6aa1e152db9dfd4019e20a9de8dce6 Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 27 Apr 2012 17:42:43 -0500
4Subject: [PATCH 046/165] nfsd: fix b0rken error value for setattr on
5 read-only mount
6
7commit 96f6f98501196d46ce52c2697dd758d9300c63f5 upstream.
8
9..._want_write() returns -EROFS on failure, _not_ an NFS error value.
10
11Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 fs/nfsd/nfs4proc.c | 7 ++++---
16 1 files changed, 4 insertions(+), 3 deletions(-)
17
18diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
19index fa38336..35840aa 100644
20--- a/fs/nfsd/nfs4proc.c
21+++ b/fs/nfsd/nfs4proc.c
22@@ -827,6 +827,7 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
23 struct nfsd4_setattr *setattr)
24 {
25 __be32 status = nfs_ok;
26+ int err;
27
28 if (setattr->sa_iattr.ia_valid & ATTR_SIZE) {
29 nfs4_lock_state();
30@@ -838,9 +839,9 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
31 return status;
32 }
33 }
34- status = mnt_want_write(cstate->current_fh.fh_export->ex_path.mnt);
35- if (status)
36- return status;
37+ err = mnt_want_write(cstate->current_fh.fh_export->ex_path.mnt);
38+ if (err)
39+ return nfserrno(err);
40 status = nfs_ok;
41
42 status = check_attr_support(rqstp, cstate, setattr->sa_bmval,
43--
441.7.7.6
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0047-nfsd-fix-error-values-returned-by-nfsd4_lockt-when-n.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0047-nfsd-fix-error-values-returned-by-nfsd4_lockt-when-n.patch
new file mode 100644
index 00000000..ccb77cfe
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0047-nfsd-fix-error-values-returned-by-nfsd4_lockt-when-n.patch
@@ -0,0 +1,73 @@
1From d0fb6592c02971a290d199c1e9ee06624fd17c1c Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 00:00:04 -0400
4Subject: [PATCH 047/165] nfsd: fix error values returned by nfsd4_lockt()
5 when nfsd_open() fails
6
7commit 04da6e9d63427b2d0fd04766712200c250b3278f upstream.
8
9nfsd_open() already returns an NFS error value; only vfs_test_lock()
10result needs to be fed through nfserrno(). Broken by commit 55ef12
11(nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT)
12three years ago...
13
14Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 fs/nfsd/nfs4state.c | 23 +++++++++--------------
18 1 files changed, 9 insertions(+), 14 deletions(-)
19
20diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
21index 5abced7..4cfe260 100644
22--- a/fs/nfsd/nfs4state.c
23+++ b/fs/nfsd/nfs4state.c
24@@ -4080,16 +4080,14 @@ out:
25 * vfs_test_lock. (Arguably perhaps test_lock should be done with an
26 * inode operation.)
27 */
28-static int nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock)
29+static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock)
30 {
31 struct file *file;
32- int err;
33-
34- err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file);
35- if (err)
36- return err;
37- err = vfs_test_lock(file, lock);
38- nfsd_close(file);
39+ __be32 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file);
40+ if (!err) {
41+ err = nfserrno(vfs_test_lock(file, lock));
42+ nfsd_close(file);
43+ }
44 return err;
45 }
46
47@@ -4103,7 +4101,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
48 struct inode *inode;
49 struct file_lock file_lock;
50 struct nfs4_lockowner *lo;
51- int error;
52 __be32 status;
53
54 if (locks_in_grace())
55@@ -4149,12 +4146,10 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
56
57 nfs4_transform_lock_offset(&file_lock);
58
59- status = nfs_ok;
60- error = nfsd_test_lock(rqstp, &cstate->current_fh, &file_lock);
61- if (error) {
62- status = nfserrno(error);
63+ status = nfsd_test_lock(rqstp, &cstate->current_fh, &file_lock);
64+ if (status)
65 goto out;
66- }
67+
68 if (file_lock.fl_type != F_UNLCK) {
69 status = nfserr_denied;
70 nfs4_set_lock_denied(&file_lock, &lockt->lt_denied);
71--
721.7.7.6
73
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0048-nfsd-fix-endianness-breakage-in-TEST_STATEID-handlin.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0048-nfsd-fix-endianness-breakage-in-TEST_STATEID-handlin.patch
new file mode 100644
index 00000000..ce623190
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0048-nfsd-fix-endianness-breakage-in-TEST_STATEID-handlin.patch
@@ -0,0 +1,36 @@
1From c0326b2209aa31faeb2369d7311d0754d7b6d202 Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 00:10:34 -0400
4Subject: [PATCH 048/165] nfsd: fix endianness breakage in TEST_STATEID
5 handling
6
7commit 02f5fde5df0ea930e70f93763dd48beff182b208 upstream.
8
9->ts_id_status gets nfs errno, i.e. it's already big-endian; no need
10to apply htonl() to it. Broken by commit 174568 (NFSD: Added TEST_STATEID
11operation) last year...
12
13Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14Cc: "J. Bruce Fields" <bfields@fieldses.org>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 fs/nfsd/nfs4xdr.c | 2 +-
19 1 files changed, 1 insertions(+), 1 deletions(-)
20
21diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
22index b6fa792..9cfa60a 100644
23--- a/fs/nfsd/nfs4xdr.c
24+++ b/fs/nfsd/nfs4xdr.c
25@@ -3411,7 +3411,7 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, int nfserr,
26 nfsd4_decode_stateid(argp, &si);
27 valid = nfs4_validate_stateid(cl, &si);
28 RESERVE_SPACE(4);
29- *p++ = htonl(valid);
30+ *p++ = valid;
31 resp->p = p;
32 }
33 nfs4_unlock_state();
34--
351.7.7.6
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0049-nfsd-fix-compose_entry_fh-failure-exits.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0049-nfsd-fix-compose_entry_fh-failure-exits.patch
new file mode 100644
index 00000000..8294bc4f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0049-nfsd-fix-compose_entry_fh-failure-exits.patch
@@ -0,0 +1,92 @@
1From 58c574420bacc1f5dc171dff6f0915ebc5749ee3 Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 00:32:14 -0400
4Subject: [PATCH 049/165] nfsd: fix compose_entry_fh() failure exits
5
6commit efe39651f08813180f37dc508d950fc7d92b29a8 upstream.
7
8Restore the original logics ("fail on mountpoints, negatives and in
9case of fh_compose() failures"). Since commit 8177e (nfsd: clean up
10readdirplus encoding) that got broken -
11 rv = fh_compose(fhp, exp, dchild, &cd->fh);
12 if (rv)
13 goto out;
14 if (!dchild->d_inode)
15 goto out;
16 rv = 0;
17out:
18is equivalent to
19 rv = fh_compose(fhp, exp, dchild, &cd->fh);
20out:
21and the second check has no effect whatsoever...
22
23Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 fs/nfsd/nfs3xdr.c | 22 ++++++++--------------
27 1 files changed, 8 insertions(+), 14 deletions(-)
28
29diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
30index 08c6e36..43f46cd 100644
31--- a/fs/nfsd/nfs3xdr.c
32+++ b/fs/nfsd/nfs3xdr.c
33@@ -803,13 +803,13 @@ encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name,
34 return p;
35 }
36
37-static int
38+static __be32
39 compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
40 const char *name, int namlen)
41 {
42 struct svc_export *exp;
43 struct dentry *dparent, *dchild;
44- int rv = 0;
45+ __be32 rv = nfserr_noent;
46
47 dparent = cd->fh.fh_dentry;
48 exp = cd->fh.fh_export;
49@@ -817,26 +817,20 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
50 if (isdotent(name, namlen)) {
51 if (namlen == 2) {
52 dchild = dget_parent(dparent);
53- if (dchild == dparent) {
54- /* filesystem root - cannot return filehandle for ".." */
55- dput(dchild);
56- return -ENOENT;
57- }
58+ /* filesystem root - cannot return filehandle for ".." */
59+ if (dchild == dparent)
60+ goto out;
61 } else
62 dchild = dget(dparent);
63 } else
64 dchild = lookup_one_len(name, dparent, namlen);
65 if (IS_ERR(dchild))
66- return -ENOENT;
67- rv = -ENOENT;
68+ return rv;
69 if (d_mountpoint(dchild))
70 goto out;
71- rv = fh_compose(fhp, exp, dchild, &cd->fh);
72- if (rv)
73- goto out;
74 if (!dchild->d_inode)
75 goto out;
76- rv = 0;
77+ rv = fh_compose(fhp, exp, dchild, &cd->fh);
78 out:
79 dput(dchild);
80 return rv;
81@@ -845,7 +839,7 @@ out:
82 static __be32 *encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name, int namlen)
83 {
84 struct svc_fh fh;
85- int err;
86+ __be32 err;
87
88 fh_init(&fh, NFS3_FHSIZE);
89 err = compose_entry_fh(cd, &fh, name, namlen);
90--
911.7.7.6
92
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0050-btrfs-btrfs_root_readonly-broken-on-big-endian.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0050-btrfs-btrfs_root_readonly-broken-on-big-endian.patch
new file mode 100644
index 00000000..939c8804
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0050-btrfs-btrfs_root_readonly-broken-on-big-endian.patch
@@ -0,0 +1,33 @@
1From f34178385ffae408ee0ade44819875816104a99a Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 11:49:04 -0400
4Subject: [PATCH 050/165] btrfs: btrfs_root_readonly() broken on big-endian
5
6commit 6ed3cf2cdfce4c9f1d73171bd3f27d9cb77b734e upstream.
7
8->root_flags is __le64 and all accesses to it go through the helpers
9that do proper conversions. Except for btrfs_root_readonly(), which
10checks bit 0 as in host-endian...
11
12Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 fs/btrfs/ctree.h | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
19index 6738503..83a871f 100644
20--- a/fs/btrfs/ctree.h
21+++ b/fs/btrfs/ctree.h
22@@ -2025,7 +2025,7 @@ BTRFS_SETGET_STACK_FUNCS(root_last_snapshot, struct btrfs_root_item,
23
24 static inline bool btrfs_root_readonly(struct btrfs_root *root)
25 {
26- return root->root_item.flags & BTRFS_ROOT_SUBVOL_RDONLY;
27+ return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0;
28 }
29
30 /* struct btrfs_root_backup */
31--
321.7.7.6
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0051-ocfs2-l_next_free_req-breakage-on-big-endian.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0051-ocfs2-l_next_free_req-breakage-on-big-endian.patch
new file mode 100644
index 00000000..75f2e65f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0051-ocfs2-l_next_free_req-breakage-on-big-endian.patch
@@ -0,0 +1,53 @@
1From e72fdd80481fa4848f1d90be6e8bcdc24db469f8 Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 12:22:00 -0400
4Subject: [PATCH 051/165] ocfs2: ->l_next_free_req breakage on big-endian
5
6commit 3a251f04fe97c3d335b745c98e4b377e3c3899f2 upstream.
7
8It's le16, not le32...
9
10Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12---
13 fs/ocfs2/alloc.c | 2 +-
14 fs/ocfs2/refcounttree.c | 4 ++--
15 2 files changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
18index 3165aeb..31b9463 100644
19--- a/fs/ocfs2/alloc.c
20+++ b/fs/ocfs2/alloc.c
21@@ -1134,7 +1134,7 @@ static int ocfs2_adjust_rightmost_branch(handle_t *handle,
22 }
23
24 el = path_leaf_el(path);
25- rec = &el->l_recs[le32_to_cpu(el->l_next_free_rec) - 1];
26+ rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec) - 1];
27
28 ocfs2_adjust_rightmost_records(handle, et, path, rec);
29
30diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
31index cf78233..a7b7217 100644
32--- a/fs/ocfs2/refcounttree.c
33+++ b/fs/ocfs2/refcounttree.c
34@@ -1036,14 +1036,14 @@ static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci,
35
36 tmp_el = left_path->p_node[subtree_root].el;
37 blkno = left_path->p_node[subtree_root+1].bh->b_blocknr;
38- for (i = 0; i < le32_to_cpu(tmp_el->l_next_free_rec); i++) {
39+ for (i = 0; i < le16_to_cpu(tmp_el->l_next_free_rec); i++) {
40 if (le64_to_cpu(tmp_el->l_recs[i].e_blkno) == blkno) {
41 *cpos_end = le32_to_cpu(tmp_el->l_recs[i+1].e_cpos);
42 break;
43 }
44 }
45
46- BUG_ON(i == le32_to_cpu(tmp_el->l_next_free_rec));
47+ BUG_ON(i == le16_to_cpu(tmp_el->l_next_free_rec));
48
49 out:
50 ocfs2_free_path(left_path);
51--
521.7.7.6
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0052-ocfs-rl_used-breakage-on-big-endian.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0052-ocfs-rl_used-breakage-on-big-endian.patch
new file mode 100644
index 00000000..872b4229
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0052-ocfs-rl_used-breakage-on-big-endian.patch
@@ -0,0 +1,58 @@
1From 88f1278427aa9c75c6b4c7f59b160a9a29ae8f17 Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 12:27:11 -0400
4Subject: [PATCH 052/165] ocfs: ->rl_used breakage on big-endian
5
6commit e1bf4cc620fd143766ddfcee3b004a1d1bb34fd0 upstream.
7
8it's le16, not le32 or le64...
9
10Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12---
13 fs/ocfs2/refcounttree.c | 8 ++++----
14 1 files changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
17index a7b7217..bc90ebc 100644
18--- a/fs/ocfs2/refcounttree.c
19+++ b/fs/ocfs2/refcounttree.c
20@@ -1468,7 +1468,7 @@ static int ocfs2_divide_leaf_refcount_block(struct buffer_head *ref_leaf_bh,
21
22 trace_ocfs2_divide_leaf_refcount_block(
23 (unsigned long long)ref_leaf_bh->b_blocknr,
24- le32_to_cpu(rl->rl_count), le32_to_cpu(rl->rl_used));
25+ le32_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used));
26
27 /*
28 * XXX: Improvement later.
29@@ -2411,7 +2411,7 @@ static int ocfs2_calc_refcount_meta_credits(struct super_block *sb,
30 rb = (struct ocfs2_refcount_block *)
31 prev_bh->b_data;
32
33- if (le64_to_cpu(rb->rf_records.rl_used) +
34+ if (le16_to_cpu(rb->rf_records.rl_used) +
35 recs_add >
36 le16_to_cpu(rb->rf_records.rl_count))
37 ref_blocks++;
38@@ -2476,7 +2476,7 @@ static int ocfs2_calc_refcount_meta_credits(struct super_block *sb,
39 if (prev_bh) {
40 rb = (struct ocfs2_refcount_block *)prev_bh->b_data;
41
42- if (le64_to_cpu(rb->rf_records.rl_used) + recs_add >
43+ if (le16_to_cpu(rb->rf_records.rl_used) + recs_add >
44 le16_to_cpu(rb->rf_records.rl_count))
45 ref_blocks++;
46
47@@ -3629,7 +3629,7 @@ int ocfs2_refcounted_xattr_delete_need(struct inode *inode,
48 * one will split a refcount rec, so totally we need
49 * clusters * 2 new refcount rec.
50 */
51- if (le64_to_cpu(rb->rf_records.rl_used) + clusters * 2 >
52+ if (le16_to_cpu(rb->rf_records.rl_used) + clusters * 2 >
53 le16_to_cpu(rb->rf_records.rl_count))
54 ref_blocks++;
55
56--
571.7.7.6
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0053-ocfs2-rl_count-endianness-breakage.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0053-ocfs2-rl_count-endianness-breakage.patch
new file mode 100644
index 00000000..d60dcb72
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0053-ocfs2-rl_count-endianness-breakage.patch
@@ -0,0 +1,31 @@
1From de962467d8b4d7cd0903b5151bc5fbde4f09552f Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 12:28:21 -0400
4Subject: [PATCH 053/165] ocfs2: ->rl_count endianness breakage
5
6commit 28748b325dc2d730ccc312830a91c4ae0c0d9379 upstream.
7
8le16, not le32...
9
10Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12---
13 fs/ocfs2/refcounttree.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
17index bc90ebc..9f32d7c 100644
18--- a/fs/ocfs2/refcounttree.c
19+++ b/fs/ocfs2/refcounttree.c
20@@ -1468,7 +1468,7 @@ static int ocfs2_divide_leaf_refcount_block(struct buffer_head *ref_leaf_bh,
21
22 trace_ocfs2_divide_leaf_refcount_block(
23 (unsigned long long)ref_leaf_bh->b_blocknr,
24- le32_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used));
25+ le16_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used));
26
27 /*
28 * XXX: Improvement later.
29--
301.7.7.6
31
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0054-ocfs2-e_leaf_clusters-endianness-breakage.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0054-ocfs2-e_leaf_clusters-endianness-breakage.patch
new file mode 100644
index 00000000..d30eb97a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0054-ocfs2-e_leaf_clusters-endianness-breakage.patch
@@ -0,0 +1,40 @@
1From c38877f92a9e0858b5a4902440cef2c0df1b1632 Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 12:30:02 -0400
4Subject: [PATCH 054/165] ocfs2: ->e_leaf_clusters endianness breakage
5
6commit 72094e43e3af5020510f920321d71f1798fa896d upstream.
7
8le16, not le32...
9
10Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12---
13 fs/ocfs2/suballoc.c | 4 ++--
14 1 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
17index ba5d97e..f169da4 100644
18--- a/fs/ocfs2/suballoc.c
19+++ b/fs/ocfs2/suballoc.c
20@@ -600,7 +600,7 @@ static void ocfs2_bg_alloc_cleanup(handle_t *handle,
21 ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode,
22 cluster_ac->ac_bh,
23 le64_to_cpu(rec->e_blkno),
24- le32_to_cpu(rec->e_leaf_clusters));
25+ le16_to_cpu(rec->e_leaf_clusters));
26 if (ret)
27 mlog_errno(ret);
28 /* Try all the clusters to free */
29@@ -1628,7 +1628,7 @@ static int ocfs2_bg_discontig_fix_by_rec(struct ocfs2_suballoc_result *res,
30 {
31 unsigned int bpc = le16_to_cpu(cl->cl_bpc);
32 unsigned int bitoff = le32_to_cpu(rec->e_cpos) * bpc;
33- unsigned int bitcount = le32_to_cpu(rec->e_leaf_clusters) * bpc;
34+ unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc;
35
36 if (res->sr_bit_offset < bitoff)
37 return 0;
38--
391.7.7.6
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0055-lockd-fix-the-endianness-bug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0055-lockd-fix-the-endianness-bug.patch
new file mode 100644
index 00000000..b5a1ab8d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0055-lockd-fix-the-endianness-bug.patch
@@ -0,0 +1,45 @@
1From 3257f4da731bb45c2117beda34ed3202df1c74e4 Mon Sep 17 00:00:00 2001
2From: Al Viro <viro@zeniv.linux.org.uk>
3Date: Fri, 13 Apr 2012 13:49:47 -0400
4Subject: [PATCH 055/165] lockd: fix the endianness bug
5
6commit e847469bf77a1d339274074ed068d461f0c872bc upstream.
7
8comparing be32 values for < is not doing the right thing...
9
10Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12---
13 fs/lockd/clnt4xdr.c | 2 +-
14 fs/lockd/clntxdr.c | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
18index f848b52..046bb77 100644
19--- a/fs/lockd/clnt4xdr.c
20+++ b/fs/lockd/clnt4xdr.c
21@@ -241,7 +241,7 @@ static int decode_nlm4_stat(struct xdr_stream *xdr, __be32 *stat)
22 p = xdr_inline_decode(xdr, 4);
23 if (unlikely(p == NULL))
24 goto out_overflow;
25- if (unlikely(*p > nlm4_failed))
26+ if (unlikely(ntohl(*p) > ntohl(nlm4_failed)))
27 goto out_bad_xdr;
28 *stat = *p;
29 return 0;
30diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c
31index 180ac34..36057ce 100644
32--- a/fs/lockd/clntxdr.c
33+++ b/fs/lockd/clntxdr.c
34@@ -236,7 +236,7 @@ static int decode_nlm_stat(struct xdr_stream *xdr,
35 p = xdr_inline_decode(xdr, 4);
36 if (unlikely(p == NULL))
37 goto out_overflow;
38- if (unlikely(*p > nlm_lck_denied_grace_period))
39+ if (unlikely(ntohl(*p) > ntohl(nlm_lck_denied_grace_period)))
40 goto out_enum;
41 *stat = *p;
42 return 0;
43--
441.7.7.6
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0056-usb-dwc3-ep0-increment-actual-on-bounced-ep0-case.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0056-usb-dwc3-ep0-increment-actual-on-bounced-ep0-case.patch
new file mode 100644
index 00000000..de20c2b2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0056-usb-dwc3-ep0-increment-actual-on-bounced-ep0-case.patch
@@ -0,0 +1,41 @@
1From ab98d1498e030766394cbc78259a2a9a1aa5edbe Mon Sep 17 00:00:00 2001
2From: Felipe Balbi <balbi@ti.com>
3Date: Wed, 21 Mar 2012 11:44:00 +0200
4Subject: [PATCH 056/165] usb: dwc3: ep0: increment "actual" on bounced ep0
5 case
6
7commit cd423dd3634a5232a3019eb372b144619a61cd16 upstream.
8
9due to a HW limitation we have a bounce buffer for ep0
10out transfers which are not aligned with MaxPacketSize.
11
12On such case we were not increment r->actual as we should.
13
14This patch fixes that mistake.
15
16Signed-off-by: Felipe Balbi <balbi@ti.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/usb/dwc3/ep0.c | 3 ++-
21 1 files changed, 2 insertions(+), 1 deletions(-)
22
23diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
24index 27bd50a..c0dcf69 100644
25--- a/drivers/usb/dwc3/ep0.c
26+++ b/drivers/usb/dwc3/ep0.c
27@@ -572,9 +572,10 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
28 dwc->ep0_bounced = false;
29 } else {
30 transferred = ur->length - trb.length;
31- ur->actual += transferred;
32 }
33
34+ ur->actual += transferred;
35+
36 if ((epnum & 1) && ur->actual < ur->length) {
37 /* for some reason we did not get everything out */
38
39--
401.7.7.6
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0057-net-fix-proc-net-dev-regression.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0057-net-fix-proc-net-dev-regression.patch
new file mode 100644
index 00000000..369b0fad
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0057-net-fix-proc-net-dev-regression.patch
@@ -0,0 +1,185 @@
1From 83b74fb7bfab64f75ff56f20f3736c44b035c823 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Mon, 2 Apr 2012 22:33:02 +0000
4Subject: [PATCH 057/165] net: fix /proc/net/dev regression
5
6[ Upstream commit 2def16ae6b0c77571200f18ba4be049b03d75579 ]
7
8Commit f04565ddf52 (dev: use name hash for dev_seq_ops) added a second
9regression, as some devices are missing from /proc/net/dev if many
10devices are defined.
11
12When seq_file buffer is filled, the last ->next/show() method is
13canceled (pos value is reverted to value prior ->next() call)
14
15Problem is after above commit, we dont restart the lookup at right
16position in ->start() method.
17
18Fix this by removing the internal 'pos' pointer added in commit, since
19we need to use the 'loff_t *pos' provided by seq_file layer.
20
21This also reverts commit 5cac98dd0 (net: Fix corruption
22in /proc/*/net/dev_mcast), since its not needed anymore.
23
24Reported-by: Ben Greear <greearb@candelatech.com>
25Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
26Cc: Mihai Maruseac <mmaruseac@ixiacom.com>
27Tested-by: Ben Greear <greearb@candelatech.com>
28Signed-off-by: David S. Miller <davem@davemloft.net>
29Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
30---
31 include/linux/netdevice.h | 2 -
32 net/core/dev.c | 58 ++++++++++----------------------------------
33 net/core/dev_addr_lists.c | 3 +-
34 3 files changed, 15 insertions(+), 48 deletions(-)
35
36diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
37index a82ad4d..cbeb586 100644
38--- a/include/linux/netdevice.h
39+++ b/include/linux/netdevice.h
40@@ -2536,8 +2536,6 @@ extern void net_disable_timestamp(void);
41 extern void *dev_seq_start(struct seq_file *seq, loff_t *pos);
42 extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos);
43 extern void dev_seq_stop(struct seq_file *seq, void *v);
44-extern int dev_seq_open_ops(struct inode *inode, struct file *file,
45- const struct seq_operations *ops);
46 #endif
47
48 extern int netdev_class_create_file(struct class_attribute *class_attr);
49diff --git a/net/core/dev.c b/net/core/dev.c
50index 55cd370..cd5050e 100644
51--- a/net/core/dev.c
52+++ b/net/core/dev.c
53@@ -4102,54 +4102,41 @@ static int dev_ifconf(struct net *net, char __user *arg)
54
55 #ifdef CONFIG_PROC_FS
56
57-#define BUCKET_SPACE (32 - NETDEV_HASHBITS)
58-
59-struct dev_iter_state {
60- struct seq_net_private p;
61- unsigned int pos; /* bucket << BUCKET_SPACE + offset */
62-};
63+#define BUCKET_SPACE (32 - NETDEV_HASHBITS - 1)
64
65 #define get_bucket(x) ((x) >> BUCKET_SPACE)
66 #define get_offset(x) ((x) & ((1 << BUCKET_SPACE) - 1))
67 #define set_bucket_offset(b, o) ((b) << BUCKET_SPACE | (o))
68
69-static inline struct net_device *dev_from_same_bucket(struct seq_file *seq)
70+static inline struct net_device *dev_from_same_bucket(struct seq_file *seq, loff_t *pos)
71 {
72- struct dev_iter_state *state = seq->private;
73 struct net *net = seq_file_net(seq);
74 struct net_device *dev;
75 struct hlist_node *p;
76 struct hlist_head *h;
77- unsigned int count, bucket, offset;
78+ unsigned int count = 0, offset = get_offset(*pos);
79
80- bucket = get_bucket(state->pos);
81- offset = get_offset(state->pos);
82- h = &net->dev_name_head[bucket];
83- count = 0;
84+ h = &net->dev_name_head[get_bucket(*pos)];
85 hlist_for_each_entry_rcu(dev, p, h, name_hlist) {
86- if (count++ == offset) {
87- state->pos = set_bucket_offset(bucket, count);
88+ if (++count == offset)
89 return dev;
90- }
91 }
92
93 return NULL;
94 }
95
96-static inline struct net_device *dev_from_new_bucket(struct seq_file *seq)
97+static inline struct net_device *dev_from_bucket(struct seq_file *seq, loff_t *pos)
98 {
99- struct dev_iter_state *state = seq->private;
100 struct net_device *dev;
101 unsigned int bucket;
102
103- bucket = get_bucket(state->pos);
104 do {
105- dev = dev_from_same_bucket(seq);
106+ dev = dev_from_same_bucket(seq, pos);
107 if (dev)
108 return dev;
109
110- bucket++;
111- state->pos = set_bucket_offset(bucket, 0);
112+ bucket = get_bucket(*pos) + 1;
113+ *pos = set_bucket_offset(bucket, 1);
114 } while (bucket < NETDEV_HASHENTRIES);
115
116 return NULL;
117@@ -4162,33 +4149,20 @@ static inline struct net_device *dev_from_new_bucket(struct seq_file *seq)
118 void *dev_seq_start(struct seq_file *seq, loff_t *pos)
119 __acquires(RCU)
120 {
121- struct dev_iter_state *state = seq->private;
122-
123 rcu_read_lock();
124 if (!*pos)
125 return SEQ_START_TOKEN;
126
127- /* check for end of the hash */
128- if (state->pos == 0 && *pos > 1)
129+ if (get_bucket(*pos) >= NETDEV_HASHENTRIES)
130 return NULL;
131
132- return dev_from_new_bucket(seq);
133+ return dev_from_bucket(seq, pos);
134 }
135
136 void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
137 {
138- struct net_device *dev;
139-
140 ++*pos;
141-
142- if (v == SEQ_START_TOKEN)
143- return dev_from_new_bucket(seq);
144-
145- dev = dev_from_same_bucket(seq);
146- if (dev)
147- return dev;
148-
149- return dev_from_new_bucket(seq);
150+ return dev_from_bucket(seq, pos);
151 }
152
153 void dev_seq_stop(struct seq_file *seq, void *v)
154@@ -4287,13 +4261,7 @@ static const struct seq_operations dev_seq_ops = {
155 static int dev_seq_open(struct inode *inode, struct file *file)
156 {
157 return seq_open_net(inode, file, &dev_seq_ops,
158- sizeof(struct dev_iter_state));
159-}
160-
161-int dev_seq_open_ops(struct inode *inode, struct file *file,
162- const struct seq_operations *ops)
163-{
164- return seq_open_net(inode, file, ops, sizeof(struct dev_iter_state));
165+ sizeof(struct seq_net_private));
166 }
167
168 static const struct file_operations dev_seq_fops = {
169diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c
170index febba51..277faef 100644
171--- a/net/core/dev_addr_lists.c
172+++ b/net/core/dev_addr_lists.c
173@@ -696,7 +696,8 @@ static const struct seq_operations dev_mc_seq_ops = {
174
175 static int dev_mc_seq_open(struct inode *inode, struct file *file)
176 {
177- return dev_seq_open_ops(inode, file, &dev_mc_seq_ops);
178+ return seq_open_net(inode, file, &dev_mc_seq_ops,
179+ sizeof(struct seq_net_private));
180 }
181
182 static const struct file_operations dev_mc_seq_fops = {
183--
1841.7.7.6
185
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0058-nfsd-don-t-fail-unchecked-creates-of-non-special-fil.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0058-nfsd-don-t-fail-unchecked-creates-of-non-special-fil.patch
new file mode 100644
index 00000000..1eb56e69
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0058-nfsd-don-t-fail-unchecked-creates-of-non-special-fil.patch
@@ -0,0 +1,75 @@
1From 5a9807ef2e73be0be4b878dbec1691f91d875585 Mon Sep 17 00:00:00 2001
2From: "J. Bruce Fields" <bfields@redhat.com>
3Date: Mon, 9 Apr 2012 18:06:49 -0400
4Subject: [PATCH 058/165] nfsd: don't fail unchecked creates of non-special
5 files
6
7commit 9dc4e6c4d1182d34604ea40fef641775f5b15456 upstream.
8
9Allow a v3 unchecked open of a non-regular file succeed as if it were a
10lookup; typically a client in such a case will want to fall back on a
11local open, so succeeding and giving it the filehandle is more useful
12than failing with nfserr_exist, which makes it appear that nothing at
13all exists by that name.
14
15Similarly for v4, on an open-create, return the same errors we would on
16an attempt to open a non-regular file, instead of returning
17nfserr_exist.
18
19This fixes a problem found doing a v4 open of a symlink with
20O_RDONLY|O_CREAT, which resulted in the current client returning EEXIST.
21
22Thanks also to Trond for analysis.
23
24Reported-by: Orion Poplawski <orion@cora.nwra.com>
25Tested-by: Orion Poplawski <orion@cora.nwra.com>
26Signed-off-by: J. Bruce Fields <bfields@redhat.com>
27[bwh: Backported to 3.2: use &resfh, not resfh]
28Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
29---
30 fs/nfsd/nfs4proc.c | 8 ++++----
31 fs/nfsd/vfs.c | 2 +-
32 2 files changed, 5 insertions(+), 5 deletions(-)
33
34diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
35index 35840aa..b8c5538 100644
36--- a/fs/nfsd/nfs4proc.c
37+++ b/fs/nfsd/nfs4proc.c
38@@ -231,17 +231,17 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o
39 */
40 if (open->op_createmode == NFS4_CREATE_EXCLUSIVE && status == 0)
41 open->op_bmval[1] = (FATTR4_WORD1_TIME_ACCESS |
42- FATTR4_WORD1_TIME_MODIFY);
43+ FATTR4_WORD1_TIME_MODIFY);
44 } else {
45 status = nfsd_lookup(rqstp, current_fh,
46 open->op_fname.data, open->op_fname.len, &resfh);
47 fh_unlock(current_fh);
48- if (status)
49- goto out;
50- status = nfsd_check_obj_isreg(&resfh);
51 }
52 if (status)
53 goto out;
54+ status = nfsd_check_obj_isreg(&resfh);
55+ if (status)
56+ goto out;
57
58 if (is_create_with_attrs(open) && open->op_acl != NULL)
59 do_set_nfs4_acl(rqstp, &resfh, open->op_acl, open->op_bmval);
60diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
61index 7a2e442..5c3cd82 100644
62--- a/fs/nfsd/vfs.c
63+++ b/fs/nfsd/vfs.c
64@@ -1439,7 +1439,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
65 switch (createmode) {
66 case NFS3_CREATE_UNCHECKED:
67 if (! S_ISREG(dchild->d_inode->i_mode))
68- err = nfserr_exist;
69+ goto out;
70 else if (truncp) {
71 /* in nfsv4, we need to treat this case a little
72 * differently. we don't want to truncate the
73--
741.7.7.6
75
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0059-ppp-Don-t-stop-and-restart-queue-on-every-TX-packet.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0059-ppp-Don-t-stop-and-restart-queue-on-every-TX-packet.patch
new file mode 100644
index 00000000..4e154ad6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0059-ppp-Don-t-stop-and-restart-queue-on-every-TX-packet.patch
@@ -0,0 +1,65 @@
1From 8d46ef3ec21fd542ad3165d165a6db90427e61d8 Mon Sep 17 00:00:00 2001
2From: David Woodhouse <David.Woodhouse@intel.com>
3Date: Tue, 24 Apr 2012 22:09:47 -0400
4Subject: [PATCH 059/165] ppp: Don't stop and restart queue on every TX packet
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9[ This combines upstream commit
10 e675f0cc9a872fd152edc0c77acfed19bf28b81e and follow-on bug fix
11 commit 9a5d2bd99e0dfe9a31b3c160073ac445ba3d773f ]
12
13For every transmitted packet, ppp_start_xmit() will stop the netdev
14queue and then, if appropriate, restart it. This causes the TX softirq
15to run, entirely gratuitously.
16
17This is "only" a waste of CPU time in the normal case, but it's actively
18harmful when the PPP device is a TEQL slave — the wakeup will cause the
19offending device to receive the next TX packet from the TEQL queue, when
20it *should* have gone to the next slave in the list. We end up seeing
21large bursts of packets on just *one* slave device, rather than using
22the full available bandwidth over all slaves.
23
24This patch fixes the problem by *not* unconditionally stopping the queue
25in ppp_start_xmit(). It adds a return value from ppp_xmit_process()
26which indicates whether the queue should be stopped or not.
27
28It *doesn't* remove the call to netif_wake_queue() from
29ppp_xmit_process(), because other code paths (especially from
30ppp_output_wakeup()) need it there and it's messy to push it out to the
31other callers to do it based on the return value. So we leave it in
32place — it's a no-op in the case where the queue wasn't stopped, so it's
33harmless in the TX path.
34
35Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
36Signed-off-by: David S. Miller <davem@davemloft.net>
37Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
38---
39 drivers/net/ppp/ppp_generic.c | 3 ++-
40 1 files changed, 2 insertions(+), 1 deletions(-)
41
42diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
43index 486b404..3ed983c 100644
44--- a/drivers/net/ppp/ppp_generic.c
45+++ b/drivers/net/ppp/ppp_generic.c
46@@ -968,7 +968,6 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
47 proto = npindex_to_proto[npi];
48 put_unaligned_be16(proto, pp);
49
50- netif_stop_queue(dev);
51 skb_queue_tail(&ppp->file.xq, skb);
52 ppp_xmit_process(ppp);
53 return NETDEV_TX_OK;
54@@ -1063,6 +1062,8 @@ ppp_xmit_process(struct ppp *ppp)
55 code that we can accept some more. */
56 if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq))
57 netif_wake_queue(ppp->dev);
58+ else
59+ netif_stop_queue(ppp->dev);
60 }
61 ppp_xmit_unlock(ppp);
62 }
63--
641.7.7.6
65
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0060-tcp-allow-splice-to-build-full-TSO-packets.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0060-tcp-allow-splice-to-build-full-TSO-packets.patch
new file mode 100644
index 00000000..ab1c6122
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0060-tcp-allow-splice-to-build-full-TSO-packets.patch
@@ -0,0 +1,129 @@
1From 2d09c2df4957a8d73ea24c4464ad6942efedf590 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Tue, 24 Apr 2012 22:12:06 -0400
4Subject: [PATCH 060/165] tcp: allow splice() to build full TSO packets
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9[ This combines upstream commit
10 2f53384424251c06038ae612e56231b96ab610ee and the follow-on bug fix
11 commit 35f9c09fe9c72eb8ca2b8e89a593e1c151f28fc2 ]
12
13vmsplice()/splice(pipe, socket) call do_tcp_sendpages() one page at a
14time, adding at most 4096 bytes to an skb. (assuming PAGE_SIZE=4096)
15
16The call to tcp_push() at the end of do_tcp_sendpages() forces an
17immediate xmit when pipe is not already filled, and tso_fragment() try
18to split these skb to MSS multiples.
19
204096 bytes are usually split in a skb with 2 MSS, and a remaining
21sub-mss skb (assuming MTU=1500)
22
23This makes slow start suboptimal because many small frames are sent to
24qdisc/driver layers instead of big ones (constrained by cwnd and packets
25in flight of course)
26
27In fact, applications using sendmsg() (adding an additional memory copy)
28instead of vmsplice()/splice()/sendfile() are a bit faster because of
29this anomaly, especially if serving small files in environments with
30large initial [c]wnd.
31
32Call tcp_push() only if MSG_MORE is not set in the flags parameter.
33
34This bit is automatically provided by splice() internals but for the
35last page, or on all pages if user specified SPLICE_F_MORE splice()
36flag.
37
38In some workloads, this can reduce number of sent logical packets by an
39order of magnitude, making zero-copy TCP actually faster than
40one-copy :)
41
42Reported-by: Tom Herbert <therbert@google.com>
43Cc: Nandita Dukkipati <nanditad@google.com>
44Cc: Neal Cardwell <ncardwell@google.com>
45Cc: Tom Herbert <therbert@google.com>
46Cc: Yuchung Cheng <ycheng@google.com>
47Cc: H.K. Jerry Chu <hkchu@google.com>
48Cc: Maciej Żenczykowski <maze@google.com>
49Cc: Mahesh Bandewar <maheshb@google.com>
50Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
51Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
52Signed-off-by: David S. Miller <davem@davemloft.net>
53Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
54---
55 fs/splice.c | 5 ++++-
56 include/linux/socket.h | 2 +-
57 net/ipv4/tcp.c | 2 +-
58 net/socket.c | 6 +++---
59 4 files changed, 9 insertions(+), 6 deletions(-)
60
61diff --git a/fs/splice.c b/fs/splice.c
62index fa2defa..6d0dfb8 100644
63--- a/fs/splice.c
64+++ b/fs/splice.c
65@@ -31,6 +31,7 @@
66 #include <linux/uio.h>
67 #include <linux/security.h>
68 #include <linux/gfp.h>
69+#include <linux/socket.h>
70
71 /*
72 * Attempt to steal a page from a pipe buffer. This should perhaps go into
73@@ -691,7 +692,9 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,
74 if (!likely(file->f_op && file->f_op->sendpage))
75 return -EINVAL;
76
77- more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;
78+ more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0;
79+ if (sd->len < sd->total_len)
80+ more |= MSG_SENDPAGE_NOTLAST;
81 return file->f_op->sendpage(file, buf->page, buf->offset,
82 sd->len, &pos, more);
83 }
84diff --git a/include/linux/socket.h b/include/linux/socket.h
85index d0e77f6..ad919e0 100644
86--- a/include/linux/socket.h
87+++ b/include/linux/socket.h
88@@ -265,7 +265,7 @@ struct ucred {
89 #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */
90 #define MSG_MORE 0x8000 /* Sender will send more */
91 #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */
92-
93+#define MSG_SENDPAGE_NOTLAST 0x20000 /* sendpage() internal : not the last page */
94 #define MSG_EOF MSG_FIN
95
96 #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file
97diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
98index 34f5db1..36611ab 100644
99--- a/net/ipv4/tcp.c
100+++ b/net/ipv4/tcp.c
101@@ -860,7 +860,7 @@ wait_for_memory:
102 }
103
104 out:
105- if (copied)
106+ if (copied && !(flags & MSG_SENDPAGE_NOTLAST))
107 tcp_push(sk, flags, mss_now, tp->nonagle);
108 return copied;
109
110diff --git a/net/socket.c b/net/socket.c
111index 2dce67a..273cbce 100644
112--- a/net/socket.c
113+++ b/net/socket.c
114@@ -791,9 +791,9 @@ static ssize_t sock_sendpage(struct file *file, struct page *page,
115
116 sock = file->private_data;
117
118- flags = !(file->f_flags & O_NONBLOCK) ? 0 : MSG_DONTWAIT;
119- if (more)
120- flags |= MSG_MORE;
121+ flags = (file->f_flags & O_NONBLOCK) ? MSG_DONTWAIT : 0;
122+ /* more is a combination of MSG_MORE and MSG_SENDPAGE_NOTLAST */
123+ flags |= more;
124
125 return kernel_sendpage(sock, page, offset, size, flags);
126 }
127--
1281.7.7.6
129
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0061-sctp-Allow-struct-sctp_event_subscribe-to-grow-witho.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0061-sctp-Allow-struct-sctp_event_subscribe-to-grow-witho.patch
new file mode 100644
index 00000000..a322ca98
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0061-sctp-Allow-struct-sctp_event_subscribe-to-grow-witho.patch
@@ -0,0 +1,56 @@
1From 8dda68d22ab01e2780f80a6afb814387fb904aa2 Mon Sep 17 00:00:00 2001
2From: Thomas Graf <tgraf@infradead.org>
3Date: Tue, 3 Apr 2012 22:17:53 +0000
4Subject: [PATCH 061/165] sctp: Allow struct sctp_event_subscribe to grow
5 without breaking binaries
6
7[ Upstream commit acdd5985364f8dc511a0762fab2e683f29d9d692 ]
8
9getsockopt(..., SCTP_EVENTS, ...) performs a length check and returns
10an error if the user provides less bytes than the size of struct
11sctp_event_subscribe.
12
13Struct sctp_event_subscribe needs to be extended by an u8 for every
14new event or notification type that is added.
15
16This obviously makes getsockopt fail for binaries that are compiled
17against an older versions of <net/sctp/user.h> which do not contain
18all event types.
19
20This patch changes getsockopt behaviour to no longer return an error
21if not enough bytes are being provided by the user. Instead, it
22returns as much of sctp_event_subscribe as fits into the provided buffer.
23
24This leads to the new behavior that users see what they have been aware
25of at compile time.
26
27The setsockopt(..., SCTP_EVENTS, ...) API is already behaving like this.
28
29Signed-off-by: Thomas Graf <tgraf@suug.ch>
30Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
31Signed-off-by: David S. Miller <davem@davemloft.net>
32Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
33---
34 net/sctp/socket.c | 5 +++--
35 1 files changed, 3 insertions(+), 2 deletions(-)
36
37diff --git a/net/sctp/socket.c b/net/sctp/socket.c
38index 54a7cd2..0075554 100644
39--- a/net/sctp/socket.c
40+++ b/net/sctp/socket.c
41@@ -4133,9 +4133,10 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len,
42 static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
43 int __user *optlen)
44 {
45- if (len < sizeof(struct sctp_event_subscribe))
46+ if (len <= 0)
47 return -EINVAL;
48- len = sizeof(struct sctp_event_subscribe);
49+ if (len > sizeof(struct sctp_event_subscribe))
50+ len = sizeof(struct sctp_event_subscribe);
51 if (put_user(len, optlen))
52 return -EFAULT;
53 if (copy_to_user(optval, &sctp_sk(sk)->subscribe, len))
54--
551.7.7.6
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0062-bridge-Do-not-send-queries-on-multicast-group-leaves.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0062-bridge-Do-not-send-queries-on-multicast-group-leaves.patch
new file mode 100644
index 00000000..8fdd9461
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0062-bridge-Do-not-send-queries-on-multicast-group-leaves.patch
@@ -0,0 +1,199 @@
1From 9f8774d2e33d8c44b98e76db91cfc0d35b187f58 Mon Sep 17 00:00:00 2001
2From: Herbert Xu <herbert@gondor.apana.org.au>
3Date: Wed, 4 Apr 2012 01:01:20 +0000
4Subject: [PATCH 062/165] bridge: Do not send queries on multicast group
5 leaves
6
7[ Upstream commit 996304bbea3d2a094b7ba54c3bd65d3fffeac57b ]
8
9As it stands the bridge IGMP snooping system will respond to
10group leave messages with queries for remaining membership.
11This is both unnecessary and undesirable. First of all any
12multicast routers present should be doing this rather than us.
13What's more the queries that we send may end up upsetting other
14multicast snooping swithces in the system that are buggy.
15
16In fact, we can simply remove the code that send these queries
17because the existing membership expiry mechanism doesn't rely
18on them anyway.
19
20So this patch simply removes all code associated with group
21queries in response to group leave messages.
22
23Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
24Signed-off-by: David S. Miller <davem@davemloft.net>
25Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
26---
27 net/bridge/br_multicast.c | 81 ---------------------------------------------
28 net/bridge/br_private.h | 4 --
29 2 files changed, 0 insertions(+), 85 deletions(-)
30
31diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
32index 8eb6b15..5ac1811 100644
33--- a/net/bridge/br_multicast.c
34+++ b/net/bridge/br_multicast.c
35@@ -241,7 +241,6 @@ static void br_multicast_group_expired(unsigned long data)
36 hlist_del_rcu(&mp->hlist[mdb->ver]);
37 mdb->size--;
38
39- del_timer(&mp->query_timer);
40 call_rcu_bh(&mp->rcu, br_multicast_free_group);
41
42 out:
43@@ -271,7 +270,6 @@ static void br_multicast_del_pg(struct net_bridge *br,
44 rcu_assign_pointer(*pp, p->next);
45 hlist_del_init(&p->mglist);
46 del_timer(&p->timer);
47- del_timer(&p->query_timer);
48 call_rcu_bh(&p->rcu, br_multicast_free_pg);
49
50 if (!mp->ports && !mp->mglist &&
51@@ -507,74 +505,6 @@ static struct sk_buff *br_multicast_alloc_query(struct net_bridge *br,
52 return NULL;
53 }
54
55-static void br_multicast_send_group_query(struct net_bridge_mdb_entry *mp)
56-{
57- struct net_bridge *br = mp->br;
58- struct sk_buff *skb;
59-
60- skb = br_multicast_alloc_query(br, &mp->addr);
61- if (!skb)
62- goto timer;
63-
64- netif_rx(skb);
65-
66-timer:
67- if (++mp->queries_sent < br->multicast_last_member_count)
68- mod_timer(&mp->query_timer,
69- jiffies + br->multicast_last_member_interval);
70-}
71-
72-static void br_multicast_group_query_expired(unsigned long data)
73-{
74- struct net_bridge_mdb_entry *mp = (void *)data;
75- struct net_bridge *br = mp->br;
76-
77- spin_lock(&br->multicast_lock);
78- if (!netif_running(br->dev) || !mp->mglist ||
79- mp->queries_sent >= br->multicast_last_member_count)
80- goto out;
81-
82- br_multicast_send_group_query(mp);
83-
84-out:
85- spin_unlock(&br->multicast_lock);
86-}
87-
88-static void br_multicast_send_port_group_query(struct net_bridge_port_group *pg)
89-{
90- struct net_bridge_port *port = pg->port;
91- struct net_bridge *br = port->br;
92- struct sk_buff *skb;
93-
94- skb = br_multicast_alloc_query(br, &pg->addr);
95- if (!skb)
96- goto timer;
97-
98- br_deliver(port, skb);
99-
100-timer:
101- if (++pg->queries_sent < br->multicast_last_member_count)
102- mod_timer(&pg->query_timer,
103- jiffies + br->multicast_last_member_interval);
104-}
105-
106-static void br_multicast_port_group_query_expired(unsigned long data)
107-{
108- struct net_bridge_port_group *pg = (void *)data;
109- struct net_bridge_port *port = pg->port;
110- struct net_bridge *br = port->br;
111-
112- spin_lock(&br->multicast_lock);
113- if (!netif_running(br->dev) || hlist_unhashed(&pg->mglist) ||
114- pg->queries_sent >= br->multicast_last_member_count)
115- goto out;
116-
117- br_multicast_send_port_group_query(pg);
118-
119-out:
120- spin_unlock(&br->multicast_lock);
121-}
122-
123 static struct net_bridge_mdb_entry *br_multicast_get_group(
124 struct net_bridge *br, struct net_bridge_port *port,
125 struct br_ip *group, int hash)
126@@ -690,8 +620,6 @@ rehash:
127 mp->addr = *group;
128 setup_timer(&mp->timer, br_multicast_group_expired,
129 (unsigned long)mp);
130- setup_timer(&mp->query_timer, br_multicast_group_query_expired,
131- (unsigned long)mp);
132
133 hlist_add_head_rcu(&mp->hlist[mdb->ver], &mdb->mhash[hash]);
134 mdb->size++;
135@@ -746,8 +674,6 @@ static int br_multicast_add_group(struct net_bridge *br,
136 hlist_add_head(&p->mglist, &port->mglist);
137 setup_timer(&p->timer, br_multicast_port_group_expired,
138 (unsigned long)p);
139- setup_timer(&p->query_timer, br_multicast_port_group_query_expired,
140- (unsigned long)p);
141
142 rcu_assign_pointer(*pp, p);
143
144@@ -1291,9 +1217,6 @@ static void br_multicast_leave_group(struct net_bridge *br,
145 time_after(mp->timer.expires, time) :
146 try_to_del_timer_sync(&mp->timer) >= 0)) {
147 mod_timer(&mp->timer, time);
148-
149- mp->queries_sent = 0;
150- mod_timer(&mp->query_timer, now);
151 }
152
153 goto out;
154@@ -1310,9 +1233,6 @@ static void br_multicast_leave_group(struct net_bridge *br,
155 time_after(p->timer.expires, time) :
156 try_to_del_timer_sync(&p->timer) >= 0)) {
157 mod_timer(&p->timer, time);
158-
159- p->queries_sent = 0;
160- mod_timer(&p->query_timer, now);
161 }
162
163 break;
164@@ -1680,7 +1600,6 @@ void br_multicast_stop(struct net_bridge *br)
165 hlist_for_each_entry_safe(mp, p, n, &mdb->mhash[i],
166 hlist[ver]) {
167 del_timer(&mp->timer);
168- del_timer(&mp->query_timer);
169 call_rcu_bh(&mp->rcu, br_multicast_free_group);
170 }
171 }
172diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
173index d7d6fb0..93264df 100644
174--- a/net/bridge/br_private.h
175+++ b/net/bridge/br_private.h
176@@ -82,9 +82,7 @@ struct net_bridge_port_group {
177 struct hlist_node mglist;
178 struct rcu_head rcu;
179 struct timer_list timer;
180- struct timer_list query_timer;
181 struct br_ip addr;
182- u32 queries_sent;
183 };
184
185 struct net_bridge_mdb_entry
186@@ -94,10 +92,8 @@ struct net_bridge_mdb_entry
187 struct net_bridge_port_group __rcu *ports;
188 struct rcu_head rcu;
189 struct timer_list timer;
190- struct timer_list query_timer;
191 struct br_ip addr;
192 bool mglist;
193- u32 queries_sent;
194 };
195
196 struct net_bridge_mdb_htable
197--
1981.7.7.6
199
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0063-ipv6-fix-array-index-in-ip6_mc_add_src.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0063-ipv6-fix-array-index-in-ip6_mc_add_src.patch
new file mode 100644
index 00000000..afc26e46
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0063-ipv6-fix-array-index-in-ip6_mc_add_src.patch
@@ -0,0 +1,39 @@
1From dda800eb86fb88c28f63c0136cc76b1346322feb Mon Sep 17 00:00:00 2001
2From: "RongQing.Li" <roy.qing.li@gmail.com>
3Date: Wed, 4 Apr 2012 16:47:04 +0000
4Subject: [PATCH 063/165] ipv6: fix array index in ip6_mc_add_src()
5
6[ Upstream commit 78d50217baf36093ab320f95bae0d6452daec85c ]
7
8Convert array index from the loop bound to the loop index.
9
10And remove the void type conversion to ip6_mc_del1_src() return
11code, seem it is unnecessary, since ip6_mc_del1_src() does not
12use __must_check similar attribute, no compiler will report the
13warning when it is removed.
14
15v2: enrich the commit header
16
17Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 net/ipv6/mcast.c | 2 +-
22 1 files changed, 1 insertions(+), 1 deletions(-)
23
24diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
25index 2257366..f2d74ea 100644
26--- a/net/ipv6/mcast.c
27+++ b/net/ipv6/mcast.c
28@@ -2054,7 +2054,7 @@ static int ip6_mc_add_src(struct inet6_dev *idev, const struct in6_addr *pmca,
29 if (!delta)
30 pmc->mca_sfcount[sfmode]--;
31 for (j=0; j<i; j++)
32- (void) ip6_mc_del1_src(pmc, sfmode, &psfsrc[i]);
33+ ip6_mc_del1_src(pmc, sfmode, &psfsrc[j]);
34 } else if (isexclude != (pmc->mca_sfcount[MCAST_EXCLUDE] != 0)) {
35 struct ip6_sf_list *psf;
36
37--
381.7.7.6
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0064-phonet-Check-input-from-user-before-allocating.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0064-phonet-Check-input-from-user-before-allocating.patch
new file mode 100644
index 00000000..e6d6ac03
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0064-phonet-Check-input-from-user-before-allocating.patch
@@ -0,0 +1,78 @@
1From 636e8de47aae86650672a0065eb401e918544d34 Mon Sep 17 00:00:00 2001
2From: Sasha Levin <levinsasha928@gmail.com>
3Date: Thu, 5 Apr 2012 12:07:45 +0000
4Subject: [PATCH 064/165] phonet: Check input from user before allocating
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9[ Upstream commit bcf1b70ac6eb0ed8286c66e6bf37cb747cbaa04c ]
10
11A phonet packet is limited to USHRT_MAX bytes, this is never checked during
12tx which means that the user can specify any size he wishes, and the kernel
13will attempt to allocate that size.
14
15In the good case, it'll lead to the following warning, but it may also cause
16the kernel to kick in the OOM and kill a random task on the server.
17
18[ 8921.744094] WARNING: at mm/page_alloc.c:2255 __alloc_pages_slowpath+0x65/0x730()
19[ 8921.749770] Pid: 5081, comm: trinity Tainted: G W 3.4.0-rc1-next-20120402-sasha #46
20[ 8921.756672] Call Trace:
21[ 8921.758185] [<ffffffff810b2ba7>] warn_slowpath_common+0x87/0xb0
22[ 8921.762868] [<ffffffff810b2be5>] warn_slowpath_null+0x15/0x20
23[ 8921.765399] [<ffffffff8117eae5>] __alloc_pages_slowpath+0x65/0x730
24[ 8921.769226] [<ffffffff81179c8a>] ? zone_watermark_ok+0x1a/0x20
25[ 8921.771686] [<ffffffff8117d045>] ? get_page_from_freelist+0x625/0x660
26[ 8921.773919] [<ffffffff8117f3a8>] __alloc_pages_nodemask+0x1f8/0x240
27[ 8921.776248] [<ffffffff811c03e0>] kmalloc_large_node+0x70/0xc0
28[ 8921.778294] [<ffffffff811c4bd4>] __kmalloc_node_track_caller+0x34/0x1c0
29[ 8921.780847] [<ffffffff821b0e3c>] ? sock_alloc_send_pskb+0xbc/0x260
30[ 8921.783179] [<ffffffff821b3c65>] __alloc_skb+0x75/0x170
31[ 8921.784971] [<ffffffff821b0e3c>] sock_alloc_send_pskb+0xbc/0x260
32[ 8921.787111] [<ffffffff821b002e>] ? release_sock+0x7e/0x90
33[ 8921.788973] [<ffffffff821b0ff0>] sock_alloc_send_skb+0x10/0x20
34[ 8921.791052] [<ffffffff824cfc20>] pep_sendmsg+0x60/0x380
35[ 8921.792931] [<ffffffff824cb4a6>] ? pn_socket_bind+0x156/0x180
36[ 8921.794917] [<ffffffff824cb50f>] ? pn_socket_autobind+0x3f/0x90
37[ 8921.797053] [<ffffffff824cb63f>] pn_socket_sendmsg+0x4f/0x70
38[ 8921.798992] [<ffffffff821ab8e7>] sock_aio_write+0x187/0x1b0
39[ 8921.801395] [<ffffffff810e325e>] ? sub_preempt_count+0xae/0xf0
40[ 8921.803501] [<ffffffff8111842c>] ? __lock_acquire+0x42c/0x4b0
41[ 8921.805505] [<ffffffff821ab760>] ? __sock_recv_ts_and_drops+0x140/0x140
42[ 8921.807860] [<ffffffff811e07cc>] do_sync_readv_writev+0xbc/0x110
43[ 8921.809986] [<ffffffff811958e7>] ? might_fault+0x97/0xa0
44[ 8921.811998] [<ffffffff817bd99e>] ? security_file_permission+0x1e/0x90
45[ 8921.814595] [<ffffffff811e17e2>] do_readv_writev+0xe2/0x1e0
46[ 8921.816702] [<ffffffff810b8dac>] ? do_setitimer+0x1ac/0x200
47[ 8921.818819] [<ffffffff810e2ec1>] ? get_parent_ip+0x11/0x50
48[ 8921.820863] [<ffffffff810e325e>] ? sub_preempt_count+0xae/0xf0
49[ 8921.823318] [<ffffffff811e1926>] vfs_writev+0x46/0x60
50[ 8921.825219] [<ffffffff811e1a3f>] sys_writev+0x4f/0xb0
51[ 8921.827127] [<ffffffff82658039>] system_call_fastpath+0x16/0x1b
52[ 8921.829384] ---[ end trace dffe390f30db9eb7 ]---
53
54Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
55Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
56Signed-off-by: David S. Miller <davem@davemloft.net>
57Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
58---
59 net/phonet/pep.c | 3 +++
60 1 files changed, 3 insertions(+), 0 deletions(-)
61
62diff --git a/net/phonet/pep.c b/net/phonet/pep.c
63index 2ba6e9f..007546d 100644
64--- a/net/phonet/pep.c
65+++ b/net/phonet/pep.c
66@@ -1046,6 +1046,9 @@ static int pep_sendmsg(struct kiocb *iocb, struct sock *sk,
67 int flags = msg->msg_flags;
68 int err, done;
69
70+ if (len > USHRT_MAX)
71+ return -EMSGSIZE;
72+
73 if ((msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL|
74 MSG_CMSG_COMPAT)) ||
75 !(msg->msg_flags & MSG_EOR))
76--
771.7.7.6
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0065-bonding-properly-unset-current_arp_slave-on-slave-li.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0065-bonding-properly-unset-current_arp_slave-on-slave-li.patch
new file mode 100644
index 00000000..74876f67
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0065-bonding-properly-unset-current_arp_slave-on-slave-li.patch
@@ -0,0 +1,45 @@
1From 1413698b8d47c7fb2783cafd906ac1db9b1723d7 Mon Sep 17 00:00:00 2001
2From: Veaceslav Falico <vfalico@redhat.com>
3Date: Thu, 5 Apr 2012 03:47:43 +0000
4Subject: [PATCH 065/165] bonding: properly unset current_arp_slave on slave
5 link up
6
7[ Upstream commit 5a4309746cd74734daa964acb02690c22b3c8911 ]
8
9When a slave comes up, we're unsetting the current_arp_slave without
10removing active flags from it, which can lead to situations where we have
11more than one slave with active flags in active-backup mode.
12
13To avoid this situation we must remove the active flags from a slave before
14removing it as a current_arp_slave.
15
16Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
17Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
18Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
19Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/net/bonding/bond_main.c | 6 +++++-
24 1 files changed, 5 insertions(+), 1 deletions(-)
25
26diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
27index e58aa2b..f65e0b9 100644
28--- a/drivers/net/bonding/bond_main.c
29+++ b/drivers/net/bonding/bond_main.c
30@@ -2982,7 +2982,11 @@ static void bond_ab_arp_commit(struct bonding *bond, int delta_in_ticks)
31 trans_start + delta_in_ticks)) ||
32 bond->curr_active_slave != slave) {
33 slave->link = BOND_LINK_UP;
34- bond->current_arp_slave = NULL;
35+ if (bond->current_arp_slave) {
36+ bond_set_slave_inactive_flags(
37+ bond->current_arp_slave);
38+ bond->current_arp_slave = NULL;
39+ }
40
41 pr_info("%s: link status definitely up for interface %s.\n",
42 bond->dev->name, slave->dev->name);
43--
441.7.7.6
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0066-wimax-i2400m-prevent-a-possible-kernel-bug-due-to-mi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0066-wimax-i2400m-prevent-a-possible-kernel-bug-due-to-mi.patch
new file mode 100644
index 00000000..7e6a8eee
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0066-wimax-i2400m-prevent-a-possible-kernel-bug-due-to-mi.patch
@@ -0,0 +1,37 @@
1From 5454ccf43f7636614fc378283890bf911c2e2058 Mon Sep 17 00:00:00 2001
2From: Phil Sutter <phil.sutter@viprinet.com>
3Date: Mon, 26 Mar 2012 09:01:30 +0000
4Subject: [PATCH 066/165] wimax: i2400m - prevent a possible kernel bug due to
5 missing fw_name string
6
7[ Upstream commit 4eee6a3a04e8bb53fbe7de0f64d0524d3fbe3f80 ]
8
9This happened on a machine with a custom hotplug script calling nameif,
10probably due to slow firmware loading. At the time nameif uses ethtool
11to gather interface information, i2400m->fw_name is zero and so a null
12pointer dereference occurs from within i2400m_get_drvinfo().
13
14Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/net/wimax/i2400m/netdev.c | 3 ++-
19 1 files changed, 2 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c
22index 64a1106..4697cf3 100644
23--- a/drivers/net/wimax/i2400m/netdev.c
24+++ b/drivers/net/wimax/i2400m/netdev.c
25@@ -607,7 +607,8 @@ static void i2400m_get_drvinfo(struct net_device *net_dev,
26 struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
27
28 strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver) - 1);
29- strncpy(info->fw_version, i2400m->fw_name, sizeof(info->fw_version) - 1);
30+ strncpy(info->fw_version,
31+ i2400m->fw_name ? : "", sizeof(info->fw_version) - 1);
32 if (net_dev->dev.parent)
33 strncpy(info->bus_info, dev_name(net_dev->dev.parent),
34 sizeof(info->bus_info) - 1);
35--
361.7.7.6
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0067-netlink-fix-races-after-skb-queueing.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0067-netlink-fix-races-after-skb-queueing.patch
new file mode 100644
index 00000000..a7ee423c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0067-netlink-fix-races-after-skb-queueing.patch
@@ -0,0 +1,82 @@
1From 0f7eb8a3cb853edf31ec23d26623b195603814b2 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Thu, 5 Apr 2012 22:17:46 +0000
4Subject: [PATCH 067/165] netlink: fix races after skb queueing
5
6[ Upstream commit 4a7e7c2ad540e54c75489a70137bf0ec15d3a127 ]
7
8As soon as an skb is queued into socket receive_queue, another thread
9can consume it, so we are not allowed to reference skb anymore, or risk
10use after free.
11
12Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
13Signed-off-by: David S. Miller <davem@davemloft.net>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 net/netlink/af_netlink.c | 24 +++++++++++++-----------
17 1 files changed, 13 insertions(+), 11 deletions(-)
18
19diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
20index 1201b6d..a99fb41 100644
21--- a/net/netlink/af_netlink.c
22+++ b/net/netlink/af_netlink.c
23@@ -830,12 +830,19 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
24 return 0;
25 }
26
27-int netlink_sendskb(struct sock *sk, struct sk_buff *skb)
28+static int __netlink_sendskb(struct sock *sk, struct sk_buff *skb)
29 {
30 int len = skb->len;
31
32 skb_queue_tail(&sk->sk_receive_queue, skb);
33 sk->sk_data_ready(sk, len);
34+ return len;
35+}
36+
37+int netlink_sendskb(struct sock *sk, struct sk_buff *skb)
38+{
39+ int len = __netlink_sendskb(sk, skb);
40+
41 sock_put(sk);
42 return len;
43 }
44@@ -960,8 +967,7 @@ static inline int netlink_broadcast_deliver(struct sock *sk,
45 if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf &&
46 !test_bit(0, &nlk->state)) {
47 skb_set_owner_r(skb, sk);
48- skb_queue_tail(&sk->sk_receive_queue, skb);
49- sk->sk_data_ready(sk, skb->len);
50+ __netlink_sendskb(sk, skb);
51 return atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf;
52 }
53 return -1;
54@@ -1684,10 +1690,8 @@ static int netlink_dump(struct sock *sk)
55
56 if (sk_filter(sk, skb))
57 kfree_skb(skb);
58- else {
59- skb_queue_tail(&sk->sk_receive_queue, skb);
60- sk->sk_data_ready(sk, skb->len);
61- }
62+ else
63+ __netlink_sendskb(sk, skb);
64 return 0;
65 }
66
67@@ -1701,10 +1705,8 @@ static int netlink_dump(struct sock *sk)
68
69 if (sk_filter(sk, skb))
70 kfree_skb(skb);
71- else {
72- skb_queue_tail(&sk->sk_receive_queue, skb);
73- sk->sk_data_ready(sk, skb->len);
74- }
75+ else
76+ __netlink_sendskb(sk, skb);
77
78 if (cb->done)
79 cb->done(cb);
80--
811.7.7.6
82
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0068-net-fix-a-race-in-sock_queue_err_skb.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0068-net-fix-a-race-in-sock_queue_err_skb.patch
new file mode 100644
index 00000000..94cfa00f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0068-net-fix-a-race-in-sock_queue_err_skb.patch
@@ -0,0 +1,43 @@
1From 86e0251999e198af9ae73f58db4d5689f14862ec Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Fri, 6 Apr 2012 10:49:10 +0200
4Subject: [PATCH 068/165] net: fix a race in sock_queue_err_skb()
5
6[ Upstream commit 110c43304db6f06490961529536c362d9ac5732f ]
7
8As soon as an skb is queued into socket error queue, another thread
9can consume it, so we are not allowed to reference skb anymore, or risk
10use after free.
11
12Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
13Signed-off-by: David S. Miller <davem@davemloft.net>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 net/core/skbuff.c | 4 +++-
17 1 files changed, 3 insertions(+), 1 deletions(-)
18
19diff --git a/net/core/skbuff.c b/net/core/skbuff.c
20index 3c30ee4..29cb392 100644
21--- a/net/core/skbuff.c
22+++ b/net/core/skbuff.c
23@@ -3111,6 +3111,8 @@ static void sock_rmem_free(struct sk_buff *skb)
24 */
25 int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)
26 {
27+ int len = skb->len;
28+
29 if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
30 (unsigned)sk->sk_rcvbuf)
31 return -ENOMEM;
32@@ -3125,7 +3127,7 @@ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)
33
34 skb_queue_tail(&sk->sk_error_queue, skb);
35 if (!sock_flag(sk, SOCK_DEAD))
36- sk->sk_data_ready(sk, skb->len);
37+ sk->sk_data_ready(sk, len);
38 return 0;
39 }
40 EXPORT_SYMBOL(sock_queue_err_skb);
41--
421.7.7.6
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0069-tcp-fix-tcp_rcv_rtt_update-use-of-an-unscaled-RTT-sa.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0069-tcp-fix-tcp_rcv_rtt_update-use-of-an-unscaled-RTT-sa.patch
new file mode 100644
index 00000000..db29f8de
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0069-tcp-fix-tcp_rcv_rtt_update-use-of-an-unscaled-RTT-sa.patch
@@ -0,0 +1,50 @@
1From e371feec366591f88fd4df14f701359bd08d33e7 Mon Sep 17 00:00:00 2001
2From: Neal Cardwell <ncardwell@google.com>
3Date: Tue, 10 Apr 2012 07:59:20 +0000
4Subject: [PATCH 069/165] tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT
5 sample
6
7[ Upstream commit 18a223e0b9ec8979320ba364b47c9772391d6d05 ]
8
9Fix a code path in tcp_rcv_rtt_update() that was comparing scaled and
10unscaled RTT samples.
11
12The intent in the code was to only use the 'm' measurement if it was a
13new minimum. However, since 'm' had not yet been shifted left 3 bits
14but 'new_sample' had, this comparison would nearly always succeed,
15leading us to erroneously set our receive-side RTT estimate to the 'm'
16sample when that sample could be nearly 8x too high to use.
17
18The overall effect is to often cause the receive-side RTT estimate to
19be significantly too large (up to 40% too large for brief periods in
20my tests).
21
22Signed-off-by: Neal Cardwell <ncardwell@google.com>
23Acked-by: Eric Dumazet <edumazet@google.com>
24Signed-off-by: David S. Miller <davem@davemloft.net>
25Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
26---
27 net/ipv4/tcp_input.c | 7 +++++--
28 1 files changed, 5 insertions(+), 2 deletions(-)
29
30diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
31index e4d1e4a..4c46fa7 100644
32--- a/net/ipv4/tcp_input.c
33+++ b/net/ipv4/tcp_input.c
34@@ -473,8 +473,11 @@ static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep)
35 if (!win_dep) {
36 m -= (new_sample >> 3);
37 new_sample += m;
38- } else if (m < new_sample)
39- new_sample = m << 3;
40+ } else {
41+ m <<= 3;
42+ if (m < new_sample)
43+ new_sample = m;
44+ }
45 } else {
46 /* No previous measure. */
47 new_sample = m << 3;
48--
491.7.7.6
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0070-net-allow-pskb_expand_head-to-get-maximum-tailroom.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0070-net-allow-pskb_expand_head-to-get-maximum-tailroom.patch
new file mode 100644
index 00000000..822c589a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0070-net-allow-pskb_expand_head-to-get-maximum-tailroom.patch
@@ -0,0 +1,48 @@
1From 03bdfc1371ae4ad8b2bbe50475baa6d983f62511 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Tue, 10 Apr 2012 20:08:39 +0000
4Subject: [PATCH 070/165] net: allow pskb_expand_head() to get maximum
5 tailroom
6
7[ Upstream commit 87151b8689d890dfb495081f7be9b9e257f7a2df ]
8
9Marc Merlin reported many order-1 allocations failures in TX path on its
10wireless setup, that dont make any sense with MTU=1500 network, and non
11SG capable hardware.
12
13Turns out part of the problem comes from pskb_expand_head() not using
14ksize() to get exact head size given by kmalloc(). Doing the same thing
15than __alloc_skb() allows more tailroom in skb and can prevent future
16reallocations.
17
18As a bonus, struct skb_shared_info becomes cache line aligned.
19
20Reported-by: Marc MERLIN <marc@merlins.org>
21Tested-by: Marc MERLIN <marc@merlins.org>
22Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
23Signed-off-by: David S. Miller <davem@davemloft.net>
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 net/core/skbuff.c | 4 +++-
27 1 files changed, 3 insertions(+), 1 deletions(-)
28
29diff --git a/net/core/skbuff.c b/net/core/skbuff.c
30index 29cb392..2ec200de 100644
31--- a/net/core/skbuff.c
32+++ b/net/core/skbuff.c
33@@ -903,9 +903,11 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
34 goto adjust_others;
35 }
36
37- data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask);
38+ data = kmalloc(size + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
39+ gfp_mask);
40 if (!data)
41 goto nodata;
42+ size = SKB_WITH_OVERHEAD(ksize(data));
43
44 /* Copy only real data... and, alas, header. This should be
45 * optimized for the cases when header is void.
46--
471.7.7.6
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0071-tcp-fix-tcp_trim_head.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0071-tcp-fix-tcp_trim_head.patch
new file mode 100644
index 00000000..da267d22
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0071-tcp-fix-tcp_trim_head.patch
@@ -0,0 +1,57 @@
1From 137530e7322e536a814836856ef12183cd786e5f Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Sun, 4 Dec 2011 08:51:08 +0000
4Subject: [PATCH 071/165] tcp: fix tcp_trim_head()
5
6[ Upstream commit 4fa48bf3c75069d636fc8830743c929a062e80dc ]
7
8commit f07d960df3 (tcp: avoid frag allocation for small frames)
9breaked assumption in tcp stack that skb is either linear (skb->data_len
10== 0), or fully fragged (skb->data_len == skb->len)
11
12tcp_trim_head() made this assumption, we must fix it.
13
14Thanks to Vijay for providing a very detailed explanation.
15
16Reported-by: Vijay Subramanian <subramanian.vijay@gmail.com>
17Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 net/ipv4/tcp_output.c | 13 ++++++++-----
22 1 files changed, 8 insertions(+), 5 deletions(-)
23
24diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
25index 097e0c7..7413437 100644
26--- a/net/ipv4/tcp_output.c
27+++ b/net/ipv4/tcp_output.c
28@@ -1093,6 +1093,13 @@ static void __pskb_trim_head(struct sk_buff *skb, int len)
29 {
30 int i, k, eat;
31
32+ eat = min_t(int, len, skb_headlen(skb));
33+ if (eat) {
34+ __skb_pull(skb, eat);
35+ len -= eat;
36+ if (!len)
37+ return;
38+ }
39 eat = len;
40 k = 0;
41 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
42@@ -1124,11 +1131,7 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len)
43 if (skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
44 return -ENOMEM;
45
46- /* If len == headlen, we avoid __skb_pull to preserve alignment. */
47- if (unlikely(len < skb_headlen(skb)))
48- __skb_pull(skb, len);
49- else
50- __pskb_trim_head(skb, len - skb_headlen(skb));
51+ __pskb_trim_head(skb, len);
52
53 TCP_SKB_CB(skb)->seq += len;
54 skb->ip_summed = CHECKSUM_PARTIAL;
55--
561.7.7.6
57
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0072-tcp-avoid-order-1-allocations-on-wifi-and-tx-path.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0072-tcp-avoid-order-1-allocations-on-wifi-and-tx-path.patch
new file mode 100644
index 00000000..ed035030
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0072-tcp-avoid-order-1-allocations-on-wifi-and-tx-path.patch
@@ -0,0 +1,134 @@
1From f5e6c8aa4ebb62b560068b1636d889b4932c4dbc Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Tue, 24 Apr 2012 23:01:22 -0400
4Subject: [PATCH 072/165] tcp: avoid order-1 allocations on wifi and tx path
5
6[ This combines upstream commit
7 a21d45726acacc963d8baddf74607d9b74e2b723 and the follow-on bug fix
8 commit 22b4a4f22da4b39c6f7f679fd35f3d35c91bf851 ]
9
10Marc Merlin reported many order-1 allocations failures in TX path on its
11wireless setup, that dont make any sense with MTU=1500 network, and non
12SG capable hardware.
13
14After investigation, it turns out TCP uses sk_stream_alloc_skb() and
15used as a convention skb_tailroom(skb) to know how many bytes of data
16payload could be put in this skb (for non SG capable devices)
17
18Note : these skb used kmalloc-4096 (MTU=1500 + MAX_HEADER +
19sizeof(struct skb_shared_info) being above 2048)
20
21Later, mac80211 layer need to add some bytes at the tail of skb
22(IEEE80211_ENCRYPT_TAILROOM = 18 bytes) and since no more tailroom is
23available has to call pskb_expand_head() and request order-1
24allocations.
25
26This patch changes sk_stream_alloc_skb() so that only
27sk->sk_prot->max_header bytes of headroom are reserved, and use a new
28skb field, avail_size to hold the data payload limit.
29
30This way, order-0 allocations done by TCP stack can leave more than 2 KB
31of tailroom and no more allocation is performed in mac80211 layer (or
32any layer needing some tailroom)
33
34avail_size is unioned with mark/dropcount, since mark will be set later
35in IP stack for output packets. Therefore, skb size is unchanged.
36
37Reported-by: Marc MERLIN <marc@merlins.org>
38Tested-by: Marc MERLIN <marc@merlins.org>
39Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
40Signed-off-by: David S. Miller <davem@davemloft.net>
41[bwh: Correct commit hash for follow-on bug fix]
42Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
43---
44 include/linux/skbuff.h | 13 +++++++++++++
45 net/ipv4/tcp.c | 8 ++++----
46 net/ipv4/tcp_output.c | 3 ++-
47 3 files changed, 19 insertions(+), 5 deletions(-)
48
49diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
50index 6cf8b53..e689b47 100644
51--- a/include/linux/skbuff.h
52+++ b/include/linux/skbuff.h
53@@ -458,6 +458,7 @@ struct sk_buff {
54 union {
55 __u32 mark;
56 __u32 dropcount;
57+ __u32 avail_size;
58 };
59
60 __u16 vlan_tci;
61@@ -1326,6 +1327,18 @@ static inline int skb_tailroom(const struct sk_buff *skb)
62 }
63
64 /**
65+ * skb_availroom - bytes at buffer end
66+ * @skb: buffer to check
67+ *
68+ * Return the number of bytes of free space at the tail of an sk_buff
69+ * allocated by sk_stream_alloc()
70+ */
71+static inline int skb_availroom(const struct sk_buff *skb)
72+{
73+ return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len;
74+}
75+
76+/**
77 * skb_reserve - adjust headroom
78 * @skb: buffer to alter
79 * @len: bytes to move
80diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
81index 36611ab..7904db4 100644
82--- a/net/ipv4/tcp.c
83+++ b/net/ipv4/tcp.c
84@@ -701,11 +701,12 @@ struct sk_buff *sk_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp)
85 skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp);
86 if (skb) {
87 if (sk_wmem_schedule(sk, skb->truesize)) {
88+ skb_reserve(skb, sk->sk_prot->max_header);
89 /*
90 * Make sure that we have exactly size bytes
91 * available to the caller, no more, no less.
92 */
93- skb_reserve(skb, skb_tailroom(skb) - size);
94+ skb->avail_size = size;
95 return skb;
96 }
97 __kfree_skb(skb);
98@@ -995,10 +996,9 @@ new_segment:
99 copy = seglen;
100
101 /* Where to copy to? */
102- if (skb_tailroom(skb) > 0) {
103+ if (skb_availroom(skb) > 0) {
104 /* We have some space in skb head. Superb! */
105- if (copy > skb_tailroom(skb))
106- copy = skb_tailroom(skb);
107+ copy = min_t(int, copy, skb_availroom(skb));
108 err = skb_add_data_nocache(sk, skb, from, copy);
109 if (err)
110 goto do_fault;
111diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
112index 7413437..c51dd5b 100644
113--- a/net/ipv4/tcp_output.c
114+++ b/net/ipv4/tcp_output.c
115@@ -1096,6 +1096,7 @@ static void __pskb_trim_head(struct sk_buff *skb, int len)
116 eat = min_t(int, len, skb_headlen(skb));
117 if (eat) {
118 __skb_pull(skb, eat);
119+ skb->avail_size -= eat;
120 len -= eat;
121 if (!len)
122 return;
123@@ -2060,7 +2061,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *to,
124 /* Punt if not enough space exists in the first SKB for
125 * the data in the second
126 */
127- if (skb->len > skb_tailroom(to))
128+ if (skb->len > skb_availroom(to))
129 break;
130
131 if (after(TCP_SKB_CB(skb)->end_seq, tcp_wnd_end(tp)))
132--
1331.7.7.6
134
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0073-atl1-fix-kernel-panic-in-case-of-DMA-errors.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0073-atl1-fix-kernel-panic-in-case-of-DMA-errors.patch
new file mode 100644
index 00000000..3a883a7a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0073-atl1-fix-kernel-panic-in-case-of-DMA-errors.patch
@@ -0,0 +1,106 @@
1From 9785af56c9a0c73e462058b63999df1c95cf6ce7 Mon Sep 17 00:00:00 2001
2From: Tony Zelenoff <antonz@parallels.com>
3Date: Wed, 11 Apr 2012 06:15:03 +0000
4Subject: [PATCH 073/165] atl1: fix kernel panic in case of DMA errors
5
6[ Upstream commit 03662e41c7cff64a776bfb1b3816de4be43de881 ]
7
8Problem:
9There was two separate work_struct structures which share one
10handler. Unfortunately getting atl1_adapter structure from
11work_struct in case of DMA error was done from incorrect
12offset which cause kernel panics.
13
14Solution:
15The useless work_struct for DMA error removed and
16handler name changed to more generic one.
17
18Signed-off-by: Tony Zelenoff <antonz@parallels.com>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 drivers/net/ethernet/atheros/atlx/atl1.c | 12 +++++-------
23 drivers/net/ethernet/atheros/atlx/atl1.h | 3 +--
24 drivers/net/ethernet/atheros/atlx/atlx.c | 2 +-
25 3 files changed, 7 insertions(+), 10 deletions(-)
26
27diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
28index 33a4e35..ee532e1 100644
29--- a/drivers/net/ethernet/atheros/atlx/atl1.c
30+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
31@@ -2473,7 +2473,7 @@ static irqreturn_t atl1_intr(int irq, void *data)
32 "pcie phy link down %x\n", status);
33 if (netif_running(adapter->netdev)) { /* reset MAC */
34 iowrite32(0, adapter->hw.hw_addr + REG_IMR);
35- schedule_work(&adapter->pcie_dma_to_rst_task);
36+ schedule_work(&adapter->reset_dev_task);
37 return IRQ_HANDLED;
38 }
39 }
40@@ -2485,7 +2485,7 @@ static irqreturn_t atl1_intr(int irq, void *data)
41 "pcie DMA r/w error (status = 0x%x)\n",
42 status);
43 iowrite32(0, adapter->hw.hw_addr + REG_IMR);
44- schedule_work(&adapter->pcie_dma_to_rst_task);
45+ schedule_work(&adapter->reset_dev_task);
46 return IRQ_HANDLED;
47 }
48
49@@ -2630,10 +2630,10 @@ static void atl1_down(struct atl1_adapter *adapter)
50 atl1_clean_rx_ring(adapter);
51 }
52
53-static void atl1_tx_timeout_task(struct work_struct *work)
54+static void atl1_reset_dev_task(struct work_struct *work)
55 {
56 struct atl1_adapter *adapter =
57- container_of(work, struct atl1_adapter, tx_timeout_task);
58+ container_of(work, struct atl1_adapter, reset_dev_task);
59 struct net_device *netdev = adapter->netdev;
60
61 netif_device_detach(netdev);
62@@ -3032,12 +3032,10 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
63 (unsigned long)adapter);
64 adapter->phy_timer_pending = false;
65
66- INIT_WORK(&adapter->tx_timeout_task, atl1_tx_timeout_task);
67+ INIT_WORK(&adapter->reset_dev_task, atl1_reset_dev_task);
68
69 INIT_WORK(&adapter->link_chg_task, atlx_link_chg_task);
70
71- INIT_WORK(&adapter->pcie_dma_to_rst_task, atl1_tx_timeout_task);
72-
73 err = register_netdev(netdev);
74 if (err)
75 goto err_common;
76diff --git a/drivers/net/ethernet/atheros/atlx/atl1.h b/drivers/net/ethernet/atheros/atlx/atl1.h
77index 109d6da..e04bf4d 100644
78--- a/drivers/net/ethernet/atheros/atlx/atl1.h
79+++ b/drivers/net/ethernet/atheros/atlx/atl1.h
80@@ -758,9 +758,8 @@ struct atl1_adapter {
81 u16 link_speed;
82 u16 link_duplex;
83 spinlock_t lock;
84- struct work_struct tx_timeout_task;
85+ struct work_struct reset_dev_task;
86 struct work_struct link_chg_task;
87- struct work_struct pcie_dma_to_rst_task;
88
89 struct timer_list phy_config_timer;
90 bool phy_timer_pending;
91diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c
92index aabcf4b..41c6d83 100644
93--- a/drivers/net/ethernet/atheros/atlx/atlx.c
94+++ b/drivers/net/ethernet/atheros/atlx/atlx.c
95@@ -193,7 +193,7 @@ static void atlx_tx_timeout(struct net_device *netdev)
96 {
97 struct atlx_adapter *adapter = netdev_priv(netdev);
98 /* Do the reset outside of interrupt context */
99- schedule_work(&adapter->tx_timeout_task);
100+ schedule_work(&adapter->reset_dev_task);
101 }
102
103 /*
104--
1051.7.7.6
106
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0074-8139cp-set-intr-mask-after-its-handler-is-registered.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0074-8139cp-set-intr-mask-after-its-handler-is-registered.patch
new file mode 100644
index 00000000..5f7d3f50
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0074-8139cp-set-intr-mask-after-its-handler-is-registered.patch
@@ -0,0 +1,67 @@
1From d3b5873235963930f20f0900871e72ff3b80274b Mon Sep 17 00:00:00 2001
2From: Jason Wang <jasowang@redhat.com>
3Date: Wed, 11 Apr 2012 22:10:54 +0000
4Subject: [PATCH 074/165] 8139cp: set intr mask after its handler is
5 registered
6
7[ Upstream commit a8c9cb106fe79c28d6b7f1397652cadd228715ff ]
8
9We set intr mask before its handler is registered, this does not work well when
108139cp is sharing irq line with other devices. As the irq could be enabled by
11the device before 8139cp's hander is registered which may lead unhandled
12irq. Fix this by introducing an helper cp_irq_enable() and call it after
13request_irq().
14
15Signed-off-by: Jason Wang <jasowang@redhat.com>
16Reviewed-by: Flavio Leitner <fbl@redhat.com>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/net/ethernet/realtek/8139cp.c | 10 ++++++++--
21 1 files changed, 8 insertions(+), 2 deletions(-)
22
23diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
24index aba4f67..8f47907 100644
25--- a/drivers/net/ethernet/realtek/8139cp.c
26+++ b/drivers/net/ethernet/realtek/8139cp.c
27@@ -961,6 +961,11 @@ static inline void cp_start_hw (struct cp_private *cp)
28 cpw8(Cmd, RxOn | TxOn);
29 }
30
31+static void cp_enable_irq(struct cp_private *cp)
32+{
33+ cpw16_f(IntrMask, cp_intr_mask);
34+}
35+
36 static void cp_init_hw (struct cp_private *cp)
37 {
38 struct net_device *dev = cp->dev;
39@@ -1000,8 +1005,6 @@ static void cp_init_hw (struct cp_private *cp)
40
41 cpw16(MultiIntr, 0);
42
43- cpw16_f(IntrMask, cp_intr_mask);
44-
45 cpw8_f(Cfg9346, Cfg9346_Lock);
46 }
47
48@@ -1133,6 +1136,8 @@ static int cp_open (struct net_device *dev)
49 if (rc)
50 goto err_out_hw;
51
52+ cp_enable_irq(cp);
53+
54 netif_carrier_off(dev);
55 mii_check_media(&cp->mii_if, netif_msg_link(cp), true);
56 netif_start_queue(dev);
57@@ -2034,6 +2039,7 @@ static int cp_resume (struct pci_dev *pdev)
58 /* FIXME: sh*t may happen if the Rx ring buffer is depleted */
59 cp_init_rings_index (cp);
60 cp_init_hw (cp);
61+ cp_enable_irq(cp);
62 netif_start_queue (dev);
63
64 spin_lock_irqsave (&cp->lock, flags);
65--
661.7.7.6
67
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0075-net-smsc911x-fix-skb-handling-in-receive-path.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0075-net-smsc911x-fix-skb-handling-in-receive-path.patch
new file mode 100644
index 00000000..996bfc45
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0075-net-smsc911x-fix-skb-handling-in-receive-path.patch
@@ -0,0 +1,78 @@
1From d886ddd4ea18bd874325e888d3272a8db0a972ea Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Thu, 12 Apr 2012 05:54:09 +0000
4Subject: [PATCH 075/165] net: smsc911x: fix skb handling in receive path
5
6[ Upstream commit 3c5e979bd037888dd7d722da22da4b43659af485 ]
7
8The SMSC911x driver resets the ->head, ->data and ->tail pointers in the
9skb on the reset path in order to avoid buffer overflow due to packet
10padding performed by the hardware.
11
12This patch fixes the receive path so that the skb pointers are fixed up
13after the data has been read from the device, The error path is also
14fixed to use number of words consistently and prevent erroneous FIFO
15fastforwarding when skipping over bad data.
16
17Signed-off-by: Will Deacon <will.deacon@arm.com>
18Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 drivers/net/ethernet/smsc/smsc911x.c | 14 +++++---------
23 1 files changed, 5 insertions(+), 9 deletions(-)
24
25diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
26index 8843071..8c7dd21 100644
27--- a/drivers/net/ethernet/smsc/smsc911x.c
28+++ b/drivers/net/ethernet/smsc/smsc911x.c
29@@ -1089,10 +1089,8 @@ smsc911x_rx_counterrors(struct net_device *dev, unsigned int rxstat)
30
31 /* Quickly dumps bad packets */
32 static void
33-smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktbytes)
34+smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktwords)
35 {
36- unsigned int pktwords = (pktbytes + NET_IP_ALIGN + 3) >> 2;
37-
38 if (likely(pktwords >= 4)) {
39 unsigned int timeout = 500;
40 unsigned int val;
41@@ -1156,7 +1154,7 @@ static int smsc911x_poll(struct napi_struct *napi, int budget)
42 continue;
43 }
44
45- skb = netdev_alloc_skb(dev, pktlength + NET_IP_ALIGN);
46+ skb = netdev_alloc_skb(dev, pktwords << 2);
47 if (unlikely(!skb)) {
48 SMSC_WARN(pdata, rx_err,
49 "Unable to allocate skb for rx packet");
50@@ -1166,14 +1164,12 @@ static int smsc911x_poll(struct napi_struct *napi, int budget)
51 break;
52 }
53
54- skb->data = skb->head;
55- skb_reset_tail_pointer(skb);
56+ pdata->ops->rx_readfifo(pdata,
57+ (unsigned int *)skb->data, pktwords);
58
59 /* Align IP on 16B boundary */
60 skb_reserve(skb, NET_IP_ALIGN);
61 skb_put(skb, pktlength - 4);
62- pdata->ops->rx_readfifo(pdata,
63- (unsigned int *)skb->head, pktwords);
64 skb->protocol = eth_type_trans(skb, dev);
65 skb_checksum_none_assert(skb);
66 netif_receive_skb(skb);
67@@ -1396,7 +1392,7 @@ static int smsc911x_open(struct net_device *dev)
68 smsc911x_reg_write(pdata, FIFO_INT, temp);
69
70 /* set RX Data offset to 2 bytes for alignment */
71- smsc911x_reg_write(pdata, RX_CFG, (2 << 8));
72+ smsc911x_reg_write(pdata, RX_CFG, (NET_IP_ALIGN << 8));
73
74 /* enable NAPI polling before enabling RX interrupts */
75 napi_enable(&pdata->napi);
76--
771.7.7.6
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0076-net-ethernet-ks8851_mll-fix-rx-frame-buffer-overflow.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0076-net-ethernet-ks8851_mll-fix-rx-frame-buffer-overflow.patch
new file mode 100644
index 00000000..627d288f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0076-net-ethernet-ks8851_mll-fix-rx-frame-buffer-overflow.patch
@@ -0,0 +1,46 @@
1From 64adebf7ebe78704f2a1f09614184f1ede7631b2 Mon Sep 17 00:00:00 2001
2From: Davide Ciminaghi <ciminaghi@gnudd.com>
3Date: Fri, 13 Apr 2012 04:48:25 +0000
4Subject: [PATCH 076/165] net/ethernet: ks8851_mll fix rx frame buffer
5 overflow
6
7[ Upstream commit 8a9a0ea6032186e3030419262678d652b88bf6a8 ]
8
9At the beginning of ks_rcv(), a for loop retrieves the
10header information relevant to all the frames stored
11in the mac's internal buffers. The number of pending
12frames is stored as an 8 bits field in KS_RXFCTR.
13If interrupts are disabled long enough to allow for more than
1432 frames to accumulate in the MAC's internal buffers, a buffer
15overflow occurs.
16This patch fixes the problem by making the
17driver's frame_head_info buffer big enough.
18Well actually, since the chip appears to have 12K of
19internal rx buffers and the shortest ethernet frame should
20be 64 bytes long, maybe the limit could be set to
2112*1024/64 = 192 frames, but 255 should be safer.
22
23Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
24Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
25Signed-off-by: David S. Miller <davem@davemloft.net>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 drivers/net/ethernet/micrel/ks8851_mll.c | 2 +-
29 1 files changed, 1 insertions(+), 1 deletions(-)
30
31diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
32index d19c849..77241b6 100644
33--- a/drivers/net/ethernet/micrel/ks8851_mll.c
34+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
35@@ -40,7 +40,7 @@
36 #define DRV_NAME "ks8851_mll"
37
38 static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 };
39-#define MAX_RECV_FRAMES 32
40+#define MAX_RECV_FRAMES 255
41 #define MAX_BUF_SIZE 2048
42 #define TX_BUF_SIZE 2000
43 #define RX_BUF_SIZE 2000
44--
451.7.7.6
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0077-net_sched-gred-Fix-oops-in-gred_dump-in-WRED-mode.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0077-net_sched-gred-Fix-oops-in-gred_dump-in-WRED-mode.patch
new file mode 100644
index 00000000..0ffd9a54
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0077-net_sched-gred-Fix-oops-in-gred_dump-in-WRED-mode.patch
@@ -0,0 +1,54 @@
1From fad0985a19b237d9b48ab19b767413a95314b90d Mon Sep 17 00:00:00 2001
2From: David Ward <david.ward@ll.mit.edu>
3Date: Sun, 15 Apr 2012 12:31:45 +0000
4Subject: [PATCH 077/165] net_sched: gred: Fix oops in gred_dump() in WRED
5 mode
6
7[ Upstream commit 244b65dbfede788f2fa3fe2463c44d0809e97c6b ]
8
9A parameter set exists for WRED mode, called wred_set, to hold the same
10values for qavg and qidlestart across all VQs. The WRED mode values had
11been previously held in the VQ for the default DP. After these values
12were moved to wred_set, the VQ for the default DP was no longer created
13automatically (so that it could be omitted on purpose, to have packets
14in the default DP enqueued directly to the device without using RED).
15
16However, gred_dump() was overlooked during that change; in WRED mode it
17still reads qavg/qidlestart from the VQ for the default DP, which might
18not even exist. As a result, this command sequence will cause an oops:
19
20tc qdisc add dev $DEV handle $HANDLE parent $PARENT gred setup \
21 DPs 3 default 2 grio
22tc qdisc change dev $DEV handle $HANDLE gred DP 0 prio 8 $RED_OPTIONS
23tc qdisc change dev $DEV handle $HANDLE gred DP 1 prio 8 $RED_OPTIONS
24
25This fixes gred_dump() in WRED mode to use the values held in wred_set.
26
27Signed-off-by: David Ward <david.ward@ll.mit.edu>
28Signed-off-by: David S. Miller <davem@davemloft.net>
29Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
30---
31 net/sched/sch_gred.c | 7 ++-----
32 1 files changed, 2 insertions(+), 5 deletions(-)
33
34diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
35index 6cd8ddf..e1afe0c 100644
36--- a/net/sched/sch_gred.c
37+++ b/net/sched/sch_gred.c
38@@ -544,11 +544,8 @@ static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
39 opt.packets = q->packetsin;
40 opt.bytesin = q->bytesin;
41
42- if (gred_wred_mode(table)) {
43- q->parms.qidlestart =
44- table->tab[table->def]->parms.qidlestart;
45- q->parms.qavg = table->tab[table->def]->parms.qavg;
46- }
47+ if (gred_wred_mode(table))
48+ gred_load_wred_set(table, q);
49
50 opt.qave = red_calc_qavg(&q->parms, q->parms.qavg);
51
52--
531.7.7.6
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0078-net-usb-smsc75xx-fix-mtu.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0078-net-usb-smsc75xx-fix-mtu.patch
new file mode 100644
index 00000000..38677b06
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0078-net-usb-smsc75xx-fix-mtu.patch
@@ -0,0 +1,39 @@
1From a242d0ff40b2ef87f4c23c4676441ed1c4ee20cd Mon Sep 17 00:00:00 2001
2From: Stephane Fillod <fillods@users.sf.net>
3Date: Sun, 15 Apr 2012 11:38:29 +0000
4Subject: [PATCH 078/165] net: usb: smsc75xx: fix mtu
5
6[ Upstream commit a99ff7d0123b19ecad3b589480b6542716ab6b52 ]
7
8Make smsc75xx recalculate the hard_mtu after adjusting the
9hard_header_len.
10
11Without this, usbnet adjusts the MTU down to 1492 bytes, and the host is
12unable to receive standard 1500-byte frames from the device.
13
14Inspired by same fix on cdc_eem 78fb72f7936c01d5b426c03a691eca082b03f2b9.
15
16Tested on ARM/Omap3 with EVB-LAN7500-LC.
17
18Signed-off-by: Stephane Fillod <fillods@users.sf.net>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 drivers/net/usb/smsc75xx.c | 1 +
23 1 files changed, 1 insertions(+), 0 deletions(-)
24
25diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
26index a5b9b12..7bd219b 100644
27--- a/drivers/net/usb/smsc75xx.c
28+++ b/drivers/net/usb/smsc75xx.c
29@@ -1050,6 +1050,7 @@ static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf)
30 dev->net->ethtool_ops = &smsc75xx_ethtool_ops;
31 dev->net->flags |= IFF_MULTICAST;
32 dev->net->hard_header_len += SMSC75XX_TX_OVERHEAD;
33+ dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
34 return 0;
35 }
36
37--
381.7.7.6
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0079-dummy-Add-ndo_uninit.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0079-dummy-Add-ndo_uninit.patch
new file mode 100644
index 00000000..2a8aa718
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0079-dummy-Add-ndo_uninit.patch
@@ -0,0 +1,55 @@
1From ee79f6838bd3f230ebf00849029dac3b9be112e5 Mon Sep 17 00:00:00 2001
2From: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
3Date: Sun, 15 Apr 2012 13:26:01 +0000
4Subject: [PATCH 079/165] dummy: Add ndo_uninit().
5
6commit 890fdf2a0cb88202d1427589db2cf29c1bdd3c1d upstream.
7
8In register_netdevice(), when ndo_init() is successful and later
9some error occurred, ndo_uninit() will be called.
10So dummy deivce is desirable to implement ndo_uninit() method
11to free percpu stats for this case.
12And, ndo_uninit() is also called along with dev->destructor() when
13device is unregistered, so in order to prevent dev->dstats from
14being freed twice, dev->destructor is modified to free_netdev().
15
16Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/net/dummy.c | 6 +++---
21 1 files changed, 3 insertions(+), 3 deletions(-)
22
23diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
24index a7c5e88..eeac9ca 100644
25--- a/drivers/net/dummy.c
26+++ b/drivers/net/dummy.c
27@@ -106,14 +106,14 @@ static int dummy_dev_init(struct net_device *dev)
28 return 0;
29 }
30
31-static void dummy_dev_free(struct net_device *dev)
32+static void dummy_dev_uninit(struct net_device *dev)
33 {
34 free_percpu(dev->dstats);
35- free_netdev(dev);
36 }
37
38 static const struct net_device_ops dummy_netdev_ops = {
39 .ndo_init = dummy_dev_init,
40+ .ndo_uninit = dummy_dev_uninit,
41 .ndo_start_xmit = dummy_xmit,
42 .ndo_validate_addr = eth_validate_addr,
43 .ndo_set_rx_mode = set_multicast_list,
44@@ -127,7 +127,7 @@ static void dummy_setup(struct net_device *dev)
45
46 /* Initialize the device structure. */
47 dev->netdev_ops = &dummy_netdev_ops;
48- dev->destructor = dummy_dev_free;
49+ dev->destructor = free_netdev;
50
51 /* Fill in device structure with ethernet-generic values. */
52 dev->tx_queue_len = 0;
53--
541.7.7.6
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0080-tcp-fix-tcp_grow_window-for-large-incoming-frames.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0080-tcp-fix-tcp_grow_window-for-large-incoming-frames.patch
new file mode 100644
index 00000000..3ed35913
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0080-tcp-fix-tcp_grow_window-for-large-incoming-frames.patch
@@ -0,0 +1,40 @@
1From 57c5b1028d7bffa4d7784dd4bd8743710dc62d0c Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <edumazet@google.com>
3Date: Mon, 16 Apr 2012 23:28:07 +0000
4Subject: [PATCH 080/165] tcp: fix tcp_grow_window() for large incoming frames
5
6[ Upstream commit 4d846f02392a710f9604892ac3329e628e60a230 ]
7
8tcp_grow_window() has to grow rcv_ssthresh up to window_clamp, allowing
9sender to increase its window.
10
11tcp_grow_window() still assumes a tcp frame is under MSS, but its no
12longer true with LRO/GRO.
13
14This patch fixes one of the performance issue we noticed with GRO on.
15
16Signed-off-by: Eric Dumazet <edumazet@google.com>
17Cc: Neal Cardwell <ncardwell@google.com>
18Cc: Tom Herbert <therbert@google.com>
19Acked-by: Neal Cardwell <ncardwell@google.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 net/ipv4/tcp_input.c | 1 +
24 1 files changed, 1 insertions(+), 0 deletions(-)
25
26diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
27index 4c46fa7..daedc07 100644
28--- a/net/ipv4/tcp_input.c
29+++ b/net/ipv4/tcp_input.c
30@@ -334,6 +334,7 @@ static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb)
31 incr = __tcp_grow_window(sk, skb);
32
33 if (incr) {
34+ incr = max_t(int, incr, 2 * skb->len);
35 tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr,
36 tp->window_clamp);
37 inet_csk(sk)->icsk_ack.quick |= 1;
38--
391.7.7.6
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0081-netns-do-not-leak-net_generic-data-on-failed-init.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0081-netns-do-not-leak-net_generic-data-on-failed-init.patch
new file mode 100644
index 00000000..b5c686d2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0081-netns-do-not-leak-net_generic-data-on-failed-init.patch
@@ -0,0 +1,79 @@
1From 4637103c9e0f2f7cef243c369f6b451550a4944d Mon Sep 17 00:00:00 2001
2From: Julian Anastasov <ja@ssi.bg>
3Date: Mon, 16 Apr 2012 04:43:15 +0000
4Subject: [PATCH 081/165] netns: do not leak net_generic data on failed init
5
6[ Upstream commit b922934d017f1cc831b017913ed7d1a56c558b43 ]
7
8ops_init should free the net_generic data on
9init failure and __register_pernet_operations should not
10call ops_free when NET_NS is not enabled.
11
12Signed-off-by: Julian Anastasov <ja@ssi.bg>
13Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 net/core/net_namespace.c | 33 ++++++++++++++++++---------------
18 1 files changed, 18 insertions(+), 15 deletions(-)
19
20diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
21index 0e950fd..31a5ae5 100644
22--- a/net/core/net_namespace.c
23+++ b/net/core/net_namespace.c
24@@ -83,21 +83,29 @@ assign:
25
26 static int ops_init(const struct pernet_operations *ops, struct net *net)
27 {
28- int err;
29+ int err = -ENOMEM;
30+ void *data = NULL;
31+
32 if (ops->id && ops->size) {
33- void *data = kzalloc(ops->size, GFP_KERNEL);
34+ data = kzalloc(ops->size, GFP_KERNEL);
35 if (!data)
36- return -ENOMEM;
37+ goto out;
38
39 err = net_assign_generic(net, *ops->id, data);
40- if (err) {
41- kfree(data);
42- return err;
43- }
44+ if (err)
45+ goto cleanup;
46 }
47+ err = 0;
48 if (ops->init)
49- return ops->init(net);
50- return 0;
51+ err = ops->init(net);
52+ if (!err)
53+ return 0;
54+
55+cleanup:
56+ kfree(data);
57+
58+out:
59+ return err;
60 }
61
62 static void ops_free(const struct pernet_operations *ops, struct net *net)
63@@ -448,12 +456,7 @@ static void __unregister_pernet_operations(struct pernet_operations *ops)
64 static int __register_pernet_operations(struct list_head *list,
65 struct pernet_operations *ops)
66 {
67- int err = 0;
68- err = ops_init(ops, &init_net);
69- if (err)
70- ops_free(ops, &init_net);
71- return err;
72-
73+ return ops_init(ops, &init_net);
74 }
75
76 static void __unregister_pernet_operations(struct pernet_operations *ops)
77--
781.7.7.6
79
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0082-ksz884x-don-t-copy-too-much-in-netdev_set_mac_addres.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0082-ksz884x-don-t-copy-too-much-in-netdev_set_mac_addres.patch
new file mode 100644
index 00000000..bf01b933
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0082-ksz884x-don-t-copy-too-much-in-netdev_set_mac_addres.patch
@@ -0,0 +1,36 @@
1From 921c1088587031a14b41d53e69c15ea76d4124ce Mon Sep 17 00:00:00 2001
2From: Dan Carpenter <dan.carpenter@oracle.com>
3Date: Thu, 19 Apr 2012 10:00:19 +0300
4Subject: [PATCH 082/165] ksz884x: don't copy too much in
5 netdev_set_mac_address()
6
7[ Upstream commit 716af4abd6e6370226f567af50bfaca274515980 ]
8
9MAX_ADDR_LEN is 32. ETH_ALEN is 6. mac->sa_data is a 14 byte array, so
10the memcpy() is doing a read past the end of the array. I asked about
11this on netdev and Ben Hutchings told me it's supposed to be copying
12ETH_ALEN bytes (thanks Ben).
13
14Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/net/ethernet/micrel/ksz884x.c | 2 +-
19 1 files changed, 1 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
22index 7ece990..4b9f4bd 100644
23--- a/drivers/net/ethernet/micrel/ksz884x.c
24+++ b/drivers/net/ethernet/micrel/ksz884x.c
25@@ -5679,7 +5679,7 @@ static int netdev_set_mac_address(struct net_device *dev, void *addr)
26 memcpy(hw->override_addr, mac->sa_data, MAC_ADDR_LEN);
27 }
28
29- memcpy(dev->dev_addr, mac->sa_data, MAX_ADDR_LEN);
30+ memcpy(dev->dev_addr, mac->sa_data, ETH_ALEN);
31
32 interrupt = hw_block_intr(hw);
33
34--
351.7.7.6
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0083-net-ax25-Reorder-ax25_exit-to-remove-races.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0083-net-ax25-Reorder-ax25_exit-to-remove-races.patch
new file mode 100644
index 00000000..b0dc17d7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0083-net-ax25-Reorder-ax25_exit-to-remove-races.patch
@@ -0,0 +1,58 @@
1From 5d2236761edc280d899b5721a6aa29d2cd1d1718 Mon Sep 17 00:00:00 2001
2From: "Eric W. Biederman" <ebiederm@xmission.com>
3Date: Wed, 18 Apr 2012 16:11:23 +0000
4Subject: [PATCH 083/165] net ax25: Reorder ax25_exit to remove races.
5
6[ Upstream commit 3adadc08cc1e2cbcc15a640d639297ef5fcb17f5 ]
7
8While reviewing the sysctl code in ax25 I spotted races in ax25_exit
9where it is possible to receive notifications and packets after already
10freeing up some of the data structures needed to process those
11notifications and updates.
12
13Call unregister_netdevice_notifier early so that the rest of the cleanup
14code does not need to deal with network devices. This takes advantage
15of my recent enhancement to unregister_netdevice_notifier to send
16unregister notifications of all network devices that are current
17registered.
18
19Move the unregistration for packet types, socket types and protocol
20types before we cleanup any of the ax25 data structures to remove the
21possibilities of other races.
22
23Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
24Signed-off-by: David S. Miller <davem@davemloft.net>
25Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
26---
27 net/ax25/af_ax25.c | 9 +++++----
28 1 files changed, 5 insertions(+), 4 deletions(-)
29
30diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
31index e7c69f4..b04a6ef 100644
32--- a/net/ax25/af_ax25.c
33+++ b/net/ax25/af_ax25.c
34@@ -2006,16 +2006,17 @@ static void __exit ax25_exit(void)
35 proc_net_remove(&init_net, "ax25_route");
36 proc_net_remove(&init_net, "ax25");
37 proc_net_remove(&init_net, "ax25_calls");
38- ax25_rt_free();
39- ax25_uid_free();
40- ax25_dev_free();
41
42- ax25_unregister_sysctl();
43 unregister_netdevice_notifier(&ax25_dev_notifier);
44+ ax25_unregister_sysctl();
45
46 dev_remove_pack(&ax25_packet_type);
47
48 sock_unregister(PF_AX25);
49 proto_unregister(&ax25_proto);
50+
51+ ax25_rt_free();
52+ ax25_uid_free();
53+ ax25_dev_free();
54 }
55 module_exit(ax25_exit);
56--
571.7.7.6
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0084-tcp-fix-TCP_MAXSEG-for-established-IPv6-passive-sock.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0084-tcp-fix-TCP_MAXSEG-for-established-IPv6-passive-sock.patch
new file mode 100644
index 00000000..dbf428ad
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0084-tcp-fix-TCP_MAXSEG-for-established-IPv6-passive-sock.patch
@@ -0,0 +1,41 @@
1From 0f6ddd1f2a2e87994e797d2877e7270cfc7ec03c Mon Sep 17 00:00:00 2001
2From: Neal Cardwell <ncardwell@google.com>
3Date: Sun, 22 Apr 2012 09:45:47 +0000
4Subject: [PATCH 084/165] tcp: fix TCP_MAXSEG for established IPv6 passive
5 sockets
6
7[ Upstream commit d135c522f1234f62e81be29cebdf59e9955139ad ]
8
9Commit f5fff5d forgot to fix TCP_MAXSEG behavior IPv6 sockets, so IPv6
10TCP server sockets that used TCP_MAXSEG would find that the advmss of
11child sockets would be incorrect. This commit mirrors the advmss logic
12from tcp_v4_syn_recv_sock in tcp_v6_syn_recv_sock. Eventually this
13logic should probably be shared between IPv4 and IPv6, but this at
14least fixes this issue.
15
16Signed-off-by: Neal Cardwell <ncardwell@google.com>
17Acked-by: Eric Dumazet <edumazet@google.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 net/ipv6/tcp_ipv6.c | 4 ++++
22 1 files changed, 4 insertions(+), 0 deletions(-)
23
24diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
25index b859e4a..4a56574 100644
26--- a/net/ipv6/tcp_ipv6.c
27+++ b/net/ipv6/tcp_ipv6.c
28@@ -1494,6 +1494,10 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
29 tcp_mtup_init(newsk);
30 tcp_sync_mss(newsk, dst_mtu(dst));
31 newtp->advmss = dst_metric_advmss(dst);
32+ if (tcp_sk(sk)->rx_opt.user_mss &&
33+ tcp_sk(sk)->rx_opt.user_mss < newtp->advmss)
34+ newtp->advmss = tcp_sk(sk)->rx_opt.user_mss;
35+
36 tcp_initialize_rcv_mss(newsk);
37 if (tcp_rsk(req)->snt_synack)
38 tcp_valid_rtt_meas(newsk,
39--
401.7.7.6
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0085-nfs-Enclose-hostname-in-brackets-when-needed-in-nfs_.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0085-nfs-Enclose-hostname-in-brackets-when-needed-in-nfs_.patch
new file mode 100644
index 00000000..c718104f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0085-nfs-Enclose-hostname-in-brackets-when-needed-in-nfs_.patch
@@ -0,0 +1,49 @@
1From 5d341b71950df3cbd21a7abf61ab903aac90531b Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Sat, 3 Sep 2011 01:09:43 +0200
4Subject: [PATCH 085/165] nfs: Enclose hostname in brackets when needed in
5 nfs_do_root_mount
6
7commit 98a2139f4f4d7b5fcc3a54c7fddbe88612abed20 upstream.
8
9When hostname contains colon (e.g. when it is an IPv6 address) it needs
10to be enclosed in brackets to make parsing of NFS device string possible.
11Fix nfs_do_root_mount() to enclose hostname properly when needed. NFS code
12actually does not need this as it does not parse the string passed by
13nfs_do_root_mount() but the device string is exposed to userspace in
14/proc/mounts.
15
16CC: Josh Boyer <jwboyer@redhat.com>
17CC: Trond Myklebust <Trond.Myklebust@netapp.com>
18Signed-off-by: Jan Kara <jack@suse.cz>
19Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 fs/nfs/super.c | 8 ++++++--
23 1 files changed, 6 insertions(+), 2 deletions(-)
24
25diff --git a/fs/nfs/super.c b/fs/nfs/super.c
26index 3ada13c..376cd65 100644
27--- a/fs/nfs/super.c
28+++ b/fs/nfs/super.c
29@@ -2708,11 +2708,15 @@ static struct vfsmount *nfs_do_root_mount(struct file_system_type *fs_type,
30 char *root_devname;
31 size_t len;
32
33- len = strlen(hostname) + 3;
34+ len = strlen(hostname) + 5;
35 root_devname = kmalloc(len, GFP_KERNEL);
36 if (root_devname == NULL)
37 return ERR_PTR(-ENOMEM);
38- snprintf(root_devname, len, "%s:/", hostname);
39+ /* Does hostname needs to be enclosed in brackets? */
40+ if (strchr(hostname, ':'))
41+ snprintf(root_devname, len, "[%s]:/", hostname);
42+ else
43+ snprintf(root_devname, len, "%s:/", hostname);
44 root_mnt = vfs_kern_mount(fs_type, flags, root_devname, data);
45 kfree(root_devname);
46 return root_mnt;
47--
481.7.7.6
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0086-NFSv4-Ensure-that-the-LOCK-code-sets-exception-inode.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0086-NFSv4-Ensure-that-the-LOCK-code-sets-exception-inode.patch
new file mode 100644
index 00000000..a0dff9ce
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0086-NFSv4-Ensure-that-the-LOCK-code-sets-exception-inode.patch
@@ -0,0 +1,54 @@
1From 4fd3b67b3816e020c889f75e986ba290110c3224 Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Wed, 18 Apr 2012 12:20:10 -0400
4Subject: [PATCH 086/165] NFSv4: Ensure that the LOCK code sets
5 exception->inode
6
7commit 05ffe24f5290dc095f98fbaf84afe51ef404ccc5 upstream.
8
9All callers of nfs4_handle_exception() that need to handle
10NFS4ERR_OPENMODE correctly should set exception->inode
11
12Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 fs/nfs/nfs4proc.c | 9 +++++++--
16 1 files changed, 7 insertions(+), 2 deletions(-)
17
18diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
19index 757293b..57f9971 100644
20--- a/fs/nfs/nfs4proc.c
21+++ b/fs/nfs/nfs4proc.c
22@@ -4453,7 +4453,9 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f
23 static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request)
24 {
25 struct nfs_server *server = NFS_SERVER(state->inode);
26- struct nfs4_exception exception = { };
27+ struct nfs4_exception exception = {
28+ .inode = state->inode,
29+ };
30 int err;
31
32 do {
33@@ -4471,7 +4473,9 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request
34 static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request)
35 {
36 struct nfs_server *server = NFS_SERVER(state->inode);
37- struct nfs4_exception exception = { };
38+ struct nfs4_exception exception = {
39+ .inode = state->inode,
40+ };
41 int err;
42
43 err = nfs4_set_lock_state(state, request);
44@@ -4551,6 +4555,7 @@ static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *
45 {
46 struct nfs4_exception exception = {
47 .state = state,
48+ .inode = state->inode,
49 };
50 int err;
51
52--
531.7.7.6
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0087-NFSv4-Ensure-that-we-check-lock-exclusive-shared-typ.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0087-NFSv4-Ensure-that-we-check-lock-exclusive-shared-typ.patch
new file mode 100644
index 00000000..8a5f01d4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0087-NFSv4-Ensure-that-we-check-lock-exclusive-shared-typ.patch
@@ -0,0 +1,45 @@
1From 2057efde24445d1ca4d192617bf7d5f4fe0f38ce Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Wed, 18 Apr 2012 12:48:35 -0400
4Subject: [PATCH 087/165] NFSv4: Ensure that we check lock exclusive/shared
5 type against open modes
6
7commit 55725513b5ef9d462aa3e18527658a0362aaae83 upstream.
8
9Since we may be simulating flock() locks using NFS byte range locks,
10we can't rely on the VFS having checked the file open mode for us.
11
12Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 fs/nfs/nfs4proc.c | 14 ++++++++++++++
16 1 files changed, 14 insertions(+), 0 deletions(-)
17
18diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
19index 57f9971..51f6a40 100644
20--- a/fs/nfs/nfs4proc.c
21+++ b/fs/nfs/nfs4proc.c
22@@ -4601,6 +4601,20 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
23
24 if (state == NULL)
25 return -ENOLCK;
26+ /*
27+ * Don't rely on the VFS having checked the file open mode,
28+ * since it won't do this for flock() locks.
29+ */
30+ switch (request->fl_type & (F_RDLCK|F_WRLCK|F_UNLCK)) {
31+ case F_RDLCK:
32+ if (!(filp->f_mode & FMODE_READ))
33+ return -EBADF;
34+ break;
35+ case F_WRLCK:
36+ if (!(filp->f_mode & FMODE_WRITE))
37+ return -EBADF;
38+ }
39+
40 do {
41 status = nfs4_proc_setlk(state, cmd, request);
42 if ((status != -EAGAIN) || IS_SETLK(cmd))
43--
441.7.7.6
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0088-NFS-put-open-context-on-error-in-nfs_pagein_multi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0088-NFS-put-open-context-on-error-in-nfs_pagein_multi.patch
new file mode 100644
index 00000000..b0b01496
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0088-NFS-put-open-context-on-error-in-nfs_pagein_multi.patch
@@ -0,0 +1,30 @@
1From 24f8b6b7ed6a71c4bb6b7c586a1cfa9d70e9775e Mon Sep 17 00:00:00 2001
2From: Fred Isaman <iisaman@netapp.com>
3Date: Fri, 20 Apr 2012 14:47:34 -0400
4Subject: [PATCH 088/165] NFS: put open context on error in nfs_pagein_multi
5
6commit 73fb7bc7c57d971b11f2e00536ac2d3e316e0609 upstream.
7
8Signed-off-by: Fred Isaman <iisaman@netapp.com>
9Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
10Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
11---
12 fs/nfs/read.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15diff --git a/fs/nfs/read.c b/fs/nfs/read.c
16index cfa175c..41bae32 100644
17--- a/fs/nfs/read.c
18+++ b/fs/nfs/read.c
19@@ -324,7 +324,7 @@ out_bad:
20 while (!list_empty(res)) {
21 data = list_entry(res->next, struct nfs_read_data, list);
22 list_del(&data->list);
23- nfs_readdata_free(data);
24+ nfs_readdata_release(data);
25 }
26 nfs_readpage_release(req);
27 return -ENOMEM;
28--
291.7.7.6
30
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0089-NFS-put-open-context-on-error-in-nfs_flush_multi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0089-NFS-put-open-context-on-error-in-nfs_flush_multi.patch
new file mode 100644
index 00000000..aff198af
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0089-NFS-put-open-context-on-error-in-nfs_flush_multi.patch
@@ -0,0 +1,30 @@
1From dbef91f49d543a546ee1cbe3e839c97c69486744 Mon Sep 17 00:00:00 2001
2From: Fred Isaman <iisaman@netapp.com>
3Date: Fri, 20 Apr 2012 14:47:35 -0400
4Subject: [PATCH 089/165] NFS: put open context on error in nfs_flush_multi
5
6commit 8ccd271f7a3a846ce6f85ead0760d9d12994a611 upstream.
7
8Signed-off-by: Fred Isaman <iisaman@netapp.com>
9Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
10Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
11---
12 fs/nfs/write.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15diff --git a/fs/nfs/write.c b/fs/nfs/write.c
16index 1dda78d..4efd421 100644
17--- a/fs/nfs/write.c
18+++ b/fs/nfs/write.c
19@@ -974,7 +974,7 @@ out_bad:
20 while (!list_empty(res)) {
21 data = list_entry(res->next, struct nfs_write_data, list);
22 list_del(&data->list);
23- nfs_writedata_free(data);
24+ nfs_writedata_release(data);
25 }
26 nfs_redirty_request(req);
27 return -ENOMEM;
28--
291.7.7.6
30
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0090-x86-microcode-Fix-sysfs-warning-during-module-unload.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0090-x86-microcode-Fix-sysfs-warning-during-module-unload.patch
new file mode 100644
index 00000000..89e71921
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0090-x86-microcode-Fix-sysfs-warning-during-module-unload.patch
@@ -0,0 +1,71 @@
1From e7e6ba91db68ef0028d61a2bf8b9f3965595b944 Mon Sep 17 00:00:00 2001
2From: Andreas Herrmann <andreas.herrmann3@amd.com>
3Date: Thu, 12 Apr 2012 16:48:01 +0200
4Subject: [PATCH 090/165] x86, microcode: Fix sysfs warning during module
5 unload on unsupported CPUs
6
7commit a956bd6f8583326b18348ab1452b4686778f785d upstream.
8
9Loading the microcode driver on an unsupported CPU and subsequently
10unloading the driver causes
11
12 WARNING: at fs/sysfs/group.c:138 mc_device_remove+0x5f/0x70 [microcode]()
13 Hardware name: 01972NG
14 sysfs group ffffffffa00013d0 not found for kobject 'cpu0'
15 Modules linked in: snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel btusb snd_hda_codec bluetooth thinkpad_acpi rfkill microcode(-) [last unloaded: cfg80211]
16 Pid: 4560, comm: modprobe Not tainted 3.4.0-rc2-00002-g258f742 #5
17 Call Trace:
18 [<ffffffff8103113b>] ? warn_slowpath_common+0x7b/0xc0
19 [<ffffffff81031235>] ? warn_slowpath_fmt+0x45/0x50
20 [<ffffffff81120e74>] ? sysfs_remove_group+0x34/0x120
21 [<ffffffffa00000ef>] ? mc_device_remove+0x5f/0x70 [microcode]
22 [<ffffffff81331eb9>] ? subsys_interface_unregister+0x69/0xa0
23 [<ffffffff81563526>] ? mutex_lock+0x16/0x40
24 [<ffffffffa0000c3e>] ? microcode_exit+0x50/0x92 [microcode]
25 [<ffffffff8107051d>] ? sys_delete_module+0x16d/0x260
26 [<ffffffff810a0065>] ? wait_iff_congested+0x45/0x110
27 [<ffffffff815656af>] ? page_fault+0x1f/0x30
28 [<ffffffff81565ba2>] ? system_call_fastpath+0x16/0x1b
29
30on recent kernels.
31
32This is due to commit 8a25a2fd126c ("cpu: convert 'cpu' and
33'machinecheck' sysdev_class to a regular subsystem") which renders
34commit 6c53cbfced04 ("x86, microcode: Correct sysdev_add error path")
35useless.
36
37See http://marc.info/?l=linux-kernel&m=133416246406478
38
39Avoid above warning by restoring the old driver behaviour before
406c53cbfced04 ("x86, microcode: Correct sysdev_add error path").
41
42Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
43Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
44Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
45Link: http://lkml.kernel.org/r/20120411163849.GE4794@alberich.amd.com
46Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
47[bwh: Backported to 3.2: deleted line uses sys_dev, not dev]
48Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
49---
50 arch/x86/kernel/microcode_core.c | 4 +---
51 1 files changed, 1 insertions(+), 3 deletions(-)
52
53diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
54index 9d46f5e..563a09d 100644
55--- a/arch/x86/kernel/microcode_core.c
56+++ b/arch/x86/kernel/microcode_core.c
57@@ -418,10 +418,8 @@ static int mc_sysdev_add(struct sys_device *sys_dev)
58 if (err)
59 return err;
60
61- if (microcode_init_cpu(cpu) == UCODE_ERROR) {
62- sysfs_remove_group(&sys_dev->kobj, &mc_attr_group);
63+ if (microcode_init_cpu(cpu) == UCODE_ERROR)
64 return -EINVAL;
65- }
66
67 return err;
68 }
69--
701.7.7.6
71
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0091-x86-apic-APIC-code-touches-invalid-MSR-on-P5-class-m.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0091-x86-apic-APIC-code-touches-invalid-MSR-on-P5-class-m.patch
new file mode 100644
index 00000000..d46b6ce7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0091-x86-apic-APIC-code-touches-invalid-MSR-on-P5-class-m.patch
@@ -0,0 +1,91 @@
1From 46ed52ce8ccfe7b4b4edf99fb0aeed2fbf817727 Mon Sep 17 00:00:00 2001
2From: Bryan O'Donoghue <bryan.odonoghue@linux.intel.com>
3Date: Wed, 18 Apr 2012 17:37:39 +0100
4Subject: [PATCH 091/165] x86, apic: APIC code touches invalid MSR on P5 class
5 machines
6
7commit cbf2829b61c136edcba302a5e1b6b40e97d32c00 upstream.
8
9Current APIC code assumes MSR_IA32_APICBASE is present for all systems.
10Pentium Classic P5 and friends didn't have this MSR. MSR_IA32_APICBASE
11was introduced as an architectural MSR by Intel @ P6.
12
13Code paths that can touch this MSR invalidly are when vendor == Intel &&
14cpu-family == 5 and APIC bit is set in CPUID - or when you simply pass
15lapic on the kernel command line, on a P5.
16
17The below patch stops Linux incorrectly interfering with the
18MSR_IA32_APICBASE for P5 class machines. Other code paths exist that
19touch the MSR - however those paths are not currently reachable for a
20conformant P5.
21
22Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linux.intel.com>
23Link: http://lkml.kernel.org/r/4F8EEDD3.1080404@linux.intel.com
24Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
25Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
26---
27 arch/x86/kernel/apic/apic.c | 34 ++++++++++++++++++++--------------
28 1 files changed, 20 insertions(+), 14 deletions(-)
29
30diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
31index f98d84c..c4e3581 100644
32--- a/arch/x86/kernel/apic/apic.c
33+++ b/arch/x86/kernel/apic/apic.c
34@@ -1577,9 +1577,11 @@ static int __init apic_verify(void)
35 mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
36
37 /* The BIOS may have set up the APIC at some other address */
38- rdmsr(MSR_IA32_APICBASE, l, h);
39- if (l & MSR_IA32_APICBASE_ENABLE)
40- mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
41+ if (boot_cpu_data.x86 >= 6) {
42+ rdmsr(MSR_IA32_APICBASE, l, h);
43+ if (l & MSR_IA32_APICBASE_ENABLE)
44+ mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
45+ }
46
47 pr_info("Found and enabled local APIC!\n");
48 return 0;
49@@ -1597,13 +1599,15 @@ int __init apic_force_enable(unsigned long addr)
50 * MSR. This can only be done in software for Intel P6 or later
51 * and AMD K7 (Model > 1) or later.
52 */
53- rdmsr(MSR_IA32_APICBASE, l, h);
54- if (!(l & MSR_IA32_APICBASE_ENABLE)) {
55- pr_info("Local APIC disabled by BIOS -- reenabling.\n");
56- l &= ~MSR_IA32_APICBASE_BASE;
57- l |= MSR_IA32_APICBASE_ENABLE | addr;
58- wrmsr(MSR_IA32_APICBASE, l, h);
59- enabled_via_apicbase = 1;
60+ if (boot_cpu_data.x86 >= 6) {
61+ rdmsr(MSR_IA32_APICBASE, l, h);
62+ if (!(l & MSR_IA32_APICBASE_ENABLE)) {
63+ pr_info("Local APIC disabled by BIOS -- reenabling.\n");
64+ l &= ~MSR_IA32_APICBASE_BASE;
65+ l |= MSR_IA32_APICBASE_ENABLE | addr;
66+ wrmsr(MSR_IA32_APICBASE, l, h);
67+ enabled_via_apicbase = 1;
68+ }
69 }
70 return apic_verify();
71 }
72@@ -2149,10 +2153,12 @@ static void lapic_resume(void)
73 * FIXME! This will be wrong if we ever support suspend on
74 * SMP! We'll need to do this as part of the CPU restore!
75 */
76- rdmsr(MSR_IA32_APICBASE, l, h);
77- l &= ~MSR_IA32_APICBASE_BASE;
78- l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr;
79- wrmsr(MSR_IA32_APICBASE, l, h);
80+ if (boot_cpu_data.x86 >= 6) {
81+ rdmsr(MSR_IA32_APICBASE, l, h);
82+ l &= ~MSR_IA32_APICBASE_BASE;
83+ l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr;
84+ wrmsr(MSR_IA32_APICBASE, l, h);
85+ }
86 }
87
88 maxlvt = lapic_get_maxlvt();
89--
901.7.7.6
91
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0092-Revert-autofs-work-around-unhappy-compat-problem-on-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0092-Revert-autofs-work-around-unhappy-compat-problem-on-.patch
new file mode 100644
index 00000000..a4c0c071
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0092-Revert-autofs-work-around-unhappy-compat-problem-on-.patch
@@ -0,0 +1,135 @@
1From 57ae2e2d36a3b53fa55c4e1e6cf073f566921c40 Mon Sep 17 00:00:00 2001
2From: Linus Torvalds <torvalds@linux-foundation.org>
3Date: Sat, 28 Apr 2012 08:29:56 -0700
4Subject: [PATCH 092/165] Revert "autofs: work around unhappy compat problem
5 on x86-64"
6
7commit fcbf94b9dedd2ce08e798a99aafc94fec8668161 upstream.
8
9This reverts commit a32744d4abae24572eff7269bc17895c41bd0085.
10
11While that commit was technically the right thing to do, and made the
12x86-64 compat mode work identically to native 32-bit mode (and thus
13fixing the problem with a 32-bit systemd install on a 64-bit kernel), it
14turns out that the automount binaries had workarounds for this compat
15problem.
16
17Now, the workarounds are disgusting: doing an "uname()" to find out the
18architecture of the kernel, and then comparing it for the 64-bit cases
19and fixing up the size of the read() in automount for those. And they
20were confused: it's not actually a generic 64-bit issue at all, it's
21very much tied to just x86-64, which has different alignment for an
22'u64' in 64-bit mode than in 32-bit mode.
23
24But the end result is that fixing the compat layer actually breaks the
25case of a 32-bit automount on a x86-64 kernel.
26
27There are various approaches to fix this (including just doing a
28"strcmp()" on current->comm and comparing it to "automount"), but I
29think that I will do the one that teaches pipes about a special "packet
30mode", which will allow user space to not have to care too deeply about
31the padding at the end of the autofs packet.
32
33That change will make the compat workaround unnecessary, so let's revert
34it first, and get automount working again in compat mode. The
35packetized pipes will then fix autofs for systemd.
36
37Reported-and-requested-by: Michael Tokarev <mjt@tls.msk.ru>
38Cc: Ian Kent <raven@themaw.net>
39Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
40[bwh: Backported to 3.2: adjust context]
41Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
42---
43 fs/autofs4/autofs_i.h | 1 -
44 fs/autofs4/dev-ioctl.c | 1 -
45 fs/autofs4/inode.c | 2 --
46 fs/autofs4/waitq.c | 22 +++-------------------
47 4 files changed, 3 insertions(+), 23 deletions(-)
48
49diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
50index 308a98b..326dc08 100644
51--- a/fs/autofs4/autofs_i.h
52+++ b/fs/autofs4/autofs_i.h
53@@ -110,7 +110,6 @@ struct autofs_sb_info {
54 int sub_version;
55 int min_proto;
56 int max_proto;
57- int compat_daemon;
58 unsigned long exp_timeout;
59 unsigned int type;
60 int reghost_enabled;
61diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
62index 56bac70..509fe1e 100644
63--- a/fs/autofs4/dev-ioctl.c
64+++ b/fs/autofs4/dev-ioctl.c
65@@ -385,7 +385,6 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
66 sbi->pipefd = pipefd;
67 sbi->pipe = pipe;
68 sbi->catatonic = 0;
69- sbi->compat_daemon = is_compat_task();
70 }
71 out:
72 mutex_unlock(&sbi->wq_mutex);
73diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
74index 98a5695..8179f1a 100644
75--- a/fs/autofs4/inode.c
76+++ b/fs/autofs4/inode.c
77@@ -19,7 +19,6 @@
78 #include <linux/parser.h>
79 #include <linux/bitops.h>
80 #include <linux/magic.h>
81-#include <linux/compat.h>
82 #include "autofs_i.h"
83 #include <linux/module.h>
84
85@@ -225,7 +224,6 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
86 set_autofs_type_indirect(&sbi->type);
87 sbi->min_proto = 0;
88 sbi->max_proto = 0;
89- sbi->compat_daemon = is_compat_task();
90 mutex_init(&sbi->wq_mutex);
91 spin_lock_init(&sbi->fs_lock);
92 sbi->queues = NULL;
93diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
94index 6861f61..e1fbdee 100644
95--- a/fs/autofs4/waitq.c
96+++ b/fs/autofs4/waitq.c
97@@ -90,24 +90,7 @@ static int autofs4_write(struct file *file, const void *addr, int bytes)
98
99 return (bytes > 0);
100 }
101-
102-/*
103- * The autofs_v5 packet was misdesigned.
104- *
105- * The packets are identical on x86-32 and x86-64, but have different
106- * alignment. Which means that 'sizeof()' will give different results.
107- * Fix it up for the case of running 32-bit user mode on a 64-bit kernel.
108- */
109-static noinline size_t autofs_v5_packet_size(struct autofs_sb_info *sbi)
110-{
111- size_t pktsz = sizeof(struct autofs_v5_packet);
112-#if defined(CONFIG_X86_64) && defined(CONFIG_COMPAT)
113- if (sbi->compat_daemon > 0)
114- pktsz -= 4;
115-#endif
116- return pktsz;
117-}
118-
119+
120 static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
121 struct autofs_wait_queue *wq,
122 int type)
123@@ -164,7 +147,8 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
124 {
125 struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet;
126
127- pktsz = autofs_v5_packet_size(sbi);
128+ pktsz = sizeof(*packet);
129+
130 packet->wait_queue_token = wq->wait_queue_token;
131 packet->len = wq->name.len;
132 memcpy(packet->name, wq->name.name, wq->name.len);
133--
1341.7.7.6
135
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0093-xen-correctly-check-for-pending-events-when-restorin.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0093-xen-correctly-check-for-pending-events-when-restorin.patch
new file mode 100644
index 00000000..970ac1ce
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0093-xen-correctly-check-for-pending-events-when-restorin.patch
@@ -0,0 +1,47 @@
1From d989ae8669c297a7873a9b5c7e406bc467323388 Mon Sep 17 00:00:00 2001
2From: David Vrabel <david.vrabel@citrix.com>
3Date: Thu, 26 Apr 2012 19:44:06 +0100
4Subject: [PATCH 093/165] xen: correctly check for pending events when
5 restoring irq flags
6
7commit 7eb7ce4d2e8991aff4ecb71a81949a907ca755ac upstream.
8
9In xen_restore_fl_direct(), xen_force_evtchn_callback() was being
10called even if no events were pending. This resulted in (depending on
11workload) about a 100 times as many xen_version hypercalls as
12necessary.
13
14Fix this by correcting the sense of the conditional jump.
15
16This seems to give a significant performance benefit for some
17workloads.
18
19There is some subtle tricksy "..since the check here is trying to
20check both pending and masked in a single cmpw, but I think this is
21correct. It will call check_events now only when the combined
22mask+pending word is 0x0001 (aka unmasked, pending)." (Ian)
23
24Acked-by: Ian Campbell <ian.campbell@citrix.com>
25Signed-off-by: David Vrabel <david.vrabel@citrix.com>
26Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
27Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
28---
29 arch/x86/xen/xen-asm.S | 2 +-
30 1 files changed, 1 insertions(+), 1 deletions(-)
31
32diff --git a/arch/x86/xen/xen-asm.S b/arch/x86/xen/xen-asm.S
33index 79d7362..3e45aa0 100644
34--- a/arch/x86/xen/xen-asm.S
35+++ b/arch/x86/xen/xen-asm.S
36@@ -96,7 +96,7 @@ ENTRY(xen_restore_fl_direct)
37
38 /* check for unmasked and pending */
39 cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
40- jz 1f
41+ jnz 1f
42 2: call check_events
43 1:
44 ENDPATCH(xen_restore_fl_direct)
45--
461.7.7.6
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0094-xen-smp-Fix-crash-when-booting-with-ACPI-hotplug-CPU.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0094-xen-smp-Fix-crash-when-booting-with-ACPI-hotplug-CPU.patch
new file mode 100644
index 00000000..02b157fc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0094-xen-smp-Fix-crash-when-booting-with-ACPI-hotplug-CPU.patch
@@ -0,0 +1,99 @@
1From 7e7b9fb05d7e36d2d585a422de52c3b2e3345cdf Mon Sep 17 00:00:00 2001
2From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
3Date: Thu, 26 Apr 2012 13:50:03 -0400
4Subject: [PATCH 094/165] xen/smp: Fix crash when booting with ACPI hotplug
5 CPUs.
6
7commit cf405ae612b0f7e2358db7ff594c0e94846137aa upstream.
8
9When we boot on a machine that can hotplug CPUs and we
10are using 'dom0_max_vcpus=X' on the Xen hypervisor line
11to clip the amount of CPUs available to the initial domain,
12we get this:
13
14(XEN) Command line: com1=115200,8n1 dom0_mem=8G noreboot dom0_max_vcpus=8 sync_console mce_verbosity=verbose console=com1,vga loglvl=all guest_loglvl=all
15.. snip..
16DMI: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.99.99.x032.072520111118 07/25/2011
17.. snip.
18SMP: Allowing 64 CPUs, 32 hotplug CPUs
19installing Xen timer for CPU 7
20cpu 7 spinlock event irq 361
21NMI watchdog: disabled (cpu7): hardware events not enabled
22Brought up 8 CPUs
23.. snip..
24 [acpi processor finds the CPUs are not initialized and starts calling
25 arch_register_cpu, which creates /sys/devices/system/cpu/cpu8/online]
26CPU 8 got hotplugged
27CPU 9 got hotplugged
28CPU 10 got hotplugged
29.. snip..
30initcall 1_acpi_battery_init_async+0x0/0x1b returned 0 after 406 usecs
31calling erst_init+0x0/0x2bb @ 1
32
33 [and the scheduler sticks newly started tasks on the new CPUs, but
34 said CPUs cannot be initialized b/c the hypervisor has limited the
35 amount of vCPUS to 8 - as per the dom0_max_vcpus=8 flag.
36 The spinlock tries to kick the other CPU, but the structure for that
37 is not initialized and we crash.]
38BUG: unable to handle kernel paging request at fffffffffffffed8
39IP: [<ffffffff81035289>] xen_spin_lock+0x29/0x60
40PGD 180d067 PUD 180e067 PMD 0
41Oops: 0002 [#1] SMP
42CPU 7
43Modules linked in:
44
45Pid: 1, comm: swapper/0 Not tainted 3.4.0-rc2upstream-00001-gf5154e8 #1 Intel Corporation S2600CP/S2600CP
46RIP: e030:[<ffffffff81035289>] [<ffffffff81035289>] xen_spin_lock+0x29/0x60
47RSP: e02b:ffff8801fb9b3a70 EFLAGS: 00010282
48
49With this patch, we cap the amount of vCPUS that the initial domain
50can run, to exactly what dom0_max_vcpus=X has specified.
51
52In the future, if there is a hypercall that will allow a running
53domain to expand past its initial set of vCPUS, this patch should
54be re-evaluated.
55
56Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
57Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
58---
59 arch/x86/xen/smp.c | 15 +++++++++++++++
60 1 files changed, 15 insertions(+), 0 deletions(-)
61
62diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
63index 041d4fe..9a23fff 100644
64--- a/arch/x86/xen/smp.c
65+++ b/arch/x86/xen/smp.c
66@@ -172,6 +172,7 @@ static void __init xen_fill_possible_map(void)
67 static void __init xen_filter_cpu_maps(void)
68 {
69 int i, rc;
70+ unsigned int subtract = 0;
71
72 if (!xen_initial_domain())
73 return;
74@@ -186,8 +187,22 @@ static void __init xen_filter_cpu_maps(void)
75 } else {
76 set_cpu_possible(i, false);
77 set_cpu_present(i, false);
78+ subtract++;
79 }
80 }
81+#ifdef CONFIG_HOTPLUG_CPU
82+ /* This is akin to using 'nr_cpus' on the Linux command line.
83+ * Which is OK as when we use 'dom0_max_vcpus=X' we can only
84+ * have up to X, while nr_cpu_ids is greater than X. This
85+ * normally is not a problem, except when CPU hotplugging
86+ * is involved and then there might be more than X CPUs
87+ * in the guest - which will not work as there is no
88+ * hypercall to expand the max number of VCPUs an already
89+ * running guest has. So cap it up to X. */
90+ if (subtract)
91+ nr_cpu_ids = nr_cpu_ids - subtract;
92+#endif
93+
94 }
95
96 static void __init xen_smp_prepare_boot_cpu(void)
97--
981.7.7.6
99
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0095-ASoC-dapm-Ensure-power-gets-managed-for-line-widgets.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0095-ASoC-dapm-Ensure-power-gets-managed-for-line-widgets.patch
new file mode 100644
index 00000000..e8e04c89
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0095-ASoC-dapm-Ensure-power-gets-managed-for-line-widgets.patch
@@ -0,0 +1,43 @@
1From 5cf5b5db94847bec15c83a7ba69697a74e5248e0 Mon Sep 17 00:00:00 2001
2From: Mark Brown <broonie@opensource.wolfsonmicro.com>
3Date: Thu, 12 Apr 2012 17:29:36 +0100
4Subject: [PATCH 095/165] ASoC: dapm: Ensure power gets managed for line
5 widgets
6
7commit 7e1f7c8a6e517900cd84da1b8ae020f08f286c3b upstream.
8
9Line widgets had not been included in either the power up or power down
10sequences so if a widget had an event associated with it that event would
11never be run. Fix this minimally by adding them to the sequences, we
12should probably be doing away with the specific widget types as they all
13have the same priority anyway.
14
15Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 sound/soc/soc-dapm.c | 2 ++
19 1 files changed, 2 insertions(+), 0 deletions(-)
20
21diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
22index ea909c5..90e93bf 100644
23--- a/sound/soc/soc-dapm.c
24+++ b/sound/soc/soc-dapm.c
25@@ -69,6 +69,7 @@ static int dapm_up_seq[] = {
26 [snd_soc_dapm_out_drv] = 10,
27 [snd_soc_dapm_hp] = 10,
28 [snd_soc_dapm_spk] = 10,
29+ [snd_soc_dapm_line] = 10,
30 [snd_soc_dapm_post] = 11,
31 };
32
33@@ -77,6 +78,7 @@ static int dapm_down_seq[] = {
34 [snd_soc_dapm_adc] = 1,
35 [snd_soc_dapm_hp] = 2,
36 [snd_soc_dapm_spk] = 2,
37+ [snd_soc_dapm_line] = 2,
38 [snd_soc_dapm_out_drv] = 2,
39 [snd_soc_dapm_pga] = 4,
40 [snd_soc_dapm_mixer_named_ctl] = 5,
41--
421.7.7.6
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0096-ASoC-wm8994-Improve-sequencing-of-AIF-channel-enable.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0096-ASoC-wm8994-Improve-sequencing-of-AIF-channel-enable.patch
new file mode 100644
index 00000000..a576f062
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0096-ASoC-wm8994-Improve-sequencing-of-AIF-channel-enable.patch
@@ -0,0 +1,389 @@
1From 18ea02a9ec95869c1210e6ea2f10dee99c36edbd Mon Sep 17 00:00:00 2001
2From: Mark Brown <broonie@opensource.wolfsonmicro.com>
3Date: Thu, 12 Apr 2012 19:47:11 +0100
4Subject: [PATCH 096/165] ASoC: wm8994: Improve sequencing of AIF channel
5 enables
6
7commit 1a38336b8611a04f0a624330c1f815421f4bf5f4 upstream.
8
9This ensures a clean startup of the channels, without this change some
10use cases could result in issues in a small proportion of cases.
11
12Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 sound/soc/codecs/wm8994.c | 276 ++++++++++++++++++++++++++++++++++++---------
16 1 files changed, 222 insertions(+), 54 deletions(-)
17
18diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
19index 2f1f5f8..7806301 100644
20--- a/sound/soc/codecs/wm8994.c
21+++ b/sound/soc/codecs/wm8994.c
22@@ -883,61 +883,170 @@ static void wm8994_update_class_w(struct snd_soc_codec *codec)
23 }
24 }
25
26-static int late_enable_ev(struct snd_soc_dapm_widget *w,
27- struct snd_kcontrol *kcontrol, int event)
28+static int aif1clk_ev(struct snd_soc_dapm_widget *w,
29+ struct snd_kcontrol *kcontrol, int event)
30 {
31 struct snd_soc_codec *codec = w->codec;
32- struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
33+ struct wm8994 *control = codec->control_data;
34+ int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA;
35+ int dac;
36+ int adc;
37+ int val;
38+
39+ switch (control->type) {
40+ case WM8994:
41+ case WM8958:
42+ mask |= WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA;
43+ break;
44+ default:
45+ break;
46+ }
47
48 switch (event) {
49 case SND_SOC_DAPM_PRE_PMU:
50- if (wm8994->aif1clk_enable) {
51- snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1,
52- WM8994_AIF1CLK_ENA_MASK,
53- WM8994_AIF1CLK_ENA);
54- wm8994->aif1clk_enable = 0;
55- }
56- if (wm8994->aif2clk_enable) {
57- snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1,
58- WM8994_AIF2CLK_ENA_MASK,
59- WM8994_AIF2CLK_ENA);
60- wm8994->aif2clk_enable = 0;
61- }
62+ val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1);
63+ if ((val & WM8994_AIF1ADCL_SRC) &&
64+ (val & WM8994_AIF1ADCR_SRC))
65+ adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA;
66+ else if (!(val & WM8994_AIF1ADCL_SRC) &&
67+ !(val & WM8994_AIF1ADCR_SRC))
68+ adc = WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA;
69+ else
70+ adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA |
71+ WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA;
72+
73+ val = snd_soc_read(codec, WM8994_AIF1_CONTROL_2);
74+ if ((val & WM8994_AIF1DACL_SRC) &&
75+ (val & WM8994_AIF1DACR_SRC))
76+ dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA;
77+ else if (!(val & WM8994_AIF1DACL_SRC) &&
78+ !(val & WM8994_AIF1DACR_SRC))
79+ dac = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA;
80+ else
81+ dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA |
82+ WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA;
83+
84+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4,
85+ mask, adc);
86+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
87+ mask, dac);
88+ snd_soc_update_bits(codec, WM8994_CLOCKING_1,
89+ WM8994_AIF1DSPCLK_ENA |
90+ WM8994_SYSDSPCLK_ENA,
91+ WM8994_AIF1DSPCLK_ENA |
92+ WM8994_SYSDSPCLK_ENA);
93+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, mask,
94+ WM8994_AIF1ADC1R_ENA |
95+ WM8994_AIF1ADC1L_ENA |
96+ WM8994_AIF1ADC2R_ENA |
97+ WM8994_AIF1ADC2L_ENA);
98+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, mask,
99+ WM8994_AIF1DAC1R_ENA |
100+ WM8994_AIF1DAC1L_ENA |
101+ WM8994_AIF1DAC2R_ENA |
102+ WM8994_AIF1DAC2L_ENA);
103+ break;
104+
105+ case SND_SOC_DAPM_PRE_PMD:
106+ case SND_SOC_DAPM_POST_PMD:
107+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
108+ mask, 0);
109+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4,
110+ mask, 0);
111+
112+ val = snd_soc_read(codec, WM8994_CLOCKING_1);
113+ if (val & WM8994_AIF2DSPCLK_ENA)
114+ val = WM8994_SYSDSPCLK_ENA;
115+ else
116+ val = 0;
117+ snd_soc_update_bits(codec, WM8994_CLOCKING_1,
118+ WM8994_SYSDSPCLK_ENA |
119+ WM8994_AIF1DSPCLK_ENA, val);
120 break;
121 }
122
123- /* We may also have postponed startup of DSP, handle that. */
124- wm8958_aif_ev(w, kcontrol, event);
125-
126 return 0;
127 }
128
129-static int late_disable_ev(struct snd_soc_dapm_widget *w,
130- struct snd_kcontrol *kcontrol, int event)
131+static int aif2clk_ev(struct snd_soc_dapm_widget *w,
132+ struct snd_kcontrol *kcontrol, int event)
133 {
134 struct snd_soc_codec *codec = w->codec;
135- struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
136+ int dac;
137+ int adc;
138+ int val;
139
140 switch (event) {
141+ case SND_SOC_DAPM_PRE_PMU:
142+ val = snd_soc_read(codec, WM8994_AIF2_CONTROL_1);
143+ if ((val & WM8994_AIF2ADCL_SRC) &&
144+ (val & WM8994_AIF2ADCR_SRC))
145+ adc = WM8994_AIF2ADCR_ENA;
146+ else if (!(val & WM8994_AIF2ADCL_SRC) &&
147+ !(val & WM8994_AIF2ADCR_SRC))
148+ adc = WM8994_AIF2ADCL_ENA;
149+ else
150+ adc = WM8994_AIF2ADCL_ENA | WM8994_AIF2ADCR_ENA;
151+
152+
153+ val = snd_soc_read(codec, WM8994_AIF2_CONTROL_2);
154+ if ((val & WM8994_AIF2DACL_SRC) &&
155+ (val & WM8994_AIF2DACR_SRC))
156+ dac = WM8994_AIF2DACR_ENA;
157+ else if (!(val & WM8994_AIF2DACL_SRC) &&
158+ !(val & WM8994_AIF2DACR_SRC))
159+ dac = WM8994_AIF2DACL_ENA;
160+ else
161+ dac = WM8994_AIF2DACL_ENA | WM8994_AIF2DACR_ENA;
162+
163+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4,
164+ WM8994_AIF2ADCL_ENA |
165+ WM8994_AIF2ADCR_ENA, adc);
166+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
167+ WM8994_AIF2DACL_ENA |
168+ WM8994_AIF2DACR_ENA, dac);
169+ snd_soc_update_bits(codec, WM8994_CLOCKING_1,
170+ WM8994_AIF2DSPCLK_ENA |
171+ WM8994_SYSDSPCLK_ENA,
172+ WM8994_AIF2DSPCLK_ENA |
173+ WM8994_SYSDSPCLK_ENA);
174+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4,
175+ WM8994_AIF2ADCL_ENA |
176+ WM8994_AIF2ADCR_ENA,
177+ WM8994_AIF2ADCL_ENA |
178+ WM8994_AIF2ADCR_ENA);
179+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
180+ WM8994_AIF2DACL_ENA |
181+ WM8994_AIF2DACR_ENA,
182+ WM8994_AIF2DACL_ENA |
183+ WM8994_AIF2DACR_ENA);
184+ break;
185+
186+ case SND_SOC_DAPM_PRE_PMD:
187 case SND_SOC_DAPM_POST_PMD:
188- if (wm8994->aif1clk_disable) {
189- snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1,
190- WM8994_AIF1CLK_ENA_MASK, 0);
191- wm8994->aif1clk_disable = 0;
192- }
193- if (wm8994->aif2clk_disable) {
194- snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1,
195- WM8994_AIF2CLK_ENA_MASK, 0);
196- wm8994->aif2clk_disable = 0;
197- }
198+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
199+ WM8994_AIF2DACL_ENA |
200+ WM8994_AIF2DACR_ENA, 0);
201+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
202+ WM8994_AIF2ADCL_ENA |
203+ WM8994_AIF2ADCR_ENA, 0);
204+
205+ val = snd_soc_read(codec, WM8994_CLOCKING_1);
206+ if (val & WM8994_AIF1DSPCLK_ENA)
207+ val = WM8994_SYSDSPCLK_ENA;
208+ else
209+ val = 0;
210+ snd_soc_update_bits(codec, WM8994_CLOCKING_1,
211+ WM8994_SYSDSPCLK_ENA |
212+ WM8994_AIF2DSPCLK_ENA, val);
213 break;
214 }
215
216 return 0;
217 }
218
219-static int aif1clk_ev(struct snd_soc_dapm_widget *w,
220- struct snd_kcontrol *kcontrol, int event)
221+static int aif1clk_late_ev(struct snd_soc_dapm_widget *w,
222+ struct snd_kcontrol *kcontrol, int event)
223 {
224 struct snd_soc_codec *codec = w->codec;
225 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
226@@ -954,8 +1063,8 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w,
227 return 0;
228 }
229
230-static int aif2clk_ev(struct snd_soc_dapm_widget *w,
231- struct snd_kcontrol *kcontrol, int event)
232+static int aif2clk_late_ev(struct snd_soc_dapm_widget *w,
233+ struct snd_kcontrol *kcontrol, int event)
234 {
235 struct snd_soc_codec *codec = w->codec;
236 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
237@@ -972,6 +1081,63 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w,
238 return 0;
239 }
240
241+static int late_enable_ev(struct snd_soc_dapm_widget *w,
242+ struct snd_kcontrol *kcontrol, int event)
243+{
244+ struct snd_soc_codec *codec = w->codec;
245+ struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
246+
247+ switch (event) {
248+ case SND_SOC_DAPM_PRE_PMU:
249+ if (wm8994->aif1clk_enable) {
250+ aif1clk_ev(w, kcontrol, event);
251+ snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1,
252+ WM8994_AIF1CLK_ENA_MASK,
253+ WM8994_AIF1CLK_ENA);
254+ wm8994->aif1clk_enable = 0;
255+ }
256+ if (wm8994->aif2clk_enable) {
257+ aif2clk_ev(w, kcontrol, event);
258+ snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1,
259+ WM8994_AIF2CLK_ENA_MASK,
260+ WM8994_AIF2CLK_ENA);
261+ wm8994->aif2clk_enable = 0;
262+ }
263+ break;
264+ }
265+
266+ /* We may also have postponed startup of DSP, handle that. */
267+ wm8958_aif_ev(w, kcontrol, event);
268+
269+ return 0;
270+}
271+
272+static int late_disable_ev(struct snd_soc_dapm_widget *w,
273+ struct snd_kcontrol *kcontrol, int event)
274+{
275+ struct snd_soc_codec *codec = w->codec;
276+ struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
277+
278+ switch (event) {
279+ case SND_SOC_DAPM_POST_PMD:
280+ if (wm8994->aif1clk_disable) {
281+ snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1,
282+ WM8994_AIF1CLK_ENA_MASK, 0);
283+ aif1clk_ev(w, kcontrol, event);
284+ wm8994->aif1clk_disable = 0;
285+ }
286+ if (wm8994->aif2clk_disable) {
287+ snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1,
288+ WM8994_AIF2CLK_ENA_MASK, 0);
289+ aif2clk_ev(w, kcontrol, event);
290+ wm8994->aif2clk_disable = 0;
291+ }
292+ break;
293+ }
294+
295+ return 0;
296+}
297+
298 static int adc_mux_ev(struct snd_soc_dapm_widget *w,
299 struct snd_kcontrol *kcontrol, int event)
300 {
301@@ -1268,9 +1434,9 @@ static const struct snd_kcontrol_new aif2dacr_src_mux =
302 SOC_DAPM_ENUM("AIF2DACR Mux", aif2dacr_src_enum);
303
304 static const struct snd_soc_dapm_widget wm8994_lateclk_revd_widgets[] = {
305-SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_ev,
306+SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_late_ev,
307 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
308-SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_ev,
309+SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_late_ev,
310 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
311
312 SND_SOC_DAPM_PGA_E("Late DAC1L Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0,
313@@ -1299,8 +1465,10 @@ SND_SOC_DAPM_POST("Late Disable PGA", late_disable_ev)
314 };
315
316 static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = {
317-SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0),
318-SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0),
319+SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, aif1clk_ev,
320+ SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD),
321+SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, aif2clk_ev,
322+ SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD),
323 SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0),
324 SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0,
325 left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)),
326@@ -1353,30 +1521,30 @@ SND_SOC_DAPM_SUPPLY("VMID", SND_SOC_NOPM, 0, 0, vmid_event,
327 SND_SOC_DAPM_SUPPLY("CLK_SYS", SND_SOC_NOPM, 0, 0, clk_sys_event,
328 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
329
330-SND_SOC_DAPM_SUPPLY("DSP1CLK", WM8994_CLOCKING_1, 3, 0, NULL, 0),
331-SND_SOC_DAPM_SUPPLY("DSP2CLK", WM8994_CLOCKING_1, 2, 0, NULL, 0),
332-SND_SOC_DAPM_SUPPLY("DSPINTCLK", WM8994_CLOCKING_1, 1, 0, NULL, 0),
333+SND_SOC_DAPM_SUPPLY("DSP1CLK", SND_SOC_NOPM, 3, 0, NULL, 0),
334+SND_SOC_DAPM_SUPPLY("DSP2CLK", SND_SOC_NOPM, 2, 0, NULL, 0),
335+SND_SOC_DAPM_SUPPLY("DSPINTCLK", SND_SOC_NOPM, 1, 0, NULL, 0),
336
337 SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", NULL,
338- 0, WM8994_POWER_MANAGEMENT_4, 9, 0),
339+ 0, SND_SOC_NOPM, 9, 0),
340 SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", NULL,
341- 0, WM8994_POWER_MANAGEMENT_4, 8, 0),
342+ 0, SND_SOC_NOPM, 8, 0),
343 SND_SOC_DAPM_AIF_IN_E("AIF1DAC1L", NULL, 0,
344- WM8994_POWER_MANAGEMENT_5, 9, 0, wm8958_aif_ev,
345+ SND_SOC_NOPM, 9, 0, wm8958_aif_ev,
346 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
347 SND_SOC_DAPM_AIF_IN_E("AIF1DAC1R", NULL, 0,
348- WM8994_POWER_MANAGEMENT_5, 8, 0, wm8958_aif_ev,
349+ SND_SOC_NOPM, 8, 0, wm8958_aif_ev,
350 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
351
352 SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", NULL,
353- 0, WM8994_POWER_MANAGEMENT_4, 11, 0),
354+ 0, SND_SOC_NOPM, 11, 0),
355 SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", NULL,
356- 0, WM8994_POWER_MANAGEMENT_4, 10, 0),
357+ 0, SND_SOC_NOPM, 10, 0),
358 SND_SOC_DAPM_AIF_IN_E("AIF1DAC2L", NULL, 0,
359- WM8994_POWER_MANAGEMENT_5, 11, 0, wm8958_aif_ev,
360+ SND_SOC_NOPM, 11, 0, wm8958_aif_ev,
361 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
362 SND_SOC_DAPM_AIF_IN_E("AIF1DAC2R", NULL, 0,
363- WM8994_POWER_MANAGEMENT_5, 10, 0, wm8958_aif_ev,
364+ SND_SOC_NOPM, 10, 0, wm8958_aif_ev,
365 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
366
367 SND_SOC_DAPM_MIXER("AIF1ADC1L Mixer", SND_SOC_NOPM, 0, 0,
368@@ -1403,14 +1571,14 @@ SND_SOC_DAPM_MIXER("DAC1R Mixer", SND_SOC_NOPM, 0, 0,
369 dac1r_mix, ARRAY_SIZE(dac1r_mix)),
370
371 SND_SOC_DAPM_AIF_OUT("AIF2ADCL", NULL, 0,
372- WM8994_POWER_MANAGEMENT_4, 13, 0),
373+ SND_SOC_NOPM, 13, 0),
374 SND_SOC_DAPM_AIF_OUT("AIF2ADCR", NULL, 0,
375- WM8994_POWER_MANAGEMENT_4, 12, 0),
376+ SND_SOC_NOPM, 12, 0),
377 SND_SOC_DAPM_AIF_IN_E("AIF2DACL", NULL, 0,
378- WM8994_POWER_MANAGEMENT_5, 13, 0, wm8958_aif_ev,
379+ SND_SOC_NOPM, 13, 0, wm8958_aif_ev,
380 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
381 SND_SOC_DAPM_AIF_IN_E("AIF2DACR", NULL, 0,
382- WM8994_POWER_MANAGEMENT_5, 12, 0, wm8958_aif_ev,
383+ SND_SOC_NOPM, 12, 0, wm8958_aif_ev,
384 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
385
386 SND_SOC_DAPM_AIF_IN("AIF1DACDAT", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0),
387--
3881.7.7.6
389
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0097-dmaengine-at_hdmac-remove-clear-on-read-in-atc_dosta.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0097-dmaengine-at_hdmac-remove-clear-on-read-in-atc_dosta.patch
new file mode 100644
index 00000000..b670af28
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0097-dmaengine-at_hdmac-remove-clear-on-read-in-atc_dosta.patch
@@ -0,0 +1,40 @@
1From 461507ae293668a6dd1543092d2506fa4524d8ec Mon Sep 17 00:00:00 2001
2From: Nicolas Ferre <nicolas.ferre@atmel.com>
3Date: Mon, 16 Apr 2012 14:46:30 +0200
4Subject: [PATCH 097/165] dmaengine: at_hdmac: remove clear-on-read in
5 atc_dostart()
6
7commit ed8b0d67f33518a16c6b2450fe5ebebf180c2d04 upstream.
8
9This loop on EBCISR register was designed to clear IRQ sources before enabling
10a DMA channel. This register is clear-on-read so a race condition can appear if
11another channel is already active and has just finished its transfer.
12Removing this read on EBCISR is fixing the issue as there is no case where an IRQ
13could be pending: we already make sure that this register is drained at probe()
14time and during resume.
15
16Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
17Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/dma/at_hdmac.c | 4 ----
21 1 files changed, 0 insertions(+), 4 deletions(-)
22
23diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
24index a60adbf..79dcf6e 100644
25--- a/drivers/dma/at_hdmac.c
26+++ b/drivers/dma/at_hdmac.c
27@@ -239,10 +239,6 @@ static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first)
28
29 vdbg_dump_regs(atchan);
30
31- /* clear any pending interrupt */
32- while (dma_readl(atdma, EBCISR))
33- cpu_relax();
34-
35 channel_writel(atchan, SADDR, 0);
36 channel_writel(atchan, DADDR, 0);
37 channel_writel(atchan, CTRLA, 0);
38--
391.7.7.6
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0098-sched-Fix-OOPS-when-build_sched_domains-percpu-alloc.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0098-sched-Fix-OOPS-when-build_sched_domains-percpu-alloc.patch
new file mode 100644
index 00000000..91318c4b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0098-sched-Fix-OOPS-when-build_sched_domains-percpu-alloc.patch
@@ -0,0 +1,85 @@
1From 9568d8a7012a9ca0fafc44570e46030d60f22a91 Mon Sep 17 00:00:00 2001
2From: "he, bo" <bo.he@intel.com>
3Date: Wed, 25 Apr 2012 19:59:21 +0800
4Subject: [PATCH 098/165] sched: Fix OOPS when build_sched_domains() percpu
5 allocation fails
6
7commit fb2cf2c660971bea0ad86a9a5c19ad39eab61344 upstream.
8
9Under extreme memory used up situations, percpu allocation
10might fail. We hit it when system goes to suspend-to-ram,
11causing a kworker panic:
12
13 EIP: [<c124411a>] build_sched_domains+0x23a/0xad0
14 Kernel panic - not syncing: Fatal exception
15 Pid: 3026, comm: kworker/u:3
16 3.0.8-137473-gf42fbef #1
17
18 Call Trace:
19 [<c18cc4f2>] panic+0x66/0x16c
20 [...]
21 [<c1244c37>] partition_sched_domains+0x287/0x4b0
22 [<c12a77be>] cpuset_update_active_cpus+0x1fe/0x210
23 [<c123712d>] cpuset_cpu_inactive+0x1d/0x30
24 [...]
25
26With this fix applied build_sched_domains() will return -ENOMEM and
27the suspend attempt fails.
28
29Signed-off-by: he, bo <bo.he@intel.com>
30Reviewed-by: Zhang, Yanmin <yanmin.zhang@intel.com>
31Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
32Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
33Cc: Linus Torvalds <torvalds@linux-foundation.org>
34Cc: Andrew Morton <akpm@linux-foundation.org>
35Link: http://lkml.kernel.org/r/1335355161.5892.17.camel@hebo
36[ So, we fail to deallocate a CPU because we cannot allocate RAM :-/
37 I don't like that kind of sad behavior but nevertheless it should
38 not crash under high memory load. ]
39Signed-off-by: Ingo Molnar <mingo@kernel.org>
40[bwh: Backported to 3.2: change filename]
41Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
42---
43 kernel/sched.c | 22 ++++++++++++++++------
44 1 files changed, 16 insertions(+), 6 deletions(-)
45
46diff --git a/kernel/sched.c b/kernel/sched.c
47index d6b149c..106a3b8 100644
48--- a/kernel/sched.c
49+++ b/kernel/sched.c
50@@ -7605,16 +7605,26 @@ static void __sdt_free(const struct cpumask *cpu_map)
51 struct sd_data *sdd = &tl->data;
52
53 for_each_cpu(j, cpu_map) {
54- struct sched_domain *sd = *per_cpu_ptr(sdd->sd, j);
55- if (sd && (sd->flags & SD_OVERLAP))
56- free_sched_groups(sd->groups, 0);
57- kfree(*per_cpu_ptr(sdd->sd, j));
58- kfree(*per_cpu_ptr(sdd->sg, j));
59- kfree(*per_cpu_ptr(sdd->sgp, j));
60+ struct sched_domain *sd;
61+
62+ if (sdd->sd) {
63+ sd = *per_cpu_ptr(sdd->sd, j);
64+ if (sd && (sd->flags & SD_OVERLAP))
65+ free_sched_groups(sd->groups, 0);
66+ kfree(*per_cpu_ptr(sdd->sd, j));
67+ }
68+
69+ if (sdd->sg)
70+ kfree(*per_cpu_ptr(sdd->sg, j));
71+ if (sdd->sgp)
72+ kfree(*per_cpu_ptr(sdd->sgp, j));
73 }
74 free_percpu(sdd->sd);
75+ sdd->sd = NULL;
76 free_percpu(sdd->sg);
77+ sdd->sg = NULL;
78 free_percpu(sdd->sgp);
79+ sdd->sgp = NULL;
80 }
81 }
82
83--
841.7.7.6
85
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0099-tracing-Fix-stacktrace-of-latency-tracers-irqsoff-an.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0099-tracing-Fix-stacktrace-of-latency-tracers-irqsoff-an.patch
new file mode 100644
index 00000000..191d6b89
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0099-tracing-Fix-stacktrace-of-latency-tracers-irqsoff-an.patch
@@ -0,0 +1,62 @@
1From e2b214ae8c691f0fd7aeb572dda62401b9221ee4 Mon Sep 17 00:00:00 2001
2From: Steven Rostedt <srostedt@redhat.com>
3Date: Thu, 19 Apr 2012 10:31:47 -0400
4Subject: [PATCH 099/165] tracing: Fix stacktrace of latency tracers (irqsoff
5 and friends)
6
7commit db4c75cbebd7e5910cd3bcb6790272fcc3042857 upstream.
8
9While debugging a latency with someone on IRC (mirage335) on #linux-rt (OFTC),
10we discovered that the stacktrace output of the latency tracers
11(preemptirqsoff) was empty.
12
13This bug was caused by the creation of the dynamic length stack trace
14again (like commit 12b5da3 "tracing: Fix ent_size in trace output" was).
15
16This bug is caused by the latency tracers requiring the next event
17to determine the time between the current event and the next. But by
18grabbing the next event, the iter->ent_size is set to the next event
19instead of the current one. As the stacktrace event is the last event,
20this makes the ent_size zero and causes nothing to be printed for
21the stack trace. The dynamic stacktrace uses the ent_size to determine
22how much of the stack can be printed. The ent_size of zero means
23no stack.
24
25The simple fix is to save the iter->ent_size before finding the next event.
26
27Note, mirage335 asked to remain anonymous from LKML and git, so I will
28not add the Reported-by and Tested-by tags, even though he did report
29the issue and tested the fix.
30
31Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
32Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
33---
34 kernel/trace/trace_output.c | 5 +++++
35 1 files changed, 5 insertions(+), 0 deletions(-)
36
37diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
38index 5199930..1dcf253 100644
39--- a/kernel/trace/trace_output.c
40+++ b/kernel/trace/trace_output.c
41@@ -638,6 +638,8 @@ int trace_print_lat_context(struct trace_iterator *iter)
42 {
43 u64 next_ts;
44 int ret;
45+ /* trace_find_next_entry will reset ent_size */
46+ int ent_size = iter->ent_size;
47 struct trace_seq *s = &iter->seq;
48 struct trace_entry *entry = iter->ent,
49 *next_entry = trace_find_next_entry(iter, NULL,
50@@ -646,6 +648,9 @@ int trace_print_lat_context(struct trace_iterator *iter)
51 unsigned long abs_usecs = ns2usecs(iter->ts - iter->tr->time_start);
52 unsigned long rel_usecs;
53
54+ /* Restore the original ent_size */
55+ iter->ent_size = ent_size;
56+
57 if (!next_entry)
58 next_ts = iter->ts;
59 rel_usecs = ns2usecs(next_ts - iter->ts);
60--
611.7.7.6
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0100-hwmon-fam15h_power-fix-bogus-values-with-current-BIO.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0100-hwmon-fam15h_power-fix-bogus-values-with-current-BIO.patch
new file mode 100644
index 00000000..b09d80fb
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0100-hwmon-fam15h_power-fix-bogus-values-with-current-BIO.patch
@@ -0,0 +1,93 @@
1From 9c1a0e414fb67307c1e9e7c7a81f5aa32fb3165d Mon Sep 17 00:00:00 2001
2From: Andre Przywara <andre.przywara@amd.com>
3Date: Mon, 9 Apr 2012 18:16:34 -0400
4Subject: [PATCH 100/165] hwmon: fam15h_power: fix bogus values with current
5 BIOSes
6
7commit 00250ec90963b7ef6678438888f3244985ecde14 upstream.
8
9Newer BKDG[1] versions recommend a different initialization value for
10the running average range register in the northbridge. This improves
11the power reading by avoiding counter saturations resulting in bogus
12values for anything below about 80% of TDP power consumption.
13Updated BIOSes will have this new value set up from the beginning,
14but meanwhile we correct this value ourselves.
15This needs to be done on all northbridges, even on those where the
16driver itself does not register at.
17
18This fixes the driver on all current machines to provide proper
19values for idle load.
20
21[1]
22http://support.amd.com/us/Processor_TechDocs/42301_15h_Mod_00h-0Fh_BKDG.pdf
23Chapter 3.8: D18F5xE0 Processor TDP Running Average (p. 452)
24
25Signed-off-by: Andre Przywara <andre.przywara@amd.com>
26Acked-by: Jean Delvare <khali@linux-fr.org>
27[guenter.roeck@ericsson.com: Removed unnecessary return statement]
28Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
29Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
30---
31 drivers/hwmon/fam15h_power.c | 39 +++++++++++++++++++++++++++++++++++++++
32 1 files changed, 39 insertions(+), 0 deletions(-)
33
34diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
35index 930370d..99aaf2e 100644
36--- a/drivers/hwmon/fam15h_power.c
37+++ b/drivers/hwmon/fam15h_power.c
38@@ -122,6 +122,38 @@ static bool __devinit fam15h_power_is_internal_node0(struct pci_dev *f4)
39 return true;
40 }
41
42+/*
43+ * Newer BKDG versions have an updated recommendation on how to properly
44+ * initialize the running average range (was: 0xE, now: 0x9). This avoids
45+ * counter saturations resulting in bogus power readings.
46+ * We correct this value ourselves to cope with older BIOSes.
47+ */
48+static void __devinit tweak_runavg_range(struct pci_dev *pdev)
49+{
50+ u32 val;
51+ const struct pci_device_id affected_device = {
52+ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) };
53+
54+ /*
55+ * let this quirk apply only to the current version of the
56+ * northbridge, since future versions may change the behavior
57+ */
58+ if (!pci_match_id(&affected_device, pdev))
59+ return;
60+
61+ pci_bus_read_config_dword(pdev->bus,
62+ PCI_DEVFN(PCI_SLOT(pdev->devfn), 5),
63+ REG_TDP_RUNNING_AVERAGE, &val);
64+ if ((val & 0xf) != 0xe)
65+ return;
66+
67+ val &= ~0xf;
68+ val |= 0x9;
69+ pci_bus_write_config_dword(pdev->bus,
70+ PCI_DEVFN(PCI_SLOT(pdev->devfn), 5),
71+ REG_TDP_RUNNING_AVERAGE, val);
72+}
73+
74 static void __devinit fam15h_power_init_data(struct pci_dev *f4,
75 struct fam15h_power_data *data)
76 {
77@@ -155,6 +187,13 @@ static int __devinit fam15h_power_probe(struct pci_dev *pdev,
78 struct device *dev;
79 int err;
80
81+ /*
82+ * though we ignore every other northbridge, we still have to
83+ * do the tweaking on _each_ node in MCM processors as the counters
84+ * are working hand-in-hand
85+ */
86+ tweak_runavg_range(pdev);
87+
88 if (!fam15h_power_is_internal_node0(pdev)) {
89 err = -ENODEV;
90 goto exit;
91--
921.7.7.6
93
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0101-hwmon-fam15h_power-Fix-pci_device_id-array.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0101-hwmon-fam15h_power-Fix-pci_device_id-array.patch
new file mode 100644
index 00000000..44a4282a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0101-hwmon-fam15h_power-Fix-pci_device_id-array.patch
@@ -0,0 +1,49 @@
1From 1acc2cf212b6af4889076ca69cc08f56ddb02161 Mon Sep 17 00:00:00 2001
2From: Guenter Roeck <guenter.roeck@ericsson.com>
3Date: Wed, 25 Apr 2012 13:44:20 -0700
4Subject: [PATCH 101/165] hwmon: (fam15h_power) Fix pci_device_id array
5
6commit c3e40a9972428d6e2d8e287ed0233a57a218c30f upstream.
7
8pci_match_id() takes an *array* of IDs which must be properly zero-
9terminated.
10
11Reported-by: Ben Hutchings <ben@decadent.org.uk>
12Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
13Acked-by: Jean Delvare <khali@linux-fr.org>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 drivers/hwmon/fam15h_power.c | 9 ++++++---
17 1 files changed, 6 insertions(+), 3 deletions(-)
18
19diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
20index 99aaf2e..9a4c3ab 100644
21--- a/drivers/hwmon/fam15h_power.c
22+++ b/drivers/hwmon/fam15h_power.c
23@@ -128,17 +128,20 @@ static bool __devinit fam15h_power_is_internal_node0(struct pci_dev *f4)
24 * counter saturations resulting in bogus power readings.
25 * We correct this value ourselves to cope with older BIOSes.
26 */
27+static DEFINE_PCI_DEVICE_TABLE(affected_device) = {
28+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
29+ { 0 }
30+};
31+
32 static void __devinit tweak_runavg_range(struct pci_dev *pdev)
33 {
34 u32 val;
35- const struct pci_device_id affected_device = {
36- PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) };
37
38 /*
39 * let this quirk apply only to the current version of the
40 * northbridge, since future versions may change the behavior
41 */
42- if (!pci_match_id(&affected_device, pdev))
43+ if (!pci_match_id(affected_device, pdev))
44 return;
45
46 pci_bus_read_config_dword(pdev->bus,
47--
481.7.7.6
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0102-dell-laptop-Terminate-quirks-list-properly.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0102-dell-laptop-Terminate-quirks-list-properly.patch
new file mode 100644
index 00000000..69d47481
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0102-dell-laptop-Terminate-quirks-list-properly.patch
@@ -0,0 +1,32 @@
1From d53a6237d32c4a220706555cb5ac5bfa439495fc Mon Sep 17 00:00:00 2001
2From: Martin Nyhus <martin.nyhus@gmx.com>
3Date: Thu, 15 Mar 2012 18:25:48 +0100
4Subject: [PATCH 102/165] dell-laptop: Terminate quirks list properly
5
6commit d62d421b071b08249361044d8e56c8b5c3ed6aa7 upstream.
7
8Add missing DMI_NONE entry to end of the quirks list so
9dmi_check_system() won't read past the end of the list.
10
11Signed-off-by: Martin Nyhus <martin.nyhus@gmx.com>
12Signed-off-by: Matthew Garrett <mjg@redhat.com>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 drivers/platform/x86/dell-laptop.c | 1 +
16 1 files changed, 1 insertions(+), 0 deletions(-)
17
18diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
19index 92e42d4..1d3bcce 100644
20--- a/drivers/platform/x86/dell-laptop.c
21+++ b/drivers/platform/x86/dell-laptop.c
22@@ -211,6 +211,7 @@ static struct dmi_system_id __devinitdata dell_quirks[] = {
23 },
24 .driver_data = &quirk_dell_vostro_v130,
25 },
26+ { }
27 };
28
29 static struct calling_interface_buffer *buffer;
30--
311.7.7.6
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0103-drm-radeon-kms-need-to-set-up-ss-on-DP-bridges-as-we.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0103-drm-radeon-kms-need-to-set-up-ss-on-DP-bridges-as-we.patch
new file mode 100644
index 00000000..f444f581
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0103-drm-radeon-kms-need-to-set-up-ss-on-DP-bridges-as-we.patch
@@ -0,0 +1,40 @@
1From 8c6a4eb92e96889d0a8666eb32fd43307db5e554 Mon Sep 17 00:00:00 2001
2From: Alex Deucher <alexander.deucher@amd.com>
3Date: Fri, 27 Apr 2012 17:18:59 -0400
4Subject: [PATCH 103/165] drm/radeon/kms: need to set up ss on DP bridges as
5 well
6
7commit 700698e7c303f5095107c62a81872c2c3dad1702 upstream.
8
9Makes Nutmeg DP to VGA bridges work for me.
10
11Fixes:
12https://bugs.freedesktop.org/show_bug.cgi?id=42490
13
14Noticed by Jerome Glisse (after weeks of debugging).
15
16Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
17Signed-off-by: Dave Airlie <airlied@redhat.com>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/gpu/drm/radeon/atombios_crtc.c | 4 ++--
21 1 files changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
24index b30081f..757c549 100644
25--- a/drivers/gpu/drm/radeon/atombios_crtc.c
26+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
27@@ -917,8 +917,8 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode
28 break;
29 }
30
31- if (radeon_encoder->active_device &
32- (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) {
33+ if ((radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) ||
34+ (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE)) {
35 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
36 struct drm_connector *connector =
37 radeon_get_connector_for_encoder(encoder);
38--
391.7.7.6
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0104-drm-i915-handle-input-output-sdvo-timings-separately.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0104-drm-i915-handle-input-output-sdvo-timings-separately.patch
new file mode 100644
index 00000000..36df16e7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0104-drm-i915-handle-input-output-sdvo-timings-separately.patch
@@ -0,0 +1,182 @@
1From 5ac88fb769b43e9c87ffe472fa1ed93f0dd1e526 Mon Sep 17 00:00:00 2001
2From: Daniel Vetter <daniel.vetter@ffwll.ch>
3Date: Sun, 1 Apr 2012 19:16:18 +0200
4Subject: [PATCH 104/165] drm/i915: handle input/output sdvo timings
5 separately in mode_set
6
7commit 6651819b4b4fc3caa6964c5d825eb4bb996f3905 upstream.
8
9We seem to have a decent confusion between the output timings and the
10input timings of the sdvo encoder. If I understand the code correctly,
11we use the original mode unchanged for the output timings, safe for
12the lvds case. And we should use the adjusted mode for input timings.
13
14Clarify the situation by adding an explicit output_dtd to the sdvo
15mode_set function and streamline the code-flow by moving the input and
16output mode setting in the sdvo encode together.
17
18Furthermore testing showed that the sdvo input timing needs the
19unadjusted dotclock, the sdvo chip will automatically compute the
20required pixel multiplier to get a dotclock above 100 MHz.
21
22Fix this up when converting a drm mode to an sdvo dtd.
23
24This regression was introduced in
25
26commit c74696b9c890074c1e1ee3d7496fc71eb3680ced
27Author: Pavel Roskin <proski@gnu.org>
28Date: Thu Sep 2 14:46:34 2010 -0400
29
30 i915: revert some checks added by commit 32aad86f
31
32particularly the following hunk:
33
34> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
35> b/drivers/gpu/drm/i915/intel_sdvo.c
36> index 093e914..62d22ae 100644
37> --- a/drivers/gpu/drm/i915/intel_sdvo.c
38> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
39> @@ -1122,11 +1123,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
40>
41> /* We have tried to get input timing in mode_fixup, and filled into
42> adjusted_mode */
43> - if (intel_sdvo->is_tv || intel_sdvo->is_lvds) {
44> - intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
45> + intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
46> + if (intel_sdvo->is_tv || intel_sdvo->is_lvds)
47> input_dtd.part2.sdvo_flags = intel_sdvo->sdvo_flags;
48> - } else
49> - intel_sdvo_get_dtd_from_mode(&input_dtd, mode);
50>
51> /* If it's a TV, we already set the output timing in mode_fixup.
52> * Otherwise, the output timing is equal to the input timing.
53
54Due to questions raised in review, below a more elaborate analysis of
55the bug at hand:
56
57Sdvo seems to have two timings, one is the output timing which will be
58sent over whatever is connected on the other side of the sdvo chip (panel,
59hdmi screen, tv), the other is the input timing which will be generated by
60the gmch pipe. It looks like sdvo is expected to scale between the two.
61
62To make things slightly more complicated, we have a bunch of special
63cases:
64- For lvds panel we always use a fixed output timing, namely
65 intel_sdvo->sdvo_lvds_fixed_mode, hence that special case.
66- Sdvo has an interface to generate a preferred input timing for a given
67 output timing. This is the confusing thing that I've tried to clear up
68 with the follow-on patches.
69- A special requirement is that the input pixel clock needs to be between
70 100MHz and 200MHz (likely to keep it within the electromechanical design
71 range of PCIe), 270MHz on later gen4+. Lower pixel clocks are
72 doubled/quadrupled.
73
74The thing this patch tries to fix is that the pipe needs to be
75explicitly instructed to double/quadruple the pixels and needs the
76correspondingly higher pixel clock, whereas the sdvo adaptor seems to
77do that itself and needs the unadjusted pixel clock. For the sdvo
78encode side we already set the pixel mutliplier with a different
79command (0x21).
80
81This patch tries to fix this mess by:
82- Keeping the output mode timing in the unadjusted plain mode, safe
83 for the lvds case.
84- Storing the input timing in the adjusted_mode with the adjusted
85 pixel clock. This way we don't need to frob around with the core
86 crtc mode set code.
87- Fixing up the pixelclock when constructing the sdvo dtd timing
88 struct. This is why the first hunk of the patch is an integral part
89 of the series.
90- Dropping the is_tv special case because input_dtd is equivalent to
91 adjusted_mode after these changes. Follow-up patches clear this up
92 further (by simply ripping out intel_sdvo->input_dtd because it's
93 not needed).
94
95v2: Extend commit message with an in-depth bug analysis.
96
97Reported-and-Tested-by: Bernard Blackham <b-linuxgit@largestprime.net>
98Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48157
99Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
100Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
101[bwh: Indented the hunk quoted above so quilt doesn't try to apply it]
102Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
103---
104 drivers/gpu/drm/i915/intel_sdvo.c | 34 ++++++++++++++++++----------------
105 1 files changed, 18 insertions(+), 16 deletions(-)
106
107diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
108index e334ec3..0a877dd 100644
109--- a/drivers/gpu/drm/i915/intel_sdvo.c
110+++ b/drivers/gpu/drm/i915/intel_sdvo.c
111@@ -731,6 +731,7 @@ static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd,
112 uint16_t width, height;
113 uint16_t h_blank_len, h_sync_len, v_blank_len, v_sync_len;
114 uint16_t h_sync_offset, v_sync_offset;
115+ int mode_clock;
116
117 width = mode->crtc_hdisplay;
118 height = mode->crtc_vdisplay;
119@@ -745,7 +746,11 @@ static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd,
120 h_sync_offset = mode->crtc_hsync_start - mode->crtc_hblank_start;
121 v_sync_offset = mode->crtc_vsync_start - mode->crtc_vblank_start;
122
123- dtd->part1.clock = mode->clock / 10;
124+ mode_clock = mode->clock;
125+ mode_clock /= intel_mode_get_pixel_multiplier(mode) ?: 1;
126+ mode_clock /= 10;
127+ dtd->part1.clock = mode_clock;
128+
129 dtd->part1.h_active = width & 0xff;
130 dtd->part1.h_blank = h_blank_len & 0xff;
131 dtd->part1.h_high = (((width >> 8) & 0xf) << 4) |
132@@ -997,7 +1002,7 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
133 struct intel_sdvo *intel_sdvo = to_intel_sdvo(encoder);
134 u32 sdvox;
135 struct intel_sdvo_in_out_map in_out;
136- struct intel_sdvo_dtd input_dtd;
137+ struct intel_sdvo_dtd input_dtd, output_dtd;
138 int pixel_multiplier = intel_mode_get_pixel_multiplier(adjusted_mode);
139 int rate;
140
141@@ -1022,20 +1027,13 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
142 intel_sdvo->attached_output))
143 return;
144
145- /* We have tried to get input timing in mode_fixup, and filled into
146- * adjusted_mode.
147- */
148- if (intel_sdvo->is_tv || intel_sdvo->is_lvds) {
149- input_dtd = intel_sdvo->input_dtd;
150- } else {
151- /* Set the output timing to the screen */
152- if (!intel_sdvo_set_target_output(intel_sdvo,
153- intel_sdvo->attached_output))
154- return;
155-
156- intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
157- (void) intel_sdvo_set_output_timing(intel_sdvo, &input_dtd);
158- }
159+ /* lvds has a special fixed output timing. */
160+ if (intel_sdvo->is_lvds)
161+ intel_sdvo_get_dtd_from_mode(&output_dtd,
162+ intel_sdvo->sdvo_lvds_fixed_mode);
163+ else
164+ intel_sdvo_get_dtd_from_mode(&output_dtd, mode);
165+ (void) intel_sdvo_set_output_timing(intel_sdvo, &output_dtd);
166
167 /* Set the input timing to the screen. Assume always input 0. */
168 if (!intel_sdvo_set_target_input(intel_sdvo))
169@@ -1053,6 +1051,10 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
170 !intel_sdvo_set_tv_format(intel_sdvo))
171 return;
172
173+ /* We have tried to get input timing in mode_fixup, and filled into
174+ * adjusted_mode.
175+ */
176+ intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
177 (void) intel_sdvo_set_input_timing(intel_sdvo, &input_dtd);
178
179 switch (pixel_multiplier) {
180--
1811.7.7.6
182
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0105-drm-i915-relative_constants_mode-race-fix.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0105-drm-i915-relative_constants_mode-race-fix.patch
new file mode 100644
index 00000000..e074c3b9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0105-drm-i915-relative_constants_mode-race-fix.patch
@@ -0,0 +1,78 @@
1From c1f4cbb7a7af1e7a02e2516bd82215fd79b9edbd Mon Sep 17 00:00:00 2001
2From: Ben Widawsky <ben@bwidawsk.net>
3Date: Mon, 12 Dec 2011 19:21:57 -0800
4Subject: [PATCH 105/165] drm/i915: relative_constants_mode race fix
5
6commit e2971bdab2b761683353da383c0fd5ac704d1cca upstream.
7
8dev_priv keeps track of the current addressing mode that gets set at
9execbuffer time. Unfortunately the existing code was doing this before
10acquiring struct_mutex which leaves a race with another thread also
11doing an execbuffer. If that wasn't bad enough, relocate_slow drops
12struct_mutex which opens a much more likely error where another thread
13comes in and modifies the state while relocate_slow is being slow.
14
15The solution here is to just defer setting this state until we
16absolutely need it, and we know we'll have struct_mutex for the
17remainder of our code path.
18
19v2: Keith noticed a bug in the original patch.
20
21Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
22Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
23Signed-off-by: Keith Packard <keithp@keithp.com>
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 29 +++++++++++++++------------
27 1 files changed, 16 insertions(+), 13 deletions(-)
28
29diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
30index b9da890..7d64f83 100644
31--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
32+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
33@@ -1033,19 +1033,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
34 if (INTEL_INFO(dev)->gen > 5 &&
35 mode == I915_EXEC_CONSTANTS_REL_SURFACE)
36 return -EINVAL;
37-
38- ret = intel_ring_begin(ring, 4);
39- if (ret)
40- return ret;
41-
42- intel_ring_emit(ring, MI_NOOP);
43- intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));
44- intel_ring_emit(ring, INSTPM);
45- intel_ring_emit(ring,
46- I915_EXEC_CONSTANTS_MASK << 16 | mode);
47- intel_ring_advance(ring);
48-
49- dev_priv->relative_constants_mode = mode;
50 }
51 break;
52 default:
53@@ -1176,6 +1163,22 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
54 }
55 }
56
57+ if (ring == &dev_priv->ring[RCS] &&
58+ mode != dev_priv->relative_constants_mode) {
59+ ret = intel_ring_begin(ring, 4);
60+ if (ret)
61+ goto err;
62+
63+ intel_ring_emit(ring, MI_NOOP);
64+ intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));
65+ intel_ring_emit(ring, INSTPM);
66+ intel_ring_emit(ring,
67+ I915_EXEC_CONSTANTS_MASK << 16 | mode);
68+ intel_ring_advance(ring);
69+
70+ dev_priv->relative_constants_mode = mode;
71+ }
72+
73 trace_i915_gem_ring_dispatch(ring, seqno);
74
75 exec_start = batch_obj->gtt_offset + args->batch_start_offset;
76--
771.7.7.6
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0106-drm-i915-Force-sync-command-ordering-Gen6.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0106-drm-i915-Force-sync-command-ordering-Gen6.patch
new file mode 100644
index 00000000..e59e166e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0106-drm-i915-Force-sync-command-ordering-Gen6.patch
@@ -0,0 +1,98 @@
1From 04029d7c030fddf168b85e9f39f76fcc282b768b Mon Sep 17 00:00:00 2001
2From: Ben Widawsky <ben@bwidawsk.net>
3Date: Mon, 12 Dec 2011 19:21:58 -0800
4Subject: [PATCH 106/165] drm/i915: Force sync command ordering (Gen6+)
5
6commit 84f9f938be4156e4baea466688bd6abae1c9e6ba upstream.
7
8The docs say this is required for Gen7, and since the bit was added for
9Gen6, we are also setting it there pit pf paranoia. Particularly as
10Chris points out, if PIPE_CONTROL counts as a 3d state packet.
11
12This was found through doc inspection by Ken and applies to Gen6+;
13
14Reported-by: Kenneth Graunke <kenneth@whitecape.org>
15Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
16Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
17Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
18Reviewed-by: Eric Anholt <eric@anholt.net>
19Signed-off-by: Keith Packard <keithp@keithp.com>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 +++++++--
23 drivers/gpu/drm/i915/i915_reg.h | 1 +
24 drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++++
25 3 files changed, 13 insertions(+), 2 deletions(-)
26
27diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
28index 7d64f83..ed00f29 100644
29--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
30+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
31@@ -984,6 +984,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
32 struct intel_ring_buffer *ring;
33 u32 exec_start, exec_len;
34 u32 seqno;
35+ u32 mask;
36 int ret, mode, i;
37
38 if (!i915_gem_check_execbuffer(args)) {
39@@ -1021,6 +1022,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
40 }
41
42 mode = args->flags & I915_EXEC_CONSTANTS_MASK;
43+ mask = I915_EXEC_CONSTANTS_MASK;
44 switch (mode) {
45 case I915_EXEC_CONSTANTS_REL_GENERAL:
46 case I915_EXEC_CONSTANTS_ABSOLUTE:
47@@ -1033,6 +1035,10 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
48 if (INTEL_INFO(dev)->gen > 5 &&
49 mode == I915_EXEC_CONSTANTS_REL_SURFACE)
50 return -EINVAL;
51+
52+ /* The HW changed the meaning on this bit on gen6 */
53+ if (INTEL_INFO(dev)->gen >= 6)
54+ mask &= ~I915_EXEC_CONSTANTS_REL_SURFACE;
55 }
56 break;
57 default:
58@@ -1172,8 +1178,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
59 intel_ring_emit(ring, MI_NOOP);
60 intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));
61 intel_ring_emit(ring, INSTPM);
62- intel_ring_emit(ring,
63- I915_EXEC_CONSTANTS_MASK << 16 | mode);
64+ intel_ring_emit(ring, mask << 16 | mode);
65 intel_ring_advance(ring);
66
67 dev_priv->relative_constants_mode = mode;
68diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
69index 2f99fd4..beca72f 100644
70--- a/drivers/gpu/drm/i915/i915_reg.h
71+++ b/drivers/gpu/drm/i915/i915_reg.h
72@@ -442,6 +442,7 @@
73 #define INSTPM_AGPBUSY_DIS (1<<11) /* gen3: when disabled, pending interrupts
74 will not assert AGPBUSY# and will only
75 be delivered when out of C3. */
76+#define INSTPM_FORCE_ORDERING (1<<7) /* GEN6+ */
77 #define ACTHD 0x020c8
78 #define FW_BLC 0x020d8
79 #define FW_BLC2 0x020dc
80diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
81index 8673581..3c9c086 100644
82--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
83+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
84@@ -414,6 +414,11 @@ static int init_render_ring(struct intel_ring_buffer *ring)
85 return ret;
86 }
87
88+ if (INTEL_INFO(dev)->gen >= 6) {
89+ I915_WRITE(INSTPM,
90+ INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
91+ }
92+
93 return ret;
94 }
95
96--
971.7.7.6
98
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0107-drm-i915-Set-the-Stencil-Cache-eviction-policy-to-no.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0107-drm-i915-Set-the-Stencil-Cache-eviction-policy-to-no.patch
new file mode 100644
index 00000000..9b0ecd8c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0107-drm-i915-Set-the-Stencil-Cache-eviction-policy-to-no.patch
@@ -0,0 +1,69 @@
1From 623fa1ce0a50adf5f5e1133e459b5d725a378a6d Mon Sep 17 00:00:00 2001
2From: Kenneth Graunke <kenneth@whitecape.org>
3Date: Fri, 27 Apr 2012 12:44:41 -0700
4Subject: [PATCH 107/165] drm/i915: Set the Stencil Cache eviction policy to
5 non-LRA mode.
6
7commit 3a69ddd6f872180b6f61fda87152b37202118fbc upstream.
8
9Clearing bit 5 of CACHE_MODE_0 is necessary to prevent GPU hangs in
10OpenGL programs such as Google MapsGL, Google Earth, and gzdoom when
11using separate stencil buffers. Without it, the GPU tries to use the
12LRA eviction policy, which isn't supported. This was supposed to be off
13by default, but seems to be on for many machines.
14
15This cannot be done in gen6_init_clock_gating with most of the other
16workaround bits; the render ring needs to exist. Otherwise, the
17register write gets dropped on the floor (one printk will show it
18changed, but a second printk immediately following shows the value
19reverts to the old one).
20
21Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47535
22Cc: Rob Castle <futuredub@gmail.com>
23Cc: Eric Appleman <erappleman@gmail.com>
24Cc: aaron667@gmx.net
25Cc: Keith Packard <keithp@keithp.com>
26Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
27Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
28Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
29Signed-off-by: Dave Airlie <airlied@redhat.com>
30Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
31---
32 drivers/gpu/drm/i915/i915_reg.h | 1 +
33 drivers/gpu/drm/i915/intel_ringbuffer.c | 8 ++++++++
34 2 files changed, 9 insertions(+), 0 deletions(-)
35
36diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
37index beca72f..cbe5a88 100644
38--- a/drivers/gpu/drm/i915/i915_reg.h
39+++ b/drivers/gpu/drm/i915/i915_reg.h
40@@ -523,6 +523,7 @@
41 #define CM0_MASK_SHIFT 16
42 #define CM0_IZ_OPT_DISABLE (1<<6)
43 #define CM0_ZR_OPT_DISABLE (1<<5)
44+#define CM0_STC_EVICT_DISABLE_LRA_SNB (1<<5)
45 #define CM0_DEPTH_EVICT_DISABLE (1<<4)
46 #define CM0_COLOR_EVICT_DISABLE (1<<3)
47 #define CM0_DEPTH_WRITE_DISABLE (1<<1)
48diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
49index 3c9c086..273f403 100644
50--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
51+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
52@@ -417,6 +417,14 @@ static int init_render_ring(struct intel_ring_buffer *ring)
53 if (INTEL_INFO(dev)->gen >= 6) {
54 I915_WRITE(INSTPM,
55 INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
56+
57+ /* From the Sandybridge PRM, volume 1 part 3, page 24:
58+ * "If this bit is set, STCunit will have LRA as replacement
59+ * policy. [...] This bit must be reset. LRA replacement
60+ * policy is not supported."
61+ */
62+ I915_WRITE(CACHE_MODE_0,
63+ CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT);
64 }
65
66 return ret;
67--
681.7.7.6
69
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0108-drm-i915-fix-integer-overflow-in-i915_gem_execbuffer.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0108-drm-i915-fix-integer-overflow-in-i915_gem_execbuffer.patch
new file mode 100644
index 00000000..b726175c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0108-drm-i915-fix-integer-overflow-in-i915_gem_execbuffer.patch
@@ -0,0 +1,40 @@
1From 8f2f90a48393e092ca95f2a6e112baada0db0a3c Mon Sep 17 00:00:00 2001
2From: Xi Wang <xi.wang@gmail.com>
3Date: Mon, 23 Apr 2012 04:06:41 -0400
4Subject: [PATCH 108/165] drm/i915: fix integer overflow in
5 i915_gem_execbuffer2()
6
7commit ed8cd3b2cd61004cab85380c52b1817aca1ca49b upstream.
8
9On 32-bit systems, a large args->buffer_count from userspace via ioctl
10may overflow the allocation size, leading to out-of-bounds access.
11
12This vulnerability was introduced in commit 8408c282 ("drm/i915:
13First try a normal large kmalloc for the temporary exec buffers").
14
15Signed-off-by: Xi Wang <xi.wang@gmail.com>
16Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
17Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
18[bwh: Backported to 3.2: adjust context]
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 ++-
22 1 files changed, 2 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
25index ed00f29..5b6fe31 100644
26--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
27+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
28@@ -1322,7 +1322,8 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
29 struct drm_i915_gem_exec_object2 *exec2_list = NULL;
30 int ret;
31
32- if (args->buffer_count < 1) {
33+ if (args->buffer_count < 1 ||
34+ args->buffer_count > UINT_MAX / sizeof(*exec2_list)) {
35 DRM_ERROR("execbuf2 with %d buffers\n", args->buffer_count);
36 return -EINVAL;
37 }
38--
391.7.7.6
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0109-drm-i915-fix-integer-overflow-in-i915_gem_do_execbuf.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0109-drm-i915-fix-integer-overflow-in-i915_gem_do_execbuf.patch
new file mode 100644
index 00000000..c60b3d22
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0109-drm-i915-fix-integer-overflow-in-i915_gem_do_execbuf.patch
@@ -0,0 +1,41 @@
1From f69e43d73be5dc1a1b1550c12c06f32d7eeee9b5 Mon Sep 17 00:00:00 2001
2From: Xi Wang <xi.wang@gmail.com>
3Date: Mon, 23 Apr 2012 04:06:42 -0400
4Subject: [PATCH 109/165] drm/i915: fix integer overflow in
5 i915_gem_do_execbuffer()
6
7commit 44afb3a04391a74309d16180d1e4f8386fdfa745 upstream.
8
9On 32-bit systems, a large args->num_cliprects from userspace via ioctl
10may overflow the allocation size, leading to out-of-bounds access.
11
12This vulnerability was introduced in commit 432e58ed ("drm/i915: Avoid
13allocation for execbuffer object list").
14
15Signed-off-by: Xi Wang <xi.wang@gmail.com>
16Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
17Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +++++
21 1 files changed, 5 insertions(+), 0 deletions(-)
22
23diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
24index 5b6fe31..a6c2f7a 100644
25--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
26+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
27@@ -1057,6 +1057,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
28 return -EINVAL;
29 }
30
31+ if (args->num_cliprects > UINT_MAX / sizeof(*cliprects)) {
32+ DRM_DEBUG("execbuf with %u cliprects\n",
33+ args->num_cliprects);
34+ return -EINVAL;
35+ }
36 cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects),
37 GFP_KERNEL);
38 if (cliprects == NULL) {
39--
401.7.7.6
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0110-nl80211-ensure-interface-is-up-in-various-APIs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0110-nl80211-ensure-interface-is-up-in-various-APIs.patch
new file mode 100644
index 00000000..ced33cff
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0110-nl80211-ensure-interface-is-up-in-various-APIs.patch
@@ -0,0 +1,152 @@
1From aed930a331278472b81fbea0dfbdbe27672d41cd Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Mon, 2 Apr 2012 10:51:55 +0200
4Subject: [PATCH 110/165] nl80211: ensure interface is up in various APIs
5
6commit 2b5f8b0b44e17e625cfba1e7b88db44f4dcc0441 upstream.
7[backported by Ben Greear]
8
9The nl80211 handling code should ensure as much as
10it can that the interface is in a valid state, it
11can certainly ensure the interface is running.
12
13Not doing so can cause calls through mac80211 into
14the driver that result in warnings and unspecified
15behaviour in the driver.
16
17Reported-by: Ben Greear <greearb@candelatech.com>
18Signed-off-by: Johannes Berg <johannes.berg@intel.com>
19Signed-off-by: John W. Linville <linville@tuxdriver.com>
20Signed-off-by: Ben Greear <greearb@candelatech.com>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 net/wireless/nl80211.c | 29 +++++++++++++++++------------
24 1 files changed, 17 insertions(+), 12 deletions(-)
25
26diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
27index ffafda5..c06c365 100644
28--- a/net/wireless/nl80211.c
29+++ b/net/wireless/nl80211.c
30@@ -1258,6 +1258,11 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
31 goto bad_res;
32 }
33
34+ if (!netif_running(netdev)) {
35+ result = -ENETDOWN;
36+ goto bad_res;
37+ }
38+
39 nla_for_each_nested(nl_txq_params,
40 info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS],
41 rem_txq_params) {
42@@ -5944,7 +5949,7 @@ static struct genl_ops nl80211_ops[] = {
43 .doit = nl80211_get_key,
44 .policy = nl80211_policy,
45 .flags = GENL_ADMIN_PERM,
46- .internal_flags = NL80211_FLAG_NEED_NETDEV |
47+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
48 NL80211_FLAG_NEED_RTNL,
49 },
50 {
51@@ -5976,7 +5981,7 @@ static struct genl_ops nl80211_ops[] = {
52 .policy = nl80211_policy,
53 .flags = GENL_ADMIN_PERM,
54 .doit = nl80211_addset_beacon,
55- .internal_flags = NL80211_FLAG_NEED_NETDEV |
56+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
57 NL80211_FLAG_NEED_RTNL,
58 },
59 {
60@@ -5984,7 +5989,7 @@ static struct genl_ops nl80211_ops[] = {
61 .policy = nl80211_policy,
62 .flags = GENL_ADMIN_PERM,
63 .doit = nl80211_addset_beacon,
64- .internal_flags = NL80211_FLAG_NEED_NETDEV |
65+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
66 NL80211_FLAG_NEED_RTNL,
67 },
68 {
69@@ -6008,7 +6013,7 @@ static struct genl_ops nl80211_ops[] = {
70 .doit = nl80211_set_station,
71 .policy = nl80211_policy,
72 .flags = GENL_ADMIN_PERM,
73- .internal_flags = NL80211_FLAG_NEED_NETDEV |
74+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
75 NL80211_FLAG_NEED_RTNL,
76 },
77 {
78@@ -6024,7 +6029,7 @@ static struct genl_ops nl80211_ops[] = {
79 .doit = nl80211_del_station,
80 .policy = nl80211_policy,
81 .flags = GENL_ADMIN_PERM,
82- .internal_flags = NL80211_FLAG_NEED_NETDEV |
83+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
84 NL80211_FLAG_NEED_RTNL,
85 },
86 {
87@@ -6057,7 +6062,7 @@ static struct genl_ops nl80211_ops[] = {
88 .doit = nl80211_del_mpath,
89 .policy = nl80211_policy,
90 .flags = GENL_ADMIN_PERM,
91- .internal_flags = NL80211_FLAG_NEED_NETDEV |
92+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
93 NL80211_FLAG_NEED_RTNL,
94 },
95 {
96@@ -6065,7 +6070,7 @@ static struct genl_ops nl80211_ops[] = {
97 .doit = nl80211_set_bss,
98 .policy = nl80211_policy,
99 .flags = GENL_ADMIN_PERM,
100- .internal_flags = NL80211_FLAG_NEED_NETDEV |
101+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
102 NL80211_FLAG_NEED_RTNL,
103 },
104 {
105@@ -6091,7 +6096,7 @@ static struct genl_ops nl80211_ops[] = {
106 .doit = nl80211_get_mesh_config,
107 .policy = nl80211_policy,
108 /* can be retrieved by unprivileged users */
109- .internal_flags = NL80211_FLAG_NEED_NETDEV |
110+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
111 NL80211_FLAG_NEED_RTNL,
112 },
113 {
114@@ -6224,7 +6229,7 @@ static struct genl_ops nl80211_ops[] = {
115 .doit = nl80211_setdel_pmksa,
116 .policy = nl80211_policy,
117 .flags = GENL_ADMIN_PERM,
118- .internal_flags = NL80211_FLAG_NEED_NETDEV |
119+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
120 NL80211_FLAG_NEED_RTNL,
121 },
122 {
123@@ -6232,7 +6237,7 @@ static struct genl_ops nl80211_ops[] = {
124 .doit = nl80211_setdel_pmksa,
125 .policy = nl80211_policy,
126 .flags = GENL_ADMIN_PERM,
127- .internal_flags = NL80211_FLAG_NEED_NETDEV |
128+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
129 NL80211_FLAG_NEED_RTNL,
130 },
131 {
132@@ -6240,7 +6245,7 @@ static struct genl_ops nl80211_ops[] = {
133 .doit = nl80211_flush_pmksa,
134 .policy = nl80211_policy,
135 .flags = GENL_ADMIN_PERM,
136- .internal_flags = NL80211_FLAG_NEED_NETDEV |
137+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
138 NL80211_FLAG_NEED_RTNL,
139 },
140 {
141@@ -6328,7 +6333,7 @@ static struct genl_ops nl80211_ops[] = {
142 .doit = nl80211_set_wds_peer,
143 .policy = nl80211_policy,
144 .flags = GENL_ADMIN_PERM,
145- .internal_flags = NL80211_FLAG_NEED_NETDEV |
146+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
147 NL80211_FLAG_NEED_RTNL,
148 },
149 {
150--
1511.7.7.6
152
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0111-ALSA-HDA-Add-external-mic-quirk-for-Asus-Zenbook-UX3.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0111-ALSA-HDA-Add-external-mic-quirk-for-Asus-Zenbook-UX3.patch
new file mode 100644
index 00000000..86dbcea7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0111-ALSA-HDA-Add-external-mic-quirk-for-Asus-Zenbook-UX3.patch
@@ -0,0 +1,37 @@
1From 12bea9197ab5065d6eebf8a3746d486acc05963d Mon Sep 17 00:00:00 2001
2From: David Henningsson <david.henningsson@canonical.com>
3Date: Fri, 20 Apr 2012 10:01:46 +0200
4Subject: [PATCH 111/165] ALSA: HDA: Add external mic quirk for Asus Zenbook
5 UX31E
6
7commit 5ac57550f279c3d991ef0b398681bcaca18169f7 upstream.
8
9According to the reporter, external mic starts to work if the
10laptop-dmic model is used. According to BIOS pin config, all
11pins are consistent with the alc269vb_laptop_dmic fixup, except
12for the external mic, which is not present.
13
14BugLink: https://bugs.launchpad.net/bugs/950490
15Signed-off-by: David Henningsson <david.henningsson@canonical.com>
16Signed-off-by: Takashi Iwai <tiwai@suse.de>
17[bwh: Backported to 3.2: adjust context]
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 sound/pci/hda/patch_realtek.c | 1 +
21 1 files changed, 1 insertions(+), 0 deletions(-)
22
23diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
24index dc8a6fc..0bc5a46 100644
25--- a/sound/pci/hda/patch_realtek.c
26+++ b/sound/pci/hda/patch_realtek.c
27@@ -5032,6 +5032,7 @@ static const struct alc_fixup alc269_fixups[] = {
28 };
29
30 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
31+ SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC),
32 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
33 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
34 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
35--
361.7.7.6
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0112-USB-cdc-wdm-fix-race-leading-leading-to-memory-corru.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0112-USB-cdc-wdm-fix-race-leading-leading-to-memory-corru.patch
new file mode 100644
index 00000000..21674878
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0112-USB-cdc-wdm-fix-race-leading-leading-to-memory-corru.patch
@@ -0,0 +1,64 @@
1From 5fe563d7ee35fedc59e2e8b230b31394aee32651 Mon Sep 17 00:00:00 2001
2From: Oliver Neukum <oliver@neukum.org>
3Date: Thu, 26 Apr 2012 21:59:10 +0200
4Subject: [PATCH 112/165] USB: cdc-wdm: fix race leading leading to memory
5 corruption
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 5c22837adca7c30b66121cf18ad3e160134268d4 upstream.
11
12This patch fixes a race whereby a pointer to a buffer
13would be overwritten while the buffer was in use leading
14to a double free and a memory leak. This causes crashes.
15This bug was introduced in 2.6.34
16
17Signed-off-by: Oliver Neukum <oneukum@suse.de>
18Tested-by: Bjørn Mork <bjorn@mork.no>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 drivers/usb/class/cdc-wdm.c | 7 +++++--
23 1 files changed, 5 insertions(+), 2 deletions(-)
24
25diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
26index 9eb71d8..2db0327 100644
27--- a/drivers/usb/class/cdc-wdm.c
28+++ b/drivers/usb/class/cdc-wdm.c
29@@ -108,8 +108,9 @@ static void wdm_out_callback(struct urb *urb)
30 spin_lock(&desc->iuspin);
31 desc->werr = urb->status;
32 spin_unlock(&desc->iuspin);
33- clear_bit(WDM_IN_USE, &desc->flags);
34 kfree(desc->outbuf);
35+ desc->outbuf = NULL;
36+ clear_bit(WDM_IN_USE, &desc->flags);
37 wake_up(&desc->wait);
38 }
39
40@@ -312,7 +313,7 @@ static ssize_t wdm_write
41 if (we < 0)
42 return -EIO;
43
44- desc->outbuf = buf = kmalloc(count, GFP_KERNEL);
45+ buf = kmalloc(count, GFP_KERNEL);
46 if (!buf) {
47 rv = -ENOMEM;
48 goto outnl;
49@@ -376,10 +377,12 @@ static ssize_t wdm_write
50 req->wIndex = desc->inum;
51 req->wLength = cpu_to_le16(count);
52 set_bit(WDM_IN_USE, &desc->flags);
53+ desc->outbuf = buf;
54
55 rv = usb_submit_urb(desc->command, GFP_KERNEL);
56 if (rv < 0) {
57 kfree(buf);
58+ desc->outbuf = NULL;
59 clear_bit(WDM_IN_USE, &desc->flags);
60 dev_err(&desc->intf->dev, "Tx URB error: %d\n", rv);
61 } else {
62--
631.7.7.6
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0113-USB-EHCI-fix-crash-during-suspend-on-ASUS-computers.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0113-USB-EHCI-fix-crash-during-suspend-on-ASUS-computers.patch
new file mode 100644
index 00000000..ddf3dcf2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0113-USB-EHCI-fix-crash-during-suspend-on-ASUS-computers.patch
@@ -0,0 +1,97 @@
1From 37377ccfbb44158128be2372cc9088b6c670e440 Mon Sep 17 00:00:00 2001
2From: Alan Stern <stern@rowland.harvard.edu>
3Date: Tue, 24 Apr 2012 14:07:22 -0400
4Subject: [PATCH 113/165] USB: EHCI: fix crash during suspend on ASUS
5 computers
6
7commit 151b61284776be2d6f02d48c23c3625678960b97 upstream.
8
9This patch (as1545) fixes a problem affecting several ASUS computers:
10The machine crashes or corrupts memory when going into suspend if the
11ehci-hcd driver is bound to any controllers. Users have been forced
12to unbind or unload ehci-hcd before putting their systems to sleep.
13
14After extensive testing, it was determined that the machines don't
15like going into suspend when any EHCI controllers are in the PCI D3
16power state. Presumably this is a firmware bug, but there's nothing
17we can do about it except to avoid putting the controllers in D3
18during system sleep.
19
20The patch adds a new flag to indicate whether the problem is present,
21and avoids changing the controller's power state if the flag is set.
22Runtime suspend is unaffected; this matters only for system suspend.
23However as a side effect, the controller will not respond to remote
24wakeup requests while the system is asleep. Hence USB wakeup is not
25functional -- but of course, this is already true in the current state
26of affairs.
27
28This fixes Bugzilla #42728.
29
30Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
31Tested-by: Steven Rostedt <rostedt@goodmis.org>
32Tested-by: Andrey Rahmatullin <wrar@wrar.name>
33Tested-by: Oleksij Rempel (fishor) <bug-track@fisher-privat.net>
34Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35[bwh: Backported to 3.2: adjust context]
36Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
37---
38 drivers/usb/core/hcd-pci.c | 9 +++++++++
39 drivers/usb/host/ehci-pci.c | 8 ++++++++
40 include/linux/usb/hcd.h | 2 ++
41 3 files changed, 19 insertions(+), 0 deletions(-)
42
43diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
44index 61d08dd..5f1404a 100644
45--- a/drivers/usb/core/hcd-pci.c
46+++ b/drivers/usb/core/hcd-pci.c
47@@ -495,6 +495,15 @@ static int hcd_pci_suspend_noirq(struct device *dev)
48
49 pci_save_state(pci_dev);
50
51+ /*
52+ * Some systems crash if an EHCI controller is in D3 during
53+ * a sleep transition. We have to leave such controllers in D0.
54+ */
55+ if (hcd->broken_pci_sleep) {
56+ dev_dbg(dev, "Staying in PCI D0\n");
57+ return retval;
58+ }
59+
60 /* If the root hub is dead rather than suspended, disallow remote
61 * wakeup. usb_hc_died() should ensure that both hosts are marked as
62 * dying, so we only need to check the primary roothub.
63diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
64index f4b627d..971d312 100644
65--- a/drivers/usb/host/ehci-pci.c
66+++ b/drivers/usb/host/ehci-pci.c
67@@ -144,6 +144,14 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
68 hcd->has_tt = 1;
69 tdi_reset(ehci);
70 }
71+ if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) {
72+ /* EHCI #1 or #2 on 6 Series/C200 Series chipset */
73+ if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) {
74+ ehci_info(ehci, "broken D3 during system sleep on ASUS\n");
75+ hcd->broken_pci_sleep = 1;
76+ device_set_wakeup_capable(&pdev->dev, false);
77+ }
78+ }
79 break;
80 case PCI_VENDOR_ID_TDI:
81 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
82diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
83index 03354d5..64cec8d 100644
84--- a/include/linux/usb/hcd.h
85+++ b/include/linux/usb/hcd.h
86@@ -128,6 +128,8 @@ struct usb_hcd {
87 unsigned wireless:1; /* Wireless USB HCD */
88 unsigned authorized_default:1;
89 unsigned has_tt:1; /* Integrated TT in root hub */
90+ unsigned broken_pci_sleep:1; /* Don't put the
91+ controller in PCI-D3 for system sleep */
92
93 int irq; /* irq allocated */
94 void __iomem *regs; /* device memory/io */
95--
961.7.7.6
97
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0114-USB-gadget-storage-gadgets-send-wrong-error-code-for.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0114-USB-gadget-storage-gadgets-send-wrong-error-code-for.patch
new file mode 100644
index 00000000..52f75c8e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0114-USB-gadget-storage-gadgets-send-wrong-error-code-for.patch
@@ -0,0 +1,55 @@
1From e2ac51161592388a8e729fda87a35c467e56eb7b Mon Sep 17 00:00:00 2001
2From: Alan Stern <stern@rowland.harvard.edu>
3Date: Wed, 11 Apr 2012 16:09:10 -0400
4Subject: [PATCH 114/165] USB: gadget: storage gadgets send wrong error code
5 for unknown commands
6
7commit c85dcdac5852295cf6822f5c4331a6ddab72581f upstream.
8
9This patch (as1539) fixes a minor bug in the mass-storage gadget
10drivers. When an unknown command is received, the error code sent
11back is "Invalid Field in CDB" rather than "Invalid Command". This is
12because the bitmask of CDB bytes allowed to be nonzero is incorrect.
13
14When handling an unknown command, we don't care which command bytes
15are nonzero. All the bits in the mask should be set, not just eight
16of them.
17
18Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
19CC: <Michal Nazarewicz <mina86@mina86.com>
20Signed-off-by: Felipe Balbi <balbi@ti.com>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/usb/gadget/f_mass_storage.c | 2 +-
24 drivers/usb/gadget/file_storage.c | 2 +-
25 2 files changed, 2 insertions(+), 2 deletions(-)
26
27diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
28index 1a6f415..a5570b6 100644
29--- a/drivers/usb/gadget/f_mass_storage.c
30+++ b/drivers/usb/gadget/f_mass_storage.c
31@@ -2182,7 +2182,7 @@ unknown_cmnd:
32 common->data_size_from_cmnd = 0;
33 sprintf(unknown, "Unknown x%02x", common->cmnd[0]);
34 reply = check_command(common, common->cmnd_size,
35- DATA_DIR_UNKNOWN, 0xff, 0, unknown);
36+ DATA_DIR_UNKNOWN, ~0, 0, unknown);
37 if (reply == 0) {
38 common->curlun->sense_data = SS_INVALID_COMMAND;
39 reply = -EINVAL;
40diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
41index 17a7047..41056e2 100644
42--- a/drivers/usb/gadget/file_storage.c
43+++ b/drivers/usb/gadget/file_storage.c
44@@ -2569,7 +2569,7 @@ static int do_scsi_command(struct fsg_dev *fsg)
45 fsg->data_size_from_cmnd = 0;
46 sprintf(unknown, "Unknown x%02x", fsg->cmnd[0]);
47 if ((reply = check_command(fsg, fsg->cmnd_size,
48- DATA_DIR_UNKNOWN, 0xff, 0, unknown)) == 0) {
49+ DATA_DIR_UNKNOWN, ~0, 0, unknown)) == 0) {
50 fsg->curlun->sense_data = SS_INVALID_COMMAND;
51 reply = -EINVAL;
52 }
53--
541.7.7.6
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0115-usb-gadget-dummy-do-not-call-pullup-on-udc_stop.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0115-usb-gadget-dummy-do-not-call-pullup-on-udc_stop.patch
new file mode 100644
index 00000000..9338500b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0115-usb-gadget-dummy-do-not-call-pullup-on-udc_stop.patch
@@ -0,0 +1,35 @@
1From 19436e7f0105b1503a6c0685311c287f094f0a88 Mon Sep 17 00:00:00 2001
2From: Felipe Balbi <balbi@ti.com>
3Date: Wed, 18 Apr 2012 13:59:30 +0300
4Subject: [PATCH 115/165] usb: gadget: dummy: do not call pullup() on
5 udc_stop()
6
7commit 15b120d67019d691e4389372967332d74a80522a upstream.
8
9pullup() is already called properly by udc-core.c and
10there's no need to call it from udc_stop(), in fact that
11will cause issues.
12
13Reviewed-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
14Acked-by: Alan Stern <stern@rowland.harvard.edu>
15Signed-off-by: Felipe Balbi <balbi@ti.com>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/usb/gadget/dummy_hcd.c | 1 -
19 1 files changed, 0 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
22index db815c2..9098642 100644
23--- a/drivers/usb/gadget/dummy_hcd.c
24+++ b/drivers/usb/gadget/dummy_hcd.c
25@@ -924,7 +924,6 @@ static int dummy_udc_stop(struct usb_gadget *g,
26
27 dum->driver = NULL;
28
29- dummy_pullup(&dum->gadget, 0);
30 return 0;
31 }
32
33--
341.7.7.6
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0116-usb-gadget-uvc-uvc_request_data-length-field-must-be.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0116-usb-gadget-uvc-uvc_request_data-length-field-must-be.patch
new file mode 100644
index 00000000..3f5d1592
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0116-usb-gadget-uvc-uvc_request_data-length-field-must-be.patch
@@ -0,0 +1,50 @@
1From c50d42c9d902b99077153d177a0fba885220552f Mon Sep 17 00:00:00 2001
2From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3Date: Tue, 24 Apr 2012 11:29:42 +0200
4Subject: [PATCH 116/165] usb gadget: uvc: uvc_request_data::length field must
5 be signed
6
7commit 6f6543f53f9ce136e01d7114bf6f0818ca54fb41 upstream.
8
9The field is used to pass the UVC request data length, but can also be
10used to signal an error when setting it to a negative value. Switch from
11unsigned int to __s32.
12
13Reported-by: Fernandez Gonzalo <gfernandez@copreci.es>
14Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/usb/gadget/uvc.h | 2 +-
19 drivers/usb/gadget/uvc_v4l2.c | 2 +-
20 2 files changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/drivers/usb/gadget/uvc.h b/drivers/usb/gadget/uvc.h
23index bc78c60..ca4e03a 100644
24--- a/drivers/usb/gadget/uvc.h
25+++ b/drivers/usb/gadget/uvc.h
26@@ -28,7 +28,7 @@
27
28 struct uvc_request_data
29 {
30- unsigned int length;
31+ __s32 length;
32 __u8 data[60];
33 };
34
35diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c
36index f6e083b..54d7ca5 100644
37--- a/drivers/usb/gadget/uvc_v4l2.c
38+++ b/drivers/usb/gadget/uvc_v4l2.c
39@@ -39,7 +39,7 @@ uvc_send_response(struct uvc_device *uvc, struct uvc_request_data *data)
40 if (data->length < 0)
41 return usb_ep_set_halt(cdev->gadget->ep0);
42
43- req->length = min(uvc->event_length, data->length);
44+ req->length = min_t(unsigned int, uvc->event_length, data->length);
45 req->zero = data->length < uvc->event_length;
46 req->dma = DMA_ADDR_INVALID;
47
48--
491.7.7.6
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0117-pipes-add-a-packetized-pipe-mode-for-writing.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0117-pipes-add-a-packetized-pipe-mode-for-writing.patch
new file mode 100644
index 00000000..e25c9d0e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0117-pipes-add-a-packetized-pipe-mode-for-writing.patch
@@ -0,0 +1,143 @@
1From 458c33bdfc9d408f94038a4db0544ab348d0d96d Mon Sep 17 00:00:00 2001
2From: Linus Torvalds <torvalds@linux-foundation.org>
3Date: Sun, 29 Apr 2012 13:12:42 -0700
4Subject: [PATCH 117/165] pipes: add a "packetized pipe" mode for writing
5
6commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d upstream.
7
8The actual internal pipe implementation is already really about
9individual packets (called "pipe buffers"), and this simply exposes that
10as a special packetized mode.
11
12When we are in the packetized mode (marked by O_DIRECT as suggested by
13Alan Cox), a write() on a pipe will not merge the new data with previous
14writes, so each write will get a pipe buffer of its own. The pipe
15buffer is then marked with the PIPE_BUF_FLAG_PACKET flag, which in turn
16will tell the reader side to break the read at that boundary (and throw
17away any partial packet contents that do not fit in the read buffer).
18
19End result: as long as you do writes less than PIPE_BUF in size (so that
20the pipe doesn't have to split them up), you can now treat the pipe as a
21packet interface, where each read() system call will read one packet at
22a time. You can just use a sufficiently big read buffer (PIPE_BUF is
23sufficient, since bigger than that doesn't guarantee atomicity anyway),
24and the return value of the read() will naturally give you the size of
25the packet.
26
27NOTE! We do not support zero-sized packets, and zero-sized reads and
28writes to a pipe continue to be no-ops. Also note that big packets will
29currently be split at write time, but that the size at which that
30happens is not really specified (except that it's bigger than PIPE_BUF).
31Currently that limit is the system page size, but we might want to
32explicitly support bigger packets some day.
33
34The main user for this is going to be the autofs packet interface,
35allowing us to stop having to care so deeply about exact packet sizes
36(which have had bugs with 32/64-bit compatibility modes). But user
37space can create packetized pipes with "pipe2(fd, O_DIRECT)", which will
38fail with an EINVAL on kernels that do not support this interface.
39
40Tested-by: Michael Tokarev <mjt@tls.msk.ru>
41Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
42Cc: David Miller <davem@davemloft.net>
43Cc: Ian Kent <raven@themaw.net>
44Cc: Thomas Meyer <thomas@m3y3r.de>
45Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
46Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
47---
48 fs/pipe.c | 31 +++++++++++++++++++++++++++++--
49 include/linux/pipe_fs_i.h | 1 +
50 2 files changed, 30 insertions(+), 2 deletions(-)
51
52diff --git a/fs/pipe.c b/fs/pipe.c
53index 4065f07..05ed5ca 100644
54--- a/fs/pipe.c
55+++ b/fs/pipe.c
56@@ -345,6 +345,16 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = {
57 .get = generic_pipe_buf_get,
58 };
59
60+static const struct pipe_buf_operations packet_pipe_buf_ops = {
61+ .can_merge = 0,
62+ .map = generic_pipe_buf_map,
63+ .unmap = generic_pipe_buf_unmap,
64+ .confirm = generic_pipe_buf_confirm,
65+ .release = anon_pipe_buf_release,
66+ .steal = generic_pipe_buf_steal,
67+ .get = generic_pipe_buf_get,
68+};
69+
70 static ssize_t
71 pipe_read(struct kiocb *iocb, const struct iovec *_iov,
72 unsigned long nr_segs, loff_t pos)
73@@ -406,6 +416,13 @@ redo:
74 ret += chars;
75 buf->offset += chars;
76 buf->len -= chars;
77+
78+ /* Was it a packet buffer? Clean up and exit */
79+ if (buf->flags & PIPE_BUF_FLAG_PACKET) {
80+ total_len = chars;
81+ buf->len = 0;
82+ }
83+
84 if (!buf->len) {
85 buf->ops = NULL;
86 ops->release(pipe, buf);
87@@ -458,6 +475,11 @@ redo:
88 return ret;
89 }
90
91+static inline int is_packetized(struct file *file)
92+{
93+ return (file->f_flags & O_DIRECT) != 0;
94+}
95+
96 static ssize_t
97 pipe_write(struct kiocb *iocb, const struct iovec *_iov,
98 unsigned long nr_segs, loff_t ppos)
99@@ -592,6 +614,11 @@ redo2:
100 buf->ops = &anon_pipe_buf_ops;
101 buf->offset = 0;
102 buf->len = chars;
103+ buf->flags = 0;
104+ if (is_packetized(filp)) {
105+ buf->ops = &packet_pipe_buf_ops;
106+ buf->flags = PIPE_BUF_FLAG_PACKET;
107+ }
108 pipe->nrbufs = ++bufs;
109 pipe->tmp_page = NULL;
110
111@@ -1012,7 +1039,7 @@ struct file *create_write_pipe(int flags)
112 goto err_dentry;
113 f->f_mapping = inode->i_mapping;
114
115- f->f_flags = O_WRONLY | (flags & O_NONBLOCK);
116+ f->f_flags = O_WRONLY | (flags & (O_NONBLOCK | O_DIRECT));
117 f->f_version = 0;
118
119 return f;
120@@ -1056,7 +1083,7 @@ int do_pipe_flags(int *fd, int flags)
121 int error;
122 int fdw, fdr;
123
124- if (flags & ~(O_CLOEXEC | O_NONBLOCK))
125+ if (flags & ~(O_CLOEXEC | O_NONBLOCK | O_DIRECT))
126 return -EINVAL;
127
128 fw = create_write_pipe(flags);
129diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
130index 77257c9..0072a53 100644
131--- a/include/linux/pipe_fs_i.h
132+++ b/include/linux/pipe_fs_i.h
133@@ -8,6 +8,7 @@
134 #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */
135 #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */
136 #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */
137+#define PIPE_BUF_FLAG_PACKET 0x08 /* read() as a packet */
138
139 /**
140 * struct pipe_buffer - a linux kernel pipe buffer
141--
1421.7.7.6
143
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0118-autofs-make-the-autofsv5-packet-file-descriptor-use-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0118-autofs-make-the-autofsv5-packet-file-descriptor-use-.patch
new file mode 100644
index 00000000..26baefcf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0118-autofs-make-the-autofsv5-packet-file-descriptor-use-.patch
@@ -0,0 +1,117 @@
1From 06cd49dc3fc506eec882f7cf754eacd9804a79cd Mon Sep 17 00:00:00 2001
2From: Linus Torvalds <torvalds@linux-foundation.org>
3Date: Sun, 29 Apr 2012 13:30:08 -0700
4Subject: [PATCH 118/165] autofs: make the autofsv5 packet file descriptor use
5 a packetized pipe
6
7commit 64f371bc3107e69efce563a3d0f0e6880de0d537 upstream.
8
9The autofs packet size has had a very unfortunate size problem on x86:
10because the alignment of 'u64' differs in 32-bit and 64-bit modes, and
11because the packet data was not 8-byte aligned, the size of the autofsv5
12packet structure differed between 32-bit and 64-bit modes despite
13looking otherwise identical (300 vs 304 bytes respectively).
14
15We first fixed that up by making the 64-bit compat mode know about this
16problem in commit a32744d4abae ("autofs: work around unhappy compat
17problem on x86-64"), and that made a 32-bit 'systemd' work happily on a
1864-bit kernel because everything then worked the same way as on a 32-bit
19kernel.
20
21But it turned out that 'automount' had actually known and worked around
22this problem in user space, so fixing the kernel to do the proper 32-bit
23compatibility handling actually *broke* 32-bit automount on a 64-bit
24kernel, because it knew that the packet sizes were wrong and expected
25those incorrect sizes.
26
27As a result, we ended up reverting that compatibility mode fix, and
28thus breaking systemd again, in commit fcbf94b9dedd.
29
30With both automount and systemd doing a single read() system call, and
31verifying that they get *exactly* the size they expect but using
32different sizes, it seemed that fixing one of them inevitably seemed to
33break the other. At one point, a patch I seriously considered applying
34from Michael Tokarev did a "strcmp()" to see if it was automount that
35was doing the operation. Ugly, ugly.
36
37However, a prettier solution exists now thanks to the packetized pipe
38mode. By marking the communication pipe as being packetized (by simply
39setting the O_DIRECT flag), we can always just write the bigger packet
40size, and if user-space does a smaller read, it will just get that
41partial end result and the extra alignment padding will simply be thrown
42away.
43
44This makes both automount and systemd happy, since they now get the size
45they asked for, and the kernel side of autofs simply no longer needs to
46care - it could pad out the packet arbitrarily.
47
48Of course, if there is some *other* user of autofs (please, please,
49please tell me it ain't so - and we haven't heard of any) that tries to
50read the packets with multiple writes, that other user will now be
51broken - the whole point of the packetized mode is that one system call
52gets exactly one packet, and you cannot read a packet in pieces.
53
54Tested-by: Michael Tokarev <mjt@tls.msk.ru>
55Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
56Cc: David Miller <davem@davemloft.net>
57Cc: Ian Kent <raven@themaw.net>
58Cc: Thomas Meyer <thomas@m3y3r.de>
59Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
60Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
61---
62 fs/autofs4/autofs_i.h | 11 +++++++++++
63 fs/autofs4/dev-ioctl.c | 2 +-
64 fs/autofs4/inode.c | 2 +-
65 3 files changed, 13 insertions(+), 2 deletions(-)
66
67diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
68index 326dc08..650d520 100644
69--- a/fs/autofs4/autofs_i.h
70+++ b/fs/autofs4/autofs_i.h
71@@ -268,6 +268,17 @@ int autofs4_fill_super(struct super_block *, void *, int);
72 struct autofs_info *autofs4_new_ino(struct autofs_sb_info *);
73 void autofs4_clean_ino(struct autofs_info *);
74
75+static inline int autofs_prepare_pipe(struct file *pipe)
76+{
77+ if (!pipe->f_op || !pipe->f_op->write)
78+ return -EINVAL;
79+ if (!S_ISFIFO(pipe->f_dentry->d_inode->i_mode))
80+ return -EINVAL;
81+ /* We want a packet pipe */
82+ pipe->f_flags |= O_DIRECT;
83+ return 0;
84+}
85+
86 /* Queue management functions */
87
88 int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify);
89diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
90index 509fe1e..de54271 100644
91--- a/fs/autofs4/dev-ioctl.c
92+++ b/fs/autofs4/dev-ioctl.c
93@@ -376,7 +376,7 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
94 err = -EBADF;
95 goto out;
96 }
97- if (!pipe->f_op || !pipe->f_op->write) {
98+ if (autofs_prepare_pipe(pipe) < 0) {
99 err = -EPIPE;
100 fput(pipe);
101 goto out;
102diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
103index 8179f1a..7b5293e 100644
104--- a/fs/autofs4/inode.c
105+++ b/fs/autofs4/inode.c
106@@ -292,7 +292,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
107 printk("autofs: could not open pipe file descriptor\n");
108 goto fail_dput;
109 }
110- if (!pipe->f_op || !pipe->f_op->write)
111+ if (autofs_prepare_pipe(pipe) < 0)
112 goto fail_fput;
113 sbi->pipe = pipe;
114 sbi->pipefd = pipefd;
115--
1161.7.7.6
117
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0119-ARM-7396-1-errata-only-handle-ARM-erratum-326103-on-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0119-ARM-7396-1-errata-only-handle-ARM-erratum-326103-on-.patch
new file mode 100644
index 00000000..645bdb6e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0119-ARM-7396-1-errata-only-handle-ARM-erratum-326103-on-.patch
@@ -0,0 +1,89 @@
1From 73a8033457dd006878a2eeeb14133724923cd6af Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 20 Apr 2012 17:20:08 +0100
4Subject: [PATCH 119/165] ARM: 7396/1: errata: only handle ARM erratum #326103
5 on affected cores
6
7commit f0c4b8d653f5ee091fb8d4d02ed7eaad397491bb upstream.
8
9Erratum #326103 ("FSR write bit incorrect on a SWP to read-only memory")
10only affects the ARM 1136 core prior to r1p0. The workaround
11disassembles the faulting instruction to determine whether it was a read
12or write access on all v6 cores.
13
14An issue has been reported on the ARM 11MPCore whereby loading the
15faulting instruction may happen in parallel with that page being
16unmapped, resulting in a deadlock due to the lack of TLB broadcasting
17in hardware:
18
19http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/091561.html
20
21This patch limits the workaround so that it is only used on affected
22cores, which are known to be UP only. Other v6 cores can rely on the
23FSR to indicate the access type correctly.
24
25Signed-off-by: Will Deacon <will.deacon@arm.com>
26Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
27Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
28---
29 arch/arm/Kconfig | 9 +++++++++
30 arch/arm/mm/abort-ev6.S | 17 +++++++++++------
31 2 files changed, 20 insertions(+), 6 deletions(-)
32
33diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
34index 6cd71ec..26574f0 100644
35--- a/arch/arm/Kconfig
36+++ b/arch/arm/Kconfig
37@@ -1156,6 +1156,15 @@ if !MMU
38 source "arch/arm/Kconfig-nommu"
39 endif
40
41+config ARM_ERRATA_326103
42+ bool "ARM errata: FSR write bit incorrect on a SWP to read-only memory"
43+ depends on CPU_V6
44+ help
45+ Executing a SWP instruction to read-only memory does not set bit 11
46+ of the FSR on the ARM 1136 prior to r1p0. This causes the kernel to
47+ treat the access as a read, preventing a COW from occurring and
48+ causing the faulting task to livelock.
49+
50 config ARM_ERRATA_411920
51 bool "ARM errata: Invalidation of the Instruction Cache operation can fail"
52 depends on CPU_V6 || CPU_V6K
53diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S
54index ff1f7cc..8074199 100644
55--- a/arch/arm/mm/abort-ev6.S
56+++ b/arch/arm/mm/abort-ev6.S
57@@ -26,18 +26,23 @@ ENTRY(v6_early_abort)
58 mrc p15, 0, r1, c5, c0, 0 @ get FSR
59 mrc p15, 0, r0, c6, c0, 0 @ get FAR
60 /*
61- * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR (erratum 326103).
62- * The test below covers all the write situations, including Java bytecodes
63+ * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR.
64 */
65- bic r1, r1, #1 << 11 @ clear bit 11 of FSR
66+#ifdef CONFIG_ARM_ERRATA_326103
67+ ldr ip, =0x4107b36
68+ mrc p15, 0, r3, c0, c0, 0 @ get processor id
69+ teq ip, r3, lsr #4 @ r0 ARM1136?
70+ bne do_DataAbort
71 tst r5, #PSR_J_BIT @ Java?
72+ tsteq r5, #PSR_T_BIT @ Thumb?
73 bne do_DataAbort
74- do_thumb_abort fsr=r1, pc=r4, psr=r5, tmp=r3
75- ldreq r3, [r4] @ read aborted ARM instruction
76+ bic r1, r1, #1 << 11 @ clear bit 11 of FSR
77+ ldr r3, [r4] @ read aborted ARM instruction
78 #ifdef CONFIG_CPU_ENDIAN_BE8
79- reveq r3, r3
80+ rev r3, r3
81 #endif
82 do_ldrd_abort tmp=ip, insn=r3
83 tst r3, #1 << 20 @ L = 0 -> write
84 orreq r1, r1, #1 << 11 @ yes.
85+#endif
86 b do_DataAbort
87--
881.7.7.6
89
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch
new file mode 100644
index 00000000..32e3a48f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch
@@ -0,0 +1,62 @@
1From 8d2876b00b257ea48fddbccfb531ad618d83ed0b Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 20 Apr 2012 17:21:08 +0100
4Subject: [PATCH 120/165] ARM: 7397/1: l2x0: only apply workaround for erratum
5 #753970 on PL310
6
7commit f154fe9b806574437b47f08e924ad10c0e240b23 upstream.
8
9The workaround for PL310 erratum #753970 can lead to deadlock on systems
10with an L220 cache controller.
11
12This patch makes the workaround effective only when the cache controller
13is identified as a PL310 at probe time.
14
15Signed-off-by: Will Deacon <will.deacon@arm.com>
16Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17[bwh: Backported to 3.2: adjust context]
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 arch/arm/mm/cache-l2x0.c | 12 ++++++------
21 1 files changed, 6 insertions(+), 6 deletions(-)
22
23diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
24index b1e192b..971d527 100644
25--- a/arch/arm/mm/cache-l2x0.c
26+++ b/arch/arm/mm/cache-l2x0.c
27@@ -32,6 +32,7 @@ static void __iomem *l2x0_base;
28 static DEFINE_RAW_SPINLOCK(l2x0_lock);
29 static uint32_t l2x0_way_mask; /* Bitmask of active ways */
30 static uint32_t l2x0_size;
31+static unsigned long sync_reg_offset = L2X0_CACHE_SYNC;
32
33 struct l2x0_regs l2x0_saved_regs;
34
35@@ -61,12 +62,7 @@ static inline void cache_sync(void)
36 {
37 void __iomem *base = l2x0_base;
38
39-#ifdef CONFIG_PL310_ERRATA_753970
40- /* write to an unmmapped register */
41- writel_relaxed(0, base + L2X0_DUMMY_REG);
42-#else
43- writel_relaxed(0, base + L2X0_CACHE_SYNC);
44-#endif
45+ writel_relaxed(0, base + sync_reg_offset);
46 cache_wait(base + L2X0_CACHE_SYNC, 1);
47 }
48
49@@ -331,6 +327,10 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
50 else
51 ways = 8;
52 type = "L310";
53+#ifdef CONFIG_PL310_ERRATA_753970
54+ /* Unmapped register. */
55+ sync_reg_offset = L2X0_DUMMY_REG;
56+#endif
57 break;
58 case L2X0_CACHE_ID_PART_L210:
59 ways = (aux >> 13) & 0xf;
60--
611.7.7.6
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch
new file mode 100644
index 00000000..ffd9e263
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch
@@ -0,0 +1,69 @@
1From a927ce0f8dd30f05ced7a71a5523ca5d82eab5d6 Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 20 Apr 2012 17:22:11 +0100
4Subject: [PATCH 121/165] ARM: 7398/1: l2x0: only write to debug registers on
5 PL310
6
7commit ab4d536890853ab6675ede65db40e2c0980cb0ea upstream.
8
9PL310 errata #588369 and #727915 require writes to the debug registers
10of the cache controller to work around known problems. Writing these
11registers on L220 may cause deadlock, so ensure that we only perform
12this operation when we identify a PL310 at probe time.
13
14Signed-off-by: Will Deacon <will.deacon@arm.com>
15Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 arch/arm/mm/cache-l2x0.c | 13 ++++++++-----
19 1 files changed, 8 insertions(+), 5 deletions(-)
20
21diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
22index 971d527..db7bcc0 100644
23--- a/arch/arm/mm/cache-l2x0.c
24+++ b/arch/arm/mm/cache-l2x0.c
25@@ -81,10 +81,13 @@ static inline void l2x0_inv_line(unsigned long addr)
26 }
27
28 #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915)
29+static inline void debug_writel(unsigned long val)
30+{
31+ if (outer_cache.set_debug)
32+ outer_cache.set_debug(val);
33+}
34
35-#define debug_writel(val) outer_cache.set_debug(val)
36-
37-static void l2x0_set_debug(unsigned long val)
38+static void pl310_set_debug(unsigned long val)
39 {
40 writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
41 }
42@@ -94,7 +97,7 @@ static inline void debug_writel(unsigned long val)
43 {
44 }
45
46-#define l2x0_set_debug NULL
47+#define pl310_set_debug NULL
48 #endif
49
50 #ifdef CONFIG_PL310_ERRATA_588369
51@@ -331,6 +334,7 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
52 /* Unmapped register. */
53 sync_reg_offset = L2X0_DUMMY_REG;
54 #endif
55+ outer_cache.set_debug = pl310_set_debug;
56 break;
57 case L2X0_CACHE_ID_PART_L210:
58 ways = (aux >> 13) & 0xf;
59@@ -379,7 +383,6 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
60 outer_cache.flush_all = l2x0_flush_all;
61 outer_cache.inv_all = l2x0_inv_all;
62 outer_cache.disable = l2x0_disable;
63- outer_cache.set_debug = l2x0_set_debug;
64
65 printk(KERN_INFO "%s cache controller enabled\n", type);
66 printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n",
67--
681.7.7.6
69
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0122-ARM-7403-1-tls-remove-covert-channel-via-TPIDRURW.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0122-ARM-7403-1-tls-remove-covert-channel-via-TPIDRURW.patch
new file mode 100644
index 00000000..3caa8b69
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0122-ARM-7403-1-tls-remove-covert-channel-via-TPIDRURW.patch
@@ -0,0 +1,52 @@
1From 3130ecbd0c24f4b31da00862223e9985010690c2 Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 27 Apr 2012 12:45:07 +0100
4Subject: [PATCH 122/165] ARM: 7403/1: tls: remove covert channel via TPIDRURW
5
6commit 6a1c53124aa161eb624ce7b1e40ade728186d34c upstream.
7
8TPIDRURW is a user read/write register forming part of the group of
9thread registers in more recent versions of the ARM architecture (~v6+).
10
11Currently, the kernel does not touch this register, which allows tasks
12to communicate covertly by reading and writing to the register without
13context-switching affecting its contents.
14
15This patch clears TPIDRURW when TPIDRURO is updated via the set_tls
16macro, which is called directly from __switch_to. Since the current
17behaviour makes the register useless to userspace as far as thread
18pointers are concerned, simply clearing the register (rather than saving
19and restoring it) will not cause any problems to userspace.
20
21Signed-off-by: Will Deacon <will.deacon@arm.com>
22Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
23Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
24---
25 arch/arm/include/asm/tls.h | 4 ++++
26 1 files changed, 4 insertions(+), 0 deletions(-)
27
28diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h
29index 60843eb..73409e6 100644
30--- a/arch/arm/include/asm/tls.h
31+++ b/arch/arm/include/asm/tls.h
32@@ -7,6 +7,8 @@
33
34 .macro set_tls_v6k, tp, tmp1, tmp2
35 mcr p15, 0, \tp, c13, c0, 3 @ set TLS register
36+ mov \tmp1, #0
37+ mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register
38 .endm
39
40 .macro set_tls_v6, tp, tmp1, tmp2
41@@ -15,6 +17,8 @@
42 mov \tmp2, #0xffff0fff
43 tst \tmp1, #HWCAP_TLS @ hardware TLS available?
44 mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register
45+ movne \tmp1, #0
46+ mcrne p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register
47 streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0
48 .endm
49
50--
511.7.7.6
52
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0123-ARM-7406-1-hotplug-copy-the-affinity-mask-when-force.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0123-ARM-7406-1-hotplug-copy-the-affinity-mask-when-force.patch
new file mode 100644
index 00000000..7f669914
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0123-ARM-7406-1-hotplug-copy-the-affinity-mask-when-force.patch
@@ -0,0 +1,53 @@
1From 453a85cabdd26d6525b6563e7d1b804b4b88d42f Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 27 Apr 2012 12:56:24 +0100
4Subject: [PATCH 123/165] ARM: 7406/1: hotplug: copy the affinity mask when
5 forcefully migrating IRQs
6
7commit 5e7371ded05adfcfcee44a8bc070bfc37979b8f2 upstream.
8
9When a CPU is hotplugged off, we migrate any IRQs currently affine to it
10away and onto another online CPU by calling the irq_set_affinity
11function of the relevant interrupt controller chip. This function
12returns either IRQ_SET_MASK_OK or IRQ_SET_MASK_OK_NOCOPY, to indicate
13whether irq_data.affinity was updated.
14
15If we are forcefully migrating an interrupt (because the affinity mask
16no longer identifies any online CPUs) then we should update the IRQ
17affinity mask to reflect the new CPU set. Failure to do so can
18potentially leave /proc/irq/n/smp_affinity identifying only offline
19CPUs, which may confuse userspace IRQ balancing daemons.
20
21This patch updates migrate_one_irq to copy the affinity mask when
22the interrupt chip returns IRQ_SET_MASK_OK after forcefully changing the
23affinity of an interrupt.
24
25Reported-by: Leif Lindholm <leif.lindholm@arm.com>
26Signed-off-by: Will Deacon <will.deacon@arm.com>
27Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
28Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
29---
30 arch/arm/kernel/irq.c | 6 +++---
31 1 files changed, 3 insertions(+), 3 deletions(-)
32
33diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
34index 3efd82c..87c8be5 100644
35--- a/arch/arm/kernel/irq.c
36+++ b/arch/arm/kernel/irq.c
37@@ -156,10 +156,10 @@ static bool migrate_one_irq(struct irq_desc *desc)
38 }
39
40 c = irq_data_get_irq_chip(d);
41- if (c->irq_set_affinity)
42- c->irq_set_affinity(d, affinity, true);
43- else
44+ if (!c->irq_set_affinity)
45 pr_debug("IRQ%u: unable to set affinity\n", d->irq);
46+ else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret)
47+ cpumask_copy(d->affinity, affinity);
48
49 return ret;
50 }
51--
521.7.7.6
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0124-libsas-fix-sas_find_bcast_phy-in-the-presence-of-vac.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0124-libsas-fix-sas_find_bcast_phy-in-the-presence-of-vac.patch
new file mode 100644
index 00000000..c29f0acc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0124-libsas-fix-sas_find_bcast_phy-in-the-presence-of-vac.patch
@@ -0,0 +1,59 @@
1From 8656241ad68bd13cec3e1fc5bf4ce8006b838b74 Mon Sep 17 00:00:00 2001
2From: Thomas Jackson <thomas.p.jackson@intel.com>
3Date: Fri, 17 Feb 2012 18:33:10 -0800
4Subject: [PATCH 124/165] libsas: fix sas_find_bcast_phy() in the presence of
5 'vacant' phys
6
7commit 1699490db339e2c6b3037ea8e7dcd6b2755b688e upstream.
8
9If an expander reports 'PHY VACANT' for a phy index prior to the one
10that generated a BCN libsas fails rediscovery. Since a vacant phy is
11defined as a valid phy index that will never have an attached device
12just continue the search.
13
14Signed-off-by: Thomas Jackson <thomas.p.jackson@intel.com>
15Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16Signed-off-by: James Bottomley <JBottomley@Parallels.com>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/scsi/libsas/sas_expander.c | 17 ++++++++++++-----
20 1 files changed, 12 insertions(+), 5 deletions(-)
21
22diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
23index 1b831c5..a68780b 100644
24--- a/drivers/scsi/libsas/sas_expander.c
25+++ b/drivers/scsi/libsas/sas_expander.c
26@@ -1643,9 +1643,17 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id,
27 int phy_change_count = 0;
28
29 res = sas_get_phy_change_count(dev, i, &phy_change_count);
30- if (res)
31- goto out;
32- else if (phy_change_count != ex->ex_phy[i].phy_change_count) {
33+ switch (res) {
34+ case SMP_RESP_PHY_VACANT:
35+ case SMP_RESP_NO_PHY:
36+ continue;
37+ case SMP_RESP_FUNC_ACC:
38+ break;
39+ default:
40+ return res;
41+ }
42+
43+ if (phy_change_count != ex->ex_phy[i].phy_change_count) {
44 if (update)
45 ex->ex_phy[i].phy_change_count =
46 phy_change_count;
47@@ -1653,8 +1661,7 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id,
48 return 0;
49 }
50 }
51-out:
52- return res;
53+ return 0;
54 }
55
56 static int sas_get_ex_change_count(struct domain_device *dev, int *ecc)
57--
581.7.7.6
59
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0125-libsas-fix-false-positive-device-attached-conditions.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0125-libsas-fix-false-positive-device-attached-conditions.patch
new file mode 100644
index 00000000..cb5c192f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0125-libsas-fix-false-positive-device-attached-conditions.patch
@@ -0,0 +1,48 @@
1From 18c33d9e87a0a285218cc075f4a471fe53142061 Mon Sep 17 00:00:00 2001
2From: Dan Williams <dan.j.williams@intel.com>
3Date: Tue, 20 Mar 2012 10:50:27 -0700
4Subject: [PATCH 125/165] libsas: fix false positive 'device attached'
5 conditions
6
7commit 7d1d865181185bdf1316d236b1b4bd02c9020729 upstream.
8
9Normalize phy->attached_sas_addr to return a zero-address in the case
10when device-type == NO_DEVICE or the linkrate is invalid to handle
11expanders that put non-zero sas addresses in the discovery response:
12
13 sas: ex 5001b4da000f903f phy02:U:0 attached: 0100000000000000 (no device)
14 sas: ex 5001b4da000f903f phy01:U:0 attached: 0100000000000000 (no device)
15 sas: ex 5001b4da000f903f phy03:U:0 attached: 0100000000000000 (no device)
16 sas: ex 5001b4da000f903f phy00:U:0 attached: 0100000000000000 (no device)
17
18Reported-by: Andrzej Jakowski <andrzej.jakowski@intel.com>
19Signed-off-by: Dan Williams <dan.j.williams@intel.com>
20Signed-off-by: James Bottomley <JBottomley@Parallels.com>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/scsi/libsas/sas_expander.c | 9 ++++++++-
24 1 files changed, 8 insertions(+), 1 deletions(-)
25
26diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
27index a68780b..e48ba4b 100644
28--- a/drivers/scsi/libsas/sas_expander.c
29+++ b/drivers/scsi/libsas/sas_expander.c
30@@ -192,7 +192,14 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id,
31 phy->attached_sata_ps = dr->attached_sata_ps;
32 phy->attached_iproto = dr->iproto << 1;
33 phy->attached_tproto = dr->tproto << 1;
34- memcpy(phy->attached_sas_addr, dr->attached_sas_addr, SAS_ADDR_SIZE);
35+ /* help some expanders that fail to zero sas_address in the 'no
36+ * device' case
37+ */
38+ if (phy->attached_dev_type == NO_DEVICE ||
39+ phy->linkrate < SAS_LINK_RATE_1_5_GBPS)
40+ memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE);
41+ else
42+ memcpy(phy->attached_sas_addr, dr->attached_sas_addr, SAS_ADDR_SIZE);
43 phy->attached_phy_id = dr->attached_phy_id;
44 phy->phy_change_count = dr->change_count;
45 phy->routing_attr = dr->routing_attr;
46--
471.7.7.6
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0126-efi-Add-new-variable-attributes.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0126-efi-Add-new-variable-attributes.patch
new file mode 100644
index 00000000..e5bc69d7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0126-efi-Add-new-variable-attributes.patch
@@ -0,0 +1,45 @@
1From 9b4ee1cca5f9cce3c72d4a34597a0c1dc0c786bd Mon Sep 17 00:00:00 2001
2From: Matthew Garrett <mjg@redhat.com>
3Date: Mon, 30 Apr 2012 16:11:29 -0400
4Subject: [PATCH 126/165] efi: Add new variable attributes
5
6commit 41b3254c93acc56adc3c4477fef7c9512d47659e upstream.
7
8More recent versions of the UEFI spec have added new attributes for
9variables. Add them.
10
11Signed-off-by: Matthew Garrett <mjg@redhat.com>
12Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13[bwh: Backported to 3.2: adjust context]
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 include/linux/efi.h | 13 ++++++++++++-
17 1 files changed, 12 insertions(+), 1 deletions(-)
18
19diff --git a/include/linux/efi.h b/include/linux/efi.h
20index 2362a0b..1328d8c 100644
21--- a/include/linux/efi.h
22+++ b/include/linux/efi.h
23@@ -383,7 +383,18 @@ extern int __init efi_setup_pcdp_console(char *);
24 #define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001
25 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002
26 #define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004
27-
28+#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x0000000000000008
29+#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x0000000000000010
30+#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x0000000000000020
31+#define EFI_VARIABLE_APPEND_WRITE 0x0000000000000040
32+
33+#define EFI_VARIABLE_MASK (EFI_VARIABLE_NON_VOLATILE | \
34+ EFI_VARIABLE_BOOTSERVICE_ACCESS | \
35+ EFI_VARIABLE_RUNTIME_ACCESS | \
36+ EFI_VARIABLE_HARDWARE_ERROR_RECORD | \
37+ EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \
38+ EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \
39+ EFI_VARIABLE_APPEND_WRITE)
40 /*
41 * EFI Device Path information
42 */
43--
441.7.7.6
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0127-efi-Validate-UEFI-boot-variables.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0127-efi-Validate-UEFI-boot-variables.patch
new file mode 100644
index 00000000..92781aa9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0127-efi-Validate-UEFI-boot-variables.patch
@@ -0,0 +1,231 @@
1From 620a8b56785ca32ec7cde5f632617d89409a21ba Mon Sep 17 00:00:00 2001
2From: Matthew Garrett <mjg@redhat.com>
3Date: Mon, 30 Apr 2012 16:11:30 -0400
4Subject: [PATCH 127/165] efi: Validate UEFI boot variables
5
6commit fec6c20b570bcf541e581fc97f2e0cbdb9725b98 upstream.
7
8A common flaw in UEFI systems is a refusal to POST triggered by a malformed
9boot variable. Once in this state, machines may only be restored by
10reflashing their firmware with an external hardware device. While this is
11obviously a firmware bug, the serious nature of the outcome suggests that
12operating systems should filter their variable writes in order to prevent
13a malicious user from rendering the machine unusable.
14
15Signed-off-by: Matthew Garrett <mjg@redhat.com>
16Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/firmware/efivars.c | 182 ++++++++++++++++++++++++++++++++++++++++++++
20 1 files changed, 182 insertions(+), 0 deletions(-)
21
22diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
23index b0a8117..150e4ec 100644
24--- a/drivers/firmware/efivars.c
25+++ b/drivers/firmware/efivars.c
26@@ -191,6 +191,176 @@ utf16_strncmp(const efi_char16_t *a, const efi_char16_t *b, size_t len)
27 }
28 }
29
30+static bool
31+validate_device_path(struct efi_variable *var, int match, u8 *buffer, int len)
32+{
33+ struct efi_generic_dev_path *node;
34+ int offset = 0;
35+
36+ node = (struct efi_generic_dev_path *)buffer;
37+
38+ while (offset < len) {
39+ offset += node->length;
40+
41+ if (offset > len)
42+ return false;
43+
44+ if ((node->type == EFI_DEV_END_PATH ||
45+ node->type == EFI_DEV_END_PATH2) &&
46+ node->sub_type == EFI_DEV_END_ENTIRE)
47+ return true;
48+
49+ node = (struct efi_generic_dev_path *)(buffer + offset);
50+ }
51+
52+ /*
53+ * If we're here then either node->length pointed past the end
54+ * of the buffer or we reached the end of the buffer without
55+ * finding a device path end node.
56+ */
57+ return false;
58+}
59+
60+static bool
61+validate_boot_order(struct efi_variable *var, int match, u8 *buffer, int len)
62+{
63+ /* An array of 16-bit integers */
64+ if ((len % 2) != 0)
65+ return false;
66+
67+ return true;
68+}
69+
70+static bool
71+validate_load_option(struct efi_variable *var, int match, u8 *buffer, int len)
72+{
73+ u16 filepathlength;
74+ int i, desclength = 0;
75+
76+ /* Either "Boot" or "Driver" followed by four digits of hex */
77+ for (i = match; i < match+4; i++) {
78+ if (hex_to_bin(var->VariableName[i] & 0xff) < 0)
79+ return true;
80+ }
81+
82+ /* A valid entry must be at least 6 bytes */
83+ if (len < 6)
84+ return false;
85+
86+ filepathlength = buffer[4] | buffer[5] << 8;
87+
88+ /*
89+ * There's no stored length for the description, so it has to be
90+ * found by hand
91+ */
92+ desclength = utf16_strsize((efi_char16_t *)(buffer + 6), len) + 2;
93+
94+ /* Each boot entry must have a descriptor */
95+ if (!desclength)
96+ return false;
97+
98+ /*
99+ * If the sum of the length of the description, the claimed filepath
100+ * length and the original header are greater than the length of the
101+ * variable, it's malformed
102+ */
103+ if ((desclength + filepathlength + 6) > len)
104+ return false;
105+
106+ /*
107+ * And, finally, check the filepath
108+ */
109+ return validate_device_path(var, match, buffer + desclength + 6,
110+ filepathlength);
111+}
112+
113+static bool
114+validate_uint16(struct efi_variable *var, int match, u8 *buffer, int len)
115+{
116+ /* A single 16-bit integer */
117+ if (len != 2)
118+ return false;
119+
120+ return true;
121+}
122+
123+static bool
124+validate_ascii_string(struct efi_variable *var, int match, u8 *buffer, int len)
125+{
126+ int i;
127+
128+ for (i = 0; i < len; i++) {
129+ if (buffer[i] > 127)
130+ return false;
131+
132+ if (buffer[i] == 0)
133+ return true;
134+ }
135+
136+ return false;
137+}
138+
139+struct variable_validate {
140+ char *name;
141+ bool (*validate)(struct efi_variable *var, int match, u8 *data,
142+ int len);
143+};
144+
145+static const struct variable_validate variable_validate[] = {
146+ { "BootNext", validate_uint16 },
147+ { "BootOrder", validate_boot_order },
148+ { "DriverOrder", validate_boot_order },
149+ { "Boot*", validate_load_option },
150+ { "Driver*", validate_load_option },
151+ { "ConIn", validate_device_path },
152+ { "ConInDev", validate_device_path },
153+ { "ConOut", validate_device_path },
154+ { "ConOutDev", validate_device_path },
155+ { "ErrOut", validate_device_path },
156+ { "ErrOutDev", validate_device_path },
157+ { "Timeout", validate_uint16 },
158+ { "Lang", validate_ascii_string },
159+ { "PlatformLang", validate_ascii_string },
160+ { "", NULL },
161+};
162+
163+static bool
164+validate_var(struct efi_variable *var, u8 *data, int len)
165+{
166+ int i;
167+ u16 *unicode_name = var->VariableName;
168+
169+ for (i = 0; variable_validate[i].validate != NULL; i++) {
170+ const char *name = variable_validate[i].name;
171+ int match;
172+
173+ for (match = 0; ; match++) {
174+ char c = name[match];
175+ u16 u = unicode_name[match];
176+
177+ /* All special variables are plain ascii */
178+ if (u > 127)
179+ return true;
180+
181+ /* Wildcard in the matching name means we've matched */
182+ if (c == '*')
183+ return variable_validate[i].validate(var,
184+ match, data, len);
185+
186+ /* Case sensitive match */
187+ if (c != u)
188+ break;
189+
190+ /* Reached the end of the string while matching */
191+ if (!c)
192+ return variable_validate[i].validate(var,
193+ match, data, len);
194+ }
195+ }
196+
197+ return true;
198+}
199+
200 static efi_status_t
201 get_var_data_locked(struct efivars *efivars, struct efi_variable *var)
202 {
203@@ -324,6 +494,12 @@ efivar_store_raw(struct efivar_entry *entry, const char *buf, size_t count)
204 return -EINVAL;
205 }
206
207+ if ((new_var->Attributes & ~EFI_VARIABLE_MASK) != 0 ||
208+ validate_var(new_var, new_var->Data, new_var->DataSize) == false) {
209+ printk(KERN_ERR "efivars: Malformed variable content\n");
210+ return -EINVAL;
211+ }
212+
213 spin_lock(&efivars->lock);
214 status = efivars->ops->set_variable(new_var->VariableName,
215 &new_var->VendorGuid,
216@@ -624,6 +800,12 @@ static ssize_t efivar_create(struct file *filp, struct kobject *kobj,
217 if (!capable(CAP_SYS_ADMIN))
218 return -EACCES;
219
220+ if ((new_var->Attributes & ~EFI_VARIABLE_MASK) != 0 ||
221+ validate_var(new_var, new_var->Data, new_var->DataSize) == false) {
222+ printk(KERN_ERR "efivars: Malformed variable content\n");
223+ return -EINVAL;
224+ }
225+
226 spin_lock(&efivars->lock);
227
228 /*
229--
2301.7.7.6
231
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0128-PM-Hibernate-fix-the-number-of-pages-used-for-hibern.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0128-PM-Hibernate-fix-the-number-of-pages-used-for-hibern.patch
new file mode 100644
index 00000000..913b4738
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0128-PM-Hibernate-fix-the-number-of-pages-used-for-hibern.patch
@@ -0,0 +1,100 @@
1From a33123cb0368231d84b8839f9f56bee45c51016d Mon Sep 17 00:00:00 2001
2From: Bojan Smojver <bojan@rexursive.com>
3Date: Tue, 24 Apr 2012 23:53:28 +0200
4Subject: [PATCH 128/165] PM / Hibernate: fix the number of pages used for
5 hibernate/thaw buffering
6
7commit f8262d476823a7ea1eb497ff9676d1eab2393c75 upstream.
8
9Hibernation regression fix, since 3.2.
10
11Calculate the number of required free pages based on non-high memory
12pages only, because that is where the buffers will come from.
13
14Commit 081a9d043c983f161b78fdc4671324d1342b86bc introduced a new buffer
15page allocation logic during hibernation, in order to improve the
16performance. The amount of pages allocated was calculated based on total
17amount of pages available, although only non-high memory pages are
18usable for this purpose. This caused hibernation code to attempt to over
19allocate pages on platforms that have high memory, which led to hangs.
20
21Signed-off-by: Bojan Smojver <bojan@rexursive.com>
22Signed-off-by: Rafael J. Wysocki <rjw@suse.de>
23Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
24---
25 kernel/power/swap.c | 28 ++++++++++++++++++++++------
26 1 files changed, 22 insertions(+), 6 deletions(-)
27
28diff --git a/kernel/power/swap.c b/kernel/power/swap.c
29index 11a594c..b313086 100644
30--- a/kernel/power/swap.c
31+++ b/kernel/power/swap.c
32@@ -52,6 +52,23 @@
33
34 #define MAP_PAGE_ENTRIES (PAGE_SIZE / sizeof(sector_t) - 1)
35
36+/*
37+ * Number of free pages that are not high.
38+ */
39+static inline unsigned long low_free_pages(void)
40+{
41+ return nr_free_pages() - nr_free_highpages();
42+}
43+
44+/*
45+ * Number of pages required to be kept free while writing the image. Always
46+ * half of all available low pages before the writing starts.
47+ */
48+static inline unsigned long reqd_free_pages(void)
49+{
50+ return low_free_pages() / 2;
51+}
52+
53 struct swap_map_page {
54 sector_t entries[MAP_PAGE_ENTRIES];
55 sector_t next_swap;
56@@ -73,7 +90,7 @@ struct swap_map_handle {
57 sector_t cur_swap;
58 sector_t first_sector;
59 unsigned int k;
60- unsigned long nr_free_pages, written;
61+ unsigned long reqd_free_pages;
62 u32 crc32;
63 };
64
65@@ -317,8 +334,7 @@ static int get_swap_writer(struct swap_map_handle *handle)
66 goto err_rel;
67 }
68 handle->k = 0;
69- handle->nr_free_pages = nr_free_pages() >> 1;
70- handle->written = 0;
71+ handle->reqd_free_pages = reqd_free_pages();
72 handle->first_sector = handle->cur_swap;
73 return 0;
74 err_rel:
75@@ -353,11 +369,11 @@ static int swap_write_page(struct swap_map_handle *handle, void *buf,
76 handle->cur_swap = offset;
77 handle->k = 0;
78 }
79- if (bio_chain && ++handle->written > handle->nr_free_pages) {
80+ if (bio_chain && low_free_pages() <= handle->reqd_free_pages) {
81 error = hib_wait_on_bio_chain(bio_chain);
82 if (error)
83 goto out;
84- handle->written = 0;
85+ handle->reqd_free_pages = reqd_free_pages();
86 }
87 out:
88 return error;
89@@ -619,7 +635,7 @@ static int save_image_lzo(struct swap_map_handle *handle,
90 * Adjust number of free pages after all allocations have been done.
91 * We don't want to run out of pages when writing.
92 */
93- handle->nr_free_pages = nr_free_pages() >> 1;
94+ handle->reqd_free_pages = reqd_free_pages();
95
96 /*
97 * Start the CRC32 thread.
98--
991.7.7.6
100
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0129-drm-i915-enable-dip-before-writing-data-on-gen4.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0129-drm-i915-enable-dip-before-writing-data-on-gen4.patch
new file mode 100644
index 00000000..639addc6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0129-drm-i915-enable-dip-before-writing-data-on-gen4.patch
@@ -0,0 +1,50 @@
1From 239f17a64c2c70a830feacf5fe07fb8ca1b288fb Mon Sep 17 00:00:00 2001
2From: Paulo Zanoni <paulo.r.zanoni@intel.com>
3Date: Wed, 2 May 2012 22:55:43 -0300
4Subject: [PATCH 129/165] drm/i915: enable dip before writing data on gen4
5
6commit c1230df7e19e0f27655c0eb9d966c7e03be7cc50 upstream.
7
8While testing with the intel_infoframes tool on gen4, I see that when
9video DIP is disabled, what we write to the DATA memory is not exactly
10what we read back later.
11
12This regression has been introduce in
13
14commit 64a8fc0145a1d0fdc25fc9367c2e6c621955fb3b
15Author: Jesse Barnes <jbarnes@virtuousgeek.org>
16Date: Thu Sep 22 11:16:00 2011 +0530
17
18 drm/i915: fix ILK+ infoframe support
19
20That commit was setting VIDEO_DIP_CTL to 0 when initializing, which
21caused the problem.
22
23Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43947
24Tested-by: Yang Guang <guang.a.yang@intel.com>
25Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
26Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
27[danvet: Pimped commit message by using the usual commit citation
28layout.]
29Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
30Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
31---
32 drivers/gpu/drm/i915/intel_hdmi.c | 2 +-
33 1 files changed, 1 insertions(+), 1 deletions(-)
34
35diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
36index 64541f7..9cd81ba 100644
37--- a/drivers/gpu/drm/i915/intel_hdmi.c
38+++ b/drivers/gpu/drm/i915/intel_hdmi.c
39@@ -136,7 +136,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder,
40
41 val &= ~VIDEO_DIP_SELECT_MASK;
42
43- I915_WRITE(VIDEO_DIP_CTL, val | port | flags);
44+ I915_WRITE(VIDEO_DIP_CTL, VIDEO_DIP_ENABLE | val | port | flags);
45
46 for (i = 0; i < len; i += 4) {
47 I915_WRITE(VIDEO_DIP_DATA, *data);
48--
491.7.7.6
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0130-sched-Fix-nohz-load-accounting-again.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0130-sched-Fix-nohz-load-accounting-again.patch
new file mode 100644
index 00000000..44a254b9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0130-sched-Fix-nohz-load-accounting-again.patch
@@ -0,0 +1,133 @@
1From 01347c8bd017f3c031bc472db23953f9695fd65c Mon Sep 17 00:00:00 2001
2From: Peter Zijlstra <peterz@infradead.org>
3Date: Thu, 1 Mar 2012 15:04:46 +0100
4Subject: [PATCH 130/165] sched: Fix nohz load accounting -- again!
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit c308b56b5398779cd3da0f62ab26b0453494c3d4 upstream.
10
11Various people reported nohz load tracking still being wrecked, but Doug
12spotted the actual problem. We fold the nohz remainder in too soon,
13causing us to loose samples and under-account.
14
15So instead of playing catch-up up-front, always do a single load-fold
16with whatever state we encounter and only then fold the nohz remainder
17and play catch-up.
18
19Reported-by: Doug Smythies <dsmythies@telus.net>
20Reported-by: LesÃ…=82aw Kope=C4=87 <leslaw.kopec@nasza-klasa.pl>
21Reported-by: Aman Gupta <aman@tmm1.net>
22Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
23Link: http://lkml.kernel.org/n/tip-4v31etnhgg9kwd6ocgx3rxl8@git.kernel.org
24Signed-off-by: Ingo Molnar <mingo@elte.hu>
25[bwh: Backported to 3.2: change filename]
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 kernel/sched.c | 53 ++++++++++++++++++++++++++---------------------------
29 1 files changed, 26 insertions(+), 27 deletions(-)
30
31diff --git a/kernel/sched.c b/kernel/sched.c
32index 106a3b8..299f55c 100644
33--- a/kernel/sched.c
34+++ b/kernel/sched.c
35@@ -3538,13 +3538,10 @@ calc_load_n(unsigned long load, unsigned long exp,
36 * Once we've updated the global active value, we need to apply the exponential
37 * weights adjusted to the number of cycles missed.
38 */
39-static void calc_global_nohz(unsigned long ticks)
40+static void calc_global_nohz(void)
41 {
42 long delta, active, n;
43
44- if (time_before(jiffies, calc_load_update))
45- return;
46-
47 /*
48 * If we crossed a calc_load_update boundary, make sure to fold
49 * any pending idle changes, the respective CPUs might have
50@@ -3556,31 +3553,25 @@ static void calc_global_nohz(unsigned long ticks)
51 atomic_long_add(delta, &calc_load_tasks);
52
53 /*
54- * If we were idle for multiple load cycles, apply them.
55+ * It could be the one fold was all it took, we done!
56 */
57- if (ticks >= LOAD_FREQ) {
58- n = ticks / LOAD_FREQ;
59+ if (time_before(jiffies, calc_load_update + 10))
60+ return;
61
62- active = atomic_long_read(&calc_load_tasks);
63- active = active > 0 ? active * FIXED_1 : 0;
64+ /*
65+ * Catch-up, fold however many we are behind still
66+ */
67+ delta = jiffies - calc_load_update - 10;
68+ n = 1 + (delta / LOAD_FREQ);
69
70- avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n);
71- avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n);
72- avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n);
73+ active = atomic_long_read(&calc_load_tasks);
74+ active = active > 0 ? active * FIXED_1 : 0;
75
76- calc_load_update += n * LOAD_FREQ;
77- }
78+ avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n);
79+ avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n);
80+ avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n);
81
82- /*
83- * Its possible the remainder of the above division also crosses
84- * a LOAD_FREQ period, the regular check in calc_global_load()
85- * which comes after this will take care of that.
86- *
87- * Consider us being 11 ticks before a cycle completion, and us
88- * sleeping for 4*LOAD_FREQ + 22 ticks, then the above code will
89- * age us 4 cycles, and the test in calc_global_load() will
90- * pick up the final one.
91- */
92+ calc_load_update += n * LOAD_FREQ;
93 }
94 #else
95 static void calc_load_account_idle(struct rq *this_rq)
96@@ -3592,7 +3583,7 @@ static inline long calc_load_fold_idle(void)
97 return 0;
98 }
99
100-static void calc_global_nohz(unsigned long ticks)
101+static void calc_global_nohz(void)
102 {
103 }
104 #endif
105@@ -3620,8 +3611,6 @@ void calc_global_load(unsigned long ticks)
106 {
107 long active;
108
109- calc_global_nohz(ticks);
110-
111 if (time_before(jiffies, calc_load_update + 10))
112 return;
113
114@@ -3633,6 +3622,16 @@ void calc_global_load(unsigned long ticks)
115 avenrun[2] = calc_load(avenrun[2], EXP_15, active);
116
117 calc_load_update += LOAD_FREQ;
118+
119+ /*
120+ * Account one period with whatever state we found before
121+ * folding in the nohz state and ageing the entire idle period.
122+ *
123+ * This avoids loosing a sample when we go idle between
124+ * calc_load_account_active() (10 ticks ago) and now and thus
125+ * under-accounting.
126+ */
127+ calc_global_nohz();
128 }
129
130 /*
131--
1321.7.7.6
133
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0131-efivars-Improve-variable-validation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0131-efivars-Improve-variable-validation.patch
new file mode 100644
index 00000000..c87a8b7e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0131-efivars-Improve-variable-validation.patch
@@ -0,0 +1,142 @@
1From aa7664378bab4f65e93402fa64c031a1fd52369c Mon Sep 17 00:00:00 2001
2From: Matthew Garrett <mjg@redhat.com>
3Date: Thu, 3 May 2012 16:50:46 -0400
4Subject: [PATCH 131/165] efivars: Improve variable validation
5
6commit 54b3a4d311c98ad94b737802a8b5f2c8c6bfd627 upstream.
7
8Ben Hutchings pointed out that the validation in efivars was inadequate -
9most obviously, an entry with size 0 would server as a DoS against the
10kernel. Improve this based on his suggestions.
11
12Signed-off-by: Matthew Garrett <mjg@redhat.com>
13Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 drivers/firmware/efivars.c | 46 ++++++++++++++++++++++++++++---------------
17 1 files changed, 30 insertions(+), 16 deletions(-)
18
19diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
20index 150e4ec..0535c21 100644
21--- a/drivers/firmware/efivars.c
22+++ b/drivers/firmware/efivars.c
23@@ -192,18 +192,21 @@ utf16_strncmp(const efi_char16_t *a, const efi_char16_t *b, size_t len)
24 }
25
26 static bool
27-validate_device_path(struct efi_variable *var, int match, u8 *buffer, int len)
28+validate_device_path(struct efi_variable *var, int match, u8 *buffer,
29+ unsigned long len)
30 {
31 struct efi_generic_dev_path *node;
32 int offset = 0;
33
34 node = (struct efi_generic_dev_path *)buffer;
35
36- while (offset < len) {
37- offset += node->length;
38+ if (len < sizeof(*node))
39+ return false;
40
41- if (offset > len)
42- return false;
43+ while (offset <= len - sizeof(*node) &&
44+ node->length >= sizeof(*node) &&
45+ node->length <= len - offset) {
46+ offset += node->length;
47
48 if ((node->type == EFI_DEV_END_PATH ||
49 node->type == EFI_DEV_END_PATH2) &&
50@@ -222,7 +225,8 @@ validate_device_path(struct efi_variable *var, int match, u8 *buffer, int len)
51 }
52
53 static bool
54-validate_boot_order(struct efi_variable *var, int match, u8 *buffer, int len)
55+validate_boot_order(struct efi_variable *var, int match, u8 *buffer,
56+ unsigned long len)
57 {
58 /* An array of 16-bit integers */
59 if ((len % 2) != 0)
60@@ -232,19 +236,27 @@ validate_boot_order(struct efi_variable *var, int match, u8 *buffer, int len)
61 }
62
63 static bool
64-validate_load_option(struct efi_variable *var, int match, u8 *buffer, int len)
65+validate_load_option(struct efi_variable *var, int match, u8 *buffer,
66+ unsigned long len)
67 {
68 u16 filepathlength;
69- int i, desclength = 0;
70+ int i, desclength = 0, namelen;
71+
72+ namelen = utf16_strnlen(var->VariableName, sizeof(var->VariableName));
73
74 /* Either "Boot" or "Driver" followed by four digits of hex */
75 for (i = match; i < match+4; i++) {
76- if (hex_to_bin(var->VariableName[i] & 0xff) < 0)
77+ if (var->VariableName[i] > 127 ||
78+ hex_to_bin(var->VariableName[i] & 0xff) < 0)
79 return true;
80 }
81
82- /* A valid entry must be at least 6 bytes */
83- if (len < 6)
84+ /* Reject it if there's 4 digits of hex and then further content */
85+ if (namelen > match + 4)
86+ return false;
87+
88+ /* A valid entry must be at least 8 bytes */
89+ if (len < 8)
90 return false;
91
92 filepathlength = buffer[4] | buffer[5] << 8;
93@@ -253,7 +265,7 @@ validate_load_option(struct efi_variable *var, int match, u8 *buffer, int len)
94 * There's no stored length for the description, so it has to be
95 * found by hand
96 */
97- desclength = utf16_strsize((efi_char16_t *)(buffer + 6), len) + 2;
98+ desclength = utf16_strsize((efi_char16_t *)(buffer + 6), len - 6) + 2;
99
100 /* Each boot entry must have a descriptor */
101 if (!desclength)
102@@ -275,7 +287,8 @@ validate_load_option(struct efi_variable *var, int match, u8 *buffer, int len)
103 }
104
105 static bool
106-validate_uint16(struct efi_variable *var, int match, u8 *buffer, int len)
107+validate_uint16(struct efi_variable *var, int match, u8 *buffer,
108+ unsigned long len)
109 {
110 /* A single 16-bit integer */
111 if (len != 2)
112@@ -285,7 +298,8 @@ validate_uint16(struct efi_variable *var, int match, u8 *buffer, int len)
113 }
114
115 static bool
116-validate_ascii_string(struct efi_variable *var, int match, u8 *buffer, int len)
117+validate_ascii_string(struct efi_variable *var, int match, u8 *buffer,
118+ unsigned long len)
119 {
120 int i;
121
122@@ -303,7 +317,7 @@ validate_ascii_string(struct efi_variable *var, int match, u8 *buffer, int len)
123 struct variable_validate {
124 char *name;
125 bool (*validate)(struct efi_variable *var, int match, u8 *data,
126- int len);
127+ unsigned long len);
128 };
129
130 static const struct variable_validate variable_validate[] = {
131@@ -325,7 +339,7 @@ static const struct variable_validate variable_validate[] = {
132 };
133
134 static bool
135-validate_var(struct efi_variable *var, u8 *data, int len)
136+validate_var(struct efi_variable *var, u8 *data, unsigned long len)
137 {
138 int i;
139 u16 *unicode_name = var->VariableName;
140--
1411.7.7.6
142
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch
new file mode 100644
index 00000000..d39f6d8e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch
@@ -0,0 +1,49 @@
1From 39565f288e6b2270679f089aae07d579bbf8a156 Mon Sep 17 00:00:00 2001
2From: Stefan Metzmacher <metze@samba.org>
3Date: Fri, 4 May 2012 00:19:28 +0200
4Subject: [PATCH 132/165] fs/cifs: fix parsing of dfs referrals
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit d8f2799b105a24bb0bbd3380a0d56e6348484058 upstream.
10
11The problem was that the first referral was parsed more than once
12and so the caller tried the same referrals multiple times.
13
14The problem was introduced partly by commit
15066ce6899484d9026acd6ba3a8dbbedb33d7ae1b,
16where 'ref += le16_to_cpu(ref->Size);' got lost,
17but that was also wrong...
18
19Signed-off-by: Stefan Metzmacher <metze@samba.org>
20Tested-by: Björn Jacke <bj@sernet.de>
21Reviewed-by: Jeff Layton <jlayton@redhat.com>
22Signed-off-by: Steve French <sfrench@us.ibm.com>
23[bwh: Backport to 3.2: adjust context]
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 fs/cifs/cifssmb.c | 6 +++++-
27 1 files changed, 5 insertions(+), 1 deletions(-)
28
29diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
30index 0e6adac..e89803b 100644
31--- a/fs/cifs/cifssmb.c
32+++ b/fs/cifs/cifssmb.c
33@@ -4826,8 +4826,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
34 max_len = data_end - temp;
35 node->node_name = cifs_strndup_from_ucs(temp, max_len,
36 is_unicode, nls_codepage);
37- if (!node->node_name)
38+ if (!node->node_name) {
39 rc = -ENOMEM;
40+ goto parse_DFS_referrals_exit;
41+ }
42+
43+ ref++;
44 }
45
46 parse_DFS_referrals_exit:
47--
481.7.7.6
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0133-Fix-__read_seqcount_begin-to-use-ACCESS_ONCE-for-seq.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0133-Fix-__read_seqcount_begin-to-use-ACCESS_ONCE-for-seq.patch
new file mode 100644
index 00000000..d9221105
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0133-Fix-__read_seqcount_begin-to-use-ACCESS_ONCE-for-seq.patch
@@ -0,0 +1,51 @@
1From 9daab99a20e2ce18687c16c10546e0c5343e22c2 Mon Sep 17 00:00:00 2001
2From: Linus Torvalds <torvalds@linux-foundation.org>
3Date: Fri, 4 May 2012 14:46:02 -0700
4Subject: [PATCH 133/165] Fix __read_seqcount_begin() to use ACCESS_ONCE for
5 sequence value read
6
7commit 2f624278626677bfaf73fef97f86b37981621f5c upstream.
8
9We really need to use a ACCESS_ONCE() on the sequence value read in
10__read_seqcount_begin(), because otherwise the compiler might end up
11reloading the value in between the test and the return of it. As a
12result, it might end up returning an odd value (which means that a write
13is in progress).
14
15If the reader is then fast enough that that odd value is still the
16current one when the read_seqcount_retry() is done, we might end up with
17a "successful" read sequence, even despite the concurrent write being
18active.
19
20In practice this probably never really happens - there just isn't
21anything else going on around the read of the sequence count, and the
22common case is that we end up having a read barrier immediately
23afterwards.
24
25So the code sequence in which gcc might decide to reaload from memory is
26small, and there's no reason to believe it would ever actually do the
27reload. But if the compiler ever were to decide to do so, it would be
28incredibly annoying to debug. Let's just make sure.
29
30Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
31Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
32---
33 include/linux/seqlock.h | 2 +-
34 1 files changed, 1 insertions(+), 1 deletions(-)
35
36diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
37index c6db9fb..bb1fac5 100644
38--- a/include/linux/seqlock.h
39+++ b/include/linux/seqlock.h
40@@ -141,7 +141,7 @@ static inline unsigned __read_seqcount_begin(const seqcount_t *s)
41 unsigned ret;
42
43 repeat:
44- ret = s->sequence;
45+ ret = ACCESS_ONCE(s->sequence);
46 if (unlikely(ret & 1)) {
47 cpu_relax();
48 goto repeat;
49--
501.7.7.6
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0134-hwmon-coretemp-Increase-CPU-core-limit.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0134-hwmon-coretemp-Increase-CPU-core-limit.patch
new file mode 100644
index 00000000..d1fc79d4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0134-hwmon-coretemp-Increase-CPU-core-limit.patch
@@ -0,0 +1,35 @@
1From d0c9c20fe1b85573de668afb64f38b05c6263998 Mon Sep 17 00:00:00 2001
2From: Guenter Roeck <guenter.roeck@ericsson.com>
3Date: Tue, 1 May 2012 08:15:42 -0700
4Subject: [PATCH 134/165] hwmon: (coretemp) Increase CPU core limit
5
6commit bdc71c9a87b898e4c380c23b2e3e18071312ecde upstream.
7
8CPU core ID is used to index the core_data[] array. The core ID is, however, not
9sequential; 10-core CPUS can have a core ID as high as 25. Increase the limit to
1032 to be able to deal with current CPUs.
11
12Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
13Acked-by: Jean Delvare <khali@linux-fr.org>
14Acked-by: Durgadoss R <durgadoss.r@intel.com>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/hwmon/coretemp.c | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
21index 104b376..8b53a7a 100644
22--- a/drivers/hwmon/coretemp.c
23+++ b/drivers/hwmon/coretemp.c
24@@ -51,7 +51,7 @@ module_param_named(tjmax, force_tjmax, int, 0444);
25 MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
26
27 #define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */
28-#define NUM_REAL_CORES 16 /* Number of Real cores per cpu */
29+#define NUM_REAL_CORES 32 /* Number of Real cores per cpu */
30 #define CORETEMP_NAME_LENGTH 17 /* String Length of attrs */
31 #define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
32 #define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
33--
341.7.7.6
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0135-nouveau-initialise-has_optimus-variable.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0135-nouveau-initialise-has_optimus-variable.patch
new file mode 100644
index 00000000..5a241083
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0135-nouveau-initialise-has_optimus-variable.patch
@@ -0,0 +1,31 @@
1From c6ecb5ef76bc2c141529aeab1ef2490b377e1906 Mon Sep 17 00:00:00 2001
2From: Dave Airlie <airlied@redhat.com>
3Date: Wed, 2 May 2012 20:26:24 +0100
4Subject: [PATCH 135/165] nouveau: initialise has_optimus variable.
5
6commit addde4ec31456c5f1e9b61aae3edcfeb0f338f87 upstream.
7
8We should initialise this to 0 really to avoid getting false positives.
9
10Signed-off-by: Dave Airlie <airlied@redhat.com>
11Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12---
13 drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
17index 525744d..3df56c7 100644
18--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
19+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
20@@ -245,7 +245,7 @@ static bool nouveau_dsm_detect(void)
21 struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
22 struct pci_dev *pdev = NULL;
23 int has_dsm = 0;
24- int has_optimus;
25+ int has_optimus = 0;
26 int vga_count = 0;
27 bool guid_valid;
28 int retval;
29--
301.7.7.6
31
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0136-hwmon-coretemp-fix-oops-on-cpu-unplug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0136-hwmon-coretemp-fix-oops-on-cpu-unplug.patch
new file mode 100644
index 00000000..e2fa646e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0136-hwmon-coretemp-fix-oops-on-cpu-unplug.patch
@@ -0,0 +1,77 @@
1From f9b3a3cd3a49c5c547207f4e8496a39f9d470536 Mon Sep 17 00:00:00 2001
2From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
3Date: Mon, 30 Apr 2012 09:18:01 -0400
4Subject: [PATCH 136/165] hwmon: (coretemp) fix oops on cpu unplug
5
6commit b704871124b477807966f06789c2b32f2de58bf7 upstream.
7
8coretemp tries to access core_data array beyond bounds on cpu unplug if
9core id of the cpu if more than NUM_REAL_CORES-1.
10
11BUG: unable to handle kernel NULL pointer dereference at 000000000000013c
12IP: [<ffffffffa00159af>] coretemp_cpu_callback+0x93/0x1ba [coretemp]
13PGD 673e5a067 PUD 66e9b3067 PMD 0
14Oops: 0000 [#1] SMP
15CPU 79
16Modules linked in: sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf bnep bluetooth rfkill ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter nf_conntrack_ipv4 nf_defrag_ipv4 ip6_tables xt_state nf_conntrack coretemp crc32c_intel asix tpm_tis pcspkr usbnet iTCO_wdt i2c_i801 microcode mii joydev tpm i2c_core iTCO_vendor_support tpm_bios i7core_edac igb ioatdma edac_core dca megaraid_sas [last unloaded: oprofile]
17
18Pid: 3315, comm: set-cpus Tainted: G W 3.4.0-rc5+ #2 QCI QSSC-S4R/QSSC-S4R
19RIP: 0010:[<ffffffffa00159af>] [<ffffffffa00159af>] coretemp_cpu_callback+0x93/0x1ba [coretemp]
20RSP: 0018:ffff880472fb3d48 EFLAGS: 00010246
21RAX: 0000000000000124 RBX: 0000000000000034 RCX: 00000000ffffffff
22RDX: 0000000000000000 RSI: 0000000000000046 RDI: 0000000000000246
23RBP: ffff880472fb3d88 R08: ffff88077fcd36c0 R09: 0000000000000001
24R10: ffffffff8184bc48 R11: 0000000000000000 R12: ffff880273095800
25R13: 0000000000000013 R14: ffff8802730a1810 R15: 0000000000000000
26FS: 00007f694a20f720(0000) GS:ffff88077fcc0000(0000) knlGS:0000000000000000
27CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
28CR2: 000000000000013c CR3: 000000067209b000 CR4: 00000000000007e0
29DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
30DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
31Process set-cpus (pid: 3315, threadinfo ffff880472fb2000, task ffff880471fa0000)
32Stack:
33 ffff880277b4c308 0000000000000003 ffff880472fb3d88 0000000000000005
34 0000000000000034 00000000ffffffd1 ffffffff81cadc70 ffff880472fb3e14
35 ffff880472fb3dc8 ffffffff8161f48d ffff880471fa0000 0000000000000034
36Call Trace:
37 [<ffffffff8161f48d>] notifier_call_chain+0x4d/0x70
38 [<ffffffff8107f1be>] __raw_notifier_call_chain+0xe/0x10
39 [<ffffffff81059d30>] __cpu_notify+0x20/0x40
40 [<ffffffff815fa251>] _cpu_down+0x81/0x270
41 [<ffffffff815fa477>] cpu_down+0x37/0x50
42 [<ffffffff815fd6a3>] store_online+0x63/0xc0
43 [<ffffffff813c7078>] dev_attr_store+0x18/0x30
44 [<ffffffff811f02cf>] sysfs_write_file+0xef/0x170
45 [<ffffffff81180443>] vfs_write+0xb3/0x180
46 [<ffffffff8118076a>] sys_write+0x4a/0x90
47 [<ffffffff816236a9>] system_call_fastpath+0x16/0x1b
48Code: 48 c7 c7 94 60 01 a0 44 0f b7 ac 10 ac 00 00 00 31 c0 e8 41 b7 5f e1 41 83 c5 02 49 63 c5 49 8b 44 c4 10 48 85 c0 74 56 45 31 ff <39> 58 18 75 4e eb 1f 49 63 d7 4c 89 f7 48 89 45 c8 48 6b d2 28
49RIP [<ffffffffa00159af>] coretemp_cpu_callback+0x93/0x1ba [coretemp]
50 RSP <ffff880472fb3d48>
51CR2: 000000000000013c
52
53Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
54Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
55Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
56---
57 drivers/hwmon/coretemp.c | 4 ++++
58 1 files changed, 4 insertions(+), 0 deletions(-)
59
60diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
61index 8b53a7a..427468f 100644
62--- a/drivers/hwmon/coretemp.c
63+++ b/drivers/hwmon/coretemp.c
64@@ -705,6 +705,10 @@ static void __cpuinit put_core_offline(unsigned int cpu)
65
66 indx = TO_ATTR_NO(cpu);
67
68+ /* The core id is too big, just return */
69+ if (indx > MAX_CORE_DATA - 1)
70+ return;
71+
72 if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu)
73 coretemp_remove_core(pdata, &pdev->dev, indx);
74
75--
761.7.7.6
77
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0137-libata-skip-old-error-history-when-counting-probe-tr.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0137-libata-skip-old-error-history-when-counting-probe-tr.patch
new file mode 100644
index 00000000..581c14d2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0137-libata-skip-old-error-history-when-counting-probe-tr.patch
@@ -0,0 +1,42 @@
1From a826ba1d1dd61542f0790e7c646e8534d170d7f6 Mon Sep 17 00:00:00 2001
2From: Lin Ming <ming.m.lin@intel.com>
3Date: Thu, 3 May 2012 22:15:07 +0800
4Subject: [PATCH 137/165] libata: skip old error history when counting probe
5 trials
6
7commit 6868225e3e92399068be9a5f1635752d91012ad5 upstream.
8
9Commit d902747("[libata] Add ATA transport class") introduced
10ATA_EFLAG_OLD_ER to mark entries in the error ring as cleared.
11
12But ata_count_probe_trials_cb() didn't check this flag and it still
13counts the old error history. So wrong probe trials count is returned
14and it causes problem, for example, SATA link speed is slowed down from
153.0Gbps to 1.5Gbps.
16
17Fix it by checking ATA_EFLAG_OLD_ER in ata_count_probe_trials_cb().
18
19Signed-off-by: Lin Ming <ming.m.lin@intel.com>
20Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/ata/libata-eh.c | 3 ++-
24 1 files changed, 2 insertions(+), 1 deletions(-)
25
26diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
27index a9b2820..58db834 100644
28--- a/drivers/ata/libata-eh.c
29+++ b/drivers/ata/libata-eh.c
30@@ -3500,7 +3500,8 @@ static int ata_count_probe_trials_cb(struct ata_ering_entry *ent, void *void_arg
31 u64 now = get_jiffies_64();
32 int *trials = void_arg;
33
34- if (ent->timestamp < now - min(now, interval))
35+ if ((ent->eflags & ATA_EFLAG_OLD_ER) ||
36+ (ent->timestamp < now - min(now, interval)))
37 return -1;
38
39 (*trials)++;
40--
411.7.7.6
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0138-b43-only-reload-config-after-successful-initializati.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0138-b43-only-reload-config-after-successful-initializati.patch
new file mode 100644
index 00000000..c3de0fdc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0138-b43-only-reload-config-after-successful-initializati.patch
@@ -0,0 +1,48 @@
1From 9edb0f56a8e94b830ce7a97706689fbe8d362066 Mon Sep 17 00:00:00 2001
2From: Seth Forshee <seth.forshee@canonical.com>
3Date: Wed, 25 Apr 2012 17:28:00 -0500
4Subject: [PATCH 138/165] b43: only reload config after successful
5 initialization
6
7commit dbdedbdf4fbff3d4962a0786f37aa86dfdc48a7e upstream.
8
9Commit 2a19032 (b43: reload phy and bss settings after core restarts)
10introduced an unconditional call to b43_op_config() at the end of
11b43_op_start(). When firmware fails to load this can wedge the system.
12There's no need to reload the configuration after a failed
13initialization anyway, so only make the call if initialization was
14successful.
15
16BugLink: http://bugs.launchpad.net/bugs/950295
17Cc: Felix Fietkau <nbd@openwrt.org>
18Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
19Signed-off-by: John W. Linville <linville@tuxdriver.com>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 drivers/net/wireless/b43/main.c | 10 ++++++++--
23 1 files changed, 8 insertions(+), 2 deletions(-)
24
25diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
26index 5634d9a..680709c 100644
27--- a/drivers/net/wireless/b43/main.c
28+++ b/drivers/net/wireless/b43/main.c
29@@ -4820,8 +4820,14 @@ static int b43_op_start(struct ieee80211_hw *hw)
30 out_mutex_unlock:
31 mutex_unlock(&wl->mutex);
32
33- /* reload configuration */
34- b43_op_config(hw, ~0);
35+ /*
36+ * Configuration may have been overwritten during initialization.
37+ * Reload the configuration, but only if initialization was
38+ * successful. Reloading the configuration after a failed init
39+ * may hang the system.
40+ */
41+ if (!err)
42+ b43_op_config(hw, ~0);
43
44 return err;
45 }
46--
471.7.7.6
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0139-i2c-pnx-Disable-clk-in-suspend.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0139-i2c-pnx-Disable-clk-in-suspend.patch
new file mode 100644
index 00000000..58200f92
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0139-i2c-pnx-Disable-clk-in-suspend.patch
@@ -0,0 +1,38 @@
1From 3413f898d1af58e99c56510c996fb039b6c5cd37 Mon Sep 17 00:00:00 2001
2From: Roland Stigge <stigge@antcom.de>
3Date: Wed, 4 Apr 2012 10:34:37 +0200
4Subject: [PATCH 139/165] i2c: pnx: Disable clk in suspend
5
6commit 6c557cfee08751d22aed34840f389b846f0f4508 upstream.
7
8In the driver's suspend function, clk_enable() was used instead of
9clk_disable(). This is corrected with this patch.
10
11Signed-off-by: Roland Stigge <stigge@antcom.de>
12Reviewed-by: Arnd Bergmann <arnd@arndb.de>
13
14[wsa: reworded commit header slightly]
15
16Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/i2c/busses/i2c-pnx.c | 3 +--
20 1 files changed, 1 insertions(+), 2 deletions(-)
21
22diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
23index 04be9f8..eb8ad53 100644
24--- a/drivers/i2c/busses/i2c-pnx.c
25+++ b/drivers/i2c/busses/i2c-pnx.c
26@@ -546,8 +546,7 @@ static int i2c_pnx_controller_suspend(struct platform_device *pdev,
27 {
28 struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev);
29
30- /* FIXME: shouldn't this be clk_disable? */
31- clk_enable(alg_data->clk);
32+ clk_disable(alg_data->clk);
33
34 return 0;
35 }
36--
371.7.7.6
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0140-ipw2200-Fix-race-condition-in-the-command-completion.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0140-ipw2200-Fix-race-condition-in-the-command-completion.patch
new file mode 100644
index 00000000..ce811ab9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0140-ipw2200-Fix-race-condition-in-the-command-completion.patch
@@ -0,0 +1,74 @@
1From 306bd550f671e8d7ac5503cba114e5bb525aa787 Mon Sep 17 00:00:00 2001
2From: Stanislav Yakovlev <stas.yakovlev@gmail.com>
3Date: Thu, 19 Apr 2012 15:55:09 -0400
4Subject: [PATCH 140/165] ipw2200: Fix race condition in the command
5 completion acknowledge
6
7commit dd447319895d0c0af423e483d9b63f84f3f8869a upstream.
8
9Driver incorrectly validates command completion: instead of waiting
10for a command to be acknowledged it continues execution. Most of the
11time driver gets acknowledge of the command completion in a tasklet
12before it executes the next one. But sometimes it sends the next
13command before it gets acknowledge for the previous one. In such a
14case one of the following error messages appear in the log:
15
16Failed to send SYSTEM_CONFIG: Already sending a command.
17Failed to send ASSOCIATE: Already sending a command.
18Failed to send TX_POWER: Already sending a command.
19
20After that you need to reload the driver to get it working again.
21
22This bug occurs during roaming (reported by Sam Varshavchik)
23https://bugzilla.redhat.com/show_bug.cgi?id=738508
24and machine booting (reported by Tom Gundersen and Mads Kiilerich)
25https://bugs.archlinux.org/task/28097
26https://bugzilla.redhat.com/show_bug.cgi?id=802106
27
28This patch doesn't fix the delay issue during firmware load.
29But at least device now works as usual after boot.
30
31Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
32Signed-off-by: John W. Linville <linville@tuxdriver.com>
33Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
34---
35 drivers/net/wireless/ipw2x00/ipw2200.c | 13 ++++++++++++-
36 1 files changed, 12 insertions(+), 1 deletions(-)
37
38diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
39index 99a710d..827889b 100644
40--- a/drivers/net/wireless/ipw2x00/ipw2200.c
41+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
42@@ -2183,6 +2183,7 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd)
43 {
44 int rc = 0;
45 unsigned long flags;
46+ unsigned long now, end;
47
48 spin_lock_irqsave(&priv->lock, flags);
49 if (priv->status & STATUS_HCMD_ACTIVE) {
50@@ -2224,10 +2225,20 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd)
51 }
52 spin_unlock_irqrestore(&priv->lock, flags);
53
54+ now = jiffies;
55+ end = now + HOST_COMPLETE_TIMEOUT;
56+again:
57 rc = wait_event_interruptible_timeout(priv->wait_command_queue,
58 !(priv->
59 status & STATUS_HCMD_ACTIVE),
60- HOST_COMPLETE_TIMEOUT);
61+ end - now);
62+ if (rc < 0) {
63+ now = jiffies;
64+ if (time_before(now, end))
65+ goto again;
66+ rc = 0;
67+ }
68+
69 if (rc == 0) {
70 spin_lock_irqsave(&priv->lock, flags);
71 if (priv->status & STATUS_HCMD_ACTIVE) {
72--
731.7.7.6
74
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0141-mac80211-fix-AP-mode-EAP-tx-for-VLAN-stations.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0141-mac80211-fix-AP-mode-EAP-tx-for-VLAN-stations.patch
new file mode 100644
index 00000000..5a35f406
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0141-mac80211-fix-AP-mode-EAP-tx-for-VLAN-stations.patch
@@ -0,0 +1,38 @@
1From d60da87d5ec426412fc4c55d4231c292ceb51a41 Mon Sep 17 00:00:00 2001
2From: Felix Fietkau <nbd@openwrt.org>
3Date: Sun, 29 Apr 2012 15:44:16 +0200
4Subject: [PATCH 141/165] mac80211: fix AP mode EAP tx for VLAN stations
5
6commit 66f2c99af3d6f2d0aa1120884cf1c60613ef61c0 upstream.
7
8EAP frames for stations in an AP VLAN are sent on the main AP interface
9to avoid race conditions wrt. moving stations.
10For that to work properly, sta_info_get_bss must be used instead of
11sta_info_get when sending EAP packets.
12Previously this was only done for cooked monitor injected packets, so
13this patch adds a check for tx->skb->protocol to the same place.
14
15Signed-off-by: Felix Fietkau <nbd@openwrt.org>
16Signed-off-by: John W. Linville <linville@tuxdriver.com>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 net/mac80211/tx.c | 3 ++-
20 1 files changed, 2 insertions(+), 1 deletions(-)
21
22diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
23index eff1f4e..4ff35bf 100644
24--- a/net/mac80211/tx.c
25+++ b/net/mac80211/tx.c
26@@ -1121,7 +1121,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
27 tx->sta = rcu_dereference(sdata->u.vlan.sta);
28 if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
29 return TX_DROP;
30- } else if (info->flags & IEEE80211_TX_CTL_INJECTED) {
31+ } else if (info->flags & IEEE80211_TX_CTL_INJECTED ||
32+ tx->sdata->control_port_protocol == tx->skb->protocol) {
33 tx->sta = sta_info_get_bss(sdata, hdr->addr1);
34 }
35 if (!tx->sta)
36--
371.7.7.6
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0142-rtlwifi-Fix-oops-on-unload.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0142-rtlwifi-Fix-oops-on-unload.patch
new file mode 100644
index 00000000..6a602470
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0142-rtlwifi-Fix-oops-on-unload.patch
@@ -0,0 +1,67 @@
1From 53290583562535da122f89cc3acb6babf2c55e66 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Thu, 19 Apr 2012 21:39:06 -0500
4Subject: [PATCH 142/165] rtlwifi: Fix oops on unload
5
6commit 44eb65cfd8da4b9c231238998729e858e963a980 upstream.
7
8Under some circumstances, a PCI-based driver reports the following OOPs:
9
10Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Oops: 0000 [#1] SMP
11--snip--
12Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Pid: 19627, comm: rmmod
13Not tainted 3.2.9-2.fc16.x86_64 #1 LENOVO 05962RU/05962RU
14Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RIP:
150010:[<ffffffffa0418d39>] [<ffffffffa0418d39>]
16rtl92ce_get_desc+0x19/0xd0 [rtl8192ce]
17--snip--
18Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Process rmmod (pid:
1919627, threadinfo ffff880050262000, task ffff8801156d5cc0)
20Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Stack:
21Mar 19 08:14:35 kvothe kernel: [ 6584.626011] 0000000000000002
22ffff8801176c2540 ffff880050263ca8 ffffffffa03348e7
23Mar 19 08:14:35 kvothe kernel: [ 6584.626011] 0000000000000282
240000000180150014 ffff880050263fd8 ffff8801176c2810
25Mar 19 08:14:35 kvothe kernel: [ 6584.626011] ffff880050263bc8
26ffffffff810550e2 00000000000002c0 ffff8801176c0d40
27Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Call Trace:
28Mar 19 08:14:35 kvothe kernel: [ 6584.626011] [<ffffffffa03348e7>]
29_rtl_pci_rx_interrupt+0x187/0x650 [rtlwifi]
30--snip--
31Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Code: ff 09 d0 89 07 48
3283 c4 08 5b 5d c3 66 0f 1f 44 00 00 55 48 89 e5 53 48 83 ec 08 66 66
3366 66 90 40 84 f6 89 d3 74 13 84 d2 75 57 <8b> 07 48 83 c4 08 5b 5d c1
34e8 1f c3 0f 1f 00 84 d2 74 ed 80 fa
35Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RIP
36[<ffffffffa0418d39>] rtl92ce_get_desc+0x19/0xd0 [rtl8192ce]
37Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RSP <ffff880050263b58>
38Mar 19 08:14:35 kvothe kernel: [ 6584.626011] CR2: 00000000000006e0
39Mar 19 08:14:35 kvothe kernel: [ 6584.646491] ---[ end trace
408636c766dcfbe0e6 ]---
41
42This oops is due to interrupts not being disabled in this particular path.
43
44Reported-by: Dave Airlie <airlied@gmail.com>
45Tested-by: Dave Airlie <airlied@gmail.com>
46Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
47Signed-off-by: John W. Linville <linville@tuxdriver.com>
48Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
49---
50 drivers/net/wireless/rtlwifi/pci.c | 1 +
51 1 files changed, 1 insertions(+), 0 deletions(-)
52
53diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
54index d44d398..47ba0f7 100644
55--- a/drivers/net/wireless/rtlwifi/pci.c
56+++ b/drivers/net/wireless/rtlwifi/pci.c
57@@ -1961,6 +1961,7 @@ void rtl_pci_disconnect(struct pci_dev *pdev)
58 rtl_deinit_deferred_work(hw);
59 rtlpriv->intf_ops->adapter_stop(hw);
60 }
61+ rtlpriv->cfg->ops->disable_interrupt(hw);
62
63 /*deinit rfkill */
64 rtl_deinit_rfkill(hw);
65--
661.7.7.6
67
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0143-wl1251-fix-crash-on-remove-due-to-premature-kfree.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0143-wl1251-fix-crash-on-remove-due-to-premature-kfree.patch
new file mode 100644
index 00000000..c07b0d14
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0143-wl1251-fix-crash-on-remove-due-to-premature-kfree.patch
@@ -0,0 +1,40 @@
1From 7b9847c5e4ba91a74d25b755ee45703487c5189e Mon Sep 17 00:00:00 2001
2From: Grazvydas Ignotas <notasas@gmail.com>
3Date: Thu, 26 Apr 2012 23:07:43 +0300
4Subject: [PATCH 143/165] wl1251: fix crash on remove due to premature kfree
5
6commit 328c32f0f85467af5a6c4c3289e168d9ad2555af upstream.
7
8Currently SDIO glue frees it's own structure before calling
9wl1251_free_hw(), which in turn calls ieee80211_unregister_hw().
10The later call may result in a need to communicate with the chip
11to stop it (as it happens now if the interface is still up before
12rmmod), which means calls are made back to the glue, resulting in
13freed memory access.
14
15Fix this by freeing glue data last.
16
17Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
18Signed-off-by: John W. Linville <linville@tuxdriver.com>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 drivers/net/wireless/wl1251/sdio.c | 2 +-
22 1 files changed, 1 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c
25index f786942..1b851f6 100644
26--- a/drivers/net/wireless/wl1251/sdio.c
27+++ b/drivers/net/wireless/wl1251/sdio.c
28@@ -315,8 +315,8 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func)
29
30 if (wl->irq)
31 free_irq(wl->irq, wl);
32- kfree(wl_sdio);
33 wl1251_free_hw(wl);
34+ kfree(wl_sdio);
35
36 sdio_claim_host(func);
37 sdio_release_irq(func);
38--
391.7.7.6
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0144-wl1251-fix-crash-on-remove-due-to-leftover-work-item.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0144-wl1251-fix-crash-on-remove-due-to-leftover-work-item.patch
new file mode 100644
index 00000000..3873825c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0144-wl1251-fix-crash-on-remove-due-to-leftover-work-item.patch
@@ -0,0 +1,35 @@
1From aac395832157e17755262dfe2f08d99a454f66f9 Mon Sep 17 00:00:00 2001
2From: Grazvydas Ignotas <notasas@gmail.com>
3Date: Thu, 26 Apr 2012 23:07:44 +0300
4Subject: [PATCH 144/165] wl1251: fix crash on remove due to leftover work
5 item
6
7commit 4c1bcdb5a3354b250b82a67549f57ac27a3bb85f upstream.
8
9This driver currently leaves elp_work behind when stopping, which
10occasionally results in data corruption because work function ends
11up accessing freed memory, typical symptoms of this are various
12worker_thread crashes. Fix it by cancelling elp_work.
13
14Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
15Signed-off-by: John W. Linville <linville@tuxdriver.com>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/net/wireless/wl1251/main.c | 1 +
19 1 files changed, 1 insertions(+), 0 deletions(-)
20
21diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
22index ba3268e..40c1574 100644
23--- a/drivers/net/wireless/wl1251/main.c
24+++ b/drivers/net/wireless/wl1251/main.c
25@@ -479,6 +479,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
26 cancel_work_sync(&wl->irq_work);
27 cancel_work_sync(&wl->tx_work);
28 cancel_work_sync(&wl->filter_work);
29+ cancel_delayed_work_sync(&wl->elp_work);
30
31 mutex_lock(&wl->mutex);
32
33--
341.7.7.6
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0145-iwlwifi-do-not-nulify-ctx-vif-on-reset.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0145-iwlwifi-do-not-nulify-ctx-vif-on-reset.patch
new file mode 100644
index 00000000..cdd9c4a0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0145-iwlwifi-do-not-nulify-ctx-vif-on-reset.patch
@@ -0,0 +1,85 @@
1From 3fabef3cff16e308410b75ac612ba271be969051 Mon Sep 17 00:00:00 2001
2From: Stanislaw Gruszka <sgruszka@redhat.com>
3Date: Wed, 18 Apr 2012 08:01:15 -0700
4Subject: [PATCH 145/165] iwlwifi: do not nulify ctx->vif on reset
5
6commit 8db4c7e25d153fb049e81715d72fa3be3a0c3b69 upstream.
7
8ctx->vif is dereferenced in different part of iwlwifi code, so do not
9nullify it.
10
11This should address at least one of the possible reasons of WARNING at
12iwlagn_mac_remove_interface, and perhaps some random crashes when
13firmware reset is performed.
14
15Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
16Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
17Signed-off-by: John W. Linville <linville@tuxdriver.com>
18[bwh: Backported to 3.2:
19 - Change filename iwl-mac80211.c to iwl-core.c
20 - Change context in iwlagn_prepare_restart()]
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/net/wireless/iwlwifi/iwl-agn.c | 3 ---
24 drivers/net/wireless/iwlwifi/iwl-core.c | 10 +++++++++-
25 2 files changed, 9 insertions(+), 4 deletions(-)
26
27diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
28index e0e9a3d..d7d2512 100644
29--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
30+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
31@@ -1504,7 +1504,6 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work)
32
33 static void iwlagn_prepare_restart(struct iwl_priv *priv)
34 {
35- struct iwl_rxon_context *ctx;
36 bool bt_full_concurrent;
37 u8 bt_ci_compliance;
38 u8 bt_load;
39@@ -1513,8 +1512,6 @@ static void iwlagn_prepare_restart(struct iwl_priv *priv)
40
41 lockdep_assert_held(&priv->shrd->mutex);
42
43- for_each_context(priv, ctx)
44- ctx->vif = NULL;
45 priv->is_open = 0;
46
47 /*
48diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
49index 3d75d4c..832ec4d 100644
50--- a/drivers/net/wireless/iwlwifi/iwl-core.c
51+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
52@@ -1228,6 +1228,7 @@ int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
53 struct iwl_rxon_context *tmp, *ctx = NULL;
54 int err;
55 enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif);
56+ bool reset = false;
57
58 IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n",
59 viftype, vif->addr);
60@@ -1249,6 +1250,13 @@ int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
61 tmp->interface_modes | tmp->exclusive_interface_modes;
62
63 if (tmp->vif) {
64+ /* On reset we need to add the same interface again */
65+ if (tmp->vif == vif) {
66+ reset = true;
67+ ctx = tmp;
68+ break;
69+ }
70+
71 /* check if this busy context is exclusive */
72 if (tmp->exclusive_interface_modes &
73 BIT(tmp->vif->type)) {
74@@ -1275,7 +1283,7 @@ int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
75 ctx->vif = vif;
76
77 err = iwl_setup_interface(priv, ctx);
78- if (!err)
79+ if (!err || reset)
80 goto out;
81
82 ctx->vif = NULL;
83--
841.7.7.6
85
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0146-iwlwifi-fix-hardware-queue-programming.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0146-iwlwifi-fix-hardware-queue-programming.patch
new file mode 100644
index 00000000..c86049b2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0146-iwlwifi-fix-hardware-queue-programming.patch
@@ -0,0 +1,114 @@
1From dabe62a4921edd9f40f1477912cc0ac706f5e63d Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Mon, 23 Apr 2012 14:17:50 -0700
4Subject: [PATCH 146/165] iwlwifi: fix hardware queue programming
5
6commit 5ef4acd58ab2abd0dd0c8e3cacd61a0dc5d73646 upstream.
7
8Newer devices have 20 (5000 series) or 30 (6000 series)
9hardware queues, rather than the 16 that 4965 had. This
10was added to the driver a long time ago, but improperly:
11the queue registers for the higher queues aren't just
12continuations of the registers for the first 16 queues,
13they are in other places. Therefore, the hardware would
14lock up when trying to activate queue 16 or above and
15the device would have to be restarted.
16
17Thanks goes to Emmanuel who identified this and told me
18how the queue programming should be done.
19
20Note that we don't use queues 20 and higher today and
21doing so needs more work than this.
22
23Signed-off-by: Johannes Berg <johannes.berg@intel.com>
24Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
25Signed-off-by: John W. Linville <linville@tuxdriver.com>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 drivers/net/wireless/iwlwifi/iwl-fh.h | 24 +++++++++++++++++++-----
29 drivers/net/wireless/iwlwifi/iwl-prph.h | 27 ++++++++++++++++++++++++---
30 2 files changed, 43 insertions(+), 8 deletions(-)
31
32diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h
33index 5bede9d..aae992a 100644
34--- a/drivers/net/wireless/iwlwifi/iwl-fh.h
35+++ b/drivers/net/wireless/iwlwifi/iwl-fh.h
36@@ -104,15 +104,29 @@
37 * (see struct iwl_tfd_frame). These 16 pointer registers are offset by 0x04
38 * bytes from one another. Each TFD circular buffer in DRAM must be 256-byte
39 * aligned (address bits 0-7 must be 0).
40+ * Later devices have 20 (5000 series) or 30 (higher) queues, but the registers
41+ * for them are in different places.
42 *
43 * Bit fields in each pointer register:
44 * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned
45 */
46-#define FH_MEM_CBBC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0)
47-#define FH_MEM_CBBC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10)
48-
49-/* Find TFD CB base pointer for given queue (range 0-15). */
50-#define FH_MEM_CBBC_QUEUE(x) (FH_MEM_CBBC_LOWER_BOUND + (x) * 0x4)
51+#define FH_MEM_CBBC_0_15_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0)
52+#define FH_MEM_CBBC_0_15_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10)
53+#define FH_MEM_CBBC_16_19_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xBF0)
54+#define FH_MEM_CBBC_16_19_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xC00)
55+#define FH_MEM_CBBC_20_31_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xB20)
56+#define FH_MEM_CBBC_20_31_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xB80)
57+
58+/* Find TFD CB base pointer for given queue */
59+static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl)
60+{
61+ if (chnl < 16)
62+ return FH_MEM_CBBC_0_15_LOWER_BOUND + 4 * chnl;
63+ if (chnl < 20)
64+ return FH_MEM_CBBC_16_19_LOWER_BOUND + 4 * (chnl - 16);
65+ WARN_ON_ONCE(chnl >= 32);
66+ return FH_MEM_CBBC_20_31_LOWER_BOUND + 4 * (chnl - 20);
67+}
68
69
70 /**
71diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h
72index bebdd82..d9b089e 100644
73--- a/drivers/net/wireless/iwlwifi/iwl-prph.h
74+++ b/drivers/net/wireless/iwlwifi/iwl-prph.h
75@@ -227,12 +227,33 @@
76 #define SCD_AIT (SCD_BASE + 0x0c)
77 #define SCD_TXFACT (SCD_BASE + 0x10)
78 #define SCD_ACTIVE (SCD_BASE + 0x14)
79-#define SCD_QUEUE_WRPTR(x) (SCD_BASE + 0x18 + (x) * 4)
80-#define SCD_QUEUE_RDPTR(x) (SCD_BASE + 0x68 + (x) * 4)
81 #define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8)
82 #define SCD_AGGR_SEL (SCD_BASE + 0x248)
83 #define SCD_INTERRUPT_MASK (SCD_BASE + 0x108)
84-#define SCD_QUEUE_STATUS_BITS(x) (SCD_BASE + 0x10c + (x) * 4)
85+
86+static inline unsigned int SCD_QUEUE_WRPTR(unsigned int chnl)
87+{
88+ if (chnl < 20)
89+ return SCD_BASE + 0x18 + chnl * 4;
90+ WARN_ON_ONCE(chnl >= 32);
91+ return SCD_BASE + 0x284 + (chnl - 20) * 4;
92+}
93+
94+static inline unsigned int SCD_QUEUE_RDPTR(unsigned int chnl)
95+{
96+ if (chnl < 20)
97+ return SCD_BASE + 0x68 + chnl * 4;
98+ WARN_ON_ONCE(chnl >= 32);
99+ return SCD_BASE + 0x2B4 + (chnl - 20) * 4;
100+}
101+
102+static inline unsigned int SCD_QUEUE_STATUS_BITS(unsigned int chnl)
103+{
104+ if (chnl < 20)
105+ return SCD_BASE + 0x10c + chnl * 4;
106+ WARN_ON_ONCE(chnl >= 32);
107+ return SCD_BASE + 0x384 + (chnl - 20) * 4;
108+}
109
110 /*********************** END TX SCHEDULER *************************************/
111
112--
1131.7.7.6
114
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0147-hfsplus-Fix-potential-buffer-overflows.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0147-hfsplus-Fix-potential-buffer-overflows.patch
new file mode 100644
index 00000000..f379dc32
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0147-hfsplus-Fix-potential-buffer-overflows.patch
@@ -0,0 +1,79 @@
1From e5c4ffba0f91d7315823292c6a46a0e3a35cf5f1 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Fri, 4 May 2012 12:09:39 -0700
4Subject: [PATCH 147/165] hfsplus: Fix potential buffer overflows
5
6commit 6f24f892871acc47b40dd594c63606a17c714f77 upstream.
7
8Commit ec81aecb2966 ("hfs: fix a potential buffer overflow") fixed a few
9potential buffer overflows in the hfs filesystem. But as Timo Warns
10pointed out, these changes also need to be made on the hfsplus
11filesystem as well.
12
13Reported-by: Timo Warns <warns@pre-sense.de>
14Acked-by: WANG Cong <amwang@redhat.com>
15Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
16Cc: Miklos Szeredi <mszeredi@suse.cz>
17Cc: Sage Weil <sage@newdream.net>
18Cc: Eugene Teo <eteo@redhat.com>
19Cc: Roman Zippel <zippel@linux-m68k.org>
20Cc: Al Viro <viro@zeniv.linux.org.uk>
21Cc: Christoph Hellwig <hch@lst.de>
22Cc: Alexey Dobriyan <adobriyan@gmail.com>
23Cc: Dave Anderson <anderson@redhat.com>
24Cc: Andrew Morton <akpm@linux-foundation.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
27Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
28---
29 fs/hfsplus/catalog.c | 4 ++++
30 fs/hfsplus/dir.c | 11 +++++++++++
31 2 files changed, 15 insertions(+), 0 deletions(-)
32
33diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c
34index 4dfbfec..ec2a9c2 100644
35--- a/fs/hfsplus/catalog.c
36+++ b/fs/hfsplus/catalog.c
37@@ -366,6 +366,10 @@ int hfsplus_rename_cat(u32 cnid,
38 err = hfs_brec_find(&src_fd);
39 if (err)
40 goto out;
41+ if (src_fd.entrylength > sizeof(entry) || src_fd.entrylength < 0) {
42+ err = -EIO;
43+ goto out;
44+ }
45
46 hfs_bnode_read(src_fd.bnode, &entry, src_fd.entryoffset,
47 src_fd.entrylength);
48diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
49index 4536cd3..5adb740 100644
50--- a/fs/hfsplus/dir.c
51+++ b/fs/hfsplus/dir.c
52@@ -150,6 +150,11 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir)
53 filp->f_pos++;
54 /* fall through */
55 case 1:
56+ if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) {
57+ err = -EIO;
58+ goto out;
59+ }
60+
61 hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
62 fd.entrylength);
63 if (be16_to_cpu(entry.type) != HFSPLUS_FOLDER_THREAD) {
64@@ -181,6 +186,12 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir)
65 err = -EIO;
66 goto out;
67 }
68+
69+ if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) {
70+ err = -EIO;
71+ goto out;
72+ }
73+
74 hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
75 fd.entrylength);
76 type = be16_to_cpu(entry.type);
77--
781.7.7.6
79
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0148-ASoC-tlv312aic23-unbreak-resume.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0148-ASoC-tlv312aic23-unbreak-resume.patch
new file mode 100644
index 00000000..9f93387b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0148-ASoC-tlv312aic23-unbreak-resume.patch
@@ -0,0 +1,51 @@
1From b0209aed70b2cc2a544817e2b57d68d9dfcf4635 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
3Date: Sun, 29 Apr 2012 17:37:57 +0200
4Subject: [PATCH 148/165] ASoC: tlv312aic23: unbreak resume
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit e875c1e3e758447ba81ca450d89434b3b0496d37 upstream.
10
11* commit f9dfbf9 "ASoC: tlv320aic23: convert to soc-cache" leads to
12a bug preventing resumeof the codec as regmap expects a 9 bits data
13register but 0xFFFF is passed in tlv320aic23_set_bias_level and this
14values gets cached preventing any write to the TLV320AIC23_PWR
15register as the final value produced by regmap is (register << 9) | value
16
17* this patch solves the problem by only working on the 9 bits the
18register contains.
19
20Signed-off-by: Eric Bénard <eric@eukrea.com>
21Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
22Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
23---
24 sound/soc/codecs/tlv320aic23.c | 4 ++--
25 1 files changed, 2 insertions(+), 2 deletions(-)
26
27diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
28index 336de8f..0e7e26e 100644
29--- a/sound/soc/codecs/tlv320aic23.c
30+++ b/sound/soc/codecs/tlv320aic23.c
31@@ -473,7 +473,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,
32 static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
33 enum snd_soc_bias_level level)
34 {
35- u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f;
36+ u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f;
37
38 switch (level) {
39 case SND_SOC_BIAS_ON:
40@@ -492,7 +492,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
41 case SND_SOC_BIAS_OFF:
42 /* everything off, dac mute, inactive */
43 snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0);
44- snd_soc_write(codec, TLV320AIC23_PWR, 0xffff);
45+ snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff);
46 break;
47 }
48 codec->dapm.bias_level = level;
49--
501.7.7.6
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0149-asm-generic-Use-__BITS_PER_LONG-in-statfs.h.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0149-asm-generic-Use-__BITS_PER_LONG-in-statfs.h.patch
new file mode 100644
index 00000000..43289d64
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0149-asm-generic-Use-__BITS_PER_LONG-in-statfs.h.patch
@@ -0,0 +1,37 @@
1From 09fdfacc87dfa2183da3d66ac788901636ef33f2 Mon Sep 17 00:00:00 2001
2From: "H. Peter Anvin" <hpa@linux.intel.com>
3Date: Thu, 26 Apr 2012 11:45:16 -0700
4Subject: [PATCH 149/165] asm-generic: Use __BITS_PER_LONG in statfs.h
5
6commit f5c2347ee20a8d6964d6a6b1ad04f200f8d4dfa7 upstream.
7
8<asm-generic/statfs.h> is exported to userspace, so using
9BITS_PER_LONG is invalid. We need to use __BITS_PER_LONG instead.
10
11This is kernel bugzilla 43165.
12
13Reported-by: H.J. Lu <hjl.tools@gmail.com>
14Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
15Link: http://lkml.kernel.org/r/1335465916-16965-1-git-send-email-hpa@linux.intel.com
16Acked-by: Arnd Bergmann <arnd@arndb.de>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 include/asm-generic/statfs.h | 2 +-
20 1 files changed, 1 insertions(+), 1 deletions(-)
21
22diff --git a/include/asm-generic/statfs.h b/include/asm-generic/statfs.h
23index 0fd28e0..c749af9 100644
24--- a/include/asm-generic/statfs.h
25+++ b/include/asm-generic/statfs.h
26@@ -15,7 +15,7 @@ typedef __kernel_fsid_t fsid_t;
27 * with a 10' pole.
28 */
29 #ifndef __statfs_word
30-#if BITS_PER_LONG == 64
31+#if __BITS_PER_LONG == 64
32 #define __statfs_word long
33 #else
34 #define __statfs_word __u32
35--
361.7.7.6
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0150-x86-relocs-Remove-an-unused-variable.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0150-x86-relocs-Remove-an-unused-variable.patch
new file mode 100644
index 00000000..5b063811
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0150-x86-relocs-Remove-an-unused-variable.patch
@@ -0,0 +1,41 @@
1From 174b97406f578b117e9403dde42ac98f80919a0b Mon Sep 17 00:00:00 2001
2From: Kusanagi Kouichi <slash@ac.auone-net.jp>
3Date: Sun, 1 Apr 2012 17:29:32 +0900
4Subject: [PATCH 150/165] x86, relocs: Remove an unused variable
5
6commit 7c77cda0fe742ed07622827ce80963bbeebd1e3f upstream.
7
8sh_symtab is set but not used.
9
10[ hpa: putting this in urgent because of the sheer harmlessness of the patch:
11 it quiets a build warning but does not change any generated code. ]
12
13Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
14Link: http://lkml.kernel.org/r/20120401082932.D5E066FC03D@msa105.auone-net.jp
15Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 arch/x86/boot/compressed/relocs.c | 2 --
19 1 files changed, 0 insertions(+), 2 deletions(-)
20
21diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c
22index 89bbf4e..e77f4e4 100644
23--- a/arch/x86/boot/compressed/relocs.c
24+++ b/arch/x86/boot/compressed/relocs.c
25@@ -402,13 +402,11 @@ static void print_absolute_symbols(void)
26 for (i = 0; i < ehdr.e_shnum; i++) {
27 struct section *sec = &secs[i];
28 char *sym_strtab;
29- Elf32_Sym *sh_symtab;
30 int j;
31
32 if (sec->shdr.sh_type != SHT_SYMTAB) {
33 continue;
34 }
35- sh_symtab = sec->symtab;
36 sym_strtab = sec->link->strtab;
37 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Sym); j++) {
38 Elf32_Sym *sym;
39--
401.7.7.6
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0151-ARM-7410-1-Add-extra-clobber-registers-for-assembly-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0151-ARM-7410-1-Add-extra-clobber-registers-for-assembly-.patch
new file mode 100644
index 00000000..b712f67e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0151-ARM-7410-1-Add-extra-clobber-registers-for-assembly-.patch
@@ -0,0 +1,43 @@
1From 8a73393b01a8d2a9959a094d34d037802d78161b Mon Sep 17 00:00:00 2001
2From: Tim Bird <tim.bird@am.sony.com>
3Date: Wed, 2 May 2012 22:55:39 +0100
4Subject: [PATCH 151/165] ARM: 7410/1: Add extra clobber registers for
5 assembly in kernel_execve
6
7commit e787ec1376e862fcea1bfd523feb7c5fb43ecdb9 upstream.
8
9The inline assembly in kernel_execve() uses r8 and r9. Since this
10code sequence does not return, it usually doesn't matter if the
11register clobber list is accurate. However, I saw a case where a
12particular version of gcc used r8 as an intermediate for the value
13eventually passed to r9. Because r8 is used in the inline
14assembly, and not mentioned in the clobber list, r9 was set
15to an incorrect value.
16
17This resulted in a kernel panic on execution of the first user-space
18program in the system. r9 is used in ret_to_user as the thread_info
19pointer, and if it's wrong, bad things happen.
20
21Signed-off-by: Tim Bird <tim.bird@am.sony.com>
22Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
23Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
24---
25 arch/arm/kernel/sys_arm.c | 2 +-
26 1 files changed, 1 insertions(+), 1 deletions(-)
27
28diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
29index d2b1779..76cbb05 100644
30--- a/arch/arm/kernel/sys_arm.c
31+++ b/arch/arm/kernel/sys_arm.c
32@@ -115,7 +115,7 @@ int kernel_execve(const char *filename,
33 "Ir" (THREAD_START_SP - sizeof(regs)),
34 "r" (&regs),
35 "Ir" (sizeof(regs))
36- : "r0", "r1", "r2", "r3", "ip", "lr", "memory");
37+ : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory");
38
39 out:
40 return ret;
41--
421.7.7.6
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0152-ARM-7414-1-SMP-prevent-use-of-the-console-when-using.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0152-ARM-7414-1-SMP-prevent-use-of-the-console-when-using.patch
new file mode 100644
index 00000000..d84c0d4f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0152-ARM-7414-1-SMP-prevent-use-of-the-console-when-using.patch
@@ -0,0 +1,58 @@
1From c4c0043207f643dbe84706b1f3d6948b1e2de64d Mon Sep 17 00:00:00 2001
2From: Colin Cross <ccross@android.com>
3Date: Sat, 5 May 2012 20:58:13 +0100
4Subject: [PATCH 152/165] ARM: 7414/1: SMP: prevent use of the console when
5 using idmap_pgd
6
7commit fde165b2a29673aabf18ceff14dea1f1cfb0daad upstream.
8
9Commit 4e8ee7de227e3ab9a72040b448ad728c5428a042 (ARM: SMP: use
10idmap_pgd for mapping MMU enable during secondary booting)
11switched secondary boot to use idmap_pgd, which is initialized
12during early_initcall, instead of a page table initialized during
13__cpu_up. This causes idmap_pgd to contain the static mappings
14but be missing all dynamic mappings.
15
16If a console is registered that creates a dynamic mapping, the
17printk in secondary_start_kernel will trigger a data abort on
18the missing mapping before the exception handlers have been
19initialized, leading to a hang. Initial boot is not affected
20because no consoles have been registered, and resume is usually
21not affected because the offending console is suspended.
22Onlining a cpu with hotplug triggers the problem.
23
24A workaround is to the printk in secondary_start_kernel until
25after the page tables have been switched back to init_mm.
26
27Signed-off-by: Colin Cross <ccross@android.com>
28Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
29Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
30---
31 arch/arm/kernel/smp.c | 4 ++--
32 1 files changed, 2 insertions(+), 2 deletions(-)
33
34diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
35index ef5640b..e10e59a 100644
36--- a/arch/arm/kernel/smp.c
37+++ b/arch/arm/kernel/smp.c
38@@ -297,8 +297,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
39 struct mm_struct *mm = &init_mm;
40 unsigned int cpu = smp_processor_id();
41
42- printk("CPU%u: Booted secondary processor\n", cpu);
43-
44 /*
45 * All kernel threads share the same mm context; grab a
46 * reference and switch to it.
47@@ -310,6 +308,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
48 enter_lazy_tlb(mm, current);
49 local_flush_tlb_all();
50
51+ printk("CPU%u: Booted secondary processor\n", cpu);
52+
53 cpu_init();
54 preempt_disable();
55 trace_hardirqs_off();
56--
571.7.7.6
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0153-drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0153-drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch
new file mode 100644
index 00000000..4ce10114
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0153-drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch
@@ -0,0 +1,56 @@
1From fa5bf9a9b89ddc63cb451a2aecb112c7715aaffb Mon Sep 17 00:00:00 2001
2From: Daniel Vetter <daniel.vetter@ffwll.ch>
3Date: Fri, 4 May 2012 11:29:56 +0200
4Subject: [PATCH 153/165] drm/i915: disable sdvo hotplug on i945g/gm
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 768b107e4b3be0acf6f58e914afe4f337c00932b upstream.
10
11Chris Wilson dug out a hw erratum saying that there's noise on the
12interrupt line on i945G chips. We also have a bug report from a i945GM
13chip with an sdvo hotplug interrupt storm (and no apparent cause).
14
15Play it safe and disable sdvo hotplug on all i945 variants.
16
17Note that this is a regression that has been introduced in 3.1,
18when we've enabled sdvo hotplug support with
19
20commit cc68c81aed7d892deaf12d720d5455208e94cd0a
21Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
22Date: Wed Sep 21 17:13:30 2011 +0100
23
24 drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI
25
26Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=38442
27Reported-and-tested-by: Dominik Köppl <dominik@devwork.org>
28Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
29Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
30Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
31---
32 drivers/gpu/drm/i915/intel_sdvo.c | 6 ++++++
33 1 files changed, 6 insertions(+), 0 deletions(-)
34
35diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
36index 0a877dd..8eddcca 100644
37--- a/drivers/gpu/drm/i915/intel_sdvo.c
38+++ b/drivers/gpu/drm/i915/intel_sdvo.c
39@@ -1221,8 +1221,14 @@ static bool intel_sdvo_get_capabilities(struct intel_sdvo *intel_sdvo, struct in
40
41 static int intel_sdvo_supports_hotplug(struct intel_sdvo *intel_sdvo)
42 {
43+ struct drm_device *dev = intel_sdvo->base.base.dev;
44 u8 response[2];
45
46+ /* HW Erratum: SDVO Hotplug is broken on all i945G chips, there's noise
47+ * on the line. */
48+ if (IS_I945G(dev) || IS_I945GM(dev))
49+ return false;
50+
51 return intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT,
52 &response, 2) && response[0];
53 }
54--
551.7.7.6
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0154-drm-i915-Do-no-set-Stencil-Cache-eviction-LRA-w-a-on.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0154-drm-i915-Do-no-set-Stencil-Cache-eviction-LRA-w-a-on.patch
new file mode 100644
index 00000000..f5c50b25
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0154-drm-i915-Do-no-set-Stencil-Cache-eviction-LRA-w-a-on.patch
@@ -0,0 +1,51 @@
1From 69056e5ea1d5eef50061b03d95dc6afd26ee9627 Mon Sep 17 00:00:00 2001
2From: Daniel Vetter <daniel.vetter@ffwll.ch>
3Date: Sun, 6 May 2012 16:50:24 +0200
4Subject: [PATCH 154/165] drm/i915: Do no set Stencil Cache eviction LRA w/a
5 on gen7+
6
7commit 2e7a44814d802c8ba479164b8924070cd908d6b5 upstream.
8
9I've flagged this while reviewing the first version and Ken Graunke
10fixed it up in v2, but unfortunately Dave Airlie picked up the wrong
11version.
12
13Cc: Dave Airlie <airlied@redhat.com>
14Cc: Kenneth Graunke <kenneth@whitecape.org>
15Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/gpu/drm/i915/intel_ringbuffer.c | 9 ++++++---
19 1 files changed, 6 insertions(+), 3 deletions(-)
20
21diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
22index 273f403..62f9ac5 100644
23--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
24+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
25@@ -414,10 +414,8 @@ static int init_render_ring(struct intel_ring_buffer *ring)
26 return ret;
27 }
28
29- if (INTEL_INFO(dev)->gen >= 6) {
30- I915_WRITE(INSTPM,
31- INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
32
33+ if (IS_GEN6(dev)) {
34 /* From the Sandybridge PRM, volume 1 part 3, page 24:
35 * "If this bit is set, STCunit will have LRA as replacement
36 * policy. [...] This bit must be reset. LRA replacement
37@@ -427,6 +425,11 @@ static int init_render_ring(struct intel_ring_buffer *ring)
38 CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT);
39 }
40
41+ if (INTEL_INFO(dev)->gen >= 6) {
42+ I915_WRITE(INSTPM,
43+ INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
44+ }
45+
46 return ret;
47 }
48
49--
501.7.7.6
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0155-xen-pte-Fix-crashes-when-trying-to-see-non-existent-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0155-xen-pte-Fix-crashes-when-trying-to-see-non-existent-.patch
new file mode 100644
index 00000000..97aed576
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0155-xen-pte-Fix-crashes-when-trying-to-see-non-existent-.patch
@@ -0,0 +1,63 @@
1From 9476d5b9241f9e02cf2d0b0789e8e229709d54bf Mon Sep 17 00:00:00 2001
2From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
3Date: Thu, 3 May 2012 16:14:14 -0400
4Subject: [PATCH 155/165] xen/pte: Fix crashes when trying to see non-existent
5 PGD/PMD/PUD/PTEs
6
7commit b7e5ffe5d83fa40d702976d77452004abbe35791 upstream.
8
9If I try to do "cat /sys/kernel/debug/kernel_page_tables"
10I end up with:
11
12BUG: unable to handle kernel paging request at ffffc7fffffff000
13IP: [<ffffffff8106aa51>] ptdump_show+0x221/0x480
14PGD 0
15Oops: 0000 [#1] SMP
16CPU 0
17.. snip..
18RAX: 0000000000000000 RBX: ffffc00000000fff RCX: 0000000000000000
19RDX: 0000800000000000 RSI: 0000000000000000 RDI: ffffc7fffffff000
20
21which is due to the fact we are trying to access a PFN that is not
22accessible to us. The reason (at least in this case) was that
23PGD[256] is set to __HYPERVISOR_VIRT_START which was setup (by the
24hypervisor) to point to a read-only linear map of the MFN->PFN array.
25During our parsing we would get the MFN (a valid one), try to look
26it up in the MFN->PFN tree and find it invalid and return ~0 as PFN.
27Then pte_mfn_to_pfn would happilly feed that in, attach the flags
28and return it back to the caller. 'ptdump_show' bitshifts it and
29gets and invalid value that it tries to dereference.
30
31Instead of doing all of that, we detect the ~0 case and just
32return !_PAGE_PRESENT.
33
34This bug has been in existence .. at least until 2.6.37 (yikes!)
35
36Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
37Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
38---
39 arch/x86/xen/mmu.c | 7 ++++++-
40 1 files changed, 6 insertions(+), 1 deletions(-)
41
42diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
43index 87f6673..ec3d603 100644
44--- a/arch/x86/xen/mmu.c
45+++ b/arch/x86/xen/mmu.c
46@@ -353,8 +353,13 @@ static pteval_t pte_mfn_to_pfn(pteval_t val)
47 {
48 if (val & _PAGE_PRESENT) {
49 unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT;
50+ unsigned long pfn = mfn_to_pfn(mfn);
51+
52 pteval_t flags = val & PTE_FLAGS_MASK;
53- val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags;
54+ if (unlikely(pfn == ~0))
55+ val = flags & ~_PAGE_PRESENT;
56+ else
57+ val = ((pteval_t)pfn << PAGE_SHIFT) | flags;
58 }
59
60 return val;
61--
621.7.7.6
63
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0156-xen-pci-don-t-use-PCI-BIOS-service-for-configuration.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0156-xen-pci-don-t-use-PCI-BIOS-service-for-configuration.patch
new file mode 100644
index 00000000..f2f42b1c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0156-xen-pci-don-t-use-PCI-BIOS-service-for-configuration.patch
@@ -0,0 +1,53 @@
1From 26cb931f7927821d30686897588964e66b9ec156 Mon Sep 17 00:00:00 2001
2From: David Vrabel <david.vrabel@citrix.com>
3Date: Fri, 4 May 2012 14:29:46 +0100
4Subject: [PATCH 156/165] xen/pci: don't use PCI BIOS service for
5 configuration space accesses
6
7commit 76a8df7b49168509df02461f83fab117a4a86e08 upstream.
8
9The accessing PCI configuration space with the PCI BIOS32 service does
10not work in PV guests.
11
12On systems without MMCONFIG or where the BIOS hasn't marked the
13MMCONFIG region as reserved in the e820 map, the BIOS service is
14probed (even though direct access is preferred) and this hangs.
15
16Acked-by: Jan Beulich <jbeulich@suse.com>
17Signed-off-by: David Vrabel <david.vrabel@citrix.com>
18[v1: Fixed compile error when CONFIG_PCI is not set]
19Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
20[bwh: Backported to 3.2: adjust context]
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 arch/x86/xen/enlighten.c | 7 +++++--
24 1 files changed, 5 insertions(+), 2 deletions(-)
25
26diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
27index 1f92865..e7c920b 100644
28--- a/arch/x86/xen/enlighten.c
29+++ b/arch/x86/xen/enlighten.c
30@@ -62,6 +62,7 @@
31 #include <asm/reboot.h>
32 #include <asm/stackprotector.h>
33 #include <asm/hypervisor.h>
34+#include <asm/pci_x86.h>
35
36 #include "xen-ops.h"
37 #include "mmu.h"
38@@ -1278,8 +1279,10 @@ asmlinkage void __init xen_start_kernel(void)
39 /* Make sure ACS will be enabled */
40 pci_request_acs();
41 }
42-
43-
44+#ifdef CONFIG_PCI
45+ /* PCI BIOS service won't work from a PV guest. */
46+ pci_probe &= ~PCI_PROBE_BIOS;
47+#endif
48 xen_raw_console_write("about to get started...\n");
49
50 xen_setup_runstate_info(0);
51--
521.7.7.6
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0157-percpu-x86-don-t-use-PMD_SIZE-as-embedded-atom_size-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0157-percpu-x86-don-t-use-PMD_SIZE-as-embedded-atom_size-.patch
new file mode 100644
index 00000000..c948145d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0157-percpu-x86-don-t-use-PMD_SIZE-as-embedded-atom_size-.patch
@@ -0,0 +1,68 @@
1From 40bfc308a453997d543e78d6c825275710c48a1c Mon Sep 17 00:00:00 2001
2From: Tejun Heo <tj@kernel.org>
3Date: Fri, 27 Apr 2012 10:54:35 -0700
4Subject: [PATCH 157/165] percpu, x86: don't use PMD_SIZE as embedded
5 atom_size on 32bit
6
7commit d5e28005a1d2e67833852f4c9ea8ec206ea3ff85 upstream.
8
9With the embed percpu first chunk allocator, x86 uses either PAGE_SIZE
10or PMD_SIZE for atom_size. PMD_SIZE is used when CPU supports PSE so
11that percpu areas are aligned to PMD mappings and possibly allow using
12PMD mappings in vmalloc areas in the future. Using larger atom_size
13doesn't waste actual memory; however, it does require larger vmalloc
14space allocation later on for !first chunks.
15
16With reasonably sized vmalloc area, PMD_SIZE shouldn't be a problem
17but x86_32 at this point is anything but reasonable in terms of
18address space and using larger atom_size reportedly leads to frequent
19percpu allocation failures on certain setups.
20
21As there is no reason to not use PMD_SIZE on x86_64 as vmalloc space
22is aplenty and most x86_64 configurations support PSE, fix the issue
23by always using PMD_SIZE on x86_64 and PAGE_SIZE on x86_32.
24
25v2: drop cpu_has_pse test and make x86_64 always use PMD_SIZE and
26 x86_32 PAGE_SIZE as suggested by hpa.
27
28Signed-off-by: Tejun Heo <tj@kernel.org>
29Reported-by: Yanmin Zhang <yanmin.zhang@intel.com>
30Reported-by: ShuoX Liu <shuox.liu@intel.com>
31Acked-by: H. Peter Anvin <hpa@zytor.com>
32LKML-Reference: <4F97BA98.6010001@intel.com>
33Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
34---
35 arch/x86/kernel/setup_percpu.c | 14 +++++++++++++-
36 1 files changed, 13 insertions(+), 1 deletions(-)
37
38diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
39index 71f4727..5a98aa2 100644
40--- a/arch/x86/kernel/setup_percpu.c
41+++ b/arch/x86/kernel/setup_percpu.c
42@@ -185,10 +185,22 @@ void __init setup_per_cpu_areas(void)
43 #endif
44 rc = -EINVAL;
45 if (pcpu_chosen_fc != PCPU_FC_PAGE) {
46- const size_t atom_size = cpu_has_pse ? PMD_SIZE : PAGE_SIZE;
47 const size_t dyn_size = PERCPU_MODULE_RESERVE +
48 PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE;
49+ size_t atom_size;
50
51+ /*
52+ * On 64bit, use PMD_SIZE for atom_size so that embedded
53+ * percpu areas are aligned to PMD. This, in the future,
54+ * can also allow using PMD mappings in vmalloc area. Use
55+ * PAGE_SIZE on 32bit as vmalloc space is highly contended
56+ * and large vmalloc area allocs can easily fail.
57+ */
58+#ifdef CONFIG_X86_64
59+ atom_size = PMD_SIZE;
60+#else
61+ atom_size = PAGE_SIZE;
62+#endif
63 rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE,
64 dyn_size, atom_size,
65 pcpu_cpu_distance,
66--
671.7.7.6
68
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0158-iwlagn-allow-up-to-uCode-API-6-for-6000-devices.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0158-iwlagn-allow-up-to-uCode-API-6-for-6000-devices.patch
new file mode 100644
index 00000000..7e272347
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0158-iwlagn-allow-up-to-uCode-API-6-for-6000-devices.patch
@@ -0,0 +1,64 @@
1From cad1b4d0f128eb46af3732795f91e3aba5ea4fbb Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Fri, 4 Nov 2011 07:22:37 -0700
4Subject: [PATCH 158/165] iwlagn: allow up to uCode API 6 for 6000 devices
5
6commit b914811524fbe9e91fe50845f5d7bd4316b8a6ee upstream.
7
8Since the uCode hasn't been released (yet?),
9warn only if using older than API 4, but load
10anything up to API 6.
11
12Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 drivers/net/wireless/iwlwifi/iwl-6000.c | 7 +++++--
17 1 files changed, 5 insertions(+), 2 deletions(-)
18
19diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
20index c840c78..ae3ea32 100644
21--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
22+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
23@@ -46,11 +46,12 @@
24 #include "iwl-cfg.h"
25
26 /* Highest firmware API version supported */
27-#define IWL6000_UCODE_API_MAX 4
28+#define IWL6000_UCODE_API_MAX 6
29 #define IWL6050_UCODE_API_MAX 5
30 #define IWL6000G2_UCODE_API_MAX 6
31
32 /* Oldest version we won't warn about */
33+#define IWL6000_UCODE_API_OK 4
34 #define IWL6000G2_UCODE_API_OK 5
35
36 /* Lowest firmware API version supported */
37@@ -479,6 +480,7 @@ struct iwl_cfg iwl130_bg_cfg = {
38 #define IWL_DEVICE_6000i \
39 .fw_name_pre = IWL6000_FW_PRE, \
40 .ucode_api_max = IWL6000_UCODE_API_MAX, \
41+ .ucode_api_ok = IWL6000_UCODE_API_OK, \
42 .ucode_api_min = IWL6000_UCODE_API_MIN, \
43 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
44 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
45@@ -559,6 +561,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
46 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
47 .fw_name_pre = IWL6000_FW_PRE,
48 .ucode_api_max = IWL6000_UCODE_API_MAX,
49+ .ucode_api_ok = IWL6000_UCODE_API_OK,
50 .ucode_api_min = IWL6000_UCODE_API_MIN,
51 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
52 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
53@@ -569,7 +572,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
54 .led_mode = IWL_LED_BLINK,
55 };
56
57-MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
58+MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
59 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
60 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
61 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
62--
631.7.7.6
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0159-iwlwifi-use-correct-released-ucode-version.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0159-iwlwifi-use-correct-released-ucode-version.patch
new file mode 100644
index 00000000..e6ea8fa1
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0159-iwlwifi-use-correct-released-ucode-version.patch
@@ -0,0 +1,159 @@
1From 6ae066df7c16000f163eab3a745b711447536e70 Mon Sep 17 00:00:00 2001
2From: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
3Date: Sun, 22 Apr 2012 07:55:27 -0700
4Subject: [PATCH 159/165] iwlwifi: use correct released ucode version
5
6commit 78cbcf2b9dbe0565820dc7721316f9c401000a68 upstream.
7
8Report correctly the latest released version
9of the iwlwifi firmware for all
10iwlwifi-supported devices.
11
12Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
13Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14Signed-off-by: John W. Linville <linville@tuxdriver.com>
15[bwh: Backported to 3.2: adjust context]
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/net/wireless/iwlwifi/iwl-1000.c | 8 ++++----
19 drivers/net/wireless/iwlwifi/iwl-2000.c | 16 ++++++++--------
20 drivers/net/wireless/iwlwifi/iwl-5000.c | 11 +++++++++--
21 drivers/net/wireless/iwlwifi/iwl-6000.c | 10 ++++++----
22 4 files changed, 27 insertions(+), 18 deletions(-)
23
24diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
25index dd008b0..1e6c8cc 100644
26--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
27+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
28@@ -45,8 +45,8 @@
29 #include "iwl-cfg.h"
30
31 /* Highest firmware API version supported */
32-#define IWL1000_UCODE_API_MAX 6
33-#define IWL100_UCODE_API_MAX 6
34+#define IWL1000_UCODE_API_MAX 5
35+#define IWL100_UCODE_API_MAX 5
36
37 /* Oldest version we won't warn about */
38 #define IWL1000_UCODE_API_OK 5
39@@ -244,5 +244,5 @@ struct iwl_cfg iwl100_bg_cfg = {
40 IWL_DEVICE_100,
41 };
42
43-MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
44-MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));
45+MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK));
46+MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK));
47diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
48index 7943197..9823e41 100644
49--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
50+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
51@@ -51,10 +51,10 @@
52 #define IWL135_UCODE_API_MAX 6
53
54 /* Oldest version we won't warn about */
55-#define IWL2030_UCODE_API_OK 5
56-#define IWL2000_UCODE_API_OK 5
57-#define IWL105_UCODE_API_OK 5
58-#define IWL135_UCODE_API_OK 5
59+#define IWL2030_UCODE_API_OK 6
60+#define IWL2000_UCODE_API_OK 6
61+#define IWL105_UCODE_API_OK 6
62+#define IWL135_UCODE_API_OK 6
63
64 /* Lowest firmware API version supported */
65 #define IWL2030_UCODE_API_MIN 5
66@@ -372,7 +372,7 @@ struct iwl_cfg iwl135_bgn_cfg = {
67 .ht_params = &iwl2000_ht_params,
68 };
69
70-MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX));
71-MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX));
72-MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX));
73-MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX));
74+MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_OK));
75+MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_OK));
76+MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_OK));
77+MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_OK));
78diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
79index f55fb2d..606213f 100644
80--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
81+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
82@@ -50,6 +50,10 @@
83 #define IWL5000_UCODE_API_MAX 5
84 #define IWL5150_UCODE_API_MAX 2
85
86+/* Oldest version we won't warn about */
87+#define IWL5000_UCODE_API_OK 5
88+#define IWL5150_UCODE_API_OK 2
89+
90 /* Lowest firmware API version supported */
91 #define IWL5000_UCODE_API_MIN 1
92 #define IWL5150_UCODE_API_MIN 1
93@@ -373,6 +377,7 @@ static struct iwl_ht_params iwl5000_ht_params = {
94 #define IWL_DEVICE_5000 \
95 .fw_name_pre = IWL5000_FW_PRE, \
96 .ucode_api_max = IWL5000_UCODE_API_MAX, \
97+ .ucode_api_ok = IWL5000_UCODE_API_OK, \
98 .ucode_api_min = IWL5000_UCODE_API_MIN, \
99 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \
100 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
101@@ -416,6 +421,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
102 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
103 .fw_name_pre = IWL5000_FW_PRE,
104 .ucode_api_max = IWL5000_UCODE_API_MAX,
105+ .ucode_api_ok = IWL5000_UCODE_API_OK,
106 .ucode_api_min = IWL5000_UCODE_API_MIN,
107 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
108 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
109@@ -429,6 +435,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
110 #define IWL_DEVICE_5150 \
111 .fw_name_pre = IWL5150_FW_PRE, \
112 .ucode_api_max = IWL5150_UCODE_API_MAX, \
113+ .ucode_api_ok = IWL5150_UCODE_API_OK, \
114 .ucode_api_min = IWL5150_UCODE_API_MIN, \
115 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \
116 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
117@@ -450,5 +457,5 @@ struct iwl_cfg iwl5150_abg_cfg = {
118 IWL_DEVICE_5150,
119 };
120
121-MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
122-MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
123+MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK));
124+MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK));
125diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
126index ae3ea32..9509298 100644
127--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
128+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
129@@ -53,6 +53,8 @@
130 /* Oldest version we won't warn about */
131 #define IWL6000_UCODE_API_OK 4
132 #define IWL6000G2_UCODE_API_OK 5
133+#define IWL6050_UCODE_API_OK 5
134+#define IWL6000G2B_UCODE_API_OK 6
135
136 /* Lowest firmware API version supported */
137 #define IWL6000_UCODE_API_MIN 4
138@@ -359,7 +361,7 @@ static struct iwl_bt_params iwl6000_bt_params = {
139 #define IWL_DEVICE_6005 \
140 .fw_name_pre = IWL6005_FW_PRE, \
141 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
142- .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
143+ .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \
144 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
145 .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \
146 .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
147@@ -573,6 +575,6 @@ struct iwl_cfg iwl6000_3agn_cfg = {
148 };
149
150 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
151-MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
152-MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
153-MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
154+MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK));
155+MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK));
156+MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK));
157--
1581.7.7.6
159
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0160-iwlwifi-use-6000G2B-for-6030-device-series.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0160-iwlwifi-use-6000G2B-for-6030-device-series.patch
new file mode 100644
index 00000000..94d460aa
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0160-iwlwifi-use-6000G2B-for-6030-device-series.patch
@@ -0,0 +1,44 @@
1From 4d665b9d5d7be0652d0942fe8bd0ea3bd3d73ebd Mon Sep 17 00:00:00 2001
2From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
3Date: Wed, 25 Apr 2012 08:10:08 -0700
4Subject: [PATCH 160/165] iwlwifi: use 6000G2B for 6030 device series
5
6commit 1ed2ec37b44e86eaa8e0a03b908a39c80f65ee45 upstream.
7
8"iwlwifi: use correct released ucode version" change
9the ucode api ok from 6000G2 to 6000G2B, but it shall belong
10to 6030 device series, not the 6005 device series. Fix it
11
12Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13Signed-off-by: John W. Linville <linville@tuxdriver.com>
14[bwh: Backported to 3.2: adjust context]
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/net/wireless/iwlwifi/iwl-6000.c | 4 ++--
18 1 files changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
21index 9509298..b4f809c 100644
22--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
23+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
24@@ -361,7 +361,7 @@ static struct iwl_bt_params iwl6000_bt_params = {
25 #define IWL_DEVICE_6005 \
26 .fw_name_pre = IWL6005_FW_PRE, \
27 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
28- .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \
29+ .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
30 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
31 .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \
32 .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
33@@ -402,7 +402,7 @@ struct iwl_cfg iwl6005_2agn_d_cfg = {
34 #define IWL_DEVICE_6030 \
35 .fw_name_pre = IWL6030_FW_PRE, \
36 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
37- .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
38+ .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \
39 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
40 .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \
41 .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
42--
431.7.7.6
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0161-exit_signal-simplify-the-we-have-changed-execution-d.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0161-exit_signal-simplify-the-we-have-changed-execution-d.patch
new file mode 100644
index 00000000..228a391d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0161-exit_signal-simplify-the-we-have-changed-execution-d.patch
@@ -0,0 +1,75 @@
1From 24b4ef6e688f21346c5385ef56f4d9bc8c9e4c2c Mon Sep 17 00:00:00 2001
2From: Oleg Nesterov <oleg@redhat.com>
3Date: Mon, 19 Mar 2012 17:03:22 +0100
4Subject: [PATCH 161/165] exit_signal: simplify the "we have changed execution
5 domain" logic
6
7commit e636825346b36a07ccfc8e30946d52855e21f681 upstream.
8
9exit_notify() checks "tsk->self_exec_id != tsk->parent_exec_id"
10to handle the "we have changed execution domain" case.
11
12We can change do_thread() to always set ->exit_signal = SIGCHLD
13and remove this check to simplify the code.
14
15We could change setup_new_exec() instead, this looks more logical
16because it increments ->self_exec_id. But note that de_thread()
17already resets ->exit_signal if it changes the leader, let's keep
18both changes close to each other.
19
20Note that we change ->exit_signal lockless, this changes the rules.
21Thereafter ->exit_signal is not stable under tasklist but this is
22fine, the only possible change is OLDSIG -> SIGCHLD. This can race
23with eligible_child() but the race is harmless. We can race with
24reparent_leader() which changes our ->exit_signal in parallel, but
25it does the same change to SIGCHLD.
26
27The noticeable user-visible change is that the execing task is not
28"visible" to do_wait()->eligible_child(__WCLONE) right after exec.
29To me this looks more logical, and this is consistent with mt case.
30
31Signed-off-by: Oleg Nesterov <oleg@redhat.com>
32Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
33Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
34---
35 fs/exec.c | 3 +++
36 kernel/exit.c | 7 +------
37 2 files changed, 4 insertions(+), 6 deletions(-)
38
39diff --git a/fs/exec.c b/fs/exec.c
40index 3625464..160cd2f 100644
41--- a/fs/exec.c
42+++ b/fs/exec.c
43@@ -973,6 +973,9 @@ static int de_thread(struct task_struct *tsk)
44 sig->notify_count = 0;
45
46 no_thread_group:
47+ /* we have changed execution domain */
48+ tsk->exit_signal = SIGCHLD;
49+
50 if (current->mm)
51 setmax_mm_hiwater_rss(&sig->maxrss, current->mm);
52
53diff --git a/kernel/exit.c b/kernel/exit.c
54index e6e01b9..ab66cb0 100644
55--- a/kernel/exit.c
56+++ b/kernel/exit.c
57@@ -828,14 +828,9 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
58 * If the parent exec id doesn't match the exec id we saved
59 * when we started then we know the parent has changed security
60 * domain.
61- *
62- * If our self_exec id doesn't match our parent_exec_id then
63- * we have changed execution domain as these two values started
64- * the same after a fork.
65 */
66 if (thread_group_leader(tsk) && tsk->exit_signal != SIGCHLD &&
67- (tsk->parent_exec_id != tsk->real_parent->self_exec_id ||
68- tsk->self_exec_id != tsk->parent_exec_id))
69+ tsk->parent_exec_id != tsk->real_parent->self_exec_id)
70 tsk->exit_signal = SIGCHLD;
71
72 if (unlikely(tsk->ptrace)) {
73--
741.7.7.6
75
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0162-exit_signal-fix-the-parent-has-changed-security-doma.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0162-exit_signal-fix-the-parent-has-changed-security-doma.patch
new file mode 100644
index 00000000..29429647
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0162-exit_signal-fix-the-parent-has-changed-security-doma.patch
@@ -0,0 +1,77 @@
1From a24587831e14c94ca7bc3d947ecea53269b37d96 Mon Sep 17 00:00:00 2001
2From: Oleg Nesterov <oleg@redhat.com>
3Date: Mon, 19 Mar 2012 17:03:41 +0100
4Subject: [PATCH 162/165] exit_signal: fix the "parent has changed security
5 domain" logic
6
7commit b6e238dceed36891cc633167afe7151f1f3d83c5 upstream.
8
9exit_notify() changes ->exit_signal if the parent already did exec.
10This doesn't really work, we are not going to send the signal now
11if there is another live thread or the exiting task is traced. The
12parent can exec before the last dies or the tracer detaches.
13
14Move this check into do_notify_parent() which actually sends the
15signal.
16
17The user-visible change is that we do not change ->exit_signal,
18and thus the exiting task is still "clone children" for
19do_wait()->eligible_child(__WCLONE). Hopefully this is fine, the
20current logic is racy anyway.
21
22Signed-off-by: Oleg Nesterov <oleg@redhat.com>
23Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 kernel/exit.c | 14 --------------
27 kernel/signal.c | 9 +++++++++
28 2 files changed, 9 insertions(+), 14 deletions(-)
29
30diff --git a/kernel/exit.c b/kernel/exit.c
31index ab66cb0..5a8a66e 100644
32--- a/kernel/exit.c
33+++ b/kernel/exit.c
34@@ -819,20 +819,6 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
35 if (group_dead)
36 kill_orphaned_pgrp(tsk->group_leader, NULL);
37
38- /* Let father know we died
39- *
40- * Thread signals are configurable, but you aren't going to use
41- * that to send signals to arbitrary processes.
42- * That stops right now.
43- *
44- * If the parent exec id doesn't match the exec id we saved
45- * when we started then we know the parent has changed security
46- * domain.
47- */
48- if (thread_group_leader(tsk) && tsk->exit_signal != SIGCHLD &&
49- tsk->parent_exec_id != tsk->real_parent->self_exec_id)
50- tsk->exit_signal = SIGCHLD;
51-
52 if (unlikely(tsk->ptrace)) {
53 int sig = thread_group_leader(tsk) &&
54 thread_group_empty(tsk) &&
55diff --git a/kernel/signal.c b/kernel/signal.c
56index 2065515..08e0b97 100644
57--- a/kernel/signal.c
58+++ b/kernel/signal.c
59@@ -1610,6 +1610,15 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
60 BUG_ON(!tsk->ptrace &&
61 (tsk->group_leader != tsk || !thread_group_empty(tsk)));
62
63+ if (sig != SIGCHLD) {
64+ /*
65+ * This is only possible if parent == real_parent.
66+ * Check if it has changed security domain.
67+ */
68+ if (tsk->parent_exec_id != tsk->parent->self_exec_id)
69+ sig = SIGCHLD;
70+ }
71+
72 info.si_signo = sig;
73 info.si_errno = 0;
74 /*
75--
761.7.7.6
77
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0163-staging-r8712u-Fix-regression-caused-by-commit-8c213.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0163-staging-r8712u-Fix-regression-caused-by-commit-8c213.patch
new file mode 100644
index 00000000..de44b794
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0163-staging-r8712u-Fix-regression-caused-by-commit-8c213.patch
@@ -0,0 +1,66 @@
1From 2bf1f9816fc88b740d28781d6aa902daa3e4d6b1 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Sat, 25 Feb 2012 18:10:21 -0600
4Subject: [PATCH 163/165] staging: r8712u: Fix regression caused by commit
5 8c213fa
6
7commit 2080913e017ab9f88379d93fd09546ad95faf87b upstream.
8
9In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading",
10the command to release the firmware was placed in the wrong routine.
11
12In combination with the bug introduced in commit a5ee652 "staging: r8712u:
13Interface-state not fully tracked", the driver attempts to upload firmware
14that had already been released. This bug is the source of one of the
15problems in https://bugs.archlinux.org/task/27996#comment89833.
16
17Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com>
18Tested-by: Adrian <agib@gmx.de>
19Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/staging/rtl8712/os_intfs.c | 3 ---
24 drivers/staging/rtl8712/usb_intf.c | 5 +++++
25 2 files changed, 5 insertions(+), 3 deletions(-)
26
27diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
28index fb11743..4bb2797 100644
29--- a/drivers/staging/rtl8712/os_intfs.c
30+++ b/drivers/staging/rtl8712/os_intfs.c
31@@ -476,9 +476,6 @@ static int netdev_close(struct net_device *pnetdev)
32 r8712_free_assoc_resources(padapter);
33 /*s2-4.*/
34 r8712_free_network_queue(padapter);
35- release_firmware(padapter->fw);
36- /* never exit with a firmware callback pending */
37- wait_for_completion(&padapter->rtl8712_fw_ready);
38 return 0;
39 }
40
41diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c
42index 9bade18..ec41d38 100644
43--- a/drivers/staging/rtl8712/usb_intf.c
44+++ b/drivers/staging/rtl8712/usb_intf.c
45@@ -30,6 +30,7 @@
46
47 #include <linux/usb.h>
48 #include <linux/module.h>
49+#include <linux/firmware.h>
50
51 #include "osdep_service.h"
52 #include "drv_types.h"
53@@ -621,6 +622,10 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
54 struct _adapter *padapter = netdev_priv(pnetdev);
55 struct usb_device *udev = interface_to_usbdev(pusb_intf);
56
57+ if (padapter->fw_found)
58+ release_firmware(padapter->fw);
59+ /* never exit with a firmware callback pending */
60+ wait_for_completion(&padapter->rtl8712_fw_ready);
61 usb_set_intfdata(pusb_intf, NULL);
62 if (padapter) {
63 if (drvpriv.drv_registered == true)
64--
651.7.7.6
66
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0164-smsc95xx-mark-link-down-on-startup-and-let-PHY-inter.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0164-smsc95xx-mark-link-down-on-startup-and-let-PHY-inter.patch
new file mode 100644
index 00000000..01c337de
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0164-smsc95xx-mark-link-down-on-startup-and-let-PHY-inter.patch
@@ -0,0 +1,46 @@
1From 0f1ae32284c0946f9ea7acabb3177ac20b22b9e5 Mon Sep 17 00:00:00 2001
2From: Paolo Pisati <paolo.pisati@canonical.com>
3Date: Mon, 23 Apr 2012 04:05:20 +0000
4Subject: [PATCH 164/165] smsc95xx: mark link down on startup and let PHY
5 interrupt deal with carrier changes
6
7commit 07d69d4238418746a7b85c5d05ec17c658a2a390 upstream.
8
9Without this patch sysfs reports the cable as present
10
11flag@flag-desktop:~$ cat /sys/class/net/eth0/carrier
121
13
14while it's not:
15
16flag@flag-desktop:~$ sudo mii-tool eth0
17eth0: no link
18
19Tested on my Beagle XM.
20
21v2: added mantainer to the list of recipient
22
23Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
24Acked-by: Steve Glendinning <steve.glendinning@shawell.net>
25Signed-off-by: David S. Miller <davem@davemloft.net>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 drivers/net/usb/smsc95xx.c | 2 +-
29 1 files changed, 1 insertions(+), 1 deletions(-)
30
31diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
32index eff6767..55b3218 100644
33--- a/drivers/net/usb/smsc95xx.c
34+++ b/drivers/net/usb/smsc95xx.c
35@@ -1190,7 +1190,7 @@ static const struct driver_info smsc95xx_info = {
36 .rx_fixup = smsc95xx_rx_fixup,
37 .tx_fixup = smsc95xx_tx_fixup,
38 .status = smsc95xx_status,
39- .flags = FLAG_ETHER | FLAG_SEND_ZLP,
40+ .flags = FLAG_ETHER | FLAG_SEND_ZLP | FLAG_LINK_INTR,
41 };
42
43 static const struct usb_device_id products[] = {
44--
451.7.7.6
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0165-Linux-3.2.17.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0165-Linux-3.2.17.patch
new file mode 100644
index 00000000..2cb7e1c8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0165-Linux-3.2.17.patch
@@ -0,0 +1,24 @@
1From 4780abf2e3c25a099dd269b676d9696763f3eed6 Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Fri, 11 May 2012 13:15:38 +0100
4Subject: [PATCH 165/165] Linux 3.2.17
5
6---
7 Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index 3da29cb..4c4efa3 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,6 +1,6 @@
15 VERSION = 3
16 PATCHLEVEL = 2
17-SUBLEVEL = 16
18+SUBLEVEL = 17
19 EXTRAVERSION =
20 NAME = Saber-toothed Squirrel
21
22--
231.7.7.6
24
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch
new file mode 100644
index 00000000..444cb567
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch
@@ -0,0 +1,35 @@
1From 94383ff64ebeaa09055462cb48260eb2831235ef Mon Sep 17 00:00:00 2001
2From: Axel Lin <axel.lin@gmail.com>
3Date: Wed, 11 Apr 2012 20:53:58 +0800
4Subject: [PATCH 01/56] regulator: Fix the logic to ensure new voltage setting
5 in valid range
6
7commit f55205f4d4a8823a11bb8b37ef2ecbd78fb09463 upstream.
8
9I think this is a typo.
10To ensure new voltage setting won't greater than desc->max,
11the equation should be desc->min + desc->step * new_val <= desc->max.
12
13Signed-off-by: Axel Lin <axel.lin@gmail.com>
14Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/regulator/max8997.c | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
21index 6176129..8cba82d 100644
22--- a/drivers/regulator/max8997.c
23+++ b/drivers/regulator/max8997.c
24@@ -689,7 +689,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev,
25 }
26
27 new_val++;
28- } while (desc->min + desc->step + new_val <= desc->max);
29+ } while (desc->min + desc->step * new_val <= desc->max);
30
31 new_idx = tmp_idx;
32 new_val = tmp_val;
33--
341.7.7.6
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch
new file mode 100644
index 00000000..eb9eb3c7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch
@@ -0,0 +1,52 @@
1From c0d0663f26ba8ed987704a454a360b1a5997e1d7 Mon Sep 17 00:00:00 2001
2From: Archit Taneja <archit@ti.com>
3Date: Thu, 19 Apr 2012 17:39:16 +0530
4Subject: [PATCH 02/56] ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY
5 register fields"
6
7commit 08ca7444f589bedf9ad5d82883e5d0754852d73b upstream.
8
9This reverts commit 46f8c3c7e95c0d30d95911e7975ddc4f93b3e237.
10
11The commit above swapped the DSI1_PPID and DSI2_PPID register fields in
12CONTROL_DSIPHY to be in sync with the newer public OMAP TRMs(after version V).
13
14With this commit, contention errors were reported on DSI lanes some OMAP4 SDPs.
15After probing the DSI lanes on OMAP4 SDP, it was seen that setting bits in the
16DSI2_PPID field was pulling up voltage on DSI1 lanes, and DSI1_PPID field was
17pulling up voltage on DSI2 lanes.
18
19This proves that the current version of OMAP4 TRM is incorrect, swap the
20position of register fields according to the older TRM versions as they were
21correct.
22
23Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
24Signed-off-by: Archit Taneja <archit@ti.com>
25Signed-off-by: Tony Lindgren <tony@atomide.com>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 .../include/mach/ctrl_module_pad_core_44xx.h | 8 ++++----
29 1 files changed, 4 insertions(+), 4 deletions(-)
30
31diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h
32index 1e2d332..c88420d 100644
33--- a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h
34+++ b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h
35@@ -941,10 +941,10 @@
36 #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29)
37 #define OMAP4_DSI1_LANEENABLE_SHIFT 24
38 #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24)
39-#define OMAP4_DSI2_PIPD_SHIFT 19
40-#define OMAP4_DSI2_PIPD_MASK (0x1f << 19)
41-#define OMAP4_DSI1_PIPD_SHIFT 14
42-#define OMAP4_DSI1_PIPD_MASK (0x1f << 14)
43+#define OMAP4_DSI1_PIPD_SHIFT 19
44+#define OMAP4_DSI1_PIPD_MASK (0x1f << 19)
45+#define OMAP4_DSI2_PIPD_SHIFT 14
46+#define OMAP4_DSI2_PIPD_MASK (0x1f << 14)
47
48 /* CONTROL_MCBSPLP */
49 #define OMAP4_ALBCTRLRX_FSX_SHIFT 31
50--
511.7.7.6
52
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch
new file mode 100644
index 00000000..3e8bed3a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch
@@ -0,0 +1,46 @@
1From d88c1668a535d2abb3d201b8a521e46eff3f5e0e Mon Sep 17 00:00:00 2001
2From: Mark Hills <mark@pogo.org.uk>
3Date: Mon, 30 Apr 2012 19:39:22 +0100
4Subject: [PATCH 03/56] ALSA: echoaudio: Remove incorrect part of assertion
5
6commit c914f55f7cdfafe9d7d5b248751902c7ab57691e upstream.
7
8This assertion seems to imply that chip->dsp_code_to_load is a pointer.
9It's actually an integer handle on the actual firmware, and 0 has no
10special meaning.
11
12The assertion prevents initialisation of a Darla20 card, but would also
13affect other models. It seems it was introduced in commit dd7b254d.
14
15ALSA sound/pci/echoaudio/echoaudio.c:2061 Echoaudio driver starting...
16ALSA sound/pci/echoaudio/echoaudio.c:1969 chip=ebe4e000
17ALSA sound/pci/echoaudio/echoaudio.c:2007 pci=ed568000 irq=19 subdev=0010 Init hardware...
18ALSA sound/pci/echoaudio/darla20_dsp.c:36 init_hw() - Darla20
19------------[ cut here ]------------
20WARNING: at sound/pci/echoaudio/echoaudio_dsp.c:478 init_hw+0x1d1/0x86c [snd_darla20]()
21Hardware name: Dell DM051
22BUG? (!chip->dsp_code_to_load || !chip->comm_page)
23
24Signed-off-by: Mark Hills <mark@pogo.org.uk>
25Signed-off-by: Takashi Iwai <tiwai@suse.de>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 sound/pci/echoaudio/echoaudio_dsp.c | 2 +-
29 1 files changed, 1 insertions(+), 1 deletions(-)
30
31diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c
32index 64417a7..d8c670c 100644
33--- a/sound/pci/echoaudio/echoaudio_dsp.c
34+++ b/sound/pci/echoaudio/echoaudio_dsp.c
35@@ -475,7 +475,7 @@ static int load_firmware(struct echoaudio *chip)
36 const struct firmware *fw;
37 int box_type, err;
38
39- if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page))
40+ if (snd_BUG_ON(!chip->comm_page))
41 return -EPERM;
42
43 /* See if the ASIC is present and working - only if the DSP is already loaded */
44--
451.7.7.6
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch
new file mode 100644
index 00000000..da89cfa8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch
@@ -0,0 +1,41 @@
1From 900f27b9d47023edb709aad271b5d7516bb7c990 Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Sun, 8 Apr 2012 05:18:53 +0100
4Subject: [PATCH 04/56] ARM: orion5x: Fix GPIO enable bits for MPP9
5
6commit 48d99f47a81a66bdd61a348c7fe8df5a7afdf5f3 upstream.
7
8Commit 554cdaefd1cf7bb54b209c4e68c7cec87ce442a9 ('ARM: orion5x: Refactor
9mpp code to use common orion platform mpp.') seems to have accidentally
10inverted the GPIO valid bits for MPP9 (only). For the mv2120 platform
11which uses MPP9 as a GPIO LED device, this results in the error:
12
13[ 12.711476] leds-gpio: probe of leds-gpio failed with error -22
14
15Reported-by: Henry von Tresckow <hvontres@gmail.com>
16References: http://bugs.debian.org/667446
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18Tested-by: Hans Henry von Tresckow <hvontres@gmail.com>
19Signed-off-by: Jason Cooper <jason@lakedaemon.net>
20---
21 arch/arm/mach-orion5x/mpp.h | 4 ++--
22 1 files changed, 2 insertions(+), 2 deletions(-)
23
24diff --git a/arch/arm/mach-orion5x/mpp.h b/arch/arm/mach-orion5x/mpp.h
25index eac6897..db70e79 100644
26--- a/arch/arm/mach-orion5x/mpp.h
27+++ b/arch/arm/mach-orion5x/mpp.h
28@@ -65,8 +65,8 @@
29 #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1)
30
31 #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1)
32-#define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1)
33-#define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1)
34+#define MPP9_GPIO MPP(9, 0x0, 1, 1, 1, 1, 1)
35+#define MPP9_GIGE MPP(9, 0x1, 0, 0, 1, 1, 1)
36
37 #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1)
38 #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1)
39--
401.7.7.6
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch
new file mode 100644
index 00000000..9cdf2a77
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch
@@ -0,0 +1,56 @@
1From 3c3471703a78272a055d786ba1474384494bb7fc Mon Sep 17 00:00:00 2001
2From: David Henningsson <david.henningsson@canonical.com>
3Date: Fri, 4 May 2012 11:05:55 +0200
4Subject: [PATCH 05/56] ALSA: HDA: Lessen CPU usage when waiting for chip to
5 respond
6
7commit 32cf4023e689ad5b3a81a749d8cc99d7f184cb99 upstream.
8
9When an IRQ for some reason gets lost, we wait up to a second using
10udelay, which is CPU intensive. This patch improves the situation by
11waiting about 30 ms in the CPU intensive mode, then stepping down to
12using msleep(2) instead. In essence, we trade some granularity in
13exchange for less CPU consumption when the waiting time is a bit longer.
14
15As a result, PulseAudio should no longer be killed by the kernel
16for taking up to much RT-prio CPU time. At least not for *this* reason.
17
18Signed-off-by: David Henningsson <david.henningsson@canonical.com>
19Tested-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
20Signed-off-by: Takashi Iwai <tiwai@suse.de>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 sound/pci/hda/hda_intel.c | 6 ++++--
24 1 files changed, 4 insertions(+), 2 deletions(-)
25
26diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
27index 192e6c0..53345bc 100644
28--- a/sound/pci/hda/hda_intel.c
29+++ b/sound/pci/hda/hda_intel.c
30@@ -769,11 +769,13 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
31 {
32 struct azx *chip = bus->private_data;
33 unsigned long timeout;
34+ unsigned long loopcounter;
35 int do_poll = 0;
36
37 again:
38 timeout = jiffies + msecs_to_jiffies(1000);
39- for (;;) {
40+
41+ for (loopcounter = 0;; loopcounter++) {
42 if (chip->polling_mode || do_poll) {
43 spin_lock_irq(&chip->reg_lock);
44 azx_update_rirb(chip);
45@@ -789,7 +791,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
46 }
47 if (time_after(jiffies, timeout))
48 break;
49- if (bus->needs_damn_long_delay)
50+ if (bus->needs_damn_long_delay || loopcounter > 3000)
51 msleep(2); /* temporary workaround */
52 else {
53 udelay(10);
54--
551.7.7.6
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch
new file mode 100644
index 00000000..26c5bd45
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch
@@ -0,0 +1,57 @@
1From c49984f9b2cba3ae4eb6ac7056e45cde17629a20 Mon Sep 17 00:00:00 2001
2From: Tejun Heo <tj@kernel.org>
3Date: Fri, 27 Apr 2012 08:42:53 -0700
4Subject: [PATCH 06/56] percpu: pcpu_embed_first_chunk() should free unused
5 parts after all allocs are complete
6
7commit 42b64281453249dac52861f9b97d18552a7ec62b upstream.
8
9pcpu_embed_first_chunk() allocates memory for each node, copies percpu
10data and frees unused portions of it before proceeding to the next
11group. This assumes that allocations for different nodes doesn't
12overlap; however, depending on memory topology, the bootmem allocator
13may end up allocating memory from a different node than the requested
14one which may overlap with the portion freed from one of the previous
15percpu areas. This leads to percpu groups for different nodes
16overlapping which is a serious bug.
17
18This patch separates out copy & partial free from the allocation loop
19such that all allocations are complete before partial frees happen.
20
21This also fixes overlapping frees which could happen on allocation
22failure path - out_free_areas path frees whole groups but the groups
23could have portions freed at that point.
24
25Signed-off-by: Tejun Heo <tj@kernel.org>
26Reported-by: "Pavel V. Panteleev" <pp_84@mail.ru>
27Tested-by: "Pavel V. Panteleev" <pp_84@mail.ru>
28LKML-Reference: <E1SNhwY-0007ui-V7.pp_84-mail-ru@f220.mail.ru>
29Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
30---
31 mm/percpu.c | 10 ++++++++++
32 1 files changed, 10 insertions(+), 0 deletions(-)
33
34diff --git a/mm/percpu.c b/mm/percpu.c
35index 716eb4a..5c29750 100644
36--- a/mm/percpu.c
37+++ b/mm/percpu.c
38@@ -1642,6 +1642,16 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,
39 areas[group] = ptr;
40
41 base = min(ptr, base);
42+ }
43+
44+ /*
45+ * Copy data and free unused parts. This should happen after all
46+ * allocations are complete; otherwise, we may end up with
47+ * overlapping groups.
48+ */
49+ for (group = 0; group < ai->nr_groups; group++) {
50+ struct pcpu_group_info *gi = &ai->groups[group];
51+ void *ptr = areas[group];
52
53 for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) {
54 if (gi->cpu_map[i] == NR_CPUS) {
55--
561.7.7.6
57
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch
new file mode 100644
index 00000000..c7f28af9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch
@@ -0,0 +1,46 @@
1From 264ef98284920c3c4b7139ce642f41f9b253bc24 Mon Sep 17 00:00:00 2001
2From: Chris Metcalf <cmetcalf@tilera.com>
3Date: Thu, 10 May 2012 13:01:44 -0700
4Subject: [PATCH 07/56] hugetlb: prevent BUG_ON in hugetlb_fault() ->
5 hugetlb_cow()
6
7commit 4998a6c0edce7fae9c0a5463f6ec3fa585258ee7 upstream.
8
9Commit 66aebce747eaf ("hugetlb: fix race condition in hugetlb_fault()")
10added code to avoid a race condition by elevating the page refcount in
11hugetlb_fault() while calling hugetlb_cow().
12
13However, one code path in hugetlb_cow() includes an assertion that the
14page count is 1, whereas it may now also have the value 2 in this path.
15
16The consensus is that this BUG_ON has served its purpose, so rather than
17extending it to cover both cases, we just remove it.
18
19Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
20Acked-by: Mel Gorman <mel@csn.ul.ie>
21Acked-by: Hillf Danton <dhillf@gmail.com>
22Acked-by: Hugh Dickins <hughd@google.com>
23Cc: Michal Hocko <mhocko@suse.cz>
24Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
25Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
26Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
27Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
28---
29 mm/hugetlb.c | 1 -
30 1 files changed, 0 insertions(+), 1 deletions(-)
31
32diff --git a/mm/hugetlb.c b/mm/hugetlb.c
33index bd936ed..7120c2e 100644
34--- a/mm/hugetlb.c
35+++ b/mm/hugetlb.c
36@@ -2405,7 +2405,6 @@ retry_avoidcopy:
37 if (outside_reserve) {
38 BUG_ON(huge_pte_none(pte));
39 if (unmap_ref_private(mm, vma, old_page, address)) {
40- BUG_ON(page_count(old_page) != 1);
41 BUG_ON(huge_pte_none(pte));
42 spin_lock(&mm->page_table_lock);
43 goto retry_avoidcopy;
44--
451.7.7.6
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch
new file mode 100644
index 00000000..6810b965
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch
@@ -0,0 +1,49 @@
1From 524ae74866597ebc0894b12ce456d8a53f80f533 Mon Sep 17 00:00:00 2001
2From: Mike Galbraith <efault@gmx.de>
3Date: Thu, 10 May 2012 13:01:45 -0700
4Subject: [PATCH 08/56] namespaces, pid_ns: fix leakage on fork() failure
5
6commit 5e2bf0142231194d36fdc9596b36a261ed2b9fe7 upstream.
7
8Fork() failure post namespace creation for a child cloned with
9CLONE_NEWPID leaks pid_namespace/mnt_cache due to proc being mounted
10during creation, but not unmounted during cleanup. Call
11pid_ns_release_proc() during cleanup.
12
13Signed-off-by: Mike Galbraith <efault@gmx.de>
14Acked-by: Oleg Nesterov <oleg@redhat.com>
15Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
16Cc: Pavel Emelyanov <xemul@parallels.com>
17Cc: Cyrill Gorcunov <gorcunov@openvz.org>
18Cc: Louis Rilling <louis.rilling@kerlabs.com>
19Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
20Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 kernel/fork.c | 3 +++
24 1 files changed, 3 insertions(+), 0 deletions(-)
25
26diff --git a/kernel/fork.c b/kernel/fork.c
27index 0acf42c0..26f1ab0 100644
28--- a/kernel/fork.c
29+++ b/kernel/fork.c
30@@ -47,6 +47,7 @@
31 #include <linux/audit.h>
32 #include <linux/memcontrol.h>
33 #include <linux/ftrace.h>
34+#include <linux/proc_fs.h>
35 #include <linux/profile.h>
36 #include <linux/rmap.h>
37 #include <linux/ksm.h>
38@@ -1387,6 +1388,8 @@ bad_fork_cleanup_io:
39 if (p->io_context)
40 exit_io_context(p);
41 bad_fork_cleanup_namespaces:
42+ if (unlikely(clone_flags & CLONE_NEWPID))
43+ pid_ns_release_proc(p->nsproxy->pid_ns);
44 exit_task_namespaces(p);
45 bad_fork_cleanup_mm:
46 if (p->mm)
47--
481.7.7.6
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch
new file mode 100644
index 00000000..c6208ebc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch
@@ -0,0 +1,49 @@
1From 06ae235e974156cc9304c169f89bba4d6ea4f6e4 Mon Sep 17 00:00:00 2001
2From: Russ Anderson <rja@sgi.com>
3Date: Thu, 10 May 2012 13:01:46 -0700
4Subject: [PATCH 09/56] mm: nobootmem: fix sign extend problem in
5 __free_pages_memory()
6
7commit 6bc2e853c6b46a6041980d58200ad9b0a73a60ff upstream.
8
9Systems with 8 TBytes of memory or greater can hit a problem where only
10the the first 8 TB of memory shows up. This is due to "int i" being
11smaller than "unsigned long start_aligned", causing the high bits to be
12dropped.
13
14The fix is to change `i' to unsigned long to match start_aligned
15and end_aligned.
16
17Thanks to Jack Steiner for assistance tracking this down.
18
19Signed-off-by: Russ Anderson <rja@sgi.com>
20Cc: Jack Steiner <steiner@sgi.com>
21Cc: Johannes Weiner <hannes@cmpxchg.org>
22Cc: Tejun Heo <tj@kernel.org>
23Cc: David S. Miller <davem@davemloft.net>
24Cc: Yinghai Lu <yinghai@kernel.org>
25Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
26Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
27Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
29---
30 mm/nobootmem.c | 3 +--
31 1 files changed, 1 insertions(+), 2 deletions(-)
32
33diff --git a/mm/nobootmem.c b/mm/nobootmem.c
34index 7fa41b4..07c08c4 100644
35--- a/mm/nobootmem.c
36+++ b/mm/nobootmem.c
37@@ -83,8 +83,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size)
38
39 static void __init __free_pages_memory(unsigned long start, unsigned long end)
40 {
41- int i;
42- unsigned long start_aligned, end_aligned;
43+ unsigned long i, start_aligned, end_aligned;
44 int order = ilog2(BITS_PER_LONG);
45
46 start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1);
47--
481.7.7.6
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch
new file mode 100644
index 00000000..c08dcb32
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch
@@ -0,0 +1,45 @@
1From ccd532b836540eb1f0e1d9eee4a87b8403d729c1 Mon Sep 17 00:00:00 2001
2From: Ingo van Lil <inguin@gmx.de>
3Date: Mon, 23 Apr 2012 22:05:38 +0000
4Subject: [PATCH 10/56] asix: Fix tx transfer padding for full-speed USB
5
6[ Upstream commit 2a5809499e35b53a6044fd34e72b242688b7a862 ]
7
8The asix.c USB Ethernet driver avoids ending a tx transfer with a zero-
9length packet by appending a four-byte padding to transfers whose length
10is a multiple of maxpacket. However, the hard-coded 512 byte maxpacket
11length is valid for high-speed USB only; full-speed USB uses 64 byte
12packets.
13
14Signed-off-by: Ingo van Lil <inguin@gmx.de>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/net/usb/asix.c | 4 ++--
19 1 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
22index fda4be2..a9abee8 100644
23--- a/drivers/net/usb/asix.c
24+++ b/drivers/net/usb/asix.c
25@@ -403,7 +403,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
26 u32 packet_len;
27 u32 padbytes = 0xffff0000;
28
29- padlen = ((skb->len + 4) % 512) ? 0 : 4;
30+ padlen = ((skb->len + 4) & (dev->maxpacket - 1)) ? 0 : 4;
31
32 if ((!skb_cloned(skb)) &&
33 ((headroom + tailroom) >= (4 + padlen))) {
34@@ -425,7 +425,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
35 cpu_to_le32s(&packet_len);
36 skb_copy_to_linear_data(skb, &packet_len, sizeof(packet_len));
37
38- if ((skb->len % 512) == 0) {
39+ if (padlen) {
40 cpu_to_le32s(&padbytes);
41 memcpy(skb_tail_pointer(skb), &padbytes, sizeof(padbytes));
42 skb_put(skb, sizeof(padbytes));
43--
441.7.7.6
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0011-netem-fix-possible-skb-leak.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0011-netem-fix-possible-skb-leak.patch
new file mode 100644
index 00000000..d57c44c9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0011-netem-fix-possible-skb-leak.patch
@@ -0,0 +1,39 @@
1From abb480a271308924f4174413f6d6969ecaaba892 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <edumazet@google.com>
3Date: Sun, 29 Apr 2012 09:08:22 +0000
4Subject: [PATCH 11/56] netem: fix possible skb leak
5
6[ Upstream commit 116a0fc31c6c9b8fc821be5a96e5bf0b43260131 ]
7
8skb_checksum_help(skb) can return an error, we must free skb in this
9case. qdisc_drop(skb, sch) can also be feeded with a NULL skb (if
10skb_unshare() failed), so lets use this generic helper.
11
12Signed-off-by: Eric Dumazet <edumazet@google.com>
13Cc: Stephen Hemminger <shemminger@osdl.org>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 net/sched/sch_netem.c | 6 ++----
18 1 files changed, 2 insertions(+), 4 deletions(-)
19
20diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
21index 7801b15..a489d8b 100644
22--- a/net/sched/sch_netem.c
23+++ b/net/sched/sch_netem.c
24@@ -351,10 +351,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
25 if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) {
26 if (!(skb = skb_unshare(skb, GFP_ATOMIC)) ||
27 (skb->ip_summed == CHECKSUM_PARTIAL &&
28- skb_checksum_help(skb))) {
29- sch->qstats.drops++;
30- return NET_XMIT_DROP;
31- }
32+ skb_checksum_help(skb)))
33+ return qdisc_drop(skb, sch);
34
35 skb->data[net_random() % skb_headlen(skb)] ^= 1<<(net_random() % 8);
36 }
37--
381.7.7.6
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch
new file mode 100644
index 00000000..0c1ea209
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch
@@ -0,0 +1,64 @@
1From d2b1ac073ca1e2caabafe219d0d1f04f4a2d1467 Mon Sep 17 00:00:00 2001
2From: "Eric W. Biederman" <ebiederm@xmission.com>
3Date: Fri, 6 Apr 2012 15:33:35 +0000
4Subject: [PATCH 12/56] net: In unregister_netdevice_notifier unregister the
5 netdevices.
6
7[ Upstream commit 7d3d43dab4e978d8d9ad1acf8af15c9b1c4b0f0f ]
8
9We already synthesize events in register_netdevice_notifier and synthesizing
10events in unregister_netdevice_notifier allows to us remove the need for
11special case cleanup code.
12
13This change should be safe as it adds no new cases for existing callers
14of unregiser_netdevice_notifier to handle.
15
16Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 net/core/dev.c | 20 ++++++++++++++++++++
21 1 files changed, 20 insertions(+), 0 deletions(-)
22
23diff --git a/net/core/dev.c b/net/core/dev.c
24index cd5050e..61a7baa 100644
25--- a/net/core/dev.c
26+++ b/net/core/dev.c
27@@ -1421,14 +1421,34 @@ EXPORT_SYMBOL(register_netdevice_notifier);
28 * register_netdevice_notifier(). The notifier is unlinked into the
29 * kernel structures and may then be reused. A negative errno code
30 * is returned on a failure.
31+ *
32+ * After unregistering unregister and down device events are synthesized
33+ * for all devices on the device list to the removed notifier to remove
34+ * the need for special case cleanup code.
35 */
36
37 int unregister_netdevice_notifier(struct notifier_block *nb)
38 {
39+ struct net_device *dev;
40+ struct net *net;
41 int err;
42
43 rtnl_lock();
44 err = raw_notifier_chain_unregister(&netdev_chain, nb);
45+ if (err)
46+ goto unlock;
47+
48+ for_each_net(net) {
49+ for_each_netdev(net, dev) {
50+ if (dev->flags & IFF_UP) {
51+ nb->notifier_call(nb, NETDEV_GOING_DOWN, dev);
52+ nb->notifier_call(nb, NETDEV_DOWN, dev);
53+ }
54+ nb->notifier_call(nb, NETDEV_UNREGISTER, dev);
55+ nb->notifier_call(nb, NETDEV_UNREGISTER_BATCH, dev);
56+ }
57+ }
58+unlock:
59 rtnl_unlock();
60 return err;
61 }
62--
631.7.7.6
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch
new file mode 100644
index 00000000..199864f5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch
@@ -0,0 +1,47 @@
1From 1b3ded810906676f03b6eab986308b1cf5e6b135 Mon Sep 17 00:00:00 2001
2From: Sasha Levin <levinsasha928@gmail.com>
3Date: Wed, 2 May 2012 03:58:43 +0000
4Subject: [PATCH 13/56] net: l2tp: unlock socket lock before returning from
5 l2tp_ip_sendmsg
6
7[ Upstream commit 84768edbb2721637620b2d84501bb0d5aed603f1 ]
8
9l2tp_ip_sendmsg could return without releasing socket lock, making it all the
10way to userspace, and generating the following warning:
11
12[ 130.891594] ================================================
13[ 130.894569] [ BUG: lock held when returning to user space! ]
14[ 130.897257] 3.4.0-rc5-next-20120501-sasha #104 Tainted: G W
15[ 130.900336] ------------------------------------------------
16[ 130.902996] trinity/8384 is leaving the kernel with locks still held!
17[ 130.906106] 1 lock held by trinity/8384:
18[ 130.907924] #0: (sk_lock-AF_INET){+.+.+.}, at: [<ffffffff82b9503f>] l2tp_ip_sendmsg+0x2f/0x550
19
20Introduced by commit 2f16270 ("l2tp: Fix locking in l2tp_ip.c").
21
22Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
23Acked-by: Eric Dumazet <edumazet@google.com>
24Signed-off-by: David S. Miller <davem@davemloft.net>
25Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
26---
27 net/l2tp/l2tp_ip.c | 3 ++-
28 1 files changed, 2 insertions(+), 1 deletions(-)
29
30diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
31index 55670ec..2a2a3e7 100644
32--- a/net/l2tp/l2tp_ip.c
33+++ b/net/l2tp/l2tp_ip.c
34@@ -441,8 +441,9 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m
35
36 daddr = lip->l2tp_addr.s_addr;
37 } else {
38+ rc = -EDESTADDRREQ;
39 if (sk->sk_state != TCP_ESTABLISHED)
40- return -EDESTADDRREQ;
41+ goto out;
42
43 daddr = inet->inet_daddr;
44 connected = 1;
45--
461.7.7.6
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch
new file mode 100644
index 00000000..55d6ef9c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch
@@ -0,0 +1,38 @@
1From 040442d719f91dcb002eaa1efaffbebd2fd44328 Mon Sep 17 00:00:00 2001
2From: stephen hemminger <shemminger@vyatta.com>
3Date: Mon, 30 Apr 2012 05:49:45 +0000
4Subject: [PATCH 14/56] sky2: propogate rx hash when packet is copied
5
6[ Upstream commit 3f42941b5d1d13542b1a755a9e4f633aa72e4d3e ]
7
8When a small packet is received, the driver copies it to a new skb to allow
9reusing the full size Rx buffer. The copy was propogating the checksum offload
10but not the receive hash information. The bug is impact was mostly harmless
11and therefore not observed until reviewing this area of code.
12
13Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/net/ethernet/marvell/sky2.c | 3 +++
18 1 files changed, 3 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
21index 7eb8a00..e1f4b65 100644
22--- a/drivers/net/ethernet/marvell/sky2.c
23+++ b/drivers/net/ethernet/marvell/sky2.c
24@@ -2475,8 +2475,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2,
25 skb_copy_from_linear_data(re->skb, skb->data, length);
26 skb->ip_summed = re->skb->ip_summed;
27 skb->csum = re->skb->csum;
28+ skb->rxhash = re->skb->rxhash;
29+
30 pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
31 length, PCI_DMA_FROMDEVICE);
32+ re->skb->rxhash = 0;
33 re->skb->ip_summed = CHECKSUM_NONE;
34 skb_put(skb, length);
35 }
36--
371.7.7.6
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch
new file mode 100644
index 00000000..ba0888dc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch
@@ -0,0 +1,136 @@
1From 27f7b26b133f97629f82ce156d481a32a881472b Mon Sep 17 00:00:00 2001
2From: stephen hemminger <shemminger@vyatta.com>
3Date: Mon, 30 Apr 2012 06:47:37 +0000
4Subject: [PATCH 15/56] sky2: fix receive length error in mixed non-VLAN/VLAN
5 traffic
6
7[ Upstream commit e072b3fad5f3915102c94628b4971f52ff99dd05 ]
8
9Bug: The VLAN bit of the MAC RX Status Word is unreliable in several older
10supported chips. Sometimes the VLAN bit is not set for valid VLAN packets
11and also sometimes the VLAN bit is set for non-VLAN packets that came after
12a VLAN packet. This results in a receive length error when VLAN hardware
13tagging is enabled.
14
15Fix: Variation on original fix proposed by Mirko.
16The VLAN information is decoded in the status loop, and can be
17applied to the received SKB there. This eliminates the need for the
18separate tag field in the interface data structure. The tag has to
19be copied and cleared if packet is copied. This version checked out
20with vlan and normal traffic.
21
22Note: vlan_tx_tag_present should be renamed vlan_tag_present, but that
23is outside scope of this.
24
25Reported-by: Mirko Lindner <mlindner@marvell.com>
26Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
27Signed-off-by: David S. Miller <davem@davemloft.net>
28Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
29---
30 drivers/net/ethernet/marvell/sky2.c | 28 +++++++++++++++++-----------
31 drivers/net/ethernet/marvell/sky2.h | 1 -
32 2 files changed, 17 insertions(+), 12 deletions(-)
33
34diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
35index e1f4b65..65c51ff 100644
36--- a/drivers/net/ethernet/marvell/sky2.c
37+++ b/drivers/net/ethernet/marvell/sky2.c
38@@ -2476,9 +2476,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2,
39 skb->ip_summed = re->skb->ip_summed;
40 skb->csum = re->skb->csum;
41 skb->rxhash = re->skb->rxhash;
42+ skb->vlan_tci = re->skb->vlan_tci;
43
44 pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
45 length, PCI_DMA_FROMDEVICE);
46+ re->skb->vlan_tci = 0;
47 re->skb->rxhash = 0;
48 re->skb->ip_summed = CHECKSUM_NONE;
49 skb_put(skb, length);
50@@ -2564,9 +2566,6 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
51 struct sk_buff *skb = NULL;
52 u16 count = (status & GMR_FS_LEN) >> 16;
53
54- if (status & GMR_FS_VLAN)
55- count -= VLAN_HLEN; /* Account for vlan tag */
56-
57 netif_printk(sky2, rx_status, KERN_DEBUG, dev,
58 "rx slot %u status 0x%x len %d\n",
59 sky2->rx_next, status, length);
60@@ -2574,6 +2573,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
61 sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending;
62 prefetch(sky2->rx_ring + sky2->rx_next);
63
64+ if (vlan_tx_tag_present(re->skb))
65+ count -= VLAN_HLEN; /* Account for vlan tag */
66+
67 /* This chip has hardware problems that generates bogus status.
68 * So do only marginal checking and expect higher level protocols
69 * to handle crap frames.
70@@ -2631,11 +2633,8 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
71 }
72
73 static inline void sky2_skb_rx(const struct sky2_port *sky2,
74- u32 status, struct sk_buff *skb)
75+ struct sk_buff *skb)
76 {
77- if (status & GMR_FS_VLAN)
78- __vlan_hwaccel_put_tag(skb, be16_to_cpu(sky2->rx_tag));
79-
80 if (skb->ip_summed == CHECKSUM_NONE)
81 netif_receive_skb(skb);
82 else
83@@ -2689,6 +2688,14 @@ static void sky2_rx_checksum(struct sky2_port *sky2, u32 status)
84 }
85 }
86
87+static void sky2_rx_tag(struct sky2_port *sky2, u16 length)
88+{
89+ struct sk_buff *skb;
90+
91+ skb = sky2->rx_ring[sky2->rx_next].skb;
92+ __vlan_hwaccel_put_tag(skb, be16_to_cpu(length));
93+}
94+
95 static void sky2_rx_hash(struct sky2_port *sky2, u32 status)
96 {
97 struct sk_buff *skb;
98@@ -2747,8 +2754,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
99 }
100
101 skb->protocol = eth_type_trans(skb, dev);
102-
103- sky2_skb_rx(sky2, status, skb);
104+ sky2_skb_rx(sky2, skb);
105
106 /* Stop after net poll weight */
107 if (++work_done >= to_do)
108@@ -2756,11 +2762,11 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
109 break;
110
111 case OP_RXVLAN:
112- sky2->rx_tag = length;
113+ sky2_rx_tag(sky2, length);
114 break;
115
116 case OP_RXCHKSVLAN:
117- sky2->rx_tag = length;
118+ sky2_rx_tag(sky2, length);
119 /* fall through */
120 case OP_RXCHKS:
121 if (likely(dev->features & NETIF_F_RXCSUM))
122diff --git a/drivers/net/ethernet/marvell/sky2.h b/drivers/net/ethernet/marvell/sky2.h
123index ff6f58b..3c896ce 100644
124--- a/drivers/net/ethernet/marvell/sky2.h
125+++ b/drivers/net/ethernet/marvell/sky2.h
126@@ -2241,7 +2241,6 @@ struct sky2_port {
127 u16 rx_pending;
128 u16 rx_data_size;
129 u16 rx_nfrags;
130- u16 rx_tag;
131
132 struct {
133 unsigned long last;
134--
1351.7.7.6
136
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0016-sungem-Fix-WakeOnLan.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0016-sungem-Fix-WakeOnLan.patch
new file mode 100644
index 00000000..f750148b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0016-sungem-Fix-WakeOnLan.patch
@@ -0,0 +1,35 @@
1From 4fb3cd4329db7cba66335fe4d74f5234030cf1a9 Mon Sep 17 00:00:00 2001
2From: Gerard Lledo <gerard.lledo@gmail.com>
3Date: Sat, 28 Apr 2012 08:52:37 +0000
4Subject: [PATCH 16/56] sungem: Fix WakeOnLan
5
6[ Upstream commit 5a8887d39e1ba5ee2d4ccb94b14d6f2dce5ddfca ]
7
8WakeOnLan was broken in this driver because gp->asleep_wol is a 1-bit
9bitfield and it was being assigned WAKE_MAGIC, which is (1 << 5).
10gp->asleep_wol remains 0 and the machine never wakes up. Fixed by casting
11gp->wake_on_lan to bool. Tested on an iBook G4.
12
13Signed-off-by: Gerard Lledo <gerard.lledo@gmail.com>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/net/ethernet/sun/sungem.c | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c
21index ceab215..c508d6a 100644
22--- a/drivers/net/ethernet/sun/sungem.c
23+++ b/drivers/net/ethernet/sun/sungem.c
24@@ -2340,7 +2340,7 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state)
25 netif_device_detach(dev);
26
27 /* Switch off chip, remember WOL setting */
28- gp->asleep_wol = gp->wake_on_lan;
29+ gp->asleep_wol = !!gp->wake_on_lan;
30 gem_do_stop(dev, gp->asleep_wol);
31
32 /* Unlock the network stack */
33--
341.7.7.6
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch
new file mode 100644
index 00000000..1fbe741a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch
@@ -0,0 +1,67 @@
1From ec9a6575908fa9558b613ace25ec0a9f5e1795ec Mon Sep 17 00:00:00 2001
2From: Matt Carlson <mcarlson@broadcom.com>
3Date: Tue, 24 Apr 2012 13:37:01 +0000
4Subject: [PATCH 17/56] tg3: Avoid panic from reserved statblk field access
5
6[ Upstream commit f891ea1634ce41f5f47ae40d8594809f4cd2ca66 ]
7
8When RSS is enabled, interrupt vector 0 does not receive any rx traffic.
9The rx producer index fields for vector 0's status block should be
10considered reserved in this case. This patch changes the code to
11respect these reserved fields, which avoids a kernel panic when these
12fields take on non-zero values.
13
14Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
15Signed-off-by: Michael Chan <mchan@broadcom.com>
16Signed-off-by: David S. Miller <davem@davemloft.net>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/net/ethernet/broadcom/tg3.c | 18 ++++++++++++++++--
20 1 files changed, 16 insertions(+), 2 deletions(-)
21
22diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
23index 3d55883..2dcac28 100644
24--- a/drivers/net/ethernet/broadcom/tg3.c
25+++ b/drivers/net/ethernet/broadcom/tg3.c
26@@ -879,8 +879,13 @@ static inline unsigned int tg3_has_work(struct tg3_napi *tnapi)
27 if (sblk->status & SD_STATUS_LINK_CHG)
28 work_exists = 1;
29 }
30- /* check for RX/TX work to do */
31- if (sblk->idx[0].tx_consumer != tnapi->tx_cons ||
32+
33+ /* check for TX work to do */
34+ if (sblk->idx[0].tx_consumer != tnapi->tx_cons)
35+ work_exists = 1;
36+
37+ /* check for RX work to do */
38+ if (tnapi->rx_rcb_prod_idx &&
39 *(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr)
40 work_exists = 1;
41
42@@ -5895,6 +5900,9 @@ static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget)
43 return work_done;
44 }
45
46+ if (!tnapi->rx_rcb_prod_idx)
47+ return work_done;
48+
49 /* run RX thread, within the bounds set by NAPI.
50 * All RX "locking" is done by ensuring outside
51 * code synchronizes with tg3->napi.poll()
52@@ -7448,6 +7456,12 @@ static int tg3_alloc_consistent(struct tg3 *tp)
53 */
54 switch (i) {
55 default:
56+ if (tg3_flag(tp, ENABLE_RSS)) {
57+ tnapi->rx_rcb_prod_idx = NULL;
58+ break;
59+ }
60+ /* Fall through */
61+ case 1:
62 tnapi->rx_rcb_prod_idx = &sblk->idx[0].rx_producer;
63 break;
64 case 2:
65--
661.7.7.6
67
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch
new file mode 100644
index 00000000..7e2818da
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch
@@ -0,0 +1,46 @@
1From 6b142c33b94fd1c35b6a19be0982ae408ce8d162 Mon Sep 17 00:00:00 2001
2From: Yuchung Cheng <ycheng@google.com>
3Date: Mon, 30 Apr 2012 06:00:18 +0000
4Subject: [PATCH 18/56] tcp: fix infinite cwnd in tcp_complete_cwr()
5
6[ Upstream commit 1cebce36d660c83bd1353e41f3e66abd4686f215 ]
7
8When the cwnd reduction is done, ssthresh may be infinite
9if TCP enters CWR via ECN or F-RTO. If cwnd is not undone, i.e.,
10undo_marker is set, tcp_complete_cwr() falsely set cwnd to the
11infinite ssthresh value. The correct operation is to keep cwnd
12intact because it has been updated in ECN or F-RTO.
13
14Signed-off-by: Yuchung Cheng <ycheng@google.com>
15Acked-by: Neal Cardwell <ncardwell@google.com>
16Signed-off-by: David S. Miller <davem@davemloft.net>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 net/ipv4/tcp_input.c | 9 ++++++---
20 1 files changed, 6 insertions(+), 3 deletions(-)
21
22diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
23index daedc07..db07c9e 100644
24--- a/net/ipv4/tcp_input.c
25+++ b/net/ipv4/tcp_input.c
26@@ -2868,11 +2868,14 @@ static inline void tcp_complete_cwr(struct sock *sk)
27
28 /* Do not moderate cwnd if it's already undone in cwr or recovery. */
29 if (tp->undo_marker) {
30- if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR)
31+ if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR) {
32 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh);
33- else /* PRR */
34+ tp->snd_cwnd_stamp = tcp_time_stamp;
35+ } else if (tp->snd_ssthresh < TCP_INFINITE_SSTHRESH) {
36+ /* PRR algorithm. */
37 tp->snd_cwnd = tp->snd_ssthresh;
38- tp->snd_cwnd_stamp = tcp_time_stamp;
39+ tp->snd_cwnd_stamp = tcp_time_stamp;
40+ }
41 }
42 tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR);
43 }
44--
451.7.7.6
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch
new file mode 100644
index 00000000..e0e1dda9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch
@@ -0,0 +1,124 @@
1From 98d841428279a8060b46cf13a1463ebbeca65b4a Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <edumazet@google.com>
3Date: Wed, 2 May 2012 02:28:41 +0000
4Subject: [PATCH 19/56] tcp: change tcp_adv_win_scale and tcp_rmem[2]
5
6[ Upstream commit b49960a05e32121d29316cfdf653894b88ac9190 ]
7
8tcp_adv_win_scale default value is 2, meaning we expect a good citizen
9skb to have skb->len / skb->truesize ratio of 75% (3/4)
10
11In 2.6 kernels we (mis)accounted for typical MSS=1460 frame :
121536 + 64 + 256 = 1856 'estimated truesize', and 1856 * 3/4 = 1392.
13So these skbs were considered as not bloated.
14
15With recent truesize fixes, a typical MSS=1460 frame truesize is now the
16more precise :
172048 + 256 = 2304. But 2304 * 3/4 = 1728.
18So these skb are not good citizen anymore, because 1460 < 1728
19
20(GRO can escape this problem because it build skbs with a too low
21truesize.)
22
23This also means tcp advertises a too optimistic window for a given
24allocated rcvspace : When receiving frames, sk_rmem_alloc can hit
25sk_rcvbuf limit and we call tcp_prune_queue()/tcp_collapse() too often,
26especially when application is slow to drain its receive queue or in
27case of losses (netperf is fast, scp is slow). This is a major latency
28source.
29
30We should adjust the len/truesize ratio to 50% instead of 75%
31
32This patch :
33
341) changes tcp_adv_win_scale default to 1 instead of 2
35
362) increase tcp_rmem[2] limit from 4MB to 6MB to take into account
37better truesize tracking and to allow autotuning tcp receive window to
38reach same value than before. Note that same amount of kernel memory is
39consumed compared to 2.6 kernels.
40
41Signed-off-by: Eric Dumazet <edumazet@google.com>
42Cc: Neal Cardwell <ncardwell@google.com>
43Cc: Tom Herbert <therbert@google.com>
44Cc: Yuchung Cheng <ycheng@google.com>
45Acked-by: Neal Cardwell <ncardwell@google.com>
46Signed-off-by: David S. Miller <davem@davemloft.net>
47Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
48---
49 Documentation/networking/ip-sysctl.txt | 4 ++--
50 net/ipv4/tcp.c | 9 +++++----
51 net/ipv4/tcp_input.c | 2 +-
52 3 files changed, 8 insertions(+), 7 deletions(-)
53
54diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
55index 589f2da..a4399f5 100644
56--- a/Documentation/networking/ip-sysctl.txt
57+++ b/Documentation/networking/ip-sysctl.txt
58@@ -137,7 +137,7 @@ tcp_adv_win_scale - INTEGER
59 (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale),
60 if it is <= 0.
61 Possible values are [-31, 31], inclusive.
62- Default: 2
63+ Default: 1
64
65 tcp_allowed_congestion_control - STRING
66 Show/set the congestion control choices available to non-privileged
67@@ -397,7 +397,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
68 net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables
69 automatic tuning of that socket's receive buffer size, in which
70 case this value is ignored.
71- Default: between 87380B and 4MB, depending on RAM size.
72+ Default: between 87380B and 6MB, depending on RAM size.
73
74 tcp_sack - BOOLEAN
75 Enable select acknowledgments (SACKS).
76diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
77index 7904db4..8f826b1 100644
78--- a/net/ipv4/tcp.c
79+++ b/net/ipv4/tcp.c
80@@ -3216,7 +3216,7 @@ void __init tcp_init(void)
81 {
82 struct sk_buff *skb = NULL;
83 unsigned long limit;
84- int i, max_share, cnt;
85+ int i, max_rshare, max_wshare, cnt;
86 unsigned long jiffy = jiffies;
87
88 BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb));
89@@ -3280,15 +3280,16 @@ void __init tcp_init(void)
90
91 /* Set per-socket limits to no more than 1/128 the pressure threshold */
92 limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);
93- max_share = min(4UL*1024*1024, limit);
94+ max_wshare = min(4UL*1024*1024, limit);
95+ max_rshare = min(6UL*1024*1024, limit);
96
97 sysctl_tcp_wmem[0] = SK_MEM_QUANTUM;
98 sysctl_tcp_wmem[1] = 16*1024;
99- sysctl_tcp_wmem[2] = max(64*1024, max_share);
100+ sysctl_tcp_wmem[2] = max(64*1024, max_wshare);
101
102 sysctl_tcp_rmem[0] = SK_MEM_QUANTUM;
103 sysctl_tcp_rmem[1] = 87380;
104- sysctl_tcp_rmem[2] = max(87380, max_share);
105+ sysctl_tcp_rmem[2] = max(87380, max_rshare);
106
107 printk(KERN_INFO "TCP: Hash tables configured "
108 "(established %u bind %u)\n",
109diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
110index db07c9e..9726927 100644
111--- a/net/ipv4/tcp_input.c
112+++ b/net/ipv4/tcp_input.c
113@@ -83,7 +83,7 @@ int sysctl_tcp_ecn __read_mostly = 2;
114 EXPORT_SYMBOL(sysctl_tcp_ecn);
115 int sysctl_tcp_dsack __read_mostly = 1;
116 int sysctl_tcp_app_win __read_mostly = 31;
117-int sysctl_tcp_adv_win_scale __read_mostly = 2;
118+int sysctl_tcp_adv_win_scale __read_mostly = 1;
119 EXPORT_SYMBOL(sysctl_tcp_adv_win_scale);
120
121 int sysctl_tcp_stdurg __read_mostly;
122--
1231.7.7.6
124
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch
new file mode 100644
index 00000000..92501a20
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch
@@ -0,0 +1,43 @@
1From 9edfb7d2fb5250828aabc9ad47708b56184fa010 Mon Sep 17 00:00:00 2001
2From: Jonathan Nieder <jrnieder@gmail.com>
3Date: Fri, 11 May 2012 19:35:33 -0500
4Subject: [PATCH 20/56] brcm80211: smac: pass missing argument to
5 'brcms_b_mute'
6
7[Not needed upstream --- this bug is specific to 3.2.y.]
8
9Commit c6c44893c864, which removes the flag argument from brcms_b_mute,
10is not part of 3.2.y, and we forgot to adjust a new call accordingly
11when applying commit badc4f07622f ("brcm80211: smac: resume transmit
12fifo upon receiving frames").
13
14 drivers/net/wireless/brcm80211/brcmsmac/main.c: In function 'brcms_c_recvctl':
15 drivers/net/wireless/brcm80211/brcmsmac/main.c:7882:4: error: too few arguments to function 'brcms_b_mute'
16 drivers/net/wireless/brcm80211/brcmsmac/main.c:2538:13: note: declared here
17
18Earlier build tests missed this because they didn't include this driver
19due to 'depends on BCMA=n'.
20
21Reported-by: Ben Hutchings <ben@decadent.org.uk>
22Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
23Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
24---
25 drivers/net/wireless/brcm80211/brcmsmac/main.c | 2 +-
26 1 files changed, 1 insertions(+), 1 deletions(-)
27
28diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
29index f98becc..833cbef 100644
30--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
31+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
32@@ -7879,7 +7879,7 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh,
33 if (wlc->hw->suspended_fifos) {
34 hdr = (struct ieee80211_hdr *)p->data;
35 if (ieee80211_is_beacon(hdr->frame_control))
36- brcms_b_mute(wlc->hw, false);
37+ brcms_b_mute(wlc->hw, false, 0);
38 }
39
40 memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status));
41--
421.7.7.6
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch
new file mode 100644
index 00000000..5b7769fb
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch
@@ -0,0 +1,43 @@
1From 78381ca9729f5c7508cc74701d29cc325f37c5b7 Mon Sep 17 00:00:00 2001
2From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
3Date: Mon, 2 Apr 2012 00:02:09 +0000
4Subject: [PATCH 21/56] phy:icplus:fix Auto Power Saving in
5 ip101a_config_init.
6
7[ Upstream commit b3300146aa8efc5d3937fd33f3cfdc580a3843bc ]
8
9This patch fixes Auto Power Saving configuration in ip101a_config_init
10which was broken as there is no phy register write followed after
11setting IP101A_APS_ON flag.
12
13This patch also fixes the return value of ip101a_config_init.
14
15Without this patch ip101a_config_init returns 2 which is not an error
16accroding to IS_ERR and the mac driver will continue accessing 2 as
17valid pointer to phy_dev resulting in memory fault.
18
19Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
22Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
23---
24 drivers/net/phy/icplus.c | 3 ++-
25 1 files changed, 2 insertions(+), 1 deletions(-)
26
27diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
28index c81f136..b142300 100644
29--- a/drivers/net/phy/icplus.c
30+++ b/drivers/net/phy/icplus.c
31@@ -150,7 +150,8 @@ static int ip101a_config_init(struct phy_device *phydev)
32 /* Enable Auto Power Saving mode */
33 c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
34 c |= IP101A_APS_ON;
35- return c;
36+
37+ return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c);
38 }
39
40 static int ip175c_read_status(struct phy_device *phydev)
41--
421.7.7.6
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch
new file mode 100644
index 00000000..edc0c916
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch
@@ -0,0 +1,74 @@
1From 28797e10f3879232042e0f636e6650a2b35912f6 Mon Sep 17 00:00:00 2001
2From: Jonathan Nieder <jrnieder@gmail.com>
3Date: Fri, 11 May 2012 04:20:20 -0500
4Subject: [PATCH 22/56] NFSv4: Revalidate uid/gid after open
5
6This is a shorter (and more appropriate for stable kernels) analog to
7the following upstream commit:
8
9commit 6926afd1925a54a13684ebe05987868890665e2b
10Author: Trond Myklebust <Trond.Myklebust@netapp.com>
11Date: Sat Jan 7 13:22:46 2012 -0500
12
13 NFSv4: Save the owner/group name string when doing open
14
15 ...so that we can do the uid/gid mapping outside the asynchronous RPC
16 context.
17 This fixes a bug in the current NFSv4 atomic open code where the client
18 isn't able to determine what the true uid/gid fields of the file are,
19 (because the asynchronous nature of the OPEN call denies it the ability
20 to do an upcall) and so fills them with default values, marking the
21 inode as needing revalidation.
22 Unfortunately, in some cases, the VFS will do some additional sanity
23 checks on the file, and may override the server's decision to allow
24 the open because it sees the wrong owner/group fields.
25
26 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
27
28Without this patch, logging into two different machines with home
29directories mounted over NFS4 and then running "vim" and typing ":q"
30in each reliably produces the following error on the second machine:
31
32 E137: Viminfo file is not writable: /users/system/rtheys/.viminfo
33
34This regression was introduced by 80e52aced138 ("NFSv4: Don't do
35idmapper upcalls for asynchronous RPC calls", merged during the 2.6.32
36cycle) --- after the OPEN call, .viminfo has the default values for
37st_uid and st_gid (0xfffffffe) cached because we do not want to let
38rpciod wait for an idmapper upcall to fill them in.
39
40The fix used in mainline is to save the owner and group as strings and
41perform the upcall in _nfs4_proc_open outside the rpciod context,
42which takes about 600 lines. For stable, we can do something similar
43with a one-liner: make open check for the stale fields and make a
44(synchronous) GETATTR call to fill them when needed.
45
46Trond dictated the patch, I typed it in, and Rik tested it.
47
48Addresses http://bugs.debian.org/659111 and
49 https://bugzilla.redhat.com/789298
50
51Reported-by: Rik Theys <Rik.Theys@esat.kuleuven.be>
52Explained-by: David Flyn <davidf@rd.bbc.co.uk>
53Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
54Tested-by: Rik Theys <Rik.Theys@esat.kuleuven.be>
55Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
56---
57 fs/nfs/nfs4proc.c | 1 +
58 1 files changed, 1 insertions(+), 0 deletions(-)
59
60diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
61index 51f6a40..bab7c58 100644
62--- a/fs/nfs/nfs4proc.c
63+++ b/fs/nfs/nfs4proc.c
64@@ -1802,6 +1802,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, fmode_t fmode
65 nfs_setattr_update_inode(state->inode, sattr);
66 nfs_post_op_update_inode(state->inode, opendata->o_res.f_attr);
67 }
68+ nfs_revalidate_inode(server, state->inode);
69 nfs4_opendata_put(opendata);
70 nfs4_put_state_owner(sp);
71 *res = state;
72--
731.7.7.6
74
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch
new file mode 100644
index 00000000..66d06014
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch
@@ -0,0 +1,70 @@
1From ca92b5c1f22073e079dae19162698441a231e36f Mon Sep 17 00:00:00 2001
2From: Nicholas Bellinger <nab@linux-iscsi.org>
3Date: Thu, 10 May 2012 22:05:49 -0700
4Subject: [PATCH 23/56] target: Drop incorrect se_lun_acl release for dynamic
5 -> explict ACL conversion
6
7commit cfebf8f42f47327fa54cf05c19b98f4bd5236a26 upstream.
8
9This patch removes some potentially problematic legacy code within
10core_clear_initiator_node_from_tpg() that was originally intended to
11release left over se_lun_acl setup during dynamic NodeACL+MappedLUN
12generate when running with TPG demo-mode operation.
13
14Since we now only ever expect to allocate and release se_lun_acl from
15within target_core_fabric_configfs.c:target_fabric_make_mappedlun() and
16target_fabric_drop_mappedlun() context respectively, this code for
17demo-mode release is incorrect and needs to be removed.
18
19Cc: Christoph Hellwig <hch@lst.de>
20Cc: Andy Grover <agrover@redhat.com>
21Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
22Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
23---
24 drivers/target/target_core_tpg.c | 22 ----------------------
25 1 files changed, 0 insertions(+), 22 deletions(-)
26
27diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
28index 8ddd133..d91fe44 100644
29--- a/drivers/target/target_core_tpg.c
30+++ b/drivers/target/target_core_tpg.c
31@@ -63,7 +63,6 @@ static void core_clear_initiator_node_from_tpg(
32 int i;
33 struct se_dev_entry *deve;
34 struct se_lun *lun;
35- struct se_lun_acl *acl, *acl_tmp;
36
37 spin_lock_irq(&nacl->device_list_lock);
38 for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) {
39@@ -84,28 +83,7 @@ static void core_clear_initiator_node_from_tpg(
40 core_update_device_list_for_node(lun, NULL, deve->mapped_lun,
41 TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0);
42
43- spin_lock(&lun->lun_acl_lock);
44- list_for_each_entry_safe(acl, acl_tmp,
45- &lun->lun_acl_list, lacl_list) {
46- if (!strcmp(acl->initiatorname, nacl->initiatorname) &&
47- (acl->mapped_lun == deve->mapped_lun))
48- break;
49- }
50-
51- if (!acl) {
52- pr_err("Unable to locate struct se_lun_acl for %s,"
53- " mapped_lun: %u\n", nacl->initiatorname,
54- deve->mapped_lun);
55- spin_unlock(&lun->lun_acl_lock);
56- spin_lock_irq(&nacl->device_list_lock);
57- continue;
58- }
59-
60- list_del(&acl->lacl_list);
61- spin_unlock(&lun->lun_acl_lock);
62-
63 spin_lock_irq(&nacl->device_list_lock);
64- kfree(acl);
65 }
66 spin_unlock_irq(&nacl->device_list_lock);
67 }
68--
691.7.7.6
70
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch
new file mode 100644
index 00000000..09a02df7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch
@@ -0,0 +1,34 @@
1From 10b936ceae2bf61d07542014bf9140f302810892 Mon Sep 17 00:00:00 2001
2From: Jonathan Corbet <corbet@lwn.net>
3Date: Fri, 20 Apr 2012 12:22:50 -0300
4Subject: [PATCH 24/56] marvell-cam: fix an ARM build error
5
6commit 9967232f1be5bab10c7b7a8dcf51ff5c3c1a6d77 upstream.
7
8One of the OLPC changes lost a little in its translation to mainline,
9leading to build errors on the ARM architecture. Remove the offending
10line, and all will be well.
11
12Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
13Signed-off-by: Jonathan Corbet <corbet@lwn.net>
14Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/media/video/marvell-ccic/mmp-driver.c | 1 -
18 1 files changed, 0 insertions(+), 1 deletions(-)
19
20diff --git a/drivers/media/video/marvell-ccic/mmp-driver.c b/drivers/media/video/marvell-ccic/mmp-driver.c
21index fb0b124..a6b7657 100644
22--- a/drivers/media/video/marvell-ccic/mmp-driver.c
23+++ b/drivers/media/video/marvell-ccic/mmp-driver.c
24@@ -175,7 +175,6 @@ static int mmpcam_probe(struct platform_device *pdev)
25 INIT_LIST_HEAD(&cam->devlist);
26
27 mcam = &cam->mcam;
28- mcam->platform = MHP_Armada610;
29 mcam->plat_power_up = mmpcam_power_up;
30 mcam->plat_power_down = mmpcam_power_down;
31 mcam->dev = &pdev->dev;
32--
331.7.7.6
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0025-rc-Postpone-ISR-registration.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0025-rc-Postpone-ISR-registration.patch
new file mode 100644
index 00000000..501e7d8a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0025-rc-Postpone-ISR-registration.patch
@@ -0,0 +1,325 @@
1From 51e9e3cdf5aa99d1bda7d03d213cc4dc0766c7ed Mon Sep 17 00:00:00 2001
2From: Luis Henriques <luis.henriques@canonical.com>
3Date: Sat, 21 Apr 2012 12:25:21 -0300
4Subject: [PATCH 25/56] rc: Postpone ISR registration
5
6commit 9ef449c6b31bb6a8e6dedc24de475a3b8c79be20 upstream.
7
8An early registration of an ISR was causing a crash to several users (for
9example, with the ite-cir driver: http://bugs.launchpad.net/bugs/972723).
10The reason was that IRQs were being triggered before a driver
11initialisation was completed.
12
13This patch fixes this by moving the invocation to request_irq() and to
14request_region() to a later stage on the driver probe function.
15
16Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
17Acked-by: Jarod Wilson <jarod@redhat.com>
18Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 drivers/media/rc/ene_ir.c | 32 ++++++++--------
22 drivers/media/rc/fintek-cir.c | 20 +++++-----
23 drivers/media/rc/ite-cir.c | 20 +++++-----
24 drivers/media/rc/nuvoton-cir.c | 36 +++++++++---------
25 drivers/media/rc/winbond-cir.c | 78 ++++++++++++++++++++--------------------
26 5 files changed, 93 insertions(+), 93 deletions(-)
27
28diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
29index 860c112..bef5296 100644
30--- a/drivers/media/rc/ene_ir.c
31+++ b/drivers/media/rc/ene_ir.c
32@@ -1018,22 +1018,6 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
33
34 spin_lock_init(&dev->hw_lock);
35
36- /* claim the resources */
37- error = -EBUSY;
38- dev->hw_io = pnp_port_start(pnp_dev, 0);
39- if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
40- dev->hw_io = -1;
41- dev->irq = -1;
42- goto error;
43- }
44-
45- dev->irq = pnp_irq(pnp_dev, 0);
46- if (request_irq(dev->irq, ene_isr,
47- IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) {
48- dev->irq = -1;
49- goto error;
50- }
51-
52 pnp_set_drvdata(pnp_dev, dev);
53 dev->pnp_dev = pnp_dev;
54
55@@ -1086,6 +1070,22 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
56 device_set_wakeup_capable(&pnp_dev->dev, true);
57 device_set_wakeup_enable(&pnp_dev->dev, true);
58
59+ /* claim the resources */
60+ error = -EBUSY;
61+ dev->hw_io = pnp_port_start(pnp_dev, 0);
62+ if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
63+ dev->hw_io = -1;
64+ dev->irq = -1;
65+ goto error;
66+ }
67+
68+ dev->irq = pnp_irq(pnp_dev, 0);
69+ if (request_irq(dev->irq, ene_isr,
70+ IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) {
71+ dev->irq = -1;
72+ goto error;
73+ }
74+
75 error = rc_register_device(rdev);
76 if (error < 0)
77 goto error;
78diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
79index 7f7079b..4218f73 100644
80--- a/drivers/media/rc/fintek-cir.c
81+++ b/drivers/media/rc/fintek-cir.c
82@@ -504,16 +504,6 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id
83
84 spin_lock_init(&fintek->fintek_lock);
85
86- ret = -EBUSY;
87- /* now claim resources */
88- if (!request_region(fintek->cir_addr,
89- fintek->cir_port_len, FINTEK_DRIVER_NAME))
90- goto failure;
91-
92- if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED,
93- FINTEK_DRIVER_NAME, (void *)fintek))
94- goto failure;
95-
96 pnp_set_drvdata(pdev, fintek);
97 fintek->pdev = pdev;
98
99@@ -548,6 +538,16 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id
100 /* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */
101 rdev->rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD);
102
103+ ret = -EBUSY;
104+ /* now claim resources */
105+ if (!request_region(fintek->cir_addr,
106+ fintek->cir_port_len, FINTEK_DRIVER_NAME))
107+ goto failure;
108+
109+ if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED,
110+ FINTEK_DRIVER_NAME, (void *)fintek))
111+ goto failure;
112+
113 ret = rc_register_device(rdev);
114 if (ret)
115 goto failure;
116diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
117index 682009d..0e49c99 100644
118--- a/drivers/media/rc/ite-cir.c
119+++ b/drivers/media/rc/ite-cir.c
120@@ -1515,16 +1515,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
121 /* initialize raw event */
122 init_ir_raw_event(&itdev->rawir);
123
124- ret = -EBUSY;
125- /* now claim resources */
126- if (!request_region(itdev->cir_addr,
127- dev_desc->io_region_size, ITE_DRIVER_NAME))
128- goto failure;
129-
130- if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED,
131- ITE_DRIVER_NAME, (void *)itdev))
132- goto failure;
133-
134 /* set driver data into the pnp device */
135 pnp_set_drvdata(pdev, itdev);
136 itdev->pdev = pdev;
137@@ -1600,6 +1590,16 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
138 rdev->driver_name = ITE_DRIVER_NAME;
139 rdev->map_name = RC_MAP_RC6_MCE;
140
141+ ret = -EBUSY;
142+ /* now claim resources */
143+ if (!request_region(itdev->cir_addr,
144+ dev_desc->io_region_size, ITE_DRIVER_NAME))
145+ goto failure;
146+
147+ if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED,
148+ ITE_DRIVER_NAME, (void *)itdev))
149+ goto failure;
150+
151 ret = rc_register_device(rdev);
152 if (ret)
153 goto failure;
154diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
155index 144f3f5..8b2c071 100644
156--- a/drivers/media/rc/nuvoton-cir.c
157+++ b/drivers/media/rc/nuvoton-cir.c
158@@ -1021,24 +1021,6 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)
159 spin_lock_init(&nvt->nvt_lock);
160 spin_lock_init(&nvt->tx.lock);
161
162- ret = -EBUSY;
163- /* now claim resources */
164- if (!request_region(nvt->cir_addr,
165- CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
166- goto failure;
167-
168- if (request_irq(nvt->cir_irq, nvt_cir_isr, IRQF_SHARED,
169- NVT_DRIVER_NAME, (void *)nvt))
170- goto failure;
171-
172- if (!request_region(nvt->cir_wake_addr,
173- CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
174- goto failure;
175-
176- if (request_irq(nvt->cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED,
177- NVT_DRIVER_NAME, (void *)nvt))
178- goto failure;
179-
180 pnp_set_drvdata(pdev, nvt);
181 nvt->pdev = pdev;
182
183@@ -1085,6 +1067,24 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)
184 rdev->tx_resolution = XYZ;
185 #endif
186
187+ ret = -EBUSY;
188+ /* now claim resources */
189+ if (!request_region(nvt->cir_addr,
190+ CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
191+ goto failure;
192+
193+ if (request_irq(nvt->cir_irq, nvt_cir_isr, IRQF_SHARED,
194+ NVT_DRIVER_NAME, (void *)nvt))
195+ goto failure;
196+
197+ if (!request_region(nvt->cir_wake_addr,
198+ CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
199+ goto failure;
200+
201+ if (request_irq(nvt->cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED,
202+ NVT_DRIVER_NAME, (void *)nvt))
203+ goto failure;
204+
205 ret = rc_register_device(rdev);
206 if (ret)
207 goto failure;
208diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
209index a7e7d6f..4591770 100644
210--- a/drivers/media/rc/winbond-cir.c
211+++ b/drivers/media/rc/winbond-cir.c
212@@ -991,39 +991,10 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
213 "(w: 0x%lX, e: 0x%lX, s: 0x%lX, i: %u)\n",
214 data->wbase, data->ebase, data->sbase, data->irq);
215
216- if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) {
217- dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",
218- data->wbase, data->wbase + WAKEUP_IOMEM_LEN - 1);
219- err = -EBUSY;
220- goto exit_free_data;
221- }
222-
223- if (!request_region(data->ebase, EHFUNC_IOMEM_LEN, DRVNAME)) {
224- dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",
225- data->ebase, data->ebase + EHFUNC_IOMEM_LEN - 1);
226- err = -EBUSY;
227- goto exit_release_wbase;
228- }
229-
230- if (!request_region(data->sbase, SP_IOMEM_LEN, DRVNAME)) {
231- dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",
232- data->sbase, data->sbase + SP_IOMEM_LEN - 1);
233- err = -EBUSY;
234- goto exit_release_ebase;
235- }
236-
237- err = request_irq(data->irq, wbcir_irq_handler,
238- IRQF_DISABLED, DRVNAME, device);
239- if (err) {
240- dev_err(dev, "Failed to claim IRQ %u\n", data->irq);
241- err = -EBUSY;
242- goto exit_release_sbase;
243- }
244-
245 led_trigger_register_simple("cir-tx", &data->txtrigger);
246 if (!data->txtrigger) {
247 err = -ENOMEM;
248- goto exit_free_irq;
249+ goto exit_free_data;
250 }
251
252 led_trigger_register_simple("cir-rx", &data->rxtrigger);
253@@ -1062,9 +1033,38 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
254 data->dev->priv = data;
255 data->dev->dev.parent = &device->dev;
256
257+ if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) {
258+ dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",
259+ data->wbase, data->wbase + WAKEUP_IOMEM_LEN - 1);
260+ err = -EBUSY;
261+ goto exit_free_rc;
262+ }
263+
264+ if (!request_region(data->ebase, EHFUNC_IOMEM_LEN, DRVNAME)) {
265+ dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",
266+ data->ebase, data->ebase + EHFUNC_IOMEM_LEN - 1);
267+ err = -EBUSY;
268+ goto exit_release_wbase;
269+ }
270+
271+ if (!request_region(data->sbase, SP_IOMEM_LEN, DRVNAME)) {
272+ dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",
273+ data->sbase, data->sbase + SP_IOMEM_LEN - 1);
274+ err = -EBUSY;
275+ goto exit_release_ebase;
276+ }
277+
278+ err = request_irq(data->irq, wbcir_irq_handler,
279+ IRQF_DISABLED, DRVNAME, device);
280+ if (err) {
281+ dev_err(dev, "Failed to claim IRQ %u\n", data->irq);
282+ err = -EBUSY;
283+ goto exit_release_sbase;
284+ }
285+
286 err = rc_register_device(data->dev);
287 if (err)
288- goto exit_free_rc;
289+ goto exit_free_irq;
290
291 device_init_wakeup(&device->dev, 1);
292
293@@ -1072,14 +1072,6 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
294
295 return 0;
296
297-exit_free_rc:
298- rc_free_device(data->dev);
299-exit_unregister_led:
300- led_classdev_unregister(&data->led);
301-exit_unregister_rxtrigger:
302- led_trigger_unregister_simple(data->rxtrigger);
303-exit_unregister_txtrigger:
304- led_trigger_unregister_simple(data->txtrigger);
305 exit_free_irq:
306 free_irq(data->irq, device);
307 exit_release_sbase:
308@@ -1088,6 +1080,14 @@ exit_release_ebase:
309 release_region(data->ebase, EHFUNC_IOMEM_LEN);
310 exit_release_wbase:
311 release_region(data->wbase, WAKEUP_IOMEM_LEN);
312+exit_free_rc:
313+ rc_free_device(data->dev);
314+exit_unregister_led:
315+ led_classdev_unregister(&data->led);
316+exit_unregister_rxtrigger:
317+ led_trigger_unregister_simple(data->rxtrigger);
318+exit_unregister_txtrigger:
319+ led_trigger_unregister_simple(data->txtrigger);
320 exit_free_data:
321 kfree(data);
322 pnp_set_drvdata(device, NULL);
323--
3241.7.7.6
325
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch
new file mode 100644
index 00000000..718254ab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch
@@ -0,0 +1,75 @@
1From 701699958f6f1770bf758ebac587fd85e73e8c76 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Thu, 26 Apr 2012 02:35:10 +0000
4Subject: [PATCH 26/56] cdc_ether: Ignore bogus union descriptor for RNDIS
5 devices
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 6eddcb4c82883451aec3be1240f17793370fa62f upstream.
11
12Some RNDIS devices include a bogus CDC Union descriptor pointing
13to non-existing interfaces. The RNDIS code is already prepared
14to handle devices without a CDC Union descriptor by hardwiring
15the driver to use interfaces 0 and 1, which is correct for the
16devices with the bogus descriptor as well. So we can reuse the
17existing workaround.
18
19Cc: Markus Kolb <linux-201011@tower-net.de>
20Cc: Iker Salmón San Millán <shaola@esdebian.org>
21Cc: Jonathan Nieder <jrnieder@gmail.com>
22Cc: Oliver Neukum <oliver@neukum.org>
23Cc: 655387@bugs.debian.org
24Signed-off-by: Bjørn Mork <bjorn@mork.no>
25Signed-off-by: David S. Miller <davem@davemloft.net>
26Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
27---
28 drivers/net/usb/cdc_ether.c | 14 ++++++++++++--
29 1 files changed, 12 insertions(+), 2 deletions(-)
30
31diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
32index 4fd4144..eac4886 100644
33--- a/drivers/net/usb/cdc_ether.c
34+++ b/drivers/net/usb/cdc_ether.c
35@@ -83,6 +83,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
36 struct cdc_state *info = (void *) &dev->data;
37 int status;
38 int rndis;
39+ bool android_rndis_quirk = false;
40 struct usb_driver *driver = driver_of(intf);
41 struct usb_cdc_mdlm_desc *desc = NULL;
42 struct usb_cdc_mdlm_detail_desc *detail = NULL;
43@@ -195,6 +196,11 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
44 info->control,
45 info->u->bSlaveInterface0,
46 info->data);
47+ /* fall back to hard-wiring for RNDIS */
48+ if (rndis) {
49+ android_rndis_quirk = true;
50+ goto next_desc;
51+ }
52 goto bad_desc;
53 }
54 if (info->control != intf) {
55@@ -271,11 +277,15 @@ next_desc:
56 /* Microsoft ActiveSync based and some regular RNDIS devices lack the
57 * CDC descriptors, so we'll hard-wire the interfaces and not check
58 * for descriptors.
59+ *
60+ * Some Android RNDIS devices have a CDC Union descriptor pointing
61+ * to non-existing interfaces. Ignore that and attempt the same
62+ * hard-wired 0 and 1 interfaces.
63 */
64- if (rndis && !info->u) {
65+ if (rndis && (!info->u || android_rndis_quirk)) {
66 info->control = usb_ifnum_to_if(dev->udev, 0);
67 info->data = usb_ifnum_to_if(dev->udev, 1);
68- if (!info->control || !info->data) {
69+ if (!info->control || !info->data || info->control != intf) {
70 dev_dbg(&intf->dev,
71 "rndis: master #0/%p slave #1/%p\n",
72 info->control,
73--
741.7.7.6
75
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch
new file mode 100644
index 00000000..4f321553
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch
@@ -0,0 +1,103 @@
1From f1c7fc81d6b170d79df0dc657040e42ece3b1953 Mon Sep 17 00:00:00 2001
2From: Josh Cartwright <joshc@linux.com>
3Date: Thu, 29 Mar 2012 19:34:53 -0400
4Subject: [PATCH 27/56] jffs2: Fix lock acquisition order bug in gc path
5
6commit 226bb7df3d22bcf4a1c0fe8206c80cc427498eae upstream.
7
8The locking policy is such that the erase_complete_block spinlock is
9nested within the alloc_sem mutex. This fixes a case in which the
10acquisition order was erroneously reversed. This issue was caught by
11the following lockdep splat:
12
13 =======================================================
14 [ INFO: possible circular locking dependency detected ]
15 3.0.5 #1
16 -------------------------------------------------------
17 jffs2_gcd_mtd6/299 is trying to acquire lock:
18 (&c->alloc_sem){+.+.+.}, at: [<c01f7714>] jffs2_garbage_collect_pass+0x314/0x890
19
20 but task is already holding lock:
21 (&(&c->erase_completion_lock)->rlock){+.+...}, at: [<c01f7708>] jffs2_garbage_collect_pass+0x308/0x890
22
23 which lock already depends on the new lock.
24
25 the existing dependency chain (in reverse order) is:
26
27 -> #1 (&(&c->erase_completion_lock)->rlock){+.+...}:
28 [<c008bec4>] validate_chain+0xe6c/0x10bc
29 [<c008c660>] __lock_acquire+0x54c/0xba4
30 [<c008d240>] lock_acquire+0xa4/0x114
31 [<c046780c>] _raw_spin_lock+0x3c/0x4c
32 [<c01f744c>] jffs2_garbage_collect_pass+0x4c/0x890
33 [<c01f937c>] jffs2_garbage_collect_thread+0x1b4/0x1cc
34 [<c0071a68>] kthread+0x98/0xa0
35 [<c000f264>] kernel_thread_exit+0x0/0x8
36
37 -> #0 (&c->alloc_sem){+.+.+.}:
38 [<c008ad2c>] print_circular_bug+0x70/0x2c4
39 [<c008c08c>] validate_chain+0x1034/0x10bc
40 [<c008c660>] __lock_acquire+0x54c/0xba4
41 [<c008d240>] lock_acquire+0xa4/0x114
42 [<c0466628>] mutex_lock_nested+0x74/0x33c
43 [<c01f7714>] jffs2_garbage_collect_pass+0x314/0x890
44 [<c01f937c>] jffs2_garbage_collect_thread+0x1b4/0x1cc
45 [<c0071a68>] kthread+0x98/0xa0
46 [<c000f264>] kernel_thread_exit+0x0/0x8
47
48 other info that might help us debug this:
49
50 Possible unsafe locking scenario:
51
52 CPU0 CPU1
53 ---- ----
54 lock(&(&c->erase_completion_lock)->rlock);
55 lock(&c->alloc_sem);
56 lock(&(&c->erase_completion_lock)->rlock);
57 lock(&c->alloc_sem);
58
59 *** DEADLOCK ***
60
61 1 lock held by jffs2_gcd_mtd6/299:
62 #0: (&(&c->erase_completion_lock)->rlock){+.+...}, at: [<c01f7708>] jffs2_garbage_collect_pass+0x308/0x890
63
64 stack backtrace:
65 [<c00155dc>] (unwind_backtrace+0x0/0x100) from [<c0463dc0>] (dump_stack+0x20/0x24)
66 [<c0463dc0>] (dump_stack+0x20/0x24) from [<c008ae84>] (print_circular_bug+0x1c8/0x2c4)
67 [<c008ae84>] (print_circular_bug+0x1c8/0x2c4) from [<c008c08c>] (validate_chain+0x1034/0x10bc)
68 [<c008c08c>] (validate_chain+0x1034/0x10bc) from [<c008c660>] (__lock_acquire+0x54c/0xba4)
69 [<c008c660>] (__lock_acquire+0x54c/0xba4) from [<c008d240>] (lock_acquire+0xa4/0x114)
70 [<c008d240>] (lock_acquire+0xa4/0x114) from [<c0466628>] (mutex_lock_nested+0x74/0x33c)
71 [<c0466628>] (mutex_lock_nested+0x74/0x33c) from [<c01f7714>] (jffs2_garbage_collect_pass+0x314/0x890)
72 [<c01f7714>] (jffs2_garbage_collect_pass+0x314/0x890) from [<c01f937c>] (jffs2_garbage_collect_thread+0x1b4/0x1cc)
73 [<c01f937c>] (jffs2_garbage_collect_thread+0x1b4/0x1cc) from [<c0071a68>] (kthread+0x98/0xa0)
74 [<c0071a68>] (kthread+0x98/0xa0) from [<c000f264>] (kernel_thread_exit+0x0/0x8)
75
76This was introduce in '81cfc9f jffs2: Fix serious write stall due to erase'.
77
78Signed-off-by: Josh Cartwright <joshc@linux.com>
79Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
80Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
81[bwh: Backported to 3.2: adjust context]
82Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
83---
84 fs/jffs2/gc.c | 2 +-
85 1 files changed, 1 insertions(+), 1 deletions(-)
86
87diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c
88index 31dce61..4bbd521 100644
89--- a/fs/jffs2/gc.c
90+++ b/fs/jffs2/gc.c
91@@ -225,8 +225,8 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
92 return 0;
93
94 D1(printk(KERN_DEBUG "No progress from erasing blocks; doing GC anyway\n"));
95- spin_lock(&c->erase_completion_lock);
96 mutex_lock(&c->alloc_sem);
97+ spin_lock(&c->erase_completion_lock);
98 }
99
100 /* First, work out which block we're garbage-collecting */
101--
1021.7.7.6
103
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch
new file mode 100644
index 00000000..df322fd6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch
@@ -0,0 +1,35 @@
1From fdde7964742c3802205c7fa50677abfe7b462bfd Mon Sep 17 00:00:00 2001
2From: Sylwester Nawrocki <s.nawrocki@samsung.com>
3Date: Sat, 21 Apr 2012 18:46:30 -0300
4Subject: [PATCH 28/56] s5p-fimc: Fix locking in subdev set_crop op
5
6commit e985dbf7d93e2a3e114b4525413e50f83613e0cb upstream.
7
8When setting TRY crop on the sub-device the mutex was erroneously acquired
9rather than released on exit path. This bug is present in kernels starting
10from v3.2.
11
12Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
13Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
14Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/media/video/s5p-fimc/fimc-capture.c | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
21index 2cc3b91..327a81f 100644
22--- a/drivers/media/video/s5p-fimc/fimc-capture.c
23+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
24@@ -1304,7 +1304,7 @@ static int fimc_subdev_set_crop(struct v4l2_subdev *sd,
25 fimc_capture_try_crop(ctx, r, crop->pad);
26
27 if (crop->which == V4L2_SUBDEV_FORMAT_TRY) {
28- mutex_lock(&fimc->lock);
29+ mutex_unlock(&fimc->lock);
30 *v4l2_subdev_get_try_crop(fh, crop->pad) = *r;
31 return 0;
32 }
33--
341.7.7.6
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch
new file mode 100644
index 00000000..cbbc4f14
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch
@@ -0,0 +1,39 @@
1From 6cbf63344c48a119864df9c5873d0407a32d9872 Mon Sep 17 00:00:00 2001
2From: Mike Snitzer <snitzer@redhat.com>
3Date: Sat, 12 May 2012 01:43:21 +0100
4Subject: [PATCH 29/56] dm mpath: check if scsi_dh module already loaded
5 before trying to load
6
7commit 510193a2d3d2e03ae53b95c0ae4f33cdff02cbf8 upstream.
8
9If the requested scsi_dh module is already loaded then skip
10request_module().
11
12Multipath table loads can hang in an unnecessary __request_module.
13
14Reported-by: Ben Marzinski <bmarzins@redhat.com>
15Signed-off-by: Mike Snitzer <snitzer@redhat.com>
16Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/md/dm-mpath.c | 4 ++--
20 1 files changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
23index 801d92d..a417f94 100644
24--- a/drivers/md/dm-mpath.c
25+++ b/drivers/md/dm-mpath.c
26@@ -698,8 +698,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m)
27 return 0;
28
29 m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL);
30- request_module("scsi_dh_%s", m->hw_handler_name);
31- if (scsi_dh_handler_exist(m->hw_handler_name) == 0) {
32+ if (!try_then_request_module(scsi_dh_handler_exist(m->hw_handler_name),
33+ "scsi_dh_%s", m->hw_handler_name)) {
34 ti->error = "unknown hardware handler type";
35 ret = -EINVAL;
36 goto fail;
37--
381.7.7.6
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch
new file mode 100644
index 00000000..a684875a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch
@@ -0,0 +1,58 @@
1From 03ddf7fce874ca8243c81666ca3cc742f195781b Mon Sep 17 00:00:00 2001
2From: "David S. Miller" <davem@davemloft.net>
3Date: Thu, 10 May 2012 11:00:46 -0700
4Subject: [PATCH 30/56] sparc64: Do not clobber %g2 in
5 xcall_fetch_glob_regs().
6
7[ Upstream commit a5a737e090e25981e99d69f01400e3a80356581c ]
8
9%g2 is meant to hold the CPUID number throughout this routine, since
10at the very beginning, and at the very end, we use %g2 to calculate
11indexes into per-cpu arrays.
12
13However we erroneously clobber it in order to hold the %cwp register
14value mid-stream.
15
16Fix this code to use %g3 for the %cwp read and related calulcations
17instead.
18
19Reported-by: Meelis Roos <mroos@linux.ee>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 arch/sparc/kernel/central.c | 2 +-
24 arch/sparc/mm/ultra.S | 6 +++---
25 2 files changed, 4 insertions(+), 4 deletions(-)
26
27diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
28index 38d48a5..9708851 100644
29--- a/arch/sparc/kernel/central.c
30+++ b/arch/sparc/kernel/central.c
31@@ -269,4 +269,4 @@ static int __init sunfire_init(void)
32 return 0;
33 }
34
35-subsys_initcall(sunfire_init);
36+fs_initcall(sunfire_init);
37diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S
38index b57a594..874162a 100644
39--- a/arch/sparc/mm/ultra.S
40+++ b/arch/sparc/mm/ultra.S
41@@ -495,11 +495,11 @@ xcall_fetch_glob_regs:
42 stx %o7, [%g1 + GR_SNAP_O7]
43 stx %i7, [%g1 + GR_SNAP_I7]
44 /* Don't try this at home kids... */
45- rdpr %cwp, %g2
46- sub %g2, 1, %g7
47+ rdpr %cwp, %g3
48+ sub %g3, 1, %g7
49 wrpr %g7, %cwp
50 mov %i7, %g7
51- wrpr %g2, %cwp
52+ wrpr %g3, %cwp
53 stx %g7, [%g1 + GR_SNAP_RPC]
54 sethi %hi(trap_block), %g7
55 or %g7, %lo(trap_block), %g7
56--
571.7.7.6
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch
new file mode 100644
index 00000000..bc85a028
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch
@@ -0,0 +1,33 @@
1From 37f2f887df9f3c8428bd1776a5c0ca1d302b3ea1 Mon Sep 17 00:00:00 2001
2From: Axel Lin <axel.lin@gmail.com>
3Date: Wed, 1 Feb 2012 10:50:05 +0800
4Subject: [PATCH 31/56] gpio: Add missing spin_lock_init in gpio-ml-ioh driver
5
6commit 7e3a70fb7bccada029c188c89bfbf3c0a63c1500 upstream.
7
8This bug was introduced by commit 54be5663
9"gpio-ml-ioh: Support interrupt function" which adds a spinlock to struct
10ioh_gpio but never init the spinlock.
11
12Signed-off-by: Axel Lin <axel.lin@gmail.com>
13Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 drivers/gpio/gpio-ml-ioh.c | 1 +
17 1 files changed, 1 insertions(+), 0 deletions(-)
18
19diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c
20index 461958f..271fd49 100644
21--- a/drivers/gpio/gpio-ml-ioh.c
22+++ b/drivers/gpio/gpio-ml-ioh.c
23@@ -448,6 +448,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev,
24 chip->reg = chip->base;
25 chip->ch = i;
26 mutex_init(&chip->lock);
27+ spin_lock_init(&chip->spinlock);
28 ioh_gpio_setup(chip, num_ports[i]);
29 ret = gpiochip_add(&chip->gpio);
30 if (ret) {
31--
321.7.7.6
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch
new file mode 100644
index 00000000..e46fe625
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch
@@ -0,0 +1,32 @@
1From e985aa700788ca6b938d4505cbe1dbdd88a3dbfd Mon Sep 17 00:00:00 2001
2From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
3Date: Fri, 9 Dec 2011 13:11:42 +0900
4Subject: [PATCH 32/56] spi-topcliff-pch: Modify pci-bus number dynamically to
5 get DMA device info
6
7commit ee2ece5261a639b89f194d141444b03b4c923179 upstream.
8
9Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
10Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
11Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12---
13 drivers/spi/spi-topcliff-pch.c | 3 ++-
14 1 files changed, 2 insertions(+), 1 deletions(-)
15
16diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
17index 54b9d2e..3238ec8 100644
18--- a/drivers/spi/spi-topcliff-pch.c
19+++ b/drivers/spi/spi-topcliff-pch.c
20@@ -924,7 +924,8 @@ static void pch_spi_request_dma(struct pch_spi_data *data, int bpw)
21 dma_cap_set(DMA_SLAVE, mask);
22
23 /* Get DMA's dev information */
24- dma_dev = pci_get_bus_and_slot(2, PCI_DEVFN(12, 0));
25+ dma_dev = pci_get_bus_and_slot(data->board_dat->pdev->bus->number,
26+ PCI_DEVFN(12, 0));
27
28 /* Set Tx DMA */
29 param = &dma->param_tx;
30--
311.7.7.6
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch
new file mode 100644
index 00000000..f11f8c14
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch
@@ -0,0 +1,187 @@
1From fcd3dfee85be4b4bdde47eecba12490ede6218d2 Mon Sep 17 00:00:00 2001
2From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
3Date: Fri, 9 Dec 2011 13:13:27 +0900
4Subject: [PATCH 33/56] spi-topcliff-pch: Fix issue for transmitting over
5 4KByte
6
7commit 7d05b3e868ee0f9231baf40cb77be3df5dd1f18c upstream.
8
9Currently, when spi-topcliff-pch receives transmit request over 4KByte,
10this driver can't process correctly. This driver needs to divide the data
11into 4Kbyte unit.
12This patch fixes the issue.
13
14Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
15Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/spi/spi-topcliff-pch.c | 66 +++++++++++++++++++++++++++++++++-------
19 1 files changed, 55 insertions(+), 11 deletions(-)
20
21diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
22index 3238ec8..1e60827 100644
23--- a/drivers/spi/spi-topcliff-pch.c
24+++ b/drivers/spi/spi-topcliff-pch.c
25@@ -196,6 +196,7 @@ struct pch_spi_data {
26 struct pch_spi_dma_ctrl dma;
27 int use_dma;
28 u8 irq_reg_sts;
29+ int save_total_len;
30 };
31
32 /**
33@@ -823,11 +824,13 @@ static void pch_spi_copy_rx_data_for_dma(struct pch_spi_data *data, int bpw)
34 rx_dma_buf = data->dma.rx_buf_virt;
35 for (j = 0; j < data->bpw_len; j++)
36 *rx_buf++ = *rx_dma_buf++ & 0xFF;
37+ data->cur_trans->rx_buf = rx_buf;
38 } else {
39 rx_sbuf = data->cur_trans->rx_buf;
40 rx_dma_sbuf = data->dma.rx_buf_virt;
41 for (j = 0; j < data->bpw_len; j++)
42 *rx_sbuf++ = *rx_dma_sbuf++;
43+ data->cur_trans->rx_buf = rx_sbuf;
44 }
45 }
46
47@@ -853,6 +856,9 @@ static int pch_spi_start_transfer(struct pch_spi_data *data)
48 rtn = wait_event_interruptible_timeout(data->wait,
49 data->transfer_complete,
50 msecs_to_jiffies(2 * HZ));
51+ if (!rtn)
52+ dev_err(&data->master->dev,
53+ "%s wait-event timeout\n", __func__);
54
55 dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent,
56 DMA_FROM_DEVICE);
57@@ -989,6 +995,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
58 int i;
59 int size;
60 int rem;
61+ int head;
62 unsigned long flags;
63 struct pch_spi_dma_ctrl *dma;
64
65@@ -1017,6 +1024,11 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
66 }
67 data->bpw_len = data->cur_trans->len / (*bpw / 8);
68
69+ if (data->bpw_len > PCH_BUF_SIZE) {
70+ data->bpw_len = PCH_BUF_SIZE;
71+ data->cur_trans->len -= PCH_BUF_SIZE;
72+ }
73+
74 /* copy Tx Data */
75 if (data->cur_trans->tx_buf != NULL) {
76 if (*bpw == 8) {
77@@ -1031,10 +1043,17 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
78 *tx_dma_sbuf++ = *tx_sbuf++;
79 }
80 }
81+
82+ /* Calculate Rx parameter for DMA transmitting */
83 if (data->bpw_len > PCH_DMA_TRANS_SIZE) {
84- num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1;
85+ if (data->bpw_len % PCH_DMA_TRANS_SIZE) {
86+ num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1;
87+ rem = data->bpw_len % PCH_DMA_TRANS_SIZE;
88+ } else {
89+ num = data->bpw_len / PCH_DMA_TRANS_SIZE;
90+ rem = PCH_DMA_TRANS_SIZE;
91+ }
92 size = PCH_DMA_TRANS_SIZE;
93- rem = data->bpw_len % PCH_DMA_TRANS_SIZE;
94 } else {
95 num = 1;
96 size = data->bpw_len;
97@@ -1094,15 +1113,23 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
98 dma->nent = num;
99 dma->desc_rx = desc_rx;
100
101- /* TX */
102- if (data->bpw_len > PCH_DMA_TRANS_SIZE) {
103- num = data->bpw_len / PCH_DMA_TRANS_SIZE;
104+ /* Calculate Tx parameter for DMA transmitting */
105+ if (data->bpw_len > PCH_MAX_FIFO_DEPTH) {
106+ head = PCH_MAX_FIFO_DEPTH - PCH_DMA_TRANS_SIZE;
107+ if (data->bpw_len % PCH_DMA_TRANS_SIZE > 4) {
108+ num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1;
109+ rem = data->bpw_len % PCH_DMA_TRANS_SIZE - head;
110+ } else {
111+ num = data->bpw_len / PCH_DMA_TRANS_SIZE;
112+ rem = data->bpw_len % PCH_DMA_TRANS_SIZE +
113+ PCH_DMA_TRANS_SIZE - head;
114+ }
115 size = PCH_DMA_TRANS_SIZE;
116- rem = 16;
117 } else {
118 num = 1;
119 size = data->bpw_len;
120 rem = data->bpw_len;
121+ head = 0;
122 }
123
124 dma->sg_tx_p = kzalloc(sizeof(struct scatterlist)*num, GFP_ATOMIC);
125@@ -1112,11 +1139,17 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
126 for (i = 0; i < num; i++, sg++) {
127 if (i == 0) {
128 sg->offset = 0;
129+ sg_set_page(sg, virt_to_page(dma->tx_buf_virt), size + head,
130+ sg->offset);
131+ sg_dma_len(sg) = size + head;
132+ } else if (i == (num - 1)) {
133+ sg->offset = head + size * i;
134+ sg->offset = sg->offset * (*bpw / 8);
135 sg_set_page(sg, virt_to_page(dma->tx_buf_virt), rem,
136 sg->offset);
137 sg_dma_len(sg) = rem;
138 } else {
139- sg->offset = rem + size * (i - 1);
140+ sg->offset = head + size * i;
141 sg->offset = sg->offset * (*bpw / 8);
142 sg_set_page(sg, virt_to_page(dma->tx_buf_virt), size,
143 sg->offset);
144@@ -1204,6 +1237,7 @@ static void pch_spi_process_messages(struct work_struct *pwork)
145 data->current_msg->spi->bits_per_word);
146 pch_spi_writereg(data->master, PCH_SSNXCR, SSN_NO_CONTROL);
147 do {
148+ int cnt;
149 /* If we are already processing a message get the next
150 transfer structure from the message otherwise retrieve
151 the 1st transfer request from the message. */
152@@ -1223,11 +1257,20 @@ static void pch_spi_process_messages(struct work_struct *pwork)
153 }
154 spin_unlock(&data->lock);
155
156+ if (!data->cur_trans->len)
157+ goto out;
158+ cnt = (data->cur_trans->len - 1) / PCH_BUF_SIZE + 1;
159+ data->save_total_len = data->cur_trans->len;
160 if (data->use_dma) {
161- pch_spi_handle_dma(data, &bpw);
162- if (!pch_spi_start_transfer(data))
163- goto out;
164- pch_spi_copy_rx_data_for_dma(data, bpw);
165+ int i;
166+ char *save_rx_buf = data->cur_trans->rx_buf;
167+ for (i = 0; i < cnt; i ++) {
168+ pch_spi_handle_dma(data, &bpw);
169+ if (!pch_spi_start_transfer(data))
170+ goto out;
171+ pch_spi_copy_rx_data_for_dma(data, bpw);
172+ }
173+ data->cur_trans->rx_buf = save_rx_buf;
174 } else {
175 pch_spi_set_tx(data, &bpw);
176 pch_spi_set_ir(data);
177@@ -1238,6 +1281,7 @@ static void pch_spi_process_messages(struct work_struct *pwork)
178 data->pkt_tx_buff = NULL;
179 }
180 /* increment message count */
181+ data->cur_trans->len = data->save_total_len;
182 data->current_msg->actual_length += data->cur_trans->len;
183
184 dev_dbg(&data->master->dev,
185--
1861.7.7.6
187
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch
new file mode 100644
index 00000000..c9d0ab75
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch
@@ -0,0 +1,34 @@
1From 3e43ac1c2f64e955c74f598621363028d87a93c2 Mon Sep 17 00:00:00 2001
2From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
3Date: Fri, 9 Dec 2011 13:13:28 +0900
4Subject: [PATCH 34/56] spi-topcliff-pch: supports a spi mode setup and bit
5 order setup by IO control
6
7commit f258b44e22e07f5e98ac2260c70acff5784791b6 upstream.
8
9This patch supports a spi mode setup and bit order setup by IO control.
10 spi mode: mode 0 to mode 3
11 bit order: LSB first, MSB first
12
13Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
14Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
16---
17 drivers/spi/spi-topcliff-pch.c | 1 +
18 1 files changed, 1 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
21index 1e60827..0c4efed 100644
22--- a/drivers/spi/spi-topcliff-pch.c
23+++ b/drivers/spi/spi-topcliff-pch.c
24@@ -1434,6 +1434,7 @@ static int __devinit pch_spi_pd_probe(struct platform_device *plat_dev)
25 master->num_chipselect = PCH_MAX_CS;
26 master->setup = pch_spi_setup;
27 master->transfer = pch_spi_transfer;
28+ master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST;
29
30 data->board_dat = board_dat;
31 data->plat_dev = plat_dev;
32--
331.7.7.6
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch
new file mode 100644
index 00000000..5370de52
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch
@@ -0,0 +1,43 @@
1From 0c6c9c1d69fbdd6a1f54668a2c9f8f306c702728 Mon Sep 17 00:00:00 2001
2From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
3Date: Fri, 9 Dec 2011 13:13:29 +0900
4Subject: [PATCH 35/56] spi-topcliff-pch: add recovery processing in case
5 wait-event timeout
6
7commit 0f57e168aa109775430c76cc663fb64909813d84 upstream.
8
9Currently, pch_spi_start_transfer failure is not anticipated.
10This patch adds the processing.
11
12Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
13Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 drivers/spi/spi-topcliff-pch.c | 10 +++++++++-
17 1 files changed, 9 insertions(+), 1 deletions(-)
18
19diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
20index 0c4efed..1590dbd 100644
21--- a/drivers/spi/spi-topcliff-pch.c
22+++ b/drivers/spi/spi-topcliff-pch.c
23@@ -1266,8 +1266,16 @@ static void pch_spi_process_messages(struct work_struct *pwork)
24 char *save_rx_buf = data->cur_trans->rx_buf;
25 for (i = 0; i < cnt; i ++) {
26 pch_spi_handle_dma(data, &bpw);
27- if (!pch_spi_start_transfer(data))
28+ if (!pch_spi_start_transfer(data)) {
29+ data->transfer_complete = true;
30+ data->current_msg->status = -EIO;
31+ data->current_msg->complete
32+ (data->current_msg->context);
33+ data->bcurrent_msg_processing = false;
34+ data->current_msg = NULL;
35+ data->cur_trans = NULL;
36 goto out;
37+ }
38 pch_spi_copy_rx_data_for_dma(data, bpw);
39 }
40 data->cur_trans->rx_buf = save_rx_buf;
41--
421.7.7.6
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch
new file mode 100644
index 00000000..ffdd9961
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch
@@ -0,0 +1,64 @@
1From ee9d8cc0c47d0095d5d27b81b7459fa534c56a67 Mon Sep 17 00:00:00 2001
2From: Eric Sandeen <sandeen@redhat.com>
3Date: Mon, 20 Feb 2012 23:06:18 -0500
4Subject: [PATCH 36/56] ext4: avoid deadlock on sync-mounted FS w/o journal
5
6commit c1bb05a657fb3d8c6179a4ef7980261fae4521d7 upstream.
7
8Processes hang forever on a sync-mounted ext2 file system that
9is mounted with the ext4 module (default in Fedora 16).
10
11I can reproduce this reliably by mounting an ext2 partition with
12"-o sync" and opening a new file an that partition with vim. vim
13will hang in "D" state forever. The same happens on ext4 without
14a journal.
15
16I am attaching a small patch here that solves this issue for me.
17In the sync mounted case without a journal,
18ext4_handle_dirty_metadata() may call sync_dirty_buffer(), which
19can't be called with buffer lock held.
20
21Also move mb_cache_entry_release inside lock to avoid race
22fixed previously by 8a2bfdcb ext[34]: EA block reference count racing fix
23Note too that ext2 fixed this same problem in 2006 with
24b2f49033 [PATCH] fix deadlock in ext2
25
26Signed-off-by: Martin.Wilck@ts.fujitsu.com
27[sandeen@redhat.com: move mb_cache_entry_release before unlock, edit commit msg]
28Signed-off-by: Eric Sandeen <sandeen@redhat.com>
29Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
30Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
31---
32 fs/ext4/xattr.c | 7 ++++---
33 1 files changed, 4 insertions(+), 3 deletions(-)
34
35diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
36index 93a00d8..4410ae7 100644
37--- a/fs/ext4/xattr.c
38+++ b/fs/ext4/xattr.c
39@@ -487,18 +487,19 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode,
40 ext4_free_blocks(handle, inode, bh, 0, 1,
41 EXT4_FREE_BLOCKS_METADATA |
42 EXT4_FREE_BLOCKS_FORGET);
43+ unlock_buffer(bh);
44 } else {
45 le32_add_cpu(&BHDR(bh)->h_refcount, -1);
46+ if (ce)
47+ mb_cache_entry_release(ce);
48+ unlock_buffer(bh);
49 error = ext4_handle_dirty_metadata(handle, inode, bh);
50 if (IS_SYNC(inode))
51 ext4_handle_sync(handle);
52 dquot_free_block(inode, 1);
53 ea_bdebug(bh, "refcount now=%d; releasing",
54 le32_to_cpu(BHDR(bh)->h_refcount));
55- if (ce)
56- mb_cache_entry_release(ce);
57 }
58- unlock_buffer(bh);
59 out:
60 ext4_std_error(inode->i_sb, error);
61 return;
62--
631.7.7.6
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0037-ia64-Add-accept4-syscall.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0037-ia64-Add-accept4-syscall.patch
new file mode 100644
index 00000000..fa24f4d7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0037-ia64-Add-accept4-syscall.patch
@@ -0,0 +1,57 @@
1From 0ab7c7f97658245faa8a63b0e4870f5459f53e6e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?=C3=89meric=20Maschino?= <emeric.maschino@gmail.com>
3Date: Mon, 9 Jan 2012 12:55:10 -0800
4Subject: [PATCH 37/56] ia64: Add accept4() syscall
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 65cc21b4523e94d5640542a818748cd3be8cd6b4 upstream.
10
11While debugging udev > 170 failure on Debian Wheezy
12(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648325), it appears
13that the issue was in fact due to missing accept4() in ia64.
14
15This patch simply adds accept4() to ia64.
16
17Signed-off-by: Émeric Maschino <emeric.maschino@gmail.com>
18Signed-off-by: Tony Luck <tony.luck@intel.com>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 arch/ia64/include/asm/unistd.h | 3 ++-
22 arch/ia64/kernel/entry.S | 1 +
23 2 files changed, 3 insertions(+), 1 deletions(-)
24
25diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
26index 7617248..7a3bd25 100644
27--- a/arch/ia64/include/asm/unistd.h
28+++ b/arch/ia64/include/asm/unistd.h
29@@ -323,11 +323,12 @@
30 #define __NR_sendmmsg 1331
31 #define __NR_process_vm_readv 1332
32 #define __NR_process_vm_writev 1333
33+#define __NR_accept4 1334
34
35 #ifdef __KERNEL__
36
37
38-#define NR_syscalls 310 /* length of syscall table */
39+#define NR_syscalls 311 /* length of syscall table */
40
41 /*
42 * The following defines stop scripts/checksyscalls.sh from complaining about
43diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
44index 5b31d46..1ccbe12 100644
45--- a/arch/ia64/kernel/entry.S
46+++ b/arch/ia64/kernel/entry.S
47@@ -1779,6 +1779,7 @@ sys_call_table:
48 data8 sys_sendmmsg
49 data8 sys_process_vm_readv
50 data8 sys_process_vm_writev
51+ data8 sys_accept4
52
53 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
54 #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
55--
561.7.7.6
57
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch
new file mode 100644
index 00000000..09f5e5b0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch
@@ -0,0 +1,60 @@
1From 258bf060571803e3260270a579344d4a69eafe98 Mon Sep 17 00:00:00 2001
2From: Arend van Spriel <arend@broadcom.com>
3Date: Thu, 9 Feb 2012 21:08:58 +0100
4Subject: [PATCH 38/56] brcm80211: smac: fix endless retry of A-MPDU
5 transmissions
6
7commit 5e379203c7788b7af01150bfadbc74d2797a2ef4 upstream.
8
9The A-MPDU code checked against a retry limit, but it was using
10the wrong variable to do so. This patch fixes this to assure
11proper retry mechanism.
12
13This problem had a side-effect causing the mac80211 flush callback
14to remain waiting forever as well. That side effect has been fixed
15by commit by Stanislaw Gruszka:
16
17commit f96b08a7e6f69c0f0a576554df3df5b1b519c479
18Date: Tue Jan 17 12:38:50 2012 +0100
19
20 brcmsmac: fix tx queue flush infinite loop
21
22 Reference:
23 https://bugzilla.kernel.org/show_bug.cgi?id=42576
24
25Cc: Stanislaw Gruszka <sgruszka@redhat.com>
26Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
27Reviewed-by: Alwin Beukers <alwin@broadcom.com>
28Signed-off-by: Arend van Spriel <arend@broadcom.com>
29Signed-off-by: John W. Linville <linville@tuxdriver.com>
30Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
31---
32 drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +-----
33 1 files changed, 1 insertions(+), 5 deletions(-)
34
35diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
36index 7f27dbd..0515862 100644
37--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
38+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
39@@ -1053,17 +1053,13 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
40 }
41 /* either retransmit or send bar if ack not recd */
42 if (!ack_recd) {
43- struct ieee80211_tx_rate *txrate =
44- tx_info->status.rates;
45- if (retry && (txrate[0].count < (int)retry_limit)) {
46+ if (retry && (ini->txretry[index] < (int)retry_limit)) {
47 ini->txretry[index]++;
48 ini->tx_in_transit--;
49 /*
50 * Use high prededence for retransmit to
51 * give some punch
52 */
53- /* brcms_c_txq_enq(wlc, scb, p,
54- * BRCMS_PRIO_TO_PREC(tid)); */
55 brcms_c_txq_enq(wlc, scb, p,
56 BRCMS_PRIO_TO_HI_PREC(tid));
57 } else {
58--
591.7.7.6
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch
new file mode 100644
index 00000000..9c2fe73f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch
@@ -0,0 +1,73 @@
1From 51fdc0c99703cfde72be81bef9c7e38ac5c023a0 Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 11 May 2012 17:42:37 +0100
4Subject: [PATCH 39/56] ARM: 7417/1: vfp: ensure preemption is disabled when
5 enabling VFP access
6
7commit 998de4acb2ba188d20768d1065658377a2e7d29b upstream.
8
9The vfp_enable function enables access to the VFP co-processor register
10space (cp10 and cp11) on the current CPU and must be called with
11preemption disabled. Unfortunately, the vfp_init late initcall does not
12disable preemption and can lead to an oops during boot if thread
13migration occurs at the wrong time and we end up attempting to access
14the FPSID on a CPU with VFP access disabled.
15
16This patch fixes the initcall to call vfp_enable from a non-preemptible
17context on each CPU and adds a BUG_ON(preemptible) to ensure that any
18similar problems are easily spotted in the future.
19
20Reported-by: Hyungwoo Yang <hwoo.yang@gmail.com>
21Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com>
22Signed-off-by: Will Deacon <will.deacon@arm.com>
23Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 arch/arm/vfp/vfpmodule.c | 10 ++++++----
27 1 files changed, 6 insertions(+), 4 deletions(-)
28
29diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
30index 8f3ccdd..8ea07e4 100644
31--- a/arch/arm/vfp/vfpmodule.c
32+++ b/arch/arm/vfp/vfpmodule.c
33@@ -11,6 +11,7 @@
34 #include <linux/types.h>
35 #include <linux/cpu.h>
36 #include <linux/cpu_pm.h>
37+#include <linux/hardirq.h>
38 #include <linux/kernel.h>
39 #include <linux/notifier.h>
40 #include <linux/signal.h>
41@@ -428,7 +429,10 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
42
43 static void vfp_enable(void *unused)
44 {
45- u32 access = get_copro_access();
46+ u32 access;
47+
48+ BUG_ON(preemptible());
49+ access = get_copro_access();
50
51 /*
52 * Enable full access to VFP (cp10 and cp11)
53@@ -556,7 +560,7 @@ static int __init vfp_init(void)
54 unsigned int cpu_arch = cpu_architecture();
55
56 if (cpu_arch >= CPU_ARCH_ARMv6)
57- vfp_enable(NULL);
58+ on_each_cpu(vfp_enable, NULL, 1);
59
60 /*
61 * First check that there is a VFP that we can use.
62@@ -577,8 +581,6 @@ static int __init vfp_init(void)
63 } else {
64 hotcpu_notifier(vfp_hotplug, 0);
65
66- smp_call_function(vfp_enable, NULL, 1);
67-
68 VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */
69 printk("implementor %02x architecture %d part %02x variant %x rev %x\n",
70 (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,
71--
721.7.7.6
73
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch
new file mode 100644
index 00000000..cf2db916
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch
@@ -0,0 +1,42 @@
1From b081b9481296d51cdb05548b8f67888a240a675f Mon Sep 17 00:00:00 2001
2From: Bernhard Kohl <Riedel-und-Kohl@t-online.de>
3Date: Sun, 13 May 2012 23:39:37 +0200
4Subject: [PATCH 40/56] target: Fix SPC-2 RELEASE bug for multi-session iSCSI
5 client setups
6
7commit edc318d9fea6854df752ec8c645b960b0d5a1d23 upstream.
8
9This patch addresses a bug in a special case for target core SPC-2 RELEASE
10logic where the same physical client (eg: iSCSI InitiatorName) with
11differing iSCSI session identifiers (ISID) is allowed to incorrectly release
12the same client's SPC-2 reservation from the non reservation holding path.
13
14Note this bug is specific to iscsi-target w/ SPC-2 reservations, and
15with the default enforce_pr_isids=1 device attr setting in target-core
16controls if a InitiatorName + different ISID reservations are handled
17the same as a single iSCSI client entity.
18
19Signed-off-by: Bernhard Kohl <bernhard.kohl@gmx.net>
20Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/target/target_core_pr.c | 3 +++
24 1 files changed, 3 insertions(+), 0 deletions(-)
25
26diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
27index 6cf6ff4..b75bc92 100644
28--- a/drivers/target/target_core_pr.c
29+++ b/drivers/target/target_core_pr.c
30@@ -223,6 +223,9 @@ int target_scsi2_reservation_release(struct se_task *task)
31 if (dev->dev_reserved_node_acl != sess->se_node_acl)
32 goto out_unlock;
33
34+ if (dev->dev_res_bin_isid != sess->sess_bin_isid)
35+ goto out_unlock;
36+
37 dev->dev_reserved_node_acl = NULL;
38 dev->dev_flags &= ~DF_SPC2_RESERVATIONS;
39 if (dev->dev_flags & DF_SPC2_RESERVATIONS_WITH_ISID) {
40--
411.7.7.6
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch
new file mode 100644
index 00000000..8176064f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch
@@ -0,0 +1,51 @@
1From d5f0e3adeaf18edfac8b3c7d8f867fe92923a4ab Mon Sep 17 00:00:00 2001
2From: Alexander Clouter <alex@digriz.org.uk>
3Date: Sat, 12 May 2012 09:45:08 +0100
4Subject: [PATCH 41/56] crypto: mv_cesa requires on CRYPTO_HASH to build
5
6commit 1ebfefcf37a6e308266a8d786e8cfea0a454058c upstream.
7
8Without CRYPTO_HASH being selected, mv_cesa has a lot of hooks
9into undefined exports.
10----
11 MODPOST 81 modules
12 Kernel: arch/arm/boot/Image is ready
13 AS arch/arm/boot/compressed/head.o
14 GZIP arch/arm/boot/compressed/piggy.gzip
15 CC arch/arm/boot/compressed/misc.o
16 CC arch/arm/boot/compressed/decompress.o
17ERROR: "crypto_ahash_type" [drivers/crypto/mv_cesa.ko] undefined!
18ERROR: "crypto_shash_final" [drivers/crypto/mv_cesa.ko] undefined!
19ERROR: "crypto_register_ahash" [drivers/crypto/mv_cesa.ko] undefined!
20ERROR: "crypto_unregister_ahash" [drivers/crypto/mv_cesa.ko] undefined!
21ERROR: "crypto_shash_update" [drivers/crypto/mv_cesa.ko] undefined!
22ERROR: "crypto_shash_digest" [drivers/crypto/mv_cesa.ko] undefined!
23ERROR: "crypto_shash_setkey" [drivers/crypto/mv_cesa.ko] undefined!
24ERROR: "crypto_alloc_shash" [drivers/crypto/mv_cesa.ko] undefined!
25make[1]: *** [__modpost] Error 1
26make: *** [modules] Error 2
27make: *** Waiting for unfinished jobs....
28----
29
30Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
31Signed-off-by: Jason Cooper <jason@lakedaemon.net>
32Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
33---
34 drivers/crypto/Kconfig | 1 +
35 1 files changed, 1 insertions(+), 0 deletions(-)
36
37diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
38index 6d16b4b..7e3002b 100644
39--- a/drivers/crypto/Kconfig
40+++ b/drivers/crypto/Kconfig
41@@ -173,6 +173,7 @@ config CRYPTO_DEV_MV_CESA
42 select CRYPTO_ALGAPI
43 select CRYPTO_AES
44 select CRYPTO_BLKCIPHER2
45+ select CRYPTO_HASH
46 help
47 This driver allows you to utilize the Cryptographic Engines and
48 Security Accelerator (CESA) which can be found on the Marvell Orion
49--
501.7.7.6
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch
new file mode 100644
index 00000000..21705fd4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch
@@ -0,0 +1,46 @@
1From e7a10d7bb94e2d5618757447f0ac108d8951b4a6 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Tue, 15 May 2012 08:07:31 +0200
4Subject: [PATCH 42/56] ALSA: hda/idt - Fix power-map for speaker-pins with
5 some HP laptops
6
7commit b0791dda813c179e539b0fc1ecd3f5f30f2571e2 upstream.
8
9BIOS on some HP laptops don't set the speaker-pins as fixed but expose
10as jacks, and this confuses the driver as if these pins are
11jack-detectable. As a result, the machine doesn't get sounds from
12speakers because the driver prepares the power-map update via jack
13unsol events which never come up in reality. The bug was introduced
14in some time in 3.2 for enabling the power-mapping feature.
15
16This patch fixes the problem by replacing the check of the persistent
17power-map bits with a proper is_jack_detectable() call.
18
19Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43240
20
21Signed-off-by: Takashi Iwai <tiwai@suse.de>
22Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
23---
24 sound/pci/hda/patch_sigmatel.c | 6 +++---
25 1 files changed, 3 insertions(+), 3 deletions(-)
26
27diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
28index ed67698..7b7a516 100644
29--- a/sound/pci/hda/patch_sigmatel.c
30+++ b/sound/pci/hda/patch_sigmatel.c
31@@ -4484,9 +4484,9 @@ static int stac92xx_init(struct hda_codec *codec)
32 def_conf = get_defcfg_connect(def_conf);
33 /* skip any ports that don't have jacks since presence
34 * detection is useless */
35- if (def_conf != AC_JACK_PORT_COMPLEX) {
36- if (def_conf != AC_JACK_PORT_NONE)
37- stac_toggle_power_map(codec, nid, 1);
38+ if (def_conf != AC_JACK_PORT_NONE &&
39+ !is_jack_detectable(codec, nid)) {
40+ stac_toggle_power_map(codec, nid, 1);
41 continue;
42 }
43 if (enable_pin_detect(codec, nid, STAC_PWR_EVENT)) {
44--
451.7.7.6
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch
new file mode 100644
index 00000000..505ca3f4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch
@@ -0,0 +1,29 @@
1From ffbe8f6bb9d1b143aa8d3e37c4c237219b71544d Mon Sep 17 00:00:00 2001
2From: Mark Brown <broonie@opensource.wolfsonmicro.com>
3Date: Tue, 15 May 2012 18:13:00 +0100
4Subject: [PATCH 43/56] ASoC: wm8994: Fix AIF2ADC power down
5
6commit c7f5f2389377b66028bc129890aa653deafe8d39 upstream.
7
8Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
9Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
10---
11 sound/soc/codecs/wm8994.c | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-)
13
14diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
15index 7806301..3e7aa22 100644
16--- a/sound/soc/codecs/wm8994.c
17+++ b/sound/soc/codecs/wm8994.c
18@@ -1027,7 +1027,7 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w,
19 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
20 WM8994_AIF2DACL_ENA |
21 WM8994_AIF2DACR_ENA, 0);
22- snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
23+ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4,
24 WM8994_AIF2ADCL_ENA |
25 WM8994_AIF2ADCR_ENA, 0);
26
27--
281.7.7.6
29
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch
new file mode 100644
index 00000000..080b001e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch
@@ -0,0 +1,222 @@
1From 5dc6e8a33ae9998d96530b6e6778654685d02b86 Mon Sep 17 00:00:00 2001
2From: Ming Lei <tom.leiming@gmail.com>
3Date: Thu, 26 Apr 2012 11:33:46 +0800
4Subject: [PATCH 44/56] usbnet: fix skb traversing races during unlink(v2)
5
6commit 5b6e9bcdeb65634b4ad604eb4536404bbfc62cfa upstream.
7
8Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid
9recursive locking in usbnet_stop()) fixes the recursive locking
10problem by releasing the skb queue lock before unlink, but may
11cause skb traversing races:
12 - after URB is unlinked and the queue lock is released,
13 the refered skb and skb->next may be moved to done queue,
14 even be released
15 - in skb_queue_walk_safe, the next skb is still obtained
16 by next pointer of the last skb
17 - so maybe trigger oops or other problems
18
19This patch extends the usage of entry->state to describe 'start_unlink'
20state, so always holding the queue(rx/tx) lock to change the state if
21the referd skb is in rx or tx queue because we need to know if the
22refered urb has been started unlinking in unlink_urbs.
23
24The other part of this patch is based on Huajun's patch:
25always traverse from head of the tx/rx queue to get skb which is
26to be unlinked but not been started unlinking.
27
28Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
29Signed-off-by: Ming Lei <tom.leiming@gmail.com>
30Cc: Oliver Neukum <oneukum@suse.de>
31Signed-off-by: David S. Miller <davem@davemloft.net>
32Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
33---
34 drivers/net/usb/usbnet.c | 54 +++++++++++++++++++++++++++++++-------------
35 include/linux/usb/usbnet.h | 3 +-
36 2 files changed, 40 insertions(+), 17 deletions(-)
37
38diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
39index 750e330..b873b5d 100644
40--- a/drivers/net/usb/usbnet.c
41+++ b/drivers/net/usb/usbnet.c
42@@ -281,17 +281,32 @@ int usbnet_change_mtu (struct net_device *net, int new_mtu)
43 }
44 EXPORT_SYMBOL_GPL(usbnet_change_mtu);
45
46+/* The caller must hold list->lock */
47+static void __usbnet_queue_skb(struct sk_buff_head *list,
48+ struct sk_buff *newsk, enum skb_state state)
49+{
50+ struct skb_data *entry = (struct skb_data *) newsk->cb;
51+
52+ __skb_queue_tail(list, newsk);
53+ entry->state = state;
54+}
55+
56 /*-------------------------------------------------------------------------*/
57
58 /* some LK 2.4 HCDs oopsed if we freed or resubmitted urbs from
59 * completion callbacks. 2.5 should have fixed those bugs...
60 */
61
62-static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_head *list)
63+static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb,
64+ struct sk_buff_head *list, enum skb_state state)
65 {
66 unsigned long flags;
67+ enum skb_state old_state;
68+ struct skb_data *entry = (struct skb_data *) skb->cb;
69
70 spin_lock_irqsave(&list->lock, flags);
71+ old_state = entry->state;
72+ entry->state = state;
73 __skb_unlink(skb, list);
74 spin_unlock(&list->lock);
75 spin_lock(&dev->done.lock);
76@@ -299,6 +314,7 @@ static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_hea
77 if (dev->done.qlen == 1)
78 tasklet_schedule(&dev->bh);
79 spin_unlock_irqrestore(&dev->done.lock, flags);
80+ return old_state;
81 }
82
83 /* some work can't be done in tasklets, so we use keventd
84@@ -339,7 +355,6 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
85 entry = (struct skb_data *) skb->cb;
86 entry->urb = urb;
87 entry->dev = dev;
88- entry->state = rx_start;
89 entry->length = 0;
90
91 usb_fill_bulk_urb (urb, dev->udev, dev->in,
92@@ -371,7 +386,7 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
93 tasklet_schedule (&dev->bh);
94 break;
95 case 0:
96- __skb_queue_tail (&dev->rxq, skb);
97+ __usbnet_queue_skb(&dev->rxq, skb, rx_start);
98 }
99 } else {
100 netif_dbg(dev, ifdown, dev->net, "rx: stopped\n");
101@@ -422,16 +437,17 @@ static void rx_complete (struct urb *urb)
102 struct skb_data *entry = (struct skb_data *) skb->cb;
103 struct usbnet *dev = entry->dev;
104 int urb_status = urb->status;
105+ enum skb_state state;
106
107 skb_put (skb, urb->actual_length);
108- entry->state = rx_done;
109+ state = rx_done;
110 entry->urb = NULL;
111
112 switch (urb_status) {
113 /* success */
114 case 0:
115 if (skb->len < dev->net->hard_header_len) {
116- entry->state = rx_cleanup;
117+ state = rx_cleanup;
118 dev->net->stats.rx_errors++;
119 dev->net->stats.rx_length_errors++;
120 netif_dbg(dev, rx_err, dev->net,
121@@ -470,7 +486,7 @@ static void rx_complete (struct urb *urb)
122 "rx throttle %d\n", urb_status);
123 }
124 block:
125- entry->state = rx_cleanup;
126+ state = rx_cleanup;
127 entry->urb = urb;
128 urb = NULL;
129 break;
130@@ -481,17 +497,18 @@ block:
131 // FALLTHROUGH
132
133 default:
134- entry->state = rx_cleanup;
135+ state = rx_cleanup;
136 dev->net->stats.rx_errors++;
137 netif_dbg(dev, rx_err, dev->net, "rx status %d\n", urb_status);
138 break;
139 }
140
141- defer_bh(dev, skb, &dev->rxq);
142+ state = defer_bh(dev, skb, &dev->rxq, state);
143
144 if (urb) {
145 if (netif_running (dev->net) &&
146- !test_bit (EVENT_RX_HALT, &dev->flags)) {
147+ !test_bit (EVENT_RX_HALT, &dev->flags) &&
148+ state != unlink_start) {
149 rx_submit (dev, urb, GFP_ATOMIC);
150 return;
151 }
152@@ -577,16 +594,23 @@ EXPORT_SYMBOL_GPL(usbnet_purge_paused_rxq);
153 static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
154 {
155 unsigned long flags;
156- struct sk_buff *skb, *skbnext;
157+ struct sk_buff *skb;
158 int count = 0;
159
160 spin_lock_irqsave (&q->lock, flags);
161- skb_queue_walk_safe(q, skb, skbnext) {
162+ while (!skb_queue_empty(q)) {
163 struct skb_data *entry;
164 struct urb *urb;
165 int retval;
166
167- entry = (struct skb_data *) skb->cb;
168+ skb_queue_walk(q, skb) {
169+ entry = (struct skb_data *) skb->cb;
170+ if (entry->state != unlink_start)
171+ goto found;
172+ }
173+ break;
174+found:
175+ entry->state = unlink_start;
176 urb = entry->urb;
177
178 /*
179@@ -1037,8 +1061,7 @@ static void tx_complete (struct urb *urb)
180 }
181
182 usb_autopm_put_interface_async(dev->intf);
183- entry->state = tx_done;
184- defer_bh(dev, skb, &dev->txq);
185+ (void) defer_bh(dev, skb, &dev->txq, tx_done);
186 }
187
188 /*-------------------------------------------------------------------------*/
189@@ -1094,7 +1117,6 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
190 entry = (struct skb_data *) skb->cb;
191 entry->urb = urb;
192 entry->dev = dev;
193- entry->state = tx_start;
194 entry->length = length;
195
196 usb_fill_bulk_urb (urb, dev->udev, dev->out,
197@@ -1153,7 +1175,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
198 break;
199 case 0:
200 net->trans_start = jiffies;
201- __skb_queue_tail (&dev->txq, skb);
202+ __usbnet_queue_skb(&dev->txq, skb, tx_start);
203 if (dev->txq.qlen >= TX_QLEN (dev))
204 netif_stop_queue (net);
205 }
206diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
207index 605b0aa..76f4396 100644
208--- a/include/linux/usb/usbnet.h
209+++ b/include/linux/usb/usbnet.h
210@@ -191,7 +191,8 @@ extern void usbnet_cdc_status(struct usbnet *, struct urb *);
211 enum skb_state {
212 illegal = 0,
213 tx_start, tx_done,
214- rx_start, rx_done, rx_cleanup
215+ rx_start, rx_done, rx_cleanup,
216+ unlink_start
217 };
218
219 struct skb_data { /* skb->cb is one of these */
220--
2211.7.7.6
222
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch
new file mode 100644
index 00000000..2310ee58
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch
@@ -0,0 +1,58 @@
1From 3a586ee50e3f8a380125a8ce332de9f4c0ef727e Mon Sep 17 00:00:00 2001
2From: Dan Williams <dcbw@redhat.com>
3Date: Mon, 7 May 2012 04:24:51 +0000
4Subject: [PATCH 45/56] cdc_ether: add Novatel USB551L device IDs for
5 FLAG_WWAN
6
7commit 4e6304b8420aba5311ba21fd68dab2924ae4d91a upstream.
8
9Needs to be tagged with FLAG_WWAN, which since it has generic
10descriptors, won't happen if we don't override the generic
11driver info.
12
13Cc: Oliver Neukum <oliver@neukum.org>
14Signed-off-by: Dan Williams <dcbw@redhat.com>
15Acked-by: Oliver Neukum <oliver@neukum.org>
16Signed-off-by: David S. Miller <davem@davemloft.net>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 drivers/net/usb/cdc_ether.c | 16 ++++++++++++++++
20 1 files changed, 16 insertions(+), 0 deletions(-)
21
22diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
23index eac4886..2ba40cf 100644
24--- a/drivers/net/usb/cdc_ether.c
25+++ b/drivers/net/usb/cdc_ether.c
26@@ -482,6 +482,7 @@ static const struct driver_info wwan_info = {
27 /*-------------------------------------------------------------------------*/
28
29 #define HUAWEI_VENDOR_ID 0x12D1
30+#define NOVATEL_VENDOR_ID 0x1410
31
32 static const struct usb_device_id products [] = {
33 /*
34@@ -599,6 +600,21 @@ static const struct usb_device_id products [] = {
35 * because of bugs/quirks in a given product (like Zaurus, above).
36 */
37 {
38+ /* Novatel USB551L */
39+ /* This match must come *before* the generic CDC-ETHER match so that
40+ * we get FLAG_WWAN set on the device, since it's descriptors are
41+ * generic CDC-ETHER.
42+ */
43+ .match_flags = USB_DEVICE_ID_MATCH_VENDOR
44+ | USB_DEVICE_ID_MATCH_PRODUCT
45+ | USB_DEVICE_ID_MATCH_INT_INFO,
46+ .idVendor = NOVATEL_VENDOR_ID,
47+ .idProduct = 0xB001,
48+ .bInterfaceClass = USB_CLASS_COMM,
49+ .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET,
50+ .bInterfaceProtocol = USB_CDC_PROTO_NONE,
51+ .driver_info = (unsigned long)&wwan_info,
52+}, {
53 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET,
54 USB_CDC_PROTO_NONE),
55 .driver_info = (unsigned long) &cdc_info,
56--
571.7.7.6
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch
new file mode 100644
index 00000000..59cacc99
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch
@@ -0,0 +1,33 @@
1From bb7f36d5a6a8621f37a79996cfbf0f0318862fcd Mon Sep 17 00:00:00 2001
2From: Russell King <rmk+kernel@arm.linux.org.uk>
3Date: Wed, 16 May 2012 15:19:20 +0100
4Subject: [PATCH 46/56] ARM: prevent VM_GROWSDOWN mmaps extending below
5 FIRST_USER_ADDRESS
6
7commit 9b61a4d1b2064dbd0c9e61754305ac852170509f upstream.
8
9Reported-by: Al Viro <viro@zeniv.linux.org.uk>
10Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12---
13 arch/arm/mm/fault.c | 4 +++-
14 1 files changed, 3 insertions(+), 1 deletions(-)
15
16diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
17index aa33949..4b0bc37 100644
18--- a/arch/arm/mm/fault.c
19+++ b/arch/arm/mm/fault.c
20@@ -267,7 +267,9 @@ good_area:
21 return fault;
22
23 check_stack:
24- if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr))
25+ /* Don't allow expansion below FIRST_USER_ADDRESS */
26+ if (vma->vm_flags & VM_GROWSDOWN &&
27+ addr >= FIRST_USER_ADDRESS && !expand_stack(vma, addr))
28 goto good_area;
29 out:
30 return fault;
31--
321.7.7.6
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch
new file mode 100644
index 00000000..2b95a674
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch
@@ -0,0 +1,49 @@
1From 4fb637e8e8bd6149d99d92389a104494bb234540 Mon Sep 17 00:00:00 2001
2From: Chris Metcalf <cmetcalf@tilera.com>
3Date: Wed, 16 May 2012 14:54:20 -0400
4Subject: [PATCH 47/56] arch/tile: apply commit 74fca9da0 to the compat signal
5 handling as well
6
7commit a134d228298c6aa9007205c6b81cae0cac0acb5d upstream.
8
9This passes siginfo and mcontext to tilegx32 signal handlers that
10don't have SA_SIGINFO set just as we have been doing for tilegx64.
11
12Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 arch/tile/kernel/compat_signal.c | 12 +++++-------
16 1 files changed, 5 insertions(+), 7 deletions(-)
17
18diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c
19index a7869ad..41459d8 100644
20--- a/arch/tile/kernel/compat_signal.c
21+++ b/arch/tile/kernel/compat_signal.c
22@@ -406,19 +406,17 @@ int compat_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
23 * Set up registers for signal handler.
24 * Registers that we don't modify keep the value they had from
25 * user-space at the time we took the signal.
26+ * We always pass siginfo and mcontext, regardless of SA_SIGINFO,
27+ * since some things rely on this (e.g. glibc's debug/segfault.c).
28 */
29 regs->pc = ptr_to_compat_reg(ka->sa.sa_handler);
30 regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */
31 regs->sp = ptr_to_compat_reg(frame);
32 regs->lr = restorer;
33 regs->regs[0] = (unsigned long) usig;
34-
35- if (ka->sa.sa_flags & SA_SIGINFO) {
36- /* Need extra arguments, so mark to restore caller-saves. */
37- regs->regs[1] = ptr_to_compat_reg(&frame->info);
38- regs->regs[2] = ptr_to_compat_reg(&frame->uc);
39- regs->flags |= PT_FLAGS_CALLER_SAVES;
40- }
41+ regs->regs[1] = ptr_to_compat_reg(&frame->info);
42+ regs->regs[2] = ptr_to_compat_reg(&frame->uc);
43+ regs->flags |= PT_FLAGS_CALLER_SAVES;
44
45 /*
46 * Notify any tracer that was single-stepping it.
47--
481.7.7.6
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch
new file mode 100644
index 00000000..8daf07a9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch
@@ -0,0 +1,38 @@
1From efbb3ae65b6bd81ebb5b7487fdfc4d65812b0825 Mon Sep 17 00:00:00 2001
2From: Jonathan Brassow <jbrassow@redhat.com>
3Date: Wed, 16 May 2012 04:06:14 -0500
4Subject: [PATCH 48/56] MD: Add del_timer_sync to mddev_suspend (fix nasty
5 panic)
6
7commit 0d9f4f135eb6dea06bdcb7065b1e4ff78274a5e9 upstream.
8
9Use del_timer_sync to remove timer before mddev_suspend finishes.
10
11We don't want a timer going off after an mddev_suspend is called. This is
12especially true with device-mapper, since it can call the destructor function
13immediately following a suspend. This results in the removal (kfree) of the
14structures upon which the timer depends - resulting in a very ugly panic.
15Therefore, we add a del_timer_sync to mddev_suspend to prevent this.
16
17Signed-off-by: NeilBrown <neilb@suse.de>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/md/md.c | 2 ++
21 1 files changed, 2 insertions(+), 0 deletions(-)
22
23diff --git a/drivers/md/md.c b/drivers/md/md.c
24index 065ab4f..adcd850 100644
25--- a/drivers/md/md.c
26+++ b/drivers/md/md.c
27@@ -392,6 +392,8 @@ void mddev_suspend(struct mddev *mddev)
28 synchronize_rcu();
29 wait_event(mddev->sb_wait, atomic_read(&mddev->active_io) == 0);
30 mddev->pers->quiesce(mddev, 1);
31+
32+ del_timer_sync(&mddev->safemode_timer);
33 }
34 EXPORT_SYMBOL_GPL(mddev_suspend);
35
36--
371.7.7.6
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch
new file mode 100644
index 00000000..9422e65f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch
@@ -0,0 +1,78 @@
1From 08671b3fdc83c369484ee2b4e9bfab6b0a6ee48d Mon Sep 17 00:00:00 2001
2From: Nicholas Bellinger <nab@linux-iscsi.org>
3Date: Wed, 16 May 2012 16:05:26 -0700
4Subject: [PATCH 49/56] target: Fix bug in handling of FILEIO + block_device
5 resize ops
6
7commit cd9323fd68aee3c1c6b5b21e5746c9d1b586fb58 upstream.
8
9This patch fixes a bug in the handling of FILEIO w/ underlying block_device
10resize operations where the original fd_dev->fd_dev_size was incorrectly being
11used in fd_get_blocks() for READ_CAPACITY response payloads.
12
13This patch avoids using fd_dev->fd_dev_size for FILEIO devices with
14an underlying block_device, and instead changes fd_get_blocks() to
15get the sector count directly from i_size_read() as recommended by hch.
16
17Reported-by: Christoph Hellwig <hch@lst.de>
18Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 drivers/target/target_core_file.c | 22 ++++++++++++++++------
22 1 files changed, 16 insertions(+), 6 deletions(-)
23
24diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
25index b4864fb..cad8b92 100644
26--- a/drivers/target/target_core_file.c
27+++ b/drivers/target/target_core_file.c
28@@ -170,6 +170,7 @@ static struct se_device *fd_create_virtdevice(
29 inode = file->f_mapping->host;
30 if (S_ISBLK(inode->i_mode)) {
31 struct request_queue *q;
32+ unsigned long long dev_size;
33 /*
34 * Setup the local scope queue_limits from struct request_queue->limits
35 * to pass into transport_add_device_to_core_hba() as struct se_dev_limits.
36@@ -184,13 +185,12 @@ static struct se_device *fd_create_virtdevice(
37 * one (1) logical sector from underlying struct block_device
38 */
39 fd_dev->fd_block_size = bdev_logical_block_size(inode->i_bdev);
40- fd_dev->fd_dev_size = (i_size_read(file->f_mapping->host) -
41+ dev_size = (i_size_read(file->f_mapping->host) -
42 fd_dev->fd_block_size);
43
44 pr_debug("FILEIO: Using size: %llu bytes from struct"
45 " block_device blocks: %llu logical_block_size: %d\n",
46- fd_dev->fd_dev_size,
47- div_u64(fd_dev->fd_dev_size, fd_dev->fd_block_size),
48+ dev_size, div_u64(dev_size, fd_dev->fd_block_size),
49 fd_dev->fd_block_size);
50 } else {
51 if (!(fd_dev->fbd_flags & FBDF_HAS_SIZE)) {
52@@ -606,10 +606,20 @@ static u32 fd_get_device_type(struct se_device *dev)
53 static sector_t fd_get_blocks(struct se_device *dev)
54 {
55 struct fd_dev *fd_dev = dev->dev_ptr;
56- unsigned long long blocks_long = div_u64(fd_dev->fd_dev_size,
57- dev->se_sub_dev->se_dev_attrib.block_size);
58+ struct file *f = fd_dev->fd_file;
59+ struct inode *i = f->f_mapping->host;
60+ unsigned long long dev_size;
61+ /*
62+ * When using a file that references an underlying struct block_device,
63+ * ensure dev_size is always based on the current inode size in order
64+ * to handle underlying block_device resize operations.
65+ */
66+ if (S_ISBLK(i->i_mode))
67+ dev_size = (i_size_read(i) - fd_dev->fd_block_size);
68+ else
69+ dev_size = fd_dev->fd_dev_size;
70
71- return blocks_long;
72+ return div_u64(dev_size, dev->se_sub_dev->se_dev_attrib.block_size);
73 }
74
75 static struct se_subsystem_api fileio_template = {
76--
771.7.7.6
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch
new file mode 100644
index 00000000..1e3a68b3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch
@@ -0,0 +1,57 @@
1From 8c6c5b3fb938b8af747c79cfe8c5cb39db72202a Mon Sep 17 00:00:00 2001
2From: Willy Tarreau <w@1wt.eu>
3Date: Thu, 17 May 2012 11:14:14 +0000
4Subject: [PATCH 50/56] tcp: do_tcp_sendpages() must try to push data out on
5 oom conditions
6
7commit bad115cfe5b509043b684d3a007ab54b80090aa1 upstream.
8
9Since recent changes on TCP splicing (starting with commits 2f533844
10"tcp: allow splice() to build full TSO packets" and 35f9c09f "tcp:
11tcp_sendpages() should call tcp_push() once"), I started seeing
12massive stalls when forwarding traffic between two sockets using
13splice() when pipe buffers were larger than socket buffers.
14
15Latest changes (net: netdev_alloc_skb() use build_skb()) made the
16problem even more apparent.
17
18The reason seems to be that if do_tcp_sendpages() fails on out of memory
19condition without being able to send at least one byte, tcp_push() is not
20called and the buffers cannot be flushed.
21
22After applying the attached patch, I cannot reproduce the stalls at all
23and the data rate it perfectly stable and steady under any condition
24which previously caused the problem to be permanent.
25
26The issue seems to have been there since before the kernel migrated to
27git, which makes me think that the stalls I occasionally experienced
28with tux during stress-tests years ago were probably related to the
29same issue.
30
31This issue was first encountered on 3.0.31 and 3.2.17, so please backport
32to -stable.
33
34Signed-off-by: Willy Tarreau <w@1wt.eu>
35Acked-by: Eric Dumazet <edumazet@google.com>
36Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
37---
38 net/ipv4/tcp.c | 3 +--
39 1 files changed, 1 insertions(+), 2 deletions(-)
40
41diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
42index 8f826b1..11ba922 100644
43--- a/net/ipv4/tcp.c
44+++ b/net/ipv4/tcp.c
45@@ -851,8 +851,7 @@ new_segment:
46 wait_for_sndbuf:
47 set_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
48 wait_for_memory:
49- if (copied)
50- tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH);
51+ tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH);
52
53 if ((err = sk_stream_wait_memory(sk, &timeo)) != 0)
54 goto do_error;
55--
561.7.7.6
57
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch
new file mode 100644
index 00000000..1a3cdf4a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch
@@ -0,0 +1,40 @@
1From 4cad7c8fe708e7795f298240e246cec993a7e74b Mon Sep 17 00:00:00 2001
2From: Tushar Dave <tushar.n.dave@intel.com>
3Date: Thu, 17 May 2012 01:04:50 +0000
4Subject: [PATCH 51/56] e1000: Prevent reset task killing itself.
5
6commit 8ce6909f77ba1b7bcdea65cc2388fd1742b6d669 upstream.
7
8Killing reset task while adapter is resetting causes deadlock.
9Only kill reset task if adapter is not resetting.
10Ref bug #43132 on bugzilla.kernel.org
11
12Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
13Tested-by: Aaron Brown <aaron.f.brown@intel.com>
14Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +++++-
19 1 files changed, 5 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
22index cf480b5..de00805 100644
23--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
24+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
25@@ -494,7 +494,11 @@ out:
26 static void e1000_down_and_stop(struct e1000_adapter *adapter)
27 {
28 set_bit(__E1000_DOWN, &adapter->flags);
29- cancel_work_sync(&adapter->reset_task);
30+
31+ /* Only kill reset task if adapter is not resetting */
32+ if (!test_bit(__E1000_RESETTING, &adapter->flags))
33+ cancel_work_sync(&adapter->reset_task);
34+
35 cancel_delayed_work_sync(&adapter->watchdog_task);
36 cancel_delayed_work_sync(&adapter->phy_info_task);
37 cancel_delayed_work_sync(&adapter->fifo_stall_task);
38--
391.7.7.6
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch
new file mode 100644
index 00000000..297eb07e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch
@@ -0,0 +1,37 @@
1From e3478e0a8885a446eed02cd159394c0ea74ecfd0 Mon Sep 17 00:00:00 2001
2From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
3Date: Fri, 30 Dec 2011 18:28:01 +0200
4Subject: [PATCH 52/56] mtd: map.h: fix arm cross-build failure
5
6commit 4a42243886b87cd28a39b192161767c2af851a55 upstream.
7
8This patch fixes the following build failure:
9In file included from include/linux/mtd/qinfo.h:4:0,
10 from include/linux/mtd/pfow.h:7,
11 from drivers/mtd/lpddr/lpddr_cmds.c:27:
12include/linux/mtd/map.h: In function 'inline_map_read':
13include/linux/mtd/map.h:409:3: error: implicit declaration of function 'BUILD_BUG_ON' [-Werror=implicit-function-declaration]
14
15Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
16Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18---
19 include/linux/mtd/map.h | 2 +-
20 1 files changed, 1 insertions(+), 1 deletions(-)
21
22diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h
23index a9e6ba4..daad4e6 100644
24--- a/include/linux/mtd/map.h
25+++ b/include/linux/mtd/map.h
26@@ -26,7 +26,7 @@
27 #include <linux/list.h>
28 #include <linux/string.h>
29 #include <linux/bug.h>
30-
31+#include <linux/kernel.h>
32
33 #include <asm/unaligned.h>
34 #include <asm/system.h>
35--
361.7.7.6
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch
new file mode 100644
index 00000000..5a0b0d70
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch
@@ -0,0 +1,38 @@
1From 19ccd03475be60d00e4ac87f05020c31201ae29d Mon Sep 17 00:00:00 2001
2From: Stefan Roese <sr@denx.de>
3Date: Tue, 10 Jan 2012 01:47:40 +0000
4Subject: [PATCH 53/56] stmmac: Fix compilation error in mmc_core.c
5
6commit 1dd8117e3320fb42ec40ef2ace982871572d34ed upstream.
7
8Fix this error:
9
10 CC drivers/net/ethernet/stmicro/stmmac/mmc_core.o
11drivers/net/ethernet/stmicro/stmmac/mmc_core.c: In function 'dwmac_mmc_ctrl':
12drivers/net/ethernet/stmicro/stmmac/mmc_core.c:143:2: error: implicit
13 declaration of function 'pr_debug' [-Werror=implicit-function-declaration]
14
15Signed-off-by: Stefan Roese <sr@denx.de>
16Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
17Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 1 +
22 1 files changed, 1 insertions(+), 0 deletions(-)
23
24diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
25index 41e6b33..c07cfe9 100644
26--- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
27+++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
28@@ -22,6 +22,7 @@
29 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
30 *******************************************************************************/
31
32+#include <linux/kernel.h>
33 #include <linux/io.h>
34 #include "mmc.h"
35
36--
371.7.7.6
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0054-pktgen-fix-crash-at-module-unload.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0054-pktgen-fix-crash-at-module-unload.patch
new file mode 100644
index 00000000..3d38f55f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0054-pktgen-fix-crash-at-module-unload.patch
@@ -0,0 +1,72 @@
1From 0db05d78c77595936a7494aa049850169c49b861 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Wed, 9 May 2012 13:29:51 +0000
4Subject: [PATCH 54/56] pktgen: fix crash at module unload
5
6commit c57b54684060c8aced64a5b78ff69ff289af97b9 upstream.
7
8commit 7d3d43dab4e9 (net: In unregister_netdevice_notifier unregister
9the netdevices.) makes pktgen crashing at module unload.
10
11[ 296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267
12[ 296.820719] lock: ffff880310c38000, .magic: ffff8803, .owner: <none>/-1, .owner_cpu: -1
13[ 296.820943] Pid: 3267, comm: rmmod Not tainted 3.4.0-rc5+ #254
14[ 296.821079] Call Trace:
15[ 296.821211] [<ffffffff8168a715>] spin_dump+0x8a/0x8f
16[ 296.821345] [<ffffffff8168a73b>] spin_bug+0x21/0x26
17[ 296.821507] [<ffffffff812b4741>] do_raw_spin_lock+0x131/0x140
18[ 296.821648] [<ffffffff8169188e>] _raw_spin_lock+0x1e/0x20
19[ 296.821786] [<ffffffffa00cc0fd>] __pktgen_NN_threads+0x4d/0x140 [pktgen]
20[ 296.821928] [<ffffffffa00ccf8d>] pktgen_device_event+0x10d/0x1e0 [pktgen]
21[ 296.822073] [<ffffffff8154ed4f>] unregister_netdevice_notifier+0x7f/0x100
22[ 296.822216] [<ffffffffa00d2a0b>] pg_cleanup+0x48/0x73 [pktgen]
23[ 296.822357] [<ffffffff8109528e>] sys_delete_module+0x17e/0x2a0
24[ 296.822502] [<ffffffff81699652>] system_call_fastpath+0x16/0x1b
25
26Hold the pktgen_thread_lock while splicing pktgen_threads, and test
27pktgen_exiting in pktgen_device_event() to make unload faster.
28
29Signed-off-by: Eric Dumazet <edumazet@google.com>
30Cc: Eric W. Biederman <ebiederm@xmission.com>
31Signed-off-by: David S. Miller <davem@davemloft.net>
32Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
33---
34 net/core/pktgen.c | 10 ++++++++--
35 1 files changed, 8 insertions(+), 2 deletions(-)
36
37diff --git a/net/core/pktgen.c b/net/core/pktgen.c
38index 0001c24..657e5f9 100644
39--- a/net/core/pktgen.c
40+++ b/net/core/pktgen.c
41@@ -1932,7 +1932,7 @@ static int pktgen_device_event(struct notifier_block *unused,
42 {
43 struct net_device *dev = ptr;
44
45- if (!net_eq(dev_net(dev), &init_net))
46+ if (!net_eq(dev_net(dev), &init_net) || pktgen_exiting)
47 return NOTIFY_DONE;
48
49 /* It is OK that we do not hold the group lock right now,
50@@ -3758,12 +3758,18 @@ static void __exit pg_cleanup(void)
51 {
52 struct pktgen_thread *t;
53 struct list_head *q, *n;
54+ struct list_head list;
55
56 /* Stop all interfaces & threads */
57 pktgen_exiting = true;
58
59- list_for_each_safe(q, n, &pktgen_threads) {
60+ mutex_lock(&pktgen_thread_lock);
61+ list_splice(&list, &pktgen_threads);
62+ mutex_unlock(&pktgen_thread_lock);
63+
64+ list_for_each_safe(q, n, &list) {
65 t = list_entry(q, struct pktgen_thread, th_list);
66+ list_del(&t->th_list);
67 kthread_stop(t->tsk);
68 kfree(t);
69 }
70--
711.7.7.6
72
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0055-pktgen-fix-module-unload-for-good.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0055-pktgen-fix-module-unload-for-good.patch
new file mode 100644
index 00000000..1f86f355
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0055-pktgen-fix-module-unload-for-good.patch
@@ -0,0 +1,48 @@
1From 20b87e11f8ebb8b1fa74b668770c7f2b301b40b4 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <edumazet@google.com>
3Date: Thu, 17 May 2012 23:52:26 +0000
4Subject: [PATCH 55/56] pktgen: fix module unload for good
5
6commit d4b1133558e0d417342d5d2c49e4c35b428ff20d upstream.
7
8commit c57b5468406 (pktgen: fix crash at module unload) did a very poor
9job with list primitives.
10
111) list_splice() arguments were in the wrong order
12
132) list_splice(list, head) has undefined behavior if head is not
14initialized.
15
163) We should use the list_splice_init() variant to clear pktgen_threads
17list.
18
19Signed-off-by: Eric Dumazet <edumazet@google.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 net/core/pktgen.c | 4 ++--
24 1 files changed, 2 insertions(+), 2 deletions(-)
25
26diff --git a/net/core/pktgen.c b/net/core/pktgen.c
27index 657e5f9..df878de 100644
28--- a/net/core/pktgen.c
29+++ b/net/core/pktgen.c
30@@ -3758,13 +3758,13 @@ static void __exit pg_cleanup(void)
31 {
32 struct pktgen_thread *t;
33 struct list_head *q, *n;
34- struct list_head list;
35+ LIST_HEAD(list);
36
37 /* Stop all interfaces & threads */
38 pktgen_exiting = true;
39
40 mutex_lock(&pktgen_thread_lock);
41- list_splice(&list, &pktgen_threads);
42+ list_splice_init(&pktgen_threads, &list);
43 mutex_unlock(&pktgen_thread_lock);
44
45 list_for_each_safe(q, n, &list) {
46--
471.7.7.6
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0056-Linux-3.2.18.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0056-Linux-3.2.18.patch
new file mode 100644
index 00000000..a8809ed1
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0056-Linux-3.2.18.patch
@@ -0,0 +1,24 @@
1From c04a2fde6b61eb063267b611c43371e61d0cabc3 Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Sun, 20 May 2012 22:56:54 +0100
4Subject: [PATCH 56/56] Linux 3.2.18
5
6---
7 Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index 4c4efa3..add68f1 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,6 +1,6 @@
15 VERSION = 3
16 PATCHLEVEL = 2
17-SUBLEVEL = 17
18+SUBLEVEL = 18
19 EXTRAVERSION =
20 NAME = Saber-toothed Squirrel
21
22--
231.7.7.6
24
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
index 7df217d0..cd788482 100644
--- a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
+++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
@@ -12,7 +12,7 @@ MULTI_CONFIG_BASE_SUFFIX = ""
12 12
13BRANCH = "v3.2-staging" 13BRANCH = "v3.2-staging"
14SRCREV = "720e07b4c1f687b61b147b31c698cb6816d72f01" 14SRCREV = "720e07b4c1f687b61b147b31c698cb6816d72f01"
15MACHINE_KERNEL_PR_append = "o+gitr${SRCREV}" 15MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}"
16 16
17COMPATIBLE_MACHINE = "(ti33x)" 17COMPATIBLE_MACHINE = "(ti33x)"
18 18
@@ -932,6 +932,227 @@ PATCHES_OVER_PSP = " \
932 file://3.2.16/0066-drm-radeon-disable-MSI-on-RV515.patch \ 932 file://3.2.16/0066-drm-radeon-disable-MSI-on-RV515.patch \
933 file://3.2.16/0067-drm-radeon-fix-load-detect-on-rn50-with-hardcoded-ED.patch \ 933 file://3.2.16/0067-drm-radeon-fix-load-detect-on-rn50-with-hardcoded-ED.patch \
934 file://3.2.16/0068-Linux-3.2.16.patch \ 934 file://3.2.16/0068-Linux-3.2.16.patch \
935 file://3.2.17/0001-crypto-sha512-Fix-byte-counter-overflow-in-SHA-512.patch \
936 file://3.2.17/0002-ALSA-hda-conexant-Don-t-set-HP-pin-control-bit-uncon.patch \
937 file://3.2.17/0003-ALSA-hda-conexant-Set-up-the-missing-docking-station.patch \
938 file://3.2.17/0004-ARM-clps711x-serial-driver-hungs-are-a-result-of-cal.patch \
939 file://3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch \
940 file://3.2.17/0006-mmc-fixes-for-eMMC-v4.5-discard-operation.patch \
941 file://3.2.17/0007-mmc-fixes-for-eMMC-v4.5-sanitize-operation.patch \
942 file://3.2.17/0008-mmc-unbreak-sdhci-esdhc-imx-on-i.MX25.patch \
943 file://3.2.17/0009-xen-gntdev-do-not-set-VM_PFNMAP.patch \
944 file://3.2.17/0010-xen-xenbus-Add-quirk-to-deal-with-misconfigured-back.patch \
945 file://3.2.17/0011-USB-yurex-Remove-allocation-of-coherent-buffer-for-s.patch \
946 file://3.2.17/0012-USB-yurex-Fix-missing-URB_NO_TRANSFER_DMA_MAP-flag-i.patch \
947 file://3.2.17/0013-uwb-fix-use-of-del_timer_sync-in-interrupt.patch \
948 file://3.2.17/0014-uwb-fix-error-handling.patch \
949 file://3.2.17/0015-davinci_mdio-Fix-MDIO-timeout-check.patch \
950 file://3.2.17/0016-mwifiex-update-pcie8766-scratch-register-addresses.patch \
951 file://3.2.17/0017-brcm80211-smac-resume-transmit-fifo-upon-receiving-f.patch \
952 file://3.2.17/0018-rc-core-set-mode-for-winbond-cir.patch \
953 file://3.2.17/0019-drxk-Does-not-unlock-mutex-if-sanity-check-failed-in.patch \
954 file://3.2.17/0020-cfg80211-fix-interface-combinations-check.patch \
955 file://3.2.17/0021-Fix-modpost-failures-in-fedora-17.patch \
956 file://3.2.17/0022-mm-fix-s390-BUG-by-__set_page_dirty_no_writeback-on-.patch \
957 file://3.2.17/0023-md-fix-possible-corruption-of-array-metadata-on-shut.patch \
958 file://3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch \
959 file://3.2.17/0025-USB-serial-cp210x-Fixed-usb_control_msg-timeout-valu.patch \
960 file://3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch \
961 file://3.2.17/0027-drivers-tty-amiserial.c-add-missing-tty_unlock.patch \
962 file://3.2.17/0028-USB-sierra-avoid-QMI-wwan-interface-on-MC77xx.patch \
963 file://3.2.17/0029-EHCI-fix-criterion-for-resuming-the-root-hub.patch \
964 file://3.2.17/0030-EHCI-always-clear-the-STS_FLR-status-bit.patch \
965 file://3.2.17/0031-USB-fix-deadlock-in-bConfigurationValue-attribute-me.patch \
966 file://3.2.17/0032-usb-gadget-eliminate-NULL-pointer-dereference-bugfix.patch \
967 file://3.2.17/0033-usb-musb-omap-fix-crash-when-musb-glue-omap-gets-ini.patch \
968 file://3.2.17/0034-usb-musb-omap-fix-the-error-check-for-pm_runtime_get.patch \
969 file://3.2.17/0035-PCI-Add-quirk-for-still-enabled-interrupts-on-Intel-.patch \
970 file://3.2.17/0036-ext4-fix-endianness-breakage-in-ext4_split_extent_at.patch \
971 file://3.2.17/0037-KVM-unmap-pages-from-the-iommu-when-slots-are-remove.patch \
972 file://3.2.17/0038-dell-laptop-add-3-machines-that-has-touchpad-LED.patch \
973 file://3.2.17/0039-dell-laptop-touchpad-LED-should-persist-its-status-a.patch \
974 file://3.2.17/0040-Bluetooth-Add-support-for-Atheros-04ca-3005.patch \
975 file://3.2.17/0041-Don-t-limit-non-nested-epoll-paths.patch \
976 file://3.2.17/0042-spi-Fix-device-unregistration-when-unregistering-the.patch \
977 file://3.2.17/0043-spi-mpc83xx-fix-NULL-pdata-dereference-bug.patch \
978 file://3.2.17/0044-rt2800-Add-support-for-the-Fujitsu-Stylistic-Q550.patch \
979 file://3.2.17/0045-rt2x00-Identify-rt2800usb-chipsets.patch \
980 file://3.2.17/0046-nfsd-fix-b0rken-error-value-for-setattr-on-read-only.patch \
981 file://3.2.17/0047-nfsd-fix-error-values-returned-by-nfsd4_lockt-when-n.patch \
982 file://3.2.17/0048-nfsd-fix-endianness-breakage-in-TEST_STATEID-handlin.patch \
983 file://3.2.17/0049-nfsd-fix-compose_entry_fh-failure-exits.patch \
984 file://3.2.17/0050-btrfs-btrfs_root_readonly-broken-on-big-endian.patch \
985 file://3.2.17/0051-ocfs2-l_next_free_req-breakage-on-big-endian.patch \
986 file://3.2.17/0052-ocfs-rl_used-breakage-on-big-endian.patch \
987 file://3.2.17/0053-ocfs2-rl_count-endianness-breakage.patch \
988 file://3.2.17/0054-ocfs2-e_leaf_clusters-endianness-breakage.patch \
989 file://3.2.17/0055-lockd-fix-the-endianness-bug.patch \
990 file://3.2.17/0056-usb-dwc3-ep0-increment-actual-on-bounced-ep0-case.patch \
991 file://3.2.17/0057-net-fix-proc-net-dev-regression.patch \
992 file://3.2.17/0058-nfsd-don-t-fail-unchecked-creates-of-non-special-fil.patch \
993 file://3.2.17/0059-ppp-Don-t-stop-and-restart-queue-on-every-TX-packet.patch \
994 file://3.2.17/0060-tcp-allow-splice-to-build-full-TSO-packets.patch \
995 file://3.2.17/0061-sctp-Allow-struct-sctp_event_subscribe-to-grow-witho.patch \
996 file://3.2.17/0062-bridge-Do-not-send-queries-on-multicast-group-leaves.patch \
997 file://3.2.17/0063-ipv6-fix-array-index-in-ip6_mc_add_src.patch \
998 file://3.2.17/0064-phonet-Check-input-from-user-before-allocating.patch \
999 file://3.2.17/0065-bonding-properly-unset-current_arp_slave-on-slave-li.patch \
1000 file://3.2.17/0066-wimax-i2400m-prevent-a-possible-kernel-bug-due-to-mi.patch \
1001 file://3.2.17/0067-netlink-fix-races-after-skb-queueing.patch \
1002 file://3.2.17/0068-net-fix-a-race-in-sock_queue_err_skb.patch \
1003 file://3.2.17/0069-tcp-fix-tcp_rcv_rtt_update-use-of-an-unscaled-RTT-sa.patch \
1004 file://3.2.17/0070-net-allow-pskb_expand_head-to-get-maximum-tailroom.patch \
1005 file://3.2.17/0071-tcp-fix-tcp_trim_head.patch \
1006 file://3.2.17/0072-tcp-avoid-order-1-allocations-on-wifi-and-tx-path.patch \
1007 file://3.2.17/0073-atl1-fix-kernel-panic-in-case-of-DMA-errors.patch \
1008 file://3.2.17/0074-8139cp-set-intr-mask-after-its-handler-is-registered.patch \
1009 file://3.2.17/0075-net-smsc911x-fix-skb-handling-in-receive-path.patch \
1010 file://3.2.17/0076-net-ethernet-ks8851_mll-fix-rx-frame-buffer-overflow.patch \
1011 file://3.2.17/0077-net_sched-gred-Fix-oops-in-gred_dump-in-WRED-mode.patch \
1012 file://3.2.17/0078-net-usb-smsc75xx-fix-mtu.patch \
1013 file://3.2.17/0079-dummy-Add-ndo_uninit.patch \
1014 file://3.2.17/0080-tcp-fix-tcp_grow_window-for-large-incoming-frames.patch \
1015 file://3.2.17/0081-netns-do-not-leak-net_generic-data-on-failed-init.patch \
1016 file://3.2.17/0082-ksz884x-don-t-copy-too-much-in-netdev_set_mac_addres.patch \
1017 file://3.2.17/0083-net-ax25-Reorder-ax25_exit-to-remove-races.patch \
1018 file://3.2.17/0084-tcp-fix-TCP_MAXSEG-for-established-IPv6-passive-sock.patch \
1019 file://3.2.17/0085-nfs-Enclose-hostname-in-brackets-when-needed-in-nfs_.patch \
1020 file://3.2.17/0086-NFSv4-Ensure-that-the-LOCK-code-sets-exception-inode.patch \
1021 file://3.2.17/0087-NFSv4-Ensure-that-we-check-lock-exclusive-shared-typ.patch \
1022 file://3.2.17/0088-NFS-put-open-context-on-error-in-nfs_pagein_multi.patch \
1023 file://3.2.17/0089-NFS-put-open-context-on-error-in-nfs_flush_multi.patch \
1024 file://3.2.17/0090-x86-microcode-Fix-sysfs-warning-during-module-unload.patch \
1025 file://3.2.17/0091-x86-apic-APIC-code-touches-invalid-MSR-on-P5-class-m.patch \
1026 file://3.2.17/0092-Revert-autofs-work-around-unhappy-compat-problem-on-.patch \
1027 file://3.2.17/0093-xen-correctly-check-for-pending-events-when-restorin.patch \
1028 file://3.2.17/0094-xen-smp-Fix-crash-when-booting-with-ACPI-hotplug-CPU.patch \
1029 file://3.2.17/0095-ASoC-dapm-Ensure-power-gets-managed-for-line-widgets.patch \
1030 file://3.2.17/0096-ASoC-wm8994-Improve-sequencing-of-AIF-channel-enable.patch \
1031 file://3.2.17/0097-dmaengine-at_hdmac-remove-clear-on-read-in-atc_dosta.patch \
1032 file://3.2.17/0098-sched-Fix-OOPS-when-build_sched_domains-percpu-alloc.patch \
1033 file://3.2.17/0099-tracing-Fix-stacktrace-of-latency-tracers-irqsoff-an.patch \
1034 file://3.2.17/0100-hwmon-fam15h_power-fix-bogus-values-with-current-BIO.patch \
1035 file://3.2.17/0101-hwmon-fam15h_power-Fix-pci_device_id-array.patch \
1036 file://3.2.17/0102-dell-laptop-Terminate-quirks-list-properly.patch \
1037 file://3.2.17/0103-drm-radeon-kms-need-to-set-up-ss-on-DP-bridges-as-we.patch \
1038 file://3.2.17/0104-drm-i915-handle-input-output-sdvo-timings-separately.patch \
1039 file://3.2.17/0105-drm-i915-relative_constants_mode-race-fix.patch \
1040 file://3.2.17/0106-drm-i915-Force-sync-command-ordering-Gen6.patch \
1041 file://3.2.17/0107-drm-i915-Set-the-Stencil-Cache-eviction-policy-to-no.patch \
1042 file://3.2.17/0108-drm-i915-fix-integer-overflow-in-i915_gem_execbuffer.patch \
1043 file://3.2.17/0109-drm-i915-fix-integer-overflow-in-i915_gem_do_execbuf.patch \
1044 file://3.2.17/0110-nl80211-ensure-interface-is-up-in-various-APIs.patch \
1045 file://3.2.17/0111-ALSA-HDA-Add-external-mic-quirk-for-Asus-Zenbook-UX3.patch \
1046 file://3.2.17/0112-USB-cdc-wdm-fix-race-leading-leading-to-memory-corru.patch \
1047 file://3.2.17/0113-USB-EHCI-fix-crash-during-suspend-on-ASUS-computers.patch \
1048 file://3.2.17/0114-USB-gadget-storage-gadgets-send-wrong-error-code-for.patch \
1049 file://3.2.17/0115-usb-gadget-dummy-do-not-call-pullup-on-udc_stop.patch \
1050 file://3.2.17/0116-usb-gadget-uvc-uvc_request_data-length-field-must-be.patch \
1051 file://3.2.17/0117-pipes-add-a-packetized-pipe-mode-for-writing.patch \
1052 file://3.2.17/0118-autofs-make-the-autofsv5-packet-file-descriptor-use-.patch \
1053 file://3.2.17/0119-ARM-7396-1-errata-only-handle-ARM-erratum-326103-on-.patch \
1054 file://3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch \
1055 file://3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch \
1056 file://3.2.17/0122-ARM-7403-1-tls-remove-covert-channel-via-TPIDRURW.patch \
1057 file://3.2.17/0123-ARM-7406-1-hotplug-copy-the-affinity-mask-when-force.patch \
1058 file://3.2.17/0124-libsas-fix-sas_find_bcast_phy-in-the-presence-of-vac.patch \
1059 file://3.2.17/0125-libsas-fix-false-positive-device-attached-conditions.patch \
1060 file://3.2.17/0126-efi-Add-new-variable-attributes.patch \
1061 file://3.2.17/0127-efi-Validate-UEFI-boot-variables.patch \
1062 file://3.2.17/0128-PM-Hibernate-fix-the-number-of-pages-used-for-hibern.patch \
1063 file://3.2.17/0129-drm-i915-enable-dip-before-writing-data-on-gen4.patch \
1064 file://3.2.17/0130-sched-Fix-nohz-load-accounting-again.patch \
1065 file://3.2.17/0131-efivars-Improve-variable-validation.patch \
1066 file://3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch \
1067 file://3.2.17/0133-Fix-__read_seqcount_begin-to-use-ACCESS_ONCE-for-seq.patch \
1068 file://3.2.17/0134-hwmon-coretemp-Increase-CPU-core-limit.patch \
1069 file://3.2.17/0135-nouveau-initialise-has_optimus-variable.patch \
1070 file://3.2.17/0136-hwmon-coretemp-fix-oops-on-cpu-unplug.patch \
1071 file://3.2.17/0137-libata-skip-old-error-history-when-counting-probe-tr.patch \
1072 file://3.2.17/0138-b43-only-reload-config-after-successful-initializati.patch \
1073 file://3.2.17/0139-i2c-pnx-Disable-clk-in-suspend.patch \
1074 file://3.2.17/0140-ipw2200-Fix-race-condition-in-the-command-completion.patch \
1075 file://3.2.17/0141-mac80211-fix-AP-mode-EAP-tx-for-VLAN-stations.patch \
1076 file://3.2.17/0142-rtlwifi-Fix-oops-on-unload.patch \
1077 file://3.2.17/0143-wl1251-fix-crash-on-remove-due-to-premature-kfree.patch \
1078 file://3.2.17/0144-wl1251-fix-crash-on-remove-due-to-leftover-work-item.patch \
1079 file://3.2.17/0145-iwlwifi-do-not-nulify-ctx-vif-on-reset.patch \
1080 file://3.2.17/0146-iwlwifi-fix-hardware-queue-programming.patch \
1081 file://3.2.17/0147-hfsplus-Fix-potential-buffer-overflows.patch \
1082 file://3.2.17/0148-ASoC-tlv312aic23-unbreak-resume.patch \
1083 file://3.2.17/0149-asm-generic-Use-__BITS_PER_LONG-in-statfs.h.patch \
1084 file://3.2.17/0150-x86-relocs-Remove-an-unused-variable.patch \
1085 file://3.2.17/0151-ARM-7410-1-Add-extra-clobber-registers-for-assembly-.patch \
1086 file://3.2.17/0152-ARM-7414-1-SMP-prevent-use-of-the-console-when-using.patch \
1087 file://3.2.17/0153-drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch \
1088 file://3.2.17/0154-drm-i915-Do-no-set-Stencil-Cache-eviction-LRA-w-a-on.patch \
1089 file://3.2.17/0155-xen-pte-Fix-crashes-when-trying-to-see-non-existent-.patch \
1090 file://3.2.17/0156-xen-pci-don-t-use-PCI-BIOS-service-for-configuration.patch \
1091 file://3.2.17/0157-percpu-x86-don-t-use-PMD_SIZE-as-embedded-atom_size-.patch \
1092 file://3.2.17/0158-iwlagn-allow-up-to-uCode-API-6-for-6000-devices.patch \
1093 file://3.2.17/0159-iwlwifi-use-correct-released-ucode-version.patch \
1094 file://3.2.17/0160-iwlwifi-use-6000G2B-for-6030-device-series.patch \
1095 file://3.2.17/0161-exit_signal-simplify-the-we-have-changed-execution-d.patch \
1096 file://3.2.17/0162-exit_signal-fix-the-parent-has-changed-security-doma.patch \
1097 file://3.2.17/0163-staging-r8712u-Fix-regression-caused-by-commit-8c213.patch \
1098 file://3.2.17/0164-smsc95xx-mark-link-down-on-startup-and-let-PHY-inter.patch \
1099 file://3.2.17/0165-Linux-3.2.17.patch \
1100 file://3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch \
1101 file://3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch \
1102 file://3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch \
1103 file://3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch \
1104 file://3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch \
1105 file://3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch \
1106 file://3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch \
1107 file://3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch \
1108 file://3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch \
1109 file://3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch \
1110 file://3.2.18/0011-netem-fix-possible-skb-leak.patch \
1111 file://3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch \
1112 file://3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch \
1113 file://3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch \
1114 file://3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch \
1115 file://3.2.18/0016-sungem-Fix-WakeOnLan.patch \
1116 file://3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch \
1117 file://3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch \
1118 file://3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch \
1119 file://3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch \
1120 file://3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch \
1121 file://3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch \
1122 file://3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch \
1123 file://3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch \
1124 file://3.2.18/0025-rc-Postpone-ISR-registration.patch \
1125 file://3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch \
1126 file://3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch \
1127 file://3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch \
1128 file://3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch \
1129 file://3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch \
1130 file://3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch \
1131 file://3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch \
1132 file://3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch \
1133 file://3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch \
1134 file://3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch \
1135 file://3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch \
1136 file://3.2.18/0037-ia64-Add-accept4-syscall.patch \
1137 file://3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch \
1138 file://3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch \
1139 file://3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch \
1140 file://3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch \
1141 file://3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch \
1142 file://3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch \
1143 file://3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch \
1144 file://3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch \
1145 file://3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch \
1146 file://3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch \
1147 file://3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch \
1148 file://3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch \
1149 file://3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch \
1150 file://3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch \
1151 file://3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch \
1152 file://3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch \
1153 file://3.2.18/0054-pktgen-fix-crash-at-module-unload.patch \
1154 file://3.2.18/0055-pktgen-fix-module-unload-for-good.patch \
1155 file://3.2.18/0056-Linux-3.2.18.patch \
935 file://led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch \ 1156 file://led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch \
936 \ 1157 \
937 file://beaglebone/0001-arm-boot-compressed-default-asm-arch-to-armv7-a.patch \ 1158 file://beaglebone/0001-arm-boot-compressed-default-asm-arch-to-armv7-a.patch \