summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-04-09 18:06:40 +0200
committerDenys Dmytriyenko <denys@ti.com>2012-04-10 15:10:45 -0400
commitbb34e69f3d6b2a24e910c657e3385ece0a6e0f98 (patch)
treec51c955c7a46c7f93874c348ad0921f70283ab9e /recipes-kernel
parentf5135a2cb76535c179fa8e442c1f8d6cd336a64d (diff)
downloadmeta-ti-bb34e69f3d6b2a24e910c657e3385ece0a6e0f98.tar.gz
linux-ti335x-psp 3.2: update to 3.2.14
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0001-USB-option-Add-MediaTek-MT6276M-modem-app-interfaces.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0002-USB-option-driver-adding-support-for-Telit-CC864-SIN.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0003-USB-option-make-interface-blacklist-work-again.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0004-USB-option-add-ZTE-MF820D.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0005-staging-zcache-avoid-AB-BA-deadlock-condition.patch66
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0006-USB-ftdi_sio-fix-problem-when-the-manufacture-is-a-N.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0007-USB-ftdi_sio-add-support-for-BeagleBone-rev-A5.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0008-USB-Microchip-VID-mislabeled-as-Hornby-VID-in-ftdi_s.patch61
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0009-USB-ftdi_sio-new-PID-Distortec-JTAG-lock-pick.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0010-USB-ftdi_sio-add-support-for-FT-X-series-devices.patch150
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0011-USB-ftdi_sio-new-PID-LUMEL-PD12.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0012-powerpc-usb-fix-bug-of-kernel-hang-when-initializing.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0013-staging-r8712u-Add-missing-initialization-and-remove.patch107
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0014-staging-r8712u-Fix-regression-introduced-by-commit-a.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0015-staging-r8712u-Fix-regression-in-signal-level-after-.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0016-usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0017-usb-dwc3-use-proper-function-for-setting-endpoint-na.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0018-usb-gadgetfs-return-number-of-bytes-on-ep0-read-requ.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0019-USB-gadget-Make-g_hid-device-class-conform-to-spec.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0020-futex-Cover-all-PI-opcodes-with-cmpxchg-enabled-chec.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0021-sysfs-Fix-memory-leak-in-sysfs_sd_setsecdata.patch92
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0022-tty-moxa-fix-bit-test-in-moxa_start.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0023-TTY-Wrong-unicode-value-copied-in-con_set_unimap.patch119
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0024-USB-serial-fix-console-error-reporting.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0025-cdc-wdm-Fix-more-races-on-the-read-path.patch87
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0026-cdc-wdm-Don-t-clear-WDM_READ-unless-entire-read-buff.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0027-usb-fsl_udc_core-Fix-scheduling-while-atomic-dump-me.patch134
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0028-usb-Fix-build-error-due-to-dma_mask-is-not-at-pdev_a.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0029-USB-ums_realtek-do-not-use-stack-memory-for-DMA-in-_.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0030-USB-qcserial-add-several-new-serial-devices.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0031-USB-qcserial-don-t-grab-QMI-port-on-Gobi-1000-device.patch177
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0032-usb-serial-Add-support-for-the-Sealevel-SeaLINK-8-20.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0033-usb-cp210x-Update-to-support-CP2105-and-multiple-int.patch155
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0034-USB-serial-mos7840-Fixed-MCS7820-device-attach-probl.patch148
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0035-rt2x00-Add-support-for-D-Link-DWA-127-to-rt2800usb.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0036-rtlwifi-rtl8192c_common-rtl8192de-Check-for-allocati.patch102
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0037-rtlwifi-Handle-previous-allocation-failures-when-fre.patch59
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0038-rtlwifi-rtl8192c-Prevent-sleeping-from-invalid-conte.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0039-rtlwifi-rtl8192ce-Fix-loss-of-receive-performance.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0040-iwlwifi-always-monitor-for-stuck-queues.patch65
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0041-math-Introduce-div64_long.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0042-ntp-Fix-integer-overflow-when-setting-time.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0043-uevent-send-events-in-correct-order-according-to-seq.patch97
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0044-genirq-Fix-long-term-regression-in-genirq-irq_set_ir.patch96
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0045-genirq-Fix-incorrect-check-for-forced-IRQ-thread-han.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0046-rtc-Disable-the-alarm-in-the-hardware-v2.patch76
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0047-p54spi-Release-GPIO-lines-and-IRQ-on-error-in-p54spi.patch71
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0048-rtnetlink-Fix-VF-IFLA-policy.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0049-IB-iser-Post-initial-receive-buffers-before-sending-.patch143
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0050-ima-fix-Kconfig-dependencies.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0051-x86-ioapic-Add-register-level-checks-to-detect-bogus.patch113
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0052-mm-thp-fix-pmd_bad-triggering-in-code-paths-holding-.patch480
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0053-TPM-Zero-buffer-whole-after-copying-to-userspace.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0054-PM-Domains-Fix-handling-of-wakeup-devices-during-sys.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0055-bootmem-sparsemem-remove-limit-constraint-in-alloc_b.patch147
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0056-hugetlbfs-avoid-taking-i_mutex-from-hugetlbfs_read.patch140
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0057-ASoC-fsl-p1022ds-tell-the-WM8776-codec-driver-that-i.patch89
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0058-ASoC-pxa-ssp-atomically-set-stream-active-masks.patch122
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0059-tcm_loop-Set-residual-field-for-SCSI-commands.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0060-iscsi-target-Fix-iscsit_alloc_buffs-failure-cases.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0061-iscsi-target-Fix-dynamic-explict-NodeACL-pointer-ref.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0062-ALSA-hda-fix-printing-of-high-HDMI-sample-rates.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0063-usb-gadget-fix-a-section-mismatch-when-compiling-g_f.patch190
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0064-udlfb-remove-sysfs-framebuffer-device-with-USB-.disc.patch120
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0065-tcm_fc-Fix-fc_exch-memory-leak-in-ft_send_resp_statu.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0066-md-bitmap-ensure-to-load-bitmap-when-creating-via-sy.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0067-md-don-t-set-md-arrays-to-readonly-on-shutdown.patch82
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0068-md-raid1-raid10-avoid-deadlock-during-resync-recover.patch97
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0069-md-fix-clearing-of-the-changed-flags-for-the-bad-blo.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0070-drm-i915-Only-clear-the-GPU-domains-upon-a-successfu.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0071-drm-radeon-Restrict-offset-for-legacy-hardware-curso.patch131
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0072-drm-radeon-kms-fix-analog-load-detection-on-DVI-I-co.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0073-drm-radeon-kms-add-connector-quirk-for-Fujitsu-D3003.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0074-target-Don-t-set-WBUS16-or-SYNC-bits-in-INQUIRY-resp.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0075-target-fix-use-after-free-in-target_report_luns.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0076-target-prevent-NULL-pointer-dereference-in-target_re.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0077-target-Fix-16-bit-target-ports-for-SET-TARGET-PORT-G.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0078-Bluetooth-Add-AR30XX-device-ID-on-Asus-laptops.patch67
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0079-HID-add-extra-hotkeys-in-Asus-AIO-keyboards.patch71
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0080-HID-add-more-hotkeys-in-Asus-AIO-keyboards.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0081-pata_legacy-correctly-mask-recovery-field-for-HT6560.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0082-firewire-ohci-fix-too-early-completion-of-IR-multich.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0083-KVM-x86-extend-struct-x86_emulate_ops-with-get_cpuid.patch82
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0084-KVM-x86-fix-missing-checks-in-syscall-emulation.patch148
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0085-NFS-Properly-handle-the-case-where-the-delegation-is.patch193
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0086-NFSv4-Return-the-delegation-if-the-server-returns-NF.patch77
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0087-xfs-fix-inode-lookup-race.patch101
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0088-CIFS-Respect-negotiated-MaxMpxCount.patch212
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0089-cifs-fix-issue-mounting-of-DFS-ROOT-when-redirecting.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0090-CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch70
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0091-UBI-fix-error-handling-in-ubi_scan.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0092-UBI-fix-eraseblock-picking-criteria.patch57
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0093-SUNRPC-We-must-not-use-list_for_each_entry_safe-in-r.patch73
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0094-usbnet-increase-URB-reference-count-before-usb_unlin.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0095-usbnet-don-t-clear-urb-dev-in-tx_complete.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0096-e1000e-Avoid-wrong-check-on-TX-hang.patch98
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0097-x86-32-Fix-endless-loop-when-processing-signals-for-.patch85
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0098-proc-ns-use-d_set_d_op-API-to-set-dentry-ops-in-proc.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0099-iommu-amd-Fix-section-warning-for-prealloc_protectio.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0100-sysctl-protect-poll-in-entries-that-may-go-away.patch97
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0101-hwmon-fam15h_power-Correct-sign-extension-of-running.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0102-lgdt330x-fix-signedness-error-in-i2c_read_demod_byte.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0103-pvrusb2-fix-7MHz-8MHz-DVB-T-tuner-support-for-HVR190.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0104-mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_st.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0105-NFSv4-Rate-limit-the-state-manager-warning-messages.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0106-PM-Hibernate-Enable-usermodehelpers-in-hibernate-err.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0107-jbd2-clear-BH_Delay-BH_Unwritten-in-journal_unmap_bu.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0108-ext4-ignore-EXT4_INODE_JOURNAL_DATA-flag-with-delall.patch194
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0109-ext4-fix-race-between-unwritten-extent-conversion-an.patch90
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0110-ext4-fix-race-between-sync-and-completed-io-work.patch119
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0111-ext4-check-for-zero-length-extent.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0112-vfs-fix-d_ancestor-case-in-d_materialize_unique.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0113-ARM-tegra-select-required-CPU-and-L2-errata-options.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0114-udf-Fix-deadlock-in-udf_release_file.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0115-gpio-omap-fix-_set_gpio_irqenable-implementation.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0116-gpio-davinci-fix-oops-on-unbanked-gpio-irq-request.patch152
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0117-gpio-davinci-fix-enabling-unbanked-GPIO-IRQs.patch65
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0118-dm-crypt-fix-mempool-deadlock.patch65
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0119-dm-crypt-add-missing-error-handling.patch116
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0120-dm-exception-store-fix-init-error-path.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0121-dm-persistent-data-fix-btree-rebalancing-after-remov.patch272
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0122-dm-thin-fix-stacked-bi_next-usage.patch233
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0123-backlight-fix-typo-in-tosa_lcd.c.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0124-xfs-Fix-oops-on-IO-error-during-xlog_recover_process.patch84
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0125-slub-Do-not-hold-slub_lock-when-calling-sysfs_slab_a.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0126-NFSv4-Fix-two-infinite-loops-in-the-mount-code.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0127-NFSv4.1-Fix-layoutcommit-error-handling.patch61
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0128-module-Remove-module-size-limit.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0129-Bluetooth-btusb-fix-bInterval-for-high-super-speed-i.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0130-drm-i915-suspend-fbdev-device-around-suspend-hiberna.patch95
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0131-Fix-pppol2tp-getsockname.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0132-ipv6-fix-incorrent-ipv6-ipsec-packet-fragment.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0133-net-bpf_jit-fix-BPF_S_LDX_B_MSH-compilation.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0134-net-fix-a-potential-rcu_read_lock-imbalance-in-rt6_f.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0135-net-fix-napi_reuse_skb-skb-reserve.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0136-Remove-printk-from-rds_sendmsg.patch31
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0137-sky2-override-for-PCI-legacy-power-management.patch52
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0138-xfrm-Access-the-replay-notify-functions-via-the-regi.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0139-lockd-fix-arg-parsing-for-grace_period-and-timeout.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0140-x86-tsc-Skip-refined-tsc-calibration-on-systems-with.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0141-x86-tls-Off-by-one-limit-check.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0142-compat-use-sys_sendfile64-implementation-for-sendfil.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0143-rtc-Provide-flag-for-rtc-devices-that-don-t-support-.patch76
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0144-nfsd-don-t-allow-zero-length-strings-in-cache_parse.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0145-serial-sh-sci-fix-a-race-of-DMA-submit_tx-on-transfe.patch91
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0146-ASPM-Fix-pcie-devices-with-non-pcie-children.patch72
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0147-Linux-3.2.14.patch24
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp_3.2.bb149
148 files changed, 11110 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0001-USB-option-Add-MediaTek-MT6276M-modem-app-interfaces.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0001-USB-option-Add-MediaTek-MT6276M-modem-app-interfaces.patch
new file mode 100644
index 00000000..f523a33e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0001-USB-option-Add-MediaTek-MT6276M-modem-app-interfaces.patch
@@ -0,0 +1,45 @@
1From cc33a57bd7f9104a9c2f77f11dc3e7f9c22b9340 Mon Sep 17 00:00:00 2001
2From: Meng Zhang <meng.zhang@mediatek.com>
3Date: Mon, 27 Feb 2012 08:24:19 +0100
4Subject: [PATCH 001/147] USB: option: Add MediaTek MT6276M modem&app
5 interfaces
6
7commit 0d8520a1d7f43328bc7085d4244d93c595064157 upstream.
8
9Add MEDIATEK products to Option driver
10
11Signed-off-by: Meng Zhang <meng.zhang@mediatek.com>
12Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/usb/serial/option.c | 7 +++++++
16 1 file changed, 7 insertions(+)
17
18diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
19index 68fa8c7..547c9b9 100644
20--- a/drivers/usb/serial/option.c
21+++ b/drivers/usb/serial/option.c
22@@ -484,6 +484,9 @@ static void option_instat_callback(struct urb *urb);
23 #define LG_VENDOR_ID 0x1004
24 #define LG_PRODUCT_L02C 0x618f
25
26+/* MediaTek products */
27+#define MEDIATEK_VENDOR_ID 0x0e8d
28+
29 /* some devices interfaces need special handling due to a number of reasons */
30 enum option_blacklist_reason {
31 OPTION_BLACKLIST_NONE = 0,
32@@ -1198,6 +1201,10 @@ static const struct usb_device_id option_ids[] = {
33 { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) },
34 { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) },
35 { USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */
36+ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x00, 0x00) },
37+ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x02, 0x01) },
38+ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x00, 0x00) },
39+ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x02, 0x01) }, /* MediaTek MT6276M modem & app port */
40 { } /* Terminating entry */
41 };
42 MODULE_DEVICE_TABLE(usb, option_ids);
43--
441.7.9.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0002-USB-option-driver-adding-support-for-Telit-CC864-SIN.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0002-USB-option-driver-adding-support-for-Telit-CC864-SIN.patch
new file mode 100644
index 00000000..2ee506ab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0002-USB-option-driver-adding-support-for-Telit-CC864-SIN.patch
@@ -0,0 +1,44 @@
1From 17ad305add28a63e155a74678178a6ce6a6a5998 Mon Sep 17 00:00:00 2001
2From: Daniele Palmas <dnlplm@gmail.com>
3Date: Wed, 29 Feb 2012 15:32:05 +0100
4Subject: [PATCH 002/147] USB: option driver: adding support for Telit
5 CC864-SINGLE, CC864-DUAL and DE910-DUAL modems
6
7commit 7204cf584836c24b4b06e4ad4a8e6bb8ea84908e upstream.
8
9Adding PID for Telit CC864-SINGLE, CC864-DUAL and DE910-DUAL
10modems
11
12Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/usb/serial/option.c | 6 ++++++
16 1 file changed, 6 insertions(+)
17
18diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
19index 547c9b9..3c4b7df 100644
20--- a/drivers/usb/serial/option.c
21+++ b/drivers/usb/serial/option.c
22@@ -307,6 +307,9 @@ static void option_instat_callback(struct urb *urb);
23 #define TELIT_VENDOR_ID 0x1bc7
24 #define TELIT_PRODUCT_UC864E 0x1003
25 #define TELIT_PRODUCT_UC864G 0x1004
26+#define TELIT_PRODUCT_CC864_DUAL 0x1005
27+#define TELIT_PRODUCT_CC864_SINGLE 0x1006
28+#define TELIT_PRODUCT_DE910_DUAL 0x1010
29
30 /* ZTE PRODUCTS */
31 #define ZTE_VENDOR_ID 0x19d2
32@@ -771,6 +774,9 @@ static const struct usb_device_id option_ids[] = {
33 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
34 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
35 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
36+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_DUAL) },
37+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) },
38+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) },
39 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
40 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff),
41 .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
42--
431.7.9.4
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0003-USB-option-make-interface-blacklist-work-again.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0003-USB-option-make-interface-blacklist-work-again.patch
new file mode 100644
index 00000000..944ea0a7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0003-USB-option-make-interface-blacklist-work-again.patch
@@ -0,0 +1,37 @@
1From ebdc22267ac3cd3aef9e300a553c0f32ac5da6f2 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Fri, 16 Mar 2012 12:56:44 +0100
4Subject: [PATCH 003/147] USB: option: make interface blacklist work again
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 963940cf472d76eca2d36296e461202cc6997352 upstream.
10
11commit 0d905fd "USB: option: convert Huawei K3765, K4505, K4605
12reservered interface to blacklist" accidentally ANDed two
13blacklist tests by leaving out a return. This was not noticed
14because the two consecutive bracketless if statements made it
15syntactically correct.
16
17Signed-off-by: Bj??rn Mork <bjorn@mork.no>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/usb/serial/option.c | 1 +
21 1 file changed, 1 insertion(+)
22
23diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
24index 3c4b7df..6410935 100644
25--- a/drivers/usb/serial/option.c
26+++ b/drivers/usb/serial/option.c
27@@ -1373,6 +1373,7 @@ static int option_probe(struct usb_serial *serial,
28 serial->interface->cur_altsetting->desc.bInterfaceNumber,
29 OPTION_BLACKLIST_RESERVED_IF,
30 (const struct option_blacklist_info *) id->driver_info))
31+ return -ENODEV;
32
33 /* Don't bind network interface on Samsung GT-B3730, it is handled by a separate module */
34 if (serial->dev->descriptor.idVendor == SAMSUNG_VENDOR_ID &&
35--
361.7.9.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0004-USB-option-add-ZTE-MF820D.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0004-USB-option-add-ZTE-MF820D.patch
new file mode 100644
index 00000000..ae0d8735
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0004-USB-option-add-ZTE-MF820D.patch
@@ -0,0 +1,37 @@
1From 0b49c52b5b44e5db6fe288173faec7136ea18c68 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Fri, 16 Mar 2012 15:41:26 +0100
4Subject: [PATCH 004/147] USB: option: add ZTE MF820D
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 5889d3d4209c1050b4a3c96c41faf6c0976a4acf upstream.
10
11This device presents a total of 5 interfaces with ff/ff/ff
12class/subclass/protocol. The last one of these is verified
13to be a QMI/wwan combined interface which should be handled
14by the qmi_wwan driver, so we blacklist it here.
15
16Signed-off-by: Bj??rn Mork <bjorn@mork.no>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 drivers/usb/serial/option.c | 2 ++
20 1 file changed, 2 insertions(+)
21
22diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
23index 6410935..54898c9 100644
24--- a/drivers/usb/serial/option.c
25+++ b/drivers/usb/serial/option.c
26@@ -901,6 +901,8 @@ static const struct usb_device_id option_ids[] = {
27 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) },
28 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) },
29 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) },
30+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff),
31+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
32 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) },
33 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) },
34 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) },
35--
361.7.9.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0005-staging-zcache-avoid-AB-BA-deadlock-condition.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0005-staging-zcache-avoid-AB-BA-deadlock-condition.patch
new file mode 100644
index 00000000..fb8bfe25
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0005-staging-zcache-avoid-AB-BA-deadlock-condition.patch
@@ -0,0 +1,66 @@
1From 24c8eaa136cf3193f2719e9d04cc4efea3b2b732 Mon Sep 17 00:00:00 2001
2From: Andrea Righi <andrea@betterlinux.com>
3Date: Mon, 20 Feb 2012 13:11:49 +0100
4Subject: [PATCH 005/147] staging: zcache: avoid AB-BA deadlock condition
5
6commit cfbc6a92212e74b07aa76c9e2f20c542e36077fb upstream.
7
8Commit 9256a47 fixed a deadlock condition, being sure that the buddy
9list spinlock is always taken before the page spinlock.
10
11However in zbud_free_and_delist() locking order is the opposite
12(page lock -> list lock).
13
14Possible unsafe locking scenario (reported by lockdep):
15
16 CPU0 CPU1
17 ---- ----
18 lock(&(&zbpg->lock)->rlock);
19 lock(zbud_budlists_spinlock);
20 lock(&(&zbpg->lock)->rlock);
21 lock(zbud_budlists_spinlock);
22
23Fix by grabbing the locks in opposite order in zbud_free_and_delist().
24
25Signed-off-by: Andrea Righi <andrea@betterlinux.com>
26Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27---
28 drivers/staging/zcache/zcache-main.c | 4 ++--
29 1 file changed, 2 insertions(+), 2 deletions(-)
30
31diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c
32index f5e469d..16ad9fe 100644
33--- a/drivers/staging/zcache/zcache-main.c
34+++ b/drivers/staging/zcache/zcache-main.c
35@@ -299,10 +299,12 @@ static void zbud_free_and_delist(struct zbud_hdr *zh)
36 struct zbud_page *zbpg =
37 container_of(zh, struct zbud_page, buddy[budnum]);
38
39+ spin_lock(&zbud_budlists_spinlock);
40 spin_lock(&zbpg->lock);
41 if (list_empty(&zbpg->bud_list)) {
42 /* ignore zombie page... see zbud_evict_pages() */
43 spin_unlock(&zbpg->lock);
44+ spin_unlock(&zbud_budlists_spinlock);
45 return;
46 }
47 size = zbud_free(zh);
48@@ -310,7 +312,6 @@ static void zbud_free_and_delist(struct zbud_hdr *zh)
49 zh_other = &zbpg->buddy[(budnum == 0) ? 1 : 0];
50 if (zh_other->size == 0) { /* was unbuddied: unlist and free */
51 chunks = zbud_size_to_chunks(size) ;
52- spin_lock(&zbud_budlists_spinlock);
53 BUG_ON(list_empty(&zbud_unbuddied[chunks].list));
54 list_del_init(&zbpg->bud_list);
55 zbud_unbuddied[chunks].count--;
56@@ -318,7 +319,6 @@ static void zbud_free_and_delist(struct zbud_hdr *zh)
57 zbud_free_raw_page(zbpg);
58 } else { /* was buddied: move remaining buddy to unbuddied list */
59 chunks = zbud_size_to_chunks(zh_other->size) ;
60- spin_lock(&zbud_budlists_spinlock);
61 list_del_init(&zbpg->bud_list);
62 zcache_zbud_buddied_count--;
63 list_add_tail(&zbpg->bud_list, &zbud_unbuddied[chunks].list);
64--
651.7.9.4
66
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0006-USB-ftdi_sio-fix-problem-when-the-manufacture-is-a-N.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0006-USB-ftdi_sio-fix-problem-when-the-manufacture-is-a-N.patch
new file mode 100644
index 00000000..b22cdfb5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0006-USB-ftdi_sio-fix-problem-when-the-manufacture-is-a-N.patch
@@ -0,0 +1,36 @@
1From 662c920fb175331db0c7813edd168390b51d3e31 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Tue, 28 Feb 2012 09:20:09 -0800
4Subject: [PATCH 006/147] USB: ftdi_sio: fix problem when the manufacture is a
5 NULL string
6
7commit 656d2b3964a9d0f9864d472f8dfa2dd7dd42e6c0 upstream.
8
9On some misconfigured ftdi_sio devices, if the manufacturer string is
10NULL, the kernel will oops when the device is plugged in. This patch
11fixes the problem.
12
13Reported-by: Wojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
14Tested-by: Wojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/usb/serial/ftdi_sio.c | 3 ++-
18 1 file changed, 2 insertions(+), 1 deletion(-)
19
20diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
21index f030471..d170b2a 100644
22--- a/drivers/usb/serial/ftdi_sio.c
23+++ b/drivers/usb/serial/ftdi_sio.c
24@@ -1763,7 +1763,8 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
25
26 dbg("%s", __func__);
27
28- if (strcmp(udev->manufacturer, "CALAO Systems") == 0)
29+ if ((udev->manufacturer) &&
30+ (strcmp(udev->manufacturer, "CALAO Systems") == 0))
31 return ftdi_jtag_probe(serial);
32
33 return 0;
34--
351.7.9.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0007-USB-ftdi_sio-add-support-for-BeagleBone-rev-A5.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0007-USB-ftdi_sio-add-support-for-BeagleBone-rev-A5.patch
new file mode 100644
index 00000000..f87f426a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0007-USB-ftdi_sio-add-support-for-BeagleBone-rev-A5.patch
@@ -0,0 +1,35 @@
1From 5cabeb029a6230a2ade6a4e6821f444cc40816dd Mon Sep 17 00:00:00 2001
2From: Peter Korsgaard <jacmet@sunsite.dk>
3Date: Wed, 29 Feb 2012 10:05:37 +0100
4Subject: [PATCH 007/147] USB: ftdi_sio: add support for BeagleBone rev A5+
5
6commit 444aa7fa9bd752d19ce472d3e02558b987c3cc67 upstream.
7
8BeagleBone changed to the default FTDI 0403:6010 id in rev A5 to make life
9easier for Windows users, so we need a similar workaround as the Calao
10board to support it.
11
12Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/usb/serial/ftdi_sio.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
19index d170b2a..30839d4 100644
20--- a/drivers/usb/serial/ftdi_sio.c
21+++ b/drivers/usb/serial/ftdi_sio.c
22@@ -1763,8 +1763,8 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
23
24 dbg("%s", __func__);
25
26- if ((udev->manufacturer) &&
27- (strcmp(udev->manufacturer, "CALAO Systems") == 0))
28+ if ((udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems")) ||
29+ (udev->product && !strcmp(udev->product, "BeagleBone/XDS100")))
30 return ftdi_jtag_probe(serial);
31
32 return 0;
33--
341.7.9.4
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0008-USB-Microchip-VID-mislabeled-as-Hornby-VID-in-ftdi_s.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0008-USB-Microchip-VID-mislabeled-as-Hornby-VID-in-ftdi_s.patch
new file mode 100644
index 00000000..7278bddf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0008-USB-Microchip-VID-mislabeled-as-Hornby-VID-in-ftdi_s.patch
@@ -0,0 +1,61 @@
1From f2f8f7f7d9dfc406b8e5a9a1b89e904318c8ac0f Mon Sep 17 00:00:00 2001
2From: Bruno Thomsen <bruno.thomsen@gmail.com>
3Date: Sun, 4 Mar 2012 15:19:14 +0100
4Subject: [PATCH 008/147] USB: Microchip VID mislabeled as Hornby VID in
5 ftdi_sio.
6
7commit c1cee1d84001815a1b4321c49b995254c0df3100 upstream.
8
9Microchip VID (0x04d8) was mislabeled as Hornby VID according to USB-IDs.
10
11A Full Speed USB Demo Board PID (0x000a) was mislabeled as
12Hornby Elite (an Digital Command Controller Console for model railways).
13
14Most likely the Hornby based their design on
15PIC18F87J50 Full Speed USB Demo Board.
16
17Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/usb/serial/ftdi_sio.c | 2 +-
21 drivers/usb/serial/ftdi_sio_ids.h | 10 +++++++---
22 2 files changed, 8 insertions(+), 4 deletions(-)
23
24diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
25index 30839d4..363e995 100644
26--- a/drivers/usb/serial/ftdi_sio.c
27+++ b/drivers/usb/serial/ftdi_sio.c
28@@ -797,7 +797,7 @@ static struct usb_device_id id_table_combined [] = {
29 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
30 { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID),
31 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
32- { USB_DEVICE(HORNBY_VID, HORNBY_ELITE_PID) },
33+ { USB_DEVICE(MICROCHIP_VID, MICROCHIP_USB_BOARD_PID) },
34 { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) },
35 { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID),
36 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
37diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
38index 4eb7715..df87939 100644
39--- a/drivers/usb/serial/ftdi_sio_ids.h
40+++ b/drivers/usb/serial/ftdi_sio_ids.h
41@@ -532,10 +532,14 @@
42 #define ADI_GNICEPLUS_PID 0xF001
43
44 /*
45- * Hornby Elite
46+ * Microchip Technology, Inc.
47+ *
48+ * MICROCHIP_VID (0x04D8) and MICROCHIP_USB_BOARD_PID (0x000A) are also used by:
49+ * Hornby Elite - Digital Command Control Console
50+ * http://www.hornby.com/hornby-dcc/controllers/
51 */
52-#define HORNBY_VID 0x04D8
53-#define HORNBY_ELITE_PID 0x000A
54+#define MICROCHIP_VID 0x04D8
55+#define MICROCHIP_USB_BOARD_PID 0x000A /* CDC RS-232 Emulation Demo */
56
57 /*
58 * RATOC REX-USB60F
59--
601.7.9.4
61
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0009-USB-ftdi_sio-new-PID-Distortec-JTAG-lock-pick.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0009-USB-ftdi_sio-new-PID-Distortec-JTAG-lock-pick.patch
new file mode 100644
index 00000000..08fa95ca
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0009-USB-ftdi_sio-new-PID-Distortec-JTAG-lock-pick.patch
@@ -0,0 +1,46 @@
1From 42eb98a4b9dc721f8565ce0d3063db8d141f516b Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Micha=C5=82=20Wr=C3=B3bel?= <michal.wrobel@flytronic.pl>
3Date: Fri, 9 Mar 2012 14:40:18 +0100
4Subject: [PATCH 009/147] USB: ftdi_sio: new PID: Distortec JTAG-lock-pick
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 47594d5528f28a4c025c2955c68104c75815637c upstream.
10
11Signed-off-by: Micha?? Wr??bel <michal.wrobel@flytronic.pl>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 drivers/usb/serial/ftdi_sio.c | 2 ++
15 drivers/usb/serial/ftdi_sio_ids.h | 2 ++
16 2 files changed, 4 insertions(+)
17
18diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
19index 363e995..a319eaa 100644
20--- a/drivers/usb/serial/ftdi_sio.c
21+++ b/drivers/usb/serial/ftdi_sio.c
22@@ -846,6 +846,8 @@ static struct usb_device_id id_table_combined [] = {
23 { USB_DEVICE(ST_VID, ST_STMCLT1030_PID),
24 .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk },
25 { USB_DEVICE(FTDI_VID, FTDI_RF_R106) },
26+ { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID),
27+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
28 { }, /* Optional parameter entry */
29 { } /* Terminating entry */
30 };
31diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
32index df87939..bed1b1f 100644
33--- a/drivers/usb/serial/ftdi_sio_ids.h
34+++ b/drivers/usb/serial/ftdi_sio_ids.h
35@@ -97,6 +97,8 @@
36 #define FTDI_TACTRIX_OPENPORT_13S_PID 0xCC49 /* OpenPort 1.3 Subaru */
37 #define FTDI_TACTRIX_OPENPORT_13U_PID 0xCC4A /* OpenPort 1.3 Universal */
38
39+#define FTDI_DISTORTEC_JTAG_LOCK_PICK_PID 0xCFF8
40+
41 /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */
42 /* the VID is the standard ftdi vid (FTDI_VID) */
43 #define FTDI_SCS_DEVICE_0_PID 0xD010 /* SCS PTC-IIusb */
44--
451.7.9.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0010-USB-ftdi_sio-add-support-for-FT-X-series-devices.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0010-USB-ftdi_sio-add-support-for-FT-X-series-devices.patch
new file mode 100644
index 00000000..37f665bd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0010-USB-ftdi_sio-add-support-for-FT-X-series-devices.patch
@@ -0,0 +1,150 @@
1From a1460f8a00ab8864ee14c39d4dfaa0dea4cff95e Mon Sep 17 00:00:00 2001
2From: Jim Paris <jim@jtan.com>
3Date: Wed, 14 Mar 2012 17:54:25 -0400
4Subject: [PATCH 010/147] USB: ftdi_sio: add support for FT-X series devices
5
6commit dc0827c128c0ee5a58b822b99d662b59f4b8e970 upstream.
7
8Add PID 0x6015, corresponding to the new series of FT-X chips
9(FT220XD, FT201X, FT220X, FT221X, FT230X, FT231X, FT240X). They all
10appear as serial devices, and seem indistinguishable except for the
11default product string stored in their EEPROM. The baudrate
12generation matches FT232RL devices.
13
14Tested with a FT201X and FT230X at various baudrates (100 - 3000000).
15
16Sample dmesg:
17 ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
18 usb 2-1: new full-speed USB device number 6 using ohci_hcd
19 usb 2-1: New USB device found, idVendor=0403, idProduct=6015
20 usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
21 usb 2-1: Product: FT230X USB Half UART
22 usb 2-1: Manufacturer: FTDI
23 usb 2-1: SerialNumber: DC001WI6
24 ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
25 drivers/usb/serial/ftdi_sio.c: ftdi_sio_port_probe
26 drivers/usb/serial/ftdi_sio.c: ftdi_determine_type: bcdDevice = 0x1000, bNumInterfaces = 1
27 usb 2-1: Detected FT-X
28 usb 2-1: Number of endpoints 2
29 usb 2-1: Endpoint 1 MaxPacketSize 64
30 usb 2-1: Endpoint 2 MaxPacketSize 64
31 usb 2-1: Setting MaxPacketSize 64
32 drivers/usb/serial/ftdi_sio.c: read_latency_timer
33 drivers/usb/serial/ftdi_sio.c: write_latency_timer: setting latency timer = 1
34 drivers/usb/serial/ftdi_sio.c: create_sysfs_attrs
35 drivers/usb/serial/ftdi_sio.c: sysfs attributes for FT-X
36 usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
37
38Signed-off-by: Jim Paris <jim@jtan.com>
39Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
40---
41 drivers/usb/serial/ftdi_sio.c | 20 +++++++++++++++-----
42 drivers/usb/serial/ftdi_sio.h | 3 ++-
43 drivers/usb/serial/ftdi_sio_ids.h | 1 +
44 3 files changed, 18 insertions(+), 6 deletions(-)
45
46diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
47index a319eaa..b64fddc 100644
48--- a/drivers/usb/serial/ftdi_sio.c
49+++ b/drivers/usb/serial/ftdi_sio.c
50@@ -188,6 +188,7 @@ static struct usb_device_id id_table_combined [] = {
51 .driver_info = (kernel_ulong_t)&ftdi_8u2232c_quirk },
52 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
53 { USB_DEVICE(FTDI_VID, FTDI_232H_PID) },
54+ { USB_DEVICE(FTDI_VID, FTDI_FTX_PID) },
55 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
56 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
57 { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
58@@ -870,7 +871,8 @@ static const char *ftdi_chip_name[] = {
59 [FT232RL] = "FT232RL",
60 [FT2232H] = "FT2232H",
61 [FT4232H] = "FT4232H",
62- [FT232H] = "FT232H"
63+ [FT232H] = "FT232H",
64+ [FTX] = "FT-X"
65 };
66
67
68@@ -1171,7 +1173,8 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
69 break;
70 case FT232BM: /* FT232BM chip */
71 case FT2232C: /* FT2232C chip */
72- case FT232RL:
73+ case FT232RL: /* FT232RL chip */
74+ case FTX: /* FT-X series */
75 if (baud <= 3000000) {
76 __u16 product_id = le16_to_cpu(
77 port->serial->dev->descriptor.idProduct);
78@@ -1460,10 +1463,14 @@ static void ftdi_determine_type(struct usb_serial_port *port)
79 } else if (version < 0x900) {
80 /* Assume it's an FT232RL */
81 priv->chip_type = FT232RL;
82- } else {
83+ } else if (version < 0x1000) {
84 /* Assume it's an FT232H */
85 priv->chip_type = FT232H;
86+ } else {
87+ /* Assume it's an FT-X series device */
88+ priv->chip_type = FTX;
89 }
90+
91 dev_info(&udev->dev, "Detected %s\n", ftdi_chip_name[priv->chip_type]);
92 }
93
94@@ -1591,7 +1598,8 @@ static int create_sysfs_attrs(struct usb_serial_port *port)
95 priv->chip_type == FT232RL ||
96 priv->chip_type == FT2232H ||
97 priv->chip_type == FT4232H ||
98- priv->chip_type == FT232H)) {
99+ priv->chip_type == FT232H ||
100+ priv->chip_type == FTX)) {
101 retval = device_create_file(&port->dev,
102 &dev_attr_latency_timer);
103 }
104@@ -1613,7 +1621,8 @@ static void remove_sysfs_attrs(struct usb_serial_port *port)
105 priv->chip_type == FT232RL ||
106 priv->chip_type == FT2232H ||
107 priv->chip_type == FT4232H ||
108- priv->chip_type == FT232H) {
109+ priv->chip_type == FT232H ||
110+ priv->chip_type == FTX) {
111 device_remove_file(&port->dev, &dev_attr_latency_timer);
112 }
113 }
114@@ -2287,6 +2296,7 @@ static int ftdi_tiocmget(struct tty_struct *tty)
115 case FT2232H:
116 case FT4232H:
117 case FT232H:
118+ case FTX:
119 len = 2;
120 break;
121 default:
122diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
123index 19584fa..ed58c6f 100644
124--- a/drivers/usb/serial/ftdi_sio.h
125+++ b/drivers/usb/serial/ftdi_sio.h
126@@ -157,7 +157,8 @@ enum ftdi_chip_type {
127 FT232RL = 5,
128 FT2232H = 6,
129 FT4232H = 7,
130- FT232H = 8
131+ FT232H = 8,
132+ FTX = 9,
133 };
134
135 enum ftdi_sio_baudrate {
136diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
137index bed1b1f..ac1c42e 100644
138--- a/drivers/usb/serial/ftdi_sio_ids.h
139+++ b/drivers/usb/serial/ftdi_sio_ids.h
140@@ -23,6 +23,7 @@
141 #define FTDI_8U2232C_PID 0x6010 /* Dual channel device */
142 #define FTDI_4232H_PID 0x6011 /* Quad channel hi-speed device */
143 #define FTDI_232H_PID 0x6014 /* Single channel hi-speed device */
144+#define FTDI_FTX_PID 0x6015 /* FT-X series (FT201X, FT230X, FT231X, etc) */
145 #define FTDI_SIO_PID 0x8372 /* Product Id SIO application of 8U100AX */
146 #define FTDI_232RL_PID 0xFBFA /* Product ID for FT232RL */
147
148--
1491.7.9.4
150
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0011-USB-ftdi_sio-new-PID-LUMEL-PD12.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0011-USB-ftdi_sio-new-PID-LUMEL-PD12.patch
new file mode 100644
index 00000000..4af208d0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0011-USB-ftdi_sio-new-PID-LUMEL-PD12.patch
@@ -0,0 +1,45 @@
1From f1a77f929e5e9c5399bf0e0a589280719f96654c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Micha=C5=82=20Wr=C3=B3bel?= <michal.wrobel@flytronic.pl>
3Date: Thu, 15 Mar 2012 17:24:04 +0100
4Subject: [PATCH 011/147] USB: ftdi_sio: new PID: LUMEL PD12
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 57e596f3af88ef52dea9640ed5e34ecd38893a02 upstream.
10
11Signed-off-by: Micha?? Wr??bel <michal.wrobel@flytronic.pl>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 drivers/usb/serial/ftdi_sio.c | 1 +
15 drivers/usb/serial/ftdi_sio_ids.h | 2 ++
16 2 files changed, 3 insertions(+)
17
18diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
19index b64fddc..3f3ccf6 100644
20--- a/drivers/usb/serial/ftdi_sio.c
21+++ b/drivers/usb/serial/ftdi_sio.c
22@@ -849,6 +849,7 @@ static struct usb_device_id id_table_combined [] = {
23 { USB_DEVICE(FTDI_VID, FTDI_RF_R106) },
24 { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID),
25 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
26+ { USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) },
27 { }, /* Optional parameter entry */
28 { } /* Terminating entry */
29 };
30diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
31index ac1c42e..abf6bbc 100644
32--- a/drivers/usb/serial/ftdi_sio_ids.h
33+++ b/drivers/usb/serial/ftdi_sio_ids.h
34@@ -30,6 +30,8 @@
35
36 /*** third-party PIDs (using FTDI_VID) ***/
37
38+#define FTDI_LUMEL_PD12_PID 0x6002
39+
40 /*
41 * Marvell OpenRD Base, Client
42 * http://www.open-rd.org
43--
441.7.9.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0012-powerpc-usb-fix-bug-of-kernel-hang-when-initializing.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0012-powerpc-usb-fix-bug-of-kernel-hang-when-initializing.patch
new file mode 100644
index 00000000..f40aa0f0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0012-powerpc-usb-fix-bug-of-kernel-hang-when-initializing.patch
@@ -0,0 +1,55 @@
1From 9091aa838fdba8fef22a629f43cd039daa714da6 Mon Sep 17 00:00:00 2001
2From: Shengzhou Liu <Shengzhou.Liu@freescale.com>
3Date: Thu, 16 Feb 2012 18:02:20 +0800
4Subject: [PATCH 012/147] powerpc/usb: fix bug of kernel hang when
5 initializing usb
6
7commit 28c56ea1431421dec51b7b229369e991481453df upstream.
8
9If USB UTMI PHY is not enable, writing to portsc register will lead to
10kernel hang during boot up.
11
12Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
13Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/usb/host/ehci-fsl.c | 4 ++++
17 drivers/usb/host/ehci-fsl.h | 1 +
18 2 files changed, 5 insertions(+)
19
20diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
21index b556a72..da487fd 100644
22--- a/drivers/usb/host/ehci-fsl.c
23+++ b/drivers/usb/host/ehci-fsl.c
24@@ -216,6 +216,8 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
25 unsigned int port_offset)
26 {
27 u32 portsc;
28+ struct usb_hcd *hcd = ehci_to_hcd(ehci);
29+ void __iomem *non_ehci = hcd->regs;
30
31 portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]);
32 portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW);
33@@ -231,6 +233,8 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
34 portsc |= PORT_PTS_PTW;
35 /* fall through */
36 case FSL_USB2_PHY_UTMI:
37+ /* enable UTMI PHY */
38+ setbits32(non_ehci + FSL_SOC_USB_CTRL, CTRL_UTMI_PHY_EN);
39 portsc |= PORT_PTS_UTMI;
40 break;
41 case FSL_USB2_PHY_NONE:
42diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h
43index 4918062..bea5013 100644
44--- a/drivers/usb/host/ehci-fsl.h
45+++ b/drivers/usb/host/ehci-fsl.h
46@@ -45,5 +45,6 @@
47 #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */
48 #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */
49 #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */
50+#define CTRL_UTMI_PHY_EN (1<<9)
51 #define SNOOP_SIZE_2GB 0x1e
52 #endif /* _EHCI_FSL_H */
53--
541.7.9.4
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0013-staging-r8712u-Add-missing-initialization-and-remove.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0013-staging-r8712u-Add-missing-initialization-and-remove.patch
new file mode 100644
index 00000000..a659fd50
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0013-staging-r8712u-Add-missing-initialization-and-remove.patch
@@ -0,0 +1,107 @@
1From 737186258370f25f44b7aa152ae1bef1e308a929 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Thu, 9 Feb 2012 16:37:17 -0600
4Subject: [PATCH 013/147] staging: r8712u: Add missing initialization and
5 remove configuration parameter CONFIG_R8712_AP
6
7commit 073863432f7eaa23c7c09733414d4be2eabf5eef upstream.
8
9When this driver was upgraded to the vendor 20100831 version in
10commit 93c55dda092c7 et al,, one listhead initialization was missed.
11This broke complete operation of the driver whenever AP mode was
12enabled. This fixes https://bugs.archlinux.org/task/27996.
13
14The configuration parameter R8712_AP is misleading as the driver cannot
15function as an AP without a heavily hacked version of hostapd. Thus, it
16makes sense to remove the parameter; however the code and data configured
17for the option is left in.
18
19Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 drivers/staging/rtl8712/Kconfig | 7 -------
23 drivers/staging/rtl8712/rtl871x_sta_mgt.c | 5 +----
24 drivers/staging/rtl8712/sta_info.h | 4 ----
25 3 files changed, 1 insertion(+), 15 deletions(-)
26
27diff --git a/drivers/staging/rtl8712/Kconfig b/drivers/staging/rtl8712/Kconfig
28index ea37473..6a43312 100644
29--- a/drivers/staging/rtl8712/Kconfig
30+++ b/drivers/staging/rtl8712/Kconfig
31@@ -9,13 +9,6 @@ config R8712U
32 This option adds the Realtek RTL8712 USB device such as the D-Link DWA-130.
33 If built as a module, it will be called r8712u.
34
35-config R8712_AP
36- bool "Realtek RTL8712U AP code"
37- depends on R8712U
38- default N
39- ---help---
40- This option allows the Realtek RTL8712 USB device to be an Access Point.
41-
42 config R8712_TX_AGGR
43 bool "Realtek RTL8712U Transmit Aggregation code"
44 depends on R8712U && BROKEN
45diff --git a/drivers/staging/rtl8712/rtl871x_sta_mgt.c b/drivers/staging/rtl8712/rtl871x_sta_mgt.c
46index 64f5696..1247b3d 100644
47--- a/drivers/staging/rtl8712/rtl871x_sta_mgt.c
48+++ b/drivers/staging/rtl8712/rtl871x_sta_mgt.c
49@@ -42,9 +42,8 @@ static void _init_stainfo(struct sta_info *psta)
50 _init_listhead(&psta->hash_list);
51 _r8712_init_sta_xmit_priv(&psta->sta_xmitpriv);
52 _r8712_init_sta_recv_priv(&psta->sta_recvpriv);
53-#ifdef CONFIG_R8712_AP
54+ _init_listhead(&psta->asoc_list);
55 _init_listhead(&psta->auth_list);
56-#endif
57 }
58
59 u32 _r8712_init_sta_priv(struct sta_priv *pstapriv)
60@@ -71,10 +70,8 @@ u32 _r8712_init_sta_priv(struct sta_priv *pstapriv)
61 get_list_head(&pstapriv->free_sta_queue));
62 psta++;
63 }
64-#ifdef CONFIG_R8712_AP
65 _init_listhead(&pstapriv->asoc_list);
66 _init_listhead(&pstapriv->auth_list);
67-#endif
68 return _SUCCESS;
69 }
70
71diff --git a/drivers/staging/rtl8712/sta_info.h b/drivers/staging/rtl8712/sta_info.h
72index 48d6a14..f8016e9 100644
73--- a/drivers/staging/rtl8712/sta_info.h
74+++ b/drivers/staging/rtl8712/sta_info.h
75@@ -90,7 +90,6 @@ struct sta_info {
76 * curr_network(mlme_priv/security_priv/qos/ht) : AP CAP/INFO
77 * sta_info: (AP & STA) CAP/INFO
78 */
79-#ifdef CONFIG_R8712_AP
80 struct list_head asoc_list;
81 struct list_head auth_list;
82 unsigned int expire_to;
83@@ -98,7 +97,6 @@ struct sta_info {
84 unsigned int authalg;
85 unsigned char chg_txt[128];
86 unsigned int tx_ra_bitmap;
87-#endif
88 };
89
90 struct sta_priv {
91@@ -111,13 +109,11 @@ struct sta_priv {
92 struct __queue sleep_q;
93 struct __queue wakeup_q;
94 struct _adapter *padapter;
95-#ifdef CONFIG_R8712_AP
96 struct list_head asoc_list;
97 struct list_head auth_list;
98 unsigned int auth_to; /* sec, time to expire in authenticating. */
99 unsigned int assoc_to; /* sec, time to expire before associating. */
100 unsigned int expire_to; /* sec , time to expire after associated. */
101-#endif
102 };
103
104 static inline u32 wifi_mac_hash(u8 *mac)
105--
1061.7.9.4
107
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0014-staging-r8712u-Fix-regression-introduced-by-commit-a.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0014-staging-r8712u-Fix-regression-introduced-by-commit-a.patch
new file mode 100644
index 00000000..8a983e96
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0014-staging-r8712u-Fix-regression-introduced-by-commit-a.patch
@@ -0,0 +1,53 @@
1From 10fcebe06f12c7f87ad05084848c51d69f118505 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Sat, 25 Feb 2012 18:10:20 -0600
4Subject: [PATCH 014/147] staging: r8712u: Fix regression introduced by commit
5 a5ee652
6
7commit 9f4bc8cf3fe750ed093856a5f5d41c11cc12ad22 upstream.
8
9In commit a5ee652 "staging: r8712u: Interface-state not fully tracked",
10the private boolean "bup" was set false when the interface was brought down,
11as that seemed appropriate. This change has not caused any problems when
12using NetworkManager or manual control of the device; however, when wicd
13control is used, there is a locking problem in wpa_supplicant, as shown in
14https://bugzilla.kernel.org/show_bug.cgi?id=42818.
15
16This fix reverts the only code change in commit a5ee652. My
17analysis is that "bup" is badly named. In its present form, it
18seems to indicate the up/down state of the device, but its usage
19is more consistent with an initialized/uninitialized state. That
20problem will be addressed in a later patch.
21
22Note: Commit 8c213fa, which introdued asynchronous firmware loading
23for this driver, exposed this bug to a greater extent. That bug
24is addressed in the next patch in this series.
25
26This bug is also responsible for the bug in
27https://bugzilla.kernel.org/show_bug.cgi?id=42815. and this bug is
28also part of the problems discussed at https://bugs.archlinux.org/task/27996#comment89950.
29
30Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com>
31Tested-by: Adrian <agib@gmx.de>
32Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
33Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34---
35 drivers/staging/rtl8712/os_intfs.c | 2 --
36 1 file changed, 2 deletions(-)
37
38diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
39index 98a3d68..fb11743 100644
40--- a/drivers/staging/rtl8712/os_intfs.c
41+++ b/drivers/staging/rtl8712/os_intfs.c
42@@ -476,8 +476,6 @@ static int netdev_close(struct net_device *pnetdev)
43 r8712_free_assoc_resources(padapter);
44 /*s2-4.*/
45 r8712_free_network_queue(padapter);
46- /* The interface is no longer Up: */
47- padapter->bup = false;
48 release_firmware(padapter->fw);
49 /* never exit with a firmware callback pending */
50 wait_for_completion(&padapter->rtl8712_fw_ready);
51--
521.7.9.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0015-staging-r8712u-Fix-regression-in-signal-level-after-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0015-staging-r8712u-Fix-regression-in-signal-level-after-.patch
new file mode 100644
index 00000000..9cf3b16f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0015-staging-r8712u-Fix-regression-in-signal-level-after-.patch
@@ -0,0 +1,47 @@
1From a8385f8f3089aba9d0d9b0faf580e89510648367 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Sun, 26 Feb 2012 22:08:36 -0600
4Subject: [PATCH 015/147] staging: r8712u: Fix regression in signal level
5 after commit c6dc001
6
7commit da3e6ec2f443ac00aa623c5921e3521f5f38efe4 upstream.
8
9In commit c6dc001 "staging: r8712u: Merging Realtek's latest (v2.6.6).
10Various fixes", the returned qual.qual member of the iw_statistics
11struct was changed. For strong signals, this change made no difference;
12however for medium and weak signals it results in a low signal that
13shows considerable fluctuation, When using wicd for a medium-strength
14AP, the value reported in the status line is reduced from 100% to 60% by
15this bug.
16
17This problem is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42826.
18
19Reported-and-tested-by: Robert Crawford <wrc1944@gmail.com>
20Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 8 +-------
24 1 file changed, 1 insertion(+), 7 deletions(-)
25
26diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
27index 507584b8..ef35bc2 100644
28--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
29+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
30@@ -2380,13 +2380,7 @@ static struct iw_statistics *r871x_get_wireless_stats(struct net_device *dev)
31 tmp_qual = padapter->recvpriv.signal;
32 tmp_noise = padapter->recvpriv.noise;
33 piwstats->qual.level = tmp_level;
34- /*piwstats->qual.qual = tmp_qual;
35- * The NetworkManager of Fedora 10, 13 will use the link
36- * quality for its display.
37- * So, use the fw_rssi on link quality variable because
38- * fw_rssi will be updated per 2 seconds.
39- */
40- piwstats->qual.qual = tmp_level;
41+ piwstats->qual.qual = tmp_qual;
42 piwstats->qual.noise = tmp_noise;
43 }
44 piwstats->qual.updated = IW_QUAL_ALL_UPDATED;
45--
461.7.9.4
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0016-usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0016-usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch
new file mode 100644
index 00000000..22a9c5cd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0016-usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch
@@ -0,0 +1,54 @@
1From 0a7695bc47ddfdeaaa1b30b88912f38a481e3abd Mon Sep 17 00:00:00 2001
2From: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
3Date: Fri, 17 Feb 2012 14:10:16 -0800
4Subject: [PATCH 016/147] usb: dwc3: fix bogus test in dwc3_gadget_start_isoc
5
6commit 9bafa56c7cee5c6fa68de5924220abb220c7e229 upstream.
7
8Zero is a valid value for a microframe number. So remove the bogus
9test for non-zero in dwc3_gadget_start_isoc().
10
11Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
12Signed-off-by: Felipe Balbi <balbi@ti.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/usb/dwc3/gadget.c | 16 +++++-----------
16 1 file changed, 5 insertions(+), 11 deletions(-)
17
18diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
19index 5802720..41a2ea6 100644
20--- a/drivers/usb/dwc3/gadget.c
21+++ b/drivers/usb/dwc3/gadget.c
22@@ -1405,7 +1405,7 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc,
23 static void dwc3_gadget_start_isoc(struct dwc3 *dwc,
24 struct dwc3_ep *dep, const struct dwc3_event_depevt *event)
25 {
26- u32 uf;
27+ u32 uf, mask;
28
29 if (list_empty(&dep->request_list)) {
30 dev_vdbg(dwc->dev, "ISOC ep %s run out for requests.\n",
31@@ -1413,16 +1413,10 @@ static void dwc3_gadget_start_isoc(struct dwc3 *dwc,
32 return;
33 }
34
35- if (event->parameters) {
36- u32 mask;
37-
38- mask = ~(dep->interval - 1);
39- uf = event->parameters & mask;
40- /* 4 micro frames in the future */
41- uf += dep->interval * 4;
42- } else {
43- uf = 0;
44- }
45+ mask = ~(dep->interval - 1);
46+ uf = event->parameters & mask;
47+ /* 4 micro frames in the future */
48+ uf += dep->interval * 4;
49
50 __dwc3_gadget_kick_transfer(dep, uf, 1);
51 }
52--
531.7.9.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0017-usb-dwc3-use-proper-function-for-setting-endpoint-na.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0017-usb-dwc3-use-proper-function-for-setting-endpoint-na.patch
new file mode 100644
index 00000000..582b9f92
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0017-usb-dwc3-use-proper-function-for-setting-endpoint-na.patch
@@ -0,0 +1,46 @@
1From cdbcc2f017a258caca6390e7353709a6603bc452 Mon Sep 17 00:00:00 2001
2From: Anton Tikhomirov <av.tikhomirov@samsung.com>
3Date: Thu, 23 Feb 2012 15:38:46 +0900
4Subject: [PATCH 017/147] usb: dwc3: use proper function for setting endpoint
5 name
6
7commit 27a78d6a283d6782438f72306746afe4bf44c215 upstream.
8
9It's wrong to use the size of array as an argument for strncat.
10Memory corruption is possible. strlcat is exactly what we need here.
11
12Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
13Signed-off-by: Felipe Balbi <balbi@ti.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/usb/dwc3/gadget.c | 8 ++++----
17 1 file changed, 4 insertions(+), 4 deletions(-)
18
19diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
20index 41a2ea6..dfcda94 100644
21--- a/drivers/usb/dwc3/gadget.c
22+++ b/drivers/usb/dwc3/gadget.c
23@@ -449,16 +449,16 @@ static int dwc3_gadget_ep_enable(struct usb_ep *ep,
24
25 switch (usb_endpoint_type(desc)) {
26 case USB_ENDPOINT_XFER_CONTROL:
27- strncat(dep->name, "-control", sizeof(dep->name));
28+ strlcat(dep->name, "-control", sizeof(dep->name));
29 break;
30 case USB_ENDPOINT_XFER_ISOC:
31- strncat(dep->name, "-isoc", sizeof(dep->name));
32+ strlcat(dep->name, "-isoc", sizeof(dep->name));
33 break;
34 case USB_ENDPOINT_XFER_BULK:
35- strncat(dep->name, "-bulk", sizeof(dep->name));
36+ strlcat(dep->name, "-bulk", sizeof(dep->name));
37 break;
38 case USB_ENDPOINT_XFER_INT:
39- strncat(dep->name, "-int", sizeof(dep->name));
40+ strlcat(dep->name, "-int", sizeof(dep->name));
41 break;
42 default:
43 dev_err(dwc->dev, "invalid endpoint transfer type\n");
44--
451.7.9.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0018-usb-gadgetfs-return-number-of-bytes-on-ep0-read-requ.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0018-usb-gadgetfs-return-number-of-bytes-on-ep0-read-requ.patch
new file mode 100644
index 00000000..c226f859
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0018-usb-gadgetfs-return-number-of-bytes-on-ep0-read-requ.patch
@@ -0,0 +1,37 @@
1From 868208aaab0df10df8bff2cb3bc2ccae0fa0a16d Mon Sep 17 00:00:00 2001
2From: Thomas Faber <thfabba@gmx.de>
3Date: Fri, 2 Mar 2012 09:41:50 +0100
4Subject: [PATCH 018/147] usb: gadgetfs: return number of bytes on ep0 read
5 request
6
7commit 85b4b3c8c189e0159101f7628a71411af072ff69 upstream.
8
9A read from GadgetFS endpoint 0 during the data stage of a control
10request would always return 0 on success (as returned by
11wait_event_interruptible) despite having written data into the user
12buffer.
13This patch makes it correctly set the return value to the number of
14bytes read.
15
16Signed-off-by: Thomas Faber <thfabba@gmx.de>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 drivers/usb/gadget/inode.c | 2 ++
20 1 file changed, 2 insertions(+)
21
22diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
23index 9361251..2a96f57 100644
24--- a/drivers/usb/gadget/inode.c
25+++ b/drivers/usb/gadget/inode.c
26@@ -1043,6 +1043,8 @@ ep0_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
27 // FIXME don't call this with the spinlock held ...
28 if (copy_to_user (buf, dev->req->buf, len))
29 retval = -EFAULT;
30+ else
31+ retval = len;
32 clean_req (dev->gadget->ep0, dev->req);
33 /* NOTE userspace can't yet choose to stall */
34 }
35--
361.7.9.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0019-USB-gadget-Make-g_hid-device-class-conform-to-spec.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0019-USB-gadget-Make-g_hid-device-class-conform-to-spec.patch
new file mode 100644
index 00000000..4751b7fc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0019-USB-gadget-Make-g_hid-device-class-conform-to-spec.patch
@@ -0,0 +1,39 @@
1From 68f1d29a63c33ab9478d1d5b11d4ba522fa3d167 Mon Sep 17 00:00:00 2001
2From: Orjan Friberg <of@flatfrog.com>
3Date: Wed, 7 Mar 2012 17:16:14 +0100
4Subject: [PATCH 019/147] USB: gadget: Make g_hid device class conform to
5 spec.
6
7commit 33d2832ab0149a26418d360af3c444969a63fb28 upstream.
8
9HID devices should specify this in their interface descriptors, not in the
10device descriptor. This fixes a "missing hardware id" bug under Windows 7 with
11a VIA VL800 (3.0) controller.
12
13Signed-off-by: Orjan Friberg <of@flatfrog.com>
14Cc: Felipe Balbi <balbi@ti.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/usb/gadget/hid.c | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c
21index f888c3e..3493adf 100644
22--- a/drivers/usb/gadget/hid.c
23+++ b/drivers/usb/gadget/hid.c
24@@ -60,9 +60,9 @@ static struct usb_device_descriptor device_desc = {
25 /* .bDeviceClass = USB_CLASS_COMM, */
26 /* .bDeviceSubClass = 0, */
27 /* .bDeviceProtocol = 0, */
28- .bDeviceClass = 0xEF,
29- .bDeviceSubClass = 2,
30- .bDeviceProtocol = 1,
31+ .bDeviceClass = USB_CLASS_PER_INTERFACE,
32+ .bDeviceSubClass = 0,
33+ .bDeviceProtocol = 0,
34 /* .bMaxPacketSize0 = f(hardware) */
35
36 /* Vendor and product id can be overridden by module parameters. */
37--
381.7.9.4
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0020-futex-Cover-all-PI-opcodes-with-cmpxchg-enabled-chec.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0020-futex-Cover-all-PI-opcodes-with-cmpxchg-enabled-chec.patch
new file mode 100644
index 00000000..878a9a50
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0020-futex-Cover-all-PI-opcodes-with-cmpxchg-enabled-chec.patch
@@ -0,0 +1,64 @@
1From 67cc4b87ba54c6101c7fd5dbde9b2547463339d1 Mon Sep 17 00:00:00 2001
2From: Thomas Gleixner <tglx@linutronix.de>
3Date: Wed, 15 Feb 2012 12:08:34 +0100
4Subject: [PATCH 020/147] futex: Cover all PI opcodes with cmpxchg enabled
5 check
6
7commit 59263b513c11398cd66a52d4c5b2b118ce1e0359 upstream.
8
9Some of the newer futex PI opcodes do not check the cmpxchg enabled
10variable and call unconditionally into the handling functions. Cover
11all PI opcodes in a separate check.
12
13Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14Cc: Peter Zijlstra <peterz@infradead.org>
15Cc: Darren Hart <dvhart@linux.intel.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 kernel/futex.c | 19 +++++++++++++------
19 1 file changed, 13 insertions(+), 6 deletions(-)
20
21diff --git a/kernel/futex.c b/kernel/futex.c
22index 1614be2..0677023 100644
23--- a/kernel/futex.c
24+++ b/kernel/futex.c
25@@ -2641,6 +2641,16 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
26 }
27
28 switch (cmd) {
29+ case FUTEX_LOCK_PI:
30+ case FUTEX_UNLOCK_PI:
31+ case FUTEX_TRYLOCK_PI:
32+ case FUTEX_WAIT_REQUEUE_PI:
33+ case FUTEX_CMP_REQUEUE_PI:
34+ if (!futex_cmpxchg_enabled)
35+ return -ENOSYS;
36+ }
37+
38+ switch (cmd) {
39 case FUTEX_WAIT:
40 val3 = FUTEX_BITSET_MATCH_ANY;
41 case FUTEX_WAIT_BITSET:
42@@ -2661,16 +2671,13 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
43 ret = futex_wake_op(uaddr, flags, uaddr2, val, val2, val3);
44 break;
45 case FUTEX_LOCK_PI:
46- if (futex_cmpxchg_enabled)
47- ret = futex_lock_pi(uaddr, flags, val, timeout, 0);
48+ ret = futex_lock_pi(uaddr, flags, val, timeout, 0);
49 break;
50 case FUTEX_UNLOCK_PI:
51- if (futex_cmpxchg_enabled)
52- ret = futex_unlock_pi(uaddr, flags);
53+ ret = futex_unlock_pi(uaddr, flags);
54 break;
55 case FUTEX_TRYLOCK_PI:
56- if (futex_cmpxchg_enabled)
57- ret = futex_lock_pi(uaddr, flags, 0, timeout, 1);
58+ ret = futex_lock_pi(uaddr, flags, 0, timeout, 1);
59 break;
60 case FUTEX_WAIT_REQUEUE_PI:
61 val3 = FUTEX_BITSET_MATCH_ANY;
62--
631.7.9.4
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0021-sysfs-Fix-memory-leak-in-sysfs_sd_setsecdata.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0021-sysfs-Fix-memory-leak-in-sysfs_sd_setsecdata.patch
new file mode 100644
index 00000000..5f58a38c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0021-sysfs-Fix-memory-leak-in-sysfs_sd_setsecdata.patch
@@ -0,0 +1,92 @@
1From 58d245d715be41e6b0d736466a9589d75156f0ff Mon Sep 17 00:00:00 2001
2From: Masami Ichikawa <masami256@gmail.com>
3Date: Tue, 21 Feb 2012 07:43:50 +0900
4Subject: [PATCH 021/147] sysfs: Fix memory leak in sysfs_sd_setsecdata().
5
6commit 93518dd2ebafcc761a8637b2877008cfd748c202 upstream.
7
8This patch fixies follwing two memory leak patterns that reported by kmemleak.
9sysfs_sd_setsecdata() is called during sys_lsetxattr() operation.
10It checks sd->s_iattr is NULL or not. Then if it is NULL, it calls
11sysfs_init_inode_attrs() to allocate memory.
12That code is this.
13
14iattrs = sd->s_iattr;
15if (!iattrs)
16 iattrs = sysfs_init_inode_attrs(sd);
17
18The iattrs recieves sysfs_init_inode_attrs()'s result, but sd->s_iattr
19doesn't know the address. so it needs to set correct address to
20sd->s_iattr to free memory in other function.
21
22unreferenced object 0xffff880250b73e60 (size 32):
23 comm "systemd", pid 1, jiffies 4294683888 (age 94.553s)
24 hex dump (first 32 bytes):
25 73 79 73 74 65 6d 5f 75 3a 6f 62 6a 65 63 74 5f system_u:object_
26 72 3a 73 79 73 66 73 5f 74 3a 73 30 00 00 00 00 r:sysfs_t:s0....
27 backtrace:
28 [<ffffffff814cb1d0>] kmemleak_alloc+0x73/0x98
29 [<ffffffff811270ab>] __kmalloc+0x100/0x12c
30 [<ffffffff8120775a>] context_struct_to_string+0x106/0x210
31 [<ffffffff81207cc1>] security_sid_to_context_core+0x10b/0x129
32 [<ffffffff812090ef>] security_sid_to_context+0x10/0x12
33 [<ffffffff811fb0da>] selinux_inode_getsecurity+0x7d/0xa8
34 [<ffffffff811fb127>] selinux_inode_getsecctx+0x22/0x2e
35 [<ffffffff811f4d62>] security_inode_getsecctx+0x16/0x18
36 [<ffffffff81191dad>] sysfs_setxattr+0x96/0x117
37 [<ffffffff811542f0>] __vfs_setxattr_noperm+0x73/0xd9
38 [<ffffffff811543d9>] vfs_setxattr+0x83/0xa1
39 [<ffffffff811544c6>] setxattr+0xcf/0x101
40 [<ffffffff81154745>] sys_lsetxattr+0x6a/0x8f
41 [<ffffffff814efda9>] system_call_fastpath+0x16/0x1b
42 [<ffffffffffffffff>] 0xffffffffffffffff
43unreferenced object 0xffff88024163c5a0 (size 96):
44 comm "systemd", pid 1, jiffies 4294683888 (age 94.553s)
45 hex dump (first 32 bytes):
46 00 00 00 00 ed 41 00 00 00 00 00 00 00 00 00 00 .....A..........
47 00 00 00 00 00 00 00 00 0c 64 42 4f 00 00 00 00 .........dBO....
48 backtrace:
49 [<ffffffff814cb1d0>] kmemleak_alloc+0x73/0x98
50 [<ffffffff81127402>] kmem_cache_alloc_trace+0xc4/0xee
51 [<ffffffff81191cbe>] sysfs_init_inode_attrs+0x2a/0x83
52 [<ffffffff81191dd6>] sysfs_setxattr+0xbf/0x117
53 [<ffffffff811542f0>] __vfs_setxattr_noperm+0x73/0xd9
54 [<ffffffff811543d9>] vfs_setxattr+0x83/0xa1
55 [<ffffffff811544c6>] setxattr+0xcf/0x101
56 [<ffffffff81154745>] sys_lsetxattr+0x6a/0x8f
57 [<ffffffff814efda9>] system_call_fastpath+0x16/0x1b
58 [<ffffffffffffffff>] 0xffffffffffffffff
59`
60
61Signed-off-by: Masami Ichikawa <masami256@gmail.com>
62Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
63---
64 fs/sysfs/inode.c | 11 ++++++-----
65 1 file changed, 6 insertions(+), 5 deletions(-)
66
67diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
68index deb804b..9db61a4 100644
69--- a/fs/sysfs/inode.c
70+++ b/fs/sysfs/inode.c
71@@ -136,12 +136,13 @@ static int sysfs_sd_setsecdata(struct sysfs_dirent *sd, void **secdata, u32 *sec
72 void *old_secdata;
73 size_t old_secdata_len;
74
75- iattrs = sd->s_iattr;
76- if (!iattrs)
77- iattrs = sysfs_init_inode_attrs(sd);
78- if (!iattrs)
79- return -ENOMEM;
80+ if (!sd->s_iattr) {
81+ sd->s_iattr = sysfs_init_inode_attrs(sd);
82+ if (!sd->s_iattr)
83+ return -ENOMEM;
84+ }
85
86+ iattrs = sd->s_iattr;
87 old_secdata = iattrs->ia_secdata;
88 old_secdata_len = iattrs->ia_secdata_len;
89
90--
911.7.9.4
92
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0022-tty-moxa-fix-bit-test-in-moxa_start.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0022-tty-moxa-fix-bit-test-in-moxa_start.patch
new file mode 100644
index 00000000..201e2b14
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0022-tty-moxa-fix-bit-test-in-moxa_start.patch
@@ -0,0 +1,34 @@
1From 94f82d523fc497167379eb0624420a2bd535103d Mon Sep 17 00:00:00 2001
2From: Dan Carpenter <dan.carpenter@oracle.com>
3Date: Wed, 7 Mar 2012 13:05:00 +0300
4Subject: [PATCH 022/147] tty: moxa: fix bit test in moxa_start()
5
6commit 58112dfbfe02d803566a2c6c8bd97b5fa3c62cdc upstream.
7
8This is supposed to be doing a shift before the comparison instead of
9just doing a bitwise AND directly. The current code means the start()
10just returns without doing anything.
11
12Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
13Acked-by: Jiri Slaby <jslaby@suse.cz>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/tty/moxa.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
20index d15a071..0174d2d 100644
21--- a/drivers/tty/moxa.c
22+++ b/drivers/tty/moxa.c
23@@ -1331,7 +1331,7 @@ static void moxa_start(struct tty_struct *tty)
24 if (ch == NULL)
25 return;
26
27- if (!(ch->statusflags & TXSTOPPED))
28+ if (!test_bit(TXSTOPPED, &ch->statusflags))
29 return;
30
31 MoxaPortTxEnable(ch);
32--
331.7.9.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0023-TTY-Wrong-unicode-value-copied-in-con_set_unimap.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0023-TTY-Wrong-unicode-value-copied-in-con_set_unimap.patch
new file mode 100644
index 00000000..c688faaf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0023-TTY-Wrong-unicode-value-copied-in-con_set_unimap.patch
@@ -0,0 +1,119 @@
1From 7d00c6261eadb39ffffd02141aa566deda4d7cb3 Mon Sep 17 00:00:00 2001
2From: Liz Clark <liz.clark@hp.com>
3Date: Thu, 15 Mar 2012 10:33:29 -0700
4Subject: [PATCH 023/147] TTY: Wrong unicode value copied in con_set_unimap()
5
6commit 4a4c61b7ce26bfc9d49ea4bd121d52114bad9f99 upstream.
7
8Bugzilla 40012: PIO_UNIMAP bug: error updating Unicode-to-font map
9https://bugzilla.kernel.org/show_bug.cgi?id=40012
10
11The unicode font map for the virtual console is a 32x32x64 table which
12allocates rows dynamically as entries are added. The unicode value
13increases sequentially and should count all entries even in empty
14rows. The defect is when copying the unicode font map in con_set_unimap(),
15the unicode value is not incremented properly. The wrong unicode value
16is entered in the new font map.
17
18Signed-off-by: Liz Clark <liz.clark@hp.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/tty/vt/consolemap.c | 51 ++++++++++++++++++++++++++++++++++++-------
22 1 file changed, 43 insertions(+), 8 deletions(-)
23
24diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
25index 45d3e80..f343808 100644
26--- a/drivers/tty/vt/consolemap.c
27+++ b/drivers/tty/vt/consolemap.c
28@@ -516,6 +516,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
29 int err = 0, err1, i;
30 struct uni_pagedir *p, *q;
31
32+ /* Save original vc_unipagdir_loc in case we allocate a new one */
33 p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
34 if (p->readonly) return -EIO;
35
36@@ -528,26 +529,57 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
37 err1 = con_clear_unimap(vc, NULL);
38 if (err1) return err1;
39
40+ /*
41+ * Since refcount was > 1, con_clear_unimap() allocated a
42+ * a new uni_pagedir for this vc. Re: p != q
43+ */
44 q = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
45- for (i = 0, l = 0; i < 32; i++)
46+
47+ /*
48+ * uni_pgdir is a 32*32*64 table with rows allocated
49+ * when its first entry is added. The unicode value must
50+ * still be incremented for empty rows. We are copying
51+ * entries from "p" (old) to "q" (new).
52+ */
53+ l = 0; /* unicode value */
54+ for (i = 0; i < 32; i++)
55 if ((p1 = p->uni_pgdir[i]))
56 for (j = 0; j < 32; j++)
57- if ((p2 = p1[j]))
58+ if ((p2 = p1[j])) {
59 for (k = 0; k < 64; k++, l++)
60 if (p2[k] != 0xffff) {
61+ /*
62+ * Found one, copy entry for unicode
63+ * l with fontpos value p2[k].
64+ */
65 err1 = con_insert_unipair(q, l, p2[k]);
66 if (err1) {
67 p->refcount++;
68 *vc->vc_uni_pagedir_loc = (unsigned long)p;
69 con_release_unimap(q);
70 kfree(q);
71- return err1;
72+ return err1;
73 }
74- }
75- p = q;
76- } else if (p == dflt)
77+ }
78+ } else {
79+ /* Account for row of 64 empty entries */
80+ l += 64;
81+ }
82+ else
83+ /* Account for empty table */
84+ l += 32 * 64;
85+
86+ /*
87+ * Finished copying font table, set vc_uni_pagedir to new table
88+ */
89+ p = q;
90+ } else if (p == dflt) {
91 dflt = NULL;
92-
93+ }
94+
95+ /*
96+ * Insert user specified unicode pairs into new table.
97+ */
98 while (ct--) {
99 unsigned short unicode, fontpos;
100 __get_user(unicode, &list->unicode);
101@@ -557,11 +589,14 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
102 list++;
103 }
104
105+ /*
106+ * Merge with fontmaps of any other virtual consoles.
107+ */
108 if (con_unify_unimap(vc, p))
109 return err;
110
111 for (i = 0; i <= 3; i++)
112- set_inverse_transl(vc, p, i); /* Update all inverse translations */
113+ set_inverse_transl(vc, p, i); /* Update inverse translations */
114 set_inverse_trans_unicode(vc, p);
115
116 return err;
117--
1181.7.9.4
119
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0024-USB-serial-fix-console-error-reporting.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0024-USB-serial-fix-console-error-reporting.patch
new file mode 100644
index 00000000..3d057d3e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0024-USB-serial-fix-console-error-reporting.patch
@@ -0,0 +1,36 @@
1From 6a49ff9d91721997f9c625b79e70b9a37bfdf10f Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Fri, 10 Feb 2012 13:20:49 +0100
4Subject: [PATCH 024/147] USB: serial: fix console error reporting
5
6commit 548dd4b6da8a8e428453d55f7fa7b8a46498d147 upstream.
7
8Do not report errors in write path if port is used as a console as this
9may trigger the same error (and error report) resulting in a loop.
10
11Reported-by: Stephen Hemminger <shemminger@vyatta.com>
12Signed-off-by: Johan Hovold <jhovold@gmail.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/usb/serial/generic.c | 4 +++-
16 1 file changed, 3 insertions(+), 1 deletion(-)
17
18diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
19index e4db5ad..9f0b2bf 100644
20--- a/drivers/usb/serial/generic.c
21+++ b/drivers/usb/serial/generic.c
22@@ -215,8 +215,10 @@ retry:
23 clear_bit(i, &port->write_urbs_free);
24 result = usb_submit_urb(urb, GFP_ATOMIC);
25 if (result) {
26- dev_err(&port->dev, "%s - error submitting urb: %d\n",
27+ if (!port->port.console) {
28+ dev_err(&port->dev, "%s - error submitting urb: %d\n",
29 __func__, result);
30+ }
31 set_bit(i, &port->write_urbs_free);
32 spin_lock_irqsave(&port->lock, flags);
33 port->tx_bytes -= count;
34--
351.7.9.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0025-cdc-wdm-Fix-more-races-on-the-read-path.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0025-cdc-wdm-Fix-more-races-on-the-read-path.patch
new file mode 100644
index 00000000..8e2bd773
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0025-cdc-wdm-Fix-more-races-on-the-read-path.patch
@@ -0,0 +1,87 @@
1From 028d778c63336663590f673854c0e128e1b8fa34 Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Sun, 12 Feb 2012 06:00:41 +0000
4Subject: [PATCH 025/147] cdc-wdm: Fix more races on the read path
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 711c68b3c0f7a924ffbee4aa962d8f62b85188ff upstream.
10
11We must not allow the input buffer length to change while we're
12shuffling the buffer contents. We also mustn't clear the WDM_READ
13flag after more data might have arrived. Therefore move both of these
14into the spinlocked region at the bottom of wdm_read().
15
16When reading desc->length without holding the iuspin lock, use
17ACCESS_ONCE() to ensure the compiler doesn't re-read it with
18inconsistent results.
19
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21Tested-by: Bj??rn Mork <bjorn@mork.no>
22Cc: Oliver Neukum <oliver@neukum.org>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 drivers/usb/class/cdc-wdm.c | 16 +++++++++++-----
26 1 file changed, 11 insertions(+), 5 deletions(-)
27
28diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
29index fd4aee1..eb650b7 100644
30--- a/drivers/usb/class/cdc-wdm.c
31+++ b/drivers/usb/class/cdc-wdm.c
32@@ -397,7 +397,7 @@ outnl:
33 static ssize_t wdm_read
34 (struct file *file, char __user *buffer, size_t count, loff_t *ppos)
35 {
36- int rv, cntr = 0;
37+ int rv, cntr;
38 int i = 0;
39 struct wdm_device *desc = file->private_data;
40
41@@ -406,7 +406,8 @@ static ssize_t wdm_read
42 if (rv < 0)
43 return -ERESTARTSYS;
44
45- if (desc->length == 0) {
46+ cntr = ACCESS_ONCE(desc->length);
47+ if (cntr == 0) {
48 desc->read = 0;
49 retry:
50 if (test_bit(WDM_DISCONNECTING, &desc->flags)) {
51@@ -457,25 +458,30 @@ retry:
52 goto retry;
53 }
54 clear_bit(WDM_READ, &desc->flags);
55+ cntr = desc->length;
56 spin_unlock_irq(&desc->iuspin);
57 }
58
59- cntr = count > desc->length ? desc->length : count;
60+ if (cntr > count)
61+ cntr = count;
62 rv = copy_to_user(buffer, desc->ubuf, cntr);
63 if (rv > 0) {
64 rv = -EFAULT;
65 goto err;
66 }
67
68+ spin_lock_irq(&desc->iuspin);
69+
70 for (i = 0; i < desc->length - cntr; i++)
71 desc->ubuf[i] = desc->ubuf[i + cntr];
72
73- spin_lock_irq(&desc->iuspin);
74 desc->length -= cntr;
75- spin_unlock_irq(&desc->iuspin);
76 /* in case we had outstanding data */
77 if (!desc->length)
78 clear_bit(WDM_READ, &desc->flags);
79+
80+ spin_unlock_irq(&desc->iuspin);
81+
82 rv = cntr;
83
84 err:
85--
861.7.9.4
87
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0026-cdc-wdm-Don-t-clear-WDM_READ-unless-entire-read-buff.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0026-cdc-wdm-Don-t-clear-WDM_READ-unless-entire-read-buff.patch
new file mode 100644
index 00000000..21eb3c98
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0026-cdc-wdm-Don-t-clear-WDM_READ-unless-entire-read-buff.patch
@@ -0,0 +1,36 @@
1From 77094c1a611d4c874a2903e9a702d35a4f5a6be9 Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Sun, 12 Feb 2012 06:02:43 +0000
4Subject: [PATCH 026/147] cdc-wdm: Don't clear WDM_READ unless entire read
5 buffer is emptied
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit b7a205545345578712611106b371538992e142ff upstream.
11
12The WDM_READ flag is cleared later iff desc->length is reduced to 0.
13
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15Tested-by: Bj??rn Mork <bjorn@mork.no>
16Cc: Oliver Neukum <oliver@neukum.org>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 drivers/usb/class/cdc-wdm.c | 1 -
20 1 file changed, 1 deletion(-)
21
22diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
23index eb650b7..9eb71d8 100644
24--- a/drivers/usb/class/cdc-wdm.c
25+++ b/drivers/usb/class/cdc-wdm.c
26@@ -457,7 +457,6 @@ retry:
27 spin_unlock_irq(&desc->iuspin);
28 goto retry;
29 }
30- clear_bit(WDM_READ, &desc->flags);
31 cntr = desc->length;
32 spin_unlock_irq(&desc->iuspin);
33 }
34--
351.7.9.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0027-usb-fsl_udc_core-Fix-scheduling-while-atomic-dump-me.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0027-usb-fsl_udc_core-Fix-scheduling-while-atomic-dump-me.patch
new file mode 100644
index 00000000..b2cc8cc8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0027-usb-fsl_udc_core-Fix-scheduling-while-atomic-dump-me.patch
@@ -0,0 +1,134 @@
1From 0e5ef14de4874bc31ca8ab4bd1759ead8151950e Mon Sep 17 00:00:00 2001
2From: Peter Chen <peter.chen@freescale.com>
3Date: Thu, 16 Feb 2012 09:36:25 +0800
4Subject: [PATCH 027/147] usb: fsl_udc_core: Fix scheduling while atomic dump
5 message
6
7commit c5cc5ed86667d4ae74fe40ee4ed893f4b46aba05 upstream.
8
9When loading g_ether gadget, there is below message:
10
11Backtrace:
12[<80012248>] (dump_backtrace+0x0/0x10c) from [<803cb42c>] (dump_stack+0x18/0x1c)
13r7:00000000 r6:80512000 r5:8052bef8 r4:80513f30
14[<803cb414>] (dump_stack+0x0/0x1c) from [<8000feb4>] (show_regs+0x44/0x50)
15[<8000fe70>] (show_regs+0x0/0x50) from [<8004c840>] (__schedule_bug+0x68/0x84)
16r5:8052bef8 r4:80513f30
17[<8004c7d8>] (__schedule_bug+0x0/0x84) from [<803cd0e4>] (__schedule+0x4b0/0x528)
18r5:8052bef8 r4:809aad00
19[<803ccc34>] (__schedule+0x0/0x528) from [<803cd214>] (_cond_resched+0x44/0x58)
20[<803cd1d0>] (_cond_resched+0x0/0x58) from [<800a9488>] (dma_pool_alloc+0x184/0x250)
21 r5:9f9b4000 r4:9fb4fb80
22 [<800a9304>] (dma_pool_alloc+0x0/0x250) from [<802a8ad8>] (fsl_req_to_dtd+0xac/0x180)
23[<802a8a2c>] (fsl_req_to_dtd+0x0/0x180) from [<802a8ce4>] (fsl_ep_queue+0x138/0x274)
24[<802a8bac>] (fsl_ep_queue+0x0/0x274) from [<7f004328>] (composite_setup+0x2d4/0xfac [g_ether])
25[<7f004054>] (composite_setup+0x0/0xfac [g_ether]) from [<802a9bb4>] (fsl_udc_irq+0x8dc/0xd38)
26[<802a92d8>] (fsl_udc_irq+0x0/0xd38) from [<800704f8>] (handle_irq_event_percpu+0x54/0x188)
27[<800704a4>] (handle_irq_event_percpu+0x0/0x188) from [<80070674>] (handle_irq_event+0x48/0x68)
28[<8007062c>] (handle_irq_event+0x0/0x68) from [<800738ec>] (handle_level_irq+0xb4/0x138)
29 r5:80514f94 r4:80514f40
30 [<80073838>] (handle_level_irq+0x0/0x138) from [<8006ffa4>] (generic_handle_irq+0x38/0x44)
31 r7:00000012 r6:80510b1c r5:80529860 r4:80512000
32 [<8006ff6c>] (generic_handle_irq+0x0/0x44) from [<8000f4c4>] (handle_IRQ+0x54/0xb4)
33[<8000f470>] (handle_IRQ+0x0/0xb4) from [<800085b8>] (tzic_handle_irq+0x64/0x94)
34 r9:412fc085 r8:00000000 r7:80513f30 r6:00000001 r5:00000000
35 r4:00000000
36 [<80008554>] (tzic_handle_irq+0x0/0x94) from [<8000e680>] (__irq_svc+0x40/0x60)
37
38The reason of above dump message is calling dma_poll_alloc with can-schedule
39mem_flags at atomic context.
40
41To fix this problem, below changes are made:
42- fsl_req_to_dtd doesn't need to be protected by spin_lock_irqsave,
43as struct usb_request can be access at process context. Move lock
44to beginning of hardware visit (fsl_queue_td).
45- Change the memory flag which using to allocate dTD descriptor buffer,
46the memory flag can be from gadget layer.
47
48It is tested at i.mx51 bbg board with g_mass_storage, g_ether, g_serial.
49
50Signed-off-by: Peter Chen <peter.chen@freescale.com>
51Acked-by: Li Yang <leoli@freescale.com>
52Signed-off-by: Felipe Balbi <balbi@ti.com>
53Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
54---
55 drivers/usb/gadget/fsl_udc_core.c | 18 ++++++++----------
56 1 file changed, 8 insertions(+), 10 deletions(-)
57
58diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
59index d7ea6c0..9085d14 100644
60--- a/drivers/usb/gadget/fsl_udc_core.c
61+++ b/drivers/usb/gadget/fsl_udc_core.c
62@@ -768,7 +768,7 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
63 * @is_last: return flag if it is the last dTD of the request
64 * return: pointer to the built dTD */
65 static struct ep_td_struct *fsl_build_dtd(struct fsl_req *req, unsigned *length,
66- dma_addr_t *dma, int *is_last)
67+ dma_addr_t *dma, int *is_last, gfp_t gfp_flags)
68 {
69 u32 swap_temp;
70 struct ep_td_struct *dtd;
71@@ -777,7 +777,7 @@ static struct ep_td_struct *fsl_build_dtd(struct fsl_req *req, unsigned *length,
72 *length = min(req->req.length - req->req.actual,
73 (unsigned)EP_MAX_LENGTH_TRANSFER);
74
75- dtd = dma_pool_alloc(udc_controller->td_pool, GFP_KERNEL, dma);
76+ dtd = dma_pool_alloc(udc_controller->td_pool, gfp_flags, dma);
77 if (dtd == NULL)
78 return dtd;
79
80@@ -827,7 +827,7 @@ static struct ep_td_struct *fsl_build_dtd(struct fsl_req *req, unsigned *length,
81 }
82
83 /* Generate dtd chain for a request */
84-static int fsl_req_to_dtd(struct fsl_req *req)
85+static int fsl_req_to_dtd(struct fsl_req *req, gfp_t gfp_flags)
86 {
87 unsigned count;
88 int is_last;
89@@ -836,7 +836,7 @@ static int fsl_req_to_dtd(struct fsl_req *req)
90 dma_addr_t dma;
91
92 do {
93- dtd = fsl_build_dtd(req, &count, &dma, &is_last);
94+ dtd = fsl_build_dtd(req, &count, &dma, &is_last, gfp_flags);
95 if (dtd == NULL)
96 return -ENOMEM;
97
98@@ -910,13 +910,11 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
99 req->req.actual = 0;
100 req->dtd_count = 0;
101
102- spin_lock_irqsave(&udc->lock, flags);
103-
104 /* build dtds and push them to device queue */
105- if (!fsl_req_to_dtd(req)) {
106+ if (!fsl_req_to_dtd(req, gfp_flags)) {
107+ spin_lock_irqsave(&udc->lock, flags);
108 fsl_queue_td(ep, req);
109 } else {
110- spin_unlock_irqrestore(&udc->lock, flags);
111 return -ENOMEM;
112 }
113
114@@ -1295,7 +1293,7 @@ static int ep0_prime_status(struct fsl_udc *udc, int direction)
115 ep_is_in(ep) ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
116 req->mapped = 1;
117
118- if (fsl_req_to_dtd(req) == 0)
119+ if (fsl_req_to_dtd(req, GFP_ATOMIC) == 0)
120 fsl_queue_td(ep, req);
121 else
122 return -ENOMEM;
123@@ -1379,7 +1377,7 @@ static void ch9getstatus(struct fsl_udc *udc, u8 request_type, u16 value,
124 req->mapped = 1;
125
126 /* prime the data phase */
127- if ((fsl_req_to_dtd(req) == 0))
128+ if ((fsl_req_to_dtd(req, GFP_ATOMIC) == 0))
129 fsl_queue_td(ep, req);
130 else /* no mem */
131 goto stall;
132--
1331.7.9.4
134
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0028-usb-Fix-build-error-due-to-dma_mask-is-not-at-pdev_a.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0028-usb-Fix-build-error-due-to-dma_mask-is-not-at-pdev_a.patch
new file mode 100644
index 00000000..2010a380
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0028-usb-Fix-build-error-due-to-dma_mask-is-not-at-pdev_a.patch
@@ -0,0 +1,49 @@
1From 14449b27e92835504278ce397b02ca2b183cbd31 Mon Sep 17 00:00:00 2001
2From: Peter Chen <peter.chen@freescale.com>
3Date: Thu, 16 Feb 2012 09:41:52 +0800
4Subject: [PATCH 028/147] usb: Fix build error due to dma_mask is not at
5 pdev_archdata at ARM
6
7commit e90fc3cb087ce5c5f81e814358222cd6d197b5db upstream.
8
9When build i.mx platform with imx_v6_v7_defconfig, and after adding
10USB Gadget support, it has below build error:
11
12CC drivers/usb/host/fsl-mph-dr-of.o
13drivers/usb/host/fsl-mph-dr-of.c: In function 'fsl_usb2_device_register':
14drivers/usb/host/fsl-mph-dr-of.c:97: error: 'struct pdev_archdata'
15has no member named 'dma_mask'
16
17It has discussed at: http://www.spinics.net/lists/linux-usb/msg57302.html
18
19For PowerPC, there is dma_mask at struct pdev_archdata, but there is
20no dma_mask at struct pdev_archdata for ARM. The pdev_archdata is
21related to specific platform, it should NOT be accessed by
22cross platform drivers, like USB.
23
24The code for pdev_archdata should be useless, as for PowerPC,
25it has already gotten the value for pdev->dev.dma_mask at function
26arch_setup_pdev_archdata of arch/powerpc/kernel/setup-common.c.
27
28Tested-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
29Signed-off-by: Peter Chen <peter.chen@freescale.com>
30Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31---
32 drivers/usb/host/fsl-mph-dr-of.c | 1 -
33 1 file changed, 1 deletion(-)
34
35diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
36index 9037035..5a42cf0 100644
37--- a/drivers/usb/host/fsl-mph-dr-of.c
38+++ b/drivers/usb/host/fsl-mph-dr-of.c
39@@ -94,7 +94,6 @@ struct platform_device * __devinit fsl_usb2_device_register(
40 pdev->dev.parent = &ofdev->dev;
41
42 pdev->dev.coherent_dma_mask = ofdev->dev.coherent_dma_mask;
43- pdev->dev.dma_mask = &pdev->archdata.dma_mask;
44 *pdev->dev.dma_mask = *ofdev->dev.dma_mask;
45
46 retval = platform_device_add_data(pdev, pdata, sizeof(*pdata));
47--
481.7.9.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0029-USB-ums_realtek-do-not-use-stack-memory-for-DMA-in-_.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0029-USB-ums_realtek-do-not-use-stack-memory-for-DMA-in-_.patch
new file mode 100644
index 00000000..f14cf503
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0029-USB-ums_realtek-do-not-use-stack-memory-for-DMA-in-_.patch
@@ -0,0 +1,51 @@
1From 1ae819c56089722e15e3fe2d84125e4f5aa32d4e Mon Sep 17 00:00:00 2001
2From: Josh Boyer <jwboyer@redhat.com>
3Date: Mon, 20 Feb 2012 15:34:34 -0500
4Subject: [PATCH 029/147] USB: ums_realtek: do not use stack memory for DMA in
5 __do_config_autodelink
6
7commit 4898e07174b79013afd2b422ef6c4336ef8e6783 upstream.
8
9__do_config_autodelink passes the data variable to the transport function.
10If the calling functions pass a stack variable, this will eventually trigger
11a DMA-API debug backtrace for mapping stack memory in the DMA buffer. Fix
12this by calling kmemdup for the passed data instead.
13
14Signed-off-by: Josh Boyer <jwboyer@redhat.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/usb/storage/realtek_cr.c | 8 +++++++-
18 1 file changed, 7 insertions(+), 1 deletion(-)
19
20diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c
21index 32c93d7..e39b188 100644
22--- a/drivers/usb/storage/realtek_cr.c
23+++ b/drivers/usb/storage/realtek_cr.c
24@@ -509,9 +509,14 @@ static int __do_config_autodelink(struct us_data *us, u8 *data, u16 len)
25 int retval;
26 u16 addr = 0xFE47;
27 u8 cmnd[12] = {0};
28+ u8 *buf;
29
30 US_DEBUGP("%s, addr = 0x%x, len = %d\n", __FUNCTION__, addr, len);
31
32+ buf = kmemdup(data, len, GFP_NOIO);
33+ if (!buf)
34+ return USB_STOR_TRANSPORT_ERROR;
35+
36 cmnd[0] = 0xF0;
37 cmnd[1] = 0x0E;
38 cmnd[2] = (u8)(addr >> 8);
39@@ -519,7 +524,8 @@ static int __do_config_autodelink(struct us_data *us, u8 *data, u16 len)
40 cmnd[4] = (u8)(len >> 8);
41 cmnd[5] = (u8)len;
42
43- retval = rts51x_bulk_transport_special(us, 0, cmnd, 12, data, len, DMA_TO_DEVICE, NULL);
44+ retval = rts51x_bulk_transport_special(us, 0, cmnd, 12, buf, len, DMA_TO_DEVICE, NULL);
45+ kfree(buf);
46 if (retval != USB_STOR_TRANSPORT_GOOD) {
47 return -EIO;
48 }
49--
501.7.9.4
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0030-USB-qcserial-add-several-new-serial-devices.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0030-USB-qcserial-add-several-new-serial-devices.patch
new file mode 100644
index 00000000..15bcffc3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0030-USB-qcserial-add-several-new-serial-devices.patch
@@ -0,0 +1,49 @@
1From e3ed8846e20e35e9a94c80270d72b20befec0859 Mon Sep 17 00:00:00 2001
2From: Thomas Tuttle <ttuttle@chromium.org>
3Date: Wed, 1 Feb 2012 16:07:17 -0500
4Subject: [PATCH 030/147] USB: qcserial: add several new serial devices
5
6commit 2db4d87070e87d198ab630e66a898b45eff316d9 upstream.
7
8Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
9Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
10---
11 drivers/usb/serial/qcserial.c | 14 ++++++++++++++
12 1 file changed, 14 insertions(+)
13
14diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
15index aa9367f..1e87d49 100644
16--- a/drivers/usb/serial/qcserial.c
17+++ b/drivers/usb/serial/qcserial.c
18@@ -36,6 +36,11 @@ static const struct usb_device_id id_table[] = {
19 {USB_DEVICE(0x413c, 0x8171)}, /* Dell Gobi QDL device */
20 {USB_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
21 {USB_DEVICE(0x1410, 0xa008)}, /* Novatel Gobi QDL device */
22+ {USB_DEVICE(0x1410, 0xa010)}, /* Novatel Gobi QDL device */
23+ {USB_DEVICE(0x1410, 0xa011)}, /* Novatel Gobi QDL device */
24+ {USB_DEVICE(0x1410, 0xa012)}, /* Novatel Gobi QDL device */
25+ {USB_DEVICE(0x1410, 0xa013)}, /* Novatel Gobi QDL device */
26+ {USB_DEVICE(0x1410, 0xa014)}, /* Novatel Gobi QDL device */
27 {USB_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
28 {USB_DEVICE(0x0b05, 0x1774)}, /* Asus Gobi QDL device */
29 {USB_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
30@@ -86,7 +91,16 @@ static const struct usb_device_id id_table[] = {
31 {USB_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */
32 {USB_DEVICE(0x05c6, 0x9204)}, /* Gobi 2000 QDL device */
33 {USB_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */
34+
35+ {USB_DEVICE(0x05c6, 0x920c)}, /* Gobi 3000 QDL */
36+ {USB_DEVICE(0x05c6, 0x920d)}, /* Gobi 3000 Composite */
37+ {USB_DEVICE(0x1410, 0xa020)}, /* Novatel Gobi 3000 QDL */
38+ {USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */
39+ {USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */
40+ {USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */
41 {USB_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */
42+ {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */
43+ {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */
44 { } /* Terminating entry */
45 };
46 MODULE_DEVICE_TABLE(usb, id_table);
47--
481.7.9.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0031-USB-qcserial-don-t-grab-QMI-port-on-Gobi-1000-device.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0031-USB-qcserial-don-t-grab-QMI-port-on-Gobi-1000-device.patch
new file mode 100644
index 00000000..55df1d5a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0031-USB-qcserial-don-t-grab-QMI-port-on-Gobi-1000-device.patch
@@ -0,0 +1,177 @@
1From 8544c3691b838f3377a752b88365bb522eb04b72 Mon Sep 17 00:00:00 2001
2From: Dan Williams <dcbw@redhat.com>
3Date: Fri, 24 Feb 2012 13:08:43 -0600
4Subject: [PATCH 031/147] USB: qcserial: don't grab QMI port on Gobi 1000
5 devices
6
7commit c192c8e71a2ded01170c1a992cd21aaedc822756 upstream.
8
9Gobi 1000 devices have a different port layout, which wasn't respected
10by the current driver, and thus it grabbed the QMI/net port. In the
11near future we'll be attaching another driver to the QMI/net port for
12these devices (cdc-wdm and qmi_wwan) so make sure the qcserial driver
13doesn't claim them. This patch also prevents qcserial from binding to
14interfaces 0 and 1 on 1K devices because those interfaces do not
15respond.
16
17Signed-off-by: Dan Williams <dcbw@redhat.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/usb/serial/qcserial.c | 105 ++++++++++++++++++++++++-----------------
21 1 file changed, 62 insertions(+), 43 deletions(-)
22
23diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
24index 1e87d49..3187d8b 100644
25--- a/drivers/usb/serial/qcserial.c
26+++ b/drivers/usb/serial/qcserial.c
27@@ -24,39 +24,44 @@
28
29 static int debug;
30
31+#define DEVICE_G1K(v, p) \
32+ USB_DEVICE(v, p), .driver_info = 1
33+
34 static const struct usb_device_id id_table[] = {
35- {USB_DEVICE(0x05c6, 0x9211)}, /* Acer Gobi QDL device */
36- {USB_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
37- {USB_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
38- {USB_DEVICE(0x03f0, 0x201d)}, /* HP un2400 Gobi QDL Device */
39- {USB_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
40- {USB_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
41- {USB_DEVICE(0x04da, 0x250c)}, /* Panasonic Gobi QDL device */
42- {USB_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
43- {USB_DEVICE(0x413c, 0x8171)}, /* Dell Gobi QDL device */
44- {USB_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
45- {USB_DEVICE(0x1410, 0xa008)}, /* Novatel Gobi QDL device */
46- {USB_DEVICE(0x1410, 0xa010)}, /* Novatel Gobi QDL device */
47- {USB_DEVICE(0x1410, 0xa011)}, /* Novatel Gobi QDL device */
48- {USB_DEVICE(0x1410, 0xa012)}, /* Novatel Gobi QDL device */
49- {USB_DEVICE(0x1410, 0xa013)}, /* Novatel Gobi QDL device */
50- {USB_DEVICE(0x1410, 0xa014)}, /* Novatel Gobi QDL device */
51- {USB_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
52- {USB_DEVICE(0x0b05, 0x1774)}, /* Asus Gobi QDL device */
53- {USB_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
54- {USB_DEVICE(0x19d2, 0xfff2)}, /* ONDA Gobi QDL device */
55- {USB_DEVICE(0x1557, 0x0a80)}, /* OQO Gobi QDL device */
56- {USB_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
57- {USB_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
58- {USB_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
59- {USB_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
60- {USB_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
61- {USB_DEVICE(0x05c6, 0x9008)}, /* Generic Gobi QDL device */
62- {USB_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
63- {USB_DEVICE(0x05c6, 0x9201)}, /* Generic Gobi QDL device */
64- {USB_DEVICE(0x05c6, 0x9221)}, /* Generic Gobi QDL device */
65- {USB_DEVICE(0x05c6, 0x9231)}, /* Generic Gobi QDL device */
66- {USB_DEVICE(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */
67+ /* Gobi 1000 devices */
68+ {DEVICE_G1K(0x05c6, 0x9211)}, /* Acer Gobi QDL device */
69+ {DEVICE_G1K(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
70+ {DEVICE_G1K(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
71+ {DEVICE_G1K(0x03f0, 0x201d)}, /* HP un2400 Gobi QDL Device */
72+ {DEVICE_G1K(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
73+ {DEVICE_G1K(0x04da, 0x250c)}, /* Panasonic Gobi QDL device */
74+ {DEVICE_G1K(0x413c, 0x8172)}, /* Dell Gobi Modem device */
75+ {DEVICE_G1K(0x413c, 0x8171)}, /* Dell Gobi QDL device */
76+ {DEVICE_G1K(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
77+ {DEVICE_G1K(0x1410, 0xa008)}, /* Novatel Gobi QDL device */
78+ {DEVICE_G1K(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
79+ {DEVICE_G1K(0x0b05, 0x1774)}, /* Asus Gobi QDL device */
80+ {DEVICE_G1K(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
81+ {DEVICE_G1K(0x19d2, 0xfff2)}, /* ONDA Gobi QDL device */
82+ {DEVICE_G1K(0x1557, 0x0a80)}, /* OQO Gobi QDL device */
83+ {DEVICE_G1K(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
84+ {DEVICE_G1K(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
85+ {DEVICE_G1K(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
86+ {DEVICE_G1K(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
87+ {DEVICE_G1K(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
88+ {DEVICE_G1K(0x05c6, 0x9008)}, /* Generic Gobi QDL device */
89+ {DEVICE_G1K(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
90+ {DEVICE_G1K(0x05c6, 0x9201)}, /* Generic Gobi QDL device */
91+ {DEVICE_G1K(0x05c6, 0x9221)}, /* Generic Gobi QDL device */
92+ {DEVICE_G1K(0x05c6, 0x9231)}, /* Generic Gobi QDL device */
93+ {DEVICE_G1K(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */
94+
95+ /* Gobi 2000 devices */
96+ {USB_DEVICE(0x1410, 0xa010)}, /* Novatel Gobi 2000 QDL device */
97+ {USB_DEVICE(0x1410, 0xa011)}, /* Novatel Gobi 2000 QDL device */
98+ {USB_DEVICE(0x1410, 0xa012)}, /* Novatel Gobi 2000 QDL device */
99+ {USB_DEVICE(0x1410, 0xa013)}, /* Novatel Gobi 2000 QDL device */
100+ {USB_DEVICE(0x1410, 0xa014)}, /* Novatel Gobi 2000 QDL device */
101 {USB_DEVICE(0x413c, 0x8185)}, /* Dell Gobi 2000 QDL device (N0218, VU936) */
102 {USB_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
103 {USB_DEVICE(0x05c6, 0x9208)}, /* Generic Gobi 2000 QDL device */
104@@ -92,6 +97,8 @@ static const struct usb_device_id id_table[] = {
105 {USB_DEVICE(0x05c6, 0x9204)}, /* Gobi 2000 QDL device */
106 {USB_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */
107
108+ /* Gobi 3000 devices */
109+ {USB_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Gobi 3000 QDL */
110 {USB_DEVICE(0x05c6, 0x920c)}, /* Gobi 3000 QDL */
111 {USB_DEVICE(0x05c6, 0x920d)}, /* Gobi 3000 Composite */
112 {USB_DEVICE(0x1410, 0xa020)}, /* Novatel Gobi 3000 QDL */
113@@ -122,8 +129,10 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
114 int retval = -ENODEV;
115 __u8 nintf;
116 __u8 ifnum;
117+ bool is_gobi1k = id->driver_info ? true : false;
118
119 dbg("%s", __func__);
120+ dbg("Is Gobi 1000 = %d", is_gobi1k);
121
122 nintf = serial->dev->actconfig->desc.bNumInterfaces;
123 dbg("Num Interfaces = %d", nintf);
124@@ -171,15 +180,25 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
125
126 case 3:
127 case 4:
128- /* Composite mode */
129- /* ifnum == 0 is a broadband network adapter */
130- if (ifnum == 1) {
131- /*
132- * Diagnostics Monitor (serial line 9600 8N1)
133- * Qualcomm DM protocol
134- * use "libqcdm" (ModemManager) for communication
135- */
136- dbg("Diagnostics Monitor found");
137+ /* Composite mode; don't bind to the QMI/net interface as that
138+ * gets handled by other drivers.
139+ */
140+
141+ /* Gobi 1K USB layout:
142+ * 0: serial port (doesn't respond)
143+ * 1: serial port (doesn't respond)
144+ * 2: AT-capable modem port
145+ * 3: QMI/net
146+ *
147+ * Gobi 2K+ USB layout:
148+ * 0: QMI/net
149+ * 1: DM/DIAG (use libqcdm from ModemManager for communication)
150+ * 2: AT-capable modem port
151+ * 3: NMEA
152+ */
153+
154+ if (ifnum == 1 && !is_gobi1k) {
155+ dbg("Gobi 2K+ DM/DIAG interface found");
156 retval = usb_set_interface(serial->dev, ifnum, 0);
157 if (retval < 0) {
158 dev_err(&serial->dev->dev,
159@@ -198,13 +217,13 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
160 retval = -ENODEV;
161 kfree(data);
162 }
163- } else if (ifnum==3) {
164+ } else if (ifnum==3 && !is_gobi1k) {
165 /*
166 * NMEA (serial line 9600 8N1)
167 * # echo "\$GPS_START" > /dev/ttyUSBx
168 * # echo "\$GPS_STOP" > /dev/ttyUSBx
169 */
170- dbg("NMEA GPS interface found");
171+ dbg("Gobi 2K+ NMEA GPS interface found");
172 retval = usb_set_interface(serial->dev, ifnum, 0);
173 if (retval < 0) {
174 dev_err(&serial->dev->dev,
175--
1761.7.9.4
177
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0032-usb-serial-Add-support-for-the-Sealevel-SeaLINK-8-20.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0032-usb-serial-Add-support-for-the-Sealevel-SeaLINK-8-20.patch
new file mode 100644
index 00000000..f1e4d7fd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0032-usb-serial-Add-support-for-the-Sealevel-SeaLINK-8-20.patch
@@ -0,0 +1,51 @@
1From 94b027170f277f8d39aa3e6b2fe0ec2d01ad90f9 Mon Sep 17 00:00:00 2001
2From: Scott Dial <scott.dial@scientiallc.com>
3Date: Fri, 24 Feb 2012 19:04:09 -0500
4Subject: [PATCH 032/147] usb-serial: Add support for the Sealevel SeaLINK+8
5 2038-ROHS device
6
7commit 6d161b99f875269ad4ffa44375e1e54bca6fd02e upstream.
8
9This patch adds new device IDs to the ftdi_sio module to support
10the new Sealevel SeaLINK+8 2038-ROHS device.
11
12Signed-off-by: Scott Dial <scott.dial@scientiallc.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/usb/serial/ftdi_sio.c | 4 ++++
16 drivers/usb/serial/ftdi_sio_ids.h | 4 ++++
17 2 files changed, 8 insertions(+)
18
19diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
20index 3f3ccf6..f2c9ef7 100644
21--- a/drivers/usb/serial/ftdi_sio.c
22+++ b/drivers/usb/serial/ftdi_sio.c
23@@ -537,6 +537,10 @@ static struct usb_device_id id_table_combined [] = {
24 { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_6_PID) },
25 { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_7_PID) },
26 { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_8_PID) },
27+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803R_1_PID) },
28+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803R_2_PID) },
29+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803R_3_PID) },
30+ { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803R_4_PID) },
31 { USB_DEVICE(IDTECH_VID, IDTECH_IDT1221U_PID) },
32 { USB_DEVICE(OCT_VID, OCT_US101_PID) },
33 { USB_DEVICE(OCT_VID, OCT_DK201_PID) },
34diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
35index abf6bbc..c6dd18e 100644
36--- a/drivers/usb/serial/ftdi_sio_ids.h
37+++ b/drivers/usb/serial/ftdi_sio_ids.h
38@@ -689,6 +689,10 @@
39 #define SEALEVEL_2803_6_PID 0X2863 /* SeaLINK+8 (2803) Port 6 */
40 #define SEALEVEL_2803_7_PID 0X2873 /* SeaLINK+8 (2803) Port 7 */
41 #define SEALEVEL_2803_8_PID 0X2883 /* SeaLINK+8 (2803) Port 8 */
42+#define SEALEVEL_2803R_1_PID 0Xa02a /* SeaLINK+8 (2803-ROHS) Port 1+2 */
43+#define SEALEVEL_2803R_2_PID 0Xa02b /* SeaLINK+8 (2803-ROHS) Port 3+4 */
44+#define SEALEVEL_2803R_3_PID 0Xa02c /* SeaLINK+8 (2803-ROHS) Port 5+6 */
45+#define SEALEVEL_2803R_4_PID 0Xa02d /* SeaLINK+8 (2803-ROHS) Port 7+8 */
46
47 /*
48 * JETI SPECTROMETER SPECBOS 1201
49--
501.7.9.4
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0033-usb-cp210x-Update-to-support-CP2105-and-multiple-int.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0033-usb-cp210x-Update-to-support-CP2105-and-multiple-int.patch
new file mode 100644
index 00000000..4d50b8d9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0033-usb-cp210x-Update-to-support-CP2105-and-multiple-int.patch
@@ -0,0 +1,155 @@
1From 4d2e98ccb5f7c69868760e889389c5ba01a89bf5 Mon Sep 17 00:00:00 2001
2From: Preston Fick <preston.fick@silabs.com>
3Date: Fri, 24 Feb 2012 13:42:39 -0600
4Subject: [PATCH 033/147] usb: cp210x: Update to support CP2105 and multiple
5 interface devices
6
7commit a5360a53a7ccad5ed9ccef210b94fef13c6e5529 upstream.
8
9This patch updates the cp210x driver to support CP210x multiple
10interface devices devices from Silicon Labs. The existing driver
11always sends control requests to interface 0, which is hardcoded in
12the usb_control_msg function calls. This only allows for single
13interface devices to be used, and causes a bug when using ports on an
14interface other than 0 in the multiple interface devices.
15
16Here are the changes included in this patch:
17- Updated the device list to contain the Silicon Labs factory default
18 VID/PID for multiple interface CP210x devices
19- Created a cp210x_port_private struct created for each port on
20 startup, this struct holds the interface number
21- Added a cp210x_release function to clean up the cp210x_port_private
22 memory created on startup
23- Modified usb_get_config and usb_set_config to get a pointer to the
24 cp210x_port_private struct, and use the interface number there in the
25 usb_control_message wIndex param
26
27Signed-off-by: Preston Fick <preston.fick@silabs.com>
28Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29---
30 drivers/usb/serial/cp210x.c | 44 ++++++++++++++++++++++++++++++++++++++++---
31 1 file changed, 41 insertions(+), 3 deletions(-)
32
33diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
34index 33d25d4..4c12404 100644
35--- a/drivers/usb/serial/cp210x.c
36+++ b/drivers/usb/serial/cp210x.c
37@@ -49,6 +49,7 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port,
38 unsigned int, unsigned int);
39 static void cp210x_break_ctl(struct tty_struct *, int);
40 static int cp210x_startup(struct usb_serial *);
41+static void cp210x_release(struct usb_serial *);
42 static void cp210x_dtr_rts(struct usb_serial_port *p, int on);
43
44 static int debug;
45@@ -121,6 +122,8 @@ static const struct usb_device_id id_table[] = {
46 { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */
47 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
48 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
49+ { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
50+ { USB_DEVICE(0x10C4, 0xEA80) }, /* Silicon Labs factory default */
51 { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */
52 { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */
53 { USB_DEVICE(0x10C4, 0xF002) }, /* Elan Digital Systems USBwave12 */
54@@ -149,6 +152,10 @@ static const struct usb_device_id id_table[] = {
55
56 MODULE_DEVICE_TABLE(usb, id_table);
57
58+struct cp210x_port_private {
59+ __u8 bInterfaceNumber;
60+};
61+
62 static struct usb_driver cp210x_driver = {
63 .name = "cp210x",
64 .probe = usb_serial_probe,
65@@ -174,6 +181,7 @@ static struct usb_serial_driver cp210x_device = {
66 .tiocmget = cp210x_tiocmget,
67 .tiocmset = cp210x_tiocmset,
68 .attach = cp210x_startup,
69+ .release = cp210x_release,
70 .dtr_rts = cp210x_dtr_rts
71 };
72
73@@ -261,6 +269,7 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,
74 unsigned int *data, int size)
75 {
76 struct usb_serial *serial = port->serial;
77+ struct cp210x_port_private *port_priv = usb_get_serial_port_data(port);
78 __le32 *buf;
79 int result, i, length;
80
81@@ -276,7 +285,7 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,
82 /* Issue the request, attempting to read 'size' bytes */
83 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
84 request, REQTYPE_DEVICE_TO_HOST, 0x0000,
85- 0, buf, size, 300);
86+ port_priv->bInterfaceNumber, buf, size, 300);
87
88 /* Convert data into an array of integers */
89 for (i = 0; i < length; i++)
90@@ -304,6 +313,7 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,
91 unsigned int *data, int size)
92 {
93 struct usb_serial *serial = port->serial;
94+ struct cp210x_port_private *port_priv = usb_get_serial_port_data(port);
95 __le32 *buf;
96 int result, i, length;
97
98@@ -325,12 +335,12 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,
99 result = usb_control_msg(serial->dev,
100 usb_sndctrlpipe(serial->dev, 0),
101 request, REQTYPE_HOST_TO_DEVICE, 0x0000,
102- 0, buf, size, 300);
103+ port_priv->bInterfaceNumber, buf, size, 300);
104 } else {
105 result = usb_control_msg(serial->dev,
106 usb_sndctrlpipe(serial->dev, 0),
107 request, REQTYPE_HOST_TO_DEVICE, data[0],
108- 0, NULL, 0, 300);
109+ port_priv->bInterfaceNumber, NULL, 0, 300);
110 }
111
112 kfree(buf);
113@@ -830,11 +840,39 @@ static void cp210x_break_ctl (struct tty_struct *tty, int break_state)
114
115 static int cp210x_startup(struct usb_serial *serial)
116 {
117+ struct cp210x_port_private *port_priv;
118+ int i;
119+
120 /* cp210x buffers behave strangely unless device is reset */
121 usb_reset_device(serial->dev);
122+
123+ for (i = 0; i < serial->num_ports; i++) {
124+ port_priv = kzalloc(sizeof(*port_priv), GFP_KERNEL);
125+ if (!port_priv)
126+ return -ENOMEM;
127+
128+ memset(port_priv, 0x00, sizeof(*port_priv));
129+ port_priv->bInterfaceNumber =
130+ serial->interface->cur_altsetting->desc.bInterfaceNumber;
131+
132+ usb_set_serial_port_data(serial->port[i], port_priv);
133+ }
134+
135 return 0;
136 }
137
138+static void cp210x_release(struct usb_serial *serial)
139+{
140+ struct cp210x_port_private *port_priv;
141+ int i;
142+
143+ for (i = 0; i < serial->num_ports; i++) {
144+ port_priv = usb_get_serial_port_data(serial->port[i]);
145+ kfree(port_priv);
146+ usb_set_serial_port_data(serial->port[i], NULL);
147+ }
148+}
149+
150 static int __init cp210x_init(void)
151 {
152 int retval;
153--
1541.7.9.4
155
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0034-USB-serial-mos7840-Fixed-MCS7820-device-attach-probl.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0034-USB-serial-mos7840-Fixed-MCS7820-device-attach-probl.patch
new file mode 100644
index 00000000..6c878a9d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0034-USB-serial-mos7840-Fixed-MCS7820-device-attach-probl.patch
@@ -0,0 +1,148 @@
1From 7121306391cac4f482edc239e2c8b0f8ac310f92 Mon Sep 17 00:00:00 2001
2From: Donald Lee <donald@asix.com.tw>
3Date: Wed, 14 Mar 2012 15:26:33 +0800
4Subject: [PATCH 034/147] USB: serial: mos7840: Fixed MCS7820 device attach
5 problem
6
7commit 093ea2d3a766cb8a4c4de57efec6c0a127a58792 upstream.
8
9A MCS7820 device supports two serial ports and a MCS7840 device supports
10four serial ports. Both devices use the same driver, but the attach function
11in driver was unable to correctly handle the port numbers for MCS7820
12device. This problem has been fixed in this patch and this fix has been
13verified on x86 Linux kernel 3.2.9 with both MCS7820 and MCS7840 devices.
14
15Signed-off-by: Donald Lee <donald@asix.com.tw>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/usb/serial/mos7840.c | 83 +++++++++++++++++++++++++++++-------------
19 1 file changed, 57 insertions(+), 26 deletions(-)
20
21diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
22index c72abd5..5c7d654 100644
23--- a/drivers/usb/serial/mos7840.c
24+++ b/drivers/usb/serial/mos7840.c
25@@ -174,6 +174,7 @@
26
27 #define CLK_MULTI_REGISTER ((__u16)(0x02))
28 #define CLK_START_VALUE_REGISTER ((__u16)(0x03))
29+#define GPIO_REGISTER ((__u16)(0x07))
30
31 #define SERIAL_LCR_DLAB ((__u16)(0x0080))
32
33@@ -1103,14 +1104,25 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
34 mos7840_port->read_urb = port->read_urb;
35
36 /* set up our bulk in urb */
37-
38- usb_fill_bulk_urb(mos7840_port->read_urb,
39- serial->dev,
40- usb_rcvbulkpipe(serial->dev,
41- port->bulk_in_endpointAddress),
42- port->bulk_in_buffer,
43- mos7840_port->read_urb->transfer_buffer_length,
44- mos7840_bulk_in_callback, mos7840_port);
45+ if ((serial->num_ports == 2)
46+ && ((((__u16)port->number -
47+ (__u16)(port->serial->minor)) % 2) != 0)) {
48+ usb_fill_bulk_urb(mos7840_port->read_urb,
49+ serial->dev,
50+ usb_rcvbulkpipe(serial->dev,
51+ (port->bulk_in_endpointAddress) + 2),
52+ port->bulk_in_buffer,
53+ mos7840_port->read_urb->transfer_buffer_length,
54+ mos7840_bulk_in_callback, mos7840_port);
55+ } else {
56+ usb_fill_bulk_urb(mos7840_port->read_urb,
57+ serial->dev,
58+ usb_rcvbulkpipe(serial->dev,
59+ port->bulk_in_endpointAddress),
60+ port->bulk_in_buffer,
61+ mos7840_port->read_urb->transfer_buffer_length,
62+ mos7840_bulk_in_callback, mos7840_port);
63+ }
64
65 dbg("mos7840_open: bulkin endpoint is %d",
66 port->bulk_in_endpointAddress);
67@@ -1521,13 +1533,25 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,
68 memcpy(urb->transfer_buffer, current_position, transfer_size);
69
70 /* fill urb with data and submit */
71- usb_fill_bulk_urb(urb,
72- serial->dev,
73- usb_sndbulkpipe(serial->dev,
74- port->bulk_out_endpointAddress),
75- urb->transfer_buffer,
76- transfer_size,
77- mos7840_bulk_out_data_callback, mos7840_port);
78+ if ((serial->num_ports == 2)
79+ && ((((__u16)port->number -
80+ (__u16)(port->serial->minor)) % 2) != 0)) {
81+ usb_fill_bulk_urb(urb,
82+ serial->dev,
83+ usb_sndbulkpipe(serial->dev,
84+ (port->bulk_out_endpointAddress) + 2),
85+ urb->transfer_buffer,
86+ transfer_size,
87+ mos7840_bulk_out_data_callback, mos7840_port);
88+ } else {
89+ usb_fill_bulk_urb(urb,
90+ serial->dev,
91+ usb_sndbulkpipe(serial->dev,
92+ port->bulk_out_endpointAddress),
93+ urb->transfer_buffer,
94+ transfer_size,
95+ mos7840_bulk_out_data_callback, mos7840_port);
96+ }
97
98 data1 = urb->transfer_buffer;
99 dbg("bulkout endpoint is %d", port->bulk_out_endpointAddress);
100@@ -1840,7 +1864,7 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
101
102 } else {
103 #ifdef HW_flow_control
104- / *setting h/w flow control bit to 0 */
105+ /* setting h/w flow control bit to 0 */
106 Data = 0xb;
107 mos7840_port->shadowMCR = Data;
108 status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER,
109@@ -2309,19 +2333,26 @@ static int mos7840_ioctl(struct tty_struct *tty,
110
111 static int mos7840_calc_num_ports(struct usb_serial *serial)
112 {
113- int mos7840_num_ports = 0;
114-
115- dbg("numberofendpoints: cur %d, alt %d",
116- (int)serial->interface->cur_altsetting->desc.bNumEndpoints,
117- (int)serial->interface->altsetting->desc.bNumEndpoints);
118- if (serial->interface->cur_altsetting->desc.bNumEndpoints == 5) {
119- mos7840_num_ports = serial->num_ports = 2;
120- } else if (serial->interface->cur_altsetting->desc.bNumEndpoints == 9) {
121+ __u16 Data = 0x00;
122+ int ret = 0;
123+ int mos7840_num_ports;
124+
125+ ret = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
126+ MCS_RDREQ, MCS_RD_RTYPE, 0, GPIO_REGISTER, &Data,
127+ VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT);
128+
129+ if ((Data & 0x01) == 0) {
130+ mos7840_num_ports = 2;
131+ serial->num_bulk_in = 2;
132+ serial->num_bulk_out = 2;
133+ serial->num_ports = 2;
134+ } else {
135+ mos7840_num_ports = 4;
136 serial->num_bulk_in = 4;
137 serial->num_bulk_out = 4;
138- mos7840_num_ports = serial->num_ports = 4;
139+ serial->num_ports = 4;
140 }
141- dbg ("mos7840_num_ports = %d", mos7840_num_ports);
142+
143 return mos7840_num_ports;
144 }
145
146--
1471.7.9.4
148
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0035-rt2x00-Add-support-for-D-Link-DWA-127-to-rt2800usb.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0035-rt2x00-Add-support-for-D-Link-DWA-127-to-rt2800usb.patch
new file mode 100644
index 00000000..2805c1f0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0035-rt2x00-Add-support-for-D-Link-DWA-127-to-rt2800usb.patch
@@ -0,0 +1,33 @@
1From bdab95dd61b9879afe660d0f5d97bf5b6ab0533e Mon Sep 17 00:00:00 2001
2From: Gertjan van Wingerde <gwingerde@gmail.com>
3Date: Sat, 11 Feb 2012 21:58:09 +0100
4Subject: [PATCH 035/147] rt2x00: Add support for D-Link DWA-127 to rt2800usb.
5
6commit d42a179b941a9e4cc6cf41d0f3cbadd75fc48a89 upstream.
7
8This is an RT3070 based device.
9
10Reported-by: Mikhail Kryshen <mikhail@kryshen.net>
11Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
12Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
13Signed-off-by: John W. Linville <linville@tuxdriver.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/net/wireless/rt2x00/rt2800usb.c | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
20index 3265b34..cb71e88 100644
21--- a/drivers/net/wireless/rt2x00/rt2800usb.c
22+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
23@@ -935,6 +935,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
24 { USB_DEVICE(0x07d1, 0x3c0f) },
25 { USB_DEVICE(0x07d1, 0x3c11) },
26 { USB_DEVICE(0x07d1, 0x3c16) },
27+ { USB_DEVICE(0x2001, 0x3c1b) },
28 /* Draytek */
29 { USB_DEVICE(0x07fa, 0x7712) },
30 /* DVICO */
31--
321.7.9.4
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0036-rtlwifi-rtl8192c_common-rtl8192de-Check-for-allocati.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0036-rtlwifi-rtl8192c_common-rtl8192de-Check-for-allocati.patch
new file mode 100644
index 00000000..11a4531c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0036-rtlwifi-rtl8192c_common-rtl8192de-Check-for-allocati.patch
@@ -0,0 +1,102 @@
1From a28aa8ba24d7303a4d8677ebf8b159014f19dca0 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Sat, 7 Jan 2012 20:46:40 -0600
4Subject: [PATCH 036/147] rtlwifi: rtl8192c_common: rtl8192de: Check for
5 allocation failures
6
7commit 76a92be537f1c8c259e393632301446257ca3ea9 upstream.
8
9In https://bugzilla.redhat.com/show_bug.cgi?id=771656, a kernel bug was
10triggered due to a failed skb allocation that was not checked. This event
11lead to an audit of all memory allocations in the complete rtlwifi family
12of drivers. This patch fixes the rest.
13
14Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
15Signed-off-by: John W. Linville <linville@tuxdriver.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/net/wireless/rtlwifi/pci.c | 2 ++
19 drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 2 ++
20 drivers/net/wireless/rtlwifi/rtl8192de/fw.c | 14 +++++++++-----
21 drivers/net/wireless/rtlwifi/usb.c | 12 +++++++-----
22 4 files changed, 20 insertions(+), 10 deletions(-)
23
24diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
25index eb61061..19bb550 100644
26--- a/drivers/net/wireless/rtlwifi/pci.c
27+++ b/drivers/net/wireless/rtlwifi/pci.c
28@@ -657,6 +657,8 @@ static void _rtl_receive_one(struct ieee80211_hw *hw, struct sk_buff *skb,
29 return;
30
31 uskb = dev_alloc_skb(skb->len + 128);
32+ if (!uskb)
33+ return; /* exit if allocation failed */
34 memcpy(IEEE80211_SKB_RXCB(uskb), &rx_status, sizeof(rx_status));
35 pdata = (u8 *)skb_put(uskb, skb->len);
36 memcpy(pdata, skb->data, skb->len);
37diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
38index 950c65a..13fc0f9 100644
39--- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
40+++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
41@@ -752,6 +752,8 @@ void rtl92c_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished)
42
43
44 skb = dev_alloc_skb(totalpacketlen);
45+ if (!skb)
46+ return;
47 memcpy((u8 *) skb_put(skb, totalpacketlen),
48 &reserved_page_packet, totalpacketlen);
49
50diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/fw.c b/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
51index 82f060b..c44757f 100644
52--- a/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
53+++ b/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
54@@ -763,12 +763,16 @@ void rtl92d_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished)
55 "rtl92d_set_fw_rsvdpagepkt(): HW_VAR_SET_TX_CMD: ALL\n",
56 u1RsvdPageLoc, 3);
57 skb = dev_alloc_skb(totalpacketlen);
58- memcpy((u8 *) skb_put(skb, totalpacketlen), &reserved_page_packet,
59- totalpacketlen);
60- rtstatus = _rtl92d_cmd_send_packet(hw, skb);
61+ if (!skb) {
62+ dlok = false;
63+ } else {
64+ memcpy((u8 *) skb_put(skb, totalpacketlen),
65+ &reserved_page_packet, totalpacketlen);
66+ rtstatus = _rtl92d_cmd_send_packet(hw, skb);
67
68- if (rtstatus)
69- dlok = true;
70+ if (rtstatus)
71+ dlok = true;
72+ }
73 if (dlok) {
74 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
75 ("Set RSVD page location to Fw.\n"));
76diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
77index 54cb8a6..2b7bcc8 100644
78--- a/drivers/net/wireless/rtlwifi/usb.c
79+++ b/drivers/net/wireless/rtlwifi/usb.c
80@@ -481,12 +481,14 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
81 u8 *pdata;
82
83 uskb = dev_alloc_skb(skb->len + 128);
84- memcpy(IEEE80211_SKB_RXCB(uskb), &rx_status,
85- sizeof(rx_status));
86- pdata = (u8 *)skb_put(uskb, skb->len);
87- memcpy(pdata, skb->data, skb->len);
88+ if (uskb) { /* drop packet on allocation failure */
89+ memcpy(IEEE80211_SKB_RXCB(uskb), &rx_status,
90+ sizeof(rx_status));
91+ pdata = (u8 *)skb_put(uskb, skb->len);
92+ memcpy(pdata, skb->data, skb->len);
93+ ieee80211_rx_irqsafe(hw, uskb);
94+ }
95 dev_kfree_skb_any(skb);
96- ieee80211_rx_irqsafe(hw, uskb);
97 } else {
98 dev_kfree_skb_any(skb);
99 }
100--
1011.7.9.4
102
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0037-rtlwifi-Handle-previous-allocation-failures-when-fre.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0037-rtlwifi-Handle-previous-allocation-failures-when-fre.patch
new file mode 100644
index 00000000..c30c85db
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0037-rtlwifi-Handle-previous-allocation-failures-when-fre.patch
@@ -0,0 +1,59 @@
1From 80ee9108bee3d22e90191a67036133de09faf7cc Mon Sep 17 00:00:00 2001
2From: Simon Graham <simon.graham@virtualcomputer.com>
3Date: Tue, 7 Feb 2012 18:07:38 -0600
4Subject: [PATCH 037/147] rtlwifi: Handle previous allocation failures when
5 freeing device memory
6
7commit 7f66c2f93e5779625c10d262c84537427a2673ca upstream.
8
9Handle previous allocation failures when freeing device memory
10
11Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com>
12Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
13Signed-off-by: John W. Linville <linville@tuxdriver.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/net/wireless/rtlwifi/pci.c | 16 ++++++++++------
17 1 file changed, 10 insertions(+), 6 deletions(-)
18
19diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
20index 19bb550..9afcad3 100644
21--- a/drivers/net/wireless/rtlwifi/pci.c
22+++ b/drivers/net/wireless/rtlwifi/pci.c
23@@ -1155,10 +1155,12 @@ static void _rtl_pci_free_tx_ring(struct ieee80211_hw *hw,
24 ring->idx = (ring->idx + 1) % ring->entries;
25 }
26
27- pci_free_consistent(rtlpci->pdev,
28- sizeof(*ring->desc) * ring->entries,
29- ring->desc, ring->dma);
30- ring->desc = NULL;
31+ if (ring->desc) {
32+ pci_free_consistent(rtlpci->pdev,
33+ sizeof(*ring->desc) * ring->entries,
34+ ring->desc, ring->dma);
35+ ring->desc = NULL;
36+ }
37 }
38
39 static void _rtl_pci_free_rx_ring(struct rtl_pci *rtlpci)
40@@ -1182,12 +1184,14 @@ static void _rtl_pci_free_rx_ring(struct rtl_pci *rtlpci)
41 kfree_skb(skb);
42 }
43
44- pci_free_consistent(rtlpci->pdev,
45+ if (rtlpci->rx_ring[rx_queue_idx].desc) {
46+ pci_free_consistent(rtlpci->pdev,
47 sizeof(*rtlpci->rx_ring[rx_queue_idx].
48 desc) * rtlpci->rxringcount,
49 rtlpci->rx_ring[rx_queue_idx].desc,
50 rtlpci->rx_ring[rx_queue_idx].dma);
51- rtlpci->rx_ring[rx_queue_idx].desc = NULL;
52+ rtlpci->rx_ring[rx_queue_idx].desc = NULL;
53+ }
54 }
55 }
56
57--
581.7.9.4
59
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0038-rtlwifi-rtl8192c-Prevent-sleeping-from-invalid-conte.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0038-rtlwifi-rtl8192c-Prevent-sleeping-from-invalid-conte.patch
new file mode 100644
index 00000000..cec2e0fd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0038-rtlwifi-rtl8192c-Prevent-sleeping-from-invalid-conte.patch
@@ -0,0 +1,56 @@
1From 9d3a0177f72e20f06c844ede994dc3541bdae01b Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Fri, 2 Mar 2012 15:23:36 -0600
4Subject: [PATCH 038/147] rtlwifi: rtl8192c: Prevent sleeping from invalid
5 context in rtl8192cu
6
7commit ebecdcc12fed5d3c81853dea61a0a78a5aefab52 upstream.
8
9When driver rtl8192cu is used with the debug level set to 3 or greater,
10the result is "sleeping function called from invalid context" due to
11an rcu_read_lock() call in the DM refresh routine in driver rtl8192c.
12This lock is not necessary as the USB driver does not use the struct
13being protected, thus the lock is set only when a PCI interface is
14active.
15
16This bug is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42775.
17
18Reported-by: Ronald Wahl <ronald.wahl@raritan.com>
19Tested-by: Ronald Wahl <ronald.wahl@raritan.com>
20Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
21Cc: Ronald Wahl <ronald.wahl@raritan.com>
22Signed-off-by: John W. Linville <linville@tuxdriver.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 11 ++++++++---
26 1 file changed, 8 insertions(+), 3 deletions(-)
27
28diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
29index 72a98ca..4de6b78 100644
30--- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
31+++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
32@@ -1219,13 +1219,18 @@ static void rtl92c_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw)
33 ("PreState = %d, CurState = %d\n",
34 p_ra->pre_ratr_state, p_ra->ratr_state));
35
36- rcu_read_lock();
37- sta = ieee80211_find_sta(mac->vif, mac->bssid);
38+ /* Only the PCI card uses sta in the update rate table
39+ * callback routine */
40+ if (rtlhal->interface == INTF_PCI) {
41+ rcu_read_lock();
42+ sta = ieee80211_find_sta(mac->vif, mac->bssid);
43+ }
44 rtlpriv->cfg->ops->update_rate_tbl(hw, sta,
45 p_ra->ratr_state);
46
47 p_ra->pre_ratr_state = p_ra->ratr_state;
48- rcu_read_unlock();
49+ if (rtlhal->interface == INTF_PCI)
50+ rcu_read_unlock();
51 }
52 }
53 }
54--
551.7.9.4
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0039-rtlwifi-rtl8192ce-Fix-loss-of-receive-performance.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0039-rtlwifi-rtl8192ce-Fix-loss-of-receive-performance.patch
new file mode 100644
index 00000000..1df8ca91
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0039-rtlwifi-rtl8192ce-Fix-loss-of-receive-performance.patch
@@ -0,0 +1,42 @@
1From 83d83582d1097f305c41838a2ca01dde71d608a1 Mon Sep 17 00:00:00 2001
2From: Jingjun Wu <jingjun_wu@realsil.com.cn>
3Date: Fri, 2 Mar 2012 20:52:14 -0600
4Subject: [PATCH 039/147] rtlwifi: rtl8192ce: Fix loss of receive performance
5
6commit a9b89e2567c743483e6354f64d7a7e3a8c101e9e upstream.
7
8Driver rtl8192ce when used with the RTL8188CE device would start at about
920 Mbps on a 54 Mbps connection, but quickly drop to 1 Mbps. One of the
10symptoms is that the AP would need to retransmit each packet 4 of 5 times
11before the driver would acknowledge it. Recovery is possible only by
12unloading and reloading the driver. This problem was reported at
13https://bugzilla.redhat.com/show_bug.cgi?id=770207.
14
15The problem is due to a missing update of the gain setting.
16
17Signed-off-by: Jingjun Wu <jingjun_wu@realsil.com.cn>
18Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
19Signed-off-by: John W. Linville <linville@tuxdriver.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
26index 4de6b78..a004ad7 100644
27--- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
28+++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
29@@ -524,6 +524,10 @@ void rtl92c_dm_write_dig(struct ieee80211_hw *hw)
30 dm_digtable.cur_igvalue, dm_digtable.pre_igvalue,
31 dm_digtable.backoff_val));
32
33+ dm_digtable.cur_igvalue += 2;
34+ if (dm_digtable.cur_igvalue > 0x3f)
35+ dm_digtable.cur_igvalue = 0x3f;
36+
37 if (dm_digtable.pre_igvalue != dm_digtable.cur_igvalue) {
38 rtl_set_bbreg(hw, ROFDM0_XAAGCCORE1, 0x7f,
39 dm_digtable.cur_igvalue);
40--
411.7.9.4
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0040-iwlwifi-always-monitor-for-stuck-queues.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0040-iwlwifi-always-monitor-for-stuck-queues.patch
new file mode 100644
index 00000000..2e4e29f8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0040-iwlwifi-always-monitor-for-stuck-queues.patch
@@ -0,0 +1,65 @@
1From 3d581df915fb46fe7929371df85da52ec6d65d69 Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Sun, 4 Mar 2012 08:50:46 -0800
4Subject: [PATCH 040/147] iwlwifi: always monitor for stuck queues
5
6commit 342bbf3fee2fa9a18147e74b2e3c4229a4564912 upstream.
7
8If we only monitor while associated, the following
9can happen:
10 - we're associated, and the queue stuck check
11 runs, setting the queue "touch" time to X
12 - we disassociate, stopping the monitoring,
13 which leaves the time set to X
14 - almost 2s later, we associate, and enqueue
15 a frame
16 - before the frame is transmitted, we monitor
17 for stuck queues, and find the time set to
18 X, although it is now later than X + 2000ms,
19 so we decide that the queue is stuck and
20 erroneously restart the device
21
22It happens more with P2P because there we can
23go between associated/unassociated frequently.
24
25Reported-by: Ben Cahill <ben.m.cahill@intel.com>
26Signed-off-by: Johannes Berg <johannes.berg@intel.com>
27Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
28Signed-off-by: John W. Linville <linville@tuxdriver.com>
29Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30---
31 drivers/net/wireless/iwlwifi/iwl-core.c | 18 ++++--------------
32 1 file changed, 4 insertions(+), 14 deletions(-)
33
34diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
35index fcf5416..3d75d4c 100644
36--- a/drivers/net/wireless/iwlwifi/iwl-core.c
37+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
38@@ -1787,20 +1787,10 @@ void iwl_bg_watchdog(unsigned long data)
39 if (timeout == 0)
40 return;
41
42- /* monitor and check for stuck cmd queue */
43- if (iwl_check_stuck_queue(priv, priv->shrd->cmd_queue))
44- return;
45-
46- /* monitor and check for other stuck queues */
47- if (iwl_is_any_associated(priv)) {
48- for (cnt = 0; cnt < hw_params(priv).max_txq_num; cnt++) {
49- /* skip as we already checked the command queue */
50- if (cnt == priv->shrd->cmd_queue)
51- continue;
52- if (iwl_check_stuck_queue(priv, cnt))
53- return;
54- }
55- }
56+ /* monitor and check for stuck queues */
57+ for (cnt = 0; cnt < hw_params(priv).max_txq_num; cnt++)
58+ if (iwl_check_stuck_queue(priv, cnt))
59+ return;
60
61 mod_timer(&priv->watchdog, jiffies +
62 msecs_to_jiffies(IWL_WD_TICK(timeout)));
63--
641.7.9.4
65
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0041-math-Introduce-div64_long.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0041-math-Introduce-div64_long.patch
new file mode 100644
index 00000000..e46ab87e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0041-math-Introduce-div64_long.patch
@@ -0,0 +1,45 @@
1From 0041e471301214d86b8d15b4da69899f47161df6 Mon Sep 17 00:00:00 2001
2From: Sasha Levin <levinsasha928@gmail.com>
3Date: Thu, 15 Mar 2012 12:36:13 -0400
4Subject: [PATCH 041/147] math: Introduce div64_long
5
6commit f910381a55cdaa097030291f272f6e6e4380c39a upstream.
7
8Add a div64_long macro which is used to devide a 64bit number by a long (which
9can be 4 bytes on 32bit systems and 8 bytes on 64bit systems).
10
11Suggested-by: Thomas Gleixner <tglx@linutronix.de>
12Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
13Cc: johnstul@us.ibm.com
14Link: http://lkml.kernel.org/r/1331829374-31543-1-git-send-email-levinsasha928@gmail.com
15Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 include/linux/math64.h | 4 ++++
19 1 file changed, 4 insertions(+)
20
21diff --git a/include/linux/math64.h b/include/linux/math64.h
22index 23fcdfc..b8ba855 100644
23--- a/include/linux/math64.h
24+++ b/include/linux/math64.h
25@@ -6,6 +6,8 @@
26
27 #if BITS_PER_LONG == 64
28
29+#define div64_long(x,y) div64_s64((x),(y))
30+
31 /**
32 * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder
33 *
34@@ -45,6 +47,8 @@ static inline s64 div64_s64(s64 dividend, s64 divisor)
35
36 #elif BITS_PER_LONG == 32
37
38+#define div64_long(x,y) div_s64((x),(y))
39+
40 #ifndef div_u64_rem
41 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
42 {
43--
441.7.9.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0042-ntp-Fix-integer-overflow-when-setting-time.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0042-ntp-Fix-integer-overflow-when-setting-time.patch
new file mode 100644
index 00000000..f8e3d0da
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0042-ntp-Fix-integer-overflow-when-setting-time.patch
@@ -0,0 +1,39 @@
1From c763173b9ab87b7413e63a82be88987250677b89 Mon Sep 17 00:00:00 2001
2From: Sasha Levin <levinsasha928@gmail.com>
3Date: Thu, 15 Mar 2012 12:36:14 -0400
4Subject: [PATCH 042/147] ntp: Fix integer overflow when setting time
5
6commit a078c6d0e6288fad6d83fb6d5edd91ddb7b6ab33 upstream.
7
8'long secs' is passed as divisor to div_s64, which accepts a 32bit
9divisor. On 64bit machines that value is trimmed back from 8 bytes
10back to 4, causing a divide by zero when the number is bigger than
11(1 << 32) - 1 and all 32 lower bits are 0.
12
13Use div64_long() instead.
14
15Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
16Cc: johnstul@us.ibm.com
17Link: http://lkml.kernel.org/r/1331829374-31543-2-git-send-email-levinsasha928@gmail.com
18Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 kernel/time/ntp.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
25index f6117a4..4b85a7a 100644
26--- a/kernel/time/ntp.c
27+++ b/kernel/time/ntp.c
28@@ -275,7 +275,7 @@ static inline s64 ntp_update_offset_fll(s64 offset64, long secs)
29
30 time_status |= STA_MODE;
31
32- return div_s64(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL), secs);
33+ return div64_long(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL), secs);
34 }
35
36 static void ntp_update_offset(long offset)
37--
381.7.9.4
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0043-uevent-send-events-in-correct-order-according-to-seq.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0043-uevent-send-events-in-correct-order-according-to-seq.patch
new file mode 100644
index 00000000..8105acaf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0043-uevent-send-events-in-correct-order-according-to-seq.patch
@@ -0,0 +1,97 @@
1From 30890ccb8ef54dedb2569535dbb781fa2f10a119 Mon Sep 17 00:00:00 2001
2From: Andrew Vagin <avagin@openvz.org>
3Date: Wed, 7 Mar 2012 14:49:56 +0400
4Subject: [PATCH 043/147] uevent: send events in correct order according to
5 seqnum (v3)
6
7commit 7b60a18da393ed70db043a777fd9e6d5363077c4 upstream.
8
9The queue handling in the udev daemon assumes that the events are
10ordered.
11
12Before this patch uevent_seqnum is incremented under sequence_lock,
13than an event is send uner uevent_sock_mutex. I want to say that code
14contained a window between incrementing seqnum and sending an event.
15
16This patch locks uevent_sock_mutex before incrementing uevent_seqnum.
17
18v2: delete sequence_lock, uevent_seqnum is protected by uevent_sock_mutex
19v3: unlock the mutex before the goto exit
20
21Thanks for Kay for the comments.
22
23Signed-off-by: Andrew Vagin <avagin@openvz.org>
24Tested-By: Kay Sievers <kay.sievers@vrfy.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 lib/kobject_uevent.c | 19 +++++++++----------
28 1 file changed, 9 insertions(+), 10 deletions(-)
29
30diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
31index ad72a03..6d40244 100644
32--- a/lib/kobject_uevent.c
33+++ b/lib/kobject_uevent.c
34@@ -29,16 +29,17 @@
35
36 u64 uevent_seqnum;
37 char uevent_helper[UEVENT_HELPER_PATH_LEN] = CONFIG_UEVENT_HELPER_PATH;
38-static DEFINE_SPINLOCK(sequence_lock);
39 #ifdef CONFIG_NET
40 struct uevent_sock {
41 struct list_head list;
42 struct sock *sk;
43 };
44 static LIST_HEAD(uevent_sock_list);
45-static DEFINE_MUTEX(uevent_sock_mutex);
46 #endif
47
48+/* This lock protects uevent_seqnum and uevent_sock_list */
49+static DEFINE_MUTEX(uevent_sock_mutex);
50+
51 /* the strings here must match the enum in include/linux/kobject.h */
52 static const char *kobject_actions[] = {
53 [KOBJ_ADD] = "add",
54@@ -136,7 +137,6 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
55 struct kobject *top_kobj;
56 struct kset *kset;
57 const struct kset_uevent_ops *uevent_ops;
58- u64 seq;
59 int i = 0;
60 int retval = 0;
61 #ifdef CONFIG_NET
62@@ -243,17 +243,16 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
63 else if (action == KOBJ_REMOVE)
64 kobj->state_remove_uevent_sent = 1;
65
66+ mutex_lock(&uevent_sock_mutex);
67 /* we will send an event, so request a new sequence number */
68- spin_lock(&sequence_lock);
69- seq = ++uevent_seqnum;
70- spin_unlock(&sequence_lock);
71- retval = add_uevent_var(env, "SEQNUM=%llu", (unsigned long long)seq);
72- if (retval)
73+ retval = add_uevent_var(env, "SEQNUM=%llu", (unsigned long long)++uevent_seqnum);
74+ if (retval) {
75+ mutex_unlock(&uevent_sock_mutex);
76 goto exit;
77+ }
78
79 #if defined(CONFIG_NET)
80 /* send netlink message */
81- mutex_lock(&uevent_sock_mutex);
82 list_for_each_entry(ue_sk, &uevent_sock_list, list) {
83 struct sock *uevent_sock = ue_sk->sk;
84 struct sk_buff *skb;
85@@ -287,8 +286,8 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
86 } else
87 retval = -ENOMEM;
88 }
89- mutex_unlock(&uevent_sock_mutex);
90 #endif
91+ mutex_unlock(&uevent_sock_mutex);
92
93 /* call uevent_helper, usually only enabled during early boot */
94 if (uevent_helper[0] && !kobj_usermode_filter(kobj)) {
95--
961.7.9.4
97
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0044-genirq-Fix-long-term-regression-in-genirq-irq_set_ir.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0044-genirq-Fix-long-term-regression-in-genirq-irq_set_ir.patch
new file mode 100644
index 00000000..a19b4b04
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0044-genirq-Fix-long-term-regression-in-genirq-irq_set_ir.patch
@@ -0,0 +1,96 @@
1From 30baeed7abf879cdb6abc168307abd194d0d2668 Mon Sep 17 00:00:00 2001
2From: Russell King <linux@arm.linux.org.uk>
3Date: Mon, 5 Mar 2012 15:07:25 -0800
4Subject: [PATCH 044/147] genirq: Fix long-term regression in genirq
5 irq_set_irq_type() handling
6
7commit a09b659cd68c10ec6a30cb91ebd2c327fcd5bfe5 upstream.
8
9In 2008, commit 0c5d1eb77a8be ("genirq: record trigger type") modified the
10way set_irq_type() handles the 'no trigger' condition. However, this has
11an adverse effect on PCMCIA support on Intel StrongARM and probably PXA
12platforms.
13
14PCMCIA has several status signals on the socket which can trigger
15interrupts; some of these status signals depend on the card's mode
16(whether it is configured in memory or IO mode). For example, cards have
17a 'Ready/IRQ' signal: in memory mode, this provides an indication to
18PCMCIA that the card has finished its power up initialization. In IO
19mode, it provides the device interrupt signal. Other status signals
20switch between on-board battery status and loud speaker output.
21
22In classical PCMCIA implementations, where you have a specific socket
23controller, the controller provides a method to mask interrupts from the
24socket, and importantly ignore any state transitions on the pins which
25correspond with interrupts once masked. This masking prevents unwanted
26events caused by the removal and application of socket power being
27forwarded.
28
29However, on platforms where there is no socket controller, the PCMCIA
30status and interrupt signals are routed to standard edge-triggered GPIOs.
31These GPIOs can be configured to interrupt on rising edge, falling edge,
32or never. This is where the problems start.
33
34Edge triggered interrupts are required to record events while disabled via
35the usual methods of {free,request,disable,enable}_irq() to prevent
36problems with dropped interrupts (eg, the 8390 driver uses disable_irq()
37to defer the delivery of interrupts). As a result, these interfaces can
38not be used to implement the desired behaviour.
39
40The side effect of this is that if the 'Ready/IRQ' GPIO is disabled via
41disable_irq() on suspend, and enabled via enable_irq() after resume, we
42will record the state transitions caused by powering events as valid
43interrupts, and foward them to the card driver, which may attempt to
44access a card which is not powered up.
45
46This leads delays resume while drivers spin in their interrupt handlers,
47and complaints from drivers before they realize what's happened.
48
49Moreover, in the case of the 'Ready/IRQ' signal, this is requested and
50freed by the card driver itself; the PCMCIA core has no idea whether the
51interrupt is requested, and, therefore, whether a call to disable_irq()
52would be valid. (We tried this around 2.4.17 / 2.5.1 kernel era, and
53ended up throwing it out because of this problem.)
54
55Therefore, it was decided back in around 2002 to disable the edge
56triggering instead, resulting in all state transitions on the GPIO being
57ignored. That's what we actually need the hardware to do.
58
59The commit above changes this behaviour; it explicitly prevents the 'no
60trigger' state being selected.
61
62The reason that request_irq() does not accept the 'no trigger' state is
63for compatibility with existing drivers which do not provide their desired
64triggering configuration. The set_irq_type() function is 'new' and not
65used by non-trigger aware drivers.
66
67Therefore, revert this change, and restore previously working platforms
68back to their former state.
69
70Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
71Cc: linux@arm.linux.org.uk
72Cc: Ingo Molnar <mingo@elte.hu>
73Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
74Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
75Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
76---
77 kernel/irq/chip.c | 3 +--
78 1 file changed, 1 insertion(+), 2 deletions(-)
79
80diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
81index fb7db75..25784d6 100644
82--- a/kernel/irq/chip.c
83+++ b/kernel/irq/chip.c
84@@ -61,8 +61,7 @@ int irq_set_irq_type(unsigned int irq, unsigned int type)
85 return -EINVAL;
86
87 type &= IRQ_TYPE_SENSE_MASK;
88- if (type != IRQ_TYPE_NONE)
89- ret = __irq_set_trigger(desc, irq, type);
90+ ret = __irq_set_trigger(desc, irq, type);
91 irq_put_desc_busunlock(desc, flags);
92 return ret;
93 }
94--
951.7.9.4
96
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0045-genirq-Fix-incorrect-check-for-forced-IRQ-thread-han.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0045-genirq-Fix-incorrect-check-for-forced-IRQ-thread-han.patch
new file mode 100644
index 00000000..16059a0f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0045-genirq-Fix-incorrect-check-for-forced-IRQ-thread-han.patch
@@ -0,0 +1,35 @@
1From 8cc03040447868b0c8ca3f6ca027fdf45216f493 Mon Sep 17 00:00:00 2001
2From: Alexander Gordeev <agordeev@redhat.com>
3Date: Fri, 9 Mar 2012 14:59:13 +0100
4Subject: [PATCH 045/147] genirq: Fix incorrect check for forced IRQ thread
5 handler
6
7commit 540b60e24f3f4781d80e47122f0c4486a03375b8 upstream.
8
9We do not want a bitwise AND between boolean operands
10
11Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
12Cc: Oleg Nesterov <oleg@redhat.com>
13Link: http://lkml.kernel.org/r/20120309135912.GA2114@dhcp-26-207.brq.redhat.com
14Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 kernel/irq/manage.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
21index ae95cd2..7600092 100644
22--- a/kernel/irq/manage.c
23+++ b/kernel/irq/manage.c
24@@ -773,7 +773,7 @@ static int irq_thread(void *data)
25 struct irqaction *action);
26 int wake;
27
28- if (force_irqthreads & test_bit(IRQTF_FORCED_THREAD,
29+ if (force_irqthreads && test_bit(IRQTF_FORCED_THREAD,
30 &action->thread_flags))
31 handler_fn = irq_forced_thread_fn;
32 else
33--
341.7.9.4
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0046-rtc-Disable-the-alarm-in-the-hardware-v2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0046-rtc-Disable-the-alarm-in-the-hardware-v2.patch
new file mode 100644
index 00000000..c7db9c65
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0046-rtc-Disable-the-alarm-in-the-hardware-v2.patch
@@ -0,0 +1,76 @@
1From 7d3eb8bf92abead3bd005400d600f32ea4bf9d63 Mon Sep 17 00:00:00 2001
2From: Rabin Vincent <rabin.vincent@stericsson.com>
3Date: Tue, 22 Nov 2011 11:03:14 +0100
4Subject: [PATCH 046/147] rtc: Disable the alarm in the hardware (v2)
5
6commit 41c7f7424259ff11009449f87c95656f69f9b186 upstream.
7
8Currently, the RTC code does not disable the alarm in the hardware.
9
10This means that after a sequence such as the one below (the files are in the
11RTC sysfs), the box will boot up after 2 minutes even though we've
12asked for the alarm to be turned off.
13
14 # echo $((`cat since_epoch`)+120) > wakealarm
15 # echo 0 > wakealarm
16 # poweroff
17
18Fix this by disabling the alarm when there are no timers to run.
19
20The original version of this patch was reverted. This version
21disables the irq directly instead of setting a disabled timer
22in the future.
23
24Cc: John Stultz <john.stultz@linaro.org>
25Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
26[Merged in the second revision from Rabin]
27Signed-off-by: John Stultz <john.stultz@linaro.org>
28Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29---
30 drivers/rtc/interface.c | 15 +++++++++++++--
31 1 file changed, 13 insertions(+), 2 deletions(-)
32
33diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
34index 8a1c031..c1edbf8 100644
35--- a/drivers/rtc/interface.c
36+++ b/drivers/rtc/interface.c
37@@ -763,6 +763,14 @@ static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer)
38 return 0;
39 }
40
41+static void rtc_alarm_disable(struct rtc_device *rtc)
42+{
43+ if (!rtc->ops || !rtc->ops->alarm_irq_enable)
44+ return;
45+
46+ rtc->ops->alarm_irq_enable(rtc->dev.parent, false);
47+}
48+
49 /**
50 * rtc_timer_remove - Removes a rtc_timer from the rtc_device timerqueue
51 * @rtc rtc device
52@@ -784,8 +792,10 @@ static void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer)
53 struct rtc_wkalrm alarm;
54 int err;
55 next = timerqueue_getnext(&rtc->timerqueue);
56- if (!next)
57+ if (!next) {
58+ rtc_alarm_disable(rtc);
59 return;
60+ }
61 alarm.time = rtc_ktime_to_tm(next->expires);
62 alarm.enabled = 1;
63 err = __rtc_set_alarm(rtc, &alarm);
64@@ -847,7 +857,8 @@ again:
65 err = __rtc_set_alarm(rtc, &alarm);
66 if (err == -ETIME)
67 goto again;
68- }
69+ } else
70+ rtc_alarm_disable(rtc);
71
72 mutex_unlock(&rtc->ops_lock);
73 }
74--
751.7.9.4
76
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0047-p54spi-Release-GPIO-lines-and-IRQ-on-error-in-p54spi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0047-p54spi-Release-GPIO-lines-and-IRQ-on-error-in-p54spi.patch
new file mode 100644
index 00000000..2ecd9fe6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0047-p54spi-Release-GPIO-lines-and-IRQ-on-error-in-p54spi.patch
@@ -0,0 +1,71 @@
1From 4a8252cb16f69ca39f21e3bf65064d70046adf38 Mon Sep 17 00:00:00 2001
2From: Max Filippov <jcmvbkbc@gmail.com>
3Date: Thu, 1 Mar 2012 00:40:08 +0400
4Subject: [PATCH 047/147] p54spi: Release GPIO lines and IRQ on error in
5 p54spi_probe
6
7commit 62ebeed8d00aef75eac4fd6c161cae75a41965ca upstream.
8
9This makes it possible to reload driver if insmod has failed due to
10missing firmware.
11
12Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
13Acked-by: Christian Lamparter <chunkeey@googlemail.com>
14Signed-off-by: John W. Linville <linville@tuxdriver.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/net/wireless/p54/p54spi.c | 14 ++++++++++----
18 1 file changed, 10 insertions(+), 4 deletions(-)
19
20diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
21index 78d0d69..428401b 100644
22--- a/drivers/net/wireless/p54/p54spi.c
23+++ b/drivers/net/wireless/p54/p54spi.c
24@@ -622,19 +622,19 @@ static int __devinit p54spi_probe(struct spi_device *spi)
25 ret = spi_setup(spi);
26 if (ret < 0) {
27 dev_err(&priv->spi->dev, "spi_setup failed");
28- goto err_free_common;
29+ goto err_free;
30 }
31
32 ret = gpio_request(p54spi_gpio_power, "p54spi power");
33 if (ret < 0) {
34 dev_err(&priv->spi->dev, "power GPIO request failed: %d", ret);
35- goto err_free_common;
36+ goto err_free;
37 }
38
39 ret = gpio_request(p54spi_gpio_irq, "p54spi irq");
40 if (ret < 0) {
41 dev_err(&priv->spi->dev, "irq GPIO request failed: %d", ret);
42- goto err_free_common;
43+ goto err_free_gpio_power;
44 }
45
46 gpio_direction_output(p54spi_gpio_power, 0);
47@@ -645,7 +645,7 @@ static int __devinit p54spi_probe(struct spi_device *spi)
48 priv->spi);
49 if (ret < 0) {
50 dev_err(&priv->spi->dev, "request_irq() failed");
51- goto err_free_common;
52+ goto err_free_gpio_irq;
53 }
54
55 irq_set_irq_type(gpio_to_irq(p54spi_gpio_irq), IRQ_TYPE_EDGE_RISING);
56@@ -677,6 +677,12 @@ static int __devinit p54spi_probe(struct spi_device *spi)
57 return 0;
58
59 err_free_common:
60+ free_irq(gpio_to_irq(p54spi_gpio_irq), spi);
61+err_free_gpio_irq:
62+ gpio_free(p54spi_gpio_irq);
63+err_free_gpio_power:
64+ gpio_free(p54spi_gpio_power);
65+err_free:
66 p54_free_common(priv->hw);
67 return ret;
68 }
69--
701.7.9.4
71
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0048-rtnetlink-Fix-VF-IFLA-policy.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0048-rtnetlink-Fix-VF-IFLA-policy.patch
new file mode 100644
index 00000000..f938d1c4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0048-rtnetlink-Fix-VF-IFLA-policy.patch
@@ -0,0 +1,38 @@
1From cf7eecb4e8e024ff0de45c29a63241a518ddf4a0 Mon Sep 17 00:00:00 2001
2From: Greg Rose <gregory.v.rose@intel.com>
3Date: Wed, 8 Feb 2012 00:45:00 +0000
4Subject: [PATCH 048/147] rtnetlink: Fix VF IFLA policy
5
6commit 48752f6513012a1b078da08b145d5c40a644f058 upstream.
7
8Add VF spoof check to IFLA policy. The original patch I submitted to
9add the spoof checking feature to rtnl failed to add the proper policy
10rule that identifies the data type and len. This patch corrects that
11oversight. No bugs have been reported against this but it may cause
12some problem for the netlink message parsing that uses the policy
13table.
14
15Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
16Tested-by: Sibai Li <sibai.li@intel.com>
17Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 net/core/rtnetlink.c | 2 ++
21 1 file changed, 2 insertions(+)
22
23diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
24index 9083e82..2ef859a 100644
25--- a/net/core/rtnetlink.c
26+++ b/net/core/rtnetlink.c
27@@ -1116,6 +1116,8 @@ static const struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = {
28 .len = sizeof(struct ifla_vf_vlan) },
29 [IFLA_VF_TX_RATE] = { .type = NLA_BINARY,
30 .len = sizeof(struct ifla_vf_tx_rate) },
31+ [IFLA_VF_SPOOFCHK] = { .type = NLA_BINARY,
32+ .len = sizeof(struct ifla_vf_spoofchk) },
33 };
34
35 static const struct nla_policy ifla_port_policy[IFLA_PORT_MAX+1] = {
36--
371.7.9.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0049-IB-iser-Post-initial-receive-buffers-before-sending-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0049-IB-iser-Post-initial-receive-buffers-before-sending-.patch
new file mode 100644
index 00000000..8d3cd740
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0049-IB-iser-Post-initial-receive-buffers-before-sending-.patch
@@ -0,0 +1,143 @@
1From de960f13b12a65cff5f74f1f7bb6871fbd9ac432 Mon Sep 17 00:00:00 2001
2From: Or Gerlitz <ogerlitz@mellanox.com>
3Date: Mon, 5 Mar 2012 18:21:44 +0200
4Subject: [PATCH 049/147] IB/iser: Post initial receive buffers before sending
5 the final login request
6
7commit 89e984e2c2cd14f77ccb26c47726ac7f13b70ae8 upstream.
8
9An iser target may send iscsi NO-OP PDUs as soon as it marks the iSER
10iSCSI session as fully operative. This means that there is window
11where there are no posted receive buffers on the initiator side, so
12it's possible for the iSER RC connection to break because of RNR NAK /
13retry errors. To fix this, rely on the flags bits in the login
14request to have FFP (0x3) in the lower nibble as a marker for the
15final login request, and post an initial chunk of receive buffers
16before sending that login request instead of after getting the login
17response.
18
19Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
20Signed-off-by: Roland Dreier <roland@purestorage.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 drivers/infiniband/ulp/iser/iscsi_iser.c | 18 ++++------------
24 drivers/infiniband/ulp/iser/iscsi_iser.h | 1 +
25 drivers/infiniband/ulp/iser/iser_initiator.c | 30 +++++++++++++++-----------
26 3 files changed, 22 insertions(+), 27 deletions(-)
27
28diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
29index 7e7373a..d5f3b69 100644
30--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
31+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
32@@ -364,6 +364,9 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session,
33 }
34 ib_conn = ep->dd_data;
35
36+ if (iser_alloc_rx_descriptors(ib_conn))
37+ return -ENOMEM;
38+
39 /* binds the iSER connection retrieved from the previously
40 * connected ep_handle to the iSCSI layer connection. exchanges
41 * connection pointers */
42@@ -398,19 +401,6 @@ iscsi_iser_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
43 iser_conn->ib_conn = NULL;
44 }
45
46-static int
47-iscsi_iser_conn_start(struct iscsi_cls_conn *cls_conn)
48-{
49- struct iscsi_conn *conn = cls_conn->dd_data;
50- int err;
51-
52- err = iser_conn_set_full_featured_mode(conn);
53- if (err)
54- return err;
55-
56- return iscsi_conn_start(cls_conn);
57-}
58-
59 static void iscsi_iser_session_destroy(struct iscsi_cls_session *cls_session)
60 {
61 struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
62@@ -724,7 +714,7 @@ static struct iscsi_transport iscsi_iser_transport = {
63 .get_conn_param = iscsi_conn_get_param,
64 .get_ep_param = iscsi_iser_get_ep_param,
65 .get_session_param = iscsi_session_get_param,
66- .start_conn = iscsi_iser_conn_start,
67+ .start_conn = iscsi_conn_start,
68 .stop_conn = iscsi_iser_conn_stop,
69 /* iscsi host params */
70 .get_host_param = iscsi_host_get_param,
71diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
72index db7ea37..296be43 100644
73--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
74+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
75@@ -366,4 +366,5 @@ int iser_dma_map_task_data(struct iscsi_iser_task *iser_task,
76 void iser_dma_unmap_task_data(struct iscsi_iser_task *iser_task);
77 int iser_initialize_task_headers(struct iscsi_task *task,
78 struct iser_tx_desc *tx_desc);
79+int iser_alloc_rx_descriptors(struct iser_conn *ib_conn);
80 #endif
81diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
82index a607542..738a149 100644
83--- a/drivers/infiniband/ulp/iser/iser_initiator.c
84+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
85@@ -170,7 +170,7 @@ static void iser_create_send_desc(struct iser_conn *ib_conn,
86 }
87
88
89-static int iser_alloc_rx_descriptors(struct iser_conn *ib_conn)
90+int iser_alloc_rx_descriptors(struct iser_conn *ib_conn)
91 {
92 int i, j;
93 u64 dma_addr;
94@@ -242,23 +242,24 @@ void iser_free_rx_descriptors(struct iser_conn *ib_conn)
95 kfree(ib_conn->rx_descs);
96 }
97
98-/**
99- * iser_conn_set_full_featured_mode - (iSER API)
100- */
101-int iser_conn_set_full_featured_mode(struct iscsi_conn *conn)
102+static int iser_post_rx_bufs(struct iscsi_conn *conn, struct iscsi_hdr *req)
103 {
104 struct iscsi_iser_conn *iser_conn = conn->dd_data;
105
106- iser_dbg("Initially post: %d\n", ISER_MIN_POSTED_RX);
107-
108- /* Check that there is no posted recv or send buffers left - */
109- /* they must be consumed during the login phase */
110- BUG_ON(iser_conn->ib_conn->post_recv_buf_count != 0);
111- BUG_ON(atomic_read(&iser_conn->ib_conn->post_send_buf_count) != 0);
112+ iser_dbg("req op %x flags %x\n", req->opcode, req->flags);
113+ /* check if this is the last login - going to full feature phase */
114+ if ((req->flags & ISCSI_FULL_FEATURE_PHASE) != ISCSI_FULL_FEATURE_PHASE)
115+ return 0;
116
117- if (iser_alloc_rx_descriptors(iser_conn->ib_conn))
118- return -ENOMEM;
119+ /*
120+ * Check that there is one posted recv buffer (for the last login
121+ * response) and no posted send buffers left - they must have been
122+ * consumed during previous login phases.
123+ */
124+ WARN_ON(iser_conn->ib_conn->post_recv_buf_count != 1);
125+ WARN_ON(atomic_read(&iser_conn->ib_conn->post_send_buf_count) != 0);
126
127+ iser_dbg("Initially post: %d\n", ISER_MIN_POSTED_RX);
128 /* Initial post receive buffers */
129 if (iser_post_recvm(iser_conn->ib_conn, ISER_MIN_POSTED_RX))
130 return -ENOMEM;
131@@ -438,6 +439,9 @@ int iser_send_control(struct iscsi_conn *conn,
132 err = iser_post_recvl(iser_conn->ib_conn);
133 if (err)
134 goto send_control_error;
135+ err = iser_post_rx_bufs(conn, task->hdr);
136+ if (err)
137+ goto send_control_error;
138 }
139
140 err = iser_post_send(iser_conn->ib_conn, mdesc);
141--
1421.7.9.4
143
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0050-ima-fix-Kconfig-dependencies.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0050-ima-fix-Kconfig-dependencies.patch
new file mode 100644
index 00000000..d1add071
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0050-ima-fix-Kconfig-dependencies.patch
@@ -0,0 +1,49 @@
1From 48128d2a875a34aeef5b89ed93e2887179534b33 Mon Sep 17 00:00:00 2001
2From: Fabio Estevam <festevam@gmail.com>
3Date: Thu, 5 Jan 2012 12:49:54 -0200
4Subject: [PATCH 050/147] ima: fix Kconfig dependencies
5
6commit f4a0391dfa91155bd961673b31eb42d9d45c799d upstream.
7
8Fix the following build warning:
9warning: (IMA) selects TCG_TPM which has unmet direct dependencies
10(HAS_IOMEM && EXPERIMENTAL)
11
12Suggested-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
13Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
14Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
15Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/char/tpm/Kconfig | 1 -
19 security/integrity/ima/Kconfig | 2 +-
20 2 files changed, 1 insertion(+), 2 deletions(-)
21
22diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
23index fa567f1..c9e045c 100644
24--- a/drivers/char/tpm/Kconfig
25+++ b/drivers/char/tpm/Kconfig
26@@ -5,7 +5,6 @@
27 menuconfig TCG_TPM
28 tristate "TPM Hardware Support"
29 depends on HAS_IOMEM
30- depends on EXPERIMENTAL
31 select SECURITYFS
32 ---help---
33 If you have a TPM security chip in your system, which
34diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
35index 4f554f2..063298a 100644
36--- a/security/integrity/ima/Kconfig
37+++ b/security/integrity/ima/Kconfig
38@@ -9,7 +9,7 @@ config IMA
39 select CRYPTO_HMAC
40 select CRYPTO_MD5
41 select CRYPTO_SHA1
42- select TCG_TPM if !S390 && !UML
43+ select TCG_TPM if HAS_IOMEM && !UML
44 select TCG_TIS if TCG_TPM
45 help
46 The Trusted Computing Group(TCG) runtime Integrity
47--
481.7.9.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0051-x86-ioapic-Add-register-level-checks-to-detect-bogus.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0051-x86-ioapic-Add-register-level-checks-to-detect-bogus.patch
new file mode 100644
index 00000000..a5030626
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0051-x86-ioapic-Add-register-level-checks-to-detect-bogus.patch
@@ -0,0 +1,113 @@
1From 817b882783a89bae08689d9eff2b5af91f44c4e1 Mon Sep 17 00:00:00 2001
2From: Suresh Siddha <suresh.b.siddha@intel.com>
3Date: Mon, 12 Mar 2012 11:36:33 -0700
4Subject: [PATCH 051/147] x86/ioapic: Add register level checks to detect
5 bogus io-apic entries
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 73d63d038ee9f769f5e5b46792d227fe20e442c5 upstream.
11
12With the recent changes to clear_IO_APIC_pin() which tries to
13clear remoteIRR bit explicitly, some of the users started to see
14"Unable to reset IRR for apic .." messages.
15
16Close look shows that these are related to bogus IO-APIC entries
17which return's all 1's for their io-apic registers. And the
18above mentioned error messages are benign. But kernel should
19have ignored such io-apic's in the first place.
20
21Check if register 0, 1, 2 of the listed io-apic are all 1's and
22ignore such io-apic.
23
24Reported-by: ??lvaro Castillo <midgoon@gmail.com>
25Tested-by: Jon Dufresne <jon@jondufresne.org>
26Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
27Cc: yinghai@kernel.org
28Cc: kernel-team@fedoraproject.org
29Cc: Josh Boyer <jwboyer@redhat.com>
30Link: http://lkml.kernel.org/r/1331577393.31585.94.camel@sbsiddha-desk.sc.intel.com
31[ Performed minor cleanup of affected code. ]
32Signed-off-by: Ingo Molnar <mingo@elte.hu>
33Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34---
35 arch/x86/kernel/apic/io_apic.c | 40 ++++++++++++++++++++++++++++++++--------
36 1 file changed, 32 insertions(+), 8 deletions(-)
37
38diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
39index 6d939d7..a25e276 100644
40--- a/arch/x86/kernel/apic/io_apic.c
41+++ b/arch/x86/kernel/apic/io_apic.c
42@@ -3963,18 +3963,36 @@ int mp_find_ioapic_pin(int ioapic, u32 gsi)
43 static __init int bad_ioapic(unsigned long address)
44 {
45 if (nr_ioapics >= MAX_IO_APICS) {
46- printk(KERN_WARNING "WARNING: Max # of I/O APICs (%d) exceeded "
47- "(found %d), skipping\n", MAX_IO_APICS, nr_ioapics);
48+ pr_warn("WARNING: Max # of I/O APICs (%d) exceeded (found %d), skipping\n",
49+ MAX_IO_APICS, nr_ioapics);
50 return 1;
51 }
52 if (!address) {
53- printk(KERN_WARNING "WARNING: Bogus (zero) I/O APIC address"
54- " found in table, skipping!\n");
55+ pr_warn("WARNING: Bogus (zero) I/O APIC address found in table, skipping!\n");
56 return 1;
57 }
58 return 0;
59 }
60
61+static __init int bad_ioapic_register(int idx)
62+{
63+ union IO_APIC_reg_00 reg_00;
64+ union IO_APIC_reg_01 reg_01;
65+ union IO_APIC_reg_02 reg_02;
66+
67+ reg_00.raw = io_apic_read(idx, 0);
68+ reg_01.raw = io_apic_read(idx, 1);
69+ reg_02.raw = io_apic_read(idx, 2);
70+
71+ if (reg_00.raw == -1 && reg_01.raw == -1 && reg_02.raw == -1) {
72+ pr_warn("I/O APIC 0x%x registers return all ones, skipping!\n",
73+ mpc_ioapic_addr(idx));
74+ return 1;
75+ }
76+
77+ return 0;
78+}
79+
80 void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
81 {
82 int idx = 0;
83@@ -3991,6 +4009,12 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
84 ioapics[idx].mp_config.apicaddr = address;
85
86 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
87+
88+ if (bad_ioapic_register(idx)) {
89+ clear_fixmap(FIX_IO_APIC_BASE_0 + idx);
90+ return;
91+ }
92+
93 ioapics[idx].mp_config.apicid = io_apic_unique_id(id);
94 ioapics[idx].mp_config.apicver = io_apic_get_version(idx);
95
96@@ -4011,10 +4035,10 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
97 if (gsi_cfg->gsi_end >= gsi_top)
98 gsi_top = gsi_cfg->gsi_end + 1;
99
100- printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
101- "GSI %d-%d\n", idx, mpc_ioapic_id(idx),
102- mpc_ioapic_ver(idx), mpc_ioapic_addr(idx),
103- gsi_cfg->gsi_base, gsi_cfg->gsi_end);
104+ pr_info("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, GSI %d-%d\n",
105+ idx, mpc_ioapic_id(idx),
106+ mpc_ioapic_ver(idx), mpc_ioapic_addr(idx),
107+ gsi_cfg->gsi_base, gsi_cfg->gsi_end);
108
109 nr_ioapics++;
110 }
111--
1121.7.9.4
113
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0052-mm-thp-fix-pmd_bad-triggering-in-code-paths-holding-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0052-mm-thp-fix-pmd_bad-triggering-in-code-paths-holding-.patch
new file mode 100644
index 00000000..d281a103
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0052-mm-thp-fix-pmd_bad-triggering-in-code-paths-holding-.patch
@@ -0,0 +1,480 @@
1From 11c78e244603f384d1f8cebc627823cc01e952eb Mon Sep 17 00:00:00 2001
2From: Andrea Arcangeli <aarcange@redhat.com>
3Date: Wed, 21 Mar 2012 16:33:42 -0700
4Subject: [PATCH 052/147] mm: thp: fix pmd_bad() triggering in code paths
5 holding mmap_sem read mode
6
7commit 1a5a9906d4e8d1976b701f889d8f35d54b928f25 upstream.
8
9In some cases it may happen that pmd_none_or_clear_bad() is called with
10the mmap_sem hold in read mode. In those cases the huge page faults can
11allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
12false positive from pmd_bad() that will not like to see a pmd
13materializing as trans huge.
14
15It's not khugepaged causing the problem, khugepaged holds the mmap_sem
16in write mode (and all those sites must hold the mmap_sem in read mode
17to prevent pagetables to go away from under them, during code review it
18seems vm86 mode on 32bit kernels requires that too unless it's
19restricted to 1 thread per process or UP builds). The race is only with
20the huge pagefaults that can convert a pmd_none() into a
21pmd_trans_huge().
22
23Effectively all these pmd_none_or_clear_bad() sites running with
24mmap_sem in read mode are somewhat speculative with the page faults, and
25the result is always undefined when they run simultaneously. This is
26probably why it wasn't common to run into this. For example if the
27madvise(MADV_DONTNEED) runs zap_page_range() shortly before the page
28fault, the hugepage will not be zapped, if the page fault runs first it
29will be zapped.
30
31Altering pmd_bad() not to error out if it finds hugepmds won't be enough
32to fix this, because zap_pmd_range would then proceed to call
33zap_pte_range (which would be incorrect if the pmd become a
34pmd_trans_huge()).
35
36The simplest way to fix this is to read the pmd in the local stack
37(regardless of what we read, no need of actual CPU barriers, only
38compiler barrier needed), and be sure it is not changing under the code
39that computes its value. Even if the real pmd is changing under the
40value we hold on the stack, we don't care. If we actually end up in
41zap_pte_range it means the pmd was not none already and it was not huge,
42and it can't become huge from under us (khugepaged locking explained
43above).
44
45All we need is to enforce that there is no way anymore that in a code
46path like below, pmd_trans_huge can be false, but pmd_none_or_clear_bad
47can run into a hugepmd. The overhead of a barrier() is just a compiler
48tweak and should not be measurable (I only added it for THP builds). I
49don't exclude different compiler versions may have prevented the race
50too by caching the value of *pmd on the stack (that hasn't been
51verified, but it wouldn't be impossible considering
52pmd_none_or_clear_bad, pmd_bad, pmd_trans_huge, pmd_none are all inlines
53and there's no external function called in between pmd_trans_huge and
54pmd_none_or_clear_bad).
55
56 if (pmd_trans_huge(*pmd)) {
57 if (next-addr != HPAGE_PMD_SIZE) {
58 VM_BUG_ON(!rwsem_is_locked(&tlb->mm->mmap_sem));
59 split_huge_page_pmd(vma->vm_mm, pmd);
60 } else if (zap_huge_pmd(tlb, vma, pmd, addr))
61 continue;
62 /* fall through */
63 }
64 if (pmd_none_or_clear_bad(pmd))
65
66Because this race condition could be exercised without special
67privileges this was reported in CVE-2012-1179.
68
69The race was identified and fully explained by Ulrich who debugged it.
70I'm quoting his accurate explanation below, for reference.
71
72====== start quote =======
73 mapcount 0 page_mapcount 1
74 kernel BUG at mm/huge_memory.c:1384!
75
76 At some point prior to the panic, a "bad pmd ..." message similar to the
77 following is logged on the console:
78
79 mm/memory.c:145: bad pmd ffff8800376e1f98(80000000314000e7).
80
81 The "bad pmd ..." message is logged by pmd_clear_bad() before it clears
82 the page's PMD table entry.
83
84 143 void pmd_clear_bad(pmd_t *pmd)
85 144 {
86 -> 145 pmd_ERROR(*pmd);
87 146 pmd_clear(pmd);
88 147 }
89
90 After the PMD table entry has been cleared, there is an inconsistency
91 between the actual number of PMD table entries that are mapping the page
92 and the page's map count (_mapcount field in struct page). When the page
93 is subsequently reclaimed, __split_huge_page() detects this inconsistency.
94
95 1381 if (mapcount != page_mapcount(page))
96 1382 printk(KERN_ERR "mapcount %d page_mapcount %d\n",
97 1383 mapcount, page_mapcount(page));
98 -> 1384 BUG_ON(mapcount != page_mapcount(page));
99
100 The root cause of the problem is a race of two threads in a multithreaded
101 process. Thread B incurs a page fault on a virtual address that has never
102 been accessed (PMD entry is zero) while Thread A is executing an madvise()
103 system call on a virtual address within the same 2 MB (huge page) range.
104
105 virtual address space
106 .---------------------.
107 | |
108 | |
109 .-|---------------------|
110 | | |
111 | | |<-- B(fault)
112 | | |
113 2 MB | |/////////////////////|-.
114 huge < |/////////////////////| > A(range)
115 page | |/////////////////////|-'
116 | | |
117 | | |
118 '-|---------------------|
119 | |
120 | |
121 '---------------------'
122
123 - Thread A is executing an madvise(..., MADV_DONTNEED) system call
124 on the virtual address range "A(range)" shown in the picture.
125
126 sys_madvise
127 // Acquire the semaphore in shared mode.
128 down_read(&current->mm->mmap_sem)
129 ...
130 madvise_vma
131 switch (behavior)
132 case MADV_DONTNEED:
133 madvise_dontneed
134 zap_page_range
135 unmap_vmas
136 unmap_page_range
137 zap_pud_range
138 zap_pmd_range
139 //
140 // Assume that this huge page has never been accessed.
141 // I.e. content of the PMD entry is zero (not mapped).
142 //
143 if (pmd_trans_huge(*pmd)) {
144 // We don't get here due to the above assumption.
145 }
146 //
147 // Assume that Thread B incurred a page fault and
148 .---------> // sneaks in here as shown below.
149 | //
150 | if (pmd_none_or_clear_bad(pmd))
151 | {
152 | if (unlikely(pmd_bad(*pmd)))
153 | pmd_clear_bad
154 | {
155 | pmd_ERROR
156 | // Log "bad pmd ..." message here.
157 | pmd_clear
158 | // Clear the page's PMD entry.
159 | // Thread B incremented the map count
160 | // in page_add_new_anon_rmap(), but
161 | // now the page is no longer mapped
162 | // by a PMD entry (-> inconsistency).
163 | }
164 | }
165 |
166 v
167 - Thread B is handling a page fault on virtual address "B(fault)" shown
168 in the picture.
169
170 ...
171 do_page_fault
172 __do_page_fault
173 // Acquire the semaphore in shared mode.
174 down_read_trylock(&mm->mmap_sem)
175 ...
176 handle_mm_fault
177 if (pmd_none(*pmd) && transparent_hugepage_enabled(vma))
178 // We get here due to the above assumption (PMD entry is zero).
179 do_huge_pmd_anonymous_page
180 alloc_hugepage_vma
181 // Allocate a new transparent huge page here.
182 ...
183 __do_huge_pmd_anonymous_page
184 ...
185 spin_lock(&mm->page_table_lock)
186 ...
187 page_add_new_anon_rmap
188 // Here we increment the page's map count (starts at -1).
189 atomic_set(&page->_mapcount, 0)
190 set_pmd_at
191 // Here we set the page's PMD entry which will be cleared
192 // when Thread A calls pmd_clear_bad().
193 ...
194 spin_unlock(&mm->page_table_lock)
195
196 The mmap_sem does not prevent the race because both threads are acquiring
197 it in shared mode (down_read). Thread B holds the page_table_lock while
198 the page's map count and PMD table entry are updated. However, Thread A
199 does not synchronize on that lock.
200
201====== end quote =======
202
203[akpm@linux-foundation.org: checkpatch fixes]
204Reported-by: Ulrich Obergfell <uobergfe@redhat.com>
205Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
206Acked-by: Johannes Weiner <hannes@cmpxchg.org>
207Cc: Mel Gorman <mgorman@suse.de>
208Cc: Hugh Dickins <hughd@google.com>
209Cc: Dave Jones <davej@redhat.com>
210Acked-by: Larry Woodman <lwoodman@redhat.com>
211Acked-by: Rik van Riel <riel@redhat.com>
212Cc: Mark Salter <msalter@redhat.com>
213Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
214Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
215Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
216---
217 arch/x86/kernel/vm86_32.c | 2 ++
218 fs/proc/task_mmu.c | 9 ++++++
219 include/asm-generic/pgtable.h | 61 +++++++++++++++++++++++++++++++++++++++++
220 mm/memcontrol.c | 4 +++
221 mm/memory.c | 16 ++++++++---
222 mm/mempolicy.c | 2 +-
223 mm/mincore.c | 2 +-
224 mm/pagewalk.c | 2 +-
225 mm/swapfile.c | 4 +--
226 9 files changed, 92 insertions(+), 10 deletions(-)
227
228diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
229index 863f875..04b8726 100644
230--- a/arch/x86/kernel/vm86_32.c
231+++ b/arch/x86/kernel/vm86_32.c
232@@ -172,6 +172,7 @@ static void mark_screen_rdonly(struct mm_struct *mm)
233 spinlock_t *ptl;
234 int i;
235
236+ down_write(&mm->mmap_sem);
237 pgd = pgd_offset(mm, 0xA0000);
238 if (pgd_none_or_clear_bad(pgd))
239 goto out;
240@@ -190,6 +191,7 @@ static void mark_screen_rdonly(struct mm_struct *mm)
241 }
242 pte_unmap_unlock(pte, ptl);
243 out:
244+ up_write(&mm->mmap_sem);
245 flush_tlb();
246 }
247
248diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
249index 7dcd2a2..3efa725 100644
250--- a/fs/proc/task_mmu.c
251+++ b/fs/proc/task_mmu.c
252@@ -409,6 +409,9 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
253 } else {
254 spin_unlock(&walk->mm->page_table_lock);
255 }
256+
257+ if (pmd_trans_unstable(pmd))
258+ return 0;
259 /*
260 * The mmap_sem held all the way back in m_start() is what
261 * keeps khugepaged out of here and from collapsing things
262@@ -507,6 +510,8 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
263 struct page *page;
264
265 split_huge_page_pmd(walk->mm, pmd);
266+ if (pmd_trans_unstable(pmd))
267+ return 0;
268
269 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
270 for (; addr != end; pte++, addr += PAGE_SIZE) {
271@@ -670,6 +675,8 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
272 int err = 0;
273
274 split_huge_page_pmd(walk->mm, pmd);
275+ if (pmd_trans_unstable(pmd))
276+ return 0;
277
278 /* find the first VMA at or above 'addr' */
279 vma = find_vma(walk->mm, addr);
280@@ -961,6 +968,8 @@ static int gather_pte_stats(pmd_t *pmd, unsigned long addr,
281 spin_unlock(&walk->mm->page_table_lock);
282 }
283
284+ if (pmd_trans_unstable(pmd))
285+ return 0;
286 orig_pte = pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
287 do {
288 struct page *page = can_gather_numa_stats(*pte, md->vma, addr);
289diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
290index 76bff2b..a03c098 100644
291--- a/include/asm-generic/pgtable.h
292+++ b/include/asm-generic/pgtable.h
293@@ -425,6 +425,8 @@ extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
294 unsigned long size);
295 #endif
296
297+#ifdef CONFIG_MMU
298+
299 #ifndef CONFIG_TRANSPARENT_HUGEPAGE
300 static inline int pmd_trans_huge(pmd_t pmd)
301 {
302@@ -441,7 +443,66 @@ static inline int pmd_write(pmd_t pmd)
303 return 0;
304 }
305 #endif /* __HAVE_ARCH_PMD_WRITE */
306+#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
307+
308+/*
309+ * This function is meant to be used by sites walking pagetables with
310+ * the mmap_sem hold in read mode to protect against MADV_DONTNEED and
311+ * transhuge page faults. MADV_DONTNEED can convert a transhuge pmd
312+ * into a null pmd and the transhuge page fault can convert a null pmd
313+ * into an hugepmd or into a regular pmd (if the hugepage allocation
314+ * fails). While holding the mmap_sem in read mode the pmd becomes
315+ * stable and stops changing under us only if it's not null and not a
316+ * transhuge pmd. When those races occurs and this function makes a
317+ * difference vs the standard pmd_none_or_clear_bad, the result is
318+ * undefined so behaving like if the pmd was none is safe (because it
319+ * can return none anyway). The compiler level barrier() is critically
320+ * important to compute the two checks atomically on the same pmdval.
321+ */
322+static inline int pmd_none_or_trans_huge_or_clear_bad(pmd_t *pmd)
323+{
324+ /* depend on compiler for an atomic pmd read */
325+ pmd_t pmdval = *pmd;
326+ /*
327+ * The barrier will stabilize the pmdval in a register or on
328+ * the stack so that it will stop changing under the code.
329+ */
330+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
331+ barrier();
332+#endif
333+ if (pmd_none(pmdval))
334+ return 1;
335+ if (unlikely(pmd_bad(pmdval))) {
336+ if (!pmd_trans_huge(pmdval))
337+ pmd_clear_bad(pmd);
338+ return 1;
339+ }
340+ return 0;
341+}
342+
343+/*
344+ * This is a noop if Transparent Hugepage Support is not built into
345+ * the kernel. Otherwise it is equivalent to
346+ * pmd_none_or_trans_huge_or_clear_bad(), and shall only be called in
347+ * places that already verified the pmd is not none and they want to
348+ * walk ptes while holding the mmap sem in read mode (write mode don't
349+ * need this). If THP is not enabled, the pmd can't go away under the
350+ * code even if MADV_DONTNEED runs, but if THP is enabled we need to
351+ * run a pmd_trans_unstable before walking the ptes after
352+ * split_huge_page_pmd returns (because it may have run when the pmd
353+ * become null, but then a page fault can map in a THP and not a
354+ * regular page).
355+ */
356+static inline int pmd_trans_unstable(pmd_t *pmd)
357+{
358+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
359+ return pmd_none_or_trans_huge_or_clear_bad(pmd);
360+#else
361+ return 0;
362 #endif
363+}
364+
365+#endif /* CONFIG_MMU */
366
367 #endif /* !__ASSEMBLY__ */
368
369diff --git a/mm/memcontrol.c b/mm/memcontrol.c
370index de67e91..778554f 100644
371--- a/mm/memcontrol.c
372+++ b/mm/memcontrol.c
373@@ -5237,6 +5237,8 @@ static int mem_cgroup_count_precharge_pte_range(pmd_t *pmd,
374 spinlock_t *ptl;
375
376 split_huge_page_pmd(walk->mm, pmd);
377+ if (pmd_trans_unstable(pmd))
378+ return 0;
379
380 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
381 for (; addr != end; pte++, addr += PAGE_SIZE)
382@@ -5398,6 +5400,8 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd,
383 spinlock_t *ptl;
384
385 split_huge_page_pmd(walk->mm, pmd);
386+ if (pmd_trans_unstable(pmd))
387+ return 0;
388 retry:
389 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
390 for (; addr != end; addr += PAGE_SIZE) {
391diff --git a/mm/memory.c b/mm/memory.c
392index 829d437..1b1ca17 100644
393--- a/mm/memory.c
394+++ b/mm/memory.c
395@@ -1228,16 +1228,24 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb,
396 do {
397 next = pmd_addr_end(addr, end);
398 if (pmd_trans_huge(*pmd)) {
399- if (next-addr != HPAGE_PMD_SIZE) {
400+ if (next - addr != HPAGE_PMD_SIZE) {
401 VM_BUG_ON(!rwsem_is_locked(&tlb->mm->mmap_sem));
402 split_huge_page_pmd(vma->vm_mm, pmd);
403 } else if (zap_huge_pmd(tlb, vma, pmd))
404- continue;
405+ goto next;
406 /* fall through */
407 }
408- if (pmd_none_or_clear_bad(pmd))
409- continue;
410+ /*
411+ * Here there can be other concurrent MADV_DONTNEED or
412+ * trans huge page faults running, and if the pmd is
413+ * none or trans huge it can change under us. This is
414+ * because MADV_DONTNEED holds the mmap_sem in read
415+ * mode.
416+ */
417+ if (pmd_none_or_trans_huge_or_clear_bad(pmd))
418+ goto next;
419 next = zap_pte_range(tlb, vma, pmd, addr, next, details);
420+next:
421 cond_resched();
422 } while (pmd++, addr = next, addr != end);
423
424diff --git a/mm/mempolicy.c b/mm/mempolicy.c
425index c3fdbcb..b26aae2 100644
426--- a/mm/mempolicy.c
427+++ b/mm/mempolicy.c
428@@ -512,7 +512,7 @@ static inline int check_pmd_range(struct vm_area_struct *vma, pud_t *pud,
429 do {
430 next = pmd_addr_end(addr, end);
431 split_huge_page_pmd(vma->vm_mm, pmd);
432- if (pmd_none_or_clear_bad(pmd))
433+ if (pmd_none_or_trans_huge_or_clear_bad(pmd))
434 continue;
435 if (check_pte_range(vma, pmd, addr, next, nodes,
436 flags, private))
437diff --git a/mm/mincore.c b/mm/mincore.c
438index 636a868..936b4ce 100644
439--- a/mm/mincore.c
440+++ b/mm/mincore.c
441@@ -164,7 +164,7 @@ static void mincore_pmd_range(struct vm_area_struct *vma, pud_t *pud,
442 }
443 /* fall through */
444 }
445- if (pmd_none_or_clear_bad(pmd))
446+ if (pmd_none_or_trans_huge_or_clear_bad(pmd))
447 mincore_unmapped_range(vma, addr, next, vec);
448 else
449 mincore_pte_range(vma, pmd, addr, next, vec);
450diff --git a/mm/pagewalk.c b/mm/pagewalk.c
451index 2f5cf10..aa9701e 100644
452--- a/mm/pagewalk.c
453+++ b/mm/pagewalk.c
454@@ -59,7 +59,7 @@ again:
455 continue;
456
457 split_huge_page_pmd(walk->mm, pmd);
458- if (pmd_none_or_clear_bad(pmd))
459+ if (pmd_none_or_trans_huge_or_clear_bad(pmd))
460 goto again;
461 err = walk_pte_range(pmd, addr, next, walk);
462 if (err)
463diff --git a/mm/swapfile.c b/mm/swapfile.c
464index b1cd120..2015a1e 100644
465--- a/mm/swapfile.c
466+++ b/mm/swapfile.c
467@@ -931,9 +931,7 @@ static inline int unuse_pmd_range(struct vm_area_struct *vma, pud_t *pud,
468 pmd = pmd_offset(pud, addr);
469 do {
470 next = pmd_addr_end(addr, end);
471- if (unlikely(pmd_trans_huge(*pmd)))
472- continue;
473- if (pmd_none_or_clear_bad(pmd))
474+ if (pmd_none_or_trans_huge_or_clear_bad(pmd))
475 continue;
476 ret = unuse_pte_range(vma, pmd, addr, next, entry, page);
477 if (ret)
478--
4791.7.9.4
480
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0053-TPM-Zero-buffer-whole-after-copying-to-userspace.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0053-TPM-Zero-buffer-whole-after-copying-to-userspace.patch
new file mode 100644
index 00000000..026e58dd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0053-TPM-Zero-buffer-whole-after-copying-to-userspace.patch
@@ -0,0 +1,46 @@
1From 6afa33c872ff109ed854c7dcec52130732f9e62e Mon Sep 17 00:00:00 2001
2From: Tim Gardner <tim.gardner@canonical.com>
3Date: Tue, 6 Dec 2011 11:29:20 -0700
4Subject: [PATCH 053/147] TPM: Zero buffer whole after copying to userspace
5
6commit 3ab1aff89477dafb1aaeafe8c8669114a02b7226 upstream.
7
8Commit 3321c07ae5068568cd61ac9f4ba749006a7185c9 correctly clears the TPM
9buffer if the user specified read length is >= the TPM buffer length. However,
10if the user specified read length is < the TPM buffer length, then part of the
11TPM buffer is left uncleared.
12
13Reported-by: Seth Forshee <seth.forshee@canonical.com>
14Cc: Debora Velarde <debora@linux.vnet.ibm.com>
15Cc: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
16Cc: Marcel Selhorst <m.selhorst@sirrix.com>
17Cc: tpmdd-devel@lists.sourceforge.net
18Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
19Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 drivers/char/tpm/tpm.c | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
26index 361a1df..b366b34 100644
27--- a/drivers/char/tpm/tpm.c
28+++ b/drivers/char/tpm/tpm.c
29@@ -1115,12 +1115,13 @@ ssize_t tpm_read(struct file *file, char __user *buf,
30 ret_size = atomic_read(&chip->data_pending);
31 atomic_set(&chip->data_pending, 0);
32 if (ret_size > 0) { /* relay data */
33+ ssize_t orig_ret_size = ret_size;
34 if (size < ret_size)
35 ret_size = size;
36
37 mutex_lock(&chip->buffer_mutex);
38 rc = copy_to_user(buf, chip->data_buffer, ret_size);
39- memset(chip->data_buffer, 0, ret_size);
40+ memset(chip->data_buffer, 0, orig_ret_size);
41 if (rc)
42 ret_size = -EFAULT;
43
44--
451.7.9.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0054-PM-Domains-Fix-handling-of-wakeup-devices-during-sys.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0054-PM-Domains-Fix-handling-of-wakeup-devices-during-sys.patch
new file mode 100644
index 00000000..5541122d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0054-PM-Domains-Fix-handling-of-wakeup-devices-during-sys.patch
@@ -0,0 +1,51 @@
1From 51962c5f291ab2abb638e6121c36fbaa93a9567c Mon Sep 17 00:00:00 2001
2From: "Rafael J. Wysocki" <rjw@sisk.pl>
3Date: Tue, 13 Mar 2012 22:39:31 +0100
4Subject: [PATCH 054/147] PM / Domains: Fix handling of wakeup devices during
5 system resume
6
7commit cc85b20780562d404e18a47b9b55b4a5102ae53e upstream.
8
9During system suspend pm_genpd_suspend_noirq() checks if the given
10device is in a wakeup path (i.e. it appears to be needed for one or
11more wakeup devices to work or is a wakeup device itself) and if it
12needs to be "active" for wakeup to work. If that is the case, the
13function returns 0 without incrementing the device domain's counter
14of suspended devices and without executing genpd_stop_dev() for the
15device. In consequence, the device is not stopped (e.g. its clock
16isn't disabled) and power is always supplied to its domain in the
17resulting system sleep state.
18
19However, pm_genpd_resume_noirq() doesn't repeat that check and it
20runs genpd_start_dev() and decrements the domain's counter of
21suspended devices even for the wakeup device that weren't stopped by
22pm_genpd_suspend_noirq(). As a result, the start callback may be run
23unnecessarily for them and their domains' counters of suspended
24devices may become negative. Both outcomes aren't desirable, so fix
25pm_genpd_resume_noirq() to look for wakeup devices that might not be
26stopped by during system suspend.
27
28Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
29Tested-by: Simon Horman <horms@verge.net.au>
30Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31---
32 drivers/base/power/domain.c | 3 ++-
33 1 file changed, 2 insertions(+), 1 deletion(-)
34
35diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
36index 6790cf7..79038e5 100644
37--- a/drivers/base/power/domain.c
38+++ b/drivers/base/power/domain.c
39@@ -751,7 +751,8 @@ static int pm_genpd_resume_noirq(struct device *dev)
40 if (IS_ERR(genpd))
41 return -EINVAL;
42
43- if (genpd->suspend_power_off)
44+ if (genpd->suspend_power_off
45+ || (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)))
46 return 0;
47
48 /*
49--
501.7.9.4
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0055-bootmem-sparsemem-remove-limit-constraint-in-alloc_b.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0055-bootmem-sparsemem-remove-limit-constraint-in-alloc_b.patch
new file mode 100644
index 00000000..0ec6e155
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0055-bootmem-sparsemem-remove-limit-constraint-in-alloc_b.patch
@@ -0,0 +1,147 @@
1From ad2b33f9aee5de482d4077bcd81d6afde2935336 Mon Sep 17 00:00:00 2001
2From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
3Date: Wed, 21 Mar 2012 16:34:07 -0700
4Subject: [PATCH 055/147] bootmem/sparsemem: remove limit constraint in
5 alloc_bootmem_section
6
7commit f5bf18fa22f8c41a13eb8762c7373eb3a93a7333 upstream.
8
9While testing AMS (Active Memory Sharing) / CMO (Cooperative Memory
10Overcommit) on powerpc, we tripped the following:
11
12 kernel BUG at mm/bootmem.c:483!
13 cpu 0x0: Vector: 700 (Program Check) at [c000000000c03940]
14 pc: c000000000a62bd8: .alloc_bootmem_core+0x90/0x39c
15 lr: c000000000a64bcc: .sparse_early_usemaps_alloc_node+0x84/0x29c
16 sp: c000000000c03bc0
17 msr: 8000000000021032
18 current = 0xc000000000b0cce0
19 paca = 0xc000000001d80000
20 pid = 0, comm = swapper
21 kernel BUG at mm/bootmem.c:483!
22 enter ? for help
23 [c000000000c03c80] c000000000a64bcc
24 .sparse_early_usemaps_alloc_node+0x84/0x29c
25 [c000000000c03d50] c000000000a64f10 .sparse_init+0x12c/0x28c
26 [c000000000c03e20] c000000000a474f4 .setup_arch+0x20c/0x294
27 [c000000000c03ee0] c000000000a4079c .start_kernel+0xb4/0x460
28 [c000000000c03f90] c000000000009670 .start_here_common+0x1c/0x2c
29
30This is
31
32 BUG_ON(limit && goal + size > limit);
33
34and after some debugging, it seems that
35
36 goal = 0x7ffff000000
37 limit = 0x80000000000
38
39and sparse_early_usemaps_alloc_node ->
40sparse_early_usemaps_alloc_pgdat_section calls
41
42 return alloc_bootmem_section(usemap_size() * count, section_nr);
43
44This is on a system with 8TB available via the AMS pool, and as a quirk
45of AMS in firmware, all of that memory shows up in node 0. So, we end
46up with an allocation that will fail the goal/limit constraints.
47
48In theory, we could "fall-back" to alloc_bootmem_node() in
49sparse_early_usemaps_alloc_node(), but since we actually have HOTREMOVE
50defined, we'll BUG_ON() instead. A simple solution appears to be to
51unconditionally remove the limit condition in alloc_bootmem_section,
52meaning allocations are allowed to cross section boundaries (necessary
53for systems of this size).
54
55Johannes Weiner pointed out that if alloc_bootmem_section() no longer
56guarantees section-locality, we need check_usemap_section_nr() to print
57possible cross-dependencies between node descriptors and the usemaps
58allocated through it. That makes the two loops in
59sparse_early_usemaps_alloc_node() identical, so re-factor the code a
60bit.
61
62[akpm@linux-foundation.org: code simplification]
63Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
64Cc: Dave Hansen <haveblue@us.ibm.com>
65Cc: Anton Blanchard <anton@au1.ibm.com>
66Cc: Paul Mackerras <paulus@samba.org>
67Cc: Ben Herrenschmidt <benh@kernel.crashing.org>
68Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
69Acked-by: Johannes Weiner <hannes@cmpxchg.org>
70Acked-by: Mel Gorman <mgorman@suse.de>
71Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
72Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
73Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
74---
75 mm/bootmem.c | 5 ++---
76 mm/sparse.c | 30 +++++++++++-------------------
77 2 files changed, 13 insertions(+), 22 deletions(-)
78
79diff --git a/mm/bootmem.c b/mm/bootmem.c
80index 1a77012..b863822 100644
81--- a/mm/bootmem.c
82+++ b/mm/bootmem.c
83@@ -768,14 +768,13 @@ void * __init alloc_bootmem_section(unsigned long size,
84 unsigned long section_nr)
85 {
86 bootmem_data_t *bdata;
87- unsigned long pfn, goal, limit;
88+ unsigned long pfn, goal;
89
90 pfn = section_nr_to_pfn(section_nr);
91 goal = pfn << PAGE_SHIFT;
92- limit = section_nr_to_pfn(section_nr + 1) << PAGE_SHIFT;
93 bdata = &bootmem_node_data[early_pfn_to_nid(pfn)];
94
95- return alloc_bootmem_core(bdata, size, SMP_CACHE_BYTES, goal, limit);
96+ return alloc_bootmem_core(bdata, size, SMP_CACHE_BYTES, goal, 0);
97 }
98 #endif
99
100diff --git a/mm/sparse.c b/mm/sparse.c
101index 61d7cde..a8bc7d3 100644
102--- a/mm/sparse.c
103+++ b/mm/sparse.c
104@@ -353,29 +353,21 @@ static void __init sparse_early_usemaps_alloc_node(unsigned long**usemap_map,
105
106 usemap = sparse_early_usemaps_alloc_pgdat_section(NODE_DATA(nodeid),
107 usemap_count);
108- if (usemap) {
109- for (pnum = pnum_begin; pnum < pnum_end; pnum++) {
110- if (!present_section_nr(pnum))
111- continue;
112- usemap_map[pnum] = usemap;
113- usemap += size;
114+ if (!usemap) {
115+ usemap = alloc_bootmem_node(NODE_DATA(nodeid), size * usemap_count);
116+ if (!usemap) {
117+ printk(KERN_WARNING "%s: allocation failed\n", __func__);
118+ return;
119 }
120- return;
121 }
122
123- usemap = alloc_bootmem_node(NODE_DATA(nodeid), size * usemap_count);
124- if (usemap) {
125- for (pnum = pnum_begin; pnum < pnum_end; pnum++) {
126- if (!present_section_nr(pnum))
127- continue;
128- usemap_map[pnum] = usemap;
129- usemap += size;
130- check_usemap_section_nr(nodeid, usemap_map[pnum]);
131- }
132- return;
133+ for (pnum = pnum_begin; pnum < pnum_end; pnum++) {
134+ if (!present_section_nr(pnum))
135+ continue;
136+ usemap_map[pnum] = usemap;
137+ usemap += size;
138+ check_usemap_section_nr(nodeid, usemap_map[pnum]);
139 }
140-
141- printk(KERN_WARNING "%s: allocation failed\n", __func__);
142 }
143
144 #ifndef CONFIG_SPARSEMEM_VMEMMAP
145--
1461.7.9.4
147
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0056-hugetlbfs-avoid-taking-i_mutex-from-hugetlbfs_read.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0056-hugetlbfs-avoid-taking-i_mutex-from-hugetlbfs_read.patch
new file mode 100644
index 00000000..d5cfc261
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0056-hugetlbfs-avoid-taking-i_mutex-from-hugetlbfs_read.patch
@@ -0,0 +1,140 @@
1From 2bc105d9e4132f8a07cec0b5df3d308c1b99455f Mon Sep 17 00:00:00 2001
2From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
3Date: Wed, 21 Mar 2012 16:34:08 -0700
4Subject: [PATCH 056/147] hugetlbfs: avoid taking i_mutex from
5 hugetlbfs_read()
6
7commit a05b0855fd15504972dba2358e5faa172a1e50ba upstream.
8
9Taking i_mutex in hugetlbfs_read() can result in deadlock with mmap as
10explained below
11
12 Thread A:
13 read() on hugetlbfs
14 hugetlbfs_read() called
15 i_mutex grabbed
16 hugetlbfs_read_actor() called
17 __copy_to_user() called
18 page fault is triggered
19 Thread B, sharing address space with A:
20 mmap() the same file
21 ->mmap_sem is grabbed on task_B->mm->mmap_sem
22 hugetlbfs_file_mmap() is called
23 attempt to grab ->i_mutex and block waiting for A to give it up
24 Thread A:
25 pagefault handled blocked on attempt to grab task_A->mm->mmap_sem,
26 which happens to be the same thing as task_B->mm->mmap_sem. Block waiting
27 for B to give it up.
28
29AFAIU the i_mutex locking was added to hugetlbfs_read() as per
30http://lkml.indiana.edu/hypermail/linux/kernel/0707.2/3066.html to take
31care of the race between truncate and read. This patch fixes this by
32looking at page->mapping under lock_page() (find_lock_page()) to ensure
33that the inode didn't get truncated in the range during a parallel read.
34
35Ideally we can extend the patch to make sure we don't increase i_size in
36mmap. But that will break userspace, because applications will now have
37to use truncate(2) to increase i_size in hugetlbfs.
38
39Based on the original patch from Hillf Danton.
40
41Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
42Cc: Hillf Danton <dhillf@gmail.com>
43Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
44Cc: Al Viro <viro@zeniv.linux.org.uk>
45Cc: Hugh Dickins <hughd@google.com>
46Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
47Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
48Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
49---
50 fs/hugetlbfs/inode.c | 25 +++++++++----------------
51 1 file changed, 9 insertions(+), 16 deletions(-)
52
53diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
54index 0be5a78..2d0ca24 100644
55--- a/fs/hugetlbfs/inode.c
56+++ b/fs/hugetlbfs/inode.c
57@@ -238,17 +238,10 @@ static ssize_t hugetlbfs_read(struct file *filp, char __user *buf,
58 loff_t isize;
59 ssize_t retval = 0;
60
61- mutex_lock(&inode->i_mutex);
62-
63 /* validate length */
64 if (len == 0)
65 goto out;
66
67- isize = i_size_read(inode);
68- if (!isize)
69- goto out;
70-
71- end_index = (isize - 1) >> huge_page_shift(h);
72 for (;;) {
73 struct page *page;
74 unsigned long nr, ret;
75@@ -256,18 +249,21 @@ static ssize_t hugetlbfs_read(struct file *filp, char __user *buf,
76
77 /* nr is the maximum number of bytes to copy from this page */
78 nr = huge_page_size(h);
79+ isize = i_size_read(inode);
80+ if (!isize)
81+ goto out;
82+ end_index = (isize - 1) >> huge_page_shift(h);
83 if (index >= end_index) {
84 if (index > end_index)
85 goto out;
86 nr = ((isize - 1) & ~huge_page_mask(h)) + 1;
87- if (nr <= offset) {
88+ if (nr <= offset)
89 goto out;
90- }
91 }
92 nr = nr - offset;
93
94 /* Find the page */
95- page = find_get_page(mapping, index);
96+ page = find_lock_page(mapping, index);
97 if (unlikely(page == NULL)) {
98 /*
99 * We have a HOLE, zero out the user-buffer for the
100@@ -279,17 +275,18 @@ static ssize_t hugetlbfs_read(struct file *filp, char __user *buf,
101 else
102 ra = 0;
103 } else {
104+ unlock_page(page);
105+
106 /*
107 * We have the page, copy it to user space buffer.
108 */
109 ra = hugetlbfs_read_actor(page, offset, buf, len, nr);
110 ret = ra;
111+ page_cache_release(page);
112 }
113 if (ra < 0) {
114 if (retval == 0)
115 retval = ra;
116- if (page)
117- page_cache_release(page);
118 goto out;
119 }
120
121@@ -299,16 +296,12 @@ static ssize_t hugetlbfs_read(struct file *filp, char __user *buf,
122 index += offset >> huge_page_shift(h);
123 offset &= ~huge_page_mask(h);
124
125- if (page)
126- page_cache_release(page);
127-
128 /* short read or no more work */
129 if ((ret != nr) || (len == 0))
130 break;
131 }
132 out:
133 *ppos = ((loff_t)index << huge_page_shift(h)) + offset;
134- mutex_unlock(&inode->i_mutex);
135 return retval;
136 }
137
138--
1391.7.9.4
140
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0057-ASoC-fsl-p1022ds-tell-the-WM8776-codec-driver-that-i.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0057-ASoC-fsl-p1022ds-tell-the-WM8776-codec-driver-that-i.patch
new file mode 100644
index 00000000..a4c39dd7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0057-ASoC-fsl-p1022ds-tell-the-WM8776-codec-driver-that-i.patch
@@ -0,0 +1,89 @@
1From a7338f169446baa4311a9248017ab75ed417a46c Mon Sep 17 00:00:00 2001
2From: Timur Tabi <timur@freescale.com>
3Date: Fri, 16 Mar 2012 16:32:52 -0500
4Subject: [PATCH 057/147] ASoC: fsl: p1022ds: tell the WM8776 codec driver
5 that it's the master
6
7commit 70ac07bb633dee75ac554195b9a4d69adfa7803c upstream.
8
9The WM8776 codec driver requires the machine driver to set one of the
10SND_SOC_DAIFMT_CBx_xxx values. The P1022DS machine driver should be setting
11SND_SOC_DAIFMT_CBM_CFM, but since that value was zero, no one noticed.
12
13Commit 75d9ac46 ("ASoC: Allow DAI formats to be specified in the
14dai_link"), however, changed the value of SND_SOC_DAIFMT_CBM_CFM from zero
15to a non-zero value, which means that it now needs to be specifically set
16by the machine driver.
17
18We also set SND_SOC_DAIFMT_NB_NF, for the same reason.
19
20Signed-off-by: Timur Tabi <timur@freescale.com>
21Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 sound/soc/fsl/p1022_ds.c | 24 ++++++++++++++++--------
25 1 file changed, 16 insertions(+), 8 deletions(-)
26
27diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c
28index 2c064a9..075677c 100644
29--- a/sound/soc/fsl/p1022_ds.c
30+++ b/sound/soc/fsl/p1022_ds.c
31@@ -392,7 +392,8 @@ static int p1022_ds_probe(struct platform_device *pdev)
32 }
33
34 if (strcasecmp(sprop, "i2s-slave") == 0) {
35- mdata->dai_format = SND_SOC_DAIFMT_I2S;
36+ mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
37+ SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM;
38 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
39 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
40
41@@ -409,31 +410,38 @@ static int p1022_ds_probe(struct platform_device *pdev)
42 }
43 mdata->clk_frequency = be32_to_cpup(iprop);
44 } else if (strcasecmp(sprop, "i2s-master") == 0) {
45- mdata->dai_format = SND_SOC_DAIFMT_I2S;
46+ mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
47+ SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS;
48 mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
49 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
50 } else if (strcasecmp(sprop, "lj-slave") == 0) {
51- mdata->dai_format = SND_SOC_DAIFMT_LEFT_J;
52+ mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
53+ SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM;
54 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
55 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
56 } else if (strcasecmp(sprop, "lj-master") == 0) {
57- mdata->dai_format = SND_SOC_DAIFMT_LEFT_J;
58+ mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
59+ SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBS_CFS;
60 mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
61 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
62 } else if (strcasecmp(sprop, "rj-slave") == 0) {
63- mdata->dai_format = SND_SOC_DAIFMT_RIGHT_J;
64+ mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
65+ SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBM_CFM;
66 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
67 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
68 } else if (strcasecmp(sprop, "rj-master") == 0) {
69- mdata->dai_format = SND_SOC_DAIFMT_RIGHT_J;
70+ mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
71+ SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBS_CFS;
72 mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
73 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
74 } else if (strcasecmp(sprop, "ac97-slave") == 0) {
75- mdata->dai_format = SND_SOC_DAIFMT_AC97;
76+ mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
77+ SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBM_CFM;
78 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
79 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
80 } else if (strcasecmp(sprop, "ac97-master") == 0) {
81- mdata->dai_format = SND_SOC_DAIFMT_AC97;
82+ mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
83+ SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBS_CFS;
84 mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
85 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
86 } else {
87--
881.7.9.4
89
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0058-ASoC-pxa-ssp-atomically-set-stream-active-masks.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0058-ASoC-pxa-ssp-atomically-set-stream-active-masks.patch
new file mode 100644
index 00000000..295a9096
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0058-ASoC-pxa-ssp-atomically-set-stream-active-masks.patch
@@ -0,0 +1,122 @@
1From ab7d4a1c2c58f17a777947ef7e0ae242fea985e4 Mon Sep 17 00:00:00 2001
2From: Daniel Mack <zonque@gmail.com>
3Date: Mon, 19 Mar 2012 09:12:53 +0100
4Subject: [PATCH 058/147] ASoC: pxa-ssp: atomically set stream active masks
5
6commit 273b72c8ce6b28df6b49423d775c3e59072c73c5 upstream.
7
8PXA's SSP engine fails to take its current channel phase into account
9when enabling a stream while the engine is already running. This
10results in randomly swapped left/right channels on either the record
11or the playback side, depending on which one was enabled first.
12
13The following patch fixes this by factoring out the bit field
14modifications in question to a separate function that pauses the
15engine temporarily, modifies the bits and kicks it off again
16afterwards. Appearantly, a transition of SSCR0_SSE syncs both
17directions properly.
18
19The patch has been rolled out to quite a number of devices over the
20last weeks and seems to fix the issue reliably.
21
22Signed-off-by: Daniel Mack <zonque@gmail.com>
23Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com>
24Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 sound/soc/pxa/pxa-ssp.c | 61 ++++++++++++++++++++++++++++-------------------
28 1 file changed, 36 insertions(+), 25 deletions(-)
29
30diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
31index 8ad93ee..b583e60 100644
32--- a/sound/soc/pxa/pxa-ssp.c
33+++ b/sound/soc/pxa/pxa-ssp.c
34@@ -668,6 +668,38 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
35 return 0;
36 }
37
38+static void pxa_ssp_set_running_bit(struct snd_pcm_substream *substream,
39+ struct ssp_device *ssp, int value)
40+{
41+ uint32_t sscr0 = pxa_ssp_read_reg(ssp, SSCR0);
42+ uint32_t sscr1 = pxa_ssp_read_reg(ssp, SSCR1);
43+ uint32_t sspsp = pxa_ssp_read_reg(ssp, SSPSP);
44+ uint32_t sssr = pxa_ssp_read_reg(ssp, SSSR);
45+
46+ if (value && (sscr0 & SSCR0_SSE))
47+ pxa_ssp_write_reg(ssp, SSCR0, sscr0 & ~SSCR0_SSE);
48+
49+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
50+ if (value)
51+ sscr1 |= SSCR1_TSRE;
52+ else
53+ sscr1 &= ~SSCR1_TSRE;
54+ } else {
55+ if (value)
56+ sscr1 |= SSCR1_RSRE;
57+ else
58+ sscr1 &= ~SSCR1_RSRE;
59+ }
60+
61+ pxa_ssp_write_reg(ssp, SSCR1, sscr1);
62+
63+ if (value) {
64+ pxa_ssp_write_reg(ssp, SSSR, sssr);
65+ pxa_ssp_write_reg(ssp, SSPSP, sspsp);
66+ pxa_ssp_write_reg(ssp, SSCR0, sscr0 | SSCR0_SSE);
67+ }
68+}
69+
70 static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd,
71 struct snd_soc_dai *cpu_dai)
72 {
73@@ -681,42 +713,21 @@ static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd,
74 pxa_ssp_enable(ssp);
75 break;
76 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
77- val = pxa_ssp_read_reg(ssp, SSCR1);
78- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
79- val |= SSCR1_TSRE;
80- else
81- val |= SSCR1_RSRE;
82- pxa_ssp_write_reg(ssp, SSCR1, val);
83+ pxa_ssp_set_running_bit(substream, ssp, 1);
84 val = pxa_ssp_read_reg(ssp, SSSR);
85 pxa_ssp_write_reg(ssp, SSSR, val);
86 break;
87 case SNDRV_PCM_TRIGGER_START:
88- val = pxa_ssp_read_reg(ssp, SSCR1);
89- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
90- val |= SSCR1_TSRE;
91- else
92- val |= SSCR1_RSRE;
93- pxa_ssp_write_reg(ssp, SSCR1, val);
94- pxa_ssp_enable(ssp);
95+ pxa_ssp_set_running_bit(substream, ssp, 1);
96 break;
97 case SNDRV_PCM_TRIGGER_STOP:
98- val = pxa_ssp_read_reg(ssp, SSCR1);
99- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
100- val &= ~SSCR1_TSRE;
101- else
102- val &= ~SSCR1_RSRE;
103- pxa_ssp_write_reg(ssp, SSCR1, val);
104+ pxa_ssp_set_running_bit(substream, ssp, 0);
105 break;
106 case SNDRV_PCM_TRIGGER_SUSPEND:
107 pxa_ssp_disable(ssp);
108 break;
109 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
110- val = pxa_ssp_read_reg(ssp, SSCR1);
111- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
112- val &= ~SSCR1_TSRE;
113- else
114- val &= ~SSCR1_RSRE;
115- pxa_ssp_write_reg(ssp, SSCR1, val);
116+ pxa_ssp_set_running_bit(substream, ssp, 0);
117 break;
118
119 default:
120--
1211.7.9.4
122
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0059-tcm_loop-Set-residual-field-for-SCSI-commands.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0059-tcm_loop-Set-residual-field-for-SCSI-commands.patch
new file mode 100644
index 00000000..367ed766
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0059-tcm_loop-Set-residual-field-for-SCSI-commands.patch
@@ -0,0 +1,51 @@
1From eb6dc69e78c98c8c61faba348a6eaf6cee1439d9 Mon Sep 17 00:00:00 2001
2From: Roland Dreier <roland@purestorage.com>
3Date: Tue, 14 Feb 2012 15:30:31 -0800
4Subject: [PATCH 059/147] tcm_loop: Set residual field for SCSI commands
5
6commit 6cf3fa6918baab0c447f1206f1cef9166ad04864 upstream.
7
8If the target core signals an over- or under-run, tcm_loop should call
9scsi_set_resid() to tell the SCSI midlayer about the residual data length.
10
11The difference can be seen by doing something like
12
13 strace -eioctl sg_raw -r 1024 /dev/sda 8 0 0 0 1 0 > /dev/null
14
15and looking at the "resid=" part of the SG_IO ioctl -- after this patch,
16the field is correctly reported as 512.
17
18Signed-off-by: Roland Dreier <roland@purestorage.com>
19Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 drivers/target/loopback/tcm_loop.c | 6 ++++++
23 1 file changed, 6 insertions(+)
24
25diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
26index 81d5832..5d1d4f2 100644
27--- a/drivers/target/loopback/tcm_loop.c
28+++ b/drivers/target/loopback/tcm_loop.c
29@@ -866,6 +866,9 @@ static int tcm_loop_queue_data_in(struct se_cmd *se_cmd)
30
31 sc->result = SAM_STAT_GOOD;
32 set_host_byte(sc, DID_OK);
33+ if ((se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) ||
34+ (se_cmd->se_cmd_flags & SCF_UNDERFLOW_BIT))
35+ scsi_set_resid(sc, se_cmd->residual_count);
36 sc->scsi_done(sc);
37 return 0;
38 }
39@@ -891,6 +894,9 @@ static int tcm_loop_queue_status(struct se_cmd *se_cmd)
40 sc->result = se_cmd->scsi_status;
41
42 set_host_byte(sc, DID_OK);
43+ if ((se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) ||
44+ (se_cmd->se_cmd_flags & SCF_UNDERFLOW_BIT))
45+ scsi_set_resid(sc, se_cmd->residual_count);
46 sc->scsi_done(sc);
47 return 0;
48 }
49--
501.7.9.4
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0060-iscsi-target-Fix-iscsit_alloc_buffs-failure-cases.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0060-iscsi-target-Fix-iscsit_alloc_buffs-failure-cases.patch
new file mode 100644
index 00000000..c4cbbea2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0060-iscsi-target-Fix-iscsit_alloc_buffs-failure-cases.patch
@@ -0,0 +1,62 @@
1From eeb9b513b81a2ebbb3812150c091ff26ee28d912 Mon Sep 17 00:00:00 2001
2From: Nicholas Bellinger <nab@linux-iscsi.org>
3Date: Thu, 23 Feb 2012 17:28:43 -0800
4Subject: [PATCH 060/147] iscsi-target: Fix iscsit_alloc_buffs() failure cases
5
6commit d335e6054db616bce3f040e659fa38440518ad1d upstream.
7
8Make iscsit_alloc_buffs() failure case for page_alloc_failed use correct
9__free_page() SGL pointer, and return -ENOMEM for iscsit_allocate_iovecs
10failure to push se_cmd->t_mem_sg release into iscsit_release_cmd()
11callback during iscsit_add_reject_from_cmd() connection reset.
12
13Also drop cmd->t_mem_sg = NULL assignment from page_alloc_failed
14failure case.
15
16Reported-by: Roland Dreier <roland@purestorage.com>
17Cc: Andy Grover <agrover@redhat.com>
18Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/target/iscsi/iscsi_target.c | 14 ++++++--------
22 1 file changed, 6 insertions(+), 8 deletions(-)
23
24diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
25index 03d3528..0842cc7 100644
26--- a/drivers/target/iscsi/iscsi_target.c
27+++ b/drivers/target/iscsi/iscsi_target.c
28@@ -781,7 +781,7 @@ static int iscsit_alloc_buffs(struct iscsi_cmd *cmd)
29 struct scatterlist *sgl;
30 u32 length = cmd->se_cmd.data_length;
31 int nents = DIV_ROUND_UP(length, PAGE_SIZE);
32- int i = 0, ret;
33+ int i = 0, j = 0, ret;
34 /*
35 * If no SCSI payload is present, allocate the default iovecs used for
36 * iSCSI PDU Header
37@@ -822,17 +822,15 @@ static int iscsit_alloc_buffs(struct iscsi_cmd *cmd)
38 */
39 ret = iscsit_allocate_iovecs(cmd);
40 if (ret < 0)
41- goto page_alloc_failed;
42+ return -ENOMEM;
43
44 return 0;
45
46 page_alloc_failed:
47- while (i >= 0) {
48- __free_page(sg_page(&sgl[i]));
49- i--;
50- }
51- kfree(cmd->t_mem_sg);
52- cmd->t_mem_sg = NULL;
53+ while (j < i)
54+ __free_page(sg_page(&sgl[j++]));
55+
56+ kfree(sgl);
57 return -ENOMEM;
58 }
59
60--
611.7.9.4
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0061-iscsi-target-Fix-dynamic-explict-NodeACL-pointer-ref.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0061-iscsi-target-Fix-dynamic-explict-NodeACL-pointer-ref.patch
new file mode 100644
index 00000000..016bab4d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0061-iscsi-target-Fix-dynamic-explict-NodeACL-pointer-ref.patch
@@ -0,0 +1,46 @@
1From 43d63ac69fcc86c6b92dc1b923a3b0e5bd59dab5 Mon Sep 17 00:00:00 2001
2From: Nicholas Bellinger <nab@linux-iscsi.org>
3Date: Sun, 26 Feb 2012 22:16:07 -0800
4Subject: [PATCH 061/147] iscsi-target: Fix dynamic -> explict NodeACL pointer
5 reference
6
7commit d06283341aee9e48eff1b068779d340785c635ce upstream.
8
9This patch fixes a free after use in lio_target_make_nodeacl() where
10iscsi_node_acl was referenced from the original se_nacl_new allocation,
11instead of from core_tpg_add_initiator_node_acl() in the case of dynamic
12-> explict NodeACL conversion.
13
14Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/target/iscsi/iscsi_target_configfs.c | 6 ++----
18 1 file changed, 2 insertions(+), 4 deletions(-)
19
20diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
21index db32784..83dcf49 100644
22--- a/drivers/target/iscsi/iscsi_target_configfs.c
23+++ b/drivers/target/iscsi/iscsi_target_configfs.c
24@@ -816,9 +816,6 @@ static struct se_node_acl *lio_target_make_nodeacl(
25 if (!se_nacl_new)
26 return ERR_PTR(-ENOMEM);
27
28- acl = container_of(se_nacl_new, struct iscsi_node_acl,
29- se_node_acl);
30-
31 cmdsn_depth = ISCSI_TPG_ATTRIB(tpg)->default_cmdsn_depth;
32 /*
33 * se_nacl_new may be released by core_tpg_add_initiator_node_acl()
34@@ -829,7 +826,8 @@ static struct se_node_acl *lio_target_make_nodeacl(
35 if (IS_ERR(se_nacl))
36 return se_nacl;
37
38- stats_cg = &acl->se_node_acl.acl_fabric_stat_group;
39+ acl = container_of(se_nacl, struct iscsi_node_acl, se_node_acl);
40+ stats_cg = &se_nacl->acl_fabric_stat_group;
41
42 stats_cg->default_groups = kzalloc(sizeof(struct config_group) * 2,
43 GFP_KERNEL);
44--
451.7.9.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0062-ALSA-hda-fix-printing-of-high-HDMI-sample-rates.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0062-ALSA-hda-fix-printing-of-high-HDMI-sample-rates.patch
new file mode 100644
index 00000000..0eef1c08
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0062-ALSA-hda-fix-printing-of-high-HDMI-sample-rates.patch
@@ -0,0 +1,43 @@
1From 6b3759def25d01a00d3a88701e97cb397f3aa805 Mon Sep 17 00:00:00 2001
2From: Anssi Hannula <anssi.hannula@iki.fi>
3Date: Tue, 13 Mar 2012 17:43:02 +0200
4Subject: [PATCH 062/147] ALSA: hda - fix printing of high HDMI sample rates
5
6commit 25dc16f69892182192b1234594fd3cf342ad4195 upstream.
7
8A previous commit af65cbf296 (ALSA: hdmi: fix printout of SAD sampling
9rates) fixed the sample rates shown in /proc/asound/cardX/eldY and
10kernel log to not be entirely wrong. However, a missing rate from the
11array added in the patch causes HDMI rates 88.2 kHz, 96 kHz, 176.4 kHz,
12and 192 kHz to be shown as 96 kHz, 176.4 kHz, 192 kHz, and 384 kHz,
13respectively.
14
15Fix the reporting by adding the ALSA rate 64 kHz into the conversion
16array between 48 kHz and 88.2 kHz.
17
18Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
19Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
20Signed-off-by: Takashi Iwai <tiwai@suse.de>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 sound/pci/hda/hda_eld.c | 4 ++--
24 1 file changed, 2 insertions(+), 2 deletions(-)
25
26diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
27index c1da422..b58b4b1 100644
28--- a/sound/pci/hda/hda_eld.c
29+++ b/sound/pci/hda/hda_eld.c
30@@ -385,8 +385,8 @@ error:
31 static void hdmi_print_pcm_rates(int pcm, char *buf, int buflen)
32 {
33 static unsigned int alsa_rates[] = {
34- 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200,
35- 96000, 176400, 192000, 384000
36+ 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000,
37+ 88200, 96000, 176400, 192000, 384000
38 };
39 int i, j;
40
41--
421.7.9.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0063-usb-gadget-fix-a-section-mismatch-when-compiling-g_f.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0063-usb-gadget-fix-a-section-mismatch-when-compiling-g_f.patch
new file mode 100644
index 00000000..e17e8664
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0063-usb-gadget-fix-a-section-mismatch-when-compiling-g_f.patch
@@ -0,0 +1,190 @@
1From 7086d25802a86ade70baa0edfa830e10ad7cd434 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= <LW@KARO-electronics.de>
3Date: Sun, 11 Mar 2012 15:08:46 +0100
4Subject: [PATCH 063/147] usb gadget: fix a section mismatch when compiling
5 g_ffs with CONFIG_USB_FUNCTIONFS_ETH
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 8d0698428822ce63f7269e7fe81fc4580807b9ac upstream.
11
12 commit 28824b18ac4705e876a282a15ea0de8fc957551f:
13 |Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
14 |Date: Wed May 5 12:53:13 2010 +0200
15 |
16 | USB: gadget: __init and __exit tags removed
17 |
18 | __init, __initdata and __exit tags have have been removed from
19 | various files to make it possible for gadgets that do not use
20 | the __init/__exit tags to use those.
21 obviously missed (at least) this case leading to a section mismatch in
22 g_ffs.c when compiling with CONFIG_USB_FUNCTIONFS_ETH enabled.
23
24Signed-off-by: Lothar Wa??mann <LW@KARO-electronics.de>
25Acked-by: Michal Nazarewicz <mina86@mina86.com>
26Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27---
28 drivers/usb/gadget/f_subset.c | 34 +++++++++++++++++-----------------
29 1 file changed, 17 insertions(+), 17 deletions(-)
30
31diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/f_subset.c
32index 85bd9bd..160ba02 100644
33--- a/drivers/usb/gadget/f_subset.c
34+++ b/drivers/usb/gadget/f_subset.c
35@@ -74,7 +74,7 @@ static inline struct f_gether *func_to_geth(struct usb_function *f)
36
37 /* interface descriptor: */
38
39-static struct usb_interface_descriptor subset_data_intf __initdata = {
40+static struct usb_interface_descriptor subset_data_intf = {
41 .bLength = sizeof subset_data_intf,
42 .bDescriptorType = USB_DT_INTERFACE,
43
44@@ -87,7 +87,7 @@ static struct usb_interface_descriptor subset_data_intf __initdata = {
45 /* .iInterface = DYNAMIC */
46 };
47
48-static struct usb_cdc_header_desc mdlm_header_desc __initdata = {
49+static struct usb_cdc_header_desc mdlm_header_desc = {
50 .bLength = sizeof mdlm_header_desc,
51 .bDescriptorType = USB_DT_CS_INTERFACE,
52 .bDescriptorSubType = USB_CDC_HEADER_TYPE,
53@@ -95,7 +95,7 @@ static struct usb_cdc_header_desc mdlm_header_desc __initdata = {
54 .bcdCDC = cpu_to_le16(0x0110),
55 };
56
57-static struct usb_cdc_mdlm_desc mdlm_desc __initdata = {
58+static struct usb_cdc_mdlm_desc mdlm_desc = {
59 .bLength = sizeof mdlm_desc,
60 .bDescriptorType = USB_DT_CS_INTERFACE,
61 .bDescriptorSubType = USB_CDC_MDLM_TYPE,
62@@ -111,7 +111,7 @@ static struct usb_cdc_mdlm_desc mdlm_desc __initdata = {
63 * can't really use its struct. All we do here is say that we're using
64 * the submode of "SAFE" which directly matches the CDC Subset.
65 */
66-static u8 mdlm_detail_desc[] __initdata = {
67+static u8 mdlm_detail_desc[] = {
68 6,
69 USB_DT_CS_INTERFACE,
70 USB_CDC_MDLM_DETAIL_TYPE,
71@@ -121,7 +121,7 @@ static u8 mdlm_detail_desc[] __initdata = {
72 0, /* network data capabilities ("raw" encapsulation) */
73 };
74
75-static struct usb_cdc_ether_desc ether_desc __initdata = {
76+static struct usb_cdc_ether_desc ether_desc = {
77 .bLength = sizeof ether_desc,
78 .bDescriptorType = USB_DT_CS_INTERFACE,
79 .bDescriptorSubType = USB_CDC_ETHERNET_TYPE,
80@@ -136,7 +136,7 @@ static struct usb_cdc_ether_desc ether_desc __initdata = {
81
82 /* full speed support: */
83
84-static struct usb_endpoint_descriptor fs_subset_in_desc __initdata = {
85+static struct usb_endpoint_descriptor fs_subset_in_desc = {
86 .bLength = USB_DT_ENDPOINT_SIZE,
87 .bDescriptorType = USB_DT_ENDPOINT,
88
89@@ -144,7 +144,7 @@ static struct usb_endpoint_descriptor fs_subset_in_desc __initdata = {
90 .bmAttributes = USB_ENDPOINT_XFER_BULK,
91 };
92
93-static struct usb_endpoint_descriptor fs_subset_out_desc __initdata = {
94+static struct usb_endpoint_descriptor fs_subset_out_desc = {
95 .bLength = USB_DT_ENDPOINT_SIZE,
96 .bDescriptorType = USB_DT_ENDPOINT,
97
98@@ -152,7 +152,7 @@ static struct usb_endpoint_descriptor fs_subset_out_desc __initdata = {
99 .bmAttributes = USB_ENDPOINT_XFER_BULK,
100 };
101
102-static struct usb_descriptor_header *fs_eth_function[] __initdata = {
103+static struct usb_descriptor_header *fs_eth_function[] = {
104 (struct usb_descriptor_header *) &subset_data_intf,
105 (struct usb_descriptor_header *) &mdlm_header_desc,
106 (struct usb_descriptor_header *) &mdlm_desc,
107@@ -165,7 +165,7 @@ static struct usb_descriptor_header *fs_eth_function[] __initdata = {
108
109 /* high speed support: */
110
111-static struct usb_endpoint_descriptor hs_subset_in_desc __initdata = {
112+static struct usb_endpoint_descriptor hs_subset_in_desc = {
113 .bLength = USB_DT_ENDPOINT_SIZE,
114 .bDescriptorType = USB_DT_ENDPOINT,
115
116@@ -173,7 +173,7 @@ static struct usb_endpoint_descriptor hs_subset_in_desc __initdata = {
117 .wMaxPacketSize = cpu_to_le16(512),
118 };
119
120-static struct usb_endpoint_descriptor hs_subset_out_desc __initdata = {
121+static struct usb_endpoint_descriptor hs_subset_out_desc = {
122 .bLength = USB_DT_ENDPOINT_SIZE,
123 .bDescriptorType = USB_DT_ENDPOINT,
124
125@@ -181,7 +181,7 @@ static struct usb_endpoint_descriptor hs_subset_out_desc __initdata = {
126 .wMaxPacketSize = cpu_to_le16(512),
127 };
128
129-static struct usb_descriptor_header *hs_eth_function[] __initdata = {
130+static struct usb_descriptor_header *hs_eth_function[] = {
131 (struct usb_descriptor_header *) &subset_data_intf,
132 (struct usb_descriptor_header *) &mdlm_header_desc,
133 (struct usb_descriptor_header *) &mdlm_desc,
134@@ -194,7 +194,7 @@ static struct usb_descriptor_header *hs_eth_function[] __initdata = {
135
136 /* super speed support: */
137
138-static struct usb_endpoint_descriptor ss_subset_in_desc __initdata = {
139+static struct usb_endpoint_descriptor ss_subset_in_desc = {
140 .bLength = USB_DT_ENDPOINT_SIZE,
141 .bDescriptorType = USB_DT_ENDPOINT,
142
143@@ -202,7 +202,7 @@ static struct usb_endpoint_descriptor ss_subset_in_desc __initdata = {
144 .wMaxPacketSize = cpu_to_le16(1024),
145 };
146
147-static struct usb_endpoint_descriptor ss_subset_out_desc __initdata = {
148+static struct usb_endpoint_descriptor ss_subset_out_desc = {
149 .bLength = USB_DT_ENDPOINT_SIZE,
150 .bDescriptorType = USB_DT_ENDPOINT,
151
152@@ -210,7 +210,7 @@ static struct usb_endpoint_descriptor ss_subset_out_desc __initdata = {
153 .wMaxPacketSize = cpu_to_le16(1024),
154 };
155
156-static struct usb_ss_ep_comp_descriptor ss_subset_bulk_comp_desc __initdata = {
157+static struct usb_ss_ep_comp_descriptor ss_subset_bulk_comp_desc = {
158 .bLength = sizeof ss_subset_bulk_comp_desc,
159 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
160
161@@ -219,7 +219,7 @@ static struct usb_ss_ep_comp_descriptor ss_subset_bulk_comp_desc __initdata = {
162 /* .bmAttributes = 0, */
163 };
164
165-static struct usb_descriptor_header *ss_eth_function[] __initdata = {
166+static struct usb_descriptor_header *ss_eth_function[] = {
167 (struct usb_descriptor_header *) &subset_data_intf,
168 (struct usb_descriptor_header *) &mdlm_header_desc,
169 (struct usb_descriptor_header *) &mdlm_desc,
170@@ -290,7 +290,7 @@ static void geth_disable(struct usb_function *f)
171
172 /* serial function driver setup/binding */
173
174-static int __init
175+static int
176 geth_bind(struct usb_configuration *c, struct usb_function *f)
177 {
178 struct usb_composite_dev *cdev = c->cdev;
179@@ -405,7 +405,7 @@ geth_unbind(struct usb_configuration *c, struct usb_function *f)
180 * Caller must have called @gether_setup(). Caller is also responsible
181 * for calling @gether_cleanup() before module unload.
182 */
183-int __init geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN])
184+int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN])
185 {
186 struct f_gether *geth;
187 int status;
188--
1891.7.9.4
190
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0064-udlfb-remove-sysfs-framebuffer-device-with-USB-.disc.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0064-udlfb-remove-sysfs-framebuffer-device-with-USB-.disc.patch
new file mode 100644
index 00000000..42684c7c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0064-udlfb-remove-sysfs-framebuffer-device-with-USB-.disc.patch
@@ -0,0 +1,120 @@
1From 65fc28a302c7d7220dbe8609899724edb9687162 Mon Sep 17 00:00:00 2001
2From: Kay Sievers <kay.sievers@vrfy.org>
3Date: Sat, 28 Jan 2012 19:57:46 +0000
4Subject: [PATCH 064/147] udlfb: remove sysfs framebuffer device with USB
5 .disconnect()
6
7commit ce880cb860f36694d2cdebfac9e6ae18176fe4c4 upstream.
8
9The USB graphics card driver delays the unregistering of the framebuffer
10device to a workqueue, which breaks the userspace visible remove uevent
11sequence. Recent userspace tools started to support USB graphics card
12hotplug out-of-the-box and rely on proper events sent by the kernel.
13
14The framebuffer device is a direct child of the USB interface which is
15removed immediately after the USB .disconnect() callback. But the fb device
16in /sys stays around until its final cleanup, at a time where all the parent
17devices have been removed already.
18
19To work around that, we remove the sysfs fb device directly in the USB
20.disconnect() callback and leave only the cleanup of the internal fb
21data to the delayed work.
22
23Before:
24 add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
25 add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
26 add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb0 (graphics)
27 remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
28 remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
29 remove /2-1.2:1.0/graphics/fb0 (graphics)
30
31After:
32 add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
33 add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
34 add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb1 (graphics)
35 remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb1 (graphics)
36 remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
37 remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
38
39Tested-by: Bernie Thompson <bernie@plugable.com>
40Acked-by: Bernie Thompson <bernie@plugable.com>
41Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
42Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
43Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44---
45 drivers/video/fbmem.c | 18 +++++++++++++++++-
46 drivers/video/udlfb.c | 2 +-
47 include/linux/fb.h | 1 +
48 3 files changed, 19 insertions(+), 2 deletions(-)
49
50diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
51index ad93629..7a41220 100644
52--- a/drivers/video/fbmem.c
53+++ b/drivers/video/fbmem.c
54@@ -1651,6 +1651,7 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
55 if (ret)
56 return -EINVAL;
57
58+ unlink_framebuffer(fb_info);
59 if (fb_info->pixmap.addr &&
60 (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT))
61 kfree(fb_info->pixmap.addr);
62@@ -1658,7 +1659,6 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
63 registered_fb[i] = NULL;
64 num_registered_fb--;
65 fb_cleanup_device(fb_info);
66- device_destroy(fb_class, MKDEV(FB_MAJOR, i));
67 event.info = fb_info;
68 fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event);
69
70@@ -1667,6 +1667,22 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
71 return 0;
72 }
73
74+int unlink_framebuffer(struct fb_info *fb_info)
75+{
76+ int i;
77+
78+ i = fb_info->node;
79+ if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info)
80+ return -EINVAL;
81+
82+ if (fb_info->dev) {
83+ device_destroy(fb_class, MKDEV(FB_MAJOR, i));
84+ fb_info->dev = NULL;
85+ }
86+ return 0;
87+}
88+EXPORT_SYMBOL(unlink_framebuffer);
89+
90 void remove_conflicting_framebuffers(struct apertures_struct *a,
91 const char *name, bool primary)
92 {
93diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
94index 3473e75..41746bb 100644
95--- a/drivers/video/udlfb.c
96+++ b/drivers/video/udlfb.c
97@@ -1739,7 +1739,7 @@ static void dlfb_usb_disconnect(struct usb_interface *interface)
98 for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++)
99 device_remove_file(info->dev, &fb_device_attrs[i]);
100 device_remove_bin_file(info->dev, &edid_attr);
101-
102+ unlink_framebuffer(info);
103 usb_set_intfdata(interface, NULL);
104
105 /* if clients still have us open, will be freed on last close */
106diff --git a/include/linux/fb.h b/include/linux/fb.h
107index 1d6836c..73845ce 100644
108--- a/include/linux/fb.h
109+++ b/include/linux/fb.h
110@@ -997,6 +997,7 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
111 /* drivers/video/fbmem.c */
112 extern int register_framebuffer(struct fb_info *fb_info);
113 extern int unregister_framebuffer(struct fb_info *fb_info);
114+extern int unlink_framebuffer(struct fb_info *fb_info);
115 extern void remove_conflicting_framebuffers(struct apertures_struct *a,
116 const char *name, bool primary);
117 extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
118--
1191.7.9.4
120
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0065-tcm_fc-Fix-fc_exch-memory-leak-in-ft_send_resp_statu.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0065-tcm_fc-Fix-fc_exch-memory-leak-in-ft_send_resp_statu.patch
new file mode 100644
index 00000000..e4311b46
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0065-tcm_fc-Fix-fc_exch-memory-leak-in-ft_send_resp_statu.patch
@@ -0,0 +1,50 @@
1From a38ce1660f9b3f6abec9206118adc0a33bda9730 Mon Sep 17 00:00:00 2001
2From: Nicholas Bellinger <nab@linux-iscsi.org>
3Date: Fri, 9 Mar 2012 23:45:38 -0800
4Subject: [PATCH 065/147] tcm_fc: Fix fc_exch memory leak in
5 ft_send_resp_status
6
7commit 031ed4d565b31880a4136bb7366bc89f5b1dba7d upstream.
8
9This patch fixes a bug in tcm_fc where fc_exch memory from fc_exch_mgr->ep_pool
10is currently being leaked by ft_send_resp_status() usage. Following current
11code in ft_queue_status() response path, using lport->tt.seq_send() needs to be
12followed by a lport->tt.exch_done() in order to release fc_exch memory back into
13libfc_em kmem_cache.
14
15ft_send_resp_status() code is currently used in pre submit se_cmd ft_send_work()
16error exceptions, TM request setup exceptions, and main TM response callback
17path in ft_queue_tm_resp(). This bugfix addresses the leak in these cases.
18
19Cc: Mark D Rustad <mark.d.rustad@intel.com>
20Cc: Kiran Patil <kiran.patil@intel.com>
21Cc: Robert Love <robert.w.love@intel.com>
22Cc: Andy Grover <agrover@redhat.com>
23Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 drivers/target/tcm_fc/tfc_cmd.c | 6 ++++--
27 1 file changed, 4 insertions(+), 2 deletions(-)
28
29diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
30index 71fc9ce..754b669 100644
31--- a/drivers/target/tcm_fc/tfc_cmd.c
32+++ b/drivers/target/tcm_fc/tfc_cmd.c
33@@ -329,10 +329,12 @@ static void ft_send_resp_status(struct fc_lport *lport,
34
35 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_DD_CMD_STATUS, 0);
36 sp = fr_seq(fp);
37- if (sp)
38+ if (sp) {
39 lport->tt.seq_send(lport, sp, fp);
40- else
41+ lport->tt.exch_done(sp);
42+ } else {
43 lport->tt.frame_send(lport, fp);
44+ }
45 }
46
47 /*
48--
491.7.9.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0066-md-bitmap-ensure-to-load-bitmap-when-creating-via-sy.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0066-md-bitmap-ensure-to-load-bitmap-when-creating-via-sy.patch
new file mode 100644
index 00000000..03c666b9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0066-md-bitmap-ensure-to-load-bitmap-when-creating-via-sy.patch
@@ -0,0 +1,37 @@
1From 850bfe24a75251acf10ad9dbacd4bc750005fd1b Mon Sep 17 00:00:00 2001
2From: NeilBrown <neilb@suse.de>
3Date: Mon, 19 Mar 2012 12:46:37 +1100
4Subject: [PATCH 066/147] md/bitmap: ensure to load bitmap when creating via
5 sysfs.
6
7commit 4474ca42e2577563a919fd3ed782e2ec55bf11a2 upstream.
8
9When commit 69e51b449d383e (md/bitmap: separate out loading a bitmap...)
10created bitmap_load, it missed calling it after bitmap_create when a
11bitmap is created through the sysfs interface.
12So if a bitmap is added this way, we don't allocate memory properly
13and can crash.
14
15This is suitable for any -stable release since 2.6.35.
16Signed-off-by: NeilBrown <neilb@suse.de>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 drivers/md/bitmap.c | 2 ++
20 1 file changed, 2 insertions(+)
21
22diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
23index 6d03774..2a8722b 100644
24--- a/drivers/md/bitmap.c
25+++ b/drivers/md/bitmap.c
26@@ -1904,6 +1904,8 @@ location_store(struct mddev *mddev, const char *buf, size_t len)
27 if (mddev->pers) {
28 mddev->pers->quiesce(mddev, 1);
29 rv = bitmap_create(mddev);
30+ if (!rv)
31+ rv = bitmap_load(mddev);
32 if (rv) {
33 bitmap_destroy(mddev);
34 mddev->bitmap_info.offset = 0;
35--
361.7.9.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0067-md-don-t-set-md-arrays-to-readonly-on-shutdown.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0067-md-don-t-set-md-arrays-to-readonly-on-shutdown.patch
new file mode 100644
index 00000000..93145a1d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0067-md-don-t-set-md-arrays-to-readonly-on-shutdown.patch
@@ -0,0 +1,82 @@
1From c52810052a2cbfeb2b8768081f8a22240c0d0abe Mon Sep 17 00:00:00 2001
2From: NeilBrown <neilb@suse.de>
3Date: Mon, 19 Mar 2012 12:46:37 +1100
4Subject: [PATCH 067/147] md: don't set md arrays to readonly on shutdown.
5
6commit c744a65c1e2d59acc54333ce80a5b0702a98010b upstream.
7
8It seems that with recent kernel, writeback can still be happening
9while shutdown is happening, and consequently data can be written
10after the md reboot notifier switches all arrays to read-only.
11This causes a BUG.
12
13So don't switch them to read-only - just mark them clean and
14set 'safemode' to '2' which mean that immediately after any
15write the array will be switch back to 'clean'.
16
17This could result in the shutdown happening when array is marked
18dirty, thus forcing a resync on reboot. However if you reboot
19without performing a "sync" first, you get to keep both halves.
20
21This is suitable for any stable kernel (though there might be some
22conflicts with obvious fixes in earlier kernels).
23
24Signed-off-by: NeilBrown <neilb@suse.de>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 drivers/md/md.c | 37 +++++++++++++++----------------------
28 1 file changed, 15 insertions(+), 22 deletions(-)
29
30diff --git a/drivers/md/md.c b/drivers/md/md.c
31index f47f1f8..65d552a 100644
32--- a/drivers/md/md.c
33+++ b/drivers/md/md.c
34@@ -8097,30 +8097,23 @@ static int md_notify_reboot(struct notifier_block *this,
35 struct mddev *mddev;
36 int need_delay = 0;
37
38- if ((code == SYS_DOWN) || (code == SYS_HALT) || (code == SYS_POWER_OFF)) {
39-
40- printk(KERN_INFO "md: stopping all md devices.\n");
41-
42- for_each_mddev(mddev, tmp) {
43- if (mddev_trylock(mddev)) {
44- /* Force a switch to readonly even array
45- * appears to still be in use. Hence
46- * the '100'.
47- */
48- md_set_readonly(mddev, 100);
49- mddev_unlock(mddev);
50- }
51- need_delay = 1;
52+ for_each_mddev(mddev, tmp) {
53+ if (mddev_trylock(mddev)) {
54+ __md_stop_writes(mddev);
55+ mddev->safemode = 2;
56+ mddev_unlock(mddev);
57 }
58- /*
59- * certain more exotic SCSI devices are known to be
60- * volatile wrt too early system reboots. While the
61- * right place to handle this issue is the given
62- * driver, we do want to have a safe RAID driver ...
63- */
64- if (need_delay)
65- mdelay(1000*1);
66+ need_delay = 1;
67 }
68+ /*
69+ * certain more exotic SCSI devices are known to be
70+ * volatile wrt too early system reboots. While the
71+ * right place to handle this issue is the given
72+ * driver, we do want to have a safe RAID driver ...
73+ */
74+ if (need_delay)
75+ mdelay(1000*1);
76+
77 return NOTIFY_DONE;
78 }
79
80--
811.7.9.4
82
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0068-md-raid1-raid10-avoid-deadlock-during-resync-recover.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0068-md-raid1-raid10-avoid-deadlock-during-resync-recover.patch
new file mode 100644
index 00000000..0fe819c0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0068-md-raid1-raid10-avoid-deadlock-during-resync-recover.patch
@@ -0,0 +1,97 @@
1From 250082bf56c6157c888f21df27d73475cb6f0065 Mon Sep 17 00:00:00 2001
2From: NeilBrown <neilb@suse.de>
3Date: Mon, 19 Mar 2012 12:46:38 +1100
4Subject: [PATCH 068/147] md/raid1,raid10: avoid deadlock during
5 resync/recovery.
6
7commit d6b42dcb995e6acd7cc276774e751ffc9f0ef4bf upstream.
8
9If RAID1 or RAID10 is used under LVM or some other stacking
10block device, it is possible to enter a deadlock during
11resync or recovery.
12This can happen if the upper level block device creates
13two requests to the RAID1 or RAID10. The first request gets
14processed, blocks recovery and queue requests for underlying
15requests in current->bio_list. A resync request then starts
16which will wait for those requests and block new IO.
17
18But then the second request to the RAID1/10 will be attempted
19and it cannot progress until the resync request completes,
20which cannot progress until the underlying device requests complete,
21which are on a queue behind that second request.
22
23So allow that second request to proceed even though there is
24a resync request about to start.
25
26This is suitable for any -stable kernel.
27
28Reported-by: Ray Morris <support@bettercgi.com>
29Tested-by: Ray Morris <support@bettercgi.com>
30Signed-off-by: NeilBrown <neilb@suse.de>
31Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32---
33 drivers/md/raid1.c | 17 +++++++++++++++--
34 drivers/md/raid10.c | 17 +++++++++++++++--
35 2 files changed, 30 insertions(+), 4 deletions(-)
36
37diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
38index 7d9e071..7af60ec 100644
39--- a/drivers/md/raid1.c
40+++ b/drivers/md/raid1.c
41@@ -731,9 +731,22 @@ static void wait_barrier(struct r1conf *conf)
42 spin_lock_irq(&conf->resync_lock);
43 if (conf->barrier) {
44 conf->nr_waiting++;
45- wait_event_lock_irq(conf->wait_barrier, !conf->barrier,
46+ /* Wait for the barrier to drop.
47+ * However if there are already pending
48+ * requests (preventing the barrier from
49+ * rising completely), and the
50+ * pre-process bio queue isn't empty,
51+ * then don't wait, as we need to empty
52+ * that queue to get the nr_pending
53+ * count down.
54+ */
55+ wait_event_lock_irq(conf->wait_barrier,
56+ !conf->barrier ||
57+ (conf->nr_pending &&
58+ current->bio_list &&
59+ !bio_list_empty(current->bio_list)),
60 conf->resync_lock,
61- );
62+ );
63 conf->nr_waiting--;
64 }
65 conf->nr_pending++;
66diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
67index 685ddf3..b219449 100644
68--- a/drivers/md/raid10.c
69+++ b/drivers/md/raid10.c
70@@ -790,9 +790,22 @@ static void wait_barrier(struct r10conf *conf)
71 spin_lock_irq(&conf->resync_lock);
72 if (conf->barrier) {
73 conf->nr_waiting++;
74- wait_event_lock_irq(conf->wait_barrier, !conf->barrier,
75+ /* Wait for the barrier to drop.
76+ * However if there are already pending
77+ * requests (preventing the barrier from
78+ * rising completely), and the
79+ * pre-process bio queue isn't empty,
80+ * then don't wait, as we need to empty
81+ * that queue to get the nr_pending
82+ * count down.
83+ */
84+ wait_event_lock_irq(conf->wait_barrier,
85+ !conf->barrier ||
86+ (conf->nr_pending &&
87+ current->bio_list &&
88+ !bio_list_empty(current->bio_list)),
89 conf->resync_lock,
90- );
91+ );
92 conf->nr_waiting--;
93 }
94 conf->nr_pending++;
95--
961.7.9.4
97
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0069-md-fix-clearing-of-the-changed-flags-for-the-bad-blo.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0069-md-fix-clearing-of-the-changed-flags-for-the-bad-blo.patch
new file mode 100644
index 00000000..9dda7081
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0069-md-fix-clearing-of-the-changed-flags-for-the-bad-blo.patch
@@ -0,0 +1,55 @@
1From c1566b5f4f2d8cbc8badc75b774fa79d6c03477b Mon Sep 17 00:00:00 2001
2From: NeilBrown <neilb@suse.de>
3Date: Mon, 19 Mar 2012 12:46:41 +1100
4Subject: [PATCH 069/147] md: fix clearing of the 'changed' flags for the bad
5 blocks list.
6
7commit d0962936bff659d20522555b517582a2715fd23f upstream.
8
9In super_1_sync (the first hunk) we need to clear 'changed' before
10checking read_seqretry(), otherwise we might race with other code
11adding a bad block and so won't retry later.
12
13In md_update_sb (the second hunk), in the case where there is no
14metadata (neither persistent nor external), we treat any bad blocks as
15an error. However we need to clear the 'changed' flag before calling
16md_ack_all_badblocks, else it won't do anything.
17
18This patch is suitable for -stable release 3.0 and later.
19
20Signed-off-by: NeilBrown <neilb@suse.de>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 drivers/md/md.c | 3 ++-
24 1 file changed, 2 insertions(+), 1 deletion(-)
25
26diff --git a/drivers/md/md.c b/drivers/md/md.c
27index 65d552a..6f37aa4 100644
28--- a/drivers/md/md.c
29+++ b/drivers/md/md.c
30@@ -1801,13 +1801,13 @@ retry:
31 | BB_LEN(internal_bb));
32 *bbp++ = cpu_to_le64(store_bb);
33 }
34+ bb->changed = 0;
35 if (read_seqretry(&bb->lock, seq))
36 goto retry;
37
38 bb->sector = (rdev->sb_start +
39 (int)le32_to_cpu(sb->bblog_offset));
40 bb->size = le16_to_cpu(sb->bblog_size);
41- bb->changed = 0;
42 }
43 }
44
45@@ -2362,6 +2362,7 @@ repeat:
46 clear_bit(MD_CHANGE_PENDING, &mddev->flags);
47 list_for_each_entry(rdev, &mddev->disks, same_set) {
48 if (rdev->badblocks.changed) {
49+ rdev->badblocks.changed = 0;
50 md_ack_all_badblocks(&rdev->badblocks);
51 md_error(mddev, rdev);
52 }
53--
541.7.9.4
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0070-drm-i915-Only-clear-the-GPU-domains-upon-a-successfu.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0070-drm-i915-Only-clear-the-GPU-domains-upon-a-successfu.patch
new file mode 100644
index 00000000..197506ca
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0070-drm-i915-Only-clear-the-GPU-domains-upon-a-successfu.patch
@@ -0,0 +1,64 @@
1From bee686c633c4875d2910e0559b7ce4bba5da1911 Mon Sep 17 00:00:00 2001
2From: Chris Wilson <chris@chris-wilson.co.uk>
3Date: Wed, 14 Dec 2011 13:57:23 +0100
4Subject: [PATCH 070/147] drm/i915: Only clear the GPU domains upon a
5 successful finish
6
7commit c501ae7f332cdaf42e31af30b72b4b66cbbb1604 upstream.
8
9By clearing the GPU read domains before waiting upon the buffer, we run
10the risk of the wait being interrupted and the domains prematurely
11cleared. The next time we attempt to wait upon the buffer (after
12userspace handles the signal), we believe that the buffer is idle and so
13skip the wait.
14
15There are a number of bugs across all generations which show signs of an
16overly haste reuse of active buffers.
17
18Such as:
19
20 https://bugs.freedesktop.org/show_bug.cgi?id=29046
21 https://bugs.freedesktop.org/show_bug.cgi?id=35863
22 https://bugs.freedesktop.org/show_bug.cgi?id=38952
23 https://bugs.freedesktop.org/show_bug.cgi?id=40282
24 https://bugs.freedesktop.org/show_bug.cgi?id=41098
25 https://bugs.freedesktop.org/show_bug.cgi?id=41102
26 https://bugs.freedesktop.org/show_bug.cgi?id=41284
27 https://bugs.freedesktop.org/show_bug.cgi?id=42141
28
29A couple of those pre-date i915_gem_object_finish_gpu(), so may be
30unrelated (such as a wild write from a userspace command buffer), but
31this does look like a convincing cause for most of those bugs.
32
33Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
34Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
35Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
36Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
37Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38---
39 drivers/gpu/drm/i915/i915_gem.c | 7 +++++--
40 1 file changed, 5 insertions(+), 2 deletions(-)
41
42diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
43index 8359dc7..3e7c478 100644
44--- a/drivers/gpu/drm/i915/i915_gem.c
45+++ b/drivers/gpu/drm/i915/i915_gem.c
46@@ -3084,10 +3084,13 @@ i915_gem_object_finish_gpu(struct drm_i915_gem_object *obj)
47 return ret;
48 }
49
50+ ret = i915_gem_object_wait_rendering(obj);
51+ if (ret)
52+ return ret;
53+
54 /* Ensure that we invalidate the GPU's caches and TLBs. */
55 obj->base.read_domains &= ~I915_GEM_GPU_DOMAINS;
56-
57- return i915_gem_object_wait_rendering(obj);
58+ return 0;
59 }
60
61 /**
62--
631.7.9.4
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0071-drm-radeon-Restrict-offset-for-legacy-hardware-curso.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0071-drm-radeon-Restrict-offset-for-legacy-hardware-curso.patch
new file mode 100644
index 00000000..b3701c82
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0071-drm-radeon-Restrict-offset-for-legacy-hardware-curso.patch
@@ -0,0 +1,131 @@
1From 37e7d6645532f78e279da5f5257faf0ee0c0f8f3 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
3Date: Wed, 14 Mar 2012 17:12:41 +0100
4Subject: [PATCH 071/147] drm/radeon: Restrict offset for legacy hardware
5 cursor.
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit c4353016dac10133fa5d8535af83f0c4845a2915 upstream.
11
12The hardware only takes 27 bits for the offset, so larger offsets are
13truncated, and the hardware cursor shows random bits other than the intended
14ones.
15
16Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46796
17
18Signed-off-by: Michel D??nzer <michel.daenzer@amd.com>
19Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
20Signed-off-by: Dave Airlie <airlied@redhat.com>
21---
22 drivers/gpu/drm/radeon/radeon_cursor.c | 13 +++++++++++--
23 drivers/gpu/drm/radeon/radeon_object.c | 18 +++++++++++++++++-
24 drivers/gpu/drm/radeon/radeon_object.h | 2 ++
25 3 files changed, 30 insertions(+), 3 deletions(-)
26
27diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
28index fde25c0..986d608 100644
29--- a/drivers/gpu/drm/radeon/radeon_cursor.c
30+++ b/drivers/gpu/drm/radeon/radeon_cursor.c
31@@ -151,7 +151,9 @@ int radeon_crtc_cursor_set(struct drm_crtc *crtc,
32 uint32_t height)
33 {
34 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
35+ struct radeon_device *rdev = crtc->dev->dev_private;
36 struct drm_gem_object *obj;
37+ struct radeon_bo *robj;
38 uint64_t gpu_addr;
39 int ret;
40
41@@ -173,7 +175,15 @@ int radeon_crtc_cursor_set(struct drm_crtc *crtc,
42 return -ENOENT;
43 }
44
45- ret = radeon_gem_object_pin(obj, RADEON_GEM_DOMAIN_VRAM, &gpu_addr);
46+ robj = gem_to_radeon_bo(obj);
47+ ret = radeon_bo_reserve(robj, false);
48+ if (unlikely(ret != 0))
49+ goto fail;
50+ /* Only 27 bit offset for legacy cursor */
51+ ret = radeon_bo_pin_restricted(robj, RADEON_GEM_DOMAIN_VRAM,
52+ ASIC_IS_AVIVO(rdev) ? 0 : 1 << 27,
53+ &gpu_addr);
54+ radeon_bo_unreserve(robj);
55 if (ret)
56 goto fail;
57
58@@ -181,7 +191,6 @@ int radeon_crtc_cursor_set(struct drm_crtc *crtc,
59 radeon_crtc->cursor_height = height;
60
61 radeon_lock_cursor(crtc, true);
62- /* XXX only 27 bit offset for legacy cursor */
63 radeon_set_cursor(crtc, obj, gpu_addr);
64 radeon_show_cursor(crtc);
65 radeon_lock_cursor(crtc, false);
66diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
67index 1c85152..f3ae607 100644
68--- a/drivers/gpu/drm/radeon/radeon_object.c
69+++ b/drivers/gpu/drm/radeon/radeon_object.c
70@@ -204,7 +204,8 @@ void radeon_bo_unref(struct radeon_bo **bo)
71 *bo = NULL;
72 }
73
74-int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr)
75+int radeon_bo_pin_restricted(struct radeon_bo *bo, u32 domain, u64 max_offset,
76+ u64 *gpu_addr)
77 {
78 int r, i;
79
80@@ -212,6 +213,7 @@ int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr)
81 bo->pin_count++;
82 if (gpu_addr)
83 *gpu_addr = radeon_bo_gpu_offset(bo);
84+ WARN_ON_ONCE(max_offset != 0);
85 return 0;
86 }
87 radeon_ttm_placement_from_domain(bo, domain);
88@@ -219,6 +221,15 @@ int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr)
89 /* force to pin into visible video ram */
90 bo->placement.lpfn = bo->rdev->mc.visible_vram_size >> PAGE_SHIFT;
91 }
92+ if (max_offset) {
93+ u64 lpfn = max_offset >> PAGE_SHIFT;
94+
95+ if (!bo->placement.lpfn)
96+ bo->placement.lpfn = bo->rdev->mc.gtt_size >> PAGE_SHIFT;
97+
98+ if (lpfn < bo->placement.lpfn)
99+ bo->placement.lpfn = lpfn;
100+ }
101 for (i = 0; i < bo->placement.num_placement; i++)
102 bo->placements[i] |= TTM_PL_FLAG_NO_EVICT;
103 r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false, false);
104@@ -232,6 +243,11 @@ int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr)
105 return r;
106 }
107
108+int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr)
109+{
110+ return radeon_bo_pin_restricted(bo, domain, 0, gpu_addr);
111+}
112+
113 int radeon_bo_unpin(struct radeon_bo *bo)
114 {
115 int r, i;
116diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h
117index b07f0f9..fb3f433 100644
118--- a/drivers/gpu/drm/radeon/radeon_object.h
119+++ b/drivers/gpu/drm/radeon/radeon_object.h
120@@ -108,6 +108,8 @@ extern int radeon_bo_kmap(struct radeon_bo *bo, void **ptr);
121 extern void radeon_bo_kunmap(struct radeon_bo *bo);
122 extern void radeon_bo_unref(struct radeon_bo **bo);
123 extern int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr);
124+extern int radeon_bo_pin_restricted(struct radeon_bo *bo, u32 domain,
125+ u64 max_offset, u64 *gpu_addr);
126 extern int radeon_bo_unpin(struct radeon_bo *bo);
127 extern int radeon_bo_evict_vram(struct radeon_device *rdev);
128 extern void radeon_bo_force_delete(struct radeon_device *rdev);
129--
1301.7.9.4
131
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0072-drm-radeon-kms-fix-analog-load-detection-on-DVI-I-co.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0072-drm-radeon-kms-fix-analog-load-detection-on-DVI-I-co.patch
new file mode 100644
index 00000000..db377d3c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0072-drm-radeon-kms-fix-analog-load-detection-on-DVI-I-co.patch
@@ -0,0 +1,40 @@
1From de31bb0d8975b5a6b55c0c0fb10fb7f84ca15c5d Mon Sep 17 00:00:00 2001
2From: Alex Deucher <alexander.deucher@amd.com>
3Date: Fri, 16 Mar 2012 12:22:09 -0400
4Subject: [PATCH 072/147] drm/radeon/kms: fix analog load detection on DVI-I
5 connectors
6
7commit e00e8b5e760cbbe9067daeae5454d67c44c8d035 upstream.
8
9We digital encoders have a detect function as well (for
10DP to VGA bridges), so we make sure we choose the analog
11one here.
12
13Fixes:
14https://bugs.freedesktop.org/show_bug.cgi?id=47007
15
16Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
17Signed-off-by: Dave Airlie <airlied@redhat.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/gpu/drm/radeon/radeon_connectors.c | 4 ++++
21 1 file changed, 4 insertions(+)
22
23diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
24index e7cb3ab..f7d39ac 100644
25--- a/drivers/gpu/drm/radeon/radeon_connectors.c
26+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
27@@ -946,6 +946,10 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
28
29 encoder = obj_to_encoder(obj);
30
31+ if (encoder->encoder_type != DRM_MODE_ENCODER_DAC ||
32+ encoder->encoder_type != DRM_MODE_ENCODER_TVDAC)
33+ continue;
34+
35 encoder_funcs = encoder->helper_private;
36 if (encoder_funcs->detect) {
37 if (ret != connector_status_connected) {
38--
391.7.9.4
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0073-drm-radeon-kms-add-connector-quirk-for-Fujitsu-D3003.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0073-drm-radeon-kms-add-connector-quirk-for-Fujitsu-D3003.patch
new file mode 100644
index 00000000..a48a4852
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0073-drm-radeon-kms-add-connector-quirk-for-Fujitsu-D3003.patch
@@ -0,0 +1,48 @@
1From 5efedf1eea47c18e516e55bbfb417e447e76fc0d Mon Sep 17 00:00:00 2001
2From: Alex Deucher <alexander.deucher@amd.com>
3Date: Fri, 16 Mar 2012 12:22:10 -0400
4Subject: [PATCH 073/147] drm/radeon/kms: add connector quirk for Fujitsu
5 D3003-S2 board
6
7commit 4c1b2d2da3451f5c8dd59bd7e05bd9729d2aee05 upstream.
8
9vbios lists DVI-I port as VGA and DVI-D.
10
11Fixes:
12https://bugs.freedesktop.org/show_bug.cgi?id=47007
13
14Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
15Signed-off-by: Dave Airlie <airlied@redhat.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/gpu/drm/radeon/radeon_atombios.c | 14 ++++++++++++++
19 1 file changed, 14 insertions(+)
20
21diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
22index 5082d17..8e1532f 100644
23--- a/drivers/gpu/drm/radeon/radeon_atombios.c
24+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
25@@ -442,6 +442,20 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
26 struct radeon_device *rdev = dev->dev_private;
27 *i2c_bus = radeon_lookup_i2c_gpio(rdev, 0x93);
28 }
29+
30+ /* Fujitsu D3003-S2 board lists DVI-I as DVI-D and VGA */
31+ if ((dev->pdev->device == 0x9802) &&
32+ (dev->pdev->subsystem_vendor == 0x1734) &&
33+ (dev->pdev->subsystem_device == 0x11bd)) {
34+ if (*connector_type == DRM_MODE_CONNECTOR_VGA) {
35+ *connector_type = DRM_MODE_CONNECTOR_DVII;
36+ *line_mux = 0x3103;
37+ } else if (*connector_type == DRM_MODE_CONNECTOR_DVID) {
38+ *connector_type = DRM_MODE_CONNECTOR_DVII;
39+ }
40+ }
41+
42+
43 return true;
44 }
45
46--
471.7.9.4
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0074-target-Don-t-set-WBUS16-or-SYNC-bits-in-INQUIRY-resp.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0074-target-Don-t-set-WBUS16-or-SYNC-bits-in-INQUIRY-resp.patch
new file mode 100644
index 00000000..c1eac734
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0074-target-Don-t-set-WBUS16-or-SYNC-bits-in-INQUIRY-resp.patch
@@ -0,0 +1,41 @@
1From 7f95ff0ee05801dd087ec704be16aae6383f0076 Mon Sep 17 00:00:00 2001
2From: Roland Dreier <roland@purestorage.com>
3Date: Mon, 13 Feb 2012 16:18:16 -0800
4Subject: [PATCH 074/147] target: Don't set WBUS16 or SYNC bits in INQUIRY
5 response
6
7commit effc6cc8828257c32c37635e737f14fd6e19ecd7 upstream.
8
9SPC-4 says about the WBUS16 and SYNC bits:
10
11 The meanings of these fields are specific to SPI-5 (see 6.4.3).
12 For SCSI transport protocols other than the SCSI Parallel
13 Interface, these fields are reserved.
14
15We don't have a SPI fabric module, so we should never set these bits.
16(The comment was misleading, since it only mentioned Sync but the
17actual code set WBUS16 too).
18
19Signed-off-by: Roland Dreier <roland@purestorage.com>
20Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 drivers/target/target_core_cdb.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c
27index 8facd33..65ea65a 100644
28--- a/drivers/target/target_core_cdb.c
29+++ b/drivers/target/target_core_cdb.c
30@@ -116,7 +116,7 @@ target_emulate_inquiry_std(struct se_cmd *cmd)
31 goto out;
32 }
33
34- buf[7] = 0x32; /* Sync=1 and CmdQue=1 */
35+ buf[7] = 0x2; /* CmdQue=1 */
36
37 /*
38 * Do not include vendor, product, reversion info in INQUIRY
39--
401.7.9.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0075-target-fix-use-after-free-in-target_report_luns.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0075-target-fix-use-after-free-in-target_report_luns.patch
new file mode 100644
index 00000000..af278253
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0075-target-fix-use-after-free-in-target_report_luns.patch
@@ -0,0 +1,37 @@
1From 679e28aac79ff6dc71e84679bcd97e5246697ccf Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=B6rn=20Engel?= <joern@logfs.org>
3Date: Wed, 15 Feb 2012 16:51:32 -0500
4Subject: [PATCH 075/147] target: fix use after free in target_report_luns
5
6commit 382436f8804fe1cb20b9a2a811a10eb2d8554721 upstream.
7
8Fix possible NULL pointer dereference in target_report_luns failure path.
9
10Signed-off-by: Joern Engel <joern@logfs.org>
11Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 drivers/target/target_core_device.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
18index 19f8aca..097178b 100644
19--- a/drivers/target/target_core_device.c
20+++ b/drivers/target/target_core_device.c
21@@ -696,12 +696,12 @@ int target_report_luns(struct se_task *se_task)
22 * See SPC3 r07, page 159.
23 */
24 done:
25- transport_kunmap_data_sg(se_cmd);
26 lun_count *= 8;
27 buf[0] = ((lun_count >> 24) & 0xff);
28 buf[1] = ((lun_count >> 16) & 0xff);
29 buf[2] = ((lun_count >> 8) & 0xff);
30 buf[3] = (lun_count & 0xff);
31+ transport_kunmap_data_sg(se_cmd);
32
33 se_task->task_scsi_status = GOOD;
34 transport_complete_task(se_task, 1);
35--
361.7.9.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0076-target-prevent-NULL-pointer-dereference-in-target_re.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0076-target-prevent-NULL-pointer-dereference-in-target_re.patch
new file mode 100644
index 00000000..1899a818
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0076-target-prevent-NULL-pointer-dereference-in-target_re.patch
@@ -0,0 +1,37 @@
1From 238ac5c459c0204f5134a324f95588aed557b41c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=B6rn=20Engel?= <joern@logfs.org>
3Date: Wed, 15 Feb 2012 16:52:11 -0500
4Subject: [PATCH 076/147] target: prevent NULL pointer dereference in
5 target_report_luns
6
7commit 47f1b8803e1e358ebbf4f82bfdb98971c912a2c3 upstream.
8
9transport_kmap_data_sg can return NULL. I never saw this trigger, but
10returning -ENOMEM seems better than a crash. Also removes a pointless
11case while at it.
12
13Signed-off-by: Joern Engel <joern@logfs.org>
14Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/target/target_core_device.c | 4 +++-
18 1 file changed, 3 insertions(+), 1 deletion(-)
19
20diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
21index 097178b..f8773ae 100644
22--- a/drivers/target/target_core_device.c
23+++ b/drivers/target/target_core_device.c
24@@ -658,7 +658,9 @@ int target_report_luns(struct se_task *se_task)
25 unsigned char *buf;
26 u32 cdb_offset = 0, lun_count = 0, offset = 8, i;
27
28- buf = (unsigned char *) transport_kmap_data_sg(se_cmd);
29+ buf = transport_kmap_data_sg(se_cmd);
30+ if (!buf)
31+ return -ENOMEM;
32
33 /*
34 * If no struct se_session pointer is present, this struct se_cmd is
35--
361.7.9.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0077-target-Fix-16-bit-target-ports-for-SET-TARGET-PORT-G.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0077-target-Fix-16-bit-target-ports-for-SET-TARGET-PORT-G.patch
new file mode 100644
index 00000000..ec49efc1
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0077-target-Fix-16-bit-target-ports-for-SET-TARGET-PORT-G.patch
@@ -0,0 +1,54 @@
1From 407e1b9350ad2124952f769ade034023a9155c71 Mon Sep 17 00:00:00 2001
2From: Roland Dreier <roland@purestorage.com>
3Date: Thu, 23 Feb 2012 17:22:12 -0800
4Subject: [PATCH 077/147] target: Fix 16-bit target ports for SET TARGET PORT
5 GROUPS emulation
6
7commit 33395fb8a13731c7ef7b175dbf5a4d8a6738fe6c upstream.
8
9The old code did (MSB << 8) & 0xff, which always evaluates to 0. Just use
10get_unaligned_be16() so we don't have to worry about whether our open-coded
11version is correct or not.
12
13Signed-off-by: Roland Dreier <roland@purestorage.com>
14Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/target/target_core_alua.c | 7 +++----
18 1 file changed, 3 insertions(+), 4 deletions(-)
19
20diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
21index 1d24512..5b05744 100644
22--- a/drivers/target/target_core_alua.c
23+++ b/drivers/target/target_core_alua.c
24@@ -30,6 +30,7 @@
25 #include <linux/export.h>
26 #include <scsi/scsi.h>
27 #include <scsi/scsi_cmnd.h>
28+#include <asm/unaligned.h>
29
30 #include <target/target_core_base.h>
31 #include <target/target_core_device.h>
32@@ -268,8 +269,7 @@ int target_emulate_set_target_port_groups(struct se_task *task)
33 * changed.
34 */
35 if (primary) {
36- tg_pt_id = ((ptr[2] << 8) & 0xff);
37- tg_pt_id |= (ptr[3] & 0xff);
38+ tg_pt_id = get_unaligned_be16(ptr + 2);
39 /*
40 * Locate the matching target port group ID from
41 * the global tg_pt_gp list
42@@ -313,8 +313,7 @@ int target_emulate_set_target_port_groups(struct se_task *task)
43 * the Target Port in question for the the incoming
44 * SET_TARGET_PORT_GROUPS op.
45 */
46- rtpi = ((ptr[2] << 8) & 0xff);
47- rtpi |= (ptr[3] & 0xff);
48+ rtpi = get_unaligned_be16(ptr + 2);
49 /*
50 * Locate the matching relative target port identifer
51 * for the struct se_device storage object.
52--
531.7.9.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0078-Bluetooth-Add-AR30XX-device-ID-on-Asus-laptops.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0078-Bluetooth-Add-AR30XX-device-ID-on-Asus-laptops.patch
new file mode 100644
index 00000000..b0094d10
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0078-Bluetooth-Add-AR30XX-device-ID-on-Asus-laptops.patch
@@ -0,0 +1,67 @@
1From d559faa856c1c6f84dc400b9e77af843d3b79c10 Mon Sep 17 00:00:00 2001
2From: Keng-Yu Lin <kengyu@canonical.com>
3Date: Wed, 30 Nov 2011 18:32:37 +0800
4Subject: [PATCH 078/147] Bluetooth: Add AR30XX device ID on Asus laptops
5
6commit 6b6ba88b5bb8779156b21bb957520a448c3642e2 upstream.
7
8The ID is found on Asus K54HR and K53U.
9Blacklist the AR3011-based device ID [0489:e03d]
10and add to ath3k.c for firmware loading.
11
12Below is the output of usb-devices script:
13
14Before the fiwmware loading:
15
16T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
17D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
18P: Vendor=0489 ProdID=e03d Rev=00.01
19C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
20I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
21I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
22
23After the fiwmware loading:
24
25T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
26D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
27P: Vendor=0cf3 ProdID=3005 Rev=00.01
28C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
29I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
30I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
31
32Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
33Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
34Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
35Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
36---
37 drivers/bluetooth/ath3k.c | 1 +
38 drivers/bluetooth/btusb.c | 1 +
39 2 files changed, 2 insertions(+)
40
41diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
42index 106beb1..db811d2 100644
43--- a/drivers/bluetooth/ath3k.c
44+++ b/drivers/bluetooth/ath3k.c
45@@ -64,6 +64,7 @@ static struct usb_device_id ath3k_table[] = {
46 { USB_DEVICE(0x0CF3, 0x3002) },
47 { USB_DEVICE(0x13d3, 0x3304) },
48 { USB_DEVICE(0x0930, 0x0215) },
49+ { USB_DEVICE(0x0489, 0xE03D) },
50
51 /* Atheros AR9285 Malbec with sflash firmware */
52 { USB_DEVICE(0x03F0, 0x311D) },
53diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
54index eabc437..11a925c 100644
55--- a/drivers/bluetooth/btusb.c
56+++ b/drivers/bluetooth/btusb.c
57@@ -119,6 +119,7 @@ static struct usb_device_id blacklist_table[] = {
58 { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
59 { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
60 { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE },
61+ { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE },
62
63 /* Atheros AR9285 Malbec with sflash firmware */
64 { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
65--
661.7.9.4
67
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0079-HID-add-extra-hotkeys-in-Asus-AIO-keyboards.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0079-HID-add-extra-hotkeys-in-Asus-AIO-keyboards.patch
new file mode 100644
index 00000000..47434eb5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0079-HID-add-extra-hotkeys-in-Asus-AIO-keyboards.patch
@@ -0,0 +1,71 @@
1From 5c473125260020cedb5e4285eea74fc4528eee85 Mon Sep 17 00:00:00 2001
2From: Keng-Yu Lin <kengyu@canonical.com>
3Date: Thu, 2 Feb 2012 10:31:26 +0100
4Subject: [PATCH 079/147] HID: add extra hotkeys in Asus AIO keyboards
5
6commit 3596bb929f2abd3433c2eaa5755fad48ac207af1 upstream.
7
8The Asus All-In-One PC has a wireless keyboard with wifi toggle,
9brightness up, brightness down and display off hotkeys.
10
11This patch adds suppoort for these hotkeys.
12
13Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
14Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/hid/hid-chicony.c | 5 +++++
18 drivers/hid/hid-core.c | 1 +
19 drivers/hid/hid-ids.h | 1 +
20 3 files changed, 7 insertions(+)
21
22diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c
23index 8965ad9..4162505 100644
24--- a/drivers/hid/hid-chicony.c
25+++ b/drivers/hid/hid-chicony.c
26@@ -45,6 +45,10 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
27 case 0xff09: ch_map_key_clear(BTN_9); break;
28 case 0xff0a: ch_map_key_clear(BTN_A); break;
29 case 0xff0b: ch_map_key_clear(BTN_B); break;
30+ case 0x00f1: ch_map_key_clear(KEY_WLAN); break;
31+ case 0x00f2: ch_map_key_clear(KEY_BRIGHTNESSDOWN); break;
32+ case 0x00f3: ch_map_key_clear(KEY_BRIGHTNESSUP); break;
33+ case 0x00f4: ch_map_key_clear(KEY_DISPLAY_OFF); break;
34 default:
35 return 0;
36 }
37@@ -53,6 +57,7 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
38
39 static const struct hid_device_id ch_devices[] = {
40 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
41+ { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
42 { }
43 };
44 MODULE_DEVICE_TABLE(hid, ch_devices);
45diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
46index bb656d8..c27b402 100644
47--- a/drivers/hid/hid-core.c
48+++ b/drivers/hid/hid-core.c
49@@ -1394,6 +1394,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
50 { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) },
51 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
52 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) },
53+ { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
54 { HID_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },
55 { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
56 { HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, USB_DEVICE_ID_CVTOUCH_SCREEN) },
57diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
58index 3c3daec..fba3fc4 100644
59--- a/drivers/hid/hid-ids.h
60+++ b/drivers/hid/hid-ids.h
61@@ -192,6 +192,7 @@
62 #define USB_DEVICE_ID_CHICONY_TACTICAL_PAD 0x0418
63 #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d
64 #define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618
65+#define USB_DEVICE_ID_CHICONY_WIRELESS2 0x1123
66
67 #define USB_VENDOR_ID_CHUNGHWAT 0x2247
68 #define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001
69--
701.7.9.4
71
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0080-HID-add-more-hotkeys-in-Asus-AIO-keyboards.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0080-HID-add-more-hotkeys-in-Asus-AIO-keyboards.patch
new file mode 100644
index 00000000..0543141f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0080-HID-add-more-hotkeys-in-Asus-AIO-keyboards.patch
@@ -0,0 +1,34 @@
1From 236648a7e4f6330831cb031c7c970b07db3cf39f Mon Sep 17 00:00:00 2001
2From: Keng-Yu Lin <kengyu@canonical.com>
3Date: Mon, 30 Jan 2012 14:25:45 +0800
4Subject: [PATCH 080/147] HID: add more hotkeys in Asus AIO keyboards
5
6commit 6c30d5a53229aad22bb675e0bd6eb518ecaa4316 upstream.
7
8Add support for the camera key. The hotkey for
9Asus S.H.E(Super Hybrid Engine) mode is mapped to KEY_KEY_PROG1
10just for notifying the userspace.
11
12Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
13Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/hid/hid-chicony.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c
20index 4162505..b99af34 100644
21--- a/drivers/hid/hid-chicony.c
22+++ b/drivers/hid/hid-chicony.c
23@@ -49,6 +49,8 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
24 case 0x00f2: ch_map_key_clear(KEY_BRIGHTNESSDOWN); break;
25 case 0x00f3: ch_map_key_clear(KEY_BRIGHTNESSUP); break;
26 case 0x00f4: ch_map_key_clear(KEY_DISPLAY_OFF); break;
27+ case 0x00f7: ch_map_key_clear(KEY_CAMERA); break;
28+ case 0x00f8: ch_map_key_clear(KEY_PROG1); break;
29 default:
30 return 0;
31 }
32--
331.7.9.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0081-pata_legacy-correctly-mask-recovery-field-for-HT6560.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0081-pata_legacy-correctly-mask-recovery-field-for-HT6560.patch
new file mode 100644
index 00000000..daf2cc7e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0081-pata_legacy-correctly-mask-recovery-field-for-HT6560.patch
@@ -0,0 +1,36 @@
1From 9d312025d223d521d0f5a46ab994323646114050 Mon Sep 17 00:00:00 2001
2From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
3Date: Thu, 19 Jan 2012 19:09:56 +0300
4Subject: [PATCH 081/147] pata_legacy: correctly mask recovery field for
5 HT6560B
6
7commit 9716387311c790de381214c03e7f1b72b91a8189 upstream.
8
9According to the HT6560H datasheet, the recovery timing field is 4-bit wide,
10with a value of 0 meaning 16 cycles. Correct obvious thinko in the recovery
11field mask.
12
13Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
14Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/ata/pata_legacy.c | 3 +--
18 1 file changed, 1 insertion(+), 2 deletions(-)
19
20diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
21index 35aca7d..4fe9d21 100644
22--- a/drivers/ata/pata_legacy.c
23+++ b/drivers/ata/pata_legacy.c
24@@ -401,8 +401,7 @@ static void ht6560b_set_piomode(struct ata_port *ap, struct ata_device *adev)
25 ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000);
26
27 active = clamp_val(t.active, 2, 15);
28- recover = clamp_val(t.recover, 2, 16);
29- recover &= 0x15;
30+ recover = clamp_val(t.recover, 2, 16) & 0x0F;
31
32 inb(0x3E6);
33 inb(0x3E6);
34--
351.7.9.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0082-firewire-ohci-fix-too-early-completion-of-IR-multich.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0082-firewire-ohci-fix-too-early-completion-of-IR-multich.patch
new file mode 100644
index 00000000..0eefc068
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0082-firewire-ohci-fix-too-early-completion-of-IR-multich.patch
@@ -0,0 +1,55 @@
1From d98908a17ece4ec33e477158112adc527c365b83 Mon Sep 17 00:00:00 2001
2From: Clemens Ladisch <clemens@ladisch.de>
3Date: Mon, 12 Mar 2012 21:45:47 +0100
4Subject: [PATCH 082/147] firewire: ohci: fix too-early completion of IR
5 multichannel buffers
6
7commit 0c0efbacab8d70700d13301e0ae7975783c0cb0a upstream.
8
9handle_ir_buffer_fill() assumed that a completed descriptor would be
10indicated by a non-zero transfer_status (as in most other descriptors).
11However, this field is written by the controller as soon as (the end of)
12the first packet has been written into the buffer. As a consequence, if
13we happen to run into such a descriptor when the interrupt handler is
14executed after such a packet has completed, the descriptor would be
15taken out of the list of active descriptors as soon as the buffer had
16been partially filled, so the event for the buffer being completely
17filled would never be sent.
18
19To fix this, handle descriptors only when they have been completely
20filled, i.e., when res_count == 0. (This also matches the condition
21that is reported by the controller with an interrupt.)
22
23Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
24Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 drivers/firewire/ohci.c | 5 ++---
28 1 file changed, 2 insertions(+), 3 deletions(-)
29
30diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
31index 7f5f0da..0a0225a 100644
32--- a/drivers/firewire/ohci.c
33+++ b/drivers/firewire/ohci.c
34@@ -2748,7 +2748,7 @@ static int handle_ir_buffer_fill(struct context *context,
35 container_of(context, struct iso_context, context);
36 u32 buffer_dma;
37
38- if (!last->transfer_status)
39+ if (last->res_count != 0)
40 /* Descriptor(s) not done yet, stop iteration */
41 return 0;
42
43@@ -2762,8 +2762,7 @@ static int handle_ir_buffer_fill(struct context *context,
44 if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS)
45 ctx->base.callback.mc(&ctx->base,
46 le32_to_cpu(last->data_address) +
47- le16_to_cpu(last->req_count) -
48- le16_to_cpu(last->res_count),
49+ le16_to_cpu(last->req_count),
50 ctx->base.callback_data);
51
52 return 1;
53--
541.7.9.4
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0083-KVM-x86-extend-struct-x86_emulate_ops-with-get_cpuid.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0083-KVM-x86-extend-struct-x86_emulate_ops-with-get_cpuid.patch
new file mode 100644
index 00000000..8e4c572a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0083-KVM-x86-extend-struct-x86_emulate_ops-with-get_cpuid.patch
@@ -0,0 +1,82 @@
1From d76b5f6c352194eaec8afbe8397b43f1ee4130d0 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Stephan=20B=C3=A4rwolf?= <stephan.baerwolf@tu-ilmenau.de>
3Date: Thu, 12 Jan 2012 16:43:03 +0100
4Subject: [PATCH 083/147] KVM: x86: extend "struct x86_emulate_ops" with
5 "get_cpuid"
6
7commit bdb42f5afebe208eae90406959383856ae2caf2b upstream.
8
9In order to be able to proceed checks on CPU-specific properties
10within the emulator, function "get_cpuid" is introduced.
11With "get_cpuid" it is possible to virtually call the guests
12"cpuid"-opcode without changing the VM's context.
13
14[mtosatti: cleanup/beautify code]
15
16Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
17Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
18Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 arch/x86/include/asm/kvm_emulate.h | 3 +++
22 arch/x86/kvm/x86.c | 23 +++++++++++++++++++++++
23 2 files changed, 26 insertions(+)
24
25diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
26index a026507..a440a7f 100644
27--- a/arch/x86/include/asm/kvm_emulate.h
28+++ b/arch/x86/include/asm/kvm_emulate.h
29@@ -189,6 +189,9 @@ struct x86_emulate_ops {
30 int (*intercept)(struct x86_emulate_ctxt *ctxt,
31 struct x86_instruction_info *info,
32 enum x86_intercept_stage stage);
33+
34+ bool (*get_cpuid)(struct x86_emulate_ctxt *ctxt,
35+ u32 *eax, u32 *ebx, u32 *ecx, u32 *edx);
36 };
37
38 typedef u32 __attribute__((vector_size(16))) sse128_t;
39diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
40index 4c938da..e04cae1 100644
41--- a/arch/x86/kvm/x86.c
42+++ b/arch/x86/kvm/x86.c
43@@ -4655,6 +4655,28 @@ static int emulator_intercept(struct x86_emulate_ctxt *ctxt,
44 return kvm_x86_ops->check_intercept(emul_to_vcpu(ctxt), info, stage);
45 }
46
47+static bool emulator_get_cpuid(struct x86_emulate_ctxt *ctxt,
48+ u32 *eax, u32 *ebx, u32 *ecx, u32 *edx)
49+{
50+ struct kvm_cpuid_entry2 *cpuid = NULL;
51+
52+ if (eax && ecx)
53+ cpuid = kvm_find_cpuid_entry(emul_to_vcpu(ctxt),
54+ *eax, *ecx);
55+
56+ if (cpuid) {
57+ *eax = cpuid->eax;
58+ *ecx = cpuid->ecx;
59+ if (ebx)
60+ *ebx = cpuid->ebx;
61+ if (edx)
62+ *edx = cpuid->edx;
63+ return true;
64+ }
65+
66+ return false;
67+}
68+
69 static struct x86_emulate_ops emulate_ops = {
70 .read_std = kvm_read_guest_virt_system,
71 .write_std = kvm_write_guest_virt_system,
72@@ -4685,6 +4707,7 @@ static struct x86_emulate_ops emulate_ops = {
73 .get_fpu = emulator_get_fpu,
74 .put_fpu = emulator_put_fpu,
75 .intercept = emulator_intercept,
76+ .get_cpuid = emulator_get_cpuid,
77 };
78
79 static void cache_all_regs(struct kvm_vcpu *vcpu)
80--
811.7.9.4
82
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0084-KVM-x86-fix-missing-checks-in-syscall-emulation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0084-KVM-x86-fix-missing-checks-in-syscall-emulation.patch
new file mode 100644
index 00000000..bc72a838
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0084-KVM-x86-fix-missing-checks-in-syscall-emulation.patch
@@ -0,0 +1,148 @@
1From 9dab57c31c4146a8d1118a8c833fb8a3e788fec6 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Stephan=20B=C3=A4rwolf?= <stephan.baerwolf@tu-ilmenau.de>
3Date: Thu, 12 Jan 2012 16:43:04 +0100
4Subject: [PATCH 084/147] KVM: x86: fix missing checks in syscall emulation
5
6commit c2226fc9e87ba3da060e47333657cd6616652b84 upstream.
7
8On hosts without this patch, 32bit guests will crash (and 64bit guests
9may behave in a wrong way) for example by simply executing following
10nasm-demo-application:
11
12 [bits 32]
13 global _start
14 SECTION .text
15 _start: syscall
16
17(I tested it with winxp and linux - both always crashed)
18
19 Disassembly of section .text:
20
21 00000000 <_start>:
22 0: 0f 05 syscall
23
24The reason seems a missing "invalid opcode"-trap (int6) for the
25syscall opcode "0f05", which is not available on Intel CPUs
26within non-longmodes, as also on some AMD CPUs within legacy-mode.
27(depending on CPU vendor, MSR_EFER and cpuid)
28
29Because previous mentioned OSs may not engage corresponding
30syscall target-registers (STAR, LSTAR, CSTAR), they remain
31NULL and (non trapping) syscalls are leading to multiple
32faults and finally crashs.
33
34Depending on the architecture (AMD or Intel) pretended by
35guests, various checks according to vendor's documentation
36are implemented to overcome the current issue and behave
37like the CPUs physical counterparts.
38
39[mtosatti: cleanup/beautify code]
40
41Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
42Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
43Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
44Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
45---
46 arch/x86/include/asm/kvm_emulate.h | 13 +++++++++
47 arch/x86/kvm/emulate.c | 51 ++++++++++++++++++++++++++++++++++++
48 2 files changed, 64 insertions(+)
49
50diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
51index a440a7f..70ea6fd 100644
52--- a/arch/x86/include/asm/kvm_emulate.h
53+++ b/arch/x86/include/asm/kvm_emulate.h
54@@ -300,6 +300,19 @@ struct x86_emulate_ctxt {
55 #define X86EMUL_MODE_PROT (X86EMUL_MODE_PROT16|X86EMUL_MODE_PROT32| \
56 X86EMUL_MODE_PROT64)
57
58+/* CPUID vendors */
59+#define X86EMUL_CPUID_VENDOR_AuthenticAMD_ebx 0x68747541
60+#define X86EMUL_CPUID_VENDOR_AuthenticAMD_ecx 0x444d4163
61+#define X86EMUL_CPUID_VENDOR_AuthenticAMD_edx 0x69746e65
62+
63+#define X86EMUL_CPUID_VENDOR_AMDisbetterI_ebx 0x69444d41
64+#define X86EMUL_CPUID_VENDOR_AMDisbetterI_ecx 0x21726574
65+#define X86EMUL_CPUID_VENDOR_AMDisbetterI_edx 0x74656273
66+
67+#define X86EMUL_CPUID_VENDOR_GenuineIntel_ebx 0x756e6547
68+#define X86EMUL_CPUID_VENDOR_GenuineIntel_ecx 0x6c65746e
69+#define X86EMUL_CPUID_VENDOR_GenuineIntel_edx 0x49656e69
70+
71 enum x86_intercept_stage {
72 X86_ICTP_NONE = 0, /* Allow zero-init to not match anything */
73 X86_ICPT_PRE_EXCEPT,
74diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
75index f1e3be18..f5302da 100644
76--- a/arch/x86/kvm/emulate.c
77+++ b/arch/x86/kvm/emulate.c
78@@ -1877,6 +1877,51 @@ setup_syscalls_segments(struct x86_emulate_ctxt *ctxt,
79 ss->p = 1;
80 }
81
82+static bool em_syscall_is_enabled(struct x86_emulate_ctxt *ctxt)
83+{
84+ struct x86_emulate_ops *ops = ctxt->ops;
85+ u32 eax, ebx, ecx, edx;
86+
87+ /*
88+ * syscall should always be enabled in longmode - so only become
89+ * vendor specific (cpuid) if other modes are active...
90+ */
91+ if (ctxt->mode == X86EMUL_MODE_PROT64)
92+ return true;
93+
94+ eax = 0x00000000;
95+ ecx = 0x00000000;
96+ if (ops->get_cpuid(ctxt, &eax, &ebx, &ecx, &edx)) {
97+ /*
98+ * Intel ("GenuineIntel")
99+ * remark: Intel CPUs only support "syscall" in 64bit
100+ * longmode. Also an 64bit guest with a
101+ * 32bit compat-app running will #UD !! While this
102+ * behaviour can be fixed (by emulating) into AMD
103+ * response - CPUs of AMD can't behave like Intel.
104+ */
105+ if (ebx == X86EMUL_CPUID_VENDOR_GenuineIntel_ebx &&
106+ ecx == X86EMUL_CPUID_VENDOR_GenuineIntel_ecx &&
107+ edx == X86EMUL_CPUID_VENDOR_GenuineIntel_edx)
108+ return false;
109+
110+ /* AMD ("AuthenticAMD") */
111+ if (ebx == X86EMUL_CPUID_VENDOR_AuthenticAMD_ebx &&
112+ ecx == X86EMUL_CPUID_VENDOR_AuthenticAMD_ecx &&
113+ edx == X86EMUL_CPUID_VENDOR_AuthenticAMD_edx)
114+ return true;
115+
116+ /* AMD ("AMDisbetter!") */
117+ if (ebx == X86EMUL_CPUID_VENDOR_AMDisbetterI_ebx &&
118+ ecx == X86EMUL_CPUID_VENDOR_AMDisbetterI_ecx &&
119+ edx == X86EMUL_CPUID_VENDOR_AMDisbetterI_edx)
120+ return true;
121+ }
122+
123+ /* default: (not Intel, not AMD), apply Intel's stricter rules... */
124+ return false;
125+}
126+
127 static int em_syscall(struct x86_emulate_ctxt *ctxt)
128 {
129 struct x86_emulate_ops *ops = ctxt->ops;
130@@ -1890,9 +1935,15 @@ static int em_syscall(struct x86_emulate_ctxt *ctxt)
131 ctxt->mode == X86EMUL_MODE_VM86)
132 return emulate_ud(ctxt);
133
134+ if (!(em_syscall_is_enabled(ctxt)))
135+ return emulate_ud(ctxt);
136+
137 ops->get_msr(ctxt, MSR_EFER, &efer);
138 setup_syscalls_segments(ctxt, &cs, &ss);
139
140+ if (!(efer & EFER_SCE))
141+ return emulate_ud(ctxt);
142+
143 ops->get_msr(ctxt, MSR_STAR, &msr_data);
144 msr_data >>= 32;
145 cs_sel = (u16)(msr_data & 0xfffc);
146--
1471.7.9.4
148
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0085-NFS-Properly-handle-the-case-where-the-delegation-is.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0085-NFS-Properly-handle-the-case-where-the-delegation-is.patch
new file mode 100644
index 00000000..ac42054c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0085-NFS-Properly-handle-the-case-where-the-delegation-is.patch
@@ -0,0 +1,193 @@
1From 3876d640cb4c4f09bdc26a8befea1df94fd4e71e Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Mon, 5 Mar 2012 19:56:44 -0500
4Subject: [PATCH 085/147] NFS: Properly handle the case where the delegation
5 is revoked
6
7commit a1d0b5eebc4fd6e0edb02688b35f17f67f42aea5 upstream.
8
9If we know that the delegation stateid is bad or revoked, we need to
10remove that delegation as soon as possible, and then mark all the
11stateids that relied on that delegation for recovery. We cannot use
12the delegation as part of the recovery process.
13
14Also note that NFSv4.1 uses a different error code (NFS4ERR_DELEG_REVOKED)
15to indicate that the delegation was revoked.
16
17Finally, ensure that setlk() and setattr() can both recover safely from
18a revoked delegation.
19
20Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 fs/nfs/delegation.c | 11 +++++++++++
24 fs/nfs/delegation.h | 1 +
25 fs/nfs/nfs4_fs.h | 2 ++
26 fs/nfs/nfs4proc.c | 18 ++++++++++++++++--
27 fs/nfs/nfs4state.c | 29 +++++++++++++++++++++++++++--
28 5 files changed, 57 insertions(+), 4 deletions(-)
29
30diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
31index 7f26540..ac889af 100644
32--- a/fs/nfs/delegation.c
33+++ b/fs/nfs/delegation.c
34@@ -466,6 +466,17 @@ static void nfs_delegation_run_state_manager(struct nfs_client *clp)
35 nfs4_schedule_state_manager(clp);
36 }
37
38+void nfs_remove_bad_delegation(struct inode *inode)
39+{
40+ struct nfs_delegation *delegation;
41+
42+ delegation = nfs_detach_delegation(NFS_I(inode), NFS_SERVER(inode));
43+ if (delegation) {
44+ nfs_inode_find_state_and_recover(inode, &delegation->stateid);
45+ nfs_free_delegation(delegation);
46+ }
47+}
48+
49 /**
50 * nfs_expire_all_delegation_types
51 * @clp: client to process
52diff --git a/fs/nfs/delegation.h b/fs/nfs/delegation.h
53index d9322e4..691a796 100644
54--- a/fs/nfs/delegation.h
55+++ b/fs/nfs/delegation.h
56@@ -45,6 +45,7 @@ void nfs_expire_unreferenced_delegations(struct nfs_client *clp);
57 void nfs_handle_cb_pathdown(struct nfs_client *clp);
58 int nfs_client_return_marked_delegations(struct nfs_client *clp);
59 int nfs_delegations_present(struct nfs_client *clp);
60+void nfs_remove_bad_delegation(struct inode *inode);
61
62 void nfs_delegation_mark_reclaim(struct nfs_client *clp);
63 void nfs_delegation_reap_unclaimed(struct nfs_client *clp);
64diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
65index 693ae22..d6ba137f 100644
66--- a/fs/nfs/nfs4_fs.h
67+++ b/fs/nfs/nfs4_fs.h
68@@ -324,6 +324,8 @@ extern void nfs4_put_open_state(struct nfs4_state *);
69 extern void nfs4_close_state(struct nfs4_state *, fmode_t);
70 extern void nfs4_close_sync(struct nfs4_state *, fmode_t);
71 extern void nfs4_state_set_mode_locked(struct nfs4_state *, fmode_t);
72+extern void nfs_inode_find_state_and_recover(struct inode *inode,
73+ const nfs4_stateid *stateid);
74 extern void nfs4_schedule_lease_recovery(struct nfs_client *);
75 extern void nfs4_schedule_state_manager(struct nfs_client *);
76 extern void nfs4_schedule_path_down_recovery(struct nfs_client *clp);
77diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
78index e527030..a51e1dd 100644
79--- a/fs/nfs/nfs4proc.c
80+++ b/fs/nfs/nfs4proc.c
81@@ -263,8 +263,11 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
82 switch(errorcode) {
83 case 0:
84 return 0;
85+ case -NFS4ERR_DELEG_REVOKED:
86 case -NFS4ERR_ADMIN_REVOKED:
87 case -NFS4ERR_BAD_STATEID:
88+ if (state != NULL)
89+ nfs_remove_bad_delegation(state->inode);
90 case -NFS4ERR_OPENMODE:
91 if (state == NULL)
92 break;
93@@ -1316,8 +1319,11 @@ int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state
94 * The show must go on: exit, but mark the
95 * stateid as needing recovery.
96 */
97+ case -NFS4ERR_DELEG_REVOKED:
98 case -NFS4ERR_ADMIN_REVOKED:
99 case -NFS4ERR_BAD_STATEID:
100+ nfs_inode_find_state_and_recover(state->inode,
101+ stateid);
102 nfs4_schedule_stateid_recovery(server, state);
103 case -EKEYEXPIRED:
104 /*
105@@ -1893,7 +1899,9 @@ static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
106 struct nfs4_state *state)
107 {
108 struct nfs_server *server = NFS_SERVER(inode);
109- struct nfs4_exception exception = { };
110+ struct nfs4_exception exception = {
111+ .state = state,
112+ };
113 int err;
114 do {
115 err = nfs4_handle_exception(server,
116@@ -3707,8 +3715,11 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,
117 if (task->tk_status >= 0)
118 return 0;
119 switch(task->tk_status) {
120+ case -NFS4ERR_DELEG_REVOKED:
121 case -NFS4ERR_ADMIN_REVOKED:
122 case -NFS4ERR_BAD_STATEID:
123+ if (state != NULL)
124+ nfs_remove_bad_delegation(state->inode);
125 case -NFS4ERR_OPENMODE:
126 if (state == NULL)
127 break;
128@@ -4526,7 +4537,9 @@ out:
129
130 static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
131 {
132- struct nfs4_exception exception = { };
133+ struct nfs4_exception exception = {
134+ .state = state,
135+ };
136 int err;
137
138 do {
139@@ -4619,6 +4632,7 @@ int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl)
140 * The show must go on: exit, but mark the
141 * stateid as needing recovery.
142 */
143+ case -NFS4ERR_DELEG_REVOKED:
144 case -NFS4ERR_ADMIN_REVOKED:
145 case -NFS4ERR_BAD_STATEID:
146 case -NFS4ERR_OPENMODE:
147diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
148index a58eed7..0596fd6 100644
149--- a/fs/nfs/nfs4state.c
150+++ b/fs/nfs/nfs4state.c
151@@ -1071,12 +1071,37 @@ void nfs4_schedule_stateid_recovery(const struct nfs_server *server, struct nfs4
152 {
153 struct nfs_client *clp = server->nfs_client;
154
155- if (test_and_clear_bit(NFS_DELEGATED_STATE, &state->flags))
156- nfs_async_inode_return_delegation(state->inode, &state->stateid);
157 nfs4_state_mark_reclaim_nograce(clp, state);
158 nfs4_schedule_state_manager(clp);
159 }
160
161+void nfs_inode_find_state_and_recover(struct inode *inode,
162+ const nfs4_stateid *stateid)
163+{
164+ struct nfs_client *clp = NFS_SERVER(inode)->nfs_client;
165+ struct nfs_inode *nfsi = NFS_I(inode);
166+ struct nfs_open_context *ctx;
167+ struct nfs4_state *state;
168+ bool found = false;
169+
170+ spin_lock(&inode->i_lock);
171+ list_for_each_entry(ctx, &nfsi->open_files, list) {
172+ state = ctx->state;
173+ if (state == NULL)
174+ continue;
175+ if (!test_bit(NFS_DELEGATED_STATE, &state->flags))
176+ continue;
177+ if (memcmp(state->stateid.data, stateid->data, sizeof(state->stateid.data)) != 0)
178+ continue;
179+ nfs4_state_mark_reclaim_nograce(clp, state);
180+ found = true;
181+ }
182+ spin_unlock(&inode->i_lock);
183+ if (found)
184+ nfs4_schedule_state_manager(clp);
185+}
186+
187+
188 static int nfs4_reclaim_locks(struct nfs4_state *state, const struct nfs4_state_recovery_ops *ops)
189 {
190 struct inode *inode = state->inode;
191--
1921.7.9.4
193
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0086-NFSv4-Return-the-delegation-if-the-server-returns-NF.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0086-NFSv4-Return-the-delegation-if-the-server-returns-NF.patch
new file mode 100644
index 00000000..ee59f30e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0086-NFSv4-Return-the-delegation-if-the-server-returns-NF.patch
@@ -0,0 +1,77 @@
1From f56543c626d44b8ca33f2d37ee4758d1faab0e74 Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Wed, 7 Mar 2012 16:39:06 -0500
4Subject: [PATCH 086/147] NFSv4: Return the delegation if the server returns
5 NFS4ERR_OPENMODE
6
7commit 3114ea7a24d3264c090556a2444fc6d2c06176d4 upstream.
8
9If a setattr() fails because of an NFS4ERR_OPENMODE error, it is
10probably due to us holding a read delegation. Ensure that the
11recovery routines return that delegation in this case.
12
13Reported-by: Miklos Szeredi <miklos@szeredi.hu>
14Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 fs/nfs/nfs4_fs.h | 1 +
18 fs/nfs/nfs4proc.c | 13 ++++++++++++-
19 2 files changed, 13 insertions(+), 1 deletion(-)
20
21diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
22index d6ba137f..0983b25 100644
23--- a/fs/nfs/nfs4_fs.h
24+++ b/fs/nfs/nfs4_fs.h
25@@ -191,6 +191,7 @@ struct nfs4_exception {
26 long timeout;
27 int retry;
28 struct nfs4_state *state;
29+ struct inode *inode;
30 };
31
32 struct nfs4_state_recovery_ops {
33diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
34index a51e1dd..758e809 100644
35--- a/fs/nfs/nfs4proc.c
36+++ b/fs/nfs/nfs4proc.c
37@@ -257,18 +257,28 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
38 {
39 struct nfs_client *clp = server->nfs_client;
40 struct nfs4_state *state = exception->state;
41+ struct inode *inode = exception->inode;
42 int ret = errorcode;
43
44 exception->retry = 0;
45 switch(errorcode) {
46 case 0:
47 return 0;
48+ case -NFS4ERR_OPENMODE:
49+ if (nfs_have_delegation(inode, FMODE_READ)) {
50+ nfs_inode_return_delegation(inode);
51+ exception->retry = 1;
52+ return 0;
53+ }
54+ if (state == NULL)
55+ break;
56+ nfs4_schedule_stateid_recovery(server, state);
57+ goto wait_on_recovery;
58 case -NFS4ERR_DELEG_REVOKED:
59 case -NFS4ERR_ADMIN_REVOKED:
60 case -NFS4ERR_BAD_STATEID:
61 if (state != NULL)
62 nfs_remove_bad_delegation(state->inode);
63- case -NFS4ERR_OPENMODE:
64 if (state == NULL)
65 break;
66 nfs4_schedule_stateid_recovery(server, state);
67@@ -1901,6 +1911,7 @@ static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
68 struct nfs_server *server = NFS_SERVER(inode);
69 struct nfs4_exception exception = {
70 .state = state,
71+ .inode = inode,
72 };
73 int err;
74 do {
75--
761.7.9.4
77
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0087-xfs-fix-inode-lookup-race.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0087-xfs-fix-inode-lookup-race.patch
new file mode 100644
index 00000000..0f9e2102
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0087-xfs-fix-inode-lookup-race.patch
@@ -0,0 +1,101 @@
1From e5d6f5ef25f0e67126092de0837e7c8f2ecfbc86 Mon Sep 17 00:00:00 2001
2From: Dave Chinner <dchinner@redhat.com>
3Date: Wed, 7 Mar 2012 04:50:25 +0000
4Subject: [PATCH 087/147] xfs: fix inode lookup race
5
6commit f30d500f809eca67a21704347ab14bb35877b5ee upstream.
7
8When we get concurrent lookups of the same inode that is not in the
9per-AG inode cache, there is a race condition that triggers warnings
10in unlock_new_inode() indicating that we are initialising an inode
11that isn't in a the correct state for a new inode.
12
13When we do an inode lookup via a file handle or a bulkstat, we don't
14serialise lookups at a higher level through the dentry cache (i.e.
15pathless lookup), and so we can get concurrent lookups of the same
16inode.
17
18The race condition is between the insertion of the inode into the
19cache in the case of a cache miss and a concurrently lookup:
20
21Thread 1 Thread 2
22xfs_iget()
23 xfs_iget_cache_miss()
24 xfs_iread()
25 lock radix tree
26 radix_tree_insert()
27 rcu_read_lock
28 radix_tree_lookup
29 lock inode flags
30 XFS_INEW not set
31 igrab()
32 unlock inode flags
33 rcu_read_unlock
34 use uninitialised inode
35 .....
36 lock inode flags
37 set XFS_INEW
38 unlock inode flags
39 unlock radix tree
40 xfs_setup_inode()
41 inode flags = I_NEW
42 unlock_new_inode()
43 WARNING as inode flags != I_NEW
44
45This can lead to inode corruption, inode list corruption, etc, and
46is generally a bad thing to occur.
47
48Fix this by setting XFS_INEW before inserting the inode into the
49radix tree. This will ensure any concurrent lookup will find the new
50inode with XFS_INEW set and that forces the lookup to wait until the
51XFS_INEW flag is removed before allowing the lookup to succeed.
52
53Signed-off-by: Dave Chinner <dchinner@redhat.com>
54Reviewed-by: Christoph Hellwig <hch@lst.de>
55Signed-off-by: Ben Myers <bpm@sgi.com>
56Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
57---
58 fs/xfs/xfs_iget.c | 18 ++++++++++++------
59 1 file changed, 12 insertions(+), 6 deletions(-)
60
61diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
62index 0fa98b1..cfc4277 100644
63--- a/fs/xfs/xfs_iget.c
64+++ b/fs/xfs/xfs_iget.c
65@@ -353,9 +353,20 @@ xfs_iget_cache_miss(
66 BUG();
67 }
68
69- spin_lock(&pag->pag_ici_lock);
70+ /*
71+ * These values must be set before inserting the inode into the radix
72+ * tree as the moment it is inserted a concurrent lookup (allowed by the
73+ * RCU locking mechanism) can find it and that lookup must see that this
74+ * is an inode currently under construction (i.e. that XFS_INEW is set).
75+ * The ip->i_flags_lock that protects the XFS_INEW flag forms the
76+ * memory barrier that ensures this detection works correctly at lookup
77+ * time.
78+ */
79+ ip->i_udquot = ip->i_gdquot = NULL;
80+ xfs_iflags_set(ip, XFS_INEW);
81
82 /* insert the new inode */
83+ spin_lock(&pag->pag_ici_lock);
84 error = radix_tree_insert(&pag->pag_ici_root, agino, ip);
85 if (unlikely(error)) {
86 WARN_ON(error != -EEXIST);
87@@ -363,11 +374,6 @@ xfs_iget_cache_miss(
88 error = EAGAIN;
89 goto out_preload_end;
90 }
91-
92- /* These values _must_ be set before releasing the radix tree lock! */
93- ip->i_udquot = ip->i_gdquot = NULL;
94- xfs_iflags_set(ip, XFS_INEW);
95-
96 spin_unlock(&pag->pag_ici_lock);
97 radix_tree_preload_end();
98
99--
1001.7.9.4
101
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0088-CIFS-Respect-negotiated-MaxMpxCount.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0088-CIFS-Respect-negotiated-MaxMpxCount.patch
new file mode 100644
index 00000000..5f2a0dd3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0088-CIFS-Respect-negotiated-MaxMpxCount.patch
@@ -0,0 +1,212 @@
1From 8ceb94d9185c4640cf49d48a06ddfb9ef94ec16d Mon Sep 17 00:00:00 2001
2From: Pavel Shilovsky <piastry@etersoft.ru>
3Date: Tue, 20 Mar 2012 12:55:09 +0300
4Subject: [PATCH 088/147] CIFS: Respect negotiated MaxMpxCount
5
6commit 10b9b98e41ba248a899f6175ce96ee91431b6194 upstream.
7
8Some servers sets this value less than 50 that was hardcoded and
9we lost the connection if when we exceed this limit. Fix this by
10respecting this value - not sending more than the server allows.
11
12Reviewed-by: Jeff Layton <jlayton@samba.org>
13Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
14Signed-off-by: Steve French <sfrench@us.ibm.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 fs/cifs/cifsfs.c | 8 ++++----
18 fs/cifs/cifsglob.h | 10 +++-------
19 fs/cifs/cifssmb.c | 9 +++++++--
20 fs/cifs/connect.c | 11 ++++-------
21 fs/cifs/dir.c | 6 ++++--
22 fs/cifs/file.c | 4 ++--
23 fs/cifs/transport.c | 4 ++--
24 7 files changed, 26 insertions(+), 26 deletions(-)
25
26diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
27index 8f1fe32..b4c2c99 100644
28--- a/fs/cifs/cifsfs.c
29+++ b/fs/cifs/cifsfs.c
30@@ -76,7 +76,7 @@ MODULE_PARM_DESC(cifs_min_small, "Small network buffers in pool. Default: 30 "
31 unsigned int cifs_max_pending = CIFS_MAX_REQ;
32 module_param(cifs_max_pending, int, 0444);
33 MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. "
34- "Default: 50 Range: 2 to 256");
35+ "Default: 32767 Range: 2 to 32767.");
36 unsigned short echo_retries = 5;
37 module_param(echo_retries, ushort, 0644);
38 MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and "
39@@ -1116,9 +1116,9 @@ init_cifs(void)
40 if (cifs_max_pending < 2) {
41 cifs_max_pending = 2;
42 cFYI(1, "cifs_max_pending set to min of 2");
43- } else if (cifs_max_pending > 256) {
44- cifs_max_pending = 256;
45- cFYI(1, "cifs_max_pending set to max of 256");
46+ } else if (cifs_max_pending > CIFS_MAX_REQ) {
47+ cifs_max_pending = CIFS_MAX_REQ;
48+ cFYI(1, "cifs_max_pending set to max of %u", CIFS_MAX_REQ);
49 }
50
51 rc = cifs_fscache_register();
52diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
53index 8238aa1..c467ac8 100644
54--- a/fs/cifs/cifsglob.h
55+++ b/fs/cifs/cifsglob.h
56@@ -55,14 +55,9 @@
57
58 /*
59 * MAX_REQ is the maximum number of requests that WE will send
60- * on one socket concurrently. It also matches the most common
61- * value of max multiplex returned by servers. We may
62- * eventually want to use the negotiated value (in case
63- * future servers can handle more) when we are more confident that
64- * we will not have problems oveloading the socket with pending
65- * write data.
66+ * on one socket concurrently.
67 */
68-#define CIFS_MAX_REQ 50
69+#define CIFS_MAX_REQ 32767
70
71 #define RFC1001_NAME_LEN 15
72 #define RFC1001_NAME_LEN_WITH_NULL (RFC1001_NAME_LEN + 1)
73@@ -263,6 +258,7 @@ struct TCP_Server_Info {
74 bool session_estab; /* mark when very first sess is established */
75 u16 dialect; /* dialect index that server chose */
76 enum securityEnum secType;
77+ bool oplocks:1; /* enable oplocks */
78 unsigned int maxReq; /* Clients should submit no more */
79 /* than maxReq distinct unanswered SMBs to the server when using */
80 /* multiplexed reads or writes */
81diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
82index 6600aa2..0e6adac 100644
83--- a/fs/cifs/cifssmb.c
84+++ b/fs/cifs/cifssmb.c
85@@ -458,7 +458,10 @@ CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses)
86 goto neg_err_exit;
87 }
88 server->sec_mode = (__u8)le16_to_cpu(rsp->SecurityMode);
89- server->maxReq = le16_to_cpu(rsp->MaxMpxCount);
90+ server->maxReq = min_t(unsigned int,
91+ le16_to_cpu(rsp->MaxMpxCount),
92+ cifs_max_pending);
93+ server->oplocks = server->maxReq > 1 ? enable_oplocks : false;
94 server->maxBuf = le16_to_cpu(rsp->MaxBufSize);
95 server->max_vcs = le16_to_cpu(rsp->MaxNumberVcs);
96 /* even though we do not use raw we might as well set this
97@@ -564,7 +567,9 @@ CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses)
98
99 /* one byte, so no need to convert this or EncryptionKeyLen from
100 little endian */
101- server->maxReq = le16_to_cpu(pSMBr->MaxMpxCount);
102+ server->maxReq = min_t(unsigned int, le16_to_cpu(pSMBr->MaxMpxCount),
103+ cifs_max_pending);
104+ server->oplocks = server->maxReq > 1 ? enable_oplocks : false;
105 /* probably no need to store and check maxvcs */
106 server->maxBuf = le32_to_cpu(pSMBr->MaxBufferSize);
107 server->max_rw = le32_to_cpu(pSMBr->MaxRawSize);
108diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
109index 720edf5..a26b98f 100644
110--- a/fs/cifs/connect.c
111+++ b/fs/cifs/connect.c
112@@ -625,14 +625,10 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
113 spin_unlock(&GlobalMid_Lock);
114 wake_up_all(&server->response_q);
115
116- /*
117- * Check if we have blocked requests that need to free. Note that
118- * cifs_max_pending is normally 50, but can be set at module install
119- * time to as little as two.
120- */
121+ /* Check if we have blocked requests that need to free. */
122 spin_lock(&GlobalMid_Lock);
123- if (atomic_read(&server->inFlight) >= cifs_max_pending)
124- atomic_set(&server->inFlight, cifs_max_pending - 1);
125+ if (atomic_read(&server->inFlight) >= server->maxReq)
126+ atomic_set(&server->inFlight, server->maxReq - 1);
127 /*
128 * We do not want to set the max_pending too low or we could end up
129 * with the counter going negative.
130@@ -1890,6 +1886,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
131 tcp_ses->noautotune = volume_info->noautotune;
132 tcp_ses->tcp_nodelay = volume_info->sockopt_tcp_nodelay;
133 atomic_set(&tcp_ses->inFlight, 0);
134+ tcp_ses->maxReq = 1; /* enough to send negotiate request */
135 init_waitqueue_head(&tcp_ses->response_q);
136 init_waitqueue_head(&tcp_ses->request_q);
137 INIT_LIST_HEAD(&tcp_ses->pending_mid_q);
138diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
139index bf68b4f..6937e7c 100644
140--- a/fs/cifs/dir.c
141+++ b/fs/cifs/dir.c
142@@ -171,7 +171,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
143 }
144 tcon = tlink_tcon(tlink);
145
146- if (enable_oplocks)
147+ if (tcon->ses->server->oplocks)
148 oplock = REQ_OPLOCK;
149
150 if (nd)
151@@ -492,7 +492,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
152 {
153 int xid;
154 int rc = 0; /* to get around spurious gcc warning, set to zero here */
155- __u32 oplock = enable_oplocks ? REQ_OPLOCK : 0;
156+ __u32 oplock;
157 __u16 fileHandle = 0;
158 bool posix_open = false;
159 struct cifs_sb_info *cifs_sb;
160@@ -518,6 +518,8 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
161 }
162 pTcon = tlink_tcon(tlink);
163
164+ oplock = pTcon->ses->server->oplocks ? REQ_OPLOCK : 0;
165+
166 /*
167 * Don't allow the separator character in a path component.
168 * The VFS will not allow "/", but "\" is allowed by posix.
169diff --git a/fs/cifs/file.c b/fs/cifs/file.c
170index 5e64748..4aa6080 100644
171--- a/fs/cifs/file.c
172+++ b/fs/cifs/file.c
173@@ -380,7 +380,7 @@ int cifs_open(struct inode *inode, struct file *file)
174 cFYI(1, "inode = 0x%p file flags are 0x%x for %s",
175 inode, file->f_flags, full_path);
176
177- if (enable_oplocks)
178+ if (tcon->ses->server->oplocks)
179 oplock = REQ_OPLOCK;
180 else
181 oplock = 0;
182@@ -505,7 +505,7 @@ static int cifs_reopen_file(struct cifsFileInfo *pCifsFile, bool can_flush)
183 cFYI(1, "inode = 0x%p file flags 0x%x for %s",
184 inode, pCifsFile->f_flags, full_path);
185
186- if (enable_oplocks)
187+ if (tcon->ses->server->oplocks)
188 oplock = REQ_OPLOCK;
189 else
190 oplock = 0;
191diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
192index 0cc9584..99a27cf 100644
193--- a/fs/cifs/transport.c
194+++ b/fs/cifs/transport.c
195@@ -265,12 +265,12 @@ static int wait_for_free_request(struct TCP_Server_Info *server,
196
197 spin_lock(&GlobalMid_Lock);
198 while (1) {
199- if (atomic_read(&server->inFlight) >= cifs_max_pending) {
200+ if (atomic_read(&server->inFlight) >= server->maxReq) {
201 spin_unlock(&GlobalMid_Lock);
202 cifs_num_waiters_inc(server);
203 wait_event(server->request_q,
204 atomic_read(&server->inFlight)
205- < cifs_max_pending);
206+ < server->maxReq);
207 cifs_num_waiters_dec(server);
208 spin_lock(&GlobalMid_Lock);
209 } else {
210--
2111.7.9.4
212
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0089-cifs-fix-issue-mounting-of-DFS-ROOT-when-redirecting.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0089-cifs-fix-issue-mounting-of-DFS-ROOT-when-redirecting.patch
new file mode 100644
index 00000000..a07d8d84
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0089-cifs-fix-issue-mounting-of-DFS-ROOT-when-redirecting.patch
@@ -0,0 +1,55 @@
1From bf2a3ba7a460d3f1904077d790028269f468d7c1 Mon Sep 17 00:00:00 2001
2From: Jeff Layton <jlayton@redhat.com>
3Date: Wed, 21 Mar 2012 06:30:40 -0400
4Subject: [PATCH 089/147] cifs: fix issue mounting of DFS ROOT when
5 redirecting from one domain controller to the next
6
7commit 1daaae8fa4afe3df78ca34e724ed7e8187e4eb32 upstream.
8
9This patch fixes an issue when cifs_mount receives a
10STATUS_BAD_NETWORK_NAME error during cifs_get_tcon but is able to
11continue after an DFS ROOT referral. In this case, the return code
12variable is not reset prior to trying to mount from the system referred
13to. Thus, is_path_accessible is not executed and the final DFS referral
14is not performed causing a mount error.
15
16Use case: In DNS, example.com resolves to the secondary AD server
17ad2.example.com Our primary domain controller is ad1.example.com and has
18a DFS redirection set up from \\ad1\share\Users to \\files\share\Users.
19Mounting \\example.com\share\Users fails.
20
21Regression introduced by commit 724d9f1.
22
23Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru
24Signed-off-by: Thomas Hadig <thomas@intapp.com>
25Signed-off-by: Jeff Layton <jlayton@redhat.com>
26Signed-off-by: Steve French <sfrench@us.ibm.com>
27Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28---
29 fs/cifs/connect.c | 3 ++-
30 1 file changed, 2 insertions(+), 1 deletion(-)
31
32diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
33index a26b98f..9e0675a 100644
34--- a/fs/cifs/connect.c
35+++ b/fs/cifs/connect.c
36@@ -3217,7 +3217,7 @@ cifs_ra_pages(struct cifs_sb_info *cifs_sb)
37 int
38 cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info)
39 {
40- int rc = 0;
41+ int rc;
42 int xid;
43 struct cifs_ses *pSesInfo;
44 struct cifs_tcon *tcon;
45@@ -3244,6 +3244,7 @@ try_mount_again:
46 FreeXid(xid);
47 }
48 #endif
49+ rc = 0;
50 tcon = NULL;
51 pSesInfo = NULL;
52 srvTcp = NULL;
53--
541.7.9.4
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0090-CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0090-CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch
new file mode 100644
index 00000000..db43c406
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0090-CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch
@@ -0,0 +1,70 @@
1From 456290dcbf936c8883bf84492b7c3f04e73efa1a Mon Sep 17 00:00:00 2001
2From: Pavel Shilovsky <piastry@etersoft.ru>
3Date: Sat, 17 Mar 2012 09:46:55 +0300
4Subject: [PATCH 090/147] CIFS: Fix a spurious error in cifs_push_posix_locks
5
6commit ce85852b90a214cf577fc1b4f49d99fd7e98784a upstream.
7
8Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
9Reviewed-by: Jeff Layton <jlayton@redhat.com>
10Reported-by: Ben Hutchings <ben@decadent.org.uk>
11Signed-off-by: Steve French <sfrench@us.ibm.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 fs/cifs/file.c | 19 ++++++++++---------
15 1 file changed, 10 insertions(+), 9 deletions(-)
16
17diff --git a/fs/cifs/file.c b/fs/cifs/file.c
18index 4aa6080..159fcc5 100644
19--- a/fs/cifs/file.c
20+++ b/fs/cifs/file.c
21@@ -960,9 +960,9 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
22 INIT_LIST_HEAD(&locks_to_send);
23
24 /*
25- * Allocating count locks is enough because no locks can be added to
26- * the list while we are holding cinode->lock_mutex that protects
27- * locking operations of this inode.
28+ * Allocating count locks is enough because no FL_POSIX locks can be
29+ * added to the list while we are holding cinode->lock_mutex that
30+ * protects locking operations of this inode.
31 */
32 for (; i < count; i++) {
33 lck = kmalloc(sizeof(struct lock_to_push), GFP_KERNEL);
34@@ -973,18 +973,20 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
35 list_add_tail(&lck->llist, &locks_to_send);
36 }
37
38- i = 0;
39 el = locks_to_send.next;
40 lock_flocks();
41 cifs_for_each_lock(cfile->dentry->d_inode, before) {
42+ flock = *before;
43+ if ((flock->fl_flags & FL_POSIX) == 0)
44+ continue;
45 if (el == &locks_to_send) {
46- /* something is really wrong */
47+ /*
48+ * The list ended. We don't have enough allocated
49+ * structures - something is really wrong.
50+ */
51 cERROR(1, "Can't push all brlocks!");
52 break;
53 }
54- flock = *before;
55- if ((flock->fl_flags & FL_POSIX) == 0)
56- continue;
57 length = 1 + flock->fl_end - flock->fl_start;
58 if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK)
59 type = CIFS_RDLCK;
60@@ -996,7 +998,6 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
61 lck->length = length;
62 lck->type = type;
63 lck->offset = flock->fl_start;
64- i++;
65 el = el->next;
66 }
67 unlock_flocks();
68--
691.7.9.4
70
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0091-UBI-fix-error-handling-in-ubi_scan.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0091-UBI-fix-error-handling-in-ubi_scan.patch
new file mode 100644
index 00000000..1b0619f2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0091-UBI-fix-error-handling-in-ubi_scan.patch
@@ -0,0 +1,58 @@
1From a3dcecf0adebe74332981c56c453556e3a4ebd5b Mon Sep 17 00:00:00 2001
2From: Richard Weinberger <richard@nod.at>
3Date: Mon, 30 Jan 2012 18:20:13 +0100
4Subject: [PATCH 091/147] UBI: fix error handling in ubi_scan()
5
6commit a29852be492d61001d86c6ebf5fff9b93d7b4be9 upstream.
7
8Two bad things can happen in ubi_scan():
91. If kmem_cache_create() fails we jump to out_si and call
10 ubi_scan_destroy_si() which calls kmem_cache_destroy().
11 But si->scan_leb_slab is NULL.
122. If process_eb() fails we jump to out_vidh, call
13 kmem_cache_destroy() and ubi_scan_destroy_si() which calls
14 again kmem_cache_destroy().
15
16Signed-off-by: Richard Weinberger <richard@nod.at>
17Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/mtd/ubi/scan.c | 8 ++++----
21 1 file changed, 4 insertions(+), 4 deletions(-)
22
23diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
24index 0cb17d9..b99318e 100644
25--- a/drivers/mtd/ubi/scan.c
26+++ b/drivers/mtd/ubi/scan.c
27@@ -1174,7 +1174,7 @@ struct ubi_scan_info *ubi_scan(struct ubi_device *ubi)
28
29 ech = kzalloc(ubi->ec_hdr_alsize, GFP_KERNEL);
30 if (!ech)
31- goto out_slab;
32+ goto out_si;
33
34 vidh = ubi_zalloc_vid_hdr(ubi, GFP_KERNEL);
35 if (!vidh)
36@@ -1235,8 +1235,6 @@ out_vidh:
37 ubi_free_vid_hdr(ubi, vidh);
38 out_ech:
39 kfree(ech);
40-out_slab:
41- kmem_cache_destroy(si->scan_leb_slab);
42 out_si:
43 ubi_scan_destroy_si(si);
44 return ERR_PTR(err);
45@@ -1325,7 +1323,9 @@ void ubi_scan_destroy_si(struct ubi_scan_info *si)
46 }
47 }
48
49- kmem_cache_destroy(si->scan_leb_slab);
50+ if (si->scan_leb_slab)
51+ kmem_cache_destroy(si->scan_leb_slab);
52+
53 kfree(si);
54 }
55
56--
571.7.9.4
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0092-UBI-fix-eraseblock-picking-criteria.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0092-UBI-fix-eraseblock-picking-criteria.patch
new file mode 100644
index 00000000..ce317e4f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0092-UBI-fix-eraseblock-picking-criteria.patch
@@ -0,0 +1,57 @@
1From 7abbe27ba63bb9559ea47b8449c4f0a50d98073e Mon Sep 17 00:00:00 2001
2From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
3Date: Wed, 7 Mar 2012 19:08:36 +0200
4Subject: [PATCH 092/147] UBI: fix eraseblock picking criteria
5
6commit 7eb3aa65853e1b223bfc786b023b702018cb76c0 upstream.
7
8The 'find_wl_entry()' function expects the maximum difference as the second
9argument, not the maximum absolute value. So the "unknown" eraseblock picking
10was incorrect, as Shmulik Ladkani spotted. This patch fixes the issue.
11
12Reported-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
13Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
14Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/mtd/ubi/wl.c | 10 ++++------
18 1 file changed, 4 insertions(+), 6 deletions(-)
19
20diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
21index 0696e36..cf42971 100644
22--- a/drivers/mtd/ubi/wl.c
23+++ b/drivers/mtd/ubi/wl.c
24@@ -389,7 +389,7 @@ static struct ubi_wl_entry *find_wl_entry(struct rb_root *root, int max)
25 */
26 int ubi_wl_get_peb(struct ubi_device *ubi, int dtype)
27 {
28- int err, medium_ec;
29+ int err;
30 struct ubi_wl_entry *e, *first, *last;
31
32 ubi_assert(dtype == UBI_LONGTERM || dtype == UBI_SHORTTERM ||
33@@ -427,7 +427,7 @@ retry:
34 * For unknown data we pick a physical eraseblock with medium
35 * erase counter. But we by no means can pick a physical
36 * eraseblock with erase counter greater or equivalent than the
37- * lowest erase counter plus %WL_FREE_MAX_DIFF.
38+ * lowest erase counter plus %WL_FREE_MAX_DIFF/2.
39 */
40 first = rb_entry(rb_first(&ubi->free), struct ubi_wl_entry,
41 u.rb);
42@@ -436,10 +436,8 @@ retry:
43 if (last->ec - first->ec < WL_FREE_MAX_DIFF)
44 e = rb_entry(ubi->free.rb_node,
45 struct ubi_wl_entry, u.rb);
46- else {
47- medium_ec = (first->ec + WL_FREE_MAX_DIFF)/2;
48- e = find_wl_entry(&ubi->free, medium_ec);
49- }
50+ else
51+ e = find_wl_entry(&ubi->free, WL_FREE_MAX_DIFF/2);
52 break;
53 case UBI_SHORTTERM:
54 /*
55--
561.7.9.4
57
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0093-SUNRPC-We-must-not-use-list_for_each_entry_safe-in-r.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0093-SUNRPC-We-must-not-use-list_for_each_entry_safe-in-r.patch
new file mode 100644
index 00000000..3b456540
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0093-SUNRPC-We-must-not-use-list_for_each_entry_safe-in-r.patch
@@ -0,0 +1,73 @@
1From cdc2a3f4e2494e413531264d3949ce6801123ad9 Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Mon, 19 Mar 2012 13:39:35 -0400
4Subject: [PATCH 093/147] SUNRPC: We must not use list_for_each_entry_safe()
5 in rpc_wake_up()
6
7commit 540a0f7584169651f485e8ab67461fcb06934e38 upstream.
8
9The problem is that for the case of priority queues, we
10have to assume that __rpc_remove_wait_queue_priority will move new
11elements from the tk_wait.links lists into the queue->tasks[] list.
12We therefore cannot use list_for_each_entry_safe() on queue->tasks[],
13since that will skip these new tasks that __rpc_remove_wait_queue_priority
14is adding.
15
16Without this fix, rpc_wake_up and rpc_wake_up_status will both fail
17to wake up all functions on priority wait queues, which can result
18in some nasty hangs.
19
20Reported-by: Andy Adamson <andros@netapp.com>
21Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 net/sunrpc/sched.c | 15 +++++++++++----
25 1 file changed, 11 insertions(+), 4 deletions(-)
26
27diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
28index 00a1a2a..4e2b3b4 100644
29--- a/net/sunrpc/sched.c
30+++ b/net/sunrpc/sched.c
31@@ -500,14 +500,18 @@ EXPORT_SYMBOL_GPL(rpc_wake_up_next);
32 */
33 void rpc_wake_up(struct rpc_wait_queue *queue)
34 {
35- struct rpc_task *task, *next;
36 struct list_head *head;
37
38 spin_lock_bh(&queue->lock);
39 head = &queue->tasks[queue->maxpriority];
40 for (;;) {
41- list_for_each_entry_safe(task, next, head, u.tk_wait.list)
42+ while (!list_empty(head)) {
43+ struct rpc_task *task;
44+ task = list_first_entry(head,
45+ struct rpc_task,
46+ u.tk_wait.list);
47 rpc_wake_up_task_queue_locked(queue, task);
48+ }
49 if (head == &queue->tasks[0])
50 break;
51 head--;
52@@ -525,13 +529,16 @@ EXPORT_SYMBOL_GPL(rpc_wake_up);
53 */
54 void rpc_wake_up_status(struct rpc_wait_queue *queue, int status)
55 {
56- struct rpc_task *task, *next;
57 struct list_head *head;
58
59 spin_lock_bh(&queue->lock);
60 head = &queue->tasks[queue->maxpriority];
61 for (;;) {
62- list_for_each_entry_safe(task, next, head, u.tk_wait.list) {
63+ while (!list_empty(head)) {
64+ struct rpc_task *task;
65+ task = list_first_entry(head,
66+ struct rpc_task,
67+ u.tk_wait.list);
68 task->tk_status = status;
69 rpc_wake_up_task_queue_locked(queue, task);
70 }
71--
721.7.9.4
73
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0094-usbnet-increase-URB-reference-count-before-usb_unlin.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0094-usbnet-increase-URB-reference-count-before-usb_unlin.patch
new file mode 100644
index 00000000..05385039
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0094-usbnet-increase-URB-reference-count-before-usb_unlin.patch
@@ -0,0 +1,62 @@
1From 25aa7a79e5be3c393eee41e3939d8eefa9672fc7 Mon Sep 17 00:00:00 2001
2From: "tom.leiming@gmail.com" <tom.leiming@gmail.com>
3Date: Thu, 22 Mar 2012 03:22:18 +0000
4Subject: [PATCH 094/147] usbnet: increase URB reference count before
5 usb_unlink_urb
6
7commit 0956a8c20b23d429e79ff86d4325583fc06f9eb4 upstream.
8
9Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid
10recursive locking in usbnet_stop()) fixes the recursive locking
11problem by releasing the skb queue lock, but it makes usb_unlink_urb
12racing with defer_bh, and the URB to being unlinked may be freed before
13or during calling usb_unlink_urb, so use-after-free problem may be
14triggerd inside usb_unlink_urb.
15
16The patch fixes the use-after-free problem by increasing URB
17reference count with skb queue lock held before calling
18usb_unlink_urb, so the URB won't be freed until return from
19usb_unlink_urb.
20
21Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
22Cc: Alan Stern <stern@rowland.harvard.edu>
23Cc: Oliver Neukum <oliver@neukum.org>
24Reported-by: Dave Jones <davej@redhat.com>
25Signed-off-by: Ming Lei <tom.leiming@gmail.com>
26Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27Signed-off-by: David S. Miller <davem@davemloft.net>
28Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29---
30 drivers/net/usb/usbnet.c | 9 +++++++++
31 1 file changed, 9 insertions(+)
32
33diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
34index 81b96e3..cf6a515 100644
35--- a/drivers/net/usb/usbnet.c
36+++ b/drivers/net/usb/usbnet.c
37@@ -589,6 +589,14 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
38 entry = (struct skb_data *) skb->cb;
39 urb = entry->urb;
40
41+ /*
42+ * Get reference count of the URB to avoid it to be
43+ * freed during usb_unlink_urb, which may trigger
44+ * use-after-free problem inside usb_unlink_urb since
45+ * usb_unlink_urb is always racing with .complete
46+ * handler(include defer_bh).
47+ */
48+ usb_get_urb(urb);
49 spin_unlock_irqrestore(&q->lock, flags);
50 // during some PM-driven resume scenarios,
51 // these (async) unlinks complete immediately
52@@ -597,6 +605,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
53 netdev_dbg(dev->net, "unlink urb err, %d\n", retval);
54 else
55 count++;
56+ usb_put_urb(urb);
57 spin_lock_irqsave(&q->lock, flags);
58 }
59 spin_unlock_irqrestore (&q->lock, flags);
60--
611.7.9.4
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0095-usbnet-don-t-clear-urb-dev-in-tx_complete.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0095-usbnet-don-t-clear-urb-dev-in-tx_complete.patch
new file mode 100644
index 00000000..71c9db0f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0095-usbnet-don-t-clear-urb-dev-in-tx_complete.patch
@@ -0,0 +1,38 @@
1From 31dcb2223cbb8ca92371811a9d59ed6f721e6d5d Mon Sep 17 00:00:00 2001
2From: "tom.leiming@gmail.com" <tom.leiming@gmail.com>
3Date: Thu, 22 Mar 2012 03:22:38 +0000
4Subject: [PATCH 095/147] usbnet: don't clear urb->dev in tx_complete
5
6commit 5d5440a835710d09f0ef18da5000541ec98b537a upstream.
7
8URB unlinking is always racing with its completion and tx_complete
9may be called before or during running usb_unlink_urb, so tx_complete
10must not clear urb->dev since it will be used in unlink path,
11otherwise invalid memory accesses or usb device leak may be caused
12inside usb_unlink_urb.
13
14Cc: Alan Stern <stern@rowland.harvard.edu>
15Cc: Oliver Neukum <oliver@neukum.org>
16Signed-off-by: Ming Lei <tom.leiming@gmail.com>
17Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/net/usb/usbnet.c | 1 -
22 1 file changed, 1 deletion(-)
23
24diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
25index cf6a515..750e330 100644
26--- a/drivers/net/usb/usbnet.c
27+++ b/drivers/net/usb/usbnet.c
28@@ -1037,7 +1037,6 @@ static void tx_complete (struct urb *urb)
29 }
30
31 usb_autopm_put_interface_async(dev->intf);
32- urb->dev = NULL;
33 entry->state = tx_done;
34 defer_bh(dev, skb, &dev->txq);
35 }
36--
371.7.9.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0096-e1000e-Avoid-wrong-check-on-TX-hang.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0096-e1000e-Avoid-wrong-check-on-TX-hang.patch
new file mode 100644
index 00000000..23f6a5b2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0096-e1000e-Avoid-wrong-check-on-TX-hang.patch
@@ -0,0 +1,98 @@
1From 4c14b8afd02d6923243bf2e2f14bd8ad750741d3 Mon Sep 17 00:00:00 2001
2From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
3Date: Fri, 18 Nov 2011 14:25:00 +0000
4Subject: [PATCH 096/147] e1000e: Avoid wrong check on TX hang
5
6commit 09357b00255c233705b1cf6d76a8d147340545b8 upstream.
7
8Based on the original patch submitted my Michael Wang
9<wangyun@linux.vnet.ibm.com>.
10Descriptors may not be write-back while checking TX hang with flag
11FLAG2_DMA_BURST on.
12So when we detect hang, we just flush the descriptor and detect
13again for once.
14
15-v2 change 1 to true and 0 to false and remove extra ()
16
17CC: Michael Wang <wangyun@linux.vnet.ibm.com>
18CC: Flavio Leitner <fbl@redhat.com>
19Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
20Tested-by: Aaron Brown <aaron.f.brown@intel.com>
21Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 drivers/net/ethernet/intel/e1000e/e1000.h | 1 +
25 drivers/net/ethernet/intel/e1000e/netdev.c | 23 ++++++++++++++++++++---
26 2 files changed, 21 insertions(+), 3 deletions(-)
27
28diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
29index 9fe18d1..f478a22 100644
30--- a/drivers/net/ethernet/intel/e1000e/e1000.h
31+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
32@@ -309,6 +309,7 @@ struct e1000_adapter {
33 u32 txd_cmd;
34
35 bool detect_tx_hung;
36+ bool tx_hang_recheck;
37 u8 tx_timeout_factor;
38
39 u32 tx_int_delay;
40diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
41index a855db1..4e933d1 100644
42--- a/drivers/net/ethernet/intel/e1000e/netdev.c
43+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
44@@ -1030,6 +1030,7 @@ static void e1000_print_hw_hang(struct work_struct *work)
45 struct e1000_adapter *adapter = container_of(work,
46 struct e1000_adapter,
47 print_hang_task);
48+ struct net_device *netdev = adapter->netdev;
49 struct e1000_ring *tx_ring = adapter->tx_ring;
50 unsigned int i = tx_ring->next_to_clean;
51 unsigned int eop = tx_ring->buffer_info[i].next_to_watch;
52@@ -1041,6 +1042,21 @@ static void e1000_print_hw_hang(struct work_struct *work)
53 if (test_bit(__E1000_DOWN, &adapter->state))
54 return;
55
56+ if (!adapter->tx_hang_recheck &&
57+ (adapter->flags2 & FLAG2_DMA_BURST)) {
58+ /* May be block on write-back, flush and detect again
59+ * flush pending descriptor writebacks to memory
60+ */
61+ ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
62+ /* execute the writes immediately */
63+ e1e_flush();
64+ adapter->tx_hang_recheck = true;
65+ return;
66+ }
67+ /* Real hang detected */
68+ adapter->tx_hang_recheck = false;
69+ netif_stop_queue(netdev);
70+
71 e1e_rphy(hw, PHY_STATUS, &phy_status);
72 e1e_rphy(hw, PHY_1000T_STATUS, &phy_1000t_status);
73 e1e_rphy(hw, PHY_EXT_STATUS, &phy_ext_status);
74@@ -1154,10 +1170,10 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
75 if (tx_ring->buffer_info[i].time_stamp &&
76 time_after(jiffies, tx_ring->buffer_info[i].time_stamp
77 + (adapter->tx_timeout_factor * HZ)) &&
78- !(er32(STATUS) & E1000_STATUS_TXOFF)) {
79+ !(er32(STATUS) & E1000_STATUS_TXOFF))
80 schedule_work(&adapter->print_hang_task);
81- netif_stop_queue(netdev);
82- }
83+ else
84+ adapter->tx_hang_recheck = false;
85 }
86 adapter->total_tx_bytes += total_tx_bytes;
87 adapter->total_tx_packets += total_tx_packets;
88@@ -3782,6 +3798,7 @@ static int e1000_open(struct net_device *netdev)
89
90 e1000_irq_enable(adapter);
91
92+ adapter->tx_hang_recheck = false;
93 netif_start_queue(netdev);
94
95 adapter->idle_check = true;
96--
971.7.9.4
98
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0097-x86-32-Fix-endless-loop-when-processing-signals-for-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0097-x86-32-Fix-endless-loop-when-processing-signals-for-.patch
new file mode 100644
index 00000000..0b817edf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0097-x86-32-Fix-endless-loop-when-processing-signals-for-.patch
@@ -0,0 +1,85 @@
1From 37d297b39726f3284da2f83d235c94b0d224e047 Mon Sep 17 00:00:00 2001
2From: Dmitry Adamushko <dmitry.adamushko@gmail.com>
3Date: Thu, 22 Mar 2012 21:39:25 +0100
4Subject: [PATCH 097/147] x86-32: Fix endless loop when processing signals for
5 kernel tasks
6
7commit 29a2e2836ff9ea65a603c89df217f4198973a74f upstream.
8
9The problem occurs on !CONFIG_VM86 kernels [1] when a kernel-mode task
10returns from a system call with a pending signal.
11
12A real-life scenario is a child of 'khelper' returning from a failed
13kernel_execve() in ____call_usermodehelper() [ kernel/kmod.c ].
14kernel_execve() fails due to a pending SIGKILL, which is the result of
15"kill -9 -1" (at least, busybox's init does it upon reboot).
16
17The loop is as follows:
18
19* syscall_exit_work:
20 - work_pending: // start_of_the_loop
21 - work_notify_sig:
22 - do_notify_resume()
23 - do_signal()
24 - if (!user_mode(regs)) return;
25 - resume_userspace // TIF_SIGPENDING is still set
26 - work_pending // so we call work_pending => goto
27 // start_of_the_loop
28
29More information can be found in another LKML thread:
30http://www.serverphorums.com/read.php?12,457826
31
32[1] the problem was also seen on MIPS.
33
34Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
35Link: http://lkml.kernel.org/r/1332448765.2299.68.camel@dimm
36Cc: Oleg Nesterov <oleg@redhat.com>
37Cc: Roland McGrath <roland@hack.frob.com>
38Cc: Andrew Morton <akpm@linux-foundation.org>
39Signed-off-by: H. Peter Anvin <hpa@zytor.com>
40Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41---
42 arch/x86/kernel/entry_32.S | 17 ++++++++++-------
43 1 file changed, 10 insertions(+), 7 deletions(-)
44
45diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
46index f3f6f53..bcda816 100644
47--- a/arch/x86/kernel/entry_32.S
48+++ b/arch/x86/kernel/entry_32.S
49@@ -99,12 +99,6 @@
50 #endif
51 .endm
52
53-#ifdef CONFIG_VM86
54-#define resume_userspace_sig check_userspace
55-#else
56-#define resume_userspace_sig resume_userspace
57-#endif
58-
59 /*
60 * User gs save/restore
61 *
62@@ -328,10 +322,19 @@ ret_from_exception:
63 preempt_stop(CLBR_ANY)
64 ret_from_intr:
65 GET_THREAD_INFO(%ebp)
66-check_userspace:
67+resume_userspace_sig:
68+#ifdef CONFIG_VM86
69 movl PT_EFLAGS(%esp), %eax # mix EFLAGS and CS
70 movb PT_CS(%esp), %al
71 andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax
72+#else
73+ /*
74+ * We can be coming here from a syscall done in the kernel space,
75+ * e.g. a failed kernel_execve().
76+ */
77+ movl PT_CS(%esp), %eax
78+ andl $SEGMENT_RPL_MASK, %eax
79+#endif
80 cmpl $USER_RPL, %eax
81 jb resume_kernel # not returning to v8086 or userspace
82
83--
841.7.9.4
85
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0098-proc-ns-use-d_set_d_op-API-to-set-dentry-ops-in-proc.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0098-proc-ns-use-d_set_d_op-API-to-set-dentry-ops-in-proc.patch
new file mode 100644
index 00000000..d32e4a6b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0098-proc-ns-use-d_set_d_op-API-to-set-dentry-ops-in-proc.patch
@@ -0,0 +1,49 @@
1From 0b21a3eba2629ca8e573e5b0cd7d1627d17c7cf6 Mon Sep 17 00:00:00 2001
2From: Pravin B Shelar <pshelar@nicira.com>
3Date: Fri, 23 Mar 2012 15:02:55 -0700
4Subject: [PATCH 098/147] proc-ns: use d_set_d_op() API to set dentry ops in
5 proc_ns_instantiate().
6
7commit 1b26c9b334044cff6d1d2698f2be41bc7d9a0864 upstream.
8
9The namespace cleanup path leaks a dentry which holds a reference count
10on a network namespace. Keeping that network namespace from being freed
11when the last user goes away. Leaving things like vlan devices in the
12leaked network namespace.
13
14If you use ip netns add for much real work this problem becomes apparent
15pretty quickly. It light testing the problem hides because frequently
16you simply don't notice the leak.
17
18Use d_set_d_op() so that DCACHE_OP_* flags are set correctly.
19
20This issue exists back to 3.0.
21
22Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
23Reported-by: Justin Pettit <jpettit@nicira.com>
24Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
25Signed-off-by: Jesse Gross <jesse@nicira.com>
26Cc: David Miller <davem@davemloft.net>
27Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
28Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
29Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30---
31 fs/proc/namespaces.c | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
35index be177f7..d6c078e 100644
36--- a/fs/proc/namespaces.c
37+++ b/fs/proc/namespaces.c
38@@ -54,7 +54,7 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
39 ei->ns_ops = ns_ops;
40 ei->ns = ns;
41
42- dentry->d_op = &pid_dentry_operations;
43+ d_set_d_op(dentry, &pid_dentry_operations);
44 d_add(dentry, inode);
45 /* Close the race of the process dying before we return the dentry */
46 if (pid_revalidate(dentry, NULL))
47--
481.7.9.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0099-iommu-amd-Fix-section-warning-for-prealloc_protectio.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0099-iommu-amd-Fix-section-warning-for-prealloc_protectio.patch
new file mode 100644
index 00000000..daafc4ed
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0099-iommu-amd-Fix-section-warning-for-prealloc_protectio.patch
@@ -0,0 +1,39 @@
1From fd9b78dce7a6acf7a69902d69c82980634cd7136 Mon Sep 17 00:00:00 2001
2From: Steffen Persvold <sp@numascale.com>
3Date: Thu, 15 Mar 2012 15:20:29 +0100
4Subject: [PATCH 099/147] iommu/amd: Fix section warning for
5 prealloc_protection_domains
6
7commit cebd5fa4d3046d5b43ce1836a0120612822a7fb0 upstream.
8
9Fix the following section warning in drivers/iommu/amd_iommu.c :
10
11WARNING: vmlinux.o(.text+0x526e77): Section mismatch in reference from the function prealloc_protection_domains() to the function .init.text:alloc_passthrough_domain()
12The function prealloc_protection_domains() references
13the function __init alloc_passthrough_domain().
14This is often because prealloc_protection_domains lacks a __init
15annotation or the annotation of alloc_passthrough_domain is wrong.
16
17Signed-off-by: Steffen Persvold <sp@numascale.com>
18Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/iommu/amd_iommu.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
25index e0b3e33..966a6e7 100644
26--- a/drivers/iommu/amd_iommu.c
27+++ b/drivers/iommu/amd_iommu.c
28@@ -2432,7 +2432,7 @@ static int amd_iommu_dma_supported(struct device *dev, u64 mask)
29 * we don't need to preallocate the protection domains anymore.
30 * For now we have to.
31 */
32-static void prealloc_protection_domains(void)
33+static void __init prealloc_protection_domains(void)
34 {
35 struct pci_dev *dev = NULL;
36 struct dma_ops_domain *dma_dom;
37--
381.7.9.4
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0100-sysctl-protect-poll-in-entries-that-may-go-away.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0100-sysctl-protect-poll-in-entries-that-may-go-away.patch
new file mode 100644
index 00000000..15fc99d3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0100-sysctl-protect-poll-in-entries-that-may-go-away.patch
@@ -0,0 +1,97 @@
1From 55d8b2b2ea9545b29091216b9875c4e119215b63 Mon Sep 17 00:00:00 2001
2From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
3Date: Thu, 22 Mar 2012 14:42:22 -0700
4Subject: [PATCH 100/147] sysctl: protect poll() in entries that may go away
5
6commit 4e474a00d7ff746ed177ddae14fa8b2d4bad7a00 upstream.
7
8Protect code accessing ctl_table by grabbing the header with grab_header()
9and after releasing with sysctl_head_finish(). This is needed if poll()
10is called in entries created by modules: currently only hostname and
11domainname support poll(), but this bug may be triggered when/if modules
12use it and if user called poll() in a file that doesn't support it.
13
14Dave Jones reported the following when using a syscall fuzzer while
15hibernating/resuming:
16
17RIP: 0010:[<ffffffff81233e3e>] [<ffffffff81233e3e>] proc_sys_poll+0x4e/0x90
18RAX: 0000000000000145 RBX: ffff88020cab6940 RCX: 0000000000000000
19RDX: ffffffff81233df0 RSI: 6b6b6b6b6b6b6b6b RDI: ffff88020cab6940
20[ ... ]
21Code: 00 48 89 fb 48 89 f1 48 8b 40 30 4c 8b 60 e8 b8 45 01 00 00 49 83
227c 24 28 00 74 2e 49 8b 74 24 30 48 85 f6 74 24 48 85 c9 75 32 <8b> 16
23b8 45 01 00 00 48 63 d2 49 39 d5 74 10 8b 06 48 98 48 89
24
25If an entry goes away while we are polling() it, ctl_table may not exist
26anymore.
27
28Reported-by: Dave Jones <davej@redhat.com>
29Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
30Cc: Al Viro <viro@zeniv.linux.org.uk>
31Cc: Linus Torvalds <torvalds@linux-foundation.org>
32Cc: Alexey Dobriyan <adobriyan@gmail.com>
33Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
34Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
35Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
36---
37 fs/proc/proc_sysctl.c | 17 ++++++++++++++++-
38 1 file changed, 16 insertions(+), 1 deletion(-)
39
40diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
41index a6b6217..53c3bce 100644
42--- a/fs/proc/proc_sysctl.c
43+++ b/fs/proc/proc_sysctl.c
44@@ -188,20 +188,32 @@ static ssize_t proc_sys_write(struct file *filp, const char __user *buf,
45
46 static int proc_sys_open(struct inode *inode, struct file *filp)
47 {
48+ struct ctl_table_header *head = grab_header(inode);
49 struct ctl_table *table = PROC_I(inode)->sysctl_entry;
50
51+ /* sysctl was unregistered */
52+ if (IS_ERR(head))
53+ return PTR_ERR(head);
54+
55 if (table->poll)
56 filp->private_data = proc_sys_poll_event(table->poll);
57
58+ sysctl_head_finish(head);
59+
60 return 0;
61 }
62
63 static unsigned int proc_sys_poll(struct file *filp, poll_table *wait)
64 {
65 struct inode *inode = filp->f_path.dentry->d_inode;
66+ struct ctl_table_header *head = grab_header(inode);
67 struct ctl_table *table = PROC_I(inode)->sysctl_entry;
68- unsigned long event = (unsigned long)filp->private_data;
69 unsigned int ret = DEFAULT_POLLMASK;
70+ unsigned long event;
71+
72+ /* sysctl was unregistered */
73+ if (IS_ERR(head))
74+ return POLLERR | POLLHUP;
75
76 if (!table->proc_handler)
77 goto out;
78@@ -209,6 +221,7 @@ static unsigned int proc_sys_poll(struct file *filp, poll_table *wait)
79 if (!table->poll)
80 goto out;
81
82+ event = (unsigned long)filp->private_data;
83 poll_wait(filp, &table->poll->wait, wait);
84
85 if (event != atomic_read(&table->poll->event)) {
86@@ -217,6 +230,8 @@ static unsigned int proc_sys_poll(struct file *filp, poll_table *wait)
87 }
88
89 out:
90+ sysctl_head_finish(head);
91+
92 return ret;
93 }
94
95--
961.7.9.4
97
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0101-hwmon-fam15h_power-Correct-sign-extension-of-running.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0101-hwmon-fam15h_power-Correct-sign-extension-of-running.patch
new file mode 100644
index 00000000..552723d2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0101-hwmon-fam15h_power-Correct-sign-extension-of-running.patch
@@ -0,0 +1,36 @@
1From c1642ad65f83a61ba5c49a36e0f0e24f71c3dd9a Mon Sep 17 00:00:00 2001
2From: Andreas Herrmann <andreas.herrmann3@amd.com>
3Date: Fri, 23 Mar 2012 10:02:17 +0100
4Subject: [PATCH 101/147] hwmon: (fam15h_power) Correct sign extension of
5 running_avg_capture
6
7commit fc0900cbda9243957d812cd6b4cc87965f9fe75f upstream.
8
9Wrong bit was used for sign extension which caused wrong end results.
10Thanks to Andre for spotting this bug.
11
12Reported-by: Andre Przywara <andre.przywara@amd.com>
13Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
14Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
15Signed-off-by: Jean Delvare <khali@linux-fr.org>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/hwmon/fam15h_power.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
22index 523f8fb..930370d 100644
23--- a/drivers/hwmon/fam15h_power.c
24+++ b/drivers/hwmon/fam15h_power.c
25@@ -60,7 +60,7 @@ static ssize_t show_power(struct device *dev,
26 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5),
27 REG_TDP_RUNNING_AVERAGE, &val);
28 running_avg_capture = (val >> 4) & 0x3fffff;
29- running_avg_capture = sign_extend32(running_avg_capture, 22);
30+ running_avg_capture = sign_extend32(running_avg_capture, 21);
31 running_avg_range = val & 0xf;
32
33 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5),
34--
351.7.9.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0102-lgdt330x-fix-signedness-error-in-i2c_read_demod_byte.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0102-lgdt330x-fix-signedness-error-in-i2c_read_demod_byte.patch
new file mode 100644
index 00000000..ae14ffb2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0102-lgdt330x-fix-signedness-error-in-i2c_read_demod_byte.patch
@@ -0,0 +1,53 @@
1From 02bdf6aaea4932d896b0a9c8648ae6aa8255eb2b Mon Sep 17 00:00:00 2001
2From: Xi Wang <xi.wang@gmail.com>
3Date: Tue, 14 Feb 2012 14:32:41 -0300
4Subject: [PATCH 102/147] lgdt330x: fix signedness error in
5 i2c_read_demod_bytes()
6
7commit 34817174fca0c5512c2d5b6ea0fc37a0337ce1d8 upstream.
8
9The error handling in lgdt3303_read_status() and lgdt330x_read_ucblocks()
10doesn't work, because i2c_read_demod_bytes() returns a u8 and (err < 0)
11is always false.
12
13 err = i2c_read_demod_bytes(state, 0x58, buf, 1);
14 if (err < 0)
15 return err;
16
17Change the return type of i2c_read_demod_bytes() to int. Also change
18the return value on error to -EIO to make (err < 0) work.
19
20Signed-off-by: Xi Wang <xi.wang@gmail.com>
21Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 drivers/media/dvb/frontends/lgdt330x.c | 6 ++++--
25 1 file changed, 4 insertions(+), 2 deletions(-)
26
27diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c
28index 43971e6..aa63d68 100644
29--- a/drivers/media/dvb/frontends/lgdt330x.c
30+++ b/drivers/media/dvb/frontends/lgdt330x.c
31@@ -104,8 +104,8 @@ static int i2c_write_demod_bytes (struct lgdt330x_state* state,
32 * then reads the data returned for (len) bytes.
33 */
34
35-static u8 i2c_read_demod_bytes (struct lgdt330x_state* state,
36- enum I2C_REG reg, u8* buf, int len)
37+static int i2c_read_demod_bytes(struct lgdt330x_state *state,
38+ enum I2C_REG reg, u8 *buf, int len)
39 {
40 u8 wr [] = { reg };
41 struct i2c_msg msg [] = {
42@@ -118,6 +118,8 @@ static u8 i2c_read_demod_bytes (struct lgdt330x_state* state,
43 ret = i2c_transfer(state->i2c, msg, 2);
44 if (ret != 2) {
45 printk(KERN_WARNING "lgdt330x: %s: addr 0x%02x select 0x%02x error (ret == %i)\n", __func__, state->config->demod_address, reg, ret);
46+ if (ret >= 0)
47+ ret = -EIO;
48 } else {
49 ret = 0;
50 }
51--
521.7.9.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0103-pvrusb2-fix-7MHz-8MHz-DVB-T-tuner-support-for-HVR190.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0103-pvrusb2-fix-7MHz-8MHz-DVB-T-tuner-support-for-HVR190.patch
new file mode 100644
index 00000000..974e49d8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0103-pvrusb2-fix-7MHz-8MHz-DVB-T-tuner-support-for-HVR190.patch
@@ -0,0 +1,51 @@
1From c0c8df72a8880f19b3d9631dc8c2298a533eeba0 Mon Sep 17 00:00:00 2001
2From: Michael Krufky <mkrufky@linuxtv.org>
3Date: Tue, 7 Feb 2012 13:28:33 -0300
4Subject: [PATCH 103/147] pvrusb2: fix 7MHz & 8MHz DVB-T tuner support for
5 HVR1900 rev D1F5
6
7commit 9ab2393fc3e460cd2040de1483918eb17abb822f upstream.
8
9The D1F5 revision of the WinTV HVR-1900 uses a tda18271c2 tuner
10instead of a tda18271c1 tuner as used in revision D1E9. To
11account for this, we must hardcode the frontend configuration
12to use the same IF frequency configuration for both revisions
13of the device.
14
156MHz DVB-T is unaffected by this issue, as the recommended
16IF Frequency configuration for 6MHz DVB-T is the same on both
17c1 and c2 revisions of the tda18271 tuner.
18
19Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
20Cc: Mike Isely <isely@pobox.com>
21Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 drivers/media/video/pvrusb2/pvrusb2-devattr.c | 10 ++++++++++
25 1 file changed, 10 insertions(+)
26
27diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
28index c6da8f7..d8c8982 100644
29--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
30+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
31@@ -320,7 +320,17 @@ static struct tda829x_config tda829x_no_probe = {
32 .probe_tuner = TDA829X_DONT_PROBE,
33 };
34
35+static struct tda18271_std_map hauppauge_tda18271_dvbt_std_map = {
36+ .dvbt_6 = { .if_freq = 3300, .agc_mode = 3, .std = 4,
37+ .if_lvl = 1, .rfagc_top = 0x37, },
38+ .dvbt_7 = { .if_freq = 3800, .agc_mode = 3, .std = 5,
39+ .if_lvl = 1, .rfagc_top = 0x37, },
40+ .dvbt_8 = { .if_freq = 4300, .agc_mode = 3, .std = 6,
41+ .if_lvl = 1, .rfagc_top = 0x37, },
42+};
43+
44 static struct tda18271_config hauppauge_tda18271_dvb_config = {
45+ .std_map = &hauppauge_tda18271_dvbt_std_map,
46 .gate = TDA18271_GATE_ANALOG,
47 .output_opt = TDA18271_OUTPUT_LT_OFF,
48 };
49--
501.7.9.4
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0104-mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_st.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0104-mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_st.patch
new file mode 100644
index 00000000..2233e9a4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0104-mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_st.patch
@@ -0,0 +1,45 @@
1From 9b9105c08669b50ea9735b26116b0b094cdb2fbe Mon Sep 17 00:00:00 2001
2From: Michael Krufky <mkrufky@linuxtv.org>
3Date: Sun, 18 Mar 2012 14:35:57 -0300
4Subject: [PATCH 104/147] mxl111sf: fix error on stream stop in
5 mxl111sf_ep6_streaming_ctrl()
6
7commit 3be5bb71fbf18f83cb88b54a62a78e03e5a4f30a upstream.
8
9Remove unnecessary register access in mxl111sf_ep6_streaming_ctrl()
10
11This code breaks driver operation in kernel 3.3 and later, although
12it works properly in 3.2 Disable register access to 0x12 for now.
13
14Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
15Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/media/dvb/dvb-usb/mxl111sf.c | 6 ++----
19 1 file changed, 2 insertions(+), 4 deletions(-)
20
21diff --git a/drivers/media/dvb/dvb-usb/mxl111sf.c b/drivers/media/dvb/dvb-usb/mxl111sf.c
22index b5c98da..bc6ea9f 100644
23--- a/drivers/media/dvb/dvb-usb/mxl111sf.c
24+++ b/drivers/media/dvb/dvb-usb/mxl111sf.c
25@@ -351,15 +351,13 @@ static int mxl111sf_ep6_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
26 adap_state->ep6_clockphase,
27 0, 0);
28 mxl_fail(ret);
29+#if 0
30 } else {
31 ret = mxl111sf_disable_656_port(state);
32 mxl_fail(ret);
33+#endif
34 }
35
36- mxl111sf_read_reg(state, 0x12, &tmp);
37- tmp &= ~0x04;
38- mxl111sf_write_reg(state, 0x12, tmp);
39-
40 return ret;
41 }
42
43--
441.7.9.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0105-NFSv4-Rate-limit-the-state-manager-warning-messages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0105-NFSv4-Rate-limit-the-state-manager-warning-messages.patch
new file mode 100644
index 00000000..f0065202
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0105-NFSv4-Rate-limit-the-state-manager-warning-messages.patch
@@ -0,0 +1,78 @@
1From 44612d69c516879d31f7b6a4a49d00dfc49caf06 Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Mon, 12 Mar 2012 18:01:48 -0400
4Subject: [PATCH 105/147] NFSv4: Rate limit the state manager warning messages
5
6commit 9a3ba432330e504ac61ff0043dbdaba7cea0e35a upstream.
7
8Prevent the state manager from filling up system logs when recovery
9fails on the server.
10
11Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 fs/nfs/callback_xdr.c | 4 +++-
15 fs/nfs/nfs4proc.c | 2 +-
16 fs/nfs/nfs4state.c | 4 ++--
17 3 files changed, 6 insertions(+), 4 deletions(-)
18
19diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
20index 726e59a..168cb93 100644
21--- a/fs/nfs/callback_xdr.c
22+++ b/fs/nfs/callback_xdr.c
23@@ -9,6 +9,8 @@
24 #include <linux/sunrpc/svc.h>
25 #include <linux/nfs4.h>
26 #include <linux/nfs_fs.h>
27+#include <linux/ratelimit.h>
28+#include <linux/printk.h>
29 #include <linux/slab.h>
30 #include <linux/sunrpc/bc_xprt.h>
31 #include "nfs4_fs.h"
32@@ -167,7 +169,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
33 if (hdr->minorversion <= 1) {
34 hdr->cb_ident = ntohl(*p++); /* ignored by v4.1 */
35 } else {
36- printk(KERN_WARNING "%s: NFSv4 server callback with "
37+ pr_warn_ratelimited("NFS: %s: NFSv4 server callback with "
38 "illegal minor version %u!\n",
39 __func__, hdr->minorversion);
40 return htonl(NFS4ERR_MINOR_VERS_MISMATCH);
41diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
42index 758e809..c9e2d9e 100644
43--- a/fs/nfs/nfs4proc.c
44+++ b/fs/nfs/nfs4proc.c
45@@ -1838,7 +1838,7 @@ static struct nfs4_state *nfs4_do_open(struct inode *dir, struct dentry *dentry,
46 * the user though...
47 */
48 if (status == -NFS4ERR_BAD_SEQID) {
49- printk(KERN_WARNING "NFS: v4 server %s "
50+ pr_warn_ratelimited("NFS: v4 server %s "
51 " returned a bad sequence-id error!\n",
52 NFS_SERVER(dir)->nfs_client->cl_hostname);
53 exception.retry = 1;
54diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
55index 0596fd6..66020ac 100644
56--- a/fs/nfs/nfs4state.c
57+++ b/fs/nfs/nfs4state.c
58@@ -935,7 +935,7 @@ static void nfs_increment_seqid(int status, struct nfs_seqid *seqid)
59 case -NFS4ERR_BAD_SEQID:
60 if (seqid->sequence->flags & NFS_SEQID_CONFIRMED)
61 return;
62- printk(KERN_WARNING "NFS: v4 server returned a bad"
63+ pr_warn_ratelimited("NFS: v4 server returned a bad"
64 " sequence-id error on an"
65 " unconfirmed sequence %p!\n",
66 seqid->sequence);
67@@ -1764,7 +1764,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
68 } while (atomic_read(&clp->cl_count) > 1);
69 return;
70 out_error:
71- printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
72+ pr_warn_ratelimited("NFS: state manager failed on NFSv4 server %s"
73 " with error %d\n", clp->cl_hostname, -status);
74 nfs4_end_drain_session(clp);
75 nfs4_clear_state_manager_bit(clp);
76--
771.7.9.4
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0106-PM-Hibernate-Enable-usermodehelpers-in-hibernate-err.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0106-PM-Hibernate-Enable-usermodehelpers-in-hibernate-err.patch
new file mode 100644
index 00000000..8cd543c7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0106-PM-Hibernate-Enable-usermodehelpers-in-hibernate-err.patch
@@ -0,0 +1,55 @@
1From 17b1d0787c9eea1fffe5432c14f53066ad2ff0c6 Mon Sep 17 00:00:00 2001
2From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
3Date: Fri, 17 Feb 2012 23:39:51 +0100
4Subject: [PATCH 106/147] PM / Hibernate: Enable usermodehelpers in
5 hibernate() error path
6
7commit 05b4877f6a4f1ba4952d1222213d262bf8c132b7 upstream.
8
9If create_basic_memory_bitmaps() fails, usermodehelpers are not re-enabled
10before returning. Fix this. And while at it, reword the goto labels so that
11they look more meaningful.
12
13Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
14Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 kernel/power/hibernate.c | 7 ++++---
18 1 file changed, 4 insertions(+), 3 deletions(-)
19
20diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
21index 624538a..7c0d578 100644
22--- a/kernel/power/hibernate.c
23+++ b/kernel/power/hibernate.c
24@@ -648,7 +648,7 @@ int hibernate(void)
25 /* Allocate memory management structures */
26 error = create_basic_memory_bitmaps();
27 if (error)
28- goto Exit;
29+ goto Enable_umh;
30
31 printk(KERN_INFO "PM: Syncing filesystems ... ");
32 sys_sync();
33@@ -656,7 +656,7 @@ int hibernate(void)
34
35 error = prepare_processes();
36 if (error)
37- goto Finish;
38+ goto Free_bitmaps;
39
40 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
41 if (error)
42@@ -689,8 +689,9 @@ int hibernate(void)
43
44 Thaw:
45 thaw_processes();
46- Finish:
47+ Free_bitmaps:
48 free_basic_memory_bitmaps();
49+ Enable_umh:
50 usermodehelper_enable();
51 Exit:
52 pm_notifier_call_chain(PM_POST_HIBERNATION);
53--
541.7.9.4
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0107-jbd2-clear-BH_Delay-BH_Unwritten-in-journal_unmap_bu.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0107-jbd2-clear-BH_Delay-BH_Unwritten-in-journal_unmap_bu.patch
new file mode 100644
index 00000000..f105047a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0107-jbd2-clear-BH_Delay-BH_Unwritten-in-journal_unmap_bu.patch
@@ -0,0 +1,49 @@
1From aa127d5abf17393b4f75c53be45124307b230542 Mon Sep 17 00:00:00 2001
2From: Eric Sandeen <sandeen@redhat.com>
3Date: Mon, 20 Feb 2012 17:53:01 -0500
4Subject: [PATCH 107/147] jbd2: clear BH_Delay & BH_Unwritten in
5 journal_unmap_buffer
6
7commit 15291164b22a357cb211b618adfef4fa82fc0de3 upstream.
8
9journal_unmap_buffer()'s zap_buffer: code clears a lot of buffer head
10state ala discard_buffer(), but does not touch _Delay or _Unwritten as
11discard_buffer() does.
12
13This can be problematic in some areas of the ext4 code which assume
14that if they have found a buffer marked unwritten or delay, then it's
15a live one. Perhaps those spots should check whether it is mapped
16as well, but if jbd2 is going to tear down a buffer, let's really
17tear it down completely.
18
19Without this I get some fsx failures on sub-page-block filesystems
20up until v3.2, at which point 4e96b2dbbf1d7e81f22047a50f862555a6cb87cb
21and 189e868fa8fdca702eb9db9d8afc46b5cb9144c9 make the failures go
22away, because buried within that large change is some more flag
23clearing. I still think it's worth doing in jbd2, since
24->invalidatepage leads here directly, and it's the right place
25to clear away these flags.
26
27Signed-off-by: Eric Sandeen <sandeen@redhat.com>
28Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
29Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30---
31 fs/jbd2/transaction.c | 2 ++
32 1 file changed, 2 insertions(+)
33
34diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
35index a0e41a4..8267de5 100644
36--- a/fs/jbd2/transaction.c
37+++ b/fs/jbd2/transaction.c
38@@ -1948,6 +1948,8 @@ zap_buffer_unlocked:
39 clear_buffer_mapped(bh);
40 clear_buffer_req(bh);
41 clear_buffer_new(bh);
42+ clear_buffer_delay(bh);
43+ clear_buffer_unwritten(bh);
44 bh->b_bdev = NULL;
45 return may_free;
46 }
47--
481.7.9.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0108-ext4-ignore-EXT4_INODE_JOURNAL_DATA-flag-with-delall.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0108-ext4-ignore-EXT4_INODE_JOURNAL_DATA-flag-with-delall.patch
new file mode 100644
index 00000000..3837be55
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0108-ext4-ignore-EXT4_INODE_JOURNAL_DATA-flag-with-delall.patch
@@ -0,0 +1,194 @@
1From 9a02204e0d49b5a0717822d1919f90768cef64ff Mon Sep 17 00:00:00 2001
2From: Lukas Czerner <lczerner@redhat.com>
3Date: Mon, 20 Feb 2012 17:53:00 -0500
4Subject: [PATCH 108/147] ext4: ignore EXT4_INODE_JOURNAL_DATA flag with
5 delalloc
6
7commit 3d2b158262826e8b75bbbfb7b97010838dd92ac7 upstream.
8
9Ext4 does not support data journalling with delayed allocation enabled.
10We even do not allow to mount the file system with delayed allocation
11and data journalling enabled, however it can be set via FS_IOC_SETFLAGS
12so we can hit the inode with EXT4_INODE_JOURNAL_DATA set even on file
13system mounted with delayed allocation (default) and that's where
14problem arises. The easies way to reproduce this problem is with the
15following set of commands:
16
17 mkfs.ext4 /dev/sdd
18 mount /dev/sdd /mnt/test1
19 dd if=/dev/zero of=/mnt/test1/file bs=1M count=4
20 chattr +j /mnt/test1/file
21 dd if=/dev/zero of=/mnt/test1/file bs=1M count=4 conv=notrunc
22 chattr -j /mnt/test1/file
23
24Additionally it can be reproduced quite reliably with xfstests 272 and
25269. In fact the above reproducer is a part of test 272.
26
27To fix this we should ignore the EXT4_INODE_JOURNAL_DATA inode flag if
28the file system is mounted with delayed allocation. This can be easily
29done by fixing ext4_should_*_data() functions do ignore data journal
30flag when delalloc is set (suggested by Ted). We also have to set the
31appropriate address space operations for the inode (again, ignoring data
32journal flag if delalloc enabled).
33
34Additionally this commit introduces ext4_inode_journal_mode() function
35because ext4_should_*_data() has already had a lot of common code and
36this change is putting it all into one function so it is easier to
37read.
38
39Successfully tested with xfstests in following configurations:
40
41delalloc + data=ordered
42delalloc + data=writeback
43data=journal
44nodelalloc + data=ordered
45nodelalloc + data=writeback
46nodelalloc + data=journal
47
48Signed-off-by: Lukas Czerner <lczerner@redhat.com>
49Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
50Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
51---
52 fs/ext4/ext4_jbd2.h | 56 ++++++++++++++++++++++++++-------------------------
53 fs/ext4/inode.c | 36 ++++++++++++++++++++-------------
54 2 files changed, 51 insertions(+), 41 deletions(-)
55
56diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h
57index 5802fa1..95af6f8 100644
58--- a/fs/ext4/ext4_jbd2.h
59+++ b/fs/ext4/ext4_jbd2.h
60@@ -261,43 +261,45 @@ static inline void ext4_update_inode_fsync_trans(handle_t *handle,
61 /* super.c */
62 int ext4_force_commit(struct super_block *sb);
63
64-static inline int ext4_should_journal_data(struct inode *inode)
65+/*
66+ * Ext4 inode journal modes
67+ */
68+#define EXT4_INODE_JOURNAL_DATA_MODE 0x01 /* journal data mode */
69+#define EXT4_INODE_ORDERED_DATA_MODE 0x02 /* ordered data mode */
70+#define EXT4_INODE_WRITEBACK_DATA_MODE 0x04 /* writeback data mode */
71+
72+static inline int ext4_inode_journal_mode(struct inode *inode)
73 {
74 if (EXT4_JOURNAL(inode) == NULL)
75- return 0;
76- if (!S_ISREG(inode->i_mode))
77- return 1;
78- if (test_opt(inode->i_sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA)
79- return 1;
80- if (ext4_test_inode_flag(inode, EXT4_INODE_JOURNAL_DATA))
81- return 1;
82- return 0;
83+ return EXT4_INODE_WRITEBACK_DATA_MODE; /* writeback */
84+ /* We do not support data journalling with delayed allocation */
85+ if (!S_ISREG(inode->i_mode) ||
86+ test_opt(inode->i_sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA)
87+ return EXT4_INODE_JOURNAL_DATA_MODE; /* journal data */
88+ if (ext4_test_inode_flag(inode, EXT4_INODE_JOURNAL_DATA) &&
89+ !test_opt(inode->i_sb, DELALLOC))
90+ return EXT4_INODE_JOURNAL_DATA_MODE; /* journal data */
91+ if (test_opt(inode->i_sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA)
92+ return EXT4_INODE_ORDERED_DATA_MODE; /* ordered */
93+ if (test_opt(inode->i_sb, DATA_FLAGS) == EXT4_MOUNT_WRITEBACK_DATA)
94+ return EXT4_INODE_WRITEBACK_DATA_MODE; /* writeback */
95+ else
96+ BUG();
97+}
98+
99+static inline int ext4_should_journal_data(struct inode *inode)
100+{
101+ return ext4_inode_journal_mode(inode) & EXT4_INODE_JOURNAL_DATA_MODE;
102 }
103
104 static inline int ext4_should_order_data(struct inode *inode)
105 {
106- if (EXT4_JOURNAL(inode) == NULL)
107- return 0;
108- if (!S_ISREG(inode->i_mode))
109- return 0;
110- if (ext4_test_inode_flag(inode, EXT4_INODE_JOURNAL_DATA))
111- return 0;
112- if (test_opt(inode->i_sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA)
113- return 1;
114- return 0;
115+ return ext4_inode_journal_mode(inode) & EXT4_INODE_ORDERED_DATA_MODE;
116 }
117
118 static inline int ext4_should_writeback_data(struct inode *inode)
119 {
120- if (EXT4_JOURNAL(inode) == NULL)
121- return 1;
122- if (!S_ISREG(inode->i_mode))
123- return 0;
124- if (ext4_test_inode_flag(inode, EXT4_INODE_JOURNAL_DATA))
125- return 0;
126- if (test_opt(inode->i_sb, DATA_FLAGS) == EXT4_MOUNT_WRITEBACK_DATA)
127- return 1;
128- return 0;
129+ return ext4_inode_journal_mode(inode) & EXT4_INODE_WRITEBACK_DATA_MODE;
130 }
131
132 /*
133diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
134index 9df447f..fbd2ea4 100644
135--- a/fs/ext4/inode.c
136+++ b/fs/ext4/inode.c
137@@ -2480,13 +2480,14 @@ static int ext4_da_write_end(struct file *file,
138 int write_mode = (int)(unsigned long)fsdata;
139
140 if (write_mode == FALL_BACK_TO_NONDELALLOC) {
141- if (ext4_should_order_data(inode)) {
142+ switch (ext4_inode_journal_mode(inode)) {
143+ case EXT4_INODE_ORDERED_DATA_MODE:
144 return ext4_ordered_write_end(file, mapping, pos,
145 len, copied, page, fsdata);
146- } else if (ext4_should_writeback_data(inode)) {
147+ case EXT4_INODE_WRITEBACK_DATA_MODE:
148 return ext4_writeback_write_end(file, mapping, pos,
149 len, copied, page, fsdata);
150- } else {
151+ default:
152 BUG();
153 }
154 }
155@@ -3084,18 +3085,25 @@ static const struct address_space_operations ext4_da_aops = {
156
157 void ext4_set_aops(struct inode *inode)
158 {
159- if (ext4_should_order_data(inode) &&
160- test_opt(inode->i_sb, DELALLOC))
161- inode->i_mapping->a_ops = &ext4_da_aops;
162- else if (ext4_should_order_data(inode))
163- inode->i_mapping->a_ops = &ext4_ordered_aops;
164- else if (ext4_should_writeback_data(inode) &&
165- test_opt(inode->i_sb, DELALLOC))
166- inode->i_mapping->a_ops = &ext4_da_aops;
167- else if (ext4_should_writeback_data(inode))
168- inode->i_mapping->a_ops = &ext4_writeback_aops;
169- else
170+ switch (ext4_inode_journal_mode(inode)) {
171+ case EXT4_INODE_ORDERED_DATA_MODE:
172+ if (test_opt(inode->i_sb, DELALLOC))
173+ inode->i_mapping->a_ops = &ext4_da_aops;
174+ else
175+ inode->i_mapping->a_ops = &ext4_ordered_aops;
176+ break;
177+ case EXT4_INODE_WRITEBACK_DATA_MODE:
178+ if (test_opt(inode->i_sb, DELALLOC))
179+ inode->i_mapping->a_ops = &ext4_da_aops;
180+ else
181+ inode->i_mapping->a_ops = &ext4_writeback_aops;
182+ break;
183+ case EXT4_INODE_JOURNAL_DATA_MODE:
184 inode->i_mapping->a_ops = &ext4_journalled_aops;
185+ break;
186+ default:
187+ BUG();
188+ }
189 }
190
191
192--
1931.7.9.4
194
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0109-ext4-fix-race-between-unwritten-extent-conversion-an.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0109-ext4-fix-race-between-unwritten-extent-conversion-an.patch
new file mode 100644
index 00000000..7dd5d508
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0109-ext4-fix-race-between-unwritten-extent-conversion-an.patch
@@ -0,0 +1,90 @@
1From 650bb7d911ba40c634964921badb10e175276089 Mon Sep 17 00:00:00 2001
2From: Jeff Moyer <jmoyer@redhat.com>
3Date: Mon, 20 Feb 2012 17:59:24 -0500
4Subject: [PATCH 109/147] ext4: fix race between unwritten extent conversion
5 and truncate
6
7commit 266991b13890049ee1a6bb95b9817f06339ee3d7 upstream.
8
9The following comment in ext4_end_io_dio caught my attention:
10
11 /* XXX: probably should move into the real I/O completion handler */
12 inode_dio_done(inode);
13
14The truncate code takes i_mutex, then calls inode_dio_wait. Because the
15ext4 code path above will end up dropping the mutex before it is
16reacquired by the worker thread that does the extent conversion, it
17seems to me that the truncate can happen out of order. Jan Kara
18mentioned that this might result in error messages in the system logs,
19but that should be the extent of the "damage."
20
21The fix is pretty straight-forward: don't call inode_dio_done until the
22extent conversion is complete.
23
24Reviewed-by: Jan Kara <jack@suse.cz>
25Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
26Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
27Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28---
29 fs/ext4/ext4.h | 1 +
30 fs/ext4/inode.c | 10 +++++-----
31 fs/ext4/page-io.c | 2 ++
32 3 files changed, 8 insertions(+), 5 deletions(-)
33
34diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
35index 5b0e26a..655d942 100644
36--- a/fs/ext4/ext4.h
37+++ b/fs/ext4/ext4.h
38@@ -184,6 +184,7 @@ struct mpage_da_data {
39 #define EXT4_IO_END_UNWRITTEN 0x0001
40 #define EXT4_IO_END_ERROR 0x0002
41 #define EXT4_IO_END_QUEUED 0x0004
42+#define EXT4_IO_END_DIRECT 0x0008
43
44 struct ext4_io_page {
45 struct page *p_page;
46diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
47index fbd2ea4..d0dc109 100644
48--- a/fs/ext4/inode.c
49+++ b/fs/ext4/inode.c
50@@ -2794,9 +2794,6 @@ out:
51
52 /* queue the work to convert unwritten extents to written */
53 queue_work(wq, &io_end->work);
54-
55- /* XXX: probably should move into the real I/O completion handler */
56- inode_dio_done(inode);
57 }
58
59 static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate)
60@@ -2920,9 +2917,12 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
61 iocb->private = NULL;
62 EXT4_I(inode)->cur_aio_dio = NULL;
63 if (!is_sync_kiocb(iocb)) {
64- iocb->private = ext4_init_io_end(inode, GFP_NOFS);
65- if (!iocb->private)
66+ ext4_io_end_t *io_end =
67+ ext4_init_io_end(inode, GFP_NOFS);
68+ if (!io_end)
69 return -ENOMEM;
70+ io_end->flag |= EXT4_IO_END_DIRECT;
71+ iocb->private = io_end;
72 /*
73 * we save the io structure for current async
74 * direct IO, so that later ext4_map_blocks()
75diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
76index 7e106c8..924298a 100644
77--- a/fs/ext4/page-io.c
78+++ b/fs/ext4/page-io.c
79@@ -111,6 +111,8 @@ int ext4_end_io_nolock(ext4_io_end_t *io)
80 if (io->iocb)
81 aio_complete(io->iocb, io->result, 0);
82
83+ if (io->flag & EXT4_IO_END_DIRECT)
84+ inode_dio_done(inode);
85 /* Wake up anyone waiting on unwritten extent conversion */
86 if (atomic_dec_and_test(&EXT4_I(inode)->i_aiodio_unwritten))
87 wake_up_all(ext4_ioend_wq(io->inode));
88--
891.7.9.4
90
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0110-ext4-fix-race-between-sync-and-completed-io-work.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0110-ext4-fix-race-between-sync-and-completed-io-work.patch
new file mode 100644
index 00000000..fa0f39e0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0110-ext4-fix-race-between-sync-and-completed-io-work.patch
@@ -0,0 +1,119 @@
1From 4eb9698d0d2e5fb6c0cd910ed3e86154b4d1ea92 Mon Sep 17 00:00:00 2001
2From: Jeff Moyer <jmoyer@redhat.com>
3Date: Mon, 5 Mar 2012 10:29:52 -0500
4Subject: [PATCH 110/147] ext4: fix race between sync and completed io work
5
6commit 491caa43639abcffaa645fbab372a7ef4ce2975c upstream.
7
8The following command line will leave the aio-stress process unkillable
9on an ext4 file system (in my case, mounted on /mnt/test):
10
11aio-stress -t 20 -s 10 -O -S -o 2 -I 1000 /mnt/test/aiostress.3561.4 /mnt/test/aiostress.3561.4.20 /mnt/test/aiostress.3561.4.19 /mnt/test/aiostress.3561.4.18 /mnt/test/aiostress.3561.4.17 /mnt/test/aiostress.3561.4.16 /mnt/test/aiostress.3561.4.15 /mnt/test/aiostress.3561.4.14 /mnt/test/aiostress.3561.4.13 /mnt/test/aiostress.3561.4.12 /mnt/test/aiostress.3561.4.11 /mnt/test/aiostress.3561.4.10 /mnt/test/aiostress.3561.4.9 /mnt/test/aiostress.3561.4.8 /mnt/test/aiostress.3561.4.7 /mnt/test/aiostress.3561.4.6 /mnt/test/aiostress.3561.4.5 /mnt/test/aiostress.3561.4.4 /mnt/test/aiostress.3561.4.3 /mnt/test/aiostress.3561.4.2
12
13This is using the aio-stress program from the xfstests test suite.
14That particular command line tells aio-stress to do random writes to
1520 files from 20 threads (one thread per file). The files are NOT
16preallocated, so you will get writes to random offsets within the
17file, thus creating holes and extending i_size. It also opens the
18file with O_DIRECT and O_SYNC.
19
20On to the problem. When an I/O requires unwritten extent conversion,
21it is queued onto the completed_io_list for the ext4 inode. Two code
22paths will pull work items from this list. The first is the
23ext4_end_io_work routine, and the second is ext4_flush_completed_IO,
24which is called via the fsync path (and O_SYNC handling, as well).
25There are two issues I've found in these code paths. First, if the
26fsync path beats the work routine to a particular I/O, the work
27routine will free the io_end structure! It does not take into account
28the fact that the io_end may still be in use by the fsync path. I've
29fixed this issue by adding yet another IO_END flag, indicating that
30the io_end is being processed by the fsync path.
31
32The second problem is that the work routine will make an assignment to
33io->flag outside of the lock. I have witnessed this result in a hang
34at umount. Moving the flag setting inside the lock resolved that
35problem.
36
37The problem was introduced by commit b82e384c7b ("ext4: optimize
38locking for end_io extent conversion"), which first appeared in 3.2.
39As such, the fix should be backported to that release (probably along
40with the unwritten extent conversion race fix).
41
42Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
43Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
44Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
45---
46 fs/ext4/ext4.h | 1 +
47 fs/ext4/fsync.c | 2 ++
48 fs/ext4/page-io.c | 9 +++++++--
49 3 files changed, 10 insertions(+), 2 deletions(-)
50
51diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
52index 655d942..dbae4d9 100644
53--- a/fs/ext4/ext4.h
54+++ b/fs/ext4/ext4.h
55@@ -185,6 +185,7 @@ struct mpage_da_data {
56 #define EXT4_IO_END_ERROR 0x0002
57 #define EXT4_IO_END_QUEUED 0x0004
58 #define EXT4_IO_END_DIRECT 0x0008
59+#define EXT4_IO_END_IN_FSYNC 0x0010
60
61 struct ext4_io_page {
62 struct page *p_page;
63diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
64index 00a2cb7..bb6c7d8 100644
65--- a/fs/ext4/fsync.c
66+++ b/fs/ext4/fsync.c
67@@ -89,6 +89,7 @@ int ext4_flush_completed_IO(struct inode *inode)
68 io = list_entry(ei->i_completed_io_list.next,
69 ext4_io_end_t, list);
70 list_del_init(&io->list);
71+ io->flag |= EXT4_IO_END_IN_FSYNC;
72 /*
73 * Calling ext4_end_io_nolock() to convert completed
74 * IO to written.
75@@ -108,6 +109,7 @@ int ext4_flush_completed_IO(struct inode *inode)
76 if (ret < 0)
77 ret2 = ret;
78 spin_lock_irqsave(&ei->i_completed_io_lock, flags);
79+ io->flag &= ~EXT4_IO_END_IN_FSYNC;
80 }
81 spin_unlock_irqrestore(&ei->i_completed_io_lock, flags);
82 return (ret2 < 0) ? ret2 : 0;
83diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
84index 924298a..24feb1c 100644
85--- a/fs/ext4/page-io.c
86+++ b/fs/ext4/page-io.c
87@@ -130,12 +130,18 @@ static void ext4_end_io_work(struct work_struct *work)
88 unsigned long flags;
89
90 spin_lock_irqsave(&ei->i_completed_io_lock, flags);
91+ if (io->flag & EXT4_IO_END_IN_FSYNC)
92+ goto requeue;
93 if (list_empty(&io->list)) {
94 spin_unlock_irqrestore(&ei->i_completed_io_lock, flags);
95 goto free;
96 }
97
98 if (!mutex_trylock(&inode->i_mutex)) {
99+ bool was_queued;
100+requeue:
101+ was_queued = !!(io->flag & EXT4_IO_END_QUEUED);
102+ io->flag |= EXT4_IO_END_QUEUED;
103 spin_unlock_irqrestore(&ei->i_completed_io_lock, flags);
104 /*
105 * Requeue the work instead of waiting so that the work
106@@ -148,9 +154,8 @@ static void ext4_end_io_work(struct work_struct *work)
107 * yield the cpu if it sees an end_io request that has already
108 * been requeued.
109 */
110- if (io->flag & EXT4_IO_END_QUEUED)
111+ if (was_queued)
112 yield();
113- io->flag |= EXT4_IO_END_QUEUED;
114 return;
115 }
116 list_del_init(&io->list);
117--
1181.7.9.4
119
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0111-ext4-check-for-zero-length-extent.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0111-ext4-check-for-zero-length-extent.patch
new file mode 100644
index 00000000..4a83f033
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0111-ext4-check-for-zero-length-extent.patch
@@ -0,0 +1,41 @@
1From 3a71b922c02de36168d14ec55a97582f3fec2e07 Mon Sep 17 00:00:00 2001
2From: Theodore Ts'o <tytso@mit.edu>
3Date: Sun, 11 Mar 2012 23:30:16 -0400
4Subject: [PATCH 111/147] ext4: check for zero length extent
5
6commit 31d4f3a2f3c73f279ff96a7135d7202ef6833f12 upstream.
7
8Explicitly test for an extent whose length is zero, and flag that as a
9corrupted extent.
10
11This avoids a kernel BUG_ON assertion failure.
12
13Tested: Without this patch, the file system image found in
14tests/f_ext_zero_len/image.gz in the latest e2fsprogs sources causes a
15kernel panic. With this patch, an ext4 file system error is noted
16instead, and the file system is marked as being corrupted.
17
18https://bugzilla.kernel.org/show_bug.cgi?id=42859
19
20Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 fs/ext4/extents.c | 2 ++
24 1 file changed, 2 insertions(+)
25
26diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
27index 607b155..7507036 100644
28--- a/fs/ext4/extents.c
29+++ b/fs/ext4/extents.c
30@@ -301,6 +301,8 @@ static int ext4_valid_extent(struct inode *inode, struct ext4_extent *ext)
31 ext4_fsblk_t block = ext4_ext_pblock(ext);
32 int len = ext4_ext_get_actual_len(ext);
33
34+ if (len == 0)
35+ return 0;
36 return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len);
37 }
38
39--
401.7.9.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0112-vfs-fix-d_ancestor-case-in-d_materialize_unique.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0112-vfs-fix-d_ancestor-case-in-d_materialize_unique.patch
new file mode 100644
index 00000000..333e3bd8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0112-vfs-fix-d_ancestor-case-in-d_materialize_unique.patch
@@ -0,0 +1,54 @@
1From 1287e09097b8199407c64d26e9a3ce1a1b25da74 Mon Sep 17 00:00:00 2001
2From: Michel Lespinasse <walken@google.com>
3Date: Mon, 26 Mar 2012 17:32:44 -0700
4Subject: [PATCH 112/147] vfs: fix d_ancestor() case in d_materialize_unique
5
6commit b18dafc86bb879d2f38a1743985d7ceb283c2f4d upstream.
7
8In d_materialise_unique() there are 3 subcases to the 'aliased dentry'
9case; in two subcases the inode i_lock is properly released but this
10does not occur in the -ELOOP subcase.
11
12This seems to have been introduced by commit 1836750115f2 ("fix loop
13checks in d_materialise_unique()").
14
15Signed-off-by: Michel Lespinasse <walken@google.com>
16[ Added a comment, and moved the unlock to where we generate the -ELOOP,
17 which seems to be more natural.
18
19 You probably can't actually trigger this without a buggy network file
20 server - d_materialize_unique() is for finding aliases on non-local
21 filesystems, and the d_ancestor() case is for a hardlinked directory
22 loop.
23
24 But we should be robust in the case of such buggy servers anyway. ]
25Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
26Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27---
28 fs/dcache.c | 3 ++-
29 1 file changed, 2 insertions(+), 1 deletion(-)
30
31diff --git a/fs/dcache.c b/fs/dcache.c
32index f7908ae..eb723d3 100644
33--- a/fs/dcache.c
34+++ b/fs/dcache.c
35@@ -2357,6 +2357,7 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode)
36 if (d_ancestor(alias, dentry)) {
37 /* Check for loops */
38 actual = ERR_PTR(-ELOOP);
39+ spin_unlock(&inode->i_lock);
40 } else if (IS_ROOT(alias)) {
41 /* Is this an anonymous mountpoint that we
42 * could splice into our tree? */
43@@ -2366,7 +2367,7 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode)
44 goto found;
45 } else {
46 /* Nope, but we must(!) avoid directory
47- * aliasing */
48+ * aliasing. This drops inode->i_lock */
49 actual = __d_unalias(inode, dentry, alias);
50 }
51 write_sequnlock(&rename_lock);
52--
531.7.9.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0113-ARM-tegra-select-required-CPU-and-L2-errata-options.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0113-ARM-tegra-select-required-CPU-and-L2-errata-options.patch
new file mode 100644
index 00000000..88fa5551
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0113-ARM-tegra-select-required-CPU-and-L2-errata-options.patch
@@ -0,0 +1,56 @@
1From b125bf4a63e80e83526c1e1f775446078c91374f Mon Sep 17 00:00:00 2001
2From: Stephen Warren <swarren@nvidia.com>
3Date: Tue, 14 Feb 2012 13:39:39 -0700
4Subject: [PATCH 113/147] ARM: tegra: select required CPU and L2 errata
5 options
6
7commit f35b431dde39fb40944d1024f08d88fbf04a3193 upstream.
8
9The ARM IP revisions in Tegra are:
10Tegra20: CPU r1p1, PL310 r2p0
11Tegra30: CPU A01=r2p7/>=A02=r2p9, NEON r2p3-50, PL310 r3p1-50
12
13Based on work by Olof Johansson, although the actual list of errata is
14somewhat different here, since I added a bunch more and removed one PL310
15erratum that doesn't seem applicable.
16
17Signed-off-by: Stephen Warren <swarren@nvidia.com>
18Signed-off-by: Olof Johansson <olof@lixom.net>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 arch/arm/mach-tegra/Kconfig | 12 ++++++++++++
22 1 file changed, 12 insertions(+)
23
24diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
25index 91aff7c..dbc59fa 100644
26--- a/arch/arm/mach-tegra/Kconfig
27+++ b/arch/arm/mach-tegra/Kconfig
28@@ -13,6 +13,13 @@ config ARCH_TEGRA_2x_SOC
29 select USB_ARCH_HAS_EHCI if USB_SUPPORT
30 select USB_ULPI if USB_SUPPORT
31 select USB_ULPI_VIEWPORT if USB_SUPPORT
32+ select ARM_ERRATA_720789
33+ select ARM_ERRATA_742230
34+ select ARM_ERRATA_751472
35+ select ARM_ERRATA_754327
36+ select ARM_ERRATA_764369
37+ select PL310_ERRATA_727915 if CACHE_L2X0
38+ select PL310_ERRATA_769419 if CACHE_L2X0
39 help
40 Support for NVIDIA Tegra AP20 and T20 processors, based on the
41 ARM CortexA9MP CPU and the ARM PL310 L2 cache controller
42@@ -54,6 +61,11 @@ config MACH_SEABOARD
43 config MACH_TEGRA_DT
44 bool "Generic Tegra board (FDT support)"
45 select USE_OF
46+ select ARM_ERRATA_743622
47+ select ARM_ERRATA_751472
48+ select ARM_ERRATA_754322
49+ select ARM_ERRATA_764369
50+ select PL310_ERRATA_769419 if CACHE_L2X0
51 help
52 Support for generic nVidia Tegra boards using Flattened Device Tree
53
54--
551.7.9.4
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0114-udf-Fix-deadlock-in-udf_release_file.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0114-udf-Fix-deadlock-in-udf_release_file.patch
new file mode 100644
index 00000000..ae80b769
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0114-udf-Fix-deadlock-in-udf_release_file.patch
@@ -0,0 +1,40 @@
1From e812277ff9241a705c2a789f889aab4d1c26c31c Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Mon, 20 Feb 2012 17:49:56 +0100
4Subject: [PATCH 114/147] udf: Fix deadlock in udf_release_file()
5
6commit a0391a3ae91d301c0e59368531a4de5f0b122bcf upstream.
7
8udf_release_file() can be called from munmap() path with mmap_sem held. Thus
9we cannot take i_mutex there because that ranks above mmap_sem. Luckily,
10i_mutex is not needed in udf_release_file() anymore since protection by
11i_data_sem is enough to protect from races with write and truncate.
12
13Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
14Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
15Signed-off-by: Jan Kara <jack@suse.cz>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 fs/udf/file.c | 2 --
19 1 file changed, 2 deletions(-)
20
21diff --git a/fs/udf/file.c b/fs/udf/file.c
22index dca0c38..d567b84 100644
23--- a/fs/udf/file.c
24+++ b/fs/udf/file.c
25@@ -201,12 +201,10 @@ out:
26 static int udf_release_file(struct inode *inode, struct file *filp)
27 {
28 if (filp->f_mode & FMODE_WRITE) {
29- mutex_lock(&inode->i_mutex);
30 down_write(&UDF_I(inode)->i_data_sem);
31 udf_discard_prealloc(inode);
32 udf_truncate_tail_extent(inode);
33 up_write(&UDF_I(inode)->i_data_sem);
34- mutex_unlock(&inode->i_mutex);
35 }
36 return 0;
37 }
38--
391.7.9.4
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0115-gpio-omap-fix-_set_gpio_irqenable-implementation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0115-gpio-omap-fix-_set_gpio_irqenable-implementation.patch
new file mode 100644
index 00000000..03e2035e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0115-gpio-omap-fix-_set_gpio_irqenable-implementation.patch
@@ -0,0 +1,41 @@
1From 5f5e1bcdbe3347e680007e30b5848a8a3826f68b Mon Sep 17 00:00:00 2001
2From: Tarun Kanti DebBarma <tarun.kanti@ti.com>
3Date: Fri, 25 Nov 2011 15:27:37 +0530
4Subject: [PATCH 115/147] gpio/omap: fix _set_gpio_irqenable implementation
5
6commit 8276536cec38bc6bde30d0aa67716f22b9b9705a upstream.
7
8This function should be capable of both enabling and disabling interrupts
9based upon the *enable* parameter. Right now the function only enables
10the interrupt and *enable* is not used at all. So add the interrupt
11disable capability also using the parameter.
12
13Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
14Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
15Acked-by: Felipe Balbi <balbi@ti.com>
16Reviewed-by: Kevin Hilman <khilman@ti.com>
17Signed-off-by: Kevin Hilman <khilman@ti.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/gpio/gpio-omap.c | 5 ++++-
21 1 file changed, 4 insertions(+), 1 deletion(-)
22
23diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
24index 4b172446..7fe6897 100644
25--- a/drivers/gpio/gpio-omap.c
26+++ b/drivers/gpio/gpio-omap.c
27@@ -511,7 +511,10 @@ static void _disable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask)
28
29 static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int enable)
30 {
31- _enable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
32+ if (enable)
33+ _enable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
34+ else
35+ _disable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
36 }
37
38 /*
39--
401.7.9.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0116-gpio-davinci-fix-oops-on-unbanked-gpio-irq-request.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0116-gpio-davinci-fix-oops-on-unbanked-gpio-irq-request.patch
new file mode 100644
index 00000000..a6cd5ec8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0116-gpio-davinci-fix-oops-on-unbanked-gpio-irq-request.patch
@@ -0,0 +1,152 @@
1From e91fedbcc83a758adab48636c9ba73338326a3b7 Mon Sep 17 00:00:00 2001
2From: Sekhar Nori <nsekhar@ti.com>
3Date: Sun, 11 Mar 2012 18:16:11 +0530
4Subject: [PATCH 116/147] gpio/davinci: fix oops on unbanked gpio irq request
5
6commit ab2dde9924dd1ddb791fa8b14aa52e1df681e20c upstream.
7
8Unbanked GPIO irq setup code was overwriting chip_data leading
9to the following oops on request_irq()
10
11Unable to handle kernel paging request at virtual address febfffff
12pgd = c22dc000
13[febfffff] *pgd=00000000
14Internal error: Oops: 801 [#1] PREEMPT
15Modules linked in: mcu(+) edmak irqk cmemk
16CPU: 0 Not tainted (3.0.0-rc7+ #93)
17PC is at irq_gc_mask_set_bit+0x68/0x7c
18LR is at vprintk+0x22c/0x484
19pc : [<c0080c0c>] lr : [<c00457e0>] psr: 60000093
20sp : c33e3ba0 ip : c33e3af0 fp : c33e3bc4
21r10: c04555bc r9 : c33d4340 r8 : 60000013
22r7 : 0000002d r6 : c04555bc r5 : fec67010 r4 : 00000000
23r3 : c04734c8 r2 : fec00000 r1 : ffffffff r0 : 00000026
24Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
25Control: 0005317f Table: 822dc000 DAC: 00000015
26Process modprobe (pid: 526, stack limit = 0xc33e2270)
27Stack: (0xc33e3ba0 to 0xc33e4000)
283ba0: 00000000 c007d3d4 c33e3bcc c04555bc c04555bc c33d4340 c33e3bdc c33e3bc8
293bc0: c007f5f8 c0080bb4 00000000 c04555bc c33e3bf4 c33e3be0 c007f654 c007f5c0
303be0: 00000000 c04555bc c33e3c24 c33e3bf8 c007e6e8 c007f618 c01f2284 c0350af8
313c00: c0405214 bf016c98 00000001 00000000 c33dc008 0000002d c33e3c54 c33e3c28
323c20: c007e888 c007e408 00000001 c23ef880 c33dc000 00000000 c33dc080 c25caa00
333c40: c0487498 bf017078 c33e3c94 c33e3c58 bf016b44 c007e7d4 bf017078 c33dc008
343c60: c25caa08 c33dc008 c33e3c84 bf017484 c25caa00 c25caa00 c01f5f48 c25caa08
353c80: c0496d60 bf017484 c33e3ca4 c33e3c98 c022a698 bf01692c c33e3cd4 c33e3ca8
363ca0: c01f5d88 c022a688 00000000 bf017484 c25caa00 c25caa00 c01f5f48 c25caa08
373cc0: c0496d60 00000000 c33e3cec c33e3cd8 c01f5f8c c01f5d10 00000000 c33e3cf0
383ce0: c33e3d14 c33e3cf0 c01f5210 c01f5f58 c303cb48 c25ecf94 c25caa00 c25caa00
393d00: c25caa34 c33e3dd8 c33e3d34 c33e3d18 c01f6044 c01f51b8 c0496d3c c25caa00
403d20: c044e918 c33e3dd8 c33e3d44 c33e3d38 c01f4ff4 c01f5fcc c33e3d94 c33e3d48
413d40: c01f3d10 c01f4fd8 00000000 c044e918 00000000 00000000 c01f52c0 c034d570
423d60: c33e3d84 c33e3d70 c022bf84 c25caa00 00000000 c044e918 c33e3dd8 c25c2e00
433d80: c0496d60 bf01763c c33e3db4 c33e3d98 c022b1a0 c01f384c c25caa00 c33e3dd8
443da0: 00000000 c33e3dd8 c33e3dd4 c33e3db8 c022b27c c022b0e8 00000000 bf01763c
453dc0: c0451c80 c33e3dd8 c33e3e34 c33e3dd8 bf016f60 c022b210 5f75636d 746e6f63
463de0: 006c6f72 00000000 00000000 00000000 00000000 00000000 00000000 bf0174bc
473e00: 00000000 00989680 00000000 00000020 c0451c80 c0451c80 bf0174dc c01f5eb0
483e20: c33f0f00 bf0174dc c33e3e44 c33e3e38 c01f72f4 bf016e2c c33e3e74 c33e3e48
493e40: c01f5d88 c01f72e4 00000000 c0451c80 c0451cb4 bf0174dc c01f5eb0 c33f0f00
503e60: c0473100 00000000 c33e3e94 c33e3e78 c01f5f44 c01f5d10 00000000 c33e3e98
513e80: bf0174dc c01f5eb0 c33e3ebc c33e3e98 c01f5534 c01f5ec0 c303c038 c3061c30
523ea0: 00003cd8 00098258 bf0174dc c0462ac8 c33e3ecc c33e3ec0 c01f5bec c01f54dc
533ec0: c33e3efc c33e3ed0 c01f4d30 c01f5bdc bf0173a0 c33e2000 00003cd8 00098258
543ee0: bf0174dc c33e2000 c00301a4 bf019000 c33e3f1c c33e3f00 c01f6588 c01f4c8c
553f00: 00003cd8 00098258 00000000 c33e2000 c33e3f2c c33e3f20 c01f777c c01f6524
563f20: c33e3f3c c33e3f30 bf019014 c01f7740 c33e3f7c c33e3f40 c002f3ec bf019010
573f40: 00000000 00003cd8 00098258 bf017518 00000000 00003cd8 00098258 bf017518
583f60: 00000000 c00301a4 c33e2000 00000000 c33e3fa4 c33e3f80 c007b934 c002f3c4
593f80: c00b307c c00b2f48 00003cd8 00000000 00000003 00000080 00000000 c33e3fa8
603fa0: c0030020 c007b8b8 00003cd8 00000000 00098288 00003cd8 00098258 00098240
613fc0: 00003cd8 00000000 00000003 00000080 00098008 00098028 00098288 00000001
623fe0: be892998 be892988 00013d7c 40178740 60000010 00098288 09089041 00200845
63Backtrace:
64[<c0080ba4>] (irq_gc_mask_set_bit+0x0/0x7c) from [<c007f5f8>] (irq_enable+0x48/0x58)
65 r6:c33d4340 r5:c04555bc r4:c04555bc
66[<c007f5b0>] (irq_enable+0x0/0x58) from [<c007f654>] (irq_startup+0x4c/0x54)
67 r5:c04555bc r4:00000000
68[<c007f608>] (irq_startup+0x0/0x54) from [<c007e6e8>] (__setup_irq+0x2f0/0x3cc)
69 r5:c04555bc r4:00000000
70[<c007e3f8>] (__setup_irq+0x0/0x3cc) from [<c007e888>] (request_threaded_irq+0xc4/0x110)
71 r8:0000002d r7:c33dc008 r6:00000000 r5:00000001 r4:bf016c98
72[<c007e7c4>] (request_threaded_irq+0x0/0x110) from [<bf016b44>] (mcu_spi_probe+0x228/0x37c [mcu])
73[<bf01691c>] (mcu_spi_probe+0x0/0x37c [mcu]) from [<c022a698>] (spi_drv_probe+0x20/0x24)
74[<c022a678>] (spi_drv_probe+0x0/0x24) from [<c01f5d88>] (driver_probe_device+0x88/0x1b0)
75[<c01f5d00>] (driver_probe_device+0x0/0x1b0) from [<c01f5f8c>] (__device_attach+0x44/0x48)
76[<c01f5f48>] (__device_attach+0x0/0x48) from [<c01f5210>] (bus_for_each_drv+0x68/0x94)
77 r5:c33e3cf0 r4:00000000
78[<c01f51a8>] (bus_for_each_drv+0x0/0x94) from [<c01f6044>] (device_attach+0x88/0xa0)
79 r7:c33e3dd8 r6:c25caa34 r5:c25caa00 r4:c25caa00
80[<c01f5fbc>] (device_attach+0x0/0xa0) from [<c01f4ff4>] (bus_probe_device+0x2c/0x4c)
81 r7:c33e3dd8 r6:c044e918 r5:c25caa00 r4:c0496d3c
82[<c01f4fc8>] (bus_probe_device+0x0/0x4c) from [<c01f3d10>] (device_add+0x4d4/0x648)
83[<c01f383c>] (device_add+0x0/0x648) from [<c022b1a0>] (spi_add_device+0xc8/0x128)
84[<c022b0d8>] (spi_add_device+0x0/0x128) from [<c022b27c>] (spi_new_device+0x7c/0xb4)
85 r7:c33e3dd8 r6:00000000 r5:c33e3dd8 r4:c25caa00
86[<c022b200>] (spi_new_device+0x0/0xb4) from [<bf016f60>] (mcu_probe+0x144/0x224 [mcu])
87 r7:c33e3dd8 r6:c0451c80 r5:bf01763c r4:00000000
88[<bf016e1c>] (mcu_probe+0x0/0x224 [mcu]) from [<c01f72f4>] (platform_drv_probe+0x20/0x24)
89[<c01f72d4>] (platform_drv_probe+0x0/0x24) from [<c01f5d88>] (driver_probe_device+0x88/0x1b0)
90[<c01f5d00>] (driver_probe_device+0x0/0x1b0) from [<c01f5f44>] (__driver_attach+0x94/0x98)
91[<c01f5eb0>] (__driver_attach+0x0/0x98) from [<c01f5534>] (bus_for_each_dev+0x68/0x94)
92 r7:c01f5eb0 r6:bf0174dc r5:c33e3e98 r4:00000000
93[<c01f54cc>] (bus_for_each_dev+0x0/0x94) from [<c01f5bec>] (driver_attach+0x20/0x28)
94 r7:c0462ac8 r6:bf0174dc r5:00098258 r4:00003cd8
95[<c01f5bcc>] (driver_attach+0x0/0x28) from [<c01f4d30>] (bus_add_driver+0xb4/0x258)
96[<c01f4c7c>] (bus_add_driver+0x0/0x258) from [<c01f6588>] (driver_register+0x74/0x158)
97[<c01f6514>] (driver_register+0x0/0x158) from [<c01f777c>] (platform_driver_register+0x4c/0x60)
98 r7:c33e2000 r6:00000000 r5:00098258 r4:00003cd8
99[<c01f7730>] (platform_driver_register+0x0/0x60) from [<bf019014>] (mcu_init+0x14/0x20 [mcu])
100[<bf019000>] (mcu_init+0x0/0x20 [mcu]) from [<c002f3ec>] (do_one_initcall+0x38/0x170)
101[<c002f3b4>] (do_one_initcall+0x0/0x170) from [<c007b934>] (sys_init_module+0x8c/0x1a4)
102[<c007b8a8>] (sys_init_module+0x0/0x1a4) from [<c0030020>] (ret_fast_syscall+0x0/0x2c)
103 r7:00000080 r6:00000003 r5:00000000 r4:00003cd8
104Code: e1844003 e585400c e596300c e5932064 (e7814002)
105
106Fix the issue.
107
108Reported-by: Jon Povey <Jon.Povey@racelogic.co.uk>
109Signed-off-by: Sekhar Nori <nsekhar@ti.com>
110Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
111Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
112---
113 drivers/gpio/gpio-davinci.c | 15 ++++++++++-----
114 1 file changed, 10 insertions(+), 5 deletions(-)
115
116diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
117index df0d595..a6777e5 100644
118--- a/drivers/gpio/gpio-davinci.c
119+++ b/drivers/gpio/gpio-davinci.c
120@@ -313,10 +313,16 @@ static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
121 return -ENODEV;
122 }
123
124-static int gpio_irq_type_unbanked(struct irq_data *d, unsigned trigger)
125+static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger)
126 {
127- struct davinci_gpio_regs __iomem *g = irq2regs(d->irq);
128- u32 mask = (u32) irq_data_get_irq_handler_data(d);
129+ struct davinci_gpio_controller *d;
130+ struct davinci_gpio_regs __iomem *g;
131+ struct davinci_soc_info *soc_info = &davinci_soc_info;
132+ u32 mask;
133+
134+ d = (struct davinci_gpio_controller *)data->handler_data;
135+ g = (struct davinci_gpio_regs __iomem *)d->regs;
136+ mask = __gpio_mask(data->irq - soc_info->gpio_irq);
137
138 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
139 return -EINVAL;
140@@ -400,8 +406,7 @@ static int __init davinci_gpio_irq_setup(void)
141 /* set the direct IRQs up to use that irqchip */
142 for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) {
143 irq_set_chip(irq, &gpio_irqchip_unbanked);
144- irq_set_handler_data(irq, (void *)__gpio_mask(gpio));
145- irq_set_chip_data(irq, (__force void *)g);
146+ irq_set_handler_data(irq, &chips[gpio / 32]);
147 irq_set_status_flags(irq, IRQ_TYPE_EDGE_BOTH);
148 }
149
150--
1511.7.9.4
152
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0117-gpio-davinci-fix-enabling-unbanked-GPIO-IRQs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0117-gpio-davinci-fix-enabling-unbanked-GPIO-IRQs.patch
new file mode 100644
index 00000000..2a1370e8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0117-gpio-davinci-fix-enabling-unbanked-GPIO-IRQs.patch
@@ -0,0 +1,65 @@
1From a61e7db31913671e7951ed217dc0012f8578c977 Mon Sep 17 00:00:00 2001
2From: Sekhar Nori <nsekhar@ti.com>
3Date: Sun, 11 Mar 2012 18:16:12 +0530
4Subject: [PATCH 117/147] gpio/davinci: fix enabling unbanked GPIO IRQs
5
6commit 81b279d80a63628e580c71a31d30a8c3b3047ad4 upstream.
7
8Unbanked GPIO IRQ handling code made a copy of just
9the irq_chip structure for GPIO IRQ lines which caused
10problems after the generic IRQ chip conversion because
11there was no valid irq_chip_type structure with the
12right "regs" populated. irq_gc_mask_set_bit() was
13therefore accessing random addresses.
14
15Fix it by making a copy of irq_chip_type structure
16instead. This will ensure sane register offsets.
17
18Reported-by: Jon Povey <Jon.Povey@racelogic.co.uk>
19Tested-by: Jon Povey <Jon.Povey@racelogic.co.uk>
20Signed-off-by: Sekhar Nori <nsekhar@ti.com>
21Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 drivers/gpio/gpio-davinci.c | 11 ++++++-----
25 1 file changed, 6 insertions(+), 5 deletions(-)
26
27diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
28index a6777e5..3d00016 100644
29--- a/drivers/gpio/gpio-davinci.c
30+++ b/drivers/gpio/gpio-davinci.c
31@@ -386,7 +386,7 @@ static int __init davinci_gpio_irq_setup(void)
32 * IRQ mux conflicts; gpio_irq_type_unbanked() is only for GPIOs.
33 */
34 if (soc_info->gpio_unbanked) {
35- static struct irq_chip gpio_irqchip_unbanked;
36+ static struct irq_chip_type gpio_unbanked;
37
38 /* pass "bank 0" GPIO IRQs to AINTC */
39 chips[0].chip.to_irq = gpio_to_irq_unbanked;
40@@ -394,9 +394,10 @@ static int __init davinci_gpio_irq_setup(void)
41
42 /* AINTC handles mask/unmask; GPIO handles triggering */
43 irq = bank_irq;
44- gpio_irqchip_unbanked = *irq_get_chip(irq);
45- gpio_irqchip_unbanked.name = "GPIO-AINTC";
46- gpio_irqchip_unbanked.irq_set_type = gpio_irq_type_unbanked;
47+ gpio_unbanked = *container_of(irq_get_chip(irq),
48+ struct irq_chip_type, chip);
49+ gpio_unbanked.chip.name = "GPIO-AINTC";
50+ gpio_unbanked.chip.irq_set_type = gpio_irq_type_unbanked;
51
52 /* default trigger: both edges */
53 g = gpio2regs(0);
54@@ -405,7 +406,7 @@ static int __init davinci_gpio_irq_setup(void)
55
56 /* set the direct IRQs up to use that irqchip */
57 for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) {
58- irq_set_chip(irq, &gpio_irqchip_unbanked);
59+ irq_set_chip(irq, &gpio_unbanked.chip);
60 irq_set_handler_data(irq, &chips[gpio / 32]);
61 irq_set_status_flags(irq, IRQ_TYPE_EDGE_BOTH);
62 }
63--
641.7.9.4
65
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0118-dm-crypt-fix-mempool-deadlock.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0118-dm-crypt-fix-mempool-deadlock.patch
new file mode 100644
index 00000000..3f335968
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0118-dm-crypt-fix-mempool-deadlock.patch
@@ -0,0 +1,65 @@
1From 27573d35b38cf9f8b2bb9f1f258bcac632ef4e0e Mon Sep 17 00:00:00 2001
2From: Mikulas Patocka <mpatocka@redhat.com>
3Date: Wed, 28 Mar 2012 18:41:22 +0100
4Subject: [PATCH 118/147] dm crypt: fix mempool deadlock
5
6commit aeb2deae2660a1773c83d3c6e9e6575daa3855d6 upstream.
7
8This patch fixes a possible deadlock in dm-crypt's mempool use.
9
10Currently, dm-crypt reserves a mempool of MIN_BIO_PAGES reserved pages.
11It allocates first MIN_BIO_PAGES with non-failing allocation (the allocation
12cannot fail and waits until the mempool is refilled). Further pages are
13allocated with different gfp flags that allow failing.
14
15Because allocations may be done in parallel, this code can deadlock. Example:
16There are two processes, each tries to allocate MIN_BIO_PAGES and the processes
17run simultaneously.
18It may end up in a situation where each process allocates (MIN_BIO_PAGES / 2)
19pages. The mempool is exhausted. Each process waits for more pages to be freed
20to the mempool, which never happens.
21
22To avoid this deadlock scenario, this patch changes the code so that only
23the first page is allocated with non-failing gfp mask. Allocation of further
24pages may fail.
25
26Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
27Signed-off-by: Milan Broz <mbroz@redhat.com>
28Signed-off-by: Alasdair G Kergon <agk@redhat.com>
29Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30---
31 drivers/md/dm-crypt.c | 10 ++++------
32 1 file changed, 4 insertions(+), 6 deletions(-)
33
34diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
35index 8c2a000..c75d947 100644
36--- a/drivers/md/dm-crypt.c
37+++ b/drivers/md/dm-crypt.c
38@@ -176,7 +176,6 @@ struct crypt_config {
39
40 #define MIN_IOS 16
41 #define MIN_POOL_PAGES 32
42-#define MIN_BIO_PAGES 8
43
44 static struct kmem_cache *_crypt_io_pool;
45
46@@ -848,12 +847,11 @@ static struct bio *crypt_alloc_buffer(struct dm_crypt_io *io, unsigned size,
47 }
48
49 /*
50- * if additional pages cannot be allocated without waiting,
51- * return a partially allocated bio, the caller will then try
52- * to allocate additional bios while submitting this partial bio
53+ * If additional pages cannot be allocated without waiting,
54+ * return a partially-allocated bio. The caller will then try
55+ * to allocate more bios while submitting this partial bio.
56 */
57- if (i == (MIN_BIO_PAGES - 1))
58- gfp_mask = (gfp_mask | __GFP_NOWARN) & ~__GFP_WAIT;
59+ gfp_mask = (gfp_mask | __GFP_NOWARN) & ~__GFP_WAIT;
60
61 len = (size > PAGE_SIZE) ? PAGE_SIZE : size;
62
63--
641.7.9.4
65
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0119-dm-crypt-add-missing-error-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0119-dm-crypt-add-missing-error-handling.patch
new file mode 100644
index 00000000..c2dfbf3c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0119-dm-crypt-add-missing-error-handling.patch
@@ -0,0 +1,116 @@
1From 94b46b475866eb637578cd9302cb047fea4be03b Mon Sep 17 00:00:00 2001
2From: Mikulas Patocka <mpatocka@redhat.com>
3Date: Wed, 28 Mar 2012 18:41:22 +0100
4Subject: [PATCH 119/147] dm crypt: add missing error handling
5
6commit 72c6e7afc43e19f68a31dea204fc366624d6eee9 upstream.
7
8Always set io->error to -EIO when an error is detected in dm-crypt.
9
10There were cases where an error code would be set only if we finish
11processing the last sector. If there were other encryption operations in
12flight, the error would be ignored and bio would be returned with
13success as if no error happened.
14
15This bug is present in kcryptd_crypt_write_convert, kcryptd_crypt_read_convert
16and kcryptd_async_done.
17
18Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
19Reviewed-by: Milan Broz <mbroz@redhat.com>
20Signed-off-by: Alasdair G Kergon <agk@redhat.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 drivers/md/dm-crypt.c | 28 ++++++++++++++++------------
24 1 file changed, 16 insertions(+), 12 deletions(-)
25
26diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
27index c75d947..58d8c6d 100644
28--- a/drivers/md/dm-crypt.c
29+++ b/drivers/md/dm-crypt.c
30@@ -1044,16 +1044,14 @@ static void kcryptd_queue_io(struct dm_crypt_io *io)
31 queue_work(cc->io_queue, &io->work);
32 }
33
34-static void kcryptd_crypt_write_io_submit(struct dm_crypt_io *io,
35- int error, int async)
36+static void kcryptd_crypt_write_io_submit(struct dm_crypt_io *io, int async)
37 {
38 struct bio *clone = io->ctx.bio_out;
39 struct crypt_config *cc = io->target->private;
40
41- if (unlikely(error < 0)) {
42+ if (unlikely(io->error < 0)) {
43 crypt_free_buffer_pages(cc, clone);
44 bio_put(clone);
45- io->error = -EIO;
46 crypt_dec_pending(io);
47 return;
48 }
49@@ -1104,12 +1102,16 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
50 sector += bio_sectors(clone);
51
52 crypt_inc_pending(io);
53+
54 r = crypt_convert(cc, &io->ctx);
55+ if (r < 0)
56+ io->error = -EIO;
57+
58 crypt_finished = atomic_dec_and_test(&io->ctx.pending);
59
60 /* Encryption was already finished, submit io now */
61 if (crypt_finished) {
62- kcryptd_crypt_write_io_submit(io, r, 0);
63+ kcryptd_crypt_write_io_submit(io, 0);
64
65 /*
66 * If there was an error, do not try next fragments.
67@@ -1160,11 +1162,8 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
68 crypt_dec_pending(io);
69 }
70
71-static void kcryptd_crypt_read_done(struct dm_crypt_io *io, int error)
72+static void kcryptd_crypt_read_done(struct dm_crypt_io *io)
73 {
74- if (unlikely(error < 0))
75- io->error = -EIO;
76-
77 crypt_dec_pending(io);
78 }
79
80@@ -1179,9 +1178,11 @@ static void kcryptd_crypt_read_convert(struct dm_crypt_io *io)
81 io->sector);
82
83 r = crypt_convert(cc, &io->ctx);
84+ if (r < 0)
85+ io->error = -EIO;
86
87 if (atomic_dec_and_test(&io->ctx.pending))
88- kcryptd_crypt_read_done(io, r);
89+ kcryptd_crypt_read_done(io);
90
91 crypt_dec_pending(io);
92 }
93@@ -1202,15 +1203,18 @@ static void kcryptd_async_done(struct crypto_async_request *async_req,
94 if (!error && cc->iv_gen_ops && cc->iv_gen_ops->post)
95 error = cc->iv_gen_ops->post(cc, iv_of_dmreq(cc, dmreq), dmreq);
96
97+ if (error < 0)
98+ io->error = -EIO;
99+
100 mempool_free(req_of_dmreq(cc, dmreq), cc->req_pool);
101
102 if (!atomic_dec_and_test(&ctx->pending))
103 return;
104
105 if (bio_data_dir(io->base_bio) == READ)
106- kcryptd_crypt_read_done(io, error);
107+ kcryptd_crypt_read_done(io);
108 else
109- kcryptd_crypt_write_io_submit(io, error, 1);
110+ kcryptd_crypt_write_io_submit(io, 1);
111 }
112
113 static void kcryptd_crypt(struct work_struct *work)
114--
1151.7.9.4
116
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0120-dm-exception-store-fix-init-error-path.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0120-dm-exception-store-fix-init-error-path.patch
new file mode 100644
index 00000000..5bb414b5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0120-dm-exception-store-fix-init-error-path.patch
@@ -0,0 +1,33 @@
1From 24d0229ad2f723a746bbc36919b87e15a239075f Mon Sep 17 00:00:00 2001
2From: Andrei Warkentin <andrey.warkentin@gmail.com>
3Date: Wed, 28 Mar 2012 18:41:22 +0100
4Subject: [PATCH 120/147] dm exception store: fix init error path
5
6commit aadbe266f2f89ccc68b52f4effc7b3a8b29521ef upstream.
7
8Call the correct exit function on failure in dm_exception_store_init.
9
10Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
11Acked-by: Mike Snitzer <snitzer@redhat.com>
12Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/md/dm-exception-store.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c
19index 042e719..aa70f7d 100644
20--- a/drivers/md/dm-exception-store.c
21+++ b/drivers/md/dm-exception-store.c
22@@ -283,7 +283,7 @@ int dm_exception_store_init(void)
23 return 0;
24
25 persistent_fail:
26- dm_persistent_snapshot_exit();
27+ dm_transient_snapshot_exit();
28 transient_fail:
29 return r;
30 }
31--
321.7.9.4
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0121-dm-persistent-data-fix-btree-rebalancing-after-remov.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0121-dm-persistent-data-fix-btree-rebalancing-after-remov.patch
new file mode 100644
index 00000000..f3931740
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0121-dm-persistent-data-fix-btree-rebalancing-after-remov.patch
@@ -0,0 +1,272 @@
1From 94c63ce73eda68e07380ef495c19c9f87f4655ba Mon Sep 17 00:00:00 2001
2From: Joe Thornber <ejt@redhat.com>
3Date: Wed, 28 Mar 2012 18:41:23 +0100
4Subject: [PATCH 121/147] dm persistent data: fix btree rebalancing after
5 remove
6
7commit b0988900bae9ecf968a8a8d086a9eec671a9517a upstream.
8
9When we remove an entry from a node we sometimes rebalance with it's
10two neighbours. This wasn't being done correctly; in some cases
11entries have to move all the way from the right neighbour to the left
12neighbour, or vice versa. This patch pretty much re-writes the
13balancing code to fix it.
14
15This code is barely used currently; only when you delete a thin
16device, and then only if you have hundreds of them in the same pool.
17Once we have discard support, which removes mappings, this will be used
18much more heavily.
19
20Signed-off-by: Joe Thornber <ejt@redhat.com>
21Signed-off-by: Mike Snitzer <snitzer@redhat.com>
22Signed-off-by: Alasdair G Kergon <agk@redhat.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 drivers/md/persistent-data/dm-btree-remove.c | 174 +++++++++++++++-----------
26 1 file changed, 99 insertions(+), 75 deletions(-)
27
28diff --git a/drivers/md/persistent-data/dm-btree-remove.c b/drivers/md/persistent-data/dm-btree-remove.c
29index 023fbc2..1a35caf 100644
30--- a/drivers/md/persistent-data/dm-btree-remove.c
31+++ b/drivers/md/persistent-data/dm-btree-remove.c
32@@ -128,18 +128,9 @@ static void delete_at(struct node *n, unsigned index)
33 n->header.nr_entries = cpu_to_le32(nr_entries - 1);
34 }
35
36-static unsigned del_threshold(struct node *n)
37-{
38- return le32_to_cpu(n->header.max_entries) / 3;
39-}
40-
41 static unsigned merge_threshold(struct node *n)
42 {
43- /*
44- * The extra one is because we know we're potentially going to
45- * delete an entry.
46- */
47- return 2 * (le32_to_cpu(n->header.max_entries) / 3) + 1;
48+ return le32_to_cpu(n->header.max_entries) / 3;
49 }
50
51 struct child {
52@@ -188,6 +179,15 @@ static int exit_child(struct dm_btree_info *info, struct child *c)
53
54 static void shift(struct node *left, struct node *right, int count)
55 {
56+ uint32_t nr_left = le32_to_cpu(left->header.nr_entries);
57+ uint32_t nr_right = le32_to_cpu(right->header.nr_entries);
58+ uint32_t max_entries = le32_to_cpu(left->header.max_entries);
59+ uint32_t r_max_entries = le32_to_cpu(right->header.max_entries);
60+
61+ BUG_ON(max_entries != r_max_entries);
62+ BUG_ON(nr_left - count > max_entries);
63+ BUG_ON(nr_right + count > max_entries);
64+
65 if (!count)
66 return;
67
68@@ -199,13 +199,8 @@ static void shift(struct node *left, struct node *right, int count)
69 node_shift(right, count);
70 }
71
72- left->header.nr_entries =
73- cpu_to_le32(le32_to_cpu(left->header.nr_entries) - count);
74- BUG_ON(le32_to_cpu(left->header.nr_entries) > le32_to_cpu(left->header.max_entries));
75-
76- right->header.nr_entries =
77- cpu_to_le32(le32_to_cpu(right->header.nr_entries) + count);
78- BUG_ON(le32_to_cpu(right->header.nr_entries) > le32_to_cpu(right->header.max_entries));
79+ left->header.nr_entries = cpu_to_le32(nr_left - count);
80+ right->header.nr_entries = cpu_to_le32(nr_right + count);
81 }
82
83 static void __rebalance2(struct dm_btree_info *info, struct node *parent,
84@@ -215,8 +210,9 @@ static void __rebalance2(struct dm_btree_info *info, struct node *parent,
85 struct node *right = r->n;
86 uint32_t nr_left = le32_to_cpu(left->header.nr_entries);
87 uint32_t nr_right = le32_to_cpu(right->header.nr_entries);
88+ unsigned threshold = 2 * merge_threshold(left) + 1;
89
90- if (nr_left + nr_right <= merge_threshold(left)) {
91+ if (nr_left + nr_right < threshold) {
92 /*
93 * Merge
94 */
95@@ -234,9 +230,6 @@ static void __rebalance2(struct dm_btree_info *info, struct node *parent,
96 * Rebalance.
97 */
98 unsigned target_left = (nr_left + nr_right) / 2;
99- unsigned shift_ = nr_left - target_left;
100- BUG_ON(le32_to_cpu(left->header.max_entries) <= nr_left - shift_);
101- BUG_ON(le32_to_cpu(right->header.max_entries) <= nr_right + shift_);
102 shift(left, right, nr_left - target_left);
103 *key_ptr(parent, r->index) = right->keys[0];
104 }
105@@ -272,6 +265,84 @@ static int rebalance2(struct shadow_spine *s, struct dm_btree_info *info,
106 return exit_child(info, &right);
107 }
108
109+/*
110+ * We dump as many entries from center as possible into left, then the rest
111+ * in right, then rebalance2. This wastes some cpu, but I want something
112+ * simple atm.
113+ */
114+static void delete_center_node(struct dm_btree_info *info, struct node *parent,
115+ struct child *l, struct child *c, struct child *r,
116+ struct node *left, struct node *center, struct node *right,
117+ uint32_t nr_left, uint32_t nr_center, uint32_t nr_right)
118+{
119+ uint32_t max_entries = le32_to_cpu(left->header.max_entries);
120+ unsigned shift = min(max_entries - nr_left, nr_center);
121+
122+ BUG_ON(nr_left + shift > max_entries);
123+ node_copy(left, center, -shift);
124+ left->header.nr_entries = cpu_to_le32(nr_left + shift);
125+
126+ if (shift != nr_center) {
127+ shift = nr_center - shift;
128+ BUG_ON((nr_right + shift) > max_entries);
129+ node_shift(right, shift);
130+ node_copy(center, right, shift);
131+ right->header.nr_entries = cpu_to_le32(nr_right + shift);
132+ }
133+ *key_ptr(parent, r->index) = right->keys[0];
134+
135+ delete_at(parent, c->index);
136+ r->index--;
137+
138+ dm_tm_dec(info->tm, dm_block_location(c->block));
139+ __rebalance2(info, parent, l, r);
140+}
141+
142+/*
143+ * Redistributes entries among 3 sibling nodes.
144+ */
145+static void redistribute3(struct dm_btree_info *info, struct node *parent,
146+ struct child *l, struct child *c, struct child *r,
147+ struct node *left, struct node *center, struct node *right,
148+ uint32_t nr_left, uint32_t nr_center, uint32_t nr_right)
149+{
150+ int s;
151+ uint32_t max_entries = le32_to_cpu(left->header.max_entries);
152+ unsigned target = (nr_left + nr_center + nr_right) / 3;
153+ BUG_ON(target > max_entries);
154+
155+ if (nr_left < nr_right) {
156+ s = nr_left - target;
157+
158+ if (s < 0 && nr_center < -s) {
159+ /* not enough in central node */
160+ shift(left, center, nr_center);
161+ s = nr_center - target;
162+ shift(left, right, s);
163+ nr_right += s;
164+ } else
165+ shift(left, center, s);
166+
167+ shift(center, right, target - nr_right);
168+
169+ } else {
170+ s = target - nr_right;
171+ if (s > 0 && nr_center < s) {
172+ /* not enough in central node */
173+ shift(center, right, nr_center);
174+ s = target - nr_center;
175+ shift(left, right, s);
176+ nr_left -= s;
177+ } else
178+ shift(center, right, s);
179+
180+ shift(left, center, nr_left - target);
181+ }
182+
183+ *key_ptr(parent, c->index) = center->keys[0];
184+ *key_ptr(parent, r->index) = right->keys[0];
185+}
186+
187 static void __rebalance3(struct dm_btree_info *info, struct node *parent,
188 struct child *l, struct child *c, struct child *r)
189 {
190@@ -282,62 +353,18 @@ static void __rebalance3(struct dm_btree_info *info, struct node *parent,
191 uint32_t nr_left = le32_to_cpu(left->header.nr_entries);
192 uint32_t nr_center = le32_to_cpu(center->header.nr_entries);
193 uint32_t nr_right = le32_to_cpu(right->header.nr_entries);
194- uint32_t max_entries = le32_to_cpu(left->header.max_entries);
195
196- unsigned target;
197+ unsigned threshold = merge_threshold(left) * 4 + 1;
198
199 BUG_ON(left->header.max_entries != center->header.max_entries);
200 BUG_ON(center->header.max_entries != right->header.max_entries);
201
202- if (((nr_left + nr_center + nr_right) / 2) < merge_threshold(center)) {
203- /*
204- * Delete center node:
205- *
206- * We dump as many entries from center as possible into
207- * left, then the rest in right, then rebalance2. This
208- * wastes some cpu, but I want something simple atm.
209- */
210- unsigned shift = min(max_entries - nr_left, nr_center);
211-
212- BUG_ON(nr_left + shift > max_entries);
213- node_copy(left, center, -shift);
214- left->header.nr_entries = cpu_to_le32(nr_left + shift);
215-
216- if (shift != nr_center) {
217- shift = nr_center - shift;
218- BUG_ON((nr_right + shift) >= max_entries);
219- node_shift(right, shift);
220- node_copy(center, right, shift);
221- right->header.nr_entries = cpu_to_le32(nr_right + shift);
222- }
223- *key_ptr(parent, r->index) = right->keys[0];
224-
225- delete_at(parent, c->index);
226- r->index--;
227-
228- dm_tm_dec(info->tm, dm_block_location(c->block));
229- __rebalance2(info, parent, l, r);
230-
231- return;
232- }
233-
234- /*
235- * Rebalance
236- */
237- target = (nr_left + nr_center + nr_right) / 3;
238- BUG_ON(target > max_entries);
239-
240- /*
241- * Adjust the left node
242- */
243- shift(left, center, nr_left - target);
244-
245- /*
246- * Adjust the right node
247- */
248- shift(center, right, target - nr_right);
249- *key_ptr(parent, c->index) = center->keys[0];
250- *key_ptr(parent, r->index) = right->keys[0];
251+ if ((nr_left + nr_center + nr_right) < threshold)
252+ delete_center_node(info, parent, l, c, r, left, center, right,
253+ nr_left, nr_center, nr_right);
254+ else
255+ redistribute3(info, parent, l, c, r, left, center, right,
256+ nr_left, nr_center, nr_right);
257 }
258
259 static int rebalance3(struct shadow_spine *s, struct dm_btree_info *info,
260@@ -441,9 +468,6 @@ static int rebalance_children(struct shadow_spine *s,
261 if (r)
262 return r;
263
264- if (child_entries > del_threshold(n))
265- return 0;
266-
267 has_left_sibling = i > 0;
268 has_right_sibling = i < (le32_to_cpu(n->header.nr_entries) - 1);
269
270--
2711.7.9.4
272
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0122-dm-thin-fix-stacked-bi_next-usage.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0122-dm-thin-fix-stacked-bi_next-usage.patch
new file mode 100644
index 00000000..4d9f54d3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0122-dm-thin-fix-stacked-bi_next-usage.patch
@@ -0,0 +1,233 @@
1From e2326264ad383c7611301ccad5f1cb1f90d87f8f Mon Sep 17 00:00:00 2001
2From: Joe Thornber <ejt@redhat.com>
3Date: Wed, 28 Mar 2012 18:41:23 +0100
4Subject: [PATCH 122/147] dm thin: fix stacked bi_next usage
5
6commit 6f94a4c45a6f744383f9f695dde019998db3df55 upstream.
7
8Avoid using the bi_next field for the holder of a cell when deferring
9bios because a stacked device below might change it. Store the
10holder in a new field in struct cell instead.
11
12When a cell is created, the bio that triggered creation (the holder) was
13added to the same bio list as subsequent bios. In some cases we pass
14this holder bio directly to devices underneath. If those devices use
15the bi_next field there will be trouble...
16
17This also simplifies some code that had to work out which bio was the
18holder.
19
20Signed-off-by: Joe Thornber <ejt@redhat.com>
21Signed-off-by: Mike Snitzer <snitzer@redhat.com>
22Signed-off-by: Alasdair G Kergon <agk@redhat.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 drivers/md/dm-thin.c | 124 +++++++++++++++++++++++++++++---------------------
26 1 file changed, 73 insertions(+), 51 deletions(-)
27
28diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
29index c308757..da2f021 100644
30--- a/drivers/md/dm-thin.c
31+++ b/drivers/md/dm-thin.c
32@@ -124,7 +124,7 @@ struct cell {
33 struct hlist_node list;
34 struct bio_prison *prison;
35 struct cell_key key;
36- unsigned count;
37+ struct bio *holder;
38 struct bio_list bios;
39 };
40
41@@ -220,55 +220,60 @@ static struct cell *__search_bucket(struct hlist_head *bucket,
42 * This may block if a new cell needs allocating. You must ensure that
43 * cells will be unlocked even if the calling thread is blocked.
44 *
45- * Returns the number of entries in the cell prior to the new addition
46- * or < 0 on failure.
47+ * Returns 1 if the cell was already held, 0 if @inmate is the new holder.
48 */
49 static int bio_detain(struct bio_prison *prison, struct cell_key *key,
50 struct bio *inmate, struct cell **ref)
51 {
52- int r;
53+ int r = 1;
54 unsigned long flags;
55 uint32_t hash = hash_key(prison, key);
56- struct cell *uninitialized_var(cell), *cell2 = NULL;
57+ struct cell *cell, *cell2;
58
59 BUG_ON(hash > prison->nr_buckets);
60
61 spin_lock_irqsave(&prison->lock, flags);
62+
63 cell = __search_bucket(prison->cells + hash, key);
64+ if (cell) {
65+ bio_list_add(&cell->bios, inmate);
66+ goto out;
67+ }
68
69- if (!cell) {
70- /*
71- * Allocate a new cell
72- */
73- spin_unlock_irqrestore(&prison->lock, flags);
74- cell2 = mempool_alloc(prison->cell_pool, GFP_NOIO);
75- spin_lock_irqsave(&prison->lock, flags);
76+ /*
77+ * Allocate a new cell
78+ */
79+ spin_unlock_irqrestore(&prison->lock, flags);
80+ cell2 = mempool_alloc(prison->cell_pool, GFP_NOIO);
81+ spin_lock_irqsave(&prison->lock, flags);
82
83- /*
84- * We've been unlocked, so we have to double check that
85- * nobody else has inserted this cell in the meantime.
86- */
87- cell = __search_bucket(prison->cells + hash, key);
88+ /*
89+ * We've been unlocked, so we have to double check that
90+ * nobody else has inserted this cell in the meantime.
91+ */
92+ cell = __search_bucket(prison->cells + hash, key);
93+ if (cell) {
94+ mempool_free(cell2, prison->cell_pool);
95+ bio_list_add(&cell->bios, inmate);
96+ goto out;
97+ }
98+
99+ /*
100+ * Use new cell.
101+ */
102+ cell = cell2;
103
104- if (!cell) {
105- cell = cell2;
106- cell2 = NULL;
107+ cell->prison = prison;
108+ memcpy(&cell->key, key, sizeof(cell->key));
109+ cell->holder = inmate;
110+ bio_list_init(&cell->bios);
111+ hlist_add_head(&cell->list, prison->cells + hash);
112
113- cell->prison = prison;
114- memcpy(&cell->key, key, sizeof(cell->key));
115- cell->count = 0;
116- bio_list_init(&cell->bios);
117- hlist_add_head(&cell->list, prison->cells + hash);
118- }
119- }
120+ r = 0;
121
122- r = cell->count++;
123- bio_list_add(&cell->bios, inmate);
124+out:
125 spin_unlock_irqrestore(&prison->lock, flags);
126
127- if (cell2)
128- mempool_free(cell2, prison->cell_pool);
129-
130 *ref = cell;
131
132 return r;
133@@ -283,8 +288,8 @@ static void __cell_release(struct cell *cell, struct bio_list *inmates)
134
135 hlist_del(&cell->list);
136
137- if (inmates)
138- bio_list_merge(inmates, &cell->bios);
139+ bio_list_add(inmates, cell->holder);
140+ bio_list_merge(inmates, &cell->bios);
141
142 mempool_free(cell, prison->cell_pool);
143 }
144@@ -305,22 +310,44 @@ static void cell_release(struct cell *cell, struct bio_list *bios)
145 * bio may be in the cell. This function releases the cell, and also does
146 * a sanity check.
147 */
148+static void __cell_release_singleton(struct cell *cell, struct bio *bio)
149+{
150+ hlist_del(&cell->list);
151+ BUG_ON(cell->holder != bio);
152+ BUG_ON(!bio_list_empty(&cell->bios));
153+}
154+
155 static void cell_release_singleton(struct cell *cell, struct bio *bio)
156 {
157- struct bio_prison *prison = cell->prison;
158- struct bio_list bios;
159- struct bio *b;
160 unsigned long flags;
161-
162- bio_list_init(&bios);
163+ struct bio_prison *prison = cell->prison;
164
165 spin_lock_irqsave(&prison->lock, flags);
166- __cell_release(cell, &bios);
167+ __cell_release_singleton(cell, bio);
168 spin_unlock_irqrestore(&prison->lock, flags);
169+}
170+
171+/*
172+ * Sometimes we don't want the holder, just the additional bios.
173+ */
174+static void __cell_release_no_holder(struct cell *cell, struct bio_list *inmates)
175+{
176+ struct bio_prison *prison = cell->prison;
177
178- b = bio_list_pop(&bios);
179- BUG_ON(b != bio);
180- BUG_ON(!bio_list_empty(&bios));
181+ hlist_del(&cell->list);
182+ bio_list_merge(inmates, &cell->bios);
183+
184+ mempool_free(cell, prison->cell_pool);
185+}
186+
187+static void cell_release_no_holder(struct cell *cell, struct bio_list *inmates)
188+{
189+ unsigned long flags;
190+ struct bio_prison *prison = cell->prison;
191+
192+ spin_lock_irqsave(&prison->lock, flags);
193+ __cell_release_no_holder(cell, inmates);
194+ spin_unlock_irqrestore(&prison->lock, flags);
195 }
196
197 static void cell_error(struct cell *cell)
198@@ -800,21 +827,16 @@ static void cell_defer(struct thin_c *tc, struct cell *cell,
199 * Same as cell_defer above, except it omits one particular detainee,
200 * a write bio that covers the block and has already been processed.
201 */
202-static void cell_defer_except(struct thin_c *tc, struct cell *cell,
203- struct bio *exception)
204+static void cell_defer_except(struct thin_c *tc, struct cell *cell)
205 {
206 struct bio_list bios;
207- struct bio *bio;
208 struct pool *pool = tc->pool;
209 unsigned long flags;
210
211 bio_list_init(&bios);
212- cell_release(cell, &bios);
213
214 spin_lock_irqsave(&pool->lock, flags);
215- while ((bio = bio_list_pop(&bios)))
216- if (bio != exception)
217- bio_list_add(&pool->deferred_bios, bio);
218+ cell_release_no_holder(cell, &pool->deferred_bios);
219 spin_unlock_irqrestore(&pool->lock, flags);
220
221 wake_worker(pool);
222@@ -854,7 +876,7 @@ static void process_prepared_mapping(struct new_mapping *m)
223 * the bios in the cell.
224 */
225 if (bio) {
226- cell_defer_except(tc, m->cell, bio);
227+ cell_defer_except(tc, m->cell);
228 bio_endio(bio, 0);
229 } else
230 cell_defer(tc, m->cell, m->data_block);
231--
2321.7.9.4
233
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0123-backlight-fix-typo-in-tosa_lcd.c.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0123-backlight-fix-typo-in-tosa_lcd.c.patch
new file mode 100644
index 00000000..2f369f77
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0123-backlight-fix-typo-in-tosa_lcd.c.patch
@@ -0,0 +1,34 @@
1From 97f236081bafdb80cac73ef005a6df79d4b2c803 Mon Sep 17 00:00:00 2001
2From: Masanari Iida <standby24x7@gmail.com>
3Date: Wed, 28 Mar 2012 14:42:56 -0700
4Subject: [PATCH 123/147] backlight: fix typo in tosa_lcd.c
5
6commit 8da00edc1069f01c34510fa405dc15d96c090a3f upstream.
7
8Fix typo in drivers/video/backlight/tosa_lcd.c
9"tosa_lcd_reume" should be "tosa_lcd_resume".
10
11Signed-off-by: Masanari Iida <standby24x7@gmail.com>
12Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/video/backlight/tosa_lcd.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c
20index 772f601..6f54f74 100644
21--- a/drivers/video/backlight/tosa_lcd.c
22+++ b/drivers/video/backlight/tosa_lcd.c
23@@ -271,7 +271,7 @@ static int tosa_lcd_resume(struct spi_device *spi)
24 }
25 #else
26 #define tosa_lcd_suspend NULL
27-#define tosa_lcd_reume NULL
28+#define tosa_lcd_resume NULL
29 #endif
30
31 static struct spi_driver tosa_lcd_driver = {
32--
331.7.9.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0124-xfs-Fix-oops-on-IO-error-during-xlog_recover_process.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0124-xfs-Fix-oops-on-IO-error-during-xlog_recover_process.patch
new file mode 100644
index 00000000..85a6e214
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0124-xfs-Fix-oops-on-IO-error-during-xlog_recover_process.patch
@@ -0,0 +1,84 @@
1From 2b91e04fb1c28cce172844b2519c4bbedd9849c2 Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Thu, 15 Mar 2012 09:34:02 +0000
4Subject: [PATCH 124/147] xfs: Fix oops on IO error during
5 xlog_recover_process_iunlinks()
6
7commit d97d32edcd732110758799ae60af725e5110b3dc upstream.
8
9When an IO error happens during inode deletion run from
10xlog_recover_process_iunlinks() filesystem gets shutdown. Thus any subsequent
11attempt to read buffers fails. Code in xlog_recover_process_iunlinks() does not
12count with the fact that read of a buffer which was read a while ago can
13really fail which results in the oops on
14 agi = XFS_BUF_TO_AGI(agibp);
15
16Fix the problem by cleaning up the buffer handling in
17xlog_recover_process_iunlinks() as suggested by Dave Chinner. We release buffer
18lock but keep buffer reference to AG buffer. That is enough for buffer to stay
19pinned in memory and we don't have to call xfs_read_agi() all the time.
20
21Signed-off-by: Jan Kara <jack@suse.cz>
22Reviewed-by: Dave Chinner <dchinner@redhat.com>
23Signed-off-by: Ben Myers <bpm@sgi.com>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 fs/xfs/xfs_log_recover.c | 33 +++++++++++----------------------
27 1 file changed, 11 insertions(+), 22 deletions(-)
28
29diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
30index 541a508..4f5d0ce 100644
31--- a/fs/xfs/xfs_log_recover.c
32+++ b/fs/xfs/xfs_log_recover.c
33@@ -3161,37 +3161,26 @@ xlog_recover_process_iunlinks(
34 */
35 continue;
36 }
37+ /*
38+ * Unlock the buffer so that it can be acquired in the normal
39+ * course of the transaction to truncate and free each inode.
40+ * Because we are not racing with anyone else here for the AGI
41+ * buffer, we don't even need to hold it locked to read the
42+ * initial unlinked bucket entries out of the buffer. We keep
43+ * buffer reference though, so that it stays pinned in memory
44+ * while we need the buffer.
45+ */
46 agi = XFS_BUF_TO_AGI(agibp);
47+ xfs_buf_unlock(agibp);
48
49 for (bucket = 0; bucket < XFS_AGI_UNLINKED_BUCKETS; bucket++) {
50 agino = be32_to_cpu(agi->agi_unlinked[bucket]);
51 while (agino != NULLAGINO) {
52- /*
53- * Release the agi buffer so that it can
54- * be acquired in the normal course of the
55- * transaction to truncate and free the inode.
56- */
57- xfs_buf_relse(agibp);
58-
59 agino = xlog_recover_process_one_iunlink(mp,
60 agno, agino, bucket);
61-
62- /*
63- * Reacquire the agibuffer and continue around
64- * the loop. This should never fail as we know
65- * the buffer was good earlier on.
66- */
67- error = xfs_read_agi(mp, NULL, agno, &agibp);
68- ASSERT(error == 0);
69- agi = XFS_BUF_TO_AGI(agibp);
70 }
71 }
72-
73- /*
74- * Release the buffer for the current agi so we can
75- * go on to the next one.
76- */
77- xfs_buf_relse(agibp);
78+ xfs_buf_rele(agibp);
79 }
80
81 mp->m_dmevmask = mp_dmevmask;
82--
831.7.9.4
84
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0125-slub-Do-not-hold-slub_lock-when-calling-sysfs_slab_a.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0125-slub-Do-not-hold-slub_lock-when-calling-sysfs_slab_a.patch
new file mode 100644
index 00000000..325ae731
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0125-slub-Do-not-hold-slub_lock-when-calling-sysfs_slab_a.patch
@@ -0,0 +1,51 @@
1From 4e25692d8b794add23cb09fdeeaa62ecee2ef697 Mon Sep 17 00:00:00 2001
2From: Christoph Lameter <cl@linux.com>
3Date: Tue, 17 Jan 2012 09:27:31 -0600
4Subject: [PATCH 125/147] slub: Do not hold slub_lock when calling
5 sysfs_slab_add()
6
7commit 66c4c35c6bc5a1a452b024cf0364635b28fd94e4 upstream.
8
9sysfs_slab_add() calls various sysfs functions that actually may
10end up in userspace doing all sorts of things.
11
12Release the slub_lock after adding the kmem_cache structure to the list.
13At that point the address of the kmem_cache is not known so we are
14guaranteed exlusive access to the following modifications to the
15kmem_cache structure.
16
17If the sysfs_slab_add fails then reacquire the slub_lock to
18remove the kmem_cache structure from the list.
19
20Reported-by: Sasha Levin <levinsasha928@gmail.com>
21Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
22Signed-off-by: Christoph Lameter <cl@linux.com>
23Signed-off-by: Pekka Enberg <penberg@kernel.org>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 mm/slub.c | 3 ++-
27 1 file changed, 2 insertions(+), 1 deletion(-)
28
29diff --git a/mm/slub.c b/mm/slub.c
30index 1a919f0..a99c785 100644
31--- a/mm/slub.c
32+++ b/mm/slub.c
33@@ -3911,13 +3911,14 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
34 if (kmem_cache_open(s, n,
35 size, align, flags, ctor)) {
36 list_add(&s->list, &slab_caches);
37+ up_write(&slub_lock);
38 if (sysfs_slab_add(s)) {
39+ down_write(&slub_lock);
40 list_del(&s->list);
41 kfree(n);
42 kfree(s);
43 goto err;
44 }
45- up_write(&slub_lock);
46 return s;
47 }
48 kfree(n);
49--
501.7.9.4
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0126-NFSv4-Fix-two-infinite-loops-in-the-mount-code.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0126-NFSv4-Fix-two-infinite-loops-in-the-mount-code.patch
new file mode 100644
index 00000000..dd7fa83f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0126-NFSv4-Fix-two-infinite-loops-in-the-mount-code.patch
@@ -0,0 +1,54 @@
1From a92e847768f32d7059094c15ce686019b91893ab Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Tue, 27 Mar 2012 18:13:02 -0400
4Subject: [PATCH 126/147] NFSv4: Fix two infinite loops in the mount code
5
6commit 05e9cfb408b24debb3a85fd98edbfd09dd148881 upstream.
7
8We can currently loop forever in nfs4_lookup_root() and in
9nfs41_proc_secinfo_no_name(), if the first iteration returns a
10NFS4ERR_DELAY or something else that causes exception.retry to get
11set.
12
13Reported-by: Weston Andros Adamson <dros@netapp.com>
14Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 fs/nfs/nfs4proc.c | 6 ++++--
18 1 file changed, 4 insertions(+), 2 deletions(-)
19
20diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
21index c9e2d9e..6db0972 100644
22--- a/fs/nfs/nfs4proc.c
23+++ b/fs/nfs/nfs4proc.c
24@@ -2242,11 +2242,12 @@ static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
25 switch (err) {
26 case 0:
27 case -NFS4ERR_WRONGSEC:
28- break;
29+ goto out;
30 default:
31 err = nfs4_handle_exception(server, err, &exception);
32 }
33 } while (exception.retry);
34+out:
35 return err;
36 }
37
38@@ -6099,11 +6100,12 @@ nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
39 case 0:
40 case -NFS4ERR_WRONGSEC:
41 case -NFS4ERR_NOTSUPP:
42- break;
43+ goto out;
44 default:
45 err = nfs4_handle_exception(server, err, &exception);
46 }
47 } while (exception.retry);
48+out:
49 return err;
50 }
51
52--
531.7.9.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0127-NFSv4.1-Fix-layoutcommit-error-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0127-NFSv4.1-Fix-layoutcommit-error-handling.patch
new file mode 100644
index 00000000..2f1e88a4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0127-NFSv4.1-Fix-layoutcommit-error-handling.patch
@@ -0,0 +1,61 @@
1From ccd03bf68f47d089dc1c789ea11a19792e056fdf Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Tue, 27 Mar 2012 18:22:19 -0400
4Subject: [PATCH 127/147] NFSv4.1: Fix layoutcommit error handling
5
6commit e59d27e05a6435f8c04d5ad843f37fa795f2eaaa upstream.
7
8Firstly, task->tk_status will always return negative error values,
9so the current tests for 'NFS4ERR_DELEG_REVOKED' etc. are all being
10ignored.
11Secondly, clean up the code so that we only need to test
12task->tk_status once!
13
14Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 fs/nfs/nfs4proc.c | 25 +++++++++++++------------
18 1 file changed, 13 insertions(+), 12 deletions(-)
19
20diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
21index 6db0972..d945700 100644
22--- a/fs/nfs/nfs4proc.c
23+++ b/fs/nfs/nfs4proc.c
24@@ -5983,21 +5983,22 @@ nfs4_layoutcommit_done(struct rpc_task *task, void *calldata)
25 return;
26
27 switch (task->tk_status) { /* Just ignore these failures */
28- case NFS4ERR_DELEG_REVOKED: /* layout was recalled */
29- case NFS4ERR_BADIOMODE: /* no IOMODE_RW layout for range */
30- case NFS4ERR_BADLAYOUT: /* no layout */
31- case NFS4ERR_GRACE: /* loca_recalim always false */
32+ case -NFS4ERR_DELEG_REVOKED: /* layout was recalled */
33+ case -NFS4ERR_BADIOMODE: /* no IOMODE_RW layout for range */
34+ case -NFS4ERR_BADLAYOUT: /* no layout */
35+ case -NFS4ERR_GRACE: /* loca_recalim always false */
36 task->tk_status = 0;
37- }
38-
39- if (nfs4_async_handle_error(task, server, NULL) == -EAGAIN) {
40- rpc_restart_call_prepare(task);
41- return;
42- }
43-
44- if (task->tk_status == 0)
45+ break;
46+ case 0:
47 nfs_post_op_update_inode_force_wcc(data->args.inode,
48 data->res.fattr);
49+ break;
50+ default:
51+ if (nfs4_async_handle_error(task, server, NULL) == -EAGAIN) {
52+ rpc_restart_call_prepare(task);
53+ return;
54+ }
55+ }
56 }
57
58 static void nfs4_layoutcommit_release(void *calldata)
59--
601.7.9.4
61
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0128-module-Remove-module-size-limit.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0128-module-Remove-module-size-limit.patch
new file mode 100644
index 00000000..09a8b51b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0128-module-Remove-module-size-limit.patch
@@ -0,0 +1,38 @@
1From fd3597c3facb39143261c34964aabfc9c66c4fdf Mon Sep 17 00:00:00 2001
2From: Sasha Levin <levinsasha928@gmail.com>
3Date: Mon, 30 Jan 2012 23:07:22 -0500
4Subject: [PATCH 128/147] module: Remove module size limit
5
6commit f946eeb9313ff1470758e171a60fe7438a2ded3f upstream.
7
8Module size was limited to 64MB, this was legacy limitation due to vmalloc()
9which was removed a while ago.
10
11Limiting module size to 64MB is both pointless and affects real world use
12cases.
13
14Cc: Tim Abbott <tim.abbott@oracle.com>
15Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
16Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 kernel/module.c | 3 +--
20 1 file changed, 1 insertion(+), 2 deletions(-)
21
22diff --git a/kernel/module.c b/kernel/module.c
23index 178333c..6969ef0 100644
24--- a/kernel/module.c
25+++ b/kernel/module.c
26@@ -2341,8 +2341,7 @@ static int copy_and_check(struct load_info *info,
27 return -ENOEXEC;
28
29 /* Suck in entire file: we'll want most of it. */
30- /* vmalloc barfs on "unusual" numbers. Check here */
31- if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL)
32+ if ((hdr = vmalloc(len)) == NULL)
33 return -ENOMEM;
34
35 if (copy_from_user(hdr, umod, len) != 0) {
36--
371.7.9.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0129-Bluetooth-btusb-fix-bInterval-for-high-super-speed-i.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0129-Bluetooth-btusb-fix-bInterval-for-high-super-speed-i.patch
new file mode 100644
index 00000000..2aae62b6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0129-Bluetooth-btusb-fix-bInterval-for-high-super-speed-i.patch
@@ -0,0 +1,47 @@
1From 7c62cb0eff8ac7154b41d4b010c18e1a92e1bf8e Mon Sep 17 00:00:00 2001
2From: Bing Zhao <bzhao@marvell.com>
3Date: Tue, 20 Dec 2011 18:19:00 -0800
4Subject: [PATCH 129/147] Bluetooth: btusb: fix bInterval for high/super speed
5 isochronous endpoints
6
7commit fa0fb93f2ac308a76fa64eb57c18511dadf97089 upstream.
8
9For high-speed/super-speed isochronous endpoints, the bInterval
10value is used as exponent, 2^(bInterval-1). Luckily we have
11usb_fill_int_urb() function that handles it correctly. So we just
12call this function to fill in the RX URB.
13
14Cc: Marcel Holtmann <marcel@holtmann.org>
15Signed-off-by: Bing Zhao <bzhao@marvell.com>
16Acked-by: Marcel Holtmann <marcel@holtmann.org>
17Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/bluetooth/btusb.c | 9 ++-------
21 1 file changed, 2 insertions(+), 7 deletions(-)
22
23diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
24index 11a925c..c16c750 100644
25--- a/drivers/bluetooth/btusb.c
26+++ b/drivers/bluetooth/btusb.c
27@@ -507,15 +507,10 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags)
28
29 pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress);
30
31- urb->dev = data->udev;
32- urb->pipe = pipe;
33- urb->context = hdev;
34- urb->complete = btusb_isoc_complete;
35- urb->interval = data->isoc_rx_ep->bInterval;
36+ usb_fill_int_urb(urb, data->udev, pipe, buf, size, btusb_isoc_complete,
37+ hdev, data->isoc_rx_ep->bInterval);
38
39 urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP;
40- urb->transfer_buffer = buf;
41- urb->transfer_buffer_length = size;
42
43 __fill_isoc_descriptor(urb, size,
44 le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize));
45--
461.7.9.4
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0130-drm-i915-suspend-fbdev-device-around-suspend-hiberna.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0130-drm-i915-suspend-fbdev-device-around-suspend-hiberna.patch
new file mode 100644
index 00000000..f224abe2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0130-drm-i915-suspend-fbdev-device-around-suspend-hiberna.patch
@@ -0,0 +1,95 @@
1From 38c2bda521b456704bd7b7376e79d69b0e867198 Mon Sep 17 00:00:00 2001
2From: Dave Airlie <airlied@redhat.com>
3Date: Wed, 28 Mar 2012 10:48:49 +0100
4Subject: [PATCH 130/147] drm/i915: suspend fbdev device around
5 suspend/hibernate
6
7commit 3fa016a0b5c5237e9c387fc3249592b2cb5391c6 upstream.
8
9Looking at hibernate overwriting I though it looked like a cursor,
10so I tracked down this missing piece to stop the cursor blink
11timer. I've no idea if this is sufficient to fix the hibernate
12problems people are seeing, but please test it.
13
14Both radeon and nouveau have done this for a long time.
15
16I've run this personally all night hib/resume cycles with no fails.
17
18Reviewed-by: Keith Packard <keithp@keithp.com>
19Reported-by: Petr Tesarik <kernel@tesarici.cz>
20Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
21Reported-by: Lots of misc segfaults after hibernate across the world.
22Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=37142
23Tested-by: Dave Airlie <airlied@redhat.com>
24Tested-by: Bojan Smojver <bojan@rexursive.com>
25Tested-by: Andreas Hartmann <andihartmann@01019freenet.de>
26Signed-off-by: Dave Airlie <airlied@redhat.com>
27Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28---
29 drivers/gpu/drm/i915/i915_drv.c | 7 +++++++
30 drivers/gpu/drm/i915/intel_drv.h | 2 +-
31 drivers/gpu/drm/i915/intel_fb.c | 10 ++++++++++
32 3 files changed, 18 insertions(+), 1 deletion(-)
33
34diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
35index e2d85a9..d04597d 100644
36--- a/drivers/gpu/drm/i915/i915_drv.c
37+++ b/drivers/gpu/drm/i915/i915_drv.c
38@@ -442,6 +442,10 @@ static int i915_drm_freeze(struct drm_device *dev)
39 /* Modeset on resume, not lid events */
40 dev_priv->modeset_on_lid = 0;
41
42+ console_lock();
43+ intel_fbdev_set_suspend(dev, 1);
44+ console_unlock();
45+
46 return 0;
47 }
48
49@@ -514,6 +518,9 @@ static int i915_drm_thaw(struct drm_device *dev)
50
51 dev_priv->modeset_on_lid = 0;
52
53+ console_lock();
54+ intel_fbdev_set_suspend(dev, 0);
55+ console_unlock();
56 return error;
57 }
58
59diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
60index a1b4343..83e820e 100644
61--- a/drivers/gpu/drm/i915/intel_drv.h
62+++ b/drivers/gpu/drm/i915/intel_drv.h
63@@ -364,7 +364,7 @@ extern int intel_framebuffer_init(struct drm_device *dev,
64 struct drm_i915_gem_object *obj);
65 extern int intel_fbdev_init(struct drm_device *dev);
66 extern void intel_fbdev_fini(struct drm_device *dev);
67-
68+extern void intel_fbdev_set_suspend(struct drm_device *dev, int state);
69 extern void intel_prepare_page_flip(struct drm_device *dev, int plane);
70 extern void intel_finish_page_flip(struct drm_device *dev, int pipe);
71 extern void intel_finish_page_flip_plane(struct drm_device *dev, int plane);
72diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
73index ec49bae..d0ce34b 100644
74--- a/drivers/gpu/drm/i915/intel_fb.c
75+++ b/drivers/gpu/drm/i915/intel_fb.c
76@@ -257,6 +257,16 @@ void intel_fbdev_fini(struct drm_device *dev)
77 kfree(dev_priv->fbdev);
78 dev_priv->fbdev = NULL;
79 }
80+
81+void intel_fbdev_set_suspend(struct drm_device *dev, int state)
82+{
83+ drm_i915_private_t *dev_priv = dev->dev_private;
84+ if (!dev_priv->fbdev)
85+ return;
86+
87+ fb_set_suspend(dev_priv->fbdev->helper.fbdev, state);
88+}
89+
90 MODULE_LICENSE("GPL and additional rights");
91
92 void intel_fb_output_poll_changed(struct drm_device *dev)
93--
941.7.9.4
95
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0131-Fix-pppol2tp-getsockname.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0131-Fix-pppol2tp-getsockname.patch
new file mode 100644
index 00000000..371e2036
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0131-Fix-pppol2tp-getsockname.patch
@@ -0,0 +1,37 @@
1From f5d559cda23c4abbccffff4d6992fba722321a1e Mon Sep 17 00:00:00 2001
2From: Benjamin LaHaise <bcrl@kvack.org>
3Date: Tue, 20 Mar 2012 03:57:54 +0000
4Subject: [PATCH 131/147] Fix pppol2tp getsockname()
5
6[ Upstream commit bbdb32cb5b73597386913d052165423b9d736145 ]
7
8While testing L2TP functionality, I came across a bug in getsockname(). The
9IP address returned within the pppol2tp_addr's addr memember was not being
10set to the IP address in use. This bug is caused by using inet_sk() on the
11wrong socket (the L2TP socket rather than the underlying UDP socket), and was
12likely introduced during the addition of L2TPv3 support.
13
14Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
15Signed-off-by: James Chapman <jchapman@katalix.com>
16Signed-off-by: David S. Miller <davem@davemloft.net>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 net/l2tp/l2tp_ppp.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
23index 8a90d75..b1bd16f 100644
24--- a/net/l2tp/l2tp_ppp.c
25+++ b/net/l2tp/l2tp_ppp.c
26@@ -915,7 +915,7 @@ static int pppol2tp_getname(struct socket *sock, struct sockaddr *uaddr,
27 goto end_put_sess;
28 }
29
30- inet = inet_sk(sk);
31+ inet = inet_sk(tunnel->sock);
32 if (tunnel->version == 2) {
33 struct sockaddr_pppol2tp sp;
34 len = sizeof(sp);
35--
361.7.9.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0132-ipv6-fix-incorrent-ipv6-ipsec-packet-fragment.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0132-ipv6-fix-incorrent-ipv6-ipsec-packet-fragment.patch
new file mode 100644
index 00000000..eaf6d78d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0132-ipv6-fix-incorrent-ipv6-ipsec-packet-fragment.patch
@@ -0,0 +1,54 @@
1From c809355ceedbec6be4d31c189c452323b7dd0555 Mon Sep 17 00:00:00 2001
2From: Gao feng <gaofeng@cn.fujitsu.com>
3Date: Mon, 19 Mar 2012 22:36:10 +0000
4Subject: [PATCH 132/147] ipv6: fix incorrent ipv6 ipsec packet fragment
5
6[ Upstream commit 1f85851e17b64cabd089a8a8839dddebc627948c ]
7
8Since commit 299b0767(ipv6: Fix IPsec slowpath fragmentation problem)
9In func ip6_append_data,after call skb_put(skb, fraglen + dst_exthdrlen)
10the skb->len contains dst_exthdrlen,and we don't reduce dst_exthdrlen at last
11This will make fraggap>0 in next "while cycle",and cause the size of skb incorrent
12
13Fix this by reserve headroom for dst_exthdrlen.
14
15Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
16Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 net/ipv6/ip6_output.c | 11 ++++++-----
21 1 file changed, 6 insertions(+), 5 deletions(-)
22
23diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
24index ec56271..f7f07e2 100644
25--- a/net/ipv6/ip6_output.c
26+++ b/net/ipv6/ip6_output.c
27@@ -1411,8 +1411,9 @@ alloc_new_skb:
28 */
29 skb->ip_summed = csummode;
30 skb->csum = 0;
31- /* reserve for fragmentation */
32- skb_reserve(skb, hh_len+sizeof(struct frag_hdr));
33+ /* reserve for fragmentation and ipsec header */
34+ skb_reserve(skb, hh_len + sizeof(struct frag_hdr) +
35+ dst_exthdrlen);
36
37 if (sk->sk_type == SOCK_DGRAM)
38 skb_shinfo(skb)->tx_flags = tx_flags;
39@@ -1420,9 +1421,9 @@ alloc_new_skb:
40 /*
41 * Find where to start putting bytes
42 */
43- data = skb_put(skb, fraglen + dst_exthdrlen);
44- skb_set_network_header(skb, exthdrlen + dst_exthdrlen);
45- data += fragheaderlen + dst_exthdrlen;
46+ data = skb_put(skb, fraglen);
47+ skb_set_network_header(skb, exthdrlen);
48+ data += fragheaderlen;
49 skb->transport_header = (skb->network_header +
50 fragheaderlen);
51 if (fraggap) {
52--
531.7.9.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0133-net-bpf_jit-fix-BPF_S_LDX_B_MSH-compilation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0133-net-bpf_jit-fix-BPF_S_LDX_B_MSH-compilation.patch
new file mode 100644
index 00000000..a5780d46
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0133-net-bpf_jit-fix-BPF_S_LDX_B_MSH-compilation.patch
@@ -0,0 +1,62 @@
1From 3f5659b743cac5379f2b1619b713edeb60844b23 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Sun, 18 Mar 2012 02:40:48 +0000
4Subject: [PATCH 133/147] net: bpf_jit: fix BPF_S_LDX_B_MSH compilation
5
6[ Upstream commit dc72d99dabb870ca5bd6d9fff674be853bb4a88d ]
7
8Matt Evans spotted that x86 bpf_jit was incorrectly handling negative
9constant offsets in BPF_S_LDX_B_MSH instruction.
10
11We need to abort JIT compilation like we do in common_load so that
12filter uses the interpreter code and can call __load_pointer()
13
14Reference: http://lists.openwall.net/netdev/2011/07/19/11
15
16Thanks to Indan Zupancic to bring back this issue.
17
18Reported-by: Matt Evans <matt@ozlabs.org>
19Reported-by: Indan Zupancic <indan@nul.nu>
20Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
21Signed-off-by: David S. Miller <davem@davemloft.net>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 arch/x86/net/bpf_jit_comp.c | 14 +++++---------
25 1 file changed, 5 insertions(+), 9 deletions(-)
26
27diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
28index 7c1b765..5671752 100644
29--- a/arch/x86/net/bpf_jit_comp.c
30+++ b/arch/x86/net/bpf_jit_comp.c
31@@ -475,8 +475,10 @@ void bpf_jit_compile(struct sk_filter *fp)
32 case BPF_S_LD_W_ABS:
33 func = sk_load_word;
34 common_load: seen |= SEEN_DATAREF;
35- if ((int)K < 0)
36+ if ((int)K < 0) {
37+ /* Abort the JIT because __load_pointer() is needed. */
38 goto out;
39+ }
40 t_offset = func - (image + addrs[i]);
41 EMIT1_off32(0xbe, K); /* mov imm32,%esi */
42 EMIT1_off32(0xe8, t_offset); /* call */
43@@ -489,14 +491,8 @@ common_load: seen |= SEEN_DATAREF;
44 goto common_load;
45 case BPF_S_LDX_B_MSH:
46 if ((int)K < 0) {
47- if (pc_ret0 > 0) {
48- /* addrs[pc_ret0 - 1] is the start address */
49- EMIT_JMP(addrs[pc_ret0 - 1] - addrs[i]);
50- break;
51- }
52- CLEAR_A();
53- EMIT_JMP(cleanup_addr - addrs[i]);
54- break;
55+ /* Abort the JIT because __load_pointer() is needed. */
56+ goto out;
57 }
58 seen |= SEEN_DATAREF | SEEN_XREG;
59 t_offset = sk_load_byte_msh - (image + addrs[i]);
60--
611.7.9.4
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0134-net-fix-a-potential-rcu_read_lock-imbalance-in-rt6_f.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0134-net-fix-a-potential-rcu_read_lock-imbalance-in-rt6_f.patch
new file mode 100644
index 00000000..c0f96637
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0134-net-fix-a-potential-rcu_read_lock-imbalance-in-rt6_f.patch
@@ -0,0 +1,50 @@
1From fa36f84193bedebf0fdfb861e5e9f1dd72044f64 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Tue, 27 Mar 2012 09:53:52 +0000
4Subject: [PATCH 134/147] net: fix a potential rcu_read_lock() imbalance in
5 rt6_fill_node()
6
7[ Upstream commit 94f826b8076e2cb92242061e92f21b5baa3eccc2 ]
8
9Commit f2c31e32b378 (net: fix NULL dereferences in check_peer_redir() )
10added a regression in rt6_fill_node(), leading to rcu_read_lock()
11imbalance.
12
13Thats because NLA_PUT() can make a jump to nla_put_failure label.
14
15Fix this by using nla_put()
16
17Many thanks to Ben Greear for his help
18
19Reported-by: Ben Greear <greearb@candelatech.com>
20Reported-by: Dave Jones <davej@redhat.com>
21Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
22Tested-by: Ben Greear <greearb@candelatech.com>
23Signed-off-by: David S. Miller <davem@davemloft.net>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 net/ipv6/route.c | 8 ++++++--
27 1 file changed, 6 insertions(+), 2 deletions(-)
28
29diff --git a/net/ipv6/route.c b/net/ipv6/route.c
30index b582a0a..059b9d9 100644
31--- a/net/ipv6/route.c
32+++ b/net/ipv6/route.c
33@@ -2446,8 +2446,12 @@ static int rt6_fill_node(struct net *net,
34
35 rcu_read_lock();
36 n = dst_get_neighbour(&rt->dst);
37- if (n)
38- NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key);
39+ if (n) {
40+ if (nla_put(skb, RTA_GATEWAY, 16, &n->primary_key) < 0) {
41+ rcu_read_unlock();
42+ goto nla_put_failure;
43+ }
44+ }
45 rcu_read_unlock();
46
47 if (rt->dst.dev)
48--
491.7.9.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0135-net-fix-napi_reuse_skb-skb-reserve.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0135-net-fix-napi_reuse_skb-skb-reserve.patch
new file mode 100644
index 00000000..b176c8b4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0135-net-fix-napi_reuse_skb-skb-reserve.patch
@@ -0,0 +1,39 @@
1From 33dbbab6716bf8d3703ccb81a1e7e7084c4b8233 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Wed, 21 Mar 2012 06:58:03 +0000
4Subject: [PATCH 135/147] net: fix napi_reuse_skb() skb reserve
5
6[ Upstream commit 2a2a459eeeff48640dc557548ce576d666ab06ed ]
7
8napi->skb is allocated in napi_get_frags() using
9netdev_alloc_skb_ip_align(), with a reserve of NET_SKB_PAD +
10NET_IP_ALIGN bytes.
11
12However, when such skb is recycled in napi_reuse_skb(), it ends with a
13reserve of NET_IP_ALIGN which is suboptimal.
14
15Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
16Cc: Herbert Xu <herbert@gondor.apana.org.au>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 net/core/dev.c | 3 ++-
21 1 file changed, 2 insertions(+), 1 deletion(-)
22
23diff --git a/net/core/dev.c b/net/core/dev.c
24index c56cacf..55cd370 100644
25--- a/net/core/dev.c
26+++ b/net/core/dev.c
27@@ -3634,7 +3634,8 @@ EXPORT_SYMBOL(napi_gro_receive);
28 static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
29 {
30 __skb_pull(skb, skb_headlen(skb));
31- skb_reserve(skb, NET_IP_ALIGN - skb_headroom(skb));
32+ /* restore the reserve we had after netdev_alloc_skb_ip_align() */
33+ skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN - skb_headroom(skb));
34 skb->vlan_tci = 0;
35 skb->dev = napi->dev;
36 skb->skb_iif = 0;
37--
381.7.9.4
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0136-Remove-printk-from-rds_sendmsg.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0136-Remove-printk-from-rds_sendmsg.patch
new file mode 100644
index 00000000..1164259d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0136-Remove-printk-from-rds_sendmsg.patch
@@ -0,0 +1,31 @@
1From 7a3d883bc2d70f61ca23b7778c945d7e4cf5e10a Mon Sep 17 00:00:00 2001
2From: Dave Jones <davej@redhat.com>
3Date: Mon, 19 Mar 2012 13:01:07 +0000
4Subject: [PATCH 136/147] Remove printk from rds_sendmsg
5
6[ Upstream commit a6506e1486181975d318344143aca722b2b91621 ]
7
8no socket layer outputs a message for this error and neither should rds.
9
10Signed-off-by: Dave Jones <davej@redhat.com>
11Signed-off-by: David S. Miller <davem@davemloft.net>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 net/rds/send.c | 1 -
15 1 file changed, 1 deletion(-)
16
17diff --git a/net/rds/send.c b/net/rds/send.c
18index e2d63c5..96531d4 100644
19--- a/net/rds/send.c
20+++ b/net/rds/send.c
21@@ -935,7 +935,6 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
22 /* Mirror Linux UDP mirror of BSD error message compatibility */
23 /* XXX: Perhaps MSG_MORE someday */
24 if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_CMSG_COMPAT)) {
25- printk(KERN_INFO "msg_flags 0x%08X\n", msg->msg_flags);
26 ret = -EOPNOTSUPP;
27 goto out;
28 }
29--
301.7.9.4
31
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0137-sky2-override-for-PCI-legacy-power-management.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0137-sky2-override-for-PCI-legacy-power-management.patch
new file mode 100644
index 00000000..6e4cc9f8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0137-sky2-override-for-PCI-legacy-power-management.patch
@@ -0,0 +1,52 @@
1From 82df145d92f585fd22bc74921a3dc184d54be9d3 Mon Sep 17 00:00:00 2001
2From: stephen hemminger <shemminger@vyatta.com>
3Date: Wed, 21 Mar 2012 05:32:05 +0000
4Subject: [PATCH 137/147] sky2: override for PCI legacy power management
5
6[ Upstream commit 5676cc7bfe1e388e87843f71daa229610385b41e ]
7
8Some BIOS's don't setup power management correctly (what else is
9new) and don't allow use of PCI Express power control. Add a special
10exception module parameter to allow working around this issue.
11Based on slightly different patch by Knut Petersen.
12
13Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
14Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/net/ethernet/marvell/sky2.c | 11 +++++++++++
19 1 file changed, 11 insertions(+)
20
21diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
22index 7803efa..f612b35 100644
23--- a/drivers/net/ethernet/marvell/sky2.c
24+++ b/drivers/net/ethernet/marvell/sky2.c
25@@ -95,6 +95,10 @@ static int disable_msi = 0;
26 module_param(disable_msi, int, 0);
27 MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
28
29+static int legacy_pme = 0;
30+module_param(legacy_pme, int, 0);
31+MODULE_PARM_DESC(legacy_pme, "Legacy power management");
32+
33 static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = {
34 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */
35 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */
36@@ -867,6 +871,13 @@ static void sky2_wol_init(struct sky2_port *sky2)
37 /* Disable PiG firmware */
38 sky2_write16(hw, B0_CTST, Y2_HW_WOL_OFF);
39
40+ /* Needed by some broken BIOSes, use PCI rather than PCI-e for WOL */
41+ if (legacy_pme) {
42+ u32 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
43+ reg1 |= PCI_Y2_PME_LEGACY;
44+ sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
45+ }
46+
47 /* block receiver */
48 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
49 sky2_read32(hw, B0_CTST);
50--
511.7.9.4
52
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0138-xfrm-Access-the-replay-notify-functions-via-the-regi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0138-xfrm-Access-the-replay-notify-functions-via-the-regi.patch
new file mode 100644
index 00000000..d030cc74
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0138-xfrm-Access-the-replay-notify-functions-via-the-regi.patch
@@ -0,0 +1,54 @@
1From eaa691b3cd85066e4f84583f7b818372c86a4bc2 Mon Sep 17 00:00:00 2001
2From: Steffen Klassert <steffen.klassert@secunet.com>
3Date: Wed, 21 Mar 2012 23:36:13 +0000
4Subject: [PATCH 138/147] xfrm: Access the replay notify functions via the
5 registered callbacks
6
7[ Upstream commit 1265fd616782ef03b98fd19f65c2b47fcd4ea11f ]
8
9We call the wrong replay notify function when we use ESN replay
10handling. This leads to the fact that we don't send notifications
11if we use ESN. Fix this by calling the registered callbacks instead
12of xfrm_replay_notify().
13
14Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 net/xfrm/xfrm_replay.c | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/net/xfrm/xfrm_replay.c b/net/xfrm/xfrm_replay.c
22index 39e02c5..2f6d11d 100644
23--- a/net/xfrm/xfrm_replay.c
24+++ b/net/xfrm/xfrm_replay.c
25@@ -167,7 +167,7 @@ static void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq)
26 }
27
28 if (xfrm_aevent_is_on(xs_net(x)))
29- xfrm_replay_notify(x, XFRM_REPLAY_UPDATE);
30+ x->repl->notify(x, XFRM_REPLAY_UPDATE);
31 }
32
33 static int xfrm_replay_overflow_bmp(struct xfrm_state *x, struct sk_buff *skb)
34@@ -279,7 +279,7 @@ static void xfrm_replay_advance_bmp(struct xfrm_state *x, __be32 net_seq)
35 replay_esn->bmp[nr] |= (1U << bitnr);
36
37 if (xfrm_aevent_is_on(xs_net(x)))
38- xfrm_replay_notify(x, XFRM_REPLAY_UPDATE);
39+ x->repl->notify(x, XFRM_REPLAY_UPDATE);
40 }
41
42 static void xfrm_replay_notify_bmp(struct xfrm_state *x, int event)
43@@ -473,7 +473,7 @@ static void xfrm_replay_advance_esn(struct xfrm_state *x, __be32 net_seq)
44 replay_esn->bmp[nr] |= (1U << bitnr);
45
46 if (xfrm_aevent_is_on(xs_net(x)))
47- xfrm_replay_notify(x, XFRM_REPLAY_UPDATE);
48+ x->repl->notify(x, XFRM_REPLAY_UPDATE);
49 }
50
51 static struct xfrm_replay xfrm_replay_legacy = {
52--
531.7.9.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0139-lockd-fix-arg-parsing-for-grace_period-and-timeout.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0139-lockd-fix-arg-parsing-for-grace_period-and-timeout.patch
new file mode 100644
index 00000000..3e15c068
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0139-lockd-fix-arg-parsing-for-grace_period-and-timeout.patch
@@ -0,0 +1,40 @@
1From a0ef4bd55a5a7d190eeceb4d1626988af68a2f0e Mon Sep 17 00:00:00 2001
2From: NeilBrown <neilb@suse.de>
3Date: Tue, 7 Feb 2012 15:35:42 +1100
4Subject: [PATCH 139/147] lockd: fix arg parsing for grace_period and timeout.
5
6commit de5b8e8e047534aac6bc9803f96e7257436aef9c upstream.
7
8If you try to set grace_period or timeout via a module parameter
9to lockd, and do this on a big-endian machine where
10
11 sizeof(int) != sizeof(unsigned long)
12
13it won't work. This number given will be effectively shifted right
14by the difference in those two sizes.
15
16So cast kp->arg properly to get correct result.
17
18Signed-off-by: NeilBrown <neilb@suse.de>
19Signed-off-by: J. Bruce Fields <bfields@redhat.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 fs/lockd/svc.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
26index c061b9a..2444780 100644
27--- a/fs/lockd/svc.c
28+++ b/fs/lockd/svc.c
29@@ -440,7 +440,7 @@ static int param_set_##name(const char *val, struct kernel_param *kp) \
30 __typeof__(type) num = which_strtol(val, &endp, 0); \
31 if (endp == val || *endp || num < (min) || num > (max)) \
32 return -EINVAL; \
33- *((int *) kp->arg) = num; \
34+ *((type *) kp->arg) = num; \
35 return 0; \
36 }
37
38--
391.7.9.4
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0140-x86-tsc-Skip-refined-tsc-calibration-on-systems-with.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0140-x86-tsc-Skip-refined-tsc-calibration-on-systems-with.patch
new file mode 100644
index 00000000..637e830b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0140-x86-tsc-Skip-refined-tsc-calibration-on-systems-with.patch
@@ -0,0 +1,62 @@
1From 6361e158f9827a43f7f20342c5f58a46ac003fb1 Mon Sep 17 00:00:00 2001
2From: Alok Kataria <akataria@vmware.com>
3Date: Tue, 21 Feb 2012 18:19:55 -0800
4Subject: [PATCH 140/147] x86, tsc: Skip refined tsc calibration on systems
5 with reliable TSC
6
7commit 57779dc2b3b75bee05ef5d1ada47f615f7a13932 upstream.
8
9While running the latest Linux as guest under VMware in highly
10over-committed situations, we have seen cases when the refined TSC
11algorithm fails to get a valid tsc_start value in
12tsc_refine_calibration_work from multiple attempts. As a result the
13kernel keeps on scheduling the tsc_irqwork task for later. Subsequently
14after several attempts when it gets a valid start value it goes through
15the refined calibration and either bails out or uses the new results.
16Given that the kernel originally read the TSC frequency from the
17platform, which is the best it can get, I don't think there is much
18value in refining it.
19
20So for systems which get the TSC frequency from the platform we
21should skip the refined tsc algorithm.
22
23We can use the TSC_RELIABLE cpu cap flag to detect this, right now it is
24set only on VMware and for Moorestown Penwell both of which have there
25own TSC calibration methods.
26
27Signed-off-by: Alok N Kataria <akataria@vmware.com>
28Cc: John Stultz <johnstul@us.ibm.com>
29Cc: Dirk Brandewie <dirk.brandewie@gmail.com>
30Cc: Alan Cox <alan@linux.intel.com>
31[jstultz: Reworked to simply not schedule the refining work,
32rather then scheduling the work and bombing out later]
33Signed-off-by: John Stultz <john.stultz@linaro.org>
34Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35---
36 arch/x86/kernel/tsc.c | 10 ++++++++++
37 1 file changed, 10 insertions(+)
38
39diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
40index db48336..3fe298a 100644
41--- a/arch/x86/kernel/tsc.c
42+++ b/arch/x86/kernel/tsc.c
43@@ -934,6 +934,16 @@ static int __init init_tsc_clocksource(void)
44 clocksource_tsc.rating = 0;
45 clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
46 }
47+
48+ /*
49+ * Trust the results of the earlier calibration on systems
50+ * exporting a reliable TSC.
51+ */
52+ if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) {
53+ clocksource_register_khz(&clocksource_tsc, tsc_khz);
54+ return 0;
55+ }
56+
57 schedule_delayed_work(&tsc_irqwork, 0);
58 return 0;
59 }
60--
611.7.9.4
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0141-x86-tls-Off-by-one-limit-check.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0141-x86-tls-Off-by-one-limit-check.patch
new file mode 100644
index 00000000..a4510efc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0141-x86-tls-Off-by-one-limit-check.patch
@@ -0,0 +1,43 @@
1From 2d52fe6cb2d5afcd27d1c675484bdcbefaad6d2c Mon Sep 17 00:00:00 2001
2From: Dan Carpenter <dan.carpenter@oracle.com>
3Date: Sat, 24 Mar 2012 10:52:50 +0300
4Subject: [PATCH 141/147] x86, tls: Off by one limit check
5
6commit 8f0750f19789cf352d7e24a6cc50f2ab1b4f1372 upstream.
7
8These are used as offsets into an array of GDT_ENTRY_TLS_ENTRIES members
9so GDT_ENTRY_TLS_ENTRIES is one past the end of the array.
10
11Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
12Link: http://lkml.kernel.org/r/20120324075250.GA28258@elgon.mountain
13Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 arch/x86/kernel/tls.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c
20index 6bb7b85..bcfec2d 100644
21--- a/arch/x86/kernel/tls.c
22+++ b/arch/x86/kernel/tls.c
23@@ -163,7 +163,7 @@ int regset_tls_get(struct task_struct *target, const struct user_regset *regset,
24 {
25 const struct desc_struct *tls;
26
27- if (pos > GDT_ENTRY_TLS_ENTRIES * sizeof(struct user_desc) ||
28+ if (pos >= GDT_ENTRY_TLS_ENTRIES * sizeof(struct user_desc) ||
29 (pos % sizeof(struct user_desc)) != 0 ||
30 (count % sizeof(struct user_desc)) != 0)
31 return -EINVAL;
32@@ -198,7 +198,7 @@ int regset_tls_set(struct task_struct *target, const struct user_regset *regset,
33 struct user_desc infobuf[GDT_ENTRY_TLS_ENTRIES];
34 const struct user_desc *info;
35
36- if (pos > GDT_ENTRY_TLS_ENTRIES * sizeof(struct user_desc) ||
37+ if (pos >= GDT_ENTRY_TLS_ENTRIES * sizeof(struct user_desc) ||
38 (pos % sizeof(struct user_desc)) != 0 ||
39 (count % sizeof(struct user_desc)) != 0)
40 return -EINVAL;
41--
421.7.9.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0142-compat-use-sys_sendfile64-implementation-for-sendfil.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0142-compat-use-sys_sendfile64-implementation-for-sendfil.patch
new file mode 100644
index 00000000..a93ecf81
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0142-compat-use-sys_sendfile64-implementation-for-sendfil.patch
@@ -0,0 +1,40 @@
1From c6fc3006639bfddf212067de1c13a8345019d934 Mon Sep 17 00:00:00 2001
2From: Chris Metcalf <cmetcalf@tilera.com>
3Date: Mon, 26 Mar 2012 16:26:12 -0400
4Subject: [PATCH 142/147] compat: use sys_sendfile64() implementation for
5 sendfile syscall
6
7commit 1631fcea8399da5e80a80084b3b8c5bfd99d21e7 upstream.
8
9<asm-generic/unistd.h> was set up to use sys_sendfile() for the 32-bit
10compat API instead of sys_sendfile64(), but in fact the right thing to
11do is to use sys_sendfile64() in all cases. The 32-bit sendfile64() API
12in glibc uses the sendfile64 syscall, so it has to be capable of doing
13full 64-bit operations. But the sys_sendfile() kernel implementation
14has a MAX_NON_LFS test in it which explicitly limits the offset to 2^32.
15So, we need to use the sys_sendfile64() implementation in the kernel
16for this case.
17
18Acked-by: Arnd Bergmann <arnd@arndb.de>
19Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 include/asm-generic/unistd.h | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
26index 2292d1a..991ef01 100644
27--- a/include/asm-generic/unistd.h
28+++ b/include/asm-generic/unistd.h
29@@ -218,7 +218,7 @@ __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)
30
31 /* fs/sendfile.c */
32 #define __NR3264_sendfile 71
33-__SC_3264(__NR3264_sendfile, sys_sendfile64, sys_sendfile)
34+__SYSCALL(__NR3264_sendfile, sys_sendfile64)
35
36 /* fs/select.c */
37 #define __NR_pselect6 72
38--
391.7.9.4
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0143-rtc-Provide-flag-for-rtc-devices-that-don-t-support-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0143-rtc-Provide-flag-for-rtc-devices-that-don-t-support-.patch
new file mode 100644
index 00000000..1f202723
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0143-rtc-Provide-flag-for-rtc-devices-that-don-t-support-.patch
@@ -0,0 +1,76 @@
1From 04cb3b02d54277c9db7bf8b185f41839317e40b1 Mon Sep 17 00:00:00 2001
2From: John Stultz <john.stultz@linaro.org>
3Date: Tue, 6 Mar 2012 17:16:09 -0800
4Subject: [PATCH 143/147] rtc: Provide flag for rtc devices that don't support
5 UIE
6
7commit 4a649903f91232d02284d53724b0a45728111767 upstream.
8
9Richard Weinberger noticed that on some RTC hardware that
10doesn't support UIE mode, due to coarse granular alarms
11(like 1minute resolution), the current virtualized RTC
12support doesn't properly error out when UIE is enabled.
13
14Instead the current code queues an alarm for the next second,
15but it won't fire until up to a miniute later.
16
17This patch provides a generic way to flag this sort of hardware
18and fixes the issue on the mpc5121 where Richard noticed the
19problem.
20
21Reported-by: Richard Weinberger <richard@nod.at>
22Tested-by: Richard Weinberger <richard@nod.at>
23Signed-off-by: John Stultz <john.stultz@linaro.org>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 drivers/rtc/interface.c | 5 +++++
27 drivers/rtc/rtc-mpc5121.c | 2 ++
28 include/linux/rtc.h | 3 ++-
29 3 files changed, 9 insertions(+), 1 deletion(-)
30
31diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
32index c1edbf8..565742b 100644
33--- a/drivers/rtc/interface.c
34+++ b/drivers/rtc/interface.c
35@@ -445,6 +445,11 @@ int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled)
36 if (rtc->uie_rtctimer.enabled == enabled)
37 goto out;
38
39+ if (rtc->uie_unsupported) {
40+ err = -EINVAL;
41+ goto out;
42+ }
43+
44 if (enabled) {
45 struct rtc_time tm;
46 ktime_t now, onesec;
47diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c
48index da60915..0fc2d22 100644
49--- a/drivers/rtc/rtc-mpc5121.c
50+++ b/drivers/rtc/rtc-mpc5121.c
51@@ -360,6 +360,8 @@ static int __devinit mpc5121_rtc_probe(struct platform_device *op)
52 &mpc5200_rtc_ops, THIS_MODULE);
53 }
54
55+ rtc->rtc->uie_unsupported = 1;
56+
57 if (IS_ERR(rtc->rtc)) {
58 err = PTR_ERR(rtc->rtc);
59 goto out_free_irq;
60diff --git a/include/linux/rtc.h b/include/linux/rtc.h
61index 93f4d03..fcabfb4 100644
62--- a/include/linux/rtc.h
63+++ b/include/linux/rtc.h
64@@ -202,7 +202,8 @@ struct rtc_device
65 struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */
66 int pie_enabled;
67 struct work_struct irqwork;
68-
69+ /* Some hardware can't support UIE mode */
70+ int uie_unsupported;
71
72 #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
73 struct work_struct uie_task;
74--
751.7.9.4
76
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0144-nfsd-don-t-allow-zero-length-strings-in-cache_parse.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0144-nfsd-don-t-allow-zero-length-strings-in-cache_parse.patch
new file mode 100644
index 00000000..de5ea80c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0144-nfsd-don-t-allow-zero-length-strings-in-cache_parse.patch
@@ -0,0 +1,35 @@
1From 43917d0f4bc9e7b8d6f0cafd29da95d52f587c58 Mon Sep 17 00:00:00 2001
2From: Dan Carpenter <dan.carpenter@oracle.com>
3Date: Wed, 18 Jan 2012 12:56:02 +0300
4Subject: [PATCH 144/147] nfsd: don't allow zero length strings in
5 cache_parse()
6
7commit 6d8d17499810479eabd10731179c04b2ca22152f upstream.
8
9There is no point in passing a zero length string here and quite a
10few of that cache_parse() implementations will Oops if count is
11zero.
12
13Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
14Signed-off-by: J. Bruce Fields <bfields@redhat.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 net/sunrpc/cache.c | 2 ++
18 1 file changed, 2 insertions(+)
19
20diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
21index 72ad836..4530a91 100644
22--- a/net/sunrpc/cache.c
23+++ b/net/sunrpc/cache.c
24@@ -828,6 +828,8 @@ static ssize_t cache_do_downcall(char *kaddr, const char __user *buf,
25 {
26 ssize_t ret;
27
28+ if (count == 0)
29+ return -EINVAL;
30 if (copy_from_user(kaddr, buf, count))
31 return -EFAULT;
32 kaddr[count] = '\0';
33--
341.7.9.4
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0145-serial-sh-sci-fix-a-race-of-DMA-submit_tx-on-transfe.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0145-serial-sh-sci-fix-a-race-of-DMA-submit_tx-on-transfe.patch
new file mode 100644
index 00000000..14546aa5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0145-serial-sh-sci-fix-a-race-of-DMA-submit_tx-on-transfe.patch
@@ -0,0 +1,91 @@
1From 3e2440eb910fa022dedfd93ecc868155dbd14fe1 Mon Sep 17 00:00:00 2001
2From: Yoshii Takashi <takashi.yoshii.zj@renesas.com>
3Date: Wed, 14 Mar 2012 16:14:43 +0900
4Subject: [PATCH 145/147] serial: sh-sci: fix a race of DMA submit_tx on
5 transfer
6
7commit 49d4bcaddca977fffdea8b0b71f6e5da96dac78e upstream.
8
9When DMA is enabled, sh-sci transfer begins with
10 uart_start()
11 sci_start_tx()
12 if (cookie_tx < 0) schedule_work()
13Then, starts DMA when wq scheduled, -- (A)
14 process_one_work()
15 work_fn_rx()
16 cookie_tx = desc->submit_tx()
17And finishes when DMA transfer ends, -- (B)
18 sci_dma_tx_complete()
19 async_tx_ack()
20 cookie_tx = -EINVAL
21 (possible another schedule_work())
22
23This A to B sequence is not reentrant, since controlling variables
24(for example, cookie_tx above) are not queues nor lists. So, they
25must be invoked as A B A B..., otherwise results in kernel crash.
26
27To ensure the sequence, sci_start_tx() seems to test if cookie_tx < 0
28(represents "not used") to call schedule_work().
29But cookie_tx will not be set (to a cookie, also means "used") until
30in the middle of work queue scheduled function work_fn_tx().
31
32This gap between the test and set allows the breakage of the sequence
33under the very frequently call of uart_start().
34Another gap between async_tx_ack() and another schedule_work() results
35in the same issue, too.
36
37This patch introduces a new condition "cookie_tx == 0" just to mark
38it is "busy" and assign it within spin-locked region to fill the gaps.
39
40Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
41Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
42Signed-off-by: Paul Mundt <lethal@linux-sh.org>
43Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44---
45 drivers/tty/serial/sh-sci.c | 15 ++++++++++-----
46 1 file changed, 10 insertions(+), 5 deletions(-)
47
48diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
49index aff9d61..829e51a 100644
50--- a/drivers/tty/serial/sh-sci.c
51+++ b/drivers/tty/serial/sh-sci.c
52@@ -1123,17 +1123,20 @@ static void sci_dma_tx_complete(void *arg)
53 port->icount.tx += sg_dma_len(&s->sg_tx);
54
55 async_tx_ack(s->desc_tx);
56- s->cookie_tx = -EINVAL;
57 s->desc_tx = NULL;
58
59 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
60 uart_write_wakeup(port);
61
62 if (!uart_circ_empty(xmit)) {
63+ s->cookie_tx = 0;
64 schedule_work(&s->work_tx);
65- } else if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
66- u16 ctrl = sci_in(port, SCSCR);
67- sci_out(port, SCSCR, ctrl & ~SCSCR_TIE);
68+ } else {
69+ s->cookie_tx = -EINVAL;
70+ if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
71+ u16 ctrl = sci_in(port, SCSCR);
72+ sci_out(port, SCSCR, ctrl & ~SCSCR_TIE);
73+ }
74 }
75
76 spin_unlock_irqrestore(&port->lock, flags);
77@@ -1395,8 +1398,10 @@ static void sci_start_tx(struct uart_port *port)
78 }
79
80 if (s->chan_tx && !uart_circ_empty(&s->port.state->xmit) &&
81- s->cookie_tx < 0)
82+ s->cookie_tx < 0) {
83+ s->cookie_tx = 0;
84 schedule_work(&s->work_tx);
85+ }
86 #endif
87
88 if (!s->chan_tx || port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
89--
901.7.9.4
91
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0146-ASPM-Fix-pcie-devices-with-non-pcie-children.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0146-ASPM-Fix-pcie-devices-with-non-pcie-children.patch
new file mode 100644
index 00000000..9d2291bf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0146-ASPM-Fix-pcie-devices-with-non-pcie-children.patch
@@ -0,0 +1,72 @@
1From f1bc4d09cd5cb0d91b7ab742b0bc2c6ea7ed9a10 Mon Sep 17 00:00:00 2001
2From: Matthew Garrett <mjg@redhat.com>
3Date: Tue, 27 Mar 2012 10:17:41 -0400
4Subject: [PATCH 146/147] ASPM: Fix pcie devices with non-pcie children
5
6commit c9651e70ad0aa499814817cbf3cc1d0b806ed3a1 upstream.
7
8Since 3.2.12 and 3.3, some systems are failing to boot with a BUG_ON.
9Some other systems using the pata_jmicron driver fail to boot because no
10disks are detected. Passing pcie_aspm=force on the kernel command line
11works around it.
12
13The cause: commit 4949be16822e ("PCI: ignore pre-1.1 ASPM quirking when
14ASPM is disabled") changed the behaviour of pcie_aspm_sanity_check() to
15always return 0 if aspm is disabled, in order to avoid cases where we
16changed ASPM state on pre-PCIe 1.1 devices.
17
18This skipped the secondary function of pcie_aspm_sanity_check which was
19to avoid us enabling ASPM on devices that had non-PCIe children, causing
20trouble later on. Move the aspm_disabled check so we continue to honour
21that scenario.
22
23Addresses https://bugzilla.kernel.org/show_bug.cgi?id=42979 and
24 http://bugs.debian.org/665420
25
26Reported-by: Romain Francoise <romain@orebokech.com> # kernel panic
27Reported-by: Chris Holland <bandidoirlandes@gmail.com> # disk detection trouble
28Signed-off-by: Matthew Garrett <mjg@redhat.com>
29Tested-by: Hatem Masmoudi <hatem.masmoudi@gmail.com> # Dell Latitude E5520
30Tested-by: janek <jan0x6c@gmail.com> # pata_jmicron with JMB362/JMB363
31[jn: with more symptoms in log message]
32Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
33Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
34Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35---
36 drivers/pci/pcie/aspm.c | 13 ++++++++++---
37 1 file changed, 10 insertions(+), 3 deletions(-)
38
39diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
40index 24f049e..2275162 100644
41--- a/drivers/pci/pcie/aspm.c
42+++ b/drivers/pci/pcie/aspm.c
43@@ -500,9 +500,6 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
44 int pos;
45 u32 reg32;
46
47- if (aspm_disabled)
48- return 0;
49-
50 /*
51 * Some functions in a slot might not all be PCIe functions,
52 * very strange. Disable ASPM for the whole slot
53@@ -511,6 +508,16 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
54 pos = pci_pcie_cap(child);
55 if (!pos)
56 return -EINVAL;
57+
58+ /*
59+ * If ASPM is disabled then we're not going to change
60+ * the BIOS state. It's safe to continue even if it's a
61+ * pre-1.1 device
62+ */
63+
64+ if (aspm_disabled)
65+ continue;
66+
67 /*
68 * Disable ASPM for pre-1.1 PCIe device, we follow MS to use
69 * RBER bit to determine if a function is 1.1 version device
70--
711.7.9.4
72
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0147-Linux-3.2.14.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0147-Linux-3.2.14.patch
new file mode 100644
index 00000000..6a9f27c6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.14/0147-Linux-3.2.14.patch
@@ -0,0 +1,24 @@
1From 6c99e5e88e70f85b97e9363c80763e306ac3296c Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Mon, 2 Apr 2012 09:53:31 -0700
4Subject: [PATCH 147/147] Linux 3.2.14
5
6---
7 Makefile | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10diff --git a/Makefile b/Makefile
11index 172e041..afe4c7d 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,6 +1,6 @@
15 VERSION = 3
16 PATCHLEVEL = 2
17-SUBLEVEL = 13
18+SUBLEVEL = 14
19 EXTRAVERSION =
20 NAME = Saber-toothed Squirrel
21
22--
231.7.9.4
24
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
index 16c0dd42..9a5d31fe 100644
--- a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
+++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
@@ -12,7 +12,7 @@ MULTI_CONFIG_BASE_SUFFIX = ""
12 12
13BRANCH = "v3.2-staging" 13BRANCH = "v3.2-staging"
14SRCREV = "09e9651bcf2ee8d86685f2a8075bc6557b1d3b91" 14SRCREV = "09e9651bcf2ee8d86685f2a8075bc6557b1d3b91"
15MACHINE_KERNEL_PR_append = "c+gitr${SRCREV}" 15MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}"
16 16
17COMPATIBLE_MACHINE = "(ti33x)" 17COMPATIBLE_MACHINE = "(ti33x)"
18 18
@@ -645,6 +645,153 @@ PATCHES_OVER_PSP = " \
645 file://3.2.13/0008-iwl3945-fix-possible-il-txq-NULL-pointer-dereference.patch \ 645 file://3.2.13/0008-iwl3945-fix-possible-il-txq-NULL-pointer-dereference.patch \
646 file://3.2.13/0009-powerpc-pmac-Fix-SMP-kernels-on-pre-core99-UP-machin.patch \ 646 file://3.2.13/0009-powerpc-pmac-Fix-SMP-kernels-on-pre-core99-UP-machin.patch \
647 file://3.2.13/0010-Linux-3.2.13.patch \ 647 file://3.2.13/0010-Linux-3.2.13.patch \
648 file://3.2.14/0001-USB-option-Add-MediaTek-MT6276M-modem-app-interfaces.patch \
649 file://3.2.14/0002-USB-option-driver-adding-support-for-Telit-CC864-SIN.patch \
650 file://3.2.14/0003-USB-option-make-interface-blacklist-work-again.patch \
651 file://3.2.14/0004-USB-option-add-ZTE-MF820D.patch \
652 file://3.2.14/0005-staging-zcache-avoid-AB-BA-deadlock-condition.patch \
653 file://3.2.14/0006-USB-ftdi_sio-fix-problem-when-the-manufacture-is-a-N.patch \
654 file://3.2.14/0007-USB-ftdi_sio-add-support-for-BeagleBone-rev-A5.patch \
655 file://3.2.14/0008-USB-Microchip-VID-mislabeled-as-Hornby-VID-in-ftdi_s.patch \
656 file://3.2.14/0009-USB-ftdi_sio-new-PID-Distortec-JTAG-lock-pick.patch \
657 file://3.2.14/0010-USB-ftdi_sio-add-support-for-FT-X-series-devices.patch \
658 file://3.2.14/0011-USB-ftdi_sio-new-PID-LUMEL-PD12.patch \
659 file://3.2.14/0012-powerpc-usb-fix-bug-of-kernel-hang-when-initializing.patch \
660 file://3.2.14/0013-staging-r8712u-Add-missing-initialization-and-remove.patch \
661 file://3.2.14/0014-staging-r8712u-Fix-regression-introduced-by-commit-a.patch \
662 file://3.2.14/0015-staging-r8712u-Fix-regression-in-signal-level-after-.patch \
663 file://3.2.14/0016-usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch \
664 file://3.2.14/0017-usb-dwc3-use-proper-function-for-setting-endpoint-na.patch \
665 file://3.2.14/0018-usb-gadgetfs-return-number-of-bytes-on-ep0-read-requ.patch \
666 file://3.2.14/0019-USB-gadget-Make-g_hid-device-class-conform-to-spec.patch \
667 file://3.2.14/0020-futex-Cover-all-PI-opcodes-with-cmpxchg-enabled-chec.patch \
668 file://3.2.14/0021-sysfs-Fix-memory-leak-in-sysfs_sd_setsecdata.patch \
669 file://3.2.14/0022-tty-moxa-fix-bit-test-in-moxa_start.patch \
670 file://3.2.14/0023-TTY-Wrong-unicode-value-copied-in-con_set_unimap.patch \
671 file://3.2.14/0024-USB-serial-fix-console-error-reporting.patch \
672 file://3.2.14/0025-cdc-wdm-Fix-more-races-on-the-read-path.patch \
673 file://3.2.14/0026-cdc-wdm-Don-t-clear-WDM_READ-unless-entire-read-buff.patch \
674 file://3.2.14/0027-usb-fsl_udc_core-Fix-scheduling-while-atomic-dump-me.patch \
675 file://3.2.14/0028-usb-Fix-build-error-due-to-dma_mask-is-not-at-pdev_a.patch \
676 file://3.2.14/0029-USB-ums_realtek-do-not-use-stack-memory-for-DMA-in-_.patch \
677 file://3.2.14/0030-USB-qcserial-add-several-new-serial-devices.patch \
678 file://3.2.14/0031-USB-qcserial-don-t-grab-QMI-port-on-Gobi-1000-device.patch \
679 file://3.2.14/0032-usb-serial-Add-support-for-the-Sealevel-SeaLINK-8-20.patch \
680 file://3.2.14/0033-usb-cp210x-Update-to-support-CP2105-and-multiple-int.patch \
681 file://3.2.14/0034-USB-serial-mos7840-Fixed-MCS7820-device-attach-probl.patch \
682 file://3.2.14/0035-rt2x00-Add-support-for-D-Link-DWA-127-to-rt2800usb.patch \
683 file://3.2.14/0036-rtlwifi-rtl8192c_common-rtl8192de-Check-for-allocati.patch \
684 file://3.2.14/0037-rtlwifi-Handle-previous-allocation-failures-when-fre.patch \
685 file://3.2.14/0038-rtlwifi-rtl8192c-Prevent-sleeping-from-invalid-conte.patch \
686 file://3.2.14/0039-rtlwifi-rtl8192ce-Fix-loss-of-receive-performance.patch \
687 file://3.2.14/0040-iwlwifi-always-monitor-for-stuck-queues.patch \
688 file://3.2.14/0041-math-Introduce-div64_long.patch \
689 file://3.2.14/0042-ntp-Fix-integer-overflow-when-setting-time.patch \
690 file://3.2.14/0043-uevent-send-events-in-correct-order-according-to-seq.patch \
691 file://3.2.14/0044-genirq-Fix-long-term-regression-in-genirq-irq_set_ir.patch \
692 file://3.2.14/0045-genirq-Fix-incorrect-check-for-forced-IRQ-thread-han.patch \
693 file://3.2.14/0046-rtc-Disable-the-alarm-in-the-hardware-v2.patch \
694 file://3.2.14/0047-p54spi-Release-GPIO-lines-and-IRQ-on-error-in-p54spi.patch \
695 file://3.2.14/0048-rtnetlink-Fix-VF-IFLA-policy.patch \
696 file://3.2.14/0049-IB-iser-Post-initial-receive-buffers-before-sending-.patch \
697 file://3.2.14/0050-ima-fix-Kconfig-dependencies.patch \
698 file://3.2.14/0051-x86-ioapic-Add-register-level-checks-to-detect-bogus.patch \
699 file://3.2.14/0052-mm-thp-fix-pmd_bad-triggering-in-code-paths-holding-.patch \
700 file://3.2.14/0053-TPM-Zero-buffer-whole-after-copying-to-userspace.patch \
701 file://3.2.14/0054-PM-Domains-Fix-handling-of-wakeup-devices-during-sys.patch \
702 file://3.2.14/0055-bootmem-sparsemem-remove-limit-constraint-in-alloc_b.patch \
703 file://3.2.14/0056-hugetlbfs-avoid-taking-i_mutex-from-hugetlbfs_read.patch \
704 file://3.2.14/0057-ASoC-fsl-p1022ds-tell-the-WM8776-codec-driver-that-i.patch \
705 file://3.2.14/0058-ASoC-pxa-ssp-atomically-set-stream-active-masks.patch \
706 file://3.2.14/0059-tcm_loop-Set-residual-field-for-SCSI-commands.patch \
707 file://3.2.14/0060-iscsi-target-Fix-iscsit_alloc_buffs-failure-cases.patch \
708 file://3.2.14/0061-iscsi-target-Fix-dynamic-explict-NodeACL-pointer-ref.patch \
709 file://3.2.14/0062-ALSA-hda-fix-printing-of-high-HDMI-sample-rates.patch \
710 file://3.2.14/0063-usb-gadget-fix-a-section-mismatch-when-compiling-g_f.patch \
711 file://3.2.14/0064-udlfb-remove-sysfs-framebuffer-device-with-USB-.disc.patch \
712 file://3.2.14/0065-tcm_fc-Fix-fc_exch-memory-leak-in-ft_send_resp_statu.patch \
713 file://3.2.14/0066-md-bitmap-ensure-to-load-bitmap-when-creating-via-sy.patch \
714 file://3.2.14/0067-md-don-t-set-md-arrays-to-readonly-on-shutdown.patch \
715 file://3.2.14/0068-md-raid1-raid10-avoid-deadlock-during-resync-recover.patch \
716 file://3.2.14/0069-md-fix-clearing-of-the-changed-flags-for-the-bad-blo.patch \
717 file://3.2.14/0070-drm-i915-Only-clear-the-GPU-domains-upon-a-successfu.patch \
718 file://3.2.14/0071-drm-radeon-Restrict-offset-for-legacy-hardware-curso.patch \
719 file://3.2.14/0072-drm-radeon-kms-fix-analog-load-detection-on-DVI-I-co.patch \
720 file://3.2.14/0073-drm-radeon-kms-add-connector-quirk-for-Fujitsu-D3003.patch \
721 file://3.2.14/0074-target-Don-t-set-WBUS16-or-SYNC-bits-in-INQUIRY-resp.patch \
722 file://3.2.14/0075-target-fix-use-after-free-in-target_report_luns.patch \
723 file://3.2.14/0076-target-prevent-NULL-pointer-dereference-in-target_re.patch \
724 file://3.2.14/0077-target-Fix-16-bit-target-ports-for-SET-TARGET-PORT-G.patch \
725 file://3.2.14/0078-Bluetooth-Add-AR30XX-device-ID-on-Asus-laptops.patch \
726 file://3.2.14/0079-HID-add-extra-hotkeys-in-Asus-AIO-keyboards.patch \
727 file://3.2.14/0080-HID-add-more-hotkeys-in-Asus-AIO-keyboards.patch \
728 file://3.2.14/0081-pata_legacy-correctly-mask-recovery-field-for-HT6560.patch \
729 file://3.2.14/0082-firewire-ohci-fix-too-early-completion-of-IR-multich.patch \
730 file://3.2.14/0083-KVM-x86-extend-struct-x86_emulate_ops-with-get_cpuid.patch \
731 file://3.2.14/0084-KVM-x86-fix-missing-checks-in-syscall-emulation.patch \
732 file://3.2.14/0085-NFS-Properly-handle-the-case-where-the-delegation-is.patch \
733 file://3.2.14/0086-NFSv4-Return-the-delegation-if-the-server-returns-NF.patch \
734 file://3.2.14/0087-xfs-fix-inode-lookup-race.patch \
735 file://3.2.14/0088-CIFS-Respect-negotiated-MaxMpxCount.patch \
736 file://3.2.14/0089-cifs-fix-issue-mounting-of-DFS-ROOT-when-redirecting.patch \
737 file://3.2.14/0090-CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch \
738 file://3.2.14/0091-UBI-fix-error-handling-in-ubi_scan.patch \
739 file://3.2.14/0092-UBI-fix-eraseblock-picking-criteria.patch \
740 file://3.2.14/0093-SUNRPC-We-must-not-use-list_for_each_entry_safe-in-r.patch \
741 file://3.2.14/0094-usbnet-increase-URB-reference-count-before-usb_unlin.patch \
742 file://3.2.14/0095-usbnet-don-t-clear-urb-dev-in-tx_complete.patch \
743 file://3.2.14/0096-e1000e-Avoid-wrong-check-on-TX-hang.patch \
744 file://3.2.14/0097-x86-32-Fix-endless-loop-when-processing-signals-for-.patch \
745 file://3.2.14/0098-proc-ns-use-d_set_d_op-API-to-set-dentry-ops-in-proc.patch \
746 file://3.2.14/0099-iommu-amd-Fix-section-warning-for-prealloc_protectio.patch \
747 file://3.2.14/0100-sysctl-protect-poll-in-entries-that-may-go-away.patch \
748 file://3.2.14/0101-hwmon-fam15h_power-Correct-sign-extension-of-running.patch \
749 file://3.2.14/0102-lgdt330x-fix-signedness-error-in-i2c_read_demod_byte.patch \
750 file://3.2.14/0103-pvrusb2-fix-7MHz-8MHz-DVB-T-tuner-support-for-HVR190.patch \
751 file://3.2.14/0104-mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_st.patch \
752 file://3.2.14/0105-NFSv4-Rate-limit-the-state-manager-warning-messages.patch \
753 file://3.2.14/0106-PM-Hibernate-Enable-usermodehelpers-in-hibernate-err.patch \
754 file://3.2.14/0107-jbd2-clear-BH_Delay-BH_Unwritten-in-journal_unmap_bu.patch \
755 file://3.2.14/0108-ext4-ignore-EXT4_INODE_JOURNAL_DATA-flag-with-delall.patch \
756 file://3.2.14/0109-ext4-fix-race-between-unwritten-extent-conversion-an.patch \
757 file://3.2.14/0110-ext4-fix-race-between-sync-and-completed-io-work.patch \
758 file://3.2.14/0111-ext4-check-for-zero-length-extent.patch \
759 file://3.2.14/0112-vfs-fix-d_ancestor-case-in-d_materialize_unique.patch \
760 file://3.2.14/0113-ARM-tegra-select-required-CPU-and-L2-errata-options.patch \
761 file://3.2.14/0114-udf-Fix-deadlock-in-udf_release_file.patch \
762 file://3.2.14/0115-gpio-omap-fix-_set_gpio_irqenable-implementation.patch \
763 file://3.2.14/0116-gpio-davinci-fix-oops-on-unbanked-gpio-irq-request.patch \
764 file://3.2.14/0117-gpio-davinci-fix-enabling-unbanked-GPIO-IRQs.patch \
765 file://3.2.14/0118-dm-crypt-fix-mempool-deadlock.patch \
766 file://3.2.14/0119-dm-crypt-add-missing-error-handling.patch \
767 file://3.2.14/0120-dm-exception-store-fix-init-error-path.patch \
768 file://3.2.14/0121-dm-persistent-data-fix-btree-rebalancing-after-remov.patch \
769 file://3.2.14/0122-dm-thin-fix-stacked-bi_next-usage.patch \
770 file://3.2.14/0123-backlight-fix-typo-in-tosa_lcd.c.patch \
771 file://3.2.14/0124-xfs-Fix-oops-on-IO-error-during-xlog_recover_process.patch \
772 file://3.2.14/0125-slub-Do-not-hold-slub_lock-when-calling-sysfs_slab_a.patch \
773 file://3.2.14/0126-NFSv4-Fix-two-infinite-loops-in-the-mount-code.patch \
774 file://3.2.14/0127-NFSv4.1-Fix-layoutcommit-error-handling.patch \
775 file://3.2.14/0128-module-Remove-module-size-limit.patch \
776 file://3.2.14/0129-Bluetooth-btusb-fix-bInterval-for-high-super-speed-i.patch \
777 file://3.2.14/0130-drm-i915-suspend-fbdev-device-around-suspend-hiberna.patch \
778 file://3.2.14/0131-Fix-pppol2tp-getsockname.patch \
779 file://3.2.14/0132-ipv6-fix-incorrent-ipv6-ipsec-packet-fragment.patch \
780 file://3.2.14/0133-net-bpf_jit-fix-BPF_S_LDX_B_MSH-compilation.patch \
781 file://3.2.14/0134-net-fix-a-potential-rcu_read_lock-imbalance-in-rt6_f.patch \
782 file://3.2.14/0135-net-fix-napi_reuse_skb-skb-reserve.patch \
783 file://3.2.14/0136-Remove-printk-from-rds_sendmsg.patch \
784 file://3.2.14/0137-sky2-override-for-PCI-legacy-power-management.patch \
785 file://3.2.14/0138-xfrm-Access-the-replay-notify-functions-via-the-regi.patch \
786 file://3.2.14/0139-lockd-fix-arg-parsing-for-grace_period-and-timeout.patch \
787 file://3.2.14/0140-x86-tsc-Skip-refined-tsc-calibration-on-systems-with.patch \
788 file://3.2.14/0141-x86-tls-Off-by-one-limit-check.patch \
789 file://3.2.14/0142-compat-use-sys_sendfile64-implementation-for-sendfil.patch \
790 file://3.2.14/0143-rtc-Provide-flag-for-rtc-devices-that-don-t-support-.patch \
791 file://3.2.14/0144-nfsd-don-t-allow-zero-length-strings-in-cache_parse.patch \
792 file://3.2.14/0145-serial-sh-sci-fix-a-race-of-DMA-submit_tx-on-transfe.patch \
793 file://3.2.14/0146-ASPM-Fix-pcie-devices-with-non-pcie-children.patch \
794 file://3.2.14/0147-Linux-3.2.14.patch \
648 file://beaglebone/0001-f_rndis-HACK-around-undefined-variables.patch \ 795 file://beaglebone/0001-f_rndis-HACK-around-undefined-variables.patch \
649 file://beaglebone/0002-da8xx-fb-add-DVI-support-for-beaglebone.patch \ 796 file://beaglebone/0002-da8xx-fb-add-DVI-support-for-beaglebone.patch \
650 file://beaglebone/0003-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch \ 797 file://beaglebone/0003-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch \