From 2177f80076ebc15cc58fb521b58e49c83315f34e Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 23 May 2012 11:20:07 +0200 Subject: 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 Signed-off-by: Denys Dmytriyenko --- conf/machine/include/ti33x.inc | 2 +- ...a512-Fix-byte-counter-overflow-in-SHA-512.patch | 37 ++ ...nexant-Don-t-set-HP-pin-control-bit-uncon.patch | 43 +++ ...nexant-Set-up-the-missing-docking-station.patch | 99 ++++++ ...x-serial-driver-hungs-are-a-result-of-cal.patch | 54 +++ ...MTIMER-fix-broken-timer-clock-source-sele.patch | 58 +++ ...mmc-fixes-for-eMMC-v4.5-discard-operation.patch | 72 ++++ ...mc-fixes-for-eMMC-v4.5-sanitize-operation.patch | 136 +++++++ ...008-mmc-unbreak-sdhci-esdhc-imx-on-i.MX25.patch | 40 +++ .../0009-xen-gntdev-do-not-set-VM_PFNMAP.patch | 37 ++ ...Add-quirk-to-deal-with-misconfigured-back.patch | 151 ++++++++ ...emove-allocation-of-coherent-buffer-for-s.patch | 48 +++ ...ix-missing-URB_NO_TRANSFER_DMA_MAP-flag-i.patch | 35 ++ ...wb-fix-use-of-del_timer_sync-in-interrupt.patch | 64 ++++ .../3.2.17/0014-uwb-fix-error-handling.patch | 34 ++ .../0015-davinci_mdio-Fix-MDIO-timeout-check.patch | 44 +++ ...pdate-pcie8766-scratch-register-addresses.patch | 50 +++ ...mac-resume-transmit-fifo-upon-receiving-f.patch | 57 +++ .../0018-rc-core-set-mode-for-winbond-cir.patch | 37 ++ ...ot-unlock-mutex-if-sanity-check-failed-in.patch | 41 +++ ...cfg80211-fix-interface-combinations-check.patch | 30 ++ .../0021-Fix-modpost-failures-in-fedora-17.patch | 54 +++ ...-BUG-by-__set_page_dirty_no_writeback-on-.patch | 60 ++++ ...ible-corruption-of-array-metadata-on-shut.patch | 51 +++ ...-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch | 45 +++ ...cp210x-Fixed-usb_control_msg-timeout-valu.patch | 54 +++ ...ch_uart-Fix-dma-channel-unallocated-issue.patch | 55 +++ ...rs-tty-amiserial.c-add-missing-tty_unlock.patch | 36 ++ ...sierra-avoid-QMI-wwan-interface-on-MC77xx.patch | 60 ++++ ...I-fix-criterion-for-resuming-the-root-hub.patch | 48 +++ ...-EHCI-always-clear-the-STS_FLR-status-bit.patch | 46 +++ ...dlock-in-bConfigurationValue-attribute-me.patch | 116 ++++++ ...eliminate-NULL-pointer-dereference-bugfix.patch | 56 +++ ...ap-fix-crash-when-musb-glue-omap-gets-ini.patch | 44 +++ ...ap-fix-the-error-check-for-pm_runtime_get.patch | 48 +++ ...rk-for-still-enabled-interrupts-on-Intel-.patch | 89 +++++ ...dianness-breakage-in-ext4_split_extent_at.patch | 33 ++ ...ages-from-the-iommu-when-slots-are-remove.patch | 109 ++++++ ...ptop-add-3-machines-that-has-touchpad-LED.patch | 58 +++ ...-touchpad-LED-should-persist-its-status-a.patch | 34 ++ ...uetooth-Add-support-for-Atheros-04ca-3005.patch | 64 ++++ .../0041-Don-t-limit-non-nested-epoll-paths.patch | 45 +++ ...ice-unregistration-when-unregistering-the.patch | 38 ++ ...pi-mpc83xx-fix-NULL-pdata-dereference-bug.patch | 42 +++ ...dd-support-for-the-Fujitsu-Stylistic-Q550.patch | 33 ++ .../0045-rt2x00-Identify-rt2800usb-chipsets.patch | 148 ++++++++ ...rken-error-value-for-setattr-on-read-only.patch | 45 +++ ...ror-values-returned-by-nfsd4_lockt-when-n.patch | 73 ++++ ...dianness-breakage-in-TEST_STATEID-handlin.patch | 36 ++ ...9-nfsd-fix-compose_entry_fh-failure-exits.patch | 92 +++++ ...-btrfs_root_readonly-broken-on-big-endian.patch | 33 ++ ...s2-l_next_free_req-breakage-on-big-endian.patch | 53 +++ .../0052-ocfs-rl_used-breakage-on-big-endian.patch | 58 +++ .../0053-ocfs2-rl_count-endianness-breakage.patch | 31 ++ ...ocfs2-e_leaf_clusters-endianness-breakage.patch | 40 +++ .../3.2.17/0055-lockd-fix-the-endianness-bug.patch | 45 +++ ...-ep0-increment-actual-on-bounced-ep0-case.patch | 41 +++ .../0057-net-fix-proc-net-dev-regression.patch | 185 ++++++++++ ...fail-unchecked-creates-of-non-special-fil.patch | 75 ++++ ...stop-and-restart-queue-on-every-TX-packet.patch | 65 ++++ ...cp-allow-splice-to-build-full-TSO-packets.patch | 129 +++++++ ...struct-sctp_event_subscribe-to-grow-witho.patch | 56 +++ ...ot-send-queries-on-multicast-group-leaves.patch | 199 +++++++++++ ...63-ipv6-fix-array-index-in-ip6_mc_add_src.patch | 39 +++ ...t-Check-input-from-user-before-allocating.patch | 78 +++++ ...perly-unset-current_arp_slave-on-slave-li.patch | 45 +++ ...m-prevent-a-possible-kernel-bug-due-to-mi.patch | 37 ++ ...0067-netlink-fix-races-after-skb-queueing.patch | 82 +++++ ...0068-net-fix-a-race-in-sock_queue_err_skb.patch | 43 +++ ..._rcv_rtt_update-use-of-an-unscaled-RTT-sa.patch | 50 +++ ...-pskb_expand_head-to-get-maximum-tailroom.patch | 48 +++ .../3.2.17/0071-tcp-fix-tcp_trim_head.patch | 57 +++ ...d-order-1-allocations-on-wifi-and-tx-path.patch | 134 +++++++ ...l1-fix-kernel-panic-in-case-of-DMA-errors.patch | 106 ++++++ ...intr-mask-after-its-handler-is-registered.patch | 67 ++++ ...smsc911x-fix-skb-handling-in-receive-path.patch | 78 +++++ ...t-ks8851_mll-fix-rx-frame-buffer-overflow.patch | 46 +++ ...d-gred-Fix-oops-in-gred_dump-in-WRED-mode.patch | 54 +++ .../3.2.17/0078-net-usb-smsc75xx-fix-mtu.patch | 39 +++ .../3.2.17/0079-dummy-Add-ndo_uninit.patch | 55 +++ ...tcp_grow_window-for-large-incoming-frames.patch | 40 +++ ...-not-leak-net_generic-data-on-failed-init.patch | 79 +++++ ...-t-copy-too-much-in-netdev_set_mac_addres.patch | 36 ++ ...et-ax25-Reorder-ax25_exit-to-remove-races.patch | 58 +++ ..._MAXSEG-for-established-IPv6-passive-sock.patch | 41 +++ ...-hostname-in-brackets-when-needed-in-nfs_.patch | 49 +++ ...e-that-the-LOCK-code-sets-exception-inode.patch | 54 +++ ...e-that-we-check-lock-exclusive-shared-typ.patch | 45 +++ ...open-context-on-error-in-nfs_pagein_multi.patch | 30 ++ ...-open-context-on-error-in-nfs_flush_multi.patch | 30 ++ ...de-Fix-sysfs-warning-during-module-unload.patch | 71 ++++ ...IC-code-touches-invalid-MSR-on-P5-class-m.patch | 91 +++++ ...fs-work-around-unhappy-compat-problem-on-.patch | 135 +++++++ ...ly-check-for-pending-events-when-restorin.patch | 47 +++ ...-crash-when-booting-with-ACPI-hotplug-CPU.patch | 99 ++++++ ...nsure-power-gets-managed-for-line-widgets.patch | 43 +++ ...-Improve-sequencing-of-AIF-channel-enable.patch | 389 +++++++++++++++++++++ ...t_hdmac-remove-clear-on-read-in-atc_dosta.patch | 40 +++ ...OPS-when-build_sched_domains-percpu-alloc.patch | 85 +++++ ...-stacktrace-of-latency-tracers-irqsoff-an.patch | 62 ++++ ...h_power-fix-bogus-values-with-current-BIO.patch | 93 +++++ ...wmon-fam15h_power-Fix-pci_device_id-array.patch | 49 +++ ...ell-laptop-Terminate-quirks-list-properly.patch | 32 ++ ...kms-need-to-set-up-ss-on-DP-bridges-as-we.patch | 40 +++ ...ndle-input-output-sdvo-timings-separately.patch | 182 ++++++++++ ...drm-i915-relative_constants_mode-race-fix.patch | 78 +++++ ...drm-i915-Force-sync-command-ordering-Gen6.patch | 98 ++++++ ...t-the-Stencil-Cache-eviction-policy-to-no.patch | 69 ++++ ...x-integer-overflow-in-i915_gem_execbuffer.patch | 40 +++ ...x-integer-overflow-in-i915_gem_do_execbuf.patch | 41 +++ ...11-ensure-interface-is-up-in-various-APIs.patch | 152 ++++++++ ...d-external-mic-quirk-for-Asus-Zenbook-UX3.patch | 37 ++ ...-fix-race-leading-leading-to-memory-corru.patch | 64 ++++ ...ix-crash-during-suspend-on-ASUS-computers.patch | 97 +++++ ...storage-gadgets-send-wrong-error-code-for.patch | 55 +++ ...dget-dummy-do-not-call-pullup-on-udc_stop.patch | 35 ++ ...uvc-uvc_request_data-length-field-must-be.patch | 50 +++ ...es-add-a-packetized-pipe-mode-for-writing.patch | 143 ++++++++ ...-the-autofsv5-packet-file-descriptor-use-.patch | 117 +++++++ ...errata-only-handle-ARM-erratum-326103-on-.patch | 89 +++++ ...l2x0-only-apply-workaround-for-erratum-75.patch | 62 ++++ ...l2x0-only-write-to-debug-registers-on-PL3.patch | 69 ++++ ...-1-tls-remove-covert-channel-via-TPIDRURW.patch | 52 +++ ...hotplug-copy-the-affinity-mask-when-force.patch | 53 +++ ...sas_find_bcast_phy-in-the-presence-of-vac.patch | 59 ++++ ...false-positive-device-attached-conditions.patch | 48 +++ .../0126-efi-Add-new-variable-attributes.patch | 45 +++ .../0127-efi-Validate-UEFI-boot-variables.patch | 231 ++++++++++++ ...e-fix-the-number-of-pages-used-for-hibern.patch | 100 ++++++ ...15-enable-dip-before-writing-data-on-gen4.patch | 50 +++ ...0130-sched-Fix-nohz-load-accounting-again.patch | 133 +++++++ .../0131-efivars-Improve-variable-validation.patch | 142 ++++++++ ...0132-fs-cifs-fix-parsing-of-dfs-referrals.patch | 49 +++ ...seqcount_begin-to-use-ACCESS_ONCE-for-seq.patch | 51 +++ ...34-hwmon-coretemp-Increase-CPU-core-limit.patch | 35 ++ ...5-nouveau-initialise-has_optimus-variable.patch | 31 ++ ...136-hwmon-coretemp-fix-oops-on-cpu-unplug.patch | 77 ++++ ...-old-error-history-when-counting-probe-tr.patch | 42 +++ ...load-config-after-successful-initializati.patch | 48 +++ .../0139-i2c-pnx-Disable-clk-in-suspend.patch | 38 ++ ...-race-condition-in-the-command-completion.patch | 74 ++++ ...0211-fix-AP-mode-EAP-tx-for-VLAN-stations.patch | 38 ++ .../3.2.17/0142-rtlwifi-Fix-oops-on-unload.patch | 67 ++++ ...ix-crash-on-remove-due-to-premature-kfree.patch | 40 +++ ...crash-on-remove-due-to-leftover-work-item.patch | 35 ++ ...45-iwlwifi-do-not-nulify-ctx-vif-on-reset.patch | 85 +++++ ...46-iwlwifi-fix-hardware-queue-programming.patch | 114 ++++++ ...47-hfsplus-Fix-potential-buffer-overflows.patch | 79 +++++ .../0148-ASoC-tlv312aic23-unbreak-resume.patch | 51 +++ ...m-generic-Use-__BITS_PER_LONG-in-statfs.h.patch | 37 ++ ...0150-x86-relocs-Remove-an-unused-variable.patch | 41 +++ ...Add-extra-clobber-registers-for-assembly-.patch | 43 +++ ...SMP-prevent-use-of-the-console-when-using.patch | 58 +++ ...drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch | 56 +++ ...-no-set-Stencil-Cache-eviction-LRA-w-a-on.patch | 51 +++ ...-crashes-when-trying-to-see-non-existent-.patch | 63 ++++ ...-t-use-PCI-BIOS-service-for-configuration.patch | 53 +++ ...don-t-use-PMD_SIZE-as-embedded-atom_size-.patch | 68 ++++ ...-allow-up-to-uCode-API-6-for-6000-devices.patch | 64 ++++ ...wlwifi-use-correct-released-ucode-version.patch | 159 +++++++++ ...wlwifi-use-6000G2B-for-6030-device-series.patch | 44 +++ ...-simplify-the-we-have-changed-execution-d.patch | 75 ++++ ...-fix-the-parent-has-changed-security-doma.patch | 77 ++++ ...12u-Fix-regression-caused-by-commit-8c213.patch | 66 ++++ ...rk-link-down-on-startup-and-let-PHY-inter.patch | 46 +++ .../3.2.17/0165-Linux-3.2.17.patch | 24 ++ ...ix-the-logic-to-ensure-new-voltage-settin.patch | 35 ++ ...vert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch | 52 +++ ...oaudio-Remove-incorrect-part-of-assertion.patch | 46 +++ ...ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch | 41 +++ ...ssen-CPU-usage-when-waiting-for-chip-to-r.patch | 56 +++ ..._embed_first_chunk-should-free-unused-par.patch | 57 +++ ...event-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch | 46 +++ ...spaces-pid_ns-fix-leakage-on-fork-failure.patch | 49 +++ ...m-fix-sign-extend-problem-in-__free_pages.patch | 49 +++ ...ix-tx-transfer-padding-for-full-speed-USB.patch | 45 +++ .../3.2.18/0011-netem-fix-possible-skb-leak.patch | 39 +++ ...gister_netdevice_notifier-unregister-the-.patch | 64 ++++ ...lock-socket-lock-before-returning-from-l2.patch | 47 +++ ...2-propogate-rx-hash-when-packet-is-copied.patch | 38 ++ ...ceive-length-error-in-mixed-non-VLAN-VLAN.patch | 136 +++++++ .../3.2.18/0016-sungem-Fix-WakeOnLan.patch | 35 ++ ...-panic-from-reserved-statblk-field-access.patch | 67 ++++ ...tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch | 46 +++ ...p-change-tcp_adv_win_scale-and-tcp_rmem-2.patch | 124 +++++++ ...mac-pass-missing-argument-to-brcms_b_mute.patch | 43 +++ ...fix-Auto-Power-Saving-in-ip101a_config_in.patch | 43 +++ .../0022-NFSv4-Revalidate-uid-gid-after-open.patch | 74 ++++ ...-incorrect-se_lun_acl-release-for-dynamic.patch | 70 ++++ .../0024-marvell-cam-fix-an-ARM-build-error.patch | 34 ++ .../3.2.18/0025-rc-Postpone-ISR-registration.patch | 325 +++++++++++++++++ ...gnore-bogus-union-descriptor-for-RNDIS-de.patch | 75 ++++ ...Fix-lock-acquisition-order-bug-in-gc-path.patch | 103 ++++++ ...5p-fimc-Fix-locking-in-subdev-set_crop-op.patch | 35 ++ ...eck-if-scsi_dh-module-already-loaded-befo.patch | 39 +++ ...o-not-clobber-g2-in-xcall_fetch_glob_regs.patch | 58 +++ ...ssing-spin_lock_init-in-gpio-ml-ioh-drive.patch | 33 ++ ...f-pch-Modify-pci-bus-number-dynamically-t.patch | 32 ++ ...f-pch-Fix-issue-for-transmitting-over-4KB.patch | 187 ++++++++++ ...f-pch-supports-a-spi-mode-setup-and-bit-o.patch | 34 ++ ...f-pch-add-recovery-processing-in-case-wai.patch | 43 +++ ...d-deadlock-on-sync-mounted-FS-w-o-journal.patch | 64 ++++ .../3.2.18/0037-ia64-Add-accept4-syscall.patch | 57 +++ ...mac-fix-endless-retry-of-A-MPDU-transmiss.patch | 60 ++++ ...vfp-ensure-preemption-is-disabled-when-en.patch | 73 ++++ ...SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch | 42 +++ ...-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch | 51 +++ ...t-Fix-power-map-for-speaker-pins-with-som.patch | 46 +++ .../0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch | 29 ++ ...fix-skb-traversing-races-during-unlink-v2.patch | 222 ++++++++++++ ...dd-Novatel-USB551L-device-IDs-for-FLAG_WW.patch | 58 +++ ...-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch | 33 ++ ...pply-commit-74fca9da0-to-the-compat-signa.patch | 49 +++ ...timer_sync-to-mddev_suspend-fix-nasty-pan.patch | 38 ++ ...bug-in-handling-of-FILEIO-block_device-re.patch | 78 +++++ ...sendpages-must-try-to-push-data-out-on-oo.patch | 57 +++ ...1-e1000-Prevent-reset-task-killing-itself.patch | 40 +++ ...052-mtd-map.h-fix-arm-cross-build-failure.patch | 37 ++ ...tmmac-Fix-compilation-error-in-mmc_core.c.patch | 38 ++ .../0054-pktgen-fix-crash-at-module-unload.patch | 72 ++++ .../0055-pktgen-fix-module-unload-for-good.patch | 48 +++ .../3.2.18/0056-Linux-3.2.18.patch | 24 ++ recipes-kernel/linux/linux-ti33x-psp_3.2.bb | 223 +++++++++++- 223 files changed, 14794 insertions(+), 2 deletions(-) create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0001-crypto-sha512-Fix-byte-counter-overflow-in-SHA-512.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0002-ALSA-hda-conexant-Don-t-set-HP-pin-control-bit-uncon.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0003-ALSA-hda-conexant-Set-up-the-missing-docking-station.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0004-ARM-clps711x-serial-driver-hungs-are-a-result-of-cal.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0006-mmc-fixes-for-eMMC-v4.5-discard-operation.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0007-mmc-fixes-for-eMMC-v4.5-sanitize-operation.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0008-mmc-unbreak-sdhci-esdhc-imx-on-i.MX25.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0009-xen-gntdev-do-not-set-VM_PFNMAP.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0010-xen-xenbus-Add-quirk-to-deal-with-misconfigured-back.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0011-USB-yurex-Remove-allocation-of-coherent-buffer-for-s.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0012-USB-yurex-Fix-missing-URB_NO_TRANSFER_DMA_MAP-flag-i.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0013-uwb-fix-use-of-del_timer_sync-in-interrupt.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0014-uwb-fix-error-handling.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0015-davinci_mdio-Fix-MDIO-timeout-check.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0016-mwifiex-update-pcie8766-scratch-register-addresses.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0017-brcm80211-smac-resume-transmit-fifo-upon-receiving-f.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0018-rc-core-set-mode-for-winbond-cir.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0019-drxk-Does-not-unlock-mutex-if-sanity-check-failed-in.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0020-cfg80211-fix-interface-combinations-check.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0021-Fix-modpost-failures-in-fedora-17.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0022-mm-fix-s390-BUG-by-__set_page_dirty_no_writeback-on-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0023-md-fix-possible-corruption-of-array-metadata-on-shut.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0025-USB-serial-cp210x-Fixed-usb_control_msg-timeout-valu.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0027-drivers-tty-amiserial.c-add-missing-tty_unlock.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0028-USB-sierra-avoid-QMI-wwan-interface-on-MC77xx.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0029-EHCI-fix-criterion-for-resuming-the-root-hub.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0030-EHCI-always-clear-the-STS_FLR-status-bit.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0031-USB-fix-deadlock-in-bConfigurationValue-attribute-me.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0032-usb-gadget-eliminate-NULL-pointer-dereference-bugfix.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0033-usb-musb-omap-fix-crash-when-musb-glue-omap-gets-ini.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0034-usb-musb-omap-fix-the-error-check-for-pm_runtime_get.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0035-PCI-Add-quirk-for-still-enabled-interrupts-on-Intel-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0036-ext4-fix-endianness-breakage-in-ext4_split_extent_at.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0037-KVM-unmap-pages-from-the-iommu-when-slots-are-remove.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0038-dell-laptop-add-3-machines-that-has-touchpad-LED.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0039-dell-laptop-touchpad-LED-should-persist-its-status-a.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0040-Bluetooth-Add-support-for-Atheros-04ca-3005.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0041-Don-t-limit-non-nested-epoll-paths.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0042-spi-Fix-device-unregistration-when-unregistering-the.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0043-spi-mpc83xx-fix-NULL-pdata-dereference-bug.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0044-rt2800-Add-support-for-the-Fujitsu-Stylistic-Q550.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0045-rt2x00-Identify-rt2800usb-chipsets.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0046-nfsd-fix-b0rken-error-value-for-setattr-on-read-only.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0047-nfsd-fix-error-values-returned-by-nfsd4_lockt-when-n.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0048-nfsd-fix-endianness-breakage-in-TEST_STATEID-handlin.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0049-nfsd-fix-compose_entry_fh-failure-exits.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0050-btrfs-btrfs_root_readonly-broken-on-big-endian.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0051-ocfs2-l_next_free_req-breakage-on-big-endian.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0052-ocfs-rl_used-breakage-on-big-endian.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0053-ocfs2-rl_count-endianness-breakage.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0054-ocfs2-e_leaf_clusters-endianness-breakage.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0055-lockd-fix-the-endianness-bug.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0056-usb-dwc3-ep0-increment-actual-on-bounced-ep0-case.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0057-net-fix-proc-net-dev-regression.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0058-nfsd-don-t-fail-unchecked-creates-of-non-special-fil.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0059-ppp-Don-t-stop-and-restart-queue-on-every-TX-packet.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0060-tcp-allow-splice-to-build-full-TSO-packets.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0061-sctp-Allow-struct-sctp_event_subscribe-to-grow-witho.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0062-bridge-Do-not-send-queries-on-multicast-group-leaves.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0063-ipv6-fix-array-index-in-ip6_mc_add_src.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0064-phonet-Check-input-from-user-before-allocating.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0065-bonding-properly-unset-current_arp_slave-on-slave-li.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0066-wimax-i2400m-prevent-a-possible-kernel-bug-due-to-mi.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0067-netlink-fix-races-after-skb-queueing.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0068-net-fix-a-race-in-sock_queue_err_skb.patch create mode 100644 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 create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0070-net-allow-pskb_expand_head-to-get-maximum-tailroom.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0071-tcp-fix-tcp_trim_head.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0072-tcp-avoid-order-1-allocations-on-wifi-and-tx-path.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0073-atl1-fix-kernel-panic-in-case-of-DMA-errors.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0074-8139cp-set-intr-mask-after-its-handler-is-registered.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0075-net-smsc911x-fix-skb-handling-in-receive-path.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0076-net-ethernet-ks8851_mll-fix-rx-frame-buffer-overflow.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0077-net_sched-gred-Fix-oops-in-gred_dump-in-WRED-mode.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0078-net-usb-smsc75xx-fix-mtu.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0079-dummy-Add-ndo_uninit.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0080-tcp-fix-tcp_grow_window-for-large-incoming-frames.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0081-netns-do-not-leak-net_generic-data-on-failed-init.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0082-ksz884x-don-t-copy-too-much-in-netdev_set_mac_addres.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0083-net-ax25-Reorder-ax25_exit-to-remove-races.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0084-tcp-fix-TCP_MAXSEG-for-established-IPv6-passive-sock.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0085-nfs-Enclose-hostname-in-brackets-when-needed-in-nfs_.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0086-NFSv4-Ensure-that-the-LOCK-code-sets-exception-inode.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0087-NFSv4-Ensure-that-we-check-lock-exclusive-shared-typ.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0088-NFS-put-open-context-on-error-in-nfs_pagein_multi.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0089-NFS-put-open-context-on-error-in-nfs_flush_multi.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0090-x86-microcode-Fix-sysfs-warning-during-module-unload.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0091-x86-apic-APIC-code-touches-invalid-MSR-on-P5-class-m.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0092-Revert-autofs-work-around-unhappy-compat-problem-on-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0093-xen-correctly-check-for-pending-events-when-restorin.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0094-xen-smp-Fix-crash-when-booting-with-ACPI-hotplug-CPU.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0095-ASoC-dapm-Ensure-power-gets-managed-for-line-widgets.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0096-ASoC-wm8994-Improve-sequencing-of-AIF-channel-enable.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0097-dmaengine-at_hdmac-remove-clear-on-read-in-atc_dosta.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0098-sched-Fix-OOPS-when-build_sched_domains-percpu-alloc.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0099-tracing-Fix-stacktrace-of-latency-tracers-irqsoff-an.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0100-hwmon-fam15h_power-fix-bogus-values-with-current-BIO.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0101-hwmon-fam15h_power-Fix-pci_device_id-array.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0102-dell-laptop-Terminate-quirks-list-properly.patch create mode 100644 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 create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0104-drm-i915-handle-input-output-sdvo-timings-separately.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0105-drm-i915-relative_constants_mode-race-fix.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0106-drm-i915-Force-sync-command-ordering-Gen6.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0107-drm-i915-Set-the-Stencil-Cache-eviction-policy-to-no.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0108-drm-i915-fix-integer-overflow-in-i915_gem_execbuffer.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0109-drm-i915-fix-integer-overflow-in-i915_gem_do_execbuf.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0110-nl80211-ensure-interface-is-up-in-various-APIs.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0111-ALSA-HDA-Add-external-mic-quirk-for-Asus-Zenbook-UX3.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0112-USB-cdc-wdm-fix-race-leading-leading-to-memory-corru.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0113-USB-EHCI-fix-crash-during-suspend-on-ASUS-computers.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0114-USB-gadget-storage-gadgets-send-wrong-error-code-for.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0115-usb-gadget-dummy-do-not-call-pullup-on-udc_stop.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0116-usb-gadget-uvc-uvc_request_data-length-field-must-be.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0117-pipes-add-a-packetized-pipe-mode-for-writing.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0118-autofs-make-the-autofsv5-packet-file-descriptor-use-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0119-ARM-7396-1-errata-only-handle-ARM-erratum-326103-on-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0122-ARM-7403-1-tls-remove-covert-channel-via-TPIDRURW.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0123-ARM-7406-1-hotplug-copy-the-affinity-mask-when-force.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0124-libsas-fix-sas_find_bcast_phy-in-the-presence-of-vac.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0125-libsas-fix-false-positive-device-attached-conditions.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0126-efi-Add-new-variable-attributes.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0127-efi-Validate-UEFI-boot-variables.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0128-PM-Hibernate-fix-the-number-of-pages-used-for-hibern.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0129-drm-i915-enable-dip-before-writing-data-on-gen4.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0130-sched-Fix-nohz-load-accounting-again.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0131-efivars-Improve-variable-validation.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0133-Fix-__read_seqcount_begin-to-use-ACCESS_ONCE-for-seq.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0134-hwmon-coretemp-Increase-CPU-core-limit.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0135-nouveau-initialise-has_optimus-variable.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0136-hwmon-coretemp-fix-oops-on-cpu-unplug.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0137-libata-skip-old-error-history-when-counting-probe-tr.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0138-b43-only-reload-config-after-successful-initializati.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0139-i2c-pnx-Disable-clk-in-suspend.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0140-ipw2200-Fix-race-condition-in-the-command-completion.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0141-mac80211-fix-AP-mode-EAP-tx-for-VLAN-stations.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0142-rtlwifi-Fix-oops-on-unload.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0143-wl1251-fix-crash-on-remove-due-to-premature-kfree.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0144-wl1251-fix-crash-on-remove-due-to-leftover-work-item.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0145-iwlwifi-do-not-nulify-ctx-vif-on-reset.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0146-iwlwifi-fix-hardware-queue-programming.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0147-hfsplus-Fix-potential-buffer-overflows.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0148-ASoC-tlv312aic23-unbreak-resume.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0149-asm-generic-Use-__BITS_PER_LONG-in-statfs.h.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0150-x86-relocs-Remove-an-unused-variable.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0151-ARM-7410-1-Add-extra-clobber-registers-for-assembly-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0152-ARM-7414-1-SMP-prevent-use-of-the-console-when-using.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0153-drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch create mode 100644 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 create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0155-xen-pte-Fix-crashes-when-trying-to-see-non-existent-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0156-xen-pci-don-t-use-PCI-BIOS-service-for-configuration.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0157-percpu-x86-don-t-use-PMD_SIZE-as-embedded-atom_size-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0158-iwlagn-allow-up-to-uCode-API-6-for-6000-devices.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0159-iwlwifi-use-correct-released-ucode-version.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0160-iwlwifi-use-6000G2B-for-6030-device-series.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0161-exit_signal-simplify-the-we-have-changed-execution-d.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0162-exit_signal-fix-the-parent-has-changed-security-doma.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0163-staging-r8712u-Fix-regression-caused-by-commit-8c213.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0164-smsc95xx-mark-link-down-on-startup-and-let-PHY-inter.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0165-Linux-3.2.17.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0011-netem-fix-possible-skb-leak.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0016-sungem-Fix-WakeOnLan.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0025-rc-Postpone-ISR-registration.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0037-ia64-Add-accept4-syscall.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch create mode 100644 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 create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0054-pktgen-fix-crash-at-module-unload.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0055-pktgen-fix-module-unload-for-good.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0056-Linux-3.2.18.patch 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 require conf/machine/include/tune-cortexa8.inc PREFERRED_PROVIDER_virtual/kernel = "linux-ti33x-psp" # Increase this everytime you change something in the kernel -MACHINE_KERNEL_PR = "r11" +MACHINE_KERNEL_PR = "r12" KERNEL_IMAGETYPE = "uImage" 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 @@ +From 56ff3a4557bf6cd95220c643eb6fdf28db222370 Mon Sep 17 00:00:00 2001 +From: Kent Yoder +Date: Thu, 5 Apr 2012 20:34:20 +0800 +Subject: [PATCH 001/165] crypto: sha512 - Fix byte counter overflow in + SHA-512 + +commit 25c3d30c918207556ae1d6e663150ebdf902186b upstream. + +The current code only increments the upper 64 bits of the SHA-512 byte +counter when the number of bytes hashed happens to hit 2^64 exactly. + +This patch increments the upper 64 bits whenever the lower 64 bits +overflows. + +Signed-off-by: Kent Yoder +Signed-off-by: Herbert Xu +Signed-off-by: Ben Hutchings +--- + crypto/sha512_generic.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c +index 107f6f7..dd30f40 100644 +--- a/crypto/sha512_generic.c ++++ b/crypto/sha512_generic.c +@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, const u8 *data, unsigned int len) + index = sctx->count[0] & 0x7f; + + /* Update number of bytes */ +- if (!(sctx->count[0] += len)) ++ if ((sctx->count[0] += len) < len) + sctx->count[1]++; + + part_len = 128 - index; +-- +1.7.7.6 + 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 @@ +From b5fdd927a3527e8ed9a882d3c72e32435fa71dd3 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 19 Apr 2012 15:15:25 +0200 +Subject: [PATCH 002/165] ALSA: hda/conexant - Don't set HP pin-control bit + unconditionally + +commit ca3649de026ff95c6f2847e8d096cf2f411c02b3 upstream. + +Some output pins on Conexant chips have no HP control bit, but the +auto-parser initializes these pins unconditionally with PIN_HP. + +Check the pin-capability and avoid the HP bit if not supported. + +Signed-off-by: Takashi Iwai +Signed-off-by: Ben Hutchings +--- + sound/pci/hda/patch_conexant.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c +index ae94929..99a3378 100644 +--- a/sound/pci/hda/patch_conexant.c ++++ b/sound/pci/hda/patch_conexant.c +@@ -4003,9 +4003,14 @@ static void cx_auto_init_output(struct hda_codec *codec) + int i; + + mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids); +- for (i = 0; i < cfg->hp_outs; i++) ++ for (i = 0; i < cfg->hp_outs; i++) { ++ unsigned int val = PIN_OUT; ++ if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) & ++ AC_PINCAP_HP_DRV) ++ val |= AC_PINCTL_HP_EN; + snd_hda_codec_write(codec, cfg->hp_pins[i], 0, +- AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP); ++ AC_VERB_SET_PIN_WIDGET_CONTROL, val); ++ } + mute_outputs(codec, cfg->hp_outs, cfg->hp_pins); + mute_outputs(codec, cfg->line_outs, cfg->line_out_pins); + mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins); +-- +1.7.7.6 + 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 @@ +From 859f08d45339917d263a366170476c1f8389a2ea Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 19 Apr 2012 15:18:08 +0200 +Subject: [PATCH 003/165] ALSA: hda/conexant - Set up the missing + docking-station pins + +commit d70f363222ef373c2037412f09a600357cfa1c7a upstream. + +ThinkPad 410,420,510,520 and X201 with cx50585 & co chips have the +docking-station ports, but BIOS doesn't initialize for these pins. +Thus, like the former X200, we need to set up the pins manually in the +driver. + +The odd part is that the same PCI SSID is used for X200 and T400, thus +we need to prepare individual fixup tables for cx5051 and others. + +Bugzilla entries: + https://bugzilla.redhat.com/show_bug.cgi?id=808559 + https://bugzilla.redhat.com/show_bug.cgi?id=806217 + https://bugzilla.redhat.com/show_bug.cgi?id=810697 + +Reported-by: Josh Boyer +Reported-by: Jens Taprogge +Tested-by: Jens Taprogge +Signed-off-by: Takashi Iwai +Signed-off-by: Ben Hutchings +--- + sound/pci/hda/patch_conexant.c | 28 +++++++++++++++++++++++++--- + 1 files changed, 25 insertions(+), 3 deletions(-) + +diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c +index 99a3378..51a1afc 100644 +--- a/sound/pci/hda/patch_conexant.c ++++ b/sound/pci/hda/patch_conexant.c +@@ -4413,8 +4413,10 @@ static void apply_pin_fixup(struct hda_codec *codec, + + enum { + CXT_PINCFG_LENOVO_X200, ++ CXT_PINCFG_LENOVO_TP410, + }; + ++/* ThinkPad X200 & co with cxt5051 */ + static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { + { 0x16, 0x042140ff }, /* HP (seq# overridden) */ + { 0x17, 0x21a11000 }, /* dock-mic */ +@@ -4422,15 +4424,33 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { + {} + }; + ++/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */ ++static const struct cxt_pincfg cxt_pincfg_lenovo_tp410[] = { ++ { 0x19, 0x042110ff }, /* HP (seq# overridden) */ ++ { 0x1a, 0x21a190f0 }, /* dock-mic */ ++ { 0x1c, 0x212140ff }, /* dock-HP */ ++ {} ++}; ++ + static const struct cxt_pincfg *cxt_pincfg_tbl[] = { + [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200, ++ [CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410, + }; + +-static const struct snd_pci_quirk cxt_fixups[] = { ++static const struct snd_pci_quirk cxt5051_fixups[] = { + SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), + {} + }; + ++static const struct snd_pci_quirk cxt5066_fixups[] = { ++ SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), ++ SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410), ++ SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410), ++ SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410), ++ SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410), ++ {} ++}; ++ + /* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches + * can be created (bko#42825) + */ +@@ -4467,11 +4487,13 @@ static int patch_conexant_auto(struct hda_codec *codec) + break; + case 0x14f15051: + add_cx5051_fake_mutes(codec); ++ apply_pin_fixup(codec, cxt5051_fixups, cxt_pincfg_tbl); ++ break; ++ default: ++ apply_pin_fixup(codec, cxt5066_fixups, cxt_pincfg_tbl); + break; + } + +- apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); +- + err = cx_auto_search_adcs(codec); + if (err < 0) + return err; +-- +1.7.7.6 + 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 @@ +From 36a5e353678eb6856bf90e322b815865abf4c660 Mon Sep 17 00:00:00 2001 +From: Alexander Shiyan +Date: Tue, 27 Mar 2012 12:22:49 +0400 +Subject: [PATCH 004/165] ARM: clps711x: serial driver hungs are a result of + call disable_irq within ISR + +commit 7a6fbc9a887193a1e9f8658703881c528040afbc upstream. + +Since 2.6.30-rc1 clps711x serial driver hungs system. This is a result +of call disable_irq from ISR. synchronize_irq waits for end of interrupt +and goes to infinite loop. This patch fix this problem. + +Signed-off-by: Alexander Shiyan +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/tty/serial/clps711x.c | 14 ++++++++------ + 1 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c +index e6c3dbd..836fe273 100644 +--- a/drivers/tty/serial/clps711x.c ++++ b/drivers/tty/serial/clps711x.c +@@ -154,10 +154,9 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id) + port->x_char = 0; + return IRQ_HANDLED; + } +- if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { +- clps711xuart_stop_tx(port); +- return IRQ_HANDLED; +- } ++ ++ if (uart_circ_empty(xmit) || uart_tx_stopped(port)) ++ goto disable_tx_irq; + + count = port->fifosize >> 1; + do { +@@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id) + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) + uart_write_wakeup(port); + +- if (uart_circ_empty(xmit)) +- clps711xuart_stop_tx(port); ++ if (uart_circ_empty(xmit)) { ++ disable_tx_irq: ++ disable_irq_nosync(TX_IRQ(port)); ++ tx_enabled(port) = 0; ++ } + + return IRQ_HANDLED; + } +-- +1.7.7.6 + 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 @@ +From 69c74a3f01d30c6dd44991f6413a4f317f4591a7 Mon Sep 17 00:00:00 2001 +From: Paul Walmsley +Date: Tue, 10 Apr 2012 18:36:02 -0600 +Subject: [PATCH 005/165] ARM: OMAP1: DMTIMER: fix broken timer clock source + selection + +commit 6aaec67da1e41a0752a2b903b989e73b9f02e182 upstream. + +DMTIMER source selection on OMAP1 is broken. omap1_dm_timer_set_src() +tries to use __raw_{read,write}l() to read from and write to physical +addresses, but those functions take virtual addresses. + +sparse caught this: + +arch/arm/mach-omap1/timer.c:50:13: warning: incorrect type in argument 1 (different base types) +arch/arm/mach-omap1/timer.c:50:13: expected void const volatile [noderef] * +arch/arm/mach-omap1/timer.c:50:13: got unsigned int +arch/arm/mach-omap1/timer.c:52:9: warning: incorrect type in argument 1 (different base types) +arch/arm/mach-omap1/timer.c:52:9: expected void const volatile [noderef] * +arch/arm/mach-omap1/timer.c:52:9: got unsigned int + +Fix by using omap_{read,writel}(), just like the other users of the +MOD_CONF_CTRL_1 register in the OMAP1 codebase. Of course, in the long term, +removing omap_{read,write}l() is the appropriate thing to do; but +this will take some work to do this cleanly. + +Looks like this was caused by 97933d6 (ARM: OMAP1: dmtimer: conversion +to platform devices) that dangerously moved code and changed it in +the same patch. + +Signed-off-by: Paul Walmsley +Cc: Tarun Kanti DebBarma +[tony@atomide.com: updated comments to include the breaking commit] +Signed-off-by: Tony Lindgren +Signed-off-by: Ben Hutchings +--- + arch/arm/mach-omap1/timer.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c +index 6e90665..fb202af 100644 +--- a/arch/arm/mach-omap1/timer.c ++++ b/arch/arm/mach-omap1/timer.c +@@ -47,9 +47,9 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev, + int n = (pdev->id - 1) << 1; + u32 l; + +- l = __raw_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); ++ l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); + l |= source << n; +- __raw_writel(l, MOD_CONF_CTRL_1); ++ omap_writel(l, MOD_CONF_CTRL_1); + + return 0; + } +-- +1.7.7.6 + 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 @@ +From 23e70c192386ff8d0e33f9b9225d984ae5eea97b Mon Sep 17 00:00:00 2001 +From: Adrian Hunter +Date: Thu, 5 Apr 2012 14:45:47 +0300 +Subject: [PATCH 006/165] mmc: fixes for eMMC v4.5 discard operation + +commit 7194efb8f063ee3aa0cb50d9002348887e68ec10 upstream. + +eMMC v4.5 discard operation is significantly different from the +existing trim operation because it is not guaranteed to work with +the new sanitize operation. Consequently mmc_can_trim() is +separated from mmc_can_discard(). + +Also the new discard operation does not result in the sectors being +set to all-zeros, so discard_zeroes_data must not be set. + +In addition, the new discard has the same timeout as trim, but from +v4.5 trim is defined to use the hc timeout. The timeout calculation +is adjusted accordingly. + +Fixes apply to linux 3.2 on. + +Signed-off-by: Adrian Hunter +Acked-by: Jaehoon Chung +Acked-by: Linus Walleij +Signed-off-by: Chris Ball +Signed-off-by: Ben Hutchings +--- + drivers/mmc/card/queue.c | 2 +- + drivers/mmc/core/core.c | 7 ++++--- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c +index dcad59c..78690f2 100644 +--- a/drivers/mmc/card/queue.c ++++ b/drivers/mmc/card/queue.c +@@ -134,7 +134,7 @@ static void mmc_queue_setup_discard(struct request_queue *q, + + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); + q->limits.max_discard_sectors = max_discard; +- if (card->erased_byte == 0) ++ if (card->erased_byte == 0 && !mmc_can_discard(card)) + q->limits.discard_zeroes_data = 1; + q->limits.discard_granularity = card->pref_erase << 9; + /* granularity must not be greater than max. discard */ +diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c +index 950b97d..c420a9e 100644 +--- a/drivers/mmc/core/core.c ++++ b/drivers/mmc/core/core.c +@@ -1516,7 +1516,10 @@ static unsigned int mmc_mmc_erase_timeout(struct mmc_card *card, + { + unsigned int erase_timeout; + +- if (card->ext_csd.erase_group_def & 1) { ++ if (arg == MMC_DISCARD_ARG || ++ (arg == MMC_TRIM_ARG && card->ext_csd.rev >= 6)) { ++ erase_timeout = card->ext_csd.trim_timeout; ++ } else if (card->ext_csd.erase_group_def & 1) { + /* High Capacity Erase Group Size uses HC timeouts */ + if (arg == MMC_TRIM_ARG) + erase_timeout = card->ext_csd.trim_timeout; +@@ -1788,8 +1791,6 @@ int mmc_can_trim(struct mmc_card *card) + { + if (card->ext_csd.sec_feature_support & EXT_CSD_SEC_GB_CL_EN) + return 1; +- if (mmc_can_discard(card)) +- return 1; + return 0; + } + EXPORT_SYMBOL(mmc_can_trim); +-- +1.7.7.6 + 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 @@ +From 6e1972f1214d5827d22d15985bb50d1e05307e7e Mon Sep 17 00:00:00 2001 +From: Adrian Hunter +Date: Thu, 5 Apr 2012 14:45:48 +0300 +Subject: [PATCH 007/165] mmc: fixes for eMMC v4.5 sanitize operation + +commit 283028122db37621b124f079ca8eae5b64807ad4 upstream. + +eMMC v4.5 sanitize operation erases all copies of unmapped +data. However trim or erase operations must be used first +to unmap the required sectors. That was not being done. + +Fixes apply to linux 3.2 on. + +Signed-off-by: Adrian Hunter +Acked-by: Jaehoon Chung +Acked-by: Linus Walleij +Signed-off-by: Chris Ball +Signed-off-by: Ben Hutchings +--- + drivers/mmc/card/block.c | 54 ++++++++++++++++++++++++++++++++------------- + drivers/mmc/core/core.c | 2 + + 2 files changed, 40 insertions(+), 16 deletions(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index 60e8951..6679c4f 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -799,7 +799,7 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, + { + struct mmc_blk_data *md = mq->data; + struct mmc_card *card = md->queue.card; +- unsigned int from, nr, arg; ++ unsigned int from, nr, arg, trim_arg, erase_arg; + int err = 0, type = MMC_BLK_SECDISCARD; + + if (!(mmc_can_secure_erase_trim(card) || mmc_can_sanitize(card))) { +@@ -807,20 +807,26 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, + goto out; + } + ++ from = blk_rq_pos(req); ++ nr = blk_rq_sectors(req); ++ + /* The sanitize operation is supported at v4.5 only */ + if (mmc_can_sanitize(card)) { +- err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, +- EXT_CSD_SANITIZE_START, 1, 0); +- goto out; ++ erase_arg = MMC_ERASE_ARG; ++ trim_arg = MMC_TRIM_ARG; ++ } else { ++ erase_arg = MMC_SECURE_ERASE_ARG; ++ trim_arg = MMC_SECURE_TRIM1_ARG; + } + +- from = blk_rq_pos(req); +- nr = blk_rq_sectors(req); +- +- if (mmc_can_trim(card) && !mmc_erase_group_aligned(card, from, nr)) +- arg = MMC_SECURE_TRIM1_ARG; +- else +- arg = MMC_SECURE_ERASE_ARG; ++ if (mmc_erase_group_aligned(card, from, nr)) ++ arg = erase_arg; ++ else if (mmc_can_trim(card)) ++ arg = trim_arg; ++ else { ++ err = -EINVAL; ++ goto out; ++ } + retry: + if (card->quirks & MMC_QUIRK_INAND_CMD38) { + err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, +@@ -830,25 +836,41 @@ retry: + INAND_CMD38_ARG_SECERASE, + 0); + if (err) +- goto out; ++ goto out_retry; + } ++ + err = mmc_erase(card, from, nr, arg); +- if (!err && arg == MMC_SECURE_TRIM1_ARG) { ++ if (err == -EIO) ++ goto out_retry; ++ if (err) ++ goto out; ++ ++ if (arg == MMC_SECURE_TRIM1_ARG) { + if (card->quirks & MMC_QUIRK_INAND_CMD38) { + err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, + INAND_CMD38_ARG_EXT_CSD, + INAND_CMD38_ARG_SECTRIM2, + 0); + if (err) +- goto out; ++ goto out_retry; + } ++ + err = mmc_erase(card, from, nr, MMC_SECURE_TRIM2_ARG); ++ if (err == -EIO) ++ goto out_retry; ++ if (err) ++ goto out; + } +-out: +- if (err == -EIO && !mmc_blk_reset(md, card->host, type)) ++ ++ if (mmc_can_sanitize(card)) ++ err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, ++ EXT_CSD_SANITIZE_START, 1, 0); ++out_retry: ++ if (err && !mmc_blk_reset(md, card->host, type)) + goto retry; + if (!err) + mmc_blk_reset_success(md, type); ++out: + spin_lock_irq(&md->lock); + __blk_end_request(req, err, blk_rq_bytes(req)); + spin_unlock_irq(&md->lock); +diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c +index c420a9e..411a994 100644 +--- a/drivers/mmc/core/core.c ++++ b/drivers/mmc/core/core.c +@@ -1809,6 +1809,8 @@ EXPORT_SYMBOL(mmc_can_discard); + + int mmc_can_sanitize(struct mmc_card *card) + { ++ if (!mmc_can_trim(card) && !mmc_can_erase(card)) ++ return 0; + if (card->ext_csd.sec_feature_support & EXT_CSD_SEC_SANITIZE) + return 1; + return 0; +-- +1.7.7.6 + 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 @@ +From 5c4111343e2cb543a436cd23d7633a513fd8385d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eric=20B=C3=A9nard?= +Date: Wed, 18 Apr 2012 02:30:20 +0200 +Subject: [PATCH 008/165] mmc: unbreak sdhci-esdhc-imx on i.MX25 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit b89152824f993a9572b47eb31f4579feadeac34c upstream. + +This was broken by me in 37865fe91582582a6f6c00652f6a2b1ff71f8a78 +("mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci") where more +extensive tests would have shown that read or write of data to the +card were failing (even if the partition table was correctly read). + +Signed-off-by: Eric BĂ©nard +Acked-by: Wolfram Sang +Signed-off-by: Chris Ball +Signed-off-by: Ben Hutchings +--- + drivers/mmc/host/sdhci-esdhc-imx.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c +index 4540e37..1b47937 100644 +--- a/drivers/mmc/host/sdhci-esdhc-imx.c ++++ b/drivers/mmc/host/sdhci-esdhc-imx.c +@@ -467,8 +467,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev) + clk_enable(clk); + pltfm_host->clk = clk; + +- if (!is_imx25_esdhc(imx_data)) +- host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; ++ host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; + + if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data)) + /* Fix errata ENGcm07207 present on i.MX25 and i.MX35 */ +-- +1.7.7.6 + 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 @@ +From ccc1f53caca147badfafce099bd995a33d04880a Mon Sep 17 00:00:00 2001 +From: Stefano Stabellini +Date: Tue, 3 Apr 2012 18:05:47 +0100 +Subject: [PATCH 009/165] xen/gntdev: do not set VM_PFNMAP + +commit e8e937be971d706061dc56220ff3605ab77622a7 upstream. + +Since we are using the m2p_override we do have struct pages +corresponding to the user vma mmap'ed by gntdev. + +Removing the VM_PFNMAP flag makes get_user_pages work on that vma. +An example test case would be using a Xen userspace block backend +(QDISK) on a file on NFS using O_DIRECT. + +Signed-off-by: Stefano Stabellini +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Ben Hutchings +--- + drivers/xen/gntdev.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c +index afca14d..625890c 100644 +--- a/drivers/xen/gntdev.c ++++ b/drivers/xen/gntdev.c +@@ -692,7 +692,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) + vma->vm_flags |= VM_RESERVED|VM_DONTEXPAND; + + if (use_ptemod) +- vma->vm_flags |= VM_DONTCOPY|VM_PFNMAP; ++ vma->vm_flags |= VM_DONTCOPY; + + vma->vm_private_data = map; + +-- +1.7.7.6 + 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 @@ +From a3da8d9a1658c86fb74dbd35b8bda473d8fe0717 Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Tue, 17 Apr 2012 22:21:38 -0400 +Subject: [PATCH 010/165] xen/xenbus: Add quirk to deal with misconfigured + backends. + +commit 3066616ce23aad5719c23a0f21f32676402cb44b upstream. + +A rather annoying and common case is when booting a PVonHVM guest +and exposing the PV KBD and PV VFB - as broken toolstacks don't +always initialize the backends correctly. + +Normally The HVM guest is using the VGA driver and the emulated +keyboard for this (though upstream version of QEMU implements +PV KBD, but still uses a VGA driver). We provide a very basic +two-stage wait mechanism - where we wait for 30 seconds for all +devices, and then for 270 for all them except the two mentioned. + +That allows us to wait for the essential devices, like network +or disk for the full 6 minutes. + +To trigger this, put this in your guest config: + +vfb = [ 'vnc=1, vnclisten=0.0.0.0 ,vncunused=1'] + +instead of this: +vnc=1 +vnclisten="0.0.0.0" + +Acked-by: Stefano Stabellini +[v3: Split delay in non-essential (30 seconds) and essential + devices per Ian and Stefano suggestion] +[v4: Added comments per Stefano suggestion] +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Ben Hutchings +--- + drivers/xen/xenbus/xenbus_probe_frontend.c | 69 +++++++++++++++++++++------ + 1 files changed, 53 insertions(+), 16 deletions(-) + +diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c +index 2f73195..2ce95c0 100644 +--- a/drivers/xen/xenbus/xenbus_probe_frontend.c ++++ b/drivers/xen/xenbus/xenbus_probe_frontend.c +@@ -129,7 +129,7 @@ static int read_backend_details(struct xenbus_device *xendev) + return xenbus_read_otherend_details(xendev, "backend-id", "backend"); + } + +-static int is_device_connecting(struct device *dev, void *data) ++static int is_device_connecting(struct device *dev, void *data, bool ignore_nonessential) + { + struct xenbus_device *xendev = to_xenbus_device(dev); + struct device_driver *drv = data; +@@ -146,16 +146,41 @@ static int is_device_connecting(struct device *dev, void *data) + if (drv && (dev->driver != drv)) + return 0; + ++ if (ignore_nonessential) { ++ /* With older QEMU, for PVonHVM guests the guest config files ++ * could contain: vfb = [ 'vnc=1, vnclisten=0.0.0.0'] ++ * which is nonsensical as there is no PV FB (there can be ++ * a PVKB) running as HVM guest. */ ++ ++ if ((strncmp(xendev->nodename, "device/vkbd", 11) == 0)) ++ return 0; ++ ++ if ((strncmp(xendev->nodename, "device/vfb", 10) == 0)) ++ return 0; ++ } + xendrv = to_xenbus_driver(dev->driver); + return (xendev->state < XenbusStateConnected || + (xendev->state == XenbusStateConnected && + xendrv->is_ready && !xendrv->is_ready(xendev))); + } ++static int essential_device_connecting(struct device *dev, void *data) ++{ ++ return is_device_connecting(dev, data, true /* ignore PV[KBB+FB] */); ++} ++static int non_essential_device_connecting(struct device *dev, void *data) ++{ ++ return is_device_connecting(dev, data, false); ++} + +-static int exists_connecting_device(struct device_driver *drv) ++static int exists_essential_connecting_device(struct device_driver *drv) + { + return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, +- is_device_connecting); ++ essential_device_connecting); ++} ++static int exists_non_essential_connecting_device(struct device_driver *drv) ++{ ++ return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, ++ non_essential_device_connecting); + } + + static int print_device_status(struct device *dev, void *data) +@@ -186,6 +211,23 @@ static int print_device_status(struct device *dev, void *data) + /* We only wait for device setup after most initcalls have run. */ + static int ready_to_wait_for_devices; + ++static bool wait_loop(unsigned long start, unsigned int max_delay, ++ unsigned int *seconds_waited) ++{ ++ if (time_after(jiffies, start + (*seconds_waited+5)*HZ)) { ++ if (!*seconds_waited) ++ printk(KERN_WARNING "XENBUS: Waiting for " ++ "devices to initialise: "); ++ *seconds_waited += 5; ++ printk("%us...", max_delay - *seconds_waited); ++ if (*seconds_waited == max_delay) ++ return true; ++ } ++ ++ schedule_timeout_interruptible(HZ/10); ++ ++ return false; ++} + /* + * On a 5-minute timeout, wait for all devices currently configured. We need + * to do this to guarantee that the filesystems and / or network devices +@@ -209,19 +251,14 @@ static void wait_for_devices(struct xenbus_driver *xendrv) + if (!ready_to_wait_for_devices || !xen_domain()) + return; + +- while (exists_connecting_device(drv)) { +- if (time_after(jiffies, start + (seconds_waited+5)*HZ)) { +- if (!seconds_waited) +- printk(KERN_WARNING "XENBUS: Waiting for " +- "devices to initialise: "); +- seconds_waited += 5; +- printk("%us...", 300 - seconds_waited); +- if (seconds_waited == 300) +- break; +- } +- +- schedule_timeout_interruptible(HZ/10); +- } ++ while (exists_non_essential_connecting_device(drv)) ++ if (wait_loop(start, 30, &seconds_waited)) ++ break; ++ ++ /* Skips PVKB and PVFB check.*/ ++ while (exists_essential_connecting_device(drv)) ++ if (wait_loop(start, 270, &seconds_waited)) ++ break; + + if (seconds_waited) + printk("\n"); +-- +1.7.7.6 + 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 @@ +From 607a2c7f4e227d472b7b1c6b69ec7112f5e8b142 Mon Sep 17 00:00:00 2001 +From: Tomoki Sekiyama +Date: Fri, 30 Mar 2012 08:51:28 +0900 +Subject: [PATCH 011/165] USB: yurex: Remove allocation of coherent buffer for + setup-packet buffer + +commit 523fc5c14f6cad283e5a266eba0e343aed6e73d5 upstream. + +Removes allocation of coherent buffer for the control-request setup-packet +buffer from the yurex driver. Using coherent buffers for setup-packet is +obsolete and does not work with some USB host implementations. + +Signed-off-by: Tomoki Sekiyama +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/misc/yurex.c | 8 ++------ + 1 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c +index ac5bfd6..24bff37 100644 +--- a/drivers/usb/misc/yurex.c ++++ b/drivers/usb/misc/yurex.c +@@ -99,9 +99,7 @@ static void yurex_delete(struct kref *kref) + usb_put_dev(dev->udev); + if (dev->cntl_urb) { + usb_kill_urb(dev->cntl_urb); +- if (dev->cntl_req) +- usb_free_coherent(dev->udev, YUREX_BUF_SIZE, +- dev->cntl_req, dev->cntl_urb->setup_dma); ++ kfree(dev->cntl_req); + if (dev->cntl_buffer) + usb_free_coherent(dev->udev, YUREX_BUF_SIZE, + dev->cntl_buffer, dev->cntl_urb->transfer_dma); +@@ -234,9 +232,7 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_ + } + + /* allocate buffer for control req */ +- dev->cntl_req = usb_alloc_coherent(dev->udev, YUREX_BUF_SIZE, +- GFP_KERNEL, +- &dev->cntl_urb->setup_dma); ++ dev->cntl_req = kmalloc(YUREX_BUF_SIZE, GFP_KERNEL); + if (!dev->cntl_req) { + err("Could not allocate cntl_req"); + goto error; +-- +1.7.7.6 + 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 @@ +From 52f84b7d4cbfe7fc0ed467312e405df648bb1dca Mon Sep 17 00:00:00 2001 +From: Tomoki Sekiyama +Date: Fri, 30 Mar 2012 08:51:36 +0900 +Subject: [PATCH 012/165] USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag + in urb + +commit 532f17b5d59bf0deb6f1ff9bc1fb27d5b5011c09 upstream. + +Current probing code is setting URB_NO_TRANSFER_DMA_MAP flag into a wrong urb +structure, and this causes BUG_ON with some USB host implementations. +This patch fixes the issue. + +Signed-off-by: Tomoki Sekiyama +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/misc/yurex.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c +index 24bff37..2504694 100644 +--- a/drivers/usb/misc/yurex.c ++++ b/drivers/usb/misc/yurex.c +@@ -282,7 +282,7 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_ + usb_rcvintpipe(dev->udev, dev->int_in_endpointAddr), + dev->int_buffer, YUREX_BUF_SIZE, yurex_interrupt, + dev, 1); +- dev->cntl_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; ++ dev->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + if (usb_submit_urb(dev->urb, GFP_KERNEL)) { + retval = -EIO; + err("Could not submitting URB"); +-- +1.7.7.6 + 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 @@ +From 73b80f793567a6056f9265c82599b47bc5856db8 Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Mon, 16 Apr 2012 15:28:28 +0200 +Subject: [PATCH 013/165] uwb: fix use of del_timer_sync() in interrupt + +commit 9426cd05682745d1024dbabdec5631309bd2f480 upstream. + +del_timer_sync() cannot be used in interrupt. +Replace it with del_timer() and a flag + +Signed-off-by: Oliver Neukum +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/uwb/neh.c | 12 +++++++++++- + 1 files changed, 11 insertions(+), 1 deletions(-) + +diff --git a/drivers/uwb/neh.c b/drivers/uwb/neh.c +index a269937..8cb71bb 100644 +--- a/drivers/uwb/neh.c ++++ b/drivers/uwb/neh.c +@@ -107,6 +107,7 @@ struct uwb_rc_neh { + u8 evt_type; + __le16 evt; + u8 context; ++ u8 completed; + uwb_rc_cmd_cb_f cb; + void *arg; + +@@ -409,6 +410,7 @@ static void uwb_rc_neh_grok_event(struct uwb_rc *rc, struct uwb_rceb *rceb, size + struct device *dev = &rc->uwb_dev.dev; + struct uwb_rc_neh *neh; + struct uwb_rceb *notif; ++ unsigned long flags; + + if (rceb->bEventContext == 0) { + notif = kmalloc(size, GFP_ATOMIC); +@@ -422,7 +424,11 @@ static void uwb_rc_neh_grok_event(struct uwb_rc *rc, struct uwb_rceb *rceb, size + } else { + neh = uwb_rc_neh_lookup(rc, rceb); + if (neh) { +- del_timer_sync(&neh->timer); ++ spin_lock_irqsave(&rc->neh_lock, flags); ++ /* to guard against a timeout */ ++ neh->completed = 1; ++ del_timer(&neh->timer); ++ spin_unlock_irqrestore(&rc->neh_lock, flags); + uwb_rc_neh_cb(neh, rceb, size); + } else + dev_warn(dev, "event 0x%02x/%04x/%02x (%zu bytes): nobody cared\n", +@@ -568,6 +574,10 @@ static void uwb_rc_neh_timer(unsigned long arg) + unsigned long flags; + + spin_lock_irqsave(&rc->neh_lock, flags); ++ if (neh->completed) { ++ spin_unlock_irqrestore(&rc->neh_lock, flags); ++ return; ++ } + if (neh->context) + __uwb_rc_neh_rm(rc, neh); + else +-- +1.7.7.6 + 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 @@ +From 8a03e18a4ff4ab7f3a6da08bd3f564f8a7aa2c4e Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Wed, 18 Apr 2012 10:05:55 +0200 +Subject: [PATCH 014/165] uwb: fix error handling + +commit 5bd7b419ef2eb4989b207753e088c3437159618a upstream. + +Fatal errors such as a device disconnect must not trigger +error handling. The error returns must be checked. + +Signed-off-by: Oliver Neukum +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/uwb/hwa-rc.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/uwb/hwa-rc.c b/drivers/uwb/hwa-rc.c +index 2babcd4..86685e9 100644 +--- a/drivers/uwb/hwa-rc.c ++++ b/drivers/uwb/hwa-rc.c +@@ -645,7 +645,8 @@ void hwarc_neep_cb(struct urb *urb) + dev_err(dev, "NEEP: URB error %d\n", urb->status); + } + result = usb_submit_urb(urb, GFP_ATOMIC); +- if (result < 0) { ++ if (result < 0 && result != -ENODEV && result != -EPERM) { ++ /* ignoring unrecoverable errors */ + dev_err(dev, "NEEP: Can't resubmit URB (%d) resetting device\n", + result); + goto error; +-- +1.7.7.6 + 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 @@ +From e132279cab18984918fc3cc9f8f02c8bd71e2931 Mon Sep 17 00:00:00 2001 +From: Christian Riesch +Date: Mon, 16 Apr 2012 04:35:25 +0000 +Subject: [PATCH 015/165] davinci_mdio: Fix MDIO timeout check + +commit 5b76d0600b2b08eef77f8e9226938b7b6bde3099 upstream. + +Under heavy load (flood ping) it is possible for the MDIO timeout to +expire before the loop checks the GO bit again. This patch adds an +additional check whether the operation was done before actually +returning -ETIMEDOUT. + +To reproduce this bug, flood ping the device, e.g., ping -f -l 1000 +After some time, a "timed out waiting for user access" warning +may appear. And even worse, link may go down since the PHY reported a +timeout. + +Signed-off-by: Christian Riesch +Cc: Cyril Chemparathy +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/ti/davinci_mdio.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c +index 1f14be6..3802de3 100644 +--- a/drivers/net/ethernet/ti/davinci_mdio.c ++++ b/drivers/net/ethernet/ti/davinci_mdio.c +@@ -185,6 +185,11 @@ static inline int wait_for_user_access(struct davinci_mdio_data *data) + __davinci_mdio_reset(data); + return -EAGAIN; + } ++ ++ reg = __raw_readl(®s->user[0].access); ++ if ((reg & USERACCESS_GO) == 0) ++ return 0; ++ + dev_err(data->dev, "timed out waiting for user access\n"); + return -ETIMEDOUT; + } +-- +1.7.7.6 + 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 @@ +From f0553ecfc94510617f6b54a980e86a197e0746ac Mon Sep 17 00:00:00 2001 +From: Bing Zhao +Date: Thu, 12 Apr 2012 19:00:35 -0700 +Subject: [PATCH 016/165] mwifiex: update pcie8766 scratch register addresses + +commit 428ca8a7065354877db63ceabfc493107686eebe upstream. + +The scratch register addresses have been changed for newer chips. +Since the old chip was never shipped and it will not be supported +any more, just update register addresses to support the new chips. + +Signed-off-by: Bing Zhao +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/mwifiex/pcie.h | 18 +++++++++--------- + 1 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/drivers/net/wireless/mwifiex/pcie.h b/drivers/net/wireless/mwifiex/pcie.h +index 445ff21..2f218f9 100644 +--- a/drivers/net/wireless/mwifiex/pcie.h ++++ b/drivers/net/wireless/mwifiex/pcie.h +@@ -48,15 +48,15 @@ + #define PCIE_HOST_INT_STATUS_MASK 0xC3C + #define PCIE_SCRATCH_2_REG 0xC40 + #define PCIE_SCRATCH_3_REG 0xC44 +-#define PCIE_SCRATCH_4_REG 0xCC0 +-#define PCIE_SCRATCH_5_REG 0xCC4 +-#define PCIE_SCRATCH_6_REG 0xCC8 +-#define PCIE_SCRATCH_7_REG 0xCCC +-#define PCIE_SCRATCH_8_REG 0xCD0 +-#define PCIE_SCRATCH_9_REG 0xCD4 +-#define PCIE_SCRATCH_10_REG 0xCD8 +-#define PCIE_SCRATCH_11_REG 0xCDC +-#define PCIE_SCRATCH_12_REG 0xCE0 ++#define PCIE_SCRATCH_4_REG 0xCD0 ++#define PCIE_SCRATCH_5_REG 0xCD4 ++#define PCIE_SCRATCH_6_REG 0xCD8 ++#define PCIE_SCRATCH_7_REG 0xCDC ++#define PCIE_SCRATCH_8_REG 0xCE0 ++#define PCIE_SCRATCH_9_REG 0xCE4 ++#define PCIE_SCRATCH_10_REG 0xCE8 ++#define PCIE_SCRATCH_11_REG 0xCEC ++#define PCIE_SCRATCH_12_REG 0xCF0 + + #define CPU_INTR_DNLD_RDY BIT(0) + #define CPU_INTR_DOOR_BELL BIT(1) +-- +1.7.7.6 + 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 @@ +From 97f7538da8a6b3e8cef6322b2024817759393079 Mon Sep 17 00:00:00 2001 +From: Arend van Spriel +Date: Wed, 11 Apr 2012 11:52:51 +0200 +Subject: [PATCH 017/165] brcm80211: smac: resume transmit fifo upon receiving + frames + +commit badc4f07622f0f7093a201638f45e85765f1b5e4 upstream. + +There have been reports about not being able to use access-points +on channel 12 and 13 or having connectivity issues when these channels +were part of the selected regulatory domain. Upon switching to these +channels the brcmsmac driver suspends the transmit dma fifos. This +patch resumes them upon handing over the first received beacon to +mac80211. + +This patch is to be applied to the stable tree for kernel versions +3.2 and 3.3. + +Tested-by: Francesco Saverio Schiavarelli +Reviewed-by: Pieter-Paul Giesberts +Reviewed-by: Brett Rudley +Signed-off-by: Arend van Spriel +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/brcm80211/brcmsmac/main.c | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c +index 453f58e..f98becc 100644 +--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +@@ -7865,6 +7865,7 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh, + { + int len_mpdu; + struct ieee80211_rx_status rx_status; ++ struct ieee80211_hdr *hdr; + + memset(&rx_status, 0, sizeof(rx_status)); + prep_mac80211_status(wlc, rxh, p, &rx_status); +@@ -7874,6 +7875,13 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh, + skb_pull(p, D11_PHY_HDR_LEN); + __skb_trim(p, len_mpdu); + ++ /* unmute transmit */ ++ if (wlc->hw->suspended_fifos) { ++ hdr = (struct ieee80211_hdr *)p->data; ++ if (ieee80211_is_beacon(hdr->frame_control)) ++ brcms_b_mute(wlc->hw, false); ++ } ++ + memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status)); + ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p); + } +-- +1.7.7.6 + 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 @@ +From 6dd8dc1e17571cbe55630e5d1e85aa7e27a0b257 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?David=20H=C3=A4rdeman?= +Date: Sun, 8 Apr 2012 06:13:04 -0300 +Subject: [PATCH 018/165] rc-core: set mode for winbond-cir +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit d9b786955f80fb306471fdb9ea24c6d03af6ca36 upstream. + +Setting the correct mode is required by rc-core or scancodes won't be +generated (which isn't very user-friendly). + +This one-line fix should be suitable for 3.4-rc2. + +Signed-off-by: David Härdeman +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Ben Hutchings +--- + drivers/media/rc/winbond-cir.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c +index 13f54b5..a7e7d6f 100644 +--- a/drivers/media/rc/winbond-cir.c ++++ b/drivers/media/rc/winbond-cir.c +@@ -1046,6 +1046,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) + goto exit_unregister_led; + } + ++ data->dev->driver_type = RC_DRIVER_IR_RAW; + data->dev->driver_name = WBCIR_NAME; + data->dev->input_name = WBCIR_NAME; + data->dev->input_phys = "wbcir/cir0"; +-- +1.7.7.6 + 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 @@ +From d5cc94665b578e3e5e87884fb802e49b2f276298 Mon Sep 17 00:00:00 2001 +From: Alexey Khoroshilov +Date: Thu, 5 Apr 2012 18:53:20 -0300 +Subject: [PATCH 019/165] drxk: Does not unlock mutex if sanity check failed + in scu_command() + +commit e4459e1682c107d7ee1bf102c1ba534230e9b50b upstream. + +If sanity check fails in scu_command(), goto error leads to unlock of +an unheld mutex. The check should not fail in reality, but it nevertheless +worth fixing. + +Found by Linux Driver Verification project (linuxtesting.org). + +Signed-off-by: Alexey Khoroshilov +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Ben Hutchings +--- + drivers/media/dvb/frontends/drxk_hard.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c +index f6431ef..a1f5e3d 100644 +--- a/drivers/media/dvb/frontends/drxk_hard.c ++++ b/drivers/media/dvb/frontends/drxk_hard.c +@@ -1523,8 +1523,10 @@ static int scu_command(struct drxk_state *state, + dprintk(1, "\n"); + + if ((cmd == 0) || ((parameterLen > 0) && (parameter == NULL)) || +- ((resultLen > 0) && (result == NULL))) +- goto error; ++ ((resultLen > 0) && (result == NULL))) { ++ printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); ++ return status; ++ } + + mutex_lock(&state->mutex); + +-- +1.7.7.6 + 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 @@ +From 9080bb10c5fa9dc3a8c358eec3bffc5e0dd29ea8 Mon Sep 17 00:00:00 2001 +From: Lukasz Kucharczyk +Date: Wed, 11 Apr 2012 14:55:10 +0200 +Subject: [PATCH 020/165] cfg80211: fix interface combinations check. + +commit e55a4046dab28c440c96890bdddcf02dc8981f2d upstream. + +Signed-off-by: Lukasz Kucharczyk +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + net/wireless/util.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/net/wireless/util.c b/net/wireless/util.c +index 4dde429..8bf8902 100644 +--- a/net/wireless/util.c ++++ b/net/wireless/util.c +@@ -996,7 +996,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, + if (rdev->wiphy.software_iftypes & BIT(iftype)) + continue; + for (j = 0; j < c->n_limits; j++) { +- if (!(limits[j].types & iftype)) ++ if (!(limits[j].types & BIT(iftype))) + continue; + if (limits[j].max < num[iftype]) + goto cont; +-- +1.7.7.6 + 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 @@ +From 3ff39b2411c6722c1ee6c490ac4ec7f90f026d64 Mon Sep 17 00:00:00 2001 +From: David Miller +Date: Wed, 25 Apr 2012 19:41:32 -0500 +Subject: [PATCH 021/165] Fix modpost failures in fedora 17 + +commit e88aa7bbbe3046a125ea1936b16bb921cc9c6349 upstream. + +The symbol table on x86-64 starts to have entries that have names +like: + +_GLOBAL__sub_I_65535_0___mod_x86cpu_device_table + +They are of type STT_FUNCTION and this one had a length of 18. This +matched the device ID validation logic and it barfed because the +length did not meet the device type's criteria. + +-------------------- +FATAL: 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. +Fix definition of struct x86cpu_device_id in mod_devicetable.h +-------------------- + +These are some kind of compiler tool internal stuff being emitted and +not something we want to inspect in modpost's device ID table +validation code. + +So skip the symbol if it is not of type STT_OBJECT. + +Signed-off-by: David S. Miller +Acked-by: Sam Ravnborg +Signed-off-by: Michal Marek +Signed-off-by: Jonathan Nieder +Signed-off-by: Ben Hutchings +--- + scripts/mod/file2alias.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c +index f936d1f..d1d0ae8 100644 +--- a/scripts/mod/file2alias.c ++++ b/scripts/mod/file2alias.c +@@ -926,6 +926,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, + if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections) + return; + ++ /* We're looking for an object */ ++ if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) ++ return; ++ + /* Handle all-NULL symbols allocated into .bss */ + if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) { + zeros = calloc(1, sym->st_size); +-- +1.7.7.6 + 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 @@ +From 8afb43e5f076643f012d0267aebb215cc0f0767b Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Mon, 23 Apr 2012 11:14:50 -0700 +Subject: [PATCH 022/165] mm: fix s390 BUG by __set_page_dirty_no_writeback on + swap + +commit aca50bd3b4c4bb5528a1878158ba7abce41de534 upstream. + +Mel reports a BUG_ON(slot == NULL) in radix_tree_tag_set() on s390 +3.0.13: called from __set_page_dirty_nobuffers() when page_remove_rmap() +tries to transfer dirty flag from s390 storage key to struct page and +radix_tree. + +That would be because of reclaim's shrink_page_list() calling +add_to_swap() on this page at the same time: first PageSwapCache is set +(causing page_mapping(page) to appear as &swapper_space), then +page->private set, then tree_lock taken, then page inserted into +radix_tree - so there's an interval before taking the lock when the +radix_tree slot is empty. + +We could fix this by moving __add_to_swap_cache()'s spin_lock_irq up +before the SetPageSwapCache. But a better fix is simply to do what's +five years overdue: Ken Chen introduced __set_page_dirty_no_writeback() +(if !PageDirty TestSetPageDirty) for tmpfs to skip all the radix_tree +overhead, and swap is just the same - it ignores the radix_tree tag, and +does not participate in dirty page accounting, so should be using +__set_page_dirty_no_writeback() too. + +s390 testing now confirms that this does indeed fix the problem. + +Reported-by: Mel Gorman +Signed-off-by: Hugh Dickins +Acked-by: Mel Gorman +Cc: Andrew Morton +Cc: Martin Schwidefsky +Cc: Heiko Carstens +Cc: Rik van Riel +Cc: Ken Chen +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + mm/swap_state.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/mm/swap_state.c b/mm/swap_state.c +index 78cc4d1..7704d9c 100644 +--- a/mm/swap_state.c ++++ b/mm/swap_state.c +@@ -27,7 +27,7 @@ + */ + static const struct address_space_operations swap_aops = { + .writepage = swap_writepage, +- .set_page_dirty = __set_page_dirty_nobuffers, ++ .set_page_dirty = __set_page_dirty_no_writeback, + .migratepage = migrate_page, + }; + +-- +1.7.7.6 + 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 @@ +From fd272b3336e1e535826cc345e10353eb104363e8 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Tue, 24 Apr 2012 10:23:16 +1000 +Subject: [PATCH 023/165] md: fix possible corruption of array metadata on + shutdown. + +commit 30b8aa9172dfeaac6d77897c67ee9f9fc574cdbb upstream. + +commit c744a65c1e2d59acc54333ce8 + md: don't set md arrays to readonly on shutdown. + +removed the possibility of a 'BUG' when data is written to an array +that has just been switched to read-only, but also introduced the +possibility that the array metadata could be corrupted. + +If, when md_notify_reboot gets the mddev lock, the array is +in a state where it is assembled but hasn't been started (as can +happen if the personality module is not available, or in other unusual +situations), then incorrect metadata will be written out making it +impossible to re-assemble the array. + +So only call __md_stop_writes() if the array has actually been +activated. + +This patch is needed for any stable kernel which has had the above +commit applied. + +Reported-by: Christoph Nelles +Signed-off-by: NeilBrown +Signed-off-by: Ben Hutchings +--- + drivers/md/md.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/md/md.c b/drivers/md/md.c +index 6f37aa4..065ab4f 100644 +--- a/drivers/md/md.c ++++ b/drivers/md/md.c +@@ -8100,7 +8100,8 @@ static int md_notify_reboot(struct notifier_block *this, + + for_each_mddev(mddev, tmp) { + if (mddev_trylock(mddev)) { +- __md_stop_writes(mddev); ++ if (mddev->pers) ++ __md_stop_writes(mddev); + mddev->safemode = 2; + mddev_unlock(mddev); + } +-- +1.7.7.6 + 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 @@ +From 6556e20032c10ba45a6101a9454265c0f8c0fbc6 Mon Sep 17 00:00:00 2001 +From: Shaohua Li +Date: Fri, 13 Apr 2012 10:27:35 +0800 +Subject: [PATCH 024/165] jbd2: use GFP_NOFS for blkdev_issue_flush + +commit 99aa78466777083255b876293e9e83dec7cd809a upstream. + +flush request is issued in transaction commit code path, so looks using +GFP_KERNEL to allocate memory for flush request bio falls into the classic +deadlock issue. I saw btrfs and dm get it right, but ext4, xfs and md are +using GFP. + +Signed-off-by: Shaohua Li +Signed-off-by: Theodore Ts'o +Reviewed-by: Jan Kara +Signed-off-by: Ben Hutchings +--- + fs/jbd2/commit.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c +index 68d704d..d751f04 100644 +--- a/fs/jbd2/commit.c ++++ b/fs/jbd2/commit.c +@@ -683,7 +683,7 @@ start_journal_io: + if (commit_transaction->t_need_data_flush && + (journal->j_fs_dev != journal->j_dev) && + (journal->j_flags & JBD2_BARRIER)) +- blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); ++ blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS, NULL); + + /* Done it all: now write the commit record asynchronously. */ + if (JBD2_HAS_INCOMPAT_FEATURE(journal, +@@ -819,7 +819,7 @@ wait_for_iobuf: + if (JBD2_HAS_INCOMPAT_FEATURE(journal, + JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) && + journal->j_flags & JBD2_BARRIER) { +- blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL); ++ blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL); + } + + if (err) +-- +1.7.7.6 + 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 @@ +From f9515bb74e74a5f3f7cb963984bdd8c8731495ff Mon Sep 17 00:00:00 2001 +From: Yuri Matylitski +Date: Fri, 20 Apr 2012 12:38:32 +0300 +Subject: [PATCH 025/165] USB: serial: cp210x: Fixed usb_control_msg timeout + values + +commit 2d5733fcd33dd451022d197cb6b476e970519ca7 upstream. + +Fixed too small hardcoded timeout values for usb_control_msg +in driver for SiliconLabs cp210x-based usb-to-serial adapters. +Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT. + +Signed-off-by: Yuri Matylitski +Acked-by: Kirill A. Shutemov +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/serial/cp210x.c | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c +index 4c12404..f2c57e0 100644 +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -285,7 +285,8 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request, + /* Issue the request, attempting to read 'size' bytes */ + result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), + request, REQTYPE_DEVICE_TO_HOST, 0x0000, +- port_priv->bInterfaceNumber, buf, size, 300); ++ port_priv->bInterfaceNumber, buf, size, ++ USB_CTRL_GET_TIMEOUT); + + /* Convert data into an array of integers */ + for (i = 0; i < length; i++) +@@ -335,12 +336,14 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request, + result = usb_control_msg(serial->dev, + usb_sndctrlpipe(serial->dev, 0), + request, REQTYPE_HOST_TO_DEVICE, 0x0000, +- port_priv->bInterfaceNumber, buf, size, 300); ++ port_priv->bInterfaceNumber, buf, size, ++ USB_CTRL_SET_TIMEOUT); + } else { + result = usb_control_msg(serial->dev, + usb_sndctrlpipe(serial->dev, 0), + request, REQTYPE_HOST_TO_DEVICE, data[0], +- port_priv->bInterfaceNumber, NULL, 0, 300); ++ port_priv->bInterfaceNumber, NULL, 0, ++ USB_CTRL_SET_TIMEOUT); + } + + kfree(buf); +-- +1.7.7.6 + 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 @@ +From 069f7216ddee90ddca6e1d040e58b6735f89fca6 Mon Sep 17 00:00:00 2001 +From: Tomoya MORINAGA +Date: Thu, 12 Apr 2012 10:47:50 +0900 +Subject: [PATCH 026/165] pch_uart: Fix dma channel unallocated issue + +commit af6d17cdc8c89aeb3101f0d27cd32fc0592b40b2 upstream. + +This driver anticipates pch_uart_verify_port() is not called +during installation. +However, actually pch_uart_verify_port() is called during +installation. +As a result, memory access violation occurs like below. + +0. initial value: use_dma=0 +1. starup() + - dma channel is not allocated because use_dma=0 +2. pch_uart_verify_port() + - Set use_dma=1 +3. UART processing acts DMA mode because use_dma=1 + - memory access violation occurs! + +This patch fixes the issue. + +Solution: +Whenever pch_uart_verify_port() is called and then +dma channel is not allocated, the channel should be allocated. + +Signed-off-by: Tomoya MORINAGA +Signed-off-by: Greg Kroah-Hartman +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + drivers/tty/serial/pch_uart.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c +index da776a0..a4b192d 100644 +--- a/drivers/tty/serial/pch_uart.c ++++ b/drivers/tty/serial/pch_uart.c +@@ -1356,9 +1356,11 @@ static int pch_uart_verify_port(struct uart_port *port, + __func__); + return -EOPNOTSUPP; + #endif +- priv->use_dma = 1; + priv->use_dma_flag = 1; + dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n"); ++ if (!priv->use_dma) ++ pch_request_dma(port); ++ priv->use_dma = 1; + } + + return 0; +-- +1.7.7.6 + 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 @@ +From fefc2c6916651c05eed1882c3a59a6468d91e417 Mon Sep 17 00:00:00 2001 +From: Julia Lawall +Date: Thu, 19 Apr 2012 18:12:40 +0200 +Subject: [PATCH 027/165] drivers/tty/amiserial.c: add missing tty_unlock + +commit d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 upstream. + +tty_unlock is used on all other exits from the function. + +Signed-off-by: Julia Lawall +Acked-by: Jiri Slaby +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/tty/amiserial.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c +index b84c834..8daf073 100644 +--- a/drivers/tty/amiserial.c ++++ b/drivers/tty/amiserial.c +@@ -1113,8 +1113,10 @@ static int set_serial_info(struct async_struct * info, + (new_serial.close_delay != state->close_delay) || + (new_serial.xmit_fifo_size != state->xmit_fifo_size) || + ((new_serial.flags & ~ASYNC_USR_MASK) != +- (state->flags & ~ASYNC_USR_MASK))) ++ (state->flags & ~ASYNC_USR_MASK))) { ++ tty_unlock(); + return -EPERM; ++ } + state->flags = ((state->flags & ~ASYNC_USR_MASK) | + (new_serial.flags & ASYNC_USR_MASK)); + info->flags = ((info->flags & ~ASYNC_USR_MASK) | +-- +1.7.7.6 + 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 @@ +From 769a100618c82ac6e8e284cc14a5fbffe13e31ce Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= +Date: Tue, 17 Apr 2012 21:37:29 +0200 +Subject: [PATCH 028/165] USB: sierra: avoid QMI/wwan interface on MC77xx +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit 749541d19e70905e3971f2a08335a206a98e4d0c upstream. + +These devices have a number of non serial interfaces as well. Use +the existing "Direct IP" blacklist to prevent binding to interfaces +which are handled by other drivers. + +We also extend the "Direct IP" blacklist with with interfaces only +seen in "QMI" mode, assuming that these devices use the same +interface numbers for serial interfaces both in "Direct IP" and in +"QMI" mode. + +Signed-off-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/serial/sierra.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c +index 7c3ec9e..e093585 100644 +--- a/drivers/usb/serial/sierra.c ++++ b/drivers/usb/serial/sierra.c +@@ -221,7 +221,7 @@ static const struct sierra_iface_info typeB_interface_list = { + }; + + /* 'blacklist' of interfaces not served by this driver */ +-static const u8 direct_ip_non_serial_ifaces[] = { 7, 8, 9, 10, 11 }; ++static const u8 direct_ip_non_serial_ifaces[] = { 7, 8, 9, 10, 11, 19, 20 }; + static const struct sierra_iface_info direct_ip_interface_blacklist = { + .infolen = ARRAY_SIZE(direct_ip_non_serial_ifaces), + .ifaceinfo = direct_ip_non_serial_ifaces, +@@ -289,7 +289,6 @@ static const struct usb_device_id id_table[] = { + { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */ + { USB_DEVICE(0x1199, 0x6859) }, /* Sierra Wireless AirCard 885 E */ + { USB_DEVICE(0x1199, 0x685A) }, /* Sierra Wireless AirCard 885 E */ +- { USB_DEVICE(0x1199, 0x68A2) }, /* Sierra Wireless MC7710 */ + /* Sierra Wireless C885 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6880, 0xFF, 0xFF, 0xFF)}, + /* Sierra Wireless C888, Air Card 501, USB 303, USB 304 */ +@@ -299,6 +298,9 @@ static const struct usb_device_id id_table[] = { + /* Sierra Wireless HSPA Non-Composite Device */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6892, 0xFF, 0xFF, 0xFF)}, + { USB_DEVICE(0x1199, 0x6893) }, /* Sierra Wireless Device */ ++ { USB_DEVICE(0x1199, 0x68A2), /* Sierra Wireless MC77xx in QMI mode */ ++ .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist ++ }, + { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + }, +-- +1.7.7.6 + 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 @@ +From 611589daeef0bd0f6b36f1fbb17f34b6abf05568 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Tue, 17 Apr 2012 15:24:15 -0400 +Subject: [PATCH 029/165] EHCI: fix criterion for resuming the root hub + +commit dc75ce9d929aabeb0843a6b1a4ab320e58ba1597 upstream. + +This patch (as1542) changes the criterion ehci-hcd uses to tell when +it needs to resume the controller's root hub. A resume is needed when +a port status change is detected, obviously, but only if the root hub +is currently suspended. + +Right now the driver tests whether the root hub is running, and that +is not the correct test. In particular, if the controller has died +then the root hub should not be restarted. In addition, some buggy +hardware occasionally requires the root hub to be running and +sending out SOF packets even while it is nominally supposed to be +suspended. + +In the end, the test needs to be changed. Rather than checking whether +the root hub is currently running, the driver will now check whether +the root hub is currently suspended. This will yield the correct +behavior in all cases. + +Signed-off-by: Alan Stern +CC: Peter Chen +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/host/ehci-hcd.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c +index 3ff9f82..ffbbf54 100644 +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -867,7 +867,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) + pcd_status = status; + + /* resume root hub? */ +- if (!(cmd & CMD_RUN)) ++ if (ehci->rh_state == EHCI_RH_SUSPENDED) + usb_hcd_resume_root_hub(hcd); + + /* get per-port change detect bits */ +-- +1.7.7.6 + 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 @@ +From 2259a159b9b3861dcc0c8cd9c52ef85cb11ad2a5 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Wed, 18 Apr 2012 11:33:00 -0400 +Subject: [PATCH 030/165] EHCI: always clear the STS_FLR status bit + +commit 2fbe2bf1fd37f9d99950bd8d8093623cf22cf08b upstream. + +This patch (as1544) fixes a problem affecting some EHCI controllers. +They can generate interrupts whenever the STS_FLR status bit is turned +on, even though that bit is masked out in the Interrupt Enable +register. + +Since the driver doesn't use STS_FLR anyway, the patch changes the +interrupt routine to clear that bit whenever it is set, rather than +leaving it alone. + +Signed-off-by: Alan Stern +Reported-and-tested-by: Tomoya MORINAGA +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/host/ehci-hcd.c | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c +index ffbbf54..da2f711 100644 +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -815,8 +815,13 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) + goto dead; + } + ++ /* ++ * We don't use STS_FLR, but some controllers don't like it to ++ * remain on, so mask it out along with the other status bits. ++ */ ++ masked_status = status & (INTR_MASK | STS_FLR); ++ + /* Shared IRQ? */ +- masked_status = status & INTR_MASK; + if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) { + spin_unlock(&ehci->lock); + return IRQ_NONE; +-- +1.7.7.6 + 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 @@ +From 770feb782844457789a51d13d2933cca141bb487 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Tue, 17 Apr 2012 15:22:39 -0400 +Subject: [PATCH 031/165] USB: fix deadlock in bConfigurationValue attribute + method + +commit 8963c487a80b4688c9e68dcc504a90074aacc145 upstream. + +This patch (as154) fixes a self-deadlock that occurs when userspace +writes to the bConfigurationValue sysfs attribute for a hub with +children. The task tries to lock the bandwidth_mutex at a time when +it already owns the lock: + + The attribute's method calls usb_set_configuration(), + which calls usb_disable_device() with the bandwidth_mutex + held. + + usb_disable_device() unregisters the existing interfaces, + which causes the hub driver to be unbound. + + The hub_disconnect() routine calls hub_quiesce(), which + calls usb_disconnect() for each of the hub's children. + + usb_disconnect() attempts to acquire the bandwidth_mutex + around a call to usb_disable_device(). + +The solution is to make usb_disable_device() acquire the mutex for +itself instead of requiring the caller to hold it. Then the mutex can +cover only the bandwidth deallocation operation and not the region +where the interfaces are unregistered. + +This has the potential to change system behavior slightly when a +config change races with another config or altsetting change. Some of +the bandwidth released from the old config might get claimed by the +other config or altsetting, make it impossible to restore the old +config in case of a failure. But since we don't try to recover from +config-change failures anyway, this doesn't matter. + +[This should be marked for stable kernels that contain the commit +fccf4e86200b8f5edd9a65da26f150e32ba79808 "USB: Free bandwidth when +usb_disable_device is called." +That commit was marked for stable kernels as old as 2.6.32.] + +Signed-off-by: Alan Stern +Signed-off-by: Sarah Sharp +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/core/hub.c | 3 --- + drivers/usb/core/message.c | 6 +++--- + 2 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c +index 18373ec..ab4e49f 100644 +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -1644,7 +1644,6 @@ void usb_disconnect(struct usb_device **pdev) + { + struct usb_device *udev = *pdev; + int i; +- struct usb_hcd *hcd = bus_to_hcd(udev->bus); + + /* mark the device as inactive, so any further urb submissions for + * this device (and any of its children) will fail immediately. +@@ -1667,9 +1666,7 @@ void usb_disconnect(struct usb_device **pdev) + * so that the hardware is now fully quiesced. + */ + dev_dbg (&udev->dev, "unregistering device\n"); +- mutex_lock(hcd->bandwidth_mutex); + usb_disable_device(udev, 0); +- mutex_unlock(hcd->bandwidth_mutex); + usb_hcd_synchronize_unlinks(udev); + + usb_remove_ep_devs(&udev->ep0); +diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c +index aed3e07..ca717da 100644 +--- a/drivers/usb/core/message.c ++++ b/drivers/usb/core/message.c +@@ -1136,8 +1136,6 @@ void usb_disable_interface(struct usb_device *dev, struct usb_interface *intf, + * Deallocates hcd/hardware state for the endpoints (nuking all or most + * pending urbs) and usbcore state for the interfaces, so that usbcore + * must usb_set_configuration() before any interfaces could be used. +- * +- * Must be called with hcd->bandwidth_mutex held. + */ + void usb_disable_device(struct usb_device *dev, int skip_ep0) + { +@@ -1190,7 +1188,9 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) + usb_disable_endpoint(dev, i + USB_DIR_IN, false); + } + /* Remove endpoints from the host controller internal state */ ++ mutex_lock(hcd->bandwidth_mutex); + usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL); ++ mutex_unlock(hcd->bandwidth_mutex); + /* Second pass: remove endpoint pointers */ + } + for (i = skip_ep0; i < 16; ++i) { +@@ -1750,7 +1750,6 @@ free_interfaces: + /* if it's already configured, clear out old state first. + * getting rid of old interfaces means unbinding their drivers. + */ +- mutex_lock(hcd->bandwidth_mutex); + if (dev->state != USB_STATE_ADDRESS) + usb_disable_device(dev, 1); /* Skip ep0 */ + +@@ -1763,6 +1762,7 @@ free_interfaces: + * host controller will not allow submissions to dropped endpoints. If + * this call fails, the device state is unchanged. + */ ++ mutex_lock(hcd->bandwidth_mutex); + ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL); + if (ret < 0) { + mutex_unlock(hcd->bandwidth_mutex); +-- +1.7.7.6 + 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 @@ +From fadd4263bca7146d233ff944c17cb0f42a6e2112 Mon Sep 17 00:00:00 2001 +From: Andrzej Pietrasiewicz +Date: Wed, 28 Mar 2012 09:30:50 +0200 +Subject: [PATCH 032/165] usb: gadget: eliminate NULL pointer dereference + (bugfix) + +commit 92b0abf80c5c5f0e0d71d1309688a330fd74731b upstream. + +usb: gadget: eliminate NULL pointer dereference (bugfix) + +This patch fixes a bug which causes NULL pointer dereference in +ffs_ep0_ioctl. The bug happens when the FunctionFS is not bound (either +has not been bound yet or has been bound and then unbound) and can be +reproduced with running the following commands: + +$ insmod g_ffs.ko +$ mount -t functionfs func /dev/usbgadget +$ ./null + +where null.c is: + +#include +#include + +int main(void) +{ + int fd = open("/dev/usbgadget/ep0", O_RDWR); + ioctl(fd, FUNCTIONFS_CLEAR_HALT); + + return 0; +} + +Signed-off-by: Andrzej Pietrasiewicz +Signed-off-by: Kyungmin Park +Signed-off-by: Felipe Balbi +Signed-off-by: Ben Hutchings +--- + drivers/usb/gadget/f_fs.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c +index acb3800..0e641a1 100644 +--- a/drivers/usb/gadget/f_fs.c ++++ b/drivers/usb/gadget/f_fs.c +@@ -712,7 +712,7 @@ static long ffs_ep0_ioctl(struct file *file, unsigned code, unsigned long value) + if (code == FUNCTIONFS_INTERFACE_REVMAP) { + struct ffs_function *func = ffs->func; + ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV; +- } else if (gadget->ops->ioctl) { ++ } else if (gadget && gadget->ops->ioctl) { + ret = gadget->ops->ioctl(gadget, code, value); + } else { + ret = -ENOTTY; +-- +1.7.7.6 + 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 @@ +From 839226b88ef2954d750d72f3ce2c6657393b8a09 Mon Sep 17 00:00:00 2001 +From: Kishon Vijay Abraham I +Date: Wed, 21 Mar 2012 21:30:20 +0530 +Subject: [PATCH 033/165] usb: musb: omap: fix crash when musb glue (omap) + gets initialized + +commit 3006dc8c627d738693e910c159630e4368c9e86c upstream. + +pm_runtime_enable is being called after omap2430_musb_init. Hence +pm_runtime_get_sync in omap2430_musb_init does not have any effect (does +not enable clocks) resulting in a crash during register access. It is +fixed here. + +Signed-off-by: Kishon Vijay Abraham I +Signed-off-by: Felipe Balbi +Signed-off-by: Ben Hutchings +--- + drivers/usb/musb/omap2430.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c +index dd907d5..bd93e9f 100644 +--- a/drivers/usb/musb/omap2430.c ++++ b/drivers/usb/musb/omap2430.c +@@ -463,14 +463,14 @@ static int __init omap2430_probe(struct platform_device *pdev) + goto err2; + } + ++ pm_runtime_enable(&pdev->dev); ++ + ret = platform_device_add(musb); + if (ret) { + dev_err(&pdev->dev, "failed to register musb device\n"); + goto err2; + } + +- pm_runtime_enable(&pdev->dev); +- + return 0; + + err2: +-- +1.7.7.6 + 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 @@ +From 150f1a9111e30cc70efdac57e72af7d537754099 Mon Sep 17 00:00:00 2001 +From: Shubhrajyoti D +Date: Thu, 22 Mar 2012 12:48:06 +0530 +Subject: [PATCH 034/165] usb: musb: omap: fix the error check for + pm_runtime_get_sync + +commit ad579699c4f0274bf522a9252ff9b20c72197e48 upstream. + +pm_runtime_get_sync returns a signed integer. In case of errors +it returns a negative value. This patch fixes the error check +by making it signed instead of unsigned thus preventing register +access if get_sync_fails. Also passes the error cause to the +debug message. + +Cc: Kishon Vijay Abraham I +Signed-off-by: Shubhrajyoti D +Signed-off-by: Felipe Balbi +Signed-off-by: Ben Hutchings +--- + drivers/usb/musb/omap2430.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c +index bd93e9f..522ac37 100644 +--- a/drivers/usb/musb/omap2430.c ++++ b/drivers/usb/musb/omap2430.c +@@ -283,7 +283,8 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work) + + static int omap2430_musb_init(struct musb *musb) + { +- u32 l, status = 0; ++ u32 l; ++ int status = 0; + struct device *dev = musb->controller; + struct musb_hdrc_platform_data *plat = dev->platform_data; + struct omap_musb_board_data *data = plat->board_data; +@@ -302,7 +303,7 @@ static int omap2430_musb_init(struct musb *musb) + + status = pm_runtime_get_sync(dev); + if (status < 0) { +- dev_err(dev, "pm_runtime_get_sync FAILED"); ++ dev_err(dev, "pm_runtime_get_sync FAILED %d\n", status); + goto err1; + } + +-- +1.7.7.6 + 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 @@ +From 9a9c948f1f3fdf421e090b10dc1fe15308d325d0 Mon Sep 17 00:00:00 2001 +From: Thomas Jarosch +Date: Wed, 7 Dec 2011 22:08:11 +0100 +Subject: [PATCH 035/165] PCI: Add quirk for still enabled interrupts on Intel + Sandy Bridge GPUs + +commit f67fd55fa96f7d7295b43ffbc4a97d8f55e473aa upstream. + +Some BIOS implementations leave the Intel GPU interrupts enabled, +even though no one is handling them (f.e. i915 driver is never loaded). +Additionally the interrupt destination is not set up properly +and the interrupt ends up -somewhere-. + +These spurious interrupts are "sticky" and the kernel disables +the (shared) interrupt line after 100.000+ generated interrupts. + +Fix it by disabling the still enabled interrupts. +This resolves crashes often seen on monitor unplug. + +Tested on the following boards: +- Intel DH61CR: Affected +- Intel DH67BL: Affected +- Intel S1200KP server board: Affected +- Asus P8H61-M LE: Affected, but system does not crash. + Probably the IRQ ends up somewhere unnoticed. + +According to reports on the net, the Intel DH61WW board is also affected. + +Many thanks to Jesse Barnes from Intel for helping +with the register configuration and to Intel in general +for providing public hardware documentation. + +Signed-off-by: Thomas Jarosch +Tested-by: Charlie Suffin +Signed-off-by: Jesse Barnes +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + drivers/pci/quirks.c | 34 ++++++++++++++++++++++++++++++++++ + 1 files changed, 34 insertions(+), 0 deletions(-) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 6476547..78fda9c 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -2906,6 +2906,40 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f8, quirk_intel_mc_errata); + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); + ++/* ++ * Some BIOS implementations leave the Intel GPU interrupts enabled, ++ * even though no one is handling them (f.e. i915 driver is never loaded). ++ * Additionally the interrupt destination is not set up properly ++ * and the interrupt ends up -somewhere-. ++ * ++ * These spurious interrupts are "sticky" and the kernel disables ++ * the (shared) interrupt line after 100.000+ generated interrupts. ++ * ++ * Fix it by disabling the still enabled interrupts. ++ * This resolves crashes often seen on monitor unplug. ++ */ ++#define I915_DEIER_REG 0x4400c ++static void __devinit disable_igfx_irq(struct pci_dev *dev) ++{ ++ void __iomem *regs = pci_iomap(dev, 0, 0); ++ if (regs == NULL) { ++ dev_warn(&dev->dev, "igfx quirk: Can't iomap PCI device\n"); ++ return; ++ } ++ ++ /* Check if any interrupt line is still enabled */ ++ if (readl(regs + I915_DEIER_REG) != 0) { ++ dev_warn(&dev->dev, "BIOS left Intel GPU interrupts enabled; " ++ "disabling\n"); ++ ++ writel(0, regs + I915_DEIER_REG); ++ } ++ ++ pci_iounmap(dev, regs); ++} ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); ++ + static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, + struct pci_fixup *end) + { +-- +1.7.7.6 + 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 @@ +From 7ae05a044d79254f47ba9cb8772f5c3137a9d17d Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Thu, 12 Apr 2012 20:32:25 -0400 +Subject: [PATCH 036/165] ext4: fix endianness breakage in + ext4_split_extent_at() + +commit af1584f570b19b0285e4402a0b54731495d31784 upstream. + +->ee_len is __le16, so assigning cpu_to_le32() to it is going to do +Bad Things(tm) on big-endian hosts... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/ext4/extents.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c +index c2a2012..54f2bdc 100644 +--- a/fs/ext4/extents.c ++++ b/fs/ext4/extents.c +@@ -2812,7 +2812,7 @@ static int ext4_split_extent_at(handle_t *handle, + if (err) + goto fix_extent_len; + /* update the extent length and mark as initialized */ +- ex->ee_len = cpu_to_le32(ee_len); ++ ex->ee_len = cpu_to_le16(ee_len); + ext4_ext_try_to_merge(inode, path, ex); + err = ext4_ext_dirty(handle, inode, path + depth); + goto out; +-- +1.7.7.6 + 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 @@ +From f6b20107e527f8d57ec7c2c745109f4609d68abf Mon Sep 17 00:00:00 2001 +From: Alex Williamson +Date: Fri, 27 Apr 2012 16:54:08 -0500 +Subject: [PATCH 037/165] KVM: unmap pages from the iommu when slots are + removed + +commit 32f6daad4651a748a58a3ab6da0611862175722f upstream. + +We've been adding new mappings, but not destroying old mappings. +This can lead to a page leak as pages are pinned using +get_user_pages, but only unpinned with put_page if they still +exist in the memslots list on vm shutdown. A memslot that is +destroyed while an iommu domain is enabled for the guest will +therefore result in an elevated page reference count that is +never cleared. + +Additionally, without this fix, the iommu is only programmed +with the first translation for a gpa. This can result in +peer-to-peer errors if a mapping is destroyed and replaced by a +new mapping at the same gpa as the iommu will still be pointing +to the original, pinned memory address. + +Signed-off-by: Alex Williamson +Signed-off-by: Marcelo Tosatti +Signed-off-by: Jonathan Nieder +Signed-off-by: Ben Hutchings +--- + include/linux/kvm_host.h | 6 ++++++ + virt/kvm/iommu.c | 12 ++++++++---- + virt/kvm/kvm_main.c | 5 +++-- + 3 files changed, 17 insertions(+), 6 deletions(-) + +diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h +index d526231..35410ef 100644 +--- a/include/linux/kvm_host.h ++++ b/include/linux/kvm_host.h +@@ -562,6 +562,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); + + #ifdef CONFIG_IOMMU_API + int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot); ++void kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot); + int kvm_iommu_map_guest(struct kvm *kvm); + int kvm_iommu_unmap_guest(struct kvm *kvm); + int kvm_assign_device(struct kvm *kvm, +@@ -575,6 +576,11 @@ static inline int kvm_iommu_map_pages(struct kvm *kvm, + return 0; + } + ++static inline void kvm_iommu_unmap_pages(struct kvm *kvm, ++ struct kvm_memory_slot *slot) ++{ ++} ++ + static inline int kvm_iommu_map_guest(struct kvm *kvm) + { + return -ENODEV; +diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c +index a195c07..fd817a2 100644 +--- a/virt/kvm/iommu.c ++++ b/virt/kvm/iommu.c +@@ -309,6 +309,11 @@ static void kvm_iommu_put_pages(struct kvm *kvm, + } + } + ++void kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot) ++{ ++ kvm_iommu_put_pages(kvm, slot->base_gfn, slot->npages); ++} ++ + static int kvm_iommu_unmap_memslots(struct kvm *kvm) + { + int i, idx; +@@ -317,10 +322,9 @@ static int kvm_iommu_unmap_memslots(struct kvm *kvm) + idx = srcu_read_lock(&kvm->srcu); + slots = kvm_memslots(kvm); + +- for (i = 0; i < slots->nmemslots; i++) { +- kvm_iommu_put_pages(kvm, slots->memslots[i].base_gfn, +- slots->memslots[i].npages); +- } ++ for (i = 0; i < slots->nmemslots; i++) ++ kvm_iommu_unmap_pages(kvm, &slots->memslots[i]); ++ + srcu_read_unlock(&kvm->srcu, idx); + + return 0; +diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c +index d9cfb78..e401c1b 100644 +--- a/virt/kvm/kvm_main.c ++++ b/virt/kvm/kvm_main.c +@@ -802,12 +802,13 @@ skip_lpage: + if (r) + goto out_free; + +- /* map the pages in iommu page table */ ++ /* map/unmap the pages in iommu page table */ + if (npages) { + r = kvm_iommu_map_pages(kvm, &new); + if (r) + goto out_free; +- } ++ } else ++ kvm_iommu_unmap_pages(kvm, &old); + + r = -ENOMEM; + slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL); +-- +1.7.7.6 + 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 @@ +From bbfc688f2500196757c1d7334d25e335308798c5 Mon Sep 17 00:00:00 2001 +From: AceLan Kao +Date: Thu, 17 Nov 2011 15:30:42 +0800 +Subject: [PATCH 038/165] dell-laptop: add 3 machines that has touchpad LED + +commit 2a748853ca395c48ea75baa250f7cea6f0f23dbf upstream. + +Add "Vostro 3555", "Inspiron N311z", and "Inspiron M5110" into quirks, +so that they could have touchpad LED function work. + +Signed-off-by: AceLan Kao +Signed-off-by: Matthew Garrett +Signed-off-by: Ben Hutchings +--- + drivers/platform/x86/dell-laptop.c | 27 +++++++++++++++++++++++++++ + 1 files changed, 27 insertions(+), 0 deletions(-) + +diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c +index d93e962..7621ac2 100644 +--- a/drivers/platform/x86/dell-laptop.c ++++ b/drivers/platform/x86/dell-laptop.c +@@ -184,6 +184,33 @@ static struct dmi_system_id __devinitdata dell_quirks[] = { + }, + .driver_data = &quirk_dell_vostro_v130, + }, ++ { ++ .callback = dmi_matched, ++ .ident = "Dell Vostro 3555", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 3555"), ++ }, ++ .driver_data = &quirk_dell_vostro_v130, ++ }, ++ { ++ .callback = dmi_matched, ++ .ident = "Dell Inspiron N311z", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron N311z"), ++ }, ++ .driver_data = &quirk_dell_vostro_v130, ++ }, ++ { ++ .callback = dmi_matched, ++ .ident = "Dell Inspiron M5110", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron M5110"), ++ }, ++ .driver_data = &quirk_dell_vostro_v130, ++ }, + }; + + static struct calling_interface_buffer *buffer; +-- +1.7.7.6 + 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 @@ +From 7a2e5d46e7959528fb4a7b45fc3ca55339a2445f Mon Sep 17 00:00:00 2001 +From: AceLan Kao +Date: Tue, 17 Jan 2012 16:18:06 +0800 +Subject: [PATCH 039/165] dell-laptop: touchpad LED should persist its status + after S3 + +commit 2d5de9e84928e35b4d9b46b4d8d5dcaac1cff1fa upstream. + +Touchpad LED will not turn on after S3, it will make the touchpad status +doesn't consist with the LED. +By adding one flag to let the LED device restore it's status. + +Signed-off-by: AceLan Kao +Signed-off-by: Matthew Garrett +Signed-off-by: Ben Hutchings +--- + drivers/platform/x86/dell-laptop.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c +index 7621ac2..92e42d4 100644 +--- a/drivers/platform/x86/dell-laptop.c ++++ b/drivers/platform/x86/dell-laptop.c +@@ -642,6 +642,7 @@ static void touchpad_led_set(struct led_classdev *led_cdev, + static struct led_classdev touchpad_led = { + .name = "dell-laptop::touchpad", + .brightness_set = touchpad_led_set, ++ .flags = LED_CORE_SUSPENDRESUME, + }; + + static int __devinit touchpad_led_init(struct device *dev) +-- +1.7.7.6 + 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 @@ +From cfa160178e6da132b537331ff5fc6f091a02e44a Mon Sep 17 00:00:00 2001 +From: AceLan Kao +Date: Wed, 28 Mar 2012 10:25:36 +0800 +Subject: [PATCH 040/165] Bluetooth: Add support for Atheros [04ca:3005] + +commit 55ed7d4d1469eafbe3ad7e8fcd44f5af27845a81 upstream. + +Add another vendor specific ID for Atheros AR3012 device. +This chip is wrapped by Lite-On Technology Corp. + +output of usb-devices: +T: Bus=04 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 +D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=04ca ProdID=3005 Rev=00.02 +S: Manufacturer=Atheros Communications +S: Product=Bluetooth USB Host Controller +S: SerialNumber=Alaska Day 2006 +C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA +I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb + +Signed-off-by: AceLan Kao +Signed-off-by: Gustavo Padovan +Signed-off-by: Ben Hutchings +--- + drivers/bluetooth/ath3k.c | 2 ++ + drivers/bluetooth/btusb.c | 1 + + 2 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c +index 003cd8d..99fefbd 100644 +--- a/drivers/bluetooth/ath3k.c ++++ b/drivers/bluetooth/ath3k.c +@@ -73,6 +73,7 @@ static struct usb_device_id ath3k_table[] = { + { USB_DEVICE(0x0CF3, 0x3004) }, + { USB_DEVICE(0x0CF3, 0x311D) }, + { USB_DEVICE(0x13d3, 0x3375) }, ++ { USB_DEVICE(0x04CA, 0x3005) }, + + /* Atheros AR5BBU12 with sflash firmware */ + { USB_DEVICE(0x0489, 0xE02C) }, +@@ -91,6 +92,7 @@ static struct usb_device_id ath3k_blist_tbl[] = { + { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, ++ { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, + + { } /* Terminating entry */ + }; +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c +index db44ad5..e56da6a 100644 +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -129,6 +129,7 @@ static struct usb_device_id blacklist_table[] = { + { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, ++ { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, + + /* Atheros AR5BBU12 with sflash firmware */ + { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, +-- +1.7.7.6 + 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 @@ +From 53d02f37f9e87191afdb511e740fa506af1fe2fb Mon Sep 17 00:00:00 2001 +From: Jason Baron +Date: Fri, 16 Mar 2012 16:34:03 -0400 +Subject: [PATCH 041/165] Don't limit non-nested epoll paths + +commit 93dc6107a76daed81c07f50215fa6ae77691634f upstream. + +Commit 28d82dc1c4ed ("epoll: limit paths") that I did to limit the +number of possible wakeup paths in epoll is causing a few applications +to longer work (dovecot for one). + +The original patch is really about limiting the amount of epoll nesting +(since epoll fds can be attached to other fds). Thus, we probably can +allow an unlimited number of paths of depth 1. My current patch limits +it at 1000. And enforce the limits on paths that have a greater depth. + +This is captured in: https://bugzilla.redhat.com/show_bug.cgi?id=681578 + +Signed-off-by: Jason Baron +Cc: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Jonathan Nieder +Signed-off-by: Ben Hutchings +--- + fs/eventpoll.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/fs/eventpoll.c b/fs/eventpoll.c +index ea54cde..4d9d3a4 100644 +--- a/fs/eventpoll.c ++++ b/fs/eventpoll.c +@@ -988,6 +988,10 @@ static int path_count[PATH_ARR_SIZE]; + + static int path_count_inc(int nests) + { ++ /* Allow an arbitrary number of depth 1 paths */ ++ if (nests == 0) ++ return 0; ++ + if (++path_count[nests] > path_limits[nests]) + return -1; + return 0; +-- +1.7.7.6 + 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 @@ +From e98347051c4edde97c0dfbc704660d9d0e4e0641 Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart +Date: Mon, 12 Dec 2011 01:15:06 +0100 +Subject: [PATCH 042/165] spi: Fix device unregistration when unregistering + the bus master + +commit 178db7d30f94707efca1a189753c105ef69942ed upstream. + +Device are added as children of the bus master's parent device, but +spi_unregister_master() looks for devices to unregister in the bus +master's children. This results in the child devices not being +unregistered. + +Fix this by registering devices as direct children of the bus master. + +Signed-off-by: Laurent Pinchart +Signed-off-by: Grant Likely +Signed-off-by: Ben Hutchings +--- + drivers/spi/spi.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c +index 77eae99..b2ccdea 100644 +--- a/drivers/spi/spi.c ++++ b/drivers/spi/spi.c +@@ -319,7 +319,7 @@ struct spi_device *spi_alloc_device(struct spi_master *master) + } + + spi->master = master; +- spi->dev.parent = dev; ++ spi->dev.parent = &master->dev; + spi->dev.bus = &spi_bus_type; + spi->dev.release = spidev_release; + device_initialize(&spi->dev); +-- +1.7.7.6 + 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 @@ +From bc5969d96482b42246a0143d3f36744c8d06c8cf Mon Sep 17 00:00:00 2001 +From: Kenth Eriksson +Date: Fri, 30 Mar 2012 17:05:30 +0200 +Subject: [PATCH 043/165] spi/mpc83xx: fix NULL pdata dereference bug + +commit 5039a86973cd35bdb2f64d28ee12f13fe2bb5a4c upstream. + +Commit 178db7d3, "spi: Fix device unregistration when unregistering +the bus master", changed device initialization to be children of the +bus master, not children of the bus masters parent device. The pdata +pointer used in fsl_spi_chipselect must updated to reflect the changed +initialization. + +Signed-off-by: Kenth Eriksson +Acked-by: Joakim Tjernlund +Signed-off-by: Grant Likely +Signed-off-by: Ben Hutchings +--- + drivers/spi/spi-fsl-spi.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c +index 24cacff..5f748c0 100644 +--- a/drivers/spi/spi-fsl-spi.c ++++ b/drivers/spi/spi-fsl-spi.c +@@ -139,10 +139,12 @@ static void fsl_spi_change_mode(struct spi_device *spi) + static void fsl_spi_chipselect(struct spi_device *spi, int value) + { + struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master); +- struct fsl_spi_platform_data *pdata = spi->dev.parent->platform_data; ++ struct fsl_spi_platform_data *pdata; + bool pol = spi->mode & SPI_CS_HIGH; + struct spi_mpc8xxx_cs *cs = spi->controller_state; + ++ pdata = spi->dev.parent->parent->platform_data; ++ + if (value == BITBANG_CS_INACTIVE) { + if (pdata->cs_control) + pdata->cs_control(spi, !pol); +-- +1.7.7.6 + 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 @@ +From 81eef1db7c237ecc52f165049d7b128f081bc1f1 Mon Sep 17 00:00:00 2001 +From: Alan Cox +Date: Mon, 19 Dec 2011 21:07:33 +0000 +Subject: [PATCH 044/165] rt2800: Add support for the Fujitsu Stylistic Q550 + +commit 3ac44670ad0fca8b6c43b3e4d8494c67c419f494 upstream. + +Just another USB identifier. + +Signed-off-by: Alan Cox +Acked-by: Gertjan van Wingerde +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/rt2x00/rt2800usb.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c +index cb71e88..c49b8bf 100644 +--- a/drivers/net/wireless/rt2x00/rt2800usb.c ++++ b/drivers/net/wireless/rt2x00/rt2800usb.c +@@ -1161,6 +1161,8 @@ static struct usb_device_id rt2800usb_device_table[] = { + { USB_DEVICE(0x7392, 0x7722) }, + /* Encore */ + { USB_DEVICE(0x203d, 0x14a1) }, ++ /* Fujitsu Stylistic 550 */ ++ { USB_DEVICE(0x1690, 0x0761) }, + /* Gemtek */ + { USB_DEVICE(0x15a9, 0x0010) }, + /* Gigabyte */ +-- +1.7.7.6 + 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 @@ +From 5d35a9613dc2f1483a1b1c8327f7050299363dee Mon Sep 17 00:00:00 2001 +From: Gertjan van Wingerde +Date: Wed, 28 Dec 2011 01:53:18 +0100 +Subject: [PATCH 045/165] rt2x00: Identify rt2800usb chipsets. + +commit bc93eda7e903ff75cefcb6e247ed9b8e9f8e9783 upstream. + +According to the latest USB ID database these are all RT2770 / RT2870 / RT307x +devices. + +Signed-off-by: Gertjan van Wingerde +Acked-by: Ivo van Doorn +Signed-off-by: John W. Linville +[bwh: Backported to 3.2: adjust context for previously cherry-picked + commit d42a179b941a9e4cc6cf41d0f3cbadd75fc48a89 'rt2x00: Add support + for D-Link DWA-127 to rt2800usb'] +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/rt2x00/rt2800usb.c | 26 ++++++++++++-------------- + 1 files changed, 12 insertions(+), 14 deletions(-) + +diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c +index c49b8bf..0ffa111 100644 +--- a/drivers/net/wireless/rt2x00/rt2800usb.c ++++ b/drivers/net/wireless/rt2x00/rt2800usb.c +@@ -914,12 +914,14 @@ static struct usb_device_id rt2800usb_device_table[] = { + { USB_DEVICE(0x050d, 0x8053) }, + { USB_DEVICE(0x050d, 0x805c) }, + { USB_DEVICE(0x050d, 0x815c) }, ++ { USB_DEVICE(0x050d, 0x825a) }, + { USB_DEVICE(0x050d, 0x825b) }, + { USB_DEVICE(0x050d, 0x935a) }, + { USB_DEVICE(0x050d, 0x935b) }, + /* Buffalo */ + { USB_DEVICE(0x0411, 0x00e8) }, + { USB_DEVICE(0x0411, 0x0158) }, ++ { USB_DEVICE(0x0411, 0x015d) }, + { USB_DEVICE(0x0411, 0x016f) }, + { USB_DEVICE(0x0411, 0x01a2) }, + /* Corega */ +@@ -934,6 +936,8 @@ static struct usb_device_id rt2800usb_device_table[] = { + { USB_DEVICE(0x07d1, 0x3c0e) }, + { USB_DEVICE(0x07d1, 0x3c0f) }, + { USB_DEVICE(0x07d1, 0x3c11) }, ++ { USB_DEVICE(0x07d1, 0x3c13) }, ++ { USB_DEVICE(0x07d1, 0x3c15) }, + { USB_DEVICE(0x07d1, 0x3c16) }, + { USB_DEVICE(0x2001, 0x3c1b) }, + /* Draytek */ +@@ -944,6 +948,7 @@ static struct usb_device_id rt2800usb_device_table[] = { + { USB_DEVICE(0x7392, 0x7711) }, + { USB_DEVICE(0x7392, 0x7717) }, + { USB_DEVICE(0x7392, 0x7718) }, ++ { USB_DEVICE(0x7392, 0x7722) }, + /* Encore */ + { USB_DEVICE(0x203d, 0x1480) }, + { USB_DEVICE(0x203d, 0x14a9) }, +@@ -978,6 +983,7 @@ static struct usb_device_id rt2800usb_device_table[] = { + { USB_DEVICE(0x1737, 0x0070) }, + { USB_DEVICE(0x1737, 0x0071) }, + { USB_DEVICE(0x1737, 0x0077) }, ++ { USB_DEVICE(0x1737, 0x0078) }, + /* Logitec */ + { USB_DEVICE(0x0789, 0x0162) }, + { USB_DEVICE(0x0789, 0x0163) }, +@@ -1001,9 +1007,13 @@ static struct usb_device_id rt2800usb_device_table[] = { + { USB_DEVICE(0x0db0, 0x871b) }, + { USB_DEVICE(0x0db0, 0x871c) }, + { USB_DEVICE(0x0db0, 0x899a) }, ++ /* Ovislink */ ++ { USB_DEVICE(0x1b75, 0x3071) }, ++ { USB_DEVICE(0x1b75, 0x3072) }, + /* Para */ + { USB_DEVICE(0x20b8, 0x8888) }, + /* Pegatron */ ++ { USB_DEVICE(0x1d4d, 0x0002) }, + { USB_DEVICE(0x1d4d, 0x000c) }, + { USB_DEVICE(0x1d4d, 0x000e) }, + { USB_DEVICE(0x1d4d, 0x0011) }, +@@ -1056,7 +1066,9 @@ static struct usb_device_id rt2800usb_device_table[] = { + /* Sparklan */ + { USB_DEVICE(0x15a9, 0x0006) }, + /* Sweex */ ++ { USB_DEVICE(0x177f, 0x0153) }, + { USB_DEVICE(0x177f, 0x0302) }, ++ { USB_DEVICE(0x177f, 0x0313) }, + /* U-Media */ + { USB_DEVICE(0x157e, 0x300e) }, + { USB_DEVICE(0x157e, 0x3013) }, +@@ -1140,25 +1152,20 @@ static struct usb_device_id rt2800usb_device_table[] = { + { USB_DEVICE(0x13d3, 0x3322) }, + /* Belkin */ + { USB_DEVICE(0x050d, 0x1003) }, +- { USB_DEVICE(0x050d, 0x825a) }, + /* Buffalo */ + { USB_DEVICE(0x0411, 0x012e) }, + { USB_DEVICE(0x0411, 0x0148) }, + { USB_DEVICE(0x0411, 0x0150) }, +- { USB_DEVICE(0x0411, 0x015d) }, + /* Corega */ + { USB_DEVICE(0x07aa, 0x0041) }, + { USB_DEVICE(0x07aa, 0x0042) }, + { USB_DEVICE(0x18c5, 0x0008) }, + /* D-Link */ + { USB_DEVICE(0x07d1, 0x3c0b) }, +- { USB_DEVICE(0x07d1, 0x3c13) }, +- { USB_DEVICE(0x07d1, 0x3c15) }, + { USB_DEVICE(0x07d1, 0x3c17) }, + { USB_DEVICE(0x2001, 0x3c17) }, + /* Edimax */ + { USB_DEVICE(0x7392, 0x4085) }, +- { USB_DEVICE(0x7392, 0x7722) }, + /* Encore */ + { USB_DEVICE(0x203d, 0x14a1) }, + /* Fujitsu Stylistic 550 */ +@@ -1174,19 +1181,13 @@ static struct usb_device_id rt2800usb_device_table[] = { + /* LevelOne */ + { USB_DEVICE(0x1740, 0x0605) }, + { USB_DEVICE(0x1740, 0x0615) }, +- /* Linksys */ +- { USB_DEVICE(0x1737, 0x0078) }, + /* Logitec */ + { USB_DEVICE(0x0789, 0x0168) }, + { USB_DEVICE(0x0789, 0x0169) }, + /* Motorola */ + { USB_DEVICE(0x100d, 0x9032) }, +- /* Ovislink */ +- { USB_DEVICE(0x1b75, 0x3071) }, +- { USB_DEVICE(0x1b75, 0x3072) }, + /* Pegatron */ + { USB_DEVICE(0x05a6, 0x0101) }, +- { USB_DEVICE(0x1d4d, 0x0002) }, + { USB_DEVICE(0x1d4d, 0x0010) }, + /* Planex */ + { USB_DEVICE(0x2019, 0x5201) }, +@@ -1205,9 +1206,6 @@ static struct usb_device_id rt2800usb_device_table[] = { + { USB_DEVICE(0x083a, 0xc522) }, + { USB_DEVICE(0x083a, 0xd522) }, + { USB_DEVICE(0x083a, 0xf511) }, +- /* Sweex */ +- { USB_DEVICE(0x177f, 0x0153) }, +- { USB_DEVICE(0x177f, 0x0313) }, + /* Zyxel */ + { USB_DEVICE(0x0586, 0x341a) }, + #endif +-- +1.7.7.6 + 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 @@ +From 41e39c9a0a6aa1e152db9dfd4019e20a9de8dce6 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 27 Apr 2012 17:42:43 -0500 +Subject: [PATCH 046/165] nfsd: fix b0rken error value for setattr on + read-only mount + +commit 96f6f98501196d46ce52c2697dd758d9300c63f5 upstream. + +..._want_write() returns -EROFS on failure, _not_ an NFS error value. + +Signed-off-by: Al Viro +Signed-off-by: Jonathan Nieder +Signed-off-by: Ben Hutchings +--- + fs/nfsd/nfs4proc.c | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c +index fa38336..35840aa 100644 +--- a/fs/nfsd/nfs4proc.c ++++ b/fs/nfsd/nfs4proc.c +@@ -827,6 +827,7 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, + struct nfsd4_setattr *setattr) + { + __be32 status = nfs_ok; ++ int err; + + if (setattr->sa_iattr.ia_valid & ATTR_SIZE) { + nfs4_lock_state(); +@@ -838,9 +839,9 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, + return status; + } + } +- status = mnt_want_write(cstate->current_fh.fh_export->ex_path.mnt); +- if (status) +- return status; ++ err = mnt_want_write(cstate->current_fh.fh_export->ex_path.mnt); ++ if (err) ++ return nfserrno(err); + status = nfs_ok; + + status = check_attr_support(rqstp, cstate, setattr->sa_bmval, +-- +1.7.7.6 + 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 @@ +From d0fb6592c02971a290d199c1e9ee06624fd17c1c Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 00:00:04 -0400 +Subject: [PATCH 047/165] nfsd: fix error values returned by nfsd4_lockt() + when nfsd_open() fails + +commit 04da6e9d63427b2d0fd04766712200c250b3278f upstream. + +nfsd_open() already returns an NFS error value; only vfs_test_lock() +result needs to be fed through nfserrno(). Broken by commit 55ef12 +(nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT) +three years ago... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/nfsd/nfs4state.c | 23 +++++++++-------------- + 1 files changed, 9 insertions(+), 14 deletions(-) + +diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c +index 5abced7..4cfe260 100644 +--- a/fs/nfsd/nfs4state.c ++++ b/fs/nfsd/nfs4state.c +@@ -4080,16 +4080,14 @@ out: + * vfs_test_lock. (Arguably perhaps test_lock should be done with an + * inode operation.) + */ +-static int nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) ++static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) + { + struct file *file; +- int err; +- +- err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file); +- if (err) +- return err; +- err = vfs_test_lock(file, lock); +- nfsd_close(file); ++ __be32 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file); ++ if (!err) { ++ err = nfserrno(vfs_test_lock(file, lock)); ++ nfsd_close(file); ++ } + return err; + } + +@@ -4103,7 +4101,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, + struct inode *inode; + struct file_lock file_lock; + struct nfs4_lockowner *lo; +- int error; + __be32 status; + + if (locks_in_grace()) +@@ -4149,12 +4146,10 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, + + nfs4_transform_lock_offset(&file_lock); + +- status = nfs_ok; +- error = nfsd_test_lock(rqstp, &cstate->current_fh, &file_lock); +- if (error) { +- status = nfserrno(error); ++ status = nfsd_test_lock(rqstp, &cstate->current_fh, &file_lock); ++ if (status) + goto out; +- } ++ + if (file_lock.fl_type != F_UNLCK) { + status = nfserr_denied; + nfs4_set_lock_denied(&file_lock, &lockt->lt_denied); +-- +1.7.7.6 + 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 @@ +From c0326b2209aa31faeb2369d7311d0754d7b6d202 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 00:10:34 -0400 +Subject: [PATCH 048/165] nfsd: fix endianness breakage in TEST_STATEID + handling + +commit 02f5fde5df0ea930e70f93763dd48beff182b208 upstream. + +->ts_id_status gets nfs errno, i.e. it's already big-endian; no need +to apply htonl() to it. Broken by commit 174568 (NFSD: Added TEST_STATEID +operation) last year... + +Signed-off-by: Al Viro +Cc: "J. Bruce Fields" +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + fs/nfsd/nfs4xdr.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c +index b6fa792..9cfa60a 100644 +--- a/fs/nfsd/nfs4xdr.c ++++ b/fs/nfsd/nfs4xdr.c +@@ -3411,7 +3411,7 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, int nfserr, + nfsd4_decode_stateid(argp, &si); + valid = nfs4_validate_stateid(cl, &si); + RESERVE_SPACE(4); +- *p++ = htonl(valid); ++ *p++ = valid; + resp->p = p; + } + nfs4_unlock_state(); +-- +1.7.7.6 + 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 @@ +From 58c574420bacc1f5dc171dff6f0915ebc5749ee3 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 00:32:14 -0400 +Subject: [PATCH 049/165] nfsd: fix compose_entry_fh() failure exits + +commit efe39651f08813180f37dc508d950fc7d92b29a8 upstream. + +Restore the original logics ("fail on mountpoints, negatives and in +case of fh_compose() failures"). Since commit 8177e (nfsd: clean up +readdirplus encoding) that got broken - + rv = fh_compose(fhp, exp, dchild, &cd->fh); + if (rv) + goto out; + if (!dchild->d_inode) + goto out; + rv = 0; +out: +is equivalent to + rv = fh_compose(fhp, exp, dchild, &cd->fh); +out: +and the second check has no effect whatsoever... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/nfsd/nfs3xdr.c | 22 ++++++++-------------- + 1 files changed, 8 insertions(+), 14 deletions(-) + +diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c +index 08c6e36..43f46cd 100644 +--- a/fs/nfsd/nfs3xdr.c ++++ b/fs/nfsd/nfs3xdr.c +@@ -803,13 +803,13 @@ encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name, + return p; + } + +-static int ++static __be32 + compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp, + const char *name, int namlen) + { + struct svc_export *exp; + struct dentry *dparent, *dchild; +- int rv = 0; ++ __be32 rv = nfserr_noent; + + dparent = cd->fh.fh_dentry; + exp = cd->fh.fh_export; +@@ -817,26 +817,20 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp, + if (isdotent(name, namlen)) { + if (namlen == 2) { + dchild = dget_parent(dparent); +- if (dchild == dparent) { +- /* filesystem root - cannot return filehandle for ".." */ +- dput(dchild); +- return -ENOENT; +- } ++ /* filesystem root - cannot return filehandle for ".." */ ++ if (dchild == dparent) ++ goto out; + } else + dchild = dget(dparent); + } else + dchild = lookup_one_len(name, dparent, namlen); + if (IS_ERR(dchild)) +- return -ENOENT; +- rv = -ENOENT; ++ return rv; + if (d_mountpoint(dchild)) + goto out; +- rv = fh_compose(fhp, exp, dchild, &cd->fh); +- if (rv) +- goto out; + if (!dchild->d_inode) + goto out; +- rv = 0; ++ rv = fh_compose(fhp, exp, dchild, &cd->fh); + out: + dput(dchild); + return rv; +@@ -845,7 +839,7 @@ out: + static __be32 *encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name, int namlen) + { + struct svc_fh fh; +- int err; ++ __be32 err; + + fh_init(&fh, NFS3_FHSIZE); + err = compose_entry_fh(cd, &fh, name, namlen); +-- +1.7.7.6 + 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 @@ +From f34178385ffae408ee0ade44819875816104a99a Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 11:49:04 -0400 +Subject: [PATCH 050/165] btrfs: btrfs_root_readonly() broken on big-endian + +commit 6ed3cf2cdfce4c9f1d73171bd3f27d9cb77b734e upstream. + +->root_flags is __le64 and all accesses to it go through the helpers +that do proper conversions. Except for btrfs_root_readonly(), which +checks bit 0 as in host-endian... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/btrfs/ctree.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h +index 6738503..83a871f 100644 +--- a/fs/btrfs/ctree.h ++++ b/fs/btrfs/ctree.h +@@ -2025,7 +2025,7 @@ BTRFS_SETGET_STACK_FUNCS(root_last_snapshot, struct btrfs_root_item, + + static inline bool btrfs_root_readonly(struct btrfs_root *root) + { +- return root->root_item.flags & BTRFS_ROOT_SUBVOL_RDONLY; ++ return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0; + } + + /* struct btrfs_root_backup */ +-- +1.7.7.6 + 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 @@ +From e72fdd80481fa4848f1d90be6e8bcdc24db469f8 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 12:22:00 -0400 +Subject: [PATCH 051/165] ocfs2: ->l_next_free_req breakage on big-endian + +commit 3a251f04fe97c3d335b745c98e4b377e3c3899f2 upstream. + +It's le16, not le32... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/ocfs2/alloc.c | 2 +- + fs/ocfs2/refcounttree.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c +index 3165aeb..31b9463 100644 +--- a/fs/ocfs2/alloc.c ++++ b/fs/ocfs2/alloc.c +@@ -1134,7 +1134,7 @@ static int ocfs2_adjust_rightmost_branch(handle_t *handle, + } + + el = path_leaf_el(path); +- rec = &el->l_recs[le32_to_cpu(el->l_next_free_rec) - 1]; ++ rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec) - 1]; + + ocfs2_adjust_rightmost_records(handle, et, path, rec); + +diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c +index cf78233..a7b7217 100644 +--- a/fs/ocfs2/refcounttree.c ++++ b/fs/ocfs2/refcounttree.c +@@ -1036,14 +1036,14 @@ static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci, + + tmp_el = left_path->p_node[subtree_root].el; + blkno = left_path->p_node[subtree_root+1].bh->b_blocknr; +- for (i = 0; i < le32_to_cpu(tmp_el->l_next_free_rec); i++) { ++ for (i = 0; i < le16_to_cpu(tmp_el->l_next_free_rec); i++) { + if (le64_to_cpu(tmp_el->l_recs[i].e_blkno) == blkno) { + *cpos_end = le32_to_cpu(tmp_el->l_recs[i+1].e_cpos); + break; + } + } + +- BUG_ON(i == le32_to_cpu(tmp_el->l_next_free_rec)); ++ BUG_ON(i == le16_to_cpu(tmp_el->l_next_free_rec)); + + out: + ocfs2_free_path(left_path); +-- +1.7.7.6 + 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 @@ +From 88f1278427aa9c75c6b4c7f59b160a9a29ae8f17 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 12:27:11 -0400 +Subject: [PATCH 052/165] ocfs: ->rl_used breakage on big-endian + +commit e1bf4cc620fd143766ddfcee3b004a1d1bb34fd0 upstream. + +it's le16, not le32 or le64... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/ocfs2/refcounttree.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c +index a7b7217..bc90ebc 100644 +--- a/fs/ocfs2/refcounttree.c ++++ b/fs/ocfs2/refcounttree.c +@@ -1468,7 +1468,7 @@ static int ocfs2_divide_leaf_refcount_block(struct buffer_head *ref_leaf_bh, + + trace_ocfs2_divide_leaf_refcount_block( + (unsigned long long)ref_leaf_bh->b_blocknr, +- le32_to_cpu(rl->rl_count), le32_to_cpu(rl->rl_used)); ++ le32_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used)); + + /* + * XXX: Improvement later. +@@ -2411,7 +2411,7 @@ static int ocfs2_calc_refcount_meta_credits(struct super_block *sb, + rb = (struct ocfs2_refcount_block *) + prev_bh->b_data; + +- if (le64_to_cpu(rb->rf_records.rl_used) + ++ if (le16_to_cpu(rb->rf_records.rl_used) + + recs_add > + le16_to_cpu(rb->rf_records.rl_count)) + ref_blocks++; +@@ -2476,7 +2476,7 @@ static int ocfs2_calc_refcount_meta_credits(struct super_block *sb, + if (prev_bh) { + rb = (struct ocfs2_refcount_block *)prev_bh->b_data; + +- if (le64_to_cpu(rb->rf_records.rl_used) + recs_add > ++ if (le16_to_cpu(rb->rf_records.rl_used) + recs_add > + le16_to_cpu(rb->rf_records.rl_count)) + ref_blocks++; + +@@ -3629,7 +3629,7 @@ int ocfs2_refcounted_xattr_delete_need(struct inode *inode, + * one will split a refcount rec, so totally we need + * clusters * 2 new refcount rec. + */ +- if (le64_to_cpu(rb->rf_records.rl_used) + clusters * 2 > ++ if (le16_to_cpu(rb->rf_records.rl_used) + clusters * 2 > + le16_to_cpu(rb->rf_records.rl_count)) + ref_blocks++; + +-- +1.7.7.6 + 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 @@ +From de962467d8b4d7cd0903b5151bc5fbde4f09552f Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 12:28:21 -0400 +Subject: [PATCH 053/165] ocfs2: ->rl_count endianness breakage + +commit 28748b325dc2d730ccc312830a91c4ae0c0d9379 upstream. + +le16, not le32... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/ocfs2/refcounttree.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c +index bc90ebc..9f32d7c 100644 +--- a/fs/ocfs2/refcounttree.c ++++ b/fs/ocfs2/refcounttree.c +@@ -1468,7 +1468,7 @@ static int ocfs2_divide_leaf_refcount_block(struct buffer_head *ref_leaf_bh, + + trace_ocfs2_divide_leaf_refcount_block( + (unsigned long long)ref_leaf_bh->b_blocknr, +- le32_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used)); ++ le16_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used)); + + /* + * XXX: Improvement later. +-- +1.7.7.6 + 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 @@ +From c38877f92a9e0858b5a4902440cef2c0df1b1632 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 12:30:02 -0400 +Subject: [PATCH 054/165] ocfs2: ->e_leaf_clusters endianness breakage + +commit 72094e43e3af5020510f920321d71f1798fa896d upstream. + +le16, not le32... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/ocfs2/suballoc.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c +index ba5d97e..f169da4 100644 +--- a/fs/ocfs2/suballoc.c ++++ b/fs/ocfs2/suballoc.c +@@ -600,7 +600,7 @@ static void ocfs2_bg_alloc_cleanup(handle_t *handle, + ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode, + cluster_ac->ac_bh, + le64_to_cpu(rec->e_blkno), +- le32_to_cpu(rec->e_leaf_clusters)); ++ le16_to_cpu(rec->e_leaf_clusters)); + if (ret) + mlog_errno(ret); + /* Try all the clusters to free */ +@@ -1628,7 +1628,7 @@ static int ocfs2_bg_discontig_fix_by_rec(struct ocfs2_suballoc_result *res, + { + unsigned int bpc = le16_to_cpu(cl->cl_bpc); + unsigned int bitoff = le32_to_cpu(rec->e_cpos) * bpc; +- unsigned int bitcount = le32_to_cpu(rec->e_leaf_clusters) * bpc; ++ unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc; + + if (res->sr_bit_offset < bitoff) + return 0; +-- +1.7.7.6 + 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 @@ +From 3257f4da731bb45c2117beda34ed3202df1c74e4 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Fri, 13 Apr 2012 13:49:47 -0400 +Subject: [PATCH 055/165] lockd: fix the endianness bug + +commit e847469bf77a1d339274074ed068d461f0c872bc upstream. + +comparing be32 values for < is not doing the right thing... + +Signed-off-by: Al Viro +Signed-off-by: Ben Hutchings +--- + fs/lockd/clnt4xdr.c | 2 +- + fs/lockd/clntxdr.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c +index f848b52..046bb77 100644 +--- a/fs/lockd/clnt4xdr.c ++++ b/fs/lockd/clnt4xdr.c +@@ -241,7 +241,7 @@ static int decode_nlm4_stat(struct xdr_stream *xdr, __be32 *stat) + p = xdr_inline_decode(xdr, 4); + if (unlikely(p == NULL)) + goto out_overflow; +- if (unlikely(*p > nlm4_failed)) ++ if (unlikely(ntohl(*p) > ntohl(nlm4_failed))) + goto out_bad_xdr; + *stat = *p; + return 0; +diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c +index 180ac34..36057ce 100644 +--- a/fs/lockd/clntxdr.c ++++ b/fs/lockd/clntxdr.c +@@ -236,7 +236,7 @@ static int decode_nlm_stat(struct xdr_stream *xdr, + p = xdr_inline_decode(xdr, 4); + if (unlikely(p == NULL)) + goto out_overflow; +- if (unlikely(*p > nlm_lck_denied_grace_period)) ++ if (unlikely(ntohl(*p) > ntohl(nlm_lck_denied_grace_period))) + goto out_enum; + *stat = *p; + return 0; +-- +1.7.7.6 + 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 @@ +From ab98d1498e030766394cbc78259a2a9a1aa5edbe Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Wed, 21 Mar 2012 11:44:00 +0200 +Subject: [PATCH 056/165] usb: dwc3: ep0: increment "actual" on bounced ep0 + case + +commit cd423dd3634a5232a3019eb372b144619a61cd16 upstream. + +due to a HW limitation we have a bounce buffer for ep0 +out transfers which are not aligned with MaxPacketSize. + +On such case we were not increment r->actual as we should. + +This patch fixes that mistake. + +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/dwc3/ep0.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c +index 27bd50a..c0dcf69 100644 +--- a/drivers/usb/dwc3/ep0.c ++++ b/drivers/usb/dwc3/ep0.c +@@ -572,9 +572,10 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, + dwc->ep0_bounced = false; + } else { + transferred = ur->length - trb.length; +- ur->actual += transferred; + } + ++ ur->actual += transferred; ++ + if ((epnum & 1) && ur->actual < ur->length) { + /* for some reason we did not get everything out */ + +-- +1.7.7.6 + 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 @@ +From 83b74fb7bfab64f75ff56f20f3736c44b035c823 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Mon, 2 Apr 2012 22:33:02 +0000 +Subject: [PATCH 057/165] net: fix /proc/net/dev regression + +[ Upstream commit 2def16ae6b0c77571200f18ba4be049b03d75579 ] + +Commit f04565ddf52 (dev: use name hash for dev_seq_ops) added a second +regression, as some devices are missing from /proc/net/dev if many +devices are defined. + +When seq_file buffer is filled, the last ->next/show() method is +canceled (pos value is reverted to value prior ->next() call) + +Problem is after above commit, we dont restart the lookup at right +position in ->start() method. + +Fix this by removing the internal 'pos' pointer added in commit, since +we need to use the 'loff_t *pos' provided by seq_file layer. + +This also reverts commit 5cac98dd0 (net: Fix corruption +in /proc/*/net/dev_mcast), since its not needed anymore. + +Reported-by: Ben Greear +Signed-off-by: Eric Dumazet +Cc: Mihai Maruseac +Tested-by: Ben Greear +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + include/linux/netdevice.h | 2 - + net/core/dev.c | 58 ++++++++++---------------------------------- + net/core/dev_addr_lists.c | 3 +- + 3 files changed, 15 insertions(+), 48 deletions(-) + +diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h +index a82ad4d..cbeb586 100644 +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -2536,8 +2536,6 @@ extern void net_disable_timestamp(void); + extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); + extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); + extern void dev_seq_stop(struct seq_file *seq, void *v); +-extern int dev_seq_open_ops(struct inode *inode, struct file *file, +- const struct seq_operations *ops); + #endif + + extern int netdev_class_create_file(struct class_attribute *class_attr); +diff --git a/net/core/dev.c b/net/core/dev.c +index 55cd370..cd5050e 100644 +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -4102,54 +4102,41 @@ static int dev_ifconf(struct net *net, char __user *arg) + + #ifdef CONFIG_PROC_FS + +-#define BUCKET_SPACE (32 - NETDEV_HASHBITS) +- +-struct dev_iter_state { +- struct seq_net_private p; +- unsigned int pos; /* bucket << BUCKET_SPACE + offset */ +-}; ++#define BUCKET_SPACE (32 - NETDEV_HASHBITS - 1) + + #define get_bucket(x) ((x) >> BUCKET_SPACE) + #define get_offset(x) ((x) & ((1 << BUCKET_SPACE) - 1)) + #define set_bucket_offset(b, o) ((b) << BUCKET_SPACE | (o)) + +-static inline struct net_device *dev_from_same_bucket(struct seq_file *seq) ++static inline struct net_device *dev_from_same_bucket(struct seq_file *seq, loff_t *pos) + { +- struct dev_iter_state *state = seq->private; + struct net *net = seq_file_net(seq); + struct net_device *dev; + struct hlist_node *p; + struct hlist_head *h; +- unsigned int count, bucket, offset; ++ unsigned int count = 0, offset = get_offset(*pos); + +- bucket = get_bucket(state->pos); +- offset = get_offset(state->pos); +- h = &net->dev_name_head[bucket]; +- count = 0; ++ h = &net->dev_name_head[get_bucket(*pos)]; + hlist_for_each_entry_rcu(dev, p, h, name_hlist) { +- if (count++ == offset) { +- state->pos = set_bucket_offset(bucket, count); ++ if (++count == offset) + return dev; +- } + } + + return NULL; + } + +-static inline struct net_device *dev_from_new_bucket(struct seq_file *seq) ++static inline struct net_device *dev_from_bucket(struct seq_file *seq, loff_t *pos) + { +- struct dev_iter_state *state = seq->private; + struct net_device *dev; + unsigned int bucket; + +- bucket = get_bucket(state->pos); + do { +- dev = dev_from_same_bucket(seq); ++ dev = dev_from_same_bucket(seq, pos); + if (dev) + return dev; + +- bucket++; +- state->pos = set_bucket_offset(bucket, 0); ++ bucket = get_bucket(*pos) + 1; ++ *pos = set_bucket_offset(bucket, 1); + } while (bucket < NETDEV_HASHENTRIES); + + return NULL; +@@ -4162,33 +4149,20 @@ static inline struct net_device *dev_from_new_bucket(struct seq_file *seq) + void *dev_seq_start(struct seq_file *seq, loff_t *pos) + __acquires(RCU) + { +- struct dev_iter_state *state = seq->private; +- + rcu_read_lock(); + if (!*pos) + return SEQ_START_TOKEN; + +- /* check for end of the hash */ +- if (state->pos == 0 && *pos > 1) ++ if (get_bucket(*pos) >= NETDEV_HASHENTRIES) + return NULL; + +- return dev_from_new_bucket(seq); ++ return dev_from_bucket(seq, pos); + } + + void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) + { +- struct net_device *dev; +- + ++*pos; +- +- if (v == SEQ_START_TOKEN) +- return dev_from_new_bucket(seq); +- +- dev = dev_from_same_bucket(seq); +- if (dev) +- return dev; +- +- return dev_from_new_bucket(seq); ++ return dev_from_bucket(seq, pos); + } + + void dev_seq_stop(struct seq_file *seq, void *v) +@@ -4287,13 +4261,7 @@ static const struct seq_operations dev_seq_ops = { + static int dev_seq_open(struct inode *inode, struct file *file) + { + return seq_open_net(inode, file, &dev_seq_ops, +- sizeof(struct dev_iter_state)); +-} +- +-int dev_seq_open_ops(struct inode *inode, struct file *file, +- const struct seq_operations *ops) +-{ +- return seq_open_net(inode, file, ops, sizeof(struct dev_iter_state)); ++ sizeof(struct seq_net_private)); + } + + static const struct file_operations dev_seq_fops = { +diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c +index febba51..277faef 100644 +--- a/net/core/dev_addr_lists.c ++++ b/net/core/dev_addr_lists.c +@@ -696,7 +696,8 @@ static const struct seq_operations dev_mc_seq_ops = { + + static int dev_mc_seq_open(struct inode *inode, struct file *file) + { +- return dev_seq_open_ops(inode, file, &dev_mc_seq_ops); ++ return seq_open_net(inode, file, &dev_mc_seq_ops, ++ sizeof(struct seq_net_private)); + } + + static const struct file_operations dev_mc_seq_fops = { +-- +1.7.7.6 + 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 @@ +From 5a9807ef2e73be0be4b878dbec1691f91d875585 Mon Sep 17 00:00:00 2001 +From: "J. Bruce Fields" +Date: Mon, 9 Apr 2012 18:06:49 -0400 +Subject: [PATCH 058/165] nfsd: don't fail unchecked creates of non-special + files + +commit 9dc4e6c4d1182d34604ea40fef641775f5b15456 upstream. + +Allow a v3 unchecked open of a non-regular file succeed as if it were a +lookup; typically a client in such a case will want to fall back on a +local open, so succeeding and giving it the filehandle is more useful +than failing with nfserr_exist, which makes it appear that nothing at +all exists by that name. + +Similarly for v4, on an open-create, return the same errors we would on +an attempt to open a non-regular file, instead of returning +nfserr_exist. + +This fixes a problem found doing a v4 open of a symlink with +O_RDONLY|O_CREAT, which resulted in the current client returning EEXIST. + +Thanks also to Trond for analysis. + +Reported-by: Orion Poplawski +Tested-by: Orion Poplawski +Signed-off-by: J. Bruce Fields +[bwh: Backported to 3.2: use &resfh, not resfh] +Signed-off-by: Ben Hutchings +--- + fs/nfsd/nfs4proc.c | 8 ++++---- + fs/nfsd/vfs.c | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c +index 35840aa..b8c5538 100644 +--- a/fs/nfsd/nfs4proc.c ++++ b/fs/nfsd/nfs4proc.c +@@ -231,17 +231,17 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o + */ + if (open->op_createmode == NFS4_CREATE_EXCLUSIVE && status == 0) + open->op_bmval[1] = (FATTR4_WORD1_TIME_ACCESS | +- FATTR4_WORD1_TIME_MODIFY); ++ FATTR4_WORD1_TIME_MODIFY); + } else { + status = nfsd_lookup(rqstp, current_fh, + open->op_fname.data, open->op_fname.len, &resfh); + fh_unlock(current_fh); +- if (status) +- goto out; +- status = nfsd_check_obj_isreg(&resfh); + } + if (status) + goto out; ++ status = nfsd_check_obj_isreg(&resfh); ++ if (status) ++ goto out; + + if (is_create_with_attrs(open) && open->op_acl != NULL) + do_set_nfs4_acl(rqstp, &resfh, open->op_acl, open->op_bmval); +diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c +index 7a2e442..5c3cd82 100644 +--- a/fs/nfsd/vfs.c ++++ b/fs/nfsd/vfs.c +@@ -1439,7 +1439,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, + switch (createmode) { + case NFS3_CREATE_UNCHECKED: + if (! S_ISREG(dchild->d_inode->i_mode)) +- err = nfserr_exist; ++ goto out; + else if (truncp) { + /* in nfsv4, we need to treat this case a little + * differently. we don't want to truncate the +-- +1.7.7.6 + 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 @@ +From 8d46ef3ec21fd542ad3165d165a6db90427e61d8 Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Tue, 24 Apr 2012 22:09:47 -0400 +Subject: [PATCH 059/165] ppp: Don't stop and restart queue on every TX packet +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[ This combines upstream commit + e675f0cc9a872fd152edc0c77acfed19bf28b81e and follow-on bug fix + commit 9a5d2bd99e0dfe9a31b3c160073ac445ba3d773f ] + +For every transmitted packet, ppp_start_xmit() will stop the netdev +queue and then, if appropriate, restart it. This causes the TX softirq +to run, entirely gratuitously. + +This is "only" a waste of CPU time in the normal case, but it's actively +harmful when the PPP device is a TEQL slave — the wakeup will cause the +offending device to receive the next TX packet from the TEQL queue, when +it *should* have gone to the next slave in the list. We end up seeing +large bursts of packets on just *one* slave device, rather than using +the full available bandwidth over all slaves. + +This patch fixes the problem by *not* unconditionally stopping the queue +in ppp_start_xmit(). It adds a return value from ppp_xmit_process() +which indicates whether the queue should be stopped or not. + +It *doesn't* remove the call to netif_wake_queue() from +ppp_xmit_process(), because other code paths (especially from +ppp_output_wakeup()) need it there and it's messy to push it out to the +other callers to do it based on the return value. So we leave it in +place — it's a no-op in the case where the queue wasn't stopped, so it's +harmless in the TX path. + +Signed-off-by: David Woodhouse +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ppp/ppp_generic.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c +index 486b404..3ed983c 100644 +--- a/drivers/net/ppp/ppp_generic.c ++++ b/drivers/net/ppp/ppp_generic.c +@@ -968,7 +968,6 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev) + proto = npindex_to_proto[npi]; + put_unaligned_be16(proto, pp); + +- netif_stop_queue(dev); + skb_queue_tail(&ppp->file.xq, skb); + ppp_xmit_process(ppp); + return NETDEV_TX_OK; +@@ -1063,6 +1062,8 @@ ppp_xmit_process(struct ppp *ppp) + code that we can accept some more. */ + if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) + netif_wake_queue(ppp->dev); ++ else ++ netif_stop_queue(ppp->dev); + } + ppp_xmit_unlock(ppp); + } +-- +1.7.7.6 + 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 @@ +From 2d09c2df4957a8d73ea24c4464ad6942efedf590 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Tue, 24 Apr 2012 22:12:06 -0400 +Subject: [PATCH 060/165] tcp: allow splice() to build full TSO packets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[ This combines upstream commit + 2f53384424251c06038ae612e56231b96ab610ee and the follow-on bug fix + commit 35f9c09fe9c72eb8ca2b8e89a593e1c151f28fc2 ] + +vmsplice()/splice(pipe, socket) call do_tcp_sendpages() one page at a +time, adding at most 4096 bytes to an skb. (assuming PAGE_SIZE=4096) + +The call to tcp_push() at the end of do_tcp_sendpages() forces an +immediate xmit when pipe is not already filled, and tso_fragment() try +to split these skb to MSS multiples. + +4096 bytes are usually split in a skb with 2 MSS, and a remaining +sub-mss skb (assuming MTU=1500) + +This makes slow start suboptimal because many small frames are sent to +qdisc/driver layers instead of big ones (constrained by cwnd and packets +in flight of course) + +In fact, applications using sendmsg() (adding an additional memory copy) +instead of vmsplice()/splice()/sendfile() are a bit faster because of +this anomaly, especially if serving small files in environments with +large initial [c]wnd. + +Call tcp_push() only if MSG_MORE is not set in the flags parameter. + +This bit is automatically provided by splice() internals but for the +last page, or on all pages if user specified SPLICE_F_MORE splice() +flag. + +In some workloads, this can reduce number of sent logical packets by an +order of magnitude, making zero-copy TCP actually faster than +one-copy :) + +Reported-by: Tom Herbert +Cc: Nandita Dukkipati +Cc: Neal Cardwell +Cc: Tom Herbert +Cc: Yuchung Cheng +Cc: H.K. Jerry Chu +Cc: Maciej Ĺ»enczykowski +Cc: Mahesh Bandewar +Cc: Ilpo Järvinen +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + fs/splice.c | 5 ++++- + include/linux/socket.h | 2 +- + net/ipv4/tcp.c | 2 +- + net/socket.c | 6 +++--- + 4 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/fs/splice.c b/fs/splice.c +index fa2defa..6d0dfb8 100644 +--- a/fs/splice.c ++++ b/fs/splice.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + /* + * Attempt to steal a page from a pipe buffer. This should perhaps go into +@@ -691,7 +692,9 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe, + if (!likely(file->f_op && file->f_op->sendpage)) + return -EINVAL; + +- more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len; ++ more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0; ++ if (sd->len < sd->total_len) ++ more |= MSG_SENDPAGE_NOTLAST; + return file->f_op->sendpage(file, buf->page, buf->offset, + sd->len, &pos, more); + } +diff --git a/include/linux/socket.h b/include/linux/socket.h +index d0e77f6..ad919e0 100644 +--- a/include/linux/socket.h ++++ b/include/linux/socket.h +@@ -265,7 +265,7 @@ struct ucred { + #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ + #define MSG_MORE 0x8000 /* Sender will send more */ + #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ +- ++#define MSG_SENDPAGE_NOTLAST 0x20000 /* sendpage() internal : not the last page */ + #define MSG_EOF MSG_FIN + + #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file +diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c +index 34f5db1..36611ab 100644 +--- a/net/ipv4/tcp.c ++++ b/net/ipv4/tcp.c +@@ -860,7 +860,7 @@ wait_for_memory: + } + + out: +- if (copied) ++ if (copied && !(flags & MSG_SENDPAGE_NOTLAST)) + tcp_push(sk, flags, mss_now, tp->nonagle); + return copied; + +diff --git a/net/socket.c b/net/socket.c +index 2dce67a..273cbce 100644 +--- a/net/socket.c ++++ b/net/socket.c +@@ -791,9 +791,9 @@ static ssize_t sock_sendpage(struct file *file, struct page *page, + + sock = file->private_data; + +- flags = !(file->f_flags & O_NONBLOCK) ? 0 : MSG_DONTWAIT; +- if (more) +- flags |= MSG_MORE; ++ flags = (file->f_flags & O_NONBLOCK) ? MSG_DONTWAIT : 0; ++ /* more is a combination of MSG_MORE and MSG_SENDPAGE_NOTLAST */ ++ flags |= more; + + return kernel_sendpage(sock, page, offset, size, flags); + } +-- +1.7.7.6 + 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 @@ +From 8dda68d22ab01e2780f80a6afb814387fb904aa2 Mon Sep 17 00:00:00 2001 +From: Thomas Graf +Date: Tue, 3 Apr 2012 22:17:53 +0000 +Subject: [PATCH 061/165] sctp: Allow struct sctp_event_subscribe to grow + without breaking binaries + +[ Upstream commit acdd5985364f8dc511a0762fab2e683f29d9d692 ] + +getsockopt(..., SCTP_EVENTS, ...) performs a length check and returns +an error if the user provides less bytes than the size of struct +sctp_event_subscribe. + +Struct sctp_event_subscribe needs to be extended by an u8 for every +new event or notification type that is added. + +This obviously makes getsockopt fail for binaries that are compiled +against an older versions of which do not contain +all event types. + +This patch changes getsockopt behaviour to no longer return an error +if not enough bytes are being provided by the user. Instead, it +returns as much of sctp_event_subscribe as fits into the provided buffer. + +This leads to the new behavior that users see what they have been aware +of at compile time. + +The setsockopt(..., SCTP_EVENTS, ...) API is already behaving like this. + +Signed-off-by: Thomas Graf +Acked-by: Vlad Yasevich +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/sctp/socket.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/net/sctp/socket.c b/net/sctp/socket.c +index 54a7cd2..0075554 100644 +--- a/net/sctp/socket.c ++++ b/net/sctp/socket.c +@@ -4133,9 +4133,10 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len, + static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval, + int __user *optlen) + { +- if (len < sizeof(struct sctp_event_subscribe)) ++ if (len <= 0) + return -EINVAL; +- len = sizeof(struct sctp_event_subscribe); ++ if (len > sizeof(struct sctp_event_subscribe)) ++ len = sizeof(struct sctp_event_subscribe); + if (put_user(len, optlen)) + return -EFAULT; + if (copy_to_user(optval, &sctp_sk(sk)->subscribe, len)) +-- +1.7.7.6 + 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 @@ +From 9f8774d2e33d8c44b98e76db91cfc0d35b187f58 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Wed, 4 Apr 2012 01:01:20 +0000 +Subject: [PATCH 062/165] bridge: Do not send queries on multicast group + leaves + +[ Upstream commit 996304bbea3d2a094b7ba54c3bd65d3fffeac57b ] + +As it stands the bridge IGMP snooping system will respond to +group leave messages with queries for remaining membership. +This is both unnecessary and undesirable. First of all any +multicast routers present should be doing this rather than us. +What's more the queries that we send may end up upsetting other +multicast snooping swithces in the system that are buggy. + +In fact, we can simply remove the code that send these queries +because the existing membership expiry mechanism doesn't rely +on them anyway. + +So this patch simply removes all code associated with group +queries in response to group leave messages. + +Signed-off-by: Herbert Xu +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/bridge/br_multicast.c | 81 --------------------------------------------- + net/bridge/br_private.h | 4 -- + 2 files changed, 0 insertions(+), 85 deletions(-) + +diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c +index 8eb6b15..5ac1811 100644 +--- a/net/bridge/br_multicast.c ++++ b/net/bridge/br_multicast.c +@@ -241,7 +241,6 @@ static void br_multicast_group_expired(unsigned long data) + hlist_del_rcu(&mp->hlist[mdb->ver]); + mdb->size--; + +- del_timer(&mp->query_timer); + call_rcu_bh(&mp->rcu, br_multicast_free_group); + + out: +@@ -271,7 +270,6 @@ static void br_multicast_del_pg(struct net_bridge *br, + rcu_assign_pointer(*pp, p->next); + hlist_del_init(&p->mglist); + del_timer(&p->timer); +- del_timer(&p->query_timer); + call_rcu_bh(&p->rcu, br_multicast_free_pg); + + if (!mp->ports && !mp->mglist && +@@ -507,74 +505,6 @@ static struct sk_buff *br_multicast_alloc_query(struct net_bridge *br, + return NULL; + } + +-static void br_multicast_send_group_query(struct net_bridge_mdb_entry *mp) +-{ +- struct net_bridge *br = mp->br; +- struct sk_buff *skb; +- +- skb = br_multicast_alloc_query(br, &mp->addr); +- if (!skb) +- goto timer; +- +- netif_rx(skb); +- +-timer: +- if (++mp->queries_sent < br->multicast_last_member_count) +- mod_timer(&mp->query_timer, +- jiffies + br->multicast_last_member_interval); +-} +- +-static void br_multicast_group_query_expired(unsigned long data) +-{ +- struct net_bridge_mdb_entry *mp = (void *)data; +- struct net_bridge *br = mp->br; +- +- spin_lock(&br->multicast_lock); +- if (!netif_running(br->dev) || !mp->mglist || +- mp->queries_sent >= br->multicast_last_member_count) +- goto out; +- +- br_multicast_send_group_query(mp); +- +-out: +- spin_unlock(&br->multicast_lock); +-} +- +-static void br_multicast_send_port_group_query(struct net_bridge_port_group *pg) +-{ +- struct net_bridge_port *port = pg->port; +- struct net_bridge *br = port->br; +- struct sk_buff *skb; +- +- skb = br_multicast_alloc_query(br, &pg->addr); +- if (!skb) +- goto timer; +- +- br_deliver(port, skb); +- +-timer: +- if (++pg->queries_sent < br->multicast_last_member_count) +- mod_timer(&pg->query_timer, +- jiffies + br->multicast_last_member_interval); +-} +- +-static void br_multicast_port_group_query_expired(unsigned long data) +-{ +- struct net_bridge_port_group *pg = (void *)data; +- struct net_bridge_port *port = pg->port; +- struct net_bridge *br = port->br; +- +- spin_lock(&br->multicast_lock); +- if (!netif_running(br->dev) || hlist_unhashed(&pg->mglist) || +- pg->queries_sent >= br->multicast_last_member_count) +- goto out; +- +- br_multicast_send_port_group_query(pg); +- +-out: +- spin_unlock(&br->multicast_lock); +-} +- + static struct net_bridge_mdb_entry *br_multicast_get_group( + struct net_bridge *br, struct net_bridge_port *port, + struct br_ip *group, int hash) +@@ -690,8 +620,6 @@ rehash: + mp->addr = *group; + setup_timer(&mp->timer, br_multicast_group_expired, + (unsigned long)mp); +- setup_timer(&mp->query_timer, br_multicast_group_query_expired, +- (unsigned long)mp); + + hlist_add_head_rcu(&mp->hlist[mdb->ver], &mdb->mhash[hash]); + mdb->size++; +@@ -746,8 +674,6 @@ static int br_multicast_add_group(struct net_bridge *br, + hlist_add_head(&p->mglist, &port->mglist); + setup_timer(&p->timer, br_multicast_port_group_expired, + (unsigned long)p); +- setup_timer(&p->query_timer, br_multicast_port_group_query_expired, +- (unsigned long)p); + + rcu_assign_pointer(*pp, p); + +@@ -1291,9 +1217,6 @@ static void br_multicast_leave_group(struct net_bridge *br, + time_after(mp->timer.expires, time) : + try_to_del_timer_sync(&mp->timer) >= 0)) { + mod_timer(&mp->timer, time); +- +- mp->queries_sent = 0; +- mod_timer(&mp->query_timer, now); + } + + goto out; +@@ -1310,9 +1233,6 @@ static void br_multicast_leave_group(struct net_bridge *br, + time_after(p->timer.expires, time) : + try_to_del_timer_sync(&p->timer) >= 0)) { + mod_timer(&p->timer, time); +- +- p->queries_sent = 0; +- mod_timer(&p->query_timer, now); + } + + break; +@@ -1680,7 +1600,6 @@ void br_multicast_stop(struct net_bridge *br) + hlist_for_each_entry_safe(mp, p, n, &mdb->mhash[i], + hlist[ver]) { + del_timer(&mp->timer); +- del_timer(&mp->query_timer); + call_rcu_bh(&mp->rcu, br_multicast_free_group); + } + } +diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h +index d7d6fb0..93264df 100644 +--- a/net/bridge/br_private.h ++++ b/net/bridge/br_private.h +@@ -82,9 +82,7 @@ struct net_bridge_port_group { + struct hlist_node mglist; + struct rcu_head rcu; + struct timer_list timer; +- struct timer_list query_timer; + struct br_ip addr; +- u32 queries_sent; + }; + + struct net_bridge_mdb_entry +@@ -94,10 +92,8 @@ struct net_bridge_mdb_entry + struct net_bridge_port_group __rcu *ports; + struct rcu_head rcu; + struct timer_list timer; +- struct timer_list query_timer; + struct br_ip addr; + bool mglist; +- u32 queries_sent; + }; + + struct net_bridge_mdb_htable +-- +1.7.7.6 + 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 @@ +From dda800eb86fb88c28f63c0136cc76b1346322feb Mon Sep 17 00:00:00 2001 +From: "RongQing.Li" +Date: Wed, 4 Apr 2012 16:47:04 +0000 +Subject: [PATCH 063/165] ipv6: fix array index in ip6_mc_add_src() + +[ Upstream commit 78d50217baf36093ab320f95bae0d6452daec85c ] + +Convert array index from the loop bound to the loop index. + +And remove the void type conversion to ip6_mc_del1_src() return +code, seem it is unnecessary, since ip6_mc_del1_src() does not +use __must_check similar attribute, no compiler will report the +warning when it is removed. + +v2: enrich the commit header + +Signed-off-by: RongQing.Li +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/ipv6/mcast.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c +index 2257366..f2d74ea 100644 +--- a/net/ipv6/mcast.c ++++ b/net/ipv6/mcast.c +@@ -2054,7 +2054,7 @@ static int ip6_mc_add_src(struct inet6_dev *idev, const struct in6_addr *pmca, + if (!delta) + pmc->mca_sfcount[sfmode]--; + for (j=0; jmca_sfcount[MCAST_EXCLUDE] != 0)) { + struct ip6_sf_list *psf; + +-- +1.7.7.6 + 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 @@ +From 636e8de47aae86650672a0065eb401e918544d34 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 5 Apr 2012 12:07:45 +0000 +Subject: [PATCH 064/165] phonet: Check input from user before allocating +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[ Upstream commit bcf1b70ac6eb0ed8286c66e6bf37cb747cbaa04c ] + +A phonet packet is limited to USHRT_MAX bytes, this is never checked during +tx which means that the user can specify any size he wishes, and the kernel +will attempt to allocate that size. + +In the good case, it'll lead to the following warning, but it may also cause +the kernel to kick in the OOM and kill a random task on the server. + +[ 8921.744094] WARNING: at mm/page_alloc.c:2255 __alloc_pages_slowpath+0x65/0x730() +[ 8921.749770] Pid: 5081, comm: trinity Tainted: G W 3.4.0-rc1-next-20120402-sasha #46 +[ 8921.756672] Call Trace: +[ 8921.758185] [] warn_slowpath_common+0x87/0xb0 +[ 8921.762868] [] warn_slowpath_null+0x15/0x20 +[ 8921.765399] [] __alloc_pages_slowpath+0x65/0x730 +[ 8921.769226] [] ? zone_watermark_ok+0x1a/0x20 +[ 8921.771686] [] ? get_page_from_freelist+0x625/0x660 +[ 8921.773919] [] __alloc_pages_nodemask+0x1f8/0x240 +[ 8921.776248] [] kmalloc_large_node+0x70/0xc0 +[ 8921.778294] [] __kmalloc_node_track_caller+0x34/0x1c0 +[ 8921.780847] [] ? sock_alloc_send_pskb+0xbc/0x260 +[ 8921.783179] [] __alloc_skb+0x75/0x170 +[ 8921.784971] [] sock_alloc_send_pskb+0xbc/0x260 +[ 8921.787111] [] ? release_sock+0x7e/0x90 +[ 8921.788973] [] sock_alloc_send_skb+0x10/0x20 +[ 8921.791052] [] pep_sendmsg+0x60/0x380 +[ 8921.792931] [] ? pn_socket_bind+0x156/0x180 +[ 8921.794917] [] ? pn_socket_autobind+0x3f/0x90 +[ 8921.797053] [] pn_socket_sendmsg+0x4f/0x70 +[ 8921.798992] [] sock_aio_write+0x187/0x1b0 +[ 8921.801395] [] ? sub_preempt_count+0xae/0xf0 +[ 8921.803501] [] ? __lock_acquire+0x42c/0x4b0 +[ 8921.805505] [] ? __sock_recv_ts_and_drops+0x140/0x140 +[ 8921.807860] [] do_sync_readv_writev+0xbc/0x110 +[ 8921.809986] [] ? might_fault+0x97/0xa0 +[ 8921.811998] [] ? security_file_permission+0x1e/0x90 +[ 8921.814595] [] do_readv_writev+0xe2/0x1e0 +[ 8921.816702] [] ? do_setitimer+0x1ac/0x200 +[ 8921.818819] [] ? get_parent_ip+0x11/0x50 +[ 8921.820863] [] ? sub_preempt_count+0xae/0xf0 +[ 8921.823318] [] vfs_writev+0x46/0x60 +[ 8921.825219] [] sys_writev+0x4f/0xb0 +[ 8921.827127] [] system_call_fastpath+0x16/0x1b +[ 8921.829384] ---[ end trace dffe390f30db9eb7 ]--- + +Signed-off-by: Sasha Levin +Acked-by: RĂ©mi Denis-Courmont +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/phonet/pep.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/net/phonet/pep.c b/net/phonet/pep.c +index 2ba6e9f..007546d 100644 +--- a/net/phonet/pep.c ++++ b/net/phonet/pep.c +@@ -1046,6 +1046,9 @@ static int pep_sendmsg(struct kiocb *iocb, struct sock *sk, + int flags = msg->msg_flags; + int err, done; + ++ if (len > USHRT_MAX) ++ return -EMSGSIZE; ++ + if ((msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL| + MSG_CMSG_COMPAT)) || + !(msg->msg_flags & MSG_EOR)) +-- +1.7.7.6 + 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 @@ +From 1413698b8d47c7fb2783cafd906ac1db9b1723d7 Mon Sep 17 00:00:00 2001 +From: Veaceslav Falico +Date: Thu, 5 Apr 2012 03:47:43 +0000 +Subject: [PATCH 065/165] bonding: properly unset current_arp_slave on slave + link up + +[ Upstream commit 5a4309746cd74734daa964acb02690c22b3c8911 ] + +When a slave comes up, we're unsetting the current_arp_slave without +removing active flags from it, which can lead to situations where we have +more than one slave with active flags in active-backup mode. + +To avoid this situation we must remove the active flags from a slave before +removing it as a current_arp_slave. + +Signed-off-by: Veaceslav Falico +Signed-off-by: Jay Vosburgh +Signed-off-by: Andy Gospodarek +Signed-off-by: Marcelo Ricardo Leitner +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/bonding/bond_main.c | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c +index e58aa2b..f65e0b9 100644 +--- a/drivers/net/bonding/bond_main.c ++++ b/drivers/net/bonding/bond_main.c +@@ -2982,7 +2982,11 @@ static void bond_ab_arp_commit(struct bonding *bond, int delta_in_ticks) + trans_start + delta_in_ticks)) || + bond->curr_active_slave != slave) { + slave->link = BOND_LINK_UP; +- bond->current_arp_slave = NULL; ++ if (bond->current_arp_slave) { ++ bond_set_slave_inactive_flags( ++ bond->current_arp_slave); ++ bond->current_arp_slave = NULL; ++ } + + pr_info("%s: link status definitely up for interface %s.\n", + bond->dev->name, slave->dev->name); +-- +1.7.7.6 + 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 @@ +From 5454ccf43f7636614fc378283890bf911c2e2058 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Mon, 26 Mar 2012 09:01:30 +0000 +Subject: [PATCH 066/165] wimax: i2400m - prevent a possible kernel bug due to + missing fw_name string + +[ Upstream commit 4eee6a3a04e8bb53fbe7de0f64d0524d3fbe3f80 ] + +This happened on a machine with a custom hotplug script calling nameif, +probably due to slow firmware loading. At the time nameif uses ethtool +to gather interface information, i2400m->fw_name is zero and so a null +pointer dereference occurs from within i2400m_get_drvinfo(). + +Signed-off-by: Phil Sutter +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/wimax/i2400m/netdev.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c +index 64a1106..4697cf3 100644 +--- a/drivers/net/wimax/i2400m/netdev.c ++++ b/drivers/net/wimax/i2400m/netdev.c +@@ -607,7 +607,8 @@ static void i2400m_get_drvinfo(struct net_device *net_dev, + struct i2400m *i2400m = net_dev_to_i2400m(net_dev); + + strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver) - 1); +- strncpy(info->fw_version, i2400m->fw_name, sizeof(info->fw_version) - 1); ++ strncpy(info->fw_version, ++ i2400m->fw_name ? : "", sizeof(info->fw_version) - 1); + if (net_dev->dev.parent) + strncpy(info->bus_info, dev_name(net_dev->dev.parent), + sizeof(info->bus_info) - 1); +-- +1.7.7.6 + 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 @@ +From 0f7eb8a3cb853edf31ec23d26623b195603814b2 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Thu, 5 Apr 2012 22:17:46 +0000 +Subject: [PATCH 067/165] netlink: fix races after skb queueing + +[ Upstream commit 4a7e7c2ad540e54c75489a70137bf0ec15d3a127 ] + +As soon as an skb is queued into socket receive_queue, another thread +can consume it, so we are not allowed to reference skb anymore, or risk +use after free. + +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/netlink/af_netlink.c | 24 +++++++++++++----------- + 1 files changed, 13 insertions(+), 11 deletions(-) + +diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c +index 1201b6d..a99fb41 100644 +--- a/net/netlink/af_netlink.c ++++ b/net/netlink/af_netlink.c +@@ -830,12 +830,19 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, + return 0; + } + +-int netlink_sendskb(struct sock *sk, struct sk_buff *skb) ++static int __netlink_sendskb(struct sock *sk, struct sk_buff *skb) + { + int len = skb->len; + + skb_queue_tail(&sk->sk_receive_queue, skb); + sk->sk_data_ready(sk, len); ++ return len; ++} ++ ++int netlink_sendskb(struct sock *sk, struct sk_buff *skb) ++{ ++ int len = __netlink_sendskb(sk, skb); ++ + sock_put(sk); + return len; + } +@@ -960,8 +967,7 @@ static inline int netlink_broadcast_deliver(struct sock *sk, + if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf && + !test_bit(0, &nlk->state)) { + skb_set_owner_r(skb, sk); +- skb_queue_tail(&sk->sk_receive_queue, skb); +- sk->sk_data_ready(sk, skb->len); ++ __netlink_sendskb(sk, skb); + return atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf; + } + return -1; +@@ -1684,10 +1690,8 @@ static int netlink_dump(struct sock *sk) + + if (sk_filter(sk, skb)) + kfree_skb(skb); +- else { +- skb_queue_tail(&sk->sk_receive_queue, skb); +- sk->sk_data_ready(sk, skb->len); +- } ++ else ++ __netlink_sendskb(sk, skb); + return 0; + } + +@@ -1701,10 +1705,8 @@ static int netlink_dump(struct sock *sk) + + if (sk_filter(sk, skb)) + kfree_skb(skb); +- else { +- skb_queue_tail(&sk->sk_receive_queue, skb); +- sk->sk_data_ready(sk, skb->len); +- } ++ else ++ __netlink_sendskb(sk, skb); + + if (cb->done) + cb->done(cb); +-- +1.7.7.6 + 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 @@ +From 86e0251999e198af9ae73f58db4d5689f14862ec Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Fri, 6 Apr 2012 10:49:10 +0200 +Subject: [PATCH 068/165] net: fix a race in sock_queue_err_skb() + +[ Upstream commit 110c43304db6f06490961529536c362d9ac5732f ] + +As soon as an skb is queued into socket error queue, another thread +can consume it, so we are not allowed to reference skb anymore, or risk +use after free. + +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/core/skbuff.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/net/core/skbuff.c b/net/core/skbuff.c +index 3c30ee4..29cb392 100644 +--- a/net/core/skbuff.c ++++ b/net/core/skbuff.c +@@ -3111,6 +3111,8 @@ static void sock_rmem_free(struct sk_buff *skb) + */ + int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) + { ++ int len = skb->len; ++ + if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= + (unsigned)sk->sk_rcvbuf) + return -ENOMEM; +@@ -3125,7 +3127,7 @@ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) + + skb_queue_tail(&sk->sk_error_queue, skb); + if (!sock_flag(sk, SOCK_DEAD)) +- sk->sk_data_ready(sk, skb->len); ++ sk->sk_data_ready(sk, len); + return 0; + } + EXPORT_SYMBOL(sock_queue_err_skb); +-- +1.7.7.6 + 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 @@ +From e371feec366591f88fd4df14f701359bd08d33e7 Mon Sep 17 00:00:00 2001 +From: Neal Cardwell +Date: Tue, 10 Apr 2012 07:59:20 +0000 +Subject: [PATCH 069/165] tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT + sample + +[ Upstream commit 18a223e0b9ec8979320ba364b47c9772391d6d05 ] + +Fix a code path in tcp_rcv_rtt_update() that was comparing scaled and +unscaled RTT samples. + +The intent in the code was to only use the 'm' measurement if it was a +new minimum. However, since 'm' had not yet been shifted left 3 bits +but 'new_sample' had, this comparison would nearly always succeed, +leading us to erroneously set our receive-side RTT estimate to the 'm' +sample when that sample could be nearly 8x too high to use. + +The overall effect is to often cause the receive-side RTT estimate to +be significantly too large (up to 40% too large for brief periods in +my tests). + +Signed-off-by: Neal Cardwell +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/ipv4/tcp_input.c | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c +index e4d1e4a..4c46fa7 100644 +--- a/net/ipv4/tcp_input.c ++++ b/net/ipv4/tcp_input.c +@@ -473,8 +473,11 @@ static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep) + if (!win_dep) { + m -= (new_sample >> 3); + new_sample += m; +- } else if (m < new_sample) +- new_sample = m << 3; ++ } else { ++ m <<= 3; ++ if (m < new_sample) ++ new_sample = m; ++ } + } else { + /* No previous measure. */ + new_sample = m << 3; +-- +1.7.7.6 + 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 @@ +From 03bdfc1371ae4ad8b2bbe50475baa6d983f62511 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Tue, 10 Apr 2012 20:08:39 +0000 +Subject: [PATCH 070/165] net: allow pskb_expand_head() to get maximum + tailroom + +[ Upstream commit 87151b8689d890dfb495081f7be9b9e257f7a2df ] + +Marc Merlin reported many order-1 allocations failures in TX path on its +wireless setup, that dont make any sense with MTU=1500 network, and non +SG capable hardware. + +Turns out part of the problem comes from pskb_expand_head() not using +ksize() to get exact head size given by kmalloc(). Doing the same thing +than __alloc_skb() allows more tailroom in skb and can prevent future +reallocations. + +As a bonus, struct skb_shared_info becomes cache line aligned. + +Reported-by: Marc MERLIN +Tested-by: Marc MERLIN +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/core/skbuff.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/net/core/skbuff.c b/net/core/skbuff.c +index 29cb392..2ec200de 100644 +--- a/net/core/skbuff.c ++++ b/net/core/skbuff.c +@@ -903,9 +903,11 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, + goto adjust_others; + } + +- data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask); ++ data = kmalloc(size + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)), ++ gfp_mask); + if (!data) + goto nodata; ++ size = SKB_WITH_OVERHEAD(ksize(data)); + + /* Copy only real data... and, alas, header. This should be + * optimized for the cases when header is void. +-- +1.7.7.6 + 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 @@ +From 137530e7322e536a814836856ef12183cd786e5f Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Sun, 4 Dec 2011 08:51:08 +0000 +Subject: [PATCH 071/165] tcp: fix tcp_trim_head() + +[ Upstream commit 4fa48bf3c75069d636fc8830743c929a062e80dc ] + +commit f07d960df3 (tcp: avoid frag allocation for small frames) +breaked assumption in tcp stack that skb is either linear (skb->data_len +== 0), or fully fragged (skb->data_len == skb->len) + +tcp_trim_head() made this assumption, we must fix it. + +Thanks to Vijay for providing a very detailed explanation. + +Reported-by: Vijay Subramanian +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/ipv4/tcp_output.c | 13 ++++++++----- + 1 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c +index 097e0c7..7413437 100644 +--- a/net/ipv4/tcp_output.c ++++ b/net/ipv4/tcp_output.c +@@ -1093,6 +1093,13 @@ static void __pskb_trim_head(struct sk_buff *skb, int len) + { + int i, k, eat; + ++ eat = min_t(int, len, skb_headlen(skb)); ++ if (eat) { ++ __skb_pull(skb, eat); ++ len -= eat; ++ if (!len) ++ return; ++ } + eat = len; + k = 0; + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { +@@ -1124,11 +1131,7 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) + if (skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) + return -ENOMEM; + +- /* If len == headlen, we avoid __skb_pull to preserve alignment. */ +- if (unlikely(len < skb_headlen(skb))) +- __skb_pull(skb, len); +- else +- __pskb_trim_head(skb, len - skb_headlen(skb)); ++ __pskb_trim_head(skb, len); + + TCP_SKB_CB(skb)->seq += len; + skb->ip_summed = CHECKSUM_PARTIAL; +-- +1.7.7.6 + 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 @@ +From f5e6c8aa4ebb62b560068b1636d889b4932c4dbc Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Tue, 24 Apr 2012 23:01:22 -0400 +Subject: [PATCH 072/165] tcp: avoid order-1 allocations on wifi and tx path + +[ This combines upstream commit + a21d45726acacc963d8baddf74607d9b74e2b723 and the follow-on bug fix + commit 22b4a4f22da4b39c6f7f679fd35f3d35c91bf851 ] + +Marc Merlin reported many order-1 allocations failures in TX path on its +wireless setup, that dont make any sense with MTU=1500 network, and non +SG capable hardware. + +After investigation, it turns out TCP uses sk_stream_alloc_skb() and +used as a convention skb_tailroom(skb) to know how many bytes of data +payload could be put in this skb (for non SG capable devices) + +Note : these skb used kmalloc-4096 (MTU=1500 + MAX_HEADER + +sizeof(struct skb_shared_info) being above 2048) + +Later, mac80211 layer need to add some bytes at the tail of skb +(IEEE80211_ENCRYPT_TAILROOM = 18 bytes) and since no more tailroom is +available has to call pskb_expand_head() and request order-1 +allocations. + +This patch changes sk_stream_alloc_skb() so that only +sk->sk_prot->max_header bytes of headroom are reserved, and use a new +skb field, avail_size to hold the data payload limit. + +This way, order-0 allocations done by TCP stack can leave more than 2 KB +of tailroom and no more allocation is performed in mac80211 layer (or +any layer needing some tailroom) + +avail_size is unioned with mark/dropcount, since mark will be set later +in IP stack for output packets. Therefore, skb size is unchanged. + +Reported-by: Marc MERLIN +Tested-by: Marc MERLIN +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +[bwh: Correct commit hash for follow-on bug fix] +Signed-off-by: Ben Hutchings +--- + include/linux/skbuff.h | 13 +++++++++++++ + net/ipv4/tcp.c | 8 ++++---- + net/ipv4/tcp_output.c | 3 ++- + 3 files changed, 19 insertions(+), 5 deletions(-) + +diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h +index 6cf8b53..e689b47 100644 +--- a/include/linux/skbuff.h ++++ b/include/linux/skbuff.h +@@ -458,6 +458,7 @@ struct sk_buff { + union { + __u32 mark; + __u32 dropcount; ++ __u32 avail_size; + }; + + __u16 vlan_tci; +@@ -1326,6 +1327,18 @@ static inline int skb_tailroom(const struct sk_buff *skb) + } + + /** ++ * skb_availroom - bytes at buffer end ++ * @skb: buffer to check ++ * ++ * Return the number of bytes of free space at the tail of an sk_buff ++ * allocated by sk_stream_alloc() ++ */ ++static inline int skb_availroom(const struct sk_buff *skb) ++{ ++ return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len; ++} ++ ++/** + * skb_reserve - adjust headroom + * @skb: buffer to alter + * @len: bytes to move +diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c +index 36611ab..7904db4 100644 +--- a/net/ipv4/tcp.c ++++ b/net/ipv4/tcp.c +@@ -701,11 +701,12 @@ struct sk_buff *sk_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp) + skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp); + if (skb) { + if (sk_wmem_schedule(sk, skb->truesize)) { ++ skb_reserve(skb, sk->sk_prot->max_header); + /* + * Make sure that we have exactly size bytes + * available to the caller, no more, no less. + */ +- skb_reserve(skb, skb_tailroom(skb) - size); ++ skb->avail_size = size; + return skb; + } + __kfree_skb(skb); +@@ -995,10 +996,9 @@ new_segment: + copy = seglen; + + /* Where to copy to? */ +- if (skb_tailroom(skb) > 0) { ++ if (skb_availroom(skb) > 0) { + /* We have some space in skb head. Superb! */ +- if (copy > skb_tailroom(skb)) +- copy = skb_tailroom(skb); ++ copy = min_t(int, copy, skb_availroom(skb)); + err = skb_add_data_nocache(sk, skb, from, copy); + if (err) + goto do_fault; +diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c +index 7413437..c51dd5b 100644 +--- a/net/ipv4/tcp_output.c ++++ b/net/ipv4/tcp_output.c +@@ -1096,6 +1096,7 @@ static void __pskb_trim_head(struct sk_buff *skb, int len) + eat = min_t(int, len, skb_headlen(skb)); + if (eat) { + __skb_pull(skb, eat); ++ skb->avail_size -= eat; + len -= eat; + if (!len) + return; +@@ -2060,7 +2061,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *to, + /* Punt if not enough space exists in the first SKB for + * the data in the second + */ +- if (skb->len > skb_tailroom(to)) ++ if (skb->len > skb_availroom(to)) + break; + + if (after(TCP_SKB_CB(skb)->end_seq, tcp_wnd_end(tp))) +-- +1.7.7.6 + 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 @@ +From 9785af56c9a0c73e462058b63999df1c95cf6ce7 Mon Sep 17 00:00:00 2001 +From: Tony Zelenoff +Date: Wed, 11 Apr 2012 06:15:03 +0000 +Subject: [PATCH 073/165] atl1: fix kernel panic in case of DMA errors + +[ Upstream commit 03662e41c7cff64a776bfb1b3816de4be43de881 ] + +Problem: +There was two separate work_struct structures which share one +handler. Unfortunately getting atl1_adapter structure from +work_struct in case of DMA error was done from incorrect +offset which cause kernel panics. + +Solution: +The useless work_struct for DMA error removed and +handler name changed to more generic one. + +Signed-off-by: Tony Zelenoff +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/atheros/atlx/atl1.c | 12 +++++------- + drivers/net/ethernet/atheros/atlx/atl1.h | 3 +-- + drivers/net/ethernet/atheros/atlx/atlx.c | 2 +- + 3 files changed, 7 insertions(+), 10 deletions(-) + +diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c +index 33a4e35..ee532e1 100644 +--- a/drivers/net/ethernet/atheros/atlx/atl1.c ++++ b/drivers/net/ethernet/atheros/atlx/atl1.c +@@ -2473,7 +2473,7 @@ static irqreturn_t atl1_intr(int irq, void *data) + "pcie phy link down %x\n", status); + if (netif_running(adapter->netdev)) { /* reset MAC */ + iowrite32(0, adapter->hw.hw_addr + REG_IMR); +- schedule_work(&adapter->pcie_dma_to_rst_task); ++ schedule_work(&adapter->reset_dev_task); + return IRQ_HANDLED; + } + } +@@ -2485,7 +2485,7 @@ static irqreturn_t atl1_intr(int irq, void *data) + "pcie DMA r/w error (status = 0x%x)\n", + status); + iowrite32(0, adapter->hw.hw_addr + REG_IMR); +- schedule_work(&adapter->pcie_dma_to_rst_task); ++ schedule_work(&adapter->reset_dev_task); + return IRQ_HANDLED; + } + +@@ -2630,10 +2630,10 @@ static void atl1_down(struct atl1_adapter *adapter) + atl1_clean_rx_ring(adapter); + } + +-static void atl1_tx_timeout_task(struct work_struct *work) ++static void atl1_reset_dev_task(struct work_struct *work) + { + struct atl1_adapter *adapter = +- container_of(work, struct atl1_adapter, tx_timeout_task); ++ container_of(work, struct atl1_adapter, reset_dev_task); + struct net_device *netdev = adapter->netdev; + + netif_device_detach(netdev); +@@ -3032,12 +3032,10 @@ static int __devinit atl1_probe(struct pci_dev *pdev, + (unsigned long)adapter); + adapter->phy_timer_pending = false; + +- INIT_WORK(&adapter->tx_timeout_task, atl1_tx_timeout_task); ++ INIT_WORK(&adapter->reset_dev_task, atl1_reset_dev_task); + + INIT_WORK(&adapter->link_chg_task, atlx_link_chg_task); + +- INIT_WORK(&adapter->pcie_dma_to_rst_task, atl1_tx_timeout_task); +- + err = register_netdev(netdev); + if (err) + goto err_common; +diff --git a/drivers/net/ethernet/atheros/atlx/atl1.h b/drivers/net/ethernet/atheros/atlx/atl1.h +index 109d6da..e04bf4d 100644 +--- a/drivers/net/ethernet/atheros/atlx/atl1.h ++++ b/drivers/net/ethernet/atheros/atlx/atl1.h +@@ -758,9 +758,8 @@ struct atl1_adapter { + u16 link_speed; + u16 link_duplex; + spinlock_t lock; +- struct work_struct tx_timeout_task; ++ struct work_struct reset_dev_task; + struct work_struct link_chg_task; +- struct work_struct pcie_dma_to_rst_task; + + struct timer_list phy_config_timer; + bool phy_timer_pending; +diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c +index aabcf4b..41c6d83 100644 +--- a/drivers/net/ethernet/atheros/atlx/atlx.c ++++ b/drivers/net/ethernet/atheros/atlx/atlx.c +@@ -193,7 +193,7 @@ static void atlx_tx_timeout(struct net_device *netdev) + { + struct atlx_adapter *adapter = netdev_priv(netdev); + /* Do the reset outside of interrupt context */ +- schedule_work(&adapter->tx_timeout_task); ++ schedule_work(&adapter->reset_dev_task); + } + + /* +-- +1.7.7.6 + 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 @@ +From d3b5873235963930f20f0900871e72ff3b80274b Mon Sep 17 00:00:00 2001 +From: Jason Wang +Date: Wed, 11 Apr 2012 22:10:54 +0000 +Subject: [PATCH 074/165] 8139cp: set intr mask after its handler is + registered + +[ Upstream commit a8c9cb106fe79c28d6b7f1397652cadd228715ff ] + +We set intr mask before its handler is registered, this does not work well when +8139cp is sharing irq line with other devices. As the irq could be enabled by +the device before 8139cp's hander is registered which may lead unhandled +irq. Fix this by introducing an helper cp_irq_enable() and call it after +request_irq(). + +Signed-off-by: Jason Wang +Reviewed-by: Flavio Leitner +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/realtek/8139cp.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c +index aba4f67..8f47907 100644 +--- a/drivers/net/ethernet/realtek/8139cp.c ++++ b/drivers/net/ethernet/realtek/8139cp.c +@@ -961,6 +961,11 @@ static inline void cp_start_hw (struct cp_private *cp) + cpw8(Cmd, RxOn | TxOn); + } + ++static void cp_enable_irq(struct cp_private *cp) ++{ ++ cpw16_f(IntrMask, cp_intr_mask); ++} ++ + static void cp_init_hw (struct cp_private *cp) + { + struct net_device *dev = cp->dev; +@@ -1000,8 +1005,6 @@ static void cp_init_hw (struct cp_private *cp) + + cpw16(MultiIntr, 0); + +- cpw16_f(IntrMask, cp_intr_mask); +- + cpw8_f(Cfg9346, Cfg9346_Lock); + } + +@@ -1133,6 +1136,8 @@ static int cp_open (struct net_device *dev) + if (rc) + goto err_out_hw; + ++ cp_enable_irq(cp); ++ + netif_carrier_off(dev); + mii_check_media(&cp->mii_if, netif_msg_link(cp), true); + netif_start_queue(dev); +@@ -2034,6 +2039,7 @@ static int cp_resume (struct pci_dev *pdev) + /* FIXME: sh*t may happen if the Rx ring buffer is depleted */ + cp_init_rings_index (cp); + cp_init_hw (cp); ++ cp_enable_irq(cp); + netif_start_queue (dev); + + spin_lock_irqsave (&cp->lock, flags); +-- +1.7.7.6 + 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 @@ +From d886ddd4ea18bd874325e888d3272a8db0a972ea Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Thu, 12 Apr 2012 05:54:09 +0000 +Subject: [PATCH 075/165] net: smsc911x: fix skb handling in receive path + +[ Upstream commit 3c5e979bd037888dd7d722da22da4b43659af485 ] + +The SMSC911x driver resets the ->head, ->data and ->tail pointers in the +skb on the reset path in order to avoid buffer overflow due to packet +padding performed by the hardware. + +This patch fixes the receive path so that the skb pointers are fixed up +after the data has been read from the device, The error path is also +fixed to use number of words consistently and prevent erroneous FIFO +fastforwarding when skipping over bad data. + +Signed-off-by: Will Deacon +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/smsc/smsc911x.c | 14 +++++--------- + 1 files changed, 5 insertions(+), 9 deletions(-) + +diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c +index 8843071..8c7dd21 100644 +--- a/drivers/net/ethernet/smsc/smsc911x.c ++++ b/drivers/net/ethernet/smsc/smsc911x.c +@@ -1089,10 +1089,8 @@ smsc911x_rx_counterrors(struct net_device *dev, unsigned int rxstat) + + /* Quickly dumps bad packets */ + static void +-smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktbytes) ++smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktwords) + { +- unsigned int pktwords = (pktbytes + NET_IP_ALIGN + 3) >> 2; +- + if (likely(pktwords >= 4)) { + unsigned int timeout = 500; + unsigned int val; +@@ -1156,7 +1154,7 @@ static int smsc911x_poll(struct napi_struct *napi, int budget) + continue; + } + +- skb = netdev_alloc_skb(dev, pktlength + NET_IP_ALIGN); ++ skb = netdev_alloc_skb(dev, pktwords << 2); + if (unlikely(!skb)) { + SMSC_WARN(pdata, rx_err, + "Unable to allocate skb for rx packet"); +@@ -1166,14 +1164,12 @@ static int smsc911x_poll(struct napi_struct *napi, int budget) + break; + } + +- skb->data = skb->head; +- skb_reset_tail_pointer(skb); ++ pdata->ops->rx_readfifo(pdata, ++ (unsigned int *)skb->data, pktwords); + + /* Align IP on 16B boundary */ + skb_reserve(skb, NET_IP_ALIGN); + skb_put(skb, pktlength - 4); +- pdata->ops->rx_readfifo(pdata, +- (unsigned int *)skb->head, pktwords); + skb->protocol = eth_type_trans(skb, dev); + skb_checksum_none_assert(skb); + netif_receive_skb(skb); +@@ -1396,7 +1392,7 @@ static int smsc911x_open(struct net_device *dev) + smsc911x_reg_write(pdata, FIFO_INT, temp); + + /* set RX Data offset to 2 bytes for alignment */ +- smsc911x_reg_write(pdata, RX_CFG, (2 << 8)); ++ smsc911x_reg_write(pdata, RX_CFG, (NET_IP_ALIGN << 8)); + + /* enable NAPI polling before enabling RX interrupts */ + napi_enable(&pdata->napi); +-- +1.7.7.6 + 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 @@ +From 64adebf7ebe78704f2a1f09614184f1ede7631b2 Mon Sep 17 00:00:00 2001 +From: Davide Ciminaghi +Date: Fri, 13 Apr 2012 04:48:25 +0000 +Subject: [PATCH 076/165] net/ethernet: ks8851_mll fix rx frame buffer + overflow + +[ Upstream commit 8a9a0ea6032186e3030419262678d652b88bf6a8 ] + +At the beginning of ks_rcv(), a for loop retrieves the +header information relevant to all the frames stored +in the mac's internal buffers. The number of pending +frames is stored as an 8 bits field in KS_RXFCTR. +If interrupts are disabled long enough to allow for more than +32 frames to accumulate in the MAC's internal buffers, a buffer +overflow occurs. +This patch fixes the problem by making the +driver's frame_head_info buffer big enough. +Well actually, since the chip appears to have 12K of +internal rx buffers and the shortest ethernet frame should +be 64 bytes long, maybe the limit could be set to +12*1024/64 = 192 frames, but 255 should be safer. + +Signed-off-by: Davide Ciminaghi +Signed-off-by: Raffaele Recalcati +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/micrel/ks8851_mll.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c +index d19c849..77241b6 100644 +--- a/drivers/net/ethernet/micrel/ks8851_mll.c ++++ b/drivers/net/ethernet/micrel/ks8851_mll.c +@@ -40,7 +40,7 @@ + #define DRV_NAME "ks8851_mll" + + static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 }; +-#define MAX_RECV_FRAMES 32 ++#define MAX_RECV_FRAMES 255 + #define MAX_BUF_SIZE 2048 + #define TX_BUF_SIZE 2000 + #define RX_BUF_SIZE 2000 +-- +1.7.7.6 + 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 @@ +From fad0985a19b237d9b48ab19b767413a95314b90d Mon Sep 17 00:00:00 2001 +From: David Ward +Date: Sun, 15 Apr 2012 12:31:45 +0000 +Subject: [PATCH 077/165] net_sched: gred: Fix oops in gred_dump() in WRED + mode + +[ Upstream commit 244b65dbfede788f2fa3fe2463c44d0809e97c6b ] + +A parameter set exists for WRED mode, called wred_set, to hold the same +values for qavg and qidlestart across all VQs. The WRED mode values had +been previously held in the VQ for the default DP. After these values +were moved to wred_set, the VQ for the default DP was no longer created +automatically (so that it could be omitted on purpose, to have packets +in the default DP enqueued directly to the device without using RED). + +However, gred_dump() was overlooked during that change; in WRED mode it +still reads qavg/qidlestart from the VQ for the default DP, which might +not even exist. As a result, this command sequence will cause an oops: + +tc qdisc add dev $DEV handle $HANDLE parent $PARENT gred setup \ + DPs 3 default 2 grio +tc qdisc change dev $DEV handle $HANDLE gred DP 0 prio 8 $RED_OPTIONS +tc qdisc change dev $DEV handle $HANDLE gred DP 1 prio 8 $RED_OPTIONS + +This fixes gred_dump() in WRED mode to use the values held in wred_set. + +Signed-off-by: David Ward +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/sched/sch_gred.c | 7 ++----- + 1 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c +index 6cd8ddf..e1afe0c 100644 +--- a/net/sched/sch_gred.c ++++ b/net/sched/sch_gred.c +@@ -544,11 +544,8 @@ static int gred_dump(struct Qdisc *sch, struct sk_buff *skb) + opt.packets = q->packetsin; + opt.bytesin = q->bytesin; + +- if (gred_wred_mode(table)) { +- q->parms.qidlestart = +- table->tab[table->def]->parms.qidlestart; +- q->parms.qavg = table->tab[table->def]->parms.qavg; +- } ++ if (gred_wred_mode(table)) ++ gred_load_wred_set(table, q); + + opt.qave = red_calc_qavg(&q->parms, q->parms.qavg); + +-- +1.7.7.6 + 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 @@ +From a242d0ff40b2ef87f4c23c4676441ed1c4ee20cd Mon Sep 17 00:00:00 2001 +From: Stephane Fillod +Date: Sun, 15 Apr 2012 11:38:29 +0000 +Subject: [PATCH 078/165] net: usb: smsc75xx: fix mtu + +[ Upstream commit a99ff7d0123b19ecad3b589480b6542716ab6b52 ] + +Make smsc75xx recalculate the hard_mtu after adjusting the +hard_header_len. + +Without this, usbnet adjusts the MTU down to 1492 bytes, and the host is +unable to receive standard 1500-byte frames from the device. + +Inspired by same fix on cdc_eem 78fb72f7936c01d5b426c03a691eca082b03f2b9. + +Tested on ARM/Omap3 with EVB-LAN7500-LC. + +Signed-off-by: Stephane Fillod +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/usb/smsc75xx.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c +index a5b9b12..7bd219b 100644 +--- a/drivers/net/usb/smsc75xx.c ++++ b/drivers/net/usb/smsc75xx.c +@@ -1050,6 +1050,7 @@ static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf) + dev->net->ethtool_ops = &smsc75xx_ethtool_ops; + dev->net->flags |= IFF_MULTICAST; + dev->net->hard_header_len += SMSC75XX_TX_OVERHEAD; ++ dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; + return 0; + } + +-- +1.7.7.6 + 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 @@ +From ee79f6838bd3f230ebf00849029dac3b9be112e5 Mon Sep 17 00:00:00 2001 +From: Hiroaki SHIMODA +Date: Sun, 15 Apr 2012 13:26:01 +0000 +Subject: [PATCH 079/165] dummy: Add ndo_uninit(). + +commit 890fdf2a0cb88202d1427589db2cf29c1bdd3c1d upstream. + +In register_netdevice(), when ndo_init() is successful and later +some error occurred, ndo_uninit() will be called. +So dummy deivce is desirable to implement ndo_uninit() method +to free percpu stats for this case. +And, ndo_uninit() is also called along with dev->destructor() when +device is unregistered, so in order to prevent dev->dstats from +being freed twice, dev->destructor is modified to free_netdev(). + +Signed-off-by: Hiroaki SHIMODA +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/dummy.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c +index a7c5e88..eeac9ca 100644 +--- a/drivers/net/dummy.c ++++ b/drivers/net/dummy.c +@@ -106,14 +106,14 @@ static int dummy_dev_init(struct net_device *dev) + return 0; + } + +-static void dummy_dev_free(struct net_device *dev) ++static void dummy_dev_uninit(struct net_device *dev) + { + free_percpu(dev->dstats); +- free_netdev(dev); + } + + static const struct net_device_ops dummy_netdev_ops = { + .ndo_init = dummy_dev_init, ++ .ndo_uninit = dummy_dev_uninit, + .ndo_start_xmit = dummy_xmit, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_rx_mode = set_multicast_list, +@@ -127,7 +127,7 @@ static void dummy_setup(struct net_device *dev) + + /* Initialize the device structure. */ + dev->netdev_ops = &dummy_netdev_ops; +- dev->destructor = dummy_dev_free; ++ dev->destructor = free_netdev; + + /* Fill in device structure with ethernet-generic values. */ + dev->tx_queue_len = 0; +-- +1.7.7.6 + 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 @@ +From 57c5b1028d7bffa4d7784dd4bd8743710dc62d0c Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Mon, 16 Apr 2012 23:28:07 +0000 +Subject: [PATCH 080/165] tcp: fix tcp_grow_window() for large incoming frames + +[ Upstream commit 4d846f02392a710f9604892ac3329e628e60a230 ] + +tcp_grow_window() has to grow rcv_ssthresh up to window_clamp, allowing +sender to increase its window. + +tcp_grow_window() still assumes a tcp frame is under MSS, but its no +longer true with LRO/GRO. + +This patch fixes one of the performance issue we noticed with GRO on. + +Signed-off-by: Eric Dumazet +Cc: Neal Cardwell +Cc: Tom Herbert +Acked-by: Neal Cardwell +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/ipv4/tcp_input.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c +index 4c46fa7..daedc07 100644 +--- a/net/ipv4/tcp_input.c ++++ b/net/ipv4/tcp_input.c +@@ -334,6 +334,7 @@ static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) + incr = __tcp_grow_window(sk, skb); + + if (incr) { ++ incr = max_t(int, incr, 2 * skb->len); + tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, + tp->window_clamp); + inet_csk(sk)->icsk_ack.quick |= 1; +-- +1.7.7.6 + 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 @@ +From 4637103c9e0f2f7cef243c369f6b451550a4944d Mon Sep 17 00:00:00 2001 +From: Julian Anastasov +Date: Mon, 16 Apr 2012 04:43:15 +0000 +Subject: [PATCH 081/165] netns: do not leak net_generic data on failed init + +[ Upstream commit b922934d017f1cc831b017913ed7d1a56c558b43 ] + +ops_init should free the net_generic data on +init failure and __register_pernet_operations should not +call ops_free when NET_NS is not enabled. + +Signed-off-by: Julian Anastasov +Reviewed-by: "Eric W. Biederman" +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/core/net_namespace.c | 33 ++++++++++++++++++--------------- + 1 files changed, 18 insertions(+), 15 deletions(-) + +diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c +index 0e950fd..31a5ae5 100644 +--- a/net/core/net_namespace.c ++++ b/net/core/net_namespace.c +@@ -83,21 +83,29 @@ assign: + + static int ops_init(const struct pernet_operations *ops, struct net *net) + { +- int err; ++ int err = -ENOMEM; ++ void *data = NULL; ++ + if (ops->id && ops->size) { +- void *data = kzalloc(ops->size, GFP_KERNEL); ++ data = kzalloc(ops->size, GFP_KERNEL); + if (!data) +- return -ENOMEM; ++ goto out; + + err = net_assign_generic(net, *ops->id, data); +- if (err) { +- kfree(data); +- return err; +- } ++ if (err) ++ goto cleanup; + } ++ err = 0; + if (ops->init) +- return ops->init(net); +- return 0; ++ err = ops->init(net); ++ if (!err) ++ return 0; ++ ++cleanup: ++ kfree(data); ++ ++out: ++ return err; + } + + static void ops_free(const struct pernet_operations *ops, struct net *net) +@@ -448,12 +456,7 @@ static void __unregister_pernet_operations(struct pernet_operations *ops) + static int __register_pernet_operations(struct list_head *list, + struct pernet_operations *ops) + { +- int err = 0; +- err = ops_init(ops, &init_net); +- if (err) +- ops_free(ops, &init_net); +- return err; +- ++ return ops_init(ops, &init_net); + } + + static void __unregister_pernet_operations(struct pernet_operations *ops) +-- +1.7.7.6 + 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 @@ +From 921c1088587031a14b41d53e69c15ea76d4124ce Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 19 Apr 2012 10:00:19 +0300 +Subject: [PATCH 082/165] ksz884x: don't copy too much in + netdev_set_mac_address() + +[ Upstream commit 716af4abd6e6370226f567af50bfaca274515980 ] + +MAX_ADDR_LEN is 32. ETH_ALEN is 6. mac->sa_data is a 14 byte array, so +the memcpy() is doing a read past the end of the array. I asked about +this on netdev and Ben Hutchings told me it's supposed to be copying +ETH_ALEN bytes (thanks Ben). + +Signed-off-by: Dan Carpenter +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/micrel/ksz884x.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c +index 7ece990..4b9f4bd 100644 +--- a/drivers/net/ethernet/micrel/ksz884x.c ++++ b/drivers/net/ethernet/micrel/ksz884x.c +@@ -5679,7 +5679,7 @@ static int netdev_set_mac_address(struct net_device *dev, void *addr) + memcpy(hw->override_addr, mac->sa_data, MAC_ADDR_LEN); + } + +- memcpy(dev->dev_addr, mac->sa_data, MAX_ADDR_LEN); ++ memcpy(dev->dev_addr, mac->sa_data, ETH_ALEN); + + interrupt = hw_block_intr(hw); + +-- +1.7.7.6 + 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 @@ +From 5d2236761edc280d899b5721a6aa29d2cd1d1718 Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Wed, 18 Apr 2012 16:11:23 +0000 +Subject: [PATCH 083/165] net ax25: Reorder ax25_exit to remove races. + +[ Upstream commit 3adadc08cc1e2cbcc15a640d639297ef5fcb17f5 ] + +While reviewing the sysctl code in ax25 I spotted races in ax25_exit +where it is possible to receive notifications and packets after already +freeing up some of the data structures needed to process those +notifications and updates. + +Call unregister_netdevice_notifier early so that the rest of the cleanup +code does not need to deal with network devices. This takes advantage +of my recent enhancement to unregister_netdevice_notifier to send +unregister notifications of all network devices that are current +registered. + +Move the unregistration for packet types, socket types and protocol +types before we cleanup any of the ax25 data structures to remove the +possibilities of other races. + +Signed-off-by: Eric W. Biederman +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/ax25/af_ax25.c | 9 +++++---- + 1 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c +index e7c69f4..b04a6ef 100644 +--- a/net/ax25/af_ax25.c ++++ b/net/ax25/af_ax25.c +@@ -2006,16 +2006,17 @@ static void __exit ax25_exit(void) + proc_net_remove(&init_net, "ax25_route"); + proc_net_remove(&init_net, "ax25"); + proc_net_remove(&init_net, "ax25_calls"); +- ax25_rt_free(); +- ax25_uid_free(); +- ax25_dev_free(); + +- ax25_unregister_sysctl(); + unregister_netdevice_notifier(&ax25_dev_notifier); ++ ax25_unregister_sysctl(); + + dev_remove_pack(&ax25_packet_type); + + sock_unregister(PF_AX25); + proto_unregister(&ax25_proto); ++ ++ ax25_rt_free(); ++ ax25_uid_free(); ++ ax25_dev_free(); + } + module_exit(ax25_exit); +-- +1.7.7.6 + 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 @@ +From 0f6ddd1f2a2e87994e797d2877e7270cfc7ec03c Mon Sep 17 00:00:00 2001 +From: Neal Cardwell +Date: Sun, 22 Apr 2012 09:45:47 +0000 +Subject: [PATCH 084/165] tcp: fix TCP_MAXSEG for established IPv6 passive + sockets + +[ Upstream commit d135c522f1234f62e81be29cebdf59e9955139ad ] + +Commit f5fff5d forgot to fix TCP_MAXSEG behavior IPv6 sockets, so IPv6 +TCP server sockets that used TCP_MAXSEG would find that the advmss of +child sockets would be incorrect. This commit mirrors the advmss logic +from tcp_v4_syn_recv_sock in tcp_v6_syn_recv_sock. Eventually this +logic should probably be shared between IPv4 and IPv6, but this at +least fixes this issue. + +Signed-off-by: Neal Cardwell +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/ipv6/tcp_ipv6.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c +index b859e4a..4a56574 100644 +--- a/net/ipv6/tcp_ipv6.c ++++ b/net/ipv6/tcp_ipv6.c +@@ -1494,6 +1494,10 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, + tcp_mtup_init(newsk); + tcp_sync_mss(newsk, dst_mtu(dst)); + newtp->advmss = dst_metric_advmss(dst); ++ if (tcp_sk(sk)->rx_opt.user_mss && ++ tcp_sk(sk)->rx_opt.user_mss < newtp->advmss) ++ newtp->advmss = tcp_sk(sk)->rx_opt.user_mss; ++ + tcp_initialize_rcv_mss(newsk); + if (tcp_rsk(req)->snt_synack) + tcp_valid_rtt_meas(newsk, +-- +1.7.7.6 + 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 @@ +From 5d341b71950df3cbd21a7abf61ab903aac90531b Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Sat, 3 Sep 2011 01:09:43 +0200 +Subject: [PATCH 085/165] nfs: Enclose hostname in brackets when needed in + nfs_do_root_mount + +commit 98a2139f4f4d7b5fcc3a54c7fddbe88612abed20 upstream. + +When hostname contains colon (e.g. when it is an IPv6 address) it needs +to be enclosed in brackets to make parsing of NFS device string possible. +Fix nfs_do_root_mount() to enclose hostname properly when needed. NFS code +actually does not need this as it does not parse the string passed by +nfs_do_root_mount() but the device string is exposed to userspace in +/proc/mounts. + +CC: Josh Boyer +CC: Trond Myklebust +Signed-off-by: Jan Kara +Signed-off-by: Trond Myklebust +Signed-off-by: Ben Hutchings +--- + fs/nfs/super.c | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/fs/nfs/super.c b/fs/nfs/super.c +index 3ada13c..376cd65 100644 +--- a/fs/nfs/super.c ++++ b/fs/nfs/super.c +@@ -2708,11 +2708,15 @@ static struct vfsmount *nfs_do_root_mount(struct file_system_type *fs_type, + char *root_devname; + size_t len; + +- len = strlen(hostname) + 3; ++ len = strlen(hostname) + 5; + root_devname = kmalloc(len, GFP_KERNEL); + if (root_devname == NULL) + return ERR_PTR(-ENOMEM); +- snprintf(root_devname, len, "%s:/", hostname); ++ /* Does hostname needs to be enclosed in brackets? */ ++ if (strchr(hostname, ':')) ++ snprintf(root_devname, len, "[%s]:/", hostname); ++ else ++ snprintf(root_devname, len, "%s:/", hostname); + root_mnt = vfs_kern_mount(fs_type, flags, root_devname, data); + kfree(root_devname); + return root_mnt; +-- +1.7.7.6 + 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 @@ +From 4fd3b67b3816e020c889f75e986ba290110c3224 Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Wed, 18 Apr 2012 12:20:10 -0400 +Subject: [PATCH 086/165] NFSv4: Ensure that the LOCK code sets + exception->inode + +commit 05ffe24f5290dc095f98fbaf84afe51ef404ccc5 upstream. + +All callers of nfs4_handle_exception() that need to handle +NFS4ERR_OPENMODE correctly should set exception->inode + +Signed-off-by: Trond Myklebust +Signed-off-by: Ben Hutchings +--- + fs/nfs/nfs4proc.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c +index 757293b..57f9971 100644 +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -4453,7 +4453,9 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f + static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request) + { + struct nfs_server *server = NFS_SERVER(state->inode); +- struct nfs4_exception exception = { }; ++ struct nfs4_exception exception = { ++ .inode = state->inode, ++ }; + int err; + + do { +@@ -4471,7 +4473,9 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request + static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request) + { + struct nfs_server *server = NFS_SERVER(state->inode); +- struct nfs4_exception exception = { }; ++ struct nfs4_exception exception = { ++ .inode = state->inode, ++ }; + int err; + + err = nfs4_set_lock_state(state, request); +@@ -4551,6 +4555,7 @@ static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock * + { + struct nfs4_exception exception = { + .state = state, ++ .inode = state->inode, + }; + int err; + +-- +1.7.7.6 + 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 @@ +From 2057efde24445d1ca4d192617bf7d5f4fe0f38ce Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Wed, 18 Apr 2012 12:48:35 -0400 +Subject: [PATCH 087/165] NFSv4: Ensure that we check lock exclusive/shared + type against open modes + +commit 55725513b5ef9d462aa3e18527658a0362aaae83 upstream. + +Since we may be simulating flock() locks using NFS byte range locks, +we can't rely on the VFS having checked the file open mode for us. + +Signed-off-by: Trond Myklebust +Signed-off-by: Ben Hutchings +--- + fs/nfs/nfs4proc.c | 14 ++++++++++++++ + 1 files changed, 14 insertions(+), 0 deletions(-) + +diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c +index 57f9971..51f6a40 100644 +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -4601,6 +4601,20 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request) + + if (state == NULL) + return -ENOLCK; ++ /* ++ * Don't rely on the VFS having checked the file open mode, ++ * since it won't do this for flock() locks. ++ */ ++ switch (request->fl_type & (F_RDLCK|F_WRLCK|F_UNLCK)) { ++ case F_RDLCK: ++ if (!(filp->f_mode & FMODE_READ)) ++ return -EBADF; ++ break; ++ case F_WRLCK: ++ if (!(filp->f_mode & FMODE_WRITE)) ++ return -EBADF; ++ } ++ + do { + status = nfs4_proc_setlk(state, cmd, request); + if ((status != -EAGAIN) || IS_SETLK(cmd)) +-- +1.7.7.6 + 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 @@ +From 24f8b6b7ed6a71c4bb6b7c586a1cfa9d70e9775e Mon Sep 17 00:00:00 2001 +From: Fred Isaman +Date: Fri, 20 Apr 2012 14:47:34 -0400 +Subject: [PATCH 088/165] NFS: put open context on error in nfs_pagein_multi + +commit 73fb7bc7c57d971b11f2e00536ac2d3e316e0609 upstream. + +Signed-off-by: Fred Isaman +Signed-off-by: Trond Myklebust +Signed-off-by: Ben Hutchings +--- + fs/nfs/read.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fs/nfs/read.c b/fs/nfs/read.c +index cfa175c..41bae32 100644 +--- a/fs/nfs/read.c ++++ b/fs/nfs/read.c +@@ -324,7 +324,7 @@ out_bad: + while (!list_empty(res)) { + data = list_entry(res->next, struct nfs_read_data, list); + list_del(&data->list); +- nfs_readdata_free(data); ++ nfs_readdata_release(data); + } + nfs_readpage_release(req); + return -ENOMEM; +-- +1.7.7.6 + 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 @@ +From dbef91f49d543a546ee1cbe3e839c97c69486744 Mon Sep 17 00:00:00 2001 +From: Fred Isaman +Date: Fri, 20 Apr 2012 14:47:35 -0400 +Subject: [PATCH 089/165] NFS: put open context on error in nfs_flush_multi + +commit 8ccd271f7a3a846ce6f85ead0760d9d12994a611 upstream. + +Signed-off-by: Fred Isaman +Signed-off-by: Trond Myklebust +Signed-off-by: Ben Hutchings +--- + fs/nfs/write.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fs/nfs/write.c b/fs/nfs/write.c +index 1dda78d..4efd421 100644 +--- a/fs/nfs/write.c ++++ b/fs/nfs/write.c +@@ -974,7 +974,7 @@ out_bad: + while (!list_empty(res)) { + data = list_entry(res->next, struct nfs_write_data, list); + list_del(&data->list); +- nfs_writedata_free(data); ++ nfs_writedata_release(data); + } + nfs_redirty_request(req); + return -ENOMEM; +-- +1.7.7.6 + 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 @@ +From e7e6ba91db68ef0028d61a2bf8b9f3965595b944 Mon Sep 17 00:00:00 2001 +From: Andreas Herrmann +Date: Thu, 12 Apr 2012 16:48:01 +0200 +Subject: [PATCH 090/165] x86, microcode: Fix sysfs warning during module + unload on unsupported CPUs + +commit a956bd6f8583326b18348ab1452b4686778f785d upstream. + +Loading the microcode driver on an unsupported CPU and subsequently +unloading the driver causes + + WARNING: at fs/sysfs/group.c:138 mc_device_remove+0x5f/0x70 [microcode]() + Hardware name: 01972NG + sysfs group ffffffffa00013d0 not found for kobject 'cpu0' + 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] + Pid: 4560, comm: modprobe Not tainted 3.4.0-rc2-00002-g258f742 #5 + Call Trace: + [] ? warn_slowpath_common+0x7b/0xc0 + [] ? warn_slowpath_fmt+0x45/0x50 + [] ? sysfs_remove_group+0x34/0x120 + [] ? mc_device_remove+0x5f/0x70 [microcode] + [] ? subsys_interface_unregister+0x69/0xa0 + [] ? mutex_lock+0x16/0x40 + [] ? microcode_exit+0x50/0x92 [microcode] + [] ? sys_delete_module+0x16d/0x260 + [] ? wait_iff_congested+0x45/0x110 + [] ? page_fault+0x1f/0x30 + [] ? system_call_fastpath+0x16/0x1b + +on recent kernels. + +This is due to commit 8a25a2fd126c ("cpu: convert 'cpu' and +'machinecheck' sysdev_class to a regular subsystem") which renders +commit 6c53cbfced04 ("x86, microcode: Correct sysdev_add error path") +useless. + +See http://marc.info/?l=linux-kernel&m=133416246406478 + +Avoid above warning by restoring the old driver behaviour before +6c53cbfced04 ("x86, microcode: Correct sysdev_add error path"). + +Cc: Tigran Aivazian +Signed-off-by: Andreas Herrmann +Acked-by: Greg Kroah-Hartman +Link: http://lkml.kernel.org/r/20120411163849.GE4794@alberich.amd.com +Signed-off-by: Borislav Petkov +[bwh: Backported to 3.2: deleted line uses sys_dev, not dev] +Signed-off-by: Ben Hutchings +--- + arch/x86/kernel/microcode_core.c | 4 +--- + 1 files changed, 1 insertions(+), 3 deletions(-) + +diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c +index 9d46f5e..563a09d 100644 +--- a/arch/x86/kernel/microcode_core.c ++++ b/arch/x86/kernel/microcode_core.c +@@ -418,10 +418,8 @@ static int mc_sysdev_add(struct sys_device *sys_dev) + if (err) + return err; + +- if (microcode_init_cpu(cpu) == UCODE_ERROR) { +- sysfs_remove_group(&sys_dev->kobj, &mc_attr_group); ++ if (microcode_init_cpu(cpu) == UCODE_ERROR) + return -EINVAL; +- } + + return err; + } +-- +1.7.7.6 + 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 @@ +From 46ed52ce8ccfe7b4b4edf99fb0aeed2fbf817727 Mon Sep 17 00:00:00 2001 +From: Bryan O'Donoghue +Date: Wed, 18 Apr 2012 17:37:39 +0100 +Subject: [PATCH 091/165] x86, apic: APIC code touches invalid MSR on P5 class + machines + +commit cbf2829b61c136edcba302a5e1b6b40e97d32c00 upstream. + +Current APIC code assumes MSR_IA32_APICBASE is present for all systems. +Pentium Classic P5 and friends didn't have this MSR. MSR_IA32_APICBASE +was introduced as an architectural MSR by Intel @ P6. + +Code paths that can touch this MSR invalidly are when vendor == Intel && +cpu-family == 5 and APIC bit is set in CPUID - or when you simply pass +lapic on the kernel command line, on a P5. + +The below patch stops Linux incorrectly interfering with the +MSR_IA32_APICBASE for P5 class machines. Other code paths exist that +touch the MSR - however those paths are not currently reachable for a +conformant P5. + +Signed-off-by: Bryan O'Donoghue +Link: http://lkml.kernel.org/r/4F8EEDD3.1080404@linux.intel.com +Signed-off-by: H. Peter Anvin +Signed-off-by: Ben Hutchings +--- + arch/x86/kernel/apic/apic.c | 34 ++++++++++++++++++++-------------- + 1 files changed, 20 insertions(+), 14 deletions(-) + +diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c +index f98d84c..c4e3581 100644 +--- a/arch/x86/kernel/apic/apic.c ++++ b/arch/x86/kernel/apic/apic.c +@@ -1577,9 +1577,11 @@ static int __init apic_verify(void) + mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; + + /* The BIOS may have set up the APIC at some other address */ +- rdmsr(MSR_IA32_APICBASE, l, h); +- if (l & MSR_IA32_APICBASE_ENABLE) +- mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; ++ if (boot_cpu_data.x86 >= 6) { ++ rdmsr(MSR_IA32_APICBASE, l, h); ++ if (l & MSR_IA32_APICBASE_ENABLE) ++ mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; ++ } + + pr_info("Found and enabled local APIC!\n"); + return 0; +@@ -1597,13 +1599,15 @@ int __init apic_force_enable(unsigned long addr) + * MSR. This can only be done in software for Intel P6 or later + * and AMD K7 (Model > 1) or later. + */ +- rdmsr(MSR_IA32_APICBASE, l, h); +- if (!(l & MSR_IA32_APICBASE_ENABLE)) { +- pr_info("Local APIC disabled by BIOS -- reenabling.\n"); +- l &= ~MSR_IA32_APICBASE_BASE; +- l |= MSR_IA32_APICBASE_ENABLE | addr; +- wrmsr(MSR_IA32_APICBASE, l, h); +- enabled_via_apicbase = 1; ++ if (boot_cpu_data.x86 >= 6) { ++ rdmsr(MSR_IA32_APICBASE, l, h); ++ if (!(l & MSR_IA32_APICBASE_ENABLE)) { ++ pr_info("Local APIC disabled by BIOS -- reenabling.\n"); ++ l &= ~MSR_IA32_APICBASE_BASE; ++ l |= MSR_IA32_APICBASE_ENABLE | addr; ++ wrmsr(MSR_IA32_APICBASE, l, h); ++ enabled_via_apicbase = 1; ++ } + } + return apic_verify(); + } +@@ -2149,10 +2153,12 @@ static void lapic_resume(void) + * FIXME! This will be wrong if we ever support suspend on + * SMP! We'll need to do this as part of the CPU restore! + */ +- rdmsr(MSR_IA32_APICBASE, l, h); +- l &= ~MSR_IA32_APICBASE_BASE; +- l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; +- wrmsr(MSR_IA32_APICBASE, l, h); ++ if (boot_cpu_data.x86 >= 6) { ++ rdmsr(MSR_IA32_APICBASE, l, h); ++ l &= ~MSR_IA32_APICBASE_BASE; ++ l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; ++ wrmsr(MSR_IA32_APICBASE, l, h); ++ } + } + + maxlvt = lapic_get_maxlvt(); +-- +1.7.7.6 + 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 @@ +From 57ae2e2d36a3b53fa55c4e1e6cf073f566921c40 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Sat, 28 Apr 2012 08:29:56 -0700 +Subject: [PATCH 092/165] Revert "autofs: work around unhappy compat problem + on x86-64" + +commit fcbf94b9dedd2ce08e798a99aafc94fec8668161 upstream. + +This reverts commit a32744d4abae24572eff7269bc17895c41bd0085. + +While that commit was technically the right thing to do, and made the +x86-64 compat mode work identically to native 32-bit mode (and thus +fixing the problem with a 32-bit systemd install on a 64-bit kernel), it +turns out that the automount binaries had workarounds for this compat +problem. + +Now, the workarounds are disgusting: doing an "uname()" to find out the +architecture of the kernel, and then comparing it for the 64-bit cases +and fixing up the size of the read() in automount for those. And they +were confused: it's not actually a generic 64-bit issue at all, it's +very much tied to just x86-64, which has different alignment for an +'u64' in 64-bit mode than in 32-bit mode. + +But the end result is that fixing the compat layer actually breaks the +case of a 32-bit automount on a x86-64 kernel. + +There are various approaches to fix this (including just doing a +"strcmp()" on current->comm and comparing it to "automount"), but I +think that I will do the one that teaches pipes about a special "packet +mode", which will allow user space to not have to care too deeply about +the padding at the end of the autofs packet. + +That change will make the compat workaround unnecessary, so let's revert +it first, and get automount working again in compat mode. The +packetized pipes will then fix autofs for systemd. + +Reported-and-requested-by: Michael Tokarev +Cc: Ian Kent +Signed-off-by: Linus Torvalds +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + fs/autofs4/autofs_i.h | 1 - + fs/autofs4/dev-ioctl.c | 1 - + fs/autofs4/inode.c | 2 -- + fs/autofs4/waitq.c | 22 +++------------------- + 4 files changed, 3 insertions(+), 23 deletions(-) + +diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h +index 308a98b..326dc08 100644 +--- a/fs/autofs4/autofs_i.h ++++ b/fs/autofs4/autofs_i.h +@@ -110,7 +110,6 @@ struct autofs_sb_info { + int sub_version; + int min_proto; + int max_proto; +- int compat_daemon; + unsigned long exp_timeout; + unsigned int type; + int reghost_enabled; +diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c +index 56bac70..509fe1e 100644 +--- a/fs/autofs4/dev-ioctl.c ++++ b/fs/autofs4/dev-ioctl.c +@@ -385,7 +385,6 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, + sbi->pipefd = pipefd; + sbi->pipe = pipe; + sbi->catatonic = 0; +- sbi->compat_daemon = is_compat_task(); + } + out: + mutex_unlock(&sbi->wq_mutex); +diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c +index 98a5695..8179f1a 100644 +--- a/fs/autofs4/inode.c ++++ b/fs/autofs4/inode.c +@@ -19,7 +19,6 @@ + #include + #include + #include +-#include + #include "autofs_i.h" + #include + +@@ -225,7 +224,6 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) + set_autofs_type_indirect(&sbi->type); + sbi->min_proto = 0; + sbi->max_proto = 0; +- sbi->compat_daemon = is_compat_task(); + mutex_init(&sbi->wq_mutex); + spin_lock_init(&sbi->fs_lock); + sbi->queues = NULL; +diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c +index 6861f61..e1fbdee 100644 +--- a/fs/autofs4/waitq.c ++++ b/fs/autofs4/waitq.c +@@ -90,24 +90,7 @@ static int autofs4_write(struct file *file, const void *addr, int bytes) + + return (bytes > 0); + } +- +-/* +- * The autofs_v5 packet was misdesigned. +- * +- * The packets are identical on x86-32 and x86-64, but have different +- * alignment. Which means that 'sizeof()' will give different results. +- * Fix it up for the case of running 32-bit user mode on a 64-bit kernel. +- */ +-static noinline size_t autofs_v5_packet_size(struct autofs_sb_info *sbi) +-{ +- size_t pktsz = sizeof(struct autofs_v5_packet); +-#if defined(CONFIG_X86_64) && defined(CONFIG_COMPAT) +- if (sbi->compat_daemon > 0) +- pktsz -= 4; +-#endif +- return pktsz; +-} +- ++ + static void autofs4_notify_daemon(struct autofs_sb_info *sbi, + struct autofs_wait_queue *wq, + int type) +@@ -164,7 +147,8 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi, + { + struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet; + +- pktsz = autofs_v5_packet_size(sbi); ++ pktsz = sizeof(*packet); ++ + packet->wait_queue_token = wq->wait_queue_token; + packet->len = wq->name.len; + memcpy(packet->name, wq->name.name, wq->name.len); +-- +1.7.7.6 + 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 @@ +From d989ae8669c297a7873a9b5c7e406bc467323388 Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Thu, 26 Apr 2012 19:44:06 +0100 +Subject: [PATCH 093/165] xen: correctly check for pending events when + restoring irq flags + +commit 7eb7ce4d2e8991aff4ecb71a81949a907ca755ac upstream. + +In xen_restore_fl_direct(), xen_force_evtchn_callback() was being +called even if no events were pending. This resulted in (depending on +workload) about a 100 times as many xen_version hypercalls as +necessary. + +Fix this by correcting the sense of the conditional jump. + +This seems to give a significant performance benefit for some +workloads. + +There is some subtle tricksy "..since the check here is trying to +check both pending and masked in a single cmpw, but I think this is +correct. It will call check_events now only when the combined +mask+pending word is 0x0001 (aka unmasked, pending)." (Ian) + +Acked-by: Ian Campbell +Signed-off-by: David Vrabel +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Ben Hutchings +--- + arch/x86/xen/xen-asm.S | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/x86/xen/xen-asm.S b/arch/x86/xen/xen-asm.S +index 79d7362..3e45aa0 100644 +--- a/arch/x86/xen/xen-asm.S ++++ b/arch/x86/xen/xen-asm.S +@@ -96,7 +96,7 @@ ENTRY(xen_restore_fl_direct) + + /* check for unmasked and pending */ + cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending +- jz 1f ++ jnz 1f + 2: call check_events + 1: + ENDPATCH(xen_restore_fl_direct) +-- +1.7.7.6 + 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 @@ +From 7e7b9fb05d7e36d2d585a422de52c3b2e3345cdf Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Thu, 26 Apr 2012 13:50:03 -0400 +Subject: [PATCH 094/165] xen/smp: Fix crash when booting with ACPI hotplug + CPUs. + +commit cf405ae612b0f7e2358db7ff594c0e94846137aa upstream. + +When we boot on a machine that can hotplug CPUs and we +are using 'dom0_max_vcpus=X' on the Xen hypervisor line +to clip the amount of CPUs available to the initial domain, +we get this: + +(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 +.. snip.. +DMI: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.99.99.x032.072520111118 07/25/2011 +.. snip. +SMP: Allowing 64 CPUs, 32 hotplug CPUs +installing Xen timer for CPU 7 +cpu 7 spinlock event irq 361 +NMI watchdog: disabled (cpu7): hardware events not enabled +Brought up 8 CPUs +.. snip.. + [acpi processor finds the CPUs are not initialized and starts calling + arch_register_cpu, which creates /sys/devices/system/cpu/cpu8/online] +CPU 8 got hotplugged +CPU 9 got hotplugged +CPU 10 got hotplugged +.. snip.. +initcall 1_acpi_battery_init_async+0x0/0x1b returned 0 after 406 usecs +calling erst_init+0x0/0x2bb @ 1 + + [and the scheduler sticks newly started tasks on the new CPUs, but + said CPUs cannot be initialized b/c the hypervisor has limited the + amount of vCPUS to 8 - as per the dom0_max_vcpus=8 flag. + The spinlock tries to kick the other CPU, but the structure for that + is not initialized and we crash.] +BUG: unable to handle kernel paging request at fffffffffffffed8 +IP: [] xen_spin_lock+0x29/0x60 +PGD 180d067 PUD 180e067 PMD 0 +Oops: 0002 [#1] SMP +CPU 7 +Modules linked in: + +Pid: 1, comm: swapper/0 Not tainted 3.4.0-rc2upstream-00001-gf5154e8 #1 Intel Corporation S2600CP/S2600CP +RIP: e030:[] [] xen_spin_lock+0x29/0x60 +RSP: e02b:ffff8801fb9b3a70 EFLAGS: 00010282 + +With this patch, we cap the amount of vCPUS that the initial domain +can run, to exactly what dom0_max_vcpus=X has specified. + +In the future, if there is a hypercall that will allow a running +domain to expand past its initial set of vCPUS, this patch should +be re-evaluated. + +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Ben Hutchings +--- + arch/x86/xen/smp.c | 15 +++++++++++++++ + 1 files changed, 15 insertions(+), 0 deletions(-) + +diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c +index 041d4fe..9a23fff 100644 +--- a/arch/x86/xen/smp.c ++++ b/arch/x86/xen/smp.c +@@ -172,6 +172,7 @@ static void __init xen_fill_possible_map(void) + static void __init xen_filter_cpu_maps(void) + { + int i, rc; ++ unsigned int subtract = 0; + + if (!xen_initial_domain()) + return; +@@ -186,8 +187,22 @@ static void __init xen_filter_cpu_maps(void) + } else { + set_cpu_possible(i, false); + set_cpu_present(i, false); ++ subtract++; + } + } ++#ifdef CONFIG_HOTPLUG_CPU ++ /* This is akin to using 'nr_cpus' on the Linux command line. ++ * Which is OK as when we use 'dom0_max_vcpus=X' we can only ++ * have up to X, while nr_cpu_ids is greater than X. This ++ * normally is not a problem, except when CPU hotplugging ++ * is involved and then there might be more than X CPUs ++ * in the guest - which will not work as there is no ++ * hypercall to expand the max number of VCPUs an already ++ * running guest has. So cap it up to X. */ ++ if (subtract) ++ nr_cpu_ids = nr_cpu_ids - subtract; ++#endif ++ + } + + static void __init xen_smp_prepare_boot_cpu(void) +-- +1.7.7.6 + 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 @@ +From 5cf5b5db94847bec15c83a7ba69697a74e5248e0 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Thu, 12 Apr 2012 17:29:36 +0100 +Subject: [PATCH 095/165] ASoC: dapm: Ensure power gets managed for line + widgets + +commit 7e1f7c8a6e517900cd84da1b8ae020f08f286c3b upstream. + +Line widgets had not been included in either the power up or power down +sequences so if a widget had an event associated with it that event would +never be run. Fix this minimally by adding them to the sequences, we +should probably be doing away with the specific widget types as they all +have the same priority anyway. + +Signed-off-by: Mark Brown +Signed-off-by: Ben Hutchings +--- + sound/soc/soc-dapm.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c +index ea909c5..90e93bf 100644 +--- a/sound/soc/soc-dapm.c ++++ b/sound/soc/soc-dapm.c +@@ -69,6 +69,7 @@ static int dapm_up_seq[] = { + [snd_soc_dapm_out_drv] = 10, + [snd_soc_dapm_hp] = 10, + [snd_soc_dapm_spk] = 10, ++ [snd_soc_dapm_line] = 10, + [snd_soc_dapm_post] = 11, + }; + +@@ -77,6 +78,7 @@ static int dapm_down_seq[] = { + [snd_soc_dapm_adc] = 1, + [snd_soc_dapm_hp] = 2, + [snd_soc_dapm_spk] = 2, ++ [snd_soc_dapm_line] = 2, + [snd_soc_dapm_out_drv] = 2, + [snd_soc_dapm_pga] = 4, + [snd_soc_dapm_mixer_named_ctl] = 5, +-- +1.7.7.6 + 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 @@ +From 18ea02a9ec95869c1210e6ea2f10dee99c36edbd Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Thu, 12 Apr 2012 19:47:11 +0100 +Subject: [PATCH 096/165] ASoC: wm8994: Improve sequencing of AIF channel + enables + +commit 1a38336b8611a04f0a624330c1f815421f4bf5f4 upstream. + +This ensures a clean startup of the channels, without this change some +use cases could result in issues in a small proportion of cases. + +Signed-off-by: Mark Brown +Signed-off-by: Ben Hutchings +--- + sound/soc/codecs/wm8994.c | 276 ++++++++++++++++++++++++++++++++++++--------- + 1 files changed, 222 insertions(+), 54 deletions(-) + +diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c +index 2f1f5f8..7806301 100644 +--- a/sound/soc/codecs/wm8994.c ++++ b/sound/soc/codecs/wm8994.c +@@ -883,61 +883,170 @@ static void wm8994_update_class_w(struct snd_soc_codec *codec) + } + } + +-static int late_enable_ev(struct snd_soc_dapm_widget *w, +- struct snd_kcontrol *kcontrol, int event) ++static int aif1clk_ev(struct snd_soc_dapm_widget *w, ++ struct snd_kcontrol *kcontrol, int event) + { + struct snd_soc_codec *codec = w->codec; +- struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); ++ struct wm8994 *control = codec->control_data; ++ int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; ++ int dac; ++ int adc; ++ int val; ++ ++ switch (control->type) { ++ case WM8994: ++ case WM8958: ++ mask |= WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA; ++ break; ++ default: ++ break; ++ } + + switch (event) { + case SND_SOC_DAPM_PRE_PMU: +- if (wm8994->aif1clk_enable) { +- snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, +- WM8994_AIF1CLK_ENA_MASK, +- WM8994_AIF1CLK_ENA); +- wm8994->aif1clk_enable = 0; +- } +- if (wm8994->aif2clk_enable) { +- snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, +- WM8994_AIF2CLK_ENA_MASK, +- WM8994_AIF2CLK_ENA); +- wm8994->aif2clk_enable = 0; +- } ++ val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1); ++ if ((val & WM8994_AIF1ADCL_SRC) && ++ (val & WM8994_AIF1ADCR_SRC)) ++ adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA; ++ else if (!(val & WM8994_AIF1ADCL_SRC) && ++ !(val & WM8994_AIF1ADCR_SRC)) ++ adc = WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA; ++ else ++ adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA | ++ WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA; ++ ++ val = snd_soc_read(codec, WM8994_AIF1_CONTROL_2); ++ if ((val & WM8994_AIF1DACL_SRC) && ++ (val & WM8994_AIF1DACR_SRC)) ++ dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA; ++ else if (!(val & WM8994_AIF1DACL_SRC) && ++ !(val & WM8994_AIF1DACR_SRC)) ++ dac = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA; ++ else ++ dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA | ++ WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA; ++ ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, ++ mask, adc); ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, ++ mask, dac); ++ snd_soc_update_bits(codec, WM8994_CLOCKING_1, ++ WM8994_AIF1DSPCLK_ENA | ++ WM8994_SYSDSPCLK_ENA, ++ WM8994_AIF1DSPCLK_ENA | ++ WM8994_SYSDSPCLK_ENA); ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, mask, ++ WM8994_AIF1ADC1R_ENA | ++ WM8994_AIF1ADC1L_ENA | ++ WM8994_AIF1ADC2R_ENA | ++ WM8994_AIF1ADC2L_ENA); ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, mask, ++ WM8994_AIF1DAC1R_ENA | ++ WM8994_AIF1DAC1L_ENA | ++ WM8994_AIF1DAC2R_ENA | ++ WM8994_AIF1DAC2L_ENA); ++ break; ++ ++ case SND_SOC_DAPM_PRE_PMD: ++ case SND_SOC_DAPM_POST_PMD: ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, ++ mask, 0); ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, ++ mask, 0); ++ ++ val = snd_soc_read(codec, WM8994_CLOCKING_1); ++ if (val & WM8994_AIF2DSPCLK_ENA) ++ val = WM8994_SYSDSPCLK_ENA; ++ else ++ val = 0; ++ snd_soc_update_bits(codec, WM8994_CLOCKING_1, ++ WM8994_SYSDSPCLK_ENA | ++ WM8994_AIF1DSPCLK_ENA, val); + break; + } + +- /* We may also have postponed startup of DSP, handle that. */ +- wm8958_aif_ev(w, kcontrol, event); +- + return 0; + } + +-static int late_disable_ev(struct snd_soc_dapm_widget *w, +- struct snd_kcontrol *kcontrol, int event) ++static int aif2clk_ev(struct snd_soc_dapm_widget *w, ++ struct snd_kcontrol *kcontrol, int event) + { + struct snd_soc_codec *codec = w->codec; +- struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); ++ int dac; ++ int adc; ++ int val; + + switch (event) { ++ case SND_SOC_DAPM_PRE_PMU: ++ val = snd_soc_read(codec, WM8994_AIF2_CONTROL_1); ++ if ((val & WM8994_AIF2ADCL_SRC) && ++ (val & WM8994_AIF2ADCR_SRC)) ++ adc = WM8994_AIF2ADCR_ENA; ++ else if (!(val & WM8994_AIF2ADCL_SRC) && ++ !(val & WM8994_AIF2ADCR_SRC)) ++ adc = WM8994_AIF2ADCL_ENA; ++ else ++ adc = WM8994_AIF2ADCL_ENA | WM8994_AIF2ADCR_ENA; ++ ++ ++ val = snd_soc_read(codec, WM8994_AIF2_CONTROL_2); ++ if ((val & WM8994_AIF2DACL_SRC) && ++ (val & WM8994_AIF2DACR_SRC)) ++ dac = WM8994_AIF2DACR_ENA; ++ else if (!(val & WM8994_AIF2DACL_SRC) && ++ !(val & WM8994_AIF2DACR_SRC)) ++ dac = WM8994_AIF2DACL_ENA; ++ else ++ dac = WM8994_AIF2DACL_ENA | WM8994_AIF2DACR_ENA; ++ ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, ++ WM8994_AIF2ADCL_ENA | ++ WM8994_AIF2ADCR_ENA, adc); ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, ++ WM8994_AIF2DACL_ENA | ++ WM8994_AIF2DACR_ENA, dac); ++ snd_soc_update_bits(codec, WM8994_CLOCKING_1, ++ WM8994_AIF2DSPCLK_ENA | ++ WM8994_SYSDSPCLK_ENA, ++ WM8994_AIF2DSPCLK_ENA | ++ WM8994_SYSDSPCLK_ENA); ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, ++ WM8994_AIF2ADCL_ENA | ++ WM8994_AIF2ADCR_ENA, ++ WM8994_AIF2ADCL_ENA | ++ WM8994_AIF2ADCR_ENA); ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, ++ WM8994_AIF2DACL_ENA | ++ WM8994_AIF2DACR_ENA, ++ WM8994_AIF2DACL_ENA | ++ WM8994_AIF2DACR_ENA); ++ break; ++ ++ case SND_SOC_DAPM_PRE_PMD: + case SND_SOC_DAPM_POST_PMD: +- if (wm8994->aif1clk_disable) { +- snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, +- WM8994_AIF1CLK_ENA_MASK, 0); +- wm8994->aif1clk_disable = 0; +- } +- if (wm8994->aif2clk_disable) { +- snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, +- WM8994_AIF2CLK_ENA_MASK, 0); +- wm8994->aif2clk_disable = 0; +- } ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, ++ WM8994_AIF2DACL_ENA | ++ WM8994_AIF2DACR_ENA, 0); ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, ++ WM8994_AIF2ADCL_ENA | ++ WM8994_AIF2ADCR_ENA, 0); ++ ++ val = snd_soc_read(codec, WM8994_CLOCKING_1); ++ if (val & WM8994_AIF1DSPCLK_ENA) ++ val = WM8994_SYSDSPCLK_ENA; ++ else ++ val = 0; ++ snd_soc_update_bits(codec, WM8994_CLOCKING_1, ++ WM8994_SYSDSPCLK_ENA | ++ WM8994_AIF2DSPCLK_ENA, val); + break; + } + + return 0; + } + +-static int aif1clk_ev(struct snd_soc_dapm_widget *w, +- struct snd_kcontrol *kcontrol, int event) ++static int aif1clk_late_ev(struct snd_soc_dapm_widget *w, ++ struct snd_kcontrol *kcontrol, int event) + { + struct snd_soc_codec *codec = w->codec; + struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); +@@ -954,8 +1063,8 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, + return 0; + } + +-static int aif2clk_ev(struct snd_soc_dapm_widget *w, +- struct snd_kcontrol *kcontrol, int event) ++static int aif2clk_late_ev(struct snd_soc_dapm_widget *w, ++ struct snd_kcontrol *kcontrol, int event) + { + struct snd_soc_codec *codec = w->codec; + struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); +@@ -972,6 +1081,63 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, + return 0; + } + ++static int late_enable_ev(struct snd_soc_dapm_widget *w, ++ struct snd_kcontrol *kcontrol, int event) ++{ ++ struct snd_soc_codec *codec = w->codec; ++ struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); ++ ++ switch (event) { ++ case SND_SOC_DAPM_PRE_PMU: ++ if (wm8994->aif1clk_enable) { ++ aif1clk_ev(w, kcontrol, event); ++ snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, ++ WM8994_AIF1CLK_ENA_MASK, ++ WM8994_AIF1CLK_ENA); ++ wm8994->aif1clk_enable = 0; ++ } ++ if (wm8994->aif2clk_enable) { ++ aif2clk_ev(w, kcontrol, event); ++ snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, ++ WM8994_AIF2CLK_ENA_MASK, ++ WM8994_AIF2CLK_ENA); ++ wm8994->aif2clk_enable = 0; ++ } ++ break; ++ } ++ ++ /* We may also have postponed startup of DSP, handle that. */ ++ wm8958_aif_ev(w, kcontrol, event); ++ ++ return 0; ++} ++ ++static int late_disable_ev(struct snd_soc_dapm_widget *w, ++ struct snd_kcontrol *kcontrol, int event) ++{ ++ struct snd_soc_codec *codec = w->codec; ++ struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); ++ ++ switch (event) { ++ case SND_SOC_DAPM_POST_PMD: ++ if (wm8994->aif1clk_disable) { ++ snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, ++ WM8994_AIF1CLK_ENA_MASK, 0); ++ aif1clk_ev(w, kcontrol, event); ++ wm8994->aif1clk_disable = 0; ++ } ++ if (wm8994->aif2clk_disable) { ++ snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, ++ WM8994_AIF2CLK_ENA_MASK, 0); ++ aif2clk_ev(w, kcontrol, event); ++ wm8994->aif2clk_disable = 0; ++ } ++ break; ++ } ++ ++ return 0; ++} ++ + static int adc_mux_ev(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) + { +@@ -1268,9 +1434,9 @@ static const struct snd_kcontrol_new aif2dacr_src_mux = + SOC_DAPM_ENUM("AIF2DACR Mux", aif2dacr_src_enum); + + static const struct snd_soc_dapm_widget wm8994_lateclk_revd_widgets[] = { +-SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_ev, ++SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_late_ev, + SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), +-SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_ev, ++SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_late_ev, + SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), + + SND_SOC_DAPM_PGA_E("Late DAC1L Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0, +@@ -1299,8 +1465,10 @@ SND_SOC_DAPM_POST("Late Disable PGA", late_disable_ev) + }; + + static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = { +-SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0), +-SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0), ++SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, aif1clk_ev, ++ SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), ++SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, aif2clk_ev, ++ SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), + SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), + SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, + left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), +@@ -1353,30 +1521,30 @@ SND_SOC_DAPM_SUPPLY("VMID", SND_SOC_NOPM, 0, 0, vmid_event, + SND_SOC_DAPM_SUPPLY("CLK_SYS", SND_SOC_NOPM, 0, 0, clk_sys_event, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), + +-SND_SOC_DAPM_SUPPLY("DSP1CLK", WM8994_CLOCKING_1, 3, 0, NULL, 0), +-SND_SOC_DAPM_SUPPLY("DSP2CLK", WM8994_CLOCKING_1, 2, 0, NULL, 0), +-SND_SOC_DAPM_SUPPLY("DSPINTCLK", WM8994_CLOCKING_1, 1, 0, NULL, 0), ++SND_SOC_DAPM_SUPPLY("DSP1CLK", SND_SOC_NOPM, 3, 0, NULL, 0), ++SND_SOC_DAPM_SUPPLY("DSP2CLK", SND_SOC_NOPM, 2, 0, NULL, 0), ++SND_SOC_DAPM_SUPPLY("DSPINTCLK", SND_SOC_NOPM, 1, 0, NULL, 0), + + SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", NULL, +- 0, WM8994_POWER_MANAGEMENT_4, 9, 0), ++ 0, SND_SOC_NOPM, 9, 0), + SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", NULL, +- 0, WM8994_POWER_MANAGEMENT_4, 8, 0), ++ 0, SND_SOC_NOPM, 8, 0), + SND_SOC_DAPM_AIF_IN_E("AIF1DAC1L", NULL, 0, +- WM8994_POWER_MANAGEMENT_5, 9, 0, wm8958_aif_ev, ++ SND_SOC_NOPM, 9, 0, wm8958_aif_ev, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), + SND_SOC_DAPM_AIF_IN_E("AIF1DAC1R", NULL, 0, +- WM8994_POWER_MANAGEMENT_5, 8, 0, wm8958_aif_ev, ++ SND_SOC_NOPM, 8, 0, wm8958_aif_ev, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), + + SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", NULL, +- 0, WM8994_POWER_MANAGEMENT_4, 11, 0), ++ 0, SND_SOC_NOPM, 11, 0), + SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", NULL, +- 0, WM8994_POWER_MANAGEMENT_4, 10, 0), ++ 0, SND_SOC_NOPM, 10, 0), + SND_SOC_DAPM_AIF_IN_E("AIF1DAC2L", NULL, 0, +- WM8994_POWER_MANAGEMENT_5, 11, 0, wm8958_aif_ev, ++ SND_SOC_NOPM, 11, 0, wm8958_aif_ev, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), + SND_SOC_DAPM_AIF_IN_E("AIF1DAC2R", NULL, 0, +- WM8994_POWER_MANAGEMENT_5, 10, 0, wm8958_aif_ev, ++ SND_SOC_NOPM, 10, 0, wm8958_aif_ev, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), + + SND_SOC_DAPM_MIXER("AIF1ADC1L Mixer", SND_SOC_NOPM, 0, 0, +@@ -1403,14 +1571,14 @@ SND_SOC_DAPM_MIXER("DAC1R Mixer", SND_SOC_NOPM, 0, 0, + dac1r_mix, ARRAY_SIZE(dac1r_mix)), + + SND_SOC_DAPM_AIF_OUT("AIF2ADCL", NULL, 0, +- WM8994_POWER_MANAGEMENT_4, 13, 0), ++ SND_SOC_NOPM, 13, 0), + SND_SOC_DAPM_AIF_OUT("AIF2ADCR", NULL, 0, +- WM8994_POWER_MANAGEMENT_4, 12, 0), ++ SND_SOC_NOPM, 12, 0), + SND_SOC_DAPM_AIF_IN_E("AIF2DACL", NULL, 0, +- WM8994_POWER_MANAGEMENT_5, 13, 0, wm8958_aif_ev, ++ SND_SOC_NOPM, 13, 0, wm8958_aif_ev, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), + SND_SOC_DAPM_AIF_IN_E("AIF2DACR", NULL, 0, +- WM8994_POWER_MANAGEMENT_5, 12, 0, wm8958_aif_ev, ++ SND_SOC_NOPM, 12, 0, wm8958_aif_ev, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), + + SND_SOC_DAPM_AIF_IN("AIF1DACDAT", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0), +-- +1.7.7.6 + 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 @@ +From 461507ae293668a6dd1543092d2506fa4524d8ec Mon Sep 17 00:00:00 2001 +From: Nicolas Ferre +Date: Mon, 16 Apr 2012 14:46:30 +0200 +Subject: [PATCH 097/165] dmaengine: at_hdmac: remove clear-on-read in + atc_dostart() + +commit ed8b0d67f33518a16c6b2450fe5ebebf180c2d04 upstream. + +This loop on EBCISR register was designed to clear IRQ sources before enabling +a DMA channel. This register is clear-on-read so a race condition can appear if +another channel is already active and has just finished its transfer. +Removing this read on EBCISR is fixing the issue as there is no case where an IRQ +could be pending: we already make sure that this register is drained at probe() +time and during resume. + +Signed-off-by: Nicolas Ferre +Signed-off-by: Vinod Koul +Signed-off-by: Ben Hutchings +--- + drivers/dma/at_hdmac.c | 4 ---- + 1 files changed, 0 insertions(+), 4 deletions(-) + +diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c +index a60adbf..79dcf6e 100644 +--- a/drivers/dma/at_hdmac.c ++++ b/drivers/dma/at_hdmac.c +@@ -239,10 +239,6 @@ static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first) + + vdbg_dump_regs(atchan); + +- /* clear any pending interrupt */ +- while (dma_readl(atdma, EBCISR)) +- cpu_relax(); +- + channel_writel(atchan, SADDR, 0); + channel_writel(atchan, DADDR, 0); + channel_writel(atchan, CTRLA, 0); +-- +1.7.7.6 + 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 @@ +From 9568d8a7012a9ca0fafc44570e46030d60f22a91 Mon Sep 17 00:00:00 2001 +From: "he, bo" +Date: Wed, 25 Apr 2012 19:59:21 +0800 +Subject: [PATCH 098/165] sched: Fix OOPS when build_sched_domains() percpu + allocation fails + +commit fb2cf2c660971bea0ad86a9a5c19ad39eab61344 upstream. + +Under extreme memory used up situations, percpu allocation +might fail. We hit it when system goes to suspend-to-ram, +causing a kworker panic: + + EIP: [] build_sched_domains+0x23a/0xad0 + Kernel panic - not syncing: Fatal exception + Pid: 3026, comm: kworker/u:3 + 3.0.8-137473-gf42fbef #1 + + Call Trace: + [] panic+0x66/0x16c + [...] + [] partition_sched_domains+0x287/0x4b0 + [] cpuset_update_active_cpus+0x1fe/0x210 + [] cpuset_cpu_inactive+0x1d/0x30 + [...] + +With this fix applied build_sched_domains() will return -ENOMEM and +the suspend attempt fails. + +Signed-off-by: he, bo +Reviewed-by: Zhang, Yanmin +Reviewed-by: Srivatsa S. Bhat +Signed-off-by: Peter Zijlstra +Cc: Linus Torvalds +Cc: Andrew Morton +Link: http://lkml.kernel.org/r/1335355161.5892.17.camel@hebo +[ So, we fail to deallocate a CPU because we cannot allocate RAM :-/ + I don't like that kind of sad behavior but nevertheless it should + not crash under high memory load. ] +Signed-off-by: Ingo Molnar +[bwh: Backported to 3.2: change filename] +Signed-off-by: Ben Hutchings +--- + kernel/sched.c | 22 ++++++++++++++++------ + 1 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/kernel/sched.c b/kernel/sched.c +index d6b149c..106a3b8 100644 +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -7605,16 +7605,26 @@ static void __sdt_free(const struct cpumask *cpu_map) + struct sd_data *sdd = &tl->data; + + for_each_cpu(j, cpu_map) { +- struct sched_domain *sd = *per_cpu_ptr(sdd->sd, j); +- if (sd && (sd->flags & SD_OVERLAP)) +- free_sched_groups(sd->groups, 0); +- kfree(*per_cpu_ptr(sdd->sd, j)); +- kfree(*per_cpu_ptr(sdd->sg, j)); +- kfree(*per_cpu_ptr(sdd->sgp, j)); ++ struct sched_domain *sd; ++ ++ if (sdd->sd) { ++ sd = *per_cpu_ptr(sdd->sd, j); ++ if (sd && (sd->flags & SD_OVERLAP)) ++ free_sched_groups(sd->groups, 0); ++ kfree(*per_cpu_ptr(sdd->sd, j)); ++ } ++ ++ if (sdd->sg) ++ kfree(*per_cpu_ptr(sdd->sg, j)); ++ if (sdd->sgp) ++ kfree(*per_cpu_ptr(sdd->sgp, j)); + } + free_percpu(sdd->sd); ++ sdd->sd = NULL; + free_percpu(sdd->sg); ++ sdd->sg = NULL; + free_percpu(sdd->sgp); ++ sdd->sgp = NULL; + } + } + +-- +1.7.7.6 + 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 @@ +From e2b214ae8c691f0fd7aeb572dda62401b9221ee4 Mon Sep 17 00:00:00 2001 +From: Steven Rostedt +Date: Thu, 19 Apr 2012 10:31:47 -0400 +Subject: [PATCH 099/165] tracing: Fix stacktrace of latency tracers (irqsoff + and friends) + +commit db4c75cbebd7e5910cd3bcb6790272fcc3042857 upstream. + +While debugging a latency with someone on IRC (mirage335) on #linux-rt (OFTC), +we discovered that the stacktrace output of the latency tracers +(preemptirqsoff) was empty. + +This bug was caused by the creation of the dynamic length stack trace +again (like commit 12b5da3 "tracing: Fix ent_size in trace output" was). + +This bug is caused by the latency tracers requiring the next event +to determine the time between the current event and the next. But by +grabbing the next event, the iter->ent_size is set to the next event +instead of the current one. As the stacktrace event is the last event, +this makes the ent_size zero and causes nothing to be printed for +the stack trace. The dynamic stacktrace uses the ent_size to determine +how much of the stack can be printed. The ent_size of zero means +no stack. + +The simple fix is to save the iter->ent_size before finding the next event. + +Note, mirage335 asked to remain anonymous from LKML and git, so I will +not add the Reported-by and Tested-by tags, even though he did report +the issue and tested the fix. + +Signed-off-by: Steven Rostedt +Signed-off-by: Ben Hutchings +--- + kernel/trace/trace_output.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c +index 5199930..1dcf253 100644 +--- a/kernel/trace/trace_output.c ++++ b/kernel/trace/trace_output.c +@@ -638,6 +638,8 @@ int trace_print_lat_context(struct trace_iterator *iter) + { + u64 next_ts; + int ret; ++ /* trace_find_next_entry will reset ent_size */ ++ int ent_size = iter->ent_size; + struct trace_seq *s = &iter->seq; + struct trace_entry *entry = iter->ent, + *next_entry = trace_find_next_entry(iter, NULL, +@@ -646,6 +648,9 @@ int trace_print_lat_context(struct trace_iterator *iter) + unsigned long abs_usecs = ns2usecs(iter->ts - iter->tr->time_start); + unsigned long rel_usecs; + ++ /* Restore the original ent_size */ ++ iter->ent_size = ent_size; ++ + if (!next_entry) + next_ts = iter->ts; + rel_usecs = ns2usecs(next_ts - iter->ts); +-- +1.7.7.6 + 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 @@ +From 9c1a0e414fb67307c1e9e7c7a81f5aa32fb3165d Mon Sep 17 00:00:00 2001 +From: Andre Przywara +Date: Mon, 9 Apr 2012 18:16:34 -0400 +Subject: [PATCH 100/165] hwmon: fam15h_power: fix bogus values with current + BIOSes + +commit 00250ec90963b7ef6678438888f3244985ecde14 upstream. + +Newer BKDG[1] versions recommend a different initialization value for +the running average range register in the northbridge. This improves +the power reading by avoiding counter saturations resulting in bogus +values for anything below about 80% of TDP power consumption. +Updated BIOSes will have this new value set up from the beginning, +but meanwhile we correct this value ourselves. +This needs to be done on all northbridges, even on those where the +driver itself does not register at. + +This fixes the driver on all current machines to provide proper +values for idle load. + +[1] +http://support.amd.com/us/Processor_TechDocs/42301_15h_Mod_00h-0Fh_BKDG.pdf +Chapter 3.8: D18F5xE0 Processor TDP Running Average (p. 452) + +Signed-off-by: Andre Przywara +Acked-by: Jean Delvare +[guenter.roeck@ericsson.com: Removed unnecessary return statement] +Signed-off-by: Guenter Roeck +Signed-off-by: Ben Hutchings +--- + drivers/hwmon/fam15h_power.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 files changed, 39 insertions(+), 0 deletions(-) + +diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c +index 930370d..99aaf2e 100644 +--- a/drivers/hwmon/fam15h_power.c ++++ b/drivers/hwmon/fam15h_power.c +@@ -122,6 +122,38 @@ static bool __devinit fam15h_power_is_internal_node0(struct pci_dev *f4) + return true; + } + ++/* ++ * Newer BKDG versions have an updated recommendation on how to properly ++ * initialize the running average range (was: 0xE, now: 0x9). This avoids ++ * counter saturations resulting in bogus power readings. ++ * We correct this value ourselves to cope with older BIOSes. ++ */ ++static void __devinit tweak_runavg_range(struct pci_dev *pdev) ++{ ++ u32 val; ++ const struct pci_device_id affected_device = { ++ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }; ++ ++ /* ++ * let this quirk apply only to the current version of the ++ * northbridge, since future versions may change the behavior ++ */ ++ if (!pci_match_id(&affected_device, pdev)) ++ return; ++ ++ pci_bus_read_config_dword(pdev->bus, ++ PCI_DEVFN(PCI_SLOT(pdev->devfn), 5), ++ REG_TDP_RUNNING_AVERAGE, &val); ++ if ((val & 0xf) != 0xe) ++ return; ++ ++ val &= ~0xf; ++ val |= 0x9; ++ pci_bus_write_config_dword(pdev->bus, ++ PCI_DEVFN(PCI_SLOT(pdev->devfn), 5), ++ REG_TDP_RUNNING_AVERAGE, val); ++} ++ + static void __devinit fam15h_power_init_data(struct pci_dev *f4, + struct fam15h_power_data *data) + { +@@ -155,6 +187,13 @@ static int __devinit fam15h_power_probe(struct pci_dev *pdev, + struct device *dev; + int err; + ++ /* ++ * though we ignore every other northbridge, we still have to ++ * do the tweaking on _each_ node in MCM processors as the counters ++ * are working hand-in-hand ++ */ ++ tweak_runavg_range(pdev); ++ + if (!fam15h_power_is_internal_node0(pdev)) { + err = -ENODEV; + goto exit; +-- +1.7.7.6 + 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 @@ +From 1acc2cf212b6af4889076ca69cc08f56ddb02161 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Wed, 25 Apr 2012 13:44:20 -0700 +Subject: [PATCH 101/165] hwmon: (fam15h_power) Fix pci_device_id array + +commit c3e40a9972428d6e2d8e287ed0233a57a218c30f upstream. + +pci_match_id() takes an *array* of IDs which must be properly zero- +terminated. + +Reported-by: Ben Hutchings +Signed-off-by: Guenter Roeck +Acked-by: Jean Delvare +Signed-off-by: Ben Hutchings +--- + drivers/hwmon/fam15h_power.c | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c +index 99aaf2e..9a4c3ab 100644 +--- a/drivers/hwmon/fam15h_power.c ++++ b/drivers/hwmon/fam15h_power.c +@@ -128,17 +128,20 @@ static bool __devinit fam15h_power_is_internal_node0(struct pci_dev *f4) + * counter saturations resulting in bogus power readings. + * We correct this value ourselves to cope with older BIOSes. + */ ++static DEFINE_PCI_DEVICE_TABLE(affected_device) = { ++ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, ++ { 0 } ++}; ++ + static void __devinit tweak_runavg_range(struct pci_dev *pdev) + { + u32 val; +- const struct pci_device_id affected_device = { +- PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }; + + /* + * let this quirk apply only to the current version of the + * northbridge, since future versions may change the behavior + */ +- if (!pci_match_id(&affected_device, pdev)) ++ if (!pci_match_id(affected_device, pdev)) + return; + + pci_bus_read_config_dword(pdev->bus, +-- +1.7.7.6 + 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 @@ +From d53a6237d32c4a220706555cb5ac5bfa439495fc Mon Sep 17 00:00:00 2001 +From: Martin Nyhus +Date: Thu, 15 Mar 2012 18:25:48 +0100 +Subject: [PATCH 102/165] dell-laptop: Terminate quirks list properly + +commit d62d421b071b08249361044d8e56c8b5c3ed6aa7 upstream. + +Add missing DMI_NONE entry to end of the quirks list so +dmi_check_system() won't read past the end of the list. + +Signed-off-by: Martin Nyhus +Signed-off-by: Matthew Garrett +Signed-off-by: Ben Hutchings +--- + drivers/platform/x86/dell-laptop.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c +index 92e42d4..1d3bcce 100644 +--- a/drivers/platform/x86/dell-laptop.c ++++ b/drivers/platform/x86/dell-laptop.c +@@ -211,6 +211,7 @@ static struct dmi_system_id __devinitdata dell_quirks[] = { + }, + .driver_data = &quirk_dell_vostro_v130, + }, ++ { } + }; + + static struct calling_interface_buffer *buffer; +-- +1.7.7.6 + 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 @@ +From 8c6a4eb92e96889d0a8666eb32fd43307db5e554 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 27 Apr 2012 17:18:59 -0400 +Subject: [PATCH 103/165] drm/radeon/kms: need to set up ss on DP bridges as + well + +commit 700698e7c303f5095107c62a81872c2c3dad1702 upstream. + +Makes Nutmeg DP to VGA bridges work for me. + +Fixes: +https://bugs.freedesktop.org/show_bug.cgi?id=42490 + +Noticed by Jerome Glisse (after weeks of debugging). + +Signed-off-by: Alex Deucher +Signed-off-by: Dave Airlie +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/radeon/atombios_crtc.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c +index b30081f..757c549 100644 +--- a/drivers/gpu/drm/radeon/atombios_crtc.c ++++ b/drivers/gpu/drm/radeon/atombios_crtc.c +@@ -917,8 +917,8 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode + break; + } + +- if (radeon_encoder->active_device & +- (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) { ++ if ((radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) || ++ (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE)) { + struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; + struct drm_connector *connector = + radeon_get_connector_for_encoder(encoder); +-- +1.7.7.6 + 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 @@ +From 5ac88fb769b43e9c87ffe472fa1ed93f0dd1e526 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Sun, 1 Apr 2012 19:16:18 +0200 +Subject: [PATCH 104/165] drm/i915: handle input/output sdvo timings + separately in mode_set + +commit 6651819b4b4fc3caa6964c5d825eb4bb996f3905 upstream. + +We seem to have a decent confusion between the output timings and the +input timings of the sdvo encoder. If I understand the code correctly, +we use the original mode unchanged for the output timings, safe for +the lvds case. And we should use the adjusted mode for input timings. + +Clarify the situation by adding an explicit output_dtd to the sdvo +mode_set function and streamline the code-flow by moving the input and +output mode setting in the sdvo encode together. + +Furthermore testing showed that the sdvo input timing needs the +unadjusted dotclock, the sdvo chip will automatically compute the +required pixel multiplier to get a dotclock above 100 MHz. + +Fix this up when converting a drm mode to an sdvo dtd. + +This regression was introduced in + +commit c74696b9c890074c1e1ee3d7496fc71eb3680ced +Author: Pavel Roskin +Date: Thu Sep 2 14:46:34 2010 -0400 + + i915: revert some checks added by commit 32aad86f + +particularly the following hunk: + +> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c +> b/drivers/gpu/drm/i915/intel_sdvo.c +> index 093e914..62d22ae 100644 +> --- a/drivers/gpu/drm/i915/intel_sdvo.c +> +++ b/drivers/gpu/drm/i915/intel_sdvo.c +> @@ -1122,11 +1123,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, +> +> /* We have tried to get input timing in mode_fixup, and filled into +> adjusted_mode */ +> - if (intel_sdvo->is_tv || intel_sdvo->is_lvds) { +> - intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); +> + intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); +> + if (intel_sdvo->is_tv || intel_sdvo->is_lvds) +> input_dtd.part2.sdvo_flags = intel_sdvo->sdvo_flags; +> - } else +> - intel_sdvo_get_dtd_from_mode(&input_dtd, mode); +> +> /* If it's a TV, we already set the output timing in mode_fixup. +> * Otherwise, the output timing is equal to the input timing. + +Due to questions raised in review, below a more elaborate analysis of +the bug at hand: + +Sdvo seems to have two timings, one is the output timing which will be +sent over whatever is connected on the other side of the sdvo chip (panel, +hdmi screen, tv), the other is the input timing which will be generated by +the gmch pipe. It looks like sdvo is expected to scale between the two. + +To make things slightly more complicated, we have a bunch of special +cases: +- For lvds panel we always use a fixed output timing, namely + intel_sdvo->sdvo_lvds_fixed_mode, hence that special case. +- Sdvo has an interface to generate a preferred input timing for a given + output timing. This is the confusing thing that I've tried to clear up + with the follow-on patches. +- A special requirement is that the input pixel clock needs to be between + 100MHz and 200MHz (likely to keep it within the electromechanical design + range of PCIe), 270MHz on later gen4+. Lower pixel clocks are + doubled/quadrupled. + +The thing this patch tries to fix is that the pipe needs to be +explicitly instructed to double/quadruple the pixels and needs the +correspondingly higher pixel clock, whereas the sdvo adaptor seems to +do that itself and needs the unadjusted pixel clock. For the sdvo +encode side we already set the pixel mutliplier with a different +command (0x21). + +This patch tries to fix this mess by: +- Keeping the output mode timing in the unadjusted plain mode, safe + for the lvds case. +- Storing the input timing in the adjusted_mode with the adjusted + pixel clock. This way we don't need to frob around with the core + crtc mode set code. +- Fixing up the pixelclock when constructing the sdvo dtd timing + struct. This is why the first hunk of the patch is an integral part + of the series. +- Dropping the is_tv special case because input_dtd is equivalent to + adjusted_mode after these changes. Follow-up patches clear this up + further (by simply ripping out intel_sdvo->input_dtd because it's + not needed). + +v2: Extend commit message with an in-depth bug analysis. + +Reported-and-Tested-by: Bernard Blackham +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48157 +Reviewed-by: Jesse Barnes +Signed-off-by: Daniel Vetter +[bwh: Indented the hunk quoted above so quilt doesn't try to apply it] +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/intel_sdvo.c | 34 ++++++++++++++++++---------------- + 1 files changed, 18 insertions(+), 16 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c +index e334ec3..0a877dd 100644 +--- a/drivers/gpu/drm/i915/intel_sdvo.c ++++ b/drivers/gpu/drm/i915/intel_sdvo.c +@@ -731,6 +731,7 @@ static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd, + uint16_t width, height; + uint16_t h_blank_len, h_sync_len, v_blank_len, v_sync_len; + uint16_t h_sync_offset, v_sync_offset; ++ int mode_clock; + + width = mode->crtc_hdisplay; + height = mode->crtc_vdisplay; +@@ -745,7 +746,11 @@ static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd, + h_sync_offset = mode->crtc_hsync_start - mode->crtc_hblank_start; + v_sync_offset = mode->crtc_vsync_start - mode->crtc_vblank_start; + +- dtd->part1.clock = mode->clock / 10; ++ mode_clock = mode->clock; ++ mode_clock /= intel_mode_get_pixel_multiplier(mode) ?: 1; ++ mode_clock /= 10; ++ dtd->part1.clock = mode_clock; ++ + dtd->part1.h_active = width & 0xff; + dtd->part1.h_blank = h_blank_len & 0xff; + dtd->part1.h_high = (((width >> 8) & 0xf) << 4) | +@@ -997,7 +1002,7 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, + struct intel_sdvo *intel_sdvo = to_intel_sdvo(encoder); + u32 sdvox; + struct intel_sdvo_in_out_map in_out; +- struct intel_sdvo_dtd input_dtd; ++ struct intel_sdvo_dtd input_dtd, output_dtd; + int pixel_multiplier = intel_mode_get_pixel_multiplier(adjusted_mode); + int rate; + +@@ -1022,20 +1027,13 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, + intel_sdvo->attached_output)) + return; + +- /* We have tried to get input timing in mode_fixup, and filled into +- * adjusted_mode. +- */ +- if (intel_sdvo->is_tv || intel_sdvo->is_lvds) { +- input_dtd = intel_sdvo->input_dtd; +- } else { +- /* Set the output timing to the screen */ +- if (!intel_sdvo_set_target_output(intel_sdvo, +- intel_sdvo->attached_output)) +- return; +- +- intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); +- (void) intel_sdvo_set_output_timing(intel_sdvo, &input_dtd); +- } ++ /* lvds has a special fixed output timing. */ ++ if (intel_sdvo->is_lvds) ++ intel_sdvo_get_dtd_from_mode(&output_dtd, ++ intel_sdvo->sdvo_lvds_fixed_mode); ++ else ++ intel_sdvo_get_dtd_from_mode(&output_dtd, mode); ++ (void) intel_sdvo_set_output_timing(intel_sdvo, &output_dtd); + + /* Set the input timing to the screen. Assume always input 0. */ + if (!intel_sdvo_set_target_input(intel_sdvo)) +@@ -1053,6 +1051,10 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, + !intel_sdvo_set_tv_format(intel_sdvo)) + return; + ++ /* We have tried to get input timing in mode_fixup, and filled into ++ * adjusted_mode. ++ */ ++ intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); + (void) intel_sdvo_set_input_timing(intel_sdvo, &input_dtd); + + switch (pixel_multiplier) { +-- +1.7.7.6 + 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 @@ +From c1f4cbb7a7af1e7a02e2516bd82215fd79b9edbd Mon Sep 17 00:00:00 2001 +From: Ben Widawsky +Date: Mon, 12 Dec 2011 19:21:57 -0800 +Subject: [PATCH 105/165] drm/i915: relative_constants_mode race fix + +commit e2971bdab2b761683353da383c0fd5ac704d1cca upstream. + +dev_priv keeps track of the current addressing mode that gets set at +execbuffer time. Unfortunately the existing code was doing this before +acquiring struct_mutex which leaves a race with another thread also +doing an execbuffer. If that wasn't bad enough, relocate_slow drops +struct_mutex which opens a much more likely error where another thread +comes in and modifies the state while relocate_slow is being slow. + +The solution here is to just defer setting this state until we +absolutely need it, and we know we'll have struct_mutex for the +remainder of our code path. + +v2: Keith noticed a bug in the original patch. + +Signed-off-by: Ben Widawsky +Reviewed-by: Daniel Vetter +Signed-off-by: Keith Packard +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 29 +++++++++++++++------------ + 1 files changed, 16 insertions(+), 13 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c +index b9da890..7d64f83 100644 +--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c ++++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c +@@ -1033,19 +1033,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, + if (INTEL_INFO(dev)->gen > 5 && + mode == I915_EXEC_CONSTANTS_REL_SURFACE) + return -EINVAL; +- +- ret = intel_ring_begin(ring, 4); +- if (ret) +- return ret; +- +- intel_ring_emit(ring, MI_NOOP); +- intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1)); +- intel_ring_emit(ring, INSTPM); +- intel_ring_emit(ring, +- I915_EXEC_CONSTANTS_MASK << 16 | mode); +- intel_ring_advance(ring); +- +- dev_priv->relative_constants_mode = mode; + } + break; + default: +@@ -1176,6 +1163,22 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, + } + } + ++ if (ring == &dev_priv->ring[RCS] && ++ mode != dev_priv->relative_constants_mode) { ++ ret = intel_ring_begin(ring, 4); ++ if (ret) ++ goto err; ++ ++ intel_ring_emit(ring, MI_NOOP); ++ intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1)); ++ intel_ring_emit(ring, INSTPM); ++ intel_ring_emit(ring, ++ I915_EXEC_CONSTANTS_MASK << 16 | mode); ++ intel_ring_advance(ring); ++ ++ dev_priv->relative_constants_mode = mode; ++ } ++ + trace_i915_gem_ring_dispatch(ring, seqno); + + exec_start = batch_obj->gtt_offset + args->batch_start_offset; +-- +1.7.7.6 + 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 @@ +From 04029d7c030fddf168b85e9f39f76fcc282b768b Mon Sep 17 00:00:00 2001 +From: Ben Widawsky +Date: Mon, 12 Dec 2011 19:21:58 -0800 +Subject: [PATCH 106/165] drm/i915: Force sync command ordering (Gen6+) + +commit 84f9f938be4156e4baea466688bd6abae1c9e6ba upstream. + +The docs say this is required for Gen7, and since the bit was added for +Gen6, we are also setting it there pit pf paranoia. Particularly as +Chris points out, if PIPE_CONTROL counts as a 3d state packet. + +This was found through doc inspection by Ken and applies to Gen6+; + +Reported-by: Kenneth Graunke +Signed-off-by: Ben Widawsky +Reviewed-by: Chris Wilson +Reviewed-by: Daniel Vetter +Reviewed-by: Eric Anholt +Signed-off-by: Keith Packard +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 +++++++-- + drivers/gpu/drm/i915/i915_reg.h | 1 + + drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++++ + 3 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c +index 7d64f83..ed00f29 100644 +--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c ++++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c +@@ -984,6 +984,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, + struct intel_ring_buffer *ring; + u32 exec_start, exec_len; + u32 seqno; ++ u32 mask; + int ret, mode, i; + + if (!i915_gem_check_execbuffer(args)) { +@@ -1021,6 +1022,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, + } + + mode = args->flags & I915_EXEC_CONSTANTS_MASK; ++ mask = I915_EXEC_CONSTANTS_MASK; + switch (mode) { + case I915_EXEC_CONSTANTS_REL_GENERAL: + case I915_EXEC_CONSTANTS_ABSOLUTE: +@@ -1033,6 +1035,10 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, + if (INTEL_INFO(dev)->gen > 5 && + mode == I915_EXEC_CONSTANTS_REL_SURFACE) + return -EINVAL; ++ ++ /* The HW changed the meaning on this bit on gen6 */ ++ if (INTEL_INFO(dev)->gen >= 6) ++ mask &= ~I915_EXEC_CONSTANTS_REL_SURFACE; + } + break; + default: +@@ -1172,8 +1178,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, + intel_ring_emit(ring, MI_NOOP); + intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1)); + intel_ring_emit(ring, INSTPM); +- intel_ring_emit(ring, +- I915_EXEC_CONSTANTS_MASK << 16 | mode); ++ intel_ring_emit(ring, mask << 16 | mode); + intel_ring_advance(ring); + + dev_priv->relative_constants_mode = mode; +diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h +index 2f99fd4..beca72f 100644 +--- a/drivers/gpu/drm/i915/i915_reg.h ++++ b/drivers/gpu/drm/i915/i915_reg.h +@@ -442,6 +442,7 @@ + #define INSTPM_AGPBUSY_DIS (1<<11) /* gen3: when disabled, pending interrupts + will not assert AGPBUSY# and will only + be delivered when out of C3. */ ++#define INSTPM_FORCE_ORDERING (1<<7) /* GEN6+ */ + #define ACTHD 0x020c8 + #define FW_BLC 0x020d8 + #define FW_BLC2 0x020dc +diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c +index 8673581..3c9c086 100644 +--- a/drivers/gpu/drm/i915/intel_ringbuffer.c ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c +@@ -414,6 +414,11 @@ static int init_render_ring(struct intel_ring_buffer *ring) + return ret; + } + ++ if (INTEL_INFO(dev)->gen >= 6) { ++ I915_WRITE(INSTPM, ++ INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); ++ } ++ + return ret; + } + +-- +1.7.7.6 + 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 @@ +From 623fa1ce0a50adf5f5e1133e459b5d725a378a6d Mon Sep 17 00:00:00 2001 +From: Kenneth Graunke +Date: Fri, 27 Apr 2012 12:44:41 -0700 +Subject: [PATCH 107/165] drm/i915: Set the Stencil Cache eviction policy to + non-LRA mode. + +commit 3a69ddd6f872180b6f61fda87152b37202118fbc upstream. + +Clearing bit 5 of CACHE_MODE_0 is necessary to prevent GPU hangs in +OpenGL programs such as Google MapsGL, Google Earth, and gzdoom when +using separate stencil buffers. Without it, the GPU tries to use the +LRA eviction policy, which isn't supported. This was supposed to be off +by default, but seems to be on for many machines. + +This cannot be done in gen6_init_clock_gating with most of the other +workaround bits; the render ring needs to exist. Otherwise, the +register write gets dropped on the floor (one printk will show it +changed, but a second printk immediately following shows the value +reverts to the old one). + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47535 +Cc: Rob Castle +Cc: Eric Appleman +Cc: aaron667@gmx.net +Cc: Keith Packard +Signed-off-by: Kenneth Graunke +Reviewed-by: Daniel Vetter +Acked-by: Daniel Vetter +Signed-off-by: Dave Airlie +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/i915_reg.h | 1 + + drivers/gpu/drm/i915/intel_ringbuffer.c | 8 ++++++++ + 2 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h +index beca72f..cbe5a88 100644 +--- a/drivers/gpu/drm/i915/i915_reg.h ++++ b/drivers/gpu/drm/i915/i915_reg.h +@@ -523,6 +523,7 @@ + #define CM0_MASK_SHIFT 16 + #define CM0_IZ_OPT_DISABLE (1<<6) + #define CM0_ZR_OPT_DISABLE (1<<5) ++#define CM0_STC_EVICT_DISABLE_LRA_SNB (1<<5) + #define CM0_DEPTH_EVICT_DISABLE (1<<4) + #define CM0_COLOR_EVICT_DISABLE (1<<3) + #define CM0_DEPTH_WRITE_DISABLE (1<<1) +diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c +index 3c9c086..273f403 100644 +--- a/drivers/gpu/drm/i915/intel_ringbuffer.c ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c +@@ -417,6 +417,14 @@ static int init_render_ring(struct intel_ring_buffer *ring) + if (INTEL_INFO(dev)->gen >= 6) { + I915_WRITE(INSTPM, + INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); ++ ++ /* From the Sandybridge PRM, volume 1 part 3, page 24: ++ * "If this bit is set, STCunit will have LRA as replacement ++ * policy. [...] This bit must be reset. LRA replacement ++ * policy is not supported." ++ */ ++ I915_WRITE(CACHE_MODE_0, ++ CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT); + } + + return ret; +-- +1.7.7.6 + 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 @@ +From 8f2f90a48393e092ca95f2a6e112baada0db0a3c Mon Sep 17 00:00:00 2001 +From: Xi Wang +Date: Mon, 23 Apr 2012 04:06:41 -0400 +Subject: [PATCH 108/165] drm/i915: fix integer overflow in + i915_gem_execbuffer2() + +commit ed8cd3b2cd61004cab85380c52b1817aca1ca49b upstream. + +On 32-bit systems, a large args->buffer_count from userspace via ioctl +may overflow the allocation size, leading to out-of-bounds access. + +This vulnerability was introduced in commit 8408c282 ("drm/i915: +First try a normal large kmalloc for the temporary exec buffers"). + +Signed-off-by: Xi Wang +Reviewed-by: Chris Wilson +Signed-off-by: Daniel Vetter +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c +index ed00f29..5b6fe31 100644 +--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c ++++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c +@@ -1322,7 +1322,8 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data, + struct drm_i915_gem_exec_object2 *exec2_list = NULL; + int ret; + +- if (args->buffer_count < 1) { ++ if (args->buffer_count < 1 || ++ args->buffer_count > UINT_MAX / sizeof(*exec2_list)) { + DRM_ERROR("execbuf2 with %d buffers\n", args->buffer_count); + return -EINVAL; + } +-- +1.7.7.6 + 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 @@ +From f69e43d73be5dc1a1b1550c12c06f32d7eeee9b5 Mon Sep 17 00:00:00 2001 +From: Xi Wang +Date: Mon, 23 Apr 2012 04:06:42 -0400 +Subject: [PATCH 109/165] drm/i915: fix integer overflow in + i915_gem_do_execbuffer() + +commit 44afb3a04391a74309d16180d1e4f8386fdfa745 upstream. + +On 32-bit systems, a large args->num_cliprects from userspace via ioctl +may overflow the allocation size, leading to out-of-bounds access. + +This vulnerability was introduced in commit 432e58ed ("drm/i915: Avoid +allocation for execbuffer object list"). + +Signed-off-by: Xi Wang +Reviewed-by: Chris Wilson +Signed-off-by: Daniel Vetter +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c +index 5b6fe31..a6c2f7a 100644 +--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c ++++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c +@@ -1057,6 +1057,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, + return -EINVAL; + } + ++ if (args->num_cliprects > UINT_MAX / sizeof(*cliprects)) { ++ DRM_DEBUG("execbuf with %u cliprects\n", ++ args->num_cliprects); ++ return -EINVAL; ++ } + cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects), + GFP_KERNEL); + if (cliprects == NULL) { +-- +1.7.7.6 + 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 @@ +From aed930a331278472b81fbea0dfbdbe27672d41cd Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Mon, 2 Apr 2012 10:51:55 +0200 +Subject: [PATCH 110/165] nl80211: ensure interface is up in various APIs + +commit 2b5f8b0b44e17e625cfba1e7b88db44f4dcc0441 upstream. +[backported by Ben Greear] + +The nl80211 handling code should ensure as much as +it can that the interface is in a valid state, it +can certainly ensure the interface is running. + +Not doing so can cause calls through mac80211 into +the driver that result in warnings and unspecified +behaviour in the driver. + +Reported-by: Ben Greear +Signed-off-by: Johannes Berg +Signed-off-by: John W. Linville +Signed-off-by: Ben Greear +Signed-off-by: Ben Hutchings +--- + net/wireless/nl80211.c | 29 +++++++++++++++++------------ + 1 files changed, 17 insertions(+), 12 deletions(-) + +diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c +index ffafda5..c06c365 100644 +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -1258,6 +1258,11 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) + goto bad_res; + } + ++ if (!netif_running(netdev)) { ++ result = -ENETDOWN; ++ goto bad_res; ++ } ++ + nla_for_each_nested(nl_txq_params, + info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS], + rem_txq_params) { +@@ -5944,7 +5949,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_get_key, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -5976,7 +5981,7 @@ static struct genl_ops nl80211_ops[] = { + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, + .doit = nl80211_addset_beacon, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -5984,7 +5989,7 @@ static struct genl_ops nl80211_ops[] = { + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, + .doit = nl80211_addset_beacon, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6008,7 +6013,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_set_station, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6024,7 +6029,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_del_station, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6057,7 +6062,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_del_mpath, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6065,7 +6070,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_set_bss, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6091,7 +6096,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_get_mesh_config, + .policy = nl80211_policy, + /* can be retrieved by unprivileged users */ +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6224,7 +6229,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_setdel_pmksa, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6232,7 +6237,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_setdel_pmksa, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6240,7 +6245,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_flush_pmksa, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +@@ -6328,7 +6333,7 @@ static struct genl_ops nl80211_ops[] = { + .doit = nl80211_set_wds_peer, + .policy = nl80211_policy, + .flags = GENL_ADMIN_PERM, +- .internal_flags = NL80211_FLAG_NEED_NETDEV | ++ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NEED_RTNL, + }, + { +-- +1.7.7.6 + 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 @@ +From 12bea9197ab5065d6eebf8a3746d486acc05963d Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Fri, 20 Apr 2012 10:01:46 +0200 +Subject: [PATCH 111/165] ALSA: HDA: Add external mic quirk for Asus Zenbook + UX31E + +commit 5ac57550f279c3d991ef0b398681bcaca18169f7 upstream. + +According to the reporter, external mic starts to work if the +laptop-dmic model is used. According to BIOS pin config, all +pins are consistent with the alc269vb_laptop_dmic fixup, except +for the external mic, which is not present. + +BugLink: https://bugs.launchpad.net/bugs/950490 +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index dc8a6fc..0bc5a46 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -5032,6 +5032,7 @@ static const struct alc_fixup alc269_fixups[] = { + }; + + static const struct snd_pci_quirk alc269_fixup_tbl[] = { ++ SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), + SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), + SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), + SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), +-- +1.7.7.6 + 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 @@ +From 5fe563d7ee35fedc59e2e8b230b31394aee32651 Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Thu, 26 Apr 2012 21:59:10 +0200 +Subject: [PATCH 112/165] USB: cdc-wdm: fix race leading leading to memory + corruption +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit 5c22837adca7c30b66121cf18ad3e160134268d4 upstream. + +This patch fixes a race whereby a pointer to a buffer +would be overwritten while the buffer was in use leading +to a double free and a memory leak. This causes crashes. +This bug was introduced in 2.6.34 + +Signed-off-by: Oliver Neukum +Tested-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/class/cdc-wdm.c | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c +index 9eb71d8..2db0327 100644 +--- a/drivers/usb/class/cdc-wdm.c ++++ b/drivers/usb/class/cdc-wdm.c +@@ -108,8 +108,9 @@ static void wdm_out_callback(struct urb *urb) + spin_lock(&desc->iuspin); + desc->werr = urb->status; + spin_unlock(&desc->iuspin); +- clear_bit(WDM_IN_USE, &desc->flags); + kfree(desc->outbuf); ++ desc->outbuf = NULL; ++ clear_bit(WDM_IN_USE, &desc->flags); + wake_up(&desc->wait); + } + +@@ -312,7 +313,7 @@ static ssize_t wdm_write + if (we < 0) + return -EIO; + +- desc->outbuf = buf = kmalloc(count, GFP_KERNEL); ++ buf = kmalloc(count, GFP_KERNEL); + if (!buf) { + rv = -ENOMEM; + goto outnl; +@@ -376,10 +377,12 @@ static ssize_t wdm_write + req->wIndex = desc->inum; + req->wLength = cpu_to_le16(count); + set_bit(WDM_IN_USE, &desc->flags); ++ desc->outbuf = buf; + + rv = usb_submit_urb(desc->command, GFP_KERNEL); + if (rv < 0) { + kfree(buf); ++ desc->outbuf = NULL; + clear_bit(WDM_IN_USE, &desc->flags); + dev_err(&desc->intf->dev, "Tx URB error: %d\n", rv); + } else { +-- +1.7.7.6 + 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 @@ +From 37377ccfbb44158128be2372cc9088b6c670e440 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Tue, 24 Apr 2012 14:07:22 -0400 +Subject: [PATCH 113/165] USB: EHCI: fix crash during suspend on ASUS + computers + +commit 151b61284776be2d6f02d48c23c3625678960b97 upstream. + +This patch (as1545) fixes a problem affecting several ASUS computers: +The machine crashes or corrupts memory when going into suspend if the +ehci-hcd driver is bound to any controllers. Users have been forced +to unbind or unload ehci-hcd before putting their systems to sleep. + +After extensive testing, it was determined that the machines don't +like going into suspend when any EHCI controllers are in the PCI D3 +power state. Presumably this is a firmware bug, but there's nothing +we can do about it except to avoid putting the controllers in D3 +during system sleep. + +The patch adds a new flag to indicate whether the problem is present, +and avoids changing the controller's power state if the flag is set. +Runtime suspend is unaffected; this matters only for system suspend. +However as a side effect, the controller will not respond to remote +wakeup requests while the system is asleep. Hence USB wakeup is not +functional -- but of course, this is already true in the current state +of affairs. + +This fixes Bugzilla #42728. + +Signed-off-by: Alan Stern +Tested-by: Steven Rostedt +Tested-by: Andrey Rahmatullin +Tested-by: Oleksij Rempel (fishor) +Signed-off-by: Greg Kroah-Hartman +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + drivers/usb/core/hcd-pci.c | 9 +++++++++ + drivers/usb/host/ehci-pci.c | 8 ++++++++ + include/linux/usb/hcd.h | 2 ++ + 3 files changed, 19 insertions(+), 0 deletions(-) + +diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c +index 61d08dd..5f1404a 100644 +--- a/drivers/usb/core/hcd-pci.c ++++ b/drivers/usb/core/hcd-pci.c +@@ -495,6 +495,15 @@ static int hcd_pci_suspend_noirq(struct device *dev) + + pci_save_state(pci_dev); + ++ /* ++ * Some systems crash if an EHCI controller is in D3 during ++ * a sleep transition. We have to leave such controllers in D0. ++ */ ++ if (hcd->broken_pci_sleep) { ++ dev_dbg(dev, "Staying in PCI D0\n"); ++ return retval; ++ } ++ + /* If the root hub is dead rather than suspended, disallow remote + * wakeup. usb_hc_died() should ensure that both hosts are marked as + * dying, so we only need to check the primary roothub. +diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c +index f4b627d..971d312 100644 +--- a/drivers/usb/host/ehci-pci.c ++++ b/drivers/usb/host/ehci-pci.c +@@ -144,6 +144,14 @@ static int ehci_pci_setup(struct usb_hcd *hcd) + hcd->has_tt = 1; + tdi_reset(ehci); + } ++ if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) { ++ /* EHCI #1 or #2 on 6 Series/C200 Series chipset */ ++ if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) { ++ ehci_info(ehci, "broken D3 during system sleep on ASUS\n"); ++ hcd->broken_pci_sleep = 1; ++ device_set_wakeup_capable(&pdev->dev, false); ++ } ++ } + break; + case PCI_VENDOR_ID_TDI: + if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { +diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h +index 03354d5..64cec8d 100644 +--- a/include/linux/usb/hcd.h ++++ b/include/linux/usb/hcd.h +@@ -128,6 +128,8 @@ struct usb_hcd { + unsigned wireless:1; /* Wireless USB HCD */ + unsigned authorized_default:1; + unsigned has_tt:1; /* Integrated TT in root hub */ ++ unsigned broken_pci_sleep:1; /* Don't put the ++ controller in PCI-D3 for system sleep */ + + int irq; /* irq allocated */ + void __iomem *regs; /* device memory/io */ +-- +1.7.7.6 + 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 @@ +From e2ac51161592388a8e729fda87a35c467e56eb7b Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Wed, 11 Apr 2012 16:09:10 -0400 +Subject: [PATCH 114/165] USB: gadget: storage gadgets send wrong error code + for unknown commands + +commit c85dcdac5852295cf6822f5c4331a6ddab72581f upstream. + +This patch (as1539) fixes a minor bug in the mass-storage gadget +drivers. When an unknown command is received, the error code sent +back is "Invalid Field in CDB" rather than "Invalid Command". This is +because the bitmask of CDB bytes allowed to be nonzero is incorrect. + +When handling an unknown command, we don't care which command bytes +are nonzero. All the bits in the mask should be set, not just eight +of them. + +Signed-off-by: Alan Stern +CC: +Signed-off-by: Felipe Balbi +Signed-off-by: Ben Hutchings +--- + drivers/usb/gadget/f_mass_storage.c | 2 +- + drivers/usb/gadget/file_storage.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c +index 1a6f415..a5570b6 100644 +--- a/drivers/usb/gadget/f_mass_storage.c ++++ b/drivers/usb/gadget/f_mass_storage.c +@@ -2182,7 +2182,7 @@ unknown_cmnd: + common->data_size_from_cmnd = 0; + sprintf(unknown, "Unknown x%02x", common->cmnd[0]); + reply = check_command(common, common->cmnd_size, +- DATA_DIR_UNKNOWN, 0xff, 0, unknown); ++ DATA_DIR_UNKNOWN, ~0, 0, unknown); + if (reply == 0) { + common->curlun->sense_data = SS_INVALID_COMMAND; + reply = -EINVAL; +diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c +index 17a7047..41056e2 100644 +--- a/drivers/usb/gadget/file_storage.c ++++ b/drivers/usb/gadget/file_storage.c +@@ -2569,7 +2569,7 @@ static int do_scsi_command(struct fsg_dev *fsg) + fsg->data_size_from_cmnd = 0; + sprintf(unknown, "Unknown x%02x", fsg->cmnd[0]); + if ((reply = check_command(fsg, fsg->cmnd_size, +- DATA_DIR_UNKNOWN, 0xff, 0, unknown)) == 0) { ++ DATA_DIR_UNKNOWN, ~0, 0, unknown)) == 0) { + fsg->curlun->sense_data = SS_INVALID_COMMAND; + reply = -EINVAL; + } +-- +1.7.7.6 + 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 @@ +From 19436e7f0105b1503a6c0685311c287f094f0a88 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Wed, 18 Apr 2012 13:59:30 +0300 +Subject: [PATCH 115/165] usb: gadget: dummy: do not call pullup() on + udc_stop() + +commit 15b120d67019d691e4389372967332d74a80522a upstream. + +pullup() is already called properly by udc-core.c and +there's no need to call it from udc_stop(), in fact that +will cause issues. + +Reviewed-by: Alexander Shishkin +Acked-by: Alan Stern +Signed-off-by: Felipe Balbi +Signed-off-by: Ben Hutchings +--- + drivers/usb/gadget/dummy_hcd.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c +index db815c2..9098642 100644 +--- a/drivers/usb/gadget/dummy_hcd.c ++++ b/drivers/usb/gadget/dummy_hcd.c +@@ -924,7 +924,6 @@ static int dummy_udc_stop(struct usb_gadget *g, + + dum->driver = NULL; + +- dummy_pullup(&dum->gadget, 0); + return 0; + } + +-- +1.7.7.6 + 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 @@ +From c50d42c9d902b99077153d177a0fba885220552f Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart +Date: Tue, 24 Apr 2012 11:29:42 +0200 +Subject: [PATCH 116/165] usb gadget: uvc: uvc_request_data::length field must + be signed + +commit 6f6543f53f9ce136e01d7114bf6f0818ca54fb41 upstream. + +The field is used to pass the UVC request data length, but can also be +used to signal an error when setting it to a negative value. Switch from +unsigned int to __s32. + +Reported-by: Fernandez Gonzalo +Signed-off-by: Laurent Pinchart +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/usb/gadget/uvc.h | 2 +- + drivers/usb/gadget/uvc_v4l2.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/gadget/uvc.h b/drivers/usb/gadget/uvc.h +index bc78c60..ca4e03a 100644 +--- a/drivers/usb/gadget/uvc.h ++++ b/drivers/usb/gadget/uvc.h +@@ -28,7 +28,7 @@ + + struct uvc_request_data + { +- unsigned int length; ++ __s32 length; + __u8 data[60]; + }; + +diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c +index f6e083b..54d7ca5 100644 +--- a/drivers/usb/gadget/uvc_v4l2.c ++++ b/drivers/usb/gadget/uvc_v4l2.c +@@ -39,7 +39,7 @@ uvc_send_response(struct uvc_device *uvc, struct uvc_request_data *data) + if (data->length < 0) + return usb_ep_set_halt(cdev->gadget->ep0); + +- req->length = min(uvc->event_length, data->length); ++ req->length = min_t(unsigned int, uvc->event_length, data->length); + req->zero = data->length < uvc->event_length; + req->dma = DMA_ADDR_INVALID; + +-- +1.7.7.6 + 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 @@ +From 458c33bdfc9d408f94038a4db0544ab348d0d96d Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Sun, 29 Apr 2012 13:12:42 -0700 +Subject: [PATCH 117/165] pipes: add a "packetized pipe" mode for writing + +commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d upstream. + +The actual internal pipe implementation is already really about +individual packets (called "pipe buffers"), and this simply exposes that +as a special packetized mode. + +When we are in the packetized mode (marked by O_DIRECT as suggested by +Alan Cox), a write() on a pipe will not merge the new data with previous +writes, so each write will get a pipe buffer of its own. The pipe +buffer is then marked with the PIPE_BUF_FLAG_PACKET flag, which in turn +will tell the reader side to break the read at that boundary (and throw +away any partial packet contents that do not fit in the read buffer). + +End result: as long as you do writes less than PIPE_BUF in size (so that +the pipe doesn't have to split them up), you can now treat the pipe as a +packet interface, where each read() system call will read one packet at +a time. You can just use a sufficiently big read buffer (PIPE_BUF is +sufficient, since bigger than that doesn't guarantee atomicity anyway), +and the return value of the read() will naturally give you the size of +the packet. + +NOTE! We do not support zero-sized packets, and zero-sized reads and +writes to a pipe continue to be no-ops. Also note that big packets will +currently be split at write time, but that the size at which that +happens is not really specified (except that it's bigger than PIPE_BUF). +Currently that limit is the system page size, but we might want to +explicitly support bigger packets some day. + +The main user for this is going to be the autofs packet interface, +allowing us to stop having to care so deeply about exact packet sizes +(which have had bugs with 32/64-bit compatibility modes). But user +space can create packetized pipes with "pipe2(fd, O_DIRECT)", which will +fail with an EINVAL on kernels that do not support this interface. + +Tested-by: Michael Tokarev +Cc: Alan Cox +Cc: David Miller +Cc: Ian Kent +Cc: Thomas Meyer +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + fs/pipe.c | 31 +++++++++++++++++++++++++++++-- + include/linux/pipe_fs_i.h | 1 + + 2 files changed, 30 insertions(+), 2 deletions(-) + +diff --git a/fs/pipe.c b/fs/pipe.c +index 4065f07..05ed5ca 100644 +--- a/fs/pipe.c ++++ b/fs/pipe.c +@@ -345,6 +345,16 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = { + .get = generic_pipe_buf_get, + }; + ++static const struct pipe_buf_operations packet_pipe_buf_ops = { ++ .can_merge = 0, ++ .map = generic_pipe_buf_map, ++ .unmap = generic_pipe_buf_unmap, ++ .confirm = generic_pipe_buf_confirm, ++ .release = anon_pipe_buf_release, ++ .steal = generic_pipe_buf_steal, ++ .get = generic_pipe_buf_get, ++}; ++ + static ssize_t + pipe_read(struct kiocb *iocb, const struct iovec *_iov, + unsigned long nr_segs, loff_t pos) +@@ -406,6 +416,13 @@ redo: + ret += chars; + buf->offset += chars; + buf->len -= chars; ++ ++ /* Was it a packet buffer? Clean up and exit */ ++ if (buf->flags & PIPE_BUF_FLAG_PACKET) { ++ total_len = chars; ++ buf->len = 0; ++ } ++ + if (!buf->len) { + buf->ops = NULL; + ops->release(pipe, buf); +@@ -458,6 +475,11 @@ redo: + return ret; + } + ++static inline int is_packetized(struct file *file) ++{ ++ return (file->f_flags & O_DIRECT) != 0; ++} ++ + static ssize_t + pipe_write(struct kiocb *iocb, const struct iovec *_iov, + unsigned long nr_segs, loff_t ppos) +@@ -592,6 +614,11 @@ redo2: + buf->ops = &anon_pipe_buf_ops; + buf->offset = 0; + buf->len = chars; ++ buf->flags = 0; ++ if (is_packetized(filp)) { ++ buf->ops = &packet_pipe_buf_ops; ++ buf->flags = PIPE_BUF_FLAG_PACKET; ++ } + pipe->nrbufs = ++bufs; + pipe->tmp_page = NULL; + +@@ -1012,7 +1039,7 @@ struct file *create_write_pipe(int flags) + goto err_dentry; + f->f_mapping = inode->i_mapping; + +- f->f_flags = O_WRONLY | (flags & O_NONBLOCK); ++ f->f_flags = O_WRONLY | (flags & (O_NONBLOCK | O_DIRECT)); + f->f_version = 0; + + return f; +@@ -1056,7 +1083,7 @@ int do_pipe_flags(int *fd, int flags) + int error; + int fdw, fdr; + +- if (flags & ~(O_CLOEXEC | O_NONBLOCK)) ++ if (flags & ~(O_CLOEXEC | O_NONBLOCK | O_DIRECT)) + return -EINVAL; + + fw = create_write_pipe(flags); +diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h +index 77257c9..0072a53 100644 +--- a/include/linux/pipe_fs_i.h ++++ b/include/linux/pipe_fs_i.h +@@ -8,6 +8,7 @@ + #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ + #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ + #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ ++#define PIPE_BUF_FLAG_PACKET 0x08 /* read() as a packet */ + + /** + * struct pipe_buffer - a linux kernel pipe buffer +-- +1.7.7.6 + 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 @@ +From 06cd49dc3fc506eec882f7cf754eacd9804a79cd Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Sun, 29 Apr 2012 13:30:08 -0700 +Subject: [PATCH 118/165] autofs: make the autofsv5 packet file descriptor use + a packetized pipe + +commit 64f371bc3107e69efce563a3d0f0e6880de0d537 upstream. + +The autofs packet size has had a very unfortunate size problem on x86: +because the alignment of 'u64' differs in 32-bit and 64-bit modes, and +because the packet data was not 8-byte aligned, the size of the autofsv5 +packet structure differed between 32-bit and 64-bit modes despite +looking otherwise identical (300 vs 304 bytes respectively). + +We first fixed that up by making the 64-bit compat mode know about this +problem in commit a32744d4abae ("autofs: work around unhappy compat +problem on x86-64"), and that made a 32-bit 'systemd' work happily on a +64-bit kernel because everything then worked the same way as on a 32-bit +kernel. + +But it turned out that 'automount' had actually known and worked around +this problem in user space, so fixing the kernel to do the proper 32-bit +compatibility handling actually *broke* 32-bit automount on a 64-bit +kernel, because it knew that the packet sizes were wrong and expected +those incorrect sizes. + +As a result, we ended up reverting that compatibility mode fix, and +thus breaking systemd again, in commit fcbf94b9dedd. + +With both automount and systemd doing a single read() system call, and +verifying that they get *exactly* the size they expect but using +different sizes, it seemed that fixing one of them inevitably seemed to +break the other. At one point, a patch I seriously considered applying +from Michael Tokarev did a "strcmp()" to see if it was automount that +was doing the operation. Ugly, ugly. + +However, a prettier solution exists now thanks to the packetized pipe +mode. By marking the communication pipe as being packetized (by simply +setting the O_DIRECT flag), we can always just write the bigger packet +size, and if user-space does a smaller read, it will just get that +partial end result and the extra alignment padding will simply be thrown +away. + +This makes both automount and systemd happy, since they now get the size +they asked for, and the kernel side of autofs simply no longer needs to +care - it could pad out the packet arbitrarily. + +Of course, if there is some *other* user of autofs (please, please, +please tell me it ain't so - and we haven't heard of any) that tries to +read the packets with multiple writes, that other user will now be +broken - the whole point of the packetized mode is that one system call +gets exactly one packet, and you cannot read a packet in pieces. + +Tested-by: Michael Tokarev +Cc: Alan Cox +Cc: David Miller +Cc: Ian Kent +Cc: Thomas Meyer +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + fs/autofs4/autofs_i.h | 11 +++++++++++ + fs/autofs4/dev-ioctl.c | 2 +- + fs/autofs4/inode.c | 2 +- + 3 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h +index 326dc08..650d520 100644 +--- a/fs/autofs4/autofs_i.h ++++ b/fs/autofs4/autofs_i.h +@@ -268,6 +268,17 @@ int autofs4_fill_super(struct super_block *, void *, int); + struct autofs_info *autofs4_new_ino(struct autofs_sb_info *); + void autofs4_clean_ino(struct autofs_info *); + ++static inline int autofs_prepare_pipe(struct file *pipe) ++{ ++ if (!pipe->f_op || !pipe->f_op->write) ++ return -EINVAL; ++ if (!S_ISFIFO(pipe->f_dentry->d_inode->i_mode)) ++ return -EINVAL; ++ /* We want a packet pipe */ ++ pipe->f_flags |= O_DIRECT; ++ return 0; ++} ++ + /* Queue management functions */ + + int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify); +diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c +index 509fe1e..de54271 100644 +--- a/fs/autofs4/dev-ioctl.c ++++ b/fs/autofs4/dev-ioctl.c +@@ -376,7 +376,7 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, + err = -EBADF; + goto out; + } +- if (!pipe->f_op || !pipe->f_op->write) { ++ if (autofs_prepare_pipe(pipe) < 0) { + err = -EPIPE; + fput(pipe); + goto out; +diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c +index 8179f1a..7b5293e 100644 +--- a/fs/autofs4/inode.c ++++ b/fs/autofs4/inode.c +@@ -292,7 +292,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) + printk("autofs: could not open pipe file descriptor\n"); + goto fail_dput; + } +- if (!pipe->f_op || !pipe->f_op->write) ++ if (autofs_prepare_pipe(pipe) < 0) + goto fail_fput; + sbi->pipe = pipe; + sbi->pipefd = pipefd; +-- +1.7.7.6 + 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 @@ +From 73a8033457dd006878a2eeeb14133724923cd6af Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Fri, 20 Apr 2012 17:20:08 +0100 +Subject: [PATCH 119/165] ARM: 7396/1: errata: only handle ARM erratum #326103 + on affected cores + +commit f0c4b8d653f5ee091fb8d4d02ed7eaad397491bb upstream. + +Erratum #326103 ("FSR write bit incorrect on a SWP to read-only memory") +only affects the ARM 1136 core prior to r1p0. The workaround +disassembles the faulting instruction to determine whether it was a read +or write access on all v6 cores. + +An issue has been reported on the ARM 11MPCore whereby loading the +faulting instruction may happen in parallel with that page being +unmapped, resulting in a deadlock due to the lack of TLB broadcasting +in hardware: + +http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/091561.html + +This patch limits the workaround so that it is only used on affected +cores, which are known to be UP only. Other v6 cores can rely on the +FSR to indicate the access type correctly. + +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +--- + arch/arm/Kconfig | 9 +++++++++ + arch/arm/mm/abort-ev6.S | 17 +++++++++++------ + 2 files changed, 20 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 6cd71ec..26574f0 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1156,6 +1156,15 @@ if !MMU + source "arch/arm/Kconfig-nommu" + endif + ++config ARM_ERRATA_326103 ++ bool "ARM errata: FSR write bit incorrect on a SWP to read-only memory" ++ depends on CPU_V6 ++ help ++ Executing a SWP instruction to read-only memory does not set bit 11 ++ of the FSR on the ARM 1136 prior to r1p0. This causes the kernel to ++ treat the access as a read, preventing a COW from occurring and ++ causing the faulting task to livelock. ++ + config ARM_ERRATA_411920 + bool "ARM errata: Invalidation of the Instruction Cache operation can fail" + depends on CPU_V6 || CPU_V6K +diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S +index ff1f7cc..8074199 100644 +--- a/arch/arm/mm/abort-ev6.S ++++ b/arch/arm/mm/abort-ev6.S +@@ -26,18 +26,23 @@ ENTRY(v6_early_abort) + mrc p15, 0, r1, c5, c0, 0 @ get FSR + mrc p15, 0, r0, c6, c0, 0 @ get FAR + /* +- * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR (erratum 326103). +- * The test below covers all the write situations, including Java bytecodes ++ * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR. + */ +- bic r1, r1, #1 << 11 @ clear bit 11 of FSR ++#ifdef CONFIG_ARM_ERRATA_326103 ++ ldr ip, =0x4107b36 ++ mrc p15, 0, r3, c0, c0, 0 @ get processor id ++ teq ip, r3, lsr #4 @ r0 ARM1136? ++ bne do_DataAbort + tst r5, #PSR_J_BIT @ Java? ++ tsteq r5, #PSR_T_BIT @ Thumb? + bne do_DataAbort +- do_thumb_abort fsr=r1, pc=r4, psr=r5, tmp=r3 +- ldreq r3, [r4] @ read aborted ARM instruction ++ bic r1, r1, #1 << 11 @ clear bit 11 of FSR ++ ldr r3, [r4] @ read aborted ARM instruction + #ifdef CONFIG_CPU_ENDIAN_BE8 +- reveq r3, r3 ++ rev r3, r3 + #endif + do_ldrd_abort tmp=ip, insn=r3 + tst r3, #1 << 20 @ L = 0 -> write + orreq r1, r1, #1 << 11 @ yes. ++#endif + b do_DataAbort +-- +1.7.7.6 + 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 @@ +From 8d2876b00b257ea48fddbccfb531ad618d83ed0b Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Fri, 20 Apr 2012 17:21:08 +0100 +Subject: [PATCH 120/165] ARM: 7397/1: l2x0: only apply workaround for erratum + #753970 on PL310 + +commit f154fe9b806574437b47f08e924ad10c0e240b23 upstream. + +The workaround for PL310 erratum #753970 can lead to deadlock on systems +with an L220 cache controller. + +This patch makes the workaround effective only when the cache controller +is identified as a PL310 at probe time. + +Signed-off-by: Will Deacon +Signed-off-by: Russell King +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + arch/arm/mm/cache-l2x0.c | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c +index b1e192b..971d527 100644 +--- a/arch/arm/mm/cache-l2x0.c ++++ b/arch/arm/mm/cache-l2x0.c +@@ -32,6 +32,7 @@ static void __iomem *l2x0_base; + static DEFINE_RAW_SPINLOCK(l2x0_lock); + static uint32_t l2x0_way_mask; /* Bitmask of active ways */ + static uint32_t l2x0_size; ++static unsigned long sync_reg_offset = L2X0_CACHE_SYNC; + + struct l2x0_regs l2x0_saved_regs; + +@@ -61,12 +62,7 @@ static inline void cache_sync(void) + { + void __iomem *base = l2x0_base; + +-#ifdef CONFIG_PL310_ERRATA_753970 +- /* write to an unmmapped register */ +- writel_relaxed(0, base + L2X0_DUMMY_REG); +-#else +- writel_relaxed(0, base + L2X0_CACHE_SYNC); +-#endif ++ writel_relaxed(0, base + sync_reg_offset); + cache_wait(base + L2X0_CACHE_SYNC, 1); + } + +@@ -331,6 +327,10 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) + else + ways = 8; + type = "L310"; ++#ifdef CONFIG_PL310_ERRATA_753970 ++ /* Unmapped register. */ ++ sync_reg_offset = L2X0_DUMMY_REG; ++#endif + break; + case L2X0_CACHE_ID_PART_L210: + ways = (aux >> 13) & 0xf; +-- +1.7.7.6 + 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 @@ +From a927ce0f8dd30f05ced7a71a5523ca5d82eab5d6 Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Fri, 20 Apr 2012 17:22:11 +0100 +Subject: [PATCH 121/165] ARM: 7398/1: l2x0: only write to debug registers on + PL310 + +commit ab4d536890853ab6675ede65db40e2c0980cb0ea upstream. + +PL310 errata #588369 and #727915 require writes to the debug registers +of the cache controller to work around known problems. Writing these +registers on L220 may cause deadlock, so ensure that we only perform +this operation when we identify a PL310 at probe time. + +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +--- + arch/arm/mm/cache-l2x0.c | 13 ++++++++----- + 1 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c +index 971d527..db7bcc0 100644 +--- a/arch/arm/mm/cache-l2x0.c ++++ b/arch/arm/mm/cache-l2x0.c +@@ -81,10 +81,13 @@ static inline void l2x0_inv_line(unsigned long addr) + } + + #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915) ++static inline void debug_writel(unsigned long val) ++{ ++ if (outer_cache.set_debug) ++ outer_cache.set_debug(val); ++} + +-#define debug_writel(val) outer_cache.set_debug(val) +- +-static void l2x0_set_debug(unsigned long val) ++static void pl310_set_debug(unsigned long val) + { + writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); + } +@@ -94,7 +97,7 @@ static inline void debug_writel(unsigned long val) + { + } + +-#define l2x0_set_debug NULL ++#define pl310_set_debug NULL + #endif + + #ifdef CONFIG_PL310_ERRATA_588369 +@@ -331,6 +334,7 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) + /* Unmapped register. */ + sync_reg_offset = L2X0_DUMMY_REG; + #endif ++ outer_cache.set_debug = pl310_set_debug; + break; + case L2X0_CACHE_ID_PART_L210: + ways = (aux >> 13) & 0xf; +@@ -379,7 +383,6 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) + outer_cache.flush_all = l2x0_flush_all; + outer_cache.inv_all = l2x0_inv_all; + outer_cache.disable = l2x0_disable; +- outer_cache.set_debug = l2x0_set_debug; + + printk(KERN_INFO "%s cache controller enabled\n", type); + printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n", +-- +1.7.7.6 + 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 @@ +From 3130ecbd0c24f4b31da00862223e9985010690c2 Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Fri, 27 Apr 2012 12:45:07 +0100 +Subject: [PATCH 122/165] ARM: 7403/1: tls: remove covert channel via TPIDRURW + +commit 6a1c53124aa161eb624ce7b1e40ade728186d34c upstream. + +TPIDRURW is a user read/write register forming part of the group of +thread registers in more recent versions of the ARM architecture (~v6+). + +Currently, the kernel does not touch this register, which allows tasks +to communicate covertly by reading and writing to the register without +context-switching affecting its contents. + +This patch clears TPIDRURW when TPIDRURO is updated via the set_tls +macro, which is called directly from __switch_to. Since the current +behaviour makes the register useless to userspace as far as thread +pointers are concerned, simply clearing the register (rather than saving +and restoring it) will not cause any problems to userspace. + +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +--- + arch/arm/include/asm/tls.h | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h +index 60843eb..73409e6 100644 +--- a/arch/arm/include/asm/tls.h ++++ b/arch/arm/include/asm/tls.h +@@ -7,6 +7,8 @@ + + .macro set_tls_v6k, tp, tmp1, tmp2 + mcr p15, 0, \tp, c13, c0, 3 @ set TLS register ++ mov \tmp1, #0 ++ mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register + .endm + + .macro set_tls_v6, tp, tmp1, tmp2 +@@ -15,6 +17,8 @@ + mov \tmp2, #0xffff0fff + tst \tmp1, #HWCAP_TLS @ hardware TLS available? + mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register ++ movne \tmp1, #0 ++ mcrne p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register + streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 + .endm + +-- +1.7.7.6 + 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 @@ +From 453a85cabdd26d6525b6563e7d1b804b4b88d42f Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Fri, 27 Apr 2012 12:56:24 +0100 +Subject: [PATCH 123/165] ARM: 7406/1: hotplug: copy the affinity mask when + forcefully migrating IRQs + +commit 5e7371ded05adfcfcee44a8bc070bfc37979b8f2 upstream. + +When a CPU is hotplugged off, we migrate any IRQs currently affine to it +away and onto another online CPU by calling the irq_set_affinity +function of the relevant interrupt controller chip. This function +returns either IRQ_SET_MASK_OK or IRQ_SET_MASK_OK_NOCOPY, to indicate +whether irq_data.affinity was updated. + +If we are forcefully migrating an interrupt (because the affinity mask +no longer identifies any online CPUs) then we should update the IRQ +affinity mask to reflect the new CPU set. Failure to do so can +potentially leave /proc/irq/n/smp_affinity identifying only offline +CPUs, which may confuse userspace IRQ balancing daemons. + +This patch updates migrate_one_irq to copy the affinity mask when +the interrupt chip returns IRQ_SET_MASK_OK after forcefully changing the +affinity of an interrupt. + +Reported-by: Leif Lindholm +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +--- + arch/arm/kernel/irq.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c +index 3efd82c..87c8be5 100644 +--- a/arch/arm/kernel/irq.c ++++ b/arch/arm/kernel/irq.c +@@ -156,10 +156,10 @@ static bool migrate_one_irq(struct irq_desc *desc) + } + + c = irq_data_get_irq_chip(d); +- if (c->irq_set_affinity) +- c->irq_set_affinity(d, affinity, true); +- else ++ if (!c->irq_set_affinity) + pr_debug("IRQ%u: unable to set affinity\n", d->irq); ++ else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret) ++ cpumask_copy(d->affinity, affinity); + + return ret; + } +-- +1.7.7.6 + 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 @@ +From 8656241ad68bd13cec3e1fc5bf4ce8006b838b74 Mon Sep 17 00:00:00 2001 +From: Thomas Jackson +Date: Fri, 17 Feb 2012 18:33:10 -0800 +Subject: [PATCH 124/165] libsas: fix sas_find_bcast_phy() in the presence of + 'vacant' phys + +commit 1699490db339e2c6b3037ea8e7dcd6b2755b688e upstream. + +If an expander reports 'PHY VACANT' for a phy index prior to the one +that generated a BCN libsas fails rediscovery. Since a vacant phy is +defined as a valid phy index that will never have an attached device +just continue the search. + +Signed-off-by: Thomas Jackson +Signed-off-by: Dan Williams +Signed-off-by: James Bottomley +Signed-off-by: Ben Hutchings +--- + drivers/scsi/libsas/sas_expander.c | 17 ++++++++++++----- + 1 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c +index 1b831c5..a68780b 100644 +--- a/drivers/scsi/libsas/sas_expander.c ++++ b/drivers/scsi/libsas/sas_expander.c +@@ -1643,9 +1643,17 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id, + int phy_change_count = 0; + + res = sas_get_phy_change_count(dev, i, &phy_change_count); +- if (res) +- goto out; +- else if (phy_change_count != ex->ex_phy[i].phy_change_count) { ++ switch (res) { ++ case SMP_RESP_PHY_VACANT: ++ case SMP_RESP_NO_PHY: ++ continue; ++ case SMP_RESP_FUNC_ACC: ++ break; ++ default: ++ return res; ++ } ++ ++ if (phy_change_count != ex->ex_phy[i].phy_change_count) { + if (update) + ex->ex_phy[i].phy_change_count = + phy_change_count; +@@ -1653,8 +1661,7 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id, + return 0; + } + } +-out: +- return res; ++ return 0; + } + + static int sas_get_ex_change_count(struct domain_device *dev, int *ecc) +-- +1.7.7.6 + 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 @@ +From 18c33d9e87a0a285218cc075f4a471fe53142061 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 20 Mar 2012 10:50:27 -0700 +Subject: [PATCH 125/165] libsas: fix false positive 'device attached' + conditions + +commit 7d1d865181185bdf1316d236b1b4bd02c9020729 upstream. + +Normalize phy->attached_sas_addr to return a zero-address in the case +when device-type == NO_DEVICE or the linkrate is invalid to handle +expanders that put non-zero sas addresses in the discovery response: + + sas: ex 5001b4da000f903f phy02:U:0 attached: 0100000000000000 (no device) + sas: ex 5001b4da000f903f phy01:U:0 attached: 0100000000000000 (no device) + sas: ex 5001b4da000f903f phy03:U:0 attached: 0100000000000000 (no device) + sas: ex 5001b4da000f903f phy00:U:0 attached: 0100000000000000 (no device) + +Reported-by: Andrzej Jakowski +Signed-off-by: Dan Williams +Signed-off-by: James Bottomley +Signed-off-by: Ben Hutchings +--- + drivers/scsi/libsas/sas_expander.c | 9 ++++++++- + 1 files changed, 8 insertions(+), 1 deletions(-) + +diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c +index a68780b..e48ba4b 100644 +--- a/drivers/scsi/libsas/sas_expander.c ++++ b/drivers/scsi/libsas/sas_expander.c +@@ -192,7 +192,14 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, + phy->attached_sata_ps = dr->attached_sata_ps; + phy->attached_iproto = dr->iproto << 1; + phy->attached_tproto = dr->tproto << 1; +- memcpy(phy->attached_sas_addr, dr->attached_sas_addr, SAS_ADDR_SIZE); ++ /* help some expanders that fail to zero sas_address in the 'no ++ * device' case ++ */ ++ if (phy->attached_dev_type == NO_DEVICE || ++ phy->linkrate < SAS_LINK_RATE_1_5_GBPS) ++ memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE); ++ else ++ memcpy(phy->attached_sas_addr, dr->attached_sas_addr, SAS_ADDR_SIZE); + phy->attached_phy_id = dr->attached_phy_id; + phy->phy_change_count = dr->change_count; + phy->routing_attr = dr->routing_attr; +-- +1.7.7.6 + 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 @@ +From 9b4ee1cca5f9cce3c72d4a34597a0c1dc0c786bd Mon Sep 17 00:00:00 2001 +From: Matthew Garrett +Date: Mon, 30 Apr 2012 16:11:29 -0400 +Subject: [PATCH 126/165] efi: Add new variable attributes + +commit 41b3254c93acc56adc3c4477fef7c9512d47659e upstream. + +More recent versions of the UEFI spec have added new attributes for +variables. Add them. + +Signed-off-by: Matthew Garrett +Signed-off-by: Linus Torvalds +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + include/linux/efi.h | 13 ++++++++++++- + 1 files changed, 12 insertions(+), 1 deletions(-) + +diff --git a/include/linux/efi.h b/include/linux/efi.h +index 2362a0b..1328d8c 100644 +--- a/include/linux/efi.h ++++ b/include/linux/efi.h +@@ -383,7 +383,18 @@ extern int __init efi_setup_pcdp_console(char *); + #define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001 + #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002 + #define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004 +- ++#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x0000000000000008 ++#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x0000000000000010 ++#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x0000000000000020 ++#define EFI_VARIABLE_APPEND_WRITE 0x0000000000000040 ++ ++#define EFI_VARIABLE_MASK (EFI_VARIABLE_NON_VOLATILE | \ ++ EFI_VARIABLE_BOOTSERVICE_ACCESS | \ ++ EFI_VARIABLE_RUNTIME_ACCESS | \ ++ EFI_VARIABLE_HARDWARE_ERROR_RECORD | \ ++ EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \ ++ EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \ ++ EFI_VARIABLE_APPEND_WRITE) + /* + * EFI Device Path information + */ +-- +1.7.7.6 + 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 @@ +From 620a8b56785ca32ec7cde5f632617d89409a21ba Mon Sep 17 00:00:00 2001 +From: Matthew Garrett +Date: Mon, 30 Apr 2012 16:11:30 -0400 +Subject: [PATCH 127/165] efi: Validate UEFI boot variables + +commit fec6c20b570bcf541e581fc97f2e0cbdb9725b98 upstream. + +A common flaw in UEFI systems is a refusal to POST triggered by a malformed +boot variable. Once in this state, machines may only be restored by +reflashing their firmware with an external hardware device. While this is +obviously a firmware bug, the serious nature of the outcome suggests that +operating systems should filter their variable writes in order to prevent +a malicious user from rendering the machine unusable. + +Signed-off-by: Matthew Garrett +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + drivers/firmware/efivars.c | 182 ++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 182 insertions(+), 0 deletions(-) + +diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c +index b0a8117..150e4ec 100644 +--- a/drivers/firmware/efivars.c ++++ b/drivers/firmware/efivars.c +@@ -191,6 +191,176 @@ utf16_strncmp(const efi_char16_t *a, const efi_char16_t *b, size_t len) + } + } + ++static bool ++validate_device_path(struct efi_variable *var, int match, u8 *buffer, int len) ++{ ++ struct efi_generic_dev_path *node; ++ int offset = 0; ++ ++ node = (struct efi_generic_dev_path *)buffer; ++ ++ while (offset < len) { ++ offset += node->length; ++ ++ if (offset > len) ++ return false; ++ ++ if ((node->type == EFI_DEV_END_PATH || ++ node->type == EFI_DEV_END_PATH2) && ++ node->sub_type == EFI_DEV_END_ENTIRE) ++ return true; ++ ++ node = (struct efi_generic_dev_path *)(buffer + offset); ++ } ++ ++ /* ++ * If we're here then either node->length pointed past the end ++ * of the buffer or we reached the end of the buffer without ++ * finding a device path end node. ++ */ ++ return false; ++} ++ ++static bool ++validate_boot_order(struct efi_variable *var, int match, u8 *buffer, int len) ++{ ++ /* An array of 16-bit integers */ ++ if ((len % 2) != 0) ++ return false; ++ ++ return true; ++} ++ ++static bool ++validate_load_option(struct efi_variable *var, int match, u8 *buffer, int len) ++{ ++ u16 filepathlength; ++ int i, desclength = 0; ++ ++ /* Either "Boot" or "Driver" followed by four digits of hex */ ++ for (i = match; i < match+4; i++) { ++ if (hex_to_bin(var->VariableName[i] & 0xff) < 0) ++ return true; ++ } ++ ++ /* A valid entry must be at least 6 bytes */ ++ if (len < 6) ++ return false; ++ ++ filepathlength = buffer[4] | buffer[5] << 8; ++ ++ /* ++ * There's no stored length for the description, so it has to be ++ * found by hand ++ */ ++ desclength = utf16_strsize((efi_char16_t *)(buffer + 6), len) + 2; ++ ++ /* Each boot entry must have a descriptor */ ++ if (!desclength) ++ return false; ++ ++ /* ++ * If the sum of the length of the description, the claimed filepath ++ * length and the original header are greater than the length of the ++ * variable, it's malformed ++ */ ++ if ((desclength + filepathlength + 6) > len) ++ return false; ++ ++ /* ++ * And, finally, check the filepath ++ */ ++ return validate_device_path(var, match, buffer + desclength + 6, ++ filepathlength); ++} ++ ++static bool ++validate_uint16(struct efi_variable *var, int match, u8 *buffer, int len) ++{ ++ /* A single 16-bit integer */ ++ if (len != 2) ++ return false; ++ ++ return true; ++} ++ ++static bool ++validate_ascii_string(struct efi_variable *var, int match, u8 *buffer, int len) ++{ ++ int i; ++ ++ for (i = 0; i < len; i++) { ++ if (buffer[i] > 127) ++ return false; ++ ++ if (buffer[i] == 0) ++ return true; ++ } ++ ++ return false; ++} ++ ++struct variable_validate { ++ char *name; ++ bool (*validate)(struct efi_variable *var, int match, u8 *data, ++ int len); ++}; ++ ++static const struct variable_validate variable_validate[] = { ++ { "BootNext", validate_uint16 }, ++ { "BootOrder", validate_boot_order }, ++ { "DriverOrder", validate_boot_order }, ++ { "Boot*", validate_load_option }, ++ { "Driver*", validate_load_option }, ++ { "ConIn", validate_device_path }, ++ { "ConInDev", validate_device_path }, ++ { "ConOut", validate_device_path }, ++ { "ConOutDev", validate_device_path }, ++ { "ErrOut", validate_device_path }, ++ { "ErrOutDev", validate_device_path }, ++ { "Timeout", validate_uint16 }, ++ { "Lang", validate_ascii_string }, ++ { "PlatformLang", validate_ascii_string }, ++ { "", NULL }, ++}; ++ ++static bool ++validate_var(struct efi_variable *var, u8 *data, int len) ++{ ++ int i; ++ u16 *unicode_name = var->VariableName; ++ ++ for (i = 0; variable_validate[i].validate != NULL; i++) { ++ const char *name = variable_validate[i].name; ++ int match; ++ ++ for (match = 0; ; match++) { ++ char c = name[match]; ++ u16 u = unicode_name[match]; ++ ++ /* All special variables are plain ascii */ ++ if (u > 127) ++ return true; ++ ++ /* Wildcard in the matching name means we've matched */ ++ if (c == '*') ++ return variable_validate[i].validate(var, ++ match, data, len); ++ ++ /* Case sensitive match */ ++ if (c != u) ++ break; ++ ++ /* Reached the end of the string while matching */ ++ if (!c) ++ return variable_validate[i].validate(var, ++ match, data, len); ++ } ++ } ++ ++ return true; ++} ++ + static efi_status_t + get_var_data_locked(struct efivars *efivars, struct efi_variable *var) + { +@@ -324,6 +494,12 @@ efivar_store_raw(struct efivar_entry *entry, const char *buf, size_t count) + return -EINVAL; + } + ++ if ((new_var->Attributes & ~EFI_VARIABLE_MASK) != 0 || ++ validate_var(new_var, new_var->Data, new_var->DataSize) == false) { ++ printk(KERN_ERR "efivars: Malformed variable content\n"); ++ return -EINVAL; ++ } ++ + spin_lock(&efivars->lock); + status = efivars->ops->set_variable(new_var->VariableName, + &new_var->VendorGuid, +@@ -624,6 +800,12 @@ static ssize_t efivar_create(struct file *filp, struct kobject *kobj, + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; + ++ if ((new_var->Attributes & ~EFI_VARIABLE_MASK) != 0 || ++ validate_var(new_var, new_var->Data, new_var->DataSize) == false) { ++ printk(KERN_ERR "efivars: Malformed variable content\n"); ++ return -EINVAL; ++ } ++ + spin_lock(&efivars->lock); + + /* +-- +1.7.7.6 + 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 @@ +From a33123cb0368231d84b8839f9f56bee45c51016d Mon Sep 17 00:00:00 2001 +From: Bojan Smojver +Date: Tue, 24 Apr 2012 23:53:28 +0200 +Subject: [PATCH 128/165] PM / Hibernate: fix the number of pages used for + hibernate/thaw buffering + +commit f8262d476823a7ea1eb497ff9676d1eab2393c75 upstream. + +Hibernation regression fix, since 3.2. + +Calculate the number of required free pages based on non-high memory +pages only, because that is where the buffers will come from. + +Commit 081a9d043c983f161b78fdc4671324d1342b86bc introduced a new buffer +page allocation logic during hibernation, in order to improve the +performance. The amount of pages allocated was calculated based on total +amount of pages available, although only non-high memory pages are +usable for this purpose. This caused hibernation code to attempt to over +allocate pages on platforms that have high memory, which led to hangs. + +Signed-off-by: Bojan Smojver +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Ben Hutchings +--- + kernel/power/swap.c | 28 ++++++++++++++++++++++------ + 1 files changed, 22 insertions(+), 6 deletions(-) + +diff --git a/kernel/power/swap.c b/kernel/power/swap.c +index 11a594c..b313086 100644 +--- a/kernel/power/swap.c ++++ b/kernel/power/swap.c +@@ -52,6 +52,23 @@ + + #define MAP_PAGE_ENTRIES (PAGE_SIZE / sizeof(sector_t) - 1) + ++/* ++ * Number of free pages that are not high. ++ */ ++static inline unsigned long low_free_pages(void) ++{ ++ return nr_free_pages() - nr_free_highpages(); ++} ++ ++/* ++ * Number of pages required to be kept free while writing the image. Always ++ * half of all available low pages before the writing starts. ++ */ ++static inline unsigned long reqd_free_pages(void) ++{ ++ return low_free_pages() / 2; ++} ++ + struct swap_map_page { + sector_t entries[MAP_PAGE_ENTRIES]; + sector_t next_swap; +@@ -73,7 +90,7 @@ struct swap_map_handle { + sector_t cur_swap; + sector_t first_sector; + unsigned int k; +- unsigned long nr_free_pages, written; ++ unsigned long reqd_free_pages; + u32 crc32; + }; + +@@ -317,8 +334,7 @@ static int get_swap_writer(struct swap_map_handle *handle) + goto err_rel; + } + handle->k = 0; +- handle->nr_free_pages = nr_free_pages() >> 1; +- handle->written = 0; ++ handle->reqd_free_pages = reqd_free_pages(); + handle->first_sector = handle->cur_swap; + return 0; + err_rel: +@@ -353,11 +369,11 @@ static int swap_write_page(struct swap_map_handle *handle, void *buf, + handle->cur_swap = offset; + handle->k = 0; + } +- if (bio_chain && ++handle->written > handle->nr_free_pages) { ++ if (bio_chain && low_free_pages() <= handle->reqd_free_pages) { + error = hib_wait_on_bio_chain(bio_chain); + if (error) + goto out; +- handle->written = 0; ++ handle->reqd_free_pages = reqd_free_pages(); + } + out: + return error; +@@ -619,7 +635,7 @@ static int save_image_lzo(struct swap_map_handle *handle, + * Adjust number of free pages after all allocations have been done. + * We don't want to run out of pages when writing. + */ +- handle->nr_free_pages = nr_free_pages() >> 1; ++ handle->reqd_free_pages = reqd_free_pages(); + + /* + * Start the CRC32 thread. +-- +1.7.7.6 + 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 @@ +From 239f17a64c2c70a830feacf5fe07fb8ca1b288fb Mon Sep 17 00:00:00 2001 +From: Paulo Zanoni +Date: Wed, 2 May 2012 22:55:43 -0300 +Subject: [PATCH 129/165] drm/i915: enable dip before writing data on gen4 + +commit c1230df7e19e0f27655c0eb9d966c7e03be7cc50 upstream. + +While testing with the intel_infoframes tool on gen4, I see that when +video DIP is disabled, what we write to the DATA memory is not exactly +what we read back later. + +This regression has been introduce in + +commit 64a8fc0145a1d0fdc25fc9367c2e6c621955fb3b +Author: Jesse Barnes +Date: Thu Sep 22 11:16:00 2011 +0530 + + drm/i915: fix ILK+ infoframe support + +That commit was setting VIDEO_DIP_CTL to 0 when initializing, which +caused the problem. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43947 +Tested-by: Yang Guang +Signed-off-by: Paulo Zanoni +Reviewed-by: Eugeni Dodonov +[danvet: Pimped commit message by using the usual commit citation +layout.] +Signed-off-by: Daniel Vetter +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/intel_hdmi.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c +index 64541f7..9cd81ba 100644 +--- a/drivers/gpu/drm/i915/intel_hdmi.c ++++ b/drivers/gpu/drm/i915/intel_hdmi.c +@@ -136,7 +136,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder, + + val &= ~VIDEO_DIP_SELECT_MASK; + +- I915_WRITE(VIDEO_DIP_CTL, val | port | flags); ++ I915_WRITE(VIDEO_DIP_CTL, VIDEO_DIP_ENABLE | val | port | flags); + + for (i = 0; i < len; i += 4) { + I915_WRITE(VIDEO_DIP_DATA, *data); +-- +1.7.7.6 + 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 @@ +From 01347c8bd017f3c031bc472db23953f9695fd65c Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Thu, 1 Mar 2012 15:04:46 +0100 +Subject: [PATCH 130/165] sched: Fix nohz load accounting -- again! +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit c308b56b5398779cd3da0f62ab26b0453494c3d4 upstream. + +Various people reported nohz load tracking still being wrecked, but Doug +spotted the actual problem. We fold the nohz remainder in too soon, +causing us to loose samples and under-account. + +So instead of playing catch-up up-front, always do a single load-fold +with whatever state we encounter and only then fold the nohz remainder +and play catch-up. + +Reported-by: Doug Smythies +Reported-by: LesĂ…=82aw Kope=C4=87 +Reported-by: Aman Gupta +Signed-off-by: Peter Zijlstra +Link: http://lkml.kernel.org/n/tip-4v31etnhgg9kwd6ocgx3rxl8@git.kernel.org +Signed-off-by: Ingo Molnar +[bwh: Backported to 3.2: change filename] +Signed-off-by: Ben Hutchings +--- + kernel/sched.c | 53 ++++++++++++++++++++++++++--------------------------- + 1 files changed, 26 insertions(+), 27 deletions(-) + +diff --git a/kernel/sched.c b/kernel/sched.c +index 106a3b8..299f55c 100644 +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -3538,13 +3538,10 @@ calc_load_n(unsigned long load, unsigned long exp, + * Once we've updated the global active value, we need to apply the exponential + * weights adjusted to the number of cycles missed. + */ +-static void calc_global_nohz(unsigned long ticks) ++static void calc_global_nohz(void) + { + long delta, active, n; + +- if (time_before(jiffies, calc_load_update)) +- return; +- + /* + * If we crossed a calc_load_update boundary, make sure to fold + * any pending idle changes, the respective CPUs might have +@@ -3556,31 +3553,25 @@ static void calc_global_nohz(unsigned long ticks) + atomic_long_add(delta, &calc_load_tasks); + + /* +- * If we were idle for multiple load cycles, apply them. ++ * It could be the one fold was all it took, we done! + */ +- if (ticks >= LOAD_FREQ) { +- n = ticks / LOAD_FREQ; ++ if (time_before(jiffies, calc_load_update + 10)) ++ return; + +- active = atomic_long_read(&calc_load_tasks); +- active = active > 0 ? active * FIXED_1 : 0; ++ /* ++ * Catch-up, fold however many we are behind still ++ */ ++ delta = jiffies - calc_load_update - 10; ++ n = 1 + (delta / LOAD_FREQ); + +- avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n); +- avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n); +- avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n); ++ active = atomic_long_read(&calc_load_tasks); ++ active = active > 0 ? active * FIXED_1 : 0; + +- calc_load_update += n * LOAD_FREQ; +- } ++ avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n); ++ avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n); ++ avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n); + +- /* +- * Its possible the remainder of the above division also crosses +- * a LOAD_FREQ period, the regular check in calc_global_load() +- * which comes after this will take care of that. +- * +- * Consider us being 11 ticks before a cycle completion, and us +- * sleeping for 4*LOAD_FREQ + 22 ticks, then the above code will +- * age us 4 cycles, and the test in calc_global_load() will +- * pick up the final one. +- */ ++ calc_load_update += n * LOAD_FREQ; + } + #else + static void calc_load_account_idle(struct rq *this_rq) +@@ -3592,7 +3583,7 @@ static inline long calc_load_fold_idle(void) + return 0; + } + +-static void calc_global_nohz(unsigned long ticks) ++static void calc_global_nohz(void) + { + } + #endif +@@ -3620,8 +3611,6 @@ void calc_global_load(unsigned long ticks) + { + long active; + +- calc_global_nohz(ticks); +- + if (time_before(jiffies, calc_load_update + 10)) + return; + +@@ -3633,6 +3622,16 @@ void calc_global_load(unsigned long ticks) + avenrun[2] = calc_load(avenrun[2], EXP_15, active); + + calc_load_update += LOAD_FREQ; ++ ++ /* ++ * Account one period with whatever state we found before ++ * folding in the nohz state and ageing the entire idle period. ++ * ++ * This avoids loosing a sample when we go idle between ++ * calc_load_account_active() (10 ticks ago) and now and thus ++ * under-accounting. ++ */ ++ calc_global_nohz(); + } + + /* +-- +1.7.7.6 + 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 @@ +From aa7664378bab4f65e93402fa64c031a1fd52369c Mon Sep 17 00:00:00 2001 +From: Matthew Garrett +Date: Thu, 3 May 2012 16:50:46 -0400 +Subject: [PATCH 131/165] efivars: Improve variable validation + +commit 54b3a4d311c98ad94b737802a8b5f2c8c6bfd627 upstream. + +Ben Hutchings pointed out that the validation in efivars was inadequate - +most obviously, an entry with size 0 would server as a DoS against the +kernel. Improve this based on his suggestions. + +Signed-off-by: Matthew Garrett +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + drivers/firmware/efivars.c | 46 ++++++++++++++++++++++++++++--------------- + 1 files changed, 30 insertions(+), 16 deletions(-) + +diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c +index 150e4ec..0535c21 100644 +--- a/drivers/firmware/efivars.c ++++ b/drivers/firmware/efivars.c +@@ -192,18 +192,21 @@ utf16_strncmp(const efi_char16_t *a, const efi_char16_t *b, size_t len) + } + + static bool +-validate_device_path(struct efi_variable *var, int match, u8 *buffer, int len) ++validate_device_path(struct efi_variable *var, int match, u8 *buffer, ++ unsigned long len) + { + struct efi_generic_dev_path *node; + int offset = 0; + + node = (struct efi_generic_dev_path *)buffer; + +- while (offset < len) { +- offset += node->length; ++ if (len < sizeof(*node)) ++ return false; + +- if (offset > len) +- return false; ++ while (offset <= len - sizeof(*node) && ++ node->length >= sizeof(*node) && ++ node->length <= len - offset) { ++ offset += node->length; + + if ((node->type == EFI_DEV_END_PATH || + node->type == EFI_DEV_END_PATH2) && +@@ -222,7 +225,8 @@ validate_device_path(struct efi_variable *var, int match, u8 *buffer, int len) + } + + static bool +-validate_boot_order(struct efi_variable *var, int match, u8 *buffer, int len) ++validate_boot_order(struct efi_variable *var, int match, u8 *buffer, ++ unsigned long len) + { + /* An array of 16-bit integers */ + if ((len % 2) != 0) +@@ -232,19 +236,27 @@ validate_boot_order(struct efi_variable *var, int match, u8 *buffer, int len) + } + + static bool +-validate_load_option(struct efi_variable *var, int match, u8 *buffer, int len) ++validate_load_option(struct efi_variable *var, int match, u8 *buffer, ++ unsigned long len) + { + u16 filepathlength; +- int i, desclength = 0; ++ int i, desclength = 0, namelen; ++ ++ namelen = utf16_strnlen(var->VariableName, sizeof(var->VariableName)); + + /* Either "Boot" or "Driver" followed by four digits of hex */ + for (i = match; i < match+4; i++) { +- if (hex_to_bin(var->VariableName[i] & 0xff) < 0) ++ if (var->VariableName[i] > 127 || ++ hex_to_bin(var->VariableName[i] & 0xff) < 0) + return true; + } + +- /* A valid entry must be at least 6 bytes */ +- if (len < 6) ++ /* Reject it if there's 4 digits of hex and then further content */ ++ if (namelen > match + 4) ++ return false; ++ ++ /* A valid entry must be at least 8 bytes */ ++ if (len < 8) + return false; + + filepathlength = buffer[4] | buffer[5] << 8; +@@ -253,7 +265,7 @@ validate_load_option(struct efi_variable *var, int match, u8 *buffer, int len) + * There's no stored length for the description, so it has to be + * found by hand + */ +- desclength = utf16_strsize((efi_char16_t *)(buffer + 6), len) + 2; ++ desclength = utf16_strsize((efi_char16_t *)(buffer + 6), len - 6) + 2; + + /* Each boot entry must have a descriptor */ + if (!desclength) +@@ -275,7 +287,8 @@ validate_load_option(struct efi_variable *var, int match, u8 *buffer, int len) + } + + static bool +-validate_uint16(struct efi_variable *var, int match, u8 *buffer, int len) ++validate_uint16(struct efi_variable *var, int match, u8 *buffer, ++ unsigned long len) + { + /* A single 16-bit integer */ + if (len != 2) +@@ -285,7 +298,8 @@ validate_uint16(struct efi_variable *var, int match, u8 *buffer, int len) + } + + static bool +-validate_ascii_string(struct efi_variable *var, int match, u8 *buffer, int len) ++validate_ascii_string(struct efi_variable *var, int match, u8 *buffer, ++ unsigned long len) + { + int i; + +@@ -303,7 +317,7 @@ validate_ascii_string(struct efi_variable *var, int match, u8 *buffer, int len) + struct variable_validate { + char *name; + bool (*validate)(struct efi_variable *var, int match, u8 *data, +- int len); ++ unsigned long len); + }; + + static const struct variable_validate variable_validate[] = { +@@ -325,7 +339,7 @@ static const struct variable_validate variable_validate[] = { + }; + + static bool +-validate_var(struct efi_variable *var, u8 *data, int len) ++validate_var(struct efi_variable *var, u8 *data, unsigned long len) + { + int i; + u16 *unicode_name = var->VariableName; +-- +1.7.7.6 + 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 @@ +From 39565f288e6b2270679f089aae07d579bbf8a156 Mon Sep 17 00:00:00 2001 +From: Stefan Metzmacher +Date: Fri, 4 May 2012 00:19:28 +0200 +Subject: [PATCH 132/165] fs/cifs: fix parsing of dfs referrals +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit d8f2799b105a24bb0bbd3380a0d56e6348484058 upstream. + +The problem was that the first referral was parsed more than once +and so the caller tried the same referrals multiple times. + +The problem was introduced partly by commit +066ce6899484d9026acd6ba3a8dbbedb33d7ae1b, +where 'ref += le16_to_cpu(ref->Size);' got lost, +but that was also wrong... + +Signed-off-by: Stefan Metzmacher +Tested-by: Björn Jacke +Reviewed-by: Jeff Layton +Signed-off-by: Steve French +[bwh: Backport to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + fs/cifs/cifssmb.c | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c +index 0e6adac..e89803b 100644 +--- a/fs/cifs/cifssmb.c ++++ b/fs/cifs/cifssmb.c +@@ -4826,8 +4826,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, + max_len = data_end - temp; + node->node_name = cifs_strndup_from_ucs(temp, max_len, + is_unicode, nls_codepage); +- if (!node->node_name) ++ if (!node->node_name) { + rc = -ENOMEM; ++ goto parse_DFS_referrals_exit; ++ } ++ ++ ref++; + } + + parse_DFS_referrals_exit: +-- +1.7.7.6 + 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 @@ +From 9daab99a20e2ce18687c16c10546e0c5343e22c2 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Fri, 4 May 2012 14:46:02 -0700 +Subject: [PATCH 133/165] Fix __read_seqcount_begin() to use ACCESS_ONCE for + sequence value read + +commit 2f624278626677bfaf73fef97f86b37981621f5c upstream. + +We really need to use a ACCESS_ONCE() on the sequence value read in +__read_seqcount_begin(), because otherwise the compiler might end up +reloading the value in between the test and the return of it. As a +result, it might end up returning an odd value (which means that a write +is in progress). + +If the reader is then fast enough that that odd value is still the +current one when the read_seqcount_retry() is done, we might end up with +a "successful" read sequence, even despite the concurrent write being +active. + +In practice this probably never really happens - there just isn't +anything else going on around the read of the sequence count, and the +common case is that we end up having a read barrier immediately +afterwards. + +So the code sequence in which gcc might decide to reaload from memory is +small, and there's no reason to believe it would ever actually do the +reload. But if the compiler ever were to decide to do so, it would be +incredibly annoying to debug. Let's just make sure. + +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + include/linux/seqlock.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h +index c6db9fb..bb1fac5 100644 +--- a/include/linux/seqlock.h ++++ b/include/linux/seqlock.h +@@ -141,7 +141,7 @@ static inline unsigned __read_seqcount_begin(const seqcount_t *s) + unsigned ret; + + repeat: +- ret = s->sequence; ++ ret = ACCESS_ONCE(s->sequence); + if (unlikely(ret & 1)) { + cpu_relax(); + goto repeat; +-- +1.7.7.6 + 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 @@ +From d0c9c20fe1b85573de668afb64f38b05c6263998 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Tue, 1 May 2012 08:15:42 -0700 +Subject: [PATCH 134/165] hwmon: (coretemp) Increase CPU core limit + +commit bdc71c9a87b898e4c380c23b2e3e18071312ecde upstream. + +CPU core ID is used to index the core_data[] array. The core ID is, however, not +sequential; 10-core CPUS can have a core ID as high as 25. Increase the limit to +32 to be able to deal with current CPUs. + +Signed-off-by: Guenter Roeck +Acked-by: Jean Delvare +Acked-by: Durgadoss R +Signed-off-by: Ben Hutchings +--- + drivers/hwmon/coretemp.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c +index 104b376..8b53a7a 100644 +--- a/drivers/hwmon/coretemp.c ++++ b/drivers/hwmon/coretemp.c +@@ -51,7 +51,7 @@ module_param_named(tjmax, force_tjmax, int, 0444); + MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius"); + + #define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */ +-#define NUM_REAL_CORES 16 /* Number of Real cores per cpu */ ++#define NUM_REAL_CORES 32 /* Number of Real cores per cpu */ + #define CORETEMP_NAME_LENGTH 17 /* String Length of attrs */ + #define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */ + #define TOTAL_ATTRS (MAX_CORE_ATTRS + 1) +-- +1.7.7.6 + 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 @@ +From c6ecb5ef76bc2c141529aeab1ef2490b377e1906 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Wed, 2 May 2012 20:26:24 +0100 +Subject: [PATCH 135/165] nouveau: initialise has_optimus variable. + +commit addde4ec31456c5f1e9b61aae3edcfeb0f338f87 upstream. + +We should initialise this to 0 really to avoid getting false positives. + +Signed-off-by: Dave Airlie +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c +index 525744d..3df56c7 100644 +--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c ++++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c +@@ -245,7 +245,7 @@ static bool nouveau_dsm_detect(void) + struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name}; + struct pci_dev *pdev = NULL; + int has_dsm = 0; +- int has_optimus; ++ int has_optimus = 0; + int vga_count = 0; + bool guid_valid; + int retval; +-- +1.7.7.6 + 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 @@ +From f9b3a3cd3a49c5c547207f4e8496a39f9d470536 Mon Sep 17 00:00:00 2001 +From: "Kirill A. Shutemov" +Date: Mon, 30 Apr 2012 09:18:01 -0400 +Subject: [PATCH 136/165] hwmon: (coretemp) fix oops on cpu unplug + +commit b704871124b477807966f06789c2b32f2de58bf7 upstream. + +coretemp tries to access core_data array beyond bounds on cpu unplug if +core id of the cpu if more than NUM_REAL_CORES-1. + +BUG: unable to handle kernel NULL pointer dereference at 000000000000013c +IP: [] coretemp_cpu_callback+0x93/0x1ba [coretemp] +PGD 673e5a067 PUD 66e9b3067 PMD 0 +Oops: 0000 [#1] SMP +CPU 79 +Modules 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] + +Pid: 3315, comm: set-cpus Tainted: G W 3.4.0-rc5+ #2 QCI QSSC-S4R/QSSC-S4R +RIP: 0010:[] [] coretemp_cpu_callback+0x93/0x1ba [coretemp] +RSP: 0018:ffff880472fb3d48 EFLAGS: 00010246 +RAX: 0000000000000124 RBX: 0000000000000034 RCX: 00000000ffffffff +RDX: 0000000000000000 RSI: 0000000000000046 RDI: 0000000000000246 +RBP: ffff880472fb3d88 R08: ffff88077fcd36c0 R09: 0000000000000001 +R10: ffffffff8184bc48 R11: 0000000000000000 R12: ffff880273095800 +R13: 0000000000000013 R14: ffff8802730a1810 R15: 0000000000000000 +FS: 00007f694a20f720(0000) GS:ffff88077fcc0000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b +CR2: 000000000000013c CR3: 000000067209b000 CR4: 00000000000007e0 +DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 +Process set-cpus (pid: 3315, threadinfo ffff880472fb2000, task ffff880471fa0000) +Stack: + ffff880277b4c308 0000000000000003 ffff880472fb3d88 0000000000000005 + 0000000000000034 00000000ffffffd1 ffffffff81cadc70 ffff880472fb3e14 + ffff880472fb3dc8 ffffffff8161f48d ffff880471fa0000 0000000000000034 +Call Trace: + [] notifier_call_chain+0x4d/0x70 + [] __raw_notifier_call_chain+0xe/0x10 + [] __cpu_notify+0x20/0x40 + [] _cpu_down+0x81/0x270 + [] cpu_down+0x37/0x50 + [] store_online+0x63/0xc0 + [] dev_attr_store+0x18/0x30 + [] sysfs_write_file+0xef/0x170 + [] vfs_write+0xb3/0x180 + [] sys_write+0x4a/0x90 + [] system_call_fastpath+0x16/0x1b +Code: 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 +RIP [] coretemp_cpu_callback+0x93/0x1ba [coretemp] + RSP +CR2: 000000000000013c + +Signed-off-by: Kirill A. Shutemov +Signed-off-by: Guenter Roeck +Signed-off-by: Ben Hutchings +--- + drivers/hwmon/coretemp.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c +index 8b53a7a..427468f 100644 +--- a/drivers/hwmon/coretemp.c ++++ b/drivers/hwmon/coretemp.c +@@ -705,6 +705,10 @@ static void __cpuinit put_core_offline(unsigned int cpu) + + indx = TO_ATTR_NO(cpu); + ++ /* The core id is too big, just return */ ++ if (indx > MAX_CORE_DATA - 1) ++ return; ++ + if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu) + coretemp_remove_core(pdata, &pdev->dev, indx); + +-- +1.7.7.6 + 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 @@ +From a826ba1d1dd61542f0790e7c646e8534d170d7f6 Mon Sep 17 00:00:00 2001 +From: Lin Ming +Date: Thu, 3 May 2012 22:15:07 +0800 +Subject: [PATCH 137/165] libata: skip old error history when counting probe + trials + +commit 6868225e3e92399068be9a5f1635752d91012ad5 upstream. + +Commit d902747("[libata] Add ATA transport class") introduced +ATA_EFLAG_OLD_ER to mark entries in the error ring as cleared. + +But ata_count_probe_trials_cb() didn't check this flag and it still +counts the old error history. So wrong probe trials count is returned +and it causes problem, for example, SATA link speed is slowed down from +3.0Gbps to 1.5Gbps. + +Fix it by checking ATA_EFLAG_OLD_ER in ata_count_probe_trials_cb(). + +Signed-off-by: Lin Ming +Signed-off-by: Jeff Garzik +Signed-off-by: Ben Hutchings +--- + drivers/ata/libata-eh.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c +index a9b2820..58db834 100644 +--- a/drivers/ata/libata-eh.c ++++ b/drivers/ata/libata-eh.c +@@ -3500,7 +3500,8 @@ static int ata_count_probe_trials_cb(struct ata_ering_entry *ent, void *void_arg + u64 now = get_jiffies_64(); + int *trials = void_arg; + +- if (ent->timestamp < now - min(now, interval)) ++ if ((ent->eflags & ATA_EFLAG_OLD_ER) || ++ (ent->timestamp < now - min(now, interval))) + return -1; + + (*trials)++; +-- +1.7.7.6 + 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 @@ +From 9edb0f56a8e94b830ce7a97706689fbe8d362066 Mon Sep 17 00:00:00 2001 +From: Seth Forshee +Date: Wed, 25 Apr 2012 17:28:00 -0500 +Subject: [PATCH 138/165] b43: only reload config after successful + initialization + +commit dbdedbdf4fbff3d4962a0786f37aa86dfdc48a7e upstream. + +Commit 2a19032 (b43: reload phy and bss settings after core restarts) +introduced an unconditional call to b43_op_config() at the end of +b43_op_start(). When firmware fails to load this can wedge the system. +There's no need to reload the configuration after a failed +initialization anyway, so only make the call if initialization was +successful. + +BugLink: http://bugs.launchpad.net/bugs/950295 +Cc: Felix Fietkau +Signed-off-by: Seth Forshee +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/b43/main.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c +index 5634d9a..680709c 100644 +--- a/drivers/net/wireless/b43/main.c ++++ b/drivers/net/wireless/b43/main.c +@@ -4820,8 +4820,14 @@ static int b43_op_start(struct ieee80211_hw *hw) + out_mutex_unlock: + mutex_unlock(&wl->mutex); + +- /* reload configuration */ +- b43_op_config(hw, ~0); ++ /* ++ * Configuration may have been overwritten during initialization. ++ * Reload the configuration, but only if initialization was ++ * successful. Reloading the configuration after a failed init ++ * may hang the system. ++ */ ++ if (!err) ++ b43_op_config(hw, ~0); + + return err; + } +-- +1.7.7.6 + 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 @@ +From 3413f898d1af58e99c56510c996fb039b6c5cd37 Mon Sep 17 00:00:00 2001 +From: Roland Stigge +Date: Wed, 4 Apr 2012 10:34:37 +0200 +Subject: [PATCH 139/165] i2c: pnx: Disable clk in suspend + +commit 6c557cfee08751d22aed34840f389b846f0f4508 upstream. + +In the driver's suspend function, clk_enable() was used instead of +clk_disable(). This is corrected with this patch. + +Signed-off-by: Roland Stigge +Reviewed-by: Arnd Bergmann + +[wsa: reworded commit header slightly] + +Signed-off-by: Wolfram Sang +Signed-off-by: Ben Hutchings +--- + drivers/i2c/busses/i2c-pnx.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c +index 04be9f8..eb8ad53 100644 +--- a/drivers/i2c/busses/i2c-pnx.c ++++ b/drivers/i2c/busses/i2c-pnx.c +@@ -546,8 +546,7 @@ static int i2c_pnx_controller_suspend(struct platform_device *pdev, + { + struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev); + +- /* FIXME: shouldn't this be clk_disable? */ +- clk_enable(alg_data->clk); ++ clk_disable(alg_data->clk); + + return 0; + } +-- +1.7.7.6 + 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 @@ +From 306bd550f671e8d7ac5503cba114e5bb525aa787 Mon Sep 17 00:00:00 2001 +From: Stanislav Yakovlev +Date: Thu, 19 Apr 2012 15:55:09 -0400 +Subject: [PATCH 140/165] ipw2200: Fix race condition in the command + completion acknowledge + +commit dd447319895d0c0af423e483d9b63f84f3f8869a upstream. + +Driver incorrectly validates command completion: instead of waiting +for a command to be acknowledged it continues execution. Most of the +time driver gets acknowledge of the command completion in a tasklet +before it executes the next one. But sometimes it sends the next +command before it gets acknowledge for the previous one. In such a +case one of the following error messages appear in the log: + +Failed to send SYSTEM_CONFIG: Already sending a command. +Failed to send ASSOCIATE: Already sending a command. +Failed to send TX_POWER: Already sending a command. + +After that you need to reload the driver to get it working again. + +This bug occurs during roaming (reported by Sam Varshavchik) +https://bugzilla.redhat.com/show_bug.cgi?id=738508 +and machine booting (reported by Tom Gundersen and Mads Kiilerich) +https://bugs.archlinux.org/task/28097 +https://bugzilla.redhat.com/show_bug.cgi?id=802106 + +This patch doesn't fix the delay issue during firmware load. +But at least device now works as usual after boot. + +Signed-off-by: Stanislav Yakovlev +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/ipw2x00/ipw2200.c | 13 ++++++++++++- + 1 files changed, 12 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c +index 99a710d..827889b 100644 +--- a/drivers/net/wireless/ipw2x00/ipw2200.c ++++ b/drivers/net/wireless/ipw2x00/ipw2200.c +@@ -2183,6 +2183,7 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) + { + int rc = 0; + unsigned long flags; ++ unsigned long now, end; + + spin_lock_irqsave(&priv->lock, flags); + if (priv->status & STATUS_HCMD_ACTIVE) { +@@ -2224,10 +2225,20 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) + } + spin_unlock_irqrestore(&priv->lock, flags); + ++ now = jiffies; ++ end = now + HOST_COMPLETE_TIMEOUT; ++again: + rc = wait_event_interruptible_timeout(priv->wait_command_queue, + !(priv-> + status & STATUS_HCMD_ACTIVE), +- HOST_COMPLETE_TIMEOUT); ++ end - now); ++ if (rc < 0) { ++ now = jiffies; ++ if (time_before(now, end)) ++ goto again; ++ rc = 0; ++ } ++ + if (rc == 0) { + spin_lock_irqsave(&priv->lock, flags); + if (priv->status & STATUS_HCMD_ACTIVE) { +-- +1.7.7.6 + 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 @@ +From d60da87d5ec426412fc4c55d4231c292ceb51a41 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sun, 29 Apr 2012 15:44:16 +0200 +Subject: [PATCH 141/165] mac80211: fix AP mode EAP tx for VLAN stations + +commit 66f2c99af3d6f2d0aa1120884cf1c60613ef61c0 upstream. + +EAP frames for stations in an AP VLAN are sent on the main AP interface +to avoid race conditions wrt. moving stations. +For that to work properly, sta_info_get_bss must be used instead of +sta_info_get when sending EAP packets. +Previously this was only done for cooked monitor injected packets, so +this patch adds a check for tx->skb->protocol to the same place. + +Signed-off-by: Felix Fietkau +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + net/mac80211/tx.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c +index eff1f4e..4ff35bf 100644 +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -1121,7 +1121,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, + tx->sta = rcu_dereference(sdata->u.vlan.sta); + if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) + return TX_DROP; +- } else if (info->flags & IEEE80211_TX_CTL_INJECTED) { ++ } else if (info->flags & IEEE80211_TX_CTL_INJECTED || ++ tx->sdata->control_port_protocol == tx->skb->protocol) { + tx->sta = sta_info_get_bss(sdata, hdr->addr1); + } + if (!tx->sta) +-- +1.7.7.6 + 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 @@ +From 53290583562535da122f89cc3acb6babf2c55e66 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Thu, 19 Apr 2012 21:39:06 -0500 +Subject: [PATCH 142/165] rtlwifi: Fix oops on unload + +commit 44eb65cfd8da4b9c231238998729e858e963a980 upstream. + +Under some circumstances, a PCI-based driver reports the following OOPs: + +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Oops: 0000 [#1] SMP +--snip-- +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Pid: 19627, comm: rmmod +Not tainted 3.2.9-2.fc16.x86_64 #1 LENOVO 05962RU/05962RU +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RIP: +0010:[] [] +rtl92ce_get_desc+0x19/0xd0 [rtl8192ce] +--snip-- +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Process rmmod (pid: +19627, threadinfo ffff880050262000, task ffff8801156d5cc0) +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Stack: +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] 0000000000000002 +ffff8801176c2540 ffff880050263ca8 ffffffffa03348e7 +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] 0000000000000282 +0000000180150014 ffff880050263fd8 ffff8801176c2810 +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] ffff880050263bc8 +ffffffff810550e2 00000000000002c0 ffff8801176c0d40 +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Call Trace: +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] [] +_rtl_pci_rx_interrupt+0x187/0x650 [rtlwifi] +--snip-- +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Code: ff 09 d0 89 07 48 +83 c4 08 5b 5d c3 66 0f 1f 44 00 00 55 48 89 e5 53 48 83 ec 08 66 66 +66 66 90 40 84 f6 89 d3 74 13 84 d2 75 57 <8b> 07 48 83 c4 08 5b 5d c1 +e8 1f c3 0f 1f 00 84 d2 74 ed 80 fa +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RIP +[] rtl92ce_get_desc+0x19/0xd0 [rtl8192ce] +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RSP +Mar 19 08:14:35 kvothe kernel: [ 6584.626011] CR2: 00000000000006e0 +Mar 19 08:14:35 kvothe kernel: [ 6584.646491] ---[ end trace +8636c766dcfbe0e6 ]--- + +This oops is due to interrupts not being disabled in this particular path. + +Reported-by: Dave Airlie +Tested-by: Dave Airlie +Signed-off-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/rtlwifi/pci.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c +index d44d398..47ba0f7 100644 +--- a/drivers/net/wireless/rtlwifi/pci.c ++++ b/drivers/net/wireless/rtlwifi/pci.c +@@ -1961,6 +1961,7 @@ void rtl_pci_disconnect(struct pci_dev *pdev) + rtl_deinit_deferred_work(hw); + rtlpriv->intf_ops->adapter_stop(hw); + } ++ rtlpriv->cfg->ops->disable_interrupt(hw); + + /*deinit rfkill */ + rtl_deinit_rfkill(hw); +-- +1.7.7.6 + 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 @@ +From 7b9847c5e4ba91a74d25b755ee45703487c5189e Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas +Date: Thu, 26 Apr 2012 23:07:43 +0300 +Subject: [PATCH 143/165] wl1251: fix crash on remove due to premature kfree + +commit 328c32f0f85467af5a6c4c3289e168d9ad2555af upstream. + +Currently SDIO glue frees it's own structure before calling +wl1251_free_hw(), which in turn calls ieee80211_unregister_hw(). +The later call may result in a need to communicate with the chip +to stop it (as it happens now if the interface is still up before +rmmod), which means calls are made back to the glue, resulting in +freed memory access. + +Fix this by freeing glue data last. + +Signed-off-by: Grazvydas Ignotas +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/wl1251/sdio.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c +index f786942..1b851f6 100644 +--- a/drivers/net/wireless/wl1251/sdio.c ++++ b/drivers/net/wireless/wl1251/sdio.c +@@ -315,8 +315,8 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func) + + if (wl->irq) + free_irq(wl->irq, wl); +- kfree(wl_sdio); + wl1251_free_hw(wl); ++ kfree(wl_sdio); + + sdio_claim_host(func); + sdio_release_irq(func); +-- +1.7.7.6 + 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 @@ +From aac395832157e17755262dfe2f08d99a454f66f9 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas +Date: Thu, 26 Apr 2012 23:07:44 +0300 +Subject: [PATCH 144/165] wl1251: fix crash on remove due to leftover work + item + +commit 4c1bcdb5a3354b250b82a67549f57ac27a3bb85f upstream. + +This driver currently leaves elp_work behind when stopping, which +occasionally results in data corruption because work function ends +up accessing freed memory, typical symptoms of this are various +worker_thread crashes. Fix it by cancelling elp_work. + +Signed-off-by: Grazvydas Ignotas +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/wl1251/main.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c +index ba3268e..40c1574 100644 +--- a/drivers/net/wireless/wl1251/main.c ++++ b/drivers/net/wireless/wl1251/main.c +@@ -479,6 +479,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) + cancel_work_sync(&wl->irq_work); + cancel_work_sync(&wl->tx_work); + cancel_work_sync(&wl->filter_work); ++ cancel_delayed_work_sync(&wl->elp_work); + + mutex_lock(&wl->mutex); + +-- +1.7.7.6 + 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 @@ +From 3fabef3cff16e308410b75ac612ba271be969051 Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka +Date: Wed, 18 Apr 2012 08:01:15 -0700 +Subject: [PATCH 145/165] iwlwifi: do not nulify ctx->vif on reset + +commit 8db4c7e25d153fb049e81715d72fa3be3a0c3b69 upstream. + +ctx->vif is dereferenced in different part of iwlwifi code, so do not +nullify it. + +This should address at least one of the possible reasons of WARNING at +iwlagn_mac_remove_interface, and perhaps some random crashes when +firmware reset is performed. + +Signed-off-by: Stanislaw Gruszka +Signed-off-by: Wey-Yi Guy +Signed-off-by: John W. Linville +[bwh: Backported to 3.2: + - Change filename iwl-mac80211.c to iwl-core.c + - Change context in iwlagn_prepare_restart()] +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/iwlwifi/iwl-agn.c | 3 --- + drivers/net/wireless/iwlwifi/iwl-core.c | 10 +++++++++- + 2 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c +index e0e9a3d..d7d2512 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-agn.c ++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c +@@ -1504,7 +1504,6 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) + + static void iwlagn_prepare_restart(struct iwl_priv *priv) + { +- struct iwl_rxon_context *ctx; + bool bt_full_concurrent; + u8 bt_ci_compliance; + u8 bt_load; +@@ -1513,8 +1512,6 @@ static void iwlagn_prepare_restart(struct iwl_priv *priv) + + lockdep_assert_held(&priv->shrd->mutex); + +- for_each_context(priv, ctx) +- ctx->vif = NULL; + priv->is_open = 0; + + /* +diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c +index 3d75d4c..832ec4d 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-core.c ++++ b/drivers/net/wireless/iwlwifi/iwl-core.c +@@ -1228,6 +1228,7 @@ int iwlagn_mac_add_interface(struct ieee80211_hw *hw, + struct iwl_rxon_context *tmp, *ctx = NULL; + int err; + enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif); ++ bool reset = false; + + IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n", + viftype, vif->addr); +@@ -1249,6 +1250,13 @@ int iwlagn_mac_add_interface(struct ieee80211_hw *hw, + tmp->interface_modes | tmp->exclusive_interface_modes; + + if (tmp->vif) { ++ /* On reset we need to add the same interface again */ ++ if (tmp->vif == vif) { ++ reset = true; ++ ctx = tmp; ++ break; ++ } ++ + /* check if this busy context is exclusive */ + if (tmp->exclusive_interface_modes & + BIT(tmp->vif->type)) { +@@ -1275,7 +1283,7 @@ int iwlagn_mac_add_interface(struct ieee80211_hw *hw, + ctx->vif = vif; + + err = iwl_setup_interface(priv, ctx); +- if (!err) ++ if (!err || reset) + goto out; + + ctx->vif = NULL; +-- +1.7.7.6 + 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 @@ +From dabe62a4921edd9f40f1477912cc0ac706f5e63d Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Mon, 23 Apr 2012 14:17:50 -0700 +Subject: [PATCH 146/165] iwlwifi: fix hardware queue programming + +commit 5ef4acd58ab2abd0dd0c8e3cacd61a0dc5d73646 upstream. + +Newer devices have 20 (5000 series) or 30 (6000 series) +hardware queues, rather than the 16 that 4965 had. This +was added to the driver a long time ago, but improperly: +the queue registers for the higher queues aren't just +continuations of the registers for the first 16 queues, +they are in other places. Therefore, the hardware would +lock up when trying to activate queue 16 or above and +the device would have to be restarted. + +Thanks goes to Emmanuel who identified this and told me +how the queue programming should be done. + +Note that we don't use queues 20 and higher today and +doing so needs more work than this. + +Signed-off-by: Johannes Berg +Signed-off-by: Wey-Yi Guy +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/iwlwifi/iwl-fh.h | 24 +++++++++++++++++++----- + drivers/net/wireless/iwlwifi/iwl-prph.h | 27 ++++++++++++++++++++++++--- + 2 files changed, 43 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h +index 5bede9d..aae992a 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-fh.h ++++ b/drivers/net/wireless/iwlwifi/iwl-fh.h +@@ -104,15 +104,29 @@ + * (see struct iwl_tfd_frame). These 16 pointer registers are offset by 0x04 + * bytes from one another. Each TFD circular buffer in DRAM must be 256-byte + * aligned (address bits 0-7 must be 0). ++ * Later devices have 20 (5000 series) or 30 (higher) queues, but the registers ++ * for them are in different places. + * + * Bit fields in each pointer register: + * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned + */ +-#define FH_MEM_CBBC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) +-#define FH_MEM_CBBC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) +- +-/* Find TFD CB base pointer for given queue (range 0-15). */ +-#define FH_MEM_CBBC_QUEUE(x) (FH_MEM_CBBC_LOWER_BOUND + (x) * 0x4) ++#define FH_MEM_CBBC_0_15_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) ++#define FH_MEM_CBBC_0_15_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) ++#define FH_MEM_CBBC_16_19_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xBF0) ++#define FH_MEM_CBBC_16_19_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xC00) ++#define FH_MEM_CBBC_20_31_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xB20) ++#define FH_MEM_CBBC_20_31_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xB80) ++ ++/* Find TFD CB base pointer for given queue */ ++static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl) ++{ ++ if (chnl < 16) ++ return FH_MEM_CBBC_0_15_LOWER_BOUND + 4 * chnl; ++ if (chnl < 20) ++ return FH_MEM_CBBC_16_19_LOWER_BOUND + 4 * (chnl - 16); ++ WARN_ON_ONCE(chnl >= 32); ++ return FH_MEM_CBBC_20_31_LOWER_BOUND + 4 * (chnl - 20); ++} + + + /** +diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h +index bebdd82..d9b089e 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-prph.h ++++ b/drivers/net/wireless/iwlwifi/iwl-prph.h +@@ -227,12 +227,33 @@ + #define SCD_AIT (SCD_BASE + 0x0c) + #define SCD_TXFACT (SCD_BASE + 0x10) + #define SCD_ACTIVE (SCD_BASE + 0x14) +-#define SCD_QUEUE_WRPTR(x) (SCD_BASE + 0x18 + (x) * 4) +-#define SCD_QUEUE_RDPTR(x) (SCD_BASE + 0x68 + (x) * 4) + #define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8) + #define SCD_AGGR_SEL (SCD_BASE + 0x248) + #define SCD_INTERRUPT_MASK (SCD_BASE + 0x108) +-#define SCD_QUEUE_STATUS_BITS(x) (SCD_BASE + 0x10c + (x) * 4) ++ ++static inline unsigned int SCD_QUEUE_WRPTR(unsigned int chnl) ++{ ++ if (chnl < 20) ++ return SCD_BASE + 0x18 + chnl * 4; ++ WARN_ON_ONCE(chnl >= 32); ++ return SCD_BASE + 0x284 + (chnl - 20) * 4; ++} ++ ++static inline unsigned int SCD_QUEUE_RDPTR(unsigned int chnl) ++{ ++ if (chnl < 20) ++ return SCD_BASE + 0x68 + chnl * 4; ++ WARN_ON_ONCE(chnl >= 32); ++ return SCD_BASE + 0x2B4 + (chnl - 20) * 4; ++} ++ ++static inline unsigned int SCD_QUEUE_STATUS_BITS(unsigned int chnl) ++{ ++ if (chnl < 20) ++ return SCD_BASE + 0x10c + chnl * 4; ++ WARN_ON_ONCE(chnl >= 32); ++ return SCD_BASE + 0x384 + (chnl - 20) * 4; ++} + + /*********************** END TX SCHEDULER *************************************/ + +-- +1.7.7.6 + 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 @@ +From e5c4ffba0f91d7315823292c6a46a0e3a35cf5f1 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Fri, 4 May 2012 12:09:39 -0700 +Subject: [PATCH 147/165] hfsplus: Fix potential buffer overflows + +commit 6f24f892871acc47b40dd594c63606a17c714f77 upstream. + +Commit ec81aecb2966 ("hfs: fix a potential buffer overflow") fixed a few +potential buffer overflows in the hfs filesystem. But as Timo Warns +pointed out, these changes also need to be made on the hfsplus +filesystem as well. + +Reported-by: Timo Warns +Acked-by: WANG Cong +Cc: Alexey Khoroshilov +Cc: Miklos Szeredi +Cc: Sage Weil +Cc: Eugene Teo +Cc: Roman Zippel +Cc: Al Viro +Cc: Christoph Hellwig +Cc: Alexey Dobriyan +Cc: Dave Anderson +Cc: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + fs/hfsplus/catalog.c | 4 ++++ + fs/hfsplus/dir.c | 11 +++++++++++ + 2 files changed, 15 insertions(+), 0 deletions(-) + +diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c +index 4dfbfec..ec2a9c2 100644 +--- a/fs/hfsplus/catalog.c ++++ b/fs/hfsplus/catalog.c +@@ -366,6 +366,10 @@ int hfsplus_rename_cat(u32 cnid, + err = hfs_brec_find(&src_fd); + if (err) + goto out; ++ if (src_fd.entrylength > sizeof(entry) || src_fd.entrylength < 0) { ++ err = -EIO; ++ goto out; ++ } + + hfs_bnode_read(src_fd.bnode, &entry, src_fd.entryoffset, + src_fd.entrylength); +diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c +index 4536cd3..5adb740 100644 +--- a/fs/hfsplus/dir.c ++++ b/fs/hfsplus/dir.c +@@ -150,6 +150,11 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) + filp->f_pos++; + /* fall through */ + case 1: ++ if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) { ++ err = -EIO; ++ goto out; ++ } ++ + hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, + fd.entrylength); + if (be16_to_cpu(entry.type) != HFSPLUS_FOLDER_THREAD) { +@@ -181,6 +186,12 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) + err = -EIO; + goto out; + } ++ ++ if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) { ++ err = -EIO; ++ goto out; ++ } ++ + hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, + fd.entrylength); + type = be16_to_cpu(entry.type); +-- +1.7.7.6 + 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 @@ +From b0209aed70b2cc2a544817e2b57d68d9dfcf4635 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eric=20B=C3=A9nard?= +Date: Sun, 29 Apr 2012 17:37:57 +0200 +Subject: [PATCH 148/165] ASoC: tlv312aic23: unbreak resume +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit e875c1e3e758447ba81ca450d89434b3b0496d37 upstream. + +* commit f9dfbf9 "ASoC: tlv320aic23: convert to soc-cache" leads to +a bug preventing resumeof the codec as regmap expects a 9 bits data +register but 0xFFFF is passed in tlv320aic23_set_bias_level and this +values gets cached preventing any write to the TLV320AIC23_PWR +register as the final value produced by regmap is (register << 9) | value + +* this patch solves the problem by only working on the 9 bits the +register contains. + +Signed-off-by: Eric BĂ©nard +Signed-off-by: Mark Brown +Signed-off-by: Ben Hutchings +--- + sound/soc/codecs/tlv320aic23.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c +index 336de8f..0e7e26e 100644 +--- a/sound/soc/codecs/tlv320aic23.c ++++ b/sound/soc/codecs/tlv320aic23.c +@@ -473,7 +473,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai, + static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, + enum snd_soc_bias_level level) + { +- u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f; ++ u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f; + + switch (level) { + case SND_SOC_BIAS_ON: +@@ -492,7 +492,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, + case SND_SOC_BIAS_OFF: + /* everything off, dac mute, inactive */ + snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0); +- snd_soc_write(codec, TLV320AIC23_PWR, 0xffff); ++ snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff); + break; + } + codec->dapm.bias_level = level; +-- +1.7.7.6 + 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 @@ +From 09fdfacc87dfa2183da3d66ac788901636ef33f2 Mon Sep 17 00:00:00 2001 +From: "H. Peter Anvin" +Date: Thu, 26 Apr 2012 11:45:16 -0700 +Subject: [PATCH 149/165] asm-generic: Use __BITS_PER_LONG in statfs.h + +commit f5c2347ee20a8d6964d6a6b1ad04f200f8d4dfa7 upstream. + + is exported to userspace, so using +BITS_PER_LONG is invalid. We need to use __BITS_PER_LONG instead. + +This is kernel bugzilla 43165. + +Reported-by: H.J. Lu +Signed-off-by: H. Peter Anvin +Link: http://lkml.kernel.org/r/1335465916-16965-1-git-send-email-hpa@linux.intel.com +Acked-by: Arnd Bergmann +Signed-off-by: Ben Hutchings +--- + include/asm-generic/statfs.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/asm-generic/statfs.h b/include/asm-generic/statfs.h +index 0fd28e0..c749af9 100644 +--- a/include/asm-generic/statfs.h ++++ b/include/asm-generic/statfs.h +@@ -15,7 +15,7 @@ typedef __kernel_fsid_t fsid_t; + * with a 10' pole. + */ + #ifndef __statfs_word +-#if BITS_PER_LONG == 64 ++#if __BITS_PER_LONG == 64 + #define __statfs_word long + #else + #define __statfs_word __u32 +-- +1.7.7.6 + 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 @@ +From 174b97406f578b117e9403dde42ac98f80919a0b Mon Sep 17 00:00:00 2001 +From: Kusanagi Kouichi +Date: Sun, 1 Apr 2012 17:29:32 +0900 +Subject: [PATCH 150/165] x86, relocs: Remove an unused variable + +commit 7c77cda0fe742ed07622827ce80963bbeebd1e3f upstream. + +sh_symtab is set but not used. + +[ hpa: putting this in urgent because of the sheer harmlessness of the patch: + it quiets a build warning but does not change any generated code. ] + +Signed-off-by: Kusanagi Kouichi +Link: http://lkml.kernel.org/r/20120401082932.D5E066FC03D@msa105.auone-net.jp +Signed-off-by: H. Peter Anvin +Signed-off-by: Ben Hutchings +--- + arch/x86/boot/compressed/relocs.c | 2 -- + 1 files changed, 0 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c +index 89bbf4e..e77f4e4 100644 +--- a/arch/x86/boot/compressed/relocs.c ++++ b/arch/x86/boot/compressed/relocs.c +@@ -402,13 +402,11 @@ static void print_absolute_symbols(void) + for (i = 0; i < ehdr.e_shnum; i++) { + struct section *sec = &secs[i]; + char *sym_strtab; +- Elf32_Sym *sh_symtab; + int j; + + if (sec->shdr.sh_type != SHT_SYMTAB) { + continue; + } +- sh_symtab = sec->symtab; + sym_strtab = sec->link->strtab; + for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Sym); j++) { + Elf32_Sym *sym; +-- +1.7.7.6 + 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 @@ +From 8a73393b01a8d2a9959a094d34d037802d78161b Mon Sep 17 00:00:00 2001 +From: Tim Bird +Date: Wed, 2 May 2012 22:55:39 +0100 +Subject: [PATCH 151/165] ARM: 7410/1: Add extra clobber registers for + assembly in kernel_execve + +commit e787ec1376e862fcea1bfd523feb7c5fb43ecdb9 upstream. + +The inline assembly in kernel_execve() uses r8 and r9. Since this +code sequence does not return, it usually doesn't matter if the +register clobber list is accurate. However, I saw a case where a +particular version of gcc used r8 as an intermediate for the value +eventually passed to r9. Because r8 is used in the inline +assembly, and not mentioned in the clobber list, r9 was set +to an incorrect value. + +This resulted in a kernel panic on execution of the first user-space +program in the system. r9 is used in ret_to_user as the thread_info +pointer, and if it's wrong, bad things happen. + +Signed-off-by: Tim Bird +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +--- + arch/arm/kernel/sys_arm.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c +index d2b1779..76cbb05 100644 +--- a/arch/arm/kernel/sys_arm.c ++++ b/arch/arm/kernel/sys_arm.c +@@ -115,7 +115,7 @@ int kernel_execve(const char *filename, + "Ir" (THREAD_START_SP - sizeof(regs)), + "r" (®s), + "Ir" (sizeof(regs)) +- : "r0", "r1", "r2", "r3", "ip", "lr", "memory"); ++ : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory"); + + out: + return ret; +-- +1.7.7.6 + 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 @@ +From c4c0043207f643dbe84706b1f3d6948b1e2de64d Mon Sep 17 00:00:00 2001 +From: Colin Cross +Date: Sat, 5 May 2012 20:58:13 +0100 +Subject: [PATCH 152/165] ARM: 7414/1: SMP: prevent use of the console when + using idmap_pgd + +commit fde165b2a29673aabf18ceff14dea1f1cfb0daad upstream. + +Commit 4e8ee7de227e3ab9a72040b448ad728c5428a042 (ARM: SMP: use +idmap_pgd for mapping MMU enable during secondary booting) +switched secondary boot to use idmap_pgd, which is initialized +during early_initcall, instead of a page table initialized during +__cpu_up. This causes idmap_pgd to contain the static mappings +but be missing all dynamic mappings. + +If a console is registered that creates a dynamic mapping, the +printk in secondary_start_kernel will trigger a data abort on +the missing mapping before the exception handlers have been +initialized, leading to a hang. Initial boot is not affected +because no consoles have been registered, and resume is usually +not affected because the offending console is suspended. +Onlining a cpu with hotplug triggers the problem. + +A workaround is to the printk in secondary_start_kernel until +after the page tables have been switched back to init_mm. + +Signed-off-by: Colin Cross +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +--- + arch/arm/kernel/smp.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c +index ef5640b..e10e59a 100644 +--- a/arch/arm/kernel/smp.c ++++ b/arch/arm/kernel/smp.c +@@ -297,8 +297,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void) + struct mm_struct *mm = &init_mm; + unsigned int cpu = smp_processor_id(); + +- printk("CPU%u: Booted secondary processor\n", cpu); +- + /* + * All kernel threads share the same mm context; grab a + * reference and switch to it. +@@ -310,6 +308,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void) + enter_lazy_tlb(mm, current); + local_flush_tlb_all(); + ++ printk("CPU%u: Booted secondary processor\n", cpu); ++ + cpu_init(); + preempt_disable(); + trace_hardirqs_off(); +-- +1.7.7.6 + 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 @@ +From fa5bf9a9b89ddc63cb451a2aecb112c7715aaffb Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Fri, 4 May 2012 11:29:56 +0200 +Subject: [PATCH 153/165] drm/i915: disable sdvo hotplug on i945g/gm +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit 768b107e4b3be0acf6f58e914afe4f337c00932b upstream. + +Chris Wilson dug out a hw erratum saying that there's noise on the +interrupt line on i945G chips. We also have a bug report from a i945GM +chip with an sdvo hotplug interrupt storm (and no apparent cause). + +Play it safe and disable sdvo hotplug on all i945 variants. + +Note that this is a regression that has been introduced in 3.1, +when we've enabled sdvo hotplug support with + +commit cc68c81aed7d892deaf12d720d5455208e94cd0a +Author: Simon Farnsworth +Date: Wed Sep 21 17:13:30 2011 +0100 + + drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=38442 +Reported-and-tested-by: Dominik Köppl +Reviewed-by: Chris Wilson +Signed-Off-by: Daniel Vetter +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/intel_sdvo.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c +index 0a877dd..8eddcca 100644 +--- a/drivers/gpu/drm/i915/intel_sdvo.c ++++ b/drivers/gpu/drm/i915/intel_sdvo.c +@@ -1221,8 +1221,14 @@ static bool intel_sdvo_get_capabilities(struct intel_sdvo *intel_sdvo, struct in + + static int intel_sdvo_supports_hotplug(struct intel_sdvo *intel_sdvo) + { ++ struct drm_device *dev = intel_sdvo->base.base.dev; + u8 response[2]; + ++ /* HW Erratum: SDVO Hotplug is broken on all i945G chips, there's noise ++ * on the line. */ ++ if (IS_I945G(dev) || IS_I945GM(dev)) ++ return false; ++ + return intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT, + &response, 2) && response[0]; + } +-- +1.7.7.6 + 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 @@ +From 69056e5ea1d5eef50061b03d95dc6afd26ee9627 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Sun, 6 May 2012 16:50:24 +0200 +Subject: [PATCH 154/165] drm/i915: Do no set Stencil Cache eviction LRA w/a + on gen7+ + +commit 2e7a44814d802c8ba479164b8924070cd908d6b5 upstream. + +I've flagged this while reviewing the first version and Ken Graunke +fixed it up in v2, but unfortunately Dave Airlie picked up the wrong +version. + +Cc: Dave Airlie +Cc: Kenneth Graunke +Signed-Off-by: Daniel Vetter +Signed-off-by: Ben Hutchings +--- + drivers/gpu/drm/i915/intel_ringbuffer.c | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c +index 273f403..62f9ac5 100644 +--- a/drivers/gpu/drm/i915/intel_ringbuffer.c ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c +@@ -414,10 +414,8 @@ static int init_render_ring(struct intel_ring_buffer *ring) + return ret; + } + +- if (INTEL_INFO(dev)->gen >= 6) { +- I915_WRITE(INSTPM, +- INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); + ++ if (IS_GEN6(dev)) { + /* From the Sandybridge PRM, volume 1 part 3, page 24: + * "If this bit is set, STCunit will have LRA as replacement + * policy. [...] This bit must be reset. LRA replacement +@@ -427,6 +425,11 @@ static int init_render_ring(struct intel_ring_buffer *ring) + CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT); + } + ++ if (INTEL_INFO(dev)->gen >= 6) { ++ I915_WRITE(INSTPM, ++ INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); ++ } ++ + return ret; + } + +-- +1.7.7.6 + 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 @@ +From 9476d5b9241f9e02cf2d0b0789e8e229709d54bf Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Thu, 3 May 2012 16:14:14 -0400 +Subject: [PATCH 155/165] xen/pte: Fix crashes when trying to see non-existent + PGD/PMD/PUD/PTEs + +commit b7e5ffe5d83fa40d702976d77452004abbe35791 upstream. + +If I try to do "cat /sys/kernel/debug/kernel_page_tables" +I end up with: + +BUG: unable to handle kernel paging request at ffffc7fffffff000 +IP: [] ptdump_show+0x221/0x480 +PGD 0 +Oops: 0000 [#1] SMP +CPU 0 +.. snip.. +RAX: 0000000000000000 RBX: ffffc00000000fff RCX: 0000000000000000 +RDX: 0000800000000000 RSI: 0000000000000000 RDI: ffffc7fffffff000 + +which is due to the fact we are trying to access a PFN that is not +accessible to us. The reason (at least in this case) was that +PGD[256] is set to __HYPERVISOR_VIRT_START which was setup (by the +hypervisor) to point to a read-only linear map of the MFN->PFN array. +During our parsing we would get the MFN (a valid one), try to look +it up in the MFN->PFN tree and find it invalid and return ~0 as PFN. +Then pte_mfn_to_pfn would happilly feed that in, attach the flags +and return it back to the caller. 'ptdump_show' bitshifts it and +gets and invalid value that it tries to dereference. + +Instead of doing all of that, we detect the ~0 case and just +return !_PAGE_PRESENT. + +This bug has been in existence .. at least until 2.6.37 (yikes!) + +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Ben Hutchings +--- + arch/x86/xen/mmu.c | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c +index 87f6673..ec3d603 100644 +--- a/arch/x86/xen/mmu.c ++++ b/arch/x86/xen/mmu.c +@@ -353,8 +353,13 @@ static pteval_t pte_mfn_to_pfn(pteval_t val) + { + if (val & _PAGE_PRESENT) { + unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; ++ unsigned long pfn = mfn_to_pfn(mfn); ++ + pteval_t flags = val & PTE_FLAGS_MASK; +- val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; ++ if (unlikely(pfn == ~0)) ++ val = flags & ~_PAGE_PRESENT; ++ else ++ val = ((pteval_t)pfn << PAGE_SHIFT) | flags; + } + + return val; +-- +1.7.7.6 + 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 @@ +From 26cb931f7927821d30686897588964e66b9ec156 Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Fri, 4 May 2012 14:29:46 +0100 +Subject: [PATCH 156/165] xen/pci: don't use PCI BIOS service for + configuration space accesses + +commit 76a8df7b49168509df02461f83fab117a4a86e08 upstream. + +The accessing PCI configuration space with the PCI BIOS32 service does +not work in PV guests. + +On systems without MMCONFIG or where the BIOS hasn't marked the +MMCONFIG region as reserved in the e820 map, the BIOS service is +probed (even though direct access is preferred) and this hangs. + +Acked-by: Jan Beulich +Signed-off-by: David Vrabel +[v1: Fixed compile error when CONFIG_PCI is not set] +Signed-off-by: Konrad Rzeszutek Wilk +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + arch/x86/xen/enlighten.c | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c +index 1f92865..e7c920b 100644 +--- a/arch/x86/xen/enlighten.c ++++ b/arch/x86/xen/enlighten.c +@@ -62,6 +62,7 @@ + #include + #include + #include ++#include + + #include "xen-ops.h" + #include "mmu.h" +@@ -1278,8 +1279,10 @@ asmlinkage void __init xen_start_kernel(void) + /* Make sure ACS will be enabled */ + pci_request_acs(); + } +- +- ++#ifdef CONFIG_PCI ++ /* PCI BIOS service won't work from a PV guest. */ ++ pci_probe &= ~PCI_PROBE_BIOS; ++#endif + xen_raw_console_write("about to get started...\n"); + + xen_setup_runstate_info(0); +-- +1.7.7.6 + 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 @@ +From 40bfc308a453997d543e78d6c825275710c48a1c Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Fri, 27 Apr 2012 10:54:35 -0700 +Subject: [PATCH 157/165] percpu, x86: don't use PMD_SIZE as embedded + atom_size on 32bit + +commit d5e28005a1d2e67833852f4c9ea8ec206ea3ff85 upstream. + +With the embed percpu first chunk allocator, x86 uses either PAGE_SIZE +or PMD_SIZE for atom_size. PMD_SIZE is used when CPU supports PSE so +that percpu areas are aligned to PMD mappings and possibly allow using +PMD mappings in vmalloc areas in the future. Using larger atom_size +doesn't waste actual memory; however, it does require larger vmalloc +space allocation later on for !first chunks. + +With reasonably sized vmalloc area, PMD_SIZE shouldn't be a problem +but x86_32 at this point is anything but reasonable in terms of +address space and using larger atom_size reportedly leads to frequent +percpu allocation failures on certain setups. + +As there is no reason to not use PMD_SIZE on x86_64 as vmalloc space +is aplenty and most x86_64 configurations support PSE, fix the issue +by always using PMD_SIZE on x86_64 and PAGE_SIZE on x86_32. + +v2: drop cpu_has_pse test and make x86_64 always use PMD_SIZE and + x86_32 PAGE_SIZE as suggested by hpa. + +Signed-off-by: Tejun Heo +Reported-by: Yanmin Zhang +Reported-by: ShuoX Liu +Acked-by: H. Peter Anvin +LKML-Reference: <4F97BA98.6010001@intel.com> +Signed-off-by: Ben Hutchings +--- + arch/x86/kernel/setup_percpu.c | 14 +++++++++++++- + 1 files changed, 13 insertions(+), 1 deletions(-) + +diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c +index 71f4727..5a98aa2 100644 +--- a/arch/x86/kernel/setup_percpu.c ++++ b/arch/x86/kernel/setup_percpu.c +@@ -185,10 +185,22 @@ void __init setup_per_cpu_areas(void) + #endif + rc = -EINVAL; + if (pcpu_chosen_fc != PCPU_FC_PAGE) { +- const size_t atom_size = cpu_has_pse ? PMD_SIZE : PAGE_SIZE; + const size_t dyn_size = PERCPU_MODULE_RESERVE + + PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE; ++ size_t atom_size; + ++ /* ++ * On 64bit, use PMD_SIZE for atom_size so that embedded ++ * percpu areas are aligned to PMD. This, in the future, ++ * can also allow using PMD mappings in vmalloc area. Use ++ * PAGE_SIZE on 32bit as vmalloc space is highly contended ++ * and large vmalloc area allocs can easily fail. ++ */ ++#ifdef CONFIG_X86_64 ++ atom_size = PMD_SIZE; ++#else ++ atom_size = PAGE_SIZE; ++#endif + rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE, + dyn_size, atom_size, + pcpu_cpu_distance, +-- +1.7.7.6 + 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 @@ +From cad1b4d0f128eb46af3732795f91e3aba5ea4fbb Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Fri, 4 Nov 2011 07:22:37 -0700 +Subject: [PATCH 158/165] iwlagn: allow up to uCode API 6 for 6000 devices + +commit b914811524fbe9e91fe50845f5d7bd4316b8a6ee upstream. + +Since the uCode hasn't been released (yet?), +warn only if using older than API 4, but load +anything up to API 6. + +Signed-off-by: Johannes Berg +Signed-off-by: Wey-Yi Guy +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/iwlwifi/iwl-6000.c | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c +index c840c78..ae3ea32 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-6000.c ++++ b/drivers/net/wireless/iwlwifi/iwl-6000.c +@@ -46,11 +46,12 @@ + #include "iwl-cfg.h" + + /* Highest firmware API version supported */ +-#define IWL6000_UCODE_API_MAX 4 ++#define IWL6000_UCODE_API_MAX 6 + #define IWL6050_UCODE_API_MAX 5 + #define IWL6000G2_UCODE_API_MAX 6 + + /* Oldest version we won't warn about */ ++#define IWL6000_UCODE_API_OK 4 + #define IWL6000G2_UCODE_API_OK 5 + + /* Lowest firmware API version supported */ +@@ -479,6 +480,7 @@ struct iwl_cfg iwl130_bg_cfg = { + #define IWL_DEVICE_6000i \ + .fw_name_pre = IWL6000_FW_PRE, \ + .ucode_api_max = IWL6000_UCODE_API_MAX, \ ++ .ucode_api_ok = IWL6000_UCODE_API_OK, \ + .ucode_api_min = IWL6000_UCODE_API_MIN, \ + .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \ + .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \ +@@ -559,6 +561,7 @@ struct iwl_cfg iwl6000_3agn_cfg = { + .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN", + .fw_name_pre = IWL6000_FW_PRE, + .ucode_api_max = IWL6000_UCODE_API_MAX, ++ .ucode_api_ok = IWL6000_UCODE_API_OK, + .ucode_api_min = IWL6000_UCODE_API_MIN, + .eeprom_ver = EEPROM_6000_EEPROM_VERSION, + .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, +@@ -569,7 +572,7 @@ struct iwl_cfg iwl6000_3agn_cfg = { + .led_mode = IWL_LED_BLINK, + }; + +-MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); ++MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK)); + MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); + MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); + MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); +-- +1.7.7.6 + 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 @@ +From 6ae066df7c16000f163eab3a745b711447536e70 Mon Sep 17 00:00:00 2001 +From: Meenakshi Venkataraman +Date: Sun, 22 Apr 2012 07:55:27 -0700 +Subject: [PATCH 159/165] iwlwifi: use correct released ucode version + +commit 78cbcf2b9dbe0565820dc7721316f9c401000a68 upstream. + +Report correctly the latest released version +of the iwlwifi firmware for all +iwlwifi-supported devices. + +Signed-off-by: Meenakshi Venkataraman +Signed-off-by: Wey-Yi Guy +Signed-off-by: John W. Linville +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/iwlwifi/iwl-1000.c | 8 ++++---- + drivers/net/wireless/iwlwifi/iwl-2000.c | 16 ++++++++-------- + drivers/net/wireless/iwlwifi/iwl-5000.c | 11 +++++++++-- + drivers/net/wireless/iwlwifi/iwl-6000.c | 10 ++++++---- + 4 files changed, 27 insertions(+), 18 deletions(-) + +diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c +index dd008b0..1e6c8cc 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-1000.c ++++ b/drivers/net/wireless/iwlwifi/iwl-1000.c +@@ -45,8 +45,8 @@ + #include "iwl-cfg.h" + + /* Highest firmware API version supported */ +-#define IWL1000_UCODE_API_MAX 6 +-#define IWL100_UCODE_API_MAX 6 ++#define IWL1000_UCODE_API_MAX 5 ++#define IWL100_UCODE_API_MAX 5 + + /* Oldest version we won't warn about */ + #define IWL1000_UCODE_API_OK 5 +@@ -244,5 +244,5 @@ struct iwl_cfg iwl100_bg_cfg = { + IWL_DEVICE_100, + }; + +-MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); +-MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX)); ++MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK)); ++MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK)); +diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c +index 7943197..9823e41 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-2000.c ++++ b/drivers/net/wireless/iwlwifi/iwl-2000.c +@@ -51,10 +51,10 @@ + #define IWL135_UCODE_API_MAX 6 + + /* Oldest version we won't warn about */ +-#define IWL2030_UCODE_API_OK 5 +-#define IWL2000_UCODE_API_OK 5 +-#define IWL105_UCODE_API_OK 5 +-#define IWL135_UCODE_API_OK 5 ++#define IWL2030_UCODE_API_OK 6 ++#define IWL2000_UCODE_API_OK 6 ++#define IWL105_UCODE_API_OK 6 ++#define IWL135_UCODE_API_OK 6 + + /* Lowest firmware API version supported */ + #define IWL2030_UCODE_API_MIN 5 +@@ -372,7 +372,7 @@ struct iwl_cfg iwl135_bgn_cfg = { + .ht_params = &iwl2000_ht_params, + }; + +-MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX)); +-MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX)); +-MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX)); +-MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX)); ++MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_OK)); ++MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_OK)); ++MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_OK)); ++MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_OK)); +diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c +index f55fb2d..606213f 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-5000.c ++++ b/drivers/net/wireless/iwlwifi/iwl-5000.c +@@ -50,6 +50,10 @@ + #define IWL5000_UCODE_API_MAX 5 + #define IWL5150_UCODE_API_MAX 2 + ++/* Oldest version we won't warn about */ ++#define IWL5000_UCODE_API_OK 5 ++#define IWL5150_UCODE_API_OK 2 ++ + /* Lowest firmware API version supported */ + #define IWL5000_UCODE_API_MIN 1 + #define IWL5150_UCODE_API_MIN 1 +@@ -373,6 +377,7 @@ static struct iwl_ht_params iwl5000_ht_params = { + #define IWL_DEVICE_5000 \ + .fw_name_pre = IWL5000_FW_PRE, \ + .ucode_api_max = IWL5000_UCODE_API_MAX, \ ++ .ucode_api_ok = IWL5000_UCODE_API_OK, \ + .ucode_api_min = IWL5000_UCODE_API_MIN, \ + .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ + .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ +@@ -416,6 +421,7 @@ struct iwl_cfg iwl5350_agn_cfg = { + .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", + .fw_name_pre = IWL5000_FW_PRE, + .ucode_api_max = IWL5000_UCODE_API_MAX, ++ .ucode_api_ok = IWL5000_UCODE_API_OK, + .ucode_api_min = IWL5000_UCODE_API_MIN, + .eeprom_ver = EEPROM_5050_EEPROM_VERSION, + .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, +@@ -429,6 +435,7 @@ struct iwl_cfg iwl5350_agn_cfg = { + #define IWL_DEVICE_5150 \ + .fw_name_pre = IWL5150_FW_PRE, \ + .ucode_api_max = IWL5150_UCODE_API_MAX, \ ++ .ucode_api_ok = IWL5150_UCODE_API_OK, \ + .ucode_api_min = IWL5150_UCODE_API_MIN, \ + .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ + .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ +@@ -450,5 +457,5 @@ struct iwl_cfg iwl5150_abg_cfg = { + IWL_DEVICE_5150, + }; + +-MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); +-MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX)); ++MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK)); ++MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK)); +diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c +index ae3ea32..9509298 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-6000.c ++++ b/drivers/net/wireless/iwlwifi/iwl-6000.c +@@ -53,6 +53,8 @@ + /* Oldest version we won't warn about */ + #define IWL6000_UCODE_API_OK 4 + #define IWL6000G2_UCODE_API_OK 5 ++#define IWL6050_UCODE_API_OK 5 ++#define IWL6000G2B_UCODE_API_OK 6 + + /* Lowest firmware API version supported */ + #define IWL6000_UCODE_API_MIN 4 +@@ -359,7 +361,7 @@ static struct iwl_bt_params iwl6000_bt_params = { + #define IWL_DEVICE_6005 \ + .fw_name_pre = IWL6005_FW_PRE, \ + .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ +- .ucode_api_ok = IWL6000G2_UCODE_API_OK, \ ++ .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ + .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ + .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \ + .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ +@@ -573,6 +575,6 @@ struct iwl_cfg iwl6000_3agn_cfg = { + }; + + MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK)); +-MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); +-MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); +-MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); ++MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK)); ++MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK)); ++MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK)); +-- +1.7.7.6 + 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 @@ +From 4d665b9d5d7be0652d0942fe8bd0ea3bd3d73ebd Mon Sep 17 00:00:00 2001 +From: Wey-Yi Guy +Date: Wed, 25 Apr 2012 08:10:08 -0700 +Subject: [PATCH 160/165] iwlwifi: use 6000G2B for 6030 device series + +commit 1ed2ec37b44e86eaa8e0a03b908a39c80f65ee45 upstream. + +"iwlwifi: use correct released ucode version" change +the ucode api ok from 6000G2 to 6000G2B, but it shall belong +to 6030 device series, not the 6005 device series. Fix it + +Signed-off-by: Wey-Yi Guy +Signed-off-by: John W. Linville +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/iwlwifi/iwl-6000.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c +index 9509298..b4f809c 100644 +--- a/drivers/net/wireless/iwlwifi/iwl-6000.c ++++ b/drivers/net/wireless/iwlwifi/iwl-6000.c +@@ -361,7 +361,7 @@ static struct iwl_bt_params iwl6000_bt_params = { + #define IWL_DEVICE_6005 \ + .fw_name_pre = IWL6005_FW_PRE, \ + .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ +- .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ ++ .ucode_api_ok = IWL6000G2_UCODE_API_OK, \ + .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ + .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \ + .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ +@@ -402,7 +402,7 @@ struct iwl_cfg iwl6005_2agn_d_cfg = { + #define IWL_DEVICE_6030 \ + .fw_name_pre = IWL6030_FW_PRE, \ + .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ +- .ucode_api_ok = IWL6000G2_UCODE_API_OK, \ ++ .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ + .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ + .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ + .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ +-- +1.7.7.6 + 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 @@ +From 24b4ef6e688f21346c5385ef56f4d9bc8c9e4c2c Mon Sep 17 00:00:00 2001 +From: Oleg Nesterov +Date: Mon, 19 Mar 2012 17:03:22 +0100 +Subject: [PATCH 161/165] exit_signal: simplify the "we have changed execution + domain" logic + +commit e636825346b36a07ccfc8e30946d52855e21f681 upstream. + +exit_notify() checks "tsk->self_exec_id != tsk->parent_exec_id" +to handle the "we have changed execution domain" case. + +We can change do_thread() to always set ->exit_signal = SIGCHLD +and remove this check to simplify the code. + +We could change setup_new_exec() instead, this looks more logical +because it increments ->self_exec_id. But note that de_thread() +already resets ->exit_signal if it changes the leader, let's keep +both changes close to each other. + +Note that we change ->exit_signal lockless, this changes the rules. +Thereafter ->exit_signal is not stable under tasklist but this is +fine, the only possible change is OLDSIG -> SIGCHLD. This can race +with eligible_child() but the race is harmless. We can race with +reparent_leader() which changes our ->exit_signal in parallel, but +it does the same change to SIGCHLD. + +The noticeable user-visible change is that the execing task is not +"visible" to do_wait()->eligible_child(__WCLONE) right after exec. +To me this looks more logical, and this is consistent with mt case. + +Signed-off-by: Oleg Nesterov +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + fs/exec.c | 3 +++ + kernel/exit.c | 7 +------ + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/fs/exec.c b/fs/exec.c +index 3625464..160cd2f 100644 +--- a/fs/exec.c ++++ b/fs/exec.c +@@ -973,6 +973,9 @@ static int de_thread(struct task_struct *tsk) + sig->notify_count = 0; + + no_thread_group: ++ /* we have changed execution domain */ ++ tsk->exit_signal = SIGCHLD; ++ + if (current->mm) + setmax_mm_hiwater_rss(&sig->maxrss, current->mm); + +diff --git a/kernel/exit.c b/kernel/exit.c +index e6e01b9..ab66cb0 100644 +--- a/kernel/exit.c ++++ b/kernel/exit.c +@@ -828,14 +828,9 @@ static void exit_notify(struct task_struct *tsk, int group_dead) + * If the parent exec id doesn't match the exec id we saved + * when we started then we know the parent has changed security + * domain. +- * +- * If our self_exec id doesn't match our parent_exec_id then +- * we have changed execution domain as these two values started +- * the same after a fork. + */ + if (thread_group_leader(tsk) && tsk->exit_signal != SIGCHLD && +- (tsk->parent_exec_id != tsk->real_parent->self_exec_id || +- tsk->self_exec_id != tsk->parent_exec_id)) ++ tsk->parent_exec_id != tsk->real_parent->self_exec_id) + tsk->exit_signal = SIGCHLD; + + if (unlikely(tsk->ptrace)) { +-- +1.7.7.6 + 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 @@ +From a24587831e14c94ca7bc3d947ecea53269b37d96 Mon Sep 17 00:00:00 2001 +From: Oleg Nesterov +Date: Mon, 19 Mar 2012 17:03:41 +0100 +Subject: [PATCH 162/165] exit_signal: fix the "parent has changed security + domain" logic + +commit b6e238dceed36891cc633167afe7151f1f3d83c5 upstream. + +exit_notify() changes ->exit_signal if the parent already did exec. +This doesn't really work, we are not going to send the signal now +if there is another live thread or the exiting task is traced. The +parent can exec before the last dies or the tracer detaches. + +Move this check into do_notify_parent() which actually sends the +signal. + +The user-visible change is that we do not change ->exit_signal, +and thus the exiting task is still "clone children" for +do_wait()->eligible_child(__WCLONE). Hopefully this is fine, the +current logic is racy anyway. + +Signed-off-by: Oleg Nesterov +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + kernel/exit.c | 14 -------------- + kernel/signal.c | 9 +++++++++ + 2 files changed, 9 insertions(+), 14 deletions(-) + +diff --git a/kernel/exit.c b/kernel/exit.c +index ab66cb0..5a8a66e 100644 +--- a/kernel/exit.c ++++ b/kernel/exit.c +@@ -819,20 +819,6 @@ static void exit_notify(struct task_struct *tsk, int group_dead) + if (group_dead) + kill_orphaned_pgrp(tsk->group_leader, NULL); + +- /* Let father know we died +- * +- * Thread signals are configurable, but you aren't going to use +- * that to send signals to arbitrary processes. +- * That stops right now. +- * +- * If the parent exec id doesn't match the exec id we saved +- * when we started then we know the parent has changed security +- * domain. +- */ +- if (thread_group_leader(tsk) && tsk->exit_signal != SIGCHLD && +- tsk->parent_exec_id != tsk->real_parent->self_exec_id) +- tsk->exit_signal = SIGCHLD; +- + if (unlikely(tsk->ptrace)) { + int sig = thread_group_leader(tsk) && + thread_group_empty(tsk) && +diff --git a/kernel/signal.c b/kernel/signal.c +index 2065515..08e0b97 100644 +--- a/kernel/signal.c ++++ b/kernel/signal.c +@@ -1610,6 +1610,15 @@ bool do_notify_parent(struct task_struct *tsk, int sig) + BUG_ON(!tsk->ptrace && + (tsk->group_leader != tsk || !thread_group_empty(tsk))); + ++ if (sig != SIGCHLD) { ++ /* ++ * This is only possible if parent == real_parent. ++ * Check if it has changed security domain. ++ */ ++ if (tsk->parent_exec_id != tsk->parent->self_exec_id) ++ sig = SIGCHLD; ++ } ++ + info.si_signo = sig; + info.si_errno = 0; + /* +-- +1.7.7.6 + 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 @@ +From 2bf1f9816fc88b740d28781d6aa902daa3e4d6b1 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Sat, 25 Feb 2012 18:10:21 -0600 +Subject: [PATCH 163/165] staging: r8712u: Fix regression caused by commit + 8c213fa + +commit 2080913e017ab9f88379d93fd09546ad95faf87b upstream. + +In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading", +the command to release the firmware was placed in the wrong routine. + +In combination with the bug introduced in commit a5ee652 "staging: r8712u: +Interface-state not fully tracked", the driver attempts to upload firmware +that had already been released. This bug is the source of one of the +problems in https://bugs.archlinux.org/task/27996#comment89833. + +Tested-by: Alberto Lago Ballesteros +Tested-by: Adrian +Signed-off-by: Larry Finger +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Ben Hutchings +--- + drivers/staging/rtl8712/os_intfs.c | 3 --- + drivers/staging/rtl8712/usb_intf.c | 5 +++++ + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c +index fb11743..4bb2797 100644 +--- a/drivers/staging/rtl8712/os_intfs.c ++++ b/drivers/staging/rtl8712/os_intfs.c +@@ -476,9 +476,6 @@ static int netdev_close(struct net_device *pnetdev) + r8712_free_assoc_resources(padapter); + /*s2-4.*/ + r8712_free_network_queue(padapter); +- release_firmware(padapter->fw); +- /* never exit with a firmware callback pending */ +- wait_for_completion(&padapter->rtl8712_fw_ready); + return 0; + } + +diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c +index 9bade18..ec41d38 100644 +--- a/drivers/staging/rtl8712/usb_intf.c ++++ b/drivers/staging/rtl8712/usb_intf.c +@@ -30,6 +30,7 @@ + + #include + #include ++#include + + #include "osdep_service.h" + #include "drv_types.h" +@@ -621,6 +622,10 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf) + struct _adapter *padapter = netdev_priv(pnetdev); + struct usb_device *udev = interface_to_usbdev(pusb_intf); + ++ if (padapter->fw_found) ++ release_firmware(padapter->fw); ++ /* never exit with a firmware callback pending */ ++ wait_for_completion(&padapter->rtl8712_fw_ready); + usb_set_intfdata(pusb_intf, NULL); + if (padapter) { + if (drvpriv.drv_registered == true) +-- +1.7.7.6 + 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 @@ +From 0f1ae32284c0946f9ea7acabb3177ac20b22b9e5 Mon Sep 17 00:00:00 2001 +From: Paolo Pisati +Date: Mon, 23 Apr 2012 04:05:20 +0000 +Subject: [PATCH 164/165] smsc95xx: mark link down on startup and let PHY + interrupt deal with carrier changes + +commit 07d69d4238418746a7b85c5d05ec17c658a2a390 upstream. + +Without this patch sysfs reports the cable as present + +flag@flag-desktop:~$ cat /sys/class/net/eth0/carrier +1 + +while it's not: + +flag@flag-desktop:~$ sudo mii-tool eth0 +eth0: no link + +Tested on my Beagle XM. + +v2: added mantainer to the list of recipient + +Signed-off-by: Paolo Pisati +Acked-by: Steve Glendinning +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/usb/smsc95xx.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c +index eff6767..55b3218 100644 +--- a/drivers/net/usb/smsc95xx.c ++++ b/drivers/net/usb/smsc95xx.c +@@ -1190,7 +1190,7 @@ static const struct driver_info smsc95xx_info = { + .rx_fixup = smsc95xx_rx_fixup, + .tx_fixup = smsc95xx_tx_fixup, + .status = smsc95xx_status, +- .flags = FLAG_ETHER | FLAG_SEND_ZLP, ++ .flags = FLAG_ETHER | FLAG_SEND_ZLP | FLAG_LINK_INTR, + }; + + static const struct usb_device_id products[] = { +-- +1.7.7.6 + 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 @@ +From 4780abf2e3c25a099dd269b676d9696763f3eed6 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Fri, 11 May 2012 13:15:38 +0100 +Subject: [PATCH 165/165] Linux 3.2.17 + +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index 3da29cb..4c4efa3 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + VERSION = 3 + PATCHLEVEL = 2 +-SUBLEVEL = 16 ++SUBLEVEL = 17 + EXTRAVERSION = + NAME = Saber-toothed Squirrel + +-- +1.7.7.6 + 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 @@ +From 94383ff64ebeaa09055462cb48260eb2831235ef Mon Sep 17 00:00:00 2001 +From: Axel Lin +Date: Wed, 11 Apr 2012 20:53:58 +0800 +Subject: [PATCH 01/56] regulator: Fix the logic to ensure new voltage setting + in valid range + +commit f55205f4d4a8823a11bb8b37ef2ecbd78fb09463 upstream. + +I think this is a typo. +To ensure new voltage setting won't greater than desc->max, +the equation should be desc->min + desc->step * new_val <= desc->max. + +Signed-off-by: Axel Lin +Signed-off-by: Mark Brown +Signed-off-by: Ben Hutchings +--- + drivers/regulator/max8997.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c +index 6176129..8cba82d 100644 +--- a/drivers/regulator/max8997.c ++++ b/drivers/regulator/max8997.c +@@ -689,7 +689,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev, + } + + new_val++; +- } while (desc->min + desc->step + new_val <= desc->max); ++ } while (desc->min + desc->step * new_val <= desc->max); + + new_idx = tmp_idx; + new_val = tmp_val; +-- +1.7.7.6 + 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 @@ +From c0d0663f26ba8ed987704a454a360b1a5997e1d7 Mon Sep 17 00:00:00 2001 +From: Archit Taneja +Date: Thu, 19 Apr 2012 17:39:16 +0530 +Subject: [PATCH 02/56] ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY + register fields" + +commit 08ca7444f589bedf9ad5d82883e5d0754852d73b upstream. + +This reverts commit 46f8c3c7e95c0d30d95911e7975ddc4f93b3e237. + +The commit above swapped the DSI1_PPID and DSI2_PPID register fields in +CONTROL_DSIPHY to be in sync with the newer public OMAP TRMs(after version V). + +With this commit, contention errors were reported on DSI lanes some OMAP4 SDPs. +After probing the DSI lanes on OMAP4 SDP, it was seen that setting bits in the +DSI2_PPID field was pulling up voltage on DSI1 lanes, and DSI1_PPID field was +pulling up voltage on DSI2 lanes. + +This proves that the current version of OMAP4 TRM is incorrect, swap the +position of register fields according to the older TRM versions as they were +correct. + +Acked-by: Tomi Valkeinen +Signed-off-by: Archit Taneja +Signed-off-by: Tony Lindgren +Signed-off-by: Ben Hutchings +--- + .../include/mach/ctrl_module_pad_core_44xx.h | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --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 +index 1e2d332..c88420d 100644 +--- 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 +@@ -941,10 +941,10 @@ + #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) + #define OMAP4_DSI1_LANEENABLE_SHIFT 24 + #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) +-#define OMAP4_DSI2_PIPD_SHIFT 19 +-#define OMAP4_DSI2_PIPD_MASK (0x1f << 19) +-#define OMAP4_DSI1_PIPD_SHIFT 14 +-#define OMAP4_DSI1_PIPD_MASK (0x1f << 14) ++#define OMAP4_DSI1_PIPD_SHIFT 19 ++#define OMAP4_DSI1_PIPD_MASK (0x1f << 19) ++#define OMAP4_DSI2_PIPD_SHIFT 14 ++#define OMAP4_DSI2_PIPD_MASK (0x1f << 14) + + /* CONTROL_MCBSPLP */ + #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 +-- +1.7.7.6 + 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 @@ +From d88c1668a535d2abb3d201b8a521e46eff3f5e0e Mon Sep 17 00:00:00 2001 +From: Mark Hills +Date: Mon, 30 Apr 2012 19:39:22 +0100 +Subject: [PATCH 03/56] ALSA: echoaudio: Remove incorrect part of assertion + +commit c914f55f7cdfafe9d7d5b248751902c7ab57691e upstream. + +This assertion seems to imply that chip->dsp_code_to_load is a pointer. +It's actually an integer handle on the actual firmware, and 0 has no +special meaning. + +The assertion prevents initialisation of a Darla20 card, but would also +affect other models. It seems it was introduced in commit dd7b254d. + +ALSA sound/pci/echoaudio/echoaudio.c:2061 Echoaudio driver starting... +ALSA sound/pci/echoaudio/echoaudio.c:1969 chip=ebe4e000 +ALSA sound/pci/echoaudio/echoaudio.c:2007 pci=ed568000 irq=19 subdev=0010 Init hardware... +ALSA sound/pci/echoaudio/darla20_dsp.c:36 init_hw() - Darla20 +------------[ cut here ]------------ +WARNING: at sound/pci/echoaudio/echoaudio_dsp.c:478 init_hw+0x1d1/0x86c [snd_darla20]() +Hardware name: Dell DM051 +BUG? (!chip->dsp_code_to_load || !chip->comm_page) + +Signed-off-by: Mark Hills +Signed-off-by: Takashi Iwai +Signed-off-by: Ben Hutchings +--- + sound/pci/echoaudio/echoaudio_dsp.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c +index 64417a7..d8c670c 100644 +--- a/sound/pci/echoaudio/echoaudio_dsp.c ++++ b/sound/pci/echoaudio/echoaudio_dsp.c +@@ -475,7 +475,7 @@ static int load_firmware(struct echoaudio *chip) + const struct firmware *fw; + int box_type, err; + +- if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page)) ++ if (snd_BUG_ON(!chip->comm_page)) + return -EPERM; + + /* See if the ASIC is present and working - only if the DSP is already loaded */ +-- +1.7.7.6 + 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 @@ +From 900f27b9d47023edb709aad271b5d7516bb7c990 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Sun, 8 Apr 2012 05:18:53 +0100 +Subject: [PATCH 04/56] ARM: orion5x: Fix GPIO enable bits for MPP9 + +commit 48d99f47a81a66bdd61a348c7fe8df5a7afdf5f3 upstream. + +Commit 554cdaefd1cf7bb54b209c4e68c7cec87ce442a9 ('ARM: orion5x: Refactor +mpp code to use common orion platform mpp.') seems to have accidentally +inverted the GPIO valid bits for MPP9 (only). For the mv2120 platform +which uses MPP9 as a GPIO LED device, this results in the error: + +[ 12.711476] leds-gpio: probe of leds-gpio failed with error -22 + +Reported-by: Henry von Tresckow +References: http://bugs.debian.org/667446 +Signed-off-by: Ben Hutchings +Tested-by: Hans Henry von Tresckow +Signed-off-by: Jason Cooper +--- + arch/arm/mach-orion5x/mpp.h | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-orion5x/mpp.h b/arch/arm/mach-orion5x/mpp.h +index eac6897..db70e79 100644 +--- a/arch/arm/mach-orion5x/mpp.h ++++ b/arch/arm/mach-orion5x/mpp.h +@@ -65,8 +65,8 @@ + #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) + + #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) +-#define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1) +-#define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1) ++#define MPP9_GPIO MPP(9, 0x0, 1, 1, 1, 1, 1) ++#define MPP9_GIGE MPP(9, 0x1, 0, 0, 1, 1, 1) + + #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) + #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) +-- +1.7.7.6 + 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 @@ +From 3c3471703a78272a055d786ba1474384494bb7fc Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Fri, 4 May 2012 11:05:55 +0200 +Subject: [PATCH 05/56] ALSA: HDA: Lessen CPU usage when waiting for chip to + respond + +commit 32cf4023e689ad5b3a81a749d8cc99d7f184cb99 upstream. + +When an IRQ for some reason gets lost, we wait up to a second using +udelay, which is CPU intensive. This patch improves the situation by +waiting about 30 ms in the CPU intensive mode, then stepping down to +using msleep(2) instead. In essence, we trade some granularity in +exchange for less CPU consumption when the waiting time is a bit longer. + +As a result, PulseAudio should no longer be killed by the kernel +for taking up to much RT-prio CPU time. At least not for *this* reason. + +Signed-off-by: David Henningsson +Tested-by: Arun Raghavan +Signed-off-by: Takashi Iwai +Signed-off-by: Ben Hutchings +--- + sound/pci/hda/hda_intel.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c +index 192e6c0..53345bc 100644 +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -769,11 +769,13 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, + { + struct azx *chip = bus->private_data; + unsigned long timeout; ++ unsigned long loopcounter; + int do_poll = 0; + + again: + timeout = jiffies + msecs_to_jiffies(1000); +- for (;;) { ++ ++ for (loopcounter = 0;; loopcounter++) { + if (chip->polling_mode || do_poll) { + spin_lock_irq(&chip->reg_lock); + azx_update_rirb(chip); +@@ -789,7 +791,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, + } + if (time_after(jiffies, timeout)) + break; +- if (bus->needs_damn_long_delay) ++ if (bus->needs_damn_long_delay || loopcounter > 3000) + msleep(2); /* temporary workaround */ + else { + udelay(10); +-- +1.7.7.6 + 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 @@ +From c49984f9b2cba3ae4eb6ac7056e45cde17629a20 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Fri, 27 Apr 2012 08:42:53 -0700 +Subject: [PATCH 06/56] percpu: pcpu_embed_first_chunk() should free unused + parts after all allocs are complete + +commit 42b64281453249dac52861f9b97d18552a7ec62b upstream. + +pcpu_embed_first_chunk() allocates memory for each node, copies percpu +data and frees unused portions of it before proceeding to the next +group. This assumes that allocations for different nodes doesn't +overlap; however, depending on memory topology, the bootmem allocator +may end up allocating memory from a different node than the requested +one which may overlap with the portion freed from one of the previous +percpu areas. This leads to percpu groups for different nodes +overlapping which is a serious bug. + +This patch separates out copy & partial free from the allocation loop +such that all allocations are complete before partial frees happen. + +This also fixes overlapping frees which could happen on allocation +failure path - out_free_areas path frees whole groups but the groups +could have portions freed at that point. + +Signed-off-by: Tejun Heo +Reported-by: "Pavel V. Panteleev" +Tested-by: "Pavel V. Panteleev" +LKML-Reference: +Signed-off-by: Ben Hutchings +--- + mm/percpu.c | 10 ++++++++++ + 1 files changed, 10 insertions(+), 0 deletions(-) + +diff --git a/mm/percpu.c b/mm/percpu.c +index 716eb4a..5c29750 100644 +--- a/mm/percpu.c ++++ b/mm/percpu.c +@@ -1642,6 +1642,16 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, + areas[group] = ptr; + + base = min(ptr, base); ++ } ++ ++ /* ++ * Copy data and free unused parts. This should happen after all ++ * allocations are complete; otherwise, we may end up with ++ * overlapping groups. ++ */ ++ for (group = 0; group < ai->nr_groups; group++) { ++ struct pcpu_group_info *gi = &ai->groups[group]; ++ void *ptr = areas[group]; + + for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) { + if (gi->cpu_map[i] == NR_CPUS) { +-- +1.7.7.6 + 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 @@ +From 264ef98284920c3c4b7139ce642f41f9b253bc24 Mon Sep 17 00:00:00 2001 +From: Chris Metcalf +Date: Thu, 10 May 2012 13:01:44 -0700 +Subject: [PATCH 07/56] hugetlb: prevent BUG_ON in hugetlb_fault() -> + hugetlb_cow() + +commit 4998a6c0edce7fae9c0a5463f6ec3fa585258ee7 upstream. + +Commit 66aebce747eaf ("hugetlb: fix race condition in hugetlb_fault()") +added code to avoid a race condition by elevating the page refcount in +hugetlb_fault() while calling hugetlb_cow(). + +However, one code path in hugetlb_cow() includes an assertion that the +page count is 1, whereas it may now also have the value 2 in this path. + +The consensus is that this BUG_ON has served its purpose, so rather than +extending it to cover both cases, we just remove it. + +Signed-off-by: Chris Metcalf +Acked-by: Mel Gorman +Acked-by: Hillf Danton +Acked-by: Hugh Dickins +Cc: Michal Hocko +Cc: KAMEZAWA Hiroyuki +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + mm/hugetlb.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/mm/hugetlb.c b/mm/hugetlb.c +index bd936ed..7120c2e 100644 +--- a/mm/hugetlb.c ++++ b/mm/hugetlb.c +@@ -2405,7 +2405,6 @@ retry_avoidcopy: + if (outside_reserve) { + BUG_ON(huge_pte_none(pte)); + if (unmap_ref_private(mm, vma, old_page, address)) { +- BUG_ON(page_count(old_page) != 1); + BUG_ON(huge_pte_none(pte)); + spin_lock(&mm->page_table_lock); + goto retry_avoidcopy; +-- +1.7.7.6 + 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 @@ +From 524ae74866597ebc0894b12ce456d8a53f80f533 Mon Sep 17 00:00:00 2001 +From: Mike Galbraith +Date: Thu, 10 May 2012 13:01:45 -0700 +Subject: [PATCH 08/56] namespaces, pid_ns: fix leakage on fork() failure + +commit 5e2bf0142231194d36fdc9596b36a261ed2b9fe7 upstream. + +Fork() failure post namespace creation for a child cloned with +CLONE_NEWPID leaks pid_namespace/mnt_cache due to proc being mounted +during creation, but not unmounted during cleanup. Call +pid_ns_release_proc() during cleanup. + +Signed-off-by: Mike Galbraith +Acked-by: Oleg Nesterov +Reviewed-by: "Eric W. Biederman" +Cc: Pavel Emelyanov +Cc: Cyrill Gorcunov +Cc: Louis Rilling +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + kernel/fork.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/kernel/fork.c b/kernel/fork.c +index 0acf42c0..26f1ab0 100644 +--- a/kernel/fork.c ++++ b/kernel/fork.c +@@ -47,6 +47,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1387,6 +1388,8 @@ bad_fork_cleanup_io: + if (p->io_context) + exit_io_context(p); + bad_fork_cleanup_namespaces: ++ if (unlikely(clone_flags & CLONE_NEWPID)) ++ pid_ns_release_proc(p->nsproxy->pid_ns); + exit_task_namespaces(p); + bad_fork_cleanup_mm: + if (p->mm) +-- +1.7.7.6 + 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 @@ +From 06ae235e974156cc9304c169f89bba4d6ea4f6e4 Mon Sep 17 00:00:00 2001 +From: Russ Anderson +Date: Thu, 10 May 2012 13:01:46 -0700 +Subject: [PATCH 09/56] mm: nobootmem: fix sign extend problem in + __free_pages_memory() + +commit 6bc2e853c6b46a6041980d58200ad9b0a73a60ff upstream. + +Systems with 8 TBytes of memory or greater can hit a problem where only +the the first 8 TB of memory shows up. This is due to "int i" being +smaller than "unsigned long start_aligned", causing the high bits to be +dropped. + +The fix is to change `i' to unsigned long to match start_aligned +and end_aligned. + +Thanks to Jack Steiner for assistance tracking this down. + +Signed-off-by: Russ Anderson +Cc: Jack Steiner +Cc: Johannes Weiner +Cc: Tejun Heo +Cc: David S. Miller +Cc: Yinghai Lu +Cc: Gavin Shan +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Ben Hutchings +--- + mm/nobootmem.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/mm/nobootmem.c b/mm/nobootmem.c +index 7fa41b4..07c08c4 100644 +--- a/mm/nobootmem.c ++++ b/mm/nobootmem.c +@@ -83,8 +83,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size) + + static void __init __free_pages_memory(unsigned long start, unsigned long end) + { +- int i; +- unsigned long start_aligned, end_aligned; ++ unsigned long i, start_aligned, end_aligned; + int order = ilog2(BITS_PER_LONG); + + start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1); +-- +1.7.7.6 + 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 @@ +From ccd532b836540eb1f0e1d9eee4a87b8403d729c1 Mon Sep 17 00:00:00 2001 +From: Ingo van Lil +Date: Mon, 23 Apr 2012 22:05:38 +0000 +Subject: [PATCH 10/56] asix: Fix tx transfer padding for full-speed USB + +[ Upstream commit 2a5809499e35b53a6044fd34e72b242688b7a862 ] + +The asix.c USB Ethernet driver avoids ending a tx transfer with a zero- +length packet by appending a four-byte padding to transfers whose length +is a multiple of maxpacket. However, the hard-coded 512 byte maxpacket +length is valid for high-speed USB only; full-speed USB uses 64 byte +packets. + +Signed-off-by: Ingo van Lil +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/usb/asix.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c +index fda4be2..a9abee8 100644 +--- a/drivers/net/usb/asix.c ++++ b/drivers/net/usb/asix.c +@@ -403,7 +403,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, + u32 packet_len; + u32 padbytes = 0xffff0000; + +- padlen = ((skb->len + 4) % 512) ? 0 : 4; ++ padlen = ((skb->len + 4) & (dev->maxpacket - 1)) ? 0 : 4; + + if ((!skb_cloned(skb)) && + ((headroom + tailroom) >= (4 + padlen))) { +@@ -425,7 +425,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, + cpu_to_le32s(&packet_len); + skb_copy_to_linear_data(skb, &packet_len, sizeof(packet_len)); + +- if ((skb->len % 512) == 0) { ++ if (padlen) { + cpu_to_le32s(&padbytes); + memcpy(skb_tail_pointer(skb), &padbytes, sizeof(padbytes)); + skb_put(skb, sizeof(padbytes)); +-- +1.7.7.6 + 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 @@ +From abb480a271308924f4174413f6d6969ecaaba892 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Sun, 29 Apr 2012 09:08:22 +0000 +Subject: [PATCH 11/56] netem: fix possible skb leak + +[ Upstream commit 116a0fc31c6c9b8fc821be5a96e5bf0b43260131 ] + +skb_checksum_help(skb) can return an error, we must free skb in this +case. qdisc_drop(skb, sch) can also be feeded with a NULL skb (if +skb_unshare() failed), so lets use this generic helper. + +Signed-off-by: Eric Dumazet +Cc: Stephen Hemminger +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/sched/sch_netem.c | 6 ++---- + 1 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c +index 7801b15..a489d8b 100644 +--- a/net/sched/sch_netem.c ++++ b/net/sched/sch_netem.c +@@ -351,10 +351,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) + if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) { + if (!(skb = skb_unshare(skb, GFP_ATOMIC)) || + (skb->ip_summed == CHECKSUM_PARTIAL && +- skb_checksum_help(skb))) { +- sch->qstats.drops++; +- return NET_XMIT_DROP; +- } ++ skb_checksum_help(skb))) ++ return qdisc_drop(skb, sch); + + skb->data[net_random() % skb_headlen(skb)] ^= 1<<(net_random() % 8); + } +-- +1.7.7.6 + 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 @@ +From d2b1ac073ca1e2caabafe219d0d1f04f4a2d1467 Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Fri, 6 Apr 2012 15:33:35 +0000 +Subject: [PATCH 12/56] net: In unregister_netdevice_notifier unregister the + netdevices. + +[ Upstream commit 7d3d43dab4e978d8d9ad1acf8af15c9b1c4b0f0f ] + +We already synthesize events in register_netdevice_notifier and synthesizing +events in unregister_netdevice_notifier allows to us remove the need for +special case cleanup code. + +This change should be safe as it adds no new cases for existing callers +of unregiser_netdevice_notifier to handle. + +Signed-off-by: Eric W. Biederman +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/core/dev.c | 20 ++++++++++++++++++++ + 1 files changed, 20 insertions(+), 0 deletions(-) + +diff --git a/net/core/dev.c b/net/core/dev.c +index cd5050e..61a7baa 100644 +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -1421,14 +1421,34 @@ EXPORT_SYMBOL(register_netdevice_notifier); + * register_netdevice_notifier(). The notifier is unlinked into the + * kernel structures and may then be reused. A negative errno code + * is returned on a failure. ++ * ++ * After unregistering unregister and down device events are synthesized ++ * for all devices on the device list to the removed notifier to remove ++ * the need for special case cleanup code. + */ + + int unregister_netdevice_notifier(struct notifier_block *nb) + { ++ struct net_device *dev; ++ struct net *net; + int err; + + rtnl_lock(); + err = raw_notifier_chain_unregister(&netdev_chain, nb); ++ if (err) ++ goto unlock; ++ ++ for_each_net(net) { ++ for_each_netdev(net, dev) { ++ if (dev->flags & IFF_UP) { ++ nb->notifier_call(nb, NETDEV_GOING_DOWN, dev); ++ nb->notifier_call(nb, NETDEV_DOWN, dev); ++ } ++ nb->notifier_call(nb, NETDEV_UNREGISTER, dev); ++ nb->notifier_call(nb, NETDEV_UNREGISTER_BATCH, dev); ++ } ++ } ++unlock: + rtnl_unlock(); + return err; + } +-- +1.7.7.6 + 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 @@ +From 1b3ded810906676f03b6eab986308b1cf5e6b135 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 2 May 2012 03:58:43 +0000 +Subject: [PATCH 13/56] net: l2tp: unlock socket lock before returning from + l2tp_ip_sendmsg + +[ Upstream commit 84768edbb2721637620b2d84501bb0d5aed603f1 ] + +l2tp_ip_sendmsg could return without releasing socket lock, making it all the +way to userspace, and generating the following warning: + +[ 130.891594] ================================================ +[ 130.894569] [ BUG: lock held when returning to user space! ] +[ 130.897257] 3.4.0-rc5-next-20120501-sasha #104 Tainted: G W +[ 130.900336] ------------------------------------------------ +[ 130.902996] trinity/8384 is leaving the kernel with locks still held! +[ 130.906106] 1 lock held by trinity/8384: +[ 130.907924] #0: (sk_lock-AF_INET){+.+.+.}, at: [] l2tp_ip_sendmsg+0x2f/0x550 + +Introduced by commit 2f16270 ("l2tp: Fix locking in l2tp_ip.c"). + +Signed-off-by: Sasha Levin +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/l2tp/l2tp_ip.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c +index 55670ec..2a2a3e7 100644 +--- a/net/l2tp/l2tp_ip.c ++++ b/net/l2tp/l2tp_ip.c +@@ -441,8 +441,9 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m + + daddr = lip->l2tp_addr.s_addr; + } else { ++ rc = -EDESTADDRREQ; + if (sk->sk_state != TCP_ESTABLISHED) +- return -EDESTADDRREQ; ++ goto out; + + daddr = inet->inet_daddr; + connected = 1; +-- +1.7.7.6 + 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 @@ +From 040442d719f91dcb002eaa1efaffbebd2fd44328 Mon Sep 17 00:00:00 2001 +From: stephen hemminger +Date: Mon, 30 Apr 2012 05:49:45 +0000 +Subject: [PATCH 14/56] sky2: propogate rx hash when packet is copied + +[ Upstream commit 3f42941b5d1d13542b1a755a9e4f633aa72e4d3e ] + +When a small packet is received, the driver copies it to a new skb to allow +reusing the full size Rx buffer. The copy was propogating the checksum offload +but not the receive hash information. The bug is impact was mostly harmless +and therefore not observed until reviewing this area of code. + +Signed-off-by: Stephen Hemminger +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/marvell/sky2.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c +index 7eb8a00..e1f4b65 100644 +--- a/drivers/net/ethernet/marvell/sky2.c ++++ b/drivers/net/ethernet/marvell/sky2.c +@@ -2475,8 +2475,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, + skb_copy_from_linear_data(re->skb, skb->data, length); + skb->ip_summed = re->skb->ip_summed; + skb->csum = re->skb->csum; ++ skb->rxhash = re->skb->rxhash; ++ + pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, + length, PCI_DMA_FROMDEVICE); ++ re->skb->rxhash = 0; + re->skb->ip_summed = CHECKSUM_NONE; + skb_put(skb, length); + } +-- +1.7.7.6 + 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 @@ +From 27f7b26b133f97629f82ce156d481a32a881472b Mon Sep 17 00:00:00 2001 +From: stephen hemminger +Date: Mon, 30 Apr 2012 06:47:37 +0000 +Subject: [PATCH 15/56] sky2: fix receive length error in mixed non-VLAN/VLAN + traffic + +[ Upstream commit e072b3fad5f3915102c94628b4971f52ff99dd05 ] + +Bug: The VLAN bit of the MAC RX Status Word is unreliable in several older +supported chips. Sometimes the VLAN bit is not set for valid VLAN packets +and also sometimes the VLAN bit is set for non-VLAN packets that came after +a VLAN packet. This results in a receive length error when VLAN hardware +tagging is enabled. + +Fix: Variation on original fix proposed by Mirko. +The VLAN information is decoded in the status loop, and can be +applied to the received SKB there. This eliminates the need for the +separate tag field in the interface data structure. The tag has to +be copied and cleared if packet is copied. This version checked out +with vlan and normal traffic. + +Note: vlan_tx_tag_present should be renamed vlan_tag_present, but that +is outside scope of this. + +Reported-by: Mirko Lindner +Signed-off-by: Stephen Hemminger +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/marvell/sky2.c | 28 +++++++++++++++++----------- + drivers/net/ethernet/marvell/sky2.h | 1 - + 2 files changed, 17 insertions(+), 12 deletions(-) + +diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c +index e1f4b65..65c51ff 100644 +--- a/drivers/net/ethernet/marvell/sky2.c ++++ b/drivers/net/ethernet/marvell/sky2.c +@@ -2476,9 +2476,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, + skb->ip_summed = re->skb->ip_summed; + skb->csum = re->skb->csum; + skb->rxhash = re->skb->rxhash; ++ skb->vlan_tci = re->skb->vlan_tci; + + pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, + length, PCI_DMA_FROMDEVICE); ++ re->skb->vlan_tci = 0; + re->skb->rxhash = 0; + re->skb->ip_summed = CHECKSUM_NONE; + skb_put(skb, length); +@@ -2564,9 +2566,6 @@ static struct sk_buff *sky2_receive(struct net_device *dev, + struct sk_buff *skb = NULL; + u16 count = (status & GMR_FS_LEN) >> 16; + +- if (status & GMR_FS_VLAN) +- count -= VLAN_HLEN; /* Account for vlan tag */ +- + netif_printk(sky2, rx_status, KERN_DEBUG, dev, + "rx slot %u status 0x%x len %d\n", + sky2->rx_next, status, length); +@@ -2574,6 +2573,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev, + sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; + prefetch(sky2->rx_ring + sky2->rx_next); + ++ if (vlan_tx_tag_present(re->skb)) ++ count -= VLAN_HLEN; /* Account for vlan tag */ ++ + /* This chip has hardware problems that generates bogus status. + * So do only marginal checking and expect higher level protocols + * to handle crap frames. +@@ -2631,11 +2633,8 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last) + } + + static inline void sky2_skb_rx(const struct sky2_port *sky2, +- u32 status, struct sk_buff *skb) ++ struct sk_buff *skb) + { +- if (status & GMR_FS_VLAN) +- __vlan_hwaccel_put_tag(skb, be16_to_cpu(sky2->rx_tag)); +- + if (skb->ip_summed == CHECKSUM_NONE) + netif_receive_skb(skb); + else +@@ -2689,6 +2688,14 @@ static void sky2_rx_checksum(struct sky2_port *sky2, u32 status) + } + } + ++static void sky2_rx_tag(struct sky2_port *sky2, u16 length) ++{ ++ struct sk_buff *skb; ++ ++ skb = sky2->rx_ring[sky2->rx_next].skb; ++ __vlan_hwaccel_put_tag(skb, be16_to_cpu(length)); ++} ++ + static void sky2_rx_hash(struct sky2_port *sky2, u32 status) + { + struct sk_buff *skb; +@@ -2747,8 +2754,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) + } + + skb->protocol = eth_type_trans(skb, dev); +- +- sky2_skb_rx(sky2, status, skb); ++ sky2_skb_rx(sky2, skb); + + /* Stop after net poll weight */ + if (++work_done >= to_do) +@@ -2756,11 +2762,11 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) + break; + + case OP_RXVLAN: +- sky2->rx_tag = length; ++ sky2_rx_tag(sky2, length); + break; + + case OP_RXCHKSVLAN: +- sky2->rx_tag = length; ++ sky2_rx_tag(sky2, length); + /* fall through */ + case OP_RXCHKS: + if (likely(dev->features & NETIF_F_RXCSUM)) +diff --git a/drivers/net/ethernet/marvell/sky2.h b/drivers/net/ethernet/marvell/sky2.h +index ff6f58b..3c896ce 100644 +--- a/drivers/net/ethernet/marvell/sky2.h ++++ b/drivers/net/ethernet/marvell/sky2.h +@@ -2241,7 +2241,6 @@ struct sky2_port { + u16 rx_pending; + u16 rx_data_size; + u16 rx_nfrags; +- u16 rx_tag; + + struct { + unsigned long last; +-- +1.7.7.6 + 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 @@ +From 4fb3cd4329db7cba66335fe4d74f5234030cf1a9 Mon Sep 17 00:00:00 2001 +From: Gerard Lledo +Date: Sat, 28 Apr 2012 08:52:37 +0000 +Subject: [PATCH 16/56] sungem: Fix WakeOnLan + +[ Upstream commit 5a8887d39e1ba5ee2d4ccb94b14d6f2dce5ddfca ] + +WakeOnLan was broken in this driver because gp->asleep_wol is a 1-bit +bitfield and it was being assigned WAKE_MAGIC, which is (1 << 5). +gp->asleep_wol remains 0 and the machine never wakes up. Fixed by casting +gp->wake_on_lan to bool. Tested on an iBook G4. + +Signed-off-by: Gerard Lledo +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/sun/sungem.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c +index ceab215..c508d6a 100644 +--- a/drivers/net/ethernet/sun/sungem.c ++++ b/drivers/net/ethernet/sun/sungem.c +@@ -2340,7 +2340,7 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state) + netif_device_detach(dev); + + /* Switch off chip, remember WOL setting */ +- gp->asleep_wol = gp->wake_on_lan; ++ gp->asleep_wol = !!gp->wake_on_lan; + gem_do_stop(dev, gp->asleep_wol); + + /* Unlock the network stack */ +-- +1.7.7.6 + 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 @@ +From ec9a6575908fa9558b613ace25ec0a9f5e1795ec Mon Sep 17 00:00:00 2001 +From: Matt Carlson +Date: Tue, 24 Apr 2012 13:37:01 +0000 +Subject: [PATCH 17/56] tg3: Avoid panic from reserved statblk field access + +[ Upstream commit f891ea1634ce41f5f47ae40d8594809f4cd2ca66 ] + +When RSS is enabled, interrupt vector 0 does not receive any rx traffic. +The rx producer index fields for vector 0's status block should be +considered reserved in this case. This patch changes the code to +respect these reserved fields, which avoids a kernel panic when these +fields take on non-zero values. + +Signed-off-by: Matt Carlson +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/broadcom/tg3.c | 18 ++++++++++++++++-- + 1 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c +index 3d55883..2dcac28 100644 +--- a/drivers/net/ethernet/broadcom/tg3.c ++++ b/drivers/net/ethernet/broadcom/tg3.c +@@ -879,8 +879,13 @@ static inline unsigned int tg3_has_work(struct tg3_napi *tnapi) + if (sblk->status & SD_STATUS_LINK_CHG) + work_exists = 1; + } +- /* check for RX/TX work to do */ +- if (sblk->idx[0].tx_consumer != tnapi->tx_cons || ++ ++ /* check for TX work to do */ ++ if (sblk->idx[0].tx_consumer != tnapi->tx_cons) ++ work_exists = 1; ++ ++ /* check for RX work to do */ ++ if (tnapi->rx_rcb_prod_idx && + *(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr) + work_exists = 1; + +@@ -5895,6 +5900,9 @@ static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget) + return work_done; + } + ++ if (!tnapi->rx_rcb_prod_idx) ++ return work_done; ++ + /* run RX thread, within the bounds set by NAPI. + * All RX "locking" is done by ensuring outside + * code synchronizes with tg3->napi.poll() +@@ -7448,6 +7456,12 @@ static int tg3_alloc_consistent(struct tg3 *tp) + */ + switch (i) { + default: ++ if (tg3_flag(tp, ENABLE_RSS)) { ++ tnapi->rx_rcb_prod_idx = NULL; ++ break; ++ } ++ /* Fall through */ ++ case 1: + tnapi->rx_rcb_prod_idx = &sblk->idx[0].rx_producer; + break; + case 2: +-- +1.7.7.6 + 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 @@ +From 6b142c33b94fd1c35b6a19be0982ae408ce8d162 Mon Sep 17 00:00:00 2001 +From: Yuchung Cheng +Date: Mon, 30 Apr 2012 06:00:18 +0000 +Subject: [PATCH 18/56] tcp: fix infinite cwnd in tcp_complete_cwr() + +[ Upstream commit 1cebce36d660c83bd1353e41f3e66abd4686f215 ] + +When the cwnd reduction is done, ssthresh may be infinite +if TCP enters CWR via ECN or F-RTO. If cwnd is not undone, i.e., +undo_marker is set, tcp_complete_cwr() falsely set cwnd to the +infinite ssthresh value. The correct operation is to keep cwnd +intact because it has been updated in ECN or F-RTO. + +Signed-off-by: Yuchung Cheng +Acked-by: Neal Cardwell +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/ipv4/tcp_input.c | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c +index daedc07..db07c9e 100644 +--- a/net/ipv4/tcp_input.c ++++ b/net/ipv4/tcp_input.c +@@ -2868,11 +2868,14 @@ static inline void tcp_complete_cwr(struct sock *sk) + + /* Do not moderate cwnd if it's already undone in cwr or recovery. */ + if (tp->undo_marker) { +- if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR) ++ if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR) { + tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh); +- else /* PRR */ ++ tp->snd_cwnd_stamp = tcp_time_stamp; ++ } else if (tp->snd_ssthresh < TCP_INFINITE_SSTHRESH) { ++ /* PRR algorithm. */ + tp->snd_cwnd = tp->snd_ssthresh; +- tp->snd_cwnd_stamp = tcp_time_stamp; ++ tp->snd_cwnd_stamp = tcp_time_stamp; ++ } + } + tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR); + } +-- +1.7.7.6 + 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 @@ +From 98d841428279a8060b46cf13a1463ebbeca65b4a Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Wed, 2 May 2012 02:28:41 +0000 +Subject: [PATCH 19/56] tcp: change tcp_adv_win_scale and tcp_rmem[2] + +[ Upstream commit b49960a05e32121d29316cfdf653894b88ac9190 ] + +tcp_adv_win_scale default value is 2, meaning we expect a good citizen +skb to have skb->len / skb->truesize ratio of 75% (3/4) + +In 2.6 kernels we (mis)accounted for typical MSS=1460 frame : +1536 + 64 + 256 = 1856 'estimated truesize', and 1856 * 3/4 = 1392. +So these skbs were considered as not bloated. + +With recent truesize fixes, a typical MSS=1460 frame truesize is now the +more precise : +2048 + 256 = 2304. But 2304 * 3/4 = 1728. +So these skb are not good citizen anymore, because 1460 < 1728 + +(GRO can escape this problem because it build skbs with a too low +truesize.) + +This also means tcp advertises a too optimistic window for a given +allocated rcvspace : When receiving frames, sk_rmem_alloc can hit +sk_rcvbuf limit and we call tcp_prune_queue()/tcp_collapse() too often, +especially when application is slow to drain its receive queue or in +case of losses (netperf is fast, scp is slow). This is a major latency +source. + +We should adjust the len/truesize ratio to 50% instead of 75% + +This patch : + +1) changes tcp_adv_win_scale default to 1 instead of 2 + +2) increase tcp_rmem[2] limit from 4MB to 6MB to take into account +better truesize tracking and to allow autotuning tcp receive window to +reach same value than before. Note that same amount of kernel memory is +consumed compared to 2.6 kernels. + +Signed-off-by: Eric Dumazet +Cc: Neal Cardwell +Cc: Tom Herbert +Cc: Yuchung Cheng +Acked-by: Neal Cardwell +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + Documentation/networking/ip-sysctl.txt | 4 ++-- + net/ipv4/tcp.c | 9 +++++---- + net/ipv4/tcp_input.c | 2 +- + 3 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt +index 589f2da..a4399f5 100644 +--- a/Documentation/networking/ip-sysctl.txt ++++ b/Documentation/networking/ip-sysctl.txt +@@ -137,7 +137,7 @@ tcp_adv_win_scale - INTEGER + (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), + if it is <= 0. + Possible values are [-31, 31], inclusive. +- Default: 2 ++ Default: 1 + + tcp_allowed_congestion_control - STRING + Show/set the congestion control choices available to non-privileged +@@ -397,7 +397,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max + net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables + automatic tuning of that socket's receive buffer size, in which + case this value is ignored. +- Default: between 87380B and 4MB, depending on RAM size. ++ Default: between 87380B and 6MB, depending on RAM size. + + tcp_sack - BOOLEAN + Enable select acknowledgments (SACKS). +diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c +index 7904db4..8f826b1 100644 +--- a/net/ipv4/tcp.c ++++ b/net/ipv4/tcp.c +@@ -3216,7 +3216,7 @@ void __init tcp_init(void) + { + struct sk_buff *skb = NULL; + unsigned long limit; +- int i, max_share, cnt; ++ int i, max_rshare, max_wshare, cnt; + unsigned long jiffy = jiffies; + + BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb)); +@@ -3280,15 +3280,16 @@ void __init tcp_init(void) + + /* Set per-socket limits to no more than 1/128 the pressure threshold */ + limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7); +- max_share = min(4UL*1024*1024, limit); ++ max_wshare = min(4UL*1024*1024, limit); ++ max_rshare = min(6UL*1024*1024, limit); + + sysctl_tcp_wmem[0] = SK_MEM_QUANTUM; + sysctl_tcp_wmem[1] = 16*1024; +- sysctl_tcp_wmem[2] = max(64*1024, max_share); ++ sysctl_tcp_wmem[2] = max(64*1024, max_wshare); + + sysctl_tcp_rmem[0] = SK_MEM_QUANTUM; + sysctl_tcp_rmem[1] = 87380; +- sysctl_tcp_rmem[2] = max(87380, max_share); ++ sysctl_tcp_rmem[2] = max(87380, max_rshare); + + printk(KERN_INFO "TCP: Hash tables configured " + "(established %u bind %u)\n", +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c +index db07c9e..9726927 100644 +--- a/net/ipv4/tcp_input.c ++++ b/net/ipv4/tcp_input.c +@@ -83,7 +83,7 @@ int sysctl_tcp_ecn __read_mostly = 2; + EXPORT_SYMBOL(sysctl_tcp_ecn); + int sysctl_tcp_dsack __read_mostly = 1; + int sysctl_tcp_app_win __read_mostly = 31; +-int sysctl_tcp_adv_win_scale __read_mostly = 2; ++int sysctl_tcp_adv_win_scale __read_mostly = 1; + EXPORT_SYMBOL(sysctl_tcp_adv_win_scale); + + int sysctl_tcp_stdurg __read_mostly; +-- +1.7.7.6 + 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 @@ +From 9edfb7d2fb5250828aabc9ad47708b56184fa010 Mon Sep 17 00:00:00 2001 +From: Jonathan Nieder +Date: Fri, 11 May 2012 19:35:33 -0500 +Subject: [PATCH 20/56] brcm80211: smac: pass missing argument to + 'brcms_b_mute' + +[Not needed upstream --- this bug is specific to 3.2.y.] + +Commit c6c44893c864, which removes the flag argument from brcms_b_mute, +is not part of 3.2.y, and we forgot to adjust a new call accordingly +when applying commit badc4f07622f ("brcm80211: smac: resume transmit +fifo upon receiving frames"). + + drivers/net/wireless/brcm80211/brcmsmac/main.c: In function 'brcms_c_recvctl': + drivers/net/wireless/brcm80211/brcmsmac/main.c:7882:4: error: too few arguments to function 'brcms_b_mute' + drivers/net/wireless/brcm80211/brcmsmac/main.c:2538:13: note: declared here + +Earlier build tests missed this because they didn't include this driver +due to 'depends on BCMA=n'. + +Reported-by: Ben Hutchings +Signed-off-by: Jonathan Nieder +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/brcm80211/brcmsmac/main.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c +index f98becc..833cbef 100644 +--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +@@ -7879,7 +7879,7 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh, + if (wlc->hw->suspended_fifos) { + hdr = (struct ieee80211_hdr *)p->data; + if (ieee80211_is_beacon(hdr->frame_control)) +- brcms_b_mute(wlc->hw, false); ++ brcms_b_mute(wlc->hw, false, 0); + } + + memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status)); +-- +1.7.7.6 + 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 @@ +From 78381ca9729f5c7508cc74701d29cc325f37c5b7 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Mon, 2 Apr 2012 00:02:09 +0000 +Subject: [PATCH 21/56] phy:icplus:fix Auto Power Saving in + ip101a_config_init. + +[ Upstream commit b3300146aa8efc5d3937fd33f3cfdc580a3843bc ] + +This patch fixes Auto Power Saving configuration in ip101a_config_init +which was broken as there is no phy register write followed after +setting IP101A_APS_ON flag. + +This patch also fixes the return value of ip101a_config_init. + +Without this patch ip101a_config_init returns 2 which is not an error +accroding to IS_ERR and the mac driver will continue accessing 2 as +valid pointer to phy_dev resulting in memory fault. + +Signed-off-by: Srinivas Kandagatla +Signed-off-by: David S. Miller +Signed-off-by: Jonathan Nieder +Signed-off-by: Ben Hutchings +--- + drivers/net/phy/icplus.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c +index c81f136..b142300 100644 +--- a/drivers/net/phy/icplus.c ++++ b/drivers/net/phy/icplus.c +@@ -150,7 +150,8 @@ static int ip101a_config_init(struct phy_device *phydev) + /* Enable Auto Power Saving mode */ + c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); + c |= IP101A_APS_ON; +- return c; ++ ++ return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); + } + + static int ip175c_read_status(struct phy_device *phydev) +-- +1.7.7.6 + 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 @@ +From 28797e10f3879232042e0f636e6650a2b35912f6 Mon Sep 17 00:00:00 2001 +From: Jonathan Nieder +Date: Fri, 11 May 2012 04:20:20 -0500 +Subject: [PATCH 22/56] NFSv4: Revalidate uid/gid after open + +This is a shorter (and more appropriate for stable kernels) analog to +the following upstream commit: + +commit 6926afd1925a54a13684ebe05987868890665e2b +Author: Trond Myklebust +Date: Sat Jan 7 13:22:46 2012 -0500 + + NFSv4: Save the owner/group name string when doing open + + ...so that we can do the uid/gid mapping outside the asynchronous RPC + context. + This fixes a bug in the current NFSv4 atomic open code where the client + isn't able to determine what the true uid/gid fields of the file are, + (because the asynchronous nature of the OPEN call denies it the ability + to do an upcall) and so fills them with default values, marking the + inode as needing revalidation. + Unfortunately, in some cases, the VFS will do some additional sanity + checks on the file, and may override the server's decision to allow + the open because it sees the wrong owner/group fields. + + Signed-off-by: Trond Myklebust + +Without this patch, logging into two different machines with home +directories mounted over NFS4 and then running "vim" and typing ":q" +in each reliably produces the following error on the second machine: + + E137: Viminfo file is not writable: /users/system/rtheys/.viminfo + +This regression was introduced by 80e52aced138 ("NFSv4: Don't do +idmapper upcalls for asynchronous RPC calls", merged during the 2.6.32 +cycle) --- after the OPEN call, .viminfo has the default values for +st_uid and st_gid (0xfffffffe) cached because we do not want to let +rpciod wait for an idmapper upcall to fill them in. + +The fix used in mainline is to save the owner and group as strings and +perform the upcall in _nfs4_proc_open outside the rpciod context, +which takes about 600 lines. For stable, we can do something similar +with a one-liner: make open check for the stale fields and make a +(synchronous) GETATTR call to fill them when needed. + +Trond dictated the patch, I typed it in, and Rik tested it. + +Addresses http://bugs.debian.org/659111 and + https://bugzilla.redhat.com/789298 + +Reported-by: Rik Theys +Explained-by: David Flyn +Signed-off-by: Jonathan Nieder +Tested-by: Rik Theys +Signed-off-by: Ben Hutchings +--- + fs/nfs/nfs4proc.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c +index 51f6a40..bab7c58 100644 +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -1802,6 +1802,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, fmode_t fmode + nfs_setattr_update_inode(state->inode, sattr); + nfs_post_op_update_inode(state->inode, opendata->o_res.f_attr); + } ++ nfs_revalidate_inode(server, state->inode); + nfs4_opendata_put(opendata); + nfs4_put_state_owner(sp); + *res = state; +-- +1.7.7.6 + 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 @@ +From ca92b5c1f22073e079dae19162698441a231e36f Mon Sep 17 00:00:00 2001 +From: Nicholas Bellinger +Date: Thu, 10 May 2012 22:05:49 -0700 +Subject: [PATCH 23/56] target: Drop incorrect se_lun_acl release for dynamic + -> explict ACL conversion + +commit cfebf8f42f47327fa54cf05c19b98f4bd5236a26 upstream. + +This patch removes some potentially problematic legacy code within +core_clear_initiator_node_from_tpg() that was originally intended to +release left over se_lun_acl setup during dynamic NodeACL+MappedLUN +generate when running with TPG demo-mode operation. + +Since we now only ever expect to allocate and release se_lun_acl from +within target_core_fabric_configfs.c:target_fabric_make_mappedlun() and +target_fabric_drop_mappedlun() context respectively, this code for +demo-mode release is incorrect and needs to be removed. + +Cc: Christoph Hellwig +Cc: Andy Grover +Signed-off-by: Nicholas Bellinger +Signed-off-by: Ben Hutchings +--- + drivers/target/target_core_tpg.c | 22 ---------------------- + 1 files changed, 0 insertions(+), 22 deletions(-) + +diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c +index 8ddd133..d91fe44 100644 +--- a/drivers/target/target_core_tpg.c ++++ b/drivers/target/target_core_tpg.c +@@ -63,7 +63,6 @@ static void core_clear_initiator_node_from_tpg( + int i; + struct se_dev_entry *deve; + struct se_lun *lun; +- struct se_lun_acl *acl, *acl_tmp; + + spin_lock_irq(&nacl->device_list_lock); + for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) { +@@ -84,28 +83,7 @@ static void core_clear_initiator_node_from_tpg( + core_update_device_list_for_node(lun, NULL, deve->mapped_lun, + TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0); + +- spin_lock(&lun->lun_acl_lock); +- list_for_each_entry_safe(acl, acl_tmp, +- &lun->lun_acl_list, lacl_list) { +- if (!strcmp(acl->initiatorname, nacl->initiatorname) && +- (acl->mapped_lun == deve->mapped_lun)) +- break; +- } +- +- if (!acl) { +- pr_err("Unable to locate struct se_lun_acl for %s," +- " mapped_lun: %u\n", nacl->initiatorname, +- deve->mapped_lun); +- spin_unlock(&lun->lun_acl_lock); +- spin_lock_irq(&nacl->device_list_lock); +- continue; +- } +- +- list_del(&acl->lacl_list); +- spin_unlock(&lun->lun_acl_lock); +- + spin_lock_irq(&nacl->device_list_lock); +- kfree(acl); + } + spin_unlock_irq(&nacl->device_list_lock); + } +-- +1.7.7.6 + 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 @@ +From 10b936ceae2bf61d07542014bf9140f302810892 Mon Sep 17 00:00:00 2001 +From: Jonathan Corbet +Date: Fri, 20 Apr 2012 12:22:50 -0300 +Subject: [PATCH 24/56] marvell-cam: fix an ARM build error + +commit 9967232f1be5bab10c7b7a8dcf51ff5c3c1a6d77 upstream. + +One of the OLPC changes lost a little in its translation to mainline, +leading to build errors on the ARM architecture. Remove the offending +line, and all will be well. + +Reported-by: Mathieu Poirier +Signed-off-by: Jonathan Corbet +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Ben Hutchings +--- + drivers/media/video/marvell-ccic/mmp-driver.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/drivers/media/video/marvell-ccic/mmp-driver.c b/drivers/media/video/marvell-ccic/mmp-driver.c +index fb0b124..a6b7657 100644 +--- a/drivers/media/video/marvell-ccic/mmp-driver.c ++++ b/drivers/media/video/marvell-ccic/mmp-driver.c +@@ -175,7 +175,6 @@ static int mmpcam_probe(struct platform_device *pdev) + INIT_LIST_HEAD(&cam->devlist); + + mcam = &cam->mcam; +- mcam->platform = MHP_Armada610; + mcam->plat_power_up = mmpcam_power_up; + mcam->plat_power_down = mmpcam_power_down; + mcam->dev = &pdev->dev; +-- +1.7.7.6 + 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 @@ +From 51e9e3cdf5aa99d1bda7d03d213cc4dc0766c7ed Mon Sep 17 00:00:00 2001 +From: Luis Henriques +Date: Sat, 21 Apr 2012 12:25:21 -0300 +Subject: [PATCH 25/56] rc: Postpone ISR registration + +commit 9ef449c6b31bb6a8e6dedc24de475a3b8c79be20 upstream. + +An early registration of an ISR was causing a crash to several users (for +example, with the ite-cir driver: http://bugs.launchpad.net/bugs/972723). +The reason was that IRQs were being triggered before a driver +initialisation was completed. + +This patch fixes this by moving the invocation to request_irq() and to +request_region() to a later stage on the driver probe function. + +Signed-off-by: Luis Henriques +Acked-by: Jarod Wilson +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Ben Hutchings +--- + drivers/media/rc/ene_ir.c | 32 ++++++++-------- + drivers/media/rc/fintek-cir.c | 20 +++++----- + drivers/media/rc/ite-cir.c | 20 +++++----- + drivers/media/rc/nuvoton-cir.c | 36 +++++++++--------- + drivers/media/rc/winbond-cir.c | 78 ++++++++++++++++++++-------------------- + 5 files changed, 93 insertions(+), 93 deletions(-) + +diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c +index 860c112..bef5296 100644 +--- a/drivers/media/rc/ene_ir.c ++++ b/drivers/media/rc/ene_ir.c +@@ -1018,22 +1018,6 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) + + spin_lock_init(&dev->hw_lock); + +- /* claim the resources */ +- error = -EBUSY; +- dev->hw_io = pnp_port_start(pnp_dev, 0); +- if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) { +- dev->hw_io = -1; +- dev->irq = -1; +- goto error; +- } +- +- dev->irq = pnp_irq(pnp_dev, 0); +- if (request_irq(dev->irq, ene_isr, +- IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) { +- dev->irq = -1; +- goto error; +- } +- + pnp_set_drvdata(pnp_dev, dev); + dev->pnp_dev = pnp_dev; + +@@ -1086,6 +1070,22 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) + device_set_wakeup_capable(&pnp_dev->dev, true); + device_set_wakeup_enable(&pnp_dev->dev, true); + ++ /* claim the resources */ ++ error = -EBUSY; ++ dev->hw_io = pnp_port_start(pnp_dev, 0); ++ if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) { ++ dev->hw_io = -1; ++ dev->irq = -1; ++ goto error; ++ } ++ ++ dev->irq = pnp_irq(pnp_dev, 0); ++ if (request_irq(dev->irq, ene_isr, ++ IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) { ++ dev->irq = -1; ++ goto error; ++ } ++ + error = rc_register_device(rdev); + if (error < 0) + goto error; +diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c +index 7f7079b..4218f73 100644 +--- a/drivers/media/rc/fintek-cir.c ++++ b/drivers/media/rc/fintek-cir.c +@@ -504,16 +504,6 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id + + spin_lock_init(&fintek->fintek_lock); + +- ret = -EBUSY; +- /* now claim resources */ +- if (!request_region(fintek->cir_addr, +- fintek->cir_port_len, FINTEK_DRIVER_NAME)) +- goto failure; +- +- if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED, +- FINTEK_DRIVER_NAME, (void *)fintek)) +- goto failure; +- + pnp_set_drvdata(pdev, fintek); + fintek->pdev = pdev; + +@@ -548,6 +538,16 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id + /* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */ + rdev->rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD); + ++ ret = -EBUSY; ++ /* now claim resources */ ++ if (!request_region(fintek->cir_addr, ++ fintek->cir_port_len, FINTEK_DRIVER_NAME)) ++ goto failure; ++ ++ if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED, ++ FINTEK_DRIVER_NAME, (void *)fintek)) ++ goto failure; ++ + ret = rc_register_device(rdev); + if (ret) + goto failure; +diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c +index 682009d..0e49c99 100644 +--- a/drivers/media/rc/ite-cir.c ++++ b/drivers/media/rc/ite-cir.c +@@ -1515,16 +1515,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id + /* initialize raw event */ + init_ir_raw_event(&itdev->rawir); + +- ret = -EBUSY; +- /* now claim resources */ +- if (!request_region(itdev->cir_addr, +- dev_desc->io_region_size, ITE_DRIVER_NAME)) +- goto failure; +- +- if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED, +- ITE_DRIVER_NAME, (void *)itdev)) +- goto failure; +- + /* set driver data into the pnp device */ + pnp_set_drvdata(pdev, itdev); + itdev->pdev = pdev; +@@ -1600,6 +1590,16 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id + rdev->driver_name = ITE_DRIVER_NAME; + rdev->map_name = RC_MAP_RC6_MCE; + ++ ret = -EBUSY; ++ /* now claim resources */ ++ if (!request_region(itdev->cir_addr, ++ dev_desc->io_region_size, ITE_DRIVER_NAME)) ++ goto failure; ++ ++ if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED, ++ ITE_DRIVER_NAME, (void *)itdev)) ++ goto failure; ++ + ret = rc_register_device(rdev); + if (ret) + goto failure; +diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c +index 144f3f5..8b2c071 100644 +--- a/drivers/media/rc/nuvoton-cir.c ++++ b/drivers/media/rc/nuvoton-cir.c +@@ -1021,24 +1021,6 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) + spin_lock_init(&nvt->nvt_lock); + spin_lock_init(&nvt->tx.lock); + +- ret = -EBUSY; +- /* now claim resources */ +- if (!request_region(nvt->cir_addr, +- CIR_IOREG_LENGTH, NVT_DRIVER_NAME)) +- goto failure; +- +- if (request_irq(nvt->cir_irq, nvt_cir_isr, IRQF_SHARED, +- NVT_DRIVER_NAME, (void *)nvt)) +- goto failure; +- +- if (!request_region(nvt->cir_wake_addr, +- CIR_IOREG_LENGTH, NVT_DRIVER_NAME)) +- goto failure; +- +- if (request_irq(nvt->cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED, +- NVT_DRIVER_NAME, (void *)nvt)) +- goto failure; +- + pnp_set_drvdata(pdev, nvt); + nvt->pdev = pdev; + +@@ -1085,6 +1067,24 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) + rdev->tx_resolution = XYZ; + #endif + ++ ret = -EBUSY; ++ /* now claim resources */ ++ if (!request_region(nvt->cir_addr, ++ CIR_IOREG_LENGTH, NVT_DRIVER_NAME)) ++ goto failure; ++ ++ if (request_irq(nvt->cir_irq, nvt_cir_isr, IRQF_SHARED, ++ NVT_DRIVER_NAME, (void *)nvt)) ++ goto failure; ++ ++ if (!request_region(nvt->cir_wake_addr, ++ CIR_IOREG_LENGTH, NVT_DRIVER_NAME)) ++ goto failure; ++ ++ if (request_irq(nvt->cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED, ++ NVT_DRIVER_NAME, (void *)nvt)) ++ goto failure; ++ + ret = rc_register_device(rdev); + if (ret) + goto failure; +diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c +index a7e7d6f..4591770 100644 +--- a/drivers/media/rc/winbond-cir.c ++++ b/drivers/media/rc/winbond-cir.c +@@ -991,39 +991,10 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) + "(w: 0x%lX, e: 0x%lX, s: 0x%lX, i: %u)\n", + data->wbase, data->ebase, data->sbase, data->irq); + +- if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) { +- dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", +- data->wbase, data->wbase + WAKEUP_IOMEM_LEN - 1); +- err = -EBUSY; +- goto exit_free_data; +- } +- +- if (!request_region(data->ebase, EHFUNC_IOMEM_LEN, DRVNAME)) { +- dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", +- data->ebase, data->ebase + EHFUNC_IOMEM_LEN - 1); +- err = -EBUSY; +- goto exit_release_wbase; +- } +- +- if (!request_region(data->sbase, SP_IOMEM_LEN, DRVNAME)) { +- dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", +- data->sbase, data->sbase + SP_IOMEM_LEN - 1); +- err = -EBUSY; +- goto exit_release_ebase; +- } +- +- err = request_irq(data->irq, wbcir_irq_handler, +- IRQF_DISABLED, DRVNAME, device); +- if (err) { +- dev_err(dev, "Failed to claim IRQ %u\n", data->irq); +- err = -EBUSY; +- goto exit_release_sbase; +- } +- + led_trigger_register_simple("cir-tx", &data->txtrigger); + if (!data->txtrigger) { + err = -ENOMEM; +- goto exit_free_irq; ++ goto exit_free_data; + } + + led_trigger_register_simple("cir-rx", &data->rxtrigger); +@@ -1062,9 +1033,38 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) + data->dev->priv = data; + data->dev->dev.parent = &device->dev; + ++ if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) { ++ dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", ++ data->wbase, data->wbase + WAKEUP_IOMEM_LEN - 1); ++ err = -EBUSY; ++ goto exit_free_rc; ++ } ++ ++ if (!request_region(data->ebase, EHFUNC_IOMEM_LEN, DRVNAME)) { ++ dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", ++ data->ebase, data->ebase + EHFUNC_IOMEM_LEN - 1); ++ err = -EBUSY; ++ goto exit_release_wbase; ++ } ++ ++ if (!request_region(data->sbase, SP_IOMEM_LEN, DRVNAME)) { ++ dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", ++ data->sbase, data->sbase + SP_IOMEM_LEN - 1); ++ err = -EBUSY; ++ goto exit_release_ebase; ++ } ++ ++ err = request_irq(data->irq, wbcir_irq_handler, ++ IRQF_DISABLED, DRVNAME, device); ++ if (err) { ++ dev_err(dev, "Failed to claim IRQ %u\n", data->irq); ++ err = -EBUSY; ++ goto exit_release_sbase; ++ } ++ + err = rc_register_device(data->dev); + if (err) +- goto exit_free_rc; ++ goto exit_free_irq; + + device_init_wakeup(&device->dev, 1); + +@@ -1072,14 +1072,6 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) + + return 0; + +-exit_free_rc: +- rc_free_device(data->dev); +-exit_unregister_led: +- led_classdev_unregister(&data->led); +-exit_unregister_rxtrigger: +- led_trigger_unregister_simple(data->rxtrigger); +-exit_unregister_txtrigger: +- led_trigger_unregister_simple(data->txtrigger); + exit_free_irq: + free_irq(data->irq, device); + exit_release_sbase: +@@ -1088,6 +1080,14 @@ exit_release_ebase: + release_region(data->ebase, EHFUNC_IOMEM_LEN); + exit_release_wbase: + release_region(data->wbase, WAKEUP_IOMEM_LEN); ++exit_free_rc: ++ rc_free_device(data->dev); ++exit_unregister_led: ++ led_classdev_unregister(&data->led); ++exit_unregister_rxtrigger: ++ led_trigger_unregister_simple(data->rxtrigger); ++exit_unregister_txtrigger: ++ led_trigger_unregister_simple(data->txtrigger); + exit_free_data: + kfree(data); + pnp_set_drvdata(device, NULL); +-- +1.7.7.6 + 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 @@ +From 701699958f6f1770bf758ebac587fd85e73e8c76 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= +Date: Thu, 26 Apr 2012 02:35:10 +0000 +Subject: [PATCH 26/56] cdc_ether: Ignore bogus union descriptor for RNDIS + devices +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit 6eddcb4c82883451aec3be1240f17793370fa62f upstream. + +Some RNDIS devices include a bogus CDC Union descriptor pointing +to non-existing interfaces. The RNDIS code is already prepared +to handle devices without a CDC Union descriptor by hardwiring +the driver to use interfaces 0 and 1, which is correct for the +devices with the bogus descriptor as well. So we can reuse the +existing workaround. + +Cc: Markus Kolb +Cc: Iker SalmĂłn San Millán +Cc: Jonathan Nieder +Cc: Oliver Neukum +Cc: 655387@bugs.debian.org +Signed-off-by: Bjørn Mork +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/usb/cdc_ether.c | 14 ++++++++++++-- + 1 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c +index 4fd4144..eac4886 100644 +--- a/drivers/net/usb/cdc_ether.c ++++ b/drivers/net/usb/cdc_ether.c +@@ -83,6 +83,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) + struct cdc_state *info = (void *) &dev->data; + int status; + int rndis; ++ bool android_rndis_quirk = false; + struct usb_driver *driver = driver_of(intf); + struct usb_cdc_mdlm_desc *desc = NULL; + struct usb_cdc_mdlm_detail_desc *detail = NULL; +@@ -195,6 +196,11 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) + info->control, + info->u->bSlaveInterface0, + info->data); ++ /* fall back to hard-wiring for RNDIS */ ++ if (rndis) { ++ android_rndis_quirk = true; ++ goto next_desc; ++ } + goto bad_desc; + } + if (info->control != intf) { +@@ -271,11 +277,15 @@ next_desc: + /* Microsoft ActiveSync based and some regular RNDIS devices lack the + * CDC descriptors, so we'll hard-wire the interfaces and not check + * for descriptors. ++ * ++ * Some Android RNDIS devices have a CDC Union descriptor pointing ++ * to non-existing interfaces. Ignore that and attempt the same ++ * hard-wired 0 and 1 interfaces. + */ +- if (rndis && !info->u) { ++ if (rndis && (!info->u || android_rndis_quirk)) { + info->control = usb_ifnum_to_if(dev->udev, 0); + info->data = usb_ifnum_to_if(dev->udev, 1); +- if (!info->control || !info->data) { ++ if (!info->control || !info->data || info->control != intf) { + dev_dbg(&intf->dev, + "rndis: master #0/%p slave #1/%p\n", + info->control, +-- +1.7.7.6 + 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 @@ +From f1c7fc81d6b170d79df0dc657040e42ece3b1953 Mon Sep 17 00:00:00 2001 +From: Josh Cartwright +Date: Thu, 29 Mar 2012 19:34:53 -0400 +Subject: [PATCH 27/56] jffs2: Fix lock acquisition order bug in gc path + +commit 226bb7df3d22bcf4a1c0fe8206c80cc427498eae upstream. + +The locking policy is such that the erase_complete_block spinlock is +nested within the alloc_sem mutex. This fixes a case in which the +acquisition order was erroneously reversed. This issue was caught by +the following lockdep splat: + + ======================================================= + [ INFO: possible circular locking dependency detected ] + 3.0.5 #1 + ------------------------------------------------------- + jffs2_gcd_mtd6/299 is trying to acquire lock: + (&c->alloc_sem){+.+.+.}, at: [] jffs2_garbage_collect_pass+0x314/0x890 + + but task is already holding lock: + (&(&c->erase_completion_lock)->rlock){+.+...}, at: [] jffs2_garbage_collect_pass+0x308/0x890 + + which lock already depends on the new lock. + + the existing dependency chain (in reverse order) is: + + -> #1 (&(&c->erase_completion_lock)->rlock){+.+...}: + [] validate_chain+0xe6c/0x10bc + [] __lock_acquire+0x54c/0xba4 + [] lock_acquire+0xa4/0x114 + [] _raw_spin_lock+0x3c/0x4c + [] jffs2_garbage_collect_pass+0x4c/0x890 + [] jffs2_garbage_collect_thread+0x1b4/0x1cc + [] kthread+0x98/0xa0 + [] kernel_thread_exit+0x0/0x8 + + -> #0 (&c->alloc_sem){+.+.+.}: + [] print_circular_bug+0x70/0x2c4 + [] validate_chain+0x1034/0x10bc + [] __lock_acquire+0x54c/0xba4 + [] lock_acquire+0xa4/0x114 + [] mutex_lock_nested+0x74/0x33c + [] jffs2_garbage_collect_pass+0x314/0x890 + [] jffs2_garbage_collect_thread+0x1b4/0x1cc + [] kthread+0x98/0xa0 + [] kernel_thread_exit+0x0/0x8 + + other info that might help us debug this: + + Possible unsafe locking scenario: + + CPU0 CPU1 + ---- ---- + lock(&(&c->erase_completion_lock)->rlock); + lock(&c->alloc_sem); + lock(&(&c->erase_completion_lock)->rlock); + lock(&c->alloc_sem); + + *** DEADLOCK *** + + 1 lock held by jffs2_gcd_mtd6/299: + #0: (&(&c->erase_completion_lock)->rlock){+.+...}, at: [] jffs2_garbage_collect_pass+0x308/0x890 + + stack backtrace: + [] (unwind_backtrace+0x0/0x100) from [] (dump_stack+0x20/0x24) + [] (dump_stack+0x20/0x24) from [] (print_circular_bug+0x1c8/0x2c4) + [] (print_circular_bug+0x1c8/0x2c4) from [] (validate_chain+0x1034/0x10bc) + [] (validate_chain+0x1034/0x10bc) from [] (__lock_acquire+0x54c/0xba4) + [] (__lock_acquire+0x54c/0xba4) from [] (lock_acquire+0xa4/0x114) + [] (lock_acquire+0xa4/0x114) from [] (mutex_lock_nested+0x74/0x33c) + [] (mutex_lock_nested+0x74/0x33c) from [] (jffs2_garbage_collect_pass+0x314/0x890) + [] (jffs2_garbage_collect_pass+0x314/0x890) from [] (jffs2_garbage_collect_thread+0x1b4/0x1cc) + [] (jffs2_garbage_collect_thread+0x1b4/0x1cc) from [] (kthread+0x98/0xa0) + [] (kthread+0x98/0xa0) from [] (kernel_thread_exit+0x0/0x8) + +This was introduce in '81cfc9f jffs2: Fix serious write stall due to erase'. + +Signed-off-by: Josh Cartwright +Signed-off-by: Artem Bityutskiy +Signed-off-by: David Woodhouse +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +--- + fs/jffs2/gc.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c +index 31dce61..4bbd521 100644 +--- a/fs/jffs2/gc.c ++++ b/fs/jffs2/gc.c +@@ -225,8 +225,8 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) + return 0; + + D1(printk(KERN_DEBUG "No progress from erasing blocks; doing GC anyway\n")); +- spin_lock(&c->erase_completion_lock); + mutex_lock(&c->alloc_sem); ++ spin_lock(&c->erase_completion_lock); + } + + /* First, work out which block we're garbage-collecting */ +-- +1.7.7.6 + 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 @@ +From fdde7964742c3802205c7fa50677abfe7b462bfd Mon Sep 17 00:00:00 2001 +From: Sylwester Nawrocki +Date: Sat, 21 Apr 2012 18:46:30 -0300 +Subject: [PATCH 28/56] s5p-fimc: Fix locking in subdev set_crop op + +commit e985dbf7d93e2a3e114b4525413e50f83613e0cb upstream. + +When setting TRY crop on the sub-device the mutex was erroneously acquired +rather than released on exit path. This bug is present in kernels starting +from v3.2. + +Signed-off-by: Sylwester Nawrocki +Signed-off-by: Kyungmin Park +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Ben Hutchings +--- + drivers/media/video/s5p-fimc/fimc-capture.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c +index 2cc3b91..327a81f 100644 +--- a/drivers/media/video/s5p-fimc/fimc-capture.c ++++ b/drivers/media/video/s5p-fimc/fimc-capture.c +@@ -1304,7 +1304,7 @@ static int fimc_subdev_set_crop(struct v4l2_subdev *sd, + fimc_capture_try_crop(ctx, r, crop->pad); + + if (crop->which == V4L2_SUBDEV_FORMAT_TRY) { +- mutex_lock(&fimc->lock); ++ mutex_unlock(&fimc->lock); + *v4l2_subdev_get_try_crop(fh, crop->pad) = *r; + return 0; + } +-- +1.7.7.6 + 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 @@ +From 6cbf63344c48a119864df9c5873d0407a32d9872 Mon Sep 17 00:00:00 2001 +From: Mike Snitzer +Date: Sat, 12 May 2012 01:43:21 +0100 +Subject: [PATCH 29/56] dm mpath: check if scsi_dh module already loaded + before trying to load + +commit 510193a2d3d2e03ae53b95c0ae4f33cdff02cbf8 upstream. + +If the requested scsi_dh module is already loaded then skip +request_module(). + +Multipath table loads can hang in an unnecessary __request_module. + +Reported-by: Ben Marzinski +Signed-off-by: Mike Snitzer +Signed-off-by: Alasdair G Kergon +Signed-off-by: Ben Hutchings +--- + drivers/md/dm-mpath.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c +index 801d92d..a417f94 100644 +--- a/drivers/md/dm-mpath.c ++++ b/drivers/md/dm-mpath.c +@@ -698,8 +698,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m) + return 0; + + m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL); +- request_module("scsi_dh_%s", m->hw_handler_name); +- if (scsi_dh_handler_exist(m->hw_handler_name) == 0) { ++ if (!try_then_request_module(scsi_dh_handler_exist(m->hw_handler_name), ++ "scsi_dh_%s", m->hw_handler_name)) { + ti->error = "unknown hardware handler type"; + ret = -EINVAL; + goto fail; +-- +1.7.7.6 + 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 @@ +From 03ddf7fce874ca8243c81666ca3cc742f195781b Mon Sep 17 00:00:00 2001 +From: "David S. Miller" +Date: Thu, 10 May 2012 11:00:46 -0700 +Subject: [PATCH 30/56] sparc64: Do not clobber %g2 in + xcall_fetch_glob_regs(). + +[ Upstream commit a5a737e090e25981e99d69f01400e3a80356581c ] + +%g2 is meant to hold the CPUID number throughout this routine, since +at the very beginning, and at the very end, we use %g2 to calculate +indexes into per-cpu arrays. + +However we erroneously clobber it in order to hold the %cwp register +value mid-stream. + +Fix this code to use %g3 for the %cwp read and related calulcations +instead. + +Reported-by: Meelis Roos +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + arch/sparc/kernel/central.c | 2 +- + arch/sparc/mm/ultra.S | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c +index 38d48a5..9708851 100644 +--- a/arch/sparc/kernel/central.c ++++ b/arch/sparc/kernel/central.c +@@ -269,4 +269,4 @@ static int __init sunfire_init(void) + return 0; + } + +-subsys_initcall(sunfire_init); ++fs_initcall(sunfire_init); +diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S +index b57a594..874162a 100644 +--- a/arch/sparc/mm/ultra.S ++++ b/arch/sparc/mm/ultra.S +@@ -495,11 +495,11 @@ xcall_fetch_glob_regs: + stx %o7, [%g1 + GR_SNAP_O7] + stx %i7, [%g1 + GR_SNAP_I7] + /* Don't try this at home kids... */ +- rdpr %cwp, %g2 +- sub %g2, 1, %g7 ++ rdpr %cwp, %g3 ++ sub %g3, 1, %g7 + wrpr %g7, %cwp + mov %i7, %g7 +- wrpr %g2, %cwp ++ wrpr %g3, %cwp + stx %g7, [%g1 + GR_SNAP_RPC] + sethi %hi(trap_block), %g7 + or %g7, %lo(trap_block), %g7 +-- +1.7.7.6 + 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 @@ +From 37f2f887df9f3c8428bd1776a5c0ca1d302b3ea1 Mon Sep 17 00:00:00 2001 +From: Axel Lin +Date: Wed, 1 Feb 2012 10:50:05 +0800 +Subject: [PATCH 31/56] gpio: Add missing spin_lock_init in gpio-ml-ioh driver + +commit 7e3a70fb7bccada029c188c89bfbf3c0a63c1500 upstream. + +This bug was introduced by commit 54be5663 +"gpio-ml-ioh: Support interrupt function" which adds a spinlock to struct +ioh_gpio but never init the spinlock. + +Signed-off-by: Axel Lin +Signed-off-by: Grant Likely +Signed-off-by: Ben Hutchings +--- + drivers/gpio/gpio-ml-ioh.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c +index 461958f..271fd49 100644 +--- a/drivers/gpio/gpio-ml-ioh.c ++++ b/drivers/gpio/gpio-ml-ioh.c +@@ -448,6 +448,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev, + chip->reg = chip->base; + chip->ch = i; + mutex_init(&chip->lock); ++ spin_lock_init(&chip->spinlock); + ioh_gpio_setup(chip, num_ports[i]); + ret = gpiochip_add(&chip->gpio); + if (ret) { +-- +1.7.7.6 + 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 @@ +From e985aa700788ca6b938d4505cbe1dbdd88a3dbfd Mon Sep 17 00:00:00 2001 +From: Tomoya MORINAGA +Date: Fri, 9 Dec 2011 13:11:42 +0900 +Subject: [PATCH 32/56] spi-topcliff-pch: Modify pci-bus number dynamically to + get DMA device info + +commit ee2ece5261a639b89f194d141444b03b4c923179 upstream. + +Signed-off-by: Tomoya MORINAGA +Signed-off-by: Grant Likely +Signed-off-by: Ben Hutchings +--- + drivers/spi/spi-topcliff-pch.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c +index 54b9d2e..3238ec8 100644 +--- a/drivers/spi/spi-topcliff-pch.c ++++ b/drivers/spi/spi-topcliff-pch.c +@@ -924,7 +924,8 @@ static void pch_spi_request_dma(struct pch_spi_data *data, int bpw) + dma_cap_set(DMA_SLAVE, mask); + + /* Get DMA's dev information */ +- dma_dev = pci_get_bus_and_slot(2, PCI_DEVFN(12, 0)); ++ dma_dev = pci_get_bus_and_slot(data->board_dat->pdev->bus->number, ++ PCI_DEVFN(12, 0)); + + /* Set Tx DMA */ + param = &dma->param_tx; +-- +1.7.7.6 + 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 @@ +From fcd3dfee85be4b4bdde47eecba12490ede6218d2 Mon Sep 17 00:00:00 2001 +From: Tomoya MORINAGA +Date: Fri, 9 Dec 2011 13:13:27 +0900 +Subject: [PATCH 33/56] spi-topcliff-pch: Fix issue for transmitting over + 4KByte + +commit 7d05b3e868ee0f9231baf40cb77be3df5dd1f18c upstream. + +Currently, when spi-topcliff-pch receives transmit request over 4KByte, +this driver can't process correctly. This driver needs to divide the data +into 4Kbyte unit. +This patch fixes the issue. + +Signed-off-by: Tomoya MORINAGA +Signed-off-by: Grant Likely +Signed-off-by: Ben Hutchings +--- + drivers/spi/spi-topcliff-pch.c | 66 +++++++++++++++++++++++++++++++++------- + 1 files changed, 55 insertions(+), 11 deletions(-) + +diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c +index 3238ec8..1e60827 100644 +--- a/drivers/spi/spi-topcliff-pch.c ++++ b/drivers/spi/spi-topcliff-pch.c +@@ -196,6 +196,7 @@ struct pch_spi_data { + struct pch_spi_dma_ctrl dma; + int use_dma; + u8 irq_reg_sts; ++ int save_total_len; + }; + + /** +@@ -823,11 +824,13 @@ static void pch_spi_copy_rx_data_for_dma(struct pch_spi_data *data, int bpw) + rx_dma_buf = data->dma.rx_buf_virt; + for (j = 0; j < data->bpw_len; j++) + *rx_buf++ = *rx_dma_buf++ & 0xFF; ++ data->cur_trans->rx_buf = rx_buf; + } else { + rx_sbuf = data->cur_trans->rx_buf; + rx_dma_sbuf = data->dma.rx_buf_virt; + for (j = 0; j < data->bpw_len; j++) + *rx_sbuf++ = *rx_dma_sbuf++; ++ data->cur_trans->rx_buf = rx_sbuf; + } + } + +@@ -853,6 +856,9 @@ static int pch_spi_start_transfer(struct pch_spi_data *data) + rtn = wait_event_interruptible_timeout(data->wait, + data->transfer_complete, + msecs_to_jiffies(2 * HZ)); ++ if (!rtn) ++ dev_err(&data->master->dev, ++ "%s wait-event timeout\n", __func__); + + dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent, + DMA_FROM_DEVICE); +@@ -989,6 +995,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) + int i; + int size; + int rem; ++ int head; + unsigned long flags; + struct pch_spi_dma_ctrl *dma; + +@@ -1017,6 +1024,11 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) + } + data->bpw_len = data->cur_trans->len / (*bpw / 8); + ++ if (data->bpw_len > PCH_BUF_SIZE) { ++ data->bpw_len = PCH_BUF_SIZE; ++ data->cur_trans->len -= PCH_BUF_SIZE; ++ } ++ + /* copy Tx Data */ + if (data->cur_trans->tx_buf != NULL) { + if (*bpw == 8) { +@@ -1031,10 +1043,17 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) + *tx_dma_sbuf++ = *tx_sbuf++; + } + } ++ ++ /* Calculate Rx parameter for DMA transmitting */ + if (data->bpw_len > PCH_DMA_TRANS_SIZE) { +- num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1; ++ if (data->bpw_len % PCH_DMA_TRANS_SIZE) { ++ num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1; ++ rem = data->bpw_len % PCH_DMA_TRANS_SIZE; ++ } else { ++ num = data->bpw_len / PCH_DMA_TRANS_SIZE; ++ rem = PCH_DMA_TRANS_SIZE; ++ } + size = PCH_DMA_TRANS_SIZE; +- rem = data->bpw_len % PCH_DMA_TRANS_SIZE; + } else { + num = 1; + size = data->bpw_len; +@@ -1094,15 +1113,23 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) + dma->nent = num; + dma->desc_rx = desc_rx; + +- /* TX */ +- if (data->bpw_len > PCH_DMA_TRANS_SIZE) { +- num = data->bpw_len / PCH_DMA_TRANS_SIZE; ++ /* Calculate Tx parameter for DMA transmitting */ ++ if (data->bpw_len > PCH_MAX_FIFO_DEPTH) { ++ head = PCH_MAX_FIFO_DEPTH - PCH_DMA_TRANS_SIZE; ++ if (data->bpw_len % PCH_DMA_TRANS_SIZE > 4) { ++ num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1; ++ rem = data->bpw_len % PCH_DMA_TRANS_SIZE - head; ++ } else { ++ num = data->bpw_len / PCH_DMA_TRANS_SIZE; ++ rem = data->bpw_len % PCH_DMA_TRANS_SIZE + ++ PCH_DMA_TRANS_SIZE - head; ++ } + size = PCH_DMA_TRANS_SIZE; +- rem = 16; + } else { + num = 1; + size = data->bpw_len; + rem = data->bpw_len; ++ head = 0; + } + + dma->sg_tx_p = kzalloc(sizeof(struct scatterlist)*num, GFP_ATOMIC); +@@ -1112,11 +1139,17 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) + for (i = 0; i < num; i++, sg++) { + if (i == 0) { + sg->offset = 0; ++ sg_set_page(sg, virt_to_page(dma->tx_buf_virt), size + head, ++ sg->offset); ++ sg_dma_len(sg) = size + head; ++ } else if (i == (num - 1)) { ++ sg->offset = head + size * i; ++ sg->offset = sg->offset * (*bpw / 8); + sg_set_page(sg, virt_to_page(dma->tx_buf_virt), rem, + sg->offset); + sg_dma_len(sg) = rem; + } else { +- sg->offset = rem + size * (i - 1); ++ sg->offset = head + size * i; + sg->offset = sg->offset * (*bpw / 8); + sg_set_page(sg, virt_to_page(dma->tx_buf_virt), size, + sg->offset); +@@ -1204,6 +1237,7 @@ static void pch_spi_process_messages(struct work_struct *pwork) + data->current_msg->spi->bits_per_word); + pch_spi_writereg(data->master, PCH_SSNXCR, SSN_NO_CONTROL); + do { ++ int cnt; + /* If we are already processing a message get the next + transfer structure from the message otherwise retrieve + the 1st transfer request from the message. */ +@@ -1223,11 +1257,20 @@ static void pch_spi_process_messages(struct work_struct *pwork) + } + spin_unlock(&data->lock); + ++ if (!data->cur_trans->len) ++ goto out; ++ cnt = (data->cur_trans->len - 1) / PCH_BUF_SIZE + 1; ++ data->save_total_len = data->cur_trans->len; + if (data->use_dma) { +- pch_spi_handle_dma(data, &bpw); +- if (!pch_spi_start_transfer(data)) +- goto out; +- pch_spi_copy_rx_data_for_dma(data, bpw); ++ int i; ++ char *save_rx_buf = data->cur_trans->rx_buf; ++ for (i = 0; i < cnt; i ++) { ++ pch_spi_handle_dma(data, &bpw); ++ if (!pch_spi_start_transfer(data)) ++ goto out; ++ pch_spi_copy_rx_data_for_dma(data, bpw); ++ } ++ data->cur_trans->rx_buf = save_rx_buf; + } else { + pch_spi_set_tx(data, &bpw); + pch_spi_set_ir(data); +@@ -1238,6 +1281,7 @@ static void pch_spi_process_messages(struct work_struct *pwork) + data->pkt_tx_buff = NULL; + } + /* increment message count */ ++ data->cur_trans->len = data->save_total_len; + data->current_msg->actual_length += data->cur_trans->len; + + dev_dbg(&data->master->dev, +-- +1.7.7.6 + 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 @@ +From 3e43ac1c2f64e955c74f598621363028d87a93c2 Mon Sep 17 00:00:00 2001 +From: Tomoya MORINAGA +Date: Fri, 9 Dec 2011 13:13:28 +0900 +Subject: [PATCH 34/56] spi-topcliff-pch: supports a spi mode setup and bit + order setup by IO control + +commit f258b44e22e07f5e98ac2260c70acff5784791b6 upstream. + +This patch supports a spi mode setup and bit order setup by IO control. + spi mode: mode 0 to mode 3 + bit order: LSB first, MSB first + +Signed-off-by: Tomoya MORINAGA +Signed-off-by: Grant Likely +Signed-off-by: Ben Hutchings +--- + drivers/spi/spi-topcliff-pch.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c +index 1e60827..0c4efed 100644 +--- a/drivers/spi/spi-topcliff-pch.c ++++ b/drivers/spi/spi-topcliff-pch.c +@@ -1434,6 +1434,7 @@ static int __devinit pch_spi_pd_probe(struct platform_device *plat_dev) + master->num_chipselect = PCH_MAX_CS; + master->setup = pch_spi_setup; + master->transfer = pch_spi_transfer; ++ master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; + + data->board_dat = board_dat; + data->plat_dev = plat_dev; +-- +1.7.7.6 + 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 @@ +From 0c6c9c1d69fbdd6a1f54668a2c9f8f306c702728 Mon Sep 17 00:00:00 2001 +From: Tomoya MORINAGA +Date: Fri, 9 Dec 2011 13:13:29 +0900 +Subject: [PATCH 35/56] spi-topcliff-pch: add recovery processing in case + wait-event timeout + +commit 0f57e168aa109775430c76cc663fb64909813d84 upstream. + +Currently, pch_spi_start_transfer failure is not anticipated. +This patch adds the processing. + +Signed-off-by: Tomoya MORINAGA +Signed-off-by: Grant Likely +Signed-off-by: Ben Hutchings +--- + drivers/spi/spi-topcliff-pch.c | 10 +++++++++- + 1 files changed, 9 insertions(+), 1 deletions(-) + +diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c +index 0c4efed..1590dbd 100644 +--- a/drivers/spi/spi-topcliff-pch.c ++++ b/drivers/spi/spi-topcliff-pch.c +@@ -1266,8 +1266,16 @@ static void pch_spi_process_messages(struct work_struct *pwork) + char *save_rx_buf = data->cur_trans->rx_buf; + for (i = 0; i < cnt; i ++) { + pch_spi_handle_dma(data, &bpw); +- if (!pch_spi_start_transfer(data)) ++ if (!pch_spi_start_transfer(data)) { ++ data->transfer_complete = true; ++ data->current_msg->status = -EIO; ++ data->current_msg->complete ++ (data->current_msg->context); ++ data->bcurrent_msg_processing = false; ++ data->current_msg = NULL; ++ data->cur_trans = NULL; + goto out; ++ } + pch_spi_copy_rx_data_for_dma(data, bpw); + } + data->cur_trans->rx_buf = save_rx_buf; +-- +1.7.7.6 + 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 @@ +From ee9d8cc0c47d0095d5d27b81b7459fa534c56a67 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Mon, 20 Feb 2012 23:06:18 -0500 +Subject: [PATCH 36/56] ext4: avoid deadlock on sync-mounted FS w/o journal + +commit c1bb05a657fb3d8c6179a4ef7980261fae4521d7 upstream. + +Processes hang forever on a sync-mounted ext2 file system that +is mounted with the ext4 module (default in Fedora 16). + +I can reproduce this reliably by mounting an ext2 partition with +"-o sync" and opening a new file an that partition with vim. vim +will hang in "D" state forever. The same happens on ext4 without +a journal. + +I am attaching a small patch here that solves this issue for me. +In the sync mounted case without a journal, +ext4_handle_dirty_metadata() may call sync_dirty_buffer(), which +can't be called with buffer lock held. + +Also move mb_cache_entry_release inside lock to avoid race +fixed previously by 8a2bfdcb ext[34]: EA block reference count racing fix +Note too that ext2 fixed this same problem in 2006 with +b2f49033 [PATCH] fix deadlock in ext2 + +Signed-off-by: Martin.Wilck@ts.fujitsu.com +[sandeen@redhat.com: move mb_cache_entry_release before unlock, edit commit msg] +Signed-off-by: Eric Sandeen +Signed-off-by: "Theodore Ts'o" +Signed-off-by: Ben Hutchings +--- + fs/ext4/xattr.c | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c +index 93a00d8..4410ae7 100644 +--- a/fs/ext4/xattr.c ++++ b/fs/ext4/xattr.c +@@ -487,18 +487,19 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode, + ext4_free_blocks(handle, inode, bh, 0, 1, + EXT4_FREE_BLOCKS_METADATA | + EXT4_FREE_BLOCKS_FORGET); ++ unlock_buffer(bh); + } else { + le32_add_cpu(&BHDR(bh)->h_refcount, -1); ++ if (ce) ++ mb_cache_entry_release(ce); ++ unlock_buffer(bh); + error = ext4_handle_dirty_metadata(handle, inode, bh); + if (IS_SYNC(inode)) + ext4_handle_sync(handle); + dquot_free_block(inode, 1); + ea_bdebug(bh, "refcount now=%d; releasing", + le32_to_cpu(BHDR(bh)->h_refcount)); +- if (ce) +- mb_cache_entry_release(ce); + } +- unlock_buffer(bh); + out: + ext4_std_error(inode->i_sb, error); + return; +-- +1.7.7.6 + 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 @@ +From 0ab7c7f97658245faa8a63b0e4870f5459f53e6e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=89meric=20Maschino?= +Date: Mon, 9 Jan 2012 12:55:10 -0800 +Subject: [PATCH 37/56] ia64: Add accept4() syscall +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit 65cc21b4523e94d5640542a818748cd3be8cd6b4 upstream. + +While debugging udev > 170 failure on Debian Wheezy +(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648325), it appears +that the issue was in fact due to missing accept4() in ia64. + +This patch simply adds accept4() to ia64. + +Signed-off-by: Émeric Maschino +Signed-off-by: Tony Luck +Signed-off-by: Ben Hutchings +--- + arch/ia64/include/asm/unistd.h | 3 ++- + arch/ia64/kernel/entry.S | 1 + + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h +index 7617248..7a3bd25 100644 +--- a/arch/ia64/include/asm/unistd.h ++++ b/arch/ia64/include/asm/unistd.h +@@ -323,11 +323,12 @@ + #define __NR_sendmmsg 1331 + #define __NR_process_vm_readv 1332 + #define __NR_process_vm_writev 1333 ++#define __NR_accept4 1334 + + #ifdef __KERNEL__ + + +-#define NR_syscalls 310 /* length of syscall table */ ++#define NR_syscalls 311 /* length of syscall table */ + + /* + * The following defines stop scripts/checksyscalls.sh from complaining about +diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S +index 5b31d46..1ccbe12 100644 +--- a/arch/ia64/kernel/entry.S ++++ b/arch/ia64/kernel/entry.S +@@ -1779,6 +1779,7 @@ sys_call_table: + data8 sys_sendmmsg + data8 sys_process_vm_readv + data8 sys_process_vm_writev ++ data8 sys_accept4 + + .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls + #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ +-- +1.7.7.6 + 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 @@ +From 258bf060571803e3260270a579344d4a69eafe98 Mon Sep 17 00:00:00 2001 +From: Arend van Spriel +Date: Thu, 9 Feb 2012 21:08:58 +0100 +Subject: [PATCH 38/56] brcm80211: smac: fix endless retry of A-MPDU + transmissions + +commit 5e379203c7788b7af01150bfadbc74d2797a2ef4 upstream. + +The A-MPDU code checked against a retry limit, but it was using +the wrong variable to do so. This patch fixes this to assure +proper retry mechanism. + +This problem had a side-effect causing the mac80211 flush callback +to remain waiting forever as well. That side effect has been fixed +by commit by Stanislaw Gruszka: + +commit f96b08a7e6f69c0f0a576554df3df5b1b519c479 +Date: Tue Jan 17 12:38:50 2012 +0100 + + brcmsmac: fix tx queue flush infinite loop + + Reference: + https://bugzilla.kernel.org/show_bug.cgi?id=42576 + +Cc: Stanislaw Gruszka +Reviewed-by: Pieter-Paul Giesberts +Reviewed-by: Alwin Beukers +Signed-off-by: Arend van Spriel +Signed-off-by: John W. Linville +Signed-off-by: Ben Hutchings +--- + drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +----- + 1 files changed, 1 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c +index 7f27dbd..0515862 100644 +--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c +@@ -1053,17 +1053,13 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, + } + /* either retransmit or send bar if ack not recd */ + if (!ack_recd) { +- struct ieee80211_tx_rate *txrate = +- tx_info->status.rates; +- if (retry && (txrate[0].count < (int)retry_limit)) { ++ if (retry && (ini->txretry[index] < (int)retry_limit)) { + ini->txretry[index]++; + ini->tx_in_transit--; + /* + * Use high prededence for retransmit to + * give some punch + */ +- /* brcms_c_txq_enq(wlc, scb, p, +- * BRCMS_PRIO_TO_PREC(tid)); */ + brcms_c_txq_enq(wlc, scb, p, + BRCMS_PRIO_TO_HI_PREC(tid)); + } else { +-- +1.7.7.6 + 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 @@ +From 51fdc0c99703cfde72be81bef9c7e38ac5c023a0 Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Fri, 11 May 2012 17:42:37 +0100 +Subject: [PATCH 39/56] ARM: 7417/1: vfp: ensure preemption is disabled when + enabling VFP access + +commit 998de4acb2ba188d20768d1065658377a2e7d29b upstream. + +The vfp_enable function enables access to the VFP co-processor register +space (cp10 and cp11) on the current CPU and must be called with +preemption disabled. Unfortunately, the vfp_init late initcall does not +disable preemption and can lead to an oops during boot if thread +migration occurs at the wrong time and we end up attempting to access +the FPSID on a CPU with VFP access disabled. + +This patch fixes the initcall to call vfp_enable from a non-preemptible +context on each CPU and adds a BUG_ON(preemptible) to ensure that any +similar problems are easily spotted in the future. + +Reported-by: Hyungwoo Yang +Signed-off-by: Hyungwoo Yang +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +--- + arch/arm/vfp/vfpmodule.c | 10 ++++++---- + 1 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c +index 8f3ccdd..8ea07e4 100644 +--- a/arch/arm/vfp/vfpmodule.c ++++ b/arch/arm/vfp/vfpmodule.c +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -428,7 +429,10 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) + + static void vfp_enable(void *unused) + { +- u32 access = get_copro_access(); ++ u32 access; ++ ++ BUG_ON(preemptible()); ++ access = get_copro_access(); + + /* + * Enable full access to VFP (cp10 and cp11) +@@ -556,7 +560,7 @@ static int __init vfp_init(void) + unsigned int cpu_arch = cpu_architecture(); + + if (cpu_arch >= CPU_ARCH_ARMv6) +- vfp_enable(NULL); ++ on_each_cpu(vfp_enable, NULL, 1); + + /* + * First check that there is a VFP that we can use. +@@ -577,8 +581,6 @@ static int __init vfp_init(void) + } else { + hotcpu_notifier(vfp_hotplug, 0); + +- smp_call_function(vfp_enable, NULL, 1); +- + VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ + printk("implementor %02x architecture %d part %02x variant %x rev %x\n", + (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, +-- +1.7.7.6 + 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 @@ +From b081b9481296d51cdb05548b8f67888a240a675f Mon Sep 17 00:00:00 2001 +From: Bernhard Kohl +Date: Sun, 13 May 2012 23:39:37 +0200 +Subject: [PATCH 40/56] target: Fix SPC-2 RELEASE bug for multi-session iSCSI + client setups + +commit edc318d9fea6854df752ec8c645b960b0d5a1d23 upstream. + +This patch addresses a bug in a special case for target core SPC-2 RELEASE +logic where the same physical client (eg: iSCSI InitiatorName) with +differing iSCSI session identifiers (ISID) is allowed to incorrectly release +the same client's SPC-2 reservation from the non reservation holding path. + +Note this bug is specific to iscsi-target w/ SPC-2 reservations, and +with the default enforce_pr_isids=1 device attr setting in target-core +controls if a InitiatorName + different ISID reservations are handled +the same as a single iSCSI client entity. + +Signed-off-by: Bernhard Kohl +Signed-off-by: Nicholas Bellinger +Signed-off-by: Ben Hutchings +--- + drivers/target/target_core_pr.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c +index 6cf6ff4..b75bc92 100644 +--- a/drivers/target/target_core_pr.c ++++ b/drivers/target/target_core_pr.c +@@ -223,6 +223,9 @@ int target_scsi2_reservation_release(struct se_task *task) + if (dev->dev_reserved_node_acl != sess->se_node_acl) + goto out_unlock; + ++ if (dev->dev_res_bin_isid != sess->sess_bin_isid) ++ goto out_unlock; ++ + dev->dev_reserved_node_acl = NULL; + dev->dev_flags &= ~DF_SPC2_RESERVATIONS; + if (dev->dev_flags & DF_SPC2_RESERVATIONS_WITH_ISID) { +-- +1.7.7.6 + 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 @@ +From d5f0e3adeaf18edfac8b3c7d8f867fe92923a4ab Mon Sep 17 00:00:00 2001 +From: Alexander Clouter +Date: Sat, 12 May 2012 09:45:08 +0100 +Subject: [PATCH 41/56] crypto: mv_cesa requires on CRYPTO_HASH to build + +commit 1ebfefcf37a6e308266a8d786e8cfea0a454058c upstream. + +Without CRYPTO_HASH being selected, mv_cesa has a lot of hooks +into undefined exports. +---- + MODPOST 81 modules + Kernel: arch/arm/boot/Image is ready + AS arch/arm/boot/compressed/head.o + GZIP arch/arm/boot/compressed/piggy.gzip + CC arch/arm/boot/compressed/misc.o + CC arch/arm/boot/compressed/decompress.o +ERROR: "crypto_ahash_type" [drivers/crypto/mv_cesa.ko] undefined! +ERROR: "crypto_shash_final" [drivers/crypto/mv_cesa.ko] undefined! +ERROR: "crypto_register_ahash" [drivers/crypto/mv_cesa.ko] undefined! +ERROR: "crypto_unregister_ahash" [drivers/crypto/mv_cesa.ko] undefined! +ERROR: "crypto_shash_update" [drivers/crypto/mv_cesa.ko] undefined! +ERROR: "crypto_shash_digest" [drivers/crypto/mv_cesa.ko] undefined! +ERROR: "crypto_shash_setkey" [drivers/crypto/mv_cesa.ko] undefined! +ERROR: "crypto_alloc_shash" [drivers/crypto/mv_cesa.ko] undefined! +make[1]: *** [__modpost] Error 1 +make: *** [modules] Error 2 +make: *** Waiting for unfinished jobs.... +---- + +Signed-off-by: Alexander Clouter +Signed-off-by: Jason Cooper +Signed-off-by: Ben Hutchings +--- + drivers/crypto/Kconfig | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig +index 6d16b4b..7e3002b 100644 +--- a/drivers/crypto/Kconfig ++++ b/drivers/crypto/Kconfig +@@ -173,6 +173,7 @@ config CRYPTO_DEV_MV_CESA + select CRYPTO_ALGAPI + select CRYPTO_AES + select CRYPTO_BLKCIPHER2 ++ select CRYPTO_HASH + help + This driver allows you to utilize the Cryptographic Engines and + Security Accelerator (CESA) which can be found on the Marvell Orion +-- +1.7.7.6 + 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 @@ +From e7a10d7bb94e2d5618757447f0ac108d8951b4a6 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 15 May 2012 08:07:31 +0200 +Subject: [PATCH 42/56] ALSA: hda/idt - Fix power-map for speaker-pins with + some HP laptops + +commit b0791dda813c179e539b0fc1ecd3f5f30f2571e2 upstream. + +BIOS on some HP laptops don't set the speaker-pins as fixed but expose +as jacks, and this confuses the driver as if these pins are +jack-detectable. As a result, the machine doesn't get sounds from +speakers because the driver prepares the power-map update via jack +unsol events which never come up in reality. The bug was introduced +in some time in 3.2 for enabling the power-mapping feature. + +This patch fixes the problem by replacing the check of the persistent +power-map bits with a proper is_jack_detectable() call. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43240 + +Signed-off-by: Takashi Iwai +Signed-off-by: Ben Hutchings +--- + sound/pci/hda/patch_sigmatel.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c +index ed67698..7b7a516 100644 +--- a/sound/pci/hda/patch_sigmatel.c ++++ b/sound/pci/hda/patch_sigmatel.c +@@ -4484,9 +4484,9 @@ static int stac92xx_init(struct hda_codec *codec) + def_conf = get_defcfg_connect(def_conf); + /* skip any ports that don't have jacks since presence + * detection is useless */ +- if (def_conf != AC_JACK_PORT_COMPLEX) { +- if (def_conf != AC_JACK_PORT_NONE) +- stac_toggle_power_map(codec, nid, 1); ++ if (def_conf != AC_JACK_PORT_NONE && ++ !is_jack_detectable(codec, nid)) { ++ stac_toggle_power_map(codec, nid, 1); + continue; + } + if (enable_pin_detect(codec, nid, STAC_PWR_EVENT)) { +-- +1.7.7.6 + 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 @@ +From ffbe8f6bb9d1b143aa8d3e37c4c237219b71544d Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Tue, 15 May 2012 18:13:00 +0100 +Subject: [PATCH 43/56] ASoC: wm8994: Fix AIF2ADC power down + +commit c7f5f2389377b66028bc129890aa653deafe8d39 upstream. + +Signed-off-by: Mark Brown +Signed-off-by: Ben Hutchings +--- + sound/soc/codecs/wm8994.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c +index 7806301..3e7aa22 100644 +--- a/sound/soc/codecs/wm8994.c ++++ b/sound/soc/codecs/wm8994.c +@@ -1027,7 +1027,7 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, + snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, + WM8994_AIF2DACL_ENA | + WM8994_AIF2DACR_ENA, 0); +- snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, ++ snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, + WM8994_AIF2ADCL_ENA | + WM8994_AIF2ADCR_ENA, 0); + +-- +1.7.7.6 + 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 @@ +From 5dc6e8a33ae9998d96530b6e6778654685d02b86 Mon Sep 17 00:00:00 2001 +From: Ming Lei +Date: Thu, 26 Apr 2012 11:33:46 +0800 +Subject: [PATCH 44/56] usbnet: fix skb traversing races during unlink(v2) + +commit 5b6e9bcdeb65634b4ad604eb4536404bbfc62cfa upstream. + +Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid +recursive locking in usbnet_stop()) fixes the recursive locking +problem by releasing the skb queue lock before unlink, but may +cause skb traversing races: + - after URB is unlinked and the queue lock is released, + the refered skb and skb->next may be moved to done queue, + even be released + - in skb_queue_walk_safe, the next skb is still obtained + by next pointer of the last skb + - so maybe trigger oops or other problems + +This patch extends the usage of entry->state to describe 'start_unlink' +state, so always holding the queue(rx/tx) lock to change the state if +the referd skb is in rx or tx queue because we need to know if the +refered urb has been started unlinking in unlink_urbs. + +The other part of this patch is based on Huajun's patch: +always traverse from head of the tx/rx queue to get skb which is +to be unlinked but not been started unlinking. + +Signed-off-by: Huajun Li +Signed-off-by: Ming Lei +Cc: Oliver Neukum +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/usb/usbnet.c | 54 +++++++++++++++++++++++++++++++------------- + include/linux/usb/usbnet.h | 3 +- + 2 files changed, 40 insertions(+), 17 deletions(-) + +diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c +index 750e330..b873b5d 100644 +--- a/drivers/net/usb/usbnet.c ++++ b/drivers/net/usb/usbnet.c +@@ -281,17 +281,32 @@ int usbnet_change_mtu (struct net_device *net, int new_mtu) + } + EXPORT_SYMBOL_GPL(usbnet_change_mtu); + ++/* The caller must hold list->lock */ ++static void __usbnet_queue_skb(struct sk_buff_head *list, ++ struct sk_buff *newsk, enum skb_state state) ++{ ++ struct skb_data *entry = (struct skb_data *) newsk->cb; ++ ++ __skb_queue_tail(list, newsk); ++ entry->state = state; ++} ++ + /*-------------------------------------------------------------------------*/ + + /* some LK 2.4 HCDs oopsed if we freed or resubmitted urbs from + * completion callbacks. 2.5 should have fixed those bugs... + */ + +-static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_head *list) ++static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb, ++ struct sk_buff_head *list, enum skb_state state) + { + unsigned long flags; ++ enum skb_state old_state; ++ struct skb_data *entry = (struct skb_data *) skb->cb; + + spin_lock_irqsave(&list->lock, flags); ++ old_state = entry->state; ++ entry->state = state; + __skb_unlink(skb, list); + spin_unlock(&list->lock); + spin_lock(&dev->done.lock); +@@ -299,6 +314,7 @@ static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_hea + if (dev->done.qlen == 1) + tasklet_schedule(&dev->bh); + spin_unlock_irqrestore(&dev->done.lock, flags); ++ return old_state; + } + + /* some work can't be done in tasklets, so we use keventd +@@ -339,7 +355,6 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) + entry = (struct skb_data *) skb->cb; + entry->urb = urb; + entry->dev = dev; +- entry->state = rx_start; + entry->length = 0; + + usb_fill_bulk_urb (urb, dev->udev, dev->in, +@@ -371,7 +386,7 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) + tasklet_schedule (&dev->bh); + break; + case 0: +- __skb_queue_tail (&dev->rxq, skb); ++ __usbnet_queue_skb(&dev->rxq, skb, rx_start); + } + } else { + netif_dbg(dev, ifdown, dev->net, "rx: stopped\n"); +@@ -422,16 +437,17 @@ static void rx_complete (struct urb *urb) + struct skb_data *entry = (struct skb_data *) skb->cb; + struct usbnet *dev = entry->dev; + int urb_status = urb->status; ++ enum skb_state state; + + skb_put (skb, urb->actual_length); +- entry->state = rx_done; ++ state = rx_done; + entry->urb = NULL; + + switch (urb_status) { + /* success */ + case 0: + if (skb->len < dev->net->hard_header_len) { +- entry->state = rx_cleanup; ++ state = rx_cleanup; + dev->net->stats.rx_errors++; + dev->net->stats.rx_length_errors++; + netif_dbg(dev, rx_err, dev->net, +@@ -470,7 +486,7 @@ static void rx_complete (struct urb *urb) + "rx throttle %d\n", urb_status); + } + block: +- entry->state = rx_cleanup; ++ state = rx_cleanup; + entry->urb = urb; + urb = NULL; + break; +@@ -481,17 +497,18 @@ block: + // FALLTHROUGH + + default: +- entry->state = rx_cleanup; ++ state = rx_cleanup; + dev->net->stats.rx_errors++; + netif_dbg(dev, rx_err, dev->net, "rx status %d\n", urb_status); + break; + } + +- defer_bh(dev, skb, &dev->rxq); ++ state = defer_bh(dev, skb, &dev->rxq, state); + + if (urb) { + if (netif_running (dev->net) && +- !test_bit (EVENT_RX_HALT, &dev->flags)) { ++ !test_bit (EVENT_RX_HALT, &dev->flags) && ++ state != unlink_start) { + rx_submit (dev, urb, GFP_ATOMIC); + return; + } +@@ -577,16 +594,23 @@ EXPORT_SYMBOL_GPL(usbnet_purge_paused_rxq); + static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q) + { + unsigned long flags; +- struct sk_buff *skb, *skbnext; ++ struct sk_buff *skb; + int count = 0; + + spin_lock_irqsave (&q->lock, flags); +- skb_queue_walk_safe(q, skb, skbnext) { ++ while (!skb_queue_empty(q)) { + struct skb_data *entry; + struct urb *urb; + int retval; + +- entry = (struct skb_data *) skb->cb; ++ skb_queue_walk(q, skb) { ++ entry = (struct skb_data *) skb->cb; ++ if (entry->state != unlink_start) ++ goto found; ++ } ++ break; ++found: ++ entry->state = unlink_start; + urb = entry->urb; + + /* +@@ -1037,8 +1061,7 @@ static void tx_complete (struct urb *urb) + } + + usb_autopm_put_interface_async(dev->intf); +- entry->state = tx_done; +- defer_bh(dev, skb, &dev->txq); ++ (void) defer_bh(dev, skb, &dev->txq, tx_done); + } + + /*-------------------------------------------------------------------------*/ +@@ -1094,7 +1117,6 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, + entry = (struct skb_data *) skb->cb; + entry->urb = urb; + entry->dev = dev; +- entry->state = tx_start; + entry->length = length; + + usb_fill_bulk_urb (urb, dev->udev, dev->out, +@@ -1153,7 +1175,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, + break; + case 0: + net->trans_start = jiffies; +- __skb_queue_tail (&dev->txq, skb); ++ __usbnet_queue_skb(&dev->txq, skb, tx_start); + if (dev->txq.qlen >= TX_QLEN (dev)) + netif_stop_queue (net); + } +diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h +index 605b0aa..76f4396 100644 +--- a/include/linux/usb/usbnet.h ++++ b/include/linux/usb/usbnet.h +@@ -191,7 +191,8 @@ extern void usbnet_cdc_status(struct usbnet *, struct urb *); + enum skb_state { + illegal = 0, + tx_start, tx_done, +- rx_start, rx_done, rx_cleanup ++ rx_start, rx_done, rx_cleanup, ++ unlink_start + }; + + struct skb_data { /* skb->cb is one of these */ +-- +1.7.7.6 + 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 @@ +From 3a586ee50e3f8a380125a8ce332de9f4c0ef727e Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Mon, 7 May 2012 04:24:51 +0000 +Subject: [PATCH 45/56] cdc_ether: add Novatel USB551L device IDs for + FLAG_WWAN + +commit 4e6304b8420aba5311ba21fd68dab2924ae4d91a upstream. + +Needs to be tagged with FLAG_WWAN, which since it has generic +descriptors, won't happen if we don't override the generic +driver info. + +Cc: Oliver Neukum +Signed-off-by: Dan Williams +Acked-by: Oliver Neukum +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/usb/cdc_ether.c | 16 ++++++++++++++++ + 1 files changed, 16 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c +index eac4886..2ba40cf 100644 +--- a/drivers/net/usb/cdc_ether.c ++++ b/drivers/net/usb/cdc_ether.c +@@ -482,6 +482,7 @@ static const struct driver_info wwan_info = { + /*-------------------------------------------------------------------------*/ + + #define HUAWEI_VENDOR_ID 0x12D1 ++#define NOVATEL_VENDOR_ID 0x1410 + + static const struct usb_device_id products [] = { + /* +@@ -599,6 +600,21 @@ static const struct usb_device_id products [] = { + * because of bugs/quirks in a given product (like Zaurus, above). + */ + { ++ /* Novatel USB551L */ ++ /* This match must come *before* the generic CDC-ETHER match so that ++ * we get FLAG_WWAN set on the device, since it's descriptors are ++ * generic CDC-ETHER. ++ */ ++ .match_flags = USB_DEVICE_ID_MATCH_VENDOR ++ | USB_DEVICE_ID_MATCH_PRODUCT ++ | USB_DEVICE_ID_MATCH_INT_INFO, ++ .idVendor = NOVATEL_VENDOR_ID, ++ .idProduct = 0xB001, ++ .bInterfaceClass = USB_CLASS_COMM, ++ .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, ++ .bInterfaceProtocol = USB_CDC_PROTO_NONE, ++ .driver_info = (unsigned long)&wwan_info, ++}, { + USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET, + USB_CDC_PROTO_NONE), + .driver_info = (unsigned long) &cdc_info, +-- +1.7.7.6 + 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 @@ +From bb7f36d5a6a8621f37a79996cfbf0f0318862fcd Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Wed, 16 May 2012 15:19:20 +0100 +Subject: [PATCH 46/56] ARM: prevent VM_GROWSDOWN mmaps extending below + FIRST_USER_ADDRESS + +commit 9b61a4d1b2064dbd0c9e61754305ac852170509f upstream. + +Reported-by: Al Viro +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +--- + arch/arm/mm/fault.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c +index aa33949..4b0bc37 100644 +--- a/arch/arm/mm/fault.c ++++ b/arch/arm/mm/fault.c +@@ -267,7 +267,9 @@ good_area: + return fault; + + check_stack: +- if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) ++ /* Don't allow expansion below FIRST_USER_ADDRESS */ ++ if (vma->vm_flags & VM_GROWSDOWN && ++ addr >= FIRST_USER_ADDRESS && !expand_stack(vma, addr)) + goto good_area; + out: + return fault; +-- +1.7.7.6 + 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 @@ +From 4fb637e8e8bd6149d99d92389a104494bb234540 Mon Sep 17 00:00:00 2001 +From: Chris Metcalf +Date: Wed, 16 May 2012 14:54:20 -0400 +Subject: [PATCH 47/56] arch/tile: apply commit 74fca9da0 to the compat signal + handling as well + +commit a134d228298c6aa9007205c6b81cae0cac0acb5d upstream. + +This passes siginfo and mcontext to tilegx32 signal handlers that +don't have SA_SIGINFO set just as we have been doing for tilegx64. + +Signed-off-by: Chris Metcalf +Signed-off-by: Ben Hutchings +--- + arch/tile/kernel/compat_signal.c | 12 +++++------- + 1 files changed, 5 insertions(+), 7 deletions(-) + +diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c +index a7869ad..41459d8 100644 +--- a/arch/tile/kernel/compat_signal.c ++++ b/arch/tile/kernel/compat_signal.c +@@ -406,19 +406,17 @@ int compat_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, + * Set up registers for signal handler. + * Registers that we don't modify keep the value they had from + * user-space at the time we took the signal. ++ * We always pass siginfo and mcontext, regardless of SA_SIGINFO, ++ * since some things rely on this (e.g. glibc's debug/segfault.c). + */ + regs->pc = ptr_to_compat_reg(ka->sa.sa_handler); + regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */ + regs->sp = ptr_to_compat_reg(frame); + regs->lr = restorer; + regs->regs[0] = (unsigned long) usig; +- +- if (ka->sa.sa_flags & SA_SIGINFO) { +- /* Need extra arguments, so mark to restore caller-saves. */ +- regs->regs[1] = ptr_to_compat_reg(&frame->info); +- regs->regs[2] = ptr_to_compat_reg(&frame->uc); +- regs->flags |= PT_FLAGS_CALLER_SAVES; +- } ++ regs->regs[1] = ptr_to_compat_reg(&frame->info); ++ regs->regs[2] = ptr_to_compat_reg(&frame->uc); ++ regs->flags |= PT_FLAGS_CALLER_SAVES; + + /* + * Notify any tracer that was single-stepping it. +-- +1.7.7.6 + 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 @@ +From efbb3ae65b6bd81ebb5b7487fdfc4d65812b0825 Mon Sep 17 00:00:00 2001 +From: Jonathan Brassow +Date: Wed, 16 May 2012 04:06:14 -0500 +Subject: [PATCH 48/56] MD: Add del_timer_sync to mddev_suspend (fix nasty + panic) + +commit 0d9f4f135eb6dea06bdcb7065b1e4ff78274a5e9 upstream. + +Use del_timer_sync to remove timer before mddev_suspend finishes. + +We don't want a timer going off after an mddev_suspend is called. This is +especially true with device-mapper, since it can call the destructor function +immediately following a suspend. This results in the removal (kfree) of the +structures upon which the timer depends - resulting in a very ugly panic. +Therefore, we add a del_timer_sync to mddev_suspend to prevent this. + +Signed-off-by: NeilBrown +Signed-off-by: Ben Hutchings +--- + drivers/md/md.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/drivers/md/md.c b/drivers/md/md.c +index 065ab4f..adcd850 100644 +--- a/drivers/md/md.c ++++ b/drivers/md/md.c +@@ -392,6 +392,8 @@ void mddev_suspend(struct mddev *mddev) + synchronize_rcu(); + wait_event(mddev->sb_wait, atomic_read(&mddev->active_io) == 0); + mddev->pers->quiesce(mddev, 1); ++ ++ del_timer_sync(&mddev->safemode_timer); + } + EXPORT_SYMBOL_GPL(mddev_suspend); + +-- +1.7.7.6 + 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 @@ +From 08671b3fdc83c369484ee2b4e9bfab6b0a6ee48d Mon Sep 17 00:00:00 2001 +From: Nicholas Bellinger +Date: Wed, 16 May 2012 16:05:26 -0700 +Subject: [PATCH 49/56] target: Fix bug in handling of FILEIO + block_device + resize ops + +commit cd9323fd68aee3c1c6b5b21e5746c9d1b586fb58 upstream. + +This patch fixes a bug in the handling of FILEIO w/ underlying block_device +resize operations where the original fd_dev->fd_dev_size was incorrectly being +used in fd_get_blocks() for READ_CAPACITY response payloads. + +This patch avoids using fd_dev->fd_dev_size for FILEIO devices with +an underlying block_device, and instead changes fd_get_blocks() to +get the sector count directly from i_size_read() as recommended by hch. + +Reported-by: Christoph Hellwig +Signed-off-by: Nicholas Bellinger +Signed-off-by: Ben Hutchings +--- + drivers/target/target_core_file.c | 22 ++++++++++++++++------ + 1 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c +index b4864fb..cad8b92 100644 +--- a/drivers/target/target_core_file.c ++++ b/drivers/target/target_core_file.c +@@ -170,6 +170,7 @@ static struct se_device *fd_create_virtdevice( + inode = file->f_mapping->host; + if (S_ISBLK(inode->i_mode)) { + struct request_queue *q; ++ unsigned long long dev_size; + /* + * Setup the local scope queue_limits from struct request_queue->limits + * to pass into transport_add_device_to_core_hba() as struct se_dev_limits. +@@ -184,13 +185,12 @@ static struct se_device *fd_create_virtdevice( + * one (1) logical sector from underlying struct block_device + */ + fd_dev->fd_block_size = bdev_logical_block_size(inode->i_bdev); +- fd_dev->fd_dev_size = (i_size_read(file->f_mapping->host) - ++ dev_size = (i_size_read(file->f_mapping->host) - + fd_dev->fd_block_size); + + pr_debug("FILEIO: Using size: %llu bytes from struct" + " block_device blocks: %llu logical_block_size: %d\n", +- fd_dev->fd_dev_size, +- div_u64(fd_dev->fd_dev_size, fd_dev->fd_block_size), ++ dev_size, div_u64(dev_size, fd_dev->fd_block_size), + fd_dev->fd_block_size); + } else { + if (!(fd_dev->fbd_flags & FBDF_HAS_SIZE)) { +@@ -606,10 +606,20 @@ static u32 fd_get_device_type(struct se_device *dev) + static sector_t fd_get_blocks(struct se_device *dev) + { + struct fd_dev *fd_dev = dev->dev_ptr; +- unsigned long long blocks_long = div_u64(fd_dev->fd_dev_size, +- dev->se_sub_dev->se_dev_attrib.block_size); ++ struct file *f = fd_dev->fd_file; ++ struct inode *i = f->f_mapping->host; ++ unsigned long long dev_size; ++ /* ++ * When using a file that references an underlying struct block_device, ++ * ensure dev_size is always based on the current inode size in order ++ * to handle underlying block_device resize operations. ++ */ ++ if (S_ISBLK(i->i_mode)) ++ dev_size = (i_size_read(i) - fd_dev->fd_block_size); ++ else ++ dev_size = fd_dev->fd_dev_size; + +- return blocks_long; ++ return div_u64(dev_size, dev->se_sub_dev->se_dev_attrib.block_size); + } + + static struct se_subsystem_api fileio_template = { +-- +1.7.7.6 + 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 @@ +From 8c6c5b3fb938b8af747c79cfe8c5cb39db72202a Mon Sep 17 00:00:00 2001 +From: Willy Tarreau +Date: Thu, 17 May 2012 11:14:14 +0000 +Subject: [PATCH 50/56] tcp: do_tcp_sendpages() must try to push data out on + oom conditions + +commit bad115cfe5b509043b684d3a007ab54b80090aa1 upstream. + +Since recent changes on TCP splicing (starting with commits 2f533844 +"tcp: allow splice() to build full TSO packets" and 35f9c09f "tcp: +tcp_sendpages() should call tcp_push() once"), I started seeing +massive stalls when forwarding traffic between two sockets using +splice() when pipe buffers were larger than socket buffers. + +Latest changes (net: netdev_alloc_skb() use build_skb()) made the +problem even more apparent. + +The reason seems to be that if do_tcp_sendpages() fails on out of memory +condition without being able to send at least one byte, tcp_push() is not +called and the buffers cannot be flushed. + +After applying the attached patch, I cannot reproduce the stalls at all +and the data rate it perfectly stable and steady under any condition +which previously caused the problem to be permanent. + +The issue seems to have been there since before the kernel migrated to +git, which makes me think that the stalls I occasionally experienced +with tux during stress-tests years ago were probably related to the +same issue. + +This issue was first encountered on 3.0.31 and 3.2.17, so please backport +to -stable. + +Signed-off-by: Willy Tarreau +Acked-by: Eric Dumazet +Signed-off-by: Ben Hutchings +--- + net/ipv4/tcp.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c +index 8f826b1..11ba922 100644 +--- a/net/ipv4/tcp.c ++++ b/net/ipv4/tcp.c +@@ -851,8 +851,7 @@ new_segment: + wait_for_sndbuf: + set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); + wait_for_memory: +- if (copied) +- tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); ++ tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); + + if ((err = sk_stream_wait_memory(sk, &timeo)) != 0) + goto do_error; +-- +1.7.7.6 + 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 @@ +From 4cad7c8fe708e7795f298240e246cec993a7e74b Mon Sep 17 00:00:00 2001 +From: Tushar Dave +Date: Thu, 17 May 2012 01:04:50 +0000 +Subject: [PATCH 51/56] e1000: Prevent reset task killing itself. + +commit 8ce6909f77ba1b7bcdea65cc2388fd1742b6d669 upstream. + +Killing reset task while adapter is resetting causes deadlock. +Only kill reset task if adapter is not resetting. +Ref bug #43132 on bugzilla.kernel.org + +Signed-off-by: Tushar Dave +Tested-by: Aaron Brown +Signed-off-by: Jeff Kirsher +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c +index cf480b5..de00805 100644 +--- a/drivers/net/ethernet/intel/e1000/e1000_main.c ++++ b/drivers/net/ethernet/intel/e1000/e1000_main.c +@@ -494,7 +494,11 @@ out: + static void e1000_down_and_stop(struct e1000_adapter *adapter) + { + set_bit(__E1000_DOWN, &adapter->flags); +- cancel_work_sync(&adapter->reset_task); ++ ++ /* Only kill reset task if adapter is not resetting */ ++ if (!test_bit(__E1000_RESETTING, &adapter->flags)) ++ cancel_work_sync(&adapter->reset_task); ++ + cancel_delayed_work_sync(&adapter->watchdog_task); + cancel_delayed_work_sync(&adapter->phy_info_task); + cancel_delayed_work_sync(&adapter->fifo_stall_task); +-- +1.7.7.6 + 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 @@ +From e3478e0a8885a446eed02cd159394c0ea74ecfd0 Mon Sep 17 00:00:00 2001 +From: Artem Bityutskiy +Date: Fri, 30 Dec 2011 18:28:01 +0200 +Subject: [PATCH 52/56] mtd: map.h: fix arm cross-build failure + +commit 4a42243886b87cd28a39b192161767c2af851a55 upstream. + +This patch fixes the following build failure: +In file included from include/linux/mtd/qinfo.h:4:0, + from include/linux/mtd/pfow.h:7, + from drivers/mtd/lpddr/lpddr_cmds.c:27: +include/linux/mtd/map.h: In function 'inline_map_read': +include/linux/mtd/map.h:409:3: error: implicit declaration of function 'BUILD_BUG_ON' [-Werror=implicit-function-declaration] + +Signed-off-by: Artem Bityutskiy +Signed-off-by: David Woodhouse +Signed-off-by: Ben Hutchings +--- + include/linux/mtd/map.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h +index a9e6ba4..daad4e6 100644 +--- a/include/linux/mtd/map.h ++++ b/include/linux/mtd/map.h +@@ -26,7 +26,7 @@ + #include + #include + #include +- ++#include + + #include + #include +-- +1.7.7.6 + 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 @@ +From 19ccd03475be60d00e4ac87f05020c31201ae29d Mon Sep 17 00:00:00 2001 +From: Stefan Roese +Date: Tue, 10 Jan 2012 01:47:40 +0000 +Subject: [PATCH 53/56] stmmac: Fix compilation error in mmc_core.c + +commit 1dd8117e3320fb42ec40ef2ace982871572d34ed upstream. + +Fix this error: + + CC drivers/net/ethernet/stmicro/stmmac/mmc_core.o +drivers/net/ethernet/stmicro/stmmac/mmc_core.c: In function 'dwmac_mmc_ctrl': +drivers/net/ethernet/stmicro/stmmac/mmc_core.c:143:2: error: implicit + declaration of function 'pr_debug' [-Werror=implicit-function-declaration] + +Signed-off-by: Stefan Roese +Cc: Giuseppe Cavallaro +Acked-by: Giuseppe Cavallaro +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c +index 41e6b33..c07cfe9 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c ++++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c +@@ -22,6 +22,7 @@ + Author: Giuseppe Cavallaro + *******************************************************************************/ + ++#include + #include + #include "mmc.h" + +-- +1.7.7.6 + 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 @@ +From 0db05d78c77595936a7494aa049850169c49b861 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Wed, 9 May 2012 13:29:51 +0000 +Subject: [PATCH 54/56] pktgen: fix crash at module unload + +commit c57b54684060c8aced64a5b78ff69ff289af97b9 upstream. + +commit 7d3d43dab4e9 (net: In unregister_netdevice_notifier unregister +the netdevices.) makes pktgen crashing at module unload. + +[ 296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267 +[ 296.820719] lock: ffff880310c38000, .magic: ffff8803, .owner: /-1, .owner_cpu: -1 +[ 296.820943] Pid: 3267, comm: rmmod Not tainted 3.4.0-rc5+ #254 +[ 296.821079] Call Trace: +[ 296.821211] [] spin_dump+0x8a/0x8f +[ 296.821345] [] spin_bug+0x21/0x26 +[ 296.821507] [] do_raw_spin_lock+0x131/0x140 +[ 296.821648] [] _raw_spin_lock+0x1e/0x20 +[ 296.821786] [] __pktgen_NN_threads+0x4d/0x140 [pktgen] +[ 296.821928] [] pktgen_device_event+0x10d/0x1e0 [pktgen] +[ 296.822073] [] unregister_netdevice_notifier+0x7f/0x100 +[ 296.822216] [] pg_cleanup+0x48/0x73 [pktgen] +[ 296.822357] [] sys_delete_module+0x17e/0x2a0 +[ 296.822502] [] system_call_fastpath+0x16/0x1b + +Hold the pktgen_thread_lock while splicing pktgen_threads, and test +pktgen_exiting in pktgen_device_event() to make unload faster. + +Signed-off-by: Eric Dumazet +Cc: Eric W. Biederman +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/core/pktgen.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/net/core/pktgen.c b/net/core/pktgen.c +index 0001c24..657e5f9 100644 +--- a/net/core/pktgen.c ++++ b/net/core/pktgen.c +@@ -1932,7 +1932,7 @@ static int pktgen_device_event(struct notifier_block *unused, + { + struct net_device *dev = ptr; + +- if (!net_eq(dev_net(dev), &init_net)) ++ if (!net_eq(dev_net(dev), &init_net) || pktgen_exiting) + return NOTIFY_DONE; + + /* It is OK that we do not hold the group lock right now, +@@ -3758,12 +3758,18 @@ static void __exit pg_cleanup(void) + { + struct pktgen_thread *t; + struct list_head *q, *n; ++ struct list_head list; + + /* Stop all interfaces & threads */ + pktgen_exiting = true; + +- list_for_each_safe(q, n, &pktgen_threads) { ++ mutex_lock(&pktgen_thread_lock); ++ list_splice(&list, &pktgen_threads); ++ mutex_unlock(&pktgen_thread_lock); ++ ++ list_for_each_safe(q, n, &list) { + t = list_entry(q, struct pktgen_thread, th_list); ++ list_del(&t->th_list); + kthread_stop(t->tsk); + kfree(t); + } +-- +1.7.7.6 + 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 @@ +From 20b87e11f8ebb8b1fa74b668770c7f2b301b40b4 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Thu, 17 May 2012 23:52:26 +0000 +Subject: [PATCH 55/56] pktgen: fix module unload for good + +commit d4b1133558e0d417342d5d2c49e4c35b428ff20d upstream. + +commit c57b5468406 (pktgen: fix crash at module unload) did a very poor +job with list primitives. + +1) list_splice() arguments were in the wrong order + +2) list_splice(list, head) has undefined behavior if head is not +initialized. + +3) We should use the list_splice_init() variant to clear pktgen_threads +list. + +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Ben Hutchings +--- + net/core/pktgen.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/net/core/pktgen.c b/net/core/pktgen.c +index 657e5f9..df878de 100644 +--- a/net/core/pktgen.c ++++ b/net/core/pktgen.c +@@ -3758,13 +3758,13 @@ static void __exit pg_cleanup(void) + { + struct pktgen_thread *t; + struct list_head *q, *n; +- struct list_head list; ++ LIST_HEAD(list); + + /* Stop all interfaces & threads */ + pktgen_exiting = true; + + mutex_lock(&pktgen_thread_lock); +- list_splice(&list, &pktgen_threads); ++ list_splice_init(&pktgen_threads, &list); + mutex_unlock(&pktgen_thread_lock); + + list_for_each_safe(q, n, &list) { +-- +1.7.7.6 + 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 @@ +From c04a2fde6b61eb063267b611c43371e61d0cabc3 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Sun, 20 May 2012 22:56:54 +0100 +Subject: [PATCH 56/56] Linux 3.2.18 + +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index 4c4efa3..add68f1 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + VERSION = 3 + PATCHLEVEL = 2 +-SUBLEVEL = 17 ++SUBLEVEL = 18 + EXTRAVERSION = + NAME = Saber-toothed Squirrel + +-- +1.7.7.6 + 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 = "" BRANCH = "v3.2-staging" SRCREV = "720e07b4c1f687b61b147b31c698cb6816d72f01" -MACHINE_KERNEL_PR_append = "o+gitr${SRCREV}" +MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}" COMPATIBLE_MACHINE = "(ti33x)" @@ -932,6 +932,227 @@ PATCHES_OVER_PSP = " \ file://3.2.16/0066-drm-radeon-disable-MSI-on-RV515.patch \ file://3.2.16/0067-drm-radeon-fix-load-detect-on-rn50-with-hardcoded-ED.patch \ file://3.2.16/0068-Linux-3.2.16.patch \ + file://3.2.17/0001-crypto-sha512-Fix-byte-counter-overflow-in-SHA-512.patch \ + file://3.2.17/0002-ALSA-hda-conexant-Don-t-set-HP-pin-control-bit-uncon.patch \ + file://3.2.17/0003-ALSA-hda-conexant-Set-up-the-missing-docking-station.patch \ + file://3.2.17/0004-ARM-clps711x-serial-driver-hungs-are-a-result-of-cal.patch \ + file://3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch \ + file://3.2.17/0006-mmc-fixes-for-eMMC-v4.5-discard-operation.patch \ + file://3.2.17/0007-mmc-fixes-for-eMMC-v4.5-sanitize-operation.patch \ + file://3.2.17/0008-mmc-unbreak-sdhci-esdhc-imx-on-i.MX25.patch \ + file://3.2.17/0009-xen-gntdev-do-not-set-VM_PFNMAP.patch \ + file://3.2.17/0010-xen-xenbus-Add-quirk-to-deal-with-misconfigured-back.patch \ + file://3.2.17/0011-USB-yurex-Remove-allocation-of-coherent-buffer-for-s.patch \ + file://3.2.17/0012-USB-yurex-Fix-missing-URB_NO_TRANSFER_DMA_MAP-flag-i.patch \ + file://3.2.17/0013-uwb-fix-use-of-del_timer_sync-in-interrupt.patch \ + file://3.2.17/0014-uwb-fix-error-handling.patch \ + file://3.2.17/0015-davinci_mdio-Fix-MDIO-timeout-check.patch \ + file://3.2.17/0016-mwifiex-update-pcie8766-scratch-register-addresses.patch \ + file://3.2.17/0017-brcm80211-smac-resume-transmit-fifo-upon-receiving-f.patch \ + file://3.2.17/0018-rc-core-set-mode-for-winbond-cir.patch \ + file://3.2.17/0019-drxk-Does-not-unlock-mutex-if-sanity-check-failed-in.patch \ + file://3.2.17/0020-cfg80211-fix-interface-combinations-check.patch \ + file://3.2.17/0021-Fix-modpost-failures-in-fedora-17.patch \ + file://3.2.17/0022-mm-fix-s390-BUG-by-__set_page_dirty_no_writeback-on-.patch \ + file://3.2.17/0023-md-fix-possible-corruption-of-array-metadata-on-shut.patch \ + file://3.2.17/0024-jbd2-use-GFP_NOFS-for-blkdev_issue_flush.patch \ + file://3.2.17/0025-USB-serial-cp210x-Fixed-usb_control_msg-timeout-valu.patch \ + file://3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch \ + file://3.2.17/0027-drivers-tty-amiserial.c-add-missing-tty_unlock.patch \ + file://3.2.17/0028-USB-sierra-avoid-QMI-wwan-interface-on-MC77xx.patch \ + file://3.2.17/0029-EHCI-fix-criterion-for-resuming-the-root-hub.patch \ + file://3.2.17/0030-EHCI-always-clear-the-STS_FLR-status-bit.patch \ + file://3.2.17/0031-USB-fix-deadlock-in-bConfigurationValue-attribute-me.patch \ + file://3.2.17/0032-usb-gadget-eliminate-NULL-pointer-dereference-bugfix.patch \ + file://3.2.17/0033-usb-musb-omap-fix-crash-when-musb-glue-omap-gets-ini.patch \ + file://3.2.17/0034-usb-musb-omap-fix-the-error-check-for-pm_runtime_get.patch \ + file://3.2.17/0035-PCI-Add-quirk-for-still-enabled-interrupts-on-Intel-.patch \ + file://3.2.17/0036-ext4-fix-endianness-breakage-in-ext4_split_extent_at.patch \ + file://3.2.17/0037-KVM-unmap-pages-from-the-iommu-when-slots-are-remove.patch \ + file://3.2.17/0038-dell-laptop-add-3-machines-that-has-touchpad-LED.patch \ + file://3.2.17/0039-dell-laptop-touchpad-LED-should-persist-its-status-a.patch \ + file://3.2.17/0040-Bluetooth-Add-support-for-Atheros-04ca-3005.patch \ + file://3.2.17/0041-Don-t-limit-non-nested-epoll-paths.patch \ + file://3.2.17/0042-spi-Fix-device-unregistration-when-unregistering-the.patch \ + file://3.2.17/0043-spi-mpc83xx-fix-NULL-pdata-dereference-bug.patch \ + file://3.2.17/0044-rt2800-Add-support-for-the-Fujitsu-Stylistic-Q550.patch \ + file://3.2.17/0045-rt2x00-Identify-rt2800usb-chipsets.patch \ + file://3.2.17/0046-nfsd-fix-b0rken-error-value-for-setattr-on-read-only.patch \ + file://3.2.17/0047-nfsd-fix-error-values-returned-by-nfsd4_lockt-when-n.patch \ + file://3.2.17/0048-nfsd-fix-endianness-breakage-in-TEST_STATEID-handlin.patch \ + file://3.2.17/0049-nfsd-fix-compose_entry_fh-failure-exits.patch \ + file://3.2.17/0050-btrfs-btrfs_root_readonly-broken-on-big-endian.patch \ + file://3.2.17/0051-ocfs2-l_next_free_req-breakage-on-big-endian.patch \ + file://3.2.17/0052-ocfs-rl_used-breakage-on-big-endian.patch \ + file://3.2.17/0053-ocfs2-rl_count-endianness-breakage.patch \ + file://3.2.17/0054-ocfs2-e_leaf_clusters-endianness-breakage.patch \ + file://3.2.17/0055-lockd-fix-the-endianness-bug.patch \ + file://3.2.17/0056-usb-dwc3-ep0-increment-actual-on-bounced-ep0-case.patch \ + file://3.2.17/0057-net-fix-proc-net-dev-regression.patch \ + file://3.2.17/0058-nfsd-don-t-fail-unchecked-creates-of-non-special-fil.patch \ + file://3.2.17/0059-ppp-Don-t-stop-and-restart-queue-on-every-TX-packet.patch \ + file://3.2.17/0060-tcp-allow-splice-to-build-full-TSO-packets.patch \ + file://3.2.17/0061-sctp-Allow-struct-sctp_event_subscribe-to-grow-witho.patch \ + file://3.2.17/0062-bridge-Do-not-send-queries-on-multicast-group-leaves.patch \ + file://3.2.17/0063-ipv6-fix-array-index-in-ip6_mc_add_src.patch \ + file://3.2.17/0064-phonet-Check-input-from-user-before-allocating.patch \ + file://3.2.17/0065-bonding-properly-unset-current_arp_slave-on-slave-li.patch \ + file://3.2.17/0066-wimax-i2400m-prevent-a-possible-kernel-bug-due-to-mi.patch \ + file://3.2.17/0067-netlink-fix-races-after-skb-queueing.patch \ + file://3.2.17/0068-net-fix-a-race-in-sock_queue_err_skb.patch \ + file://3.2.17/0069-tcp-fix-tcp_rcv_rtt_update-use-of-an-unscaled-RTT-sa.patch \ + file://3.2.17/0070-net-allow-pskb_expand_head-to-get-maximum-tailroom.patch \ + file://3.2.17/0071-tcp-fix-tcp_trim_head.patch \ + file://3.2.17/0072-tcp-avoid-order-1-allocations-on-wifi-and-tx-path.patch \ + file://3.2.17/0073-atl1-fix-kernel-panic-in-case-of-DMA-errors.patch \ + file://3.2.17/0074-8139cp-set-intr-mask-after-its-handler-is-registered.patch \ + file://3.2.17/0075-net-smsc911x-fix-skb-handling-in-receive-path.patch \ + file://3.2.17/0076-net-ethernet-ks8851_mll-fix-rx-frame-buffer-overflow.patch \ + file://3.2.17/0077-net_sched-gred-Fix-oops-in-gred_dump-in-WRED-mode.patch \ + file://3.2.17/0078-net-usb-smsc75xx-fix-mtu.patch \ + file://3.2.17/0079-dummy-Add-ndo_uninit.patch \ + file://3.2.17/0080-tcp-fix-tcp_grow_window-for-large-incoming-frames.patch \ + file://3.2.17/0081-netns-do-not-leak-net_generic-data-on-failed-init.patch \ + file://3.2.17/0082-ksz884x-don-t-copy-too-much-in-netdev_set_mac_addres.patch \ + file://3.2.17/0083-net-ax25-Reorder-ax25_exit-to-remove-races.patch \ + file://3.2.17/0084-tcp-fix-TCP_MAXSEG-for-established-IPv6-passive-sock.patch \ + file://3.2.17/0085-nfs-Enclose-hostname-in-brackets-when-needed-in-nfs_.patch \ + file://3.2.17/0086-NFSv4-Ensure-that-the-LOCK-code-sets-exception-inode.patch \ + file://3.2.17/0087-NFSv4-Ensure-that-we-check-lock-exclusive-shared-typ.patch \ + file://3.2.17/0088-NFS-put-open-context-on-error-in-nfs_pagein_multi.patch \ + file://3.2.17/0089-NFS-put-open-context-on-error-in-nfs_flush_multi.patch \ + file://3.2.17/0090-x86-microcode-Fix-sysfs-warning-during-module-unload.patch \ + file://3.2.17/0091-x86-apic-APIC-code-touches-invalid-MSR-on-P5-class-m.patch \ + file://3.2.17/0092-Revert-autofs-work-around-unhappy-compat-problem-on-.patch \ + file://3.2.17/0093-xen-correctly-check-for-pending-events-when-restorin.patch \ + file://3.2.17/0094-xen-smp-Fix-crash-when-booting-with-ACPI-hotplug-CPU.patch \ + file://3.2.17/0095-ASoC-dapm-Ensure-power-gets-managed-for-line-widgets.patch \ + file://3.2.17/0096-ASoC-wm8994-Improve-sequencing-of-AIF-channel-enable.patch \ + file://3.2.17/0097-dmaengine-at_hdmac-remove-clear-on-read-in-atc_dosta.patch \ + file://3.2.17/0098-sched-Fix-OOPS-when-build_sched_domains-percpu-alloc.patch \ + file://3.2.17/0099-tracing-Fix-stacktrace-of-latency-tracers-irqsoff-an.patch \ + file://3.2.17/0100-hwmon-fam15h_power-fix-bogus-values-with-current-BIO.patch \ + file://3.2.17/0101-hwmon-fam15h_power-Fix-pci_device_id-array.patch \ + file://3.2.17/0102-dell-laptop-Terminate-quirks-list-properly.patch \ + file://3.2.17/0103-drm-radeon-kms-need-to-set-up-ss-on-DP-bridges-as-we.patch \ + file://3.2.17/0104-drm-i915-handle-input-output-sdvo-timings-separately.patch \ + file://3.2.17/0105-drm-i915-relative_constants_mode-race-fix.patch \ + file://3.2.17/0106-drm-i915-Force-sync-command-ordering-Gen6.patch \ + file://3.2.17/0107-drm-i915-Set-the-Stencil-Cache-eviction-policy-to-no.patch \ + file://3.2.17/0108-drm-i915-fix-integer-overflow-in-i915_gem_execbuffer.patch \ + file://3.2.17/0109-drm-i915-fix-integer-overflow-in-i915_gem_do_execbuf.patch \ + file://3.2.17/0110-nl80211-ensure-interface-is-up-in-various-APIs.patch \ + file://3.2.17/0111-ALSA-HDA-Add-external-mic-quirk-for-Asus-Zenbook-UX3.patch \ + file://3.2.17/0112-USB-cdc-wdm-fix-race-leading-leading-to-memory-corru.patch \ + file://3.2.17/0113-USB-EHCI-fix-crash-during-suspend-on-ASUS-computers.patch \ + file://3.2.17/0114-USB-gadget-storage-gadgets-send-wrong-error-code-for.patch \ + file://3.2.17/0115-usb-gadget-dummy-do-not-call-pullup-on-udc_stop.patch \ + file://3.2.17/0116-usb-gadget-uvc-uvc_request_data-length-field-must-be.patch \ + file://3.2.17/0117-pipes-add-a-packetized-pipe-mode-for-writing.patch \ + file://3.2.17/0118-autofs-make-the-autofsv5-packet-file-descriptor-use-.patch \ + file://3.2.17/0119-ARM-7396-1-errata-only-handle-ARM-erratum-326103-on-.patch \ + file://3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch \ + file://3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch \ + file://3.2.17/0122-ARM-7403-1-tls-remove-covert-channel-via-TPIDRURW.patch \ + file://3.2.17/0123-ARM-7406-1-hotplug-copy-the-affinity-mask-when-force.patch \ + file://3.2.17/0124-libsas-fix-sas_find_bcast_phy-in-the-presence-of-vac.patch \ + file://3.2.17/0125-libsas-fix-false-positive-device-attached-conditions.patch \ + file://3.2.17/0126-efi-Add-new-variable-attributes.patch \ + file://3.2.17/0127-efi-Validate-UEFI-boot-variables.patch \ + file://3.2.17/0128-PM-Hibernate-fix-the-number-of-pages-used-for-hibern.patch \ + file://3.2.17/0129-drm-i915-enable-dip-before-writing-data-on-gen4.patch \ + file://3.2.17/0130-sched-Fix-nohz-load-accounting-again.patch \ + file://3.2.17/0131-efivars-Improve-variable-validation.patch \ + file://3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch \ + file://3.2.17/0133-Fix-__read_seqcount_begin-to-use-ACCESS_ONCE-for-seq.patch \ + file://3.2.17/0134-hwmon-coretemp-Increase-CPU-core-limit.patch \ + file://3.2.17/0135-nouveau-initialise-has_optimus-variable.patch \ + file://3.2.17/0136-hwmon-coretemp-fix-oops-on-cpu-unplug.patch \ + file://3.2.17/0137-libata-skip-old-error-history-when-counting-probe-tr.patch \ + file://3.2.17/0138-b43-only-reload-config-after-successful-initializati.patch \ + file://3.2.17/0139-i2c-pnx-Disable-clk-in-suspend.patch \ + file://3.2.17/0140-ipw2200-Fix-race-condition-in-the-command-completion.patch \ + file://3.2.17/0141-mac80211-fix-AP-mode-EAP-tx-for-VLAN-stations.patch \ + file://3.2.17/0142-rtlwifi-Fix-oops-on-unload.patch \ + file://3.2.17/0143-wl1251-fix-crash-on-remove-due-to-premature-kfree.patch \ + file://3.2.17/0144-wl1251-fix-crash-on-remove-due-to-leftover-work-item.patch \ + file://3.2.17/0145-iwlwifi-do-not-nulify-ctx-vif-on-reset.patch \ + file://3.2.17/0146-iwlwifi-fix-hardware-queue-programming.patch \ + file://3.2.17/0147-hfsplus-Fix-potential-buffer-overflows.patch \ + file://3.2.17/0148-ASoC-tlv312aic23-unbreak-resume.patch \ + file://3.2.17/0149-asm-generic-Use-__BITS_PER_LONG-in-statfs.h.patch \ + file://3.2.17/0150-x86-relocs-Remove-an-unused-variable.patch \ + file://3.2.17/0151-ARM-7410-1-Add-extra-clobber-registers-for-assembly-.patch \ + file://3.2.17/0152-ARM-7414-1-SMP-prevent-use-of-the-console-when-using.patch \ + file://3.2.17/0153-drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch \ + file://3.2.17/0154-drm-i915-Do-no-set-Stencil-Cache-eviction-LRA-w-a-on.patch \ + file://3.2.17/0155-xen-pte-Fix-crashes-when-trying-to-see-non-existent-.patch \ + file://3.2.17/0156-xen-pci-don-t-use-PCI-BIOS-service-for-configuration.patch \ + file://3.2.17/0157-percpu-x86-don-t-use-PMD_SIZE-as-embedded-atom_size-.patch \ + file://3.2.17/0158-iwlagn-allow-up-to-uCode-API-6-for-6000-devices.patch \ + file://3.2.17/0159-iwlwifi-use-correct-released-ucode-version.patch \ + file://3.2.17/0160-iwlwifi-use-6000G2B-for-6030-device-series.patch \ + file://3.2.17/0161-exit_signal-simplify-the-we-have-changed-execution-d.patch \ + file://3.2.17/0162-exit_signal-fix-the-parent-has-changed-security-doma.patch \ + file://3.2.17/0163-staging-r8712u-Fix-regression-caused-by-commit-8c213.patch \ + file://3.2.17/0164-smsc95xx-mark-link-down-on-startup-and-let-PHY-inter.patch \ + file://3.2.17/0165-Linux-3.2.17.patch \ + file://3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch \ + file://3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch \ + file://3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch \ + file://3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch \ + file://3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch \ + file://3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch \ + file://3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch \ + file://3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch \ + file://3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch \ + file://3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch \ + file://3.2.18/0011-netem-fix-possible-skb-leak.patch \ + file://3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch \ + file://3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch \ + file://3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch \ + file://3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch \ + file://3.2.18/0016-sungem-Fix-WakeOnLan.patch \ + file://3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch \ + file://3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch \ + file://3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch \ + file://3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch \ + file://3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch \ + file://3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch \ + file://3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch \ + file://3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch \ + file://3.2.18/0025-rc-Postpone-ISR-registration.patch \ + file://3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch \ + file://3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch \ + file://3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch \ + file://3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch \ + file://3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch \ + file://3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch \ + file://3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch \ + file://3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch \ + file://3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch \ + file://3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch \ + file://3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch \ + file://3.2.18/0037-ia64-Add-accept4-syscall.patch \ + file://3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch \ + file://3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch \ + file://3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch \ + file://3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch \ + file://3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch \ + file://3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch \ + file://3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch \ + file://3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch \ + file://3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch \ + file://3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch \ + file://3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch \ + file://3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch \ + file://3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch \ + file://3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch \ + file://3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch \ + file://3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch \ + file://3.2.18/0054-pktgen-fix-crash-at-module-unload.patch \ + file://3.2.18/0055-pktgen-fix-module-unload-for-good.patch \ + file://3.2.18/0056-Linux-3.2.18.patch \ file://led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch \ \ file://beaglebone/0001-arm-boot-compressed-default-asm-arch-to-armv7-a.patch \ -- cgit v1.2.3-54-g00ecf