summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-02-10 15:32:32 +0100
committerDenys Dmytriyenko <denys@ti.com>2012-02-27 09:04:13 -0500
commitc4eefd753012467261cf221babd2e8639b81d3ca (patch)
tree0f6e09a6b51f410455330f046a8e03787d5a126e
parent14f31c3c5a19dde049355ced3edd121c31842460 (diff)
downloadmeta-ti-c4eefd753012467261cf221babd2e8639b81d3ca.tar.gz
linux-ti33x-psp 3.2: update to 3.2.5
Runtime tested on a beaglebone A3 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r--conf/machine/include/ti33x.inc2
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0001-MAINTAINERS-stable-Update-address.patch31
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0002-Documentation-Update-stable-address.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0003-firmware-Fix-an-oops-on-reading-fw_priv-fw-in-sysfs-.patch81
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0004-rt2800usb-Move-ID-out-of-unknown.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0005-offb-Fix-setting-of-the-pseudo-palette-for-8bpp.patch92
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0006-offb-Fix-bug-in-calculating-requested-vram-size.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0007-libertas-clean-up-scan-thread-handling.patch86
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0008-bcma-support-for-suspend-and-resume.patch120
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0009-wl12xx-Validate-FEM-index-from-ini-file-and-FW.patch75
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0010-wl12xx-Check-buffer-bound-when-processing-nvs-data.patch68
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0011-wl12xx-Restore-testmode-ABI.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0012-powerpc-time-Handle-wrapping-of-decrementer.patch93
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0013-powerpc-Fix-unpaired-probe_hcall_entry-and-probe_hca.patch85
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0014-IB-qib-Fix-a-possible-data-corruption-when-receiving.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0015-IB-uverbs-Protect-QP-multicast-list.patch96
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0016-iwlagn-fix-TID-use-bug.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0017-iwlagn-fix-remove-use-of-PAGE_SIZE.patch180
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0018-perf-Fix-parsing-of-__print_flags-in-TP_printk.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0019-ore-Fix-crash-in-case-of-an-IO-error.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0020-ore-fix-BUG_ON-too-few-sgs-when-reading.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0021-ore-Must-support-none-PAGE-aligned-IO.patch163
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0022-ore-FIX-breakage-when-MISC_FILESYSTEMS-is-not-set.patch89
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0023-reiserfs-Fix-quota-mount-option-parsing.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0024-reiserfs-Force-inode-evictions-before-umount-to-avoi.patch70
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0025-ext3-Don-t-warn-from-writepage-when-readonly-inode-i.patch73
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0026-drivers-hv-Don-t-OOPS-when-you-cannot-init-vmbus.patch70
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0027-Drivers-hv-Fix-a-bug-in-vmbus_driver_unregister.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0028-USB-update-documentation-for-usbmon.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0029-usbfs-Fix-oops-related-to-user-namespace-conversion.patch125
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0030-atmel_serial-fix-spinlock-lockup-in-RS485-code.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0031-cgroup-fix-to-allow-mounting-a-hierarchy-by-name.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0032-udf-Fix-deadlock-when-converting-file-from-in-ICB-on.patch130
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0033-drivers-usb-class-cdc-acm.c-clear-dangling-pointer.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0034-USB-isight-fix-kernel-bug-when-loading-firmware.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0035-usb-usb-storage-doesn-t-support-dynamic-id-currently.patch121
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0036-USB-pxa168-Fix-compilation-error.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0037-USB-add-quirk-for-another-camera.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0038-USB-omninet-fix-write_room.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0039-usb-option-add-ZD-Incorporated-HSPA-modem.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0040-USB-Add-USB-ID-for-Multiplex-RC-serial-adapter-to-cp.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0041-usb-fix-number-of-mapped-SG-DMA-entries.patch155
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0042-xhci-Properly-handle-COMP_2ND_BW_ERR.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0043-usb-ch9-fix-up-MaxStreams-helper.patch81
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0044-igmp-Avoid-zero-delay-when-receiving-odd-mixture-of-.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0045-asix-fix-infinite-loop-in-rx_fixup.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0046-bonding-fix-error-handling-if-slave-is-busy-v2.patch68
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0047-usb-cdc-acm-Fix-acm_tty_hangup-vs.-acm_tty_close-rac.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0048-xfs-fix-acl-count-validation-in-xfs_acl_from_disk.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0049-Linux-3.2.1.patch24
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch85
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch109
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch74
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch57
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch92
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch70
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch92
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch94
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch30
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch313
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch147
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch81
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch52
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch65
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch160
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch177
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0040-ima-free-duplicate-measurement-memory.patch52
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0041-ima-fix-invalid-memory-reference.patch68
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch101
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch52
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch68
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch179
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0051-x86-Fix-mmap-random-address-range.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0052-UBI-fix-nameless-volumes-handling.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0053-UBI-fix-debugging-messages.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0054-UBI-make-vid_hdr-non-static.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0055-UBIFS-fix-debugging-messages.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch57
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch197
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch71
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch227
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch68
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch98
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch85
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch156
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0069-nfsd4-fix-lockowner-matching.patch59
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch82
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch61
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch172
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0076-fix-shrink_dcache_parent-livelock.patch130
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0079-pnfsblock-limit-bio-page-count.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch635
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch112
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch63
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch63
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch117
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch166
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch166
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch90
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch271
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0099-intel_idle-fix-API-misuse.patch56
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0100-ACPI-Store-SRAT-table-revision.patch66
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch66
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch59
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch75
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch177
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch95
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0113-I2C-OMAP-correct-SYSC-register-offset-for-OMAP4.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0114-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch350
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0115-x86-UV2-Fix-BAU-destination-timeout-initialization.patch66
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0116-x86-UV2-Work-around-BAU-bug.patch570
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0117-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch61
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-rt2800pci-fix-spurious-interrupts-generation.patch86
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0119-xfs-fix-endian-conversion-issue-in-discard-code.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0120-i2c-eg20t-modified-the-setting-of-transfer-rate.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0121-score-fix-off-by-one-index-into-syscall-table.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0122-cifs-lower-default-wsize-when-unix-extensions-are-no.patch67
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0123-kprobes-initialize-before-using-a-hlist.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0124-proc-clear_refs-do-not-clear-reserved-pages.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0125-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch91
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0126-iwlagn-check-for-SMPS-mode.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0127-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0128-SHM_UNLOCK-fix-long-unpreemptible-section.patch186
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0129-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch342
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0130-Linux-3.2.2.patch24
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0001-ALSA-hda-Fix-buffer-alignment-regression-with-Nvidia.patch62
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0002-ALSA-hda-Fix-silent-outputs-from-docking-station-jac.patch64
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0003-eCryptfs-Sanitize-write-counts-of-dev-ecryptfs.patch103
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0004-ecryptfs-Improve-metadata-read-failure-logging.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0005-eCryptfs-Make-truncate-path-killable.patch71
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0006-eCryptfs-Check-inode-changes-in-setattr.patch122
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0007-eCryptfs-Fix-oops-when-printing-debug-info-in-extent.patch103
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0008-drm-radeon-kms-Add-an-MSI-quirk-for-Dell-RS690.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0009-drm-radeon-kms-move-panel-mode-setup-into-encoder-mo.patch130
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0010-drm-radeon-kms-rework-modeset-sequence-for-DCE41-and.patch87
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0011-drm-Fix-authentication-kernel-crash.patch91
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0012-xfs-Fix-missing-xfs_iunlock-on-error-recovery-path-i.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0013-ASoC-Mark-WM5100-register-map-cache-only-when-going-.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0014-ASoC-Disable-register-synchronisation-for-low-freque.patch66
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0015-ASoC-Don-t-go-through-cache-when-applying-WM5100-rev.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0016-ASoC-wm8996-Call-_POST_PMU-callback-for-CPVDD.patch33
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0018-mac80211-fix-work-removal-on-deauth-request.patch111
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0019-jbd-Issue-cache-flush-after-checkpointing.patch118
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0020-crypto-sha512-make-it-work-undo-percpu-message-sched.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0021-crypto-sha512-reduce-stack-usage-to-safe-number.patch129
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0022-tpm_tis-add-delay-after-aborting-command.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0023-x86-uv-Fix-uninitialized-spinlocks.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0024-x86-uv-Fix-uv_gpa_to_soc_phys_ram-shift.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0025-x86-microcode_amd-Add-support-for-CPU-family-specifi.patch75
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0026-m68k-Fix-assembler-constraint-to-prevent-overeager-g.patch172
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0027-ALSA-hda-set-mute-led-polarity-for-laptops-with-bugg.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0028-ALSA-hda-Fix-silent-output-on-ASUS-A6Rp.patch55
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0029-ALSA-hda-Fix-silent-output-on-Haier-W18-laptop.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0030-drm-i915-paper-over-missed-irq-issues-with-force-wak.patch126
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0031-drm-i915-sdvo-always-set-positive-sync-polarity.patch52
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0032-drm-i915-Re-enable-gen7-RC6-and-GPU-turbo-after-resu.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0033-ARM-at91-fix-at91rm9200-soc-subtype-handling.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0034-mach-ux500-enable-ARM-errata-764369.patch31
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0035-ARM-7296-1-proc-v7.S-remove-HARVARD_CACHE-preprocess.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0036-sysfs-Complain-bitterly-about-attempts-to-remove-fil.patch68
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0037-x86-xen-size-struct-xen_spinlock-to-always-fit-in-ar.patch103
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0038-mpt2sas-Removed-redundant-calling-of-_scsih_probe_de.patch96
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0039-USB-option-Add-LG-docomo-L-02C.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0040-USB-ftdi_sio-fix-TIOCSSERIAL-baud_base-handling.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0041-USB-ftdi_sio-fix-initial-baud-rate.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0042-USB-ftdi_sio-add-PID-for-TI-XDS100v2-BeagleBone-A3.patch50
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0043-USB-serial-ftdi-additional-IDs.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0044-USB-ftdi_sio-Add-more-identifiers.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0045-USB-cdc-wdm-updating-desc-length-must-be-protected-b.patch37
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0046-USB-cdc-wdm-use-two-mutexes-to-allow-simultaneous-re.patch178
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0047-qcaux-add-more-Pantech-UML190-and-UML290-ports.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0048-usb-dwc3-ep0-tidy-up-Pending-Request-handling.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0049-usb-io_ti-Make-edge_remove_sysfs_attrs-the-port_remo.patch60
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0050-TTY-fix-UV-serial-console-regression.patch72
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0051-serial-amba-pl011-lock-console-writes-against-interr.patch67
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0052-jsm-Fixed-EEH-recovery-error.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0053-iwlwifi-fix-PCI-E-transport-inta-race.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0054-vmwgfx-Fix-assignment-in-vmw_framebuffer_create_hand.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0055-USB-Realtek-cr-fix-autopm-scheduling-while-atomic.patch36
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0056-USB-usbsevseg-fix-max-length.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0057-usb-gadget-langwell-don-t-call-gadget-s-disconnect.patch94
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0058-usb-gadget-storage-endian-fix.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0059-drivers-usb-host-ehci-fsl.c-add-missing-iounmap.patch54
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0060-xhci-Fix-USB-3.0-device-restart-on-resume.patch51
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0061-xHCI-Cleanup-isoc-transfer-ring-when-TD-length-misma.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0062-usb-musb-davinci-fix-build-breakage.patch41
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0063-hwmon-f71805f-Fix-clamping-of-temperature-limits.patch43
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0064-hwmon-w83627ehf-Disable-setting-DC-mode-for-pwm2-pwm.patch46
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0065-hwmon-sht15-fix-bad-error-code.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0066-USB-cdc-wdm-call-wake_up_all-to-allow-driver-to-shut.patch45
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0067-USB-cdc-wdm-better-allocate-a-buffer-that-is-at-leas.patch38
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0068-USB-cdc-wdm-Avoid-hanging-on-interface-with-no-USB_C.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0069-netns-fix-net_alloc_generic.patch120
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0070-netns-Fail-conspicously-if-someone-uses-net_generic-.patch42
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0071-net-caif-Register-properly-as-a-pernet-subsystem.patch117
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0072-af_unix-fix-EPOLLET-regression-for-stream-sockets.patch96
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0073-bonding-fix-enslaving-in-alb-mode-when-link-down.patch116
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0074-l2tp-l2tp_ip-fix-possible-oops-on-packet-receive.patch73
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0075-macvlan-fix-a-possible-use-after-free.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0076-net-bpf_jit-fix-divide-by-0-generation.patch129
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0077-net-reintroduce-missing-rcu_assign_pointer-calls.patch703
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0078-rds-Make-rds_sock_lock-BH-rather-than-IRQ-safe.patch119
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0079-tcp-fix-tcp_trim_head-to-adjust-segment-count-with-s.patch61
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0080-tcp-md5-using-remote-adress-for-md5-lookup-in-rst-pa.patch49
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0081-USB-serial-CP210x-Added-USB-ID-for-the-Link-Instrume.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch47
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0083-USB-cp210x-fix-CP2104-baudrate-usage.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0084-USB-cp210x-do-not-map-baud-rates-to-B0.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0085-USB-cp210x-fix-up-set_termios-variables.patch44
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0086-USB-cp210x-clean-up-refactor-and-document-speed-hand.patch121
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0087-USB-cp210x-initialise-baud-rate-at-open.patch35
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch48
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0089-mach-ux500-no-MMC_CAP_SD_HIGHSPEED-on-Snowball.patch34
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0090-Linux-3.2.3.patch24
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0001-Revert-ASoC-Mark-WM5100-register-map-cache-only-when.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0002-Revert-ASoC-Don-t-go-through-cache-when-applying-WM5.patch39
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0003-Linux-3.2.4.patch24
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.5/0001-PCI-Rework-ASPM-disable-code.patch236
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.5/0002-Linux-3.2.5.patch24
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/src.txt295
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp_3.2.bb276
277 files changed, 21802 insertions, 2 deletions
diff --git a/conf/machine/include/ti33x.inc b/conf/machine/include/ti33x.inc
index 3807fbbe..fc670d03 100644
--- a/conf/machine/include/ti33x.inc
+++ b/conf/machine/include/ti33x.inc
@@ -3,7 +3,7 @@ SOC_FAMILY = "ti33x"
3require conf/machine/include/tune-cortexa8.inc 3require conf/machine/include/tune-cortexa8.inc
4PREFERRED_PROVIDER_virtual/kernel = "linux-ti33x-psp" 4PREFERRED_PROVIDER_virtual/kernel = "linux-ti33x-psp"
5# Increase this everytime you change something in the kernel 5# Increase this everytime you change something in the kernel
6MACHINE_KERNEL_PR = "r2" 6MACHINE_KERNEL_PR = "r3"
7 7
8KERNEL_IMAGETYPE = "uImage" 8KERNEL_IMAGETYPE = "uImage"
9 9
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0001-MAINTAINERS-stable-Update-address.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0001-MAINTAINERS-stable-Update-address.patch
new file mode 100644
index 00000000..fe2b0d6b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0001-MAINTAINERS-stable-Update-address.patch
@@ -0,0 +1,31 @@
1From d1fe421bb81064477843db98b4804fec79eae30e Mon Sep 17 00:00:00 2001
2From: Joe Perches <joe@perches.com>
3Date: Fri, 9 Dec 2011 13:54:34 -0800
4Subject: [PATCH 01/49] MAINTAINERS: stable: Update address
5
6commit bc7a2f3abc636d7cab84258a48e77b08fb5fd3d6 upstream.
7
8The old address hasn't worked since the great intrusion of August 2011.
9
10Signed-off-by: Joe Perches <joe@perches.com>
11Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12---
13 MAINTAINERS | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/MAINTAINERS b/MAINTAINERS
17index 62f1cd3..f986e7d 100644
18--- a/MAINTAINERS
19+++ b/MAINTAINERS
20@@ -6258,7 +6258,7 @@ F: arch/alpha/kernel/srm_env.c
21
22 STABLE BRANCH
23 M: Greg Kroah-Hartman <greg@kroah.com>
24-L: stable@kernel.org
25+L: stable@vger.kernel.org
26 S: Maintained
27
28 STAGING SUBSYSTEM
29--
301.7.7.4
31
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0002-Documentation-Update-stable-address.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0002-Documentation-Update-stable-address.patch
new file mode 100644
index 00000000..10b9e325
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0002-Documentation-Update-stable-address.patch
@@ -0,0 +1,56 @@
1From 3dc851fe5a59ee0eb306b3a29819ee040ba69a24 Mon Sep 17 00:00:00 2001
2From: Joe Perches <joe@perches.com>
3Date: Fri, 9 Dec 2011 14:12:00 -0800
4Subject: [PATCH 02/49] Documentation: Update stable address
5
6commit 2eb7f204db51969ea558802a6601d79c2fb273b9 upstream.
7
8The Japanese/Korean/Chinese versions still need updating.
9
10Also, the stable kernel 2.6.x.y descriptions are out of date
11and should be updated as well.
12
13Signed-off-by: Joe Perches <joe@perches.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 Documentation/HOWTO | 4 ++--
17 Documentation/development-process/5.Posting | 8 ++++----
18 2 files changed, 6 insertions(+), 6 deletions(-)
19
20diff --git a/Documentation/HOWTO b/Documentation/HOWTO
21index 81bc1a9..f7ade3b 100644
22--- a/Documentation/HOWTO
23+++ b/Documentation/HOWTO
24@@ -275,8 +275,8 @@ versions.
25 If no 2.6.x.y kernel is available, then the highest numbered 2.6.x
26 kernel is the current stable kernel.
27
28-2.6.x.y are maintained by the "stable" team <stable@kernel.org>, and are
29-released as needs dictate. The normal release period is approximately
30+2.6.x.y are maintained by the "stable" team <stable@vger.kernel.org>, and
31+are released as needs dictate. The normal release period is approximately
32 two weeks, but it can be longer if there are no pressing problems. A
33 security-related problem, instead, can cause a release to happen almost
34 instantly.
35diff --git a/Documentation/development-process/5.Posting b/Documentation/development-process/5.Posting
36index 903a254..8a48c9b 100644
37--- a/Documentation/development-process/5.Posting
38+++ b/Documentation/development-process/5.Posting
39@@ -271,10 +271,10 @@ copies should go to:
40 the linux-kernel list.
41
42 - If you are fixing a bug, think about whether the fix should go into the
43- next stable update. If so, stable@kernel.org should get a copy of the
44- patch. Also add a "Cc: stable@kernel.org" to the tags within the patch
45- itself; that will cause the stable team to get a notification when your
46- fix goes into the mainline.
47+ next stable update. If so, stable@vger.kernel.org should get a copy of
48+ the patch. Also add a "Cc: stable@vger.kernel.org" to the tags within
49+ the patch itself; that will cause the stable team to get a notification
50+ when your fix goes into the mainline.
51
52 When selecting recipients for a patch, it is good to have an idea of who
53 you think will eventually accept the patch and get it merged. While it
54--
551.7.7.4
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0003-firmware-Fix-an-oops-on-reading-fw_priv-fw-in-sysfs-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0003-firmware-Fix-an-oops-on-reading-fw_priv-fw-in-sysfs-.patch
new file mode 100644
index 00000000..146af6d3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0003-firmware-Fix-an-oops-on-reading-fw_priv-fw-in-sysfs-.patch
@@ -0,0 +1,81 @@
1From 9fa97016831ab21d14565a478dc462f35dfb7d2b Mon Sep 17 00:00:00 2001
2From: Neil Horman <nhorman@tuxdriver.com>
3Date: Mon, 2 Jan 2012 15:31:23 -0500
4Subject: [PATCH 03/49] firmware: Fix an oops on reading fw_priv->fw in sysfs
5 loading file
6
7commit eea915bb0d1358755f151eaefb8208a2d5f3e10c upstream.
8
9This oops was reported recently:
10firmware_loading_store+0xf9/0x17b
11dev_attr_store+0x20/0x22
12sysfs_write_file+0x101/0x134
13vfs_write+0xac/0xf3
14sys_write+0x4a/0x6e
15system_call_fastpath+0x16/0x1b
16
17The complete backtrace was unfortunately not captured, but details can be found
18here:
19https://bugzilla.redhat.com/show_bug.cgi?id=769920
20
21The cause is fairly clear.
22
23Its caused by the fact that firmware_loading_store has a case 0 in its
24switch statement that reads and writes the fw_priv->fw poniter without the
25protection of the fw_lock mutex. since there is a window between the time that
26_request_firmware sets fw_priv->fw to NULL and the time the corresponding sysfs
27file is unregistered, its possible for a user space application to race in, and
28write a zero to the loading file, causing a NULL dereference in
29firmware_loading_store. Fix it by extending the protection of the fw_lock mutex
30to cover all of the firware_loading_store function.
31
32Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
33Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
34---
35 drivers/base/firmware_class.c | 14 +++++++-------
36 1 files changed, 7 insertions(+), 7 deletions(-)
37
38diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
39index 06ed6b4..3719c94 100644
40--- a/drivers/base/firmware_class.c
41+++ b/drivers/base/firmware_class.c
42@@ -226,13 +226,13 @@ static ssize_t firmware_loading_store(struct device *dev,
43 int loading = simple_strtol(buf, NULL, 10);
44 int i;
45
46+ mutex_lock(&fw_lock);
47+
48+ if (!fw_priv->fw)
49+ goto out;
50+
51 switch (loading) {
52 case 1:
53- mutex_lock(&fw_lock);
54- if (!fw_priv->fw) {
55- mutex_unlock(&fw_lock);
56- break;
57- }
58 firmware_free_data(fw_priv->fw);
59 memset(fw_priv->fw, 0, sizeof(struct firmware));
60 /* If the pages are not owned by 'struct firmware' */
61@@ -243,7 +243,6 @@ static ssize_t firmware_loading_store(struct device *dev,
62 fw_priv->page_array_size = 0;
63 fw_priv->nr_pages = 0;
64 set_bit(FW_STATUS_LOADING, &fw_priv->status);
65- mutex_unlock(&fw_lock);
66 break;
67 case 0:
68 if (test_bit(FW_STATUS_LOADING, &fw_priv->status)) {
69@@ -274,7 +273,8 @@ static ssize_t firmware_loading_store(struct device *dev,
70 fw_load_abort(fw_priv);
71 break;
72 }
73-
74+out:
75+ mutex_unlock(&fw_lock);
76 return count;
77 }
78
79--
801.7.7.4
81
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0004-rt2800usb-Move-ID-out-of-unknown.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0004-rt2800usb-Move-ID-out-of-unknown.patch
new file mode 100644
index 00000000..6923c7ee
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0004-rt2800usb-Move-ID-out-of-unknown.patch
@@ -0,0 +1,43 @@
1From c64f87400ad7f27c043d969e695b3b2384e8a246 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Tue, 27 Dec 2011 12:22:51 -0600
4Subject: [PATCH 04/49] rt2800usb: Move ID out of unknown
5
6commit 3f81f8f1524ccca24df1029b0cf825ecef5e5cdc upstream.
7
8Testing on the openSUSE wireless forum has shown that a Linksys
9WUSB54GC v3 with USB ID 1737:0077 works with rt2800usb when the ID is
10written to /sys/.../new_id. This ID can therefore be moved out of UNKNOWN.
11
12Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
13Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
14Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
15Signed-off-by: John W. Linville <linville@tuxdriver.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 drivers/net/wireless/rt2x00/rt2800usb.c | 2 +-
19 1 files changed, 1 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
22index 3778763..3265b34 100644
23--- a/drivers/net/wireless/rt2x00/rt2800usb.c
24+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
25@@ -976,6 +976,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
26 { USB_DEVICE(0x13b1, 0x0031) },
27 { USB_DEVICE(0x1737, 0x0070) },
28 { USB_DEVICE(0x1737, 0x0071) },
29+ { USB_DEVICE(0x1737, 0x0077) },
30 /* Logitec */
31 { USB_DEVICE(0x0789, 0x0162) },
32 { USB_DEVICE(0x0789, 0x0163) },
33@@ -1171,7 +1172,6 @@ static struct usb_device_id rt2800usb_device_table[] = {
34 { USB_DEVICE(0x1740, 0x0605) },
35 { USB_DEVICE(0x1740, 0x0615) },
36 /* Linksys */
37- { USB_DEVICE(0x1737, 0x0077) },
38 { USB_DEVICE(0x1737, 0x0078) },
39 /* Logitec */
40 { USB_DEVICE(0x0789, 0x0168) },
41--
421.7.7.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0005-offb-Fix-setting-of-the-pseudo-palette-for-8bpp.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0005-offb-Fix-setting-of-the-pseudo-palette-for-8bpp.patch
new file mode 100644
index 00000000..e019802f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0005-offb-Fix-setting-of-the-pseudo-palette-for-8bpp.patch
@@ -0,0 +1,92 @@
1From 698d2012f8540d1cedc1f49013ba320e382cd1d9 Mon Sep 17 00:00:00 2001
2From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3Date: Wed, 28 Dec 2011 00:10:16 +0000
4Subject: [PATCH 05/49] offb: Fix setting of the pseudo-palette for >8bpp
5
6commit 1bb0b7d21584b3f878e2bc880db62351ddee5185 upstream.
7
8When using a >8bpp framebuffer, offb advertises truecolor, not directcolor,
9and doesn't touch the color map even if it has a corresponding access method
10for the real hardware.
11
12Thus it needs to set the pseudo-palette with all 3 components of the color,
13like other truecolor framebuffers, not with copies of the color index like
14a directcolor framebuffer would do.
15
16This went unnoticed for a long time because it's pretty hard to get offb
17to kick in with anything but 8bpp (old BootX under MacOS will do that and
18qemu does it).
19
20Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
21Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
22---
23 drivers/video/offb.c | 50 +++++++++++++++++++++++---------------------------
24 1 files changed, 23 insertions(+), 27 deletions(-)
25
26diff --git a/drivers/video/offb.c b/drivers/video/offb.c
27index cb163a5..24e1fc6 100644
28--- a/drivers/video/offb.c
29+++ b/drivers/video/offb.c
30@@ -100,36 +100,32 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
31 u_int transp, struct fb_info *info)
32 {
33 struct offb_par *par = (struct offb_par *) info->par;
34- int i, depth;
35- u32 *pal = info->pseudo_palette;
36-
37- depth = info->var.bits_per_pixel;
38- if (depth == 16)
39- depth = (info->var.green.length == 5) ? 15 : 16;
40-
41- if (regno > 255 ||
42- (depth == 16 && regno > 63) ||
43- (depth == 15 && regno > 31))
44- return 1;
45-
46- if (regno < 16) {
47- switch (depth) {
48- case 15:
49- pal[regno] = (regno << 10) | (regno << 5) | regno;
50- break;
51- case 16:
52- pal[regno] = (regno << 11) | (regno << 5) | regno;
53- break;
54- case 24:
55- pal[regno] = (regno << 16) | (regno << 8) | regno;
56- break;
57- case 32:
58- i = (regno << 8) | regno;
59- pal[regno] = (i << 16) | i;
60- break;
61+
62+ if (info->fix.visual == FB_VISUAL_TRUECOLOR) {
63+ u32 *pal = info->pseudo_palette;
64+ u32 cr = red >> (16 - info->var.red.length);
65+ u32 cg = green >> (16 - info->var.green.length);
66+ u32 cb = blue >> (16 - info->var.blue.length);
67+ u32 value;
68+
69+ if (regno >= 16)
70+ return -EINVAL;
71+
72+ value = (cr << info->var.red.offset) |
73+ (cg << info->var.green.offset) |
74+ (cb << info->var.blue.offset);
75+ if (info->var.transp.length > 0) {
76+ u32 mask = (1 << info->var.transp.length) - 1;
77+ mask <<= info->var.transp.offset;
78+ value |= mask;
79 }
80+ pal[regno] = value;
81+ return 0;
82 }
83
84+ if (regno > 255)
85+ return -EINVAL;
86+
87 red >>= 8;
88 green >>= 8;
89 blue >>= 8;
90--
911.7.7.4
92
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0006-offb-Fix-bug-in-calculating-requested-vram-size.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0006-offb-Fix-bug-in-calculating-requested-vram-size.patch
new file mode 100644
index 00000000..19c6d428
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0006-offb-Fix-bug-in-calculating-requested-vram-size.patch
@@ -0,0 +1,32 @@
1From 37c7c45ec59ce80eaedb2b8edc4b797e4ad0ef03 Mon Sep 17 00:00:00 2001
2From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3Date: Tue, 3 Jan 2012 12:09:15 +1100
4Subject: [PATCH 06/49] offb: Fix bug in calculating requested vram size
5
6commit c055fe0797b7bd8f6f21a13598a55a16d5c13ae7 upstream.
7
8We used to try to request 8 times more vram than needed, which would
9fail if the card has a too small BAR (observed with qemu & kvm).
10
11Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13---
14 drivers/video/offb.c | 2 +-
15 1 files changed, 1 insertions(+), 1 deletions(-)
16
17diff --git a/drivers/video/offb.c b/drivers/video/offb.c
18index 24e1fc6..3251a02 100644
19--- a/drivers/video/offb.c
20+++ b/drivers/video/offb.c
21@@ -377,7 +377,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
22 int pitch, unsigned long address,
23 int foreign_endian, struct device_node *dp)
24 {
25- unsigned long res_size = pitch * height * (depth + 7) / 8;
26+ unsigned long res_size = pitch * height;
27 struct offb_par *par = &default_par;
28 unsigned long res_start = address;
29 struct fb_fix_screeninfo *fix;
30--
311.7.7.4
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0007-libertas-clean-up-scan-thread-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0007-libertas-clean-up-scan-thread-handling.patch
new file mode 100644
index 00000000..38fbce3c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0007-libertas-clean-up-scan-thread-handling.patch
@@ -0,0 +1,86 @@
1From 3184baa0e69e6ad327808b91e0d915090c59b99b Mon Sep 17 00:00:00 2001
2From: Andres Salomon <dilinger@queued.net>
3Date: Mon, 19 Dec 2011 12:22:58 -0800
4Subject: [PATCH 07/49] libertas: clean up scan thread handling
5
6commit afbca95f95f2bf7283a72670c24c1f6de00b1cb5 upstream.
7
8The libertas scan thread expects priv->scan_req to be non-NULL. In theory,
9it should always be set. In practice, we've seen the following oops:
10
11[ 8363.067444] Unable to handle kernel NULL pointer dereference at virtual address 00000004
12[ 8363.067490] pgd = c0004000
13[ 8363.078393] [00000004] *pgd=00000000
14[ 8363.086711] Internal error: Oops: 17 [#1] PREEMPT
15[ 8363.091375] Modules linked in: fuse libertas_sdio libertas psmouse mousedev ov7670 mmp_camera joydev videobuf2_core videobuf2_dma_sg videobuf2_memops [last unloaded: scsi_wait_scan]
16[ 8363.107490] CPU: 0 Not tainted (3.0.0-gf7ccc69 #671)
17[ 8363.112799] PC is at lbs_scan_worker+0x108/0x5a4 [libertas]
18[ 8363.118326] LR is at 0x0
19[ 8363.120836] pc : [<bf03a854>] lr : [<00000000>] psr: 60000113
20[ 8363.120845] sp : ee66bf48 ip : 00000000 fp : 00000000
21[ 8363.120845] r10: ee2c2088 r9 : c04e2efc r8 : eef97005
22[ 8363.132231] r7 : eee0716f r6 : ee2c02c0 r5 : ee2c2088 r4 : eee07160
23[ 8363.137419] r3 : 00000000 r2 : a0000113 r1 : 00000001 r0 : eee07160
24[ 8363.143896] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
25[ 8363.157630] Control: 10c5387d Table: 2e754019 DAC: 00000015
26[ 8363.163334] Process kworker/u:1 (pid: 25, stack limit = 0xee66a2f8)
27
28While I've not found a smoking gun, there are two places that raised red flags
29for me. The first is in _internal_start_scan, when we queue up a scan; we
30first queue the worker, and then set priv->scan_req. There's theoretically
31a 50mS delay which should be plenty, but doing things that way just seems
32racy (and not in the good way).
33
34The second is in the scan worker thread itself. Depending on the state of
35priv->scan_channel, we cancel pending scan runs and then requeue a run in
36300mS. We then send the scan command down to the hardware, sleep, and if
37we get scan results for all the desired channels, we set priv->scan_req to
38NULL. However, it that's happened in less than 300mS, what happens with
39the pending scan run?
40
41This patch addresses both of those concerns. With the patch applied, we
42have not seen the oops in the past two weeks.
43
44Signed-off-by: Andres Salomon <dilinger@queued.net>
45Signed-off-by: John W. Linville <linville@tuxdriver.com>
46Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
47---
48 drivers/net/wireless/libertas/cfg.c | 10 ++++++----
49 1 files changed, 6 insertions(+), 4 deletions(-)
50
51diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
52index a7f1ab2..db64ef1 100644
53--- a/drivers/net/wireless/libertas/cfg.c
54+++ b/drivers/net/wireless/libertas/cfg.c
55@@ -728,9 +728,11 @@ static void lbs_scan_worker(struct work_struct *work)
56 le16_to_cpu(scan_cmd->hdr.size),
57 lbs_ret_scan, 0);
58
59- if (priv->scan_channel >= priv->scan_req->n_channels)
60+ if (priv->scan_channel >= priv->scan_req->n_channels) {
61 /* Mark scan done */
62+ cancel_delayed_work(&priv->scan_work);
63 lbs_scan_done(priv);
64+ }
65
66 /* Restart network */
67 if (carrier)
68@@ -759,12 +761,12 @@ static void _internal_start_scan(struct lbs_private *priv, bool internal,
69 request->n_ssids, request->n_channels, request->ie_len);
70
71 priv->scan_channel = 0;
72- queue_delayed_work(priv->work_thread, &priv->scan_work,
73- msecs_to_jiffies(50));
74-
75 priv->scan_req = request;
76 priv->internal_scan = internal;
77
78+ queue_delayed_work(priv->work_thread, &priv->scan_work,
79+ msecs_to_jiffies(50));
80+
81 lbs_deb_leave(LBS_DEB_CFG80211);
82 }
83
84--
851.7.7.4
86
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0008-bcma-support-for-suspend-and-resume.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0008-bcma-support-for-suspend-and-resume.patch
new file mode 100644
index 00000000..fa518499
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0008-bcma-support-for-suspend-and-resume.patch
@@ -0,0 +1,120 @@
1From 84c0b10f18c54e0f669f9ac81872db6aff1e59b4 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3Date: Fri, 9 Dec 2011 22:16:07 +0100
4Subject: [PATCH 08/49] bcma: support for suspend and resume
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 775ab52142b02237a54184238e922251c59a2b5c upstream.
10
11bcma used to lock up machine without enabling PCI or initializing CC.
12
13Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
14Signed-off-by: John W. Linville <linville@tuxdriver.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/bcma/bcma_private.h | 3 +++
18 drivers/bcma/host_pci.c | 37 +++++++++++++++++++++++++++++++++++++
19 drivers/bcma/main.c | 16 ++++++++++++++++
20 3 files changed, 56 insertions(+), 0 deletions(-)
21
22diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
23index 30a3085..fda56bd 100644
24--- a/drivers/bcma/bcma_private.h
25+++ b/drivers/bcma/bcma_private.h
26@@ -18,6 +18,9 @@ void bcma_bus_unregister(struct bcma_bus *bus);
27 int __init bcma_bus_early_register(struct bcma_bus *bus,
28 struct bcma_device *core_cc,
29 struct bcma_device *core_mips);
30+#ifdef CONFIG_PM
31+int bcma_bus_resume(struct bcma_bus *bus);
32+#endif
33
34 /* scan.c */
35 int bcma_bus_scan(struct bcma_bus *bus);
36diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
37index 1b51d8b..990f5a8 100644
38--- a/drivers/bcma/host_pci.c
39+++ b/drivers/bcma/host_pci.c
40@@ -224,6 +224,41 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
41 pci_set_drvdata(dev, NULL);
42 }
43
44+#ifdef CONFIG_PM
45+static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
46+{
47+ /* Host specific */
48+ pci_save_state(dev);
49+ pci_disable_device(dev);
50+ pci_set_power_state(dev, pci_choose_state(dev, state));
51+
52+ return 0;
53+}
54+
55+static int bcma_host_pci_resume(struct pci_dev *dev)
56+{
57+ struct bcma_bus *bus = pci_get_drvdata(dev);
58+ int err;
59+
60+ /* Host specific */
61+ pci_set_power_state(dev, 0);
62+ err = pci_enable_device(dev);
63+ if (err)
64+ return err;
65+ pci_restore_state(dev);
66+
67+ /* Bus specific */
68+ err = bcma_bus_resume(bus);
69+ if (err)
70+ return err;
71+
72+ return 0;
73+}
74+#else /* CONFIG_PM */
75+# define bcma_host_pci_suspend NULL
76+# define bcma_host_pci_resume NULL
77+#endif /* CONFIG_PM */
78+
79 static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
80 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x0576) },
81 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4331) },
82@@ -239,6 +274,8 @@ static struct pci_driver bcma_pci_bridge_driver = {
83 .id_table = bcma_pci_bridge_tbl,
84 .probe = bcma_host_pci_probe,
85 .remove = bcma_host_pci_remove,
86+ .suspend = bcma_host_pci_suspend,
87+ .resume = bcma_host_pci_resume,
88 };
89
90 int __init bcma_host_pci_init(void)
91diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
92index 70c84b9..10f92b3 100644
93--- a/drivers/bcma/main.c
94+++ b/drivers/bcma/main.c
95@@ -240,6 +240,22 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
96 return 0;
97 }
98
99+#ifdef CONFIG_PM
100+int bcma_bus_resume(struct bcma_bus *bus)
101+{
102+ struct bcma_device *core;
103+
104+ /* Init CC core */
105+ core = bcma_find_core(bus, BCMA_CORE_CHIPCOMMON);
106+ if (core) {
107+ bus->drv_cc.setup_done = false;
108+ bcma_core_chipcommon_init(&bus->drv_cc);
109+ }
110+
111+ return 0;
112+}
113+#endif
114+
115 int __bcma_driver_register(struct bcma_driver *drv, struct module *owner)
116 {
117 drv->drv.name = drv->name;
118--
1191.7.7.4
120
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0009-wl12xx-Validate-FEM-index-from-ini-file-and-FW.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0009-wl12xx-Validate-FEM-index-from-ini-file-and-FW.patch
new file mode 100644
index 00000000..3380e52b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0009-wl12xx-Validate-FEM-index-from-ini-file-and-FW.patch
@@ -0,0 +1,75 @@
1From aa9c7fd565d04120156ef720235e9a759638606a Mon Sep 17 00:00:00 2001
2From: Pontus Fuchs <pontus.fuchs@gmail.com>
3Date: Tue, 18 Oct 2011 09:23:41 +0200
4Subject: [PATCH 09/49] wl12xx: Validate FEM index from ini file and FW
5
6commit 2131d3c2f99b081806fdae7662c92fe6acda52af upstream.
7
8Check for out of bound FEM index to prevent reading beyond ini
9memory end.
10
11Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
12Reviewed-by: Luciano Coelho <coelho@ti.com>
13Signed-off-by: Luciano Coelho <coelho@ti.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/net/wireless/wl12xx/cmd.c | 22 ++++++++++++++++++++++
17 1 files changed, 22 insertions(+), 0 deletions(-)
18
19diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
20index a52299e..54a0d66 100644
21--- a/drivers/net/wireless/wl12xx/cmd.c
22+++ b/drivers/net/wireless/wl12xx/cmd.c
23@@ -120,6 +120,11 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
24 if (!wl->nvs)
25 return -ENODEV;
26
27+ if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
28+ wl1271_warning("FEM index from INI out of bounds");
29+ return -EINVAL;
30+ }
31+
32 gen_parms = kzalloc(sizeof(*gen_parms), GFP_KERNEL);
33 if (!gen_parms)
34 return -ENOMEM;
35@@ -143,6 +148,12 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
36 gp->tx_bip_fem_manufacturer =
37 gen_parms->general_params.tx_bip_fem_manufacturer;
38
39+ if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
40+ wl1271_warning("FEM index from FW out of bounds");
41+ ret = -EINVAL;
42+ goto out;
43+ }
44+
45 wl1271_debug(DEBUG_CMD, "FEM autodetect: %s, manufacturer: %d\n",
46 answer ? "auto" : "manual", gp->tx_bip_fem_manufacturer);
47
48@@ -162,6 +173,11 @@ int wl128x_cmd_general_parms(struct wl1271 *wl)
49 if (!wl->nvs)
50 return -ENODEV;
51
52+ if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
53+ wl1271_warning("FEM index from ini out of bounds");
54+ return -EINVAL;
55+ }
56+
57 gen_parms = kzalloc(sizeof(*gen_parms), GFP_KERNEL);
58 if (!gen_parms)
59 return -ENOMEM;
60@@ -186,6 +202,12 @@ int wl128x_cmd_general_parms(struct wl1271 *wl)
61 gp->tx_bip_fem_manufacturer =
62 gen_parms->general_params.tx_bip_fem_manufacturer;
63
64+ if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
65+ wl1271_warning("FEM index from FW out of bounds");
66+ ret = -EINVAL;
67+ goto out;
68+ }
69+
70 wl1271_debug(DEBUG_CMD, "FEM autodetect: %s, manufacturer: %d\n",
71 answer ? "auto" : "manual", gp->tx_bip_fem_manufacturer);
72
73--
741.7.7.4
75
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0010-wl12xx-Check-buffer-bound-when-processing-nvs-data.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0010-wl12xx-Check-buffer-bound-when-processing-nvs-data.patch
new file mode 100644
index 00000000..d462ef66
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0010-wl12xx-Check-buffer-bound-when-processing-nvs-data.patch
@@ -0,0 +1,68 @@
1From bcd7880977c293b60ae6dbae4264d6c47be08fb9 Mon Sep 17 00:00:00 2001
2From: Pontus Fuchs <pontus.fuchs@gmail.com>
3Date: Tue, 18 Oct 2011 09:23:42 +0200
4Subject: [PATCH 10/49] wl12xx: Check buffer bound when processing nvs data
5
6commit f6efe96edd9c41c624c8f4ddbc4930c1a2d8f1e1 upstream.
7
8An nvs with malformed contents could cause the processing of the
9calibration data to read beyond the end of the buffer. Prevent this
10from happening by adding bound checking.
11
12Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
13Reviewed-by: Luciano Coelho <coelho@ti.com>
14Signed-off-by: Luciano Coelho <coelho@ti.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/net/wireless/wl12xx/boot.c | 14 ++++++++++++++
18 1 files changed, 14 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c
21index 6813379..a7b327d 100644
22--- a/drivers/net/wireless/wl12xx/boot.c
23+++ b/drivers/net/wireless/wl12xx/boot.c
24@@ -347,6 +347,9 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl)
25 nvs_ptr += 3;
26
27 for (i = 0; i < burst_len; i++) {
28+ if (nvs_ptr + 3 >= (u8 *) wl->nvs + nvs_len)
29+ goto out_badnvs;
30+
31 val = (nvs_ptr[0] | (nvs_ptr[1] << 8)
32 | (nvs_ptr[2] << 16) | (nvs_ptr[3] << 24));
33
34@@ -358,6 +361,9 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl)
35 nvs_ptr += 4;
36 dest_addr += 4;
37 }
38+
39+ if (nvs_ptr >= (u8 *) wl->nvs + nvs_len)
40+ goto out_badnvs;
41 }
42
43 /*
44@@ -369,6 +375,10 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl)
45 */
46 nvs_ptr = (u8 *)wl->nvs +
47 ALIGN(nvs_ptr - (u8 *)wl->nvs + 7, 4);
48+
49+ if (nvs_ptr >= (u8 *) wl->nvs + nvs_len)
50+ goto out_badnvs;
51+
52 nvs_len -= nvs_ptr - (u8 *)wl->nvs;
53
54 /* Now we must set the partition correctly */
55@@ -384,6 +394,10 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl)
56
57 kfree(nvs_aligned);
58 return 0;
59+
60+out_badnvs:
61+ wl1271_error("nvs data is malformed");
62+ return -EILSEQ;
63 }
64
65 static void wl1271_boot_enable_interrupts(struct wl1271 *wl)
66--
671.7.7.4
68
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0011-wl12xx-Restore-testmode-ABI.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0011-wl12xx-Restore-testmode-ABI.patch
new file mode 100644
index 00000000..7c619d49
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0011-wl12xx-Restore-testmode-ABI.patch
@@ -0,0 +1,32 @@
1From 78848b4805314cdbf6c342b8315cdf7db2a1d09e Mon Sep 17 00:00:00 2001
2From: Pontus Fuchs <pontus.fuchs@gmail.com>
3Date: Thu, 1 Dec 2011 12:13:44 +0100
4Subject: [PATCH 11/49] wl12xx: Restore testmode ABI
5
6commit 3f1764945eaac532c20ab1f23afa352a40f797b2 upstream.
7
8Commit 80900d0140a7648587982c8f299830e900e49165 accidently broke
9the ABI for testmode commands. Restore the ABI again.
10
11Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
12Signed-off-by: Luciano Coelho <coelho@ti.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14---
15 drivers/net/wireless/wl12xx/testmode.c | 1 +
16 1 files changed, 1 insertions(+), 0 deletions(-)
17
18diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c
19index 4ae8eff..abfb120 100644
20--- a/drivers/net/wireless/wl12xx/testmode.c
21+++ b/drivers/net/wireless/wl12xx/testmode.c
22@@ -36,6 +36,7 @@ enum wl1271_tm_commands {
23 WL1271_TM_CMD_TEST,
24 WL1271_TM_CMD_INTERROGATE,
25 WL1271_TM_CMD_CONFIGURE,
26+ WL1271_TM_CMD_NVS_PUSH, /* Not in use. Keep to not break ABI */
27 WL1271_TM_CMD_SET_PLT_MODE,
28 WL1271_TM_CMD_RECOVER,
29
30--
311.7.7.4
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0012-powerpc-time-Handle-wrapping-of-decrementer.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0012-powerpc-time-Handle-wrapping-of-decrementer.patch
new file mode 100644
index 00000000..77fcc8b4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0012-powerpc-time-Handle-wrapping-of-decrementer.patch
@@ -0,0 +1,93 @@
1From 9c146884a6b099ed8892c056e26eae85019bc2c9 Mon Sep 17 00:00:00 2001
2From: Anton Blanchard <anton@samba.org>
3Date: Wed, 23 Nov 2011 20:07:17 +0000
4Subject: [PATCH 12/49] powerpc/time: Handle wrapping of decrementer
5
6commit 37fb9a0231ee43d42d069863bdfd567fca2b61af upstream.
7
8When re-enabling interrupts we have code to handle edge sensitive
9decrementers by resetting the decrementer to 1 whenever it is negative.
10If interrupts were disabled long enough that the decrementer wrapped to
11positive we do nothing. This means interrupts can be delayed for a long
12time until it finally goes negative again.
13
14While we hope interrupts are never be disabled long enough for the
15decrementer to go positive, we have a very good test team that can
16drive any kernel into the ground. The softlockup data we get back
17from these fails could be seconds in the future, completely missing
18the cause of the lockup.
19
20We already keep track of the timebase of the next event so use that
21to work out if we should trigger a decrementer exception.
22
23Signed-off-by: Anton Blanchard <anton@samba.org>
24Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
26---
27 arch/powerpc/include/asm/time.h | 2 ++
28 arch/powerpc/kernel/irq.c | 15 ++++++---------
29 arch/powerpc/kernel/time.c | 9 +++++++++
30 3 files changed, 17 insertions(+), 9 deletions(-)
31
32diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h
33index fe6f7c2..bc3c745 100644
34--- a/arch/powerpc/include/asm/time.h
35+++ b/arch/powerpc/include/asm/time.h
36@@ -219,5 +219,7 @@ DECLARE_PER_CPU(struct cpu_usage, cpu_usage_array);
37 extern void secondary_cpu_time_init(void);
38 extern void iSeries_time_init_early(void);
39
40+extern void decrementer_check_overflow(void);
41+
42 #endif /* __KERNEL__ */
43 #endif /* __POWERPC_TIME_H */
44diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
45index 5c3c469..745c1e7 100644
46--- a/arch/powerpc/kernel/irq.c
47+++ b/arch/powerpc/kernel/irq.c
48@@ -164,16 +164,13 @@ notrace void arch_local_irq_restore(unsigned long en)
49 */
50 local_paca->hard_enabled = en;
51
52-#ifndef CONFIG_BOOKE
53- /* On server, re-trigger the decrementer if it went negative since
54- * some processors only trigger on edge transitions of the sign bit.
55- *
56- * BookE has a level sensitive decrementer (latches in TSR) so we
57- * don't need that
58+ /*
59+ * Trigger the decrementer if we have a pending event. Some processors
60+ * only trigger on edge transitions of the sign bit. We might also
61+ * have disabled interrupts long enough that the decrementer wrapped
62+ * to positive.
63 */
64- if ((int)mfspr(SPRN_DEC) < 0)
65- mtspr(SPRN_DEC, 1);
66-#endif /* CONFIG_BOOKE */
67+ decrementer_check_overflow();
68
69 /*
70 * Force the delivery of pending soft-disabled interrupts on PS3.
71diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
72index 522bb1d..5db163c 100644
73--- a/arch/powerpc/kernel/time.c
74+++ b/arch/powerpc/kernel/time.c
75@@ -889,6 +889,15 @@ static void __init clocksource_init(void)
76 clock->name, clock->mult, clock->shift);
77 }
78
79+void decrementer_check_overflow(void)
80+{
81+ u64 now = get_tb_or_rtc();
82+ struct decrementer_clock *decrementer = &__get_cpu_var(decrementers);
83+
84+ if (now >= decrementer->next_tb)
85+ set_dec(1);
86+}
87+
88 static int decrementer_set_next_event(unsigned long evt,
89 struct clock_event_device *dev)
90 {
91--
921.7.7.4
93
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0013-powerpc-Fix-unpaired-probe_hcall_entry-and-probe_hca.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0013-powerpc-Fix-unpaired-probe_hcall_entry-and-probe_hca.patch
new file mode 100644
index 00000000..69c746e2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0013-powerpc-Fix-unpaired-probe_hcall_entry-and-probe_hca.patch
@@ -0,0 +1,85 @@
1From 78f337d172aafe8577dab8044f26326850b6c5d0 Mon Sep 17 00:00:00 2001
2From: Li Zhong <zhong@linux.vnet.ibm.com>
3Date: Sun, 18 Dec 2011 16:03:04 +0000
4Subject: [PATCH 13/49] powerpc: Fix unpaired probe_hcall_entry and
5 probe_hcall_exit
6
7commit e4f387d8db3ba3c2dae4d8bdfe7bb5f4fe1bcb0d upstream.
8
9Unpaired calling of probe_hcall_entry and probe_hcall_exit might happen
10as following, which could cause incorrect preempt count.
11
12__trace_hcall_entry => trace_hcall_entry -> probe_hcall_entry =>
13get_cpu_var => preempt_disable
14
15__trace_hcall_exit => trace_hcall_exit -> probe_hcall_exit =>
16put_cpu_var => preempt_enable
17
18where:
19A => B and A -> B means A calls B, but
20=> means A will call B through function name, and B will definitely be
21called.
22-> means A will call B through function pointer, so B might not be
23called if the function pointer is not set.
24
25So error happens when only one of probe_hcall_entry and probe_hcall_exit
26get called during a hcall.
27
28This patch tries to move the preempt count operations from
29probe_hcall_entry and probe_hcall_exit to its callers.
30
31Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
32Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
33Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
34Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
35Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
36---
37 arch/powerpc/platforms/pseries/hvCall_inst.c | 4 +---
38 arch/powerpc/platforms/pseries/lpar.c | 2 ++
39 2 files changed, 3 insertions(+), 3 deletions(-)
40
41diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c
42index f106662..c9311cf 100644
43--- a/arch/powerpc/platforms/pseries/hvCall_inst.c
44+++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
45@@ -109,7 +109,7 @@ static void probe_hcall_entry(void *ignored, unsigned long opcode, unsigned long
46 if (opcode > MAX_HCALL_OPCODE)
47 return;
48
49- h = &get_cpu_var(hcall_stats)[opcode / 4];
50+ h = &__get_cpu_var(hcall_stats)[opcode / 4];
51 h->tb_start = mftb();
52 h->purr_start = mfspr(SPRN_PURR);
53 }
54@@ -126,8 +126,6 @@ static void probe_hcall_exit(void *ignored, unsigned long opcode, unsigned long
55 h->num_calls++;
56 h->tb_total += mftb() - h->tb_start;
57 h->purr_total += mfspr(SPRN_PURR) - h->purr_start;
58-
59- put_cpu_var(hcall_stats);
60 }
61
62 static int __init hcall_inst_init(void)
63diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
64index 27a4950..dc36ea6 100644
65--- a/arch/powerpc/platforms/pseries/lpar.c
66+++ b/arch/powerpc/platforms/pseries/lpar.c
67@@ -554,6 +554,7 @@ void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
68 goto out;
69
70 (*depth)++;
71+ preempt_disable();
72 trace_hcall_entry(opcode, args);
73 (*depth)--;
74
75@@ -576,6 +577,7 @@ void __trace_hcall_exit(long opcode, unsigned long retval,
76
77 (*depth)++;
78 trace_hcall_exit(opcode, retval, retbuf);
79+ preempt_enable();
80 (*depth)--;
81
82 out:
83--
841.7.7.4
85
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0014-IB-qib-Fix-a-possible-data-corruption-when-receiving.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0014-IB-qib-Fix-a-possible-data-corruption-when-receiving.patch
new file mode 100644
index 00000000..8f8624a8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0014-IB-qib-Fix-a-possible-data-corruption-when-receiving.patch
@@ -0,0 +1,78 @@
1From 838487db8eb68ce5fa5417e9ea1333795f172523 Mon Sep 17 00:00:00 2001
2From: Ram Vepa <ram.vepa@qlogic.com>
3Date: Fri, 23 Dec 2011 08:01:43 -0500
4Subject: [PATCH 14/49] IB/qib: Fix a possible data corruption when receiving
5 packets
6
7commit eddfb675256f49d14e8c5763098afe3eb2c93701 upstream.
8
9Prevent a receive data corruption by ensuring that the write to update
10the rcvhdrheadn register to generate an interrupt is at the very end
11of the receive processing.
12
13Signed-off-by: Ramkrishna Vepa <ram.vepa@qlogic.com>
14Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
15Signed-off-by: Roland Dreier <roland@purestorage.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 drivers/infiniband/hw/qib/qib_iba6120.c | 4 +++-
19 drivers/infiniband/hw/qib/qib_iba7220.c | 4 +++-
20 drivers/infiniband/hw/qib/qib_iba7322.c | 6 ++++--
21 3 files changed, 10 insertions(+), 4 deletions(-)
22
23diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c
24index 781a802..4f18e2d 100644
25--- a/drivers/infiniband/hw/qib/qib_iba6120.c
26+++ b/drivers/infiniband/hw/qib/qib_iba6120.c
27@@ -2076,9 +2076,11 @@ static void qib_6120_config_ctxts(struct qib_devdata *dd)
28 static void qib_update_6120_usrhead(struct qib_ctxtdata *rcd, u64 hd,
29 u32 updegr, u32 egrhd, u32 npkts)
30 {
31- qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
32 if (updegr)
33 qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt);
34+ mmiowb();
35+ qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
36+ mmiowb();
37 }
38
39 static u32 qib_6120_hdrqempty(struct qib_ctxtdata *rcd)
40diff --git a/drivers/infiniband/hw/qib/qib_iba7220.c b/drivers/infiniband/hw/qib/qib_iba7220.c
41index 439d3c5..7ec4048 100644
42--- a/drivers/infiniband/hw/qib/qib_iba7220.c
43+++ b/drivers/infiniband/hw/qib/qib_iba7220.c
44@@ -2725,9 +2725,11 @@ static int qib_7220_set_loopback(struct qib_pportdata *ppd, const char *what)
45 static void qib_update_7220_usrhead(struct qib_ctxtdata *rcd, u64 hd,
46 u32 updegr, u32 egrhd, u32 npkts)
47 {
48- qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
49 if (updegr)
50 qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt);
51+ mmiowb();
52+ qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
53+ mmiowb();
54 }
55
56 static u32 qib_7220_hdrqempty(struct qib_ctxtdata *rcd)
57diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
58index 1d58959..5a070e8 100644
59--- a/drivers/infiniband/hw/qib/qib_iba7322.c
60+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
61@@ -4082,10 +4082,12 @@ static void qib_update_7322_usrhead(struct qib_ctxtdata *rcd, u64 hd,
62 */
63 if (hd >> IBA7322_HDRHEAD_PKTINT_SHIFT)
64 adjust_rcv_timeout(rcd, npkts);
65- qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
66- qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
67 if (updegr)
68 qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt);
69+ mmiowb();
70+ qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
71+ qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
72+ mmiowb();
73 }
74
75 static u32 qib_7322_hdrqempty(struct qib_ctxtdata *rcd)
76--
771.7.7.4
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0015-IB-uverbs-Protect-QP-multicast-list.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0015-IB-uverbs-Protect-QP-multicast-list.patch
new file mode 100644
index 00000000..bff13510
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0015-IB-uverbs-Protect-QP-multicast-list.patch
@@ -0,0 +1,96 @@
1From a2beea13ae4c2ffcaa7f0ddf94fde1246e2e6fc1 Mon Sep 17 00:00:00 2001
2From: Eli Cohen <eli@dev.mellanox.co.il>
3Date: Tue, 3 Jan 2012 20:36:48 -0800
4Subject: [PATCH 15/49] IB/uverbs: Protect QP multicast list
5
6commit e214a0fe2b382fa302c036ecd6e6ffe99e3b9875 upstream.
7
8Userspace verbs multicast attach/detach operations on a QP are done
9while holding the rwsem of the QP for reading. That's not sufficient
10since a reader lock allows more than one reader to acquire the
11lock. However, multicast attach/detach does list manipulation that
12can corrupt the list if multiple threads run in parallel.
13
14Fix this by acquiring the rwsem as a writer to serialize attach/detach
15operations. Add idr_write_qp() and put_qp_write() to encapsulate
16this.
17
18This fixes oops seen when running applications that perform multicast
19joins/leaves.
20
21Reported by: Mike Dubman <miked@mellanox.com>
22Signed-off-by: Eli Cohen <eli@mellanox.com>
23Signed-off-by: Roland Dreier <roland@purestorage.com>
24Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
25---
26 drivers/infiniband/core/uverbs_cmd.c | 21 +++++++++++++++++----
27 1 files changed, 17 insertions(+), 4 deletions(-)
28
29diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
30index 254f164..e3db8ef 100644
31--- a/drivers/infiniband/core/uverbs_cmd.c
32+++ b/drivers/infiniband/core/uverbs_cmd.c
33@@ -241,11 +241,24 @@ static struct ib_qp *idr_read_qp(int qp_handle, struct ib_ucontext *context)
34 return idr_read_obj(&ib_uverbs_qp_idr, qp_handle, context, 0);
35 }
36
37+static struct ib_qp *idr_write_qp(int qp_handle, struct ib_ucontext *context)
38+{
39+ struct ib_uobject *uobj;
40+
41+ uobj = idr_write_uobj(&ib_uverbs_qp_idr, qp_handle, context);
42+ return uobj ? uobj->object : NULL;
43+}
44+
45 static void put_qp_read(struct ib_qp *qp)
46 {
47 put_uobj_read(qp->uobject);
48 }
49
50+static void put_qp_write(struct ib_qp *qp)
51+{
52+ put_uobj_write(qp->uobject);
53+}
54+
55 static struct ib_srq *idr_read_srq(int srq_handle, struct ib_ucontext *context)
56 {
57 return idr_read_obj(&ib_uverbs_srq_idr, srq_handle, context, 0);
58@@ -2375,7 +2388,7 @@ ssize_t ib_uverbs_attach_mcast(struct ib_uverbs_file *file,
59 if (copy_from_user(&cmd, buf, sizeof cmd))
60 return -EFAULT;
61
62- qp = idr_read_qp(cmd.qp_handle, file->ucontext);
63+ qp = idr_write_qp(cmd.qp_handle, file->ucontext);
64 if (!qp)
65 return -EINVAL;
66
67@@ -2404,7 +2417,7 @@ ssize_t ib_uverbs_attach_mcast(struct ib_uverbs_file *file,
68 kfree(mcast);
69
70 out_put:
71- put_qp_read(qp);
72+ put_qp_write(qp);
73
74 return ret ? ret : in_len;
75 }
76@@ -2422,7 +2435,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,
77 if (copy_from_user(&cmd, buf, sizeof cmd))
78 return -EFAULT;
79
80- qp = idr_read_qp(cmd.qp_handle, file->ucontext);
81+ qp = idr_write_qp(cmd.qp_handle, file->ucontext);
82 if (!qp)
83 return -EINVAL;
84
85@@ -2441,7 +2454,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,
86 }
87
88 out_put:
89- put_qp_read(qp);
90+ put_qp_write(qp);
91
92 return ret ? ret : in_len;
93 }
94--
951.7.7.4
96
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0016-iwlagn-fix-TID-use-bug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0016-iwlagn-fix-TID-use-bug.patch
new file mode 100644
index 00000000..7c020372
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0016-iwlagn-fix-TID-use-bug.patch
@@ -0,0 +1,50 @@
1From 274a64cd739d2b5e33e6e2112f78c896b18849a9 Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Fri, 2 Dec 2011 12:22:54 -0800
4Subject: [PATCH 16/49] iwlagn: fix TID use bug
5
6commit 9a215e40d70ae63762963ab3ccc7f31dd966dc6a upstream.
7
8The driver everywhere uses max TID count as 9,
9which is wrong, it should be 8.
10
11I think the reason it uses 9 here is off-by-one
12confusion by whoever wrote this. We do use the
13value IWL_MAX_TID_COUNT for "not QoS/no TID"
14but that is completely correct even if it is 8
15and not 9 since 0-7 are only valid.
16
17As a side effect, this fixes the following bug:
18
19 Open BA session requested for 00:23:cd:16:8a:7e tid 8
20 ------------[ cut here ]------------
21 kernel BUG at drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h:350!
22 ...
23
24when you do
25echo "tx start 8" > /sys/kernel/debug/ieee80211/*/*/*/*/agg_status
26
27Reported-by: Nikolay Martynov <mar.kolya@gmail.com>
28Signed-off-by: Johannes Berg <johannes.berg@intel.com>
29Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
30Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
31---
32 drivers/net/wireless/iwlwifi/iwl-commands.h | 2 +-
33 1 files changed, 1 insertions(+), 1 deletions(-)
34
35diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
36index 69d5f85..8b9ff28 100644
37--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
38+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
39@@ -809,7 +809,7 @@ struct iwl_qosparam_cmd {
40 #define IWLAGN_STATION_COUNT 16
41
42 #define IWL_INVALID_STATION 255
43-#define IWL_MAX_TID_COUNT 9
44+#define IWL_MAX_TID_COUNT 8
45
46 #define STA_FLG_TX_RATE_MSK cpu_to_le32(1 << 2)
47 #define STA_FLG_PWR_SAVE_MSK cpu_to_le32(1 << 8)
48--
491.7.7.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0017-iwlagn-fix-remove-use-of-PAGE_SIZE.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0017-iwlagn-fix-remove-use-of-PAGE_SIZE.patch
new file mode 100644
index 00000000..5dcc7c4f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0017-iwlagn-fix-remove-use-of-PAGE_SIZE.patch
@@ -0,0 +1,180 @@
1From 8de3e18bbd1ec02914f9bf1517d2c3557c666314 Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Mon, 19 Dec 2011 14:00:59 -0800
4Subject: [PATCH 17/49] iwlagn: fix (remove) use of PAGE_SIZE
5
6commit 106671369e6d046c0b3e1e72b18ad6dd9cb298b0 upstream.
7
8The ICT code erroneously uses PAGE_SIZE. The bug
9is that PAGE_SIZE isn't necessarily 4096, so on
10such platforms this code will not work correctly
11as we'll try to attempt to read an index in the
12table that the device never wrote, it always has
134096-byte pages.
14
15Additionally, the manual alignment code here is
16unnecessary -- Documentation/DMA-API-HOWTO.txt
17states:
18 The cpu return address and the DMA bus master address are both
19 guaranteed to be aligned to the smallest PAGE_SIZE order which
20 is greater than or equal to the requested size. This invariant
21 exists (for example) to guarantee that if you allocate a chunk
22 which is smaller than or equal to 64 kilobytes, the extent of the
23 buffer you receive will not cross a 64K boundary.
24
25Just use appropriate new constants and get rid of
26the alignment code.
27
28Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
29Signed-off-by: Johannes Berg <johannes.berg@intel.com>
30Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
31Signed-off-by: John W. Linville <linville@tuxdriver.com>
32Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
33---
34 drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | 2 -
35 drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | 73 +++++++++------------
36 2 files changed, 31 insertions(+), 44 deletions(-)
37
38diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
39index 2b6756e..5c29281 100644
40--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
41+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
42@@ -219,9 +219,7 @@ struct iwl_trans_pcie {
43
44 /* INT ICT Table */
45 __le32 *ict_tbl;
46- void *ict_tbl_vir;
47 dma_addr_t ict_tbl_dma;
48- dma_addr_t aligned_ict_tbl_dma;
49 int ict_index;
50 u32 inta;
51 bool use_ict;
52diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
53index 374c68c..1920237 100644
54--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
55+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
56@@ -1136,7 +1136,11 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
57 * ICT functions
58 *
59 ******************************************************************************/
60-#define ICT_COUNT (PAGE_SIZE/sizeof(u32))
61+
62+/* a device (PCI-E) page is 4096 bytes long */
63+#define ICT_SHIFT 12
64+#define ICT_SIZE (1 << ICT_SHIFT)
65+#define ICT_COUNT (ICT_SIZE / sizeof(u32))
66
67 /* Free dram table */
68 void iwl_free_isr_ict(struct iwl_trans *trans)
69@@ -1144,21 +1148,19 @@ void iwl_free_isr_ict(struct iwl_trans *trans)
70 struct iwl_trans_pcie *trans_pcie =
71 IWL_TRANS_GET_PCIE_TRANS(trans);
72
73- if (trans_pcie->ict_tbl_vir) {
74- dma_free_coherent(bus(trans)->dev,
75- (sizeof(u32) * ICT_COUNT) + PAGE_SIZE,
76- trans_pcie->ict_tbl_vir,
77+ if (trans_pcie->ict_tbl) {
78+ dma_free_coherent(bus(trans)->dev, ICT_SIZE,
79+ trans_pcie->ict_tbl,
80 trans_pcie->ict_tbl_dma);
81- trans_pcie->ict_tbl_vir = NULL;
82- memset(&trans_pcie->ict_tbl_dma, 0,
83- sizeof(trans_pcie->ict_tbl_dma));
84- memset(&trans_pcie->aligned_ict_tbl_dma, 0,
85- sizeof(trans_pcie->aligned_ict_tbl_dma));
86+ trans_pcie->ict_tbl = NULL;
87+ trans_pcie->ict_tbl_dma = 0;
88 }
89 }
90
91
92-/* allocate dram shared table it is a PAGE_SIZE aligned
93+/*
94+ * allocate dram shared table, it is an aligned memory
95+ * block of ICT_SIZE.
96 * also reset all data related to ICT table interrupt.
97 */
98 int iwl_alloc_isr_ict(struct iwl_trans *trans)
99@@ -1166,36 +1168,26 @@ int iwl_alloc_isr_ict(struct iwl_trans *trans)
100 struct iwl_trans_pcie *trans_pcie =
101 IWL_TRANS_GET_PCIE_TRANS(trans);
102
103- /* allocate shrared data table */
104- trans_pcie->ict_tbl_vir =
105- dma_alloc_coherent(bus(trans)->dev,
106- (sizeof(u32) * ICT_COUNT) + PAGE_SIZE,
107- &trans_pcie->ict_tbl_dma, GFP_KERNEL);
108- if (!trans_pcie->ict_tbl_vir)
109+ trans_pcie->ict_tbl =
110+ dma_alloc_coherent(bus(trans)->dev, ICT_SIZE,
111+ &trans_pcie->ict_tbl_dma,
112+ GFP_KERNEL);
113+ if (!trans_pcie->ict_tbl)
114 return -ENOMEM;
115
116- /* align table to PAGE_SIZE boundary */
117- trans_pcie->aligned_ict_tbl_dma =
118- ALIGN(trans_pcie->ict_tbl_dma, PAGE_SIZE);
119-
120- IWL_DEBUG_ISR(trans, "ict dma addr %Lx dma aligned %Lx diff %d\n",
121- (unsigned long long)trans_pcie->ict_tbl_dma,
122- (unsigned long long)trans_pcie->aligned_ict_tbl_dma,
123- (int)(trans_pcie->aligned_ict_tbl_dma -
124- trans_pcie->ict_tbl_dma));
125+ /* just an API sanity check ... it is guaranteed to be aligned */
126+ if (WARN_ON(trans_pcie->ict_tbl_dma & (ICT_SIZE - 1))) {
127+ iwl_free_isr_ict(trans);
128+ return -EINVAL;
129+ }
130
131- trans_pcie->ict_tbl = trans_pcie->ict_tbl_vir +
132- (trans_pcie->aligned_ict_tbl_dma -
133- trans_pcie->ict_tbl_dma);
134+ IWL_DEBUG_ISR(trans, "ict dma addr %Lx\n",
135+ (unsigned long long)trans_pcie->ict_tbl_dma);
136
137- IWL_DEBUG_ISR(trans, "ict vir addr %p vir aligned %p diff %d\n",
138- trans_pcie->ict_tbl, trans_pcie->ict_tbl_vir,
139- (int)(trans_pcie->aligned_ict_tbl_dma -
140- trans_pcie->ict_tbl_dma));
141+ IWL_DEBUG_ISR(trans, "ict vir addr %p\n", trans_pcie->ict_tbl);
142
143 /* reset table and index to all 0 */
144- memset(trans_pcie->ict_tbl_vir, 0,
145- (sizeof(u32) * ICT_COUNT) + PAGE_SIZE);
146+ memset(trans_pcie->ict_tbl, 0, ICT_SIZE);
147 trans_pcie->ict_index = 0;
148
149 /* add periodic RX interrupt */
150@@ -1213,23 +1205,20 @@ int iwl_reset_ict(struct iwl_trans *trans)
151 struct iwl_trans_pcie *trans_pcie =
152 IWL_TRANS_GET_PCIE_TRANS(trans);
153
154- if (!trans_pcie->ict_tbl_vir)
155+ if (!trans_pcie->ict_tbl)
156 return 0;
157
158 spin_lock_irqsave(&trans->shrd->lock, flags);
159 iwl_disable_interrupts(trans);
160
161- memset(&trans_pcie->ict_tbl[0], 0, sizeof(u32) * ICT_COUNT);
162+ memset(trans_pcie->ict_tbl, 0, ICT_SIZE);
163
164- val = trans_pcie->aligned_ict_tbl_dma >> PAGE_SHIFT;
165+ val = trans_pcie->ict_tbl_dma >> ICT_SHIFT;
166
167 val |= CSR_DRAM_INT_TBL_ENABLE;
168 val |= CSR_DRAM_INIT_TBL_WRAP_CHECK;
169
170- IWL_DEBUG_ISR(trans, "CSR_DRAM_INT_TBL_REG =0x%X "
171- "aligned dma address %Lx\n",
172- val,
173- (unsigned long long)trans_pcie->aligned_ict_tbl_dma);
174+ IWL_DEBUG_ISR(trans, "CSR_DRAM_INT_TBL_REG =0x%x\n", val);
175
176 iwl_write32(bus(trans), CSR_DRAM_INT_TBL_REG, val);
177 trans_pcie->use_ict = true;
178--
1791.7.7.4
180
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0018-perf-Fix-parsing-of-__print_flags-in-TP_printk.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0018-perf-Fix-parsing-of-__print_flags-in-TP_printk.patch
new file mode 100644
index 00000000..96e1c791
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0018-perf-Fix-parsing-of-__print_flags-in-TP_printk.patch
@@ -0,0 +1,37 @@
1From 3d69705bbc0503baa930a277c3570ccdc2b82ac1 Mon Sep 17 00:00:00 2001
2From: Steven Rostedt <srostedt@redhat.com>
3Date: Fri, 4 Nov 2011 16:32:25 -0400
4Subject: [PATCH 18/49] perf: Fix parsing of __print_flags() in TP_printk()
5
6commit 49908a1b25d448d68fd26faca260e1850201575f upstream.
7
8A update is made to the sched:sched_switch event that adds some
9logic to the first parameter of the __print_flags() that shows the
10state of tasks. This change cause perf to fail parsing the flags.
11
12A simple fix is needed to have the parser be able to process ops
13within the argument.
14
15Reported-by: Andrew Vagin <avagin@openvz.org>
16Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 tools/perf/util/trace-event-parse.c | 2 ++
20 1 files changed, 2 insertions(+), 0 deletions(-)
21
22diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
23index 6c164dc..bf54c48 100644
24--- a/tools/perf/util/trace-event-parse.c
25+++ b/tools/perf/util/trace-event-parse.c
26@@ -1582,6 +1582,8 @@ process_symbols(struct event *event, struct print_arg *arg, char **tok)
27 field = malloc_or_die(sizeof(*field));
28
29 type = process_arg(event, field, &token);
30+ while (type == EVENT_OP)
31+ type = process_op(event, field, &token);
32 if (test_type_token(type, token, EVENT_DELIM, ","))
33 goto out_free;
34
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0019-ore-Fix-crash-in-case-of-an-IO-error.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0019-ore-Fix-crash-in-case-of-an-IO-error.patch
new file mode 100644
index 00000000..903491af
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0019-ore-Fix-crash-in-case-of-an-IO-error.patch
@@ -0,0 +1,41 @@
1From b892a813649b593177f4b36c200691ec7b610af7 Mon Sep 17 00:00:00 2001
2From: Boaz Harrosh <bharrosh@panasas.com>
3Date: Tue, 27 Dec 2011 19:23:36 +0200
4Subject: [PATCH 19/49] ore: Fix crash in case of an IO error.
5
6commit ffefb8eaa367e8a5c14f779233d9da1fbc23d164 upstream.
7
8The users of ore_check_io() expect the reported device
9(In case of error) to be indexed relative to the passed-in
10ore_components table, and not the logical dev index.
11
12This causes a crash inside objlayoutdriver in case of
13an IO error.
14
15Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 fs/exofs/ore.c | 6 +++---
19 1 files changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c
22index d271ad8..894f3e1 100644
23--- a/fs/exofs/ore.c
24+++ b/fs/exofs/ore.c
25@@ -445,10 +445,10 @@ int ore_check_io(struct ore_io_state *ios, ore_on_dev_error on_dev_error)
26 u64 residual = ios->reading ?
27 or->in.residual : or->out.residual;
28 u64 offset = (ios->offset + ios->length) - residual;
29- struct ore_dev *od = ios->oc->ods[
30- per_dev->dev - ios->oc->first_dev];
31+ unsigned dev = per_dev->dev - ios->oc->first_dev;
32+ struct ore_dev *od = ios->oc->ods[dev];
33
34- on_dev_error(ios, od, per_dev->dev, osi.osd_err_pri,
35+ on_dev_error(ios, od, dev, osi.osd_err_pri,
36 offset, residual);
37 }
38 if (osi.osd_err_pri >= acumulated_osd_err) {
39--
401.7.7.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0020-ore-fix-BUG_ON-too-few-sgs-when-reading.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0020-ore-fix-BUG_ON-too-few-sgs-when-reading.patch
new file mode 100644
index 00000000..76fe4bf5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0020-ore-fix-BUG_ON-too-few-sgs-when-reading.patch
@@ -0,0 +1,56 @@
1From 3c8f1a35fab7418f9afeda2618992c1fd5504475 Mon Sep 17 00:00:00 2001
2From: Boaz Harrosh <bharrosh@panasas.com>
3Date: Wed, 28 Dec 2011 19:14:23 +0200
4Subject: [PATCH 20/49] ore: fix BUG_ON, too few sgs when reading
5
6commit 361aba569f55dd159b850489a3538253afbb3973 upstream.
7
8When reading RAID5 files, in rare cases, we calculated too
9few sg segments. There should be two extra for the beginning
10and end partial units.
11
12Also "too few sg segments" should not be a BUG_ON there is
13all the mechanics in place to handle it, as a short read.
14So just return -ENOMEM and the rest of the code will gracefully
15split the IO.
16
17Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 fs/exofs/ore.c | 2 +-
21 fs/exofs/ore_raid.c | 6 +++++-
22 2 files changed, 6 insertions(+), 2 deletions(-)
23
24diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c
25index 894f3e1..49cf230 100644
26--- a/fs/exofs/ore.c
27+++ b/fs/exofs/ore.c
28@@ -266,7 +266,7 @@ int ore_get_rw_state(struct ore_layout *layout, struct ore_components *oc,
29
30 /* first/last seg is split */
31 num_raid_units += layout->group_width;
32- sgs_per_dev = div_u64(num_raid_units, data_devs);
33+ sgs_per_dev = div_u64(num_raid_units, data_devs) + 2;
34 } else {
35 /* For Writes add parity pages array. */
36 max_par_pages = num_raid_units * pages_in_unit *
37diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c
38index 29c47e5..414a2df 100644
39--- a/fs/exofs/ore_raid.c
40+++ b/fs/exofs/ore_raid.c
41@@ -551,7 +551,11 @@ int _ore_add_parity_unit(struct ore_io_state *ios,
42 unsigned cur_len)
43 {
44 if (ios->reading) {
45- BUG_ON(per_dev->cur_sg >= ios->sgs_per_dev);
46+ if (per_dev->cur_sg >= ios->sgs_per_dev) {
47+ ORE_DBGMSG("cur_sg(%d) >= sgs_per_dev(%d)\n" ,
48+ per_dev->cur_sg, ios->sgs_per_dev);
49+ return -ENOMEM;
50+ }
51 _ore_add_sg_seg(per_dev, cur_len, true);
52 } else {
53 struct __stripe_pages_2d *sp2d = ios->sp2d;
54--
551.7.7.4
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0021-ore-Must-support-none-PAGE-aligned-IO.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0021-ore-Must-support-none-PAGE-aligned-IO.patch
new file mode 100644
index 00000000..94fe29ed
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0021-ore-Must-support-none-PAGE-aligned-IO.patch
@@ -0,0 +1,163 @@
1From f3db3efc229dac1097a71b9d793d61aefb033ac2 Mon Sep 17 00:00:00 2001
2From: Boaz Harrosh <bharrosh@panasas.com>
3Date: Wed, 28 Dec 2011 19:21:45 +0200
4Subject: [PATCH 21/49] ore: Must support none-PAGE-aligned IO
5
6commit 724577ca355795b0a25c93ccbeee927871ca1a77 upstream.
7
8NFS might send us offsets that are not PAGE aligned. So
9we must read in the reminder of the first/last pages, in cases
10we need it for Parity calculations.
11
12We only add an sg segments to read the partial page. But
13we don't mark it as read=true because it is a lock-for-write
14page.
15
16TODO: In some cases (IO spans a single unit) we can just
17adjust the raid_unit offset/length, but this is left for
18later Kernels.
19
20Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
22---
23 fs/exofs/ore_raid.c | 72 ++++++++++++++++++++++++++++++++++++++++++--------
24 1 files changed, 60 insertions(+), 12 deletions(-)
25
26diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c
27index 414a2df..d222c77 100644
28--- a/fs/exofs/ore_raid.c
29+++ b/fs/exofs/ore_raid.c
30@@ -328,8 +328,8 @@ static int _alloc_read_4_write(struct ore_io_state *ios)
31 /* @si contains info of the to-be-inserted page. Update of @si should be
32 * maintained by caller. Specificaly si->dev, si->obj_offset, ...
33 */
34-static int _add_to_read_4_write(struct ore_io_state *ios,
35- struct ore_striping_info *si, struct page *page)
36+static int _add_to_r4w(struct ore_io_state *ios, struct ore_striping_info *si,
37+ struct page *page, unsigned pg_len)
38 {
39 struct request_queue *q;
40 struct ore_per_dev_state *per_dev;
41@@ -366,17 +366,60 @@ static int _add_to_read_4_write(struct ore_io_state *ios,
42 _ore_add_sg_seg(per_dev, gap, true);
43 }
44 q = osd_request_queue(ore_comp_dev(read_ios->oc, per_dev->dev));
45- added_len = bio_add_pc_page(q, per_dev->bio, page, PAGE_SIZE, 0);
46- if (unlikely(added_len != PAGE_SIZE)) {
47+ added_len = bio_add_pc_page(q, per_dev->bio, page, pg_len,
48+ si->obj_offset % PAGE_SIZE);
49+ if (unlikely(added_len != pg_len)) {
50 ORE_DBGMSG("Failed to bio_add_pc_page bi_vcnt=%d\n",
51 per_dev->bio->bi_vcnt);
52 return -ENOMEM;
53 }
54
55- per_dev->length += PAGE_SIZE;
56+ per_dev->length += pg_len;
57 return 0;
58 }
59
60+/* read the beginning of an unaligned first page */
61+static int _add_to_r4w_first_page(struct ore_io_state *ios, struct page *page)
62+{
63+ struct ore_striping_info si;
64+ unsigned pg_len;
65+
66+ ore_calc_stripe_info(ios->layout, ios->offset, 0, &si);
67+
68+ pg_len = si.obj_offset % PAGE_SIZE;
69+ si.obj_offset -= pg_len;
70+
71+ ORE_DBGMSG("offset=0x%llx len=0x%x index=0x%lx dev=%x\n",
72+ _LLU(si.obj_offset), pg_len, page->index, si.dev);
73+
74+ return _add_to_r4w(ios, &si, page, pg_len);
75+}
76+
77+/* read the end of an incomplete last page */
78+static int _add_to_r4w_last_page(struct ore_io_state *ios, u64 *offset)
79+{
80+ struct ore_striping_info si;
81+ struct page *page;
82+ unsigned pg_len, p, c;
83+
84+ ore_calc_stripe_info(ios->layout, *offset, 0, &si);
85+
86+ p = si.unit_off / PAGE_SIZE;
87+ c = _dev_order(ios->layout->group_width * ios->layout->mirrors_p1,
88+ ios->layout->mirrors_p1, si.par_dev, si.dev);
89+ page = ios->sp2d->_1p_stripes[p].pages[c];
90+
91+ pg_len = PAGE_SIZE - (si.unit_off % PAGE_SIZE);
92+ *offset += pg_len;
93+
94+ ORE_DBGMSG("p=%d, c=%d next-offset=0x%llx len=0x%x dev=%x par_dev=%d\n",
95+ p, c, _LLU(*offset), pg_len, si.dev, si.par_dev);
96+
97+ BUG_ON(!page);
98+
99+ return _add_to_r4w(ios, &si, page, pg_len);
100+}
101+
102 static void _mark_read4write_pages_uptodate(struct ore_io_state *ios, int ret)
103 {
104 struct bio_vec *bv;
105@@ -444,9 +487,13 @@ static int _read_4_write(struct ore_io_state *ios)
106 struct page **pp = &_1ps->pages[c];
107 bool uptodate;
108
109- if (*pp)
110+ if (*pp) {
111+ if (ios->offset % PAGE_SIZE)
112+ /* Read the remainder of the page */
113+ _add_to_r4w_first_page(ios, *pp);
114 /* to-be-written pages start here */
115 goto read_last_stripe;
116+ }
117
118 *pp = ios->r4w->get_page(ios->private, offset,
119 &uptodate);
120@@ -454,7 +501,7 @@ static int _read_4_write(struct ore_io_state *ios)
121 return -ENOMEM;
122
123 if (!uptodate)
124- _add_to_read_4_write(ios, &read_si, *pp);
125+ _add_to_r4w(ios, &read_si, *pp, PAGE_SIZE);
126
127 /* Mark read-pages to be cache_released */
128 _1ps->page_is_read[c] = true;
129@@ -465,8 +512,11 @@ static int _read_4_write(struct ore_io_state *ios)
130 }
131
132 read_last_stripe:
133- offset = ios->offset + (ios->length + PAGE_SIZE - 1) /
134- PAGE_SIZE * PAGE_SIZE;
135+ offset = ios->offset + ios->length;
136+ if (offset % PAGE_SIZE)
137+ _add_to_r4w_last_page(ios, &offset);
138+ /* offset will be aligned to next page */
139+
140 last_stripe_end = div_u64(offset + bytes_in_stripe - 1, bytes_in_stripe)
141 * bytes_in_stripe;
142 if (offset == last_stripe_end) /* Optimize for the aligned case */
143@@ -503,7 +553,7 @@ read_last_stripe:
144 /* Mark read-pages to be cache_released */
145 _1ps->page_is_read[c] = true;
146 if (!uptodate)
147- _add_to_read_4_write(ios, &read_si, page);
148+ _add_to_r4w(ios, &read_si, page, PAGE_SIZE);
149 }
150
151 offset += PAGE_SIZE;
152@@ -616,8 +666,6 @@ int _ore_post_alloc_raid_stuff(struct ore_io_state *ios)
153 return -ENOMEM;
154 }
155
156- BUG_ON(ios->offset % PAGE_SIZE);
157-
158 /* Round io down to last full strip */
159 first_stripe = div_u64(ios->offset, stripe_size);
160 last_stripe = div_u64(ios->offset + ios->length, stripe_size);
161--
1621.7.7.4
163
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0022-ore-FIX-breakage-when-MISC_FILESYSTEMS-is-not-set.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0022-ore-FIX-breakage-when-MISC_FILESYSTEMS-is-not-set.patch
new file mode 100644
index 00000000..a55cd86b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0022-ore-FIX-breakage-when-MISC_FILESYSTEMS-is-not-set.patch
@@ -0,0 +1,89 @@
1From db0889eb6584510c3e1d860bfcfc7a85efc6fabe Mon Sep 17 00:00:00 2001
2From: Boaz Harrosh <bharrosh@panasas.com>
3Date: Tue, 29 Nov 2011 15:35:53 -0800
4Subject: [PATCH 22/49] ore: FIX breakage when MISC_FILESYSTEMS is not set
5
6commit 831c2dc5f47c1dc79c32229d75065ada1dcc66e1 upstream.
7
8As Reported by Randy Dunlap
9
10When MISC_FILESYSTEMS is not enabled and NFS4.1 is:
11
12fs/built-in.o: In function `objio_alloc_io_state':
13objio_osd.c:(.text+0xcb525): undefined reference to `ore_get_rw_state'
14fs/built-in.o: In function `_write_done':
15objio_osd.c:(.text+0xcb58d): undefined reference to `ore_check_io'
16fs/built-in.o: In function `_read_done':
17...
18
19When MISC_FILESYSTEMS, which is more of a GUI thing then anything else,
20is not selected. exofs/Kconfig is never examined during Kconfig,
21and it can not do it's magic stuff to automatically select everything
22needed.
23
24We must split exofs/Kconfig in two. The ore one is always included.
25And the exofs one is left in it's old place in the menu.
26
27Reported-by: Randy Dunlap <rdunlap@xenotime.net>
28Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
29Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
30---
31 fs/Kconfig | 2 ++
32 fs/exofs/Kconfig | 11 -----------
33 fs/exofs/Kconfig.ore | 12 ++++++++++++
34 3 files changed, 14 insertions(+), 11 deletions(-)
35 create mode 100644 fs/exofs/Kconfig.ore
36
37diff --git a/fs/Kconfig b/fs/Kconfig
38index 5f4c45d..6ad58a5 100644
39--- a/fs/Kconfig
40+++ b/fs/Kconfig
41@@ -218,6 +218,8 @@ source "fs/exofs/Kconfig"
42
43 endif # MISC_FILESYSTEMS
44
45+source "fs/exofs/Kconfig.ore"
46+
47 menuconfig NETWORK_FILESYSTEMS
48 bool "Network File Systems"
49 default y
50diff --git a/fs/exofs/Kconfig b/fs/exofs/Kconfig
51index da42f32..86194b2 100644
52--- a/fs/exofs/Kconfig
53+++ b/fs/exofs/Kconfig
54@@ -1,14 +1,3 @@
55-# Note ORE needs to "select ASYNC_XOR". So Not to force multiple selects
56-# for every ORE user we do it like this. Any user should add itself here
57-# at the "depends on EXOFS_FS || ..." with an ||. The dependencies are
58-# selected here, and we default to "ON". So in effect it is like been
59-# selected by any of the users.
60-config ORE
61- tristate
62- depends on EXOFS_FS || PNFS_OBJLAYOUT
63- select ASYNC_XOR
64- default SCSI_OSD_ULD
65-
66 config EXOFS_FS
67 tristate "exofs: OSD based file system support"
68 depends on SCSI_OSD_ULD
69diff --git a/fs/exofs/Kconfig.ore b/fs/exofs/Kconfig.ore
70new file mode 100644
71index 0000000..1ca7fb7
72--- /dev/null
73+++ b/fs/exofs/Kconfig.ore
74@@ -0,0 +1,12 @@
75+# ORE - Objects Raid Engine (libore.ko)
76+#
77+# Note ORE needs to "select ASYNC_XOR". So Not to force multiple selects
78+# for every ORE user we do it like this. Any user should add itself here
79+# at the "depends on EXOFS_FS || ..." with an ||. The dependencies are
80+# selected here, and we default to "ON". So in effect it is like been
81+# selected by any of the users.
82+config ORE
83+ tristate
84+ depends on EXOFS_FS || PNFS_OBJLAYOUT
85+ select ASYNC_XOR
86+ default SCSI_OSD_ULD
87--
881.7.7.4
89
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0023-reiserfs-Fix-quota-mount-option-parsing.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0023-reiserfs-Fix-quota-mount-option-parsing.patch
new file mode 100644
index 00000000..01215798
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0023-reiserfs-Fix-quota-mount-option-parsing.patch
@@ -0,0 +1,34 @@
1From 914681dc085b7bdeae0de64fba94532a6bcd093e Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Wed, 21 Dec 2011 17:35:34 +0100
4Subject: [PATCH 23/49] reiserfs: Fix quota mount option parsing
5
6commit a06d789b424190e9f59da391681f908486db2554 upstream.
7
8When jqfmt mount option is not specified on remount, we mistakenly clear
9s_jquota_fmt value stored in superblock. Fix the problem.
10
11CC: reiserfs-devel@vger.kernel.org
12Signed-off-by: Jan Kara <jack@suse.cz>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14---
15 fs/reiserfs/super.c | 3 ++-
16 1 files changed, 2 insertions(+), 1 deletions(-)
17
18diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
19index 14363b9..f9eaa4a 100644
20--- a/fs/reiserfs/super.c
21+++ b/fs/reiserfs/super.c
22@@ -1164,7 +1164,8 @@ static void handle_quota_files(struct super_block *s, char **qf_names,
23 kfree(REISERFS_SB(s)->s_qf_names[i]);
24 REISERFS_SB(s)->s_qf_names[i] = qf_names[i];
25 }
26- REISERFS_SB(s)->s_jquota_fmt = *qfmt;
27+ if (*qfmt)
28+ REISERFS_SB(s)->s_jquota_fmt = *qfmt;
29 }
30 #endif
31
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0024-reiserfs-Force-inode-evictions-before-umount-to-avoi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0024-reiserfs-Force-inode-evictions-before-umount-to-avoi.patch
new file mode 100644
index 00000000..32475f91
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0024-reiserfs-Force-inode-evictions-before-umount-to-avoi.patch
@@ -0,0 +1,70 @@
1From 0621050323cd3eef6fe27f168151e8823a6f63dd Mon Sep 17 00:00:00 2001
2From: Jeff Mahoney <jeffm@suse.com>
3Date: Wed, 21 Dec 2011 21:18:43 +0100
4Subject: [PATCH 24/49] reiserfs: Force inode evictions before umount to avoid
5 crash
6
7commit a9e36da655e54545c3289b2a0700b5c443de0edd upstream.
8
9This patch fixes a crash in reiserfs_delete_xattrs during umount.
10
11When shrink_dcache_for_umount clears the dcache from
12generic_shutdown_super, delayed evictions are forced to disk. If an
13evicted inode has extended attributes associated with it, it will
14need to walk the xattr tree to locate and remove them.
15
16But since shrink_dcache_for_umount will BUG if it encounters active
17dentries, the xattr tree must be released before it's called or it will
18crash during every umount.
19
20This patch forces the evictions to occur before generic_shutdown_super
21by calling shrink_dcache_sb first. The additional evictions caused
22by the removal of each associated xattr file and dir will be automatically
23handled as they're added to the LRU list.
24
25CC: reiserfs-devel@vger.kernel.org
26Signed-off-by: Jeff Mahoney <jeffm@suse.com>
27Signed-off-by: Jan Kara <jack@suse.cz>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29---
30 fs/reiserfs/super.c | 24 ++++++++++++++----------
31 1 files changed, 14 insertions(+), 10 deletions(-)
32
33diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
34index f9eaa4a..5e3527b 100644
35--- a/fs/reiserfs/super.c
36+++ b/fs/reiserfs/super.c
37@@ -453,16 +453,20 @@ int remove_save_link(struct inode *inode, int truncate)
38 static void reiserfs_kill_sb(struct super_block *s)
39 {
40 if (REISERFS_SB(s)) {
41- if (REISERFS_SB(s)->xattr_root) {
42- d_invalidate(REISERFS_SB(s)->xattr_root);
43- dput(REISERFS_SB(s)->xattr_root);
44- REISERFS_SB(s)->xattr_root = NULL;
45- }
46- if (REISERFS_SB(s)->priv_root) {
47- d_invalidate(REISERFS_SB(s)->priv_root);
48- dput(REISERFS_SB(s)->priv_root);
49- REISERFS_SB(s)->priv_root = NULL;
50- }
51+ /*
52+ * Force any pending inode evictions to occur now. Any
53+ * inodes to be removed that have extended attributes
54+ * associated with them need to clean them up before
55+ * we can release the extended attribute root dentries.
56+ * shrink_dcache_for_umount will BUG if we don't release
57+ * those before it's called so ->put_super is too late.
58+ */
59+ shrink_dcache_sb(s);
60+
61+ dput(REISERFS_SB(s)->xattr_root);
62+ REISERFS_SB(s)->xattr_root = NULL;
63+ dput(REISERFS_SB(s)->priv_root);
64+ REISERFS_SB(s)->priv_root = NULL;
65 }
66
67 kill_block_super(s);
68--
691.7.7.4
70
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0025-ext3-Don-t-warn-from-writepage-when-readonly-inode-i.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0025-ext3-Don-t-warn-from-writepage-when-readonly-inode-i.patch
new file mode 100644
index 00000000..5a040171
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0025-ext3-Don-t-warn-from-writepage-when-readonly-inode-i.patch
@@ -0,0 +1,73 @@
1From d6bc098d6daabceca79a299bfe95dfe218661423 Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Thu, 22 Dec 2011 16:49:05 +0100
4Subject: [PATCH 25/49] ext3: Don't warn from writepage when readonly inode is
5 spotted after error
6
7commit 33c104d415e92a51aaf638dc3d93920cfa601e5c upstream.
8
9WARN_ON_ONCE(IS_RDONLY(inode)) tends to trip when filesystem hits error and is
10remounted read-only. This unnecessarily scares users (well, they should be
11scared because of filesystem error, but the stack trace distracts them from the
12right source of their fear ;-). We could as well just remove the WARN_ON but
13it's not hard to fix it to not trip on filesystem with errors and not use more
14cycles in the common case so that's what we do.
15
16Signed-off-by: Jan Kara <jack@suse.cz>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 fs/ext3/inode.c | 24 +++++++++++++++++++++---
20 1 files changed, 21 insertions(+), 3 deletions(-)
21
22diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
23index 85fe655..5b3f907 100644
24--- a/fs/ext3/inode.c
25+++ b/fs/ext3/inode.c
26@@ -1617,7 +1617,13 @@ static int ext3_ordered_writepage(struct page *page,
27 int err;
28
29 J_ASSERT(PageLocked(page));
30- WARN_ON_ONCE(IS_RDONLY(inode));
31+ /*
32+ * We don't want to warn for emergency remount. The condition is
33+ * ordered to avoid dereferencing inode->i_sb in non-error case to
34+ * avoid slow-downs.
35+ */
36+ WARN_ON_ONCE(IS_RDONLY(inode) &&
37+ !(EXT3_SB(inode->i_sb)->s_mount_state & EXT3_ERROR_FS));
38
39 /*
40 * We give up here if we're reentered, because it might be for a
41@@ -1692,7 +1698,13 @@ static int ext3_writeback_writepage(struct page *page,
42 int err;
43
44 J_ASSERT(PageLocked(page));
45- WARN_ON_ONCE(IS_RDONLY(inode));
46+ /*
47+ * We don't want to warn for emergency remount. The condition is
48+ * ordered to avoid dereferencing inode->i_sb in non-error case to
49+ * avoid slow-downs.
50+ */
51+ WARN_ON_ONCE(IS_RDONLY(inode) &&
52+ !(EXT3_SB(inode->i_sb)->s_mount_state & EXT3_ERROR_FS));
53
54 if (ext3_journal_current_handle())
55 goto out_fail;
56@@ -1735,7 +1747,13 @@ static int ext3_journalled_writepage(struct page *page,
57 int err;
58
59 J_ASSERT(PageLocked(page));
60- WARN_ON_ONCE(IS_RDONLY(inode));
61+ /*
62+ * We don't want to warn for emergency remount. The condition is
63+ * ordered to avoid dereferencing inode->i_sb in non-error case to
64+ * avoid slow-downs.
65+ */
66+ WARN_ON_ONCE(IS_RDONLY(inode) &&
67+ !(EXT3_SB(inode->i_sb)->s_mount_state & EXT3_ERROR_FS));
68
69 if (ext3_journal_current_handle())
70 goto no_write;
71--
721.7.7.4
73
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0026-drivers-hv-Don-t-OOPS-when-you-cannot-init-vmbus.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0026-drivers-hv-Don-t-OOPS-when-you-cannot-init-vmbus.patch
new file mode 100644
index 00000000..98dedab1
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0026-drivers-hv-Don-t-OOPS-when-you-cannot-init-vmbus.patch
@@ -0,0 +1,70 @@
1From b9e6c637b69ffe81b7f272f433f18e3cd2f58052 Mon Sep 17 00:00:00 2001
2From: "K. Y. Srinivasan" <kys@microsoft.com>
3Date: Thu, 1 Dec 2011 09:59:34 -0800
4Subject: [PATCH 26/49] drivers: hv: Don't OOPS when you cannot init vmbus
5
6commit cf6a2eacbcb2593b5b91d0817915c4f0464bb534 upstream.
7
8The hv vmbus driver was causing an OOPS since it was trying to register drivers
9on top of the bus even if initialization of the bus has failed for some
10reason (such as the odd chance someone would run a hv enabled kernel in a
11non-hv environment).
12
13Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
14Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/hv/vmbus_drv.c | 16 ++++++++++++++++
18 1 files changed, 16 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
21index 0c048dd..d3b0b4f 100644
22--- a/drivers/hv/vmbus_drv.c
23+++ b/drivers/hv/vmbus_drv.c
24@@ -62,6 +62,14 @@ struct hv_device_info {
25 struct hv_dev_port_info outbound;
26 };
27
28+static int vmbus_exists(void)
29+{
30+ if (hv_acpi_dev == NULL)
31+ return -ENODEV;
32+
33+ return 0;
34+}
35+
36
37 static void get_channel_info(struct hv_device *device,
38 struct hv_device_info *info)
39@@ -590,6 +598,10 @@ int __vmbus_driver_register(struct hv_driver *hv_driver, struct module *owner, c
40
41 pr_info("registering driver %s\n", hv_driver->name);
42
43+ ret = vmbus_exists();
44+ if (ret < 0)
45+ return ret;
46+
47 hv_driver->driver.name = hv_driver->name;
48 hv_driver->driver.owner = owner;
49 hv_driver->driver.mod_name = mod_name;
50@@ -614,6 +626,9 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver)
51 {
52 pr_info("unregistering driver %s\n", hv_driver->name);
53
54+ if (!vmbus_exists())
55+ return;
56+
57 driver_unregister(&hv_driver->driver);
58
59 }
60@@ -776,6 +791,7 @@ static int __init hv_acpi_init(void)
61
62 cleanup:
63 acpi_bus_unregister_driver(&vmbus_acpi_driver);
64+ hv_acpi_dev = NULL;
65 return ret;
66 }
67
68--
691.7.7.4
70
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0027-Drivers-hv-Fix-a-bug-in-vmbus_driver_unregister.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0027-Drivers-hv-Fix-a-bug-in-vmbus_driver_unregister.patch
new file mode 100644
index 00000000..e6184ae0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0027-Drivers-hv-Fix-a-bug-in-vmbus_driver_unregister.patch
@@ -0,0 +1,40 @@
1From 797931db7094985a8aa99b24695192d1773129de Mon Sep 17 00:00:00 2001
2From: "K. Y. Srinivasan" <kys@microsoft.com>
3Date: Tue, 27 Dec 2011 13:49:37 -0800
4Subject: [PATCH 27/49] Drivers:hv: Fix a bug in vmbus_driver_unregister()
5
6commit 8f257a142fc3868d69de3f996b95d7bdbc509560 upstream.
7
8The function vmbus_exists() was introduced recently to deal with cases where
9the vmbus driver failed to initialize and yet other Hyper-V drivers attempted
10to register with the vmbus bus driver. This patch introduced a bug where
11vmbus_driver_unregister() would fail to unregister the driver. This patch
12fixes the problem.
13
14Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
15Signed-off-by: Fuzhou Chen <fuzhouch@microsoft.com>
16Cc: Sasha Levin <levinsasha928@gmail.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 drivers/hv/vmbus_drv.c | 5 +----
20 1 files changed, 1 insertions(+), 4 deletions(-)
21
22diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
23index d3b0b4f..d2d0a2a 100644
24--- a/drivers/hv/vmbus_drv.c
25+++ b/drivers/hv/vmbus_drv.c
26@@ -627,10 +627,7 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver)
27 pr_info("unregistering driver %s\n", hv_driver->name);
28
29 if (!vmbus_exists())
30- return;
31-
32- driver_unregister(&hv_driver->driver);
33-
34+ driver_unregister(&hv_driver->driver);
35 }
36 EXPORT_SYMBOL_GPL(vmbus_driver_unregister);
37
38--
391.7.7.4
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0028-USB-update-documentation-for-usbmon.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0028-USB-update-documentation-for-usbmon.patch
new file mode 100644
index 00000000..8a6a5fba
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0028-USB-update-documentation-for-usbmon.patch
@@ -0,0 +1,54 @@
1From a4d5730e9c4b209e74eab2f7650b23f95417dc71 Mon Sep 17 00:00:00 2001
2From: Alan Stern <stern@rowland.harvard.edu>
3Date: Wed, 4 Jan 2012 16:36:35 -0500
4Subject: [PATCH 28/49] USB: update documentation for usbmon
5
6commit d8cae98cddd286e38db1724dda1b0e7b467f9237 upstream.
7
8The documentation for usbmon is out of date; the usbfs "devices" file
9now exists in /sys/kernel/debug/usb rather than /proc/bus/usb. This
10patch (as1505) updates the documentation accordingly, and also
11mentions that the necessary information can be found by running lsusb.
12
13Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
14CC: Pete Zaitcev <zaitcev@redhat.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 Documentation/usb/usbmon.txt | 14 +++++++++-----
18 1 files changed, 9 insertions(+), 5 deletions(-)
19
20diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt
21index a4efa04..5335fa8 100644
22--- a/Documentation/usb/usbmon.txt
23+++ b/Documentation/usb/usbmon.txt
24@@ -47,10 +47,11 @@ This allows to filter away annoying devices that talk continuously.
25
26 2. Find which bus connects to the desired device
27
28-Run "cat /proc/bus/usb/devices", and find the T-line which corresponds to
29-the device. Usually you do it by looking for the vendor string. If you have
30-many similar devices, unplug one and compare two /proc/bus/usb/devices outputs.
31-The T-line will have a bus number. Example:
32+Run "cat /sys/kernel/debug/usb/devices", and find the T-line which corresponds
33+to the device. Usually you do it by looking for the vendor string. If you have
34+many similar devices, unplug one and compare the two
35+/sys/kernel/debug/usb/devices outputs. The T-line will have a bus number.
36+Example:
37
38 T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
39 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
40@@ -58,7 +59,10 @@ P: Vendor=0557 ProdID=2004 Rev= 1.00
41 S: Manufacturer=ATEN
42 S: Product=UC100KM V2.00
43
44-Bus=03 means it's bus 3.
45+"Bus=03" means it's bus 3. Alternatively, you can look at the output from
46+"lsusb" and get the bus number from the appropriate line. Example:
47+
48+Bus 003 Device 002: ID 0557:2004 ATEN UC100KM V2.00
49
50 3. Start 'cat'
51
52--
531.7.7.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0029-usbfs-Fix-oops-related-to-user-namespace-conversion.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0029-usbfs-Fix-oops-related-to-user-namespace-conversion.patch
new file mode 100644
index 00000000..dfc6d0b8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0029-usbfs-Fix-oops-related-to-user-namespace-conversion.patch
@@ -0,0 +1,125 @@
1From 6b544616a14b48a670d0c7ce10a5f8de1246cc96 Mon Sep 17 00:00:00 2001
2From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
3Date: Fri, 16 Dec 2011 11:26:30 -0800
4Subject: [PATCH 29/49] usbfs: Fix oops related to user namespace conversion.
5
6commit 1b41c8321e495337e877ca02d0b9680bc4112eff upstream.
7
8When running the Point Grey "flycap" program for their USB 3.0 camera
9(which was running as a USB 2.0 device for some reason), I trigger this
10oops whenever I try to open a video stream:
11
12Dec 15 16:48:34 puck kernel: [ 1798.715559] BUG: unable to handle kernel NULL pointer dereference at (null)
13Dec 15 16:48:34 puck kernel: [ 1798.719153] IP: [<ffffffff8147841e>] free_async+0x1e/0x70
14Dec 15 16:48:34 puck kernel: [ 1798.720991] PGD 6f833067 PUD 6fc56067 PMD 0
15Dec 15 16:48:34 puck kernel: [ 1798.722815] Oops: 0002 [#1] SMP
16Dec 15 16:48:34 puck kernel: [ 1798.724627] CPU 0
17Dec 15 16:48:34 puck kernel: [ 1798.724636] Modules linked in: ecryptfs encrypted_keys sha1_generic trusted binfmt_misc sha256_generic aesni_intel cryptd aes_x86_64 aes_generic parport_pc dm_crypt ppdev joydev snd_hda_codec_hdmi snd_hda_codec_conexant arc4 iwlwifi snd_hda_intel snd_hda_codec snd_hwdep snd_pcm thinkpad_acpi mac80211 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer btusb uvcvideo snd_seq_device bluetooth videodev psmouse snd v4l2_compat_ioctl32 serio_raw tpm_tis cfg80211 tpm tpm_bios nvram soundcore snd_page_alloc lp parport i915 xhci_hcd ahci libahci drm_kms_helper drm sdhci_pci sdhci e1000e i2c_algo_bit video
18Dec 15 16:48:34 puck kernel: [ 1798.734212]
19Dec 15 16:48:34 puck kernel: [ 1798.736162] Pid: 2713, comm: FlyCap2 Not tainted 3.2.0-rc5+ #28 LENOVO 4286CTO/4286CTO
20Dec 15 16:48:34 puck kernel: [ 1798.738148] RIP: 0010:[<ffffffff8147841e>] [<ffffffff8147841e>] free_async+0x1e/0x70
21Dec 15 16:48:34 puck kernel: [ 1798.740134] RSP: 0018:ffff88005715fd78 EFLAGS: 00010296
22Dec 15 16:48:34 puck kernel: [ 1798.742118] RAX: 00000000fffffff4 RBX: ffff88006fe8f900 RCX: 0000000000004118
23Dec 15 16:48:34 puck kernel: [ 1798.744116] RDX: 0000000001000000 RSI: 0000000000016390 RDI: 0000000000000000
24Dec 15 16:48:34 puck kernel: [ 1798.746087] RBP: ffff88005715fd88 R08: 0000000000000000 R09: ffffffff8146f22e
25Dec 15 16:48:34 puck kernel: [ 1798.748018] R10: ffff88006e520ac0 R11: 0000000000000001 R12: ffff88005715fe28
26Dec 15 16:48:34 puck kernel: [ 1798.749916] R13: ffff88005d31df00 R14: ffff88006fe8f900 R15: 00007f688c995cb8
27Dec 15 16:48:34 puck kernel: [ 1798.751785] FS: 00007f68a366da40(0000) GS:ffff880100200000(0000) knlGS:0000000000000000
28Dec 15 16:48:34 puck kernel: [ 1798.753659] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
29Dec 15 16:48:34 puck kernel: [ 1798.755509] CR2: 0000000000000000 CR3: 00000000706bb000 CR4: 00000000000406f0
30Dec 15 16:48:34 puck kernel: [ 1798.757334] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
31Dec 15 16:48:34 puck kernel: [ 1798.759124] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
32Dec 15 16:48:34 puck kernel: [ 1798.760871] Process FlyCap2 (pid: 2713, threadinfo ffff88005715e000, task ffff88006c675b80)
33Dec 15 16:48:34 puck kernel: [ 1798.762605] Stack:
34Dec 15 16:48:34 puck kernel: [ 1798.764297] ffff88005715fe28 0000000000000000 ffff88005715fe08 ffffffff81479058
35Dec 15 16:48:34 puck kernel: [ 1798.766020] 0000000000000000 ffffea0000004000 ffff880000004118 0000000000000000
36Dec 15 16:48:34 puck kernel: [ 1798.767750] ffff880000000001 ffff88006e520ac0 fffffff46fd81180 0000000000000000
37Dec 15 16:48:34 puck kernel: [ 1798.769472] Call Trace:
38Dec 15 16:48:34 puck kernel: [ 1798.771147] [<ffffffff81479058>] proc_do_submiturb+0x778/0xa00
39Dec 15 16:48:34 puck kernel: [ 1798.772798] [<ffffffff8147a5fd>] usbdev_do_ioctl+0x24d/0x1200
40Dec 15 16:48:34 puck kernel: [ 1798.774410] [<ffffffff8147b5de>] usbdev_ioctl+0xe/0x20
41Dec 15 16:48:34 puck kernel: [ 1798.775975] [<ffffffff81189259>] do_vfs_ioctl+0x99/0x600
42Dec 15 16:48:34 puck kernel: [ 1798.777534] [<ffffffff81189851>] sys_ioctl+0x91/0xa0
43Dec 15 16:48:34 puck kernel: [ 1798.779088] [<ffffffff816247c2>] system_call_fastpath+0x16/0x1b
44ec 15 16:48:34 puck kernel: [ 1798.780634] Code: 51 ff ff ff e9 29 ff ff ff 0f 1f 40 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 89 fb 48 8b 7f 18 e8 a6 ea c0 ff 4
458 8b 7b 20 <f0> ff 0f 0f 94 c0 84 c0 74 05 e8 d3 99 c1 ff 48 8b 43 40 48 8b
46Dec 15 16:48:34 puck kernel: [ 1798.783970] RIP [<ffffffff8147841e>] free_async+0x1e/0x70
47Dec 15 16:48:34 puck kernel: [ 1798.785630] RSP <ffff88005715fd78>
48Dec 15 16:48:34 puck kernel: [ 1798.787274] CR2: 0000000000000000
49Dec 15 16:48:34 puck kernel: [ 1798.794728] ---[ end trace 52894d3355f88d19 ]---
50
51markup_oops.pl says the oops is in put_cred:
52
53 ffffffff81478401: 48 89 e5 mov %rsp,%rbp
54 ffffffff81478404: 53 push %rbx
55 ffffffff81478405: 48 83 ec 08 sub $0x8,%rsp
56 ffffffff81478409: e8 f2 c0 1a 00 callq ffffffff81624500 <mcount>
57 ffffffff8147840e: 48 89 fb mov %rdi,%rbx | %ebx => ffff88006fe8f900
58 put_pid(as->pid);
59 ffffffff81478411: 48 8b 7f 18 mov 0x18(%rdi),%rdi
60 ffffffff81478415: e8 a6 ea c0 ff callq ffffffff81086ec0 <put_pid>
61 put_cred(as->cred);
62 ffffffff8147841a: 48 8b 7b 20 mov 0x20(%rbx),%rdi | %edi => 0 %ebx = ffff88006fe8f900
63 */
64 static inline int atomic_dec_and_test(atomic_t *v)
65 {
66 unsigned char c;
67
68 asm volatile(LOCK_PREFIX "decl %0; sete %1"
69*ffffffff8147841e: f0 ff 0f lock decl (%rdi) | %edi = 0 <--- faulting instruction
70 ffffffff81478421: 0f 94 c0 sete %al
71 static inline void put_cred(const struct cred *_cred)
72 {
73 struct cred *cred = (struct cred *) _cred;
74
75 validate_creds(cred);
76 if (atomic_dec_and_test(&(cred)->usage))
77 ffffffff81478424: 84 c0 test %al,%al
78 ffffffff81478426: 74 05 je ffffffff8147842d <free_async+0x2d>
79 __put_cred(cred);
80 ffffffff81478428: e8 d3 99 c1 ff callq ffffffff81091e00 <__put_cred>
81 kfree(as->urb->transfer_buffer);
82 ffffffff8147842d: 48 8b 43 40 mov 0x40(%rbx),%rax
83 ffffffff81478431: 48 8b 78 68 mov 0x68(%rax),%rdi
84 ffffffff81478435: e8 a6 e1 ce ff callq ffffffff811665e0 <kfree>
85 kfree(as->urb->setup_packet);
86 ffffffff8147843a: 48 8b 43 40 mov 0x40(%rbx),%rax
87 ffffffff8147843e: 48 8b b8 90 00 00 00 mov 0x90(%rax),%rdi
88 ffffffff81478445: e8 96 e1 ce ff callq ffffffff811665e0 <kfree>
89 usb_free_urb(as->urb);
90 ffffffff8147844a: 48 8b 7b 40 mov 0x40(%rbx),%rdi
91 ffffffff8147844e: e8 0d 6b ff ff callq ffffffff8146ef60 <usb_free_urb>
92
93This bug seems to have been introduced by commit
94d178bc3a708f39cbfefc3fab37032d3f2511b4ec "user namespace: usb: make usb
95urbs user namespace aware (v2)"
96
97I'm not sure if this is right fix, but it does stop the oops.
98
99Unfortunately, the Point Grey software still refuses to work, but it's a
100closed source app, so I can't fix it.
101
102Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
103Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
104Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
105---
106 drivers/usb/core/devio.c | 3 ++-
107 1 files changed, 2 insertions(+), 1 deletions(-)
108
109diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
110index e3beaf2..7abf060 100644
111--- a/drivers/usb/core/devio.c
112+++ b/drivers/usb/core/devio.c
113@@ -249,7 +249,8 @@ static struct async *alloc_async(unsigned int numisoframes)
114 static void free_async(struct async *as)
115 {
116 put_pid(as->pid);
117- put_cred(as->cred);
118+ if (as->cred)
119+ put_cred(as->cred);
120 kfree(as->urb->transfer_buffer);
121 kfree(as->urb->setup_packet);
122 usb_free_urb(as->urb);
123--
1241.7.7.4
125
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0030-atmel_serial-fix-spinlock-lockup-in-RS485-code.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0030-atmel_serial-fix-spinlock-lockup-in-RS485-code.patch
new file mode 100644
index 00000000..75f2b51a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0030-atmel_serial-fix-spinlock-lockup-in-RS485-code.patch
@@ -0,0 +1,47 @@
1From 2918b666fe0636d9d90ce6defda2d3ec908231a8 Mon Sep 17 00:00:00 2001
2From: Claudio Scordino <claudio@evidence.eu.com>
3Date: Fri, 16 Dec 2011 15:08:49 +0100
4Subject: [PATCH 30/49] atmel_serial: fix spinlock lockup in RS485 code
5
6commit dbf1115d3f8c7052788aa4e6e46abd27f3b3eeba upstream.
7
8Patch to fix a spinlock lockup in the driver that sometimes happens when the
9tasklet starts.
10
11Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
12Signed-off-by: Dave Bender <codehero@gmail.com>
13Tested-by: Dave Bender <codehero@gmail.com>
14Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
15Acked-by: Alan Cox <alan@linux.intel.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 drivers/tty/serial/atmel_serial.c | 5 +++--
19 1 files changed, 3 insertions(+), 2 deletions(-)
20
21diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
22index 4c823f3..90c8e3a 100644
23--- a/drivers/tty/serial/atmel_serial.c
24+++ b/drivers/tty/serial/atmel_serial.c
25@@ -212,8 +212,9 @@ void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf)
26 {
27 struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
28 unsigned int mode;
29+ unsigned long flags;
30
31- spin_lock(&port->lock);
32+ spin_lock_irqsave(&port->lock, flags);
33
34 /* Disable interrupts */
35 UART_PUT_IDR(port, atmel_port->tx_done_mask);
36@@ -244,7 +245,7 @@ void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf)
37 /* Enable interrupts */
38 UART_PUT_IER(port, atmel_port->tx_done_mask);
39
40- spin_unlock(&port->lock);
41+ spin_unlock_irqrestore(&port->lock, flags);
42
43 }
44
45--
461.7.7.4
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0031-cgroup-fix-to-allow-mounting-a-hierarchy-by-name.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0031-cgroup-fix-to-allow-mounting-a-hierarchy-by-name.patch
new file mode 100644
index 00000000..649d103b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0031-cgroup-fix-to-allow-mounting-a-hierarchy-by-name.patch
@@ -0,0 +1,50 @@
1From 7e755f9707e34e7de22e2f3b77ab26d1d8de5a4b Mon Sep 17 00:00:00 2001
2From: Li Zefan <lizf@cn.fujitsu.com>
3Date: Tue, 27 Dec 2011 14:25:55 +0800
4Subject: [PATCH 31/49] cgroup: fix to allow mounting a hierarchy by name
5
6commit 0d19ea866562e46989412a0676412fa0983c9ce7 upstream.
7
8If we mount a hierarchy with a specified name, the name is unique,
9and we can use it to mount the hierarchy without specifying its
10set of subsystem names. This feature is documented is
11Documentation/cgroups/cgroups.txt section 2.3
12
13Here's an example:
14
15 # mount -t cgroup -o cpuset,name=myhier xxx /cgroup1
16 # mount -t cgroup -o name=myhier xxx /cgroup2
17
18But it was broken by commit 32a8cf235e2f192eb002755076994525cdbaa35a
19(cgroup: make the mount options parsing more accurate)
20
21This fixes the regression.
22
23Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
24Signed-off-by: Tejun Heo <tj@kernel.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
26---
27 kernel/cgroup.c | 6 +++---
28 1 files changed, 3 insertions(+), 3 deletions(-)
29
30diff --git a/kernel/cgroup.c b/kernel/cgroup.c
31index a184470..cdc0354 100644
32--- a/kernel/cgroup.c
33+++ b/kernel/cgroup.c
34@@ -1175,10 +1175,10 @@ static int parse_cgroupfs_options(char *data, struct cgroup_sb_opts *opts)
35
36 /*
37 * If the 'all' option was specified select all the subsystems,
38- * otherwise 'all, 'none' and a subsystem name options were not
39- * specified, let's default to 'all'
40+ * otherwise if 'none', 'name=' and a subsystem name options
41+ * were not specified, let's default to 'all'
42 */
43- if (all_ss || (!all_ss && !one_ss && !opts->none)) {
44+ if (all_ss || (!one_ss && !opts->none && !opts->name)) {
45 for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
46 struct cgroup_subsys *ss = subsys[i];
47 if (ss == NULL)
48--
491.7.7.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0032-udf-Fix-deadlock-when-converting-file-from-in-ICB-on.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0032-udf-Fix-deadlock-when-converting-file-from-in-ICB-on.patch
new file mode 100644
index 00000000..e5d99f76
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0032-udf-Fix-deadlock-when-converting-file-from-in-ICB-on.patch
@@ -0,0 +1,130 @@
1From b2b56aa7932508ce3a81187a68e6a558268efc35 Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Sat, 10 Dec 2011 02:30:48 +0100
4Subject: [PATCH 32/49] udf: Fix deadlock when converting file from in-ICB one
5 to normal one
6
7commit d2eb8c359309ec45d6bf5b147303ab8e13be86ea upstream.
8
9During BKL removal in 2.6.38, conversion of files from in-ICB format to normal
10format got broken. We call ->writepage with i_data_sem held but udf_get_block()
11also acquires i_data_sem thus creating A-A deadlock.
12
13We fix the problem by dropping i_data_sem before calling ->writepage() which is
14safe since i_mutex still protects us against any changes in the file. Also fix
15pagelock - i_data_sem lock inversion in udf_expand_file_adinicb() by dropping
16i_data_sem before calling find_or_create_page().
17
18Reported-by: Matthias Matiak <netzpython@mail-on.us>
19Tested-by: Matthias Matiak <netzpython@mail-on.us>
20Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
21Signed-off-by: Jan Kara <jack@suse.cz>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 fs/udf/file.c | 6 +++---
25 fs/udf/inode.c | 21 ++++++++++++++++++---
26 2 files changed, 21 insertions(+), 6 deletions(-)
27
28diff --git a/fs/udf/file.c b/fs/udf/file.c
29index d8ffa7c..dca0c38 100644
30--- a/fs/udf/file.c
31+++ b/fs/udf/file.c
32@@ -125,7 +125,6 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
33 err = udf_expand_file_adinicb(inode);
34 if (err) {
35 udf_debug("udf_expand_adinicb: err=%d\n", err);
36- up_write(&iinfo->i_data_sem);
37 return err;
38 }
39 } else {
40@@ -133,9 +132,10 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
41 iinfo->i_lenAlloc = pos + count;
42 else
43 iinfo->i_lenAlloc = inode->i_size;
44+ up_write(&iinfo->i_data_sem);
45 }
46- }
47- up_write(&iinfo->i_data_sem);
48+ } else
49+ up_write(&iinfo->i_data_sem);
50
51 retval = generic_file_aio_write(iocb, iov, nr_segs, ppos);
52 if (retval > 0)
53diff --git a/fs/udf/inode.c b/fs/udf/inode.c
54index 4fd1d80..e2787d0 100644
55--- a/fs/udf/inode.c
56+++ b/fs/udf/inode.c
57@@ -151,6 +151,12 @@ const struct address_space_operations udf_aops = {
58 .bmap = udf_bmap,
59 };
60
61+/*
62+ * Expand file stored in ICB to a normal one-block-file
63+ *
64+ * This function requires i_data_sem for writing and releases it.
65+ * This function requires i_mutex held
66+ */
67 int udf_expand_file_adinicb(struct inode *inode)
68 {
69 struct page *page;
70@@ -169,9 +175,15 @@ int udf_expand_file_adinicb(struct inode *inode)
71 iinfo->i_alloc_type = ICBTAG_FLAG_AD_LONG;
72 /* from now on we have normal address_space methods */
73 inode->i_data.a_ops = &udf_aops;
74+ up_write(&iinfo->i_data_sem);
75 mark_inode_dirty(inode);
76 return 0;
77 }
78+ /*
79+ * Release i_data_sem so that we can lock a page - page lock ranks
80+ * above i_data_sem. i_mutex still protects us against file changes.
81+ */
82+ up_write(&iinfo->i_data_sem);
83
84 page = find_or_create_page(inode->i_mapping, 0, GFP_NOFS);
85 if (!page)
86@@ -187,6 +199,7 @@ int udf_expand_file_adinicb(struct inode *inode)
87 SetPageUptodate(page);
88 kunmap(page);
89 }
90+ down_write(&iinfo->i_data_sem);
91 memset(iinfo->i_ext.i_data + iinfo->i_lenEAttr, 0x00,
92 iinfo->i_lenAlloc);
93 iinfo->i_lenAlloc = 0;
94@@ -196,17 +209,20 @@ int udf_expand_file_adinicb(struct inode *inode)
95 iinfo->i_alloc_type = ICBTAG_FLAG_AD_LONG;
96 /* from now on we have normal address_space methods */
97 inode->i_data.a_ops = &udf_aops;
98+ up_write(&iinfo->i_data_sem);
99 err = inode->i_data.a_ops->writepage(page, &udf_wbc);
100 if (err) {
101 /* Restore everything back so that we don't lose data... */
102 lock_page(page);
103 kaddr = kmap(page);
104+ down_write(&iinfo->i_data_sem);
105 memcpy(iinfo->i_ext.i_data + iinfo->i_lenEAttr, kaddr,
106 inode->i_size);
107 kunmap(page);
108 unlock_page(page);
109 iinfo->i_alloc_type = ICBTAG_FLAG_AD_IN_ICB;
110 inode->i_data.a_ops = &udf_adinicb_aops;
111+ up_write(&iinfo->i_data_sem);
112 }
113 page_cache_release(page);
114 mark_inode_dirty(inode);
115@@ -1111,10 +1127,9 @@ int udf_setsize(struct inode *inode, loff_t newsize)
116 if (bsize <
117 (udf_file_entry_alloc_offset(inode) + newsize)) {
118 err = udf_expand_file_adinicb(inode);
119- if (err) {
120- up_write(&iinfo->i_data_sem);
121+ if (err)
122 return err;
123- }
124+ down_write(&iinfo->i_data_sem);
125 } else
126 iinfo->i_lenAlloc = newsize;
127 }
128--
1291.7.7.4
130
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0033-drivers-usb-class-cdc-acm.c-clear-dangling-pointer.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0033-drivers-usb-class-cdc-acm.c-clear-dangling-pointer.patch
new file mode 100644
index 00000000..e5e7b956
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0033-drivers-usb-class-cdc-acm.c-clear-dangling-pointer.patch
@@ -0,0 +1,45 @@
1From 2aabf017a2a76405dd9efbca80320965d8361302 Mon Sep 17 00:00:00 2001
2From: Julia Lawall <julia@diku.dk>
3Date: Fri, 23 Dec 2011 14:02:55 +0100
4Subject: [PATCH 33/49] drivers/usb/class/cdc-acm.c: clear dangling pointer
5
6commit e7c8e8605d0bafc705ff27f9da98a1668427cc0f upstream.
7
8On some failures, the country_code field of an acm structure is freed
9without freeing the acm structure itself. Elsewhere, operations including
10memcpy and kfree are performed on the country_code field. The patch sets
11the country_code field to NULL when it is freed, and likewise sets the
12country_code_size field to 0.
13
14Signed-off-by: Julia Lawall <julia@diku.dk>
15Acked-by: Oliver Neukum <oneukum@suse.de>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 drivers/usb/class/cdc-acm.c | 4 ++++
19 1 files changed, 4 insertions(+), 0 deletions(-)
20
21diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
22index a8078d0..ea5e487 100644
23--- a/drivers/usb/class/cdc-acm.c
24+++ b/drivers/usb/class/cdc-acm.c
25@@ -1183,6 +1183,8 @@ made_compressed_probe:
26 i = device_create_file(&intf->dev, &dev_attr_wCountryCodes);
27 if (i < 0) {
28 kfree(acm->country_codes);
29+ acm->country_codes = NULL;
30+ acm->country_code_size = 0;
31 goto skip_countries;
32 }
33
34@@ -1191,6 +1193,8 @@ made_compressed_probe:
35 if (i < 0) {
36 device_remove_file(&intf->dev, &dev_attr_wCountryCodes);
37 kfree(acm->country_codes);
38+ acm->country_codes = NULL;
39+ acm->country_code_size = 0;
40 goto skip_countries;
41 }
42 }
43--
441.7.7.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0034-USB-isight-fix-kernel-bug-when-loading-firmware.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0034-USB-isight-fix-kernel-bug-when-loading-firmware.patch
new file mode 100644
index 00000000..ed02f1e3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0034-USB-isight-fix-kernel-bug-when-loading-firmware.patch
@@ -0,0 +1,47 @@
1From 1d24cdb0797a26e1fb1d3545f6d4b992a5a23e96 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@suse.de>
3Date: Mon, 5 Dec 2011 14:02:59 -0800
4Subject: [PATCH 34/49] USB: isight: fix kernel bug when loading firmware
5
6commit 59bf5cf94f0fa3b08fb1258b52649077b7d0914d upstream.
7
8We were sending data on the stack when uploading firmware, which causes
9some machines fits, and is not allowed. Fix this by using the buffer we
10already had around for this very purpose.
11
12Reported-by: Wouter M. Koolen <wmkoolen@cwi.nl>
13Tested-by: Wouter M. Koolen <wmkoolen@cwi.nl>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/usb/misc/isight_firmware.c | 6 ++++--
17 1 files changed, 4 insertions(+), 2 deletions(-)
18
19diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c
20index fe1d443..8f725f6 100644
21--- a/drivers/usb/misc/isight_firmware.c
22+++ b/drivers/usb/misc/isight_firmware.c
23@@ -55,8 +55,9 @@ static int isight_firmware_load(struct usb_interface *intf,
24
25 ptr = firmware->data;
26
27+ buf[0] = 0x01;
28 if (usb_control_msg
29- (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\1", 1,
30+ (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, buf, 1,
31 300) != 1) {
32 printk(KERN_ERR
33 "Failed to initialise isight firmware loader\n");
34@@ -100,8 +101,9 @@ static int isight_firmware_load(struct usb_interface *intf,
35 }
36 }
37
38+ buf[0] = 0x00;
39 if (usb_control_msg
40- (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\0", 1,
41+ (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, buf, 1,
42 300) != 1) {
43 printk(KERN_ERR "isight firmware loading completion failed\n");
44 ret = -ENODEV;
45--
461.7.7.4
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0035-usb-usb-storage-doesn-t-support-dynamic-id-currently.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0035-usb-usb-storage-doesn-t-support-dynamic-id-currently.patch
new file mode 100644
index 00000000..3b4450ad
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0035-usb-usb-storage-doesn-t-support-dynamic-id-currently.patch
@@ -0,0 +1,121 @@
1From 713ad0e8402a7e377bb8b4254b9b522628c9afeb Mon Sep 17 00:00:00 2001
2From: Huajun Li <huajun.li.lee@gmail.com>
3Date: Wed, 4 Jan 2012 19:25:33 +0800
4Subject: [PATCH 35/49] usb: usb-storage doesn't support dynamic id currently,
5 the patch disables the feature to fix an oops
6
7commit 1a3a026ba1b6bbfe0b7f79ab38cf991d691e7c9a upstream.
8
9Echo vendor and product number of a non usb-storage device to
10usb-storage driver's new_id, then plug in the device to host and you
11will find following oops msg, the root cause is usb_stor_probe1()
12refers invalid id entry if giving a dynamic id, so just disable the
13feature.
14
15[ 3105.018012] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
16[ 3105.018062] CPU 0
17[ 3105.018075] Modules linked in: usb_storage usb_libusual bluetooth
18dm_crypt binfmt_misc snd_hda_codec_analog snd_hda_intel snd_hda_codec
19snd_hwdep hp_wmi ppdev sparse_keymap snd_pcm snd_seq_midi snd_rawmidi
20snd_seq_midi_event snd_seq snd_timer snd_seq_device psmouse snd
21serio_raw tpm_infineon soundcore i915 snd_page_alloc tpm_tis
22parport_pc tpm tpm_bios drm_kms_helper drm i2c_algo_bit video lp
23parport usbhid hid sg sr_mod sd_mod ehci_hcd uhci_hcd usbcore e1000e
24usb_common floppy
25[ 3105.018408]
26[ 3105.018419] Pid: 189, comm: khubd Tainted: G I 3.2.0-rc7+
27#29 Hewlett-Packard HP Compaq dc7800p Convertible Minitower/0AACh
28[ 3105.018481] RIP: 0010:[<ffffffffa045830d>] [<ffffffffa045830d>]
29usb_stor_probe1+0x2fd/0xc20 [usb_storage]
30[ 3105.018536] RSP: 0018:ffff880056a3d830 EFLAGS: 00010286
31[ 3105.018562] RAX: ffff880065f4e648 RBX: ffff88006bb28000 RCX: 0000000000000000
32[ 3105.018597] RDX: ffff88006f23c7b0 RSI: 0000000000000001 RDI: 0000000000000206
33[ 3105.018632] RBP: ffff880056a3d900 R08: 0000000000000000 R09: ffff880067365000
34[ 3105.018665] R10: 00000000000002ac R11: 0000000000000010 R12: ffff6000b41a7340
35[ 3105.018698] R13: ffff880065f4ef60 R14: ffff88006bb28b88 R15: ffff88006f23d270
36[ 3105.018733] FS: 0000000000000000(0000) GS:ffff88007a200000(0000)
37knlGS:0000000000000000
38[ 3105.018773] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
39[ 3105.018801] CR2: 00007fc99c8c4650 CR3: 0000000001e05000 CR4: 00000000000006f0
40[ 3105.018835] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
41[ 3105.018870] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
42[ 3105.018906] Process khubd (pid: 189, threadinfo ffff880056a3c000,
43task ffff88005677a400)
44[ 3105.018945] Stack:
45[ 3105.018959] 0000000000000000 0000000000000000 ffff880056a3d8d0
460000000000000002
47[ 3105.019011] 0000000000000000 ffff880056a3d918 ffff880000000000
480000000000000002
49[ 3105.019058] ffff880056a3d8d0 0000000000000012 ffff880056a3d8d0
500000000000000006
51[ 3105.019105] Call Trace:
52[ 3105.019128] [<ffffffffa0458cd4>] storage_probe+0xa4/0xe0 [usb_storage]
53[ 3105.019173] [<ffffffffa0097822>] usb_probe_interface+0x172/0x330 [usbcore]
54[ 3105.019211] [<ffffffff815fda67>] driver_probe_device+0x257/0x3b0
55[ 3105.019243] [<ffffffff815fdd43>] __device_attach+0x73/0x90
56[ 3105.019272] [<ffffffff815fdcd0>] ? __driver_attach+0x110/0x110
57[ 3105.019303] [<ffffffff815fb93c>] bus_for_each_drv+0x9c/0xf0
58[ 3105.019334] [<ffffffff815fd6c7>] device_attach+0xf7/0x120
59[ 3105.019364] [<ffffffff815fc905>] bus_probe_device+0x45/0x80
60[ 3105.019396] [<ffffffff815f98a6>] device_add+0x876/0x990
61[ 3105.019434] [<ffffffffa0094e42>] usb_set_configuration+0x822/0x9e0 [usbcore]
62[ 3105.019479] [<ffffffffa00a3492>] generic_probe+0x62/0xf0 [usbcore]
63[ 3105.019518] [<ffffffffa0097a46>] usb_probe_device+0x66/0xb0 [usbcore]
64[ 3105.019555] [<ffffffff815fda67>] driver_probe_device+0x257/0x3b0
65[ 3105.019589] [<ffffffff815fdd43>] __device_attach+0x73/0x90
66[ 3105.019617] [<ffffffff815fdcd0>] ? __driver_attach+0x110/0x110
67[ 3105.019648] [<ffffffff815fb93c>] bus_for_each_drv+0x9c/0xf0
68[ 3105.019680] [<ffffffff815fd6c7>] device_attach+0xf7/0x120
69[ 3105.019709] [<ffffffff815fc905>] bus_probe_device+0x45/0x80
70[ 3105.021040] usb usb6: usb auto-resume
71[ 3105.021045] usb usb6: wakeup_rh
72[ 3105.024849] [<ffffffff815f98a6>] device_add+0x876/0x990
73[ 3105.025086] [<ffffffffa0088987>] usb_new_device+0x1e7/0x2b0 [usbcore]
74[ 3105.025086] [<ffffffffa008a4d7>] hub_thread+0xb27/0x1ec0 [usbcore]
75[ 3105.025086] [<ffffffff810d5200>] ? wake_up_bit+0x50/0x50
76[ 3105.025086] [<ffffffffa00899b0>] ? usb_remote_wakeup+0xa0/0xa0 [usbcore]
77[ 3105.025086] [<ffffffff810d49b8>] kthread+0xd8/0xf0
78[ 3105.025086] [<ffffffff81939884>] kernel_thread_helper+0x4/0x10
79[ 3105.025086] [<ffffffff8192a8c0>] ? _raw_spin_unlock_irq+0x50/0x80
80[ 3105.025086] [<ffffffff8192b1b4>] ? retint_restore_args+0x13/0x13
81[ 3105.025086] [<ffffffff810d48e0>] ? __init_kthread_worker+0x80/0x80
82[ 3105.025086] [<ffffffff81939880>] ? gs_change+0x13/0x13
83[ 3105.025086] Code: 00 48 83 05 cd ad 00 00 01 48 83 05 cd ad 00 00
8401 4c 8b ab 30 0c 00 00 48 8b 50 08 48 83 c0 30 48 89 45 a0 4c 89 a3
8540 0c 00 00 <41> 0f b6 44 24 10 48 89 55 a8 3c ff 0f 84 b8 04 00 00 48
8683 05
87[ 3105.025086] RIP [<ffffffffa045830d>] usb_stor_probe1+0x2fd/0xc20
88[usb_storage]
89[ 3105.025086] RSP <ffff880056a3d830>
90[ 3105.060037] hub 6-0:1.0: hub_resume
91[ 3105.062616] usb usb5: usb auto-resume
92[ 3105.064317] ehci_hcd 0000:00:1d.7: resume root hub
93[ 3105.094809] ---[ end trace a7919e7f17c0a727 ]---
94[ 3105.130069] hub 5-0:1.0: hub_resume
95[ 3105.132131] usb usb4: usb auto-resume
96[ 3105.132136] usb usb4: wakeup_rh
97[ 3105.180059] hub 4-0:1.0: hub_resume
98[ 3106.290052] usb usb6: suspend_rh (auto-stop)
99[ 3106.290077] usb usb4: suspend_rh (auto-stop)
100
101Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
102Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
103---
104 drivers/usb/storage/usb.c | 1 +
105 1 files changed, 1 insertions(+), 0 deletions(-)
106
107diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
108index c325e69..9e069ef 100644
109--- a/drivers/usb/storage/usb.c
110+++ b/drivers/usb/storage/usb.c
111@@ -1073,6 +1073,7 @@ static struct usb_driver usb_storage_driver = {
112 .id_table = usb_storage_usb_ids,
113 .supports_autosuspend = 1,
114 .soft_unbind = 1,
115+ .no_dynamic_id = 1,
116 };
117
118 static int __init usb_stor_init(void)
119--
1201.7.7.4
121
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0036-USB-pxa168-Fix-compilation-error.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0036-USB-pxa168-Fix-compilation-error.patch
new file mode 100644
index 00000000..87cc3a5c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0036-USB-pxa168-Fix-compilation-error.patch
@@ -0,0 +1,42 @@
1From 17e7ea93a7ec7bb64e3bcd6b3cbee1fea5021587 Mon Sep 17 00:00:00 2001
2From: Tanmay Upadhyay <tanmay.upadhyay@einfochips.com>
3Date: Thu, 8 Dec 2011 10:03:49 +0530
4Subject: [PATCH 36/49] USB: pxa168: Fix compilation error
5
6commit 35657c4d72925936c7219cc5caac118ca632acc2 upstream.
7
8After commit c430131a02d677aa708f56342c1565edfdacb3c0 (Support
9controllers with big endian capability regs), HC_LENGTH takes
10two arguments. This patch fixes following compilation error:
11
12In file included from drivers/usb/host/ehci-hcd.c:1323:
13drivers/usb/host/ehci-pxa168.c:302:54: error: macro "HC_LENGTH" requires 2 arguments, but only 1 given
14In file included from drivers/usb/host/ehci-hcd.c:1323:
15drivers/usb/host/ehci-pxa168.c: In function 'ehci_pxa168_drv_probe':
16drivers/usb/host/ehci-pxa168.c:302: error: 'HC_LENGTH' undeclared (first use in this function)
17drivers/usb/host/ehci-pxa168.c:302: error: (Each undeclared identifier is reported only once
18drivers/usb/host/ehci-pxa168.c:302: error: for each function it appears in.)
19
20Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@einfochips.com>
21Acked-by: Alan Stern <stern@rowland.harvard.edu>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 drivers/usb/host/ehci-pxa168.c | 2 +-
25 1 files changed, 1 insertions(+), 1 deletions(-)
26
27diff --git a/drivers/usb/host/ehci-pxa168.c b/drivers/usb/host/ehci-pxa168.c
28index ac0c16e..8d0e7a2 100644
29--- a/drivers/usb/host/ehci-pxa168.c
30+++ b/drivers/usb/host/ehci-pxa168.c
31@@ -299,7 +299,7 @@ static int __devinit ehci_pxa168_drv_probe(struct platform_device *pdev)
32 ehci = hcd_to_ehci(hcd);
33 ehci->caps = hcd->regs + 0x100;
34 ehci->regs = hcd->regs + 0x100 +
35- HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
36+ HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase));
37 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
38 hcd->has_tt = 1;
39 ehci->sbrn = 0x20;
40--
411.7.7.4
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0037-USB-add-quirk-for-another-camera.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0037-USB-add-quirk-for-another-camera.patch
new file mode 100644
index 00000000..c981711f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0037-USB-add-quirk-for-another-camera.patch
@@ -0,0 +1,37 @@
1From ae803972522d34f68270782827580ba0d762468c Mon Sep 17 00:00:00 2001
2From: Oliver Neukum <oliver@neukum.org>
3Date: Tue, 3 Jan 2012 09:58:54 +0100
4Subject: [PATCH 37/49] USB: add quirk for another camera
5
6commit 35284b3d2f68a8a3703745e629999469f78386b5 upstream.
7
8The Guillemot Webcam Hercules Dualpix Exchange camera
9has been reported with a second ID.
10
11Signed-off-by: Oliver Neukum <oneukum@suse.de>
12Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13---
14 drivers/usb/core/quirks.c | 5 ++++-
15 1 files changed, 4 insertions(+), 1 deletions(-)
16
17diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
18index ecf12e1..4c65eb6 100644
19--- a/drivers/usb/core/quirks.c
20+++ b/drivers/usb/core/quirks.c
21@@ -117,9 +117,12 @@ static const struct usb_device_id usb_quirk_list[] = {
22 { USB_DEVICE(0x06a3, 0x0006), .driver_info =
23 USB_QUIRK_CONFIG_INTF_STRINGS },
24
25- /* Guillemot Webcam Hercules Dualpix Exchange*/
26+ /* Guillemot Webcam Hercules Dualpix Exchange (2nd ID) */
27 { USB_DEVICE(0x06f8, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME },
28
29+ /* Guillemot Webcam Hercules Dualpix Exchange*/
30+ { USB_DEVICE(0x06f8, 0x3005), .driver_info = USB_QUIRK_RESET_RESUME },
31+
32 /* M-Systems Flash Disk Pioneers */
33 { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
34
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0038-USB-omninet-fix-write_room.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0038-USB-omninet-fix-write_room.patch
new file mode 100644
index 00000000..cbd585ac
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0038-USB-omninet-fix-write_room.patch
@@ -0,0 +1,34 @@
1From 4a6a3895c6ffe420a07f90df0f8ad5d7ac5a47a4 Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Sun, 6 Nov 2011 19:06:21 +0100
4Subject: [PATCH 38/49] USB: omninet: fix write_room
5
6commit 694c6301e515bad574af74b6552134c4d9dcb334 upstream.
7
8Fix regression introduced by commit 507ca9bc047666 ([PATCH] USB: add
9ability for usb-serial drivers to determine if their write urb is
10currently being used.) which inverted the logic in write_room so that it
11returns zero when the write urb is actually free.
12
13Signed-off-by: Johan Hovold <jhovold@gmail.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/usb/serial/omninet.c | 2 +-
17 1 files changed, 1 insertions(+), 1 deletions(-)
18
19diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
20index 60f38d5..0a8c1e6 100644
21--- a/drivers/usb/serial/omninet.c
22+++ b/drivers/usb/serial/omninet.c
23@@ -315,7 +315,7 @@ static int omninet_write_room(struct tty_struct *tty)
24 int room = 0; /* Default: no room */
25
26 /* FIXME: no consistent locking for write_urb_busy */
27- if (wport->write_urb_busy)
28+ if (!wport->write_urb_busy)
29 room = wport->bulk_out_size - OMNINET_HEADERLEN;
30
31 dbg("%s - returns %d", __func__, room);
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0039-usb-option-add-ZD-Incorporated-HSPA-modem.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0039-usb-option-add-ZD-Incorporated-HSPA-modem.patch
new file mode 100644
index 00000000..7c062f00
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0039-usb-option-add-ZD-Incorporated-HSPA-modem.patch
@@ -0,0 +1,53 @@
1From bd6e892c7f49027eb7d6f5739406142db70fee7e Mon Sep 17 00:00:00 2001
2From: Janne Snabb <snabb@epipe.com>
3Date: Wed, 28 Dec 2011 19:36:00 +0000
4Subject: [PATCH 39/49] usb: option: add ZD Incorporated HSPA modem
5
6commit 3c8c9316710b83e906e425024153bf0929887b59 upstream.
7
8Add support for Chinese Noname HSPA USB modem which is apparently
9manufactured by a company called ZD Incorporated (based on texts in the
10Windows drivers).
11
12This product is available at least from Dealextreme (SKU 80032) and
13possibly in India with name Olive V-MW250. It is based on Qualcomm
14MSM6280 chip.
15
16I needed to also add "options usb-storage quirks=0685:7000:i" in modprobe
17configuration because udevd or the kernel keeps poking the embedded
18fake-cd-rom which fails and causes the device to reset. There might be
19a better way to accomplish the same. usb_modeswitch is not needed with
20this device.
21
22Signed-off-by: Janne Snabb <snabb@epipe.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
24---
25 drivers/usb/serial/option.c | 5 +++++
26 1 files changed, 5 insertions(+), 0 deletions(-)
27
28diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
29index 6dd6453..c96b6b6 100644
30--- a/drivers/usb/serial/option.c
31+++ b/drivers/usb/serial/option.c
32@@ -476,6 +476,10 @@ static void option_instat_callback(struct urb *urb);
33 #define VIETTEL_VENDOR_ID 0x2262
34 #define VIETTEL_PRODUCT_VT1000 0x0002
35
36+/* ZD Incorporated */
37+#define ZD_VENDOR_ID 0x0685
38+#define ZD_PRODUCT_7000 0x7000
39+
40 /* some devices interfaces need special handling due to a number of reasons */
41 enum option_blacklist_reason {
42 OPTION_BLACKLIST_NONE = 0,
43@@ -1178,6 +1182,7 @@ static const struct usb_device_id option_ids[] = {
44 { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) },
45 { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
46 { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) },
47+ { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) },
48 { } /* Terminating entry */
49 };
50 MODULE_DEVICE_TABLE(usb, option_ids);
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0040-USB-Add-USB-ID-for-Multiplex-RC-serial-adapter-to-cp.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0040-USB-Add-USB-ID-for-Multiplex-RC-serial-adapter-to-cp.patch
new file mode 100644
index 00000000..164d1697
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0040-USB-Add-USB-ID-for-Multiplex-RC-serial-adapter-to-cp.patch
@@ -0,0 +1,36 @@
1From a558d5668e8c66327a1a84f5db8381e94c2b0cd9 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Malte=20Schr=C3=B6der?= <maltesch@gmx.de>
3Date: Thu, 5 Jan 2012 20:34:40 +0100
4Subject: [PATCH 40/49] USB: Add USB-ID for Multiplex RC serial adapter to
5 cp210x.c
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 08e87d0d773dc9ca5faf4c3306e238ed0ea129b0 upstream.
11
12Hi, below patch adds the USB-ID of the serial adapters sold by
13Multiplex RC (www.multiplex-rc.de).
14
15Signed-off-by: Malte Schröder <maltesch@gmx.de>
16Cc: stable <stable@vger.kernel.org>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 drivers/usb/serial/cp210x.c | 1 +
20 1 files changed, 1 insertions(+), 0 deletions(-)
21
22diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
23index fd67cc5..a1a324b 100644
24--- a/drivers/usb/serial/cp210x.c
25+++ b/drivers/usb/serial/cp210x.c
26@@ -92,6 +92,7 @@ static const struct usb_device_id id_table[] = {
27 { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */
28 { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
29 { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */
30+ { USB_DEVICE(0x10C4, 0x81A9) }, /* Multiplex RC Interface */
31 { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */
32 { USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */
33 { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
34--
351.7.7.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0041-usb-fix-number-of-mapped-SG-DMA-entries.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0041-usb-fix-number-of-mapped-SG-DMA-entries.patch
new file mode 100644
index 00000000..bc2716a5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0041-usb-fix-number-of-mapped-SG-DMA-entries.patch
@@ -0,0 +1,155 @@
1From 61ff4bd883cde399d333204fe9878e90b6f87329 Mon Sep 17 00:00:00 2001
2From: Clemens Ladisch <clemens@ladisch.de>
3Date: Sat, 3 Dec 2011 23:41:31 +0100
4Subject: [PATCH 41/49] usb: fix number of mapped SG DMA entries
5
6commit bc677d5b64644c399cd3db6a905453e611f402ab upstream.
7
8Add a new field num_mapped_sgs to struct urb so that we have a place to
9store the number of mapped entries and can also retain the original
10value of entries in num_sgs. Previously, usb_hcd_map_urb_for_dma()
11would overwrite this with the number of mapped entries, which would
12break dma_unmap_sg() because it requires the original number of entries.
13
14This fixes warnings like the following when using USB storage devices:
15 ------------[ cut here ]------------
16 WARNING: at lib/dma-debug.c:902 check_unmap+0x4e4/0x695()
17 ehci_hcd 0000:00:12.2: DMA-API: device driver frees DMA sg list with different entry count [map count=4] [unmap count=1]
18 Modules linked in: ohci_hcd ehci_hcd
19 Pid: 0, comm: kworker/0:1 Not tainted 3.2.0-rc2+ #319
20 Call Trace:
21 <IRQ> [<ffffffff81036d3b>] warn_slowpath_common+0x80/0x98
22 [<ffffffff81036de7>] warn_slowpath_fmt+0x41/0x43
23 [<ffffffff811fa5ae>] check_unmap+0x4e4/0x695
24 [<ffffffff8105e92c>] ? trace_hardirqs_off+0xd/0xf
25 [<ffffffff8147208b>] ? _raw_spin_unlock_irqrestore+0x33/0x50
26 [<ffffffff811fa84a>] debug_dma_unmap_sg+0xeb/0x117
27 [<ffffffff8137b02f>] usb_hcd_unmap_urb_for_dma+0x71/0x188
28 [<ffffffff8137b166>] unmap_urb_for_dma+0x20/0x22
29 [<ffffffff8137b1c5>] usb_hcd_giveback_urb+0x5d/0xc0
30 [<ffffffffa0000d02>] ehci_urb_done+0xf7/0x10c [ehci_hcd]
31 [<ffffffffa0001140>] qh_completions+0x429/0x4bd [ehci_hcd]
32 [<ffffffffa000340a>] ehci_work+0x95/0x9c0 [ehci_hcd]
33 ...
34 ---[ end trace f29ac88a5a48c580 ]---
35 Mapped at:
36 [<ffffffff811faac4>] debug_dma_map_sg+0x45/0x139
37 [<ffffffff8137bc0b>] usb_hcd_map_urb_for_dma+0x22e/0x478
38 [<ffffffff8137c494>] usb_hcd_submit_urb+0x63f/0x6fa
39 [<ffffffff8137d01c>] usb_submit_urb+0x2c7/0x2de
40 [<ffffffff8137dcd4>] usb_sg_wait+0x55/0x161
41
42Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
43Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
44---
45 drivers/usb/core/hcd.c | 5 ++---
46 drivers/usb/host/ehci-q.c | 2 +-
47 drivers/usb/host/uhci-q.c | 2 +-
48 drivers/usb/host/whci/qset.c | 4 ++--
49 drivers/usb/host/xhci-ring.c | 4 ++--
50 include/linux/usb.h | 1 +
51 6 files changed, 9 insertions(+), 9 deletions(-)
52
53diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
54index 13222d3..179e364 100644
55--- a/drivers/usb/core/hcd.c
56+++ b/drivers/usb/core/hcd.c
57@@ -1412,11 +1412,10 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
58 ret = -EAGAIN;
59 else
60 urb->transfer_flags |= URB_DMA_MAP_SG;
61- if (n != urb->num_sgs) {
62- urb->num_sgs = n;
63+ urb->num_mapped_sgs = n;
64+ if (n != urb->num_sgs)
65 urb->transfer_flags |=
66 URB_DMA_SG_COMBINED;
67- }
68 } else if (urb->sg) {
69 struct scatterlist *sg = urb->sg;
70 urb->transfer_dma = dma_map_page(
71diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
72index 4e4066c..fef1db3 100644
73--- a/drivers/usb/host/ehci-q.c
74+++ b/drivers/usb/host/ehci-q.c
75@@ -647,7 +647,7 @@ qh_urb_transaction (
76 /*
77 * data transfer stage: buffer setup
78 */
79- i = urb->num_sgs;
80+ i = urb->num_mapped_sgs;
81 if (len > 0 && i > 0) {
82 sg = urb->sg;
83 buf = sg_dma_address(sg);
84diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
85index f6ca80e..d2c6f5a 100644
86--- a/drivers/usb/host/uhci-q.c
87+++ b/drivers/usb/host/uhci-q.c
88@@ -943,7 +943,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb,
89 if (usb_pipein(urb->pipe))
90 status |= TD_CTRL_SPD;
91
92- i = urb->num_sgs;
93+ i = urb->num_mapped_sgs;
94 if (len > 0 && i > 0) {
95 sg = urb->sg;
96 data = sg_dma_address(sg);
97diff --git a/drivers/usb/host/whci/qset.c b/drivers/usb/host/whci/qset.c
98index a403b53..76083ae 100644
99--- a/drivers/usb/host/whci/qset.c
100+++ b/drivers/usb/host/whci/qset.c
101@@ -443,7 +443,7 @@ static int qset_add_urb_sg(struct whc *whc, struct whc_qset *qset, struct urb *u
102
103 remaining = urb->transfer_buffer_length;
104
105- for_each_sg(urb->sg, sg, urb->num_sgs, i) {
106+ for_each_sg(urb->sg, sg, urb->num_mapped_sgs, i) {
107 dma_addr_t dma_addr;
108 size_t dma_remaining;
109 dma_addr_t sp, ep;
110@@ -561,7 +561,7 @@ static int qset_add_urb_sg_linearize(struct whc *whc, struct whc_qset *qset,
111
112 remaining = urb->transfer_buffer_length;
113
114- for_each_sg(urb->sg, sg, urb->num_sgs, i) {
115+ for_each_sg(urb->sg, sg, urb->num_mapped_sgs, i) {
116 size_t len;
117 size_t sg_remaining;
118 void *orig;
119diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
120index 9f1d4b1..d28c586 100644
121--- a/drivers/usb/host/xhci-ring.c
122+++ b/drivers/usb/host/xhci-ring.c
123@@ -2561,7 +2561,7 @@ static unsigned int count_sg_trbs_needed(struct xhci_hcd *xhci, struct urb *urb)
124 struct scatterlist *sg;
125
126 sg = NULL;
127- num_sgs = urb->num_sgs;
128+ num_sgs = urb->num_mapped_sgs;
129 temp = urb->transfer_buffer_length;
130
131 xhci_dbg(xhci, "count sg list trbs: \n");
132@@ -2745,7 +2745,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
133 return -EINVAL;
134
135 num_trbs = count_sg_trbs_needed(xhci, urb);
136- num_sgs = urb->num_sgs;
137+ num_sgs = urb->num_mapped_sgs;
138 total_packet_count = roundup(urb->transfer_buffer_length,
139 usb_endpoint_maxp(&urb->ep->desc));
140
141diff --git a/include/linux/usb.h b/include/linux/usb.h
142index 1cea207..7626e5a 100644
143--- a/include/linux/usb.h
144+++ b/include/linux/usb.h
145@@ -1222,6 +1222,7 @@ struct urb {
146 void *transfer_buffer; /* (in) associated data buffer */
147 dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */
148 struct scatterlist *sg; /* (in) scatter gather buffer list */
149+ int num_mapped_sgs; /* (internal) mapped sg entries */
150 int num_sgs; /* (in) number of entries in the sg list */
151 u32 transfer_buffer_length; /* (in) data buffer length */
152 u32 actual_length; /* (return) actual transfer length */
153--
1541.7.7.4
155
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0042-xhci-Properly-handle-COMP_2ND_BW_ERR.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0042-xhci-Properly-handle-COMP_2ND_BW_ERR.patch
new file mode 100644
index 00000000..607ae218
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0042-xhci-Properly-handle-COMP_2ND_BW_ERR.patch
@@ -0,0 +1,62 @@
1From df0f4624e1225d9b7fb4d8934565418c81b42c04 Mon Sep 17 00:00:00 2001
2From: Hans de Goede <hdegoede@redhat.com>
3Date: Wed, 4 Jan 2012 23:29:18 +0100
4Subject: [PATCH 42/49] xhci: Properly handle COMP_2ND_BW_ERR
5
6commit 71d85724bdd947a3b42a88d08af79f290a1a767b upstream.
7
8I encountered a result of COMP_2ND_BW_ERR while improving how the pwc
9webcam driver handles not having the full usb1 bandwidth available to
10itself.
11
12I created the following test setup, a NEC xhci controller with a
13single TT USB 2 hub plugged into it, with a usb keyboard and a pwc webcam
14plugged into the usb2 hub. This caused the following to show up in dmesg
15when trying to stream from the pwc camera at its highest alt setting:
16
17xhci_hcd 0000:01:00.0: ERROR: unexpected command completion code 0x23.
18usb 6-2.1: Not enough bandwidth for altsetting 9
19
20And usb_set_interface returned -EINVAL, which caused my pwc code to not
21do the right thing as it expected -ENOSPC.
22
23This patch makes the xhci driver properly handle COMP_2ND_BW_ERR and makes
24usb_set_interface return -ENOSPC as expected.
25
26This should be backported to stable kernels as old as 2.6.32.
27
28Signed-off-by: Hans de Goede <hdegoede@redhat.com>
29Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
30Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
31---
32 drivers/usb/host/xhci.c | 1 +
33 drivers/usb/host/xhci.h | 1 -
34 2 files changed, 1 insertions(+), 1 deletions(-)
35
36diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
37index a1afb7c..36f9dd8 100644
38--- a/drivers/usb/host/xhci.c
39+++ b/drivers/usb/host/xhci.c
40@@ -1620,6 +1620,7 @@ static int xhci_configure_endpoint_result(struct xhci_hcd *xhci,
41 /* FIXME: can we allocate more resources for the HC? */
42 break;
43 case COMP_BW_ERR:
44+ case COMP_2ND_BW_ERR:
45 dev_warn(&udev->dev, "Not enough bandwidth "
46 "for new device state.\n");
47 ret = -ENOSPC;
48diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
49index 3c8fbd2..09eda3a 100644
50--- a/drivers/usb/host/xhci.h
51+++ b/drivers/usb/host/xhci.h
52@@ -1033,7 +1033,6 @@ struct xhci_transfer_event {
53 /* Invalid Stream ID Error */
54 #define COMP_STRID_ERR 34
55 /* Secondary Bandwidth Error - may be returned by a Configure Endpoint cmd */
56-/* FIXME - check for this */
57 #define COMP_2ND_BW_ERR 35
58 /* Split Transaction Error */
59 #define COMP_SPLIT_ERR 36
60--
611.7.7.4
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0043-usb-ch9-fix-up-MaxStreams-helper.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0043-usb-ch9-fix-up-MaxStreams-helper.patch
new file mode 100644
index 00000000..a96c3724
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0043-usb-ch9-fix-up-MaxStreams-helper.patch
@@ -0,0 +1,81 @@
1From db46f35cb2853ffa42157c7222335cae15eda7e0 Mon Sep 17 00:00:00 2001
2From: Felipe Balbi <balbi@ti.com>
3Date: Mon, 2 Jan 2012 13:35:41 +0200
4Subject: [PATCH 43/49] usb: ch9: fix up MaxStreams helper
5
6commit 18b7ede5f7ee2092aedcb578d3ac30bd5d4fc23c upstream.
7
8[ removed the dwc3 portion of the patch as it didn't apply to
9older kernels - gregkh]
10
11According to USB 3.0 Specification Table 9-22, if
12bmAttributes [4:0] are set to zero, it means "no
13streams supported", but the way this helper was
14defined on Linux, we will *always* have one stream
15which might cause several problems.
16
17For example on DWC3, we would tell the controller
18endpoint has streams enabled and yet start transfers
19with Stream ID set to 0, which would goof up the host
20side.
21
22While doing that, convert the macro to an inline
23function due to the different checks we now need.
24
25Signed-off-by: Felipe Balbi <balbi@ti.com>
26Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
27Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
28---
29 drivers/usb/host/xhci.c | 3 +--
30 include/linux/usb/ch9.h | 20 +++++++++++++++++++-
31 2 files changed, 20 insertions(+), 3 deletions(-)
32
33diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
34index 36f9dd8..b33f059 100644
35--- a/drivers/usb/host/xhci.c
36+++ b/drivers/usb/host/xhci.c
37@@ -2797,8 +2797,7 @@ static int xhci_calculate_streams_and_bitmask(struct xhci_hcd *xhci,
38 if (ret < 0)
39 return ret;
40
41- max_streams = USB_SS_MAX_STREAMS(
42- eps[i]->ss_ep_comp.bmAttributes);
43+ max_streams = usb_ss_max_streams(&eps[i]->ss_ep_comp);
44 if (max_streams < (*num_streams - 1)) {
45 xhci_dbg(xhci, "Ep 0x%x only supports %u stream IDs.\n",
46 eps[i]->desc.bEndpointAddress,
47diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
48index d5da6c6..61b2905 100644
49--- a/include/linux/usb/ch9.h
50+++ b/include/linux/usb/ch9.h
51@@ -605,8 +605,26 @@ struct usb_ss_ep_comp_descriptor {
52 } __attribute__ ((packed));
53
54 #define USB_DT_SS_EP_COMP_SIZE 6
55+
56 /* Bits 4:0 of bmAttributes if this is a bulk endpoint */
57-#define USB_SS_MAX_STREAMS(p) (1 << ((p) & 0x1f))
58+static inline int
59+usb_ss_max_streams(const struct usb_ss_ep_comp_descriptor *comp)
60+{
61+ int max_streams;
62+
63+ if (!comp)
64+ return 0;
65+
66+ max_streams = comp->bmAttributes & 0x1f;
67+
68+ if (!max_streams)
69+ return 0;
70+
71+ max_streams = 1 << max_streams;
72+
73+ return max_streams;
74+}
75+
76 /* Bits 1:0 of bmAttributes if this is an isoc endpoint */
77 #define USB_SS_MULT(p) (1 + ((p) & 0x3))
78
79--
801.7.7.4
81
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0044-igmp-Avoid-zero-delay-when-receiving-odd-mixture-of-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0044-igmp-Avoid-zero-delay-when-receiving-odd-mixture-of-.patch
new file mode 100644
index 00000000..d7403535
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0044-igmp-Avoid-zero-delay-when-receiving-odd-mixture-of-.patch
@@ -0,0 +1,37 @@
1From 53876956cbd176ad0da89ca8e066202f6c143ea8 Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Mon, 9 Jan 2012 14:06:46 -0800
4Subject: [PATCH 44/49] igmp: Avoid zero delay when receiving odd mixture of
5 IGMP queries
6
7commit a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27 upstream.
8
9Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
10behavior on v3 query during v2-compatibility mode') added yet another
11case for query parsing, which can result in max_delay = 0. Substitute
12a value of 1, as in the usual v3 case.
13
14Reported-by: Simon McVittie <smcv@debian.org>
15References: http://bugs.debian.org/654876
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18---
19 net/ipv4/igmp.c | 2 ++
20 1 files changed, 2 insertions(+), 0 deletions(-)
21
22diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
23index b2ca095..c3cc64c 100644
24--- a/net/ipv4/igmp.c
25+++ b/net/ipv4/igmp.c
26@@ -875,6 +875,8 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
27 * to be intended in a v3 query.
28 */
29 max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);
30+ if (!max_delay)
31+ max_delay = 1; /* can't mod w/ 0 */
32 } else { /* v3 */
33 if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))
34 return;
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0045-asix-fix-infinite-loop-in-rx_fixup.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0045-asix-fix-infinite-loop-in-rx_fixup.patch
new file mode 100644
index 00000000..93da6cde
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0045-asix-fix-infinite-loop-in-rx_fixup.patch
@@ -0,0 +1,38 @@
1From eaa03e7a01f7dd67773c27e82d446a44440843a6 Mon Sep 17 00:00:00 2001
2From: Aurelien Jacobs <aurel@gnuage.org>
3Date: Sat, 7 Jan 2012 12:15:16 -0800
4Subject: [PATCH 45/49] asix: fix infinite loop in rx_fixup()
5
6commit 6c15d74defd38e7e7f8805392578b7a1d508097e upstream.
7
8At this point if skb->len happens to be 2, the subsequant skb_pull(skb, 4)
9call won't work and the skb->len won't be decreased and won't ever reach 0,
10resulting in an infinite loop.
11
12With an ASIX 88772 under heavy load, without this patch, rx_fixup() reaches
13an infinite loop in less than a minute. With this patch applied,
14no infinite loop even after hours of heavy load.
15
16Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
17Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19---
20 drivers/net/usb/asix.c | 2 +-
21 1 files changed, 1 insertions(+), 1 deletions(-)
22
23diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
24index e95f0e6..dd2625a 100644
25--- a/drivers/net/usb/asix.c
26+++ b/drivers/net/usb/asix.c
27@@ -376,7 +376,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
28
29 skb_pull(skb, (size + 1) & 0xfffe);
30
31- if (skb->len == 0)
32+ if (skb->len < sizeof(header))
33 break;
34
35 head = (u8 *) skb->data;
36--
371.7.7.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0046-bonding-fix-error-handling-if-slave-is-busy-v2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0046-bonding-fix-error-handling-if-slave-is-busy-v2.patch
new file mode 100644
index 00000000..7b7e03a2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0046-bonding-fix-error-handling-if-slave-is-busy-v2.patch
@@ -0,0 +1,68 @@
1From b40864c73fef3aefced0863fc2b3c3a7716d9f09 Mon Sep 17 00:00:00 2001
2From: stephen hemminger <shemminger@vyatta.com>
3Date: Sat, 31 Dec 2011 13:26:46 +0000
4Subject: [PATCH 46/49] bonding: fix error handling if slave is busy (v2)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit f7d9821a6a9c83450ac35e76d3709e32fd38b76f upstream.
10
11If slave device already has a receive handler registered, then the
12error unwind of bonding device enslave function is broken.
13
14The following will leave a pointer to freed memory in the slave
15device list, causing a later kernel panic.
16# modprobe dummy
17# ip li add dummy0-1 link dummy0 type macvlan
18# modprobe bonding
19# echo +dummy0 >/sys/class/net/bond0/bonding/slaves
20
21The fix is to detach the slave (which removes it from the list)
22in the unwind path.
23
24Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
25Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
26Signed-off-by: David S. Miller <davem@davemloft.net>
27Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
28---
29 drivers/net/bonding/bond_main.c | 9 +++++++--
30 1 files changed, 7 insertions(+), 2 deletions(-)
31
32diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
33index 7f87568..e58aa2b 100644
34--- a/drivers/net/bonding/bond_main.c
35+++ b/drivers/net/bonding/bond_main.c
36@@ -1822,7 +1822,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
37 "but new slave device does not support netpoll.\n",
38 bond_dev->name);
39 res = -EBUSY;
40- goto err_close;
41+ goto err_detach;
42 }
43 }
44 #endif
45@@ -1831,7 +1831,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
46
47 res = bond_create_slave_symlinks(bond_dev, slave_dev);
48 if (res)
49- goto err_close;
50+ goto err_detach;
51
52 res = netdev_rx_handler_register(slave_dev, bond_handle_frame,
53 new_slave);
54@@ -1852,6 +1852,11 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
55 err_dest_symlinks:
56 bond_destroy_slave_symlinks(bond_dev, slave_dev);
57
58+err_detach:
59+ write_lock_bh(&bond->lock);
60+ bond_detach_slave(bond, new_slave);
61+ write_unlock_bh(&bond->lock);
62+
63 err_close:
64 dev_close(slave_dev);
65
66--
671.7.7.4
68
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0047-usb-cdc-acm-Fix-acm_tty_hangup-vs.-acm_tty_close-rac.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0047-usb-cdc-acm-Fix-acm_tty_hangup-vs.-acm_tty_close-rac.patch
new file mode 100644
index 00000000..f9363aaa
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0047-usb-cdc-acm-Fix-acm_tty_hangup-vs.-acm_tty_close-rac.patch
@@ -0,0 +1,54 @@
1From 9d3898fe46309ee5688697d1a65975208dc49639 Mon Sep 17 00:00:00 2001
2From: Thilo-Alexander Ginkel <thilo@ginkel.com>
3Date: Sat, 17 Dec 2011 10:55:10 +0100
4Subject: [PATCH 47/49] usb: cdc-acm: Fix acm_tty_hangup() vs. acm_tty_close()
5 race
6
7[Not upstream as it was fixed differently for 3.3 with a much more
8"intrusive" rework of the driver - gregkh]
9
10There is a race condition involving acm_tty_hangup() and acm_tty_close()
11where hangup() would attempt to access tty->driver_data without proper
12locking and NULL checking after close() has potentially already set it
13to NULL. One possibility to (sporadically) trigger this behavior is to
14perform a suspend/resume cycle with a running WWAN data connection.
15
16This patch addresses the issue by introducing a NULL check for
17tty->driver_data in acm_tty_hangup() protected by open_mutex and exiting
18gracefully when hangup() is invoked on a device that has already been
19closed.
20
21Signed-off-by: Thilo-Alexander Ginkel <thilo@ginkel.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 drivers/usb/class/cdc-acm.c | 12 ++++++++++--
25 1 files changed, 10 insertions(+), 2 deletions(-)
26
27diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
28index ea5e487..e61d9c4 100644
29--- a/drivers/usb/class/cdc-acm.c
30+++ b/drivers/usb/class/cdc-acm.c
31@@ -554,10 +554,18 @@ static void acm_port_down(struct acm *acm)
32
33 static void acm_tty_hangup(struct tty_struct *tty)
34 {
35- struct acm *acm = tty->driver_data;
36- tty_port_hangup(&acm->port);
37+ struct acm *acm;
38+
39 mutex_lock(&open_mutex);
40+ acm = tty->driver_data;
41+
42+ if (!acm)
43+ goto out;
44+
45+ tty_port_hangup(&acm->port);
46 acm_port_down(acm);
47+
48+out:
49 mutex_unlock(&open_mutex);
50 }
51
52--
531.7.7.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0048-xfs-fix-acl-count-validation-in-xfs_acl_from_disk.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0048-xfs-fix-acl-count-validation-in-xfs_acl_from_disk.patch
new file mode 100644
index 00000000..1ddf63dc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0048-xfs-fix-acl-count-validation-in-xfs_acl_from_disk.patch
@@ -0,0 +1,34 @@
1From 5af63c5af9a335ff2af8d6b84d512e92ac522995 Mon Sep 17 00:00:00 2001
2From: Xi Wang <xi.wang@gmail.com>
3Date: Mon, 12 Dec 2011 21:55:52 +0000
4Subject: [PATCH 48/49] xfs: fix acl count validation in xfs_acl_from_disk()
5
6commit 093019cf1b18dd31b2c3b77acce4e000e2cbc9ce upstream.
7
8Commit fa8b18ed didn't prevent the integer overflow and possible
9memory corruption. "count" can go negative and bypass the check.
10
11Signed-off-by: Xi Wang <xi.wang@gmail.com>
12Reviewed-by: Christoph Hellwig <hch@lst.de>
13Signed-off-by: Ben Myers <bpm@sgi.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 fs/xfs/xfs_acl.c | 2 +-
17 1 files changed, 1 insertions(+), 1 deletions(-)
18
19diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
20index 76e4266..ac702a6 100644
21--- a/fs/xfs/xfs_acl.c
22+++ b/fs/xfs/xfs_acl.c
23@@ -39,7 +39,7 @@ xfs_acl_from_disk(struct xfs_acl *aclp)
24 struct posix_acl_entry *acl_e;
25 struct posix_acl *acl;
26 struct xfs_acl_entry *ace;
27- int count, i;
28+ unsigned int count, i;
29
30 count = be32_to_cpu(aclp->acl_cnt);
31 if (count > XFS_ACL_MAX_ENTRIES)
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0049-Linux-3.2.1.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0049-Linux-3.2.1.patch
new file mode 100644
index 00000000..37c5764f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.1/0049-Linux-3.2.1.patch
@@ -0,0 +1,24 @@
1From 78d772bb92fa633fc41d234887b050dce88542bc Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@suse.de>
3Date: Thu, 12 Jan 2012 11:42:45 -0800
4Subject: [PATCH 49/49] Linux 3.2.1
5
6---
7 Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index adddd11..c5edffa 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,6 +1,6 @@
15 VERSION = 3
16 PATCHLEVEL = 2
17-SUBLEVEL = 0
18+SUBLEVEL = 1
19 EXTRAVERSION =
20 NAME = Saber-toothed Squirrel
21
22--
231.7.7.4
24
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch
new file mode 100644
index 00000000..08b29185
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch
@@ -0,0 +1,39 @@
1From 9589d3910b50c6e66f1a050e365c22271936b6b0 Mon Sep 17 00:00:00 2001
2From: Roman Tereshonkov <roman.tereshonkov@nokia.com>
3Date: Tue, 29 Nov 2011 12:49:18 +0200
4Subject: [PATCH 001/130] mtdoops: fix the oops_page_used array size
5
6commit 556f063580db2953a7e53cd46b47724246320f60 upstream.
7
8The array of unsigned long pointed by oops_page_used is allocated
9by vmalloc which requires the size to be in bytes.
10
11BITS_PER_LONG is equal to 32.
12If we want to allocate memory for 32 pages with one bit per page then
1332 / BITS_PER_LONG is equal to 1 byte that is 8 bits.
14To fix it we need to multiply the result by sizeof(unsigned long) equal to 4.
15
16Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
17Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
18Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 drivers/mtd/mtdoops.c | 2 +-
22 1 files changed, 1 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
25index 1e2fa62..0782b31 100644
26--- a/drivers/mtd/mtdoops.c
27+++ b/drivers/mtd/mtdoops.c
28@@ -369,7 +369,7 @@ static void mtdoops_notify_add(struct mtd_info *mtd)
29
30 /* oops_page_used is a bit field */
31 cxt->oops_page_used = vmalloc(DIV_ROUND_UP(mtdoops_pages,
32- BITS_PER_LONG));
33+ BITS_PER_LONG) * sizeof(unsigned long));
34 if (!cxt->oops_page_used) {
35 printk(KERN_ERR "mtdoops: could not allocate page array\n");
36 return;
37--
381.7.7.4
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch
new file mode 100644
index 00000000..82e97cc8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch
@@ -0,0 +1,36 @@
1From e8f072aad40b7d45c605e27f1337b5eb7b6fbc11 Mon Sep 17 00:00:00 2001
2From: Roman Tereshonkov <roman.tereshonkov@nokia.com>
3Date: Fri, 2 Dec 2011 15:07:17 +0200
4Subject: [PATCH 002/130] mtd: mtdoops: skip reading initially bad blocks
5
6commit 3538c56329936c78f7d356889908790006d0124c upstream.
7
8Use block_isbad to check and skip the bad blocks reading.
9This will allow to get rid of the read errors if bad blocks
10are present initially.
11
12Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
13Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
14Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/mtd/mtdoops.c | 3 +++
18 1 files changed, 3 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
21index 0782b31..f3cdce9 100644
22--- a/drivers/mtd/mtdoops.c
23+++ b/drivers/mtd/mtdoops.c
24@@ -253,6 +253,9 @@ static void find_next_position(struct mtdoops_context *cxt)
25 size_t retlen;
26
27 for (page = 0; page < cxt->oops_pages; page++) {
28+ if (mtd->block_isbad &&
29+ mtd->block_isbad(mtd, page * record_size))
30+ continue;
31 /* Assume the page is used */
32 mark_page_used(cxt, page);
33 ret = mtd->read(mtd, page * record_size, MTDOOPS_HEADER_SIZE,
34--
351.7.7.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch
new file mode 100644
index 00000000..1aa180ca
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch
@@ -0,0 +1,85 @@
1From 7e1c31ad0d3116ac301e5d6ef6df036eec548229 Mon Sep 17 00:00:00 2001
2From: Brian Norris <computersforpeace@gmail.com>
3Date: Mon, 7 Nov 2011 15:51:05 -0800
4Subject: [PATCH 003/130] mtd: mtd_blkdevs: don't increase 'open' count on
5 error path
6
7commit 342ff28f5a2e5aa3236617bd2bddf6c749677ef2 upstream.
8
9Some error paths in mtd_blkdevs were fixed in the following commit:
10
11 commit 94735ec4044a6d318b83ad3c5794e931ed168d10
12 mtd: mtd_blkdevs: fix error path in blktrans_open
13
14But on these error paths, the block device's `dev->open' count is
15already incremented before we check for errors. This meant that, while
16the error path was handled correctly on the first time through
17blktrans_open(), the device is erroneously considered already open on
18the second time through.
19
20This problem can be seen, for instance, when a UBI volume is
21simultaneously mounted as a UBIFS partition and read through its
22corresponding gluebi mtdblockX device. This results in blktrans_open()
23passing its error checks (with `dev->open > 0') without actually having
24a handle on the device. Here's a summarized log of the actions and
25results with nandsim:
26
27 # modprobe nandsim
28 # modprobe mtdblock
29 # modprobe gluebi
30 # modprobe ubifs
31 # ubiattach /dev/ubi_ctrl -m 0
32 ...
33 # ubimkvol /dev/ubi0 -N test -s 16MiB
34 ...
35 # mount -t ubifs ubi0:test /mnt
36 # ls /dev/mtdblock*
37 /dev/mtdblock0 /dev/mtdblock1
38 # cat /dev/mtdblock1 > /dev/null
39 cat: can't open '/dev/mtdblock4': Device or resource busy
40 # cat /dev/mtdblock1 > /dev/null
41
42 CPU 0 Unable to handle kernel paging request at virtual address
43 fffffff0, epc == 8031536c, ra == 8031f280
44 Oops[#1]:
45 ...
46 Call Trace:
47 [<8031536c>] ubi_leb_read+0x14/0x164
48 [<8031f280>] gluebi_read+0xf0/0x148
49 [<802edba8>] mtdblock_readsect+0x64/0x198
50 [<802ecfe4>] mtd_blktrans_thread+0x330/0x3f4
51 [<8005be98>] kthread+0x88/0x90
52 [<8000bc04>] kernel_thread_helper+0x10/0x18
53
54Signed-off-by: Brian Norris <computersforpeace@gmail.com>
55Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
56Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
57Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
58---
59 drivers/mtd/mtd_blkdevs.c | 3 ++-
60 1 files changed, 2 insertions(+), 1 deletions(-)
61
62diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
63index ed8b5e7..424ca5f 100644
64--- a/drivers/mtd/mtd_blkdevs.c
65+++ b/drivers/mtd/mtd_blkdevs.c
66@@ -215,7 +215,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
67
68 mutex_lock(&dev->lock);
69
70- if (dev->open++)
71+ if (dev->open)
72 goto unlock;
73
74 kref_get(&dev->ref);
75@@ -235,6 +235,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
76 goto error_release;
77
78 unlock:
79+ dev->open++;
80 mutex_unlock(&dev->lock);
81 blktrans_dev_put(dev);
82 return ret;
83--
841.7.7.4
85
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch
new file mode 100644
index 00000000..f28f3862
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch
@@ -0,0 +1,60 @@
1From 24935db264c015f91046c597ead8f42a3de24858 Mon Sep 17 00:00:00 2001
2From: Wolfram Sang <w.sang@pengutronix.de>
3Date: Tue, 29 Nov 2011 15:34:08 +0100
4Subject: [PATCH 004/130] mtd: tests: stresstest: bail out if device has not
5 enough eraseblocks
6
7commit 2f4478ccff7df845dc9c0f8996a96373122c4417 upstream.
8
9stresstest needs at least two eraseblocks. Bail out gracefully if that
10condition is not met. Fixes the following 'division by zero' OOPS:
11
12[ 619.100000] mtd_stresstest: MTD device size 131072, eraseblock size 131072, page size 2048, count of eraseblocks 1, pages per eraseblock 64, OOB size 64
13[ 619.120000] mtd_stresstest: scanning for bad eraseblocks
14[ 619.120000] mtd_stresstest: scanned 1 eraseblocks, 0 are bad
15[ 619.130000] mtd_stresstest: doing operations
16[ 619.130000] mtd_stresstest: 0 operations done
17[ 619.140000] Division by zero in kernel.
18...
19
20caused by
21
22 /* Read or write up 2 eraseblocks at a time - hence 'ebcnt - 1' */
23 eb %= (ebcnt - 1);
24
25Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
26Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
27Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29---
30 drivers/mtd/tests/mtd_stresstest.c | 7 +++++++
31 1 files changed, 7 insertions(+), 0 deletions(-)
32
33diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c
34index 52ffd91..811642f 100644
35--- a/drivers/mtd/tests/mtd_stresstest.c
36+++ b/drivers/mtd/tests/mtd_stresstest.c
37@@ -284,6 +284,12 @@ static int __init mtd_stresstest_init(void)
38 (unsigned long long)mtd->size, mtd->erasesize,
39 pgsize, ebcnt, pgcnt, mtd->oobsize);
40
41+ if (ebcnt < 2) {
42+ printk(PRINT_PREF "error: need at least 2 eraseblocks\n");
43+ err = -ENOSPC;
44+ goto out_put_mtd;
45+ }
46+
47 /* Read or write up 2 eraseblocks at a time */
48 bufsize = mtd->erasesize * 2;
49
50@@ -322,6 +328,7 @@ out:
51 kfree(bbt);
52 vfree(writebuf);
53 vfree(readbuf);
54+out_put_mtd:
55 put_mtd_device(mtd);
56 if (err)
57 printk(PRINT_PREF "error %d occurred\n", err);
58--
591.7.7.4
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch
new file mode 100644
index 00000000..15c214e8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch
@@ -0,0 +1,53 @@
1From 0ff595b93bc982c60777d727c282cf76050802bf Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Tue, 10 Jan 2012 15:11:02 -0800
4Subject: [PATCH 005/130] drivers/rtc/interface.c: fix alarm rollover when day
5 or month is out-of-range
6
7commit e74a8f2edb92cb690b467cea0ab652c509e9f624 upstream.
8
9Commit f44f7f96a20a ("RTC: Initialize kernel state from RTC") introduced a
10potential infinite loop. If an alarm time contains a wildcard month and
11an invalid day (> 31), or a wildcard year and an invalid month (>= 12),
12the loop searching for the next matching date will never terminate. Treat
13the invalid values as wildcards.
14
15Fixes <http://bugs.debian.org/646429>, <http://bugs.debian.org/653331>
16
17Reported-by: leo weppelman <leoweppelman@googlemail.com>
18Reported-by: "P. van Gaans" <mailme667@yahoo.co.uk>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
21Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
22Cc: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
23Cc: Thomas Gleixner <tglx@linutronix.de>
24Cc: John Stultz <john.stultz@linaro.org>
25Acked-by: Alessandro Zummo <a.zummo@towertech.it>
26Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
27Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29---
30 drivers/rtc/interface.c | 4 ++--
31 1 files changed, 2 insertions(+), 2 deletions(-)
32
33diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
34index 8e28625..8a1c031 100644
35--- a/drivers/rtc/interface.c
36+++ b/drivers/rtc/interface.c
37@@ -228,11 +228,11 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
38 alarm->time.tm_hour = now.tm_hour;
39
40 /* For simplicity, only support date rollover for now */
41- if (alarm->time.tm_mday == -1) {
42+ if (alarm->time.tm_mday < 1 || alarm->time.tm_mday > 31) {
43 alarm->time.tm_mday = now.tm_mday;
44 missing = day;
45 }
46- if (alarm->time.tm_mon == -1) {
47+ if ((unsigned)alarm->time.tm_mon >= 12) {
48 alarm->time.tm_mon = now.tm_mon;
49 if (missing == none)
50 missing = month;
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch
new file mode 100644
index 00000000..3306542e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch
@@ -0,0 +1,109 @@
1From 90d3fbe7c2f63a83921d15a9bb1f451d03040f9b Mon Sep 17 00:00:00 2001
2From: Djalal Harouni <tixxdz@opendz.org>
3Date: Wed, 4 Jan 2012 17:09:52 -0500
4Subject: [PATCH 006/130] ext4: add missing ext4_resize_end on error paths
5
6commit 014a1770371a028d22f364718c805f4216911ecd upstream.
7
8Online resize ioctls 'EXT4_IOC_GROUP_EXTEND' and 'EXT4_IOC_GROUP_ADD'
9call ext4_resize_begin() to check permissions and to set the
10EXT4_RESIZING bit lock, they do their work and they must finish with
11ext4_resize_end() which calls clear_bit_unlock() to unlock and to
12avoid -EBUSY errors for the next resize operations.
13
14This patch adds the missing ext4_resize_end() calls on error paths.
15
16Patch tested.
17
18Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
19Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
20Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21---
22 fs/ext4/ioctl.c | 28 ++++++++++++++++++----------
23 1 files changed, 18 insertions(+), 10 deletions(-)
24
25diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
26index a567968..ab25f57 100644
27--- a/fs/ext4/ioctl.c
28+++ b/fs/ext4/ioctl.c
29@@ -182,19 +182,22 @@ setversion_out:
30 if (err)
31 return err;
32
33- if (get_user(n_blocks_count, (__u32 __user *)arg))
34- return -EFAULT;
35+ if (get_user(n_blocks_count, (__u32 __user *)arg)) {
36+ err = -EFAULT;
37+ goto group_extend_out;
38+ }
39
40 if (EXT4_HAS_RO_COMPAT_FEATURE(sb,
41 EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
42 ext4_msg(sb, KERN_ERR,
43 "Online resizing not supported with bigalloc");
44- return -EOPNOTSUPP;
45+ err = -EOPNOTSUPP;
46+ goto group_extend_out;
47 }
48
49 err = mnt_want_write(filp->f_path.mnt);
50 if (err)
51- return err;
52+ goto group_extend_out;
53
54 err = ext4_group_extend(sb, EXT4_SB(sb)->s_es, n_blocks_count);
55 if (EXT4_SB(sb)->s_journal) {
56@@ -204,9 +207,10 @@ setversion_out:
57 }
58 if (err == 0)
59 err = err2;
60+
61 mnt_drop_write(filp->f_path.mnt);
62+group_extend_out:
63 ext4_resize_end(sb);
64-
65 return err;
66 }
67
68@@ -267,19 +271,22 @@ mext_out:
69 return err;
70
71 if (copy_from_user(&input, (struct ext4_new_group_input __user *)arg,
72- sizeof(input)))
73- return -EFAULT;
74+ sizeof(input))) {
75+ err = -EFAULT;
76+ goto group_add_out;
77+ }
78
79 if (EXT4_HAS_RO_COMPAT_FEATURE(sb,
80 EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
81 ext4_msg(sb, KERN_ERR,
82 "Online resizing not supported with bigalloc");
83- return -EOPNOTSUPP;
84+ err = -EOPNOTSUPP;
85+ goto group_add_out;
86 }
87
88 err = mnt_want_write(filp->f_path.mnt);
89 if (err)
90- return err;
91+ goto group_add_out;
92
93 err = ext4_group_add(sb, &input);
94 if (EXT4_SB(sb)->s_journal) {
95@@ -289,9 +296,10 @@ mext_out:
96 }
97 if (err == 0)
98 err = err2;
99+
100 mnt_drop_write(filp->f_path.mnt);
101+group_add_out:
102 ext4_resize_end(sb);
103-
104 return err;
105 }
106
107--
1081.7.7.4
109
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch
new file mode 100644
index 00000000..95f0d2e0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch
@@ -0,0 +1,74 @@
1From 149672e502af36fdb60960faaf2ca3bdde96bd5e Mon Sep 17 00:00:00 2001
2From: Xi Wang <xi.wang@gmail.com>
3Date: Tue, 10 Jan 2012 11:51:10 -0500
4Subject: [PATCH 007/130] ext4: fix undefined behavior in
5 ext4_fill_flex_info()
6
7commit d50f2ab6f050311dbf7b8f5501b25f0bf64a439b upstream.
8
9Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by
10zero when trying to mount a corrupted file system") fixes CVE-2009-4307
11by performing a sanity check on s_log_groups_per_flex, since it can be
12set to a bogus value by an attacker.
13
14 sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex;
15 groups_per_flex = 1 << sbi->s_log_groups_per_flex;
16
17 if (groups_per_flex < 2) { ... }
18
19This patch fixes two potential issues in the previous commit.
20
211) The sanity check might only work on architectures like PowerPC.
22On x86, 5 bits are used for the shifting amount. That means, given a
23large s_log_groups_per_flex value like 36, groups_per_flex = 1 << 36
24is essentially 1 << 4 = 16, rather than 0. This will bypass the check,
25leaving s_log_groups_per_flex and groups_per_flex inconsistent.
26
272) The sanity check relies on undefined behavior, i.e., oversized shift.
28A standard-confirming C compiler could rewrite the check in unexpected
29ways. Consider the following equivalent form, assuming groups_per_flex
30is unsigned for simplicity.
31
32 groups_per_flex = 1 << sbi->s_log_groups_per_flex;
33 if (groups_per_flex == 0 || groups_per_flex == 1) {
34
35We compile the code snippet using Clang 3.0 and GCC 4.6. Clang will
36completely optimize away the check groups_per_flex == 0, leaving the
37patched code as vulnerable as the original. GCC keeps the check, but
38there is no guarantee that future versions will do the same.
39
40Signed-off-by: Xi Wang <xi.wang@gmail.com>
41Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
42Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
43---
44 fs/ext4/super.c | 7 +++----
45 1 files changed, 3 insertions(+), 4 deletions(-)
46
47diff --git a/fs/ext4/super.c b/fs/ext4/super.c
48index 3e1329e..9281dbe 100644
49--- a/fs/ext4/super.c
50+++ b/fs/ext4/super.c
51@@ -2006,17 +2006,16 @@ static int ext4_fill_flex_info(struct super_block *sb)
52 struct ext4_group_desc *gdp = NULL;
53 ext4_group_t flex_group_count;
54 ext4_group_t flex_group;
55- int groups_per_flex = 0;
56+ unsigned int groups_per_flex = 0;
57 size_t size;
58 int i;
59
60 sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex;
61- groups_per_flex = 1 << sbi->s_log_groups_per_flex;
62-
63- if (groups_per_flex < 2) {
64+ if (sbi->s_log_groups_per_flex < 1 || sbi->s_log_groups_per_flex > 31) {
65 sbi->s_log_groups_per_flex = 0;
66 return 1;
67 }
68+ groups_per_flex = 1 << sbi->s_log_groups_per_flex;
69
70 /* We allocate both existing and potentially added groups */
71 flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) +
72--
731.7.7.4
74
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch
new file mode 100644
index 00000000..922b70a6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch
@@ -0,0 +1,54 @@
1From 77b0511fab25f495a30242f4b2fd940e71ce11ad Mon Sep 17 00:00:00 2001
2From: Karsten Wiese <fzu@wemgehoertderstaat.de>
3Date: Fri, 30 Dec 2011 01:42:01 +0100
4Subject: [PATCH 008/130] ALSA: snd-usb-us122l: Delete calls to
5 preempt_disable
6
7commit d0f3a2eb9062560bebca8b923424f3ca02a331ba upstream.
8
9They are not needed here.
10
11Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
12Signed-off-by: Takashi Iwai <tiwai@suse.de>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14---
15 sound/usb/usx2y/usb_stream.c | 6 ++----
16 1 files changed, 2 insertions(+), 4 deletions(-)
17
18diff --git a/sound/usb/usx2y/usb_stream.c b/sound/usb/usx2y/usb_stream.c
19index c400ade..1e7a47a 100644
20--- a/sound/usb/usx2y/usb_stream.c
21+++ b/sound/usb/usx2y/usb_stream.c
22@@ -674,7 +674,7 @@ dotry:
23 inurb->transfer_buffer_length =
24 inurb->number_of_packets *
25 inurb->iso_frame_desc[0].length;
26- preempt_disable();
27+
28 if (u == 0) {
29 int now;
30 struct usb_device *dev = inurb->dev;
31@@ -686,19 +686,17 @@ dotry:
32 }
33 err = usb_submit_urb(inurb, GFP_ATOMIC);
34 if (err < 0) {
35- preempt_enable();
36 snd_printk(KERN_ERR"usb_submit_urb(sk->inurb[%i])"
37 " returned %i\n", u, err);
38 return err;
39 }
40 err = usb_submit_urb(outurb, GFP_ATOMIC);
41 if (err < 0) {
42- preempt_enable();
43 snd_printk(KERN_ERR"usb_submit_urb(sk->outurb[%i])"
44 " returned %i\n", u, err);
45 return err;
46 }
47- preempt_enable();
48+
49 if (inurb->start_frame != outurb->start_frame) {
50 snd_printd(KERN_DEBUG
51 "u[%i] start_frames differ in:%u out:%u\n",
52--
531.7.7.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch
new file mode 100644
index 00000000..266d1125
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch
@@ -0,0 +1,57 @@
1From c237e8b240ea09139d387e89f7474fbcd2b4bd0c Mon Sep 17 00:00:00 2001
2From: David Henningsson <david.henningsson@canonical.com>
3Date: Mon, 2 Jan 2012 12:40:15 +0100
4Subject: [PATCH 009/130] ALSA: HDA: Fix master control for Cirrus Logic 421X
5
6commit 40d03e63e91af8ddccdfd5a536cc2a6e51433e1d upstream.
7
8The control name "HP/Speakers" is non-standard, and since there is
9only one DAC on this chip there is no need for a virtual master
10anyway.
11
12Signed-off-by: David Henningsson <david.henningsson@canonical.com>
13Signed-off-by: Takashi Iwai <tiwai@suse.de>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 sound/pci/hda/patch_cirrus.c | 13 +------------
17 1 files changed, 1 insertions(+), 12 deletions(-)
18
19diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
20index 70a7abd..f55ceb6 100644
21--- a/sound/pci/hda/patch_cirrus.c
22+++ b/sound/pci/hda/patch_cirrus.c
23@@ -1771,30 +1771,19 @@ static int build_cs421x_output(struct hda_codec *codec)
24 struct auto_pin_cfg *cfg = &spec->autocfg;
25 struct snd_kcontrol *kctl;
26 int err;
27- char *name = "HP/Speakers";
28+ char *name = "Master";
29
30 fix_volume_caps(codec, dac);
31- if (!spec->vmaster_sw) {
32- err = add_vmaster(codec, dac);
33- if (err < 0)
34- return err;
35- }
36
37 err = add_mute(codec, name, 0,
38 HDA_COMPOSE_AMP_VAL(dac, 3, 0, HDA_OUTPUT), 0, &kctl);
39 if (err < 0)
40 return err;
41- err = snd_ctl_add_slave(spec->vmaster_sw, kctl);
42- if (err < 0)
43- return err;
44
45 err = add_volume(codec, name, 0,
46 HDA_COMPOSE_AMP_VAL(dac, 3, 0, HDA_OUTPUT), 0, &kctl);
47 if (err < 0)
48 return err;
49- err = snd_ctl_add_slave(spec->vmaster_vol, kctl);
50- if (err < 0)
51- return err;
52
53 if (cfg->speaker_outs) {
54 err = snd_hda_ctl_add(codec, 0,
55--
561.7.7.4
57
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch
new file mode 100644
index 00000000..c3a57e81
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch
@@ -0,0 +1,48 @@
1From d08570c3c46be8ea5797897e7ae4df418d404c2d Mon Sep 17 00:00:00 2001
2From: David Henningsson <david.henningsson@canonical.com>
3Date: Mon, 2 Jan 2012 12:40:16 +0100
4Subject: [PATCH 010/130] ALSA: HDA: Fix automute for Cirrus Logic 421x
5
6commit 78e2a928e377d5124932d4399c6c581908b027a0 upstream.
7
8There was a bug in the automute logic causing speakers not to
9mute when headphones were plugged in.
10
11Tested-by: Hsin-Yi Chen <hychen@canonical.com>
12Signed-off-by: David Henningsson <david.henningsson@canonical.com>
13Signed-off-by: Takashi Iwai <tiwai@suse.de>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 sound/pci/hda/patch_cirrus.c | 14 ++++++--------
17 1 files changed, 6 insertions(+), 8 deletions(-)
18
19diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
20index f55ceb6..5b0a9bb 100644
21--- a/sound/pci/hda/patch_cirrus.c
22+++ b/sound/pci/hda/patch_cirrus.c
23@@ -920,16 +920,14 @@ static void cs_automute(struct hda_codec *codec)
24
25 /* mute speakers if spdif or hp jack is plugged in */
26 for (i = 0; i < cfg->speaker_outs; i++) {
27+ int pin_ctl = hp_present ? 0 : PIN_OUT;
28+ /* detect on spdif is specific to CS421x */
29+ if (spdif_present && (spec->vendor_nid == CS421X_VENDOR_NID))
30+ pin_ctl = 0;
31+
32 nid = cfg->speaker_pins[i];
33 snd_hda_codec_write(codec, nid, 0,
34- AC_VERB_SET_PIN_WIDGET_CONTROL,
35- hp_present ? 0 : PIN_OUT);
36- /* detect on spdif is specific to CS421x */
37- if (spec->vendor_nid == CS421X_VENDOR_NID) {
38- snd_hda_codec_write(codec, nid, 0,
39- AC_VERB_SET_PIN_WIDGET_CONTROL,
40- spdif_present ? 0 : PIN_OUT);
41- }
42+ AC_VERB_SET_PIN_WIDGET_CONTROL, pin_ctl);
43 }
44 if (spec->gpio_eapd_hp) {
45 unsigned int gpio = hp_present ?
46--
471.7.7.4
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch
new file mode 100644
index 00000000..a311248f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch
@@ -0,0 +1,38 @@
1From 37a4221e9e94eb1841d5367baba68e31b0c29d4b Mon Sep 17 00:00:00 2001
2From: Pavel Hofman <pavel.hofman@ivitera.com>
3Date: Thu, 5 Jan 2012 23:05:18 +0100
4Subject: [PATCH 011/130] ALSA: ice1724 - Check for ac97 to avoid kernel oops
5
6commit e7848163aa2a649d9065f230fadff80dc3519775 upstream.
7
8Cards with identical PCI ids but no AC97 config in EEPROM do not have
9the ac97 field initialized. We must check for this case to avoid kernel oops.
10
11Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
12Signed-off-by: Takashi Iwai <tiwai@suse.de>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14---
15 sound/pci/ice1712/amp.c | 7 +++++--
16 1 files changed, 5 insertions(+), 2 deletions(-)
17
18diff --git a/sound/pci/ice1712/amp.c b/sound/pci/ice1712/amp.c
19index e328cfb..e525da2 100644
20--- a/sound/pci/ice1712/amp.c
21+++ b/sound/pci/ice1712/amp.c
22@@ -68,8 +68,11 @@ static int __devinit snd_vt1724_amp_init(struct snd_ice1712 *ice)
23
24 static int __devinit snd_vt1724_amp_add_controls(struct snd_ice1712 *ice)
25 {
26- /* we use pins 39 and 41 of the VT1616 for left and right read outputs */
27- snd_ac97_write_cache(ice->ac97, 0x5a, snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
28+ if (ice->ac97)
29+ /* we use pins 39 and 41 of the VT1616 for left and right
30+ read outputs */
31+ snd_ac97_write_cache(ice->ac97, 0x5a,
32+ snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
33 return 0;
34 }
35
36--
371.7.7.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch
new file mode 100644
index 00000000..98db255a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch
@@ -0,0 +1,46 @@
1From 3997412715c72bd24b2433c841b63590ec175755 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Mon, 9 Jan 2012 11:37:20 +0100
4Subject: [PATCH 012/130] ALSA: usb-audio - Avoid flood of frame-active debug
5 messages
6
7commit 80c8a2a372599e604b04a9c568952fe39cd1851d upstream.
8
9With some buggy devices, the usb-audio driver may give "frame xxx active"
10kernel messages too often. Better to keep it as debug-only using
11snd_printdd(), and also add the rate-limit for avoiding floods.
12
13Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=738681
14
15Signed-off-by: Takashi Iwai <tiwai@suse.de>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 sound/usb/endpoint.c | 5 +++--
19 1 files changed, 3 insertions(+), 2 deletions(-)
20
21diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
22index 81c6ede..08dcce5 100644
23--- a/sound/usb/endpoint.c
24+++ b/sound/usb/endpoint.c
25@@ -17,6 +17,7 @@
26
27 #include <linux/gfp.h>
28 #include <linux/init.h>
29+#include <linux/ratelimit.h>
30 #include <linux/usb.h>
31 #include <linux/usb/audio.h>
32
33@@ -458,8 +459,8 @@ static int retire_capture_urb(struct snd_usb_substream *subs,
34
35 for (i = 0; i < urb->number_of_packets; i++) {
36 cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset;
37- if (urb->iso_frame_desc[i].status) {
38- snd_printd(KERN_ERR "frame %d active: %d\n", i, urb->iso_frame_desc[i].status);
39+ if (urb->iso_frame_desc[i].status && printk_ratelimit()) {
40+ snd_printdd("frame %d active: %d\n", i, urb->iso_frame_desc[i].status);
41 // continue;
42 }
43 bytes = urb->iso_frame_desc[i].actual_length;
44--
451.7.7.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch
new file mode 100644
index 00000000..20e9a981
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch
@@ -0,0 +1,37 @@
1From 82b777e29dcdaa78de5834c88eec7d6733f7aaff Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Tue, 10 Jan 2012 08:59:56 +0100
4Subject: [PATCH 013/130] ALSA: hda - Use auto-parser for HP laptops with
5 cx20459 codec
6
7commit de4da59e480cdf1075b33dbaf8078fc87bc52241 upstream.
8
9These laptops can work well with the auto-parser and their BIOS setups,
10and in addition, the auto-parser fixes the problem with S3/S4 where
11the unsol event handling is killed after resume due to fallback to the
12single-cmd mode.
13
14Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740115
15
16Signed-off-by: Takashi Iwai <tiwai@suse.de>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 sound/pci/hda/patch_conexant.c | 2 --
20 1 files changed, 0 insertions(+), 2 deletions(-)
21
22diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
23index 0de2119..7072251 100644
24--- a/sound/pci/hda/patch_conexant.c
25+++ b/sound/pci/hda/patch_conexant.c
26@@ -1120,8 +1120,6 @@ static const char * const cxt5045_models[CXT5045_MODELS] = {
27
28 static const struct snd_pci_quirk cxt5045_cfg_tbl[] = {
29 SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP_HP530),
30- SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3000, "HP DV Series",
31- CXT5045_LAPTOP_HPSENSE),
32 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P105", CXT5045_LAPTOP_MICSENSE),
33 SND_PCI_QUIRK(0x152d, 0x0753, "Benq R55E", CXT5045_BENQ),
34 SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_LAPTOP_MICSENSE),
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch
new file mode 100644
index 00000000..d7b647a9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch
@@ -0,0 +1,58 @@
1From b347c4f831da8a0e1498b0947e7a334e9113cd83 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Tue, 10 Jan 2012 12:41:22 +0100
4Subject: [PATCH 014/130] ALSA: hda - Return the error from get_wcaps_type()
5 for invalid NIDs
6
7commit 3a90274de3548ebb2aabfbf488cea8e275a73dc6 upstream.
8
9When an invalid NID is given, get_wcaps() returns zero as the error,
10but get_wcaps_type() takes it as the normal value and returns a bogus
11AC_WID_AUD_OUT value. This confuses the parser.
12
13With this patch, get_wcaps_type() returns -1 when value 0 is given,
14i.e. an invalid NID is passed to get_wcaps().
15
16Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740118
17
18Signed-off-by: Takashi Iwai <tiwai@suse.de>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 sound/pci/hda/hda_local.h | 7 ++++++-
22 sound/pci/hda/hda_proc.c | 2 ++
23 2 files changed, 8 insertions(+), 1 deletions(-)
24
25diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
26index 618ddad..368f0c5 100644
27--- a/sound/pci/hda/hda_local.h
28+++ b/sound/pci/hda/hda_local.h
29@@ -487,7 +487,12 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid)
30 }
31
32 /* get the widget type from widget capability bits */
33-#define get_wcaps_type(wcaps) (((wcaps) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT)
34+static inline int get_wcaps_type(unsigned int wcaps)
35+{
36+ if (!wcaps)
37+ return -1; /* invalid type */
38+ return (wcaps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
39+}
40
41 static inline unsigned int get_wcaps_channels(u32 wcaps)
42 {
43diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
44index 2c981b5..254ab52 100644
45--- a/sound/pci/hda/hda_proc.c
46+++ b/sound/pci/hda/hda_proc.c
47@@ -54,6 +54,8 @@ static const char *get_wid_type_name(unsigned int wid_value)
48 [AC_WID_BEEP] = "Beep Generator Widget",
49 [AC_WID_VENDOR] = "Vendor Defined Widget",
50 };
51+ if (wid_value == -1)
52+ return "UNKNOWN Widget";
53 wid_value &= 0xf;
54 if (names[wid_value])
55 return names[wid_value];
56--
571.7.7.4
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch
new file mode 100644
index 00000000..d2a40b72
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch
@@ -0,0 +1,42 @@
1From ea14c41fb5a54a4f2089c97f85c399965415871a Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Tue, 10 Jan 2012 15:16:02 +0100
4Subject: [PATCH 015/130] ALSA: hda - Fix the detection of "Loopback Mixing"
5 control for VIA codecs
6
7commit 4808d12d1dddb046ec86425e5f6766f02e950292 upstream.
8
9Currently the driver checks only the out_mix_path[] for the primary
10output route for judging whether to create the loopback-mixing control
11or not. But, there are cases where aamix-routing is available only on
12headphone or speaker paths but not on the primary output path. So, the
13driver ignores such cases inappropriately.
14
15This patch fixes the check of the loopback-mixing control by testing
16all mix-routing paths.
17
18Signed-off-by: Takashi Iwai <tiwai@suse.de>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 sound/pci/hda/patch_via.c | 5 ++++-
22 1 files changed, 4 insertions(+), 1 deletions(-)
23
24diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
25index b513762..8d69e59 100644
26--- a/sound/pci/hda/patch_via.c
27+++ b/sound/pci/hda/patch_via.c
28@@ -2200,7 +2200,10 @@ static int via_auto_create_loopback_switch(struct hda_codec *codec)
29 {
30 struct via_spec *spec = codec->spec;
31
32- if (!spec->aa_mix_nid || !spec->out_mix_path.depth)
33+ if (!spec->aa_mix_nid)
34+ return 0; /* no loopback switching available */
35+ if (!(spec->out_mix_path.depth || spec->hp_mix_path.depth ||
36+ spec->speaker_path.depth))
37 return 0; /* no loopback switching available */
38 if (!via_clone_control(spec, &via_aamix_ctl_enum))
39 return -ENOMEM;
40--
411.7.7.4
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch
new file mode 100644
index 00000000..01e3a6bd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch
@@ -0,0 +1,92 @@
1From 53eb674241d25d1496c966cd5f140b0bb213dbdc Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Wed, 11 Jan 2012 12:34:11 +0100
4Subject: [PATCH 016/130] ALSA: hda - Fix the lost power-setup of seconary
5 pins after PM resume
6
7commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33 upstream.
8
9When multiple headphone or other detectable output pins are present,
10the power-map has to be updated after resume appropriately, but the
11current driver doesn't check all pins but only the first pin (since
12it's enough to check it for the mute-behavior). This resulted in the
13silent output from the secondary outputs after PM resume.
14
15This patch fixes the problem by checking all pins at (re-)init time.
16
17Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740347
18
19Signed-off-by: Takashi Iwai <tiwai@suse.de>
20Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21---
22 sound/pci/hda/patch_sigmatel.c | 36 +++++++++++++++++++++++-------------
23 1 files changed, 23 insertions(+), 13 deletions(-)
24
25diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
26index 616678f..a87b260 100644
27--- a/sound/pci/hda/patch_sigmatel.c
28+++ b/sound/pci/hda/patch_sigmatel.c
29@@ -4326,6 +4326,27 @@ static void stac_store_hints(struct hda_codec *codec)
30 }
31 }
32
33+static void stac_issue_unsol_events(struct hda_codec *codec, int num_pins,
34+ const hda_nid_t *pins)
35+{
36+ while (num_pins--)
37+ stac_issue_unsol_event(codec, *pins++);
38+}
39+
40+/* fake event to set up pins */
41+static void stac_fake_hp_events(struct hda_codec *codec)
42+{
43+ struct sigmatel_spec *spec = codec->spec;
44+
45+ if (spec->autocfg.hp_outs)
46+ stac_issue_unsol_events(codec, spec->autocfg.hp_outs,
47+ spec->autocfg.hp_pins);
48+ if (spec->autocfg.line_outs &&
49+ spec->autocfg.line_out_pins[0] != spec->autocfg.hp_pins[0])
50+ stac_issue_unsol_events(codec, spec->autocfg.line_outs,
51+ spec->autocfg.line_out_pins);
52+}
53+
54 static int stac92xx_init(struct hda_codec *codec)
55 {
56 struct sigmatel_spec *spec = codec->spec;
57@@ -4376,10 +4397,7 @@ static int stac92xx_init(struct hda_codec *codec)
58 stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0],
59 AC_PINCTL_OUT_EN);
60 /* fake event to set up pins */
61- if (cfg->hp_pins[0])
62- stac_issue_unsol_event(codec, cfg->hp_pins[0]);
63- else if (cfg->line_out_pins[0])
64- stac_issue_unsol_event(codec, cfg->line_out_pins[0]);
65+ stac_fake_hp_events(codec);
66 } else {
67 stac92xx_auto_init_multi_out(codec);
68 stac92xx_auto_init_hp_out(codec);
69@@ -5028,19 +5046,11 @@ static void stac927x_proc_hook(struct snd_info_buffer *buffer,
70 #ifdef CONFIG_PM
71 static int stac92xx_resume(struct hda_codec *codec)
72 {
73- struct sigmatel_spec *spec = codec->spec;
74-
75 stac92xx_init(codec);
76 snd_hda_codec_resume_amp(codec);
77 snd_hda_codec_resume_cache(codec);
78 /* fake event to set up pins again to override cached values */
79- if (spec->hp_detect) {
80- if (spec->autocfg.hp_pins[0])
81- stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]);
82- else if (spec->autocfg.line_out_pins[0])
83- stac_issue_unsol_event(codec,
84- spec->autocfg.line_out_pins[0]);
85- }
86+ stac_fake_hp_events(codec);
87 return 0;
88 }
89
90--
911.7.7.4
92
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch
new file mode 100644
index 00000000..93e7b231
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch
@@ -0,0 +1,43 @@
1From d69882b450293b61af0820e75dc1bfb8823c58bd Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3Date: Fri, 23 Dec 2011 20:32:18 +0100
4Subject: [PATCH 017/130] drm/radeon/kms: workaround invalid AVI infoframe
5 checksum issue
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 92db7f6c860b8190571a9dc1fcbc16d003422fe8 upstream.
11
12This change was verified to fix both issues with no video I've
13investigated. I've also checked checksum calculation with fglrx on:
14RV620, HD54xx, HD5450, HD6310, HD6320.
15
16Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
17Signed-off-by: Dave Airlie <airlied@redhat.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 drivers/gpu/drm/radeon/r600_hdmi.c | 7 +++++++
21 1 files changed, 7 insertions(+), 0 deletions(-)
22
23diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c
24index f5ac7e7..c45d921 100644
25--- a/drivers/gpu/drm/radeon/r600_hdmi.c
26+++ b/drivers/gpu/drm/radeon/r600_hdmi.c
27@@ -196,6 +196,13 @@ static void r600_hdmi_videoinfoframe(
28 frame[0xD] = (right_bar >> 8);
29
30 r600_hdmi_infoframe_checksum(0x82, 0x02, 0x0D, frame);
31+ /* Our header values (type, version, length) should be alright, Intel
32+ * is using the same. Checksum function also seems to be OK, it works
33+ * fine for audio infoframe. However calculated value is always lower
34+ * by 2 in comparison to fglrx. It breaks displaying anything in case
35+ * of TVs that strictly check the checksum. Hack it manually here to
36+ * workaround this issue. */
37+ frame[0x0] += 2;
38
39 WREG32(offset+R600_HDMI_VIDEOINFOFRAME_0,
40 frame[0x0] | (frame[0x1] << 8) | (frame[0x2] << 16) | (frame[0x3] << 24));
41--
421.7.7.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch
new file mode 100644
index 00000000..690c3ab6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch
@@ -0,0 +1,40 @@
1From 056276f2509223f4f07a0778f1f1b398fdc8ae87 Mon Sep 17 00:00:00 2001
2From: Alex Deucher <alexander.deucher@amd.com>
3Date: Tue, 3 Jan 2012 09:48:38 -0500
4Subject: [PATCH 018/130] drm/radeon/kms: disable writeback on pre-R300 asics
5
6commit 28eebb703e28bc455ba704adb1026f76649b768c upstream.
7
8We often end up missing fences on older asics with
9writeback enabled which leads to delays in the userspace
10accel code, so just disable it by default on those asics.
11
12Reported-by: Helge Deller <deller@gmx.de>
13Reported-by: Dave Airlie <airlied@redhat.com>
14Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
15Signed-off-by: Dave Airlie <airlied@redhat.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 drivers/gpu/drm/radeon/radeon_device.c | 5 ++++-
19 1 files changed, 4 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
22index c4d00a1..9b39145 100644
23--- a/drivers/gpu/drm/radeon/radeon_device.c
24+++ b/drivers/gpu/drm/radeon/radeon_device.c
25@@ -224,8 +224,11 @@ int radeon_wb_init(struct radeon_device *rdev)
26 if (radeon_no_wb == 1)
27 rdev->wb.enabled = false;
28 else {
29- /* often unreliable on AGP */
30 if (rdev->flags & RADEON_IS_AGP) {
31+ /* often unreliable on AGP */
32+ rdev->wb.enabled = false;
33+ } else if (rdev->family < CHIP_R300) {
34+ /* often unreliable on pre-r300 */
35 rdev->wb.enabled = false;
36 } else {
37 rdev->wb.enabled = true;
38--
391.7.7.4
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch
new file mode 100644
index 00000000..7d859196
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch
@@ -0,0 +1,70 @@
1From a4064a0d9fab7c0a6aa4b6bf170d6ffaed93601a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
3Date: Thu, 5 Jan 2012 18:42:17 +0100
4Subject: [PATCH 019/130] radeon: Fix disabling PCI bus mastering on big
5 endian hosts.
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 3df96909b75835d487a9178761622b0cbd7310d4 upstream.
11
12It would previously write basically random bits to PCI configuration space...
13Not very surprising that the GPU tended to stop responding completely. The
14resulting MCE even froze the whole machine sometimes.
15
16Now resetting the GPU after a lockup has at least a fighting chance of
17succeeding.
18
19Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
20Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
21Signed-off-by: Dave Airlie <airlied@redhat.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 drivers/gpu/drm/radeon/r100.c | 5 +++--
25 drivers/gpu/drm/radeon/rs600.c | 4 ++--
26 2 files changed, 5 insertions(+), 4 deletions(-)
27
28diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
29index bfc08f6..31b0d1a 100644
30--- a/drivers/gpu/drm/radeon/r100.c
31+++ b/drivers/gpu/drm/radeon/r100.c
32@@ -2177,6 +2177,7 @@ bool r100_gpu_is_lockup(struct radeon_device *rdev)
33 void r100_bm_disable(struct radeon_device *rdev)
34 {
35 u32 tmp;
36+ u16 tmp16;
37
38 /* disable bus mastering */
39 tmp = RREG32(R_000030_BUS_CNTL);
40@@ -2187,8 +2188,8 @@ void r100_bm_disable(struct radeon_device *rdev)
41 WREG32(R_000030_BUS_CNTL, (tmp & 0xFFFFFFFF) | 0x00000040);
42 tmp = RREG32(RADEON_BUS_CNTL);
43 mdelay(1);
44- pci_read_config_word(rdev->pdev, 0x4, (u16*)&tmp);
45- pci_write_config_word(rdev->pdev, 0x4, tmp & 0xFFFB);
46+ pci_read_config_word(rdev->pdev, 0x4, &tmp16);
47+ pci_write_config_word(rdev->pdev, 0x4, tmp16 & 0xFFFB);
48 mdelay(1);
49 }
50
51diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
52index b1053d6..c259e21 100644
53--- a/drivers/gpu/drm/radeon/rs600.c
54+++ b/drivers/gpu/drm/radeon/rs600.c
55@@ -324,10 +324,10 @@ void rs600_hpd_fini(struct radeon_device *rdev)
56
57 void rs600_bm_disable(struct radeon_device *rdev)
58 {
59- u32 tmp;
60+ u16 tmp;
61
62 /* disable bus mastering */
63- pci_read_config_word(rdev->pdev, 0x4, (u16*)&tmp);
64+ pci_read_config_word(rdev->pdev, 0x4, &tmp);
65 pci_write_config_word(rdev->pdev, 0x4, tmp & 0xFFFB);
66 mdelay(1);
67 }
68--
691.7.7.4
70
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch
new file mode 100644
index 00000000..0b1e79bd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch
@@ -0,0 +1,50 @@
1From df673b323fa5ef227649ad218343f244261c0611 Mon Sep 17 00:00:00 2001
2From: Boaz Harrosh <bharrosh@panasas.com>
3Date: Fri, 6 Jan 2012 09:28:12 +0200
4Subject: [PATCH 020/130] pnfs-obj: pNFS errors are communicated on
5 iodata->pnfs_error
6
7commit 5c0b4129c07b902b27d3f3ebc087757f534a3abd upstream.
8
9Some time along the way pNFS IO errors were switched to
10communicate with a special iodata->pnfs_error member instead
11of the regular RPC members. But objlayout was not switched
12over.
13
14Fix that!
15Without this fix any IO error is hanged, because IO is not
16switched to MDS and pages are never cleared or read.
17
18[Applies to 3.2.0. Same bug different patch for 3.1/0 Kernels]
19Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
20Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
22---
23 fs/nfs/objlayout/objlayout.c | 4 ++++
24 1 files changed, 4 insertions(+), 0 deletions(-)
25
26diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c
27index 72074e3..b3c2903 100644
28--- a/fs/nfs/objlayout/objlayout.c
29+++ b/fs/nfs/objlayout/objlayout.c
30@@ -254,6 +254,8 @@ objlayout_read_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
31 oir->status = rdata->task.tk_status = status;
32 if (status >= 0)
33 rdata->res.count = status;
34+ else
35+ rdata->pnfs_error = status;
36 objlayout_iodone(oir);
37 /* must not use oir after this point */
38
39@@ -334,6 +336,8 @@ objlayout_write_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
40 if (status >= 0) {
41 wdata->res.count = status;
42 wdata->verf.committed = oir->committed;
43+ } else {
44+ wdata->pnfs_error = status;
45 }
46 objlayout_iodone(oir);
47 /* must not use oir after this point */
48--
491.7.7.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch
new file mode 100644
index 00000000..0b31c549
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch
@@ -0,0 +1,92 @@
1From 9c85d688c42a6feb8f72204730514ae658854828 Mon Sep 17 00:00:00 2001
2From: Boaz Harrosh <bharrosh@panasas.com>
3Date: Fri, 6 Jan 2012 09:31:20 +0200
4Subject: [PATCH 021/130] pnfs-obj: Must return layout on IO error
5
6commit fe0fe83585f88346557868a803a479dfaaa0688a upstream.
7
8As mandated by the standard. In case of an IO error, a pNFS
9objects layout driver must return it's layout. This is because
10all device errors are reported to the server as part of the
11layout return buffer.
12
13This is implemented the same way PNFS_LAYOUTRET_ON_SETATTR
14is done, through a bit flag on the pnfs_layoutdriver_type->flags
15member. The flag is set by the layout driver that wants a
16layout_return preformed at pnfs_ld_{write,read}_done in case
17of an error.
18(Though I have not defined a wrapper like pnfs_ld_layoutret_on_setattr
19 because this code is never called outside of pnfs.c and pnfs IO
20 paths)
21
22Without this patch 3.[0-2] Kernels leak memory and have an annoying
23WARN_ON after every IO error utilizing the pnfs-obj driver.
24
25Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
26Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
27Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
28---
29 fs/nfs/objlayout/objio_osd.c | 3 ++-
30 fs/nfs/pnfs.c | 12 ++++++++++++
31 fs/nfs/pnfs.h | 1 +
32 3 files changed, 15 insertions(+), 1 deletions(-)
33
34diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
35index c807ab9..55d0128 100644
36--- a/fs/nfs/objlayout/objio_osd.c
37+++ b/fs/nfs/objlayout/objio_osd.c
38@@ -551,7 +551,8 @@ static const struct nfs_pageio_ops objio_pg_write_ops = {
39 static struct pnfs_layoutdriver_type objlayout_type = {
40 .id = LAYOUT_OSD2_OBJECTS,
41 .name = "LAYOUT_OSD2_OBJECTS",
42- .flags = PNFS_LAYOUTRET_ON_SETATTR,
43+ .flags = PNFS_LAYOUTRET_ON_SETATTR |
44+ PNFS_LAYOUTRET_ON_ERROR,
45
46 .alloc_layout_hdr = objlayout_alloc_layout_hdr,
47 .free_layout_hdr = objlayout_free_layout_hdr,
48diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
49index 8e672a2..f881a63 100644
50--- a/fs/nfs/pnfs.c
51+++ b/fs/nfs/pnfs.c
52@@ -1178,6 +1178,15 @@ void pnfs_ld_write_done(struct nfs_write_data *data)
53 put_lseg(data->lseg);
54 data->lseg = NULL;
55 dprintk("pnfs write error = %d\n", data->pnfs_error);
56+ if (NFS_SERVER(data->inode)->pnfs_curr_ld->flags &
57+ PNFS_LAYOUTRET_ON_ERROR) {
58+ /* Don't lo_commit on error, Server will needs to
59+ * preform a file recovery.
60+ */
61+ clear_bit(NFS_INO_LAYOUTCOMMIT,
62+ &NFS_I(data->inode)->flags);
63+ pnfs_return_layout(data->inode);
64+ }
65 }
66 data->mds_ops->rpc_release(data);
67 }
68@@ -1267,6 +1276,9 @@ static void pnfs_ld_handle_read_error(struct nfs_read_data *data)
69 put_lseg(data->lseg);
70 data->lseg = NULL;
71 dprintk("pnfs write error = %d\n", data->pnfs_error);
72+ if (NFS_SERVER(data->inode)->pnfs_curr_ld->flags &
73+ PNFS_LAYOUTRET_ON_ERROR)
74+ pnfs_return_layout(data->inode);
75
76 nfs_pageio_init_read_mds(&pgio, data->inode);
77
78diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
79index 1509530..53d593a 100644
80--- a/fs/nfs/pnfs.h
81+++ b/fs/nfs/pnfs.h
82@@ -68,6 +68,7 @@ enum {
83 enum layoutdriver_policy_flags {
84 /* Should the pNFS client commit and return the layout upon a setattr */
85 PNFS_LAYOUTRET_ON_SETATTR = 1 << 0,
86+ PNFS_LAYOUTRET_ON_ERROR = 1 << 1,
87 };
88
89 struct nfs4_deviceid_node;
90--
911.7.7.4
92
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch
new file mode 100644
index 00000000..8c4acc62
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch
@@ -0,0 +1,94 @@
1From 1ef216baa398a27c95a9de67f36805cbeea81fe6 Mon Sep 17 00:00:00 2001
2From: Chuck Lever <chuck.lever@oracle.com>
3Date: Mon, 5 Dec 2011 15:40:30 -0500
4Subject: [PATCH 022/130] NFS: Retry mounting NFSROOT
5
6commit 43717c7daebf10b43f12e68512484b3095bb1ba5 upstream.
7
8Lukas Razik <linux@razik.name> reports that on his SPARC system,
9booting with an NFS root file system stopped working after commit
1056463e50 "NFS: Use super.c for NFSROOT mount option parsing."
11
12We found that the network switch to which Lukas' client was attached
13was delaying access to the LAN after the client's NIC driver reported
14that its link was up. The delay was longer than the timeouts used in
15the NFS client during mounting.
16
17NFSROOT worked for Lukas before commit 56463e50 because in those
18kernels, the client's first operation was an rpcbind request to
19determine which port the NFS server was listening on. When that
20request failed after a long timeout, the client simply selected the
21default NFS port (2049). By that time the switch was allowing access
22to the LAN, and the mount succeeded.
23
24Neither of these client behaviors is desirable, so reverting 56463e50
25is really not a choice. Instead, introduce a mechanism that retries
26the NFSROOT mount request several times. This is the same tactic that
27normal user space NFS mounts employ to overcome server and network
28delays.
29
30Signed-off-by: Lukas Razik <linux@razik.name>
31[ cel: match kernel coding style, add proper patch description ]
32[ cel: add exponential back-off ]
33Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
34Tested-by: Lukas Razik <linux@razik.name>
35Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
36Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
37---
38 init/do_mounts.c | 35 +++++++++++++++++++++++++++++++----
39 1 files changed, 31 insertions(+), 4 deletions(-)
40
41diff --git a/init/do_mounts.c b/init/do_mounts.c
42index 0f6e1d9..db6e5ee 100644
43--- a/init/do_mounts.c
44+++ b/init/do_mounts.c
45@@ -398,15 +398,42 @@ out:
46 }
47
48 #ifdef CONFIG_ROOT_NFS
49+
50+#define NFSROOT_TIMEOUT_MIN 5
51+#define NFSROOT_TIMEOUT_MAX 30
52+#define NFSROOT_RETRY_MAX 5
53+
54 static int __init mount_nfs_root(void)
55 {
56 char *root_dev, *root_data;
57+ unsigned int timeout;
58+ int try, err;
59
60- if (nfs_root_data(&root_dev, &root_data) != 0)
61- return 0;
62- if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0)
63+ err = nfs_root_data(&root_dev, &root_data);
64+ if (err != 0)
65 return 0;
66- return 1;
67+
68+ /*
69+ * The server or network may not be ready, so try several
70+ * times. Stop after a few tries in case the client wants
71+ * to fall back to other boot methods.
72+ */
73+ timeout = NFSROOT_TIMEOUT_MIN;
74+ for (try = 1; ; try++) {
75+ err = do_mount_root(root_dev, "nfs",
76+ root_mountflags, root_data);
77+ if (err == 0)
78+ return 1;
79+ if (try > NFSROOT_RETRY_MAX)
80+ break;
81+
82+ /* Wait, in case the server refused us immediately */
83+ ssleep(timeout);
84+ timeout <<= 1;
85+ if (timeout > NFSROOT_TIMEOUT_MAX)
86+ timeout = NFSROOT_TIMEOUT_MAX;
87+ }
88+ return 0;
89 }
90 #endif
91
92--
931.7.7.4
94
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch
new file mode 100644
index 00000000..62c5b45c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch
@@ -0,0 +1,30 @@
1From a4d5a638ff204626f6244b3a316cf8f01ef3e2fa Mon Sep 17 00:00:00 2001
2From: Andy Adamson <andros@netapp.com>
3Date: Wed, 9 Nov 2011 13:58:20 -0500
4Subject: [PATCH 023/130] NFSv4.1: fix backchannel slotid off-by-one bug
5
6commit 61f2e5106582d02f30b6807e3f9c07463c572ccb upstream.
7
8Signed-off-by: Andy Adamson <andros@netapp.com>
9Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
10Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
11---
12 fs/nfs/callback_proc.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
16index 43926ad..54cea8a 100644
17--- a/fs/nfs/callback_proc.c
18+++ b/fs/nfs/callback_proc.c
19@@ -339,7 +339,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
20 dprintk("%s enter. slotid %d seqid %d\n",
21 __func__, args->csa_slotid, args->csa_sequenceid);
22
23- if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS)
24+ if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS)
25 return htonl(NFS4ERR_BADSLOT);
26
27 slot = tbl->slots + args->csa_slotid;
28--
291.7.7.4
30
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch
new file mode 100644
index 00000000..7f825112
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch
@@ -0,0 +1,60 @@
1From 876118d108ac910a4b4b4384b6d827ef9eb599bb Mon Sep 17 00:00:00 2001
2From: NeilBrown <neilb@suse.de>
3Date: Wed, 16 Nov 2011 11:46:31 +1100
4Subject: [PATCH 024/130] NFS - fix recent breakage to NFS error handling.
5
6commit 2edb6bc3852c681c0d948245bd55108dc6407604 upstream.
7
8 From c6d615d2b97fe305cbf123a8751ced859dca1d5e Mon Sep 17 00:00:00 2001
9 From: NeilBrown <neilb@suse.de>
10 Date: Wed, 16 Nov 2011 09:39:05 +1100
11 Subject: NFS - fix recent breakage to NFS error handling.
12
13commit 02c24a82187d5a628c68edfe71ae60dc135cd178 made a small and
14presumably unintended change to write error handling in NFS.
15
16Previously an error from filemap_write_and_wait_range would only be of
17interest if nfs_file_fsync did not return an error. After this commit,
18an error from filemap_write_and_wait_range would mean that (the rest of)
19nfs_file_fsync would not even be called.
20
21This means that:
22 1/ you are more likely to see EIO than e.g. EDQUOT or ENOSPC.
23 2/ NFS_CONTEXT_ERROR_WRITE remains set for longer so more writes are
24 synchronous.
25
26This patch restores previous behaviour.
27
28Cc: Josef Bacik <josef@redhat.com>
29Cc: Jan Kara <jack@suse.cz>
30Cc: Al Viro <viro@zeniv.linux.org.uk>
31Signed-off-by: NeilBrown <neilb@suse.de>
32Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
33Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
34---
35 fs/nfs/file.c | 4 ++--
36 1 files changed, 2 insertions(+), 2 deletions(-)
37
38diff --git a/fs/nfs/file.c b/fs/nfs/file.c
39index 606ef0f..c43a452 100644
40--- a/fs/nfs/file.c
41+++ b/fs/nfs/file.c
42@@ -272,13 +272,13 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
43 datasync);
44
45 ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
46- if (ret)
47- return ret;
48 mutex_lock(&inode->i_mutex);
49
50 nfs_inc_stats(inode, NFSIOS_VFSFSYNC);
51 have_error = test_and_clear_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
52 status = nfs_commit_inode(inode, FLUSH_SYNC);
53+ if (status >= 0 && ret < 0)
54+ status = ret;
55 have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
56 if (have_error)
57 ret = xchg(&ctx->error, 0);
58--
591.7.7.4
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch
new file mode 100644
index 00000000..383a8f11
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch
@@ -0,0 +1,313 @@
1From ea3a3ed18130c4a0fe0dbdd3f7dabc59a67c5064 Mon Sep 17 00:00:00 2001
2From: Andy Adamson <andros@netapp.com>
3Date: Wed, 7 Dec 2011 11:55:27 -0500
4Subject: [PATCH 025/130] NFSv4: include bitmap in nfsv4 get acl data
5
6commit bf118a342f10dafe44b14451a1392c3254629a1f upstream.
7
8The NFSv4 bitmap size is unbounded: a server can return an arbitrary
9sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
10nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
11with the inclusion of the bitmap (xdr length plus bitmasks) and the acl data
12xdr length to the (cached) acl page data.
13
14This is a general solution to commit e5012d1f "NFSv4.1: update
15nfs4_fattr_bitmap_maxsz" and fixes hitting a BUG_ON in xdr_shrink_bufhead
16when getting ACLs.
17
18Fix a bug in decode_getacl that returned -EINVAL on ACLs > page when getxattr
19was called with a NULL buffer, preventing ACL > PAGE_SIZE from being retrieved.
20
21Signed-off-by: Andy Adamson <andros@netapp.com>
22Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
24---
25 fs/nfs/nfs4proc.c | 96 ++++++++++++++++++++++++++------------------
26 fs/nfs/nfs4xdr.c | 31 ++++++++++----
27 include/linux/nfs_xdr.h | 5 ++
28 include/linux/sunrpc/xdr.h | 2 +
29 net/sunrpc/xdr.c | 3 +-
30 5 files changed, 89 insertions(+), 48 deletions(-)
31
32diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
33index d9f4d78..055d702 100644
34--- a/fs/nfs/nfs4proc.c
35+++ b/fs/nfs/nfs4proc.c
36@@ -3430,19 +3430,6 @@ static inline int nfs4_server_supports_acls(struct nfs_server *server)
37 */
38 #define NFS4ACL_MAXPAGES (XATTR_SIZE_MAX >> PAGE_CACHE_SHIFT)
39
40-static void buf_to_pages(const void *buf, size_t buflen,
41- struct page **pages, unsigned int *pgbase)
42-{
43- const void *p = buf;
44-
45- *pgbase = offset_in_page(buf);
46- p -= *pgbase;
47- while (p < buf + buflen) {
48- *(pages++) = virt_to_page(p);
49- p += PAGE_CACHE_SIZE;
50- }
51-}
52-
53 static int buf_to_pages_noslab(const void *buf, size_t buflen,
54 struct page **pages, unsigned int *pgbase)
55 {
56@@ -3539,9 +3526,19 @@ out:
57 nfs4_set_cached_acl(inode, acl);
58 }
59
60+/*
61+ * The getxattr API returns the required buffer length when called with a
62+ * NULL buf. The NFSv4 acl tool then calls getxattr again after allocating
63+ * the required buf. On a NULL buf, we send a page of data to the server
64+ * guessing that the ACL request can be serviced by a page. If so, we cache
65+ * up to the page of ACL data, and the 2nd call to getxattr is serviced by
66+ * the cache. If not so, we throw away the page, and cache the required
67+ * length. The next getxattr call will then produce another round trip to
68+ * the server, this time with the input buf of the required size.
69+ */
70 static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen)
71 {
72- struct page *pages[NFS4ACL_MAXPAGES];
73+ struct page *pages[NFS4ACL_MAXPAGES] = {NULL, };
74 struct nfs_getaclargs args = {
75 .fh = NFS_FH(inode),
76 .acl_pages = pages,
77@@ -3556,41 +3553,60 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu
78 .rpc_argp = &args,
79 .rpc_resp = &res,
80 };
81- struct page *localpage = NULL;
82- int ret;
83+ int ret = -ENOMEM, npages, i, acl_len = 0;
84
85- if (buflen < PAGE_SIZE) {
86- /* As long as we're doing a round trip to the server anyway,
87- * let's be prepared for a page of acl data. */
88- localpage = alloc_page(GFP_KERNEL);
89- resp_buf = page_address(localpage);
90- if (localpage == NULL)
91- return -ENOMEM;
92- args.acl_pages[0] = localpage;
93- args.acl_pgbase = 0;
94- args.acl_len = PAGE_SIZE;
95- } else {
96- resp_buf = buf;
97- buf_to_pages(buf, buflen, args.acl_pages, &args.acl_pgbase);
98+ npages = (buflen + PAGE_SIZE - 1) >> PAGE_SHIFT;
99+ /* As long as we're doing a round trip to the server anyway,
100+ * let's be prepared for a page of acl data. */
101+ if (npages == 0)
102+ npages = 1;
103+
104+ for (i = 0; i < npages; i++) {
105+ pages[i] = alloc_page(GFP_KERNEL);
106+ if (!pages[i])
107+ goto out_free;
108+ }
109+ if (npages > 1) {
110+ /* for decoding across pages */
111+ args.acl_scratch = alloc_page(GFP_KERNEL);
112+ if (!args.acl_scratch)
113+ goto out_free;
114 }
115- ret = nfs4_call_sync(NFS_SERVER(inode)->client, NFS_SERVER(inode), &msg, &args.seq_args, &res.seq_res, 0);
116+ args.acl_len = npages * PAGE_SIZE;
117+ args.acl_pgbase = 0;
118+ /* Let decode_getfacl know not to fail if the ACL data is larger than
119+ * the page we send as a guess */
120+ if (buf == NULL)
121+ res.acl_flags |= NFS4_ACL_LEN_REQUEST;
122+ resp_buf = page_address(pages[0]);
123+
124+ dprintk("%s buf %p buflen %ld npages %d args.acl_len %ld\n",
125+ __func__, buf, buflen, npages, args.acl_len);
126+ ret = nfs4_call_sync(NFS_SERVER(inode)->client, NFS_SERVER(inode),
127+ &msg, &args.seq_args, &res.seq_res, 0);
128 if (ret)
129 goto out_free;
130- if (res.acl_len > args.acl_len)
131- nfs4_write_cached_acl(inode, NULL, res.acl_len);
132+
133+ acl_len = res.acl_len - res.acl_data_offset;
134+ if (acl_len > args.acl_len)
135+ nfs4_write_cached_acl(inode, NULL, acl_len);
136 else
137- nfs4_write_cached_acl(inode, resp_buf, res.acl_len);
138+ nfs4_write_cached_acl(inode, resp_buf + res.acl_data_offset,
139+ acl_len);
140 if (buf) {
141 ret = -ERANGE;
142- if (res.acl_len > buflen)
143+ if (acl_len > buflen)
144 goto out_free;
145- if (localpage)
146- memcpy(buf, resp_buf, res.acl_len);
147+ _copy_from_pages(buf, pages, res.acl_data_offset,
148+ res.acl_len);
149 }
150- ret = res.acl_len;
151+ ret = acl_len;
152 out_free:
153- if (localpage)
154- __free_page(localpage);
155+ for (i = 0; i < npages; i++)
156+ if (pages[i])
157+ __free_page(pages[i]);
158+ if (args.acl_scratch)
159+ __free_page(args.acl_scratch);
160 return ret;
161 }
162
163@@ -3621,6 +3637,8 @@ static ssize_t nfs4_proc_get_acl(struct inode *inode, void *buf, size_t buflen)
164 nfs_zap_acl_cache(inode);
165 ret = nfs4_read_cached_acl(inode, buf, buflen);
166 if (ret != -ENOENT)
167+ /* -ENOENT is returned if there is no ACL or if there is an ACL
168+ * but no cached acl data, just the acl length */
169 return ret;
170 return nfs4_get_acl_uncached(inode, buf, buflen);
171 }
172diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
173index e6161b2..dcaf693 100644
174--- a/fs/nfs/nfs4xdr.c
175+++ b/fs/nfs/nfs4xdr.c
176@@ -2517,11 +2517,13 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
177 encode_compound_hdr(xdr, req, &hdr);
178 encode_sequence(xdr, &args->seq_args, &hdr);
179 encode_putfh(xdr, args->fh, &hdr);
180- replen = hdr.replen + op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz + 1;
181+ replen = hdr.replen + op_decode_hdr_maxsz + 1;
182 encode_getattr_two(xdr, FATTR4_WORD0_ACL, 0, &hdr);
183
184 xdr_inline_pages(&req->rq_rcv_buf, replen << 2,
185 args->acl_pages, args->acl_pgbase, args->acl_len);
186+ xdr_set_scratch_buffer(xdr, page_address(args->acl_scratch), PAGE_SIZE);
187+
188 encode_nops(&hdr);
189 }
190
191@@ -4957,17 +4959,18 @@ decode_restorefh(struct xdr_stream *xdr)
192 }
193
194 static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
195- size_t *acl_len)
196+ struct nfs_getaclres *res)
197 {
198- __be32 *savep;
199+ __be32 *savep, *bm_p;
200 uint32_t attrlen,
201 bitmap[3] = {0};
202 struct kvec *iov = req->rq_rcv_buf.head;
203 int status;
204
205- *acl_len = 0;
206+ res->acl_len = 0;
207 if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0)
208 goto out;
209+ bm_p = xdr->p;
210 if ((status = decode_attr_bitmap(xdr, bitmap)) != 0)
211 goto out;
212 if ((status = decode_attr_length(xdr, &attrlen, &savep)) != 0)
213@@ -4979,18 +4982,30 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
214 size_t hdrlen;
215 u32 recvd;
216
217+ /* The bitmap (xdr len + bitmaps) and the attr xdr len words
218+ * are stored with the acl data to handle the problem of
219+ * variable length bitmaps.*/
220+ xdr->p = bm_p;
221+ res->acl_data_offset = be32_to_cpup(bm_p) + 2;
222+ res->acl_data_offset <<= 2;
223+
224 /* We ignore &savep and don't do consistency checks on
225 * the attr length. Let userspace figure it out.... */
226 hdrlen = (u8 *)xdr->p - (u8 *)iov->iov_base;
227+ attrlen += res->acl_data_offset;
228 recvd = req->rq_rcv_buf.len - hdrlen;
229 if (attrlen > recvd) {
230- dprintk("NFS: server cheating in getattr"
231- " acl reply: attrlen %u > recvd %u\n",
232+ if (res->acl_flags & NFS4_ACL_LEN_REQUEST) {
233+ /* getxattr interface called with a NULL buf */
234+ res->acl_len = attrlen;
235+ goto out;
236+ }
237+ dprintk("NFS: acl reply: attrlen %u > recvd %u\n",
238 attrlen, recvd);
239 return -EINVAL;
240 }
241 xdr_read_pages(xdr, attrlen);
242- *acl_len = attrlen;
243+ res->acl_len = attrlen;
244 } else
245 status = -EOPNOTSUPP;
246
247@@ -6028,7 +6043,7 @@ nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
248 status = decode_putfh(xdr);
249 if (status)
250 goto out;
251- status = decode_getacl(xdr, rqstp, &res->acl_len);
252+ status = decode_getacl(xdr, rqstp, res);
253
254 out:
255 return status;
256diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
257index 2a7c533..6c898af 100644
258--- a/include/linux/nfs_xdr.h
259+++ b/include/linux/nfs_xdr.h
260@@ -602,11 +602,16 @@ struct nfs_getaclargs {
261 size_t acl_len;
262 unsigned int acl_pgbase;
263 struct page ** acl_pages;
264+ struct page * acl_scratch;
265 struct nfs4_sequence_args seq_args;
266 };
267
268+/* getxattr ACL interface flags */
269+#define NFS4_ACL_LEN_REQUEST 0x0001 /* zero length getxattr buffer */
270 struct nfs_getaclres {
271 size_t acl_len;
272+ size_t acl_data_offset;
273+ int acl_flags;
274 struct nfs4_sequence_res seq_res;
275 };
276
277diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
278index a20970e..af70af3 100644
279--- a/include/linux/sunrpc/xdr.h
280+++ b/include/linux/sunrpc/xdr.h
281@@ -191,6 +191,8 @@ extern int xdr_decode_array2(struct xdr_buf *buf, unsigned int base,
282 struct xdr_array2_desc *desc);
283 extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base,
284 struct xdr_array2_desc *desc);
285+extern void _copy_from_pages(char *p, struct page **pages, size_t pgbase,
286+ size_t len);
287
288 /*
289 * Provide some simple tools for XDR buffer overflow-checking etc.
290diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
291index 277ebd4..593f4c6 100644
292--- a/net/sunrpc/xdr.c
293+++ b/net/sunrpc/xdr.c
294@@ -296,7 +296,7 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
295 * Copies data into an arbitrary memory location from an array of pages
296 * The copy is assumed to be non-overlapping.
297 */
298-static void
299+void
300 _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
301 {
302 struct page **pgfrom;
303@@ -324,6 +324,7 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
304
305 } while ((len -= copy) != 0);
306 }
307+EXPORT_SYMBOL_GPL(_copy_from_pages);
308
309 /*
310 * xdr_shrink_bufhead
311--
3121.7.7.4
313
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch
new file mode 100644
index 00000000..02f9fe12
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch
@@ -0,0 +1,147 @@
1From e7d23a1c02013b27699c8d993ef0ceb6e3110955 Mon Sep 17 00:00:00 2001
2From: Jeff Layton <jlayton@redhat.com>
3Date: Tue, 20 Dec 2011 06:57:45 -0500
4Subject: [PATCH 026/130] nfs: fix regression in handling of context= option
5 in NFSv4
6
7commit 8a0d551a59ac92d8ff048d6cb29d3a02073e81e8 upstream.
8
9Setting the security context of a NFSv4 mount via the context= mount
10option is currently broken. The NFSv4 codepath allocates a parsed
11options struct, and then parses the mount options to fill it. It
12eventually calls nfs4_remote_mount which calls security_init_mnt_opts.
13That clobbers the lsm_opts struct that was populated earlier. This bug
14also looks like it causes a small memory leak on each v4 mount where
15context= is used.
16
17Fix this by moving the initialization of the lsm_opts into
18nfs_alloc_parsed_mount_data. Also, add a destructor for
19nfs_parsed_mount_data to make it easier to free all of the allocations
20hanging off of it, and to ensure that the security_free_mnt_opts is
21called whenever security_init_mnt_opts is.
22
23I believe this regression was introduced quite some time ago, probably
24by commit c02d7adf.
25
26Signed-off-by: Jeff Layton <jlayton@redhat.com>
27Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29---
30 fs/nfs/super.c | 43 +++++++++++++++++++------------------------
31 1 files changed, 19 insertions(+), 24 deletions(-)
32
33diff --git a/fs/nfs/super.c b/fs/nfs/super.c
34index 1347774..3ada13c 100644
35--- a/fs/nfs/super.c
36+++ b/fs/nfs/super.c
37@@ -909,10 +909,24 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int ve
38 data->auth_flavor_len = 1;
39 data->version = version;
40 data->minorversion = 0;
41+ security_init_mnt_opts(&data->lsm_opts);
42 }
43 return data;
44 }
45
46+static void nfs_free_parsed_mount_data(struct nfs_parsed_mount_data *data)
47+{
48+ if (data) {
49+ kfree(data->client_address);
50+ kfree(data->mount_server.hostname);
51+ kfree(data->nfs_server.export_path);
52+ kfree(data->nfs_server.hostname);
53+ kfree(data->fscache_uniq);
54+ security_free_mnt_opts(&data->lsm_opts);
55+ kfree(data);
56+ }
57+}
58+
59 /*
60 * Sanity-check a server address provided by the mount command.
61 *
62@@ -2220,9 +2234,7 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
63 data = nfs_alloc_parsed_mount_data(NFS_DEFAULT_VERSION);
64 mntfh = nfs_alloc_fhandle();
65 if (data == NULL || mntfh == NULL)
66- goto out_free_fh;
67-
68- security_init_mnt_opts(&data->lsm_opts);
69+ goto out;
70
71 /* Validate the mount data */
72 error = nfs_validate_mount_data(raw_data, data, mntfh, dev_name);
73@@ -2234,8 +2246,6 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
74 #ifdef CONFIG_NFS_V4
75 if (data->version == 4) {
76 mntroot = nfs4_try_mount(flags, dev_name, data);
77- kfree(data->client_address);
78- kfree(data->nfs_server.export_path);
79 goto out;
80 }
81 #endif /* CONFIG_NFS_V4 */
82@@ -2290,13 +2300,8 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
83 s->s_flags |= MS_ACTIVE;
84
85 out:
86- kfree(data->nfs_server.hostname);
87- kfree(data->mount_server.hostname);
88- kfree(data->fscache_uniq);
89- security_free_mnt_opts(&data->lsm_opts);
90-out_free_fh:
91+ nfs_free_parsed_mount_data(data);
92 nfs_free_fhandle(mntfh);
93- kfree(data);
94 return mntroot;
95
96 out_err_nosb:
97@@ -2623,9 +2628,7 @@ nfs4_remote_mount(struct file_system_type *fs_type, int flags,
98
99 mntfh = nfs_alloc_fhandle();
100 if (data == NULL || mntfh == NULL)
101- goto out_free_fh;
102-
103- security_init_mnt_opts(&data->lsm_opts);
104+ goto out;
105
106 /* Get a volume representation */
107 server = nfs4_create_server(data, mntfh);
108@@ -2677,13 +2680,10 @@ nfs4_remote_mount(struct file_system_type *fs_type, int flags,
109
110 s->s_flags |= MS_ACTIVE;
111
112- security_free_mnt_opts(&data->lsm_opts);
113 nfs_free_fhandle(mntfh);
114 return mntroot;
115
116 out:
117- security_free_mnt_opts(&data->lsm_opts);
118-out_free_fh:
119 nfs_free_fhandle(mntfh);
120 return ERR_PTR(error);
121
122@@ -2838,7 +2838,7 @@ static struct dentry *nfs4_mount(struct file_system_type *fs_type,
123
124 data = nfs_alloc_parsed_mount_data(4);
125 if (data == NULL)
126- goto out_free_data;
127+ goto out;
128
129 /* Validate the mount data */
130 error = nfs4_validate_mount_data(raw_data, data, dev_name);
131@@ -2852,12 +2852,7 @@ static struct dentry *nfs4_mount(struct file_system_type *fs_type,
132 error = PTR_ERR(res);
133
134 out:
135- kfree(data->client_address);
136- kfree(data->nfs_server.export_path);
137- kfree(data->nfs_server.hostname);
138- kfree(data->fscache_uniq);
139-out_free_data:
140- kfree(data);
141+ nfs_free_parsed_mount_data(data);
142 dprintk("<-- nfs4_mount() = %d%s\n", error,
143 error != 0 ? " [error]" : "");
144 return res;
145--
1461.7.7.4
147
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch
new file mode 100644
index 00000000..86e599f2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch
@@ -0,0 +1,35 @@
1From 1d30ef7aee8f11c3f90038ba7d57a82e0acbadb5 Mon Sep 17 00:00:00 2001
2From: Chase Douglas <chase.douglas@canonical.com>
3Date: Mon, 7 Nov 2011 11:08:05 -0800
4Subject: [PATCH 027/130] HID: bump maximum global item tag report size to 96
5 bytes
6
7commit e46e927b9b7e8d95526e69322855243882b7e1a3 upstream.
8
9This allows the latest N-Trig devices to function properly.
10
11BugLink: https://bugs.launchpad.net/bugs/724831
12
13Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
14Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/hid/hid-core.c | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
21index af35384..1473067 100644
22--- a/drivers/hid/hid-core.c
23+++ b/drivers/hid/hid-core.c
24@@ -362,7 +362,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
25
26 case HID_GLOBAL_ITEM_TAG_REPORT_SIZE:
27 parser->global.report_size = item_udata(item);
28- if (parser->global.report_size > 32) {
29+ if (parser->global.report_size > 96) {
30 dbg_hid("invalid report_size %d\n",
31 parser->global.report_size);
32 return -1;
33--
341.7.7.4
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch
new file mode 100644
index 00000000..c2132bdd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch
@@ -0,0 +1,33 @@
1From f60dd210e7edd913a760ca4c4f9df2c6341f5ef8 Mon Sep 17 00:00:00 2001
2From: David Herrmann <dh.herrmann@googlemail.com>
3Date: Wed, 7 Dec 2011 21:33:59 +0100
4Subject: [PATCH 028/130] HID: wiimote: Select INPUT_FF_MEMLESS
5
6commit ef6f41157f3864d9bf42671b2ed66062dcafb72e upstream.
7
8We depend on memless force-feedback support, therefore correctly select the
9related config options.
10
11Reported-by: Randy Dunlap <rdunlap@xenotime.net>
12Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
13Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/hid/Kconfig | 1 +
17 1 files changed, 1 insertions(+), 0 deletions(-)
18
19diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
20index 22a4a05..332c22a 100644
21--- a/drivers/hid/Kconfig
22+++ b/drivers/hid/Kconfig
23@@ -620,6 +620,7 @@ config HID_WIIMOTE
24 depends on BT_HIDP
25 depends on LEDS_CLASS
26 select POWER_SUPPLY
27+ select INPUT_FF_MEMLESS
28 ---help---
29 Support for the Nintendo Wii Remote bluetooth device.
30
31--
321.7.7.4
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch
new file mode 100644
index 00000000..b6b6bd32
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch
@@ -0,0 +1,81 @@
1From e20542f497522671fa121d7612442a2557bfa2ff Mon Sep 17 00:00:00 2001
2From: Bhavesh Parekh <bparekh@nvidia.com>
3Date: Wed, 30 Nov 2011 17:43:42 +0530
4Subject: [PATCH 029/130] UBI: fix missing scrub when there is a bit-flip
5
6commit e801e128b2200c40a0ec236cf2330b2586b6e05a upstream.
7
8Under some cases, when scrubbing the PEB if we did not get the lock on
9the PEB it fails to scrub. Add that PEB again to the scrub list
10
11Artem: minor amendments.
12
13Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com>
14Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/mtd/ubi/eba.c | 6 ++++--
18 drivers/mtd/ubi/ubi.h | 2 ++
19 drivers/mtd/ubi/wl.c | 5 ++++-
20 3 files changed, 10 insertions(+), 3 deletions(-)
21
22diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
23index fb7f19b..cd26da8 100644
24--- a/drivers/mtd/ubi/eba.c
25+++ b/drivers/mtd/ubi/eba.c
26@@ -1028,12 +1028,14 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
27 * 'ubi_wl_put_peb()' function on the @ubi->move_mutex. In turn, we are
28 * holding @ubi->move_mutex and go sleep on the LEB lock. So, if the
29 * LEB is already locked, we just do not move it and return
30- * %MOVE_CANCEL_RACE, which means that UBI will re-try, but later.
31+ * %MOVE_RETRY. Note, we do not return %MOVE_CANCEL_RACE here because
32+ * we do not know the reasons of the contention - it may be just a
33+ * normal I/O on this LEB, so we want to re-try.
34 */
35 err = leb_write_trylock(ubi, vol_id, lnum);
36 if (err) {
37 dbg_wl("contention on LEB %d:%d, cancel", vol_id, lnum);
38- return MOVE_CANCEL_RACE;
39+ return MOVE_RETRY;
40 }
41
42 /*
43diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
44index dc64c76..d51d75d 100644
45--- a/drivers/mtd/ubi/ubi.h
46+++ b/drivers/mtd/ubi/ubi.h
47@@ -120,6 +120,7 @@ enum {
48 * PEB
49 * MOVE_CANCEL_BITFLIPS: canceled because a bit-flip was detected in the
50 * target PEB
51+ * MOVE_RETRY: retry scrubbing the PEB
52 */
53 enum {
54 MOVE_CANCEL_RACE = 1,
55@@ -127,6 +128,7 @@ enum {
56 MOVE_TARGET_RD_ERR,
57 MOVE_TARGET_WR_ERR,
58 MOVE_CANCEL_BITFLIPS,
59+ MOVE_RETRY,
60 };
61
62 /**
63diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
64index 42c684c..277c429 100644
65--- a/drivers/mtd/ubi/wl.c
66+++ b/drivers/mtd/ubi/wl.c
67@@ -795,7 +795,10 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
68 protect = 1;
69 goto out_not_moved;
70 }
71-
72+ if (err == MOVE_RETRY) {
73+ scrubbing = 1;
74+ goto out_not_moved;
75+ }
76 if (err == MOVE_CANCEL_BITFLIPS || err == MOVE_TARGET_WR_ERR ||
77 err == MOVE_TARGET_RD_ERR) {
78 /*
79--
801.7.7.4
81
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch
new file mode 100644
index 00000000..223b41a4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch
@@ -0,0 +1,52 @@
1From e9089302a9d795113e8efe652fe30331d75d1fd8 Mon Sep 17 00:00:00 2001
2From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
3Date: Thu, 5 Jan 2012 10:47:18 +0200
4Subject: [PATCH 030/130] UBI: fix use-after-free on error path
5
6commit e57e0d8e818512047fe379157c3f77f1b9fabffb upstream.
7
8When we fail to erase a PEB, we free the corresponding erase entry object,
9but then re-schedule this object if the error code was something like -EAGAIN.
10Obviously, it is a bug to use the object after we have freed it.
11
12Reported-by: Emese Revfy <re.emese@gmail.com>
13Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/mtd/ubi/wl.c | 7 ++++---
17 1 files changed, 4 insertions(+), 3 deletions(-)
18
19diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
20index 277c429..0696e36 100644
21--- a/drivers/mtd/ubi/wl.c
22+++ b/drivers/mtd/ubi/wl.c
23@@ -1052,7 +1052,6 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,
24
25 ubi_err("failed to erase PEB %d, error %d", pnum, err);
26 kfree(wl_wrk);
27- kmem_cache_free(ubi_wl_entry_slab, e);
28
29 if (err == -EINTR || err == -ENOMEM || err == -EAGAIN ||
30 err == -EBUSY) {
31@@ -1065,14 +1064,16 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,
32 goto out_ro;
33 }
34 return err;
35- } else if (err != -EIO) {
36+ }
37+
38+ kmem_cache_free(ubi_wl_entry_slab, e);
39+ if (err != -EIO)
40 /*
41 * If this is not %-EIO, we have no idea what to do. Scheduling
42 * this physical eraseblock for erasure again would cause
43 * errors again and again. Well, lets switch to R/O mode.
44 */
45 goto out_ro;
46- }
47
48 /* It is %-EIO, the PEB went bad */
49
50--
511.7.7.4
52
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch
new file mode 100644
index 00000000..c7947bed
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch
@@ -0,0 +1,32 @@
1From 9d9e1e743ab7ca6f40a0f6f60f5ebda2a6b8b07b Mon Sep 17 00:00:00 2001
2From: Alex Williamson <alex.williamson@redhat.com>
3Date: Wed, 16 Nov 2011 09:24:16 -0700
4Subject: [PATCH 031/130] PCI: Fix PCI_EXP_TYPE_RC_EC value
5
6commit 1830ea91c20b06608f7cdb2455ce05ba834b3214 upstream.
7
8Spec shows this as 1010b = 0xa
9
10Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
12Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13---
14 include/linux/pci_regs.h | 2 +-
15 1 files changed, 1 insertions(+), 1 deletions(-)
16
17diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
18index b5d9657..411c412 100644
19--- a/include/linux/pci_regs.h
20+++ b/include/linux/pci_regs.h
21@@ -392,7 +392,7 @@
22 #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */
23 #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */
24 #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */
25-#define PCI_EXP_TYPE_RC_EC 0x10 /* Root Complex Event Collector */
26+#define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */
27 #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */
28 #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */
29 #define PCI_EXP_DEVCAP 4 /* Device capabilities */
30--
311.7.7.4
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch
new file mode 100644
index 00000000..f8c36b76
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch
@@ -0,0 +1,53 @@
1From 63365de9ebb1b944d0306668f726ad62a08a0371 Mon Sep 17 00:00:00 2001
2From: "Eric W. Biederman" <ebiederm@xmission.com>
3Date: Mon, 17 Oct 2011 11:46:06 -0700
4Subject: [PATCH 032/130] PCI: msi: Disable msi interrupts when we initialize
5 a pci device
6
7commit a776c491ca5e38c26d9f66923ff574d041e747f4 upstream.
8
9I traced a nasty kexec on panic boot failure to the fact that we had
10screaming msi interrupts and we were not disabling the msi messages at
11kernel startup. The booting kernel had not enabled those interupts so
12was not prepared to handle them.
13
14I can see no reason why we would ever want to leave the msi interrupts
15enabled at boot if something else has enabled those interrupts. The pci
16spec specifies that msi interrupts should be off by default. Drivers
17are expected to enable the msi interrupts if they want to use them. Our
18interrupt handling code reprograms the interrupt handlers at boot and
19will not be be able to do anything useful with an unexpected interrupt.
20
21This patch applies cleanly all of the way back to 2.6.32 where I noticed
22the problem.
23
24Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
25Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
26Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
27---
28 drivers/pci/msi.c | 10 ++++++++++
29 1 files changed, 10 insertions(+), 0 deletions(-)
30
31diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
32index 0e6d04d..e3efb43 100644
33--- a/drivers/pci/msi.c
34+++ b/drivers/pci/msi.c
35@@ -870,5 +870,15 @@ EXPORT_SYMBOL(pci_msi_enabled);
36
37 void pci_msi_init_pci_dev(struct pci_dev *dev)
38 {
39+ int pos;
40 INIT_LIST_HEAD(&dev->msi_list);
41+
42+ /* Disable the msi hardware to avoid screaming interrupts
43+ * during boot. This is the power on reset default so
44+ * usually this should be a noop.
45+ */
46+ pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
47+ if (pos)
48+ msi_set_enable(dev, pos, 0);
49+ msix_set_enable(dev, 0);
50 }
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch
new file mode 100644
index 00000000..81499694
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch
@@ -0,0 +1,65 @@
1From 5040b50e89f45f17231e6d2ad101596bedc5e431 Mon Sep 17 00:00:00 2001
2From: Gary Hade <garyhade@us.ibm.com>
3Date: Mon, 14 Nov 2011 15:42:16 -0800
4Subject: [PATCH 033/130] x86/PCI: Ignore CPU non-addressable _CRS reserved
5 memory resources
6
7commit ae5cd86455381282ece162966183d3f208c6fad7 upstream.
8
9This assures that a _CRS reserved host bridge window or window region is
10not used if it is not addressable by the CPU. The new code either trims
11the window to exclude the non-addressable portion or totally ignores the
12window if the entire window is non-addressable.
13
14The current code has been shown to be problematic with 32-bit non-PAE
15kernels on systems where _CRS reserves resources above 4GB.
16
17Signed-off-by: Gary Hade <garyhade@us.ibm.com>
18Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
19Cc: Thomas Renninger <trenn@novell.com>
20Cc: linux-kernel@vger.kernel.org
21Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 arch/x86/pci/acpi.c | 18 ++++++++++++++++--
25 1 files changed, 16 insertions(+), 2 deletions(-)
26
27diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
28index 404f21a..f8348ab 100644
29--- a/arch/x86/pci/acpi.c
30+++ b/arch/x86/pci/acpi.c
31@@ -149,7 +149,7 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
32 struct acpi_resource_address64 addr;
33 acpi_status status;
34 unsigned long flags;
35- u64 start, end;
36+ u64 start, orig_end, end;
37
38 status = resource_to_addr(acpi_res, &addr);
39 if (!ACPI_SUCCESS(status))
40@@ -165,7 +165,21 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
41 return AE_OK;
42
43 start = addr.minimum + addr.translation_offset;
44- end = addr.maximum + addr.translation_offset;
45+ orig_end = end = addr.maximum + addr.translation_offset;
46+
47+ /* Exclude non-addressable range or non-addressable portion of range */
48+ end = min(end, (u64)iomem_resource.end);
49+ if (end <= start) {
50+ dev_info(&info->bridge->dev,
51+ "host bridge window [%#llx-%#llx] "
52+ "(ignored, not CPU addressable)\n", start, orig_end);
53+ return AE_OK;
54+ } else if (orig_end != end) {
55+ dev_info(&info->bridge->dev,
56+ "host bridge window [%#llx-%#llx] "
57+ "([%#llx-%#llx] ignored, not CPU addressable)\n",
58+ start, orig_end, end + 1, orig_end);
59+ }
60
61 res = &info->res[info->res_num];
62 res->name = info->name;
63--
641.7.7.4
65
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch
new file mode 100644
index 00000000..ff16fb49
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch
@@ -0,0 +1,160 @@
1From c6f611b87ae8cf8a5bd1fc916b4b63e0fd48d6f3 Mon Sep 17 00:00:00 2001
2From: Bjorn Helgaas <bhelgaas@google.com>
3Date: Thu, 5 Jan 2012 14:27:19 -0700
4Subject: [PATCH 034/130] x86/PCI: amd: factor out MMCONFIG discovery
5
6commit 24d25dbfa63c376323096660bfa9ad45a08870ce upstream.
7
8This factors out the AMD native MMCONFIG discovery so we can use it
9outside amd_bus.c.
10
11amd_bus.c reads AMD MSRs so it can remove the MMCONFIG area from the
12PCI resources. We may also need the MMCONFIG information to work
13around BIOS defects in the ACPI MCFG table.
14
15Cc: Borislav Petkov <borislav.petkov@amd.com>
16Cc: Yinghai Lu <yinghai@kernel.org>
17Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
18Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 arch/x86/include/asm/amd_nb.h | 2 +
22 arch/x86/kernel/amd_nb.c | 31 ++++++++++++++++++++++++++++++
23 arch/x86/pci/amd_bus.c | 42 ++++++++++------------------------------
24 3 files changed, 44 insertions(+), 31 deletions(-)
25
26diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
27index 8e41071..49ad773 100644
28--- a/arch/x86/include/asm/amd_nb.h
29+++ b/arch/x86/include/asm/amd_nb.h
30@@ -1,6 +1,7 @@
31 #ifndef _ASM_X86_AMD_NB_H
32 #define _ASM_X86_AMD_NB_H
33
34+#include <linux/ioport.h>
35 #include <linux/pci.h>
36
37 struct amd_nb_bus_dev_range {
38@@ -13,6 +14,7 @@ extern const struct pci_device_id amd_nb_misc_ids[];
39 extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];
40
41 extern bool early_is_amd_nb(u32 value);
42+extern struct resource *amd_get_mmconfig_range(struct resource *res);
43 extern int amd_cache_northbridges(void);
44 extern void amd_flush_garts(void);
45 extern int amd_numa_init(void);
46diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
47index 4c39baa..bae1efe 100644
48--- a/arch/x86/kernel/amd_nb.c
49+++ b/arch/x86/kernel/amd_nb.c
50@@ -119,6 +119,37 @@ bool __init early_is_amd_nb(u32 device)
51 return false;
52 }
53
54+struct resource *amd_get_mmconfig_range(struct resource *res)
55+{
56+ u32 address;
57+ u64 base, msr;
58+ unsigned segn_busn_bits;
59+
60+ if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
61+ return NULL;
62+
63+ /* assume all cpus from fam10h have mmconfig */
64+ if (boot_cpu_data.x86 < 0x10)
65+ return NULL;
66+
67+ address = MSR_FAM10H_MMIO_CONF_BASE;
68+ rdmsrl(address, msr);
69+
70+ /* mmconfig is not enabled */
71+ if (!(msr & FAM10H_MMIO_CONF_ENABLE))
72+ return NULL;
73+
74+ base = msr & (FAM10H_MMIO_CONF_BASE_MASK<<FAM10H_MMIO_CONF_BASE_SHIFT);
75+
76+ segn_busn_bits = (msr >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) &
77+ FAM10H_MMIO_CONF_BUSRANGE_MASK;
78+
79+ res->flags = IORESOURCE_MEM;
80+ res->start = base;
81+ res->end = base + (1ULL<<(segn_busn_bits + 20)) - 1;
82+ return res;
83+}
84+
85 int amd_get_subcaches(int cpu)
86 {
87 struct pci_dev *link = node_to_amd_nb(amd_get_nb_id(cpu))->link;
88diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
89index 026e493..385a940 100644
90--- a/arch/x86/pci/amd_bus.c
91+++ b/arch/x86/pci/amd_bus.c
92@@ -30,34 +30,6 @@ static struct pci_hostbridge_probe pci_probes[] __initdata = {
93 { 0, 0x18, PCI_VENDOR_ID_AMD, 0x1300 },
94 };
95
96-static u64 __initdata fam10h_mmconf_start;
97-static u64 __initdata fam10h_mmconf_end;
98-static void __init get_pci_mmcfg_amd_fam10h_range(void)
99-{
100- u32 address;
101- u64 base, msr;
102- unsigned segn_busn_bits;
103-
104- /* assume all cpus from fam10h have mmconf */
105- if (boot_cpu_data.x86 < 0x10)
106- return;
107-
108- address = MSR_FAM10H_MMIO_CONF_BASE;
109- rdmsrl(address, msr);
110-
111- /* mmconfig is not enable */
112- if (!(msr & FAM10H_MMIO_CONF_ENABLE))
113- return;
114-
115- base = msr & (FAM10H_MMIO_CONF_BASE_MASK<<FAM10H_MMIO_CONF_BASE_SHIFT);
116-
117- segn_busn_bits = (msr >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) &
118- FAM10H_MMIO_CONF_BUSRANGE_MASK;
119-
120- fam10h_mmconf_start = base;
121- fam10h_mmconf_end = base + (1ULL<<(segn_busn_bits + 20)) - 1;
122-}
123-
124 #define RANGE_NUM 16
125
126 /**
127@@ -85,6 +57,9 @@ static int __init early_fill_mp_bus_info(void)
128 u64 val;
129 u32 address;
130 bool found;
131+ struct resource fam10h_mmconf_res, *fam10h_mmconf;
132+ u64 fam10h_mmconf_start;
133+ u64 fam10h_mmconf_end;
134
135 if (!early_pci_allowed())
136 return -1;
137@@ -211,12 +186,17 @@ static int __init early_fill_mp_bus_info(void)
138 subtract_range(range, RANGE_NUM, 0, end);
139
140 /* get mmconfig */
141- get_pci_mmcfg_amd_fam10h_range();
142+ fam10h_mmconf = amd_get_mmconfig_range(&fam10h_mmconf_res);
143 /* need to take out mmconf range */
144- if (fam10h_mmconf_end) {
145- printk(KERN_DEBUG "Fam 10h mmconf [%llx, %llx]\n", fam10h_mmconf_start, fam10h_mmconf_end);
146+ if (fam10h_mmconf) {
147+ printk(KERN_DEBUG "Fam 10h mmconf %pR\n", fam10h_mmconf);
148+ fam10h_mmconf_start = fam10h_mmconf->start;
149+ fam10h_mmconf_end = fam10h_mmconf->end;
150 subtract_range(range, RANGE_NUM, fam10h_mmconf_start,
151 fam10h_mmconf_end + 1);
152+ } else {
153+ fam10h_mmconf_start = 0;
154+ fam10h_mmconf_end = 0;
155 }
156
157 /* mmio resource */
158--
1591.7.7.4
160
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch
new file mode 100644
index 00000000..7967028a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch
@@ -0,0 +1,37 @@
1From a67bd4738894215f045d9d1aed024277cb5ae99e Mon Sep 17 00:00:00 2001
2From: Bjorn Helgaas <bhelgaas@google.com>
3Date: Thu, 12 Jan 2012 08:01:40 -0700
4Subject: [PATCH 035/130] x86/PCI: build amd_bus.o only when CONFIG_AMD_NB=y
5
6commit 5cf9a4e69c1ff0ccdd1d2b7404f95c0531355274 upstream.
7
8We only need amd_bus.o for AMD systems with PCI. arch/x86/pci/Makefile
9already depends on CONFIG_PCI=y, so this patch just adds the dependency
10on CONFIG_AMD_NB.
11
12Cc: Yinghai Lu <yinghai@kernel.org>
13Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
14Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 arch/x86/pci/Makefile | 3 ++-
18 1 files changed, 2 insertions(+), 1 deletions(-)
19
20diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
21index 6b8759f..d24d3da 100644
22--- a/arch/x86/pci/Makefile
23+++ b/arch/x86/pci/Makefile
24@@ -18,8 +18,9 @@ obj-$(CONFIG_X86_NUMAQ) += numaq_32.o
25 obj-$(CONFIG_X86_MRST) += mrst.o
26
27 obj-y += common.o early.o
28-obj-y += amd_bus.o bus_numa.o
29+obj-y += bus_numa.o
30
31+obj-$(CONFIG_AMD_NB) += amd_bus.o
32 obj-$(CONFIG_PCI_CNB20LE_QUIRK) += broadcom_bus.o
33
34 ifeq ($(CONFIG_PCI_DEBUG),y)
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch
new file mode 100644
index 00000000..c9647f76
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch
@@ -0,0 +1,56 @@
1From c96f90776325ceb9fcda278cba8bc85e287d8d15 Mon Sep 17 00:00:00 2001
2From: "nagalakshmi.nandigama@lsi.com" <nagalakshmi.nandigama@lsi.com>
3Date: Thu, 1 Dec 2011 07:52:56 +0530
4Subject: [PATCH 036/130] SCSI: mpt2sas: Release spinlock for the raid device
5 list before blocking it
6
7commit 30c43282f3d347f47f9e05199d2b14f56f3f2837 upstream.
8
9Added code to release the spinlock that is used to protect the
10raid device list before calling a function that can block. The
11blocking was causing a reschedule, and subsequently it is tried
12to acquire the same lock, resulting in a panic (NMI Watchdog
13detecting a CPU lockup).
14
15Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
16Signed-off-by: James Bottomley <JBottomley@Parallels.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 drivers/scsi/mpt2sas/mpt2sas_scsih.c | 7 ++++---
20 1 files changed, 4 insertions(+), 3 deletions(-)
21
22diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
23index d570573..3a4f666 100644
24--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
25+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
26@@ -6714,6 +6714,7 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid,
27 } else
28 sas_target_priv_data = NULL;
29 raid_device->responding = 1;
30+ spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
31 starget_printk(KERN_INFO, raid_device->starget,
32 "handle(0x%04x), wwid(0x%016llx)\n", handle,
33 (unsigned long long)raid_device->wwid);
34@@ -6724,16 +6725,16 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid,
35 */
36 _scsih_init_warpdrive_properties(ioc, raid_device);
37 if (raid_device->handle == handle)
38- goto out;
39+ return;
40 printk(KERN_INFO "\thandle changed from(0x%04x)!!!\n",
41 raid_device->handle);
42 raid_device->handle = handle;
43 if (sas_target_priv_data)
44 sas_target_priv_data->handle = handle;
45- goto out;
46+ return;
47 }
48 }
49- out:
50+
51 spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
52 }
53
54--
551.7.7.4
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch
new file mode 100644
index 00000000..36d2703b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch
@@ -0,0 +1,177 @@
1From fe5907648567469336c06cf215932adac76a8e11 Mon Sep 17 00:00:00 2001
2From: "nagalakshmi.nandigama@lsi.com" <nagalakshmi.nandigama@lsi.com>
3Date: Thu, 1 Dec 2011 07:53:08 +0530
4Subject: [PATCH 037/130] SCSI: mpt2sas : Fix for memory allocation error for
5 large host credits
6
7commit aff132d95ffe14eca96cab90597cdd010b457af7 upstream.
8
9The amount of memory required for tracking chain buffers is rather
10large, and when the host credit count is big, memory allocation
11failure occurs inside __get_free_pages.
12
13The fix is to limit the number of chains to 100,000. In addition,
14the number of host credits is limited to 30,000 IOs. However this
15limitation can be overridden this using the command line option
16max_queue_depth. The algorithm for calculating the
17reply_post_queue_depth is changed so that it is equal to
18(reply_free_queue_depth + 16), previously it was (reply_free_queue_depth * 2).
19
20Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
21Signed-off-by: James Bottomley <JBottomley@Parallels.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 drivers/scsi/mpt2sas/mpt2sas_base.c | 83 +++++++++++-----------------------
25 drivers/scsi/mpt2sas/mpt2sas_scsih.c | 4 +-
26 2 files changed, 29 insertions(+), 58 deletions(-)
27
28diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
29index beda04a..0794c72 100644
30--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
31+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
32@@ -65,6 +65,8 @@ static MPT_CALLBACK mpt_callbacks[MPT_MAX_CALLBACKS];
33
34 #define FAULT_POLLING_INTERVAL 1000 /* in milliseconds */
35
36+#define MAX_HBA_QUEUE_DEPTH 30000
37+#define MAX_CHAIN_DEPTH 100000
38 static int max_queue_depth = -1;
39 module_param(max_queue_depth, int, 0);
40 MODULE_PARM_DESC(max_queue_depth, " max controller queue depth ");
41@@ -2311,8 +2313,6 @@ _base_release_memory_pools(struct MPT2SAS_ADAPTER *ioc)
42 }
43 if (ioc->chain_dma_pool)
44 pci_pool_destroy(ioc->chain_dma_pool);
45- }
46- if (ioc->chain_lookup) {
47 free_pages((ulong)ioc->chain_lookup, ioc->chain_pages);
48 ioc->chain_lookup = NULL;
49 }
50@@ -2330,9 +2330,7 @@ static int
51 _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
52 {
53 struct mpt2sas_facts *facts;
54- u32 queue_size, queue_diff;
55 u16 max_sge_elements;
56- u16 num_of_reply_frames;
57 u16 chains_needed_per_io;
58 u32 sz, total_sz, reply_post_free_sz;
59 u32 retry_sz;
60@@ -2359,7 +2357,8 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
61 max_request_credit = (max_queue_depth < facts->RequestCredit)
62 ? max_queue_depth : facts->RequestCredit;
63 else
64- max_request_credit = facts->RequestCredit;
65+ max_request_credit = min_t(u16, facts->RequestCredit,
66+ MAX_HBA_QUEUE_DEPTH);
67
68 ioc->hba_queue_depth = max_request_credit;
69 ioc->hi_priority_depth = facts->HighPriorityCredit;
70@@ -2400,50 +2399,25 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
71 }
72 ioc->chains_needed_per_io = chains_needed_per_io;
73
74- /* reply free queue sizing - taking into account for events */
75- num_of_reply_frames = ioc->hba_queue_depth + 32;
76-
77- /* number of replies frames can't be a multiple of 16 */
78- /* decrease number of reply frames by 1 */
79- if (!(num_of_reply_frames % 16))
80- num_of_reply_frames--;
81-
82- /* calculate number of reply free queue entries
83- * (must be multiple of 16)
84- */
85-
86- /* (we know reply_free_queue_depth is not a multiple of 16) */
87- queue_size = num_of_reply_frames;
88- queue_size += 16 - (queue_size % 16);
89- ioc->reply_free_queue_depth = queue_size;
90-
91- /* reply descriptor post queue sizing */
92- /* this size should be the number of request frames + number of reply
93- * frames
94- */
95-
96- queue_size = ioc->hba_queue_depth + num_of_reply_frames + 1;
97- /* round up to 16 byte boundary */
98- if (queue_size % 16)
99- queue_size += 16 - (queue_size % 16);
100-
101- /* check against IOC maximum reply post queue depth */
102- if (queue_size > facts->MaxReplyDescriptorPostQueueDepth) {
103- queue_diff = queue_size -
104- facts->MaxReplyDescriptorPostQueueDepth;
105+ /* reply free queue sizing - taking into account for 64 FW events */
106+ ioc->reply_free_queue_depth = ioc->hba_queue_depth + 64;
107
108- /* round queue_diff up to multiple of 16 */
109- if (queue_diff % 16)
110- queue_diff += 16 - (queue_diff % 16);
111-
112- /* adjust hba_queue_depth, reply_free_queue_depth,
113- * and queue_size
114- */
115- ioc->hba_queue_depth -= (queue_diff / 2);
116- ioc->reply_free_queue_depth -= (queue_diff / 2);
117- queue_size = facts->MaxReplyDescriptorPostQueueDepth;
118+ /* align the reply post queue on the next 16 count boundary */
119+ if (!ioc->reply_free_queue_depth % 16)
120+ ioc->reply_post_queue_depth = ioc->reply_free_queue_depth + 16;
121+ else
122+ ioc->reply_post_queue_depth = ioc->reply_free_queue_depth +
123+ 32 - (ioc->reply_free_queue_depth % 16);
124+ if (ioc->reply_post_queue_depth >
125+ facts->MaxReplyDescriptorPostQueueDepth) {
126+ ioc->reply_post_queue_depth = min_t(u16,
127+ (facts->MaxReplyDescriptorPostQueueDepth -
128+ (facts->MaxReplyDescriptorPostQueueDepth % 16)),
129+ (ioc->hba_queue_depth - (ioc->hba_queue_depth % 16)));
130+ ioc->reply_free_queue_depth = ioc->reply_post_queue_depth - 16;
131+ ioc->hba_queue_depth = ioc->reply_free_queue_depth - 64;
132 }
133- ioc->reply_post_queue_depth = queue_size;
134+
135
136 dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "scatter gather: "
137 "sge_in_main_msg(%d), sge_per_chain(%d), sge_per_io(%d), "
138@@ -2529,15 +2503,12 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
139 "depth(%d)\n", ioc->name, ioc->request,
140 ioc->scsiio_depth));
141
142- /* loop till the allocation succeeds */
143- do {
144- sz = ioc->chain_depth * sizeof(struct chain_tracker);
145- ioc->chain_pages = get_order(sz);
146- ioc->chain_lookup = (struct chain_tracker *)__get_free_pages(
147- GFP_KERNEL, ioc->chain_pages);
148- if (ioc->chain_lookup == NULL)
149- ioc->chain_depth -= 100;
150- } while (ioc->chain_lookup == NULL);
151+ ioc->chain_depth = min_t(u32, ioc->chain_depth, MAX_CHAIN_DEPTH);
152+ sz = ioc->chain_depth * sizeof(struct chain_tracker);
153+ ioc->chain_pages = get_order(sz);
154+
155+ ioc->chain_lookup = (struct chain_tracker *)__get_free_pages(
156+ GFP_KERNEL, ioc->chain_pages);
157 ioc->chain_dma_pool = pci_pool_create("chain pool", ioc->pdev,
158 ioc->request_sz, 16, 0);
159 if (!ioc->chain_dma_pool) {
160diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
161index 3a4f666..9bc6fb2 100644
162--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
163+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
164@@ -1007,8 +1007,8 @@ _scsih_get_chain_buffer_tracker(struct MPT2SAS_ADAPTER *ioc, u16 smid)
165 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
166 if (list_empty(&ioc->free_chain_list)) {
167 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);
168- printk(MPT2SAS_WARN_FMT "chain buffers not available\n",
169- ioc->name);
170+ dfailprintk(ioc, printk(MPT2SAS_WARN_FMT "chain buffers not "
171+ "available\n", ioc->name));
172 return NULL;
173 }
174 chain_req = list_entry(ioc->free_chain_list.next,
175--
1761.7.7.4
177
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch
new file mode 100644
index 00000000..fcf777c3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch
@@ -0,0 +1,78 @@
1From fbefcde91f27d0a80ebe70c0b3359b2e6c463cc0 Mon Sep 17 00:00:00 2001
2From: Ian Campbell <Ian.Campbell@citrix.com>
3Date: Wed, 4 Jan 2012 09:34:49 +0000
4Subject: [PATCH 038/130] xen/xenbus: Reject replies with payload >
5 XENSTORE_PAYLOAD_MAX.
6
7commit 9e7860cee18241633eddb36a4c34c7b61d8cecbc upstream.
8
9Haogang Chen found out that:
10
11 There is a potential integer overflow in process_msg() that could result
12 in cross-domain attack.
13
14 body = kmalloc(msg->hdr.len + 1, GFP_NOIO | __GFP_HIGH);
15
16 When a malicious guest passes 0xffffffff in msg->hdr.len, the subsequent
17 call to xb_read() would write to a zero-length buffer.
18
19 The other end of this connection is always the xenstore backend daemon
20 so there is no guest (malicious or otherwise) which can do this. The
21 xenstore daemon is a trusted component in the system.
22
23 However this seem like a reasonable robustness improvement so we should
24 have it.
25
26And Ian when read the API docs found that:
27 The payload length (len field of the header) is limited to 4096
28 (XENSTORE_PAYLOAD_MAX) in both directions. If a client exceeds the
29 limit, its xenstored connection will be immediately killed by
30 xenstored, which is usually catastrophic from the client's point of
31 view. Clients (particularly domains, which cannot just reconnect)
32 should avoid this.
33
34so this patch checks against that instead.
35
36This also avoids a potential integer overflow pointed out by Haogang Chen.
37
38Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
39Cc: Haogang Chen <haogangchen@gmail.com>
40Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
41Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
42---
43 drivers/xen/xenbus/xenbus_xs.c | 6 ++++++
44 include/xen/interface/io/xs_wire.h | 3 +++
45 2 files changed, 9 insertions(+), 0 deletions(-)
46
47diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
48index ede860f..a580b17 100644
49--- a/drivers/xen/xenbus/xenbus_xs.c
50+++ b/drivers/xen/xenbus/xenbus_xs.c
51@@ -801,6 +801,12 @@ static int process_msg(void)
52 goto out;
53 }
54
55+ if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) {
56+ kfree(msg);
57+ err = -EINVAL;
58+ goto out;
59+ }
60+
61 body = kmalloc(msg->hdr.len + 1, GFP_NOIO | __GFP_HIGH);
62 if (body == NULL) {
63 kfree(msg);
64diff --git a/include/xen/interface/io/xs_wire.h b/include/xen/interface/io/xs_wire.h
65index f6f07aa..7cdfca2 100644
66--- a/include/xen/interface/io/xs_wire.h
67+++ b/include/xen/interface/io/xs_wire.h
68@@ -87,4 +87,7 @@ struct xenstore_domain_interface {
69 XENSTORE_RING_IDX rsp_cons, rsp_prod;
70 };
71
72+/* Violating this is very bad. See docs/misc/xenstore.txt. */
73+#define XENSTORE_PAYLOAD_MAX 4096
74+
75 #endif /* _XS_WIRE_H */
76--
771.7.7.4
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch
new file mode 100644
index 00000000..99b3f128
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch
@@ -0,0 +1,56 @@
1From b08c639fb415855bbca91bff089b8bada0f4b044 Mon Sep 17 00:00:00 2001
2From: NeilBrown <neilb@suse.de>
3Date: Mon, 9 Jan 2012 01:41:51 +1100
4Subject: [PATCH 039/130] md/raid1: perform bad-block tests for WriteMostly
5 devices too.
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 307729c8bc5b5a41361af8af95906eee7552acb1 upstream.
11
12We normally try to avoid reading from write-mostly devices, but when
13we do we really have to check for bad blocks and be sure not to
14try reading them.
15
16With the current code, best_good_sectors might not get set and that
17causes zero-length read requests to be send down which is very
18confusing.
19
20This bug was introduced in commit d2eb35acfdccbe2 and so the patch
21is suitable for 3.1.x and 3.2.x
22
23Reported-and-tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
24Reported-and-tested-by: Art -kwaak- van Breemen <ard@telegraafnet.nl>
25Signed-off-by: NeilBrown <neilb@suse.de>
26Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
27---
28 drivers/md/raid1.c | 11 ++++++++++-
29 1 files changed, 10 insertions(+), 1 deletions(-)
30
31diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
32index ede2461..7d9e071 100644
33--- a/drivers/md/raid1.c
34+++ b/drivers/md/raid1.c
35@@ -525,8 +525,17 @@ static int read_balance(struct r1conf *conf, struct r1bio *r1_bio, int *max_sect
36 if (test_bit(WriteMostly, &rdev->flags)) {
37 /* Don't balance among write-mostly, just
38 * use the first as a last resort */
39- if (best_disk < 0)
40+ if (best_disk < 0) {
41+ if (is_badblock(rdev, this_sector, sectors,
42+ &first_bad, &bad_sectors)) {
43+ if (first_bad < this_sector)
44+ /* Cannot use this */
45+ continue;
46+ best_good_sectors = first_bad - this_sector;
47+ } else
48+ best_good_sectors = sectors;
49 best_disk = disk;
50+ }
51 continue;
52 }
53 /* This is a reasonable device to use. It might
54--
551.7.7.4
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0040-ima-free-duplicate-measurement-memory.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0040-ima-free-duplicate-measurement-memory.patch
new file mode 100644
index 00000000..40457fab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0040-ima-free-duplicate-measurement-memory.patch
@@ -0,0 +1,52 @@
1From 52e6ae83dbb962de0a33d2cd1b610cdfd0a09b0d Mon Sep 17 00:00:00 2001
2From: Roberto Sassu <roberto.sassu@polito.it>
3Date: Mon, 19 Dec 2011 15:57:27 +0100
4Subject: [PATCH 040/130] ima: free duplicate measurement memory
5
6commit 45fae7493970d7c45626ccd96d4a74f5f1eea5a9 upstream.
7
8Info about new measurements are cached in the iint for performance. When
9the inode is flushed from cache, the associated iint is flushed as well.
10Subsequent access to the inode will cause the inode to be re-measured and
11will attempt to add a duplicate entry to the measurement list.
12
13This patch frees the duplicate measurement memory, fixing a memory leak.
14
15Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
16Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 security/integrity/ima/ima_api.c | 4 ++--
20 security/integrity/ima/ima_queue.c | 1 +
21 2 files changed, 3 insertions(+), 2 deletions(-)
22
23diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
24index 0d50df0..88a2788 100644
25--- a/security/integrity/ima/ima_api.c
26+++ b/security/integrity/ima/ima_api.c
27@@ -178,8 +178,8 @@ void ima_store_measurement(struct integrity_iint_cache *iint,
28 strncpy(entry->template.file_name, filename, IMA_EVENT_NAME_LEN_MAX);
29
30 result = ima_store_template(entry, violation, inode);
31- if (!result)
32+ if (!result || result == -EEXIST)
33 iint->flags |= IMA_MEASURED;
34- else
35+ if (result < 0)
36 kfree(entry);
37 }
38diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
39index 8e28f04..e1a5062 100644
40--- a/security/integrity/ima/ima_queue.c
41+++ b/security/integrity/ima/ima_queue.c
42@@ -114,6 +114,7 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation,
43 memcpy(digest, entry->digest, sizeof digest);
44 if (ima_lookup_digest_entry(digest)) {
45 audit_cause = "hash_exists";
46+ result = -EEXIST;
47 goto out;
48 }
49 }
50--
511.7.7.4
52
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0041-ima-fix-invalid-memory-reference.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0041-ima-fix-invalid-memory-reference.patch
new file mode 100644
index 00000000..66139b9f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0041-ima-fix-invalid-memory-reference.patch
@@ -0,0 +1,68 @@
1From b5be4dc54cfe7c5bb0ce387519c2019d9915435e Mon Sep 17 00:00:00 2001
2From: Roberto Sassu <roberto.sassu@polito.it>
3Date: Mon, 19 Dec 2011 15:57:28 +0100
4Subject: [PATCH 041/130] ima: fix invalid memory reference
5
6commit 7b7e5916aa2f46e57f8bd8cb89c34620ebfda5da upstream.
7
8Don't free a valid measurement entry on TPM PCR extend failure.
9
10Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
11Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13---
14 security/integrity/ima/ima_queue.c | 16 +++++++++++-----
15 1 files changed, 11 insertions(+), 5 deletions(-)
16
17diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
18index e1a5062..55a6271 100644
19--- a/security/integrity/ima/ima_queue.c
20+++ b/security/integrity/ima/ima_queue.c
21@@ -23,6 +23,8 @@
22 #include <linux/slab.h>
23 #include "ima.h"
24
25+#define AUDIT_CAUSE_LEN_MAX 32
26+
27 LIST_HEAD(ima_measurements); /* list of all measurements */
28
29 /* key: inode (before secure-hashing a file) */
30@@ -94,7 +96,8 @@ static int ima_pcr_extend(const u8 *hash)
31
32 result = tpm_pcr_extend(TPM_ANY_NUM, CONFIG_IMA_MEASURE_PCR_IDX, hash);
33 if (result != 0)
34- pr_err("IMA: Error Communicating to TPM chip\n");
35+ pr_err("IMA: Error Communicating to TPM chip, result: %d\n",
36+ result);
37 return result;
38 }
39
40@@ -106,8 +109,9 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation,
41 {
42 u8 digest[IMA_DIGEST_SIZE];
43 const char *audit_cause = "hash_added";
44+ char tpm_audit_cause[AUDIT_CAUSE_LEN_MAX];
45 int audit_info = 1;
46- int result = 0;
47+ int result = 0, tpmresult = 0;
48
49 mutex_lock(&ima_extend_list_mutex);
50 if (!violation) {
51@@ -129,9 +133,11 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation,
52 if (violation) /* invalidate pcr */
53 memset(digest, 0xff, sizeof digest);
54
55- result = ima_pcr_extend(digest);
56- if (result != 0) {
57- audit_cause = "TPM error";
58+ tpmresult = ima_pcr_extend(digest);
59+ if (tpmresult != 0) {
60+ snprintf(tpm_audit_cause, AUDIT_CAUSE_LEN_MAX, "TPM_error(%d)",
61+ tpmresult);
62+ audit_cause = tpm_audit_cause;
63 audit_info = 0;
64 }
65 out:
66--
671.7.7.4
68
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch
new file mode 100644
index 00000000..87a49aea
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch
@@ -0,0 +1,47 @@
1From c25b1c3dffca9191001f97e64c9be8e1ff861c0a Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Tue, 13 Dec 2011 04:57:06 +0100
4Subject: [PATCH 042/130] slub: fix a possible memleak in __slab_alloc()
5
6commit 73736e0387ba0e6d2b703407b4d26168d31516a7 upstream.
7
8Zhihua Che reported a possible memleak in slub allocator on
9CONFIG_PREEMPT=y builds.
10
11It is possible current thread migrates right before disabling irqs in
12__slab_alloc(). We must check again c->freelist, and perform a normal
13allocation instead of scratching c->freelist.
14
15Many thanks to Zhihua Che for spotting this bug, introduced in 2.6.39
16
17V2: Its also possible an IRQ freed one (or several) object(s) and
18populated c->freelist, so its not a CONFIG_PREEMPT only problem.
19
20Reported-by: Zhihua Che <zhihua.che@gmail.com>
21Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
22Acked-by: Christoph Lameter <cl@linux.com>
23Signed-off-by: Pekka Enberg <penberg@kernel.org>
24Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
25---
26 mm/slub.c | 5 +++++
27 1 files changed, 5 insertions(+), 0 deletions(-)
28
29diff --git a/mm/slub.c b/mm/slub.c
30index ed3334d..1a919f0 100644
31--- a/mm/slub.c
32+++ b/mm/slub.c
33@@ -2166,6 +2166,11 @@ redo:
34 goto new_slab;
35 }
36
37+ /* must check again c->freelist in case of cpu migration or IRQ */
38+ object = c->freelist;
39+ if (object)
40+ goto load_freelist;
41+
42 stat(s, ALLOC_SLOWPATH);
43
44 do {
45--
461.7.7.4
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch
new file mode 100644
index 00000000..d539c663
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch
@@ -0,0 +1,101 @@
1From c450bfbe6e0d5b7feb3c7570c2f22c4a8da7ca44 Mon Sep 17 00:00:00 2001
2From: Bjorn Helgaas <bhelgaas@google.com>
3Date: Thu, 5 Jan 2012 14:27:24 -0700
4Subject: [PATCH 043/130] PNP: work around Dell 1536/1546 BIOS MMCONFIG bug
5 that breaks USB
6
7commit eb31aae8cb5eb54e234ed2d857ddac868195d911 upstream.
8
9Some Dell BIOSes have MCFG tables that don't report the entire
10MMCONFIG area claimed by the chipset. If we move PCI devices into
11that claimed-but-unreported area, they don't work.
12
13This quirk reads the AMD MMCONFIG MSRs and adds PNP0C01 resources as
14needed to cover the entire area.
15
16Example problem scenario:
17
18 BIOS-e820: 00000000cfec5400 - 00000000d4000000 (reserved)
19 Fam 10h mmconf [d0000000, dfffffff]
20 PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xd0000000-0xd3ffffff] (base 0xd0000000)
21 pnp 00:0c: [mem 0xd0000000-0xd3ffffff]
22 pci 0000:00:12.0: reg 10: [mem 0xffb00000-0xffb00fff]
23 pci 0000:00:12.0: no compatible bridge window for [mem 0xffb00000-0xffb00fff]
24 pci 0000:00:12.0: BAR 0: assigned [mem 0xd4000000-0xd40000ff]
25
26Reported-by: Lisa Salimbas <lisa.salimbas@canonical.com>
27Reported-by: <thuban@singularity.fr>
28Tested-by: dann frazier <dann.frazier@canonical.com>
29References: https://bugzilla.kernel.org/show_bug.cgi?id=31602
30References: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/647043
31References: https://bugzilla.redhat.com/show_bug.cgi?id=770308
32Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
33Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
34Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
35---
36 drivers/pnp/quirks.c | 42 ++++++++++++++++++++++++++++++++++++++++++
37 1 files changed, 42 insertions(+), 0 deletions(-)
38
39diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
40index dfbd5a6..258fef2 100644
41--- a/drivers/pnp/quirks.c
42+++ b/drivers/pnp/quirks.c
43@@ -295,6 +295,45 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
44 }
45 }
46
47+#ifdef CONFIG_AMD_NB
48+
49+#include <asm/amd_nb.h>
50+
51+static void quirk_amd_mmconfig_area(struct pnp_dev *dev)
52+{
53+ resource_size_t start, end;
54+ struct pnp_resource *pnp_res;
55+ struct resource *res;
56+ struct resource mmconfig_res, *mmconfig;
57+
58+ mmconfig = amd_get_mmconfig_range(&mmconfig_res);
59+ if (!mmconfig)
60+ return;
61+
62+ list_for_each_entry(pnp_res, &dev->resources, list) {
63+ res = &pnp_res->res;
64+ if (res->end < mmconfig->start || res->start > mmconfig->end ||
65+ (res->start == mmconfig->start && res->end == mmconfig->end))
66+ continue;
67+
68+ dev_info(&dev->dev, FW_BUG
69+ "%pR covers only part of AMD MMCONFIG area %pR; adding more reservations\n",
70+ res, mmconfig);
71+ if (mmconfig->start < res->start) {
72+ start = mmconfig->start;
73+ end = res->start - 1;
74+ pnp_add_mem_resource(dev, start, end, 0);
75+ }
76+ if (mmconfig->end > res->end) {
77+ start = res->end + 1;
78+ end = mmconfig->end;
79+ pnp_add_mem_resource(dev, start, end, 0);
80+ }
81+ break;
82+ }
83+}
84+#endif
85+
86 /*
87 * PnP Quirks
88 * Cards or devices that need some tweaking due to incomplete resource info
89@@ -322,6 +361,9 @@ static struct pnp_fixup pnp_fixups[] = {
90 /* PnP resources that might overlap PCI BARs */
91 {"PNP0c01", quirk_system_pci_resources},
92 {"PNP0c02", quirk_system_pci_resources},
93+#ifdef CONFIG_AMD_NB
94+ {"PNP0c01", quirk_amd_mmconfig_area},
95+#endif
96 {""}
97 };
98
99--
1001.7.7.4
101
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch
new file mode 100644
index 00000000..88c44190
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch
@@ -0,0 +1,45 @@
1From 95bb58957d5f4db07339eb5c6c87345ec877a3b6 Mon Sep 17 00:00:00 2001
2From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
3Date: Tue, 10 Jan 2012 06:40:23 +0000
4Subject: [PATCH 044/130] asix: fix setting custom MAC address on Asix 88178
5 devices
6
7commit 71bc5d94061516c4e70303570128797bcf768b10 upstream.
8
9In kernel v3.2 initialization sequence for Asix 88178 devices was changed so
10that hardware is reseted on every time interface is brought up (ifconfig up),
11instead just at USB probe time. This causes problem with setting custom MAC
12address to device as ax88178_reset causes reload of MAC address from EEPROM.
13
14This patch fixes the issue by rewriting MAC address at end of ax88178_reset.
15
16Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
17Acked-by: Grant Grundler <grundler@chromium.org>
18Cc: Allan Chou <allan@asix.com.tw>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21---
22 drivers/net/usb/asix.c | 7 +++++++
23 1 files changed, 7 insertions(+), 0 deletions(-)
24
25diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
26index dd2625a..b495821 100644
27--- a/drivers/net/usb/asix.c
28+++ b/drivers/net/usb/asix.c
29@@ -1316,6 +1316,13 @@ static int ax88178_reset(struct usbnet *dev)
30 if (ret < 0)
31 return ret;
32
33+ /* Rewrite MAC address */
34+ memcpy(data->mac_addr, dev->net->dev_addr, ETH_ALEN);
35+ ret = asix_write_cmd(dev, AX_CMD_WRITE_NODE_ID, 0, 0, ETH_ALEN,
36+ data->mac_addr);
37+ if (ret < 0)
38+ return ret;
39+
40 ret = asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL);
41 if (ret < 0)
42 return ret;
43--
441.7.7.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch
new file mode 100644
index 00000000..05e15122
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch
@@ -0,0 +1,53 @@
1From 25a43c8a8f51501928b5d209ab3880ecd5b180fe Mon Sep 17 00:00:00 2001
2From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
3Date: Tue, 10 Jan 2012 06:40:17 +0000
4Subject: [PATCH 045/130] asix: fix setting custom MAC address on Asix 88772
5 devices
6
7commit 8ef66bdc4bda6aac2dae73b84d79dc8c2db33637 upstream.
8
9In kernel v3.2 initialization sequence for Asix 88772 devices was changed so
10that hardware is reseted on every time interface is brought up (ifconfig up),
11instead just at USB probe time. This causes problem with setting custom MAC
12address to device as ax88772_reset causes reload of MAC address from EEPROM.
13
14This patch fixes the issue by rewriting MAC address at end of ax88772_reset.
15
16Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
17Acked-by: Grant Grundler <grundler@chromium.org>
18Cc: Allan Chou <allan@asix.com.tw>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21---
22 drivers/net/usb/asix.c | 8 ++++++++
23 1 files changed, 8 insertions(+), 0 deletions(-)
24
25diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
26index b495821..f5e063a 100644
27--- a/drivers/net/usb/asix.c
28+++ b/drivers/net/usb/asix.c
29@@ -974,6 +974,7 @@ static int ax88772_link_reset(struct usbnet *dev)
30
31 static int ax88772_reset(struct usbnet *dev)
32 {
33+ struct asix_data *data = (struct asix_data *)&dev->data;
34 int ret, embd_phy;
35 u16 rx_ctl;
36
37@@ -1051,6 +1052,13 @@ static int ax88772_reset(struct usbnet *dev)
38 goto out;
39 }
40
41+ /* Rewrite MAC address */
42+ memcpy(data->mac_addr, dev->net->dev_addr, ETH_ALEN);
43+ ret = asix_write_cmd(dev, AX_CMD_WRITE_NODE_ID, 0, 0, ETH_ALEN,
44+ data->mac_addr);
45+ if (ret < 0)
46+ goto out;
47+
48 /* Set RX_CTL to default values with 2k buffer, and enable cactus */
49 ret = asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL);
50 if (ret < 0)
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch
new file mode 100644
index 00000000..04a4c7ec
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch
@@ -0,0 +1,54 @@
1From 56d30a3ff947d9e4be88a6083eb257bffb7d059e Mon Sep 17 00:00:00 2001
2From: Fabio Estevam <festevam@gmail.com>
3Date: Thu, 12 Jan 2012 17:20:20 -0800
4Subject: [PATCH 046/130] include/linux/crash_dump.h needs elf.h
5
6commit 1f536b9e9f85456df93614b3c2f6a1a2b7d7cb9b upstream.
7
8Building an ARM target we get the following warnings:
9
10 CC arch/arm/kernel/setup.o
11 In file included from arch/arm/kernel/setup.c:39:
12 arch/arm/include/asm/elf.h:102:1: warning: "vmcore_elf64_check_arch" redefined
13 In file included from arch/arm/kernel/setup.c:24:
14 include/linux/crash_dump.h:30:1: warning: this is the location of the previous definition
15
16Quoting Russell King:
17
18"linux/crash_dump.h makes no attempt to include asm/elf.h, but it depends
19on stuff in asm/elf.h to determine how stuff inside this file is defined
20at parse time.
21
22So, if asm/elf.h is included after linux/crash_dump.h or not at all, you
23get a different result from the situation where asm/elf.h is included
24before."
25
26So add elf.h header to crash_dump.h to avoid this problem.
27
28The original discussion about this can be found at:
29http://www.spinics.net/lists/arm-kernel/msg154113.html
30
31Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
32Cc: Russell King <rmk@arm.linux.org.uk>
33Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
34Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
35Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
36---
37 include/linux/crash_dump.h | 1 +
38 1 files changed, 1 insertions(+), 0 deletions(-)
39
40diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
41index 5c4abce..b936763 100644
42--- a/include/linux/crash_dump.h
43+++ b/include/linux/crash_dump.h
44@@ -5,6 +5,7 @@
45 #include <linux/kexec.h>
46 #include <linux/device.h>
47 #include <linux/proc_fs.h>
48+#include <linux/elf.h>
49
50 #define ELFCORE_ADDR_MAX (-1ULL)
51 #define ELFCORE_ADDR_ERR (-2ULL)
52--
531.7.7.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch
new file mode 100644
index 00000000..ed8e772b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch
@@ -0,0 +1,44 @@
1From 5b48b119d0d1a2331b6368b4be7e3c1406cbda40 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Wed, 4 Jan 2012 20:50:47 -0600
4Subject: [PATCH 047/130] rtl8192se: Fix BUG caused by failure to check skb
5 allocation
6
7commit d90db4b12bc1b9b8a787ef28550fdb767ee25a49 upstream.
8
9When downloading firmware into the device, the driver fails to check the
10return when allocating an skb. When the allocation fails, a BUG can be
11generated, as seen in https://bugzilla.redhat.com/show_bug.cgi?id=771656.
12
13Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
14Signed-off-by: John W. Linville <linville@tuxdriver.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/net/wireless/rtlwifi/rtl8192se/fw.c | 4 ++++
18 1 files changed, 4 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/fw.c b/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
21index 6f91a14..3fda6b1 100644
22--- a/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
23+++ b/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
24@@ -196,6 +196,8 @@ static bool _rtl92s_firmware_downloadcode(struct ieee80211_hw *hw,
25 /* Allocate skb buffer to contain firmware */
26 /* info and tx descriptor info. */
27 skb = dev_alloc_skb(frag_length);
28+ if (!skb)
29+ return false;
30 skb_reserve(skb, extra_descoffset);
31 seg_ptr = (u8 *)skb_put(skb, (u32)(frag_length -
32 extra_descoffset));
33@@ -573,6 +575,8 @@ static bool _rtl92s_firmware_set_h2c_cmd(struct ieee80211_hw *hw, u8 h2c_cmd,
34
35 len = _rtl92s_get_h2c_cmdlen(MAX_TRANSMIT_BUFFER_SIZE, 1, &cmd_len);
36 skb = dev_alloc_skb(len);
37+ if (!skb)
38+ return false;
39 cb_desc = (struct rtl_tcb_desc *)(skb->cb);
40 cb_desc->queue_index = TXCMD_QUEUE;
41 cb_desc->cmd_or_init = DESC_PACKET_TYPE_NORMAL;
42--
431.7.7.4
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch
new file mode 100644
index 00000000..1efb1c27
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch
@@ -0,0 +1,52 @@
1From 70f755e08b2df34528ff568bcbe2b856ddd769e1 Mon Sep 17 00:00:00 2001
2From: Stanislaw Gruszka <sgruszka@redhat.com>
3Date: Wed, 11 Jan 2012 09:26:54 +0100
4Subject: [PATCH 048/130] mac80211: fix rx->key NULL pointer dereference in
5 promiscuous mode
6
7commit 1140afa862842ac3e56678693050760edc4ecde9 upstream.
8
9Since:
10
11commit 816c04fe7ef01dd9649f5ccfe796474db8708be5
12Author: Christian Lamparter <chunkeey@googlemail.com>
13Date: Sat Apr 30 15:24:30 2011 +0200
14
15 mac80211: consolidate MIC failure report handling
16
17is possible to that we dereference rx->key == NULL when driver set
18RX_FLAG_MMIC_STRIPPED and not RX_FLAG_IV_STRIPPED and we are in
19promiscuous mode. This happen with rt73usb and rt61pci at least.
20
21Before the commit we always check rx->key against NULL, so I assume
22fix should be done in mac80211 (also mic_fail path has similar check).
23
24References:
25https://bugzilla.redhat.com/show_bug.cgi?id=769766
26http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2012-January/004395.html
27
28Reported-by: Stuart D Gathman <stuart@gathman.org>
29Reported-by: Kai Wohlfahrt <kai.scorpio@gmail.com>
30Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
31Signed-off-by: John W. Linville <linville@tuxdriver.com>
32Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
33---
34 net/mac80211/wpa.c | 2 +-
35 1 files changed, 1 insertions(+), 1 deletions(-)
36
37diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
38index f614ce7..28a39bb 100644
39--- a/net/mac80211/wpa.c
40+++ b/net/mac80211/wpa.c
41@@ -106,7 +106,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
42 if (status->flag & RX_FLAG_MMIC_ERROR)
43 goto mic_fail;
44
45- if (!(status->flag & RX_FLAG_IV_STRIPPED))
46+ if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key)
47 goto update_iv;
48
49 return RX_CONTINUE;
50--
511.7.7.4
52
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch
new file mode 100644
index 00000000..3fbfd6d0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch
@@ -0,0 +1,68 @@
1From 11da5d38bc749c576b8def78827c2ca82d6d6bb6 Mon Sep 17 00:00:00 2001
2From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
3Date: Mon, 9 Jan 2012 15:37:53 +0530
4Subject: [PATCH 049/130] ath9k: Fix regression in channelwidth switch at the
5 same channel
6
7commit 1a19f77f3642b8194ad9cf55548cc5d92e841766 upstream.
8
9The commit "ath9k: Fix invalid noisefloor reading due to channel update"
10preserves the current channel noisefloor readings before updating
11channel type at the same channel index. It is also updating the curchan
12pointer. As survey updation is also referring curchan pointer to fetch
13the appropriate index, which might leads to invalid memory access. This
14patch partially reverts the change and stores the noise floor history
15buffer before updating channel type w/o updating curchan.
16
17Cc: Gary Morain <gmorain@google.com>
18Cc: Paul Stewart <pstew@google.com>
19Reported-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
20Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
21Signed-off-by: John W. Linville <linville@tuxdriver.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 drivers/net/wireless/ath/ath9k/calib.c | 1 +
25 drivers/net/wireless/ath/ath9k/main.c | 8 ++------
26 2 files changed, 3 insertions(+), 6 deletions(-)
27
28diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
29index 9953881..8ddef3e 100644
30--- a/drivers/net/wireless/ath/ath9k/calib.c
31+++ b/drivers/net/wireless/ath/ath9k/calib.c
32@@ -402,6 +402,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan)
33 ah->noise = ath9k_hw_getchan_noise(ah, chan);
34 return true;
35 }
36+EXPORT_SYMBOL(ath9k_hw_getnf);
37
38 void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
39 struct ath9k_channel *chan)
40diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
41index a9c5ae7..f76a814 100644
42--- a/drivers/net/wireless/ath/ath9k/main.c
43+++ b/drivers/net/wireless/ath/ath9k/main.c
44@@ -1667,7 +1667,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
45
46 if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
47 struct ieee80211_channel *curchan = hw->conf.channel;
48- struct ath9k_channel old_chan;
49 int pos = curchan->hw_value;
50 int old_pos = -1;
51 unsigned long flags;
52@@ -1693,11 +1692,8 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
53 * Preserve the current channel values, before updating
54 * the same channel
55 */
56- if (old_pos == pos) {
57- memcpy(&old_chan, &sc->sc_ah->channels[pos],
58- sizeof(struct ath9k_channel));
59- ah->curchan = &old_chan;
60- }
61+ if (ah->curchan && (old_pos == pos))
62+ ath9k_hw_getnf(ah, ah->curchan);
63
64 ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos],
65 curchan, conf->channel_type);
66--
671.7.7.4
68
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch
new file mode 100644
index 00000000..47ee79ba
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch
@@ -0,0 +1,179 @@
1From 256d142444317960a68e5c5e7a8b41a520b62bd9 Mon Sep 17 00:00:00 2001
2From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
3Date: Thu, 12 Jan 2012 17:17:44 -0800
4Subject: [PATCH 050/130] memcg: add mem_cgroup_replace_page_cache() to fix
5 LRU issue
6
7commit ab936cbcd02072a34b60d268f94440fd5cf1970b upstream.
8
9Commit ef6a3c6311 ("mm: add replace_page_cache_page() function") added a
10function replace_page_cache_page(). This function replaces a page in the
11radix-tree with a new page. WHen doing this, memory cgroup needs to fix
12up the accounting information. memcg need to check PCG_USED bit etc.
13
14In some(many?) cases, 'newpage' is on LRU before calling
15replace_page_cache(). So, memcg's LRU accounting information should be
16fixed, too.
17
18This patch adds mem_cgroup_replace_page_cache() and removes the old hooks.
19 In that function, old pages will be unaccounted without touching
20res_counter and new page will be accounted to the memcg (of old page).
21WHen overwriting pc->mem_cgroup of newpage, take zone->lru_lock and avoid
22races with LRU handling.
23
24Background:
25 replace_page_cache_page() is called by FUSE code in its splice() handling.
26 Here, 'newpage' is replacing oldpage but this newpage is not a newly allocated
27 page and may be on LRU. LRU mis-accounting will be critical for memory cgroup
28 because rmdir() checks the whole LRU is empty and there is no account leak.
29 If a page is on the other LRU than it should be, rmdir() will fail.
30
31This bug was added in March 2011, but no bug report yet. I guess there
32are not many people who use memcg and FUSE at the same time with upstream
33kernels.
34
35The result of this bug is that admin cannot destroy a memcg because of
36account leak. So, no panic, no deadlock. And, even if an active cgroup
37exist, umount can succseed. So no problem at shutdown.
38
39Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
40Acked-by: Johannes Weiner <hannes@cmpxchg.org>
41Acked-by: Michal Hocko <mhocko@suse.cz>
42Cc: Miklos Szeredi <mszeredi@suse.cz>
43Cc: Hugh Dickins <hughd@google.com>
44Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
45Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
46Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
47---
48 include/linux/memcontrol.h | 6 ++++++
49 mm/filemap.c | 18 ++----------------
50 mm/memcontrol.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
51 3 files changed, 52 insertions(+), 16 deletions(-)
52
53diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
54index b87068a..81572af 100644
55--- a/include/linux/memcontrol.h
56+++ b/include/linux/memcontrol.h
57@@ -119,6 +119,8 @@ struct zone_reclaim_stat*
58 mem_cgroup_get_reclaim_stat_from_page(struct page *page);
59 extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
60 struct task_struct *p);
61+extern void mem_cgroup_replace_page_cache(struct page *oldpage,
62+ struct page *newpage);
63
64 #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
65 extern int do_swap_account;
66@@ -366,6 +368,10 @@ static inline
67 void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx)
68 {
69 }
70+static inline void mem_cgroup_replace_page_cache(struct page *oldpage,
71+ struct page *newpage)
72+{
73+}
74 #endif /* CONFIG_CGROUP_MEM_CONT */
75
76 #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM)
77diff --git a/mm/filemap.c b/mm/filemap.c
78index 5f0a3c9..90286a4 100644
79--- a/mm/filemap.c
80+++ b/mm/filemap.c
81@@ -393,24 +393,11 @@ EXPORT_SYMBOL(filemap_write_and_wait_range);
82 int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)
83 {
84 int error;
85- struct mem_cgroup *memcg = NULL;
86
87 VM_BUG_ON(!PageLocked(old));
88 VM_BUG_ON(!PageLocked(new));
89 VM_BUG_ON(new->mapping);
90
91- /*
92- * This is not page migration, but prepare_migration and
93- * end_migration does enough work for charge replacement.
94- *
95- * In the longer term we probably want a specialized function
96- * for moving the charge from old to new in a more efficient
97- * manner.
98- */
99- error = mem_cgroup_prepare_migration(old, new, &memcg, gfp_mask);
100- if (error)
101- return error;
102-
103 error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM);
104 if (!error) {
105 struct address_space *mapping = old->mapping;
106@@ -432,13 +419,12 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)
107 if (PageSwapBacked(new))
108 __inc_zone_page_state(new, NR_SHMEM);
109 spin_unlock_irq(&mapping->tree_lock);
110+ /* mem_cgroup codes must not be called under tree_lock */
111+ mem_cgroup_replace_page_cache(old, new);
112 radix_tree_preload_end();
113 if (freepage)
114 freepage(old);
115 page_cache_release(old);
116- mem_cgroup_end_migration(memcg, old, new, true);
117- } else {
118- mem_cgroup_end_migration(memcg, old, new, false);
119 }
120
121 return error;
122diff --git a/mm/memcontrol.c b/mm/memcontrol.c
123index b63f5f7..f538e9b 100644
124--- a/mm/memcontrol.c
125+++ b/mm/memcontrol.c
126@@ -3366,6 +3366,50 @@ void mem_cgroup_end_migration(struct mem_cgroup *memcg,
127 cgroup_release_and_wakeup_rmdir(&memcg->css);
128 }
129
130+/*
131+ * At replace page cache, newpage is not under any memcg but it's on
132+ * LRU. So, this function doesn't touch res_counter but handles LRU
133+ * in correct way. Both pages are locked so we cannot race with uncharge.
134+ */
135+void mem_cgroup_replace_page_cache(struct page *oldpage,
136+ struct page *newpage)
137+{
138+ struct mem_cgroup *memcg;
139+ struct page_cgroup *pc;
140+ struct zone *zone;
141+ enum charge_type type = MEM_CGROUP_CHARGE_TYPE_CACHE;
142+ unsigned long flags;
143+
144+ if (mem_cgroup_disabled())
145+ return;
146+
147+ pc = lookup_page_cgroup(oldpage);
148+ /* fix accounting on old pages */
149+ lock_page_cgroup(pc);
150+ memcg = pc->mem_cgroup;
151+ mem_cgroup_charge_statistics(memcg, PageCgroupCache(pc), -1);
152+ ClearPageCgroupUsed(pc);
153+ unlock_page_cgroup(pc);
154+
155+ if (PageSwapBacked(oldpage))
156+ type = MEM_CGROUP_CHARGE_TYPE_SHMEM;
157+
158+ zone = page_zone(newpage);
159+ pc = lookup_page_cgroup(newpage);
160+ /*
161+ * Even if newpage->mapping was NULL before starting replacement,
162+ * the newpage may be on LRU(or pagevec for LRU) already. We lock
163+ * LRU while we overwrite pc->mem_cgroup.
164+ */
165+ spin_lock_irqsave(&zone->lru_lock, flags);
166+ if (PageLRU(newpage))
167+ del_page_from_lru_list(zone, newpage, page_lru(newpage));
168+ __mem_cgroup_commit_charge(memcg, newpage, 1, pc, type);
169+ if (PageLRU(newpage))
170+ add_page_to_lru_list(zone, newpage, page_lru(newpage));
171+ spin_unlock_irqrestore(&zone->lru_lock, flags);
172+}
173+
174 #ifdef CONFIG_DEBUG_VM
175 static struct page_cgroup *lookup_page_cgroup_used(struct page *page)
176 {
177--
1781.7.7.4
179
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0051-x86-Fix-mmap-random-address-range.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0051-x86-Fix-mmap-random-address-range.patch
new file mode 100644
index 00000000..828090b1
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0051-x86-Fix-mmap-random-address-range.patch
@@ -0,0 +1,47 @@
1From 706ade85b9f24b43d5e2b456b2eaf5acf4708fa7 Mon Sep 17 00:00:00 2001
2From: Ludwig Nussel <ludwig.nussel@suse.de>
3Date: Tue, 15 Nov 2011 14:46:46 -0800
4Subject: [PATCH 051/130] x86: Fix mmap random address range
5
6commit 9af0c7a6fa860698d080481f24a342ba74b68982 upstream.
7
8On x86_32 casting the unsigned int result of get_random_int() to
9long may result in a negative value. On x86_32 the range of
10mmap_rnd() therefore was -255 to 255. The 32bit mode on x86_64
11used 0 to 255 as intended.
12
13The bug was introduced by 675a081 ("x86: unify mmap_{32|64}.c")
14in January 2008.
15
16Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
17Cc: Linus Torvalds <torvalds@linux-foundation.org>
18Cc: harvey.harrison@gmail.com
19Cc: "H. Peter Anvin" <hpa@zytor.com>
20Cc: Harvey Harrison <harvey.harrison@gmail.com>
21Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
22Link: http://lkml.kernel.org/r/201111152246.pAFMklOB028527@wpaz5.hot.corp.google.com
23Signed-off-by: Ingo Molnar <mingo@elte.hu>
24Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
25---
26 arch/x86/mm/mmap.c | 4 ++--
27 1 files changed, 2 insertions(+), 2 deletions(-)
28
29diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
30index 4b5ba85..845df68 100644
31--- a/arch/x86/mm/mmap.c
32+++ b/arch/x86/mm/mmap.c
33@@ -75,9 +75,9 @@ static unsigned long mmap_rnd(void)
34 */
35 if (current->flags & PF_RANDOMIZE) {
36 if (mmap_is_ia32())
37- rnd = (long)get_random_int() % (1<<8);
38+ rnd = get_random_int() % (1<<8);
39 else
40- rnd = (long)(get_random_int() % (1<<28));
41+ rnd = get_random_int() % (1<<28);
42 }
43 return rnd << PAGE_SHIFT;
44 }
45--
461.7.7.4
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0052-UBI-fix-nameless-volumes-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0052-UBI-fix-nameless-volumes-handling.patch
new file mode 100644
index 00000000..ac5f8a8e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0052-UBI-fix-nameless-volumes-handling.patch
@@ -0,0 +1,37 @@
1From fb25b1761ccc5ff102d6d4a8b2997437a9f1f999 Mon Sep 17 00:00:00 2001
2From: Richard Weinberger <richard@nod.at>
3Date: Fri, 13 Jan 2012 15:07:40 +0100
4Subject: [PATCH 052/130] UBI: fix nameless volumes handling
5
6commit 4a59c797a18917a5cf3ff7ade296b46134d91e6a upstream.
7
8Currently it's possible to create a volume without a name. E.g:
9ubimkvol -n 32 -s 2MiB -t static /dev/ubi0 -N ""
10
11After that vtbl_check() will always fail because it does not permit
12empty strings.
13
14Signed-off-by: Richard Weinberger <richard@nod.at>
15Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 drivers/mtd/ubi/cdev.c | 3 +++
19 1 files changed, 3 insertions(+), 0 deletions(-)
20
21diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
22index 3320a50..ad76592 100644
23--- a/drivers/mtd/ubi/cdev.c
24+++ b/drivers/mtd/ubi/cdev.c
25@@ -632,6 +632,9 @@ static int verify_mkvol_req(const struct ubi_device *ubi,
26 if (req->alignment != 1 && n)
27 goto bad;
28
29+ if (!req->name[0] || !req->name_len)
30+ goto bad;
31+
32 if (req->name_len > UBI_VOL_NAME_MAX) {
33 err = -ENAMETOOLONG;
34 goto bad;
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0053-UBI-fix-debugging-messages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0053-UBI-fix-debugging-messages.patch
new file mode 100644
index 00000000..16cccbcc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0053-UBI-fix-debugging-messages.patch
@@ -0,0 +1,42 @@
1From 5aefc74158a4193f8e1f0ee3b9af21fd76ace6ca Mon Sep 17 00:00:00 2001
2From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
3Date: Tue, 10 Jan 2012 19:32:30 +0200
4Subject: [PATCH 053/130] UBI: fix debugging messages
5
6commit 72f0d453d81d35087b1d3ad7c8285628c2be6e1d upstream.
7
8Patch ab50ff684707031ed4bad2fdd313208ae392e5bb broke UBI debugging messages:
9before that commit when UBI debugging was enabled, users saw few useful
10debugging messages after attaching an MTD device. However, that patch turned
11'dbg_msg()' into 'pr_debug()', so to enable the debugging messages users have
12to enable them first via /sys/kernel/debug/dynamic_debug/control, which is
13very impractical.
14
15This commit makes 'dbg_msg()' to use 'printk()' instead of 'pr_debug()', just
16as it was before the breakage.
17
18Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 drivers/mtd/ubi/debug.h | 5 ++++-
22 1 files changed, 4 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
25index 64fbb00..ead2cd1 100644
26--- a/drivers/mtd/ubi/debug.h
27+++ b/drivers/mtd/ubi/debug.h
28@@ -43,7 +43,10 @@
29 pr_debug("UBI DBG " type ": " fmt "\n", ##__VA_ARGS__)
30
31 /* Just a debugging messages not related to any specific UBI subsystem */
32-#define dbg_msg(fmt, ...) ubi_dbg_msg("msg", fmt, ##__VA_ARGS__)
33+#define dbg_msg(fmt, ...) \
34+ printk(KERN_DEBUG "UBI DBG (pid %d): %s: " fmt "\n", \
35+ current->pid, __func__, ##__VA_ARGS__)
36+
37 /* General debugging messages */
38 #define dbg_gen(fmt, ...) ubi_dbg_msg("gen", fmt, ##__VA_ARGS__)
39 /* Messages from the eraseblock association sub-system */
40--
411.7.7.4
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0054-UBI-make-vid_hdr-non-static.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0054-UBI-make-vid_hdr-non-static.patch
new file mode 100644
index 00000000..db26da89
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0054-UBI-make-vid_hdr-non-static.patch
@@ -0,0 +1,36 @@
1From 7435d88f019f5550cf2d481b582e17ad65b061c0 Mon Sep 17 00:00:00 2001
2From: Richard Weinberger <rw@linutronix.de>
3Date: Thu, 22 Dec 2011 16:12:57 +0100
4Subject: [PATCH 054/130] UBI: make vid_hdr non-static
5
6commit 6bdccffe8c4268d02f71873102131fb6ed37ed9a upstream.
7
8Remove 'static' modifier from the 'vid_hdr' local variable. I do not know
9how it slipped in, but this is a bug and will break UBI if someone attaches
102 UBI volumes at the same time.
11
12Artem: amended teh commit message, added -stable.
13
14Signed-off-by: Richard Weinberger <rw@linutronix.de>
15Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 drivers/mtd/ubi/vtbl.c | 2 +-
19 1 files changed, 1 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
22index 9ad18da..890754c 100644
23--- a/drivers/mtd/ubi/vtbl.c
24+++ b/drivers/mtd/ubi/vtbl.c
25@@ -306,7 +306,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si,
26 int copy, void *vtbl)
27 {
28 int err, tries = 0;
29- static struct ubi_vid_hdr *vid_hdr;
30+ struct ubi_vid_hdr *vid_hdr;
31 struct ubi_scan_leb *new_seb;
32
33 ubi_msg("create volume table (copy #%d)", copy + 1);
34--
351.7.7.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0055-UBIFS-fix-debugging-messages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0055-UBIFS-fix-debugging-messages.patch
new file mode 100644
index 00000000..a27e70f6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0055-UBIFS-fix-debugging-messages.patch
@@ -0,0 +1,41 @@
1From 1b3cf92e4f993769ceaf78263ccebc8eaf67a804 Mon Sep 17 00:00:00 2001
2From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
3Date: Tue, 10 Jan 2012 19:32:30 +0200
4Subject: [PATCH 055/130] UBIFS: fix debugging messages
5
6commit d34315da9146253351146140ea4b277193ee5e5f upstream.
7
8Patch 56e46742e846e4de167dde0e1e1071ace1c882a5 broke UBIFS debugging messages:
9before that commit when UBIFS debugging was enabled, users saw few useful
10debugging messages after mount. However, that patch turned 'dbg_msg()' into
11'pr_debug()', so to enable the debugging messages users have to enable them
12first via /sys/kernel/debug/dynamic_debug/control, which is very impractical.
13
14This commit makes 'dbg_msg()' to use 'printk()' instead of 'pr_debug()', just
15as it was before the breakage.
16
17Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 fs/ubifs/debug.h | 5 ++++-
21 1 files changed, 4 insertions(+), 1 deletions(-)
22
23diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
24index 8d9c468..3f65829 100644
25--- a/fs/ubifs/debug.h
26+++ b/fs/ubifs/debug.h
27@@ -190,7 +190,10 @@ extern spinlock_t dbg_lock;
28 } while (0)
29
30 /* Just a debugging messages not related to any specific UBIFS subsystem */
31-#define dbg_msg(fmt, ...) ubifs_dbg_msg("msg", fmt, ##__VA_ARGS__)
32+#define dbg_msg(fmt, ...) \
33+ printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", current->pid, \
34+ __func__, ##__VA_ARGS__)
35+
36 /* General messages */
37 #define dbg_gen(fmt, ...) ubifs_dbg_msg("gen", fmt, ##__VA_ARGS__)
38 /* Additional journal messages */
39--
401.7.7.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch
new file mode 100644
index 00000000..26a43247
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch
@@ -0,0 +1,57 @@
1From fd7fabbc63907ebe083460603caa1ba54bef0e80 Mon Sep 17 00:00:00 2001
2From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
3Date: Wed, 11 Jan 2012 15:13:27 +0200
4Subject: [PATCH 056/130] UBIFS: make debugging messages light again
5
6commit 1f5d78dc4823a85f112aaa2d0f17624f8c2a6c52 upstream.
7
8We switch to dynamic debugging in commit
956e46742e846e4de167dde0e1e1071ace1c882a5 but did not take into account that
10now we do not control anymore whether a specific message is enabled or not.
11So now we lock the "dbg_lock" and release it in every debugging macro, which
12make them not so light-weight.
13
14This commit removes the "dbg_lock" protection from the debugging macros to
15fix the issue.
16
17The downside is that now our DBGKEY() stuff is broken, but this is not
18critical at all and will be fixed later.
19
20Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
22---
23 fs/ubifs/debug.h | 12 +++++-------
24 1 files changed, 5 insertions(+), 7 deletions(-)
25
26diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
27index 3f65829..c9d2941 100644
28--- a/fs/ubifs/debug.h
29+++ b/fs/ubifs/debug.h
30@@ -175,19 +175,17 @@ const char *dbg_key_str1(const struct ubifs_info *c,
31 const union ubifs_key *key);
32
33 /*
34- * DBGKEY macros require @dbg_lock to be held, which it is in the dbg message
35- * macros.
36+ * TODO: these macros are now broken because there is no locking around them
37+ * and we use a global buffer for the key string. This means that in case of
38+ * concurrent execution we will end up with incorrect and messy key strings.
39 */
40 #define DBGKEY(key) dbg_key_str0(c, (key))
41 #define DBGKEY1(key) dbg_key_str1(c, (key))
42
43 extern spinlock_t dbg_lock;
44
45-#define ubifs_dbg_msg(type, fmt, ...) do { \
46- spin_lock(&dbg_lock); \
47- pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__); \
48- spin_unlock(&dbg_lock); \
49-} while (0)
50+#define ubifs_dbg_msg(type, fmt, ...) \
51+ pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__)
52
53 /* Just a debugging messages not related to any specific UBIFS subsystem */
54 #define dbg_msg(fmt, ...) \
55--
561.7.7.4
57
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch
new file mode 100644
index 00000000..6ebe7dad
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch
@@ -0,0 +1,197 @@
1From 2c28d6c10fef2ab34270bd90ce2b75207cb951ee Mon Sep 17 00:00:00 2001
2From: Jean Delvare <khali@linux-fr.org>
3Date: Thu, 12 Jan 2012 20:32:03 +0100
4Subject: [PATCH 057/130] i2c: Fix error value returned by several bus drivers
5
6commit 7c1f59c9d5caf3a84f35549b5d58f3c055a68da5 upstream.
7
8When adding checks for ACPI resource conflicts to many bus drivers,
9not enough attention was paid to the error paths, and for several
10drivers this causes 0 to be returned on error in some cases. Fix this
11by properly returning a non-zero value on every error.
12
13Signed-off-by: Jean Delvare <khali@linux-fr.org>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/i2c/busses/i2c-ali1535.c | 11 +++++++----
17 drivers/i2c/busses/i2c-nforce2.c | 2 +-
18 drivers/i2c/busses/i2c-sis5595.c | 4 ++--
19 drivers/i2c/busses/i2c-sis630.c | 6 +++++-
20 drivers/i2c/busses/i2c-viapro.c | 7 +++++--
21 5 files changed, 20 insertions(+), 10 deletions(-)
22
23diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
24index b6807db..5b667e5 100644
25--- a/drivers/i2c/busses/i2c-ali1535.c
26+++ b/drivers/i2c/busses/i2c-ali1535.c
27@@ -140,7 +140,7 @@ static unsigned short ali1535_smba;
28 defined to make the transition easier. */
29 static int __devinit ali1535_setup(struct pci_dev *dev)
30 {
31- int retval = -ENODEV;
32+ int retval;
33 unsigned char temp;
34
35 /* Check the following things:
36@@ -155,6 +155,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev)
37 if (ali1535_smba == 0) {
38 dev_warn(&dev->dev,
39 "ALI1535_smb region uninitialized - upgrade BIOS?\n");
40+ retval = -ENODEV;
41 goto exit;
42 }
43
44@@ -167,6 +168,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev)
45 ali1535_driver.name)) {
46 dev_err(&dev->dev, "ALI1535_smb region 0x%x already in use!\n",
47 ali1535_smba);
48+ retval = -EBUSY;
49 goto exit;
50 }
51
52@@ -174,6 +176,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev)
53 pci_read_config_byte(dev, SMBCFG, &temp);
54 if ((temp & ALI1535_SMBIO_EN) == 0) {
55 dev_err(&dev->dev, "SMB device not enabled - upgrade BIOS?\n");
56+ retval = -ENODEV;
57 goto exit_free;
58 }
59
60@@ -181,6 +184,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev)
61 pci_read_config_byte(dev, SMBHSTCFG, &temp);
62 if ((temp & 1) == 0) {
63 dev_err(&dev->dev, "SMBus controller not enabled - upgrade BIOS?\n");
64+ retval = -ENODEV;
65 goto exit_free;
66 }
67
68@@ -198,12 +202,11 @@ static int __devinit ali1535_setup(struct pci_dev *dev)
69 dev_dbg(&dev->dev, "SMBREV = 0x%X\n", temp);
70 dev_dbg(&dev->dev, "ALI1535_smba = 0x%X\n", ali1535_smba);
71
72- retval = 0;
73-exit:
74- return retval;
75+ return 0;
76
77 exit_free:
78 release_region(ali1535_smba, ALI1535_SMB_IOSIZE);
79+exit:
80 return retval;
81 }
82
83diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
84index ff1e127..4853b52 100644
85--- a/drivers/i2c/busses/i2c-nforce2.c
86+++ b/drivers/i2c/busses/i2c-nforce2.c
87@@ -356,7 +356,7 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar,
88 error = acpi_check_region(smbus->base, smbus->size,
89 nforce2_driver.name);
90 if (error)
91- return -1;
92+ return error;
93
94 if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) {
95 dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n",
96diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
97index 4375866..6d60284 100644
98--- a/drivers/i2c/busses/i2c-sis5595.c
99+++ b/drivers/i2c/busses/i2c-sis5595.c
100@@ -147,7 +147,7 @@ static int __devinit sis5595_setup(struct pci_dev *SIS5595_dev)
101 u16 a;
102 u8 val;
103 int *i;
104- int retval = -ENODEV;
105+ int retval;
106
107 /* Look for imposters */
108 for (i = blacklist; *i != 0; i++) {
109@@ -223,7 +223,7 @@ static int __devinit sis5595_setup(struct pci_dev *SIS5595_dev)
110
111 error:
112 release_region(sis5595_base + SMB_INDEX, 2);
113- return retval;
114+ return -ENODEV;
115 }
116
117 static int sis5595_transaction(struct i2c_adapter *adap)
118diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
119index e6f539e..b617fd0 100644
120--- a/drivers/i2c/busses/i2c-sis630.c
121+++ b/drivers/i2c/busses/i2c-sis630.c
122@@ -393,7 +393,7 @@ static int __devinit sis630_setup(struct pci_dev *sis630_dev)
123 {
124 unsigned char b;
125 struct pci_dev *dummy = NULL;
126- int retval = -ENODEV, i;
127+ int retval, i;
128
129 /* check for supported SiS devices */
130 for (i=0; supported[i] > 0 ; i++) {
131@@ -418,18 +418,21 @@ static int __devinit sis630_setup(struct pci_dev *sis630_dev)
132 */
133 if (pci_read_config_byte(sis630_dev, SIS630_BIOS_CTL_REG,&b)) {
134 dev_err(&sis630_dev->dev, "Error: Can't read bios ctl reg\n");
135+ retval = -ENODEV;
136 goto exit;
137 }
138 /* if ACPI already enabled , do nothing */
139 if (!(b & 0x80) &&
140 pci_write_config_byte(sis630_dev, SIS630_BIOS_CTL_REG, b | 0x80)) {
141 dev_err(&sis630_dev->dev, "Error: Can't enable ACPI\n");
142+ retval = -ENODEV;
143 goto exit;
144 }
145
146 /* Determine the ACPI base address */
147 if (pci_read_config_word(sis630_dev,SIS630_ACPI_BASE_REG,&acpi_base)) {
148 dev_err(&sis630_dev->dev, "Error: Can't determine ACPI base address\n");
149+ retval = -ENODEV;
150 goto exit;
151 }
152
153@@ -445,6 +448,7 @@ static int __devinit sis630_setup(struct pci_dev *sis630_dev)
154 sis630_driver.name)) {
155 dev_err(&sis630_dev->dev, "SMBus registers 0x%04x-0x%04x already "
156 "in use!\n", acpi_base + SMB_STS, acpi_base + SMB_SAA);
157+ retval = -EBUSY;
158 goto exit;
159 }
160
161diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
162index 0b012f1..58261d4 100644
163--- a/drivers/i2c/busses/i2c-viapro.c
164+++ b/drivers/i2c/busses/i2c-viapro.c
165@@ -324,7 +324,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
166 const struct pci_device_id *id)
167 {
168 unsigned char temp;
169- int error = -ENODEV;
170+ int error;
171
172 /* Determine the address of the SMBus areas */
173 if (force_addr) {
174@@ -390,6 +390,7 @@ found:
175 dev_err(&pdev->dev, "SMBUS: Error: Host SMBus "
176 "controller not enabled! - upgrade BIOS or "
177 "use force=1\n");
178+ error = -ENODEV;
179 goto release_region;
180 }
181 }
182@@ -422,9 +423,11 @@ found:
183 "SMBus Via Pro adapter at %04x", vt596_smba);
184
185 vt596_pdev = pci_dev_get(pdev);
186- if (i2c_add_adapter(&vt596_adapter)) {
187+ error = i2c_add_adapter(&vt596_adapter);
188+ if (error) {
189 pci_dev_put(vt596_pdev);
190 vt596_pdev = NULL;
191+ goto release_region;
192 }
193
194 /* Always return failure here. This is to allow other drivers to bind
195--
1961.7.7.4
197
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch
new file mode 100644
index 00000000..b164455e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch
@@ -0,0 +1,39 @@
1From ac64016ec74f6fbe586ba55f75a87e6459ba0760 Mon Sep 17 00:00:00 2001
2From: Girish K S <girish.shivananjappa@linaro.org>
3Date: Thu, 15 Dec 2011 17:27:42 +0530
4Subject: [PATCH 058/130] mmc: core: Fix voltage select in DDR mode
5
6commit 913047e9e5787a90696533a9f109552b7694ecc9 upstream.
7
8This patch fixes the wrong comparison before setting the interface
9voltage in DDR mode.
10
11The assignment to the variable ddr before comaprison is either
12ddr = MMC_1_2V_DDR_MODE; or ddr == MMC_1_8V_DDR_MODE. But the comparison
13is done with the extended csd value if ddr == EXT_CSD_CARD_TYPE_DDR_1_2V.
14
15Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
16Acked-by: Subhash Jadavani <subhashj@codeaurora.org>
17Acked-by: Philip Rakity <prakity@marvell.com>
18Signed-off-by: Chris Ball <cjb@laptop.org>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 drivers/mmc/core/mmc.c | 2 +-
22 1 files changed, 1 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
25index d240427..fb7c27f 100644
26--- a/drivers/mmc/core/mmc.c
27+++ b/drivers/mmc/core/mmc.c
28@@ -1048,7 +1048,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
29 *
30 * WARNING: eMMC rules are NOT the same as SD DDR
31 */
32- if (ddr == EXT_CSD_CARD_TYPE_DDR_1_2V) {
33+ if (ddr == MMC_1_2V_DDR_MODE) {
34 err = mmc_set_signal_voltage(host,
35 MMC_SIGNAL_VOLTAGE_120, 0);
36 if (err)
37--
381.7.7.4
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch
new file mode 100644
index 00000000..4f55423b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch
@@ -0,0 +1,39 @@
1From c1e5c579b2911ebddcdd5cbebc91edbe3a82af4d Mon Sep 17 00:00:00 2001
2From: Aaron Lu <aaron.lu@amd.com>
3Date: Wed, 28 Dec 2011 11:11:12 +0800
4Subject: [PATCH 059/130] mmc: sdhci: Fix tuning timer incorrect setting when
5 suspending host
6
7commit c6ced0db08010ed75df221a2946c5228454b38d5 upstream.
8
9When suspending host, the tuning timer shoule be deactivated.
10And the HOST_NEEDS_TUNING flag should be set after tuning timer is
11deactivated.
12
13Signed-off-by: Philip Rakity <prakity@marvell.com>
14Signed-off-by: Aaron Lu <aaron.lu@amd.com>
15Acked-by: Adrian Hunter <adrian.hunter@intel.com>
16Signed-off-by: Chris Ball <cjb@laptop.org>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 drivers/mmc/host/sdhci.c | 3 +--
20 1 files changed, 1 insertions(+), 2 deletions(-)
21
22diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
23index 19ed580..9279c1b 100644
24--- a/drivers/mmc/host/sdhci.c
25+++ b/drivers/mmc/host/sdhci.c
26@@ -2336,9 +2336,8 @@ int sdhci_suspend_host(struct sdhci_host *host)
27 /* Disable tuning since we are suspending */
28 if (host->version >= SDHCI_SPEC_300 && host->tuning_count &&
29 host->tuning_mode == SDHCI_TUNING_MODE_1) {
30+ del_timer_sync(&host->tuning_timer);
31 host->flags &= ~SDHCI_NEEDS_RETUNING;
32- mod_timer(&host->tuning_timer, jiffies +
33- host->tuning_count * HZ);
34 }
35
36 ret = mmc_suspend_host(host->mmc);
37--
381.7.7.4
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch
new file mode 100644
index 00000000..1057d857
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch
@@ -0,0 +1,38 @@
1From 2bcbb8b0e7cecfd753f470dfa9f0780f7c07e28d Mon Sep 17 00:00:00 2001
2From: Alexander Elbs <alex@segv.de>
3Date: Tue, 3 Jan 2012 23:26:53 -0500
4Subject: [PATCH 060/130] mmc: sd: Fix SDR12 timing regression
5
6commit dd8df17fe83483d7ea06ff229895e35a42071599 upstream.
7
8This patch fixes a failure to recognize SD cards reported on a Dell
9Vostro with O2 Micro SD card reader. Patch 49c468f ("mmc: sd: add
10support for uhs bus speed mode selection") caused the problem, by
11setting the SDHCI_CTRL_HISPD flag even for legacy timings.
12
13Signed-off-by: Alexander Elbs <alex@segv.de>
14Acked-by: Philip Rakity <prakity@marvell.com>
15Acked-by: Arindam Nath <arindam.nath@amd.com>
16Signed-off-by: Chris Ball <cjb@laptop.org>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 drivers/mmc/host/sdhci.c | 3 +--
20 1 files changed, 1 insertions(+), 2 deletions(-)
21
22diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
23index 9279c1b..6ce32a7 100644
24--- a/drivers/mmc/host/sdhci.c
25+++ b/drivers/mmc/host/sdhci.c
26@@ -1364,8 +1364,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
27 if ((ios->timing == MMC_TIMING_UHS_SDR50) ||
28 (ios->timing == MMC_TIMING_UHS_SDR104) ||
29 (ios->timing == MMC_TIMING_UHS_DDR50) ||
30- (ios->timing == MMC_TIMING_UHS_SDR25) ||
31- (ios->timing == MMC_TIMING_UHS_SDR12))
32+ (ios->timing == MMC_TIMING_UHS_SDR25))
33 ctrl |= SDHCI_CTRL_HISPD;
34
35 ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);
36--
371.7.7.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch
new file mode 100644
index 00000000..966eaf46
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch
@@ -0,0 +1,54 @@
1From 367f7884638cda94299eb0e38e200031a5d3130d Mon Sep 17 00:00:00 2001
2From: Dan Carpenter <dan.carpenter@oracle.com>
3Date: Thu, 5 Jan 2012 02:27:57 -0300
4Subject: [PATCH 061/130] V4L/DVB: v4l2-ioctl: integer overflow in
5 video_usercopy()
6
7commit 6c06108be53ca5e94d8b0e93883d534dd9079646 upstream.
8
9If ctrls->count is too high the multiplication could overflow and
10array_size would be lower than expected. Mauro and Hans Verkuil
11suggested that we cap it at 1024. That comes from the maximum
12number of controls with lots of room for expantion.
13
14$ grep V4L2_CID include/linux/videodev2.h | wc -l
15211
16
17Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
18Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 drivers/media/video/v4l2-ioctl.c | 4 ++++
22 include/linux/videodev2.h | 1 +
23 2 files changed, 5 insertions(+), 0 deletions(-)
24
25diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
26index e1da8fc..639abee 100644
27--- a/drivers/media/video/v4l2-ioctl.c
28+++ b/drivers/media/video/v4l2-ioctl.c
29@@ -2226,6 +2226,10 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
30 struct v4l2_ext_controls *ctrls = parg;
31
32 if (ctrls->count != 0) {
33+ if (ctrls->count > V4L2_CID_MAX_CTRLS) {
34+ ret = -EINVAL;
35+ break;
36+ }
37 *user_ptr = (void __user *)ctrls->controls;
38 *kernel_ptr = (void *)&ctrls->controls;
39 *array_size = sizeof(struct v4l2_ext_control)
40diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
41index 4b752d5..45a7698 100644
42--- a/include/linux/videodev2.h
43+++ b/include/linux/videodev2.h
44@@ -1131,6 +1131,7 @@ struct v4l2_querymenu {
45 #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000
46
47 /* User-class control IDs defined by V4L2 */
48+#define V4L2_CID_MAX_CTRLS 1024
49 #define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
50 #define V4L2_CID_USER_BASE V4L2_CID_BASE
51 /* IDs reserved for driver specific controls */
52--
531.7.7.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch
new file mode 100644
index 00000000..ce9352de
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch
@@ -0,0 +1,71 @@
1From b8292304bc243db5cc68c27e19c7c14c15e19263 Mon Sep 17 00:00:00 2001
2From: Gleb Natapov <gleb@redhat.com>
3Date: Sun, 8 Jan 2012 17:07:28 +0200
4Subject: [PATCH 062/130] Unused iocbs in a batch should not be accounted as
5 active.
6
7commit 69e4747ee9727d660b88d7e1efe0f4afcb35db1b upstream.
8
9Since commit 080d676de095 ("aio: allocate kiocbs in batches") iocbs are
10allocated in a batch during processing of first iocbs. All iocbs in a
11batch are automatically added to ctx->active_reqs list and accounted in
12ctx->reqs_active.
13
14If one (not the last one) of iocbs submitted by an user fails, further
15iocbs are not processed, but they are still present in ctx->active_reqs
16and accounted in ctx->reqs_active. This causes process to stuck in a D
17state in wait_for_all_aios() on exit since ctx->reqs_active will never
18go down to zero. Furthermore since kiocb_batch_free() frees iocb
19without removing it from active_reqs list the list become corrupted
20which may cause oops.
21
22Fix this by removing iocb from ctx->active_reqs and updating
23ctx->reqs_active in kiocb_batch_free().
24
25Signed-off-by: Gleb Natapov <gleb@redhat.com>
26Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
27Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29---
30 fs/aio.c | 11 +++++++++--
31 1 files changed, 9 insertions(+), 2 deletions(-)
32
33diff --git a/fs/aio.c b/fs/aio.c
34index 78c514c..969beb0 100644
35--- a/fs/aio.c
36+++ b/fs/aio.c
37@@ -476,14 +476,21 @@ static void kiocb_batch_init(struct kiocb_batch *batch, long total)
38 batch->count = total;
39 }
40
41-static void kiocb_batch_free(struct kiocb_batch *batch)
42+static void kiocb_batch_free(struct kioctx *ctx, struct kiocb_batch *batch)
43 {
44 struct kiocb *req, *n;
45
46+ if (list_empty(&batch->head))
47+ return;
48+
49+ spin_lock_irq(&ctx->ctx_lock);
50 list_for_each_entry_safe(req, n, &batch->head, ki_batch) {
51 list_del(&req->ki_batch);
52+ list_del(&req->ki_list);
53 kmem_cache_free(kiocb_cachep, req);
54+ ctx->reqs_active--;
55 }
56+ spin_unlock_irq(&ctx->ctx_lock);
57 }
58
59 /*
60@@ -1742,7 +1749,7 @@ long do_io_submit(aio_context_t ctx_id, long nr,
61 }
62 blk_finish_plug(&plug);
63
64- kiocb_batch_free(&batch);
65+ kiocb_batch_free(ctx, &batch);
66 put_ioctx(ctx);
67 return i ? i : ret;
68 }
69--
701.7.7.4
71
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch
new file mode 100644
index 00000000..617f4b3f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch
@@ -0,0 +1,227 @@
1From dedf47c7159cb4b5d1744557aa744145f161eac5 Mon Sep 17 00:00:00 2001
2From: Jiri Olsa <jolsa@redhat.com>
3Date: Mon, 5 Dec 2011 18:22:48 +0100
4Subject: [PATCH 063/130] ftrace: Fix unregister ftrace_ops accounting
5
6commit 30fb6aa74011dcf595f306ca2727254d708b786e upstream.
7
8Multiple users of the function tracer can register their functions
9with the ftrace_ops structure. The accounting within ftrace will
10update the counter on each function record that is being traced.
11When the ftrace_ops filtering adds or removes functions, the
12function records will be updated accordingly if the ftrace_ops is
13still registered.
14
15When a ftrace_ops is removed, the counter of the function records,
16that the ftrace_ops traces, are decremented. When they reach zero
17the functions that they represent are modified to stop calling the
18mcount code.
19
20When changes are made, the code is updated via stop_machine() with
21a command passed to the function to tell it what to do. There is an
22ENABLE and DISABLE command that tells the called function to enable
23or disable the functions. But the ENABLE is really a misnomer as it
24should just update the records, as records that have been enabled
25and now have a count of zero should be disabled.
26
27The DISABLE command is used to disable all functions regardless of
28their counter values. This is the big off switch and is not the
29complement of the ENABLE command.
30
31To make matters worse, when a ftrace_ops is unregistered and there
32is another ftrace_ops registered, neither the DISABLE nor the
33ENABLE command are set when calling into the stop_machine() function
34and the records will not be updated to match their counter. A command
35is passed to that function that will update the mcount code to call
36the registered callback directly if it is the only one left. This
37means that the ftrace_ops that is still registered will have its callback
38called by all functions that have been set for it as well as the ftrace_ops
39that was just unregistered.
40
41Here's a way to trigger this bug. Compile the kernel with
42CONFIG_FUNCTION_PROFILER set and with CONFIG_FUNCTION_GRAPH not set:
43
44 CONFIG_FUNCTION_PROFILER=y
45 # CONFIG_FUNCTION_GRAPH is not set
46
47This will force the function profiler to use the function tracer instead
48of the function graph tracer.
49
50 # cd /sys/kernel/debug/tracing
51 # echo schedule > set_ftrace_filter
52 # echo function > current_tracer
53 # cat set_ftrace_filter
54 schedule
55 # cat trace
56 # tracer: nop
57 #
58 # entries-in-buffer/entries-written: 692/68108025 #P:4
59 #
60 # _-----=> irqs-off
61 # / _----=> need-resched
62 # | / _---=> hardirq/softirq
63 # || / _--=> preempt-depth
64 # ||| / delay
65 # TASK-PID CPU# |||| TIMESTAMP FUNCTION
66 # | | | |||| | |
67 kworker/0:2-909 [000] .... 531.235574: schedule <-worker_thread
68 <idle>-0 [001] .N.. 531.235575: schedule <-cpu_idle
69 kworker/0:2-909 [000] .... 531.235597: schedule <-worker_thread
70 sshd-2563 [001] .... 531.235647: schedule <-schedule_hrtimeout_range_clock
71
72 # echo 1 > function_profile_enabled
73 # echo 0 > function_porfile_enabled
74 # cat set_ftrace_filter
75 schedule
76 # cat trace
77 # tracer: function
78 #
79 # entries-in-buffer/entries-written: 159701/118821262 #P:4
80 #
81 # _-----=> irqs-off
82 # / _----=> need-resched
83 # | / _---=> hardirq/softirq
84 # || / _--=> preempt-depth
85 # ||| / delay
86 # TASK-PID CPU# |||| TIMESTAMP FUNCTION
87 # | | | |||| | |
88 <idle>-0 [002] ...1 604.870655: local_touch_nmi <-cpu_idle
89 <idle>-0 [002] d..1 604.870655: enter_idle <-cpu_idle
90 <idle>-0 [002] d..1 604.870656: atomic_notifier_call_chain <-enter_idle
91 <idle>-0 [002] d..1 604.870656: __atomic_notifier_call_chain <-atomic_notifier_call_chain
92
93The same problem could have happened with the trace_probe_ops,
94but they are modified with the set_frace_filter file which does the
95update at closure of the file.
96
97The simple solution is to change ENABLE to UPDATE and call it every
98time an ftrace_ops is unregistered.
99
100Link: http://lkml.kernel.org/r/1323105776-26961-3-git-send-email-jolsa@redhat.com
101
102Signed-off-by: Jiri Olsa <jolsa@redhat.com>
103Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
104Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
105---
106 kernel/trace/ftrace.c | 27 +++++++++++++--------------
107 1 files changed, 13 insertions(+), 14 deletions(-)
108
109diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
110index b1e8943..25b4f4d 100644
111--- a/kernel/trace/ftrace.c
112+++ b/kernel/trace/ftrace.c
113@@ -948,7 +948,7 @@ struct ftrace_func_probe {
114 };
115
116 enum {
117- FTRACE_ENABLE_CALLS = (1 << 0),
118+ FTRACE_UPDATE_CALLS = (1 << 0),
119 FTRACE_DISABLE_CALLS = (1 << 1),
120 FTRACE_UPDATE_TRACE_FUNC = (1 << 2),
121 FTRACE_START_FUNC_RET = (1 << 3),
122@@ -1519,7 +1519,7 @@ int ftrace_text_reserved(void *start, void *end)
123
124
125 static int
126-__ftrace_replace_code(struct dyn_ftrace *rec, int enable)
127+__ftrace_replace_code(struct dyn_ftrace *rec, int update)
128 {
129 unsigned long ftrace_addr;
130 unsigned long flag = 0UL;
131@@ -1527,17 +1527,17 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable)
132 ftrace_addr = (unsigned long)FTRACE_ADDR;
133
134 /*
135- * If we are enabling tracing:
136+ * If we are updating calls:
137 *
138 * If the record has a ref count, then we need to enable it
139 * because someone is using it.
140 *
141 * Otherwise we make sure its disabled.
142 *
143- * If we are disabling tracing, then disable all records that
144+ * If we are disabling calls, then disable all records that
145 * are enabled.
146 */
147- if (enable && (rec->flags & ~FTRACE_FL_MASK))
148+ if (update && (rec->flags & ~FTRACE_FL_MASK))
149 flag = FTRACE_FL_ENABLED;
150
151 /* If the state of this record hasn't changed, then do nothing */
152@@ -1553,7 +1553,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable)
153 return ftrace_make_nop(NULL, rec, ftrace_addr);
154 }
155
156-static void ftrace_replace_code(int enable)
157+static void ftrace_replace_code(int update)
158 {
159 struct dyn_ftrace *rec;
160 struct ftrace_page *pg;
161@@ -1567,7 +1567,7 @@ static void ftrace_replace_code(int enable)
162 if (rec->flags & FTRACE_FL_FREE)
163 continue;
164
165- failed = __ftrace_replace_code(rec, enable);
166+ failed = __ftrace_replace_code(rec, update);
167 if (failed) {
168 ftrace_bug(failed, rec->ip);
169 /* Stop processing */
170@@ -1623,7 +1623,7 @@ static int __ftrace_modify_code(void *data)
171 */
172 function_trace_stop++;
173
174- if (*command & FTRACE_ENABLE_CALLS)
175+ if (*command & FTRACE_UPDATE_CALLS)
176 ftrace_replace_code(1);
177 else if (*command & FTRACE_DISABLE_CALLS)
178 ftrace_replace_code(0);
179@@ -1691,7 +1691,7 @@ static int ftrace_startup(struct ftrace_ops *ops, int command)
180 return -ENODEV;
181
182 ftrace_start_up++;
183- command |= FTRACE_ENABLE_CALLS;
184+ command |= FTRACE_UPDATE_CALLS;
185
186 /* ops marked global share the filter hashes */
187 if (ops->flags & FTRACE_OPS_FL_GLOBAL) {
188@@ -1743,8 +1743,7 @@ static void ftrace_shutdown(struct ftrace_ops *ops, int command)
189 if (ops != &global_ops || !global_start_up)
190 ops->flags &= ~FTRACE_OPS_FL_ENABLED;
191
192- if (!ftrace_start_up)
193- command |= FTRACE_DISABLE_CALLS;
194+ command |= FTRACE_UPDATE_CALLS;
195
196 if (saved_ftrace_func != ftrace_trace_function) {
197 saved_ftrace_func = ftrace_trace_function;
198@@ -1766,7 +1765,7 @@ static void ftrace_startup_sysctl(void)
199 saved_ftrace_func = NULL;
200 /* ftrace_start_up is true if we want ftrace running */
201 if (ftrace_start_up)
202- ftrace_run_update_code(FTRACE_ENABLE_CALLS);
203+ ftrace_run_update_code(FTRACE_UPDATE_CALLS);
204 }
205
206 static void ftrace_shutdown_sysctl(void)
207@@ -2919,7 +2918,7 @@ ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len,
208 ret = ftrace_hash_move(ops, enable, orig_hash, hash);
209 if (!ret && ops->flags & FTRACE_OPS_FL_ENABLED
210 && ftrace_enabled)
211- ftrace_run_update_code(FTRACE_ENABLE_CALLS);
212+ ftrace_run_update_code(FTRACE_UPDATE_CALLS);
213
214 mutex_unlock(&ftrace_lock);
215
216@@ -3107,7 +3106,7 @@ ftrace_regex_release(struct inode *inode, struct file *file)
217 orig_hash, iter->hash);
218 if (!ret && (iter->ops->flags & FTRACE_OPS_FL_ENABLED)
219 && ftrace_enabled)
220- ftrace_run_update_code(FTRACE_ENABLE_CALLS);
221+ ftrace_run_update_code(FTRACE_UPDATE_CALLS);
222
223 mutex_unlock(&ftrace_lock);
224 }
225--
2261.7.7.4
227
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch
new file mode 100644
index 00000000..8d788a5a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch
@@ -0,0 +1,68 @@
1From 700e5b37d0da1b3688992c53abba2ba9c123c547 Mon Sep 17 00:00:00 2001
2From: Steven Rostedt <srostedt@redhat.com>
3Date: Fri, 13 Jan 2012 17:50:39 -0500
4Subject: [PATCH 064/130] kconfig/streamline-config.pl: Simplify backslash
5 line concatination
6
7commit d060d963e88f3e990cec2fe5214de49de9a49eca upstream.
8
9Simplify the way lines ending with backslashes (continuation) in Makefiles
10is parsed. This is needed to implement a necessary fix.
11
12Tested-by: Thomas Lange <thomas-lange2@gmx.de>
13Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 scripts/kconfig/streamline_config.pl | 25 ++++++++++++-------------
17 1 files changed, 12 insertions(+), 13 deletions(-)
18
19diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
20index ec7afce..42ef5ea 100644
21--- a/scripts/kconfig/streamline_config.pl
22+++ b/scripts/kconfig/streamline_config.pl
23@@ -253,17 +253,22 @@ if ($kconfig) {
24 # Read all Makefiles to map the configs to the objects
25 foreach my $makefile (@makefiles) {
26
27- my $cont = 0;
28+ my $line = "";
29
30 open(MIN,$makefile) || die "Can't open $makefile";
31 while (<MIN>) {
32- my $objs;
33-
34- # is this a line after a line with a backslash?
35- if ($cont && /(\S.*)$/) {
36- $objs = $1;
37+ # if this line ends with a backslash, continue
38+ chomp;
39+ if (/^(.*)\\$/) {
40+ $line .= $1;
41+ next;
42 }
43- $cont = 0;
44+
45+ $line .= $_;
46+ $_ = $line;
47+ $line = "";
48+
49+ my $objs;
50
51 # collect objects after obj-$(CONFIG_FOO_BAR)
52 if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
53@@ -271,12 +276,6 @@ foreach my $makefile (@makefiles) {
54 $objs = $2;
55 }
56 if (defined($objs)) {
57- # test if the line ends with a backslash
58- if ($objs =~ m,(.*)\\$,) {
59- $objs = $1;
60- $cont = 1;
61- }
62-
63 foreach my $obj (split /\s+/,$objs) {
64 $obj =~ s/-/_/g;
65 if ($obj =~ /(.*)\.o$/) {
66--
671.7.7.4
68
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch
new file mode 100644
index 00000000..443ada83
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch
@@ -0,0 +1,98 @@
1From 4f45c91ec4a5953d1a1bf1d88d8bf4fa5b0273a0 Mon Sep 17 00:00:00 2001
2From: Steven Rostedt <srostedt@redhat.com>
3Date: Fri, 13 Jan 2012 17:53:40 -0500
4Subject: [PATCH 065/130] kconfig/streamline-config.pl: Fix parsing Makefile
5 with variables
6
7commit 364212fddaaa60c5a64f67a0f5624ad996ecc8a0 upstream.
8
9Thomas Lange reported that when he did a 'make localmodconfig', his
10config was missing the brcmsmac driver, even though he had the module
11loaded.
12
13Looking into this, I found the file:
14drivers/net/wireless/brcm80211/brcmsmac/Makefile
15had the following in the Makefile:
16
17MODULEPFX := brcmsmac
18
19obj-$(CONFIG_BRCMSMAC) += $(MODULEPFX).o
20
21The way streamline-config.pl works, is parsing all the
22 obj-$(CONFIG_FOO) += foo.o
23lines to find that CONFIG_FOO belongs to the module foo.ko.
24
25But in this case, the brcmsmac.o was not used, but a variable in its place.
26
27By changing streamline-config.pl to remember defined variables in Makefiles
28and substituting them when they are used in the obj-X lines, allows
29Thomas (and others) to have their brcmsmac module stay configured
30when it is loaded and running "make localmodconfig".
31
32Reported-by: Thomas Lange <thomas-lange2@gmx.de>
33Tested-by: Thomas Lange <thomas-lange2@gmx.de>
34Cc: Arend van Spriel <arend@broadcom.com>
35Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
36Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
37---
38 scripts/kconfig/streamline_config.pl | 29 +++++++++++++++++++++++++++++
39 1 files changed, 29 insertions(+), 0 deletions(-)
40
41diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
42index 42ef5ea..bccf07d 100644
43--- a/scripts/kconfig/streamline_config.pl
44+++ b/scripts/kconfig/streamline_config.pl
45@@ -250,10 +250,33 @@ if ($kconfig) {
46 read_kconfig($kconfig);
47 }
48
49+sub convert_vars {
50+ my ($line, %vars) = @_;
51+
52+ my $process = "";
53+
54+ while ($line =~ s/^(.*?)(\$\((.*?)\))//) {
55+ my $start = $1;
56+ my $variable = $2;
57+ my $var = $3;
58+
59+ if (defined($vars{$var})) {
60+ $process .= $start . $vars{$var};
61+ } else {
62+ $process .= $start . $variable;
63+ }
64+ }
65+
66+ $process .= $line;
67+
68+ return $process;
69+}
70+
71 # Read all Makefiles to map the configs to the objects
72 foreach my $makefile (@makefiles) {
73
74 my $line = "";
75+ my %make_vars;
76
77 open(MIN,$makefile) || die "Can't open $makefile";
78 while (<MIN>) {
79@@ -270,10 +293,16 @@ foreach my $makefile (@makefiles) {
80
81 my $objs;
82
83+ $_ = convert_vars($_, %make_vars);
84+
85 # collect objects after obj-$(CONFIG_FOO_BAR)
86 if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
87 $var = $1;
88 $objs = $2;
89+
90+ # check if variables are set
91+ } elsif (/^\s*(\S+)\s*[:]?=\s*(.*\S)/) {
92+ $make_vars{$1} = $2;
93 }
94 if (defined($objs)) {
95 foreach my $obj (split /\s+/,$objs) {
96--
971.7.7.4
98
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch
new file mode 100644
index 00000000..5f9ecc32
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch
@@ -0,0 +1,60 @@
1From 843e6d14e855cc86d260b1077a3226d3344376af Mon Sep 17 00:00:00 2001
2From: "J. Bruce Fields" <bfields@redhat.com>
3Date: Thu, 22 Dec 2011 18:22:49 -0700
4Subject: [PATCH 066/130] svcrpc: fix double-free on shutdown of nfsd after
5 changing pool mode
6
7commit 61c8504c428edcebf23b97775a129c5b393a302b upstream.
8
9The pool_to and to_pool fields of the global svc_pool_map are freed on
10shutdown, but are initialized in nfsd startup only in the
11SVC_POOL_PERCPU and SVC_POOL_PERNODE cases.
12
13They *are* initialized to zero on kernel startup. So as long as you use
14only SVC_POOL_GLOBAL (the default), this will never be a problem.
15
16You're also OK if you only ever use SVC_POOL_PERCPU or SVC_POOL_PERNODE.
17
18However, the following sequence events leads to a double-free:
19
20 1. set SVC_POOL_PERCPU or SVC_POOL_PERNODE
21 2. start nfsd: both fields are initialized.
22 3. shutdown nfsd: both fields are freed.
23 4. set SVC_POOL_GLOBAL
24 5. start nfsd: the fields are left untouched.
25 6. shutdown nfsd: now we try to free them again.
26
27Step 4 is actually unnecessary, since (for some bizarre reason), nfsd
28automatically resets the pool mode to SVC_POOL_GLOBAL on shutdown.
29
30Signed-off-by: J. Bruce Fields <bfields@redhat.com>
31Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
32---
33 net/sunrpc/svc.c | 3 +++
34 1 files changed, 3 insertions(+), 0 deletions(-)
35
36diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
37index 6e03888..5443ffd 100644
38--- a/net/sunrpc/svc.c
39+++ b/net/sunrpc/svc.c
40@@ -167,6 +167,7 @@ svc_pool_map_alloc_arrays(struct svc_pool_map *m, unsigned int maxpools)
41
42 fail_free:
43 kfree(m->to_pool);
44+ m->to_pool = NULL;
45 fail:
46 return -ENOMEM;
47 }
48@@ -287,7 +288,9 @@ svc_pool_map_put(void)
49 if (!--m->count) {
50 m->mode = SVC_POOL_DEFAULT;
51 kfree(m->to_pool);
52+ m->to_pool = NULL;
53 kfree(m->pool_to);
54+ m->pool_to = NULL;
55 m->npools = 0;
56 }
57
58--
591.7.7.4
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch
new file mode 100644
index 00000000..021a4682
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch
@@ -0,0 +1,85 @@
1From c132bb68434e1dcfc0e148d1e677f4433d6cf075 Mon Sep 17 00:00:00 2001
2From: "J. Bruce Fields" <bfields@redhat.com>
3Date: Tue, 29 Nov 2011 11:35:35 -0500
4Subject: [PATCH 067/130] svcrpc: destroy server sockets all at once
5
6commit 2fefb8a09e7ed251ae8996e0c69066e74c5aa560 upstream.
7
8There's no reason I can see that we need to call sv_shutdown between
9closing the two lists of sockets.
10
11Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13---
14 include/linux/sunrpc/svcsock.h | 2 +-
15 net/sunrpc/svc.c | 7 +------
16 net/sunrpc/svc_xprt.c | 11 ++++++++++-
17 3 files changed, 12 insertions(+), 8 deletions(-)
18
19diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
20index 85c50b4..c84e974 100644
21--- a/include/linux/sunrpc/svcsock.h
22+++ b/include/linux/sunrpc/svcsock.h
23@@ -34,7 +34,7 @@ struct svc_sock {
24 /*
25 * Function prototypes.
26 */
27-void svc_close_all(struct list_head *);
28+void svc_close_all(struct svc_serv *);
29 int svc_recv(struct svc_rqst *, long);
30 int svc_send(struct svc_rqst *);
31 void svc_drop(struct svc_rqst *);
32diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
33index 5443ffd..7ddfb04 100644
34--- a/net/sunrpc/svc.c
35+++ b/net/sunrpc/svc.c
36@@ -531,16 +531,11 @@ svc_destroy(struct svc_serv *serv)
37
38 del_timer_sync(&serv->sv_temptimer);
39
40- svc_close_all(&serv->sv_tempsocks);
41+ svc_close_all(serv);
42
43 if (serv->sv_shutdown)
44 serv->sv_shutdown(serv);
45
46- svc_close_all(&serv->sv_permsocks);
47-
48- BUG_ON(!list_empty(&serv->sv_permsocks));
49- BUG_ON(!list_empty(&serv->sv_tempsocks));
50-
51 cache_clean_deferred(serv);
52
53 if (svc_serv_is_pooled(serv))
54diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
55index 447cd0e..dcdc8df 100644
56--- a/net/sunrpc/svc_xprt.c
57+++ b/net/sunrpc/svc_xprt.c
58@@ -928,7 +928,7 @@ void svc_close_xprt(struct svc_xprt *xprt)
59 }
60 EXPORT_SYMBOL_GPL(svc_close_xprt);
61
62-void svc_close_all(struct list_head *xprt_list)
63+static void svc_close_list(struct list_head *xprt_list)
64 {
65 struct svc_xprt *xprt;
66 struct svc_xprt *tmp;
67@@ -946,6 +946,15 @@ void svc_close_all(struct list_head *xprt_list)
68 }
69 }
70
71+void svc_close_all(struct svc_serv *serv)
72+{
73+ svc_close_list(&serv->sv_tempsocks);
74+ svc_close_list(&serv->sv_permsocks);
75+ BUG_ON(!list_empty(&serv->sv_permsocks));
76+ BUG_ON(!list_empty(&serv->sv_tempsocks));
77+
78+}
79+
80 /*
81 * Handle defer and revisit of requests
82 */
83--
841.7.7.4
85
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch
new file mode 100644
index 00000000..e102471a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch
@@ -0,0 +1,156 @@
1From fb5e1630fc3566904898da68a99cc8e764cb420f Mon Sep 17 00:00:00 2001
2From: "J. Bruce Fields" <bfields@redhat.com>
3Date: Tue, 29 Nov 2011 17:00:26 -0500
4Subject: [PATCH 068/130] svcrpc: avoid memory-corruption on pool shutdown
5
6commit b4f36f88b3ee7cf26bf0be84e6c7fc15f84dcb71 upstream.
7
8Socket callbacks use svc_xprt_enqueue() to add an xprt to a
9pool->sp_sockets list. In normal operation a server thread will later
10come along and take the xprt off that list. On shutdown, after all the
11threads have exited, we instead manually walk the sv_tempsocks and
12sv_permsocks lists to find all the xprt's and delete them.
13
14So the sp_sockets lists don't really matter any more. As a result,
15we've mostly just ignored them and hoped they would go away.
16
17Which has gotten us into trouble; witness for example ebc63e531cc6
18"svcrpc: fix list-corrupting race on nfsd shutdown", the result of Ben
19Greear noticing that a still-running svc_xprt_enqueue() could re-add an
20xprt to an sp_sockets list just before it was deleted. The fix was to
21remove it from the list at the end of svc_delete_xprt(). But that only
22made corruption less likely--I can see nothing that prevents a
23svc_xprt_enqueue() from adding another xprt to the list at the same
24moment that we're removing this xprt from the list. In fact, despite
25the earlier xpo_detach(), I don't even see what guarantees that
26svc_xprt_enqueue() couldn't still be running on this xprt.
27
28So, instead, note that svc_xprt_enqueue() essentially does:
29 lock sp_lock
30 if XPT_BUSY unset
31 add to sp_sockets
32 unlock sp_lock
33
34So, if we do:
35
36 set XPT_BUSY on every xprt.
37 Empty every sp_sockets list, under the sp_socks locks.
38
39Then we're left knowing that the sp_sockets lists are all empty and will
40stay that way, since any svc_xprt_enqueue() will check XPT_BUSY under
41the sp_lock and see it set.
42
43And *then* we can continue deleting the xprt's.
44
45(Thanks to Jeff Layton for being correctly suspicious of this code....)
46
47Cc: Ben Greear <greearb@candelatech.com>
48Cc: Jeff Layton <jlayton@redhat.com>
49Signed-off-by: J. Bruce Fields <bfields@redhat.com>
50Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
51---
52 net/sunrpc/svc.c | 10 +++++++++-
53 net/sunrpc/svc_xprt.c | 48 +++++++++++++++++++++++++++++-------------------
54 2 files changed, 38 insertions(+), 20 deletions(-)
55
56diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
57index 7ddfb04..d4ad50e 100644
58--- a/net/sunrpc/svc.c
59+++ b/net/sunrpc/svc.c
60@@ -530,7 +530,15 @@ svc_destroy(struct svc_serv *serv)
61 printk("svc_destroy: no threads for serv=%p!\n", serv);
62
63 del_timer_sync(&serv->sv_temptimer);
64-
65+ /*
66+ * The set of xprts (contained in the sv_tempsocks and
67+ * sv_permsocks lists) is now constant, since it is modified
68+ * only by accepting new sockets (done by service threads in
69+ * svc_recv) or aging old ones (done by sv_temptimer), or
70+ * configuration changes (excluded by whatever locking the
71+ * caller is using--nfsd_mutex in the case of nfsd). So it's
72+ * safe to traverse those lists and shut everything down:
73+ */
74 svc_close_all(serv);
75
76 if (serv->sv_shutdown)
77diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
78index dcdc8df..9ed2cd0 100644
79--- a/net/sunrpc/svc_xprt.c
80+++ b/net/sunrpc/svc_xprt.c
81@@ -893,14 +893,7 @@ void svc_delete_xprt(struct svc_xprt *xprt)
82 spin_lock_bh(&serv->sv_lock);
83 if (!test_and_set_bit(XPT_DETACHED, &xprt->xpt_flags))
84 list_del_init(&xprt->xpt_list);
85- /*
86- * The only time we're called while xpt_ready is still on a list
87- * is while the list itself is about to be destroyed (in
88- * svc_destroy). BUT svc_xprt_enqueue could still be attempting
89- * to add new entries to the sp_sockets list, so we can't leave
90- * a freed xprt on it.
91- */
92- list_del_init(&xprt->xpt_ready);
93+ BUG_ON(!list_empty(&xprt->xpt_ready));
94 if (test_bit(XPT_TEMP, &xprt->xpt_flags))
95 serv->sv_tmpcnt--;
96 spin_unlock_bh(&serv->sv_lock);
97@@ -931,28 +924,45 @@ EXPORT_SYMBOL_GPL(svc_close_xprt);
98 static void svc_close_list(struct list_head *xprt_list)
99 {
100 struct svc_xprt *xprt;
101- struct svc_xprt *tmp;
102
103- /*
104- * The server is shutting down, and no more threads are running.
105- * svc_xprt_enqueue() might still be running, but at worst it
106- * will re-add the xprt to sp_sockets, which will soon get
107- * freed. So we don't bother with any more locking, and don't
108- * leave the close to the (nonexistent) server threads:
109- */
110- list_for_each_entry_safe(xprt, tmp, xprt_list, xpt_list) {
111+ list_for_each_entry(xprt, xprt_list, xpt_list) {
112 set_bit(XPT_CLOSE, &xprt->xpt_flags);
113- svc_delete_xprt(xprt);
114+ set_bit(XPT_BUSY, &xprt->xpt_flags);
115 }
116 }
117
118 void svc_close_all(struct svc_serv *serv)
119 {
120+ struct svc_pool *pool;
121+ struct svc_xprt *xprt;
122+ struct svc_xprt *tmp;
123+ int i;
124+
125 svc_close_list(&serv->sv_tempsocks);
126 svc_close_list(&serv->sv_permsocks);
127+
128+ for (i = 0; i < serv->sv_nrpools; i++) {
129+ pool = &serv->sv_pools[i];
130+
131+ spin_lock_bh(&pool->sp_lock);
132+ while (!list_empty(&pool->sp_sockets)) {
133+ xprt = list_first_entry(&pool->sp_sockets, struct svc_xprt, xpt_ready);
134+ list_del_init(&xprt->xpt_ready);
135+ }
136+ spin_unlock_bh(&pool->sp_lock);
137+ }
138+ /*
139+ * At this point the sp_sockets lists will stay empty, since
140+ * svc_enqueue will not add new entries without taking the
141+ * sp_lock and checking XPT_BUSY.
142+ */
143+ list_for_each_entry_safe(xprt, tmp, &serv->sv_tempsocks, xpt_list)
144+ svc_delete_xprt(xprt);
145+ list_for_each_entry_safe(xprt, tmp, &serv->sv_permsocks, xpt_list)
146+ svc_delete_xprt(xprt);
147+
148 BUG_ON(!list_empty(&serv->sv_permsocks));
149 BUG_ON(!list_empty(&serv->sv_tempsocks));
150-
151 }
152
153 /*
154--
1551.7.7.4
156
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0069-nfsd4-fix-lockowner-matching.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0069-nfsd4-fix-lockowner-matching.patch
new file mode 100644
index 00000000..4025adab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0069-nfsd4-fix-lockowner-matching.patch
@@ -0,0 +1,59 @@
1From a626caf8192900669acd90726f7e2716a7cb4c8d Mon Sep 17 00:00:00 2001
2From: "J. Bruce Fields" <bfields@redhat.com>
3Date: Mon, 7 Nov 2011 16:37:57 -0500
4Subject: [PATCH 069/130] nfsd4: fix lockowner matching
5
6commit b93d87c19821ba7d3ee11557403d782e541071ad upstream.
7
8Lockowners are looked up by file as well as by owner, but we were
9forgetting to do a comparison on the file. This could cause an
10incorrect result from lockt.
11
12(Note looking up the inode from the lockowner is pretty awkward here.
13The data structures need fixing.)
14
15Signed-off-by: J. Bruce Fields <bfields@redhat.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 fs/nfsd/nfs4state.c | 17 +++++++++++++++--
19 1 files changed, 15 insertions(+), 2 deletions(-)
20
21diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
22index 47e94e3..5abced7 100644
23--- a/fs/nfsd/nfs4state.c
24+++ b/fs/nfsd/nfs4state.c
25@@ -3809,16 +3809,29 @@ nevermind:
26 deny->ld_type = NFS4_WRITE_LT;
27 }
28
29+static bool same_lockowner_ino(struct nfs4_lockowner *lo, struct inode *inode, clientid_t *clid, struct xdr_netobj *owner)
30+{
31+ struct nfs4_ol_stateid *lst;
32+
33+ if (!same_owner_str(&lo->lo_owner, owner, clid))
34+ return false;
35+ lst = list_first_entry(&lo->lo_owner.so_stateids,
36+ struct nfs4_ol_stateid, st_perstateowner);
37+ return lst->st_file->fi_inode == inode;
38+}
39+
40 static struct nfs4_lockowner *
41 find_lockowner_str(struct inode *inode, clientid_t *clid,
42 struct xdr_netobj *owner)
43 {
44 unsigned int hashval = lock_ownerstr_hashval(inode, clid->cl_id, owner);
45+ struct nfs4_lockowner *lo;
46 struct nfs4_stateowner *op;
47
48 list_for_each_entry(op, &lock_ownerstr_hashtbl[hashval], so_strhash) {
49- if (same_owner_str(op, owner, clid))
50- return lockowner(op);
51+ lo = lockowner(op);
52+ if (same_lockowner_ino(lo, inode, clid, owner))
53+ return lo;
54 }
55 return NULL;
56 }
57--
581.7.7.4
59
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch
new file mode 100644
index 00000000..cadcd5a2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch
@@ -0,0 +1,82 @@
1From 721aa63a8836ec85efe320a384b97ba3c3048740 Mon Sep 17 00:00:00 2001
2From: Sasha Levin <levinsasha928@gmail.com>
3Date: Fri, 18 Nov 2011 12:14:49 +0200
4Subject: [PATCH 070/130] nfsd: Fix oops when parsing a 0 length export
5
6commit b2ea70afade7080360ac55c4e64ff7a5fafdb67b upstream.
7
8expkey_parse() oopses when handling a 0 length export. This is easily
9triggerable from usermode by writing 0 bytes into
10'/proc/[proc id]/net/rpc/nfsd.fh/channel'.
11
12Below is the log:
13
14[ 1402.286893] BUG: unable to handle kernel paging request at ffff880077c49fff
15[ 1402.287632] IP: [<ffffffff812b4b99>] expkey_parse+0x28/0x2e1
16[ 1402.287632] PGD 2206063 PUD 1fdfd067 PMD 1ffbc067 PTE 8000000077c49160
17[ 1402.287632] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
18[ 1402.287632] CPU 1
19[ 1402.287632] Pid: 20198, comm: trinity Not tainted 3.2.0-rc2-sasha-00058-gc65cd37 #6
20[ 1402.287632] RIP: 0010:[<ffffffff812b4b99>] [<ffffffff812b4b99>] expkey_parse+0x28/0x2e1
21[ 1402.287632] RSP: 0018:ffff880077f0fd68 EFLAGS: 00010292
22[ 1402.287632] RAX: ffff880077c49fff RBX: 00000000ffffffea RCX: 0000000001043400
23[ 1402.287632] RDX: 0000000000000000 RSI: ffff880077c4a000 RDI: ffffffff82283de0
24[ 1402.287632] RBP: ffff880077f0fe18 R08: 0000000000000001 R09: ffff880000000000
25[ 1402.287632] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880077c4a000
26[ 1402.287632] R13: ffffffff82283de0 R14: 0000000001043400 R15: ffffffff82283de0
27[ 1402.287632] FS: 00007f25fec3f700(0000) GS:ffff88007d400000(0000) knlGS:0000000000000000
28[ 1402.287632] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
29[ 1402.287632] CR2: ffff880077c49fff CR3: 0000000077e1d000 CR4: 00000000000406e0
30[ 1402.287632] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
31[ 1402.287632] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
32[ 1402.287632] Process trinity (pid: 20198, threadinfo ffff880077f0e000, task ffff880077db17b0)
33[ 1402.287632] Stack:
34[ 1402.287632] ffff880077db17b0 ffff880077c4a000 ffff880077f0fdb8 ffffffff810b411e
35[ 1402.287632] ffff880000000000 ffff880077db17b0 ffff880077c4a000 ffffffff82283de0
36[ 1402.287632] 0000000001043400 ffffffff82283de0 ffff880077f0fde8 ffffffff81111f63
37[ 1402.287632] Call Trace:
38[ 1402.287632] [<ffffffff810b411e>] ? lock_release+0x1af/0x1bc
39[ 1402.287632] [<ffffffff81111f63>] ? might_fault+0x97/0x9e
40[ 1402.287632] [<ffffffff81111f1a>] ? might_fault+0x4e/0x9e
41[ 1402.287632] [<ffffffff81a8bcf2>] cache_do_downcall+0x3e/0x4f
42[ 1402.287632] [<ffffffff81a8c950>] cache_write.clone.16+0xbb/0x130
43[ 1402.287632] [<ffffffff81a8c9df>] ? cache_write_pipefs+0x1a/0x1a
44[ 1402.287632] [<ffffffff81a8c9f8>] cache_write_procfs+0x19/0x1b
45[ 1402.287632] [<ffffffff8118dc54>] proc_reg_write+0x8e/0xad
46[ 1402.287632] [<ffffffff8113fe81>] vfs_write+0xaa/0xfd
47[ 1402.287632] [<ffffffff8114142d>] ? fget_light+0x35/0x9e
48[ 1402.287632] [<ffffffff8113ff8b>] sys_write+0x48/0x6f
49[ 1402.287632] [<ffffffff81bbdb92>] system_call_fastpath+0x16/0x1b
50[ 1402.287632] Code: c0 c9 c3 55 48 63 d2 48 89 e5 48 8d 44 32 ff 41 57 41 56 41 55 41 54 53 bb ea ff ff ff 48 81 ec 88 00 00 00 48 89 b5 58 ff ff ff
51[ 1402.287632] 38 0a 0f 85 89 02 00 00 c6 00 00 48 8b 3d 44 4a e5 01 48 85
52[ 1402.287632] RIP [<ffffffff812b4b99>] expkey_parse+0x28/0x2e1
53[ 1402.287632] RSP <ffff880077f0fd68>
54[ 1402.287632] CR2: ffff880077c49fff
55[ 1402.287632] ---[ end trace 368ef53ff773a5e3 ]---
56
57Cc: "J. Bruce Fields" <bfields@fieldses.org>
58Cc: Neil Brown <neilb@suse.de>
59Cc: linux-nfs@vger.kernel.org
60Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
61Signed-off-by: J. Bruce Fields <bfields@redhat.com>
62Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
63---
64 fs/nfsd/export.c | 2 +-
65 1 files changed, 1 insertions(+), 1 deletions(-)
66
67diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
68index 62f3b90..5f312ab 100644
69--- a/fs/nfsd/export.c
70+++ b/fs/nfsd/export.c
71@@ -87,7 +87,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
72 struct svc_expkey key;
73 struct svc_expkey *ek = NULL;
74
75- if (mesg[mlen-1] != '\n')
76+ if (mlen < 1 || mesg[mlen-1] != '\n')
77 return -EINVAL;
78 mesg[mlen-1] = 0;
79
80--
811.7.7.4
82
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch
new file mode 100644
index 00000000..df126a59
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch
@@ -0,0 +1,61 @@
1From 4af0dd80de2155ea9bdd1a691d5a902884639359 Mon Sep 17 00:00:00 2001
2From: Miklos Szeredi <mszeredi@suse.cz>
3Date: Thu, 12 Jan 2012 17:59:46 +0100
4Subject: [PATCH 071/130] fsnotify: don't BUG in fsnotify_destroy_mark()
5
6commit fed474857efbed79cd390d0aee224231ca718f63 upstream.
7
8Removing the parent of a watched file results in "kernel BUG at
9fs/notify/mark.c:139".
10
11To reproduce
12
13 add "-w /tmp/audit/dir/watched_file" to audit.rules
14 rm -rf /tmp/audit/dir
15
16This is caused by fsnotify_destroy_mark() being called without an
17extra reference taken by the caller.
18
19Reported by Francesco Cosoleto here:
20
21 https://bugzilla.novell.com/show_bug.cgi?id=689860
22
23Fix by removing the BUG_ON and adding a comment about not accessing mark after
24the iput.
25
26Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
27Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29---
30 fs/notify/mark.c | 8 +++++---
31 1 files changed, 5 insertions(+), 3 deletions(-)
32
33diff --git a/fs/notify/mark.c b/fs/notify/mark.c
34index e14587d..f104d56 100644
35--- a/fs/notify/mark.c
36+++ b/fs/notify/mark.c
37@@ -135,9 +135,6 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
38
39 mark->flags &= ~FSNOTIFY_MARK_FLAG_ALIVE;
40
41- /* 1 from caller and 1 for being on i_list/g_list */
42- BUG_ON(atomic_read(&mark->refcnt) < 2);
43-
44 spin_lock(&group->mark_lock);
45
46 if (mark->flags & FSNOTIFY_MARK_FLAG_INODE) {
47@@ -182,6 +179,11 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
48 iput(inode);
49
50 /*
51+ * We don't necessarily have a ref on mark from caller so the above iput
52+ * may have already destroyed it. Don't touch from now on.
53+ */
54+
55+ /*
56 * it's possible that this group tried to destroy itself, but this
57 * this mark was simultaneously being freed by inode. If that's the
58 * case, we finish freeing the group here.
59--
601.7.7.4
61
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch
new file mode 100644
index 00000000..0fdc59a5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch
@@ -0,0 +1,44 @@
1From 9a2eeb78ce5b0f0d7a3a0d0917c10bd128d974d3 Mon Sep 17 00:00:00 2001
2From: Jack Steiner <steiner@sgi.com>
3Date: Fri, 6 Jan 2012 13:19:00 -0600
4Subject: [PATCH 072/130] x86, UV: Update Boot messages for SGI UV2 platform
5
6commit da517a08ac5913cd80ce3507cddd00f2a091b13c upstream.
7
8SGI UV systems print a message during boot:
9
10 UV: Found <num> blades
11
12Due to packaging changes, the blade count is not accurate for
13on the next generation of the platform. This patch corrects the
14count.
15
16Signed-off-by: Jack Steiner <steiner@sgi.com>
17Link: http://lkml.kernel.org/r/20120106191900.GA19772@sgi.com
18Signed-off-by: Ingo Molnar <mingo@elte.hu>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 arch/x86/kernel/apic/x2apic_uv_x.c | 7 ++++++-
22 1 files changed, 6 insertions(+), 1 deletions(-)
23
24diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
25index 9d59bba..79b05b8 100644
26--- a/arch/x86/kernel/apic/x2apic_uv_x.c
27+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
28@@ -769,7 +769,12 @@ void __init uv_system_init(void)
29 for(i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++)
30 uv_possible_blades +=
31 hweight64(uv_read_local_mmr( UVH_NODE_PRESENT_TABLE + i * 8));
32- printk(KERN_DEBUG "UV: Found %d blades\n", uv_num_possible_blades());
33+
34+ /* uv_num_possible_blades() is really the hub count */
35+ printk(KERN_INFO "UV: Found %d blades, %d hubs\n",
36+ is_uv1_hub() ? uv_num_possible_blades() :
37+ (uv_num_possible_blades() + 1) / 2,
38+ uv_num_possible_blades());
39
40 bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades();
41 uv_blade_info = kzalloc(bytes, GFP_KERNEL);
42--
431.7.7.4
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch
new file mode 100644
index 00000000..f4bc9093
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch
@@ -0,0 +1,46 @@
1From e27a416d10935bfd79c8783a3b3ccf27e1d16230 Mon Sep 17 00:00:00 2001
2From: David Daney <david.daney@cavium.com>
3Date: Mon, 19 Dec 2011 17:42:42 -0800
4Subject: [PATCH 073/130] recordmcount: Fix handling of elf64 big-endian
5 objects.
6
7commit 2e885057b7f75035f0b85e02f737891482815a81 upstream.
8
9In ELF64, the sh_flags field is 64-bits wide. recordmcount was
10erroneously treating it as a 32-bit wide field. For little endian
11objects this works because the flags of interest (SHF_EXECINSTR)
12reside in the lower 32 bits of the word, and you get the same result
13with either a 32-bit or 64-bit read. Big endian objects on the
14other hand do not work at all with this error.
15
16The fix: Correctly treat sh_flags as 64-bits wide in elf64 objects.
17
18The symptom I observed was that my
19__start_mcount_loc..__stop_mcount_loc was empty even though ftrace
20function tracing was enabled.
21
22Link: http://lkml.kernel.org/r/1324345362-12230-1-git-send-email-ddaney.cavm@gmail.com
23
24Signed-off-by: David Daney <david.daney@cavium.com>
25Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
26Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
27---
28 scripts/recordmcount.h | 2 +-
29 1 files changed, 1 insertions(+), 1 deletions(-)
30
31diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h
32index f40a6af6..54e35c1 100644
33--- a/scripts/recordmcount.h
34+++ b/scripts/recordmcount.h
35@@ -462,7 +462,7 @@ __has_rel_mcount(Elf_Shdr const *const relhdr, /* is SHT_REL or SHT_RELA */
36 succeed_file();
37 }
38 if (w(txthdr->sh_type) != SHT_PROGBITS ||
39- !(w(txthdr->sh_flags) & SHF_EXECINSTR))
40+ !(_w(txthdr->sh_flags) & SHF_EXECINSTR))
41 return NULL;
42 return txtname;
43 }
44--
451.7.7.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch
new file mode 100644
index 00000000..afbd62db
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch
@@ -0,0 +1,62 @@
1From 847db7a6053aff7d165a60f10a8cb585a950e6f9 Mon Sep 17 00:00:00 2001
2From: Haogang Chen <haogangchen@gmail.com>
3Date: Tue, 29 Nov 2011 18:32:25 -0300
4Subject: [PATCH 074/130] uvcvideo: Fix integer overflow in
5 uvc_ioctl_ctrl_map()
6
7commit 806e23e95f94a27ee445022d724060b9b45cb64a upstream.
8
9There is a potential integer overflow in uvc_ioctl_ctrl_map(). When a
10large xmap->menu_count is passed from the userspace, the subsequent call
11to kmalloc() will allocate a buffer smaller than expected.
12map->menu_count and map->menu_info would later be used in a loop (e.g.
13in uvc_query_v4l2_ctrl), which leads to out-of-bound access.
14
15The patch checks the ioctl argument and returns -EINVAL for zero or too
16large values in xmap->menu_count.
17
18Signed-off-by: Haogang Chen <haogangchen@gmail.com>
19[laurent.pinchart@ideasonboard.com Prevent excessive memory consumption]
20Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
21Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 drivers/media/video/uvc/uvc_v4l2.c | 9 +++++++++
25 drivers/media/video/uvc/uvcvideo.h | 1 +
26 2 files changed, 10 insertions(+), 0 deletions(-)
27
28diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
29index dadf11f..cf7788f 100644
30--- a/drivers/media/video/uvc/uvc_v4l2.c
31+++ b/drivers/media/video/uvc/uvc_v4l2.c
32@@ -58,6 +58,15 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,
33 break;
34
35 case V4L2_CTRL_TYPE_MENU:
36+ /* Prevent excessive memory consumption, as well as integer
37+ * overflows.
38+ */
39+ if (xmap->menu_count == 0 ||
40+ xmap->menu_count > UVC_MAX_CONTROL_MENU_ENTRIES) {
41+ ret = -EINVAL;
42+ goto done;
43+ }
44+
45 size = xmap->menu_count * sizeof(*map->menu_info);
46 map->menu_info = kmalloc(size, GFP_KERNEL);
47 if (map->menu_info == NULL) {
48diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h
49index 4c1392e..bc446ba 100644
50--- a/drivers/media/video/uvc/uvcvideo.h
51+++ b/drivers/media/video/uvc/uvcvideo.h
52@@ -113,6 +113,7 @@
53
54 /* Maximum allowed number of control mappings per device */
55 #define UVC_MAX_CONTROL_MAPPINGS 1024
56+#define UVC_MAX_CONTROL_MENU_ENTRIES 32
57
58 /* Devices quirks */
59 #define UVC_QUIRK_STATUS_INTERVAL 0x00000001
60--
611.7.7.4
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch
new file mode 100644
index 00000000..d369d7a3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch
@@ -0,0 +1,172 @@
1From 48a7a2bae38f29f5b231f460dd2852e00e50d549 Mon Sep 17 00:00:00 2001
2From: Dave Chinner <david@fromorbit.com>
3Date: Tue, 23 Aug 2011 18:56:24 +1000
4Subject: [PATCH 075/130] dcache: use a dispose list in select_parent
5
6commit b48f03b319ba78f3abf9a7044d1f436d8d90f4f9 upstream.
7
8select_parent currently abuses the dentry cache LRU to provide
9cleanup features for child dentries that need to be freed. It moves
10them to the tail of the LRU, then tells shrink_dcache_parent() to
11calls __shrink_dcache_sb to unconditionally move them to a dispose
12list (as DCACHE_REFERENCED is ignored). __shrink_dcache_sb() has to
13relock the dentries to move them off the LRU onto the dispose list,
14but otherwise does not touch the dentries that select_parent() moved
15to the tail of the LRU. It then passses the dispose list to
16shrink_dentry_list() which tries to free the dentries.
17
18IOWs, the use of __shrink_dcache_sb() is superfluous - we can build
19exactly the same list of dentries for disposal directly in
20select_parent() and call shrink_dentry_list() instead of calling
21__shrink_dcache_sb() to do that. This means that we avoid long holds
22on the lru lock walking the LRU moving dentries to the dispose list
23We also avoid the need to relock each dentry just to move it off the
24LRU, reducing the numebr of times we lock each dentry to dispose of
25them in shrink_dcache_parent() from 3 to 2 times.
26
27Further, we remove one of the two callers of __shrink_dcache_sb().
28This also means that __shrink_dcache_sb can be moved into back into
29prune_dcache_sb() and we no longer have to handle referenced
30dentries conditionally, simplifying the code.
31
32Signed-off-by: Dave Chinner <dchinner@redhat.com>
33Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
34Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
35Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
36---
37 fs/dcache.c | 63 +++++++++++++++++++---------------------------------------
38 1 files changed, 21 insertions(+), 42 deletions(-)
39
40diff --git a/fs/dcache.c b/fs/dcache.c
41index 89509b5..108116e 100644
42--- a/fs/dcache.c
43+++ b/fs/dcache.c
44@@ -275,15 +275,15 @@ static void dentry_lru_prune(struct dentry *dentry)
45 }
46 }
47
48-static void dentry_lru_move_tail(struct dentry *dentry)
49+static void dentry_lru_move_list(struct dentry *dentry, struct list_head *list)
50 {
51 spin_lock(&dcache_lru_lock);
52 if (list_empty(&dentry->d_lru)) {
53- list_add_tail(&dentry->d_lru, &dentry->d_sb->s_dentry_lru);
54+ list_add_tail(&dentry->d_lru, list);
55 dentry->d_sb->s_nr_dentry_unused++;
56 dentry_stat.nr_unused++;
57 } else {
58- list_move_tail(&dentry->d_lru, &dentry->d_sb->s_dentry_lru);
59+ list_move_tail(&dentry->d_lru, list);
60 }
61 spin_unlock(&dcache_lru_lock);
62 }
63@@ -769,14 +769,18 @@ static void shrink_dentry_list(struct list_head *list)
64 }
65
66 /**
67- * __shrink_dcache_sb - shrink the dentry LRU on a given superblock
68- * @sb: superblock to shrink dentry LRU.
69- * @count: number of entries to prune
70- * @flags: flags to control the dentry processing
71+ * prune_dcache_sb - shrink the dcache
72+ * @sb: superblock
73+ * @count: number of entries to try to free
74+ *
75+ * Attempt to shrink the superblock dcache LRU by @count entries. This is
76+ * done when we need more memory an called from the superblock shrinker
77+ * function.
78 *
79- * If flags contains DCACHE_REFERENCED reference dentries will not be pruned.
80+ * This function may fail to free any resources if all the dentries are in
81+ * use.
82 */
83-static void __shrink_dcache_sb(struct super_block *sb, int count, int flags)
84+void prune_dcache_sb(struct super_block *sb, int count)
85 {
86 struct dentry *dentry;
87 LIST_HEAD(referenced);
88@@ -795,13 +799,7 @@ relock:
89 goto relock;
90 }
91
92- /*
93- * If we are honouring the DCACHE_REFERENCED flag and the
94- * dentry has this flag set, don't free it. Clear the flag
95- * and put it back on the LRU.
96- */
97- if (flags & DCACHE_REFERENCED &&
98- dentry->d_flags & DCACHE_REFERENCED) {
99+ if (dentry->d_flags & DCACHE_REFERENCED) {
100 dentry->d_flags &= ~DCACHE_REFERENCED;
101 list_move(&dentry->d_lru, &referenced);
102 spin_unlock(&dentry->d_lock);
103@@ -821,23 +819,6 @@ relock:
104 }
105
106 /**
107- * prune_dcache_sb - shrink the dcache
108- * @sb: superblock
109- * @nr_to_scan: number of entries to try to free
110- *
111- * Attempt to shrink the superblock dcache LRU by @nr_to_scan entries. This is
112- * done when we need more memory an called from the superblock shrinker
113- * function.
114- *
115- * This function may fail to free any resources if all the dentries are in
116- * use.
117- */
118-void prune_dcache_sb(struct super_block *sb, int nr_to_scan)
119-{
120- __shrink_dcache_sb(sb, nr_to_scan, DCACHE_REFERENCED);
121-}
122-
123-/**
124 * shrink_dcache_sb - shrink dcache for a superblock
125 * @sb: superblock
126 *
127@@ -1091,7 +1072,7 @@ EXPORT_SYMBOL(have_submounts);
128 * drop the lock and return early due to latency
129 * constraints.
130 */
131-static int select_parent(struct dentry * parent)
132+static int select_parent(struct dentry *parent, struct list_head *dispose)
133 {
134 struct dentry *this_parent;
135 struct list_head *next;
136@@ -1113,12 +1094,11 @@ resume:
137
138 spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
139
140- /*
141- * move only zero ref count dentries to the end
142- * of the unused list for prune_dcache
143+ /*
144+ * move only zero ref count dentries to the dispose list.
145 */
146 if (!dentry->d_count) {
147- dentry_lru_move_tail(dentry);
148+ dentry_lru_move_list(dentry, dispose);
149 found++;
150 } else {
151 dentry_lru_del(dentry);
152@@ -1180,14 +1160,13 @@ rename_retry:
153 *
154 * Prune the dcache to remove unused children of the parent dentry.
155 */
156-
157 void shrink_dcache_parent(struct dentry * parent)
158 {
159- struct super_block *sb = parent->d_sb;
160+ LIST_HEAD(dispose);
161 int found;
162
163- while ((found = select_parent(parent)) != 0)
164- __shrink_dcache_sb(sb, found, 0);
165+ while ((found = select_parent(parent, &dispose)) != 0)
166+ shrink_dentry_list(&dispose);
167 }
168 EXPORT_SYMBOL(shrink_dcache_parent);
169
170--
1711.7.7.4
172
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0076-fix-shrink_dcache_parent-livelock.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0076-fix-shrink_dcache_parent-livelock.patch
new file mode 100644
index 00000000..9dd4f0c5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0076-fix-shrink_dcache_parent-livelock.patch
@@ -0,0 +1,130 @@
1From 26c9f57c6ada2518c265d0a52b29a26be7bcb746 Mon Sep 17 00:00:00 2001
2From: Miklos Szeredi <miklos@szeredi.hu>
3Date: Tue, 10 Jan 2012 18:22:25 +0100
4Subject: [PATCH 076/130] fix shrink_dcache_parent() livelock
5
6commit eaf5f9073533cde21c7121c136f1c3f072d9cf59 upstream.
7
8Two (or more) concurrent calls of shrink_dcache_parent() on the same dentry may
9cause shrink_dcache_parent() to loop forever.
10
11Here's what appears to happen:
12
131 - CPU0: select_parent(P) finds C and puts it on dispose list, returns 1
14
152 - CPU1: select_parent(P) locks P->d_lock
16
173 - CPU0: shrink_dentry_list() locks C->d_lock
18 dentry_kill(C) tries to lock P->d_lock but fails, unlocks C->d_lock
19
204 - CPU1: select_parent(P) locks C->d_lock,
21 moves C from dispose list being processed on CPU0 to the new
22dispose list, returns 1
23
245 - CPU0: shrink_dentry_list() finds dispose list empty, returns
25
266 - Goto 2 with CPU0 and CPU1 switched
27
28Basically select_parent() steals the dentry from shrink_dentry_list() and thinks
29it found a new one, causing shrink_dentry_list() to think it's making progress
30and loop over and over.
31
32One way to trigger this is to make udev calls stat() on the sysfs file while it
33is going away.
34
35Having a file in /lib/udev/rules.d/ with only this one rule seems to the trick:
36
37ATTR{vendor}=="0x8086", ATTR{device}=="0x10ca", ENV{PCI_SLOT_NAME}="%k", ENV{MATCHADDR}="$attr{address}", RUN+="/bin/true"
38
39Then execute the following loop:
40
41while true; do
42 echo -bond0 > /sys/class/net/bonding_masters
43 echo +bond0 > /sys/class/net/bonding_masters
44 echo -bond1 > /sys/class/net/bonding_masters
45 echo +bond1 > /sys/class/net/bonding_masters
46done
47
48One fix would be to check all callers and prevent concurrent calls to
49shrink_dcache_parent(). But I think a better solution is to stop the
50stealing behavior.
51
52This patch adds a new dentry flag that is set when the dentry is added to the
53dispose list. The flag is cleared in dentry_lru_del() in case the dentry gets a
54new reference just before being pruned.
55
56If the dentry has this flag, select_parent() will skip it and let
57shrink_dentry_list() retry pruning it. With select_parent() skipping those
58dentries there will not be the appearance of progress (new dentries found) when
59there is none, hence shrink_dcache_parent() will not loop forever.
60
61Set the flag is also set in prune_dcache_sb() for consistency as suggested by
62Linus.
63
64Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
65Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
66Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
67---
68 fs/dcache.c | 15 +++++++++++----
69 include/linux/dcache.h | 1 +
70 2 files changed, 12 insertions(+), 4 deletions(-)
71
72diff --git a/fs/dcache.c b/fs/dcache.c
73index 108116e..f7908ae 100644
74--- a/fs/dcache.c
75+++ b/fs/dcache.c
76@@ -242,6 +242,7 @@ static void dentry_lru_add(struct dentry *dentry)
77 static void __dentry_lru_del(struct dentry *dentry)
78 {
79 list_del_init(&dentry->d_lru);
80+ dentry->d_flags &= ~DCACHE_SHRINK_LIST;
81 dentry->d_sb->s_nr_dentry_unused--;
82 dentry_stat.nr_unused--;
83 }
84@@ -805,6 +806,7 @@ relock:
85 spin_unlock(&dentry->d_lock);
86 } else {
87 list_move_tail(&dentry->d_lru, &tmp);
88+ dentry->d_flags |= DCACHE_SHRINK_LIST;
89 spin_unlock(&dentry->d_lock);
90 if (!--count)
91 break;
92@@ -1096,14 +1098,19 @@ resume:
93
94 /*
95 * move only zero ref count dentries to the dispose list.
96+ *
97+ * Those which are presently on the shrink list, being processed
98+ * by shrink_dentry_list(), shouldn't be moved. Otherwise the
99+ * loop in shrink_dcache_parent() might not make any progress
100+ * and loop forever.
101 */
102- if (!dentry->d_count) {
103+ if (dentry->d_count) {
104+ dentry_lru_del(dentry);
105+ } else if (!(dentry->d_flags & DCACHE_SHRINK_LIST)) {
106 dentry_lru_move_list(dentry, dispose);
107+ dentry->d_flags |= DCACHE_SHRINK_LIST;
108 found++;
109- } else {
110- dentry_lru_del(dentry);
111 }
112-
113 /*
114 * We can return to the caller if we have found some (this
115 * ensures forward progress). We'll be coming back to find
116diff --git a/include/linux/dcache.h b/include/linux/dcache.h
117index ed9f74f..4eb8c80 100644
118--- a/include/linux/dcache.h
119+++ b/include/linux/dcache.h
120@@ -203,6 +203,7 @@ struct dentry_operations {
121
122 #define DCACHE_CANT_MOUNT 0x0100
123 #define DCACHE_GENOCIDE 0x0200
124+#define DCACHE_SHRINK_LIST 0x0400
125
126 #define DCACHE_NFSFS_RENAMED 0x1000
127 /* this dentry has been "silly renamed" and has to be deleted on the last
128--
1291.7.7.4
130
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch
new file mode 100644
index 00000000..1bcc2726
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch
@@ -0,0 +1,64 @@
1From 6feb42647758cf08e5707c9f6a2f0d78d6fb3cc8 Mon Sep 17 00:00:00 2001
2From: Peng Tao <bergwolf@gmail.com>
3Date: Thu, 12 Jan 2012 23:18:41 +0800
4Subject: [PATCH 077/130] pnfsblock: acquire im_lock in _preload_range
5
6commit 39e567ae36fe03c2b446e1b83ee3d39bea08f90b upstream.
7
8When calling _add_entry, we should take the im_lock to protect
9agains other modifiers.
10
11Signed-off-by: Peng Tao <peng_tao@emc.com>
12Signed-off-by: Benny Halevy <bhalevy@tonian.com>
13Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 fs/nfs/blocklayout/extents.c | 11 ++++++-----
17 1 files changed, 6 insertions(+), 5 deletions(-)
18
19diff --git a/fs/nfs/blocklayout/extents.c b/fs/nfs/blocklayout/extents.c
20index 19fa7b0..c69682a 100644
21--- a/fs/nfs/blocklayout/extents.c
22+++ b/fs/nfs/blocklayout/extents.c
23@@ -139,11 +139,13 @@ static int _set_range(struct my_tree *tree, int32_t tag, u64 s, u64 length)
24 }
25
26 /* Ensure that future operations on given range of tree will not malloc */
27-static int _preload_range(struct my_tree *tree, u64 offset, u64 length)
28+static int _preload_range(struct pnfs_inval_markings *marks,
29+ u64 offset, u64 length)
30 {
31 u64 start, end, s;
32 int count, i, used = 0, status = -ENOMEM;
33 struct pnfs_inval_tracking **storage;
34+ struct my_tree *tree = &marks->im_tree;
35
36 dprintk("%s(%llu, %llu) enter\n", __func__, offset, length);
37 start = normalize(offset, tree->mtt_step_size);
38@@ -161,12 +163,11 @@ static int _preload_range(struct my_tree *tree, u64 offset, u64 length)
39 goto out_cleanup;
40 }
41
42- /* Now need lock - HOW??? */
43-
44+ spin_lock(&marks->im_lock);
45 for (s = start; s < end; s += tree->mtt_step_size)
46 used += _add_entry(tree, s, INTERNAL_EXISTS, storage[used]);
47+ spin_unlock(&marks->im_lock);
48
49- /* Unlock - HOW??? */
50 status = 0;
51
52 out_cleanup:
53@@ -286,7 +287,7 @@ int bl_mark_sectors_init(struct pnfs_inval_markings *marks,
54
55 start = normalize(offset, marks->im_block_size);
56 end = normalize_up(offset + length, marks->im_block_size);
57- if (_preload_range(&marks->im_tree, start, end - start))
58+ if (_preload_range(marks, start, end - start))
59 goto outerr;
60
61 spin_lock(&marks->im_lock);
62--
631.7.7.4
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch
new file mode 100644
index 00000000..99b0428e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch
@@ -0,0 +1,46 @@
1From b6fd682adf525b6766b8e16b39e39412153d19da Mon Sep 17 00:00:00 2001
2From: Peng Tao <bergwolf@gmail.com>
3Date: Thu, 12 Jan 2012 23:18:47 +0800
4Subject: [PATCH 078/130] pnfsblock: don't spinlock when freeing block_dev
5
6commit 93a3844ee0f843b05a1df4b52e1a19ff26b98d24 upstream.
7
8bl_free_block_dev() may sleep. We can not call it with spinlock held.
9Besides, there is no need to take bm_lock as we are last user freeing bm_devlist.
10
11Signed-off-by: Peng Tao <peng_tao@emc.com>
12Signed-off-by: Benny Halevy <bhalevy@tonian.com>
13Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 fs/nfs/blocklayout/blocklayout.c | 11 ++++-------
17 1 files changed, 4 insertions(+), 7 deletions(-)
18
19diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
20index 281ae95..ce8129d 100644
21--- a/fs/nfs/blocklayout/blocklayout.c
22+++ b/fs/nfs/blocklayout/blocklayout.c
23@@ -779,16 +779,13 @@ bl_cleanup_layoutcommit(struct nfs4_layoutcommit_data *lcdata)
24 static void free_blk_mountid(struct block_mount_id *mid)
25 {
26 if (mid) {
27- struct pnfs_block_dev *dev;
28- spin_lock(&mid->bm_lock);
29- while (!list_empty(&mid->bm_devlist)) {
30- dev = list_first_entry(&mid->bm_devlist,
31- struct pnfs_block_dev,
32- bm_node);
33+ struct pnfs_block_dev *dev, *tmp;
34+
35+ /* No need to take bm_lock as we are last user freeing bm_devlist */
36+ list_for_each_entry_safe(dev, tmp, &mid->bm_devlist, bm_node) {
37 list_del(&dev->bm_node);
38 bl_free_block_dev(dev);
39 }
40- spin_unlock(&mid->bm_lock);
41 kfree(mid);
42 }
43 }
44--
451.7.7.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0079-pnfsblock-limit-bio-page-count.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0079-pnfsblock-limit-bio-page-count.patch
new file mode 100644
index 00000000..74d1d69d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0079-pnfsblock-limit-bio-page-count.patch
@@ -0,0 +1,51 @@
1From 4ebc5f6665b0d03c9488fafb7ac6f8bd2f104d70 Mon Sep 17 00:00:00 2001
2From: Peng Tao <bergwolf@gmail.com>
3Date: Thu, 12 Jan 2012 23:18:48 +0800
4Subject: [PATCH 079/130] pnfsblock: limit bio page count
5
6commit 74a6eeb44ca6174d9cc93b9b8b4d58211c57bc80 upstream.
7
8One bio can have at most BIO_MAX_PAGES pages. We should limit it bec otherwise
9bio_alloc will fail when there are many pages in one read/write_pagelist.
10
11Signed-off-by: Peng Tao <peng_tao@emc.com>
12Signed-off-by: Benny Halevy <bhalevy@tonian.com>
13Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 fs/nfs/blocklayout/blocklayout.c | 17 +++++++++++------
17 1 files changed, 11 insertions(+), 6 deletions(-)
18
19diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
20index ce8129d..3db6b82 100644
21--- a/fs/nfs/blocklayout/blocklayout.c
22+++ b/fs/nfs/blocklayout/blocklayout.c
23@@ -146,14 +146,19 @@ static struct bio *bl_alloc_init_bio(int npg, sector_t isect,
24 {
25 struct bio *bio;
26
27+ npg = min(npg, BIO_MAX_PAGES);
28 bio = bio_alloc(GFP_NOIO, npg);
29- if (!bio)
30- return NULL;
31+ if (!bio && (current->flags & PF_MEMALLOC)) {
32+ while (!bio && (npg /= 2))
33+ bio = bio_alloc(GFP_NOIO, npg);
34+ }
35
36- bio->bi_sector = isect - be->be_f_offset + be->be_v_offset;
37- bio->bi_bdev = be->be_mdev;
38- bio->bi_end_io = end_io;
39- bio->bi_private = par;
40+ if (bio) {
41+ bio->bi_sector = isect - be->be_f_offset + be->be_v_offset;
42+ bio->bi_bdev = be->be_mdev;
43+ bio->bi_end_io = end_io;
44+ bio->bi_private = par;
45+ }
46 return bio;
47 }
48
49--
501.7.7.4
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch
new file mode 100644
index 00000000..eca2dda2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch
@@ -0,0 +1,635 @@
1From 5b8206fb91b97732d80ada2e494e060d50ab30bd Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Tue, 29 Nov 2011 10:20:02 +0100
4Subject: [PATCH 080/130] mac80211: revert on-channel work optimisations
5
6commit e76aadc572288a158ae18ae1c10fe395c7bca066 upstream.
7
8Backport note:
9This patch it's a full revert of commit b23b025f "mac80211: Optimize
10scans on current operating channel.". On upstrem revert e76aadc5 we
11keep some bits from that commit, which are needed for upstream version
12of mac80211.
13
14The on-channel work optimisations have caused a
15number of issues, and the code is unfortunately
16very complex and almost impossible to follow.
17Instead of attempting to put in more workarounds
18let's just remove those optimisations, we can
19work on them again later, after we change the
20whole auth/assoc design.
21
22This should fix rate_control_send_low() warnings,
23see RH bug 731365.
24
25Signed-off-by: Johannes Berg <johannes.berg@intel.com>
26Signed-off-by: John W. Linville <linville@tuxdriver.com>
27Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29---
30 net/mac80211/ieee80211_i.h | 13 +++----
31 net/mac80211/main.c | 58 +++-----------------------------
32 net/mac80211/offchannel.c | 68 +++++++++++++++++---------------------
33 net/mac80211/rx.c | 10 ++++-
34 net/mac80211/scan.c | 77 ++++++++++++-------------------------------
35 net/mac80211/tx.c | 3 +-
36 net/mac80211/work.c | 77 ++++++-------------------------------------
37 7 files changed, 85 insertions(+), 221 deletions(-)
38
39diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
40index ea10a51..73495f1 100644
41--- a/net/mac80211/ieee80211_i.h
42+++ b/net/mac80211/ieee80211_i.h
43@@ -702,6 +702,8 @@ struct tpt_led_trigger {
44 * well be on the operating channel
45 * @SCAN_HW_SCANNING: The hardware is scanning for us, we have no way to
46 * determine if we are on the operating channel or not
47+ * @SCAN_OFF_CHANNEL: We're off our operating channel for scanning,
48+ * gets only set in conjunction with SCAN_SW_SCANNING
49 * @SCAN_COMPLETED: Set for our scan work function when the driver reported
50 * that the scan completed.
51 * @SCAN_ABORTED: Set for our scan work function when the driver reported
52@@ -710,6 +712,7 @@ struct tpt_led_trigger {
53 enum {
54 SCAN_SW_SCANNING,
55 SCAN_HW_SCANNING,
56+ SCAN_OFF_CHANNEL,
57 SCAN_COMPLETED,
58 SCAN_ABORTED,
59 };
60@@ -1140,14 +1143,10 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);
61 void ieee80211_sched_scan_stopped_work(struct work_struct *work);
62
63 /* off-channel helpers */
64-bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local);
65-void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
66- bool tell_ap);
67-void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
68- bool offchannel_ps_enable);
69+void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local);
70+void ieee80211_offchannel_stop_station(struct ieee80211_local *local);
71 void ieee80211_offchannel_return(struct ieee80211_local *local,
72- bool enable_beaconing,
73- bool offchannel_ps_disable);
74+ bool enable_beaconing);
75 void ieee80211_hw_roc_setup(struct ieee80211_local *local);
76
77 /* interface handling */
78diff --git a/net/mac80211/main.c b/net/mac80211/main.c
79index cae4435..a7536fd 100644
80--- a/net/mac80211/main.c
81+++ b/net/mac80211/main.c
82@@ -92,47 +92,6 @@ static void ieee80211_reconfig_filter(struct work_struct *work)
83 ieee80211_configure_filter(local);
84 }
85
86-/*
87- * Returns true if we are logically configured to be on
88- * the operating channel AND the hardware-conf is currently
89- * configured on the operating channel. Compares channel-type
90- * as well.
91- */
92-bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local)
93-{
94- struct ieee80211_channel *chan, *scan_chan;
95- enum nl80211_channel_type channel_type;
96-
97- /* This logic needs to match logic in ieee80211_hw_config */
98- if (local->scan_channel) {
99- chan = local->scan_channel;
100- /* If scanning on oper channel, use whatever channel-type
101- * is currently in use.
102- */
103- if (chan == local->oper_channel)
104- channel_type = local->_oper_channel_type;
105- else
106- channel_type = NL80211_CHAN_NO_HT;
107- } else if (local->tmp_channel) {
108- chan = scan_chan = local->tmp_channel;
109- channel_type = local->tmp_channel_type;
110- } else {
111- chan = local->oper_channel;
112- channel_type = local->_oper_channel_type;
113- }
114-
115- if (chan != local->oper_channel ||
116- channel_type != local->_oper_channel_type)
117- return false;
118-
119- /* Check current hardware-config against oper_channel. */
120- if ((local->oper_channel != local->hw.conf.channel) ||
121- (local->_oper_channel_type != local->hw.conf.channel_type))
122- return false;
123-
124- return true;
125-}
126-
127 int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
128 {
129 struct ieee80211_channel *chan, *scan_chan;
130@@ -145,9 +104,6 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
131
132 scan_chan = local->scan_channel;
133
134- /* If this off-channel logic ever changes, ieee80211_on_oper_channel
135- * may need to change as well.
136- */
137 offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
138 if (scan_chan) {
139 chan = scan_chan;
140@@ -158,19 +114,17 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
141 channel_type = local->_oper_channel_type;
142 else
143 channel_type = NL80211_CHAN_NO_HT;
144- } else if (local->tmp_channel) {
145+ local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
146+ } else if (local->tmp_channel &&
147+ local->oper_channel != local->tmp_channel) {
148 chan = scan_chan = local->tmp_channel;
149 channel_type = local->tmp_channel_type;
150+ local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
151 } else {
152 chan = local->oper_channel;
153 channel_type = local->_oper_channel_type;
154- }
155-
156- if (chan != local->oper_channel ||
157- channel_type != local->_oper_channel_type)
158- local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
159- else
160 local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL;
161+ }
162
163 offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
164
165@@ -279,7 +233,7 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
166
167 if (changed & BSS_CHANGED_BEACON_ENABLED) {
168 if (local->quiescing || !ieee80211_sdata_running(sdata) ||
169- test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) {
170+ test_bit(SCAN_SW_SCANNING, &local->scanning)) {
171 sdata->vif.bss_conf.enable_beacon = false;
172 } else {
173 /*
174diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
175index 3d41441..1b239be 100644
176--- a/net/mac80211/offchannel.c
177+++ b/net/mac80211/offchannel.c
178@@ -18,14 +18,10 @@
179 #include "driver-trace.h"
180
181 /*
182- * Tell our hardware to disable PS.
183- * Optionally inform AP that we will go to sleep so that it will buffer
184- * the frames while we are doing off-channel work. This is optional
185- * because we *may* be doing work on-operating channel, and want our
186- * hardware unconditionally awake, but still let the AP send us normal frames.
187+ * inform AP that we will go to sleep so that it will buffer the frames
188+ * while we scan
189 */
190-static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata,
191- bool tell_ap)
192+static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata)
193 {
194 struct ieee80211_local *local = sdata->local;
195 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
196@@ -46,8 +42,8 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata,
197 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
198 }
199
200- if (tell_ap && (!local->offchannel_ps_enabled ||
201- !(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)))
202+ if (!(local->offchannel_ps_enabled) ||
203+ !(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK))
204 /*
205 * If power save was enabled, no need to send a nullfunc
206 * frame because AP knows that we are sleeping. But if the
207@@ -82,9 +78,6 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
208 * we are sleeping, let's just enable power save mode in
209 * hardware.
210 */
211- /* TODO: Only set hardware if CONF_PS changed?
212- * TODO: Should we set offchannel_ps_enabled to false?
213- */
214 local->hw.conf.flags |= IEEE80211_CONF_PS;
215 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
216 } else if (local->hw.conf.dynamic_ps_timeout > 0) {
217@@ -103,61 +96,63 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
218 ieee80211_sta_reset_conn_monitor(sdata);
219 }
220
221-void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
222- bool offchannel_ps_enable)
223+void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local)
224 {
225 struct ieee80211_sub_if_data *sdata;
226
227- /*
228- * notify the AP about us leaving the channel and stop all
229- * STA interfaces.
230- */
231 mutex_lock(&local->iflist_mtx);
232 list_for_each_entry(sdata, &local->interfaces, list) {
233 if (!ieee80211_sdata_running(sdata))
234 continue;
235
236- if (sdata->vif.type != NL80211_IFTYPE_MONITOR)
237- set_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
238-
239- /* Check to see if we should disable beaconing. */
240+ /* disable beaconing */
241 if (sdata->vif.type == NL80211_IFTYPE_AP ||
242 sdata->vif.type == NL80211_IFTYPE_ADHOC ||
243 sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
244 ieee80211_bss_info_change_notify(
245 sdata, BSS_CHANGED_BEACON_ENABLED);
246
247- if (sdata->vif.type != NL80211_IFTYPE_MONITOR) {
248+ /*
249+ * only handle non-STA interfaces here, STA interfaces
250+ * are handled in ieee80211_offchannel_stop_station(),
251+ * e.g., from the background scan state machine.
252+ *
253+ * In addition, do not stop monitor interface to allow it to be
254+ * used from user space controlled off-channel operations.
255+ */
256+ if (sdata->vif.type != NL80211_IFTYPE_STATION &&
257+ sdata->vif.type != NL80211_IFTYPE_MONITOR) {
258+ set_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
259 netif_tx_stop_all_queues(sdata->dev);
260- if (offchannel_ps_enable &&
261- (sdata->vif.type == NL80211_IFTYPE_STATION) &&
262- sdata->u.mgd.associated)
263- ieee80211_offchannel_ps_enable(sdata, true);
264 }
265 }
266 mutex_unlock(&local->iflist_mtx);
267 }
268
269-void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
270- bool tell_ap)
271+void ieee80211_offchannel_stop_station(struct ieee80211_local *local)
272 {
273 struct ieee80211_sub_if_data *sdata;
274
275+ /*
276+ * notify the AP about us leaving the channel and stop all STA interfaces
277+ */
278 mutex_lock(&local->iflist_mtx);
279 list_for_each_entry(sdata, &local->interfaces, list) {
280 if (!ieee80211_sdata_running(sdata))
281 continue;
282
283- if (sdata->vif.type == NL80211_IFTYPE_STATION &&
284- sdata->u.mgd.associated)
285- ieee80211_offchannel_ps_enable(sdata, tell_ap);
286+ if (sdata->vif.type == NL80211_IFTYPE_STATION) {
287+ set_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
288+ netif_tx_stop_all_queues(sdata->dev);
289+ if (sdata->u.mgd.associated)
290+ ieee80211_offchannel_ps_enable(sdata);
291+ }
292 }
293 mutex_unlock(&local->iflist_mtx);
294 }
295
296 void ieee80211_offchannel_return(struct ieee80211_local *local,
297- bool enable_beaconing,
298- bool offchannel_ps_disable)
299+ bool enable_beaconing)
300 {
301 struct ieee80211_sub_if_data *sdata;
302
303@@ -167,8 +162,7 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
304 continue;
305
306 /* Tell AP we're back */
307- if (offchannel_ps_disable &&
308- sdata->vif.type == NL80211_IFTYPE_STATION) {
309+ if (sdata->vif.type == NL80211_IFTYPE_STATION) {
310 if (sdata->u.mgd.associated)
311 ieee80211_offchannel_ps_disable(sdata);
312 }
313@@ -188,7 +182,7 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
314 netif_tx_wake_all_queues(sdata->dev);
315 }
316
317- /* Check to see if we should re-enable beaconing */
318+ /* re-enable beaconing */
319 if (enable_beaconing &&
320 (sdata->vif.type == NL80211_IFTYPE_AP ||
321 sdata->vif.type == NL80211_IFTYPE_ADHOC ||
322diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
323index fb123e2..5c51607 100644
324--- a/net/mac80211/rx.c
325+++ b/net/mac80211/rx.c
326@@ -421,10 +421,16 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
327 return RX_CONTINUE;
328
329 if (test_bit(SCAN_HW_SCANNING, &local->scanning) ||
330- test_bit(SCAN_SW_SCANNING, &local->scanning) ||
331 local->sched_scanning)
332 return ieee80211_scan_rx(rx->sdata, skb);
333
334+ if (test_bit(SCAN_SW_SCANNING, &local->scanning)) {
335+ /* drop all the other packets during a software scan anyway */
336+ if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED)
337+ dev_kfree_skb(skb);
338+ return RX_QUEUED;
339+ }
340+
341 /* scanning finished during invoking of handlers */
342 I802_DEBUG_INC(local->rx_handlers_drop_passive_scan);
343 return RX_DROP_UNUSABLE;
344@@ -2858,7 +2864,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
345 local->dot11ReceivedFragmentCount++;
346
347 if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning) ||
348- test_bit(SCAN_SW_SCANNING, &local->scanning)))
349+ test_bit(SCAN_OFF_CHANNEL, &local->scanning)))
350 status->rx_flags |= IEEE80211_RX_IN_SCAN;
351
352 if (ieee80211_is_mgmt(fc))
353diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
354index 105436d..5279300 100644
355--- a/net/mac80211/scan.c
356+++ b/net/mac80211/scan.c
357@@ -213,14 +213,6 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
358 if (bss)
359 ieee80211_rx_bss_put(sdata->local, bss);
360
361- /* If we are on-operating-channel, and this packet is for the
362- * current channel, pass the pkt on up the stack so that
363- * the rest of the stack can make use of it.
364- */
365- if (ieee80211_cfg_on_oper_channel(sdata->local)
366- && (channel == sdata->local->oper_channel))
367- return RX_CONTINUE;
368-
369 dev_kfree_skb(skb);
370 return RX_QUEUED;
371 }
372@@ -264,8 +256,6 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,
373 bool was_hw_scan)
374 {
375 struct ieee80211_local *local = hw_to_local(hw);
376- bool on_oper_chan;
377- bool enable_beacons = false;
378
379 lockdep_assert_held(&local->mtx);
380
381@@ -298,25 +288,11 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,
382 local->scanning = 0;
383 local->scan_channel = NULL;
384
385- on_oper_chan = ieee80211_cfg_on_oper_channel(local);
386-
387- if (was_hw_scan || !on_oper_chan)
388- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
389- else
390- /* Set power back to normal operating levels. */
391- ieee80211_hw_config(local, 0);
392-
393+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
394 if (!was_hw_scan) {
395- bool on_oper_chan2;
396 ieee80211_configure_filter(local);
397 drv_sw_scan_complete(local);
398- on_oper_chan2 = ieee80211_cfg_on_oper_channel(local);
399- /* We should always be on-channel at this point. */
400- WARN_ON(!on_oper_chan2);
401- if (on_oper_chan2 && (on_oper_chan != on_oper_chan2))
402- enable_beacons = true;
403-
404- ieee80211_offchannel_return(local, enable_beacons, true);
405+ ieee80211_offchannel_return(local, true);
406 }
407
408 ieee80211_recalc_idle(local);
409@@ -357,15 +333,13 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
410 */
411 drv_sw_scan_start(local);
412
413+ ieee80211_offchannel_stop_beaconing(local);
414+
415 local->leave_oper_channel_time = 0;
416 local->next_scan_state = SCAN_DECISION;
417 local->scan_channel_idx = 0;
418
419- /* We always want to use off-channel PS, even if we
420- * are not really leaving oper-channel. Don't
421- * tell the AP though, as long as we are on-channel.
422- */
423- ieee80211_offchannel_enable_all_ps(local, false);
424+ drv_flush(local, false);
425
426 ieee80211_configure_filter(local);
427
428@@ -508,20 +482,7 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
429 }
430 mutex_unlock(&local->iflist_mtx);
431
432- next_chan = local->scan_req->channels[local->scan_channel_idx];
433-
434- if (ieee80211_cfg_on_oper_channel(local)) {
435- /* We're currently on operating channel. */
436- if (next_chan == local->oper_channel)
437- /* We don't need to move off of operating channel. */
438- local->next_scan_state = SCAN_SET_CHANNEL;
439- else
440- /*
441- * We do need to leave operating channel, as next
442- * scan is somewhere else.
443- */
444- local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL;
445- } else {
446+ if (local->scan_channel) {
447 /*
448 * we're currently scanning a different channel, let's
449 * see if we can scan another channel without interfering
450@@ -537,6 +498,7 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
451 *
452 * Otherwise switch back to the operating channel.
453 */
454+ next_chan = local->scan_req->channels[local->scan_channel_idx];
455
456 bad_latency = time_after(jiffies +
457 ieee80211_scan_get_channel_time(next_chan),
458@@ -554,6 +516,12 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
459 local->next_scan_state = SCAN_ENTER_OPER_CHANNEL;
460 else
461 local->next_scan_state = SCAN_SET_CHANNEL;
462+ } else {
463+ /*
464+ * we're on the operating channel currently, let's
465+ * leave that channel now to scan another one
466+ */
467+ local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL;
468 }
469
470 *next_delay = 0;
471@@ -562,10 +530,9 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
472 static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *local,
473 unsigned long *next_delay)
474 {
475- /* PS will already be in off-channel mode,
476- * we do that once at the beginning of scanning.
477- */
478- ieee80211_offchannel_stop_vifs(local, false);
479+ ieee80211_offchannel_stop_station(local);
480+
481+ __set_bit(SCAN_OFF_CHANNEL, &local->scanning);
482
483 /*
484 * What if the nullfunc frames didn't arrive?
485@@ -588,15 +555,15 @@ static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *loca
486 {
487 /* switch back to the operating channel */
488 local->scan_channel = NULL;
489- if (!ieee80211_cfg_on_oper_channel(local))
490- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
491+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
492
493 /*
494- * Re-enable vifs and beaconing. Leave PS
495- * in off-channel state..will put that back
496- * on-channel at the end of scanning.
497+ * Only re-enable station mode interface now; beaconing will be
498+ * re-enabled once the full scan has been completed.
499 */
500- ieee80211_offchannel_return(local, true, false);
501+ ieee80211_offchannel_return(local, false);
502+
503+ __clear_bit(SCAN_OFF_CHANNEL, &local->scanning);
504
505 *next_delay = HZ / 5;
506 local->next_scan_state = SCAN_DECISION;
507diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
508index 1f8b120..eff1f4e 100644
509--- a/net/mac80211/tx.c
510+++ b/net/mac80211/tx.c
511@@ -259,8 +259,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
512 if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED))
513 return TX_CONTINUE;
514
515- if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
516- test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
517+ if (unlikely(test_bit(SCAN_OFF_CHANNEL, &tx->local->scanning)) &&
518 !ieee80211_is_probe_req(hdr->frame_control) &&
519 !ieee80211_is_nullfunc(hdr->frame_control))
520 /*
521diff --git a/net/mac80211/work.c b/net/mac80211/work.c
522index 6c53b6d..99165ef 100644
523--- a/net/mac80211/work.c
524+++ b/net/mac80211/work.c
525@@ -899,26 +899,6 @@ static bool ieee80211_work_ct_coexists(enum nl80211_channel_type wk_ct,
526 return false;
527 }
528
529-static enum nl80211_channel_type
530-ieee80211_calc_ct(enum nl80211_channel_type wk_ct,
531- enum nl80211_channel_type oper_ct)
532-{
533- switch (wk_ct) {
534- case NL80211_CHAN_NO_HT:
535- return oper_ct;
536- case NL80211_CHAN_HT20:
537- if (oper_ct != NL80211_CHAN_NO_HT)
538- return oper_ct;
539- return wk_ct;
540- case NL80211_CHAN_HT40MINUS:
541- case NL80211_CHAN_HT40PLUS:
542- return wk_ct;
543- }
544- WARN_ON(1); /* shouldn't get here */
545- return wk_ct;
546-}
547-
548-
549 static void ieee80211_work_timer(unsigned long data)
550 {
551 struct ieee80211_local *local = (void *) data;
552@@ -969,52 +949,18 @@ static void ieee80211_work_work(struct work_struct *work)
553 }
554
555 if (!started && !local->tmp_channel) {
556- bool on_oper_chan;
557- bool tmp_chan_changed = false;
558- bool on_oper_chan2;
559- enum nl80211_channel_type wk_ct;
560- on_oper_chan = ieee80211_cfg_on_oper_channel(local);
561-
562- /* Work with existing channel type if possible. */
563- wk_ct = wk->chan_type;
564- if (wk->chan == local->hw.conf.channel)
565- wk_ct = ieee80211_calc_ct(wk->chan_type,
566- local->hw.conf.channel_type);
567-
568- if (local->tmp_channel)
569- if ((local->tmp_channel != wk->chan) ||
570- (local->tmp_channel_type != wk_ct))
571- tmp_chan_changed = true;
572-
573- local->tmp_channel = wk->chan;
574- local->tmp_channel_type = wk_ct;
575 /*
576- * Leave the station vifs in awake mode if they
577- * happen to be on the same channel as
578- * the requested channel.
579+ * TODO: could optimize this by leaving the
580+ * station vifs in awake mode if they
581+ * happen to be on the same channel as
582+ * the requested channel
583 */
584- on_oper_chan2 = ieee80211_cfg_on_oper_channel(local);
585- if (on_oper_chan != on_oper_chan2) {
586- if (on_oper_chan2) {
587- /* going off oper channel, PS too */
588- ieee80211_offchannel_stop_vifs(local,
589- true);
590- ieee80211_hw_config(local, 0);
591- } else {
592- /* going on channel, but leave PS
593- * off-channel. */
594- ieee80211_hw_config(local, 0);
595- ieee80211_offchannel_return(local,
596- true,
597- false);
598- }
599- } else if (tmp_chan_changed)
600- /* Still off-channel, but on some other
601- * channel, so update hardware.
602- * PS should already be off-channel.
603- */
604- ieee80211_hw_config(local, 0);
605+ ieee80211_offchannel_stop_beaconing(local);
606+ ieee80211_offchannel_stop_station(local);
607
608+ local->tmp_channel = wk->chan;
609+ local->tmp_channel_type = wk->chan_type;
610+ ieee80211_hw_config(local, 0);
611 started = true;
612 wk->timeout = jiffies;
613 }
614@@ -1100,8 +1046,7 @@ static void ieee80211_work_work(struct work_struct *work)
615 * we still need to do a hardware config. Currently,
616 * we cannot be here while scanning, however.
617 */
618- if (!ieee80211_cfg_on_oper_channel(local))
619- ieee80211_hw_config(local, 0);
620+ ieee80211_hw_config(local, 0);
621
622 /* At the least, we need to disable offchannel_ps,
623 * so just go ahead and run the entire offchannel
624@@ -1109,7 +1054,7 @@ static void ieee80211_work_work(struct work_struct *work)
625 * beaconing if we were already on-oper-channel
626 * as a future optimization.
627 */
628- ieee80211_offchannel_return(local, true, true);
629+ ieee80211_offchannel_return(local, true);
630
631 /* give connection some time to breathe */
632 run_again(local, jiffies + HZ/2);
633--
6341.7.7.4
635
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch
new file mode 100644
index 00000000..92f44035
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch
@@ -0,0 +1,60 @@
1From 4b66a35b31fdc078582e40ec3cc0ee12abbffd17 Mon Sep 17 00:00:00 2001
2From: Chris Bagwell <chris@cnpbagwell.com>
3Date: Wed, 23 Nov 2011 10:54:27 +0100
4Subject: [PATCH 081/130] HID: hid-multitouch - add another eGalax id
5
6commit 1fd8f047490dd0ec4e4db710fcbc1bd4798d944c upstream.
7
8This allows ASUS Eee Slate touchscreens to work.
9
10Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
11Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
12Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14---
15 drivers/hid/hid-core.c | 1 +
16 drivers/hid/hid-ids.h | 1 +
17 drivers/hid/hid-multitouch.c | 3 +++
18 3 files changed, 5 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
21index 1473067..b51cbf2 100644
22--- a/drivers/hid/hid-core.c
23+++ b/drivers/hid/hid-core.c
24@@ -1409,6 +1409,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
25 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) },
26 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) },
27 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) },
28+ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) },
29 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
30 { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) },
31 { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
32diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
33index 4a441a6..4c9a342 100644
34--- a/drivers/hid/hid-ids.h
35+++ b/drivers/hid/hid-ids.h
36@@ -235,6 +235,7 @@
37 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2 0x72a1
38 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3 0x480e
39 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4 0x726b
40+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5 0xa001
41
42 #define USB_VENDOR_ID_ELECOM 0x056e
43 #define USB_DEVICE_ID_ELECOM_BM084 0x0061
44diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
45index f1c909f..a59d939 100644
46--- a/drivers/hid/hid-multitouch.c
47+++ b/drivers/hid/hid-multitouch.c
48@@ -662,6 +662,9 @@ static const struct hid_device_id mt_devices[] = {
49 { .driver_data = MT_CLS_EGALAX,
50 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
51 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) },
52+ { .driver_data = MT_CLS_EGALAX,
53+ HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
54+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) },
55
56 /* Elo TouchSystems IntelliTouch Plus panel */
57 { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID,
58--
591.7.7.4
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch
new file mode 100644
index 00000000..db1d435e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch
@@ -0,0 +1,112 @@
1From e5664bb7172d41e38788a503d6e33d14af866fb5 Mon Sep 17 00:00:00 2001
2From: Benjamin Tissoires <benjamin.tissoires@enac.fr>
3Date: Wed, 23 Nov 2011 10:54:31 +0100
4Subject: [PATCH 082/130] HID: multitouch: cleanup with eGalax PID definitions
5
6commit e36f690b37945e0a9bb1554e1546eeec93f7d1f6 upstream.
7
8This is just a renaming of USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH{N}
9to USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_{PID} to handle more eGalax
10devices.
11
12Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
13Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/hid/hid-core.c | 12 ++++++------
17 drivers/hid/hid-ids.h | 12 ++++++------
18 drivers/hid/hid-multitouch.c | 24 ++++++++++++------------
19 3 files changed, 24 insertions(+), 24 deletions(-)
20
21diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
22index b51cbf2..4434aba 100644
23--- a/drivers/hid/hid-core.c
24+++ b/drivers/hid/hid-core.c
25@@ -1404,12 +1404,12 @@ static const struct hid_device_id hid_have_special_driver[] = {
26 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_TRUETOUCH) },
27 { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
28 { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
29- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) },
30- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) },
31- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) },
32- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) },
33- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) },
34- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) },
35+ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) },
36+ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) },
37+ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) },
38+ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) },
39+ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) },
40+ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) },
41 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
42 { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) },
43 { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
44diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
45index 4c9a342..9db8789 100644
46--- a/drivers/hid/hid-ids.h
47+++ b/drivers/hid/hid-ids.h
48@@ -230,12 +230,12 @@
49
50 #define USB_VENDOR_ID_DWAV 0x0eef
51 #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001
52-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d
53-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c
54-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2 0x72a1
55-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3 0x480e
56-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4 0x726b
57-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5 0xa001
58+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d
59+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e
60+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c
61+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b
62+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1
63+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001
64
65 #define USB_VENDOR_ID_ELECOM 0x056e
66 #define USB_DEVICE_ID_ELECOM_BM084 0x0061
67diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
68index a59d939..815bd22 100644
69--- a/drivers/hid/hid-multitouch.c
70+++ b/drivers/hid/hid-multitouch.c
71@@ -645,26 +645,26 @@ static const struct hid_device_id mt_devices[] = {
72 USB_DEVICE_ID_CYPRESS_TRUETOUCH) },
73
74 /* eGalax devices (resistive) */
75- { .driver_data = MT_CLS_EGALAX,
76+ { .driver_data = MT_CLS_EGALAX,
77 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
78- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) },
79- { .driver_data = MT_CLS_EGALAX,
80+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) },
81+ { .driver_data = MT_CLS_EGALAX,
82 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
83- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) },
84+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) },
85
86 /* eGalax devices (capacitive) */
87- { .driver_data = MT_CLS_EGALAX,
88+ { .driver_data = MT_CLS_EGALAX,
89 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
90- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) },
91- { .driver_data = MT_CLS_EGALAX,
92+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) },
93+ { .driver_data = MT_CLS_EGALAX,
94 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
95- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) },
96- { .driver_data = MT_CLS_EGALAX,
97+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) },
98+ { .driver_data = MT_CLS_EGALAX,
99 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
100- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) },
101- { .driver_data = MT_CLS_EGALAX,
102+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) },
103+ { .driver_data = MT_CLS_EGALAX,
104 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
105- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) },
106+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) },
107
108 /* Elo TouchSystems IntelliTouch Plus panel */
109 { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID,
110--
1111.7.7.4
112
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch
new file mode 100644
index 00000000..086ffed0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch
@@ -0,0 +1,62 @@
1From f8c7a53e06ce63f80f74db3c6582be6d07ad0318 Mon Sep 17 00:00:00 2001
2From: Marek Vasut <marek.vasut@gmail.com>
3Date: Wed, 23 Nov 2011 10:54:32 +0100
4Subject: [PATCH 083/130] HID: multitouch: Add egalax ID for Acer Iconia W500
5
6commit bb9ff21072043634f147c05ac65dbf8185d4af6d upstream.
7
8This patch adds USB ID for the touchpanel in Acer Iconia W500. The panel
9supports up to five fingers, therefore the need for a new addition of panel
10types.
11
12Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
13Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
14Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/hid/hid-core.c | 1 +
18 drivers/hid/hid-ids.h | 1 +
19 drivers/hid/hid-multitouch.c | 3 +++
20 3 files changed, 5 insertions(+), 0 deletions(-)
21
22diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
23index 4434aba..9cee7b2 100644
24--- a/drivers/hid/hid-core.c
25+++ b/drivers/hid/hid-core.c
26@@ -1409,6 +1409,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
27 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) },
28 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) },
29 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) },
30+ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) },
31 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) },
32 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
33 { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) },
34diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
35index 9db8789..9eb90b1 100644
36--- a/drivers/hid/hid-ids.h
37+++ b/drivers/hid/hid-ids.h
38@@ -235,6 +235,7 @@
39 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c
40 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b
41 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1
42+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302
43 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001
44
45 #define USB_VENDOR_ID_ELECOM 0x056e
46diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
47index 815bd22..c77d495 100644
48--- a/drivers/hid/hid-multitouch.c
49+++ b/drivers/hid/hid-multitouch.c
50@@ -664,6 +664,9 @@ static const struct hid_device_id mt_devices[] = {
51 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) },
52 { .driver_data = MT_CLS_EGALAX,
53 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
54+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) },
55+ { .driver_data = MT_CLS_EGALAX,
56+ HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
57 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) },
58
59 /* Elo TouchSystems IntelliTouch Plus panel */
60--
611.7.7.4
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch
new file mode 100644
index 00000000..885ca10b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch
@@ -0,0 +1,49 @@
1From 5b2c651d5496aad3c5359e72fc6eb6efcadecc4e Mon Sep 17 00:00:00 2001
2From: Benjamin Tissoires <benjamin.tissoires@enac.fr>
3Date: Wed, 23 Nov 2011 10:54:33 +0100
4Subject: [PATCH 084/130] HID: multitouch: add support for the MSI Windpad
5 110W
6
7commit 66f06127f34ad6e8a1b24a2c03144b694d19f99f upstream.
8
9Just another eGalax device.
10Please note that adding this device to have_special_driver
11in hid-core.c is not required anymore.
12
13Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
14Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/hid/hid-ids.h | 1 +
18 drivers/hid/hid-multitouch.c | 3 +++
19 2 files changed, 4 insertions(+), 0 deletions(-)
20
21diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
22index 9eb90b1..6ccd7df 100644
23--- a/drivers/hid/hid-ids.h
24+++ b/drivers/hid/hid-ids.h
25@@ -235,6 +235,7 @@
26 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c
27 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b
28 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1
29+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA 0x72fa
30 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302
31 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001
32
33diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
34index c77d495..6f6b1d9 100644
35--- a/drivers/hid/hid-multitouch.c
36+++ b/drivers/hid/hid-multitouch.c
37@@ -664,6 +664,9 @@ static const struct hid_device_id mt_devices[] = {
38 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) },
39 { .driver_data = MT_CLS_EGALAX,
40 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
41+ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA) },
42+ { .driver_data = MT_CLS_EGALAX,
43+ HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
44 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) },
45 { .driver_data = MT_CLS_EGALAX,
46 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
47--
481.7.7.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch
new file mode 100644
index 00000000..e67f9256
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch
@@ -0,0 +1,63 @@
1From 6da88efbdd98ef411f670b51ad6ab0ca5e3a753b Mon Sep 17 00:00:00 2001
2From: Benjamin Tissoires <benjamin.tissoires@enac.fr>
3Date: Tue, 29 Nov 2011 13:13:12 +0100
4Subject: [PATCH 085/130] HID: hid-multitouch: add support for new Hanvon
5 panels
6
7commit 545803651da8dde248eeb8ce3ed1e547e9e4ac0a upstream.
8
9Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
10Acked-by: Henrik Rydberg <rydberg@euromail.se>
11Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13---
14 drivers/hid/hid-core.c | 1 +
15 drivers/hid/hid-ids.h | 3 +++
16 drivers/hid/hid-multitouch.c | 5 +++++
17 3 files changed, 9 insertions(+), 0 deletions(-)
18
19diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
20index 9cee7b2..a1cb906 100644
21--- a/drivers/hid/hid-core.c
22+++ b/drivers/hid/hid-core.c
23@@ -1425,6 +1425,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
24 { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
25 { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
26 { HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) },
27+ { HID_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT, USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) },
28 { HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6650) },
29 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) },
30 { HID_USB_DEVICE(USB_VENDOR_ID_ILITEK, USB_DEVICE_ID_ILITEK_MULTITOUCH) },
31diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
32index 6ccd7df..56df290 100644
33--- a/drivers/hid/hid-ids.h
34+++ b/drivers/hid/hid-ids.h
35@@ -359,6 +359,9 @@
36 #define USB_VENDOR_ID_HANVON 0x20b3
37 #define USB_DEVICE_ID_HANVON_MULTITOUCH 0x0a18
38
39+#define USB_VENDOR_ID_HANVON_ALT 0x22ed
40+#define USB_DEVICE_ID_HANVON_ALT_MULTITOUCH 0x1010
41+
42 #define USB_VENDOR_ID_HAPP 0x078b
43 #define USB_DEVICE_ID_UGCI_DRIVING 0x0010
44 #define USB_DEVICE_ID_UGCI_FLYING 0x0020
45diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
46index 6f6b1d9..ea20c8e 100644
47--- a/drivers/hid/hid-multitouch.c
48+++ b/drivers/hid/hid-multitouch.c
49@@ -687,6 +687,11 @@ static const struct hid_device_id mt_devices[] = {
50 HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH,
51 USB_DEVICE_ID_GOODTOUCH_000f) },
52
53+ /* Hanvon panels */
54+ { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
55+ HID_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT,
56+ USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) },
57+
58 /* Ideacom panel */
59 { .driver_data = MT_CLS_SERIAL,
60 HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM,
61--
621.7.7.4
63
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch
new file mode 100644
index 00000000..1c03e1df
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch
@@ -0,0 +1,63 @@
1From ba791aa0bf69b20ba364329edc62dc04ddb86dfc Mon Sep 17 00:00:00 2001
2From: Benjamin Tissoires <benjamin.tissoires@gmail.com>
3Date: Fri, 23 Dec 2011 15:40:59 +0100
4Subject: [PATCH 086/130] HID: multitouch: add support of Atmel multitouch
5 panels
6
7commit b105712469d957cf1ab223c1ea72b7ba88edb926 upstream.
8
9Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10Acked-by: Henrik Rydberg <rydberg@euromail.se>
11Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13---
14 drivers/hid/Kconfig | 1 +
15 drivers/hid/hid-ids.h | 3 +++
16 drivers/hid/hid-multitouch.c | 5 +++++
17 3 files changed, 9 insertions(+), 0 deletions(-)
18
19diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
20index 332c22a..36f5df3 100644
21--- a/drivers/hid/Kconfig
22+++ b/drivers/hid/Kconfig
23@@ -335,6 +335,7 @@ config HID_MULTITOUCH
24 Say Y here if you have one of the following devices:
25 - 3M PCT touch screens
26 - ActionStar dual touch panels
27+ - Atmel panels
28 - Cando dual touch panels
29 - Chunghwa panels
30 - CVTouch panels
31diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
32index 56df290..bf95a50 100644
33--- a/drivers/hid/hid-ids.h
34+++ b/drivers/hid/hid-ids.h
35@@ -145,6 +145,9 @@
36 #define USB_DEVICE_ID_ATEN_4PORTKVM 0x2205
37 #define USB_DEVICE_ID_ATEN_4PORTKVMC 0x2208
38
39+#define USB_VENDOR_ID_ATMEL 0x03eb
40+#define USB_DEVICE_ID_ATMEL_MULTITOUCH 0x211c
41+
42 #define USB_VENDOR_ID_AVERMEDIA 0x07ca
43 #define USB_DEVICE_ID_AVER_FM_MR800 0xb800
44
45diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
46index ea20c8e..7f83024 100644
47--- a/drivers/hid/hid-multitouch.c
48+++ b/drivers/hid/hid-multitouch.c
49@@ -615,6 +615,11 @@ static const struct hid_device_id mt_devices[] = {
50 HID_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR,
51 USB_DEVICE_ID_ACTIONSTAR_1011) },
52
53+ /* Atmel panels */
54+ { .driver_data = MT_CLS_SERIAL,
55+ HID_USB_DEVICE(USB_VENDOR_ID_ATMEL,
56+ USB_DEVICE_ID_ATMEL_MULTITOUCH) },
57+
58 /* Cando panels */
59 { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
60 HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
61--
621.7.7.4
63
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch
new file mode 100644
index 00000000..e87a4085
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch
@@ -0,0 +1,45 @@
1From 59e1439e23925a4029af1ba09e54e57d6824d6af Mon Sep 17 00:00:00 2001
2From: Benjamin Tissoires <benjamin.tissoires@gmail.com>
3Date: Fri, 23 Dec 2011 15:41:00 +0100
4Subject: [PATCH 087/130] HID: multitouch: add support for 3M 32"
5
6commit c4fad877cd0efb51d8180ae2eaa791c99c92051c upstream.
7
8Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
9Acked-by: Henrik Rydberg <rydberg@euromail.se>
10Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12---
13 drivers/hid/hid-ids.h | 1 +
14 drivers/hid/hid-multitouch.c | 3 +++
15 2 files changed, 4 insertions(+), 0 deletions(-)
16
17diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
18index bf95a50..6e53391a 100644
19--- a/drivers/hid/hid-ids.h
20+++ b/drivers/hid/hid-ids.h
21@@ -21,6 +21,7 @@
22 #define USB_VENDOR_ID_3M 0x0596
23 #define USB_DEVICE_ID_3M1968 0x0500
24 #define USB_DEVICE_ID_3M2256 0x0502
25+#define USB_DEVICE_ID_3M3266 0x0506
26
27 #define USB_VENDOR_ID_A4TECH 0x09da
28 #define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006
29diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
30index 7f83024..4a63dee 100644
31--- a/drivers/hid/hid-multitouch.c
32+++ b/drivers/hid/hid-multitouch.c
33@@ -609,6 +609,9 @@ static const struct hid_device_id mt_devices[] = {
34 { .driver_data = MT_CLS_3M,
35 HID_USB_DEVICE(USB_VENDOR_ID_3M,
36 USB_DEVICE_ID_3M2256) },
37+ { .driver_data = MT_CLS_3M,
38+ HID_USB_DEVICE(USB_VENDOR_ID_3M,
39+ USB_DEVICE_ID_3M3266) },
40
41 /* ActionStar panels */
42 { .driver_data = MT_CLS_DEFAULT,
43--
441.7.7.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch
new file mode 100644
index 00000000..9a51d31d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch
@@ -0,0 +1,117 @@
1From 9f0708248c8226860e4fbb4492575f7128e593d5 Mon Sep 17 00:00:00 2001
2From: Masatoshi Hoshikawa <hoshikawa@xiroku.com>
3Date: Thu, 5 Jan 2012 11:53:46 +0900
4Subject: [PATCH 088/130] HID: hid-multitouch: add support 9 new Xiroku
5 devices
6
7commit 11576c6114c3b6505aea2e0c988bedb856a0e20c upstream.
8
9This patch adds support for the Xiroku Inc. panels (SPX/MPX/CSR/etc.).
10
11Signed-off-by: Masatoshi Hoshikawa <hoshikawa@xiroku.com>
12Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14---
15 drivers/hid/Kconfig | 1 +
16 drivers/hid/hid-core.c | 9 +++++++++
17 drivers/hid/hid-ids.h | 11 +++++++++++
18 drivers/hid/hid-multitouch.c | 29 +++++++++++++++++++++++++++++
19 4 files changed, 50 insertions(+), 0 deletions(-)
20
21diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
22index 36f5df3..d21f6d0 100644
23--- a/drivers/hid/Kconfig
24+++ b/drivers/hid/Kconfig
25@@ -356,6 +356,7 @@ config HID_MULTITOUCH
26 - Touch International Panels
27 - Unitec Panels
28 - XAT optical touch panels
29+ - Xiroku optical touch panels
30
31 If unsure, say N.
32
33diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
34index a1cb906..bb656d8 100644
35--- a/drivers/hid/hid-core.c
36+++ b/drivers/hid/hid-core.c
37@@ -1552,6 +1552,15 @@ static const struct hid_device_id hid_have_special_driver[] = {
38 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) },
39 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH) },
40 { HID_USB_DEVICE(USB_VENDOR_ID_XAT, USB_DEVICE_ID_XAT_CSR) },
41+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_SPX) },
42+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_MPX) },
43+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_CSR) },
44+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_SPX1) },
45+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_MPX1) },
46+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_CSR1) },
47+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_SPX2) },
48+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_MPX2) },
49+ { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_CSR2) },
50 { HID_USB_DEVICE(USB_VENDOR_ID_X_TENSIONS, USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE) },
51 { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) },
52 { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
53diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
54index 6e53391a..00cabb3 100644
55--- a/drivers/hid/hid-ids.h
56+++ b/drivers/hid/hid-ids.h
57@@ -717,6 +717,17 @@
58 #define USB_VENDOR_ID_XAT 0x2505
59 #define USB_DEVICE_ID_XAT_CSR 0x0220
60
61+#define USB_VENDOR_ID_XIROKU 0x1477
62+#define USB_DEVICE_ID_XIROKU_SPX 0x1006
63+#define USB_DEVICE_ID_XIROKU_MPX 0x1007
64+#define USB_DEVICE_ID_XIROKU_CSR 0x100e
65+#define USB_DEVICE_ID_XIROKU_SPX1 0x1021
66+#define USB_DEVICE_ID_XIROKU_CSR1 0x1022
67+#define USB_DEVICE_ID_XIROKU_MPX1 0x1023
68+#define USB_DEVICE_ID_XIROKU_SPX2 0x1024
69+#define USB_DEVICE_ID_XIROKU_CSR2 0x1025
70+#define USB_DEVICE_ID_XIROKU_MPX2 0x1026
71+
72 #define USB_VENDOR_ID_YEALINK 0x6993
73 #define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K 0xb001
74
75diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
76index 4a63dee..995fc4c 100644
77--- a/drivers/hid/hid-multitouch.c
78+++ b/drivers/hid/hid-multitouch.c
79@@ -780,6 +780,35 @@ static const struct hid_device_id mt_devices[] = {
80 HID_USB_DEVICE(USB_VENDOR_ID_XAT,
81 USB_DEVICE_ID_XAT_CSR) },
82
83+ /* Xiroku */
84+ { .driver_data = MT_CLS_DEFAULT,
85+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
86+ USB_DEVICE_ID_XIROKU_SPX) },
87+ { .driver_data = MT_CLS_DEFAULT,
88+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
89+ USB_DEVICE_ID_XIROKU_MPX) },
90+ { .driver_data = MT_CLS_DEFAULT,
91+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
92+ USB_DEVICE_ID_XIROKU_CSR) },
93+ { .driver_data = MT_CLS_DEFAULT,
94+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
95+ USB_DEVICE_ID_XIROKU_SPX1) },
96+ { .driver_data = MT_CLS_DEFAULT,
97+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
98+ USB_DEVICE_ID_XIROKU_MPX1) },
99+ { .driver_data = MT_CLS_DEFAULT,
100+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
101+ USB_DEVICE_ID_XIROKU_CSR1) },
102+ { .driver_data = MT_CLS_DEFAULT,
103+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
104+ USB_DEVICE_ID_XIROKU_SPX2) },
105+ { .driver_data = MT_CLS_DEFAULT,
106+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
107+ USB_DEVICE_ID_XIROKU_MPX2) },
108+ { .driver_data = MT_CLS_DEFAULT,
109+ HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
110+ USB_DEVICE_ID_XIROKU_CSR2) },
111+
112 { }
113 };
114 MODULE_DEVICE_TABLE(hid, mt_devices);
115--
1161.7.7.4
117
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch
new file mode 100644
index 00000000..ba211f09
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch
@@ -0,0 +1,49 @@
1From 7d6b552faf6a591c44f680e3e897a1bd6471985a Mon Sep 17 00:00:00 2001
2From: Martin Schwidefsky <schwidefsky@de.ibm.com>
3Date: Thu, 15 Dec 2011 14:56:10 +0100
4Subject: [PATCH 089/130] fix cputime overflow in uptime_proc_show
5
6commit c3e0ef9a298e028a82ada28101ccd5cf64d209ee upstream.
7
8For 32-bit architectures using standard jiffies the idletime calculation
9in uptime_proc_show will quickly overflow. It takes (2^32 / HZ) seconds
10of idle-time, or e.g. 12.45 days with no load on a quad-core with HZ=1000.
11Switch to 64-bit calculations.
12
13Cc: Michael Abbott <michael.abbott@diamond.ac.uk>
14Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 fs/proc/uptime.c | 9 +++++++--
18 1 files changed, 7 insertions(+), 2 deletions(-)
19
20diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
21index 766b1d4..29166ec 100644
22--- a/fs/proc/uptime.c
23+++ b/fs/proc/uptime.c
24@@ -11,15 +11,20 @@ static int uptime_proc_show(struct seq_file *m, void *v)
25 {
26 struct timespec uptime;
27 struct timespec idle;
28+ cputime64_t idletime;
29+ u64 nsec;
30+ u32 rem;
31 int i;
32- cputime_t idletime = cputime_zero;
33
34+ idletime = 0;
35 for_each_possible_cpu(i)
36 idletime = cputime64_add(idletime, kstat_cpu(i).cpustat.idle);
37
38 do_posix_clock_monotonic_gettime(&uptime);
39 monotonic_to_bootbased(&uptime);
40- cputime_to_timespec(idletime, &idle);
41+ nsec = cputime64_to_jiffies64(idletime) * TICK_NSEC;
42+ idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
43+ idle.tv_nsec = rem;
44 seq_printf(m, "%lu.%02lu %lu.%02lu\n",
45 (unsigned long) uptime.tv_sec,
46 (uptime.tv_nsec / (NSEC_PER_SEC / 100)),
47--
481.7.7.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch
new file mode 100644
index 00000000..943cf412
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch
@@ -0,0 +1,166 @@
1From 4adb778fc31d3c9c7707167165b07138f31c78c4 Mon Sep 17 00:00:00 2001
2From: Paolo Bonzini <pbonzini@redhat.com>
3Date: Thu, 12 Jan 2012 16:01:27 +0100
4Subject: [PATCH 090/130] block: add and use scsi_blk_cmd_ioctl
5
6commit 577ebb374c78314ac4617242f509e2f5e7156649 upstream.
7
8Introduce a wrapper around scsi_cmd_ioctl that takes a block device.
9
10The function will then be enhanced to detect partition block devices
11and, in that case, subject the ioctls to whitelisting.
12
13Cc: linux-scsi@vger.kernel.org
14Cc: Jens Axboe <axboe@kernel.dk>
15Cc: James Bottomley <JBottomley@parallels.com>
16Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
17Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 block/scsi_ioctl.c | 7 +++++++
21 drivers/block/cciss.c | 6 +++---
22 drivers/block/ub.c | 3 +--
23 drivers/block/virtio_blk.c | 4 ++--
24 drivers/cdrom/cdrom.c | 3 +--
25 drivers/ide/ide-floppy_ioctl.c | 3 +--
26 drivers/scsi/sd.c | 2 +-
27 include/linux/blkdev.h | 2 ++
28 8 files changed, 18 insertions(+), 12 deletions(-)
29
30diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
31index fbdf0d8..a2c11f3 100644
32--- a/block/scsi_ioctl.c
33+++ b/block/scsi_ioctl.c
34@@ -690,6 +690,13 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod
35 }
36 EXPORT_SYMBOL(scsi_cmd_ioctl);
37
38+int scsi_cmd_blk_ioctl(struct block_device *bd, fmode_t mode,
39+ unsigned int cmd, void __user *arg)
40+{
41+ return scsi_cmd_ioctl(bd->bd_disk->queue, bd->bd_disk, mode, cmd, arg);
42+}
43+EXPORT_SYMBOL(scsi_cmd_blk_ioctl);
44+
45 static int __init blk_scsi_ioctl_init(void)
46 {
47 blk_set_cmd_filter_defaults(&blk_default_cmd_filter);
48diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
49index 587cce5..b0f553b 100644
50--- a/drivers/block/cciss.c
51+++ b/drivers/block/cciss.c
52@@ -1735,7 +1735,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
53 case CCISS_BIG_PASSTHRU:
54 return cciss_bigpassthru(h, argp);
55
56- /* scsi_cmd_ioctl handles these, below, though some are not */
57+ /* scsi_cmd_blk_ioctl handles these, below, though some are not */
58 /* very meaningful for cciss. SG_IO is the main one people want. */
59
60 case SG_GET_VERSION_NUM:
61@@ -1746,9 +1746,9 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
62 case SG_EMULATED_HOST:
63 case SG_IO:
64 case SCSI_IOCTL_SEND_COMMAND:
65- return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
66+ return scsi_cmd_blk_ioctl(bdev, mode, cmd, argp);
67
68- /* scsi_cmd_ioctl would normally handle these, below, but */
69+ /* scsi_cmd_blk_ioctl would normally handle these, below, but */
70 /* they aren't a good fit for cciss, as CD-ROMs are */
71 /* not supported, and we don't have any bus/target/lun */
72 /* which we present to the kernel. */
73diff --git a/drivers/block/ub.c b/drivers/block/ub.c
74index 0e376d4..7333b9e 100644
75--- a/drivers/block/ub.c
76+++ b/drivers/block/ub.c
77@@ -1744,12 +1744,11 @@ static int ub_bd_release(struct gendisk *disk, fmode_t mode)
78 static int ub_bd_ioctl(struct block_device *bdev, fmode_t mode,
79 unsigned int cmd, unsigned long arg)
80 {
81- struct gendisk *disk = bdev->bd_disk;
82 void __user *usermem = (void __user *) arg;
83 int ret;
84
85 mutex_lock(&ub_mutex);
86- ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, usermem);
87+ ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, usermem);
88 mutex_unlock(&ub_mutex);
89
90 return ret;
91diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
92index 4d0b70a..e46f2f7 100644
93--- a/drivers/block/virtio_blk.c
94+++ b/drivers/block/virtio_blk.c
95@@ -243,8 +243,8 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
96 if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
97 return -ENOTTY;
98
99- return scsi_cmd_ioctl(disk->queue, disk, mode, cmd,
100- (void __user *)data);
101+ return scsi_cmd_blk_ioctl(bdev, mode, cmd,
102+ (void __user *)data);
103 }
104
105 /* We provide getgeo only to please some old bootloader/partitioning tools */
106diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
107index f997c27..cedb231 100644
108--- a/drivers/cdrom/cdrom.c
109+++ b/drivers/cdrom/cdrom.c
110@@ -2747,12 +2747,11 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
111 {
112 void __user *argp = (void __user *)arg;
113 int ret;
114- struct gendisk *disk = bdev->bd_disk;
115
116 /*
117 * Try the generic SCSI command ioctl's first.
118 */
119- ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
120+ ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp);
121 if (ret != -ENOTTY)
122 return ret;
123
124diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c
125index d267b7a..a22ca84 100644
126--- a/drivers/ide/ide-floppy_ioctl.c
127+++ b/drivers/ide/ide-floppy_ioctl.c
128@@ -292,8 +292,7 @@ int ide_floppy_ioctl(ide_drive_t *drive, struct block_device *bdev,
129 * and CDROM_SEND_PACKET (legacy) ioctls
130 */
131 if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND)
132- err = scsi_cmd_ioctl(bdev->bd_disk->queue, bdev->bd_disk,
133- mode, cmd, argp);
134+ err = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp);
135
136 if (err == -ENOTTY)
137 err = generic_ide_ioctl(drive, bdev, cmd, arg);
138diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
139index fa3a591..ffa1c79 100644
140--- a/drivers/scsi/sd.c
141+++ b/drivers/scsi/sd.c
142@@ -1096,7 +1096,7 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode,
143 error = scsi_ioctl(sdp, cmd, p);
144 break;
145 default:
146- error = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, p);
147+ error = scsi_cmd_blk_ioctl(bdev, mode, cmd, p);
148 if (error != -ENOTTY)
149 break;
150 error = scsi_ioctl(sdp, cmd, p);
151diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
152index 94acd81..ca7b869 100644
153--- a/include/linux/blkdev.h
154+++ b/include/linux/blkdev.h
155@@ -675,6 +675,8 @@ extern int blk_insert_cloned_request(struct request_queue *q,
156 struct request *rq);
157 extern void blk_delay_queue(struct request_queue *, unsigned long);
158 extern void blk_recount_segments(struct request_queue *, struct bio *);
159+extern int scsi_cmd_blk_ioctl(struct block_device *, fmode_t,
160+ unsigned int, void __user *);
161 extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t,
162 unsigned int, void __user *);
163 extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t,
164--
1651.7.7.4
166
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch
new file mode 100644
index 00000000..50747707
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch
@@ -0,0 +1,166 @@
1From b4bc30558b98e2eba6f6d86239d49bf3d60015cb Mon Sep 17 00:00:00 2001
2From: Paolo Bonzini <pbonzini@redhat.com>
3Date: Thu, 12 Jan 2012 16:01:28 +0100
4Subject: [PATCH 091/130] block: fail SCSI passthrough ioctls on partition
5 devices
6
7commit 0bfc96cb77224736dfa35c3c555d37b3646ef35e upstream.
8
9[ Changes with respect to 3.3: return -ENOTTY from scsi_verify_blk_ioctl
10 and -ENOIOCTLCMD from sd_compat_ioctl. ]
11
12Linux allows executing the SG_IO ioctl on a partition or LVM volume, and
13will pass the command to the underlying block device. This is
14well-known, but it is also a large security problem when (via Unix
15permissions, ACLs, SELinux or a combination thereof) a program or user
16needs to be granted access only to part of the disk.
17
18This patch lets partitions forward a small set of harmless ioctls;
19others are logged with printk so that we can see which ioctls are
20actually sent. In my tests only CDROM_GET_CAPABILITY actually occurred.
21Of course it was being sent to a (partition on a) hard disk, so it would
22have failed with ENOTTY and the patch isn't changing anything in
23practice. Still, I'm treating it specially to avoid spamming the logs.
24
25In principle, this restriction should include programs running with
26CAP_SYS_RAWIO. If for example I let a program access /dev/sda2 and
27/dev/sdb, it still should not be able to read/write outside the
28boundaries of /dev/sda2 independent of the capabilities. However, for
29now programs with CAP_SYS_RAWIO will still be allowed to send the
30ioctls. Their actions will still be logged.
31
32This patch does not affect the non-libata IDE driver. That driver
33however already tests for bd != bd->bd_contains before issuing some
34ioctl; it could be restricted further to forbid these ioctls even for
35programs running with CAP_SYS_ADMIN/CAP_SYS_RAWIO.
36
37Cc: linux-scsi@vger.kernel.org
38Cc: Jens Axboe <axboe@kernel.dk>
39Cc: James Bottomley <JBottomley@parallels.com>
40Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
41[ Make it also print the command name when warning - Linus ]
42Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
43Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
44---
45 block/scsi_ioctl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
46 drivers/scsi/sd.c | 11 +++++++++--
47 include/linux/blkdev.h | 1 +
48 3 files changed, 55 insertions(+), 2 deletions(-)
49
50diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
51index a2c11f3..688be8a 100644
52--- a/block/scsi_ioctl.c
53+++ b/block/scsi_ioctl.c
54@@ -24,6 +24,7 @@
55 #include <linux/capability.h>
56 #include <linux/completion.h>
57 #include <linux/cdrom.h>
58+#include <linux/ratelimit.h>
59 #include <linux/slab.h>
60 #include <linux/times.h>
61 #include <asm/uaccess.h>
62@@ -690,9 +691,53 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod
63 }
64 EXPORT_SYMBOL(scsi_cmd_ioctl);
65
66+int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd)
67+{
68+ if (bd && bd == bd->bd_contains)
69+ return 0;
70+
71+ /* Actually none of these is particularly useful on a partition,
72+ * but they are safe.
73+ */
74+ switch (cmd) {
75+ case SCSI_IOCTL_GET_IDLUN:
76+ case SCSI_IOCTL_GET_BUS_NUMBER:
77+ case SCSI_IOCTL_GET_PCI:
78+ case SCSI_IOCTL_PROBE_HOST:
79+ case SG_GET_VERSION_NUM:
80+ case SG_SET_TIMEOUT:
81+ case SG_GET_TIMEOUT:
82+ case SG_GET_RESERVED_SIZE:
83+ case SG_SET_RESERVED_SIZE:
84+ case SG_EMULATED_HOST:
85+ return 0;
86+ case CDROM_GET_CAPABILITY:
87+ /* Keep this until we remove the printk below. udev sends it
88+ * and we do not want to spam dmesg about it. CD-ROMs do
89+ * not have partitions, so we get here only for disks.
90+ */
91+ return -ENOTTY;
92+ default:
93+ break;
94+ }
95+
96+ /* In particular, rule out all resets and host-specific ioctls. */
97+ printk_ratelimited(KERN_WARNING
98+ "%s: sending ioctl %x to a partition!\n", current->comm, cmd);
99+
100+ return capable(CAP_SYS_RAWIO) ? 0 : -ENOTTY;
101+}
102+EXPORT_SYMBOL(scsi_verify_blk_ioctl);
103+
104 int scsi_cmd_blk_ioctl(struct block_device *bd, fmode_t mode,
105 unsigned int cmd, void __user *arg)
106 {
107+ int ret;
108+
109+ ret = scsi_verify_blk_ioctl(bd, cmd);
110+ if (ret < 0)
111+ return ret;
112+
113 return scsi_cmd_ioctl(bd->bd_disk->queue, bd->bd_disk, mode, cmd, arg);
114 }
115 EXPORT_SYMBOL(scsi_cmd_blk_ioctl);
116diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
117index ffa1c79..4b63c73 100644
118--- a/drivers/scsi/sd.c
119+++ b/drivers/scsi/sd.c
120@@ -1074,6 +1074,10 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode,
121 SCSI_LOG_IOCTL(1, sd_printk(KERN_INFO, sdkp, "sd_ioctl: disk=%s, "
122 "cmd=0x%x\n", disk->disk_name, cmd));
123
124+ error = scsi_verify_blk_ioctl(bdev, cmd);
125+ if (error < 0)
126+ return error;
127+
128 /*
129 * If we are in the middle of error recovery, don't let anyone
130 * else try and use this device. Also, if error recovery fails, it
131@@ -1266,6 +1270,11 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode,
132 unsigned int cmd, unsigned long arg)
133 {
134 struct scsi_device *sdev = scsi_disk(bdev->bd_disk)->device;
135+ int ret;
136+
137+ ret = scsi_verify_blk_ioctl(bdev, cmd);
138+ if (ret < 0)
139+ return -ENOIOCTLCMD;
140
141 /*
142 * If we are in the middle of error recovery, don't let anyone
143@@ -1277,8 +1286,6 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode,
144 return -ENODEV;
145
146 if (sdev->host->hostt->compat_ioctl) {
147- int ret;
148-
149 ret = sdev->host->hostt->compat_ioctl(sdev, cmd, (void __user *)arg);
150
151 return ret;
152diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
153index ca7b869..0ed1eb0 100644
154--- a/include/linux/blkdev.h
155+++ b/include/linux/blkdev.h
156@@ -675,6 +675,7 @@ extern int blk_insert_cloned_request(struct request_queue *q,
157 struct request *rq);
158 extern void blk_delay_queue(struct request_queue *, unsigned long);
159 extern void blk_recount_segments(struct request_queue *, struct bio *);
160+extern int scsi_verify_blk_ioctl(struct block_device *, unsigned int);
161 extern int scsi_cmd_blk_ioctl(struct block_device *, fmode_t,
162 unsigned int, void __user *);
163 extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t,
164--
1651.7.7.4
166
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch
new file mode 100644
index 00000000..6cf77084
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch
@@ -0,0 +1,90 @@
1From eb8de39f8d8116261b98f971f3e3e2230fa3abcf Mon Sep 17 00:00:00 2001
2From: Paolo Bonzini <pbonzini@redhat.com>
3Date: Thu, 12 Jan 2012 16:01:29 +0100
4Subject: [PATCH 092/130] dm: do not forward ioctls from logical volumes to
5 the underlying device
6
7commit ec8013beddd717d1740cfefb1a9b900deef85462 upstream.
8
9A logical volume can map to just part of underlying physical volume.
10In this case, it must be treated like a partition.
11
12Based on a patch from Alasdair G Kergon.
13
14Cc: Alasdair G Kergon <agk@redhat.com>
15Cc: dm-devel@redhat.com
16Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
17Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 drivers/md/dm-flakey.c | 11 ++++++++++-
21 drivers/md/dm-linear.c | 12 +++++++++++-
22 drivers/md/dm-mpath.c | 6 ++++++
23 3 files changed, 27 insertions(+), 2 deletions(-)
24
25diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c
26index f84c080..9fb18c1 100644
27--- a/drivers/md/dm-flakey.c
28+++ b/drivers/md/dm-flakey.c
29@@ -368,8 +368,17 @@ static int flakey_status(struct dm_target *ti, status_type_t type,
30 static int flakey_ioctl(struct dm_target *ti, unsigned int cmd, unsigned long arg)
31 {
32 struct flakey_c *fc = ti->private;
33+ struct dm_dev *dev = fc->dev;
34+ int r = 0;
35
36- return __blkdev_driver_ioctl(fc->dev->bdev, fc->dev->mode, cmd, arg);
37+ /*
38+ * Only pass ioctls through if the device sizes match exactly.
39+ */
40+ if (fc->start ||
41+ ti->len != i_size_read(dev->bdev->bd_inode) >> SECTOR_SHIFT)
42+ r = scsi_verify_blk_ioctl(NULL, cmd);
43+
44+ return r ? : __blkdev_driver_ioctl(dev->bdev, dev->mode, cmd, arg);
45 }
46
47 static int flakey_merge(struct dm_target *ti, struct bvec_merge_data *bvm,
48diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
49index 3921e3b..9728839 100644
50--- a/drivers/md/dm-linear.c
51+++ b/drivers/md/dm-linear.c
52@@ -116,7 +116,17 @@ static int linear_ioctl(struct dm_target *ti, unsigned int cmd,
53 unsigned long arg)
54 {
55 struct linear_c *lc = (struct linear_c *) ti->private;
56- return __blkdev_driver_ioctl(lc->dev->bdev, lc->dev->mode, cmd, arg);
57+ struct dm_dev *dev = lc->dev;
58+ int r = 0;
59+
60+ /*
61+ * Only pass ioctls through if the device sizes match exactly.
62+ */
63+ if (lc->start ||
64+ ti->len != i_size_read(dev->bdev->bd_inode) >> SECTOR_SHIFT)
65+ r = scsi_verify_blk_ioctl(NULL, cmd);
66+
67+ return r ? : __blkdev_driver_ioctl(dev->bdev, dev->mode, cmd, arg);
68 }
69
70 static int linear_merge(struct dm_target *ti, struct bvec_merge_data *bvm,
71diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
72index 5e0090e..801d92d 100644
73--- a/drivers/md/dm-mpath.c
74+++ b/drivers/md/dm-mpath.c
75@@ -1520,6 +1520,12 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
76
77 spin_unlock_irqrestore(&m->lock, flags);
78
79+ /*
80+ * Only pass ioctls through if the device sizes match exactly.
81+ */
82+ if (!r && ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT)
83+ r = scsi_verify_blk_ioctl(NULL, cmd);
84+
85 return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg);
86 }
87
88--
891.7.7.4
90
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch
new file mode 100644
index 00000000..7189318a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch
@@ -0,0 +1,271 @@
1From 483f23031ea337d0abf4392186bdfd2b8ae5dce3 Mon Sep 17 00:00:00 2001
2From: Linus Torvalds <torvalds@linux-foundation.org>
3Date: Tue, 17 Jan 2012 15:21:19 -0800
4Subject: [PATCH 093/130] proc: clean up and fix /proc/<pid>/mem handling
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit e268337dfe26dfc7efd422a804dbb27977a3cccc upstream.
10
11Jüri Aedla reported that the /proc/<pid>/mem handling really isn't very
12robust, and it also doesn't match the permission checking of any of the
13other related files.
14
15This changes it to do the permission checks at open time, and instead of
16tracking the process, it tracks the VM at the time of the open. That
17simplifies the code a lot, but does mean that if you hold the file
18descriptor open over an execve(), you'll continue to read from the _old_
19VM.
20
21That is different from our previous behavior, but much simpler. If
22somebody actually finds a load where this matters, we'll need to revert
23this commit.
24
25I suspect that nobody will ever notice - because the process mapping
26addresses will also have changed as part of the execve. So you cannot
27actually usefully access the fd across a VM change simply because all
28the offsets for IO would have changed too.
29
30Reported-by: Jüri Aedla <asd@ut.ee>
31Cc: Al Viro <viro@zeniv.linux.org.uk>
32Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
33Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
34---
35 fs/proc/base.c | 145 +++++++++++++++-----------------------------------------
36 1 files changed, 39 insertions(+), 106 deletions(-)
37
38diff --git a/fs/proc/base.c b/fs/proc/base.c
39index 851ba3d..1fc1dca 100644
40--- a/fs/proc/base.c
41+++ b/fs/proc/base.c
42@@ -194,65 +194,7 @@ static int proc_root_link(struct inode *inode, struct path *path)
43 return result;
44 }
45
46-static struct mm_struct *__check_mem_permission(struct task_struct *task)
47-{
48- struct mm_struct *mm;
49-
50- mm = get_task_mm(task);
51- if (!mm)
52- return ERR_PTR(-EINVAL);
53-
54- /*
55- * A task can always look at itself, in case it chooses
56- * to use system calls instead of load instructions.
57- */
58- if (task == current)
59- return mm;
60-
61- /*
62- * If current is actively ptrace'ing, and would also be
63- * permitted to freshly attach with ptrace now, permit it.
64- */
65- if (task_is_stopped_or_traced(task)) {
66- int match;
67- rcu_read_lock();
68- match = (ptrace_parent(task) == current);
69- rcu_read_unlock();
70- if (match && ptrace_may_access(task, PTRACE_MODE_ATTACH))
71- return mm;
72- }
73-
74- /*
75- * No one else is allowed.
76- */
77- mmput(mm);
78- return ERR_PTR(-EPERM);
79-}
80-
81-/*
82- * If current may access user memory in @task return a reference to the
83- * corresponding mm, otherwise ERR_PTR.
84- */
85-static struct mm_struct *check_mem_permission(struct task_struct *task)
86-{
87- struct mm_struct *mm;
88- int err;
89-
90- /*
91- * Avoid racing if task exec's as we might get a new mm but validate
92- * against old credentials.
93- */
94- err = mutex_lock_killable(&task->signal->cred_guard_mutex);
95- if (err)
96- return ERR_PTR(err);
97-
98- mm = __check_mem_permission(task);
99- mutex_unlock(&task->signal->cred_guard_mutex);
100-
101- return mm;
102-}
103-
104-struct mm_struct *mm_for_maps(struct task_struct *task)
105+static struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
106 {
107 struct mm_struct *mm;
108 int err;
109@@ -263,7 +205,7 @@ struct mm_struct *mm_for_maps(struct task_struct *task)
110
111 mm = get_task_mm(task);
112 if (mm && mm != current->mm &&
113- !ptrace_may_access(task, PTRACE_MODE_READ)) {
114+ !ptrace_may_access(task, mode)) {
115 mmput(mm);
116 mm = ERR_PTR(-EACCES);
117 }
118@@ -272,6 +214,11 @@ struct mm_struct *mm_for_maps(struct task_struct *task)
119 return mm;
120 }
121
122+struct mm_struct *mm_for_maps(struct task_struct *task)
123+{
124+ return mm_access(task, PTRACE_MODE_READ);
125+}
126+
127 static int proc_pid_cmdline(struct task_struct *task, char * buffer)
128 {
129 int res = 0;
130@@ -816,38 +763,39 @@ static const struct file_operations proc_single_file_operations = {
131
132 static int mem_open(struct inode* inode, struct file* file)
133 {
134- file->private_data = (void*)((long)current->self_exec_id);
135+ struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode);
136+ struct mm_struct *mm;
137+
138+ if (!task)
139+ return -ESRCH;
140+
141+ mm = mm_access(task, PTRACE_MODE_ATTACH);
142+ put_task_struct(task);
143+
144+ if (IS_ERR(mm))
145+ return PTR_ERR(mm);
146+
147 /* OK to pass negative loff_t, we can catch out-of-range */
148 file->f_mode |= FMODE_UNSIGNED_OFFSET;
149+ file->private_data = mm;
150+
151 return 0;
152 }
153
154 static ssize_t mem_read(struct file * file, char __user * buf,
155 size_t count, loff_t *ppos)
156 {
157- struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode);
158+ int ret;
159 char *page;
160 unsigned long src = *ppos;
161- int ret = -ESRCH;
162- struct mm_struct *mm;
163+ struct mm_struct *mm = file->private_data;
164
165- if (!task)
166- goto out_no_task;
167+ if (!mm)
168+ return 0;
169
170- ret = -ENOMEM;
171 page = (char *)__get_free_page(GFP_TEMPORARY);
172 if (!page)
173- goto out;
174-
175- mm = check_mem_permission(task);
176- ret = PTR_ERR(mm);
177- if (IS_ERR(mm))
178- goto out_free;
179-
180- ret = -EIO;
181-
182- if (file->private_data != (void*)((long)current->self_exec_id))
183- goto out_put;
184+ return -ENOMEM;
185
186 ret = 0;
187
188@@ -874,13 +822,7 @@ static ssize_t mem_read(struct file * file, char __user * buf,
189 }
190 *ppos = src;
191
192-out_put:
193- mmput(mm);
194-out_free:
195 free_page((unsigned long) page);
196-out:
197- put_task_struct(task);
198-out_no_task:
199 return ret;
200 }
201
202@@ -889,27 +831,15 @@ static ssize_t mem_write(struct file * file, const char __user *buf,
203 {
204 int copied;
205 char *page;
206- struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode);
207 unsigned long dst = *ppos;
208- struct mm_struct *mm;
209+ struct mm_struct *mm = file->private_data;
210
211- copied = -ESRCH;
212- if (!task)
213- goto out_no_task;
214+ if (!mm)
215+ return 0;
216
217- copied = -ENOMEM;
218 page = (char *)__get_free_page(GFP_TEMPORARY);
219 if (!page)
220- goto out_task;
221-
222- mm = check_mem_permission(task);
223- copied = PTR_ERR(mm);
224- if (IS_ERR(mm))
225- goto out_free;
226-
227- copied = -EIO;
228- if (file->private_data != (void *)((long)current->self_exec_id))
229- goto out_mm;
230+ return -ENOMEM;
231
232 copied = 0;
233 while (count > 0) {
234@@ -933,13 +863,7 @@ static ssize_t mem_write(struct file * file, const char __user *buf,
235 }
236 *ppos = dst;
237
238-out_mm:
239- mmput(mm);
240-out_free:
241 free_page((unsigned long) page);
242-out_task:
243- put_task_struct(task);
244-out_no_task:
245 return copied;
246 }
247
248@@ -959,11 +883,20 @@ loff_t mem_lseek(struct file *file, loff_t offset, int orig)
249 return file->f_pos;
250 }
251
252+static int mem_release(struct inode *inode, struct file *file)
253+{
254+ struct mm_struct *mm = file->private_data;
255+
256+ mmput(mm);
257+ return 0;
258+}
259+
260 static const struct file_operations proc_mem_operations = {
261 .llseek = mem_lseek,
262 .read = mem_read,
263 .write = mem_write,
264 .open = mem_open,
265+ .release = mem_release,
266 };
267
268 static ssize_t environ_read(struct file *file, char __user *buf,
269--
2701.7.7.4
271
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch
new file mode 100644
index 00000000..85652b07
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch
@@ -0,0 +1,35 @@
1From 19c9fdb5e8d481a2a13b437ef124486808a35726 Mon Sep 17 00:00:00 2001
2From: David Henningsson <david.henningsson@canonical.com>
3Date: Thu, 12 Jan 2012 16:31:14 +0100
4Subject: [PATCH 094/130] ALSA: HDA: Use LPIB position fix for Macbook Pro 7,1
5
6commit b01de4fb40137fbda7530550ff0cd37171dafb0c upstream.
7
8Several users have reported "choppy" audio under the 3.2 kernel,
9and that changing position_fix to 1 has resolved their problem.
10The chip is an nVidia Corporation MCP89 High Definition Audio,
11[10de:0d94] (rev a2).
12
13BugLink: https://bugs.launchpad.net/bugs/909419
14Signed-off-by: David Henningsson <david.henningsson@canonical.com>
15Signed-off-by: Takashi Iwai <tiwai@suse.de>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 sound/pci/hda/hda_intel.c | 1 +
19 1 files changed, 1 insertions(+), 0 deletions(-)
20
21diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
22index c2f79e6..5b2b75b 100644
23--- a/sound/pci/hda/hda_intel.c
24+++ b/sound/pci/hda/hda_intel.c
25@@ -2509,6 +2509,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
26 SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB),
27 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS 1101HA", POS_FIX_LPIB),
28 SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB),
29+ SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB),
30 SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB),
31 SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB),
32 SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
33--
341.7.7.4
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch
new file mode 100644
index 00000000..aa943815
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch
@@ -0,0 +1,37 @@
1From a199c605727cb1fd45800b12ede56637c027e0a2 Mon Sep 17 00:00:00 2001
2From: Clemens Ladisch <clemens@ladisch.de>
3Date: Sat, 14 Jan 2012 16:42:24 +0100
4Subject: [PATCH 095/130] ALSA: virtuoso: Xonar DS: fix polarity of front
5 output
6
7commit f0e48b6bd4e407459715240cd241ddb6b89bdf81 upstream.
8
9The two DACs for the front output and the surround/center/LFE/back
10outputs are wired up out of phase, so when channels are duplicated,
11their sound can cancel out each other and result in a weaker bass
12response. To fix this, reverse the polarity of the neutron flow to
13the front output.
14
15Reported-any-tested-by: Daniel Hill <daniel@enemyplanet.geek.nz>
16Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
17Signed-off-by: Takashi Iwai <tiwai@suse.de>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 sound/pci/oxygen/xonar_wm87x6.c | 1 +
21 1 files changed, 1 insertions(+), 0 deletions(-)
22
23diff --git a/sound/pci/oxygen/xonar_wm87x6.c b/sound/pci/oxygen/xonar_wm87x6.c
24index 42d1ab1..915546a 100644
25--- a/sound/pci/oxygen/xonar_wm87x6.c
26+++ b/sound/pci/oxygen/xonar_wm87x6.c
27@@ -177,6 +177,7 @@ static void wm8776_registers_init(struct oxygen *chip)
28 struct xonar_wm87x6 *data = chip->model_data;
29
30 wm8776_write(chip, WM8776_RESET, 0);
31+ wm8776_write(chip, WM8776_PHASESWAP, WM8776_PH_MASK);
32 wm8776_write(chip, WM8776_DACCTRL1, WM8776_DZCEN |
33 WM8776_PL_LEFT_LEFT | WM8776_PL_RIGHT_RIGHT);
34 wm8776_write(chip, WM8776_DACMUTE, chip->dac_mute ? WM8776_DMUTE : 0);
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch
new file mode 100644
index 00000000..80bf14e7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch
@@ -0,0 +1,36 @@
1From 6ddbb15e9a2b460a42697a83ab2b4119978af8c8 Mon Sep 17 00:00:00 2001
2From: David Henningsson <david.henningsson@canonical.com>
3Date: Mon, 16 Jan 2012 10:52:20 +0100
4Subject: [PATCH 096/130] ALSA: HDA: Fix internal microphone on Dell Studio 16
5 XPS 1645
6
7commit ffe535edb9a9c5b4d5fe03dfa3d89a1495580f1b upstream.
8
9More than one user reports that changing the model from "both" to
10"dmic" makes their Internal Mic work.
11
12Tested-by: Martin Ling <martin-launchpad@earth.li>
13BugLink: https://bugs.launchpad.net/bugs/795823
14Signed-off-by: David Henningsson <david.henningsson@canonical.com>
15Signed-off-by: Takashi Iwai <tiwai@suse.de>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 sound/pci/hda/patch_sigmatel.c | 2 +-
19 1 files changed, 1 insertions(+), 1 deletions(-)
20
21diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
22index a87b260..f3c73a9 100644
23--- a/sound/pci/hda/patch_sigmatel.c
24+++ b/sound/pci/hda/patch_sigmatel.c
25@@ -1631,7 +1631,7 @@ static const struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
26 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02bd,
27 "Dell Studio 1557", STAC_DELL_M6_DMIC),
28 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02fe,
29- "Dell Studio XPS 1645", STAC_DELL_M6_BOTH),
30+ "Dell Studio XPS 1645", STAC_DELL_M6_DMIC),
31 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0413,
32 "Dell Studio 1558", STAC_DELL_M6_DMIC),
33 {} /* terminator */
34--
351.7.7.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch
new file mode 100644
index 00000000..b6908ae5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch
@@ -0,0 +1,43 @@
1From 4e99d3453e09872ef6979dfe1518b80377fa5134 Mon Sep 17 00:00:00 2001
2From: Tetsuo Handa <from-tomoyo-users-en@I-love.SAKURA.ne.jp>
3Date: Sun, 15 Jan 2012 11:05:59 +0900
4Subject: [PATCH 097/130] TOMOYO: Accept \000 as a valid character.
5
6commit 25add8cf99c9ec8b8dc0acd8b9241e963fc0d29c upstream.
7
8TOMOYO 2.5 in Linux 3.2 and later handles Unix domain socket's address.
9Thus, tomoyo_correct_word2() needs to accept \000 as a valid character, or
10TOMOYO 2.5 cannot handle Unix domain's abstract socket address.
11
12Reported-by: Steven Allen <steven@stebalien.com>
13Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
14Signed-off-by: James Morris <jmorris@namei.org>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 security/tomoyo/util.c | 6 +++---
18 1 files changed, 3 insertions(+), 3 deletions(-)
19
20diff --git a/security/tomoyo/util.c b/security/tomoyo/util.c
21index 4a9b4b2..867558c 100644
22--- a/security/tomoyo/util.c
23+++ b/security/tomoyo/util.c
24@@ -492,13 +492,13 @@ static bool tomoyo_correct_word2(const char *string, size_t len)
25 if (d < '0' || d > '7' || e < '0' || e > '7')
26 break;
27 c = tomoyo_make_byte(c, d, e);
28- if (tomoyo_invalid(c))
29- continue; /* pattern is not \000 */
30+ if (c <= ' ' || c >= 127)
31+ continue;
32 }
33 goto out;
34 } else if (in_repetition && c == '/') {
35 goto out;
36- } else if (tomoyo_invalid(c)) {
37+ } else if (c <= ' ' || c >= 127) {
38 goto out;
39 }
40 }
41--
421.7.7.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch
new file mode 100644
index 00000000..b800a3ea
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch
@@ -0,0 +1,53 @@
1From 1ca189655bf3edf14c4837eba5873fc9c50f7e15 Mon Sep 17 00:00:00 2001
2From: Thomas Renninger <trenn@suse.de>
3Date: Sun, 4 Dec 2011 22:17:29 +0100
4Subject: [PATCH 098/130] intel idle: Make idle driver more robust
5
6commit 5c2a9f06a9cd7194f884cdc88144866235dec07d upstream.
7
8kvm -cpu host passes the original cpuid info to the guest.
9
10Latest kvm version seem to return true for mwait_leaf cpuid
11function on recent Intel CPUs. But it does not return mwait
12C-states (mwait_substates), instead zero is returned.
13
14While real CPUs seem to always return non-zero values, the intel
15idle driver should not get active in kvm (mwait_substates == 0)
16case and bail out.
17Otherwise a Null pointer exception will happen later when the
18cpuidle subsystem tries to get active:
19[0.984807] BUG: unable to handle kernel NULL pointer dereference at (null)
20[0.984807] IP: [<(null)>] (null)
21...
22[0.984807][<ffffffff8143cf34>] ? cpuidle_idle_call+0xb4/0x340
23[0.984807][<ffffffff8159e7bc>] ? __atomic_notifier_call_chain+0x4c/0x70
24[0.984807][<ffffffff81001198>] ? cpu_idle+0x78/0xd0
25
26Reference:
27https://bugzilla.novell.com/show_bug.cgi?id=726296
28
29Signed-off-by: Thomas Renninger <trenn@suse.de>
30CC: Bruno Friedmann <bruno@ioda-net.ch>
31Signed-off-by: Len Brown <len.brown@intel.com>
32Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
33---
34 drivers/idle/intel_idle.c | 3 ++-
35 1 files changed, 2 insertions(+), 1 deletions(-)
36
37diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
38index 5d2f8e1..1dafcc3 100644
39--- a/drivers/idle/intel_idle.c
40+++ b/drivers/idle/intel_idle.c
41@@ -348,7 +348,8 @@ static int intel_idle_probe(void)
42 cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates);
43
44 if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
45- !(ecx & CPUID5_ECX_INTERRUPT_BREAK))
46+ !(ecx & CPUID5_ECX_INTERRUPT_BREAK) ||
47+ !mwait_substates)
48 return -ENODEV;
49
50 pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates);
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0099-intel_idle-fix-API-misuse.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0099-intel_idle-fix-API-misuse.patch
new file mode 100644
index 00000000..2a171bee
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0099-intel_idle-fix-API-misuse.patch
@@ -0,0 +1,56 @@
1From aaeec055d714b03aededdf7bd4eb75415e16f1ce Mon Sep 17 00:00:00 2001
2From: Shaohua Li <shaohua.li@intel.com>
3Date: Tue, 10 Jan 2012 15:48:19 -0800
4Subject: [PATCH 099/130] intel_idle: fix API misuse
5
6commit 39a74fdedd1c1461d6fb6d330b5266886513c98f upstream.
7
8smp_call_function() only lets all other CPUs execute a specific function,
9while we expect all CPUs do in intel_idle. Without the fix, we could have
10one cpu which has auto_demotion enabled or has no broadcast timer setup.
11Usually we don't see impact because auto demotion just harms power and the
12intel_idle init is called in CPU 0, where boradcast timer delivers
13interrupt, but this still could be a problem.
14
15Signed-off-by: Shaohua Li <shaohua.li@intel.com>
16Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17Signed-off-by: Len Brown <len.brown@intel.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 drivers/idle/intel_idle.c | 6 +++---
21 1 files changed, 3 insertions(+), 3 deletions(-)
22
23diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
24index 1dafcc3..5b39216 100644
25--- a/drivers/idle/intel_idle.c
26+++ b/drivers/idle/intel_idle.c
27@@ -395,7 +395,7 @@ static int intel_idle_probe(void)
28 if (boot_cpu_has(X86_FEATURE_ARAT)) /* Always Reliable APIC Timer */
29 lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE;
30 else {
31- smp_call_function(__setup_broadcast_timer, (void *)true, 1);
32+ on_each_cpu(__setup_broadcast_timer, (void *)true, 1);
33 register_cpu_notifier(&setup_broadcast_notifier);
34 }
35
36@@ -472,7 +472,7 @@ static int intel_idle_cpuidle_driver_init(void)
37 }
38
39 if (auto_demotion_disable_flags)
40- smp_call_function(auto_demotion_disable, NULL, 1);
41+ on_each_cpu(auto_demotion_disable, NULL, 1);
42
43 return 0;
44 }
45@@ -569,7 +569,7 @@ static void __exit intel_idle_exit(void)
46 cpuidle_unregister_driver(&intel_idle_driver);
47
48 if (lapic_timer_reliable_states != LAPIC_TIMER_ALWAYS_RELIABLE) {
49- smp_call_function(__setup_broadcast_timer, (void *)false, 1);
50+ on_each_cpu(__setup_broadcast_timer, (void *)false, 1);
51 unregister_cpu_notifier(&setup_broadcast_notifier);
52 }
53
54--
551.7.7.4
56
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0100-ACPI-Store-SRAT-table-revision.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0100-ACPI-Store-SRAT-table-revision.patch
new file mode 100644
index 00000000..b729f78a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0100-ACPI-Store-SRAT-table-revision.patch
@@ -0,0 +1,66 @@
1From 30301eff41ac5268c71f2790e22d600785cd2664 Mon Sep 17 00:00:00 2001
2From: Kurt Garloff <kurt@garloff.de>
3Date: Tue, 17 Jan 2012 04:18:02 -0500
4Subject: [PATCH 100/130] ACPI: Store SRAT table revision
5
6commit 8df0eb7c9d96f9e82f233ee8b74e0f0c8471f868 upstream.
7
8In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides
932bits for these. The new fields were reserved before.
10According to the ACPI spec, the OS must disregrard reserved fields.
11In order to know whether or not, we must know what version the SRAT
12table has.
13
14This patch stores the SRAT table revision for later consumption
15by arch specific __init functions.
16
17Signed-off-by: Kurt Garloff <kurt@garloff.de>
18Signed-off-by: Len Brown <len.brown@intel.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20---
21 drivers/acpi/numa.c | 6 ++++++
22 include/acpi/acpi_numa.h | 1 +
23 2 files changed, 7 insertions(+), 0 deletions(-)
24
25diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
26index 3b5c318..e56f3be 100644
27--- a/drivers/acpi/numa.c
28+++ b/drivers/acpi/numa.c
29@@ -45,6 +45,8 @@ static int pxm_to_node_map[MAX_PXM_DOMAINS]
30 static int node_to_pxm_map[MAX_NUMNODES]
31 = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
32
33+unsigned char acpi_srat_revision __initdata;
34+
35 int pxm_to_node(int pxm)
36 {
37 if (pxm < 0)
38@@ -255,9 +257,13 @@ acpi_parse_memory_affinity(struct acpi_subtable_header * header,
39
40 static int __init acpi_parse_srat(struct acpi_table_header *table)
41 {
42+ struct acpi_table_srat *srat;
43 if (!table)
44 return -EINVAL;
45
46+ srat = (struct acpi_table_srat *)table;
47+ acpi_srat_revision = srat->header.revision;
48+
49 /* Real work done in acpi_table_parse_srat below. */
50
51 return 0;
52diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
53index 1739726..451823c 100644
54--- a/include/acpi/acpi_numa.h
55+++ b/include/acpi/acpi_numa.h
56@@ -15,6 +15,7 @@ extern int pxm_to_node(int);
57 extern int node_to_pxm(int);
58 extern void __acpi_map_pxm_to_node(int, int);
59 extern int acpi_map_pxm_to_node(int);
60+extern unsigned char acpi_srat_revision;
61
62 #endif /* CONFIG_ACPI_NUMA */
63 #endif /* __ACP_NUMA_H */
64--
651.7.7.4
66
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch
new file mode 100644
index 00000000..7cee68e5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch
@@ -0,0 +1,50 @@
1From 0e45b514e46f9eff94b28f527e63141cc5690f53 Mon Sep 17 00:00:00 2001
2From: Kurt Garloff <kurt@garloff.de>
3Date: Tue, 17 Jan 2012 04:20:31 -0500
4Subject: [PATCH 101/130] ACPI, x86: Use SRAT table rev to use 8bit or 32bit
5 PXM fields (x86/x86-64)
6
7commit cd298f60a2451a16e0f077404bf69b62ec868733 upstream.
8
9In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides
1032bits for these. The new fields were reserved before.
11According to the ACPI spec, the OS must disregrard reserved fields.
12
13x86/x86-64 was rather inconsistent prior to this patch; it used 8 bits
14for the pxm field in cpu_affinity, but 32 bits in mem_affinity.
15This patch makes it consistent: Either use 8 bits consistently (SRAT
16rev 1 or lower) or 32 bits (SRAT rev 2 or higher).
17
18cc: x86@kernel.org
19Signed-off-by: Kurt Garloff <kurt@garloff.de>
20Signed-off-by: Len Brown <len.brown@intel.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
22---
23 arch/x86/mm/srat.c | 4 ++++
24 1 files changed, 4 insertions(+), 0 deletions(-)
25
26diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
27index 81dbfde..7efd0c6 100644
28--- a/arch/x86/mm/srat.c
29+++ b/arch/x86/mm/srat.c
30@@ -104,6 +104,8 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
31 if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
32 return;
33 pxm = pa->proximity_domain_lo;
34+ if (acpi_srat_revision >= 2)
35+ pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8;
36 node = setup_node(pxm);
37 if (node < 0) {
38 printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
39@@ -155,6 +157,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
40 start = ma->base_address;
41 end = start + ma->length;
42 pxm = ma->proximity_domain;
43+ if (acpi_srat_revision <= 1)
44+ pxm &= 0xff;
45 node = setup_node(pxm);
46 if (node < 0) {
47 printk(KERN_ERR "SRAT: Too many proximity domains.\n");
48--
491.7.7.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch
new file mode 100644
index 00000000..0c45ecda
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch
@@ -0,0 +1,66 @@
1From 559618f3ecbf0414d42fdf0d752e86e05b989847 Mon Sep 17 00:00:00 2001
2From: Kurt Garloff <kurt@garloff.de>
3Date: Tue, 17 Jan 2012 04:21:49 -0500
4Subject: [PATCH 102/130] ACPI, ia64: Use SRAT table rev to use 8bit or
5 16/32bit PXM fields (ia64)
6
7commit 9f10f6a520deb3639fac78d81151a3ade88b4e7f upstream.
8
9In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides
1032bits for these. The new fields were reserved before.
11According to the ACPI spec, the OS must disregrard reserved fields.
12
13ia64 did handle the PXM fields almost consistently, but depending on
14sgi's sn2 platform. This patch leaves the sn2 logic in, but does also
15use 16/32 bits for PXM if the SRAT has rev 2 or higher.
16
17The patch also adds __init to the two pxm accessor functions, as they
18access __initdata now and are called from an __init function only anyway.
19
20Note that the code only uses 16 bits for the PXM field in the processor
21proximity field; the patch does not address this as 16 bits are more than
22enough.
23
24Signed-off-by: Kurt Garloff <kurt@garloff.de>
25Signed-off-by: Len Brown <len.brown@intel.com>
26Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
27---
28 arch/ia64/kernel/acpi.c | 10 ++++++----
29 1 files changed, 6 insertions(+), 4 deletions(-)
30
31diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
32index bfb4d01..5207035 100644
33--- a/arch/ia64/kernel/acpi.c
34+++ b/arch/ia64/kernel/acpi.c
35@@ -429,22 +429,24 @@ static u32 __devinitdata pxm_flag[PXM_FLAG_LEN];
36 static struct acpi_table_slit __initdata *slit_table;
37 cpumask_t early_cpu_possible_map = CPU_MASK_NONE;
38
39-static int get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
40+static int __init
41+get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
42 {
43 int pxm;
44
45 pxm = pa->proximity_domain_lo;
46- if (ia64_platform_is("sn2"))
47+ if (ia64_platform_is("sn2") || acpi_srat_revision >= 2)
48 pxm += pa->proximity_domain_hi[0] << 8;
49 return pxm;
50 }
51
52-static int get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
53+static int __init
54+get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
55 {
56 int pxm;
57
58 pxm = ma->proximity_domain;
59- if (!ia64_platform_is("sn2"))
60+ if (!ia64_platform_is("sn2") && acpi_srat_revision <= 1)
61 pxm &= 0xff;
62
63 return pxm;
64--
651.7.7.4
66
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch
new file mode 100644
index 00000000..100721eb
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch
@@ -0,0 +1,59 @@
1From 41a419ec07d2a21659f9258e614ead0a80cf23a8 Mon Sep 17 00:00:00 2001
2From: Lin Ming <ming.m.lin@intel.com>
3Date: Tue, 29 Nov 2011 22:13:35 +0800
4Subject: [PATCH 103/130] ACPICA: Put back the call to
5 acpi_os_validate_address
6
7commit da4d8b287abe783d30e968155614531a0937d090 upstream.
8
9The call to acpi_os_validate_address in acpi_ds_get_region_arguments was
10removed by mistake in commit 9ad19ac(ACPICA: Split large dsopcode and
11dsload.c files).
12
13Put it back.
14
15Reported-and-bisected-by: Luca Tettamanti <kronos.it@gmail.com>
16Signed-off-by: Lin Ming <ming.m.lin@intel.com>
17Signed-off-by: Len Brown <len.brown@intel.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 drivers/acpi/acpica/dsargs.c | 24 ++++++++++++++++++++++++
21 1 files changed, 24 insertions(+), 0 deletions(-)
22
23diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c
24index 8c7b997..42163d8 100644
25--- a/drivers/acpi/acpica/dsargs.c
26+++ b/drivers/acpi/acpica/dsargs.c
27@@ -387,5 +387,29 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
28 status = acpi_ds_execute_arguments(node, node->parent,
29 extra_desc->extra.aml_length,
30 extra_desc->extra.aml_start);
31+ if (ACPI_FAILURE(status)) {
32+ return_ACPI_STATUS(status);
33+ }
34+
35+ /* Validate the region address/length via the host OS */
36+
37+ status = acpi_os_validate_address(obj_desc->region.space_id,
38+ obj_desc->region.address,
39+ (acpi_size) obj_desc->region.length,
40+ acpi_ut_get_node_name(node));
41+
42+ if (ACPI_FAILURE(status)) {
43+ /*
44+ * Invalid address/length. We will emit an error message and mark
45+ * the region as invalid, so that it will cause an additional error if
46+ * it is ever used. Then return AE_OK.
47+ */
48+ ACPI_EXCEPTION((AE_INFO, status,
49+ "During address validation of OpRegion [%4.4s]",
50+ node->name.ascii));
51+ obj_desc->common.flags |= AOPOBJ_INVALID;
52+ status = AE_OK;
53+ }
54+
55 return_ACPI_STATUS(status);
56 }
57--
581.7.7.4
59
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch
new file mode 100644
index 00000000..da6b2f83
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch
@@ -0,0 +1,75 @@
1From 8f8ad292bbb34d56fdf612c13fb6f24da376c007 Mon Sep 17 00:00:00 2001
2From: Lin Ming <ming.m.lin@intel.com>
3Date: Tue, 13 Dec 2011 09:36:03 +0800
4Subject: [PATCH 104/130] ACPI: processor: fix acpi_get_cpuid for UP processor
5
6commit d640113fe80e45ebd4a5b420b220d3f6bf37f682 upstream.
7
8For UP processor, it is likely that no _MAT method or MADT table defined.
9So currently acpi_get_cpuid(...) always return -1 for UP processor.
10This is wrong. It should return valid value for CPU0.
11
12In the other hand, BIOS may define multiple CPU handles even for UP
13processor, for example
14
15 Scope (_PR)
16 {
17 Processor (CPU0, 0x00, 0x00000410, 0x06) {}
18 Processor (CPU1, 0x01, 0x00000410, 0x06) {}
19 Processor (CPU2, 0x02, 0x00000410, 0x06) {}
20 Processor (CPU3, 0x03, 0x00000410, 0x06) {}
21 }
22
23We should only return valid value for CPU0's acpi handle.
24And return invalid value for others.
25
26http://marc.info/?t=132329819900003&r=1&w=2
27
28Reported-and-tested-by: wallak@free.fr
29Signed-off-by: Lin Ming <ming.m.lin@intel.com>
30Signed-off-by: Len Brown <len.brown@intel.com>
31Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
32---
33 drivers/acpi/processor_core.c | 26 ++++++++++++++++++++++++--
34 1 files changed, 24 insertions(+), 2 deletions(-)
35
36diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
37index 3a0428e..c850de4 100644
38--- a/drivers/acpi/processor_core.c
39+++ b/drivers/acpi/processor_core.c
40@@ -173,8 +173,30 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)
41 apic_id = map_mat_entry(handle, type, acpi_id);
42 if (apic_id == -1)
43 apic_id = map_madt_entry(type, acpi_id);
44- if (apic_id == -1)
45- return apic_id;
46+ if (apic_id == -1) {
47+ /*
48+ * On UP processor, there is no _MAT or MADT table.
49+ * So above apic_id is always set to -1.
50+ *
51+ * BIOS may define multiple CPU handles even for UP processor.
52+ * For example,
53+ *
54+ * Scope (_PR)
55+ * {
56+ * Processor (CPU0, 0x00, 0x00000410, 0x06) {}
57+ * Processor (CPU1, 0x01, 0x00000410, 0x06) {}
58+ * Processor (CPU2, 0x02, 0x00000410, 0x06) {}
59+ * Processor (CPU3, 0x03, 0x00000410, 0x06) {}
60+ * }
61+ *
62+ * Ignores apic_id and always return 0 for CPU0's handle.
63+ * Return -1 for other CPU's handle.
64+ */
65+ if (acpi_id == 0)
66+ return acpi_id;
67+ else
68+ return apic_id;
69+ }
70
71 #ifdef CONFIG_SMP
72 for_each_possible_cpu(i) {
73--
741.7.7.4
75
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch
new file mode 100644
index 00000000..c17898ab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch
@@ -0,0 +1,37 @@
1From 40922e4e53c0eaef6473c1cf8ef15fea5076e4b5 Mon Sep 17 00:00:00 2001
2From: Stratos Psomadakis <psomas@gentoo.org>
3Date: Sun, 4 Dec 2011 02:23:54 +0200
4Subject: [PATCH 105/130] sym53c8xx: Fix NULL pointer dereference in
5 slave_destroy
6
7commit cced5041ed5a2d1352186510944b0ddfbdbe4c0b upstream.
8
9sym53c8xx_slave_destroy unconditionally assumes that sym53c8xx_slave_alloc has
10succesesfully allocated a sym_lcb. This can lead to a NULL pointer dereference
11(exposed by commit 4e6c82b).
12
13Signed-off-by: Stratos Psomadakis <psomas@gentoo.org>
14Signed-off-by: James Bottomley <JBottomley@Parallels.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/scsi/sym53c8xx_2/sym_glue.c | 4 ++++
18 1 files changed, 4 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
21index b4543f5..36d1ed7 100644
22--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
23+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
24@@ -839,6 +839,10 @@ static void sym53c8xx_slave_destroy(struct scsi_device *sdev)
25 struct sym_lcb *lp = sym_lp(tp, sdev->lun);
26 unsigned long flags;
27
28+ /* if slave_alloc returned before allocating a sym_lcb, return */
29+ if (!lp)
30+ return;
31+
32 spin_lock_irqsave(np->s.host->host_lock, flags);
33
34 if (lp->busy_itlq || lp->busy_itl) {
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch
new file mode 100644
index 00000000..8c83cb5d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch
@@ -0,0 +1,44 @@
1From 93a9397c36390facb429c34a7bca31b7c6c5df39 Mon Sep 17 00:00:00 2001
2From: Roland Dreier <roland@purestorage.com>
3Date: Tue, 6 Dec 2011 10:02:09 -0800
4Subject: [PATCH 106/130] target: Set response format in INQUIRY response
5
6commit ce136176fea522fc8f4c16dcae7e8ed1d890ca39 upstream.
7
8Current SCSI specs say that the "response format" field in the standard
9INQUIRY response should be set to 2, and all the real SCSI devices I
10have do put 2 here. So let's do that too.
11
12Signed-off-by: Roland Dreier <roland@purestorage.com>
13Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/target/target_core_cdb.c | 12 ++++++++++++
17 1 files changed, 12 insertions(+), 0 deletions(-)
18
19diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c
20index 831468b..2e8c1be 100644
21--- a/drivers/target/target_core_cdb.c
22+++ b/drivers/target/target_core_cdb.c
23@@ -94,6 +94,18 @@ target_emulate_inquiry_std(struct se_cmd *cmd)
24 buf[2] = dev->transport->get_device_rev(dev);
25
26 /*
27+ * NORMACA and HISUP = 0, RESPONSE DATA FORMAT = 2
28+ *
29+ * SPC4 says:
30+ * A RESPONSE DATA FORMAT field set to 2h indicates that the
31+ * standard INQUIRY data is in the format defined in this
32+ * standard. Response data format values less than 2h are
33+ * obsolete. Response data format values greater than 2h are
34+ * reserved.
35+ */
36+ buf[3] = 2;
37+
38+ /*
39 * Enable SCCS and TPGS fields for Emulated ALUA
40 */
41 if (dev->se_sub_dev->t10_alua.alua_type == SPC3_ALUA_EMULATED)
42--
431.7.7.4
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch
new file mode 100644
index 00000000..ccf6a350
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch
@@ -0,0 +1,177 @@
1From 894360c2f0b3fca21a3e663f60746476a185f100 Mon Sep 17 00:00:00 2001
2From: Roland Dreier <roland@purestorage.com>
3Date: Tue, 13 Dec 2011 14:55:33 -0800
4Subject: [PATCH 107/130] target: Set additional sense length field in sense
5 data
6
7commit 895f3022523361e9b383cf48f51feb1f7d5e7e53 upstream.
8
9The target code was not setting the additional sense length field in the
10sense data it returned, which meant that at least the Linux stack
11ignored the ASC/ASCQ fields. For example, without this patch, on a
12tcm_loop device:
13
14 # sg_raw -v /dev/sda 2 0 0 0 0 0
15
16gives
17
18 cdb to send: 02 00 00 00 00 00
19 SCSI Status: Check Condition
20
21 Sense Information:
22 Fixed format, current; Sense key: Illegal Request
23 Raw sense data (in hex):
24 70 00 05 00 00 00 00 00
25
26while after the patch we correctly get the following (which matches what
27a regular disk returns):
28
29 cdb to send: 02 00 00 00 00 00
30 SCSI Status: Check Condition
31
32 Sense Information:
33 Fixed format, current; Sense key: Illegal Request
34 Additional sense: Invalid command operation code
35 Raw sense data (in hex):
36 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
37 00 00
38
39Signed-off-by: Roland Dreier <roland@purestorage.com>
40Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
41Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
42---
43 drivers/target/target_core_transport.c | 14 ++++++++++++++
44 include/target/target_core_base.h | 1 +
45 2 files changed, 15 insertions(+), 0 deletions(-)
46
47diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
48index 0257658..e87d0eb 100644
49--- a/drivers/target/target_core_transport.c
50+++ b/drivers/target/target_core_transport.c
51@@ -4353,6 +4353,7 @@ int transport_send_check_condition_and_sense(
52 case TCM_NON_EXISTENT_LUN:
53 /* CURRENT ERROR */
54 buffer[offset] = 0x70;
55+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
56 /* ILLEGAL REQUEST */
57 buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
58 /* LOGICAL UNIT NOT SUPPORTED */
59@@ -4362,6 +4363,7 @@ int transport_send_check_condition_and_sense(
60 case TCM_SECTOR_COUNT_TOO_MANY:
61 /* CURRENT ERROR */
62 buffer[offset] = 0x70;
63+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
64 /* ILLEGAL REQUEST */
65 buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
66 /* INVALID COMMAND OPERATION CODE */
67@@ -4370,6 +4372,7 @@ int transport_send_check_condition_and_sense(
68 case TCM_UNKNOWN_MODE_PAGE:
69 /* CURRENT ERROR */
70 buffer[offset] = 0x70;
71+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
72 /* ILLEGAL REQUEST */
73 buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
74 /* INVALID FIELD IN CDB */
75@@ -4378,6 +4381,7 @@ int transport_send_check_condition_and_sense(
76 case TCM_CHECK_CONDITION_ABORT_CMD:
77 /* CURRENT ERROR */
78 buffer[offset] = 0x70;
79+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
80 /* ABORTED COMMAND */
81 buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
82 /* BUS DEVICE RESET FUNCTION OCCURRED */
83@@ -4387,6 +4391,7 @@ int transport_send_check_condition_and_sense(
84 case TCM_INCORRECT_AMOUNT_OF_DATA:
85 /* CURRENT ERROR */
86 buffer[offset] = 0x70;
87+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
88 /* ABORTED COMMAND */
89 buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
90 /* WRITE ERROR */
91@@ -4397,6 +4402,7 @@ int transport_send_check_condition_and_sense(
92 case TCM_INVALID_CDB_FIELD:
93 /* CURRENT ERROR */
94 buffer[offset] = 0x70;
95+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
96 /* ABORTED COMMAND */
97 buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
98 /* INVALID FIELD IN CDB */
99@@ -4405,6 +4411,7 @@ int transport_send_check_condition_and_sense(
100 case TCM_INVALID_PARAMETER_LIST:
101 /* CURRENT ERROR */
102 buffer[offset] = 0x70;
103+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
104 /* ABORTED COMMAND */
105 buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
106 /* INVALID FIELD IN PARAMETER LIST */
107@@ -4413,6 +4420,7 @@ int transport_send_check_condition_and_sense(
108 case TCM_UNEXPECTED_UNSOLICITED_DATA:
109 /* CURRENT ERROR */
110 buffer[offset] = 0x70;
111+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
112 /* ABORTED COMMAND */
113 buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
114 /* WRITE ERROR */
115@@ -4423,6 +4431,7 @@ int transport_send_check_condition_and_sense(
116 case TCM_SERVICE_CRC_ERROR:
117 /* CURRENT ERROR */
118 buffer[offset] = 0x70;
119+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
120 /* ABORTED COMMAND */
121 buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
122 /* PROTOCOL SERVICE CRC ERROR */
123@@ -4433,6 +4442,7 @@ int transport_send_check_condition_and_sense(
124 case TCM_SNACK_REJECTED:
125 /* CURRENT ERROR */
126 buffer[offset] = 0x70;
127+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
128 /* ABORTED COMMAND */
129 buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
130 /* READ ERROR */
131@@ -4443,6 +4453,7 @@ int transport_send_check_condition_and_sense(
132 case TCM_WRITE_PROTECTED:
133 /* CURRENT ERROR */
134 buffer[offset] = 0x70;
135+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
136 /* DATA PROTECT */
137 buffer[offset+SPC_SENSE_KEY_OFFSET] = DATA_PROTECT;
138 /* WRITE PROTECTED */
139@@ -4451,6 +4462,7 @@ int transport_send_check_condition_and_sense(
140 case TCM_CHECK_CONDITION_UNIT_ATTENTION:
141 /* CURRENT ERROR */
142 buffer[offset] = 0x70;
143+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
144 /* UNIT ATTENTION */
145 buffer[offset+SPC_SENSE_KEY_OFFSET] = UNIT_ATTENTION;
146 core_scsi3_ua_for_check_condition(cmd, &asc, &ascq);
147@@ -4460,6 +4472,7 @@ int transport_send_check_condition_and_sense(
148 case TCM_CHECK_CONDITION_NOT_READY:
149 /* CURRENT ERROR */
150 buffer[offset] = 0x70;
151+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
152 /* Not Ready */
153 buffer[offset+SPC_SENSE_KEY_OFFSET] = NOT_READY;
154 transport_get_sense_codes(cmd, &asc, &ascq);
155@@ -4470,6 +4483,7 @@ int transport_send_check_condition_and_sense(
156 default:
157 /* CURRENT ERROR */
158 buffer[offset] = 0x70;
159+ buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
160 /* ILLEGAL REQUEST */
161 buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
162 /* LOGICAL UNIT COMMUNICATION FAILURE */
163diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
164index 6873c7d..a79886c 100644
165--- a/include/target/target_core_base.h
166+++ b/include/target/target_core_base.h
167@@ -34,6 +34,7 @@
168 #define TRANSPORT_SENSE_BUFFER SCSI_SENSE_BUFFERSIZE
169 /* Used by transport_send_check_condition_and_sense() */
170 #define SPC_SENSE_KEY_OFFSET 2
171+#define SPC_ADD_SENSE_LEN_OFFSET 7
172 #define SPC_ASC_KEY_OFFSET 12
173 #define SPC_ASCQ_KEY_OFFSET 13
174 #define TRANSPORT_IQN_LEN 224
175--
1761.7.7.4
177
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch
new file mode 100644
index 00000000..5ea191af
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch
@@ -0,0 +1,44 @@
1From 48f4e889aa88368a9ac548bba39c37663d012739 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3Date: Fri, 13 Jan 2012 23:58:38 +0100
4Subject: [PATCH 108/130] bcma: invalidate the mapped core over suspend/resume
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 28e7d218da975f6ae1751e293aed938952c55c98 upstream.
10
11This clears the currently mapped core when suspending, to force
12re-mapping after resume. Without that we were touching default core
13registers believing some other core is mapped. Such a behaviour
14resulted in lockups on some machines.
15
16Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
17Signed-off-by: John W. Linville <linville@tuxdriver.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 drivers/bcma/host_pci.c | 3 +++
21 1 files changed, 3 insertions(+), 0 deletions(-)
22
23diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
24index 990f5a8..48e06be 100644
25--- a/drivers/bcma/host_pci.c
26+++ b/drivers/bcma/host_pci.c
27@@ -227,11 +227,14 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
28 #ifdef CONFIG_PM
29 static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
30 {
31+ struct bcma_bus *bus = pci_get_drvdata(dev);
32+
33 /* Host specific */
34 pci_save_state(dev);
35 pci_disable_device(dev);
36 pci_set_power_state(dev, pci_choose_state(dev, state));
37
38+ bus->mapped_core = NULL;
39 return 0;
40 }
41
42--
431.7.7.4
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch
new file mode 100644
index 00000000..210ff019
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch
@@ -0,0 +1,36 @@
1From 1d2015b35f096926482fe3c1b5b3b84c0f8a34b3 Mon Sep 17 00:00:00 2001
2From: Miroslav Slugen <thunder.mmm@gmail.com>
3Date: Sun, 11 Dec 2011 18:57:58 -0300
4Subject: [PATCH 109/130] cx23885-dvb: check if dvb_attach() succeded
5
6commit a7c8aadad39428b64d26c3971d967f8314e2397d upstream.
7
8Fix possible null dereference for Leadtek DTV 3200H
9XC4000 tuner when no firmware file available.
10
11Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
12Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14---
15 drivers/media/video/cx23885/cx23885-dvb.c | 5 +++++
16 1 files changed, 5 insertions(+), 0 deletions(-)
17
18diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
19index bcb45be..f0482b2 100644
20--- a/drivers/media/video/cx23885/cx23885-dvb.c
21+++ b/drivers/media/video/cx23885/cx23885-dvb.c
22@@ -940,6 +940,11 @@ static int dvb_register(struct cx23885_tsport *port)
23
24 fe = dvb_attach(xc4000_attach, fe0->dvb.frontend,
25 &dev->i2c_bus[1].i2c_adap, &cfg);
26+ if (!fe) {
27+ printk(KERN_ERR "%s/2: xc4000 attach failed\n",
28+ dev->name);
29+ goto frontend_detach;
30+ }
31 }
32 break;
33 case CX23885_BOARD_TBS_6920:
34--
351.7.7.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch
new file mode 100644
index 00000000..20dd5ecf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch
@@ -0,0 +1,95 @@
1From 62b69534abbda46006d5372502ae08e2df541e58 Mon Sep 17 00:00:00 2001
2From: Miroslav Slugen <thunder.mmm@gmail.com>
3Date: Sun, 11 Dec 2011 19:00:06 -0300
4Subject: [PATCH 110/130] cx88: fix: don't duplicate xc4000 entry for radio
5
6commit b6854e3f31402476bcc9d2f41570389fa491de17 upstream.
7
8All radio tuners in cx88 driver using same address for radio and tuner,
9so there is no need to probe it twice for same tuner and we can use
10radio_type UNSET, this also fix broken radio since kernel 2.6.39-rc1
11for those tuners.
12
13Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
14Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16---
17 drivers/media/video/cx88/cx88-cards.c | 24 ++++++++++++------------
18 1 files changed, 12 insertions(+), 12 deletions(-)
19
20diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
21index 0d719fa..3929d93 100644
22--- a/drivers/media/video/cx88/cx88-cards.c
23+++ b/drivers/media/video/cx88/cx88-cards.c
24@@ -1573,8 +1573,8 @@ static const struct cx88_board cx88_boards[] = {
25 .name = "Pinnacle Hybrid PCTV",
26 .tuner_type = TUNER_XC2028,
27 .tuner_addr = 0x61,
28- .radio_type = TUNER_XC2028,
29- .radio_addr = 0x61,
30+ .radio_type = UNSET,
31+ .radio_addr = ADDR_UNSET,
32 .input = { {
33 .type = CX88_VMUX_TELEVISION,
34 .vmux = 0,
35@@ -1611,8 +1611,8 @@ static const struct cx88_board cx88_boards[] = {
36 .name = "Leadtek TV2000 XP Global",
37 .tuner_type = TUNER_XC2028,
38 .tuner_addr = 0x61,
39- .radio_type = TUNER_XC2028,
40- .radio_addr = 0x61,
41+ .radio_type = UNSET,
42+ .radio_addr = ADDR_UNSET,
43 .input = { {
44 .type = CX88_VMUX_TELEVISION,
45 .vmux = 0,
46@@ -2043,8 +2043,8 @@ static const struct cx88_board cx88_boards[] = {
47 .name = "Terratec Cinergy HT PCI MKII",
48 .tuner_type = TUNER_XC2028,
49 .tuner_addr = 0x61,
50- .radio_type = TUNER_XC2028,
51- .radio_addr = 0x61,
52+ .radio_type = UNSET,
53+ .radio_addr = ADDR_UNSET,
54 .input = { {
55 .type = CX88_VMUX_TELEVISION,
56 .vmux = 0,
57@@ -2082,9 +2082,9 @@ static const struct cx88_board cx88_boards[] = {
58 [CX88_BOARD_WINFAST_DTV1800H] = {
59 .name = "Leadtek WinFast DTV1800 Hybrid",
60 .tuner_type = TUNER_XC2028,
61- .radio_type = TUNER_XC2028,
62+ .radio_type = UNSET,
63 .tuner_addr = 0x61,
64- .radio_addr = 0x61,
65+ .radio_addr = ADDR_UNSET,
66 /*
67 * GPIO setting
68 *
69@@ -2123,9 +2123,9 @@ static const struct cx88_board cx88_boards[] = {
70 [CX88_BOARD_WINFAST_DTV1800H_XC4000] = {
71 .name = "Leadtek WinFast DTV1800 H (XC4000)",
72 .tuner_type = TUNER_XC4000,
73- .radio_type = TUNER_XC4000,
74+ .radio_type = UNSET,
75 .tuner_addr = 0x61,
76- .radio_addr = 0x61,
77+ .radio_addr = ADDR_UNSET,
78 /*
79 * GPIO setting
80 *
81@@ -2164,9 +2164,9 @@ static const struct cx88_board cx88_boards[] = {
82 [CX88_BOARD_WINFAST_DTV2000H_PLUS] = {
83 .name = "Leadtek WinFast DTV2000 H PLUS",
84 .tuner_type = TUNER_XC4000,
85- .radio_type = TUNER_XC4000,
86+ .radio_type = UNSET,
87 .tuner_addr = 0x61,
88- .radio_addr = 0x61,
89+ .radio_addr = ADDR_UNSET,
90 /*
91 * GPIO
92 * 2: 1: mute audio
93--
941.7.7.4
95
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch
new file mode 100644
index 00000000..8111a5a0
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch
@@ -0,0 +1,42 @@
1From d713ae5fcd06e723ac059ae03311b10d5508a272 Mon Sep 17 00:00:00 2001
2From: Miroslav Slugen <thunder.mmm@gmail.com>
3Date: Sun, 11 Dec 2011 18:47:32 -0300
4Subject: [PATCH 111/130] tuner: Fix numberspace conflict between xc4000 and
5 pti 5nf05 tuners
6
7commit cd4ca7afc61d3b18fcd635002459fb6b1d701099 upstream.
8
9Update xc4000 tuner definition, number 81 is already in use by
10TUNER_PARTSNIC_PTI_5NF05.
11
12Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
13Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 include/media/tuner.h | 3 ++-
17 1 files changed, 2 insertions(+), 1 deletions(-)
18
19diff --git a/include/media/tuner.h b/include/media/tuner.h
20index 89c290b..29e1920 100644
21--- a/include/media/tuner.h
22+++ b/include/media/tuner.h
23@@ -127,7 +127,6 @@
24 #define TUNER_PHILIPS_FMD1216MEX_MK3 78
25 #define TUNER_PHILIPS_FM1216MK5 79
26 #define TUNER_PHILIPS_FQ1216LME_MK3 80 /* Active loopthrough, no FM */
27-#define TUNER_XC4000 81 /* Xceive Silicon Tuner */
28
29 #define TUNER_PARTSNIC_PTI_5NF05 81
30 #define TUNER_PHILIPS_CU1216L 82
31@@ -136,6 +135,8 @@
32 #define TUNER_PHILIPS_FQ1236_MK5 85 /* NTSC, TDA9885, no FM radio */
33 #define TUNER_TENA_TNF_5337 86
34
35+#define TUNER_XC4000 87 /* Xceive Silicon Tuner */
36+
37 /* tv card specific */
38 #define TDA9887_PRESENT (1<<0)
39 #define TDA9887_PORT1_INACTIVE (1<<1)
40--
411.7.7.4
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch
new file mode 100644
index 00000000..d6533b7d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch
@@ -0,0 +1,50 @@
1From 18a0d839d63af34c8327754de80855fe7f6d9c17 Mon Sep 17 00:00:00 2001
2From: Steven Rostedt <srostedt@redhat.com>
3Date: Fri, 13 Jan 2012 21:40:59 -0500
4Subject: [PATCH 112/130] tracepoints/module: Fix disabling tracepoints with
5 taint CRAP or OOT
6
7commit c10076c4304083af15a41f6bc5e657e781c1f9a6 upstream.
8
9Tracepoints are disabled for tainted modules, which is usually because the
10module is either proprietary or was forced, and we don't want either of them
11using kernel tracepoints.
12
13But, a module can also be tainted by being in the staging directory or
14compiled out of tree. Either is fine for use with tracepoints, no need
15to punish them. I found this out when I noticed that my sample trace event
16module, when done out of tree, stopped working.
17
18Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
19Cc: Ben Hutchings <ben@decadent.org.uk>
20Cc: Dave Jones <davej@redhat.com>
21Cc: Greg Kroah-Hartman <gregkh@suse.de>
22Cc: Rusty Russell <rusty@rustcorp.com.au>
23Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
24Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
25---
26 kernel/tracepoint.c | 7 ++++---
27 1 files changed, 4 insertions(+), 3 deletions(-)
28
29diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
30index db110b8..f1539de 100644
31--- a/kernel/tracepoint.c
32+++ b/kernel/tracepoint.c
33@@ -634,10 +634,11 @@ static int tracepoint_module_coming(struct module *mod)
34 int ret = 0;
35
36 /*
37- * We skip modules that tain the kernel, especially those with different
38- * module header (for forced load), to make sure we don't cause a crash.
39+ * We skip modules that taint the kernel, especially those with different
40+ * module headers (for forced load), to make sure we don't cause a crash.
41+ * Staging and out-of-tree GPL modules are fine.
42 */
43- if (mod->taints)
44+ if (mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP)))
45 return 0;
46 mutex_lock(&tracepoints_mutex);
47 tp_mod = kmalloc(sizeof(struct tp_module), GFP_KERNEL);
48--
491.7.7.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0113-I2C-OMAP-correct-SYSC-register-offset-for-OMAP4.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0113-I2C-OMAP-correct-SYSC-register-offset-for-OMAP4.patch
new file mode 100644
index 00000000..4a8f8cdd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0113-I2C-OMAP-correct-SYSC-register-offset-for-OMAP4.patch
@@ -0,0 +1,34 @@
1From 9d4b4b0db1a41d1ec947a28c1bae7685211d934d Mon Sep 17 00:00:00 2001
2From: Alexander Aring <a.aring@phytec.de>
3Date: Thu, 8 Dec 2011 15:43:53 +0100
4Subject: [PATCH 113/130] I2C: OMAP: correct SYSC register offset for OMAP4
5
6commit 2727b1753934e154931d6b3bdf20c9b2398457a2 upstream.
7
8Correct OMAP_I2C_SYSC_REG offset in omap4 register map.
9Offset 0x20 is reserved and OMAP_I2C_SYSC_REG has 0x10 as offset.
10
11Signed-off-by: Alexander Aring <a.aring@phytec.de>
12[khilman@ti.com: minor changelog edits]
13Signed-off-by: Kevin Hilman <khilman@ti.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15---
16 drivers/i2c/busses/i2c-omap.c | 2 +-
17 1 files changed, 1 insertions(+), 1 deletions(-)
18
19diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
20index 82fff06..e0733b7 100644
21--- a/drivers/i2c/busses/i2c-omap.c
22+++ b/drivers/i2c/busses/i2c-omap.c
23@@ -235,7 +235,7 @@ static const u8 reg_map_ip_v2[] = {
24 [OMAP_I2C_BUF_REG] = 0x94,
25 [OMAP_I2C_CNT_REG] = 0x98,
26 [OMAP_I2C_DATA_REG] = 0x9c,
27- [OMAP_I2C_SYSC_REG] = 0x20,
28+ [OMAP_I2C_SYSC_REG] = 0x10,
29 [OMAP_I2C_CON_REG] = 0xa4,
30 [OMAP_I2C_OA_REG] = 0xa8,
31 [OMAP_I2C_SA_REG] = 0xac,
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0114-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0114-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch
new file mode 100644
index 00000000..2e480408
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0114-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch
@@ -0,0 +1,350 @@
1From 0046f18e8ee26577b8b75d678ee353a9ab31773b Mon Sep 17 00:00:00 2001
2From: Cliff Wickman <cpw@sgi.com>
3Date: Mon, 16 Jan 2012 15:17:50 -0600
4Subject: [PATCH 114/130] x86/UV2: Fix new UV2 hardware by using native UV2
5 broadcast mode
6
7commit da87c937e5a2374686edd58df06cfd5050b125fa upstream.
8
9Update the use of the Broadcast Assist Unit on SGI Altix UV2 to
10the use of native UV2 mode on new hardware (not the legacy mode).
11
12UV2 native mode has a different format for a broadcast message.
13We also need quick differentiaton between UV1 and UV2.
14
15Signed-off-by: Cliff Wickman <cpw@sgi.com>
16Link: http://lkml.kernel.org/r/20120116211750.GA5767@sgi.com
17Signed-off-by: Ingo Molnar <mingo@elte.hu>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 arch/x86/include/asm/uv/uv_bau.h | 93 +++++++++++++++++++++++++++++++++++---
21 arch/x86/platform/uv/tlb_uv.c | 88 ++++++++++++++++++++++++++---------
22 2 files changed, 151 insertions(+), 30 deletions(-)
23
24diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h
25index 8e862aa..4a46b27 100644
26--- a/arch/x86/include/asm/uv/uv_bau.h
27+++ b/arch/x86/include/asm/uv/uv_bau.h
28@@ -65,7 +65,7 @@
29 * UV2: Bit 19 selects between
30 * (0): 10 microsecond timebase and
31 * (1): 80 microseconds
32- * we're using 655us, similar to UV1: 65 units of 10us
33+ * we're using 560us, similar to UV1: 65 units of 10us
34 */
35 #define UV1_INTD_SOFT_ACK_TIMEOUT_PERIOD (9UL)
36 #define UV2_INTD_SOFT_ACK_TIMEOUT_PERIOD (15UL)
37@@ -235,10 +235,10 @@ struct bau_msg_payload {
38
39
40 /*
41- * Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
42+ * UV1 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
43 * see table 4.2.3.0.1 in broacast_assist spec.
44 */
45-struct bau_msg_header {
46+struct uv1_bau_msg_header {
47 unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */
48 /* bits 5:0 */
49 unsigned int base_dest_nasid:15; /* nasid of the first bit */
50@@ -318,19 +318,87 @@ struct bau_msg_header {
51 };
52
53 /*
54+ * UV2 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
55+ * see figure 9-2 of harp_sys.pdf
56+ */
57+struct uv2_bau_msg_header {
58+ unsigned int base_dest_nasid:15; /* nasid of the first bit */
59+ /* bits 14:0 */ /* in uvhub map */
60+ unsigned int dest_subnodeid:5; /* must be 0x10, for the LB */
61+ /* bits 19:15 */
62+ unsigned int rsvd_1:1; /* must be zero */
63+ /* bit 20 */
64+ /* Address bits 59:21 */
65+ /* bits 25:2 of address (44:21) are payload */
66+ /* these next 24 bits become bytes 12-14 of msg */
67+ /* bits 28:21 land in byte 12 */
68+ unsigned int replied_to:1; /* sent as 0 by the source to
69+ byte 12 */
70+ /* bit 21 */
71+ unsigned int msg_type:3; /* software type of the
72+ message */
73+ /* bits 24:22 */
74+ unsigned int canceled:1; /* message canceled, resource
75+ is to be freed*/
76+ /* bit 25 */
77+ unsigned int payload_1:3; /* not currently used */
78+ /* bits 28:26 */
79+
80+ /* bits 36:29 land in byte 13 */
81+ unsigned int payload_2a:3; /* not currently used */
82+ unsigned int payload_2b:5; /* not currently used */
83+ /* bits 36:29 */
84+
85+ /* bits 44:37 land in byte 14 */
86+ unsigned int payload_3:8; /* not currently used */
87+ /* bits 44:37 */
88+
89+ unsigned int rsvd_2:7; /* reserved */
90+ /* bits 51:45 */
91+ unsigned int swack_flag:1; /* software acknowledge flag */
92+ /* bit 52 */
93+ unsigned int rsvd_3a:3; /* must be zero */
94+ unsigned int rsvd_3b:8; /* must be zero */
95+ unsigned int rsvd_3c:8; /* must be zero */
96+ unsigned int rsvd_3d:3; /* must be zero */
97+ /* bits 74:53 */
98+ unsigned int fairness:3; /* usually zero */
99+ /* bits 77:75 */
100+
101+ unsigned int sequence:16; /* message sequence number */
102+ /* bits 93:78 Suppl_A */
103+ unsigned int chaining:1; /* next descriptor is part of
104+ this activation*/
105+ /* bit 94 */
106+ unsigned int multilevel:1; /* multi-level multicast
107+ format */
108+ /* bit 95 */
109+ unsigned int rsvd_4:24; /* ordered / source node /
110+ source subnode / aging
111+ must be zero */
112+ /* bits 119:96 */
113+ unsigned int command:8; /* message type */
114+ /* bits 127:120 */
115+};
116+
117+/*
118 * The activation descriptor:
119 * The format of the message to send, plus all accompanying control
120 * Should be 64 bytes
121 */
122 struct bau_desc {
123- struct pnmask distribution;
124+ struct pnmask distribution;
125 /*
126 * message template, consisting of header and payload:
127 */
128- struct bau_msg_header header;
129- struct bau_msg_payload payload;
130+ union bau_msg_header {
131+ struct uv1_bau_msg_header uv1_hdr;
132+ struct uv2_bau_msg_header uv2_hdr;
133+ } header;
134+
135+ struct bau_msg_payload payload;
136 };
137-/*
138+/* UV1:
139 * -payload-- ---------header------
140 * bytes 0-11 bits 41-56 bits 58-81
141 * A B (2) C (3)
142@@ -340,6 +408,16 @@ struct bau_desc {
143 * bytes 0-11 bytes 12-14 bytes 16-17 (byte 15 filled in by hw as vector)
144 * ------------payload queue-----------
145 */
146+/* UV2:
147+ * -payload-- ---------header------
148+ * bytes 0-11 bits 70-78 bits 21-44
149+ * A B (2) C (3)
150+ *
151+ * A/B/C are moved to:
152+ * A C B
153+ * bytes 0-11 bytes 12-14 bytes 16-17 (byte 15 filled in by hw as vector)
154+ * ------------payload queue-----------
155+ */
156
157 /*
158 * The payload queue on the destination side is an array of these.
159@@ -511,6 +589,7 @@ struct bau_control {
160 short osnode;
161 short uvhub_cpu;
162 short uvhub;
163+ short uvhub_version;
164 short cpus_in_socket;
165 short cpus_in_uvhub;
166 short partition_base_pnode;
167diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
168index 5b55219..1341a2e 100644
169--- a/arch/x86/platform/uv/tlb_uv.c
170+++ b/arch/x86/platform/uv/tlb_uv.c
171@@ -573,7 +573,7 @@ static int wait_completion(struct bau_desc *bau_desc,
172 right_shift = ((cpu - UV_CPUS_PER_AS) * UV_ACT_STATUS_SIZE);
173 }
174
175- if (is_uv1_hub())
176+ if (bcp->uvhub_version == 1)
177 return uv1_wait_completion(bau_desc, mmr_offset, right_shift,
178 bcp, try);
179 else
180@@ -757,15 +757,22 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc,
181 {
182 int seq_number = 0;
183 int completion_stat = 0;
184+ int uv1 = 0;
185 long try = 0;
186 unsigned long index;
187 cycles_t time1;
188 cycles_t time2;
189 struct ptc_stats *stat = bcp->statp;
190 struct bau_control *hmaster = bcp->uvhub_master;
191+ struct uv1_bau_msg_header *uv1_hdr = NULL;
192+ struct uv2_bau_msg_header *uv2_hdr = NULL;
193
194- if (is_uv1_hub())
195+ if (bcp->uvhub_version == 1) {
196+ uv1 = 1;
197 uv1_throttle(hmaster, stat);
198+ uv1_hdr = &bau_desc->header.uv1_hdr;
199+ } else
200+ uv2_hdr = &bau_desc->header.uv2_hdr;
201
202 while (hmaster->uvhub_quiesce)
203 cpu_relax();
204@@ -773,14 +780,23 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc,
205 time1 = get_cycles();
206 do {
207 if (try == 0) {
208- bau_desc->header.msg_type = MSG_REGULAR;
209+ if (uv1)
210+ uv1_hdr->msg_type = MSG_REGULAR;
211+ else
212+ uv2_hdr->msg_type = MSG_REGULAR;
213 seq_number = bcp->message_number++;
214 } else {
215- bau_desc->header.msg_type = MSG_RETRY;
216+ if (uv1)
217+ uv1_hdr->msg_type = MSG_RETRY;
218+ else
219+ uv2_hdr->msg_type = MSG_RETRY;
220 stat->s_retry_messages++;
221 }
222
223- bau_desc->header.sequence = seq_number;
224+ if (uv1)
225+ uv1_hdr->sequence = seq_number;
226+ else
227+ uv2_hdr->sequence = seq_number;
228 index = (1UL << AS_PUSH_SHIFT) | bcp->uvhub_cpu;
229 bcp->send_message = get_cycles();
230
231@@ -967,7 +983,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
232 stat->s_ntargself++;
233
234 bau_desc = bcp->descriptor_base;
235- bau_desc += ITEMS_PER_DESC * bcp->uvhub_cpu;
236+ bau_desc += (ITEMS_PER_DESC * bcp->uvhub_cpu);
237 bau_uvhubs_clear(&bau_desc->distribution, UV_DISTRIBUTION_SIZE);
238 if (set_distrib_bits(flush_mask, bcp, bau_desc, &locals, &remotes))
239 return NULL;
240@@ -1083,7 +1099,7 @@ static void __init enable_timeouts(void)
241 */
242 mmr_image |= (1L << SOFTACK_MSHIFT);
243 if (is_uv2_hub()) {
244- mmr_image |= (1L << UV2_LEG_SHFT);
245+ mmr_image &= ~(1L << UV2_LEG_SHFT);
246 mmr_image |= (1L << UV2_EXT_SHFT);
247 }
248 write_mmr_misc_control(pnode, mmr_image);
249@@ -1432,12 +1448,15 @@ static void activation_descriptor_init(int node, int pnode, int base_pnode)
250 {
251 int i;
252 int cpu;
253+ int uv1 = 0;
254 unsigned long gpa;
255 unsigned long m;
256 unsigned long n;
257 size_t dsize;
258 struct bau_desc *bau_desc;
259 struct bau_desc *bd2;
260+ struct uv1_bau_msg_header *uv1_hdr;
261+ struct uv2_bau_msg_header *uv2_hdr;
262 struct bau_control *bcp;
263
264 /*
265@@ -1451,6 +1470,8 @@ static void activation_descriptor_init(int node, int pnode, int base_pnode)
266 gpa = uv_gpa(bau_desc);
267 n = uv_gpa_to_gnode(gpa);
268 m = uv_gpa_to_offset(gpa);
269+ if (is_uv1_hub())
270+ uv1 = 1;
271
272 /* the 14-bit pnode */
273 write_mmr_descriptor_base(pnode, (n << UV_DESC_PSHIFT | m));
274@@ -1461,21 +1482,33 @@ static void activation_descriptor_init(int node, int pnode, int base_pnode)
275 */
276 for (i = 0, bd2 = bau_desc; i < (ADP_SZ * ITEMS_PER_DESC); i++, bd2++) {
277 memset(bd2, 0, sizeof(struct bau_desc));
278- bd2->header.swack_flag = 1;
279- /*
280- * The base_dest_nasid set in the message header is the nasid
281- * of the first uvhub in the partition. The bit map will
282- * indicate destination pnode numbers relative to that base.
283- * They may not be consecutive if nasid striding is being used.
284- */
285- bd2->header.base_dest_nasid = UV_PNODE_TO_NASID(base_pnode);
286- bd2->header.dest_subnodeid = UV_LB_SUBNODEID;
287- bd2->header.command = UV_NET_ENDPOINT_INTD;
288- bd2->header.int_both = 1;
289- /*
290- * all others need to be set to zero:
291- * fairness chaining multilevel count replied_to
292- */
293+ if (uv1) {
294+ uv1_hdr = &bd2->header.uv1_hdr;
295+ uv1_hdr->swack_flag = 1;
296+ /*
297+ * The base_dest_nasid set in the message header
298+ * is the nasid of the first uvhub in the partition.
299+ * The bit map will indicate destination pnode numbers
300+ * relative to that base. They may not be consecutive
301+ * if nasid striding is being used.
302+ */
303+ uv1_hdr->base_dest_nasid =
304+ UV_PNODE_TO_NASID(base_pnode);
305+ uv1_hdr->dest_subnodeid = UV_LB_SUBNODEID;
306+ uv1_hdr->command = UV_NET_ENDPOINT_INTD;
307+ uv1_hdr->int_both = 1;
308+ /*
309+ * all others need to be set to zero:
310+ * fairness chaining multilevel count replied_to
311+ */
312+ } else {
313+ uv2_hdr = &bd2->header.uv2_hdr;
314+ uv2_hdr->swack_flag = 1;
315+ uv2_hdr->base_dest_nasid =
316+ UV_PNODE_TO_NASID(base_pnode);
317+ uv2_hdr->dest_subnodeid = UV_LB_SUBNODEID;
318+ uv2_hdr->command = UV_NET_ENDPOINT_INTD;
319+ }
320 }
321 for_each_present_cpu(cpu) {
322 if (pnode != uv_blade_to_pnode(uv_cpu_to_blade_id(cpu)))
323@@ -1728,6 +1761,14 @@ static int scan_sock(struct socket_desc *sdp, struct uvhub_desc *bdp,
324 bcp->cpus_in_socket = sdp->num_cpus;
325 bcp->socket_master = *smasterp;
326 bcp->uvhub = bdp->uvhub;
327+ if (is_uv1_hub())
328+ bcp->uvhub_version = 1;
329+ else if (is_uv2_hub())
330+ bcp->uvhub_version = 2;
331+ else {
332+ printk(KERN_EMERG "uvhub version not 1 or 2\n");
333+ return 1;
334+ }
335 bcp->uvhub_master = *hmasterp;
336 bcp->uvhub_cpu = uv_cpu_hub_info(cpu)->blade_processor_id;
337 if (bcp->uvhub_cpu >= MAX_CPUS_PER_UVHUB) {
338@@ -1867,7 +1908,8 @@ static int __init uv_bau_init(void)
339 val = 1L << 63;
340 write_gmmr_activation(pnode, val);
341 mmr = 1; /* should be 1 to broadcast to both sockets */
342- write_mmr_data_broadcast(pnode, mmr);
343+ if (!is_uv1_hub())
344+ write_mmr_data_broadcast(pnode, mmr);
345 }
346 }
347
348--
3491.7.7.4
350
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0115-x86-UV2-Fix-BAU-destination-timeout-initialization.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0115-x86-UV2-Fix-BAU-destination-timeout-initialization.patch
new file mode 100644
index 00000000..0a00db86
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0115-x86-UV2-Fix-BAU-destination-timeout-initialization.patch
@@ -0,0 +1,66 @@
1From 84ceb690db1ed535deb88880d45fa193a65ac637 Mon Sep 17 00:00:00 2001
2From: Cliff Wickman <cpw@sgi.com>
3Date: Mon, 16 Jan 2012 15:18:48 -0600
4Subject: [PATCH 115/130] x86/UV2: Fix BAU destination timeout initialization
5
6commit d059f9fa84a30e04279c6ff615e9e2cf3b260191 upstream.
7
8Move the call to enable_timeouts() forward so that
9BAU_MISC_CONTROL is initialized before using it in
10calculate_destination_timeout().
11
12Fix the calculation of a BAU destination timeout
13for UV2 (in calculate_destination_timeout()).
14
15Signed-off-by: Cliff Wickman <cpw@sgi.com>
16Link: http://lkml.kernel.org/r/20120116211848.GB5767@sgi.com
17Signed-off-by: Ingo Molnar <mingo@elte.hu>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 arch/x86/platform/uv/tlb_uv.c | 13 +++++++------
21 1 files changed, 7 insertions(+), 6 deletions(-)
22
23diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
24index 1341a2e..c425ff1 100644
25--- a/arch/x86/platform/uv/tlb_uv.c
26+++ b/arch/x86/platform/uv/tlb_uv.c
27@@ -1617,14 +1617,14 @@ static int calculate_destination_timeout(void)
28 ts_ns = base * mult1 * mult2;
29 ret = ts_ns / 1000;
30 } else {
31- /* 4 bits 0/1 for 10/80us, 3 bits of multiplier */
32- mmr_image = uv_read_local_mmr(UVH_AGING_PRESCALE_SEL);
33+ /* 4 bits 0/1 for 10/80us base, 3 bits of multiplier */
34+ mmr_image = uv_read_local_mmr(UVH_LB_BAU_MISC_CONTROL);
35 mmr_image = (mmr_image & UV_SA_MASK) >> UV_SA_SHFT;
36 if (mmr_image & (1L << UV2_ACK_UNITS_SHFT))
37- mult1 = 80;
38+ base = 80;
39 else
40- mult1 = 10;
41- base = mmr_image & UV2_ACK_MASK;
42+ base = 10;
43+ mult1 = mmr_image & UV2_ACK_MASK;
44 ret = mult1 * base;
45 }
46 return ret;
47@@ -1886,6 +1886,8 @@ static int __init uv_bau_init(void)
48 uv_base_pnode = uv_blade_to_pnode(uvhub);
49 }
50
51+ enable_timeouts();
52+
53 if (init_per_cpu(nuvhubs, uv_base_pnode)) {
54 nobau = 1;
55 return 0;
56@@ -1896,7 +1898,6 @@ static int __init uv_bau_init(void)
57 if (uv_blade_nr_possible_cpus(uvhub))
58 init_uvhub(uvhub, vector, uv_base_pnode);
59
60- enable_timeouts();
61 alloc_intr_gate(vector, uv_bau_message_intr1);
62
63 for_each_possible_blade(uvhub) {
64--
651.7.7.4
66
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0116-x86-UV2-Work-around-BAU-bug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0116-x86-UV2-Work-around-BAU-bug.patch
new file mode 100644
index 00000000..a729b180
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0116-x86-UV2-Work-around-BAU-bug.patch
@@ -0,0 +1,570 @@
1From da205d30c924b3f41e37510f9a3727741ebfbc44 Mon Sep 17 00:00:00 2001
2From: Cliff Wickman <cpw@sgi.com>
3Date: Mon, 16 Jan 2012 15:19:47 -0600
4Subject: [PATCH 116/130] x86/UV2: Work around BAU bug
5
6commit c5d35d399e685acccc85a675e8765c26b2a9813a upstream.
7
8This patch implements a workaround for a UV2 hardware bug.
9The bug is a non-atomic update of a memory-mapped register. When
10hardware message delivery and software message acknowledge occur
11simultaneously the pending message acknowledge for the arriving
12message may be lost. This causes the sender's message status to
13stay busy.
14
15Part of the workaround is to not acknowledge a completed message
16until it is verified that no other message is actually using the
17resource that is mistakenly recorded in the completed message.
18
19Part of the workaround is to test for long elapsed time in such
20a busy condition, then handle it by using a spare sending
21descriptor. The stay-busy condition is eventually timed out by
22hardware, and then the original sending descriptor can be
23re-used. Most of that logic change is in keeping track of the
24current descriptor and the state of the spares.
25
26The occurrences of the workaround are added to the BAU
27statistics.
28
29Signed-off-by: Cliff Wickman <cpw@sgi.com>
30Link: http://lkml.kernel.org/r/20120116211947.GC5767@sgi.com
31Signed-off-by: Ingo Molnar <mingo@elte.hu>
32Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
33---
34 arch/x86/include/asm/uv/uv_bau.h | 13 ++-
35 arch/x86/platform/uv/tlb_uv.c | 274 +++++++++++++++++++++++++++++++++-----
36 2 files changed, 254 insertions(+), 33 deletions(-)
37
38diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h
39index 4a46b27..1b82f7e 100644
40--- a/arch/x86/include/asm/uv/uv_bau.h
41+++ b/arch/x86/include/asm/uv/uv_bau.h
42@@ -167,6 +167,7 @@
43 #define FLUSH_RETRY_TIMEOUT 2
44 #define FLUSH_GIVEUP 3
45 #define FLUSH_COMPLETE 4
46+#define FLUSH_RETRY_BUSYBUG 5
47
48 /*
49 * tuning the action when the numalink network is extremely delayed
50@@ -463,7 +464,6 @@ struct bau_pq_entry {
51 struct msg_desc {
52 struct bau_pq_entry *msg;
53 int msg_slot;
54- int swack_slot;
55 struct bau_pq_entry *queue_first;
56 struct bau_pq_entry *queue_last;
57 };
58@@ -517,6 +517,9 @@ struct ptc_stats {
59 unsigned long s_retry_messages; /* retry broadcasts */
60 unsigned long s_bau_reenabled; /* for bau enable/disable */
61 unsigned long s_bau_disabled; /* for bau enable/disable */
62+ unsigned long s_uv2_wars; /* uv2 workaround, perm. busy */
63+ unsigned long s_uv2_wars_hw; /* uv2 workaround, hiwater */
64+ unsigned long s_uv2_war_waits; /* uv2 workaround, long waits */
65 /* destination statistics */
66 unsigned long d_alltlb; /* times all tlb's on this
67 cpu were flushed */
68@@ -593,6 +596,8 @@ struct bau_control {
69 short cpus_in_socket;
70 short cpus_in_uvhub;
71 short partition_base_pnode;
72+ short using_desc; /* an index, like uvhub_cpu */
73+ unsigned int inuse_map;
74 unsigned short message_number;
75 unsigned short uvhub_quiesce;
76 short socket_acknowledge_count[DEST_Q_SIZE];
77@@ -610,6 +615,7 @@ struct bau_control {
78 int cong_response_us;
79 int cong_reps;
80 int cong_period;
81+ unsigned long clocks_per_100_usec;
82 cycles_t period_time;
83 long period_requests;
84 struct hub_and_pnode *thp;
85@@ -670,6 +676,11 @@ static inline void write_mmr_sw_ack(unsigned long mr)
86 uv_write_local_mmr(UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS, mr);
87 }
88
89+static inline void write_gmmr_sw_ack(int pnode, unsigned long mr)
90+{
91+ write_gmmr(pnode, UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS, mr);
92+}
93+
94 static inline unsigned long read_mmr_sw_ack(void)
95 {
96 return read_lmmr(UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE);
97diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
98index c425ff1..9010ca7 100644
99--- a/arch/x86/platform/uv/tlb_uv.c
100+++ b/arch/x86/platform/uv/tlb_uv.c
101@@ -157,13 +157,14 @@ static int __init uvhub_to_first_apicid(int uvhub)
102 * clear of the Timeout bit (as well) will free the resource. No reply will
103 * be sent (the hardware will only do one reply per message).
104 */
105-static void reply_to_message(struct msg_desc *mdp, struct bau_control *bcp)
106+static void reply_to_message(struct msg_desc *mdp, struct bau_control *bcp,
107+ int do_acknowledge)
108 {
109 unsigned long dw;
110 struct bau_pq_entry *msg;
111
112 msg = mdp->msg;
113- if (!msg->canceled) {
114+ if (!msg->canceled && do_acknowledge) {
115 dw = (msg->swack_vec << UV_SW_ACK_NPENDING) | msg->swack_vec;
116 write_mmr_sw_ack(dw);
117 }
118@@ -212,8 +213,8 @@ static void bau_process_retry_msg(struct msg_desc *mdp,
119 if (mmr & (msg_res << UV_SW_ACK_NPENDING)) {
120 unsigned long mr;
121 /*
122- * is the resource timed out?
123- * make everyone ignore the cancelled message.
124+ * Is the resource timed out?
125+ * Make everyone ignore the cancelled message.
126 */
127 msg2->canceled = 1;
128 stat->d_canceled++;
129@@ -231,8 +232,8 @@ static void bau_process_retry_msg(struct msg_desc *mdp,
130 * Do all the things a cpu should do for a TLB shootdown message.
131 * Other cpu's may come here at the same time for this message.
132 */
133-static void bau_process_message(struct msg_desc *mdp,
134- struct bau_control *bcp)
135+static void bau_process_message(struct msg_desc *mdp, struct bau_control *bcp,
136+ int do_acknowledge)
137 {
138 short socket_ack_count = 0;
139 short *sp;
140@@ -284,8 +285,9 @@ static void bau_process_message(struct msg_desc *mdp,
141 if (msg_ack_count == bcp->cpus_in_uvhub) {
142 /*
143 * All cpus in uvhub saw it; reply
144+ * (unless we are in the UV2 workaround)
145 */
146- reply_to_message(mdp, bcp);
147+ reply_to_message(mdp, bcp, do_acknowledge);
148 }
149 }
150
151@@ -491,27 +493,138 @@ static int uv1_wait_completion(struct bau_desc *bau_desc,
152 /*
153 * UV2 has an extra bit of status in the ACTIVATION_STATUS_2 register.
154 */
155-static unsigned long uv2_read_status(unsigned long offset, int rshft, int cpu)
156+static unsigned long uv2_read_status(unsigned long offset, int rshft, int desc)
157 {
158 unsigned long descriptor_status;
159 unsigned long descriptor_status2;
160
161 descriptor_status = ((read_lmmr(offset) >> rshft) & UV_ACT_STATUS_MASK);
162- descriptor_status2 = (read_mmr_uv2_status() >> cpu) & 0x1UL;
163+ descriptor_status2 = (read_mmr_uv2_status() >> desc) & 0x1UL;
164 descriptor_status = (descriptor_status << 1) | descriptor_status2;
165 return descriptor_status;
166 }
167
168+/*
169+ * Return whether the status of the descriptor that is normally used for this
170+ * cpu (the one indexed by its hub-relative cpu number) is busy.
171+ * The status of the original 32 descriptors is always reflected in the 64
172+ * bits of UVH_LB_BAU_SB_ACTIVATION_STATUS_0.
173+ * The bit provided by the activation_status_2 register is irrelevant to
174+ * the status if it is only being tested for busy or not busy.
175+ */
176+int normal_busy(struct bau_control *bcp)
177+{
178+ int cpu = bcp->uvhub_cpu;
179+ int mmr_offset;
180+ int right_shift;
181+
182+ mmr_offset = UVH_LB_BAU_SB_ACTIVATION_STATUS_0;
183+ right_shift = cpu * UV_ACT_STATUS_SIZE;
184+ return (((((read_lmmr(mmr_offset) >> right_shift) &
185+ UV_ACT_STATUS_MASK)) << 1) == UV2H_DESC_BUSY);
186+}
187+
188+/*
189+ * Entered when a bau descriptor has gone into a permanent busy wait because
190+ * of a hardware bug.
191+ * Workaround the bug.
192+ */
193+int handle_uv2_busy(struct bau_control *bcp)
194+{
195+ int busy_one = bcp->using_desc;
196+ int normal = bcp->uvhub_cpu;
197+ int selected = -1;
198+ int i;
199+ unsigned long descriptor_status;
200+ unsigned long status;
201+ int mmr_offset;
202+ struct bau_desc *bau_desc_old;
203+ struct bau_desc *bau_desc_new;
204+ struct bau_control *hmaster = bcp->uvhub_master;
205+ struct ptc_stats *stat = bcp->statp;
206+ cycles_t ttm;
207+
208+ stat->s_uv2_wars++;
209+ spin_lock(&hmaster->uvhub_lock);
210+ /* try for the original first */
211+ if (busy_one != normal) {
212+ if (!normal_busy(bcp))
213+ selected = normal;
214+ }
215+ if (selected < 0) {
216+ /* can't use the normal, select an alternate */
217+ mmr_offset = UVH_LB_BAU_SB_ACTIVATION_STATUS_1;
218+ descriptor_status = read_lmmr(mmr_offset);
219+
220+ /* scan available descriptors 32-63 */
221+ for (i = 0; i < UV_CPUS_PER_AS; i++) {
222+ if ((hmaster->inuse_map & (1 << i)) == 0) {
223+ status = ((descriptor_status >>
224+ (i * UV_ACT_STATUS_SIZE)) &
225+ UV_ACT_STATUS_MASK) << 1;
226+ if (status != UV2H_DESC_BUSY) {
227+ selected = i + UV_CPUS_PER_AS;
228+ break;
229+ }
230+ }
231+ }
232+ }
233+
234+ if (busy_one != normal)
235+ /* mark the busy alternate as not in-use */
236+ hmaster->inuse_map &= ~(1 << (busy_one - UV_CPUS_PER_AS));
237+
238+ if (selected >= 0) {
239+ /* switch to the selected descriptor */
240+ if (selected != normal) {
241+ /* set the selected alternate as in-use */
242+ hmaster->inuse_map |=
243+ (1 << (selected - UV_CPUS_PER_AS));
244+ if (selected > stat->s_uv2_wars_hw)
245+ stat->s_uv2_wars_hw = selected;
246+ }
247+ bau_desc_old = bcp->descriptor_base;
248+ bau_desc_old += (ITEMS_PER_DESC * busy_one);
249+ bcp->using_desc = selected;
250+ bau_desc_new = bcp->descriptor_base;
251+ bau_desc_new += (ITEMS_PER_DESC * selected);
252+ *bau_desc_new = *bau_desc_old;
253+ } else {
254+ /*
255+ * All are busy. Wait for the normal one for this cpu to
256+ * free up.
257+ */
258+ stat->s_uv2_war_waits++;
259+ spin_unlock(&hmaster->uvhub_lock);
260+ ttm = get_cycles();
261+ do {
262+ cpu_relax();
263+ } while (normal_busy(bcp));
264+ spin_lock(&hmaster->uvhub_lock);
265+ /* switch to the original descriptor */
266+ bcp->using_desc = normal;
267+ bau_desc_old = bcp->descriptor_base;
268+ bau_desc_old += (ITEMS_PER_DESC * bcp->using_desc);
269+ bcp->using_desc = (ITEMS_PER_DESC * normal);
270+ bau_desc_new = bcp->descriptor_base;
271+ bau_desc_new += (ITEMS_PER_DESC * normal);
272+ *bau_desc_new = *bau_desc_old; /* copy the entire descriptor */
273+ }
274+ spin_unlock(&hmaster->uvhub_lock);
275+ return FLUSH_RETRY_BUSYBUG;
276+}
277+
278 static int uv2_wait_completion(struct bau_desc *bau_desc,
279 unsigned long mmr_offset, int right_shift,
280 struct bau_control *bcp, long try)
281 {
282 unsigned long descriptor_stat;
283 cycles_t ttm;
284- int cpu = bcp->uvhub_cpu;
285+ int desc = bcp->using_desc;
286+ long busy_reps = 0;
287 struct ptc_stats *stat = bcp->statp;
288
289- descriptor_stat = uv2_read_status(mmr_offset, right_shift, cpu);
290+ descriptor_stat = uv2_read_status(mmr_offset, right_shift, desc);
291
292 /* spin on the status MMR, waiting for it to go idle */
293 while (descriptor_stat != UV2H_DESC_IDLE) {
294@@ -542,12 +655,23 @@ static int uv2_wait_completion(struct bau_desc *bau_desc,
295 bcp->conseccompletes = 0;
296 return FLUSH_RETRY_TIMEOUT;
297 } else {
298+ busy_reps++;
299+ if (busy_reps > 1000000) {
300+ /* not to hammer on the clock */
301+ busy_reps = 0;
302+ ttm = get_cycles();
303+ if ((ttm - bcp->send_message) >
304+ (bcp->clocks_per_100_usec)) {
305+ return handle_uv2_busy(bcp);
306+ }
307+ }
308 /*
309 * descriptor_stat is still BUSY
310 */
311 cpu_relax();
312 }
313- descriptor_stat = uv2_read_status(mmr_offset, right_shift, cpu);
314+ descriptor_stat = uv2_read_status(mmr_offset, right_shift,
315+ desc);
316 }
317 bcp->conseccompletes++;
318 return FLUSH_COMPLETE;
319@@ -563,14 +687,14 @@ static int wait_completion(struct bau_desc *bau_desc,
320 {
321 int right_shift;
322 unsigned long mmr_offset;
323- int cpu = bcp->uvhub_cpu;
324+ int desc = bcp->using_desc;
325
326- if (cpu < UV_CPUS_PER_AS) {
327+ if (desc < UV_CPUS_PER_AS) {
328 mmr_offset = UVH_LB_BAU_SB_ACTIVATION_STATUS_0;
329- right_shift = cpu * UV_ACT_STATUS_SIZE;
330+ right_shift = desc * UV_ACT_STATUS_SIZE;
331 } else {
332 mmr_offset = UVH_LB_BAU_SB_ACTIVATION_STATUS_1;
333- right_shift = ((cpu - UV_CPUS_PER_AS) * UV_ACT_STATUS_SIZE);
334+ right_shift = ((desc - UV_CPUS_PER_AS) * UV_ACT_STATUS_SIZE);
335 }
336
337 if (bcp->uvhub_version == 1)
338@@ -752,8 +876,7 @@ static void handle_cmplt(int completion_status, struct bau_desc *bau_desc,
339 * Returns 1 if it gives up entirely and the original cpu mask is to be
340 * returned to the kernel.
341 */
342-int uv_flush_send_and_wait(struct bau_desc *bau_desc,
343- struct cpumask *flush_mask, struct bau_control *bcp)
344+int uv_flush_send_and_wait(struct cpumask *flush_mask, struct bau_control *bcp)
345 {
346 int seq_number = 0;
347 int completion_stat = 0;
348@@ -766,20 +889,24 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc,
349 struct bau_control *hmaster = bcp->uvhub_master;
350 struct uv1_bau_msg_header *uv1_hdr = NULL;
351 struct uv2_bau_msg_header *uv2_hdr = NULL;
352+ struct bau_desc *bau_desc;
353
354- if (bcp->uvhub_version == 1) {
355- uv1 = 1;
356+ if (bcp->uvhub_version == 1)
357 uv1_throttle(hmaster, stat);
358- uv1_hdr = &bau_desc->header.uv1_hdr;
359- } else
360- uv2_hdr = &bau_desc->header.uv2_hdr;
361
362 while (hmaster->uvhub_quiesce)
363 cpu_relax();
364
365 time1 = get_cycles();
366 do {
367- if (try == 0) {
368+ bau_desc = bcp->descriptor_base;
369+ bau_desc += (ITEMS_PER_DESC * bcp->using_desc);
370+ if (bcp->uvhub_version == 1) {
371+ uv1 = 1;
372+ uv1_hdr = &bau_desc->header.uv1_hdr;
373+ } else
374+ uv2_hdr = &bau_desc->header.uv2_hdr;
375+ if ((try == 0) || (completion_stat == FLUSH_RETRY_BUSYBUG)) {
376 if (uv1)
377 uv1_hdr->msg_type = MSG_REGULAR;
378 else
379@@ -797,13 +924,14 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc,
380 uv1_hdr->sequence = seq_number;
381 else
382 uv2_hdr->sequence = seq_number;
383- index = (1UL << AS_PUSH_SHIFT) | bcp->uvhub_cpu;
384+ index = (1UL << AS_PUSH_SHIFT) | bcp->using_desc;
385 bcp->send_message = get_cycles();
386
387 write_mmr_activation(index);
388
389 try++;
390 completion_stat = wait_completion(bau_desc, bcp, try);
391+ /* UV2: wait_completion() may change the bcp->using_desc */
392
393 handle_cmplt(completion_stat, bau_desc, bcp, hmaster, stat);
394
395@@ -814,6 +942,7 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc,
396 }
397 cpu_relax();
398 } while ((completion_stat == FLUSH_RETRY_PLUGGED) ||
399+ (completion_stat == FLUSH_RETRY_BUSYBUG) ||
400 (completion_stat == FLUSH_RETRY_TIMEOUT));
401
402 time2 = get_cycles();
403@@ -828,6 +957,7 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc,
404 record_send_stats(time1, time2, bcp, stat, completion_stat, try);
405
406 if (completion_stat == FLUSH_GIVEUP)
407+ /* FLUSH_GIVEUP will fall back to using IPI's for tlb flush */
408 return 1;
409 return 0;
410 }
411@@ -983,7 +1113,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
412 stat->s_ntargself++;
413
414 bau_desc = bcp->descriptor_base;
415- bau_desc += (ITEMS_PER_DESC * bcp->uvhub_cpu);
416+ bau_desc += (ITEMS_PER_DESC * bcp->using_desc);
417 bau_uvhubs_clear(&bau_desc->distribution, UV_DISTRIBUTION_SIZE);
418 if (set_distrib_bits(flush_mask, bcp, bau_desc, &locals, &remotes))
419 return NULL;
420@@ -996,13 +1126,86 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
421 * uv_flush_send_and_wait returns 0 if all cpu's were messaged,
422 * or 1 if it gave up and the original cpumask should be returned.
423 */
424- if (!uv_flush_send_and_wait(bau_desc, flush_mask, bcp))
425+ if (!uv_flush_send_and_wait(flush_mask, bcp))
426 return NULL;
427 else
428 return cpumask;
429 }
430
431 /*
432+ * Search the message queue for any 'other' message with the same software
433+ * acknowledge resource bit vector.
434+ */
435+struct bau_pq_entry *find_another_by_swack(struct bau_pq_entry *msg,
436+ struct bau_control *bcp, unsigned char swack_vec)
437+{
438+ struct bau_pq_entry *msg_next = msg + 1;
439+
440+ if (msg_next > bcp->queue_last)
441+ msg_next = bcp->queue_first;
442+ while ((msg_next->swack_vec != 0) && (msg_next != msg)) {
443+ if (msg_next->swack_vec == swack_vec)
444+ return msg_next;
445+ msg_next++;
446+ if (msg_next > bcp->queue_last)
447+ msg_next = bcp->queue_first;
448+ }
449+ return NULL;
450+}
451+
452+/*
453+ * UV2 needs to work around a bug in which an arriving message has not
454+ * set a bit in the UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE register.
455+ * Such a message must be ignored.
456+ */
457+void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp)
458+{
459+ unsigned long mmr_image;
460+ unsigned char swack_vec;
461+ struct bau_pq_entry *msg = mdp->msg;
462+ struct bau_pq_entry *other_msg;
463+
464+ mmr_image = read_mmr_sw_ack();
465+ swack_vec = msg->swack_vec;
466+
467+ if ((swack_vec & mmr_image) == 0) {
468+ /*
469+ * This message was assigned a swack resource, but no
470+ * reserved acknowlegment is pending.
471+ * The bug has prevented this message from setting the MMR.
472+ * And no other message has used the same sw_ack resource.
473+ * Do the requested shootdown but do not reply to the msg.
474+ * (the 0 means make no acknowledge)
475+ */
476+ bau_process_message(mdp, bcp, 0);
477+ return;
478+ }
479+
480+ /*
481+ * Some message has set the MMR 'pending' bit; it might have been
482+ * another message. Look for that message.
483+ */
484+ other_msg = find_another_by_swack(msg, bcp, msg->swack_vec);
485+ if (other_msg) {
486+ /* There is another. Do not ack the current one. */
487+ bau_process_message(mdp, bcp, 0);
488+ /*
489+ * Let the natural processing of that message acknowledge
490+ * it. Don't get the processing of sw_ack's out of order.
491+ */
492+ return;
493+ }
494+
495+ /*
496+ * There is no other message using this sw_ack, so it is safe to
497+ * acknowledge it.
498+ */
499+ bau_process_message(mdp, bcp, 1);
500+
501+ return;
502+}
503+
504+/*
505 * The BAU message interrupt comes here. (registered by set_intr_gate)
506 * See entry_64.S
507 *
508@@ -1038,9 +1241,11 @@ void uv_bau_message_interrupt(struct pt_regs *regs)
509 count++;
510
511 msgdesc.msg_slot = msg - msgdesc.queue_first;
512- msgdesc.swack_slot = ffs(msg->swack_vec) - 1;
513 msgdesc.msg = msg;
514- bau_process_message(&msgdesc, bcp);
515+ if (bcp->uvhub_version == 2)
516+ process_uv2_message(&msgdesc, bcp);
517+ else
518+ bau_process_message(&msgdesc, bcp, 1);
519
520 msg++;
521 if (msg > msgdesc.queue_last)
522@@ -1158,7 +1363,7 @@ static int ptc_seq_show(struct seq_file *file, void *data)
523 seq_printf(file,
524 "all one mult none retry canc nocan reset rcan ");
525 seq_printf(file,
526- "disable enable\n");
527+ "disable enable wars warshw warwaits\n");
528 }
529 if (cpu < num_possible_cpus() && cpu_online(cpu)) {
530 stat = &per_cpu(ptcstats, cpu);
531@@ -1189,8 +1394,10 @@ static int ptc_seq_show(struct seq_file *file, void *data)
532 stat->d_nomsg, stat->d_retries, stat->d_canceled,
533 stat->d_nocanceled, stat->d_resets,
534 stat->d_rcanceled);
535- seq_printf(file, "%ld %ld\n",
536- stat->s_bau_disabled, stat->s_bau_reenabled);
537+ seq_printf(file, "%ld %ld %ld %ld %ld\n",
538+ stat->s_bau_disabled, stat->s_bau_reenabled,
539+ stat->s_uv2_wars, stat->s_uv2_wars_hw,
540+ stat->s_uv2_war_waits);
541 }
542 return 0;
543 }
544@@ -1564,6 +1771,7 @@ static void pq_init(int node, int pnode)
545 write_mmr_payload_first(pnode, pn_first);
546 write_mmr_payload_tail(pnode, first);
547 write_mmr_payload_last(pnode, last);
548+ write_gmmr_sw_ack(pnode, 0xffffUL);
549
550 /* in effect, all msg_type's are set to MSG_NOOP */
551 memset(pqp, 0, sizeof(struct bau_pq_entry) * DEST_Q_SIZE);
552@@ -1651,6 +1859,7 @@ static void __init init_per_cpu_tunables(void)
553 bcp->cong_response_us = congested_respns_us;
554 bcp->cong_reps = congested_reps;
555 bcp->cong_period = congested_period;
556+ bcp->clocks_per_100_usec = usec_2_cycles(100);
557 }
558 }
559
560@@ -1771,6 +1980,7 @@ static int scan_sock(struct socket_desc *sdp, struct uvhub_desc *bdp,
561 }
562 bcp->uvhub_master = *hmasterp;
563 bcp->uvhub_cpu = uv_cpu_hub_info(cpu)->blade_processor_id;
564+ bcp->using_desc = bcp->uvhub_cpu;
565 if (bcp->uvhub_cpu >= MAX_CPUS_PER_UVHUB) {
566 printk(KERN_EMERG "%d cpus per uvhub invalid\n",
567 bcp->uvhub_cpu);
568--
5691.7.7.4
570
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0117-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0117-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch
new file mode 100644
index 00000000..7545566c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0117-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch
@@ -0,0 +1,61 @@
1From 6e66c39b4394d812895bbeaa0dce566ca86a7d72 Mon Sep 17 00:00:00 2001
2From: Felix Fietkau <nbd@openwrt.org>
3Date: Sat, 14 Jan 2012 15:08:34 +0100
4Subject: [PATCH 117/130] ath9k_hw: fix interpretation of the rx KeyMiss flag
5
6commit 7a532fe7131216a02c81a6c1b1f8632da1195a58 upstream.
7
8Documentation states that the KeyMiss flag is only valid if RxFrameOK is
9unset, however empirical evidence has shown that this is false.
10When KeyMiss is set (and RxFrameOK is 1), the hardware passes a valid frame
11which has not been decrypted. The driver then falsely marks the frame
12as decrypted, and when using CCMP this corrupts the rx CCMP PN, leading
13to connection hangs.
14
15Signed-off-by: Felix Fietkau <nbd@openwrt.org>
16Signed-off-by: John W. Linville <linville@tuxdriver.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 drivers/net/wireless/ath/ath9k/ar9003_mac.c | 5 +++--
20 drivers/net/wireless/ath/ath9k/mac.c | 5 +++--
21 2 files changed, 6 insertions(+), 4 deletions(-)
22
23diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
24index ccde784..f5ae3c6 100644
25--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
26+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
27@@ -526,10 +526,11 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
28 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
29 else if (rxsp->status11 & AR_MichaelErr)
30 rxs->rs_status |= ATH9K_RXERR_MIC;
31- if (rxsp->status11 & AR_KeyMiss)
32- rxs->rs_status |= ATH9K_RXERR_KEYMISS;
33 }
34
35+ if (rxsp->status11 & AR_KeyMiss)
36+ rxs->rs_status |= ATH9K_RXERR_KEYMISS;
37+
38 return 0;
39 }
40 EXPORT_SYMBOL(ath9k_hw_process_rxdesc_edma);
41diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
42index ecdb6fd..bbcb777 100644
43--- a/drivers/net/wireless/ath/ath9k/mac.c
44+++ b/drivers/net/wireless/ath/ath9k/mac.c
45@@ -621,10 +621,11 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
46 rs->rs_status |= ATH9K_RXERR_DECRYPT;
47 else if (ads.ds_rxstatus8 & AR_MichaelErr)
48 rs->rs_status |= ATH9K_RXERR_MIC;
49- if (ads.ds_rxstatus8 & AR_KeyMiss)
50- rs->rs_status |= ATH9K_RXERR_KEYMISS;
51 }
52
53+ if (ads.ds_rxstatus8 & AR_KeyMiss)
54+ rs->rs_status |= ATH9K_RXERR_KEYMISS;
55+
56 return 0;
57 }
58 EXPORT_SYMBOL(ath9k_hw_rxprocdesc);
59--
601.7.7.4
61
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-rt2800pci-fix-spurious-interrupts-generation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-rt2800pci-fix-spurious-interrupts-generation.patch
new file mode 100644
index 00000000..c27d03de
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-rt2800pci-fix-spurious-interrupts-generation.patch
@@ -0,0 +1,86 @@
1From a72bbcd57d9b63d480ab61b5429458b10ed6595f Mon Sep 17 00:00:00 2001
2From: Stanislaw Gruszka <sgruszka@redhat.com>
3Date: Fri, 13 Jan 2012 12:59:32 +0100
4Subject: [PATCH 118/130] rt2800pci: fix spurious interrupts generation
5
6commit dfd00c4c8f3dfa1fd7cec45f83d98b2a49743dcd upstream.
7
8Same devices can generate interrupt without properly setting bit in
9INT_SOURCE_CSR register (spurious interrupt), what will cause IRQ line
10will be disabled by interrupts controller driver.
11
12We discovered that clearing INT_MASK_CSR stops such behaviour. We
13previously first read that register, and then clear all know interrupt
14sources bits and do not touch reserved bits. After this patch, we write
15to all register content (I believe writing to reserved bits on that
16register will not cause any problems, I tested that on my rt2800pci
17device).
18
19This fix very bad performance problem, practically making device
20unusable (since worked without interrupts), reported in:
21https://bugzilla.redhat.com/show_bug.cgi?id=658451
22
23We previously tried to workaround that issue in commit
244ba7d9997869d25bd223dea7536fc1ce9fab3b3b "rt2800pci: handle spurious
25interrupts", but it was reverted in commit
2682e5fc2a34fa9ffea38f00c4066b7e600a0ca5e6
27as thing, that will prevent to detect real spurious interrupts.
28
29Reported-and-tested-by: Amir Hedayaty <hedayaty@gmail.com>
30Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
31Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
32Signed-off-by: John W. Linville <linville@tuxdriver.com>
33Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
34---
35 drivers/net/wireless/rt2x00/rt2800pci.c | 28 ++++++++--------------------
36 1 files changed, 8 insertions(+), 20 deletions(-)
37
38diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
39index da48c8a..837b460 100644
40--- a/drivers/net/wireless/rt2x00/rt2800pci.c
41+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
42@@ -422,7 +422,6 @@ static int rt2800pci_init_queues(struct rt2x00_dev *rt2x00dev)
43 static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
44 enum dev_state state)
45 {
46- int mask = (state == STATE_RADIO_IRQ_ON);
47 u32 reg;
48 unsigned long flags;
49
50@@ -436,25 +435,14 @@ static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
51 }
52
53 spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
54- rt2x00pci_register_read(rt2x00dev, INT_MASK_CSR, &reg);
55- rt2x00_set_field32(&reg, INT_MASK_CSR_RXDELAYINT, 0);
56- rt2x00_set_field32(&reg, INT_MASK_CSR_TXDELAYINT, 0);
57- rt2x00_set_field32(&reg, INT_MASK_CSR_RX_DONE, mask);
58- rt2x00_set_field32(&reg, INT_MASK_CSR_AC0_DMA_DONE, 0);
59- rt2x00_set_field32(&reg, INT_MASK_CSR_AC1_DMA_DONE, 0);
60- rt2x00_set_field32(&reg, INT_MASK_CSR_AC2_DMA_DONE, 0);
61- rt2x00_set_field32(&reg, INT_MASK_CSR_AC3_DMA_DONE, 0);
62- rt2x00_set_field32(&reg, INT_MASK_CSR_HCCA_DMA_DONE, 0);
63- rt2x00_set_field32(&reg, INT_MASK_CSR_MGMT_DMA_DONE, 0);
64- rt2x00_set_field32(&reg, INT_MASK_CSR_MCU_COMMAND, 0);
65- rt2x00_set_field32(&reg, INT_MASK_CSR_RXTX_COHERENT, 0);
66- rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, mask);
67- rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, mask);
68- rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, mask);
69- rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, mask);
70- rt2x00_set_field32(&reg, INT_MASK_CSR_GPTIMER, 0);
71- rt2x00_set_field32(&reg, INT_MASK_CSR_RX_COHERENT, 0);
72- rt2x00_set_field32(&reg, INT_MASK_CSR_TX_COHERENT, 0);
73+ reg = 0;
74+ if (state == STATE_RADIO_IRQ_ON) {
75+ rt2x00_set_field32(&reg, INT_MASK_CSR_RX_DONE, 1);
76+ rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, 1);
77+ rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, 1);
78+ rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, 1);
79+ rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, 1);
80+ }
81 rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg);
82 spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
83
84--
851.7.7.4
86
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0119-xfs-fix-endian-conversion-issue-in-discard-code.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0119-xfs-fix-endian-conversion-issue-in-discard-code.patch
new file mode 100644
index 00000000..abb918e4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0119-xfs-fix-endian-conversion-issue-in-discard-code.patch
@@ -0,0 +1,45 @@
1From f245d82f78e86e6c7ac4965cfc272a8c95ab8cac Mon Sep 17 00:00:00 2001
2From: Dave Chinner <dchinner@redhat.com>
3Date: Wed, 18 Jan 2012 14:41:45 -0600
4Subject: [PATCH 119/130] xfs: fix endian conversion issue in discard code
5
6commit b1c770c273a4787069306fc82aab245e9ac72e9d upstream
7
8When finding the longest extent in an AG, we read the value directly
9out of the AGF buffer without endian conversion. This will give an
10incorrect length, resulting in FITRIM operations potentially not
11trimming everything that it should.
12
13Signed-off-by: Dave Chinner <dchinner@redhat.com>
14Reviewed-by: Christoph Hellwig <hch@lst.de>
15Signed-off-by: Ben Myers <bpm@sgi.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 fs/xfs/xfs_discard.c | 4 ++--
19 1 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
22index 8a24f0c..286a051 100644
23--- a/fs/xfs/xfs_discard.c
24+++ b/fs/xfs/xfs_discard.c
25@@ -68,7 +68,7 @@ xfs_trim_extents(
26 * Look up the longest btree in the AGF and start with it.
27 */
28 error = xfs_alloc_lookup_le(cur, 0,
29- XFS_BUF_TO_AGF(agbp)->agf_longest, &i);
30+ be32_to_cpu(XFS_BUF_TO_AGF(agbp)->agf_longest), &i);
31 if (error)
32 goto out_del_cursor;
33
34@@ -84,7 +84,7 @@ xfs_trim_extents(
35 if (error)
36 goto out_del_cursor;
37 XFS_WANT_CORRUPTED_GOTO(i == 1, out_del_cursor);
38- ASSERT(flen <= XFS_BUF_TO_AGF(agbp)->agf_longest);
39+ ASSERT(flen <= be32_to_cpu(XFS_BUF_TO_AGF(agbp)->agf_longest));
40
41 /*
42 * Too small? Give up.
43--
441.7.7.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0120-i2c-eg20t-modified-the-setting-of-transfer-rate.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0120-i2c-eg20t-modified-the-setting-of-transfer-rate.patch
new file mode 100644
index 00000000..9b8897ef
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0120-i2c-eg20t-modified-the-setting-of-transfer-rate.patch
@@ -0,0 +1,33 @@
1From 6bbe2a11996ac0900c43c0729b2574d96d191608 Mon Sep 17 00:00:00 2001
2From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
3Date: Mon, 26 Sep 2011 16:16:23 +0900
4Subject: [PATCH 120/130] i2c-eg20t: modified the setting of transfer rate.
5
6commit ff35e8b18984ad2a82cbd259fc07f0be4b34b1aa upstream.
7
8This patch modified the setting value of
9I2C Bus Transfer Rate Setting Counter regisrer.
10
11Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
12Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14---
15 drivers/i2c/busses/i2c-eg20t.c | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
19index 18936ac..730215e 100644
20--- a/drivers/i2c/busses/i2c-eg20t.c
21+++ b/drivers/i2c/busses/i2c-eg20t.c
22@@ -243,7 +243,7 @@ static void pch_i2c_init(struct i2c_algo_pch_data *adap)
23 if (pch_clk > PCH_MAX_CLK)
24 pch_clk = 62500;
25
26- pch_i2cbc = (pch_clk + (pch_i2c_speed * 4)) / pch_i2c_speed * 8;
27+ pch_i2cbc = (pch_clk + (pch_i2c_speed * 4)) / (pch_i2c_speed * 8);
28 /* Set transfer speed in I2CBC */
29 iowrite32(pch_i2cbc, p + PCH_I2CBC);
30
31--
321.7.7.4
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0121-score-fix-off-by-one-index-into-syscall-table.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0121-score-fix-off-by-one-index-into-syscall-table.patch
new file mode 100644
index 00000000..04b24803
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0121-score-fix-off-by-one-index-into-syscall-table.patch
@@ -0,0 +1,46 @@
1From 51602e17c8a1318c938a53ac13af73255ddb8a25 Mon Sep 17 00:00:00 2001
2From: Dan Rosenberg <drosenberg@vsecurity.com>
3Date: Fri, 20 Jan 2012 14:34:27 -0800
4Subject: [PATCH 121/130] score: fix off-by-one index into syscall table
5
6commit c25a785d6647984505fa165b5cd84cfc9a95970b upstream.
7
8If the provided system call number is equal to __NR_syscalls, the
9current check will pass and a function pointer just after the system
10call table may be called, since sys_call_table is an array with total
11size __NR_syscalls.
12
13Whether or not this is a security bug depends on what the compiler puts
14immediately after the system call table. It's likely that this won't do
15anything bad because there is an additional NULL check on the syscall
16entry, but if there happens to be a non-NULL value immediately after the
17system call table, this may result in local privilege escalation.
18
19Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
20Cc: Chen Liqin <liqin.chen@sunplusct.com>
21Cc: Lennox Wu <lennox.wu@gmail.com>
22Cc: Eugene Teo <eugeneteo@kernel.sg>
23Cc: Arnd Bergmann <arnd@arndb.de>
24Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
25Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
26Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
27---
28 arch/score/kernel/entry.S | 2 +-
29 1 files changed, 1 insertions(+), 1 deletions(-)
30
31diff --git a/arch/score/kernel/entry.S b/arch/score/kernel/entry.S
32index 577abba..83bb960 100644
33--- a/arch/score/kernel/entry.S
34+++ b/arch/score/kernel/entry.S
35@@ -408,7 +408,7 @@ ENTRY(handle_sys)
36 sw r9, [r0, PT_EPC]
37
38 cmpi.c r27, __NR_syscalls # check syscall number
39- bgtu illegal_syscall
40+ bgeu illegal_syscall
41
42 slli r8, r27, 2 # get syscall routine
43 la r11, sys_call_table
44--
451.7.7.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0122-cifs-lower-default-wsize-when-unix-extensions-are-no.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0122-cifs-lower-default-wsize-when-unix-extensions-are-no.patch
new file mode 100644
index 00000000..cd300c61
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0122-cifs-lower-default-wsize-when-unix-extensions-are-no.patch
@@ -0,0 +1,67 @@
1From c851c03d3c252029f2d0a4b96439fb2e7baf0071 Mon Sep 17 00:00:00 2001
2From: Jeff Layton <jlayton@redhat.com>
3Date: Tue, 17 Jan 2012 16:08:51 -0500
4Subject: [PATCH 122/130] cifs: lower default wsize when unix extensions are
5 not used
6
7commit ce91acb3acae26f4163c5a6f1f695d1a1e8d9009 upstream.
8
9We've had some reports of servers (namely, the Solaris in-kernel CIFS
10server) that don't deal properly with writes that are "too large" even
11though they set CAP_LARGE_WRITE_ANDX. Change the default to better
12mirror what windows clients do.
13
14Cc: Pavel Shilovsky <piastry@etersoft.ru>
15Reported-by: Nick Davis <phireph0x@yahoo.com>
16Signed-off-by: Jeff Layton <jlayton@redhat.com>
17Signed-off-by: Steve French <smfrench@gmail.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19---
20 fs/cifs/connect.c | 23 +++++++++++++++++++----
21 1 files changed, 19 insertions(+), 4 deletions(-)
22
23diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
24index f3670cf..63e4be4 100644
25--- a/fs/cifs/connect.c
26+++ b/fs/cifs/connect.c
27@@ -2914,18 +2914,33 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
28 #define CIFS_DEFAULT_IOSIZE (1024 * 1024)
29
30 /*
31- * Windows only supports a max of 60k reads. Default to that when posix
32- * extensions aren't in force.
33+ * Windows only supports a max of 60kb reads and 65535 byte writes. Default to
34+ * those values when posix extensions aren't in force. In actuality here, we
35+ * use 65536 to allow for a write that is a multiple of 4k. Most servers seem
36+ * to be ok with the extra byte even though Windows doesn't send writes that
37+ * are that large.
38+ *
39+ * Citation:
40+ *
41+ * http://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx
42 */
43 #define CIFS_DEFAULT_NON_POSIX_RSIZE (60 * 1024)
44+#define CIFS_DEFAULT_NON_POSIX_WSIZE (65536)
45
46 static unsigned int
47 cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *pvolume_info)
48 {
49 __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability);
50 struct TCP_Server_Info *server = tcon->ses->server;
51- unsigned int wsize = pvolume_info->wsize ? pvolume_info->wsize :
52- CIFS_DEFAULT_IOSIZE;
53+ unsigned int wsize;
54+
55+ /* start with specified wsize, or default */
56+ if (pvolume_info->wsize)
57+ wsize = pvolume_info->wsize;
58+ else if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_WRITE_CAP))
59+ wsize = CIFS_DEFAULT_IOSIZE;
60+ else
61+ wsize = CIFS_DEFAULT_NON_POSIX_WSIZE;
62
63 /* can server support 24-bit write sizes? (via UNIX extensions) */
64 if (!tcon->unix_ext || !(unix_cap & CIFS_UNIX_LARGE_WRITE_CAP))
65--
661.7.7.4
67
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0123-kprobes-initialize-before-using-a-hlist.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0123-kprobes-initialize-before-using-a-hlist.patch
new file mode 100644
index 00000000..9311e08d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0123-kprobes-initialize-before-using-a-hlist.patch
@@ -0,0 +1,49 @@
1From 4dbd29bd7e0b2a712370f8d0c25d025d996edbc1 Mon Sep 17 00:00:00 2001
2From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
3Date: Fri, 20 Jan 2012 14:34:04 -0800
4Subject: [PATCH 123/130] kprobes: initialize before using a hlist
5
6commit d496aab567e7e52b3e974c9192a5de6e77dce32c upstream.
7
8Commit ef53d9c5e ("kprobes: improve kretprobe scalability with hashed
9locking") introduced a bug where we can potentially leak
10kretprobe_instances since we initialize a hlist head after having used
11it.
12
13Initialize the hlist head before using it.
14
15Reported by: Jim Keniston <jkenisto@us.ibm.com>
16Acked-by: Jim Keniston <jkenisto@us.ibm.com>
17Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
18Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
19Cc: Srinivasa D S <srinivasa@in.ibm.com>
20Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
21Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23---
24 kernel/kprobes.c | 2 +-
25 1 files changed, 1 insertions(+), 1 deletions(-)
26
27diff --git a/kernel/kprobes.c b/kernel/kprobes.c
28index e5d8464..52fd049 100644
29--- a/kernel/kprobes.c
30+++ b/kernel/kprobes.c
31@@ -1077,6 +1077,7 @@ void __kprobes kprobe_flush_task(struct task_struct *tk)
32 /* Early boot. kretprobe_table_locks not yet initialized. */
33 return;
34
35+ INIT_HLIST_HEAD(&empty_rp);
36 hash = hash_ptr(tk, KPROBE_HASH_BITS);
37 head = &kretprobe_inst_table[hash];
38 kretprobe_table_lock(hash, &flags);
39@@ -1085,7 +1086,6 @@ void __kprobes kprobe_flush_task(struct task_struct *tk)
40 recycle_rp_inst(ri, &empty_rp);
41 }
42 kretprobe_table_unlock(hash, &flags);
43- INIT_HLIST_HEAD(&empty_rp);
44 hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) {
45 hlist_del(&ri->hlist);
46 kfree(ri);
47--
481.7.7.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0124-proc-clear_refs-do-not-clear-reserved-pages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0124-proc-clear_refs-do-not-clear-reserved-pages.patch
new file mode 100644
index 00000000..c27ca944
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0124-proc-clear_refs-do-not-clear-reserved-pages.patch
@@ -0,0 +1,64 @@
1From 6568c3dad4c19c7cfbd948fbf3f4935f0ab8d0ef Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 20 Jan 2012 14:34:09 -0800
4Subject: [PATCH 124/130] proc: clear_refs: do not clear reserved pages
5
6commit 85e72aa5384b1a614563ad63257ded0e91d1a620 upstream.
7
8/proc/pid/clear_refs is used to clear the Referenced and YOUNG bits for
9pages and corresponding page table entries of the task with PID pid, which
10includes any special mappings inserted into the page tables in order to
11provide things like vDSOs and user helper functions.
12
13On ARM this causes a problem because the vectors page is mapped as a
14global mapping and since ec706dab ("ARM: add a vma entry for the user
15accessible vector page"), a VMA is also inserted into each task for this
16page to aid unwinding through signals and syscall restarts. Since the
17vectors page is required for handling faults, clearing the YOUNG bit (and
18subsequently writing a faulting pte) means that we lose the vectors page
19*globally* and cannot fault it back in. This results in a system deadlock
20on the next exception.
21
22To see this problem in action, just run:
23
24 $ echo 1 > /proc/self/clear_refs
25
26on an ARM platform (as any user) and watch your system hang. I think this
27has been the case since 2.6.37
28
29This patch avoids clearing the aforementioned bits for reserved pages,
30therefore leaving the vectors page intact on ARM. Since reserved pages
31are not candidates for swap, this change should not have any impact on the
32usefulness of clear_refs.
33
34Signed-off-by: Will Deacon <will.deacon@arm.com>
35Reported-by: Moussa Ba <moussaba@micron.com>
36Acked-by: Hugh Dickins <hughd@google.com>
37Cc: David Rientjes <rientjes@google.com>
38Cc: Russell King <rmk@arm.linux.org.uk>
39Acked-by: Nicolas Pitre <nico@linaro.org>
40Cc: Matt Mackall <mpm@selenic.com>
41Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
42Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
43Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
44---
45 fs/proc/task_mmu.c | 3 +++
46 1 files changed, 3 insertions(+), 0 deletions(-)
47
48diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
49index e418c5a..7dcd2a2 100644
50--- a/fs/proc/task_mmu.c
51+++ b/fs/proc/task_mmu.c
52@@ -518,6 +518,9 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
53 if (!page)
54 continue;
55
56+ if (PageReserved(page))
57+ continue;
58+
59 /* Clear accessed and referenced bits. */
60 ptep_test_and_clear_young(vma, addr, pte);
61 ClearPageReferenced(page);
62--
631.7.7.4
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0125-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0125-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch
new file mode 100644
index 00000000..752f80f8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0125-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch
@@ -0,0 +1,91 @@
1From e7a0d73a0a0ba69a8969852286911f0e89a2b2dd Mon Sep 17 00:00:00 2001
2From: Michal Hocko <mhocko@suse.cz>
3Date: Fri, 20 Jan 2012 14:33:55 -0800
4Subject: [PATCH 125/130] mm: fix NULL ptr dereference in
5 __count_immobile_pages
6
7commit 687875fb7de4a95223af20ee024282fa9099f860 upstream.
8
9Fix the following NULL ptr dereference caused by
10
11 cat /sys/devices/system/memory/memory0/removable
12
13Pid: 13979, comm: sed Not tainted 3.0.13-0.5-default #1 IBM BladeCenter LS21 -[7971PAM]-/Server Blade
14RIP: __count_immobile_pages+0x4/0x100
15Process sed (pid: 13979, threadinfo ffff880221c36000, task ffff88022e788480)
16Call Trace:
17 is_pageblock_removable_nolock+0x34/0x40
18 is_mem_section_removable+0x74/0xf0
19 show_mem_removable+0x41/0x70
20 sysfs_read_file+0xfe/0x1c0
21 vfs_read+0xc7/0x130
22 sys_read+0x53/0xa0
23 system_call_fastpath+0x16/0x1b
24
25We are crashing because we are trying to dereference NULL zone which
26came from pfn=0 (struct page ffffea0000000000). According to the boot
27log this page is marked reserved:
28e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
29
30and early_node_map confirms that:
31early_node_map[3] active PFN ranges
32 1: 0x00000010 -> 0x0000009c
33 1: 0x00000100 -> 0x000bffa3
34 1: 0x00100000 -> 0x00240000
35
36The problem is that memory_present works in PAGE_SECTION_MASK aligned
37blocks so the reserved range sneaks into the the section as well. This
38also means that free_area_init_node will not take care of those reserved
39pages and they stay uninitialized.
40
41When we try to read the removable status we walk through all available
42sections and hope that the zone is valid for all pages in the section.
43But this is not true in this case as the zone and nid are not initialized.
44
45We have only one node in this particular case and it is marked as node=1
46(rather than 0) and that made the problem visible because page_to_nid will
47return 0 and there are no zones on the node.
48
49Let's check that the zone is valid and that the given pfn falls into its
50boundaries and mark the section not removable. This might cause some
51false positives, probably, but we do not have any sane way to find out
52whether the page is reserved by the platform or it is just not used for
53whatever other reasons.
54
55Signed-off-by: Michal Hocko <mhocko@suse.cz>
56Acked-by: Mel Gorman <mgorman@suse.de>
57Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
58Cc: Andrea Arcangeli <aarcange@redhat.com>
59Cc: David Rientjes <rientjes@google.com>
60Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
61Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
62Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
63---
64 mm/page_alloc.c | 11 +++++++++++
65 1 files changed, 11 insertions(+), 0 deletions(-)
66
67diff --git a/mm/page_alloc.c b/mm/page_alloc.c
68index 2b8ba3a..485be89 100644
69--- a/mm/page_alloc.c
70+++ b/mm/page_alloc.c
71@@ -5608,6 +5608,17 @@ __count_immobile_pages(struct zone *zone, struct page *page, int count)
72 bool is_pageblock_removable_nolock(struct page *page)
73 {
74 struct zone *zone = page_zone(page);
75+ unsigned long pfn = page_to_pfn(page);
76+
77+ /*
78+ * We have to be careful here because we are iterating over memory
79+ * sections which are not zone aware so we might end up outside of
80+ * the zone but still within the section.
81+ */
82+ if (!zone || zone->zone_start_pfn > pfn ||
83+ zone->zone_start_pfn + zone->spanned_pages <= pfn)
84+ return false;
85+
86 return __count_immobile_pages(zone, page, 0);
87 }
88
89--
901.7.7.4
91
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0126-iwlagn-check-for-SMPS-mode.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0126-iwlagn-check-for-SMPS-mode.patch
new file mode 100644
index 00000000..8290ecde
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0126-iwlagn-check-for-SMPS-mode.patch
@@ -0,0 +1,50 @@
1From a19ea3b8cc51cbeb52d0b2e1aa7d8987f123e3ab Mon Sep 17 00:00:00 2001
2From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
3Date: Thu, 10 Nov 2011 06:55:04 -0800
4Subject: [PATCH 126/130] iwlagn: check for SMPS mode
5
6commit b2ccccdca46273c7b321ecf5041c362cd950da20 upstream.
7
8Check and report WARN only when its invalid
9
10Resolves:
11https://bugzilla.kernel.org/show_bug.cgi?id=42621
12https://bugzilla.redhat.com/show_bug.cgi?id=766071
13
14Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
15Signed-off-by: John W. Linville <linville@tuxdriver.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 1 +
19 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 3 +++
20 2 files changed, 4 insertions(+), 0 deletions(-)
21
22diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
23index 1a52ed2..6465983 100644
24--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
25+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
26@@ -827,6 +827,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
27 case IEEE80211_SMPS_STATIC:
28 case IEEE80211_SMPS_DYNAMIC:
29 return IWL_NUM_IDLE_CHAINS_SINGLE;
30+ case IEEE80211_SMPS_AUTOMATIC:
31 case IEEE80211_SMPS_OFF:
32 return active_cnt;
33 default:
34diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
35index 5c7c17c..d552fa3 100644
36--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
37+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
38@@ -559,6 +559,9 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
39
40 mutex_lock(&priv->shrd->mutex);
41
42+ if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
43+ goto out;
44+
45 if (unlikely(test_bit(STATUS_SCANNING, &priv->shrd->status))) {
46 IWL_DEBUG_MAC80211(priv, "leave - scanning\n");
47 goto out;
48--
491.7.7.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0127-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0127-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch
new file mode 100644
index 00000000..8c1b597d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0127-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch
@@ -0,0 +1,60 @@
1From 8662eba088f07fc218cd70a54eb75f19dd89121b Mon Sep 17 00:00:00 2001
2From: Stanislaw Gruszka <sgruszka@redhat.com>
3Date: Fri, 23 Dec 2011 08:13:50 +0100
4Subject: [PATCH 127/130] iwlegacy: 3945: fix hw passive scan on radar
5 channels
6
7commit 68acc4afb040d98ddfd2cae0de09e2f4e1ee127f upstream.
8
9Patch fix firmware error on "iw dev wlan0 scan passive" for
10hardware scanning (with disable_hw_scan=0 module parameter).
11
12 iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
13 iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
14 iwl3945 0000:03:00.0: Start IWL Error Log Dump:
15 iwl3945 0000:03:00.0: Status: 0x0002A2E4, count: 1
16 iwl3945 0000:03:00.0: Desc Time asrtPC blink2 ilink1 nmiPC Line
17 iwl3945 0000:03:00.0: SYSASSERT (0x5) 0041263900 0x13756 0x0031C 0x00000 764
18 iwl3945 0000:03:00.0: Error Reply type 0x000002FC cmd C_SCAN (0x80) seq 0x443E ser 0x00340000
19 iwl3945 0000:03:00.0: Command C_SCAN failed: FW Error
20 iwl3945 0000:03:00.0: Can't stop Rx DMA.
21
22We have disable ability to change passive scanning to active on
23particular channel when traffic is detected on that channel. Otherwise
24firmware will report error, when we try to do passive scan on radar
25channels.
26
27Reported-and-debugged-by: Pedro Francisco <pedrogfrancisco@gmail.com>
28Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
29Signed-off-by: John W. Linville <linville@tuxdriver.com>
30Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
31---
32 drivers/net/wireless/iwlegacy/iwl3945-base.c | 9 ++++-----
33 1 files changed, 4 insertions(+), 5 deletions(-)
34
35diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
36index b282d86..05f2ad1 100644
37--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
38+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
39@@ -2656,14 +2656,13 @@ int iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
40 IWL_WARN(priv, "Invalid scan band\n");
41 return -EIO;
42 }
43-
44 /*
45- * If active scaning is requested but a certain channel
46- * is marked passive, we can do active scanning if we
47- * detect transmissions.
48+ * If active scaning is requested but a certain channel is marked
49+ * passive, we can do active scanning if we detect transmissions. For
50+ * passive only scanning disable switching to active on any channel.
51 */
52 scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH_DEFAULT :
53- IWL_GOOD_CRC_TH_DISABLED;
54+ IWL_GOOD_CRC_TH_NEVER;
55
56 len = iwl_legacy_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data,
57 vif->addr, priv->scan_request->ie,
58--
591.7.7.4
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0128-SHM_UNLOCK-fix-long-unpreemptible-section.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0128-SHM_UNLOCK-fix-long-unpreemptible-section.patch
new file mode 100644
index 00000000..f6c0efd2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0128-SHM_UNLOCK-fix-long-unpreemptible-section.patch
@@ -0,0 +1,186 @@
1From 1dc1d2ffffa4b2e00e43573abdb5db9ad08ce53f Mon Sep 17 00:00:00 2001
2From: Hugh Dickins <hughd@google.com>
3Date: Fri, 20 Jan 2012 14:34:19 -0800
4Subject: [PATCH 128/130] SHM_UNLOCK: fix long unpreemptible section
5
6commit 85046579bde15e532983438f86b36856e358f417 upstream.
7
8scan_mapping_unevictable_pages() is used to make SysV SHM_LOCKed pages
9evictable again once the shared memory is unlocked. It does this with
10pagevec_lookup()s across the whole object (which might occupy most of
11memory), and takes 300ms to unlock 7GB here. A cond_resched() every
12PAGEVEC_SIZE pages would be good.
13
14However, KOSAKI-san points out that this is called under shmem.c's
15info->lock, and it's also under shm.c's shm_lock(), both spinlocks.
16There is no strong reason for that: we need to take these pages off the
17unevictable list soonish, but those locks are not required for it.
18
19So move the call to scan_mapping_unevictable_pages() from shmem.c's
20unlock handling up to shm.c's unlock handling. Remove the recently
21added barrier, not needed now we have spin_unlock() before the scan.
22
23Use get_file(), with subsequent fput(), to make sure we have a reference
24to mapping throughout scan_mapping_unevictable_pages(): that's something
25that was previously guaranteed by the shm_lock().
26
27Remove shmctl's lru_add_drain_all(): we don't fault in pages at SHM_LOCK
28time, and we lazily discover them to be Unevictable later, so it serves
29no purpose for SHM_LOCK; and serves no purpose for SHM_UNLOCK, since
30pages still on pagevec are not marked Unevictable.
31
32The original code avoided redundant rescans by checking VM_LOCKED flag
33at its level: now avoid them by checking shp's SHM_LOCKED.
34
35The original code called scan_mapping_unevictable_pages() on a locked
36area at shm_destroy() time: perhaps we once had accounting cross-checks
37which required that, but not now, so skip the overhead and just let
38inode eviction deal with them.
39
40Put check_move_unevictable_page() and scan_mapping_unevictable_pages()
41under CONFIG_SHMEM (with stub for the TINY case when ramfs is used),
42more as comment than to save space; comment them used for SHM_UNLOCK.
43
44Signed-off-by: Hugh Dickins <hughd@google.com>
45Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
46Cc: Minchan Kim <minchan.kim@gmail.com>
47Cc: Rik van Riel <riel@redhat.com>
48Cc: Shaohua Li <shaohua.li@intel.com>
49Cc: Eric Dumazet <eric.dumazet@gmail.com>
50Cc: Johannes Weiner <hannes@cmpxchg.org>
51Cc: Michel Lespinasse <walken@google.com>
52Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
53Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
54Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
55---
56 ipc/shm.c | 37 ++++++++++++++++++++++---------------
57 mm/shmem.c | 7 -------
58 mm/vmscan.c | 12 +++++++++++-
59 3 files changed, 33 insertions(+), 23 deletions(-)
60
61diff --git a/ipc/shm.c b/ipc/shm.c
62index 02ecf2c..854ab58 100644
63--- a/ipc/shm.c
64+++ b/ipc/shm.c
65@@ -870,9 +870,7 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
66 case SHM_LOCK:
67 case SHM_UNLOCK:
68 {
69- struct file *uninitialized_var(shm_file);
70-
71- lru_add_drain_all(); /* drain pagevecs to lru lists */
72+ struct file *shm_file;
73
74 shp = shm_lock_check(ns, shmid);
75 if (IS_ERR(shp)) {
76@@ -895,22 +893,31 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
77 err = security_shm_shmctl(shp, cmd);
78 if (err)
79 goto out_unlock;
80-
81- if(cmd==SHM_LOCK) {
82+
83+ shm_file = shp->shm_file;
84+ if (is_file_hugepages(shm_file))
85+ goto out_unlock;
86+
87+ if (cmd == SHM_LOCK) {
88 struct user_struct *user = current_user();
89- if (!is_file_hugepages(shp->shm_file)) {
90- err = shmem_lock(shp->shm_file, 1, user);
91- if (!err && !(shp->shm_perm.mode & SHM_LOCKED)){
92- shp->shm_perm.mode |= SHM_LOCKED;
93- shp->mlock_user = user;
94- }
95+ err = shmem_lock(shm_file, 1, user);
96+ if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) {
97+ shp->shm_perm.mode |= SHM_LOCKED;
98+ shp->mlock_user = user;
99 }
100- } else if (!is_file_hugepages(shp->shm_file)) {
101- shmem_lock(shp->shm_file, 0, shp->mlock_user);
102- shp->shm_perm.mode &= ~SHM_LOCKED;
103- shp->mlock_user = NULL;
104+ goto out_unlock;
105 }
106+
107+ /* SHM_UNLOCK */
108+ if (!(shp->shm_perm.mode & SHM_LOCKED))
109+ goto out_unlock;
110+ shmem_lock(shm_file, 0, shp->mlock_user);
111+ shp->shm_perm.mode &= ~SHM_LOCKED;
112+ shp->mlock_user = NULL;
113+ get_file(shm_file);
114 shm_unlock(shp);
115+ scan_mapping_unevictable_pages(shm_file->f_mapping);
116+ fput(shm_file);
117 goto out;
118 }
119 case IPC_RMID:
120diff --git a/mm/shmem.c b/mm/shmem.c
121index d672250..cc6d40b2 100644
122--- a/mm/shmem.c
123+++ b/mm/shmem.c
124@@ -1068,13 +1068,6 @@ int shmem_lock(struct file *file, int lock, struct user_struct *user)
125 user_shm_unlock(inode->i_size, user);
126 info->flags &= ~VM_LOCKED;
127 mapping_clear_unevictable(file->f_mapping);
128- /*
129- * Ensure that a racing putback_lru_page() can see
130- * the pages of this mapping are evictable when we
131- * skip them due to !PageLRU during the scan.
132- */
133- smp_mb__after_clear_bit();
134- scan_mapping_unevictable_pages(file->f_mapping);
135 }
136 retval = 0;
137
138diff --git a/mm/vmscan.c b/mm/vmscan.c
139index f54a05b..824676a 100644
140--- a/mm/vmscan.c
141+++ b/mm/vmscan.c
142@@ -3353,6 +3353,7 @@ int page_evictable(struct page *page, struct vm_area_struct *vma)
143 return 1;
144 }
145
146+#ifdef CONFIG_SHMEM
147 /**
148 * check_move_unevictable_page - check page for evictability and move to appropriate zone lru list
149 * @page: page to check evictability and move to appropriate lru list
150@@ -3363,6 +3364,8 @@ int page_evictable(struct page *page, struct vm_area_struct *vma)
151 *
152 * Restrictions: zone->lru_lock must be held, page must be on LRU and must
153 * have PageUnevictable set.
154+ *
155+ * This function is only used for SysV IPC SHM_UNLOCK.
156 */
157 static void check_move_unevictable_page(struct page *page, struct zone *zone)
158 {
159@@ -3396,6 +3399,8 @@ retry:
160 *
161 * Scan all pages in mapping. Check unevictable pages for
162 * evictability and move them to the appropriate zone lru list.
163+ *
164+ * This function is only used for SysV IPC SHM_UNLOCK.
165 */
166 void scan_mapping_unevictable_pages(struct address_space *mapping)
167 {
168@@ -3441,9 +3446,14 @@ void scan_mapping_unevictable_pages(struct address_space *mapping)
169 pagevec_release(&pvec);
170
171 count_vm_events(UNEVICTABLE_PGSCANNED, pg_scanned);
172+ cond_resched();
173 }
174-
175 }
176+#else
177+void scan_mapping_unevictable_pages(struct address_space *mapping)
178+{
179+}
180+#endif /* CONFIG_SHMEM */
181
182 static void warn_scan_unevictable_pages(void)
183 {
184--
1851.7.7.4
186
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0129-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0129-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch
new file mode 100644
index 00000000..bc389644
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0129-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch
@@ -0,0 +1,342 @@
1From 0a86d03f1b440a70e86f9ba390c1a1240d963927 Mon Sep 17 00:00:00 2001
2From: Hugh Dickins <hughd@google.com>
3Date: Fri, 20 Jan 2012 14:34:21 -0800
4Subject: [PATCH 129/130] SHM_UNLOCK: fix Unevictable pages stranded after
5 swap
6
7commit 245132643e1cfcd145bbc86a716c1818371fcb93 upstream.
8
9Commit cc39c6a9bbde ("mm: account skipped entries to avoid looping in
10find_get_pages") correctly fixed an infinite loop; but left a problem
11that find_get_pages() on shmem would return 0 (appearing to callers to
12mean end of tree) when it meets a run of nr_pages swap entries.
13
14The only uses of find_get_pages() on shmem are via pagevec_lookup(),
15called from invalidate_mapping_pages(), and from shmctl SHM_UNLOCK's
16scan_mapping_unevictable_pages(). The first is already commented, and
17not worth worrying about; but the second can leave pages on the
18Unevictable list after an unusual sequence of swapping and locking.
19
20Fix that by using shmem_find_get_pages_and_swap() (then ignoring the
21swap) instead of pagevec_lookup().
22
23But I don't want to contaminate vmscan.c with shmem internals, nor
24shmem.c with LRU locking. So move scan_mapping_unevictable_pages() into
25shmem.c, renaming it shmem_unlock_mapping(); and rename
26check_move_unevictable_page() to check_move_unevictable_pages(), looping
27down an array of pages, oftentimes under the same lock.
28
29Leave out the "rotate unevictable list" block: that's a leftover from
30when this was used for /proc/sys/vm/scan_unevictable_pages, whose flawed
31handling involved looking at pages at tail of LRU.
32
33Was there significance to the sequence first ClearPageUnevictable, then
34test page_evictable, then SetPageUnevictable here? I think not, we're
35under LRU lock, and have no barriers between those.
36
37Signed-off-by: Hugh Dickins <hughd@google.com>
38Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
39Cc: Minchan Kim <minchan.kim@gmail.com>
40Cc: Rik van Riel <riel@redhat.com>
41Cc: Shaohua Li <shaohua.li@intel.com>
42Cc: Eric Dumazet <eric.dumazet@gmail.com>
43Cc: Johannes Weiner <hannes@cmpxchg.org>
44Cc: Michel Lespinasse <walken@google.com>
45Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
46Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
47Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
48---
49 include/linux/shmem_fs.h | 1 +
50 include/linux/swap.h | 2 +-
51 ipc/shm.c | 2 +-
52 mm/shmem.c | 46 +++++++++++++++--
53 mm/vmscan.c | 122 ++++++++++++++--------------------------------
54 5 files changed, 81 insertions(+), 92 deletions(-)
55
56diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
57index 9291ac3..6f10c9c 100644
58--- a/include/linux/shmem_fs.h
59+++ b/include/linux/shmem_fs.h
60@@ -48,6 +48,7 @@ extern struct file *shmem_file_setup(const char *name,
61 loff_t size, unsigned long flags);
62 extern int shmem_zero_setup(struct vm_area_struct *);
63 extern int shmem_lock(struct file *file, int lock, struct user_struct *user);
64+extern void shmem_unlock_mapping(struct address_space *mapping);
65 extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping,
66 pgoff_t index, gfp_t gfp_mask);
67 extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end);
68diff --git a/include/linux/swap.h b/include/linux/swap.h
69index 1e22e12..67b3fa3 100644
70--- a/include/linux/swap.h
71+++ b/include/linux/swap.h
72@@ -272,7 +272,7 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
73 #endif
74
75 extern int page_evictable(struct page *page, struct vm_area_struct *vma);
76-extern void scan_mapping_unevictable_pages(struct address_space *);
77+extern void check_move_unevictable_pages(struct page **, int nr_pages);
78
79 extern unsigned long scan_unevictable_pages;
80 extern int scan_unevictable_handler(struct ctl_table *, int,
81diff --git a/ipc/shm.c b/ipc/shm.c
82index 854ab58..b76be5b 100644
83--- a/ipc/shm.c
84+++ b/ipc/shm.c
85@@ -916,7 +916,7 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
86 shp->mlock_user = NULL;
87 get_file(shm_file);
88 shm_unlock(shp);
89- scan_mapping_unevictable_pages(shm_file->f_mapping);
90+ shmem_unlock_mapping(shm_file->f_mapping);
91 fput(shm_file);
92 goto out;
93 }
94diff --git a/mm/shmem.c b/mm/shmem.c
95index cc6d40b2..6c253f7 100644
96--- a/mm/shmem.c
97+++ b/mm/shmem.c
98@@ -379,7 +379,7 @@ static int shmem_free_swap(struct address_space *mapping,
99 /*
100 * Pagevec may contain swap entries, so shuffle up pages before releasing.
101 */
102-static void shmem_pagevec_release(struct pagevec *pvec)
103+static void shmem_deswap_pagevec(struct pagevec *pvec)
104 {
105 int i, j;
106
107@@ -389,7 +389,36 @@ static void shmem_pagevec_release(struct pagevec *pvec)
108 pvec->pages[j++] = page;
109 }
110 pvec->nr = j;
111- pagevec_release(pvec);
112+}
113+
114+/*
115+ * SysV IPC SHM_UNLOCK restore Unevictable pages to their evictable lists.
116+ */
117+void shmem_unlock_mapping(struct address_space *mapping)
118+{
119+ struct pagevec pvec;
120+ pgoff_t indices[PAGEVEC_SIZE];
121+ pgoff_t index = 0;
122+
123+ pagevec_init(&pvec, 0);
124+ /*
125+ * Minor point, but we might as well stop if someone else SHM_LOCKs it.
126+ */
127+ while (!mapping_unevictable(mapping)) {
128+ /*
129+ * Avoid pagevec_lookup(): find_get_pages() returns 0 as if it
130+ * has finished, if it hits a row of PAGEVEC_SIZE swap entries.
131+ */
132+ pvec.nr = shmem_find_get_pages_and_swap(mapping, index,
133+ PAGEVEC_SIZE, pvec.pages, indices);
134+ if (!pvec.nr)
135+ break;
136+ index = indices[pvec.nr - 1] + 1;
137+ shmem_deswap_pagevec(&pvec);
138+ check_move_unevictable_pages(pvec.pages, pvec.nr);
139+ pagevec_release(&pvec);
140+ cond_resched();
141+ }
142 }
143
144 /*
145@@ -440,7 +469,8 @@ void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
146 }
147 unlock_page(page);
148 }
149- shmem_pagevec_release(&pvec);
150+ shmem_deswap_pagevec(&pvec);
151+ pagevec_release(&pvec);
152 mem_cgroup_uncharge_end();
153 cond_resched();
154 index++;
155@@ -470,7 +500,8 @@ void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
156 continue;
157 }
158 if (index == start && indices[0] > end) {
159- shmem_pagevec_release(&pvec);
160+ shmem_deswap_pagevec(&pvec);
161+ pagevec_release(&pvec);
162 break;
163 }
164 mem_cgroup_uncharge_start();
165@@ -494,7 +525,8 @@ void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
166 }
167 unlock_page(page);
168 }
169- shmem_pagevec_release(&pvec);
170+ shmem_deswap_pagevec(&pvec);
171+ pagevec_release(&pvec);
172 mem_cgroup_uncharge_end();
173 index++;
174 }
175@@ -2439,6 +2471,10 @@ int shmem_lock(struct file *file, int lock, struct user_struct *user)
176 return 0;
177 }
178
179+void shmem_unlock_mapping(struct address_space *mapping)
180+{
181+}
182+
183 void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
184 {
185 truncate_inode_pages_range(inode->i_mapping, lstart, lend);
186diff --git a/mm/vmscan.c b/mm/vmscan.c
187index 824676a..cb33d9c 100644
188--- a/mm/vmscan.c
189+++ b/mm/vmscan.c
190@@ -636,7 +636,7 @@ redo:
191 * When racing with an mlock or AS_UNEVICTABLE clearing
192 * (page is unlocked) make sure that if the other thread
193 * does not observe our setting of PG_lru and fails
194- * isolation/check_move_unevictable_page,
195+ * isolation/check_move_unevictable_pages,
196 * we see PG_mlocked/AS_UNEVICTABLE cleared below and move
197 * the page back to the evictable list.
198 *
199@@ -3355,104 +3355,56 @@ int page_evictable(struct page *page, struct vm_area_struct *vma)
200
201 #ifdef CONFIG_SHMEM
202 /**
203- * check_move_unevictable_page - check page for evictability and move to appropriate zone lru list
204- * @page: page to check evictability and move to appropriate lru list
205- * @zone: zone page is in
206+ * check_move_unevictable_pages - check pages for evictability and move to appropriate zone lru list
207+ * @pages: array of pages to check
208+ * @nr_pages: number of pages to check
209 *
210- * Checks a page for evictability and moves the page to the appropriate
211- * zone lru list.
212- *
213- * Restrictions: zone->lru_lock must be held, page must be on LRU and must
214- * have PageUnevictable set.
215+ * Checks pages for evictability and moves them to the appropriate lru list.
216 *
217 * This function is only used for SysV IPC SHM_UNLOCK.
218 */
219-static void check_move_unevictable_page(struct page *page, struct zone *zone)
220+void check_move_unevictable_pages(struct page **pages, int nr_pages)
221 {
222- VM_BUG_ON(PageActive(page));
223+ struct zone *zone = NULL;
224+ int pgscanned = 0;
225+ int pgrescued = 0;
226+ int i;
227
228-retry:
229- ClearPageUnevictable(page);
230- if (page_evictable(page, NULL)) {
231- enum lru_list l = page_lru_base_type(page);
232+ for (i = 0; i < nr_pages; i++) {
233+ struct page *page = pages[i];
234+ struct zone *pagezone;
235
236- __dec_zone_state(zone, NR_UNEVICTABLE);
237- list_move(&page->lru, &zone->lru[l].list);
238- mem_cgroup_move_lists(page, LRU_UNEVICTABLE, l);
239- __inc_zone_state(zone, NR_INACTIVE_ANON + l);
240- __count_vm_event(UNEVICTABLE_PGRESCUED);
241- } else {
242- /*
243- * rotate unevictable list
244- */
245- SetPageUnevictable(page);
246- list_move(&page->lru, &zone->lru[LRU_UNEVICTABLE].list);
247- mem_cgroup_rotate_lru_list(page, LRU_UNEVICTABLE);
248- if (page_evictable(page, NULL))
249- goto retry;
250- }
251-}
252-
253-/**
254- * scan_mapping_unevictable_pages - scan an address space for evictable pages
255- * @mapping: struct address_space to scan for evictable pages
256- *
257- * Scan all pages in mapping. Check unevictable pages for
258- * evictability and move them to the appropriate zone lru list.
259- *
260- * This function is only used for SysV IPC SHM_UNLOCK.
261- */
262-void scan_mapping_unevictable_pages(struct address_space *mapping)
263-{
264- pgoff_t next = 0;
265- pgoff_t end = (i_size_read(mapping->host) + PAGE_CACHE_SIZE - 1) >>
266- PAGE_CACHE_SHIFT;
267- struct zone *zone;
268- struct pagevec pvec;
269+ pgscanned++;
270+ pagezone = page_zone(page);
271+ if (pagezone != zone) {
272+ if (zone)
273+ spin_unlock_irq(&zone->lru_lock);
274+ zone = pagezone;
275+ spin_lock_irq(&zone->lru_lock);
276+ }
277
278- if (mapping->nrpages == 0)
279- return;
280+ if (!PageLRU(page) || !PageUnevictable(page))
281+ continue;
282
283- pagevec_init(&pvec, 0);
284- while (next < end &&
285- pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
286- int i;
287- int pg_scanned = 0;
288-
289- zone = NULL;
290-
291- for (i = 0; i < pagevec_count(&pvec); i++) {
292- struct page *page = pvec.pages[i];
293- pgoff_t page_index = page->index;
294- struct zone *pagezone = page_zone(page);
295-
296- pg_scanned++;
297- if (page_index > next)
298- next = page_index;
299- next++;
300-
301- if (pagezone != zone) {
302- if (zone)
303- spin_unlock_irq(&zone->lru_lock);
304- zone = pagezone;
305- spin_lock_irq(&zone->lru_lock);
306- }
307+ if (page_evictable(page, NULL)) {
308+ enum lru_list lru = page_lru_base_type(page);
309
310- if (PageLRU(page) && PageUnevictable(page))
311- check_move_unevictable_page(page, zone);
312+ VM_BUG_ON(PageActive(page));
313+ ClearPageUnevictable(page);
314+ __dec_zone_state(zone, NR_UNEVICTABLE);
315+ list_move(&page->lru, &zone->lru[lru].list);
316+ mem_cgroup_move_lists(page, LRU_UNEVICTABLE, lru);
317+ __inc_zone_state(zone, NR_INACTIVE_ANON + lru);
318+ pgrescued++;
319 }
320- if (zone)
321- spin_unlock_irq(&zone->lru_lock);
322- pagevec_release(&pvec);
323+ }
324
325- count_vm_events(UNEVICTABLE_PGSCANNED, pg_scanned);
326- cond_resched();
327+ if (zone) {
328+ __count_vm_events(UNEVICTABLE_PGRESCUED, pgrescued);
329+ __count_vm_events(UNEVICTABLE_PGSCANNED, pgscanned);
330+ spin_unlock_irq(&zone->lru_lock);
331 }
332 }
333-#else
334-void scan_mapping_unevictable_pages(struct address_space *mapping)
335-{
336-}
337 #endif /* CONFIG_SHMEM */
338
339 static void warn_scan_unevictable_pages(void)
340--
3411.7.7.4
342
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0130-Linux-3.2.2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0130-Linux-3.2.2.patch
new file mode 100644
index 00000000..3a8e28ab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0130-Linux-3.2.2.patch
@@ -0,0 +1,24 @@
1From ba50be5b9e68e504f1cb2c3042ee64b9c14a2aa9 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@suse.de>
3Date: Wed, 25 Jan 2012 16:39:32 -0800
4Subject: [PATCH 130/130] Linux 3.2.2
5
6---
7 Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index c5edffa..2f684da 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,6 +1,6 @@
15 VERSION = 3
16 PATCHLEVEL = 2
17-SUBLEVEL = 1
18+SUBLEVEL = 2
19 EXTRAVERSION =
20 NAME = Saber-toothed Squirrel
21
22--
231.7.7.4
24
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0001-ALSA-hda-Fix-buffer-alignment-regression-with-Nvidia.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0001-ALSA-hda-Fix-buffer-alignment-regression-with-Nvidia.patch
new file mode 100644
index 00000000..910b3470
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0001-ALSA-hda-Fix-buffer-alignment-regression-with-Nvidia.patch
@@ -0,0 +1,62 @@
1From f0cf0a9c9ff7883ccebb09e7b84000f1c3f8a9b6 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Mon, 23 Jan 2012 17:10:24 +0100
4Subject: [PATCH 01/90] ALSA: hda - Fix buffer-alignment regression with
5 Nvidia HDMI
6
7commit 52409aa6a0e96337da137c069856298f4dd825a0 upstream.
8
9The commit 2ae66c26550cd94b0e2606a9275eb0ab7070ad0e
10 ALSA: hda: option to enable arbitrary buffer/period sizes
11introduced a regression on machines with Intel controller and Nvidia
12HDMI. The reason is that the driver modifies the global variable
13align_buffer_size when an Intel controller is found, and the Nvidia
14HDMI controller is probed after Intel although Nvidia chips require
15the aligned buffers.
16
17This patch fixes the problem by moving the flag into the local struct
18so that it's not affected by other controllers.
19
20Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42567
21
22Signed-off-by: Takashi Iwai <tiwai@suse.de>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 sound/pci/hda/hda_intel.c | 6 ++++--
26 1 files changed, 4 insertions(+), 2 deletions(-)
27
28diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
29index 5b2b75b..192e6c0 100644
30--- a/sound/pci/hda/hda_intel.c
31+++ b/sound/pci/hda/hda_intel.c
32@@ -461,6 +461,7 @@ struct azx {
33 unsigned int irq_pending_warned :1;
34 unsigned int probing :1; /* codec probing phase */
35 unsigned int snoop:1;
36+ unsigned int align_buffer_size:1;
37
38 /* for debugging */
39 unsigned int last_cmd[AZX_MAX_CODECS];
40@@ -1697,7 +1698,7 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
41 runtime->hw.rates = hinfo->rates;
42 snd_pcm_limit_hw_rates(runtime);
43 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
44- if (align_buffer_size)
45+ if (chip->align_buffer_size)
46 /* constrain buffer sizes to be multiple of 128
47 bytes. This is more efficient in terms of memory
48 access but isn't required by the HDA spec and
49@@ -2753,8 +2754,9 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
50 }
51
52 /* disable buffer size rounding to 128-byte multiples if supported */
53+ chip->align_buffer_size = align_buffer_size;
54 if (chip->driver_caps & AZX_DCAPS_BUFSIZE)
55- align_buffer_size = 0;
56+ chip->align_buffer_size = 0;
57
58 /* allow 64bit DMA address if supported by H/W */
59 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
60--
611.7.7.4
62
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0002-ALSA-hda-Fix-silent-outputs-from-docking-station-jac.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0002-ALSA-hda-Fix-silent-outputs-from-docking-station-jac.patch
new file mode 100644
index 00000000..cdffe069
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0002-ALSA-hda-Fix-silent-outputs-from-docking-station-jac.patch
@@ -0,0 +1,64 @@
1From b7b74418ff425c3ae197317ae839ff692b36bc44 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Mon, 23 Jan 2012 18:23:36 +0100
4Subject: [PATCH 02/90] ALSA: hda - Fix silent outputs from docking-station
5 jacks of Dell laptops
6
7commit b4ead019afc201f71c39cd0dfcaafed4a97b3dd2 upstream.
8
9The recent change of the power-widget handling for IDT codecs caused
10the silent output from the docking-station line-out jack. This was
11partially fixed by the commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33
12"ALSA: hda - Fix the lost power-setup of seconary pins after PM resume".
13But the line-out on the docking-station is still silent when booted
14with the jack plugged even by this fix.
15
16The remainig bug is that the power-widget is set off in stac92xx_init()
17because the pins in cfg->line_out_pins[] aren't checked there properly
18but only hp_pins[] are checked in is_nid_hp_pin().
19
20This patch fixes the problem by checking both HP and line-out pins
21and leaving the power-map correctly.
22
23Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637
24
25Signed-off-by: Takashi Iwai <tiwai@suse.de>
26Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27---
28 sound/pci/hda/patch_sigmatel.c | 8 +++++---
29 1 files changed, 5 insertions(+), 3 deletions(-)
30
31diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
32index f3c73a9..2141cab 100644
33--- a/sound/pci/hda/patch_sigmatel.c
34+++ b/sound/pci/hda/patch_sigmatel.c
35@@ -4253,13 +4253,15 @@ static int enable_pin_detect(struct hda_codec *codec, hda_nid_t nid,
36 return 1;
37 }
38
39-static int is_nid_hp_pin(struct auto_pin_cfg *cfg, hda_nid_t nid)
40+static int is_nid_out_jack_pin(struct auto_pin_cfg *cfg, hda_nid_t nid)
41 {
42 int i;
43 for (i = 0; i < cfg->hp_outs; i++)
44 if (cfg->hp_pins[i] == nid)
45 return 1; /* nid is a HP-Out */
46-
47+ for (i = 0; i < cfg->line_outs; i++)
48+ if (cfg->line_out_pins[i] == nid)
49+ return 1; /* nid is a line-Out */
50 return 0; /* nid is not a HP-Out */
51 };
52
53@@ -4465,7 +4467,7 @@ static int stac92xx_init(struct hda_codec *codec)
54 continue;
55 }
56
57- if (is_nid_hp_pin(cfg, nid))
58+ if (is_nid_out_jack_pin(cfg, nid))
59 continue; /* already has an unsol event */
60
61 pinctl = snd_hda_codec_read(codec, nid, 0,
62--
631.7.7.4
64
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0003-eCryptfs-Sanitize-write-counts-of-dev-ecryptfs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0003-eCryptfs-Sanitize-write-counts-of-dev-ecryptfs.patch
new file mode 100644
index 00000000..5ce6c2cc
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0003-eCryptfs-Sanitize-write-counts-of-dev-ecryptfs.patch
@@ -0,0 +1,103 @@
1From 07750bbe6fff3f00487746556c6b4914ad3270f0 Mon Sep 17 00:00:00 2001
2From: Tyler Hicks <tyhicks@canonical.com>
3Date: Thu, 12 Jan 2012 11:30:44 +0100
4Subject: [PATCH 03/90] eCryptfs: Sanitize write counts of /dev/ecryptfs
5
6commit db10e556518eb9d21ee92ff944530d84349684f4 upstream.
7
8A malicious count value specified when writing to /dev/ecryptfs may
9result in a a very large kernel memory allocation.
10
11This patch peeks at the specified packet payload size, adds that to the
12size of the packet headers and compares the result with the write count
13value. The resulting maximum memory allocation size is approximately 532
14bytes.
15
16Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
17Reported-by: Sasha Levin <levinsasha928@gmail.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 fs/ecryptfs/miscdev.c | 56 +++++++++++++++++++++++++++++++++---------------
21 1 files changed, 38 insertions(+), 18 deletions(-)
22
23diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c
24index 940a82e..0dc5a3d 100644
25--- a/fs/ecryptfs/miscdev.c
26+++ b/fs/ecryptfs/miscdev.c
27@@ -409,11 +409,47 @@ ecryptfs_miscdev_write(struct file *file, const char __user *buf,
28 ssize_t sz = 0;
29 char *data;
30 uid_t euid = current_euid();
31+ unsigned char packet_size_peek[3];
32 int rc;
33
34- if (count == 0)
35+ if (count == 0) {
36 goto out;
37+ } else if (count == (1 + 4)) {
38+ /* Likely a harmless MSG_HELO or MSG_QUIT - no packet length */
39+ goto memdup;
40+ } else if (count < (1 + 4 + 1)
41+ || count > (1 + 4 + 2 + sizeof(struct ecryptfs_message) + 4
42+ + ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES)) {
43+ printk(KERN_WARNING "%s: Acceptable packet size range is "
44+ "[%d-%lu], but amount of data written is [%zu].",
45+ __func__, (1 + 4 + 1),
46+ (1 + 4 + 2 + sizeof(struct ecryptfs_message) + 4
47+ + ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES), count);
48+ return -EINVAL;
49+ }
50+
51+ if (copy_from_user(packet_size_peek, (buf + 1 + 4),
52+ sizeof(packet_size_peek))) {
53+ printk(KERN_WARNING "%s: Error while inspecting packet size\n",
54+ __func__);
55+ return -EFAULT;
56+ }
57+
58+ rc = ecryptfs_parse_packet_length(packet_size_peek, &packet_size,
59+ &packet_size_length);
60+ if (rc) {
61+ printk(KERN_WARNING "%s: Error parsing packet length; "
62+ "rc = [%d]\n", __func__, rc);
63+ return rc;
64+ }
65+
66+ if ((1 + 4 + packet_size_length + packet_size) != count) {
67+ printk(KERN_WARNING "%s: Invalid packet size [%zu]\n", __func__,
68+ packet_size);
69+ return -EINVAL;
70+ }
71
72+memdup:
73 data = memdup_user(buf, count);
74 if (IS_ERR(data)) {
75 printk(KERN_ERR "%s: memdup_user returned error [%ld]\n",
76@@ -435,23 +471,7 @@ ecryptfs_miscdev_write(struct file *file, const char __user *buf,
77 }
78 memcpy(&counter_nbo, &data[i], 4);
79 seq = be32_to_cpu(counter_nbo);
80- i += 4;
81- rc = ecryptfs_parse_packet_length(&data[i], &packet_size,
82- &packet_size_length);
83- if (rc) {
84- printk(KERN_WARNING "%s: Error parsing packet length; "
85- "rc = [%d]\n", __func__, rc);
86- goto out_free;
87- }
88- i += packet_size_length;
89- if ((1 + 4 + packet_size_length + packet_size) != count) {
90- printk(KERN_WARNING "%s: (1 + packet_size_length([%zd])"
91- " + packet_size([%zd]))([%zd]) != "
92- "count([%zd]). Invalid packet format.\n",
93- __func__, packet_size_length, packet_size,
94- (1 + packet_size_length + packet_size), count);
95- goto out_free;
96- }
97+ i += 4 + packet_size_length;
98 rc = ecryptfs_miscdev_response(&data[i], packet_size,
99 euid, current_user_ns(),
100 task_pid(current), seq);
101--
1021.7.7.4
103
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0004-ecryptfs-Improve-metadata-read-failure-logging.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0004-ecryptfs-Improve-metadata-read-failure-logging.patch
new file mode 100644
index 00000000..edb48daa
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0004-ecryptfs-Improve-metadata-read-failure-logging.patch
@@ -0,0 +1,58 @@
1From f5b95f7b4ba8b33f149c045528a030c9e43be2d1 Mon Sep 17 00:00:00 2001
2From: Tim Gardner <tim.gardner@canonical.com>
3Date: Thu, 12 Jan 2012 16:31:55 +0100
4Subject: [PATCH 04/90] ecryptfs: Improve metadata read failure logging
5
6commit 30373dc0c87ffef68d5628e77d56ffb1fa22e1ee upstream.
7
8Print inode on metadata read failure. The only real
9way of dealing with metadata read failures is to delete
10the underlying file system file. Having the inode
11allows one to 'find . -inum INODE`.
12
13[tyhicks@canonical.com: Removed some minor not-for-stable parts]
14Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
15Reviewed-by: Kees Cook <keescook@chromium.org>
16Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 fs/ecryptfs/crypto.c | 9 ++++++---
20 1 files changed, 6 insertions(+), 3 deletions(-)
21
22diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
23index 2a83425..2bf5203 100644
24--- a/fs/ecryptfs/crypto.c
25+++ b/fs/ecryptfs/crypto.c
26@@ -1620,7 +1620,8 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry)
27 rc = ecryptfs_read_xattr_region(page_virt, ecryptfs_inode);
28 if (rc) {
29 printk(KERN_DEBUG "Valid eCryptfs headers not found in "
30- "file header region or xattr region\n");
31+ "file header region or xattr region, inode %lu\n",
32+ ecryptfs_inode->i_ino);
33 rc = -EINVAL;
34 goto out;
35 }
36@@ -1629,7 +1630,8 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry)
37 ECRYPTFS_DONT_VALIDATE_HEADER_SIZE);
38 if (rc) {
39 printk(KERN_DEBUG "Valid eCryptfs headers not found in "
40- "file xattr region either\n");
41+ "file xattr region either, inode %lu\n",
42+ ecryptfs_inode->i_ino);
43 rc = -EINVAL;
44 }
45 if (crypt_stat->mount_crypt_stat->flags
46@@ -1640,7 +1642,8 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry)
47 "crypto metadata only in the extended attribute "
48 "region, but eCryptfs was mounted without "
49 "xattr support enabled. eCryptfs will not treat "
50- "this like an encrypted file.\n");
51+ "this like an encrypted file, inode %lu\n",
52+ ecryptfs_inode->i_ino);
53 rc = -EINVAL;
54 }
55 }
56--
571.7.7.4
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0005-eCryptfs-Make-truncate-path-killable.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0005-eCryptfs-Make-truncate-path-killable.patch
new file mode 100644
index 00000000..aeefee1e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0005-eCryptfs-Make-truncate-path-killable.patch
@@ -0,0 +1,71 @@
1From 45320992a2d473d6e518e80ce501cc083c15a54e Mon Sep 17 00:00:00 2001
2From: Tyler Hicks <tyhicks@canonical.com>
3Date: Wed, 18 Jan 2012 18:30:04 -0600
4Subject: [PATCH 05/90] eCryptfs: Make truncate path killable
5
6commit 5e6f0d769017cc49207ef56996e42363ec26c1f0 upstream.
7
8ecryptfs_write() handles the truncation of eCryptfs inodes. It grabs a
9page, zeroes out the appropriate portions, and then encrypts the page
10before writing it to the lower filesystem. It was unkillable and due to
11the lack of sparse file support could result in tying up a large portion
12of system resources, while encrypting pages of zeros, with no way for
13the truncate operation to be stopped from userspace.
14
15This patch adds the ability for ecryptfs_write() to detect a pending
16fatal signal and return as gracefully as possible. The intent is to
17leave the lower file in a useable state, while still allowing a user to
18break out of the encryption loop. If a pending fatal signal is detected,
19the eCryptfs inode size is updated to reflect the modified inode size
20and then -EINTR is returned.
21
22Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 fs/ecryptfs/read_write.c | 19 ++++++++++++++-----
26 1 files changed, 14 insertions(+), 5 deletions(-)
27
28diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c
29index 3745f7c..54eb14c 100644
30--- a/fs/ecryptfs/read_write.c
31+++ b/fs/ecryptfs/read_write.c
32@@ -132,6 +132,11 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset,
33 size_t num_bytes = (PAGE_CACHE_SIZE - start_offset_in_page);
34 size_t total_remaining_bytes = ((offset + size) - pos);
35
36+ if (fatal_signal_pending(current)) {
37+ rc = -EINTR;
38+ break;
39+ }
40+
41 if (num_bytes > total_remaining_bytes)
42 num_bytes = total_remaining_bytes;
43 if (pos < offset) {
44@@ -193,15 +198,19 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset,
45 }
46 pos += num_bytes;
47 }
48- if ((offset + size) > ecryptfs_file_size) {
49- i_size_write(ecryptfs_inode, (offset + size));
50+ if (pos > ecryptfs_file_size) {
51+ i_size_write(ecryptfs_inode, pos);
52 if (crypt_stat->flags & ECRYPTFS_ENCRYPTED) {
53- rc = ecryptfs_write_inode_size_to_metadata(
54+ int rc2;
55+
56+ rc2 = ecryptfs_write_inode_size_to_metadata(
57 ecryptfs_inode);
58- if (rc) {
59+ if (rc2) {
60 printk(KERN_ERR "Problem with "
61 "ecryptfs_write_inode_size_to_metadata; "
62- "rc = [%d]\n", rc);
63+ "rc = [%d]\n", rc2);
64+ if (!rc)
65+ rc = rc2;
66 goto out;
67 }
68 }
69--
701.7.7.4
71
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0006-eCryptfs-Check-inode-changes-in-setattr.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0006-eCryptfs-Check-inode-changes-in-setattr.patch
new file mode 100644
index 00000000..04f130b6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0006-eCryptfs-Check-inode-changes-in-setattr.patch
@@ -0,0 +1,122 @@
1From 86977fde23e2c2b4915634d519565a2007b8d339 Mon Sep 17 00:00:00 2001
2From: Tyler Hicks <tyhicks@canonical.com>
3Date: Thu, 19 Jan 2012 20:33:44 -0600
4Subject: [PATCH 06/90] eCryptfs: Check inode changes in setattr
5
6commit a261a03904849c3df50bd0300efb7fb3f865137d upstream.
7
8Most filesystems call inode_change_ok() very early in ->setattr(), but
9eCryptfs didn't call it at all. It allowed the lower filesystem to make
10the call in its ->setattr() function. Then, eCryptfs would copy the
11appropriate inode attributes from the lower inode to the eCryptfs inode.
12
13This patch changes that and actually calls inode_change_ok() on the
14eCryptfs inode, fairly early in ecryptfs_setattr(). Ideally, the call
15would happen earlier in ecryptfs_setattr(), but there are some possible
16inode initialization steps that must happen first.
17
18Since the call was already being made on the lower inode, the change in
19functionality should be minimal, except for the case of a file extending
20truncate call. In that case, inode_newsize_ok() was never being
21called on the eCryptfs inode. Rather than inode_newsize_ok() catching
22maximum file size errors early on, eCryptfs would encrypt zeroed pages
23and write them to the lower filesystem until the lower filesystem's
24write path caught the error in generic_write_checks(). This patch
25introduces a new function, called ecryptfs_inode_newsize_ok(), which
26checks if the new lower file size is within the appropriate limits when
27the truncate operation will be growing the lower file.
28
29In summary this change prevents eCryptfs truncate operations (and the
30resulting page encryptions), which would exceed the lower filesystem
31limits or FSIZE rlimits, from ever starting.
32
33Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
34Reviewed-by: Li Wang <liwang@nudt.edu.cn>
35Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
36---
37 fs/ecryptfs/inode.c | 48 ++++++++++++++++++++++++++++++++++++------------
38 1 files changed, 36 insertions(+), 12 deletions(-)
39
40diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
41index 32f90a3..d2039ca 100644
42--- a/fs/ecryptfs/inode.c
43+++ b/fs/ecryptfs/inode.c
44@@ -841,18 +841,6 @@ static int truncate_upper(struct dentry *dentry, struct iattr *ia,
45 size_t num_zeros = (PAGE_CACHE_SIZE
46 - (ia->ia_size & ~PAGE_CACHE_MASK));
47
48-
49- /*
50- * XXX(truncate) this should really happen at the begginning
51- * of ->setattr. But the code is too messy to that as part
52- * of a larger patch. ecryptfs is also totally missing out
53- * on the inode_change_ok check at the beginning of
54- * ->setattr while would include this.
55- */
56- rc = inode_newsize_ok(inode, ia->ia_size);
57- if (rc)
58- goto out;
59-
60 if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) {
61 truncate_setsize(inode, ia->ia_size);
62 lower_ia->ia_size = ia->ia_size;
63@@ -902,6 +890,28 @@ out:
64 return rc;
65 }
66
67+static int ecryptfs_inode_newsize_ok(struct inode *inode, loff_t offset)
68+{
69+ struct ecryptfs_crypt_stat *crypt_stat;
70+ loff_t lower_oldsize, lower_newsize;
71+
72+ crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat;
73+ lower_oldsize = upper_size_to_lower_size(crypt_stat,
74+ i_size_read(inode));
75+ lower_newsize = upper_size_to_lower_size(crypt_stat, offset);
76+ if (lower_newsize > lower_oldsize) {
77+ /*
78+ * The eCryptfs inode and the new *lower* size are mixed here
79+ * because we may not have the lower i_mutex held and/or it may
80+ * not be appropriate to call inode_newsize_ok() with inodes
81+ * from other filesystems.
82+ */
83+ return inode_newsize_ok(inode, lower_newsize);
84+ }
85+
86+ return 0;
87+}
88+
89 /**
90 * ecryptfs_truncate
91 * @dentry: The ecryptfs layer dentry
92@@ -918,6 +928,10 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length)
93 struct iattr lower_ia = { .ia_valid = 0 };
94 int rc;
95
96+ rc = ecryptfs_inode_newsize_ok(dentry->d_inode, new_length);
97+ if (rc)
98+ return rc;
99+
100 rc = truncate_upper(dentry, &ia, &lower_ia);
101 if (!rc && lower_ia.ia_valid & ATTR_SIZE) {
102 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
103@@ -997,6 +1011,16 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
104 }
105 }
106 mutex_unlock(&crypt_stat->cs_mutex);
107+
108+ rc = inode_change_ok(inode, ia);
109+ if (rc)
110+ goto out;
111+ if (ia->ia_valid & ATTR_SIZE) {
112+ rc = ecryptfs_inode_newsize_ok(inode, ia->ia_size);
113+ if (rc)
114+ goto out;
115+ }
116+
117 if (S_ISREG(inode->i_mode)) {
118 rc = filemap_write_and_wait(inode->i_mapping);
119 if (rc)
120--
1211.7.7.4
122
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0007-eCryptfs-Fix-oops-when-printing-debug-info-in-extent.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0007-eCryptfs-Fix-oops-when-printing-debug-info-in-extent.patch
new file mode 100644
index 00000000..2125487c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0007-eCryptfs-Fix-oops-when-printing-debug-info-in-extent.patch
@@ -0,0 +1,103 @@
1From ac8cdf4aded6810a3a8a331ad9fe0ffff119323a Mon Sep 17 00:00:00 2001
2From: Tyler Hicks <tyhicks@canonical.com>
3Date: Tue, 24 Jan 2012 10:02:22 -0600
4Subject: [PATCH 07/90] eCryptfs: Fix oops when printing debug info in extent
5 crypto functions
6
7commit 58ded24f0fcb85bddb665baba75892f6ad0f4b8a upstream.
8
9If pages passed to the eCryptfs extent-based crypto functions are not
10mapped and the module parameter ecryptfs_verbosity=1 was specified at
11loading time, a NULL pointer dereference will occur.
12
13Note that this wouldn't happen on a production system, as you wouldn't
14pass ecryptfs_verbosity=1 on a production system. It leaks private
15information to the system logs and is for debugging only.
16
17The debugging info printed in these messages is no longer very useful
18and rather than doing a kmap() in these debugging paths, it will be
19better to simply remove the debugging paths completely.
20
21https://launchpad.net/bugs/913651
22
23Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 fs/ecryptfs/crypto.c | 40 ----------------------------------------
27 1 files changed, 0 insertions(+), 40 deletions(-)
28
29diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
30index 2bf5203..68b19ab 100644
31--- a/fs/ecryptfs/crypto.c
32+++ b/fs/ecryptfs/crypto.c
33@@ -417,17 +417,6 @@ static int ecryptfs_encrypt_extent(struct page *enc_extent_page,
34 (unsigned long long)(extent_base + extent_offset), rc);
35 goto out;
36 }
37- if (unlikely(ecryptfs_verbosity > 0)) {
38- ecryptfs_printk(KERN_DEBUG, "Encrypting extent "
39- "with iv:\n");
40- ecryptfs_dump_hex(extent_iv, crypt_stat->iv_bytes);
41- ecryptfs_printk(KERN_DEBUG, "First 8 bytes before "
42- "encryption:\n");
43- ecryptfs_dump_hex((char *)
44- (page_address(page)
45- + (extent_offset * crypt_stat->extent_size)),
46- 8);
47- }
48 rc = ecryptfs_encrypt_page_offset(crypt_stat, enc_extent_page, 0,
49 page, (extent_offset
50 * crypt_stat->extent_size),
51@@ -440,14 +429,6 @@ static int ecryptfs_encrypt_extent(struct page *enc_extent_page,
52 goto out;
53 }
54 rc = 0;
55- if (unlikely(ecryptfs_verbosity > 0)) {
56- ecryptfs_printk(KERN_DEBUG, "Encrypt extent [0x%.16llx]; "
57- "rc = [%d]\n",
58- (unsigned long long)(extent_base + extent_offset), rc);
59- ecryptfs_printk(KERN_DEBUG, "First 8 bytes after "
60- "encryption:\n");
61- ecryptfs_dump_hex((char *)(page_address(enc_extent_page)), 8);
62- }
63 out:
64 return rc;
65 }
66@@ -543,17 +524,6 @@ static int ecryptfs_decrypt_extent(struct page *page,
67 (unsigned long long)(extent_base + extent_offset), rc);
68 goto out;
69 }
70- if (unlikely(ecryptfs_verbosity > 0)) {
71- ecryptfs_printk(KERN_DEBUG, "Decrypting extent "
72- "with iv:\n");
73- ecryptfs_dump_hex(extent_iv, crypt_stat->iv_bytes);
74- ecryptfs_printk(KERN_DEBUG, "First 8 bytes before "
75- "decryption:\n");
76- ecryptfs_dump_hex((char *)
77- (page_address(enc_extent_page)
78- + (extent_offset * crypt_stat->extent_size)),
79- 8);
80- }
81 rc = ecryptfs_decrypt_page_offset(crypt_stat, page,
82 (extent_offset
83 * crypt_stat->extent_size),
84@@ -567,16 +537,6 @@ static int ecryptfs_decrypt_extent(struct page *page,
85 goto out;
86 }
87 rc = 0;
88- if (unlikely(ecryptfs_verbosity > 0)) {
89- ecryptfs_printk(KERN_DEBUG, "Decrypt extent [0x%.16llx]; "
90- "rc = [%d]\n",
91- (unsigned long long)(extent_base + extent_offset), rc);
92- ecryptfs_printk(KERN_DEBUG, "First 8 bytes after "
93- "decryption:\n");
94- ecryptfs_dump_hex((char *)(page_address(page)
95- + (extent_offset
96- * crypt_stat->extent_size)), 8);
97- }
98 out:
99 return rc;
100 }
101--
1021.7.7.4
103
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0008-drm-radeon-kms-Add-an-MSI-quirk-for-Dell-RS690.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0008-drm-radeon-kms-Add-an-MSI-quirk-for-Dell-RS690.patch
new file mode 100644
index 00000000..21b4761b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0008-drm-radeon-kms-Add-an-MSI-quirk-for-Dell-RS690.patch
@@ -0,0 +1,38 @@
1From b838f82f8bc3ece8e4f2f8710629b4900949df28 Mon Sep 17 00:00:00 2001
2From: Alex Deucher <alexander.deucher@amd.com>
3Date: Sun, 15 Jan 2012 08:51:12 -0500
4Subject: [PATCH 08/90] drm/radeon/kms: Add an MSI quirk for Dell RS690
5
6commit 44517c44496062180a6376cc704b33129441ce60 upstream.
7
8Interrupts only work with MSIs.
9https://bugs.freedesktop.org/show_bug.cgi?id=37679
10
11Reported-by: Dmitry Podgorny <pasis.uax@gmail.com>
12Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13Signed-off-by: Dave Airlie <airlied@redhat.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/gpu/drm/radeon/radeon_irq_kms.c | 6 ++++++
17 1 files changed, 6 insertions(+), 0 deletions(-)
18
19diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
20index 8f86aeb..e7ddb49 100644
21--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
22+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
23@@ -134,6 +134,12 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
24 /* Dell RS690 only seems to work with MSIs. */
25 if ((rdev->pdev->device == 0x791f) &&
26 (rdev->pdev->subsystem_vendor == 0x1028) &&
27+ (rdev->pdev->subsystem_device == 0x01fc))
28+ return true;
29+
30+ /* Dell RS690 only seems to work with MSIs. */
31+ if ((rdev->pdev->device == 0x791f) &&
32+ (rdev->pdev->subsystem_vendor == 0x1028) &&
33 (rdev->pdev->subsystem_device == 0x01fd))
34 return true;
35
36--
371.7.7.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0009-drm-radeon-kms-move-panel-mode-setup-into-encoder-mo.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0009-drm-radeon-kms-move-panel-mode-setup-into-encoder-mo.patch
new file mode 100644
index 00000000..288c4f9e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0009-drm-radeon-kms-move-panel-mode-setup-into-encoder-mo.patch
@@ -0,0 +1,130 @@
1From 4a44e7de68c61737b17954db3cadc632db685ed6 Mon Sep 17 00:00:00 2001
2From: Alex Deucher <alexander.deucher@amd.com>
3Date: Fri, 20 Jan 2012 15:01:29 -0500
4Subject: [PATCH 09/90] drm/radeon/kms: move panel mode setup into encoder
5 mode set
6
7commit 386d4d751e8e0b4b693bb724f09aae064ee5297d upstream.
8
9Needs to happen earlier in the mode set.
10
11Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12Signed-off-by: Dave Airlie <airlied@redhat.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/gpu/drm/radeon/atombios_dp.c | 22 ++++++++++------------
16 drivers/gpu/drm/radeon/atombios_encoders.c | 11 +++++++++++
17 drivers/gpu/drm/radeon/radeon_mode.h | 3 +++
18 3 files changed, 24 insertions(+), 12 deletions(-)
19
20diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
21index 6fb335a..a71557c 100644
22--- a/drivers/gpu/drm/radeon/atombios_dp.c
23+++ b/drivers/gpu/drm/radeon/atombios_dp.c
24@@ -549,8 +549,8 @@ bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector)
25 return false;
26 }
27
28-static void radeon_dp_set_panel_mode(struct drm_encoder *encoder,
29- struct drm_connector *connector)
30+int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
31+ struct drm_connector *connector)
32 {
33 struct drm_device *dev = encoder->dev;
34 struct radeon_device *rdev = dev->dev_private;
35@@ -558,7 +558,7 @@ static void radeon_dp_set_panel_mode(struct drm_encoder *encoder,
36 int panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
37
38 if (!ASIC_IS_DCE4(rdev))
39- return;
40+ return panel_mode;
41
42 if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) ==
43 ENCODER_OBJECT_ID_NUTMEG)
44@@ -572,14 +572,7 @@ static void radeon_dp_set_panel_mode(struct drm_encoder *encoder,
45 panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
46 }
47
48- atombios_dig_encoder_setup(encoder,
49- ATOM_ENCODER_CMD_SETUP_PANEL_MODE,
50- panel_mode);
51-
52- if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) &&
53- (panel_mode == DP_PANEL_MODE_INTERNAL_DP2_MODE)) {
54- radeon_write_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_SET, 1);
55- }
56+ return panel_mode;
57 }
58
59 void radeon_dp_set_link_config(struct drm_connector *connector,
60@@ -717,6 +710,8 @@ static void radeon_dp_set_tp(struct radeon_dp_link_train_info *dp_info, int tp)
61
62 static int radeon_dp_link_train_init(struct radeon_dp_link_train_info *dp_info)
63 {
64+ struct radeon_encoder *radeon_encoder = to_radeon_encoder(dp_info->encoder);
65+ struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
66 u8 tmp;
67
68 /* power up the sink */
69@@ -732,7 +727,10 @@ static int radeon_dp_link_train_init(struct radeon_dp_link_train_info *dp_info)
70 radeon_write_dpcd_reg(dp_info->radeon_connector,
71 DP_DOWNSPREAD_CTRL, 0);
72
73- radeon_dp_set_panel_mode(dp_info->encoder, dp_info->connector);
74+ if ((dp_info->connector->connector_type == DRM_MODE_CONNECTOR_eDP) &&
75+ (dig->panel_mode == DP_PANEL_MODE_INTERNAL_DP2_MODE)) {
76+ radeon_write_dpcd_reg(dp_info->radeon_connector, DP_EDP_CONFIGURATION_SET, 1);
77+ }
78
79 /* set the lane count on the sink */
80 tmp = dp_info->dp_lane_count;
81diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
82index 39c04c1..9dcfba0 100644
83--- a/drivers/gpu/drm/radeon/atombios_encoders.c
84+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
85@@ -1822,10 +1822,21 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
86 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
87 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
88 if (ASIC_IS_DCE4(rdev)) {
89+ struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
90+ struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
91+
92+ if (!connector)
93+ dig->panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
94+ else
95+ dig->panel_mode = radeon_dp_get_panel_mode(encoder, connector);
96+
97 /* disable the transmitter */
98 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
99 /* setup and enable the encoder */
100 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
101+ atombios_dig_encoder_setup(encoder,
102+ ATOM_ENCODER_CMD_SETUP_PANEL_MODE,
103+ dig->panel_mode);
104
105 /* enable the transmitter */
106 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
107diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
108index 2c2e75e..8254d5a 100644
109--- a/drivers/gpu/drm/radeon/radeon_mode.h
110+++ b/drivers/gpu/drm/radeon/radeon_mode.h
111@@ -362,6 +362,7 @@ struct radeon_encoder_atom_dig {
112 struct backlight_device *bl_dev;
113 int dpms_mode;
114 uint8_t backlight_level;
115+ int panel_mode;
116 };
117
118 struct radeon_encoder_atom_dac {
119@@ -482,6 +483,8 @@ extern void radeon_dp_link_train(struct drm_encoder *encoder,
120 extern bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector);
121 extern u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector);
122 extern bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector);
123+extern int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
124+ struct drm_connector *connector);
125 extern void atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mode);
126 extern void radeon_atom_encoder_init(struct radeon_device *rdev);
127 extern void atombios_dig_transmitter_setup(struct drm_encoder *encoder,
128--
1291.7.7.4
130
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0010-drm-radeon-kms-rework-modeset-sequence-for-DCE41-and.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0010-drm-radeon-kms-rework-modeset-sequence-for-DCE41-and.patch
new file mode 100644
index 00000000..0cf4bb09
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0010-drm-radeon-kms-rework-modeset-sequence-for-DCE41-and.patch
@@ -0,0 +1,87 @@
1From 053fc3b3f7c773c8fbd7c95887b333deddac4ab5 Mon Sep 17 00:00:00 2001
2From: Alex Deucher <alexander.deucher@amd.com>
3Date: Fri, 20 Jan 2012 15:01:30 -0500
4Subject: [PATCH 10/90] drm/radeon/kms: rework modeset sequence for DCE41 and
5 DCE5
6
7commit 3a47824d85eeca122895646f027dc63480994199 upstream.
8
9dig transmitter control table only has ENABLE/DISABLE actions
10on DCE4.1/DCE5.
11
12Fixes:
13https://bugs.freedesktop.org/show_bug.cgi?id=44955
14
15Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
16Signed-off-by: Dave Airlie <airlied@redhat.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 drivers/gpu/drm/radeon/atombios_encoders.c | 19 ++++++++++++-------
20 1 files changed, 12 insertions(+), 7 deletions(-)
21
22diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
23index 9dcfba0..0f8eb48 100644
24--- a/drivers/gpu/drm/radeon/atombios_encoders.c
25+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
26@@ -1352,7 +1352,8 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
27 switch (mode) {
28 case DRM_MODE_DPMS_ON:
29 /* some early dce3.2 boards have a bug in their transmitter control table */
30- if ((rdev->family == CHIP_RV710) || (rdev->family == CHIP_RV730))
31+ if ((rdev->family == CHIP_RV710) || (rdev->family == CHIP_RV730) ||
32+ ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev))
33 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
34 else
35 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
36@@ -1362,8 +1363,6 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
37 ATOM_TRANSMITTER_ACTION_POWER_ON);
38 radeon_dig_connector->edp_on = true;
39 }
40- if (ASIC_IS_DCE4(rdev))
41- atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF, 0);
42 radeon_dp_link_train(encoder, connector);
43 if (ASIC_IS_DCE4(rdev))
44 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_ON, 0);
45@@ -1374,7 +1373,10 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
46 case DRM_MODE_DPMS_STANDBY:
47 case DRM_MODE_DPMS_SUSPEND:
48 case DRM_MODE_DPMS_OFF:
49- atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0);
50+ if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev))
51+ atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
52+ else
53+ atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0);
54 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) {
55 if (ASIC_IS_DCE4(rdev))
56 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF, 0);
57@@ -1821,7 +1823,7 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
58 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
59 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
60 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
61- if (ASIC_IS_DCE4(rdev)) {
62+ if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) {
63 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
64 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
65
66@@ -1830,13 +1832,16 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
67 else
68 dig->panel_mode = radeon_dp_get_panel_mode(encoder, connector);
69
70- /* disable the transmitter */
71- atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
72 /* setup and enable the encoder */
73 atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
74 atombios_dig_encoder_setup(encoder,
75 ATOM_ENCODER_CMD_SETUP_PANEL_MODE,
76 dig->panel_mode);
77+ } else if (ASIC_IS_DCE4(rdev)) {
78+ /* disable the transmitter */
79+ atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
80+ /* setup and enable the encoder */
81+ atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
82
83 /* enable the transmitter */
84 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
85--
861.7.7.4
87
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0011-drm-Fix-authentication-kernel-crash.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0011-drm-Fix-authentication-kernel-crash.patch
new file mode 100644
index 00000000..85f719ef
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0011-drm-Fix-authentication-kernel-crash.patch
@@ -0,0 +1,91 @@
1From eb46186bf6a5226ef40a011986bd206874a940b6 Mon Sep 17 00:00:00 2001
2From: Thomas Hellstrom <thellstrom@vmware.com>
3Date: Tue, 24 Jan 2012 18:54:21 +0100
4Subject: [PATCH 11/90] drm: Fix authentication kernel crash
5
6commit 598781d71119827b454fd75d46f84755bca6f0c6 upstream.
7
8If the master tries to authenticate a client using drm_authmagic and
9that client has already closed its drm file descriptor,
10either wilfully or because it was terminated, the
11call to drm_authmagic will dereference a stale pointer into kmalloc'ed memory
12and corrupt it.
13
14Typically this results in a hard system hang.
15
16This patch fixes that problem by removing any authentication tokens
17(struct drm_magic_entry) open for a file descriptor when that file
18descriptor is closed.
19
20Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
21Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
22Signed-off-by: Dave Airlie <airlied@redhat.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 drivers/gpu/drm/drm_auth.c | 6 +++++-
26 drivers/gpu/drm/drm_fops.c | 5 +++++
27 include/drm/drmP.h | 1 +
28 3 files changed, 11 insertions(+), 1 deletions(-)
29
30diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
31index 3f46772..ba23790 100644
32--- a/drivers/gpu/drm/drm_auth.c
33+++ b/drivers/gpu/drm/drm_auth.c
34@@ -101,7 +101,7 @@ static int drm_add_magic(struct drm_master *master, struct drm_file *priv,
35 * Searches and unlinks the entry in drm_device::magiclist with the magic
36 * number hash key, while holding the drm_device::struct_mutex lock.
37 */
38-static int drm_remove_magic(struct drm_master *master, drm_magic_t magic)
39+int drm_remove_magic(struct drm_master *master, drm_magic_t magic)
40 {
41 struct drm_magic_entry *pt;
42 struct drm_hash_item *hash;
43@@ -136,6 +136,8 @@ static int drm_remove_magic(struct drm_master *master, drm_magic_t magic)
44 * If there is a magic number in drm_file::magic then use it, otherwise
45 * searches an unique non-zero magic number and add it associating it with \p
46 * file_priv.
47+ * This ioctl needs protection by the drm_global_mutex, which protects
48+ * struct drm_file::magic and struct drm_magic_entry::priv.
49 */
50 int drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv)
51 {
52@@ -173,6 +175,8 @@ int drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv)
53 * \return zero if authentication successed, or a negative number otherwise.
54 *
55 * Checks if \p file_priv is associated with the magic number passed in \arg.
56+ * This ioctl needs protection by the drm_global_mutex, which protects
57+ * struct drm_file::magic and struct drm_magic_entry::priv.
58 */
59 int drm_authmagic(struct drm_device *dev, void *data,
60 struct drm_file *file_priv)
61diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
62index 4911e1d..828bf65 100644
63--- a/drivers/gpu/drm/drm_fops.c
64+++ b/drivers/gpu/drm/drm_fops.c
65@@ -487,6 +487,11 @@ int drm_release(struct inode *inode, struct file *filp)
66 (long)old_encode_dev(file_priv->minor->device),
67 dev->open_count);
68
69+ /* Release any auth tokens that might point to this file_priv,
70+ (do that under the drm_global_mutex) */
71+ if (file_priv->magic)
72+ (void) drm_remove_magic(file_priv->master, file_priv->magic);
73+
74 /* if the master has gone away we can't do anything with the lock */
75 if (file_priv->minor->master)
76 drm_master_release(dev, filp);
77diff --git a/include/drm/drmP.h b/include/drm/drmP.h
78index 1f9e951..bf4b2dc 100644
79--- a/include/drm/drmP.h
80+++ b/include/drm/drmP.h
81@@ -1328,6 +1328,7 @@ extern int drm_getmagic(struct drm_device *dev, void *data,
82 struct drm_file *file_priv);
83 extern int drm_authmagic(struct drm_device *dev, void *data,
84 struct drm_file *file_priv);
85+extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic);
86
87 /* Cache management (drm_cache.c) */
88 void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
89--
901.7.7.4
91
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0012-xfs-Fix-missing-xfs_iunlock-on-error-recovery-path-i.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0012-xfs-Fix-missing-xfs_iunlock-on-error-recovery-path-i.patch
new file mode 100644
index 00000000..87c0bceb
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0012-xfs-Fix-missing-xfs_iunlock-on-error-recovery-path-i.patch
@@ -0,0 +1,38 @@
1From 2f455c0d809c7c2b9e340feb0e4db1a4a3580762 Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Wed, 11 Jan 2012 18:52:10 +0000
4Subject: [PATCH 12/90] xfs: Fix missing xfs_iunlock() on error recovery path
5 in xfs_readlink()
6
7commit 9b025eb3a89e041bab6698e3858706be2385d692 upstream.
8
9Commit b52a360b forgot to call xfs_iunlock() when it detected corrupted
10symplink and bailed out. Fix it by jumping to 'out' instead of doing return.
11
12CC: Carlos Maiolino <cmaiolino@redhat.com>
13Signed-off-by: Jan Kara <jack@suse.cz>
14Reviewed-by: Alex Elder <elder@kernel.org>
15Reviewed-by: Dave Chinner <dchinner@redhat.com>
16Signed-off-by: Ben Myers <bpm@sgi.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 fs/xfs/xfs_vnodeops.c | 3 ++-
20 1 files changed, 2 insertions(+), 1 deletions(-)
21
22diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
23index ce9268a..ee98d0b 100644
24--- a/fs/xfs/xfs_vnodeops.c
25+++ b/fs/xfs/xfs_vnodeops.c
26@@ -131,7 +131,8 @@ xfs_readlink(
27 __func__, (unsigned long long) ip->i_ino,
28 (long long) pathlen);
29 ASSERT(0);
30- return XFS_ERROR(EFSCORRUPTED);
31+ error = XFS_ERROR(EFSCORRUPTED);
32+ goto out;
33 }
34
35
36--
371.7.7.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0013-ASoC-Mark-WM5100-register-map-cache-only-when-going-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0013-ASoC-Mark-WM5100-register-map-cache-only-when-going-.patch
new file mode 100644
index 00000000..41352ce4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0013-ASoC-Mark-WM5100-register-map-cache-only-when-going-.patch
@@ -0,0 +1,32 @@
1From b65a7dc8f10d4f4636b29c0cbaa7528941ccf78c Mon Sep 17 00:00:00 2001
2From: Mark Brown <broonie@opensource.wolfsonmicro.com>
3Date: Wed, 18 Jan 2012 20:02:38 +0000
4Subject: [PATCH 13/90] ASoC: Mark WM5100 register map cache only when going
5 into BIAS_OFF
6
7commit e53e417331c57b9b97e3f8be870214a02c99265c upstream.
8
9Writing to the registers won't work if we do actually manage to hit a fully
10powered off state.
11
12Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 sound/soc/codecs/wm5100.c | 1 +
16 1 files changed, 1 insertions(+), 0 deletions(-)
17
18diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
19index 42d9039..19c26d2 100644
20--- a/sound/soc/codecs/wm5100.c
21+++ b/sound/soc/codecs/wm5100.c
22@@ -1404,6 +1404,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
23 break;
24
25 case SND_SOC_BIAS_OFF:
26+ regcache_cache_only(wm5100->regmap, true);
27 if (wm5100->pdata.ldo_ena)
28 gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
29 regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),
30--
311.7.7.4
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0014-ASoC-Disable-register-synchronisation-for-low-freque.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0014-ASoC-Disable-register-synchronisation-for-low-freque.patch
new file mode 100644
index 00000000..e3fd4113
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0014-ASoC-Disable-register-synchronisation-for-low-freque.patch
@@ -0,0 +1,66 @@
1From bcc1fc25bf8a5de125e92da576db7c59550e5df7 Mon Sep 17 00:00:00 2001
2From: Mark Brown <broonie@opensource.wolfsonmicro.com>
3Date: Wed, 18 Jan 2012 19:17:06 +0000
4Subject: [PATCH 14/90] ASoC: Disable register synchronisation for low
5 frequency WM8996 SYSCLK
6
7commit fed22007113cb857e917913ce016d9b539dc3a80 upstream.
8
9With a low frequency SYSCLK and a fast I2C clock register synchronisation
10may occasionally take too long to take effect, causing I/O issues. Disable
11synchronisation in order to avoid any issues.
12
13Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 sound/soc/codecs/wm8996.c | 4 ++++
17 sound/soc/codecs/wm8996.h | 4 ++++
18 2 files changed, 8 insertions(+), 0 deletions(-)
19
20diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
21index a33b04d..e2afc05 100644
22--- a/sound/soc/codecs/wm8996.c
23+++ b/sound/soc/codecs/wm8996.c
24@@ -1932,6 +1932,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai,
25 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
26 int lfclk = 0;
27 int ratediv = 0;
28+ int sync = WM8996_REG_SYNC;
29 int src;
30 int old;
31
32@@ -1976,6 +1977,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai,
33 case 32000:
34 case 32768:
35 lfclk = WM8996_LFCLK_ENA;
36+ sync = 0;
37 break;
38 default:
39 dev_warn(codec->dev, "Unsupported clock rate %dHz\n",
40@@ -1989,6 +1991,8 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai,
41 WM8996_SYSCLK_SRC_MASK | WM8996_SYSCLK_DIV_MASK,
42 src << WM8996_SYSCLK_SRC_SHIFT | ratediv);
43 snd_soc_update_bits(codec, WM8996_CLOCKING_1, WM8996_LFCLK_ENA, lfclk);
44+ snd_soc_update_bits(codec, WM8996_CONTROL_INTERFACE_1,
45+ WM8996_REG_SYNC, sync);
46 snd_soc_update_bits(codec, WM8996_AIF_CLOCKING_1,
47 WM8996_SYSCLK_ENA, old);
48
49diff --git a/sound/soc/codecs/wm8996.h b/sound/soc/codecs/wm8996.h
50index 0fde643..de9ac3e 100644
51--- a/sound/soc/codecs/wm8996.h
52+++ b/sound/soc/codecs/wm8996.h
53@@ -1567,6 +1567,10 @@ int wm8996_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
54 /*
55 * R257 (0x101) - Control Interface (1)
56 */
57+#define WM8996_REG_SYNC 0x8000 /* REG_SYNC */
58+#define WM8996_REG_SYNC_MASK 0x8000 /* REG_SYNC */
59+#define WM8996_REG_SYNC_SHIFT 15 /* REG_SYNC */
60+#define WM8996_REG_SYNC_WIDTH 1 /* REG_SYNC */
61 #define WM8996_AUTO_INC 0x0004 /* AUTO_INC */
62 #define WM8996_AUTO_INC_MASK 0x0004 /* AUTO_INC */
63 #define WM8996_AUTO_INC_SHIFT 2 /* AUTO_INC */
64--
651.7.7.4
66
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0015-ASoC-Don-t-go-through-cache-when-applying-WM5100-rev.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0015-ASoC-Don-t-go-through-cache-when-applying-WM5100-rev.patch
new file mode 100644
index 00000000..0a55c9b1
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0015-ASoC-Don-t-go-through-cache-when-applying-WM5100-rev.patch
@@ -0,0 +1,41 @@
1From 0930fd68ed08367e18eac171909efe0b6f66ea4a Mon Sep 17 00:00:00 2001
2From: Mark Brown <broonie@opensource.wolfsonmicro.com>
3Date: Thu, 19 Jan 2012 11:16:37 +0000
4Subject: [PATCH 15/90] ASoC: Don't go through cache when applying WM5100 rev
5 A updates
6
7commit 495174a8ffbaa0d15153d855cf206cdc46d51cf4 upstream.
8
9These are all to either uncached registers or fixes to register defaults,
10in the former case the cache won't do anything and in the latter case
11we're fixing things so the cache sync will do the right thing.
12
13Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 sound/soc/codecs/wm5100.c | 2 ++
17 1 files changed, 2 insertions(+), 0 deletions(-)
18
19diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
20index 19c26d2..d0beeec 100644
21--- a/sound/soc/codecs/wm5100.c
22+++ b/sound/soc/codecs/wm5100.c
23@@ -1379,6 +1379,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
24
25 switch (wm5100->rev) {
26 case 0:
27+ regcache_cache_bypass(wm5100->regmap, true);
28 snd_soc_write(codec, 0x11, 0x3);
29 snd_soc_write(codec, 0x203, 0xc);
30 snd_soc_write(codec, 0x206, 0);
31@@ -1394,6 +1395,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
32 snd_soc_write(codec,
33 wm5100_reva_patches[i].reg,
34 wm5100_reva_patches[i].val);
35+ regcache_cache_bypass(wm5100->regmap, false);
36 break;
37 default:
38 break;
39--
401.7.7.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0016-ASoC-wm8996-Call-_POST_PMU-callback-for-CPVDD.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0016-ASoC-wm8996-Call-_POST_PMU-callback-for-CPVDD.patch
new file mode 100644
index 00000000..ceaf673a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0016-ASoC-wm8996-Call-_POST_PMU-callback-for-CPVDD.patch
@@ -0,0 +1,33 @@
1From b071dfcd22b8e8142129b7aa8da38c6649e9d7dc Mon Sep 17 00:00:00 2001
2From: Mark Brown <broonie@opensource.wolfsonmicro.com>
3Date: Sat, 21 Jan 2012 21:48:53 +0000
4Subject: [PATCH 16/90] ASoC: wm8996: Call _POST_PMU callback for CPVDD
5
6commit a14304edcd5e8323205db34b08f709feb5357e64 upstream.
7
8We should be allowing a 5ms delay after the charge pump is started in
9order to ensure it has finished ramping.
10
11Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 sound/soc/codecs/wm8996.c | 3 ++-
15 1 files changed, 2 insertions(+), 1 deletions(-)
16
17diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
18index e2afc05..6d98a57 100644
19--- a/sound/soc/codecs/wm8996.c
20+++ b/sound/soc/codecs/wm8996.c
21@@ -1049,7 +1049,8 @@ SND_SOC_DAPM_SUPPLY_S("SYSCLK", 1, WM8996_AIF_CLOCKING_1, 0, 0, NULL, 0),
22 SND_SOC_DAPM_SUPPLY_S("SYSDSPCLK", 2, WM8996_CLOCKING_1, 1, 0, NULL, 0),
23 SND_SOC_DAPM_SUPPLY_S("AIFCLK", 2, WM8996_CLOCKING_1, 2, 0, NULL, 0),
24 SND_SOC_DAPM_SUPPLY_S("Charge Pump", 2, WM8996_CHARGE_PUMP_1, 15, 0, cp_event,
25- SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
26+ SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
27+ SND_SOC_DAPM_POST_PMD),
28 SND_SOC_DAPM_SUPPLY("Bandgap", SND_SOC_NOPM, 0, 0, bg_event,
29 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
30 SND_SOC_DAPM_SUPPLY("LDO2", WM8996_POWER_MANAGEMENT_2, 1, 0, NULL, 0),
31--
321.7.7.4
33
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch
new file mode 100644
index 00000000..78e25577
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch
@@ -0,0 +1,53 @@
1From 786a655cc87f51dcedae8b03d880d3b507aeffc3 Mon Sep 17 00:00:00 2001
2From: Stanislaw Gruszka <sgruszka@redhat.com>
3Date: Tue, 17 Jan 2012 12:38:50 +0100
4Subject: [PATCH 17/90] brcmsmac: fix tx queue flush infinite loop
5
6commit f96b08a7e6f69c0f0a576554df3df5b1b519c479 upstream.
7
8This patch workaround live deadlock problem caused by infinite loop
9in brcms_c_wait_for_tx_completion(). I do not consider the patch as
10the proper fix, which should fix the real reason of tx queue flush
11failure, but patch helps with system lockup.
12
13Reference:
14https://bugzilla.kernel.org/show_bug.cgi?id=42576
15
16Reported-and-tested-by: Patrick <ragamuffin@datacomm.ch>
17Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
18Signed-off-by: John W. Linville <linville@tuxdriver.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/net/wireless/brcm80211/brcmsmac/main.c | 10 +++++++++-
22 1 files changed, 9 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
25index 510e9bb..453f58e 100644
26--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
27+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
28@@ -8217,13 +8217,21 @@ int brcms_c_get_curband(struct brcms_c_info *wlc)
29
30 void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop)
31 {
32+ int timeout = 20;
33+
34 /* flush packet queue when requested */
35 if (drop)
36 brcmu_pktq_flush(&wlc->pkt_queue->q, false, NULL, NULL);
37
38 /* wait for queue and DMA fifos to run dry */
39- while (!pktq_empty(&wlc->pkt_queue->q) || brcms_txpktpendtot(wlc) > 0)
40+ while (!pktq_empty(&wlc->pkt_queue->q) || brcms_txpktpendtot(wlc) > 0) {
41 brcms_msleep(wlc->wl, 1);
42+
43+ if (--timeout == 0)
44+ break;
45+ }
46+
47+ WARN_ON_ONCE(timeout == 0);
48 }
49
50 void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval)
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0018-mac80211-fix-work-removal-on-deauth-request.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0018-mac80211-fix-work-removal-on-deauth-request.patch
new file mode 100644
index 00000000..5d0ea853
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0018-mac80211-fix-work-removal-on-deauth-request.patch
@@ -0,0 +1,111 @@
1From f9792a6e4ff3605b5821ddbca89ceb4d425a49b7 Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Wed, 18 Jan 2012 14:10:25 +0100
4Subject: [PATCH 18/90] mac80211: fix work removal on deauth request
5
6commit bc4934bc61d0a11fd62c5187ff83645628f8be8b upstream.
7
8When deauth is requested while an auth or assoc
9work item is in progress, we currently delete it
10without regard for any state it might need to
11clean up. Fix it by cleaning up for those items.
12
13In the case Pontus found, the problem manifested
14itself as such:
15
16authenticate with 00:23:69:aa:dd:7b (try 1)
17authenticated
18failed to insert Dummy STA entry for the AP (error -17)
19deauthenticating from 00:23:69:aa:dd:7b by local choice (reason=2)
20
21It could also happen differently if the driver
22uses the tx_sync callback.
23
24We can't just call the ->done() method of the work
25items because that will lock up due to the locking
26in cfg80211. This fix isn't very clean, but that
27seems acceptable since I have patches pending to
28remove this code completely.
29
30Reported-by: Pontus Fuchs <pontus.fuchs@gmail.com>
31Tested-by: Pontus Fuchs <pontus.fuchs@gmail.com>
32Signed-off-by: Johannes Berg <johannes.berg@intel.com>
33Signed-off-by: John W. Linville <linville@tuxdriver.com>
34Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35---
36 net/mac80211/mlme.c | 38 +++++++++++++++++++++++++++-----------
37 1 files changed, 27 insertions(+), 11 deletions(-)
38
39diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
40index b1b1bb3..9da8626 100644
41--- a/net/mac80211/mlme.c
42+++ b/net/mac80211/mlme.c
43@@ -2719,7 +2719,6 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
44 {
45 struct ieee80211_local *local = sdata->local;
46 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
47- struct ieee80211_work *wk;
48 u8 bssid[ETH_ALEN];
49 bool assoc_bss = false;
50
51@@ -2732,30 +2731,47 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
52 assoc_bss = true;
53 } else {
54 bool not_auth_yet = false;
55+ struct ieee80211_work *tmp, *wk = NULL;
56
57 mutex_unlock(&ifmgd->mtx);
58
59 mutex_lock(&local->mtx);
60- list_for_each_entry(wk, &local->work_list, list) {
61- if (wk->sdata != sdata)
62+ list_for_each_entry(tmp, &local->work_list, list) {
63+ if (tmp->sdata != sdata)
64 continue;
65
66- if (wk->type != IEEE80211_WORK_DIRECT_PROBE &&
67- wk->type != IEEE80211_WORK_AUTH &&
68- wk->type != IEEE80211_WORK_ASSOC &&
69- wk->type != IEEE80211_WORK_ASSOC_BEACON_WAIT)
70+ if (tmp->type != IEEE80211_WORK_DIRECT_PROBE &&
71+ tmp->type != IEEE80211_WORK_AUTH &&
72+ tmp->type != IEEE80211_WORK_ASSOC &&
73+ tmp->type != IEEE80211_WORK_ASSOC_BEACON_WAIT)
74 continue;
75
76- if (memcmp(req->bss->bssid, wk->filter_ta, ETH_ALEN))
77+ if (memcmp(req->bss->bssid, tmp->filter_ta, ETH_ALEN))
78 continue;
79
80- not_auth_yet = wk->type == IEEE80211_WORK_DIRECT_PROBE;
81- list_del_rcu(&wk->list);
82- free_work(wk);
83+ not_auth_yet = tmp->type == IEEE80211_WORK_DIRECT_PROBE;
84+ list_del_rcu(&tmp->list);
85+ synchronize_rcu();
86+ wk = tmp;
87 break;
88 }
89 mutex_unlock(&local->mtx);
90
91+ if (wk && wk->type == IEEE80211_WORK_ASSOC) {
92+ /* clean up dummy sta & TX sync */
93+ sta_info_destroy_addr(wk->sdata, wk->filter_ta);
94+ if (wk->assoc.synced)
95+ drv_finish_tx_sync(local, wk->sdata,
96+ wk->filter_ta,
97+ IEEE80211_TX_SYNC_ASSOC);
98+ } else if (wk && wk->type == IEEE80211_WORK_AUTH) {
99+ if (wk->probe_auth.synced)
100+ drv_finish_tx_sync(local, wk->sdata,
101+ wk->filter_ta,
102+ IEEE80211_TX_SYNC_AUTH);
103+ }
104+ kfree(wk);
105+
106 /*
107 * If somebody requests authentication and we haven't
108 * sent out an auth frame yet there's no need to send
109--
1101.7.7.4
111
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0019-jbd-Issue-cache-flush-after-checkpointing.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0019-jbd-Issue-cache-flush-after-checkpointing.patch
new file mode 100644
index 00000000..59836c75
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0019-jbd-Issue-cache-flush-after-checkpointing.patch
@@ -0,0 +1,118 @@
1From f656782d935b7d59fa7bec23751e5bfb8a22d6e0 Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Sat, 26 Nov 2011 00:35:39 +0100
4Subject: [PATCH 19/90] jbd: Issue cache flush after checkpointing
5
6commit 353b67d8ced4dc53281c88150ad295e24bc4b4c5 upstream.
7
8When we reach cleanup_journal_tail(), there is no guarantee that
9checkpointed buffers are on a stable storage - especially if buffers were
10written out by log_do_checkpoint(), they are likely to be only in disk's
11caches. Thus when we update journal superblock, effectively removing old
12transaction from journal, this write of superblock can get to stable storage
13before those checkpointed buffers which can result in filesystem corruption
14after a crash.
15
16A similar problem can happen if we replay the journal and wipe it before
17flushing disk's caches.
18
19Thus we must unconditionally issue a cache flush before we update journal
20superblock in these cases. The fix is slightly complicated by the fact that we
21have to get log tail before we issue cache flush but we can store it in the
22journal superblock only after the cache flush. Otherwise we risk races where
23new tail is written before appropriate cache flush is finished.
24
25I managed to reproduce the corruption using somewhat tweaked Chris Mason's
26barrier-test scheduler. Also this should fix occasional reports of 'Bit already
27freed' filesystem errors which are totally unreproducible but inspection of
28several fs images I've gathered over time points to a problem like this.
29
30Signed-off-by: Jan Kara <jack@suse.cz>
31Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32---
33 fs/jbd/checkpoint.c | 27 ++++++++++++++++++++++-----
34 fs/jbd/recovery.c | 4 ++++
35 2 files changed, 26 insertions(+), 5 deletions(-)
36
37diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c
38index 5d1a00a..05f0754 100644
39--- a/fs/jbd/checkpoint.c
40+++ b/fs/jbd/checkpoint.c
41@@ -453,8 +453,6 @@ out:
42 *
43 * Return <0 on error, 0 on success, 1 if there was nothing to clean up.
44 *
45- * Called with the journal lock held.
46- *
47 * This is the only part of the journaling code which really needs to be
48 * aware of transaction aborts. Checkpointing involves writing to the
49 * main filesystem area rather than to the journal, so it can proceed
50@@ -472,13 +470,14 @@ int cleanup_journal_tail(journal_t *journal)
51 if (is_journal_aborted(journal))
52 return 1;
53
54- /* OK, work out the oldest transaction remaining in the log, and
55+ /*
56+ * OK, work out the oldest transaction remaining in the log, and
57 * the log block it starts at.
58 *
59 * If the log is now empty, we need to work out which is the
60 * next transaction ID we will write, and where it will
61- * start. */
62-
63+ * start.
64+ */
65 spin_lock(&journal->j_state_lock);
66 spin_lock(&journal->j_list_lock);
67 transaction = journal->j_checkpoint_transactions;
68@@ -504,7 +503,25 @@ int cleanup_journal_tail(journal_t *journal)
69 spin_unlock(&journal->j_state_lock);
70 return 1;
71 }
72+ spin_unlock(&journal->j_state_lock);
73+
74+ /*
75+ * We need to make sure that any blocks that were recently written out
76+ * --- perhaps by log_do_checkpoint() --- are flushed out before we
77+ * drop the transactions from the journal. It's unlikely this will be
78+ * necessary, especially with an appropriately sized journal, but we
79+ * need this to guarantee correctness. Fortunately
80+ * cleanup_journal_tail() doesn't get called all that often.
81+ */
82+ if (journal->j_flags & JFS_BARRIER)
83+ blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
84
85+ spin_lock(&journal->j_state_lock);
86+ if (!tid_gt(first_tid, journal->j_tail_sequence)) {
87+ spin_unlock(&journal->j_state_lock);
88+ /* Someone else cleaned up journal so return 0 */
89+ return 0;
90+ }
91 /* OK, update the superblock to recover the freed space.
92 * Physical blocks come first: have we wrapped beyond the end of
93 * the log? */
94diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c
95index 5b43e96..008bf06 100644
96--- a/fs/jbd/recovery.c
97+++ b/fs/jbd/recovery.c
98@@ -20,6 +20,7 @@
99 #include <linux/fs.h>
100 #include <linux/jbd.h>
101 #include <linux/errno.h>
102+#include <linux/blkdev.h>
103 #endif
104
105 /*
106@@ -263,6 +264,9 @@ int journal_recover(journal_t *journal)
107 err2 = sync_blockdev(journal->j_fs_dev);
108 if (!err)
109 err = err2;
110+ /* Flush disk caches to get replayed data on the permanent storage */
111+ if (journal->j_flags & JFS_BARRIER)
112+ blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
113
114 return err;
115 }
116--
1171.7.7.4
118
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0020-crypto-sha512-make-it-work-undo-percpu-message-sched.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0020-crypto-sha512-make-it-work-undo-percpu-message-sched.patch
new file mode 100644
index 00000000..de8599ac
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0020-crypto-sha512-make-it-work-undo-percpu-message-sched.patch
@@ -0,0 +1,78 @@
1From e10bfbc1d5cea0f1fe47ae12a9ecdb83b70947e1 Mon Sep 17 00:00:00 2001
2From: Alexey Dobriyan <adobriyan@gmail.com>
3Date: Sat, 14 Jan 2012 21:27:37 +0300
4Subject: [PATCH 20/90] crypto: sha512 - make it work, undo percpu message
5 schedule
6
7commit 84e31fdb7c797a7303e0cc295cb9bc8b73fb872d upstream.
8
9commit f9e2bca6c22d75a289a349f869701214d63b5060
10aka "crypto: sha512 - Move message schedule W[80] to static percpu area"
11created global message schedule area.
12
13If sha512_update will ever be entered twice, hash will be silently
14calculated incorrectly.
15
16Probably the easiest way to notice incorrect hashes being calculated is
17to run 2 ping floods over AH with hmac(sha512):
18
19 #!/usr/sbin/setkey -f
20 flush;
21 spdflush;
22 add IP1 IP2 ah 25 -A hmac-sha512 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025;
23 add IP2 IP1 ah 52 -A hmac-sha512 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052;
24 spdadd IP1 IP2 any -P out ipsec ah/transport//require;
25 spdadd IP2 IP1 any -P in ipsec ah/transport//require;
26
27XfrmInStateProtoError will start ticking with -EBADMSG being returned
28from ah_input(). This never happens with, say, hmac(sha1).
29
30With patch applied (on BOTH sides), XfrmInStateProtoError does not tick
31with multiple bidirectional ping flood streams like it doesn't tick
32with SHA-1.
33
34After this patch sha512_transform() will start using ~750 bytes of stack on x86_64.
35This is OK for simple loads, for something more heavy, stack reduction will be done
36separatedly.
37
38Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
39Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
40Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41---
42 crypto/sha512_generic.c | 6 +-----
43 1 files changed, 1 insertions(+), 5 deletions(-)
44
45diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
46index 9ed9f60..8b9035b 100644
47--- a/crypto/sha512_generic.c
48+++ b/crypto/sha512_generic.c
49@@ -21,8 +21,6 @@
50 #include <linux/percpu.h>
51 #include <asm/byteorder.h>
52
53-static DEFINE_PER_CPU(u64[80], msg_schedule);
54-
55 static inline u64 Ch(u64 x, u64 y, u64 z)
56 {
57 return z ^ (x & (y ^ z));
58@@ -89,7 +87,7 @@ sha512_transform(u64 *state, const u8 *input)
59 u64 a, b, c, d, e, f, g, h, t1, t2;
60
61 int i;
62- u64 *W = get_cpu_var(msg_schedule);
63+ u64 W[80];
64
65 /* load the input */
66 for (i = 0; i < 16; i++)
67@@ -128,8 +126,6 @@ sha512_transform(u64 *state, const u8 *input)
68
69 /* erase our data */
70 a = b = c = d = e = f = g = h = t1 = t2 = 0;
71- memset(W, 0, sizeof(__get_cpu_var(msg_schedule)));
72- put_cpu_var(msg_schedule);
73 }
74
75 static int
76--
771.7.7.4
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0021-crypto-sha512-reduce-stack-usage-to-safe-number.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0021-crypto-sha512-reduce-stack-usage-to-safe-number.patch
new file mode 100644
index 00000000..720c3e1b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0021-crypto-sha512-reduce-stack-usage-to-safe-number.patch
@@ -0,0 +1,129 @@
1From fed2a3f1c1ae549460ec39ba6492854e066c83d0 Mon Sep 17 00:00:00 2001
2From: Alexey Dobriyan <adobriyan@gmail.com>
3Date: Sat, 14 Jan 2012 21:40:57 +0300
4Subject: [PATCH 21/90] crypto: sha512 - reduce stack usage to safe number
5
6commit 51fc6dc8f948047364f7d42a4ed89b416c6cc0a3 upstream.
7
8For rounds 16--79, W[i] only depends on W[i - 2], W[i - 7], W[i - 15] and W[i - 16].
9Consequently, keeping all W[80] array on stack is unnecessary,
10only 16 values are really needed.
11
12Using W[16] instead of W[80] greatly reduces stack usage
13(~750 bytes to ~340 bytes on x86_64).
14
15Line by line explanation:
16* BLEND_OP
17 array is "circular" now, all indexes have to be modulo 16.
18 Round number is positive, so remainder operation should be
19 without surprises.
20
21* initial full message scheduling is trimmed to first 16 values which
22 come from data block, the rest is calculated before it's needed.
23
24* original loop body is unrolled version of new SHA512_0_15 and
25 SHA512_16_79 macros, unrolling was done to not do explicit variable
26 renaming. Otherwise it's the very same code after preprocessing.
27 See sha1_transform() code which does the same trick.
28
29Patch survives in-tree crypto test and original bugreport test
30(ping flood with hmac(sha512).
31
32See FIPS 180-2 for SHA-512 definition
33http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
34
35Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
36Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
37Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38---
39 crypto/sha512_generic.c | 58 +++++++++++++++++++++++++++-------------------
40 1 files changed, 34 insertions(+), 24 deletions(-)
41
42diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
43index 8b9035b..88f160b 100644
44--- a/crypto/sha512_generic.c
45+++ b/crypto/sha512_generic.c
46@@ -78,7 +78,7 @@ static inline void LOAD_OP(int I, u64 *W, const u8 *input)
47
48 static inline void BLEND_OP(int I, u64 *W)
49 {
50- W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16];
51+ W[I % 16] += s1(W[(I-2) % 16]) + W[(I-7) % 16] + s0(W[(I-15) % 16]);
52 }
53
54 static void
55@@ -87,38 +87,48 @@ sha512_transform(u64 *state, const u8 *input)
56 u64 a, b, c, d, e, f, g, h, t1, t2;
57
58 int i;
59- u64 W[80];
60+ u64 W[16];
61
62 /* load the input */
63 for (i = 0; i < 16; i++)
64 LOAD_OP(i, W, input);
65
66- for (i = 16; i < 80; i++) {
67- BLEND_OP(i, W);
68- }
69-
70 /* load the state into our registers */
71 a=state[0]; b=state[1]; c=state[2]; d=state[3];
72 e=state[4]; f=state[5]; g=state[6]; h=state[7];
73
74- /* now iterate */
75- for (i=0; i<80; i+=8) {
76- t1 = h + e1(e) + Ch(e,f,g) + sha512_K[i ] + W[i ];
77- t2 = e0(a) + Maj(a,b,c); d+=t1; h=t1+t2;
78- t1 = g + e1(d) + Ch(d,e,f) + sha512_K[i+1] + W[i+1];
79- t2 = e0(h) + Maj(h,a,b); c+=t1; g=t1+t2;
80- t1 = f + e1(c) + Ch(c,d,e) + sha512_K[i+2] + W[i+2];
81- t2 = e0(g) + Maj(g,h,a); b+=t1; f=t1+t2;
82- t1 = e + e1(b) + Ch(b,c,d) + sha512_K[i+3] + W[i+3];
83- t2 = e0(f) + Maj(f,g,h); a+=t1; e=t1+t2;
84- t1 = d + e1(a) + Ch(a,b,c) + sha512_K[i+4] + W[i+4];
85- t2 = e0(e) + Maj(e,f,g); h+=t1; d=t1+t2;
86- t1 = c + e1(h) + Ch(h,a,b) + sha512_K[i+5] + W[i+5];
87- t2 = e0(d) + Maj(d,e,f); g+=t1; c=t1+t2;
88- t1 = b + e1(g) + Ch(g,h,a) + sha512_K[i+6] + W[i+6];
89- t2 = e0(c) + Maj(c,d,e); f+=t1; b=t1+t2;
90- t1 = a + e1(f) + Ch(f,g,h) + sha512_K[i+7] + W[i+7];
91- t2 = e0(b) + Maj(b,c,d); e+=t1; a=t1+t2;
92+#define SHA512_0_15(i, a, b, c, d, e, f, g, h) \
93+ t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[i]; \
94+ t2 = e0(a) + Maj(a, b, c); \
95+ d += t1; \
96+ h = t1 + t2
97+
98+#define SHA512_16_79(i, a, b, c, d, e, f, g, h) \
99+ BLEND_OP(i, W); \
100+ t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[(i)%16]; \
101+ t2 = e0(a) + Maj(a, b, c); \
102+ d += t1; \
103+ h = t1 + t2
104+
105+ for (i = 0; i < 16; i += 8) {
106+ SHA512_0_15(i, a, b, c, d, e, f, g, h);
107+ SHA512_0_15(i + 1, h, a, b, c, d, e, f, g);
108+ SHA512_0_15(i + 2, g, h, a, b, c, d, e, f);
109+ SHA512_0_15(i + 3, f, g, h, a, b, c, d, e);
110+ SHA512_0_15(i + 4, e, f, g, h, a, b, c, d);
111+ SHA512_0_15(i + 5, d, e, f, g, h, a, b, c);
112+ SHA512_0_15(i + 6, c, d, e, f, g, h, a, b);
113+ SHA512_0_15(i + 7, b, c, d, e, f, g, h, a);
114+ }
115+ for (i = 16; i < 80; i += 8) {
116+ SHA512_16_79(i, a, b, c, d, e, f, g, h);
117+ SHA512_16_79(i + 1, h, a, b, c, d, e, f, g);
118+ SHA512_16_79(i + 2, g, h, a, b, c, d, e, f);
119+ SHA512_16_79(i + 3, f, g, h, a, b, c, d, e);
120+ SHA512_16_79(i + 4, e, f, g, h, a, b, c, d);
121+ SHA512_16_79(i + 5, d, e, f, g, h, a, b, c);
122+ SHA512_16_79(i + 6, c, d, e, f, g, h, a, b);
123+ SHA512_16_79(i + 7, b, c, d, e, f, g, h, a);
124 }
125
126 state[0] += a; state[1] += b; state[2] += c; state[3] += d;
127--
1281.7.7.4
129
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0022-tpm_tis-add-delay-after-aborting-command.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0022-tpm_tis-add-delay-after-aborting-command.patch
new file mode 100644
index 00000000..bfdde800
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0022-tpm_tis-add-delay-after-aborting-command.patch
@@ -0,0 +1,37 @@
1From fcbca854dc362b6a14769b89638cda8b0bee8144 Mon Sep 17 00:00:00 2001
2From: Stefan Berger <stefanb@linux.vnet.ibm.com>
3Date: Fri, 11 Nov 2011 12:57:06 -0500
4Subject: [PATCH 22/90] tpm_tis: add delay after aborting command
5
6commit a927b8131794ee449b7f6666e7ab61301949b20f upstream.
7
8This patch adds a delay after aborting a command. Some TPMs need
9this and will not process the subsequent command correctly otherwise.
10
11It's worth noting that a TPM randomly failing to process a command,
12maps to randomly failing suspend/resume operations.
13
14Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
15Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/char/tpm/tpm_tis.c | 3 +++
19 1 files changed, 3 insertions(+), 0 deletions(-)
20
21diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
22index 3f4051a..c7e5282 100644
23--- a/drivers/char/tpm/tpm_tis.c
24+++ b/drivers/char/tpm/tpm_tis.c
25@@ -432,6 +432,9 @@ static int probe_itpm(struct tpm_chip *chip)
26 out:
27 itpm = rem_itpm;
28 tpm_tis_ready(chip);
29+ /* some TPMs need a break here otherwise they will not work
30+ * correctly on the immediately subsequent command */
31+ msleep(chip->vendor.timeout_b);
32 release_locality(chip, chip->vendor.locality, 0);
33
34 return rc;
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0023-x86-uv-Fix-uninitialized-spinlocks.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0023-x86-uv-Fix-uninitialized-spinlocks.patch
new file mode 100644
index 00000000..4531752f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0023-x86-uv-Fix-uninitialized-spinlocks.patch
@@ -0,0 +1,58 @@
1From fc9002e18099fd51f0f120cebc4078db2a221e26 Mon Sep 17 00:00:00 2001
2From: Cliff Wickman <cpw@sgi.com>
3Date: Wed, 18 Jan 2012 09:40:47 -0600
4Subject: [PATCH 23/90] x86/uv: Fix uninitialized spinlocks
5
6commit d2ebc71d472020bc30e29afe8c4d2a85a5b41f56 upstream.
7
8Initialize two spinlocks in tlb_uv.c and also properly define/initialize
9the uv_irq_lock.
10
11The lack of explicit initialization seems to be functionally
12harmless, but it is diagnosed when these are turned on:
13
14 CONFIG_DEBUG_SPINLOCK=y
15 CONFIG_DEBUG_MUTEXES=y
16 CONFIG_DEBUG_LOCK_ALLOC=y
17 CONFIG_LOCKDEP=y
18
19Signed-off-by: Cliff Wickman <cpw@sgi.com>
20Cc: Dimitri Sivanich <sivanich@sgi.com>
21Link: http://lkml.kernel.org/r/E1RnXd1-0003wU-PM@eag09.americas.sgi.com
22[ Added the uv_irq_lock initialization fix by Dimitri Sivanich ]
23Signed-off-by: Ingo Molnar <mingo@elte.hu>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 arch/x86/platform/uv/tlb_uv.c | 2 ++
27 arch/x86/platform/uv/uv_irq.c | 2 +-
28 2 files changed, 3 insertions(+), 1 deletions(-)
29
30diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
31index 9010ca7..81aee5a 100644
32--- a/arch/x86/platform/uv/tlb_uv.c
33+++ b/arch/x86/platform/uv/tlb_uv.c
34@@ -1860,6 +1860,8 @@ static void __init init_per_cpu_tunables(void)
35 bcp->cong_reps = congested_reps;
36 bcp->cong_period = congested_period;
37 bcp->clocks_per_100_usec = usec_2_cycles(100);
38+ spin_lock_init(&bcp->queue_lock);
39+ spin_lock_init(&bcp->uvhub_lock);
40 }
41 }
42
43diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c
44index 374a05d..f25c276 100644
45--- a/arch/x86/platform/uv/uv_irq.c
46+++ b/arch/x86/platform/uv/uv_irq.c
47@@ -25,7 +25,7 @@ struct uv_irq_2_mmr_pnode{
48 int irq;
49 };
50
51-static spinlock_t uv_irq_lock;
52+static DEFINE_SPINLOCK(uv_irq_lock);
53 static struct rb_root uv_irq_root;
54
55 static int uv_set_irq_affinity(struct irq_data *, const struct cpumask *, bool);
56--
571.7.7.4
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0024-x86-uv-Fix-uv_gpa_to_soc_phys_ram-shift.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0024-x86-uv-Fix-uv_gpa_to_soc_phys_ram-shift.patch
new file mode 100644
index 00000000..76fc78e8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0024-x86-uv-Fix-uv_gpa_to_soc_phys_ram-shift.patch
@@ -0,0 +1,41 @@
1From 37927d0a4d690f30ea1e9154f05d20dbace4730b Mon Sep 17 00:00:00 2001
2From: Russ Anderson <rja@sgi.com>
3Date: Wed, 18 Jan 2012 20:07:54 -0600
4Subject: [PATCH 24/90] x86/uv: Fix uv_gpa_to_soc_phys_ram() shift
5
6commit 5a51467b146ab7948d2f6812892eac120a30529c upstream.
7
8uv_gpa_to_soc_phys_ram() was inadvertently ignoring the
9shift values. This fix takes the shift into account.
10
11Signed-off-by: Russ Anderson <rja@sgi.com>
12Link: http://lkml.kernel.org/r/20120119020753.GA7228@sgi.com
13Signed-off-by: Ingo Molnar <mingo@elte.hu>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 arch/x86/include/asm/uv/uv_hub.h | 4 ++--
17 1 files changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
20index 54a13aa..21f7385 100644
21--- a/arch/x86/include/asm/uv/uv_hub.h
22+++ b/arch/x86/include/asm/uv/uv_hub.h
23@@ -318,13 +318,13 @@ uv_gpa_in_mmr_space(unsigned long gpa)
24 /* UV global physical address --> socket phys RAM */
25 static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa)
26 {
27- unsigned long paddr = gpa & uv_hub_info->gpa_mask;
28+ unsigned long paddr;
29 unsigned long remap_base = uv_hub_info->lowmem_remap_base;
30 unsigned long remap_top = uv_hub_info->lowmem_remap_top;
31
32 gpa = ((gpa << uv_hub_info->m_shift) >> uv_hub_info->m_shift) |
33 ((gpa >> uv_hub_info->n_lshift) << uv_hub_info->m_val);
34- gpa = gpa & uv_hub_info->gpa_mask;
35+ paddr = gpa & uv_hub_info->gpa_mask;
36 if (paddr >= remap_base && paddr < remap_base + remap_top)
37 paddr -= remap_base;
38 return paddr;
39--
401.7.7.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0025-x86-microcode_amd-Add-support-for-CPU-family-specifi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0025-x86-microcode_amd-Add-support-for-CPU-family-specifi.patch
new file mode 100644
index 00000000..e1b02114
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0025-x86-microcode_amd-Add-support-for-CPU-family-specifi.patch
@@ -0,0 +1,75 @@
1From eed23f18d0d070bdece03565185953abb7b03252 Mon Sep 17 00:00:00 2001
2From: Andreas Herrmann <andreas.herrmann3@amd.com>
3Date: Fri, 20 Jan 2012 17:44:12 +0100
4Subject: [PATCH 25/90] x86/microcode_amd: Add support for CPU family specific
5 container files
6
7commit 5b68edc91cdc972c46f76f85eded7ffddc3ff5c2 upstream.
8
9We've decided to provide CPU family specific container files
10(starting with CPU family 15h). E.g. for family 15h we have to
11load microcode_amd_fam15h.bin instead of microcode_amd.bin
12
13Rationale is that starting with family 15h patch size is larger
14than 2KB which was hard coded as maximum patch size in various
15microcode loaders (not just Linux).
16
17Container files which include patches larger than 2KB cause
18different kinds of trouble with such old patch loaders. Thus we
19have to ensure that the default container file provides only
20patches with size less than 2KB.
21
22Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
23Cc: Borislav Petkov <borislav.petkov@amd.com>
24Cc: <stable@kernel.org>
25Link: http://lkml.kernel.org/r/20120120164412.GD24508@alberich.amd.com
26[ documented the naming convention and tidied the code a bit. ]
27Signed-off-by: Ingo Molnar <mingo@elte.hu>
28Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29---
30 arch/x86/kernel/microcode_amd.c | 24 ++++++++++++++++++++++--
31 1 files changed, 22 insertions(+), 2 deletions(-)
32
33diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
34index d494799..ac52c15 100644
35--- a/arch/x86/kernel/microcode_amd.c
36+++ b/arch/x86/kernel/microcode_amd.c
37@@ -300,13 +300,33 @@ free_table:
38 return state;
39 }
40
41+/*
42+ * AMD microcode firmware naming convention, up to family 15h they are in
43+ * the legacy file:
44+ *
45+ * amd-ucode/microcode_amd.bin
46+ *
47+ * This legacy file is always smaller than 2K in size.
48+ *
49+ * Starting at family 15h they are in family specific firmware files:
50+ *
51+ * amd-ucode/microcode_amd_fam15h.bin
52+ * amd-ucode/microcode_amd_fam16h.bin
53+ * ...
54+ *
55+ * These might be larger than 2K.
56+ */
57 static enum ucode_state request_microcode_amd(int cpu, struct device *device)
58 {
59- const char *fw_name = "amd-ucode/microcode_amd.bin";
60+ char fw_name[36] = "amd-ucode/microcode_amd.bin";
61 const struct firmware *fw;
62 enum ucode_state ret = UCODE_NFOUND;
63+ struct cpuinfo_x86 *c = &cpu_data(cpu);
64+
65+ if (c->x86 >= 0x15)
66+ snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86);
67
68- if (request_firmware(&fw, fw_name, device)) {
69+ if (request_firmware(&fw, (const char *)fw_name, device)) {
70 pr_err("failed to load file %s\n", fw_name);
71 goto out;
72 }
73--
741.7.7.4
75
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0026-m68k-Fix-assembler-constraint-to-prevent-overeager-g.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0026-m68k-Fix-assembler-constraint-to-prevent-overeager-g.patch
new file mode 100644
index 00000000..95ef0437
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0026-m68k-Fix-assembler-constraint-to-prevent-overeager-g.patch
@@ -0,0 +1,172 @@
1From cf9fd8313b77cb347cc142b4127d01646ab5f4c2 Mon Sep 17 00:00:00 2001
2From: Andreas Schwab <schwab@linux-m68k.org>
3Date: Mon, 9 Jan 2012 15:10:15 +0100
4Subject: [PATCH 26/90] m68k: Fix assembler constraint to prevent overeager
5 gcc optimisation
6
7commit 2a3535069e33d8b416f406c159ce924427315303 upstream.
8
9Passing the address of a variable as an operand to an asm statement
10doesn't mark the value of this variable as used, so gcc may optimize its
11initialisation away. Fix this by using the "m" constraint instead.
12
13Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
14Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 arch/m68k/atari/config.c | 8 ++++----
18 arch/m68k/kernel/process_mm.c | 4 ++--
19 arch/m68k/kernel/process_no.c | 4 ++--
20 arch/m68k/kernel/traps.c | 36 +++++++++++++++++-------------------
21 arch/m68k/mm/cache.c | 6 +++---
22 5 files changed, 28 insertions(+), 30 deletions(-)
23
24diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
25index 4203d10..c4ac15c 100644
26--- a/arch/m68k/atari/config.c
27+++ b/arch/m68k/atari/config.c
28@@ -414,9 +414,9 @@ void __init config_atari(void)
29 * FDC val = 4 -> Supervisor only */
30 asm volatile ("\n"
31 " .chip 68030\n"
32- " pmove %0@,%/tt1\n"
33+ " pmove %0,%/tt1\n"
34 " .chip 68k"
35- : : "a" (&tt1_val));
36+ : : "m" (tt1_val));
37 } else {
38 asm volatile ("\n"
39 " .chip 68040\n"
40@@ -569,10 +569,10 @@ static void atari_reset(void)
41 : "d0");
42 } else
43 asm volatile ("\n"
44- " pmove %0@,%%tc\n"
45+ " pmove %0,%%tc\n"
46 " jmp %1@"
47 : /* no outputs */
48- : "a" (&tc_val), "a" (reset_addr));
49+ : "m" (tc_val), "a" (reset_addr));
50 }
51
52
53diff --git a/arch/m68k/kernel/process_mm.c b/arch/m68k/kernel/process_mm.c
54index 1bc223a..aa4ffb8 100644
55--- a/arch/m68k/kernel/process_mm.c
56+++ b/arch/m68k/kernel/process_mm.c
57@@ -189,8 +189,8 @@ void flush_thread(void)
58 current->thread.fs = __USER_DS;
59 if (!FPU_IS_EMU)
60 asm volatile (".chip 68k/68881\n\t"
61- "frestore %0@\n\t"
62- ".chip 68k" : : "a" (&zero));
63+ "frestore %0\n\t"
64+ ".chip 68k" : : "m" (zero));
65 }
66
67 /*
68diff --git a/arch/m68k/kernel/process_no.c b/arch/m68k/kernel/process_no.c
69index 69c1803..5e1078c 100644
70--- a/arch/m68k/kernel/process_no.c
71+++ b/arch/m68k/kernel/process_no.c
72@@ -163,8 +163,8 @@ void flush_thread(void)
73 #ifdef CONFIG_FPU
74 if (!FPU_IS_EMU)
75 asm volatile (".chip 68k/68881\n\t"
76- "frestore %0@\n\t"
77- ".chip 68k" : : "a" (&zero));
78+ "frestore %0\n\t"
79+ ".chip 68k" : : "m" (zero));
80 #endif
81 }
82
83diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
84index 89362f2..eb67469 100644
85--- a/arch/m68k/kernel/traps.c
86+++ b/arch/m68k/kernel/traps.c
87@@ -552,13 +552,13 @@ static inline void bus_error030 (struct frame *fp)
88
89 #ifdef DEBUG
90 asm volatile ("ptestr %3,%2@,#7,%0\n\t"
91- "pmove %%psr,%1@"
92- : "=a&" (desc)
93- : "a" (&temp), "a" (addr), "d" (ssw));
94+ "pmove %%psr,%1"
95+ : "=a&" (desc), "=m" (temp)
96+ : "a" (addr), "d" (ssw));
97 #else
98 asm volatile ("ptestr %2,%1@,#7\n\t"
99- "pmove %%psr,%0@"
100- : : "a" (&temp), "a" (addr), "d" (ssw));
101+ "pmove %%psr,%0"
102+ : "=m" (temp) : "a" (addr), "d" (ssw));
103 #endif
104 mmusr = temp;
105
106@@ -605,20 +605,18 @@ static inline void bus_error030 (struct frame *fp)
107 !(ssw & RW) ? "write" : "read", addr,
108 fp->ptregs.pc, ssw);
109 asm volatile ("ptestr #1,%1@,#0\n\t"
110- "pmove %%psr,%0@"
111- : /* no outputs */
112- : "a" (&temp), "a" (addr));
113+ "pmove %%psr,%0"
114+ : "=m" (temp)
115+ : "a" (addr));
116 mmusr = temp;
117
118 printk ("level 0 mmusr is %#x\n", mmusr);
119 #if 0
120- asm volatile ("pmove %%tt0,%0@"
121- : /* no outputs */
122- : "a" (&tlong));
123+ asm volatile ("pmove %%tt0,%0"
124+ : "=m" (tlong));
125 printk("tt0 is %#lx, ", tlong);
126- asm volatile ("pmove %%tt1,%0@"
127- : /* no outputs */
128- : "a" (&tlong));
129+ asm volatile ("pmove %%tt1,%0"
130+ : "=m" (tlong));
131 printk("tt1 is %#lx\n", tlong);
132 #endif
133 #ifdef DEBUG
134@@ -668,13 +666,13 @@ static inline void bus_error030 (struct frame *fp)
135
136 #ifdef DEBUG
137 asm volatile ("ptestr #1,%2@,#7,%0\n\t"
138- "pmove %%psr,%1@"
139- : "=a&" (desc)
140- : "a" (&temp), "a" (addr));
141+ "pmove %%psr,%1"
142+ : "=a&" (desc), "=m" (temp)
143+ : "a" (addr));
144 #else
145 asm volatile ("ptestr #1,%1@,#7\n\t"
146- "pmove %%psr,%0@"
147- : : "a" (&temp), "a" (addr));
148+ "pmove %%psr,%0"
149+ : "=m" (temp) : "a" (addr));
150 #endif
151 mmusr = temp;
152
153diff --git a/arch/m68k/mm/cache.c b/arch/m68k/mm/cache.c
154index 5437fff..5550aa4 100644
155--- a/arch/m68k/mm/cache.c
156+++ b/arch/m68k/mm/cache.c
157@@ -52,9 +52,9 @@ static unsigned long virt_to_phys_slow(unsigned long vaddr)
158 unsigned long *descaddr;
159
160 asm volatile ("ptestr %3,%2@,#7,%0\n\t"
161- "pmove %%psr,%1@"
162- : "=a&" (descaddr)
163- : "a" (&mmusr), "a" (vaddr), "d" (get_fs().seg));
164+ "pmove %%psr,%1"
165+ : "=a&" (descaddr), "=m" (mmusr)
166+ : "a" (vaddr), "d" (get_fs().seg));
167 if (mmusr & (MMU_I|MMU_B|MMU_L))
168 return 0;
169 descaddr = phys_to_virt((unsigned long)descaddr);
170--
1711.7.7.4
172
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0027-ALSA-hda-set-mute-led-polarity-for-laptops-with-bugg.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0027-ALSA-hda-set-mute-led-polarity-for-laptops-with-bugg.patch
new file mode 100644
index 00000000..b3b84b67
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0027-ALSA-hda-set-mute-led-polarity-for-laptops-with-bugg.patch
@@ -0,0 +1,43 @@
1From 715f766173e7ebc2b5d2c84397cd0ed2ecd8073a Mon Sep 17 00:00:00 2001
2From: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
3Date: Tue, 24 Jan 2012 13:27:56 -0200
4Subject: [PATCH 27/90] ALSA: hda: set mute led polarity for laptops with
5 buggy BIOS based on SSID
6
7commit a6a600d10aaddf1da38053c4c6b64f50f56176e6 upstream.
8
9HP laptop models with buggy BIOS are apparently frequent, including
10machines with different codecs. Set the polarity of the mute led based
11on the SSID and include an entry for the HP Mini 110-3100.
12
13Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
14Tested-by: Predrag Ivanovic <predivan@open.telekom.rs>
15Signed-off-by: Takashi Iwai <tiwai@suse.de>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 sound/pci/hda/patch_sigmatel.c | 9 ++++++++-
19 1 files changed, 8 insertions(+), 1 deletions(-)
20
21diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
22index 2141cab..ccdac27 100644
23--- a/sound/pci/hda/patch_sigmatel.c
24+++ b/sound/pci/hda/patch_sigmatel.c
25@@ -4952,7 +4952,14 @@ static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity)
26 /* BIOS bug: unfilled OEM string */
27 if (strstr(dev->name, "HP_Mute_LED_P_G")) {
28 set_hp_led_gpio(codec);
29- spec->gpio_led_polarity = 1;
30+ switch (codec->subsystem_id) {
31+ case 0x103c148a:
32+ spec->gpio_led_polarity = 0;
33+ break;
34+ default:
35+ spec->gpio_led_polarity = 1;
36+ break;
37+ }
38 return 1;
39 }
40 }
41--
421.7.7.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0028-ALSA-hda-Fix-silent-output-on-ASUS-A6Rp.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0028-ALSA-hda-Fix-silent-output-on-ASUS-A6Rp.patch
new file mode 100644
index 00000000..4a60383e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0028-ALSA-hda-Fix-silent-output-on-ASUS-A6Rp.patch
@@ -0,0 +1,55 @@
1From 14b87cff679154f199dfeaa367f781e438197215 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Wed, 25 Jan 2012 09:55:46 +0100
4Subject: [PATCH 28/90] ALSA: hda - Fix silent output on ASUS A6Rp
5
6commit 3b25eb690e8c7424eecffe1458c02b87b32aa001 upstream.
7
8The refactoring of Realtek codec driver in 3.2 kernel caused a
9regression for ASUS A6Rp laptop; it doesn't give any output.
10The reason was that this machine has a secret master mute (or EAPD)
11control via NID 0x0f VREF. Setting VREF50 on this node makes the
12sound working again.
13
14Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588
15
16Signed-off-by: Takashi Iwai <tiwai@suse.de>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 sound/pci/hda/patch_realtek.c | 10 ++++++++++
20 1 files changed, 10 insertions(+), 0 deletions(-)
21
22diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
23index 1d07e8f..9a63a19 100644
24--- a/sound/pci/hda/patch_realtek.c
25+++ b/sound/pci/hda/patch_realtek.c
26@@ -5223,6 +5223,7 @@ static const struct hda_amp_list alc861_loopbacks[] = {
27 /* Pin config fixes */
28 enum {
29 PINFIX_FSC_AMILO_PI1505,
30+ PINFIX_ASUS_A6RP,
31 };
32
33 static const struct alc_fixup alc861_fixups[] = {
34@@ -5234,9 +5235,18 @@ static const struct alc_fixup alc861_fixups[] = {
35 { }
36 }
37 },
38+ [PINFIX_ASUS_A6RP] = {
39+ .type = ALC_FIXUP_VERBS,
40+ .v.verbs = (const struct hda_verb[]) {
41+ /* node 0x0f VREF seems controlling the master output */
42+ { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50 },
43+ { }
44+ },
45+ },
46 };
47
48 static const struct snd_pci_quirk alc861_fixup_tbl[] = {
49+ SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", PINFIX_ASUS_A6RP),
50 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", PINFIX_FSC_AMILO_PI1505),
51 {}
52 };
53--
541.7.7.4
55
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0029-ALSA-hda-Fix-silent-output-on-Haier-W18-laptop.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0029-ALSA-hda-Fix-silent-output-on-Haier-W18-laptop.patch
new file mode 100644
index 00000000..0e8e4333
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0029-ALSA-hda-Fix-silent-output-on-Haier-W18-laptop.patch
@@ -0,0 +1,34 @@
1From 7af203863bc49229e342435baa745102849d9c79 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Thu, 26 Jan 2012 15:56:16 +0100
4Subject: [PATCH 29/90] ALSA: hda - Fix silent output on Haier W18 laptop
5
6commit b3a81520bd37a28f77cb0f7002086fb14061824d upstream.
7
8The very same problem is seen on Haier W18 laptop with ALC861 as seen
9on ASUS A6Rp, which was fixed by the commit 3b25eb69.
10Now we just need to add a new SSID entry pointing to the same fixup.
11
12Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42656
13
14Signed-off-by: Takashi Iwai <tiwai@suse.de>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 sound/pci/hda/patch_realtek.c | 1 +
18 1 files changed, 1 insertions(+), 0 deletions(-)
19
20diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
21index 9a63a19..5f03c40 100644
22--- a/sound/pci/hda/patch_realtek.c
23+++ b/sound/pci/hda/patch_realtek.c
24@@ -5247,6 +5247,7 @@ static const struct alc_fixup alc861_fixups[] = {
25
26 static const struct snd_pci_quirk alc861_fixup_tbl[] = {
27 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", PINFIX_ASUS_A6RP),
28+ SND_PCI_QUIRK(0x1584, 0x2b01, "Haier W18", PINFIX_ASUS_A6RP),
29 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", PINFIX_FSC_AMILO_PI1505),
30 {}
31 };
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0030-drm-i915-paper-over-missed-irq-issues-with-force-wak.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0030-drm-i915-paper-over-missed-irq-issues-with-force-wak.patch
new file mode 100644
index 00000000..95e18690
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0030-drm-i915-paper-over-missed-irq-issues-with-force-wak.patch
@@ -0,0 +1,126 @@
1From 8192adb1ac4be659f5fc3010fa53c7cb3f59a409 Mon Sep 17 00:00:00 2001
2From: Daniel Vetter <daniel.vetter@ffwll.ch>
3Date: Fri, 14 Dec 2012 16:01:25 +0100
4Subject: [PATCH 30/90] drm/i915: paper over missed irq issues with force wake
5 voodoo
6
7commit 4cd53c0c8b01fc05c3ad5b2acdad02e37d3c2f55 upstream.
8
9Two things seem to do the trick on my ivb machine here:
10- prevent the gt from powering down while waiting for seqno
11 notification interrupts by grabbing the force_wake in get_irq (and
12 dropping it in put_irq again).
13- ordering writes from the ring's CS by reading a CS register, ACTHD
14 seems to work.
15
16Only the blt&bsd ring on ivb seem to be massively affected by this,
17but for paranoia do this dance also on the render ring and on snb
18(i.e. all gpus with forcewake).
19
20Tested with Eric's glCopyPixels loop which without this patch scores a
21missed irq every few seconds.
22
23This patch needs my forcewake rework to use a spinlock instead of
24dev->struct_mutex.
25
26After crawling through docs a lot I've found the following nugget:
27
28Internal doc "SNB GT PM Programming Guide", Section 4.3.1:
29
30"GT does not generate interrupts while in RC6 (by design)"
31
32So it looks like rc6 and irq generation are indeed related.
33
34v2: Improve the comment per Eugeni Dodonov's suggestion.
35
36v3: Add the documentation snipped. Also restrict the w/a to ivb only
37for -fixes, as suggested by Keith Packard.
38
39Cc: Eric Anholt <eric@anholt.net>
40Cc: Kenneth Graunke <kenneth@whitecape.org>
41Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
42Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
43Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
44Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
45Signed-off-by: Keith Packard <keithp@keithp.com>
46Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
47---
48 drivers/gpu/drm/i915/intel_ringbuffer.c | 27 +++++++++++++++++++++++++--
49 1 files changed, 25 insertions(+), 2 deletions(-)
50
51diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
52index ca70e2f..30a9af9 100644
53--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
54+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
55@@ -631,6 +631,19 @@ render_ring_add_request(struct intel_ring_buffer *ring,
56 }
57
58 static u32
59+gen6_ring_get_seqno(struct intel_ring_buffer *ring)
60+{
61+ struct drm_device *dev = ring->dev;
62+
63+ /* Workaround to force correct ordering between irq and seqno writes on
64+ * ivb (and maybe also on snb) by reading from a CS register (like
65+ * ACTHD) before reading the status page. */
66+ if (IS_GEN7(dev))
67+ intel_ring_get_active_head(ring);
68+ return intel_read_status_page(ring, I915_GEM_HWS_INDEX);
69+}
70+
71+static u32
72 ring_get_seqno(struct intel_ring_buffer *ring)
73 {
74 return intel_read_status_page(ring, I915_GEM_HWS_INDEX);
75@@ -795,6 +808,12 @@ gen6_ring_get_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
76 if (!dev->irq_enabled)
77 return false;
78
79+ /* It looks like we need to prevent the gt from suspending while waiting
80+ * for an notifiy irq, otherwise irqs seem to get lost on at least the
81+ * blt/bsd rings on ivb. */
82+ if (IS_GEN7(dev))
83+ gen6_gt_force_wake_get(dev_priv);
84+
85 spin_lock(&ring->irq_lock);
86 if (ring->irq_refcount++ == 0) {
87 ring->irq_mask &= ~rflag;
88@@ -819,6 +838,9 @@ gen6_ring_put_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
89 ironlake_disable_irq(dev_priv, gflag);
90 }
91 spin_unlock(&ring->irq_lock);
92+
93+ if (IS_GEN7(dev))
94+ gen6_gt_force_wake_put(dev_priv);
95 }
96
97 static bool
98@@ -1316,7 +1338,7 @@ static const struct intel_ring_buffer gen6_bsd_ring = {
99 .write_tail = gen6_bsd_ring_write_tail,
100 .flush = gen6_ring_flush,
101 .add_request = gen6_add_request,
102- .get_seqno = ring_get_seqno,
103+ .get_seqno = gen6_ring_get_seqno,
104 .irq_get = gen6_bsd_ring_get_irq,
105 .irq_put = gen6_bsd_ring_put_irq,
106 .dispatch_execbuffer = gen6_ring_dispatch_execbuffer,
107@@ -1451,7 +1473,7 @@ static const struct intel_ring_buffer gen6_blt_ring = {
108 .write_tail = ring_write_tail,
109 .flush = blt_ring_flush,
110 .add_request = gen6_add_request,
111- .get_seqno = ring_get_seqno,
112+ .get_seqno = gen6_ring_get_seqno,
113 .irq_get = blt_ring_get_irq,
114 .irq_put = blt_ring_put_irq,
115 .dispatch_execbuffer = gen6_ring_dispatch_execbuffer,
116@@ -1474,6 +1496,7 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
117 ring->flush = gen6_render_ring_flush;
118 ring->irq_get = gen6_render_ring_get_irq;
119 ring->irq_put = gen6_render_ring_put_irq;
120+ ring->get_seqno = gen6_ring_get_seqno;
121 } else if (IS_GEN5(dev)) {
122 ring->add_request = pc_render_add_request;
123 ring->get_seqno = pc_render_get_seqno;
124--
1251.7.7.4
126
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0031-drm-i915-sdvo-always-set-positive-sync-polarity.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0031-drm-i915-sdvo-always-set-positive-sync-polarity.patch
new file mode 100644
index 00000000..16b018a6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0031-drm-i915-sdvo-always-set-positive-sync-polarity.patch
@@ -0,0 +1,52 @@
1From eeb7321204f3c1e07a8f4fe750415c0c2c991068 Mon Sep 17 00:00:00 2001
2From: Paulo Zanoni <paulo.r.zanoni@intel.com>
3Date: Fri, 6 Jan 2012 19:45:34 -0200
4Subject: [PATCH 31/90] drm/i915/sdvo: always set positive sync polarity
5
6commit ba68e086223a5f149f37bf8692c8cdbf1b0ba3ef upstream.
7
8This is a revert of 81a14b46846fea0741902e8d8dfcc6c6c78154c8.
9
10We already set the mode polarity using the SDVO commands with struct
11intel_sdvo_dtd. We have at least 3 bugs that get fixed with this patch.
12The documentation, despite not clear, can also be interpreted in a way
13that suggests this patch is needed.
14
15Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=15766
16Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42174
17Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43333
18Reviewed-by: Eric Anholt <eric@anholt.net>
19Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
20Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
21Signed-off-by: Keith Packard <keithp@keithp.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 drivers/gpu/drm/i915/intel_sdvo.c | 8 +++-----
25 1 files changed, 3 insertions(+), 5 deletions(-)
26
27diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
28index f7b9268..e334ec3 100644
29--- a/drivers/gpu/drm/i915/intel_sdvo.c
30+++ b/drivers/gpu/drm/i915/intel_sdvo.c
31@@ -1066,15 +1066,13 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
32
33 /* Set the SDVO control regs. */
34 if (INTEL_INFO(dev)->gen >= 4) {
35- sdvox = 0;
36+ /* The real mode polarity is set by the SDVO commands, using
37+ * struct intel_sdvo_dtd. */
38+ sdvox = SDVO_VSYNC_ACTIVE_HIGH | SDVO_HSYNC_ACTIVE_HIGH;
39 if (intel_sdvo->is_hdmi)
40 sdvox |= intel_sdvo->color_range;
41 if (INTEL_INFO(dev)->gen < 5)
42 sdvox |= SDVO_BORDER_ENABLE;
43- if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
44- sdvox |= SDVO_VSYNC_ACTIVE_HIGH;
45- if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC)
46- sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
47 } else {
48 sdvox = I915_READ(intel_sdvo->sdvo_reg);
49 switch (intel_sdvo->sdvo_reg) {
50--
511.7.7.4
52
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0032-drm-i915-Re-enable-gen7-RC6-and-GPU-turbo-after-resu.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0032-drm-i915-Re-enable-gen7-RC6-and-GPU-turbo-after-resu.patch
new file mode 100644
index 00000000..8d026056
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0032-drm-i915-Re-enable-gen7-RC6-and-GPU-turbo-after-resu.patch
@@ -0,0 +1,43 @@
1From a9dbe8df9f33f70904247f2e263a9647eb8e448a Mon Sep 17 00:00:00 2001
2From: Eric Anholt <eric@anholt.net>
3Date: Mon, 23 Jan 2012 16:14:06 -0800
4Subject: [PATCH 32/90] drm/i915: Re-enable gen7 RC6 and GPU turbo after
5 resume.
6
7commit 04115a9dee110b52a8eaa556c574022fa3bf4704 upstream.
8
9Signed-off-by: Eric Anholt <eric@anholt.net>
10Reviewed-by: Keith Packard <keithp@keithp.com>
11Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
12Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13Signed-off-by: Keith Packard <keithp@keithp.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/gpu/drm/i915/i915_suspend.c | 4 ++--
17 1 files changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
20index 7886e4f..43cbafe 100644
21--- a/drivers/gpu/drm/i915/i915_suspend.c
22+++ b/drivers/gpu/drm/i915/i915_suspend.c
23@@ -822,7 +822,7 @@ int i915_save_state(struct drm_device *dev)
24
25 if (IS_IRONLAKE_M(dev))
26 ironlake_disable_drps(dev);
27- if (IS_GEN6(dev))
28+ if (INTEL_INFO(dev)->gen >= 6)
29 gen6_disable_rps(dev);
30
31 /* Cache mode state */
32@@ -881,7 +881,7 @@ int i915_restore_state(struct drm_device *dev)
33 intel_init_emon(dev);
34 }
35
36- if (IS_GEN6(dev)) {
37+ if (INTEL_INFO(dev)->gen >= 6) {
38 gen6_enable_rps(dev_priv);
39 gen6_update_ring_freq(dev_priv);
40 }
41--
421.7.7.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0033-ARM-at91-fix-at91rm9200-soc-subtype-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0033-ARM-at91-fix-at91rm9200-soc-subtype-handling.patch
new file mode 100644
index 00000000..4667ad74
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0033-ARM-at91-fix-at91rm9200-soc-subtype-handling.patch
@@ -0,0 +1,46 @@
1From bc5829b31b25a3a6928089594fdab76017d0d622 Mon Sep 17 00:00:00 2001
2From: Nicolas Ferre <nicolas.ferre@atmel.com>
3Date: Wed, 28 Dec 2011 13:10:04 +0200
4Subject: [PATCH 33/90] ARM: at91: fix at91rm9200 soc subtype handling
5
6commit 3e90772f76010c315474bde59eaca7cc4c94d645 upstream.
7
8Currently setting it to PQFP changes subtype to BGA as subtypes are
9swapped in at91rm9200_set_type().
10
11Wrong subtype causes GPIO bank D not to work at all.
12
13After this fix, subtype is still set as unknown. But board code should
14fill it in with proper value. Another information is thus printed.
15
16Bug discovery and first implementation made by Veli-Pekka Peltola.
17
18Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
19Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 arch/arm/mach-at91/setup.c | 7 +++++--
23 1 files changed, 5 insertions(+), 2 deletions(-)
24
25diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
26index cf98a8f..39d8ea0 100644
27--- a/arch/arm/mach-at91/setup.c
28+++ b/arch/arm/mach-at91/setup.c
29@@ -27,9 +27,12 @@ EXPORT_SYMBOL(at91_soc_initdata);
30 void __init at91rm9200_set_type(int type)
31 {
32 if (type == ARCH_REVISON_9200_PQFP)
33- at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA;
34- else
35 at91_soc_initdata.subtype = AT91_SOC_RM9200_PQFP;
36+ else
37+ at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA;
38+
39+ pr_info("AT91: filled in soc subtype: %s\n",
40+ at91_get_soc_subtype(&at91_soc_initdata));
41 }
42
43 void __init at91_init_irq_default(void)
44--
451.7.7.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0034-mach-ux500-enable-ARM-errata-764369.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0034-mach-ux500-enable-ARM-errata-764369.patch
new file mode 100644
index 00000000..ea53d57b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0034-mach-ux500-enable-ARM-errata-764369.patch
@@ -0,0 +1,31 @@
1From 7e7ae7c2a3f4433e2401717a641cab1a86249f94 Mon Sep 17 00:00:00 2001
2From: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
3Date: Thu, 12 Jan 2012 11:07:43 +0530
4Subject: [PATCH 34/90] mach-ux500: enable ARM errata 764369
5
6commit d65015f7c5c5be9fd3f5e567889c844ba81bdc9c upstream.
7
8This applies ARM errata 764369 for all ux500 platforms.
9
10Signed-off-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
11Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 arch/arm/mach-ux500/Kconfig | 1 +
15 1 files changed, 1 insertions(+), 0 deletions(-)
16
17diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
18index a3e0c86..52af004 100644
19--- a/arch/arm/mach-ux500/Kconfig
20+++ b/arch/arm/mach-ux500/Kconfig
21@@ -7,6 +7,7 @@ config UX500_SOC_COMMON
22 select HAS_MTU
23 select ARM_ERRATA_753970
24 select ARM_ERRATA_754322
25+ select ARM_ERRATA_764369
26
27 menu "Ux500 SoC"
28
29--
301.7.7.4
31
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0035-ARM-7296-1-proc-v7.S-remove-HARVARD_CACHE-preprocess.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0035-ARM-7296-1-proc-v7.S-remove-HARVARD_CACHE-preprocess.patch
new file mode 100644
index 00000000..371ead88
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0035-ARM-7296-1-proc-v7.S-remove-HARVARD_CACHE-preprocess.patch
@@ -0,0 +1,53 @@
1From edee236502d6e853eddd1ba0698aa1333126527f Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 20 Jan 2012 12:10:18 +0100
4Subject: [PATCH 35/90] ARM: 7296/1: proc-v7.S: remove HARVARD_CACHE
5 preprocessor guards
6
7commit 612539e81f655f6ac73c7af1da8701c1ee618aee upstream.
8
9On v7, we use the same cache maintenance instructions for data lines
10as for unified lines. This was not the case for v6, where HARVARD_CACHE
11was defined to indicate the L1 cache topology.
12
13This patch removes the erroneous compile-time check for HARVARD_CACHE in
14proc-v7.S, ensuring that we perform I-side invalidation at boot.
15
16Reported-and-Acked-by: Shawn Guo <shawn.guo@linaro.org>
17
18Acked-by: Catalin Marinas <Catalin.Marinas@arm.com>
19Signed-off-by: Will Deacon <will.deacon@arm.com>
20Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 arch/arm/mm/proc-v7.S | 6 ------
24 1 files changed, 0 insertions(+), 6 deletions(-)
25
26diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
27index e70a737..40cc7aa 100644
28--- a/arch/arm/mm/proc-v7.S
29+++ b/arch/arm/mm/proc-v7.S
30@@ -271,10 +271,6 @@ ENDPROC(cpu_v7_do_resume)
31 * Initialise TLB, Caches, and MMU state ready to switch the MMU
32 * on. Return in r0 the new CP15 C1 control register setting.
33 *
34- * We automatically detect if we have a Harvard cache, and use the
35- * Harvard cache control instructions insead of the unified cache
36- * control instructions.
37- *
38 * This should be able to cover all ARMv7 cores.
39 *
40 * It is assumed that:
41@@ -373,9 +369,7 @@ __v7_setup:
42 #endif
43
44 3: mov r10, #0
45-#ifdef HARVARD_CACHE
46 mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate
47-#endif
48 dsb
49 #ifdef CONFIG_MMU
50 mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0036-sysfs-Complain-bitterly-about-attempts-to-remove-fil.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0036-sysfs-Complain-bitterly-about-attempts-to-remove-fil.patch
new file mode 100644
index 00000000..492cb43c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0036-sysfs-Complain-bitterly-about-attempts-to-remove-fil.patch
@@ -0,0 +1,68 @@
1From 03813e1cec3fa5d6011c9e9faefa80ad1f1b7f04 Mon Sep 17 00:00:00 2001
2From: "Eric W. Biederman" <ebiederm@xmission.com>
3Date: Fri, 13 Jan 2012 21:32:59 -0800
4Subject: [PATCH 36/90] sysfs: Complain bitterly about attempts to remove
5 files from nonexistent directories.
6
7commit ce597919361dcec97341151690e780eade2a9cf4 upstream.
8
9Recently an OOPS was observed from the usb serial io_ti driver when it tried to remove
10sysfs directories. Upon investigation it turns out this driver was always buggy
11and that a recent sysfs change had stopped guarding itself against removing attributes
12from sysfs directories that had already been removed. :(
13
14Historically we have been silent about attempting to files from nonexistent sysfs
15directories and have politely returned error codes. That has resulted in people writing
16broken code that ignores the error codes.
17
18Issue a kernel WARNING and a stack backtrace to make it clear in no uncertain
19terms that abusing sysfs is not ok, and the callers need to fix their code.
20
21This change transforms the io_ti OOPS into a more comprehensible error message
22and stack backtrace.
23
24Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
25Reported-by: Wolfgang Frisch <wfpub@roembden.net>
26Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27---
28 fs/sysfs/file.c | 6 ++++++
29 fs/sysfs/inode.c | 5 ++++-
30 2 files changed, 10 insertions(+), 1 deletions(-)
31
32diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
33index d4e6080b..779789a 100644
34--- a/fs/sysfs/file.c
35+++ b/fs/sysfs/file.c
36@@ -493,6 +493,12 @@ int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr,
37 const void *ns = NULL;
38 int err;
39
40+ if (!dir_sd) {
41+ WARN(1, KERN_ERR "sysfs: kobject %s without dirent\n",
42+ kobject_name(kobj));
43+ return -ENOENT;
44+ }
45+
46 err = 0;
47 if (!sysfs_ns_type(dir_sd))
48 goto out;
49diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
50index c81b22f..deb804b 100644
51--- a/fs/sysfs/inode.c
52+++ b/fs/sysfs/inode.c
53@@ -318,8 +318,11 @@ int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const cha
54 struct sysfs_addrm_cxt acxt;
55 struct sysfs_dirent *sd;
56
57- if (!dir_sd)
58+ if (!dir_sd) {
59+ WARN(1, KERN_WARNING "sysfs: can not remove '%s', no directory\n",
60+ name);
61 return -ENOENT;
62+ }
63
64 sysfs_addrm_start(&acxt, dir_sd);
65
66--
671.7.7.4
68
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0037-x86-xen-size-struct-xen_spinlock-to-always-fit-in-ar.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0037-x86-xen-size-struct-xen_spinlock-to-always-fit-in-ar.patch
new file mode 100644
index 00000000..febc9451
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0037-x86-xen-size-struct-xen_spinlock-to-always-fit-in-ar.patch
@@ -0,0 +1,103 @@
1From 0ffbd056d7edbfdeb707161d3953ff65f884c92b Mon Sep 17 00:00:00 2001
2From: David Vrabel <david.vrabel@citrix.com>
3Date: Mon, 23 Jan 2012 19:32:25 +0000
4Subject: [PATCH 37/90] x86: xen: size struct xen_spinlock to always fit in
5 arch_spinlock_t
6
7commit 7a7546b377bdaa25ac77f33d9433c59f259b9688 upstream.
8
9If NR_CPUS < 256 then arch_spinlock_t is only 16 bits wide but struct
10xen_spinlock is 32 bits. When a spin lock is contended and
11xl->spinners is modified the two bytes immediately after the spin lock
12would be corrupted.
13
14This is a regression caused by 84eb950db13ca40a0572ce9957e14723500943d6
15(x86, ticketlock: Clean up types and accessors) which reduced the size
16of arch_spinlock_t.
17
18Fix this by making xl->spinners a u8 if NR_CPUS < 256. A
19BUILD_BUG_ON() is also added to check the sizes of the two structures
20are compatible.
21
22In many cases this was not noticable as there would often be padding
23bytes after the lock (e.g., if any of CONFIG_GENERIC_LOCKBREAK,
24CONFIG_DEBUG_SPINLOCK, or CONFIG_DEBUG_LOCK_ALLOC were enabled).
25
26The bnx2 driver is affected. In struct bnx2, phy_lock and
27indirect_lock may have no padding after them. Contention on phy_lock
28would corrupt indirect_lock making it appear locked and the driver
29would deadlock.
30
31Signed-off-by: David Vrabel <david.vrabel@citrix.com>
32Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
33Acked-by: Ian Campbell <ian.campbell@citrix.com>
34Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
35Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
36---
37 arch/x86/xen/spinlock.c | 27 ++++++++++++++++++++++-----
38 1 files changed, 22 insertions(+), 5 deletions(-)
39
40diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
41index cc9b1e1..d69cc6c 100644
42--- a/arch/x86/xen/spinlock.c
43+++ b/arch/x86/xen/spinlock.c
44@@ -116,9 +116,26 @@ static inline void spin_time_accum_blocked(u64 start)
45 }
46 #endif /* CONFIG_XEN_DEBUG_FS */
47
48+/*
49+ * Size struct xen_spinlock so it's the same as arch_spinlock_t.
50+ */
51+#if NR_CPUS < 256
52+typedef u8 xen_spinners_t;
53+# define inc_spinners(xl) \
54+ asm(LOCK_PREFIX " incb %0" : "+m" ((xl)->spinners) : : "memory");
55+# define dec_spinners(xl) \
56+ asm(LOCK_PREFIX " decb %0" : "+m" ((xl)->spinners) : : "memory");
57+#else
58+typedef u16 xen_spinners_t;
59+# define inc_spinners(xl) \
60+ asm(LOCK_PREFIX " incw %0" : "+m" ((xl)->spinners) : : "memory");
61+# define dec_spinners(xl) \
62+ asm(LOCK_PREFIX " decw %0" : "+m" ((xl)->spinners) : : "memory");
63+#endif
64+
65 struct xen_spinlock {
66 unsigned char lock; /* 0 -> free; 1 -> locked */
67- unsigned short spinners; /* count of waiting cpus */
68+ xen_spinners_t spinners; /* count of waiting cpus */
69 };
70
71 static int xen_spin_is_locked(struct arch_spinlock *lock)
72@@ -164,8 +181,7 @@ static inline struct xen_spinlock *spinning_lock(struct xen_spinlock *xl)
73
74 wmb(); /* set lock of interest before count */
75
76- asm(LOCK_PREFIX " incw %0"
77- : "+m" (xl->spinners) : : "memory");
78+ inc_spinners(xl);
79
80 return prev;
81 }
82@@ -176,8 +192,7 @@ static inline struct xen_spinlock *spinning_lock(struct xen_spinlock *xl)
83 */
84 static inline void unspinning_lock(struct xen_spinlock *xl, struct xen_spinlock *prev)
85 {
86- asm(LOCK_PREFIX " decw %0"
87- : "+m" (xl->spinners) : : "memory");
88+ dec_spinners(xl);
89 wmb(); /* decrement count before restoring lock */
90 __this_cpu_write(lock_spinners, prev);
91 }
92@@ -373,6 +388,8 @@ void xen_uninit_lock_cpu(int cpu)
93
94 void __init xen_init_spinlocks(void)
95 {
96+ BUILD_BUG_ON(sizeof(struct xen_spinlock) > sizeof(arch_spinlock_t));
97+
98 pv_lock_ops.spin_is_locked = xen_spin_is_locked;
99 pv_lock_ops.spin_is_contended = xen_spin_is_contended;
100 pv_lock_ops.spin_lock = xen_spin_lock;
101--
1021.7.7.4
103
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0038-mpt2sas-Removed-redundant-calling-of-_scsih_probe_de.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0038-mpt2sas-Removed-redundant-calling-of-_scsih_probe_de.patch
new file mode 100644
index 00000000..b85e209a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0038-mpt2sas-Removed-redundant-calling-of-_scsih_probe_de.patch
@@ -0,0 +1,96 @@
1From 00f1a14e217d9fcb2b568d56192a28d3e89e192b Mon Sep 17 00:00:00 2001
2From: "nagalakshmi.nandigama@lsi.com" <nagalakshmi.nandigama@lsi.com>
3Date: Tue, 13 Dec 2011 09:29:15 +0530
4Subject: [PATCH 38/90] mpt2sas: Removed redundant calling of
5 _scsih_probe_devices() from _scsih_probe
6
7commit 2cb6fc8c014b9b00c4487a79b8f6ed0da4121f45 upstream.
8
9Removed redundant calling of _scsih_probe_devices() from _scsih_probe as
10it is getting called from _scsih_scan_finished.
11
12Also moved the function scsi_scan_host(shost) to get called after the
13volumes on warp drive are reported to the OS. Otherwise by the time
14the (ioc->hide_drives) flags is set, the volumes on warp drive
15are reported to the OS already.
16
17Also modified the initialization of reply queues only in case of driver load
18time in the function _base_make_ioc_operational().
19
20Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
21Signed-off-by: James Bottomley <JBottomley@Parallels.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 drivers/scsi/mpt2sas/mpt2sas_base.c | 20 +++++++-------------
25 drivers/scsi/mpt2sas/mpt2sas_scsih.c | 3 +--
26 2 files changed, 8 insertions(+), 15 deletions(-)
27
28diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
29index 0794c72..b1ddfef 100644
30--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
31+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
32@@ -4033,7 +4033,8 @@ _base_make_ioc_operational(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
33 ioc->reply_free[i] = cpu_to_le32(reply_address);
34
35 /* initialize reply queues */
36- _base_assign_reply_queues(ioc);
37+ if (ioc->is_driver_loading)
38+ _base_assign_reply_queues(ioc);
39
40 /* initialize Reply Post Free Queue */
41 reply_post_free = (long)ioc->reply_post_free;
42@@ -4081,24 +4082,17 @@ _base_make_ioc_operational(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
43
44
45 if (ioc->is_driver_loading) {
46-
47-
48-
49- ioc->wait_for_discovery_to_complete =
50- _base_determine_wait_on_discovery(ioc);
51- return r; /* scan_start and scan_finished support */
52- }
53-
54-
55- if (ioc->wait_for_discovery_to_complete && ioc->is_warpdrive) {
56- if (ioc->manu_pg10.OEMIdentifier == 0x80) {
57+ if (ioc->is_warpdrive && ioc->manu_pg10.OEMIdentifier
58+ == 0x80) {
59 hide_flag = (u8) (ioc->manu_pg10.OEMSpecificFlags0 &
60 MFG_PAGE10_HIDE_SSDS_MASK);
61 if (hide_flag != MFG_PAGE10_HIDE_SSDS_MASK)
62 ioc->mfg_pg10_hide_flag = hide_flag;
63 }
64+ ioc->wait_for_discovery_to_complete =
65+ _base_determine_wait_on_discovery(ioc);
66+ return r; /* scan_start and scan_finished support */
67 }
68-
69 r = _base_send_port_enable(ioc, sleep_flag);
70 if (r)
71 return r;
72diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
73index 9bc6fb2..2824a90 100644
74--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
75+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
76@@ -8001,7 +8001,6 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)
77 goto out_attach_fail;
78 }
79
80- scsi_scan_host(shost);
81 if (ioc->is_warpdrive) {
82 if (ioc->mfg_pg10_hide_flag == MFG_PAGE10_EXPOSE_ALL_DISKS)
83 ioc->hide_drives = 0;
84@@ -8015,8 +8014,8 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)
85 }
86 } else
87 ioc->hide_drives = 0;
88+ scsi_scan_host(shost);
89
90- _scsih_probe_devices(ioc);
91 return 0;
92
93 out_attach_fail:
94--
951.7.7.4
96
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0039-USB-option-Add-LG-docomo-L-02C.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0039-USB-option-Add-LG-docomo-L-02C.patch
new file mode 100644
index 00000000..bd259754
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0039-USB-option-Add-LG-docomo-L-02C.patch
@@ -0,0 +1,41 @@
1From 1b9d5491e5c2439b3e861d1612eeae258c926b34 Mon Sep 17 00:00:00 2001
2From: Kentaro Matsuyama <kentaro.matsuyama@gmail.com>
3Date: Thu, 12 Jan 2012 23:07:51 +0900
4Subject: [PATCH 39/90] USB: option: Add LG docomo L-02C
5
6commit e423d7401fd0717cb56a6cf51dd8341cc3e800d2 upstream.
7
8Add vendor and product ID for USB 3G/LTE modem of docomo L-02C
9
10Signed-off-by: Kentaro Matsuyama <kentaro.matsuyama@gmail.com>
11Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12---
13 drivers/usb/serial/option.c | 5 +++++
14 1 files changed, 5 insertions(+), 0 deletions(-)
15
16diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
17index c96b6b6..2a9ed6e 100644
18--- a/drivers/usb/serial/option.c
19+++ b/drivers/usb/serial/option.c
20@@ -480,6 +480,10 @@ static void option_instat_callback(struct urb *urb);
21 #define ZD_VENDOR_ID 0x0685
22 #define ZD_PRODUCT_7000 0x7000
23
24+/* LG products */
25+#define LG_VENDOR_ID 0x1004
26+#define LG_PRODUCT_L02C 0x618f
27+
28 /* some devices interfaces need special handling due to a number of reasons */
29 enum option_blacklist_reason {
30 OPTION_BLACKLIST_NONE = 0,
31@@ -1183,6 +1187,7 @@ static const struct usb_device_id option_ids[] = {
32 { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
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 { } /* Terminating entry */
37 };
38 MODULE_DEVICE_TABLE(usb, option_ids);
39--
401.7.7.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0040-USB-ftdi_sio-fix-TIOCSSERIAL-baud_base-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0040-USB-ftdi_sio-fix-TIOCSSERIAL-baud_base-handling.patch
new file mode 100644
index 00000000..a80c2315
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0040-USB-ftdi_sio-fix-TIOCSSERIAL-baud_base-handling.patch
@@ -0,0 +1,41 @@
1From f4915de191cac38c002969b2a7b8ca4cda1f8ebb Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Tue, 10 Jan 2012 23:33:37 +0100
4Subject: [PATCH 40/90] USB: ftdi_sio: fix TIOCSSERIAL baud_base handling
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit eb833a9e0972f60beb4ab8104ad7ef6bf30f02fc upstream.
10
11Return EINVAL if new baud_base does not match the current one.
12
13The baud_base is device specific and can not be changed. This restores
14the old (pre-2005) behaviour which was changed due to a
15misunderstanding regarding this fact (see
16https://lkml.org/lkml/2005/1/20/84).
17
18Reported-by: Torbjörn Lofterud <torbjorn@pi.nxs.se>
19Signed-off-by: Johan Hovold <jhovold@gmail.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 drivers/usb/serial/ftdi_sio.c | 3 +--
23 1 files changed, 1 insertions(+), 2 deletions(-)
24
25diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
26index ff3db5d..6a034b3 100644
27--- a/drivers/usb/serial/ftdi_sio.c
28+++ b/drivers/usb/serial/ftdi_sio.c
29@@ -1333,8 +1333,7 @@ static int set_serial_info(struct tty_struct *tty,
30 goto check_and_exit;
31 }
32
33- if ((new_serial.baud_base != priv->baud_base) &&
34- (new_serial.baud_base < 9600)) {
35+ if (new_serial.baud_base != priv->baud_base) {
36 mutex_unlock(&priv->cfg_lock);
37 return -EINVAL;
38 }
39--
401.7.7.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0041-USB-ftdi_sio-fix-initial-baud-rate.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0041-USB-ftdi_sio-fix-initial-baud-rate.patch
new file mode 100644
index 00000000..f1c1e75f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0041-USB-ftdi_sio-fix-initial-baud-rate.patch
@@ -0,0 +1,49 @@
1From 6ca78fe06bc778d2a4d82af2fd438bf0ddfc2a2c Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Wed, 18 Jan 2012 01:46:00 +0100
4Subject: [PATCH 41/90] USB: ftdi_sio: fix initial baud rate
5
6commit 108e02b12921078a59dcacd048079ece48a4a983 upstream.
7
8Fix regression introduced by commit b1ffb4c851f1 ("USB: Fix Corruption
9issue in USB ftdi driver ftdi_sio.c") which caused the termios settings
10to no longer be initialised at open. Consequently it was no longer
11possible to set the port to the default speed of 9600 baud without first
12changing to another baud rate and back again.
13
14Reported-by: Roland Ramthun <mail@roland-ramthun.de>
15Signed-off-by: Johan Hovold <jhovold@gmail.com>
16Tested-by: Roland Ramthun <mail@roland-ramthun.de>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 drivers/usb/serial/ftdi_sio.c | 7 +++++--
20 1 files changed, 5 insertions(+), 2 deletions(-)
21
22diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
23index 6a034b3..6a40b41 100644
24--- a/drivers/usb/serial/ftdi_sio.c
25+++ b/drivers/usb/serial/ftdi_sio.c
26@@ -1823,6 +1823,7 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port)
27
28 static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
29 {
30+ struct ktermios dummy;
31 struct usb_device *dev = port->serial->dev;
32 struct ftdi_private *priv = usb_get_serial_port_data(port);
33 int result;
34@@ -1841,8 +1842,10 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
35 This is same behaviour as serial.c/rs_open() - Kuba */
36
37 /* ftdi_set_termios will send usb control messages */
38- if (tty)
39- ftdi_set_termios(tty, port, tty->termios);
40+ if (tty) {
41+ memset(&dummy, 0, sizeof(dummy));
42+ ftdi_set_termios(tty, port, &dummy);
43+ }
44
45 /* Start reading from the device */
46 result = usb_serial_generic_open(tty, port);
47--
481.7.7.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0042-USB-ftdi_sio-add-PID-for-TI-XDS100v2-BeagleBone-A3.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0042-USB-ftdi_sio-add-PID-for-TI-XDS100v2-BeagleBone-A3.patch
new file mode 100644
index 00000000..1ace416c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0042-USB-ftdi_sio-add-PID-for-TI-XDS100v2-BeagleBone-A3.patch
@@ -0,0 +1,50 @@
1From 27fca12db10bf68fb87c3b669be952f88594376c Mon Sep 17 00:00:00 2001
2From: Peter Korsgaard <jacmet@sunsite.dk>
3Date: Wed, 18 Jan 2012 23:43:45 +0100
4Subject: [PATCH 42/90] USB: ftdi_sio: add PID for TI XDS100v2 / BeagleBone A3
5
6commit 55f13aeae0346f0c89bfface91ad9a97653dc433 upstream.
7
8Port A for JTAG, port B for serial.
9
10Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
11Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12---
13 drivers/usb/serial/ftdi_sio.c | 2 ++
14 drivers/usb/serial/ftdi_sio_ids.h | 7 +++++++
15 2 files changed, 9 insertions(+), 0 deletions(-)
16
17diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
18index 6a40b41..952570f 100644
19--- a/drivers/usb/serial/ftdi_sio.c
20+++ b/drivers/usb/serial/ftdi_sio.c
21@@ -805,6 +805,8 @@ static struct usb_device_id id_table_combined [] = {
22 { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
23 { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
24 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
25+ { USB_DEVICE(FTDI_VID, TI_XDS100V2_PID),
26+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
27 { USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) },
28 { USB_DEVICE(FTDI_VID, HAMEG_HO720_PID) },
29 { USB_DEVICE(FTDI_VID, HAMEG_HO730_PID) },
30diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
31index 055b64e..b67bee2 100644
32--- a/drivers/usb/serial/ftdi_sio_ids.h
33+++ b/drivers/usb/serial/ftdi_sio_ids.h
34@@ -39,6 +39,13 @@
35 /* www.candapter.com Ewert Energy Systems CANdapter device */
36 #define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
37
38+/*
39+ * Texas Instruments XDS100v2 JTAG / BeagleBone A3
40+ * http://processors.wiki.ti.com/index.php/XDS100
41+ * http://beagleboard.org/bone
42+ */
43+#define TI_XDS100V2_PID 0xa6d0
44+
45 #define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */
46
47 /* US Interface Navigator (http://www.usinterface.com/) */
48--
491.7.7.4
50
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0043-USB-serial-ftdi-additional-IDs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0043-USB-serial-ftdi-additional-IDs.patch
new file mode 100644
index 00000000..6986c723
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0043-USB-serial-ftdi-additional-IDs.patch
@@ -0,0 +1,49 @@
1From 49b8a8464f7e327e044623da5ba2aa6aaa43b77c Mon Sep 17 00:00:00 2001
2From: Peter Naulls <peter@chocky.org>
3Date: Tue, 17 Jan 2012 18:27:09 -0800
4Subject: [PATCH 43/90] USB: serial: ftdi additional IDs
5
6commit fc216ec363f4d174932df90bbf35c77d0540e561 upstream.
7
8I tested this against 2.6.39 in the Ubuntu kernel, however I see the IDs
9are not in latest 3.2 git.
10
11This adds IDs for the FTDI controller in the Rainforest Automation
12Zigbee dongle.
13
14Signed-off-by: Peter Naulls <peter@chocky.org>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/usb/serial/ftdi_sio.c | 1 +
18 drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
19 2 files changed, 7 insertions(+), 0 deletions(-)
20
21diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
22index 952570f..abd5bd7 100644
23--- a/drivers/usb/serial/ftdi_sio.c
24+++ b/drivers/usb/serial/ftdi_sio.c
25@@ -843,6 +843,7 @@ static struct usb_device_id id_table_combined [] = {
26 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
27 { USB_DEVICE(ST_VID, ST_STMCLT1030_PID),
28 .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk },
29+ { USB_DEVICE(FTDI_VID, FTDI_RF_R106) },
30 { }, /* Optional parameter entry */
31 { } /* Terminating entry */
32 };
33diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
34index b67bee2..79c5967 100644
35--- a/drivers/usb/serial/ftdi_sio_ids.h
36+++ b/drivers/usb/serial/ftdi_sio_ids.h
37@@ -1175,3 +1175,9 @@
38 */
39 /* TagTracer MIFARE*/
40 #define FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID 0xF7C0
41+
42+/*
43+ * Rainforest Automation
44+ */
45+/* ZigBee controller */
46+#define FTDI_RF_R106 0x8A28
47--
481.7.7.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0044-USB-ftdi_sio-Add-more-identifiers.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0044-USB-ftdi_sio-Add-more-identifiers.patch
new file mode 100644
index 00000000..a856f0c5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0044-USB-ftdi_sio-Add-more-identifiers.patch
@@ -0,0 +1,48 @@
1From cea8765145bdf3a814070e52c7f348a5e69c76ce Mon Sep 17 00:00:00 2001
2From: Alan Cox <alan@linux.intel.com>
3Date: Thu, 26 Jan 2012 17:41:34 +0000
4Subject: [PATCH 44/90] USB: ftdi_sio: Add more identifiers
5
6commit 2353f806c97020d4c7709f15eebb49b591f7306d upstream.
7
80x04d8, 0x000a: Hornby Elite
9
10Signed-off-by: Alan Cox <alan@linux.intel.com>
11Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12---
13 drivers/usb/serial/ftdi_sio.c | 1 +
14 drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
15 2 files changed, 7 insertions(+), 0 deletions(-)
16
17diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
18index abd5bd7..058b92c 100644
19--- a/drivers/usb/serial/ftdi_sio.c
20+++ b/drivers/usb/serial/ftdi_sio.c
21@@ -797,6 +797,7 @@ static struct usb_device_id id_table_combined [] = {
22 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
23 { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID),
24 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
25+ { USB_DEVICE(HORNBY_VID, HORNBY_ELITE_PID) },
26 { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) },
27 { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID),
28 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
29diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
30index 79c5967..76d4f31 100644
31--- a/drivers/usb/serial/ftdi_sio_ids.h
32+++ b/drivers/usb/serial/ftdi_sio_ids.h
33@@ -532,6 +532,12 @@
34 #define ADI_GNICEPLUS_PID 0xF001
35
36 /*
37+ * Hornby Elite
38+ */
39+#define HORNBY_VID 0x04D8
40+#define HORNBY_ELITE_PID 0x000A
41+
42+/*
43 * RATOC REX-USB60F
44 */
45 #define RATOC_VENDOR_ID 0x0584
46--
471.7.7.4
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0045-USB-cdc-wdm-updating-desc-length-must-be-protected-b.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0045-USB-cdc-wdm-updating-desc-length-must-be-protected-b.patch
new file mode 100644
index 00000000..a090a1c4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0045-USB-cdc-wdm-updating-desc-length-must-be-protected-b.patch
@@ -0,0 +1,37 @@
1From 54e1d6f4d4781af0b70c3e36d5c6611b5c3d8272 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Mon, 16 Jan 2012 12:41:47 +0100
4Subject: [PATCH 45/90] USB: cdc-wdm: updating desc->length must be protected
5 by spin_lock
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit c428b70c1e115c5649707a602742e34130d19428 upstream.
11
12wdm_in_callback() will also touch this field, so we cannot change it without locking
13
14Signed-off-by: Bjørn Mork <bjorn@mork.no>
15Acked-by: Oliver Neukum <oneukum@suse.de>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/usb/class/cdc-wdm.c | 2 ++
19 1 files changed, 2 insertions(+), 0 deletions(-)
20
21diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
22index efe6849..7e5e822 100644
23--- a/drivers/usb/class/cdc-wdm.c
24+++ b/drivers/usb/class/cdc-wdm.c
25@@ -467,7 +467,9 @@ retry:
26 for (i = 0; i < desc->length - cntr; i++)
27 desc->ubuf[i] = desc->ubuf[i + cntr];
28
29+ spin_lock_irq(&desc->iuspin);
30 desc->length -= cntr;
31+ spin_unlock_irq(&desc->iuspin);
32 /* in case we had outstanding data */
33 if (!desc->length)
34 clear_bit(WDM_READ, &desc->flags);
35--
361.7.7.4
37
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0046-USB-cdc-wdm-use-two-mutexes-to-allow-simultaneous-re.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0046-USB-cdc-wdm-use-two-mutexes-to-allow-simultaneous-re.patch
new file mode 100644
index 00000000..544450ef
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0046-USB-cdc-wdm-use-two-mutexes-to-allow-simultaneous-re.patch
@@ -0,0 +1,178 @@
1From 9d6f338f1fe382275fbd4fee94c0d5a55ed601de Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Mon, 16 Jan 2012 12:41:48 +0100
4Subject: [PATCH 46/90] USB: cdc-wdm: use two mutexes to allow simultaneous
5 read and write
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit e8537bd2c4f325a4796da33564ddcef9489b7feb upstream.
11
12using a separate read and write mutex for locking is sufficient to make the
13driver accept simultaneous read and write. This improves useability a lot.
14
15Signed-off-by: Bjørn Mork <bjorn@mork.no>
16Cc: Oliver Neukum <oneukum@suse.de>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 drivers/usb/class/cdc-wdm.c | 49 +++++++++++++++++++++++++++---------------
20 1 files changed, 31 insertions(+), 18 deletions(-)
21
22diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
23index 7e5e822..4a29a80 100644
24--- a/drivers/usb/class/cdc-wdm.c
25+++ b/drivers/usb/class/cdc-wdm.c
26@@ -88,7 +88,8 @@ struct wdm_device {
27 int count;
28 dma_addr_t shandle;
29 dma_addr_t ihandle;
30- struct mutex lock;
31+ struct mutex wlock;
32+ struct mutex rlock;
33 wait_queue_head_t wait;
34 struct work_struct rxwork;
35 int werr;
36@@ -323,7 +324,7 @@ static ssize_t wdm_write
37 }
38
39 /* concurrent writes and disconnect */
40- r = mutex_lock_interruptible(&desc->lock);
41+ r = mutex_lock_interruptible(&desc->wlock);
42 rv = -ERESTARTSYS;
43 if (r) {
44 kfree(buf);
45@@ -386,7 +387,7 @@ static ssize_t wdm_write
46 out:
47 usb_autopm_put_interface(desc->intf);
48 outnp:
49- mutex_unlock(&desc->lock);
50+ mutex_unlock(&desc->wlock);
51 outnl:
52 return rv < 0 ? rv : count;
53 }
54@@ -399,7 +400,7 @@ static ssize_t wdm_read
55 struct wdm_device *desc = file->private_data;
56
57
58- rv = mutex_lock_interruptible(&desc->lock); /*concurrent reads */
59+ rv = mutex_lock_interruptible(&desc->rlock); /*concurrent reads */
60 if (rv < 0)
61 return -ERESTARTSYS;
62
63@@ -476,7 +477,7 @@ retry:
64 rv = cntr;
65
66 err:
67- mutex_unlock(&desc->lock);
68+ mutex_unlock(&desc->rlock);
69 return rv;
70 }
71
72@@ -542,7 +543,8 @@ static int wdm_open(struct inode *inode, struct file *file)
73 }
74 intf->needs_remote_wakeup = 1;
75
76- mutex_lock(&desc->lock);
77+ /* using write lock to protect desc->count */
78+ mutex_lock(&desc->wlock);
79 if (!desc->count++) {
80 desc->werr = 0;
81 desc->rerr = 0;
82@@ -555,7 +557,7 @@ static int wdm_open(struct inode *inode, struct file *file)
83 } else {
84 rv = 0;
85 }
86- mutex_unlock(&desc->lock);
87+ mutex_unlock(&desc->wlock);
88 usb_autopm_put_interface(desc->intf);
89 out:
90 mutex_unlock(&wdm_mutex);
91@@ -567,9 +569,11 @@ static int wdm_release(struct inode *inode, struct file *file)
92 struct wdm_device *desc = file->private_data;
93
94 mutex_lock(&wdm_mutex);
95- mutex_lock(&desc->lock);
96+
97+ /* using write lock to protect desc->count */
98+ mutex_lock(&desc->wlock);
99 desc->count--;
100- mutex_unlock(&desc->lock);
101+ mutex_unlock(&desc->wlock);
102
103 if (!desc->count) {
104 dev_dbg(&desc->intf->dev, "wdm_release: cleanup");
105@@ -667,7 +671,8 @@ next_desc:
106 desc = kzalloc(sizeof(struct wdm_device), GFP_KERNEL);
107 if (!desc)
108 goto out;
109- mutex_init(&desc->lock);
110+ mutex_init(&desc->rlock);
111+ mutex_init(&desc->wlock);
112 spin_lock_init(&desc->iuspin);
113 init_waitqueue_head(&desc->wait);
114 desc->wMaxCommand = maxcom;
115@@ -781,10 +786,12 @@ static void wdm_disconnect(struct usb_interface *intf)
116 /* to terminate pending flushes */
117 clear_bit(WDM_IN_USE, &desc->flags);
118 spin_unlock_irqrestore(&desc->iuspin, flags);
119- mutex_lock(&desc->lock);
120+ mutex_lock(&desc->rlock);
121+ mutex_lock(&desc->wlock);
122 kill_urbs(desc);
123 cancel_work_sync(&desc->rxwork);
124- mutex_unlock(&desc->lock);
125+ mutex_unlock(&desc->wlock);
126+ mutex_unlock(&desc->rlock);
127 wake_up_all(&desc->wait);
128 if (!desc->count)
129 cleanup(desc);
130@@ -800,8 +807,10 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
131 dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor);
132
133 /* if this is an autosuspend the caller does the locking */
134- if (!PMSG_IS_AUTO(message))
135- mutex_lock(&desc->lock);
136+ if (!PMSG_IS_AUTO(message)) {
137+ mutex_lock(&desc->rlock);
138+ mutex_lock(&desc->wlock);
139+ }
140 spin_lock_irq(&desc->iuspin);
141
142 if (PMSG_IS_AUTO(message) &&
143@@ -817,8 +826,10 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
144 kill_urbs(desc);
145 cancel_work_sync(&desc->rxwork);
146 }
147- if (!PMSG_IS_AUTO(message))
148- mutex_unlock(&desc->lock);
149+ if (!PMSG_IS_AUTO(message)) {
150+ mutex_unlock(&desc->wlock);
151+ mutex_unlock(&desc->rlock);
152+ }
153
154 return rv;
155 }
156@@ -856,7 +867,8 @@ static int wdm_pre_reset(struct usb_interface *intf)
157 {
158 struct wdm_device *desc = usb_get_intfdata(intf);
159
160- mutex_lock(&desc->lock);
161+ mutex_lock(&desc->rlock);
162+ mutex_lock(&desc->wlock);
163 kill_urbs(desc);
164
165 /*
166@@ -878,7 +890,8 @@ static int wdm_post_reset(struct usb_interface *intf)
167 int rv;
168
169 rv = recover_from_urb_loss(desc);
170- mutex_unlock(&desc->lock);
171+ mutex_unlock(&desc->wlock);
172+ mutex_unlock(&desc->rlock);
173 return 0;
174 }
175
176--
1771.7.7.4
178
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0047-qcaux-add-more-Pantech-UML190-and-UML290-ports.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0047-qcaux-add-more-Pantech-UML190-and-UML290-ports.patch
new file mode 100644
index 00000000..19b4c3e5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0047-qcaux-add-more-Pantech-UML190-and-UML290-ports.patch
@@ -0,0 +1,43 @@
1From 06053e0177cddb8ac7d4539e69012ef479089126 Mon Sep 17 00:00:00 2001
2From: Dan Williams <dcbw@redhat.com>
3Date: Tue, 24 Jan 2012 17:16:54 -0600
4Subject: [PATCH 47/90] qcaux: add more Pantech UML190 and UML290 ports
5
6commit 074cc73506f529f39fef32ad1c9e1d4cdd8acf6c upstream.
7
8More ports we now know how to talk to.
9
10Signed-off-by: Dan Williams <dcbw@redhat.com>
11Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12---
13 drivers/usb/serial/qcaux.c | 7 ++++++-
14 1 files changed, 6 insertions(+), 1 deletions(-)
15
16diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c
17index 30b73e6..a348198 100644
18--- a/drivers/usb/serial/qcaux.c
19+++ b/drivers/usb/serial/qcaux.c
20@@ -36,6 +36,7 @@
21 #define UTSTARCOM_PRODUCT_UM175_V1 0x3712
22 #define UTSTARCOM_PRODUCT_UM175_V2 0x3714
23 #define UTSTARCOM_PRODUCT_UM175_ALLTEL 0x3715
24+#define PANTECH_PRODUCT_UML190_VZW 0x3716
25 #define PANTECH_PRODUCT_UML290_VZW 0x3718
26
27 /* CMOTECH devices */
28@@ -67,7 +68,11 @@ static struct usb_device_id id_table[] = {
29 { USB_DEVICE_AND_INTERFACE_INFO(LG_VENDOR_ID, LG_PRODUCT_VX4400_6000, 0xff, 0xff, 0x00) },
30 { USB_DEVICE_AND_INTERFACE_INFO(SANYO_VENDOR_ID, SANYO_PRODUCT_KATANA_LX, 0xff, 0xff, 0x00) },
31 { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_U520, 0xff, 0x00, 0x00) },
32- { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xff, 0xff) },
33+ { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML190_VZW, 0xff, 0xff, 0xff) },
34+ { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML190_VZW, 0xff, 0xfe, 0xff) },
35+ { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xfd, 0xff) }, /* NMEA */
36+ { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xfe, 0xff) }, /* WMC */
37+ { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xff, 0xff) }, /* DIAG */
38 { },
39 };
40 MODULE_DEVICE_TABLE(usb, id_table);
41--
421.7.7.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0048-usb-dwc3-ep0-tidy-up-Pending-Request-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0048-usb-dwc3-ep0-tidy-up-Pending-Request-handling.patch
new file mode 100644
index 00000000..0d6a5e12
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0048-usb-dwc3-ep0-tidy-up-Pending-Request-handling.patch
@@ -0,0 +1,54 @@
1From cfb67a1e191fa6c59b9d29b5d78fe4bb27a08c5c Mon Sep 17 00:00:00 2001
2From: Felipe Balbi <balbi@ti.com>
3Date: Thu, 29 Dec 2011 06:32:29 +0200
4Subject: [PATCH 48/90] usb: dwc3: ep0: tidy up Pending Request handling
5
6commit 68d8a781575d7be490f97eb2c403fb13b083da6a upstream.
7
8The way our code was written, we should never have
9a DWC3_EP_PENDING_REQUEST flag set out of a Data Phase
10and the code in __dwc3_gadget_ep0_queue() did not
11reflect that situation properly.
12
13Tidy up that case to avoid any possible mistakes
14when starting requests for IRQs which are long
15gone.
16
17Signed-off-by: Felipe Balbi <balbi@ti.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/usb/dwc3/ep0.c | 14 ++++----------
21 1 files changed, 4 insertions(+), 10 deletions(-)
22
23diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
24index 69a4e43..27bd50a 100644
25--- a/drivers/usb/dwc3/ep0.c
26+++ b/drivers/usb/dwc3/ep0.c
27@@ -149,20 +149,14 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
28
29 direction = !!(dep->flags & DWC3_EP0_DIR_IN);
30
31- if (dwc->ep0state == EP0_STATUS_PHASE) {
32- type = dwc->three_stage_setup
33- ? DWC3_TRBCTL_CONTROL_STATUS3
34- : DWC3_TRBCTL_CONTROL_STATUS2;
35- } else if (dwc->ep0state == EP0_DATA_PHASE) {
36- type = DWC3_TRBCTL_CONTROL_DATA;
37- } else {
38- /* should never happen */
39- WARN_ON(1);
40+ if (dwc->ep0state != EP0_DATA_PHASE) {
41+ dev_WARN(dwc->dev, "Unexpected pending request\n");
42 return 0;
43 }
44
45 ret = dwc3_ep0_start_trans(dwc, direction,
46- req->request.dma, req->request.length, type);
47+ req->request.dma, req->request.length,
48+ DWC3_TRBCTL_CONTROL_DATA);
49 dep->flags &= ~(DWC3_EP_PENDING_REQUEST |
50 DWC3_EP0_DIR_IN);
51 }
52--
531.7.7.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0049-usb-io_ti-Make-edge_remove_sysfs_attrs-the-port_remo.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0049-usb-io_ti-Make-edge_remove_sysfs_attrs-the-port_remo.patch
new file mode 100644
index 00000000..e8508bab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0049-usb-io_ti-Make-edge_remove_sysfs_attrs-the-port_remo.patch
@@ -0,0 +1,60 @@
1From 07f90680975c8ca1d35f7f30f9aee6b832578469 Mon Sep 17 00:00:00 2001
2From: "Eric W. Biederman" <ebiederm@xmission.com>
3Date: Fri, 13 Jan 2012 21:32:06 -0800
4Subject: [PATCH 49/90] usb: io_ti: Make edge_remove_sysfs_attrs the
5 port_remove method.
6
7commit 6d443d8499e4e59ffb949759cdded32730f8d2f6 upstream.
8
9Calling edge_remove_sysfs_attrs from edge_disconnect is too late
10as the device has already been removed from sysfs.
11
12Do the simple and obvious thing and make edge_remove_sysfs_attrs
13the port_remove method.
14
15Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
16Reported-by: Wolfgang Frisch <wfpub@roembden.net>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18---
19 drivers/usb/serial/io_ti.c | 10 ++--------
20 1 files changed, 2 insertions(+), 8 deletions(-)
21
22diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
23index 0aac00a..8a90d58 100644
24--- a/drivers/usb/serial/io_ti.c
25+++ b/drivers/usb/serial/io_ti.c
26@@ -2677,15 +2677,7 @@ cleanup:
27
28 static void edge_disconnect(struct usb_serial *serial)
29 {
30- int i;
31- struct edgeport_port *edge_port;
32-
33 dbg("%s", __func__);
34-
35- for (i = 0; i < serial->num_ports; ++i) {
36- edge_port = usb_get_serial_port_data(serial->port[i]);
37- edge_remove_sysfs_attrs(edge_port->port);
38- }
39 }
40
41 static void edge_release(struct usb_serial *serial)
42@@ -2764,6 +2756,7 @@ static struct usb_serial_driver edgeport_1port_device = {
43 .disconnect = edge_disconnect,
44 .release = edge_release,
45 .port_probe = edge_create_sysfs_attrs,
46+ .port_remove = edge_remove_sysfs_attrs,
47 .ioctl = edge_ioctl,
48 .set_termios = edge_set_termios,
49 .tiocmget = edge_tiocmget,
50@@ -2795,6 +2788,7 @@ static struct usb_serial_driver edgeport_2port_device = {
51 .disconnect = edge_disconnect,
52 .release = edge_release,
53 .port_probe = edge_create_sysfs_attrs,
54+ .port_remove = edge_remove_sysfs_attrs,
55 .ioctl = edge_ioctl,
56 .set_termios = edge_set_termios,
57 .tiocmget = edge_tiocmget,
58--
591.7.7.4
60
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0050-TTY-fix-UV-serial-console-regression.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0050-TTY-fix-UV-serial-console-regression.patch
new file mode 100644
index 00000000..54b2abc2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0050-TTY-fix-UV-serial-console-regression.patch
@@ -0,0 +1,72 @@
1From 40e6ddc8744318ca278e19d1de4772b590fcc38c Mon Sep 17 00:00:00 2001
2From: Jiri Slaby <jslaby@suse.cz>
3Date: Thu, 12 Jan 2012 22:55:15 +0100
4Subject: [PATCH 50/90] TTY: fix UV serial console regression
5
6commit 0eee50af5b13e00b3fb7a5fe8480419a71b8235d upstream.
7
8Commit 74c2107759d (serial: Use block_til_ready helper) and its fixup
93f582b8c110 (serial: fix termios settings in open) introduced a
10regression on UV systems. The serial eventually freezes while being
11used. It's completely unpredictable and sometimes needs a heap of
12traffic to happen first.
13
14To reproduce this, yast installation was used as it turned out to be
15pretty reliable in reproducing. Especially during installation process
16where one doesn't have an SSH daemon running. And no monitor as the HW
17is completely headless. So this was fun to find. Given the machine
18doesn't boot on vanilla before 2.6.36 final. (And the commits above
19are older.)
20
21Unless there is some bad race in the code, the hardware seems to be
22pretty broken. Otherwise pure MSR read should not cause such a bug,
23or?
24
25So to prevent the bug, revert to the old behavior. I.e. read modem
26status only if we really have to -- for non-CLOCAL set serials.
27Non-CLOCAL works on this hardware OK, I tried. See? I don't.
28
29And document that shit.
30
31Signed-off-by: Jiri Slaby <jslaby@suse.cz>
32References: https://lkml.org/lkml/2011/12/6/573
33References: https://bugzilla.novell.com/show_bug.cgi?id=718518
34Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35---
36 drivers/tty/tty_port.c | 12 +++++++-----
37 1 files changed, 7 insertions(+), 5 deletions(-)
38
39diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
40index ef9dd62..bf6e238 100644
41--- a/drivers/tty/tty_port.c
42+++ b/drivers/tty/tty_port.c
43@@ -227,7 +227,6 @@ int tty_port_block_til_ready(struct tty_port *port,
44 int do_clocal = 0, retval;
45 unsigned long flags;
46 DEFINE_WAIT(wait);
47- int cd;
48
49 /* block if port is in the process of being closed */
50 if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
51@@ -284,11 +283,14 @@ int tty_port_block_til_ready(struct tty_port *port,
52 retval = -ERESTARTSYS;
53 break;
54 }
55- /* Probe the carrier. For devices with no carrier detect this
56- will always return true */
57- cd = tty_port_carrier_raised(port);
58+ /*
59+ * Probe the carrier. For devices with no carrier detect
60+ * tty_port_carrier_raised will always return true.
61+ * Never ask drivers if CLOCAL is set, this causes troubles
62+ * on some hardware.
63+ */
64 if (!(port->flags & ASYNC_CLOSING) &&
65- (do_clocal || cd))
66+ (do_clocal || tty_port_carrier_raised(port)))
67 break;
68 if (signal_pending(current)) {
69 retval = -ERESTARTSYS;
70--
711.7.7.4
72
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0051-serial-amba-pl011-lock-console-writes-against-interr.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0051-serial-amba-pl011-lock-console-writes-against-interr.patch
new file mode 100644
index 00000000..c1a5eb25
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0051-serial-amba-pl011-lock-console-writes-against-interr.patch
@@ -0,0 +1,67 @@
1From de3853e197be72552027661297ae663e2eb66ef1 Mon Sep 17 00:00:00 2001
2From: Rabin Vincent <rabin.vincent@stericsson.com>
3Date: Tue, 17 Jan 2012 11:52:28 +0100
4Subject: [PATCH 51/90] serial: amba-pl011: lock console writes against
5 interrupts
6
7commit ef605fdb33883d687cff5ba75095a91b313b4966 upstream.
8
9Protect against pl011_console_write() and the interrupt for
10the console UART running concurrently on different CPUs.
11
12Otherwise the console_write could spin for a long time
13waiting for the UART to become not busy, while the other
14CPU continuously services UART interrupts and keeps the
15UART busy.
16
17The checks for sysrq and oops_in_progress are taken
18from 8250.c.
19
20Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
21Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
22Reviewed-by: Bibek Basu <bibek.basu@stericsson.com>
23Reviewed-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
24Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 drivers/tty/serial/amba-pl011.c | 14 ++++++++++++++
28 1 files changed, 14 insertions(+), 0 deletions(-)
29
30diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
31index 00233af..8e00926 100644
32--- a/drivers/tty/serial/amba-pl011.c
33+++ b/drivers/tty/serial/amba-pl011.c
34@@ -1740,9 +1740,19 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
35 {
36 struct uart_amba_port *uap = amba_ports[co->index];
37 unsigned int status, old_cr, new_cr;
38+ unsigned long flags;
39+ int locked = 1;
40
41 clk_enable(uap->clk);
42
43+ local_irq_save(flags);
44+ if (uap->port.sysrq)
45+ locked = 0;
46+ else if (oops_in_progress)
47+ locked = spin_trylock(&uap->port.lock);
48+ else
49+ spin_lock(&uap->port.lock);
50+
51 /*
52 * First save the CR then disable the interrupts
53 */
54@@ -1762,6 +1772,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
55 } while (status & UART01x_FR_BUSY);
56 writew(old_cr, uap->port.membase + UART011_CR);
57
58+ if (locked)
59+ spin_unlock(&uap->port.lock);
60+ local_irq_restore(flags);
61+
62 clk_disable(uap->clk);
63 }
64
65--
661.7.7.4
67
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0052-jsm-Fixed-EEH-recovery-error.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0052-jsm-Fixed-EEH-recovery-error.patch
new file mode 100644
index 00000000..4836cc1b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0052-jsm-Fixed-EEH-recovery-error.patch
@@ -0,0 +1,53 @@
1From a4bb82f827dd715b666d2cdf9cae6643da638974 Mon Sep 17 00:00:00 2001
2From: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
3Date: Mon, 9 Jan 2012 10:58:06 -0200
4Subject: [PATCH 52/90] jsm: Fixed EEH recovery error
5
6commit 26aa38cafae0dbef3b2fe75ea487c83313c36d45 upstream.
7
8There was an error on the jsm driver that would cause it to be unable to
9recover after a second error is detected.
10
11At the first error, the device recovers properly:
12
13[72521.485691] EEH: Detected PCI bus error on device 0003:02:00.0
14[72521.485695] EEH: This PCI device has failed 1 times in the last hour:
15...
16[72532.035693] ttyn3 at MMIO 0x0 (irq = 49) is a jsm
17[72532.105689] jsm: Port 3 added
18
19However, at the second error, it cascades until EEH disables the device:
20
21[72631.229549] Call Trace:
22...
23[72641.725687] jsm: Port 3 added
24[72641.725695] EEH: Detected PCI bus error on device 0003:02:00.0
25[72641.725698] EEH: This PCI device has failed 3 times in the last hour:
26
27It was caused because the PCI state was not being saved after the first
28restore. Therefore, at the second recovery the PCI state would not be
29restored.
30
31Signed-off-by: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
32Signed-off-by: Breno Leitao <brenohl@br.ibm.com>
33Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
34Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35---
36 drivers/tty/serial/jsm/jsm_driver.c | 1 +
37 1 files changed, 1 insertions(+), 0 deletions(-)
38
39diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c
40index 7c867a0..7545fe1 100644
41--- a/drivers/tty/serial/jsm/jsm_driver.c
42+++ b/drivers/tty/serial/jsm/jsm_driver.c
43@@ -251,6 +251,7 @@ static void jsm_io_resume(struct pci_dev *pdev)
44 struct jsm_board *brd = pci_get_drvdata(pdev);
45
46 pci_restore_state(pdev);
47+ pci_save_state(pdev);
48
49 jsm_uart_port_init(brd);
50 }
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0053-iwlwifi-fix-PCI-E-transport-inta-race.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0053-iwlwifi-fix-PCI-E-transport-inta-race.patch
new file mode 100644
index 00000000..b272ea68
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0053-iwlwifi-fix-PCI-E-transport-inta-race.patch
@@ -0,0 +1,53 @@
1From 0d33ba8639e38e3d78f9dbeb8fac20ea28684cef Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Thu, 19 Jan 2012 08:20:57 -0800
4Subject: [PATCH 53/90] iwlwifi: fix PCI-E transport "inta" race
5
6commit b49ba04a3a0382e7314d990707c21094c410425a upstream.
7
8When an interrupt comes in, we read the reason
9bits and collect them into "trans_pcie->inta".
10This happens with the spinlock held. However,
11there's a bug resetting this variable -- that
12happens after the spinlock has been released.
13This means that it is possible for interrupts
14to be missed if the reset happens after some
15other interrupt reasons were already added to
16the variable.
17
18I found this by code inspection, looking for a
19reason that we sometimes see random commands
20time out. It seems possible that this causes
21such behaviour, but I can't say for sure right
22now since it happens extremely infrequently on
23my test systems.
24
25Signed-off-by: Johannes Berg <johannes.berg@intel.com>
26Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
27Signed-off-by: John W. Linville <linville@tuxdriver.com>
28Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29---
30 drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | 4 ++--
31 1 files changed, 2 insertions(+), 2 deletions(-)
32
33diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
34index 1920237..1daf01e 100644
35--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
36+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
37@@ -957,11 +957,11 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
38 }
39 #endif
40
41- spin_unlock_irqrestore(&trans->shrd->lock, flags);
42-
43 /* saved interrupt in inta variable now we can reset trans_pcie->inta */
44 trans_pcie->inta = 0;
45
46+ spin_unlock_irqrestore(&trans->shrd->lock, flags);
47+
48 /* Now service all interrupt bits discovered above. */
49 if (inta & CSR_INT_BIT_HW_ERR) {
50 IWL_ERR(trans, "Hardware error detected. Restarting.\n");
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0054-vmwgfx-Fix-assignment-in-vmw_framebuffer_create_hand.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0054-vmwgfx-Fix-assignment-in-vmw_framebuffer_create_hand.patch
new file mode 100644
index 00000000..a502bc68
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0054-vmwgfx-Fix-assignment-in-vmw_framebuffer_create_hand.patch
@@ -0,0 +1,34 @@
1From 8f71848d8e5ac400a72eeade1898ecbd99145261 Mon Sep 17 00:00:00 2001
2From: Ryan Mallon <rmallon@gmail.com>
3Date: Sat, 28 Jan 2012 08:51:40 +1100
4Subject: [PATCH 54/90] vmwgfx: Fix assignment in
5 vmw_framebuffer_create_handle
6
7commit bf9c05d5b6d19b3e4c9fe21047694e94f48db89b upstream.
8
9The assignment of handle in vmw_framebuffer_create_handle doesn't actually do anything useful and is incorrectly assigning an integer value to a pointer argument. It appears that this is a typo and should be dereferencing handle rather than assigning to it directly. This fixes a bug where an undefined handle value is potentially returned to user-space.
10
11Signed-off-by: Ryan Mallon <rmallon@gmail.com>
12Reviewed-by: Jakob Bornecrantz<jakob@vmware.com>
13Signed-off-by: Dave Airlie <airlied@redhat.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +-
17 1 files changed, 1 insertions(+), 1 deletions(-)
18
19diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
20index f94b33a..7c88f1f 100644
21--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
22+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
23@@ -378,7 +378,7 @@ int vmw_framebuffer_create_handle(struct drm_framebuffer *fb,
24 unsigned int *handle)
25 {
26 if (handle)
27- handle = 0;
28+ *handle = 0;
29
30 return 0;
31 }
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0055-USB-Realtek-cr-fix-autopm-scheduling-while-atomic.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0055-USB-Realtek-cr-fix-autopm-scheduling-while-atomic.patch
new file mode 100644
index 00000000..9bed68ec
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0055-USB-Realtek-cr-fix-autopm-scheduling-while-atomic.patch
@@ -0,0 +1,36 @@
1From 286cad08e0819522e35f30a9a55c8183d32b2b98 Mon Sep 17 00:00:00 2001
2From: Stanislaw Gruszka <sgruszka@redhat.com>
3Date: Thu, 26 Jan 2012 12:29:42 +0100
4Subject: [PATCH 55/90] USB: Realtek cr: fix autopm scheduling while atomic
5
6commit b3ef051db763b640d1ff724b616ffba940896b44 upstream.
7
8Resolves:
9https://bugzilla.redhat.com/show_bug.cgi?id=784345
10
11Reported-by: Francis Moreau <francis.moro@gmail.com>
12Reported-and-tested-by: Christian D <chrisudeussen@gmail.com>
13Reported-and-tested-by: Jimmy Dorff <jdorff@phy.duke.edu>
14Reported-and-tested-by: collura@ieee.org
15Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/usb/storage/realtek_cr.c | 2 +-
19 1 files changed, 1 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c
22index 0ce5f79..32c93d7 100644
23--- a/drivers/usb/storage/realtek_cr.c
24+++ b/drivers/usb/storage/realtek_cr.c
25@@ -791,7 +791,7 @@ static void rts51x_suspend_timer_fn(unsigned long data)
26 rts51x_set_stat(chip, RTS51X_STAT_SS);
27 /* ignore mass storage interface's children */
28 pm_suspend_ignore_children(&us->pusb_intf->dev, true);
29- usb_autopm_put_interface(us->pusb_intf);
30+ usb_autopm_put_interface_async(us->pusb_intf);
31 US_DEBUGP("%s: RTS51X_STAT_SS 01,"
32 "intf->pm_usage_cnt:%d, power.usage:%d\n",
33 __func__,
34--
351.7.7.4
36
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0056-USB-usbsevseg-fix-max-length.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0056-USB-usbsevseg-fix-max-length.patch
new file mode 100644
index 00000000..653b82e3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0056-USB-usbsevseg-fix-max-length.patch
@@ -0,0 +1,34 @@
1From 3fa24c74797bced963fb71a175b49db16cac7949 Mon Sep 17 00:00:00 2001
2From: Harrison Metzger <harrisonmetz@gmail.com>
3Date: Sun, 15 Jan 2012 08:43:24 -0600
4Subject: [PATCH 56/90] USB: usbsevseg: fix max length
5
6commit 1097ccebe630170080c41df0edcf88e0626e9c75 upstream.
7
8This changes the max length for the usb seven segment delcom device to 8
9from 6. Delcom has both 6 and 8 variants and having 8 works fine with
10devices which are only 6.
11
12Signed-off-by: Harrison Metzger <harrisonmetz@gmail.com>
13Signed-off-by: Stuart Pook <stuart@acm.org>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/usb/misc/usbsevseg.c | 2 +-
17 1 files changed, 1 insertions(+), 1 deletions(-)
18
19diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c
20index 417b8f2..59689fa 100644
21--- a/drivers/usb/misc/usbsevseg.c
22+++ b/drivers/usb/misc/usbsevseg.c
23@@ -24,7 +24,7 @@
24
25 #define VENDOR_ID 0x0fc5
26 #define PRODUCT_ID 0x1227
27-#define MAXLEN 6
28+#define MAXLEN 8
29
30 /* table of devices that work with this driver */
31 static const struct usb_device_id id_table[] = {
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0057-usb-gadget-langwell-don-t-call-gadget-s-disconnect.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0057-usb-gadget-langwell-don-t-call-gadget-s-disconnect.patch
new file mode 100644
index 00000000..00eb4ac8
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0057-usb-gadget-langwell-don-t-call-gadget-s-disconnect.patch
@@ -0,0 +1,94 @@
1From b19abe994096a9839b092cbf70a3948468d5fc70 Mon Sep 17 00:00:00 2001
2From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
3Date: Wed, 21 Dec 2011 10:19:40 +0200
4Subject: [PATCH 57/90] usb: gadget: langwell: don't call gadget's
5 disconnect()
6
7commit 37fd37108449d574da11aa9055c5c8afb39ff226 upstream.
8
9UDC core will call disconnect() and unbind() for us upon the gadget
10removal, so we should not do it ourselves. Otherwise, a composite
11gadget will explode, for example. Others might too.
12
13This was introduced during conversion to new style gadget in 2c7f0989
14(usb: gadget: langwell: convert to new style).
15
16Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
17Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
18Cc: linux-usb@vger.kernel.org
19Signed-off-by: Felipe Balbi <balbi@ti.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 drivers/usb/gadget/langwell_udc.c | 18 ++++++++----------
23 1 files changed, 8 insertions(+), 10 deletions(-)
24
25diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c
26index fa0fcc1..b0c5b6d 100644
27--- a/drivers/usb/gadget/langwell_udc.c
28+++ b/drivers/usb/gadget/langwell_udc.c
29@@ -1522,8 +1522,7 @@ static void langwell_udc_stop(struct langwell_udc *dev)
30
31
32 /* stop all USB activities */
33-static void stop_activity(struct langwell_udc *dev,
34- struct usb_gadget_driver *driver)
35+static void stop_activity(struct langwell_udc *dev)
36 {
37 struct langwell_ep *ep;
38 dev_dbg(&dev->pdev->dev, "---> %s()\n", __func__);
39@@ -1535,9 +1534,9 @@ static void stop_activity(struct langwell_udc *dev,
40 }
41
42 /* report disconnect; the driver is already quiesced */
43- if (driver) {
44+ if (dev->driver) {
45 spin_unlock(&dev->lock);
46- driver->disconnect(&dev->gadget);
47+ dev->driver->disconnect(&dev->gadget);
48 spin_lock(&dev->lock);
49 }
50
51@@ -1925,11 +1924,10 @@ static int langwell_stop(struct usb_gadget *g,
52
53 /* stop all usb activities */
54 dev->gadget.speed = USB_SPEED_UNKNOWN;
55- stop_activity(dev, driver);
56- spin_unlock_irqrestore(&dev->lock, flags);
57-
58 dev->gadget.dev.driver = NULL;
59 dev->driver = NULL;
60+ stop_activity(dev);
61+ spin_unlock_irqrestore(&dev->lock, flags);
62
63 device_remove_file(&dev->pdev->dev, &dev_attr_function);
64
65@@ -2733,7 +2731,7 @@ static void handle_usb_reset(struct langwell_udc *dev)
66 dev->bus_reset = 1;
67
68 /* reset all the queues, stop all USB activities */
69- stop_activity(dev, dev->driver);
70+ stop_activity(dev);
71 dev->usb_state = USB_STATE_DEFAULT;
72 } else {
73 dev_vdbg(&dev->pdev->dev, "device controller reset\n");
74@@ -2741,7 +2739,7 @@ static void handle_usb_reset(struct langwell_udc *dev)
75 langwell_udc_reset(dev);
76
77 /* reset all the queues, stop all USB activities */
78- stop_activity(dev, dev->driver);
79+ stop_activity(dev);
80
81 /* reset ep0 dQH and endptctrl */
82 ep0_reset(dev);
83@@ -3367,7 +3365,7 @@ static int langwell_udc_suspend(struct pci_dev *pdev, pm_message_t state)
84
85 spin_lock_irq(&dev->lock);
86 /* stop all usb activities */
87- stop_activity(dev, dev->driver);
88+ stop_activity(dev);
89 spin_unlock_irq(&dev->lock);
90
91 /* free dTD dma_pool and dQH */
92--
931.7.7.4
94
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0058-usb-gadget-storage-endian-fix.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0058-usb-gadget-storage-endian-fix.patch
new file mode 100644
index 00000000..d3bda65a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0058-usb-gadget-storage-endian-fix.patch
@@ -0,0 +1,43 @@
1From 5e2120eb3e1016b52dbfdaf13b022617ba3252f4 Mon Sep 17 00:00:00 2001
2From: Andiry Xu <andiry.xu@amd.com>
3Date: Wed, 4 Jan 2012 15:18:27 +0800
4Subject: [PATCH 58/90] usb: gadget: storage: endian fix
5
6commit a85016390135d577c457876d0e905095600751de upstream.
7
8Fix some endian issues for storage gadgets.
9
10Signed-off-by: Andiry Xu <andiry.xu@amd.com>
11Signed-off-by: Felipe Balbi <balbi@ti.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 drivers/usb/gadget/storage_common.c | 6 +++---
15 1 files changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
18index c7f291a..85ea14e 100644
19--- a/drivers/usb/gadget/storage_common.c
20+++ b/drivers/usb/gadget/storage_common.c
21@@ -598,16 +598,16 @@ static __maybe_unused struct usb_ss_cap_descriptor fsg_ss_cap_desc = {
22 | USB_5GBPS_OPERATION),
23 .bFunctionalitySupport = USB_LOW_SPEED_OPERATION,
24 .bU1devExitLat = USB_DEFAULT_U1_DEV_EXIT_LAT,
25- .bU2DevExitLat = USB_DEFAULT_U2_DEV_EXIT_LAT,
26+ .bU2DevExitLat = cpu_to_le16(USB_DEFAULT_U2_DEV_EXIT_LAT),
27 };
28
29 static __maybe_unused struct usb_bos_descriptor fsg_bos_desc = {
30 .bLength = USB_DT_BOS_SIZE,
31 .bDescriptorType = USB_DT_BOS,
32
33- .wTotalLength = USB_DT_BOS_SIZE
34+ .wTotalLength = cpu_to_le16(USB_DT_BOS_SIZE
35 + USB_DT_USB_EXT_CAP_SIZE
36- + USB_DT_USB_SS_CAP_SIZE,
37+ + USB_DT_USB_SS_CAP_SIZE),
38
39 .bNumDeviceCaps = 2,
40 };
41--
421.7.7.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0059-drivers-usb-host-ehci-fsl.c-add-missing-iounmap.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0059-drivers-usb-host-ehci-fsl.c-add-missing-iounmap.patch
new file mode 100644
index 00000000..29650a29
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0059-drivers-usb-host-ehci-fsl.c-add-missing-iounmap.patch
@@ -0,0 +1,54 @@
1From 87dd7c175531bdc9938fa7948f75619962991a27 Mon Sep 17 00:00:00 2001
2From: Julia Lawall <Julia.Lawall@lip6.fr>
3Date: Thu, 12 Jan 2012 10:55:13 +0100
4Subject: [PATCH 59/90] drivers/usb/host/ehci-fsl.c: add missing iounmap
5
6commit 2492c6e6454ff3edb11e273b071a6ea80a199c71 upstream.
7
8Add missing iounmap in error handling code, in a case where the function
9already preforms iounmap on some other execution path.
10
11A simplified version of the semantic match that finds this problem is as
12follows: (http://coccinelle.lip6.fr/)
13
14// <smpl>
15@@
16expression e;
17statement S,S1;
18int ret;
19@@
20e = \(ioremap\|ioremap_nocache\)(...)
21... when != iounmap(e)
22if (<+...e...+>) S
23... when any
24 when != iounmap(e)
25*if (...)
26 { ... when != iounmap(e)
27 return ...; }
28... when any
29iounmap(e);
30// </smpl>
31
32Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
33Acked-by: Alan Stern <stern@rowland.harvard.edu>
34Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35---
36 drivers/usb/host/ehci-fsl.c | 2 +-
37 1 files changed, 1 insertions(+), 1 deletions(-)
38
39diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
40index e90344a..b556a72 100644
41--- a/drivers/usb/host/ehci-fsl.c
42+++ b/drivers/usb/host/ehci-fsl.c
43@@ -125,7 +125,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
44 */
45 if (pdata->init && pdata->init(pdev)) {
46 retval = -ENODEV;
47- goto err3;
48+ goto err4;
49 }
50
51 /* Enable USB controller, 83xx or 8536 */
52--
531.7.7.4
54
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0060-xhci-Fix-USB-3.0-device-restart-on-resume.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0060-xhci-Fix-USB-3.0-device-restart-on-resume.patch
new file mode 100644
index 00000000..7113e686
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0060-xhci-Fix-USB-3.0-device-restart-on-resume.patch
@@ -0,0 +1,51 @@
1From b4e67c5c309a96709491f7ac2f57d80999eba389 Mon Sep 17 00:00:00 2001
2From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
3Date: Mon, 14 Nov 2011 17:51:39 -0800
4Subject: [PATCH 60/90] xhci: Fix USB 3.0 device restart on resume.
5
6commit d0cd5d482b8a6dc92c6c69a5387baf72ea84f23a upstream.
7
8The xHCI hub port code gets passed a zero-based port number by the USB
9core. It then adds one to in order to find a device slot by port number
10and device speed by calling xhci_find_slot_id_by_port. That function
11clearly states it requires a one-based port number. The xHCI port
12status change event handler was using a zero-based port number that it
13got from find_faked_portnum_from_hw_portnum, not a one-based port
14number. This lead to the doorbells never being rung for a device after
15a resume, or worse, a different device with the same speed having its
16doorbell rung (which could lead to bad power management in the xHCI host
17controller).
18
19This patch should be backported to kernels as old as 2.6.39.
20
21Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
22Acked-by: Andiry Xu <andiry.xu@amd.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 drivers/usb/host/xhci-ring.c | 3 ++-
26 1 files changed, 2 insertions(+), 1 deletions(-)
27
28diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
29index d28c586..ee0b4d7 100644
30--- a/drivers/usb/host/xhci-ring.c
31+++ b/drivers/usb/host/xhci-ring.c
32@@ -1215,6 +1215,7 @@ static void handle_vendor_event(struct xhci_hcd *xhci,
33 *
34 * Returns a zero-based port number, which is suitable for indexing into each of
35 * the split roothubs' port arrays and bus state arrays.
36+ * Add one to it in order to call xhci_find_slot_id_by_port.
37 */
38 static unsigned int find_faked_portnum_from_hw_portnum(struct usb_hcd *hcd,
39 struct xhci_hcd *xhci, u32 port_id)
40@@ -1335,7 +1336,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
41 xhci_set_link_state(xhci, port_array, faked_port_index,
42 XDEV_U0);
43 slot_id = xhci_find_slot_id_by_port(hcd, xhci,
44- faked_port_index);
45+ faked_port_index + 1);
46 if (!slot_id) {
47 xhci_dbg(xhci, "slot_id is zero\n");
48 goto cleanup;
49--
501.7.7.4
51
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0061-xHCI-Cleanup-isoc-transfer-ring-when-TD-length-misma.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0061-xHCI-Cleanup-isoc-transfer-ring-when-TD-length-misma.patch
new file mode 100644
index 00000000..f906f079
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0061-xHCI-Cleanup-isoc-transfer-ring-when-TD-length-misma.patch
@@ -0,0 +1,40 @@
1From 910e3e93de89b8568e3bfb1c8c08c96f2be325f2 Mon Sep 17 00:00:00 2001
2From: Andiry Xu <andiry.xu@amd.com>
3Date: Wed, 18 Jan 2012 17:47:12 +0800
4Subject: [PATCH 61/90] xHCI: Cleanup isoc transfer ring when TD length
5 mismatch found
6
7commit cf840551a884360841bd3d3ce1ad0868ff0b759a upstream.
8
9When a TD length mismatch is found during isoc TRB enqueue, it directly
10returns -EINVAL. However, isoc transfer is partially enqueued at this time,
11and the ring should be cleared.
12
13This should be backported to kernels as old as 2.6.36, which contain the
14commit 522989a27c7badb608155b1f1dea3487ed431f74 "xhci: Fix failed
15enqueue in the middle of isoch TD."
16
17Signed-off-by: Andiry Xu <andiry.xu@amd.com>
18Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/usb/host/xhci-ring.c | 3 ++-
22 1 files changed, 2 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
25index ee0b4d7..ae92dc4 100644
26--- a/drivers/usb/host/xhci-ring.c
27+++ b/drivers/usb/host/xhci-ring.c
28@@ -3373,7 +3373,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
29 /* Check TD length */
30 if (running_total != td_len) {
31 xhci_err(xhci, "ISOC TD length unmatch\n");
32- return -EINVAL;
33+ ret = -EINVAL;
34+ goto cleanup;
35 }
36 }
37
38--
391.7.7.4
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0062-usb-musb-davinci-fix-build-breakage.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0062-usb-musb-davinci-fix-build-breakage.patch
new file mode 100644
index 00000000..e2e4d830
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0062-usb-musb-davinci-fix-build-breakage.patch
@@ -0,0 +1,41 @@
1From 5dc5545c987453cafa4b441522cf61bbb89e80e4 Mon Sep 17 00:00:00 2001
2From: Sekhar Nori <nsekhar@ti.com>
3Date: Wed, 28 Dec 2011 12:02:57 +0530
4Subject: [PATCH 62/90] usb: musb: davinci: fix build breakage
5
6commit 006896fc612f11bf0624db7814a75d0d5410855f upstream.
7
8Commit 0020afb369859472a461ef4af6410732e929d402 (ARM: mach-davinci:
9remove mach/memory.h) removed mach/memory.h for DaVinci which broke
10DaVinci MUSB build.
11
12mach/memory.h is not actually needed in davinci.c, so remove it.
13While at it, also remove some more machine specific inclulde
14files which are not needed for build.
15
16Tested on DM644x EVM using USB card reader.
17
18Signed-off-by: Sekhar Nori <nsekhar@ti.com>
19Signed-off-by: Felipe Balbi <balbi@ti.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 drivers/usb/musb/davinci.c | 3 ---
23 1 files changed, 0 insertions(+), 3 deletions(-)
24
25diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
26index 4d365d5..3911d9a 100644
27--- a/drivers/usb/musb/davinci.c
28+++ b/drivers/usb/musb/davinci.c
29@@ -33,9 +33,6 @@
30 #include <linux/platform_device.h>
31 #include <linux/dma-mapping.h>
32
33-#include <mach/hardware.h>
34-#include <mach/memory.h>
35-#include <asm/gpio.h>
36 #include <mach/cputype.h>
37
38 #include <asm/mach-types.h>
39--
401.7.7.4
41
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0063-hwmon-f71805f-Fix-clamping-of-temperature-limits.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0063-hwmon-f71805f-Fix-clamping-of-temperature-limits.patch
new file mode 100644
index 00000000..f00fa809
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0063-hwmon-f71805f-Fix-clamping-of-temperature-limits.patch
@@ -0,0 +1,43 @@
1From 2f13837e2029149d661b66d510f759aac22f4748 Mon Sep 17 00:00:00 2001
2From: Jean Delvare <khali@linux-fr.org>
3Date: Fri, 20 Jan 2012 10:09:23 -0500
4Subject: [PATCH 63/90] hwmon: (f71805f) Fix clamping of temperature limits
5
6commit 86b2bbfdbd1fcc4a3aa62ccd3f245c40c5ad5b85 upstream.
7
8Properly clamp temperature limits set by the user. Without this fix,
9attempts to write temperature limits above the maximum supported by
10the chip (255 degrees Celsius) would arbitrarily and unexpectedly
11result in the limit being set to 0 degree Celsius.
12
13Signed-off-by: Jean Delvare <khali@linux-fr.org>
14Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/hwmon/f71805f.c | 10 +++++-----
18 1 files changed, 5 insertions(+), 5 deletions(-)
19
20diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
21index 92f9497..6dbfd3e 100644
22--- a/drivers/hwmon/f71805f.c
23+++ b/drivers/hwmon/f71805f.c
24@@ -283,11 +283,11 @@ static inline long temp_from_reg(u8 reg)
25
26 static inline u8 temp_to_reg(long val)
27 {
28- if (val < 0)
29- val = 0;
30- else if (val > 1000 * 0xff)
31- val = 0xff;
32- return ((val + 500) / 1000);
33+ if (val <= 0)
34+ return 0;
35+ if (val >= 1000 * 0xff)
36+ return 0xff;
37+ return (val + 500) / 1000;
38 }
39
40 /*
41--
421.7.7.4
43
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0064-hwmon-w83627ehf-Disable-setting-DC-mode-for-pwm2-pwm.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0064-hwmon-w83627ehf-Disable-setting-DC-mode-for-pwm2-pwm.patch
new file mode 100644
index 00000000..285534fd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0064-hwmon-w83627ehf-Disable-setting-DC-mode-for-pwm2-pwm.patch
@@ -0,0 +1,46 @@
1From 99eb79f71c8d3baeb55b7584a11df76740950f22 Mon Sep 17 00:00:00 2001
2From: Guenter Roeck <linux@roeck-us.net>
3Date: Fri, 27 Jan 2012 17:56:06 -0800
4Subject: [PATCH 64/90] hwmon: (w83627ehf) Disable setting DC mode for pwm2,
5 pwm3 on NCT6776F
6
7commit ad77c3e1808f07fa70f707b1c92a683b7c7d3f85 upstream.
8
9NCT6776F only supports pwm mode for pwm2 and pwm3. Return error if an attempt
10is made to set those pwm channels to DC mode.
11
12Signed-off-by: Guenter Roeck <linux@roeck-us.net>
13Acked-by: Jean Delvare <khali@linux-fr.org>
14Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/hwmon/w83627ehf.c | 6 ++++++
18 1 files changed, 6 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
21index 93f5fc7..4b57ab6 100644
22--- a/drivers/hwmon/w83627ehf.c
23+++ b/drivers/hwmon/w83627ehf.c
24@@ -1319,6 +1319,7 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,
25 {
26 struct w83627ehf_data *data = dev_get_drvdata(dev);
27 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
28+ struct w83627ehf_sio_data *sio_data = dev->platform_data;
29 int nr = sensor_attr->index;
30 unsigned long val;
31 int err;
32@@ -1330,6 +1331,11 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,
33
34 if (val > 1)
35 return -EINVAL;
36+
37+ /* On NCT67766F, DC mode is only supported for pwm1 */
38+ if (sio_data->kind == nct6776 && nr && val != 1)
39+ return -EINVAL;
40+
41 mutex_lock(&data->update_lock);
42 reg = w83627ehf_read_value(data, W83627EHF_REG_PWM_ENABLE[nr]);
43 data->pwm_mode[nr] = val;
44--
451.7.7.4
46
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0065-hwmon-sht15-fix-bad-error-code.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0065-hwmon-sht15-fix-bad-error-code.patch
new file mode 100644
index 00000000..1ca0623b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0065-hwmon-sht15-fix-bad-error-code.patch
@@ -0,0 +1,40 @@
1From 8e9da00da23bf9103db8bb4172a89926c58dfb03 Mon Sep 17 00:00:00 2001
2From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
3Date: Thu, 26 Jan 2012 15:59:00 -0500
4Subject: [PATCH 65/90] hwmon: (sht15) fix bad error code
5
6commit 6edf3c30af01854c416f8654d3d5d2652470afd4 upstream.
7
8When no platform data was supplied, returned error code was 0.
9
10Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
11Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 drivers/hwmon/sht15.c | 3 ++-
15 1 files changed, 2 insertions(+), 1 deletions(-)
16
17diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
18index fe4104c..5357925 100644
19--- a/drivers/hwmon/sht15.c
20+++ b/drivers/hwmon/sht15.c
21@@ -883,7 +883,7 @@ static int sht15_invalidate_voltage(struct notifier_block *nb,
22
23 static int __devinit sht15_probe(struct platform_device *pdev)
24 {
25- int ret = 0;
26+ int ret;
27 struct sht15_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
28 u8 status = 0;
29
30@@ -901,6 +901,7 @@ static int __devinit sht15_probe(struct platform_device *pdev)
31 init_waitqueue_head(&data->wait_queue);
32
33 if (pdev->dev.platform_data == NULL) {
34+ ret = -EINVAL;
35 dev_err(&pdev->dev, "no platform data supplied\n");
36 goto err_free_data;
37 }
38--
391.7.7.4
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0066-USB-cdc-wdm-call-wake_up_all-to-allow-driver-to-shut.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0066-USB-cdc-wdm-call-wake_up_all-to-allow-driver-to-shut.patch
new file mode 100644
index 00000000..67a10cbd
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0066-USB-cdc-wdm-call-wake_up_all-to-allow-driver-to-shut.patch
@@ -0,0 +1,45 @@
1From 700634b182ca70f6b189ae7aa036d75111ce14f7 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Mon, 16 Jan 2012 15:11:57 +0100
4Subject: [PATCH 66/90] USB: cdc-wdm: call wake_up_all to allow driver to
5 shutdown on device removal
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 62aaf24dc125d7c55c93e313d15611f152b030c7 upstream.
11
12wdm_disconnect() waits for the mutex held by wdm_read() before
13calling wake_up_all(). This causes a deadlock, preventing device removal
14to complete. Do the wake_up_all() before we start waiting for the locks.
15
16Signed-off-by: Bjørn Mork <bjorn@mork.no>
17Cc: Oliver Neukum <oliver@neukum.org>
18Cc: stable <stable@vger.kernel.org>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/usb/class/cdc-wdm.c | 2 +-
22 1 files changed, 1 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
25index 4a29a80..d2cda26 100644
26--- a/drivers/usb/class/cdc-wdm.c
27+++ b/drivers/usb/class/cdc-wdm.c
28@@ -786,13 +786,13 @@ static void wdm_disconnect(struct usb_interface *intf)
29 /* to terminate pending flushes */
30 clear_bit(WDM_IN_USE, &desc->flags);
31 spin_unlock_irqrestore(&desc->iuspin, flags);
32+ wake_up_all(&desc->wait);
33 mutex_lock(&desc->rlock);
34 mutex_lock(&desc->wlock);
35 kill_urbs(desc);
36 cancel_work_sync(&desc->rxwork);
37 mutex_unlock(&desc->wlock);
38 mutex_unlock(&desc->rlock);
39- wake_up_all(&desc->wait);
40 if (!desc->count)
41 cleanup(desc);
42 mutex_unlock(&wdm_mutex);
43--
441.7.7.4
45
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0067-USB-cdc-wdm-better-allocate-a-buffer-that-is-at-leas.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0067-USB-cdc-wdm-better-allocate-a-buffer-that-is-at-leas.patch
new file mode 100644
index 00000000..4471b130
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0067-USB-cdc-wdm-better-allocate-a-buffer-that-is-at-leas.patch
@@ -0,0 +1,38 @@
1From 46e7b4556cd993a3bb20308498c31dabbe96aceb Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Mon, 16 Jan 2012 15:11:59 +0100
4Subject: [PATCH 67/90] USB: cdc-wdm: better allocate a buffer that is at
5 least as big as we tell the USB core
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 655e247daf52b202a6c2d0f8a06dd2051e756ce4 upstream.
11
12As it turns out, there was a mismatch between the allocated inbuf size
13(desc->bMaxPacketSize0, typically something like 64) and the length we
14specified in the URB (desc->wMaxCommand, typically something like 2048)
15
16Signed-off-by: Bjørn Mork <bjorn@mork.no>
17Cc: Oliver Neukum <oliver@neukum.org>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/usb/class/cdc-wdm.c | 2 +-
21 1 files changed, 1 insertions(+), 1 deletions(-)
22
23diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
24index d2cda26..f0deb9e 100644
25--- a/drivers/usb/class/cdc-wdm.c
26+++ b/drivers/usb/class/cdc-wdm.c
27@@ -723,7 +723,7 @@ next_desc:
28 goto err;
29
30 desc->inbuf = usb_alloc_coherent(interface_to_usbdev(intf),
31- desc->bMaxPacketSize0,
32+ desc->wMaxCommand,
33 GFP_KERNEL,
34 &desc->response->transfer_dma);
35 if (!desc->inbuf)
36--
371.7.7.4
38
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0068-USB-cdc-wdm-Avoid-hanging-on-interface-with-no-USB_C.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0068-USB-cdc-wdm-Avoid-hanging-on-interface-with-no-USB_C.patch
new file mode 100644
index 00000000..1e330f9a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0068-USB-cdc-wdm-Avoid-hanging-on-interface-with-no-USB_C.patch
@@ -0,0 +1,53 @@
1From c7d772ceccb6b83acc2c71e0640ac5293e0b2713 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3Date: Fri, 20 Jan 2012 01:49:57 +0100
4Subject: [PATCH 68/90] USB: cdc-wdm: Avoid hanging on interface with no
5 USB_CDC_DMM_TYPE
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit 15699e6fafc3a90e5fdc2ef30555a04dee62286f upstream.
11
12The probe does not strictly require the USB_CDC_DMM_TYPE
13descriptor, which is a good thing as it makes the driver
14usable on non-conforming interfaces. A user could e.g.
15bind to it to a CDC ECM interface by using the new_id and
16bind sysfs files. But this would fail with a 0 buffer length
17due to the missing descriptor.
18
19Fix by defining a reasonable fallback size: The minimum
20device receive buffer size required by the CDC WMC standard,
21revision 1.1
22
23Signed-off-by: Bjørn Mork <bjorn@mork.no>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 drivers/usb/class/cdc-wdm.c | 4 +++-
27 1 files changed, 3 insertions(+), 1 deletions(-)
28
29diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
30index f0deb9e..fd4aee1 100644
31--- a/drivers/usb/class/cdc-wdm.c
32+++ b/drivers/usb/class/cdc-wdm.c
33@@ -57,6 +57,8 @@ MODULE_DEVICE_TABLE (usb, wdm_ids);
34
35 #define WDM_MAX 16
36
37+/* CDC-WMC r1.1 requires wMaxCommand to be "at least 256 decimal (0x100)" */
38+#define WDM_DEFAULT_BUFSIZE 256
39
40 static DEFINE_MUTEX(wdm_mutex);
41
42@@ -636,7 +638,7 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
43 struct usb_cdc_dmm_desc *dmhd;
44 u8 *buffer = intf->altsetting->extra;
45 int buflen = intf->altsetting->extralen;
46- u16 maxcom = 0;
47+ u16 maxcom = WDM_DEFAULT_BUFSIZE;
48
49 if (!buffer)
50 goto out;
51--
521.7.7.4
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0069-netns-fix-net_alloc_generic.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0069-netns-fix-net_alloc_generic.patch
new file mode 100644
index 00000000..95e6041c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0069-netns-fix-net_alloc_generic.patch
@@ -0,0 +1,120 @@
1From 0c5f77f70263e78633b63a24692dd6be6cf99732 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Thu, 26 Jan 2012 00:41:38 +0000
4Subject: [PATCH 69/90] netns: fix net_alloc_generic()
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9[ Upstream commit 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 ]
10
11When a new net namespace is created, we should attach to it a "struct
12net_generic" with enough slots (even empty), or we can hit the following
13BUG_ON() :
14
15[ 200.752016] kernel BUG at include/net/netns/generic.h:40!
16...
17[ 200.752016] [<ffffffff825c3cea>] ? get_cfcnfg+0x3a/0x180
18[ 200.752016] [<ffffffff821cf0b0>] ? lockdep_rtnl_is_held+0x10/0x20
19[ 200.752016] [<ffffffff825c41be>] caif_device_notify+0x2e/0x530
20[ 200.752016] [<ffffffff810d61b7>] notifier_call_chain+0x67/0x110
21[ 200.752016] [<ffffffff810d67c1>] raw_notifier_call_chain+0x11/0x20
22[ 200.752016] [<ffffffff821bae82>] call_netdevice_notifiers+0x32/0x60
23[ 200.752016] [<ffffffff821c2b26>] register_netdevice+0x196/0x300
24[ 200.752016] [<ffffffff821c2ca9>] register_netdev+0x19/0x30
25[ 200.752016] [<ffffffff81c1c67a>] loopback_net_init+0x4a/0xa0
26[ 200.752016] [<ffffffff821b5e62>] ops_init+0x42/0x180
27[ 200.752016] [<ffffffff821b600b>] setup_net+0x6b/0x100
28[ 200.752016] [<ffffffff821b6466>] copy_net_ns+0x86/0x110
29[ 200.752016] [<ffffffff810d5789>] create_new_namespaces+0xd9/0x190
30
31net_alloc_generic() should take into account the maximum index into the
32ptr array, as a subsystem might use net_generic() anytime.
33
34This also reduces number of reallocations in net_assign_generic()
35
36Reported-by: Sasha Levin <levinsasha928@gmail.com>
37Tested-by: Sasha Levin <levinsasha928@gmail.com>
38Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
39Cc: Sjur Brændeland <sjur.brandeland@stericsson.com>
40Cc: Eric W. Biederman <ebiederm@xmission.com>
41Cc: Pavel Emelyanov <xemul@openvz.org>
42Signed-off-by: David S. Miller <davem@davemloft.net>
43Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44---
45 net/core/net_namespace.c | 31 ++++++++++++++++---------------
46 1 files changed, 16 insertions(+), 15 deletions(-)
47
48diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
49index aefcd7a..0e950fd 100644
50--- a/net/core/net_namespace.c
51+++ b/net/core/net_namespace.c
52@@ -30,6 +30,20 @@ EXPORT_SYMBOL(init_net);
53
54 #define INITIAL_NET_GEN_PTRS 13 /* +1 for len +2 for rcu_head */
55
56+static unsigned int max_gen_ptrs = INITIAL_NET_GEN_PTRS;
57+
58+static struct net_generic *net_alloc_generic(void)
59+{
60+ struct net_generic *ng;
61+ size_t generic_size = offsetof(struct net_generic, ptr[max_gen_ptrs]);
62+
63+ ng = kzalloc(generic_size, GFP_KERNEL);
64+ if (ng)
65+ ng->len = max_gen_ptrs;
66+
67+ return ng;
68+}
69+
70 static int net_assign_generic(struct net *net, int id, void *data)
71 {
72 struct net_generic *ng, *old_ng;
73@@ -43,8 +57,7 @@ static int net_assign_generic(struct net *net, int id, void *data)
74 if (old_ng->len >= id)
75 goto assign;
76
77- ng = kzalloc(sizeof(struct net_generic) +
78- id * sizeof(void *), GFP_KERNEL);
79+ ng = net_alloc_generic();
80 if (ng == NULL)
81 return -ENOMEM;
82
83@@ -59,7 +72,6 @@ static int net_assign_generic(struct net *net, int id, void *data)
84 * the old copy for kfree after a grace period.
85 */
86
87- ng->len = id;
88 memcpy(&ng->ptr, &old_ng->ptr, old_ng->len * sizeof(void*));
89
90 rcu_assign_pointer(net->gen, ng);
91@@ -161,18 +173,6 @@ out_undo:
92 goto out;
93 }
94
95-static struct net_generic *net_alloc_generic(void)
96-{
97- struct net_generic *ng;
98- size_t generic_size = sizeof(struct net_generic) +
99- INITIAL_NET_GEN_PTRS * sizeof(void *);
100-
101- ng = kzalloc(generic_size, GFP_KERNEL);
102- if (ng)
103- ng->len = INITIAL_NET_GEN_PTRS;
104-
105- return ng;
106-}
107
108 #ifdef CONFIG_NET_NS
109 static struct kmem_cache *net_cachep;
110@@ -483,6 +483,7 @@ again:
111 }
112 return error;
113 }
114+ max_gen_ptrs = max_t(unsigned int, max_gen_ptrs, *ops->id);
115 }
116 error = __register_pernet_operations(list, ops);
117 if (error) {
118--
1191.7.7.4
120
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0070-netns-Fail-conspicously-if-someone-uses-net_generic-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0070-netns-Fail-conspicously-if-someone-uses-net_generic-.patch
new file mode 100644
index 00000000..6b4adf34
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0070-netns-Fail-conspicously-if-someone-uses-net_generic-.patch
@@ -0,0 +1,42 @@
1From 8b924dd991cfa0b36c65001ff07050cf2b30bd93 Mon Sep 17 00:00:00 2001
2From: "Eric W. Biederman" <ebiederm@xmission.com>
3Date: Thu, 26 Jan 2012 14:02:55 +0000
4Subject: [PATCH 70/90] netns: Fail conspicously if someone uses net_generic
5 at an inappropriate time.
6
7[ Upstream commit 5ee4433efe99b9f39f6eff5052a177bbcfe72cea ]
8
9By definition net_generic should never be called when it can return
10NULL. Fail conspicously with a BUG_ON to make it clear when people mess
11up that a NULL return should never happen.
12
13Recently there was a bug in the CAIF subsystem where it was registered
14with register_pernet_device instead of register_pernet_subsys. It was
15erroneously concluded that net_generic could validly return NULL and
16that net_assign_generic was buggy (when it was just inefficient).
17Hopefully this BUG_ON will prevent people to coming to similar erroneous
18conclusions in the futrue.
19
20Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
21Tested-by: Sasha Levin <levinsasha928@gmail.com>
22Signed-off-by: David S. Miller <davem@davemloft.net>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 include/net/netns/generic.h | 1 +
26 1 files changed, 1 insertions(+), 0 deletions(-)
27
28diff --git a/include/net/netns/generic.h b/include/net/netns/generic.h
29index 3419bf5..d55f434 100644
30--- a/include/net/netns/generic.h
31+++ b/include/net/netns/generic.h
32@@ -41,6 +41,7 @@ static inline void *net_generic(const struct net *net, int id)
33 ptr = ng->ptr[id - 1];
34 rcu_read_unlock();
35
36+ BUG_ON(!ptr);
37 return ptr;
38 }
39 #endif
40--
411.7.7.4
42
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0071-net-caif-Register-properly-as-a-pernet-subsystem.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0071-net-caif-Register-properly-as-a-pernet-subsystem.patch
new file mode 100644
index 00000000..0c9d9103
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0071-net-caif-Register-properly-as-a-pernet-subsystem.patch
@@ -0,0 +1,117 @@
1From 2483685b34bc96d19111c65b0629add54a29b458 Mon Sep 17 00:00:00 2001
2From: "Eric W. Biederman" <ebiederm@xmission.com>
3Date: Thu, 26 Jan 2012 14:04:53 +0000
4Subject: [PATCH 71/90] net caif: Register properly as a pernet subsystem.
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9[ Upstream commit 8a8ee9aff6c3077dd9c2c7a77478e8ed362b96c6 ]
10
11caif is a subsystem and as such it needs to register with
12register_pernet_subsys instead of register_pernet_device.
13
14Among other problems using register_pernet_device was resulting in
15net_generic being called before the caif_net structure was allocated.
16Which has been causing net_generic to fail with either BUG_ON's or by
17return NULL pointers.
18
19A more ugly problem that could be caused is packets in flight why the
20subsystem is shutting down.
21
22To remove confusion also remove the cruft cause by inappropriately
23trying to fix this bug.
24
25With the aid of the previous patch I have tested this patch and
26confirmed that using register_pernet_subsys makes the failure go away as
27it should.
28
29Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
30Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
31Tested-by: Sasha Levin <levinsasha928@gmail.com>
32Signed-off-by: David S. Miller <davem@davemloft.net>
33Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34---
35 net/caif/caif_dev.c | 11 ++++-------
36 net/caif/cfcnfg.c | 1 -
37 2 files changed, 4 insertions(+), 8 deletions(-)
38
39diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
40index f1fa1f6..68223e4 100644
41--- a/net/caif/caif_dev.c
42+++ b/net/caif/caif_dev.c
43@@ -53,7 +53,6 @@ struct cfcnfg *get_cfcnfg(struct net *net)
44 struct caif_net *caifn;
45 BUG_ON(!net);
46 caifn = net_generic(net, caif_net_id);
47- BUG_ON(!caifn);
48 return caifn->cfg;
49 }
50 EXPORT_SYMBOL(get_cfcnfg);
51@@ -63,7 +62,6 @@ static struct caif_device_entry_list *caif_device_list(struct net *net)
52 struct caif_net *caifn;
53 BUG_ON(!net);
54 caifn = net_generic(net, caif_net_id);
55- BUG_ON(!caifn);
56 return &caifn->caifdevs;
57 }
58
59@@ -92,7 +90,6 @@ static struct caif_device_entry *caif_device_alloc(struct net_device *dev)
60 struct caif_device_entry *caifd;
61
62 caifdevs = caif_device_list(dev_net(dev));
63- BUG_ON(!caifdevs);
64
65 caifd = kzalloc(sizeof(*caifd), GFP_KERNEL);
66 if (!caifd)
67@@ -112,7 +109,7 @@ static struct caif_device_entry *caif_get(struct net_device *dev)
68 struct caif_device_entry_list *caifdevs =
69 caif_device_list(dev_net(dev));
70 struct caif_device_entry *caifd;
71- BUG_ON(!caifdevs);
72+
73 list_for_each_entry_rcu(caifd, &caifdevs->list, list) {
74 if (caifd->netdev == dev)
75 return caifd;
76@@ -353,7 +350,7 @@ static struct notifier_block caif_device_notifier = {
77 static int caif_init_net(struct net *net)
78 {
79 struct caif_net *caifn = net_generic(net, caif_net_id);
80- BUG_ON(!caifn);
81+
82 INIT_LIST_HEAD(&caifn->caifdevs.list);
83 mutex_init(&caifn->caifdevs.lock);
84
85@@ -418,7 +415,7 @@ static int __init caif_device_init(void)
86 {
87 int result;
88
89- result = register_pernet_device(&caif_net_ops);
90+ result = register_pernet_subsys(&caif_net_ops);
91
92 if (result)
93 return result;
94@@ -431,7 +428,7 @@ static int __init caif_device_init(void)
95
96 static void __exit caif_device_exit(void)
97 {
98- unregister_pernet_device(&caif_net_ops);
99+ unregister_pernet_subsys(&caif_net_ops);
100 unregister_netdevice_notifier(&caif_device_notifier);
101 dev_remove_pack(&caif_packet_type);
102 }
103diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c
104index 00523ec..86ff37c 100644
105--- a/net/caif/cfcnfg.c
106+++ b/net/caif/cfcnfg.c
107@@ -309,7 +309,6 @@ int caif_connect_client(struct net *net, struct caif_connect_request *conn_req,
108 int err;
109 struct cfctrl_link_param param;
110 struct cfcnfg *cfg = get_cfcnfg(net);
111- caif_assert(cfg != NULL);
112
113 rcu_read_lock();
114 err = caif_connect_req_to_link_param(cfg, conn_req, &param);
115--
1161.7.7.4
117
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0072-af_unix-fix-EPOLLET-regression-for-stream-sockets.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0072-af_unix-fix-EPOLLET-regression-for-stream-sockets.patch
new file mode 100644
index 00000000..6ddc4a03
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0072-af_unix-fix-EPOLLET-regression-for-stream-sockets.patch
@@ -0,0 +1,96 @@
1From cfd240df5a18d890c434c05ccff9e12cc83140a4 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Sat, 28 Jan 2012 16:11:03 +0000
4Subject: [PATCH 72/90] af_unix: fix EPOLLET regression for stream sockets
5
6[ Upstream commit 6f01fd6e6f6809061b56e78f1e8d143099716d70 ]
7
8Commit 0884d7aa24 (AF_UNIX: Fix poll blocking problem when reading from
9a stream socket) added a regression for epoll() in Edge Triggered mode
10(EPOLLET)
11
12Appropriate fix is to use skb_peek()/skb_unlink() instead of
13skb_dequeue(), and only call skb_unlink() when skb is fully consumed.
14
15This remove the need to requeue a partial skb into sk_receive_queue head
16and the extra sk->sk_data_ready() calls that added the regression.
17
18This is safe because once skb is given to sk_receive_queue, it is not
19modified by a writer, and readers are serialized by u->readlock mutex.
20
21This also reduce number of spinlock acquisition for small reads or
22MSG_PEEK users so should improve overall performance.
23
24Reported-by: Nick Mathewson <nickm@freehaven.net>
25Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
26Cc: Alexey Moiseytsev <himeraster@gmail.com>
27Signed-off-by: David S. Miller <davem@davemloft.net>
28Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29---
30 net/unix/af_unix.c | 19 ++++---------------
31 1 files changed, 4 insertions(+), 15 deletions(-)
32
33diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
34index b595a3d..d99678a 100644
35--- a/net/unix/af_unix.c
36+++ b/net/unix/af_unix.c
37@@ -1915,7 +1915,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
38 struct sk_buff *skb;
39
40 unix_state_lock(sk);
41- skb = skb_dequeue(&sk->sk_receive_queue);
42+ skb = skb_peek(&sk->sk_receive_queue);
43 if (skb == NULL) {
44 unix_sk(sk)->recursion_level = 0;
45 if (copied >= target)
46@@ -1955,11 +1955,8 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
47 if (check_creds) {
48 /* Never glue messages from different writers */
49 if ((UNIXCB(skb).pid != siocb->scm->pid) ||
50- (UNIXCB(skb).cred != siocb->scm->cred)) {
51- skb_queue_head(&sk->sk_receive_queue, skb);
52- sk->sk_data_ready(sk, skb->len);
53+ (UNIXCB(skb).cred != siocb->scm->cred))
54 break;
55- }
56 } else {
57 /* Copy credentials */
58 scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).cred);
59@@ -1974,8 +1971,6 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
60
61 chunk = min_t(unsigned int, skb->len, size);
62 if (memcpy_toiovec(msg->msg_iov, skb->data, chunk)) {
63- skb_queue_head(&sk->sk_receive_queue, skb);
64- sk->sk_data_ready(sk, skb->len);
65 if (copied == 0)
66 copied = -EFAULT;
67 break;
68@@ -1990,13 +1985,10 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
69 if (UNIXCB(skb).fp)
70 unix_detach_fds(siocb->scm, skb);
71
72- /* put the skb back if we didn't use it up.. */
73- if (skb->len) {
74- skb_queue_head(&sk->sk_receive_queue, skb);
75- sk->sk_data_ready(sk, skb->len);
76+ if (skb->len)
77 break;
78- }
79
80+ skb_unlink(skb, &sk->sk_receive_queue);
81 consume_skb(skb);
82
83 if (siocb->scm->fp)
84@@ -2007,9 +1999,6 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
85 if (UNIXCB(skb).fp)
86 siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp);
87
88- /* put message back and return */
89- skb_queue_head(&sk->sk_receive_queue, skb);
90- sk->sk_data_ready(sk, skb->len);
91 break;
92 }
93 } while (size);
94--
951.7.7.4
96
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0073-bonding-fix-enslaving-in-alb-mode-when-link-down.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0073-bonding-fix-enslaving-in-alb-mode-when-link-down.patch
new file mode 100644
index 00000000..3c971940
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0073-bonding-fix-enslaving-in-alb-mode-when-link-down.patch
@@ -0,0 +1,116 @@
1From b0f214df7c16b27e302fb5740be5b1f4264e2235 Mon Sep 17 00:00:00 2001
2From: Jiri Bohac <jbohac@suse.cz>
3Date: Wed, 18 Jan 2012 12:24:54 +0000
4Subject: [PATCH 73/90] bonding: fix enslaving in alb mode when link down
5
6[ Upstream commit b924551bed09f61b64f21bffe241afc5526b091a ]
7
8bond_alb_init_slave() is called from bond_enslave() and sets the slave's MAC
9address. This is done differently for TLB and ALB modes.
10bond->alb_info.rlb_enabled is used to discriminate between the two modes but
11this flag may be uninitialized if the slave is being enslaved prior to calling
12bond_open() -> bond_alb_initialize() on the master.
13
14It turns out all the callers of alb_set_slave_mac_addr() pass
15bond->alb_info.rlb_enabled as the hw parameter.
16
17This patch cleans up the unnecessary parameter of alb_set_slave_mac_addr() and
18makes the function decide based on the bonding mode instead, which fixes the
19above problem.
20
21Reported-by: Narendra K <Narendra_K@Dell.com>
22Signed-off-by: Jiri Bohac <jbohac@suse.cz>
23Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
24Signed-off-by: David S. Miller <davem@davemloft.net>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 drivers/net/bonding/bond_alb.c | 27 +++++++++------------------
28 1 files changed, 9 insertions(+), 18 deletions(-)
29
30diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
31index 106b88a..30431d8 100644
32--- a/drivers/net/bonding/bond_alb.c
33+++ b/drivers/net/bonding/bond_alb.c
34@@ -871,16 +871,12 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[])
35 }
36 }
37
38-/* hw is a boolean parameter that determines whether we should try and
39- * set the hw address of the device as well as the hw address of the
40- * net_device
41- */
42-static int alb_set_slave_mac_addr(struct slave *slave, u8 addr[], int hw)
43+static int alb_set_slave_mac_addr(struct slave *slave, u8 addr[])
44 {
45 struct net_device *dev = slave->dev;
46 struct sockaddr s_addr;
47
48- if (!hw) {
49+ if (slave->bond->params.mode == BOND_MODE_TLB) {
50 memcpy(dev->dev_addr, addr, dev->addr_len);
51 return 0;
52 }
53@@ -910,8 +906,8 @@ static void alb_swap_mac_addr(struct bonding *bond, struct slave *slave1, struct
54 u8 tmp_mac_addr[ETH_ALEN];
55
56 memcpy(tmp_mac_addr, slave1->dev->dev_addr, ETH_ALEN);
57- alb_set_slave_mac_addr(slave1, slave2->dev->dev_addr, bond->alb_info.rlb_enabled);
58- alb_set_slave_mac_addr(slave2, tmp_mac_addr, bond->alb_info.rlb_enabled);
59+ alb_set_slave_mac_addr(slave1, slave2->dev->dev_addr);
60+ alb_set_slave_mac_addr(slave2, tmp_mac_addr);
61
62 }
63
64@@ -1058,8 +1054,7 @@ static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slav
65
66 /* Try setting slave mac to bond address and fall-through
67 to code handling that situation below... */
68- alb_set_slave_mac_addr(slave, bond->dev->dev_addr,
69- bond->alb_info.rlb_enabled);
70+ alb_set_slave_mac_addr(slave, bond->dev->dev_addr);
71 }
72
73 /* The slave's address is equal to the address of the bond.
74@@ -1095,8 +1090,7 @@ static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slav
75 }
76
77 if (free_mac_slave) {
78- alb_set_slave_mac_addr(slave, free_mac_slave->perm_hwaddr,
79- bond->alb_info.rlb_enabled);
80+ alb_set_slave_mac_addr(slave, free_mac_slave->perm_hwaddr);
81
82 pr_warning("%s: Warning: the hw address of slave %s is in use by the bond; giving it the hw address of %s\n",
83 bond->dev->name, slave->dev->name,
84@@ -1451,8 +1445,7 @@ int bond_alb_init_slave(struct bonding *bond, struct slave *slave)
85 {
86 int res;
87
88- res = alb_set_slave_mac_addr(slave, slave->perm_hwaddr,
89- bond->alb_info.rlb_enabled);
90+ res = alb_set_slave_mac_addr(slave, slave->perm_hwaddr);
91 if (res) {
92 return res;
93 }
94@@ -1603,8 +1596,7 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
95 alb_swap_mac_addr(bond, swap_slave, new_slave);
96 } else {
97 /* set the new_slave to the bond mac address */
98- alb_set_slave_mac_addr(new_slave, bond->dev->dev_addr,
99- bond->alb_info.rlb_enabled);
100+ alb_set_slave_mac_addr(new_slave, bond->dev->dev_addr);
101 }
102
103 if (swap_slave) {
104@@ -1664,8 +1656,7 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
105 alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave);
106 alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave);
107 } else {
108- alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr,
109- bond->alb_info.rlb_enabled);
110+ alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr);
111
112 read_lock(&bond->lock);
113 alb_send_learning_packets(bond->curr_active_slave, bond_dev->dev_addr);
114--
1151.7.7.4
116
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0074-l2tp-l2tp_ip-fix-possible-oops-on-packet-receive.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0074-l2tp-l2tp_ip-fix-possible-oops-on-packet-receive.patch
new file mode 100644
index 00000000..8851dd4a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0074-l2tp-l2tp_ip-fix-possible-oops-on-packet-receive.patch
@@ -0,0 +1,73 @@
1From 992c1eea6e2a220a7e157952fe30a4963bbb7c43 Mon Sep 17 00:00:00 2001
2From: James Chapman <jchapman@katalix.com>
3Date: Wed, 25 Jan 2012 02:39:05 +0000
4Subject: [PATCH 74/90] l2tp: l2tp_ip - fix possible oops on packet receive
5
6[ Upstream commit 68315801dbf3ab2001679fd2074c9dc5dcf87dfa ]
7
8When a packet is received on an L2TP IP socket (L2TPv3 IP link
9encapsulation), the l2tpip socket's backlog_rcv function calls
10xfrm4_policy_check(). This is not necessary, since it was called
11before the skb was added to the backlog. With CONFIG_NET_NS enabled,
12xfrm4_policy_check() will oops if skb->dev is null, so this trivial
13patch removes the call.
14
15This bug has always been present, but only when CONFIG_NET_NS is
16enabled does it cause problems. Most users are probably using UDP
17encapsulation for L2TP, hence the problem has only recently
18surfaced.
19
20EIP: 0060:[<c12bb62b>] EFLAGS: 00210246 CPU: 0
21EIP is at l2tp_ip_recvmsg+0xd4/0x2a7
22EAX: 00000001 EBX: d77b5180 ECX: 00000000 EDX: 00200246
23ESI: 00000000 EDI: d63cbd30 EBP: d63cbd18 ESP: d63cbcf4
24 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
25Call Trace:
26 [<c1218568>] sock_common_recvmsg+0x31/0x46
27 [<c1215c92>] __sock_recvmsg_nosec+0x45/0x4d
28 [<c12163a1>] __sock_recvmsg+0x31/0x3b
29 [<c1216828>] sock_recvmsg+0x96/0xab
30 [<c10b2693>] ? might_fault+0x47/0x81
31 [<c10b2693>] ? might_fault+0x47/0x81
32 [<c1167fd0>] ? _copy_from_user+0x31/0x115
33 [<c121e8c8>] ? copy_from_user+0x8/0xa
34 [<c121ebd6>] ? verify_iovec+0x3e/0x78
35 [<c1216604>] __sys_recvmsg+0x10a/0x1aa
36 [<c1216792>] ? sock_recvmsg+0x0/0xab
37 [<c105a99b>] ? __lock_acquire+0xbdf/0xbee
38 [<c12d5a99>] ? do_page_fault+0x193/0x375
39 [<c10d1200>] ? fcheck_files+0x9b/0xca
40 [<c10d1259>] ? fget_light+0x2a/0x9c
41 [<c1216bbb>] sys_recvmsg+0x2b/0x43
42 [<c1218145>] sys_socketcall+0x16d/0x1a5
43 [<c11679f0>] ? trace_hardirqs_on_thunk+0xc/0x10
44 [<c100305f>] sysenter_do_call+0x12/0x38
45Code: c6 05 8c ea a8 c1 01 e8 0c d4 d9 ff 85 f6 74 07 3e ff 86 80 00 00 00 b9 17 b6 2b c1 ba 01 00 00 00 b8 78 ed 48 c1 e8 23 f6 d9 ff <ff> 76 0c 68 28 e3 30 c1 68 2d 44 41 c1 e8 89 57 01 00 83 c4 0c
46
47Signed-off-by: James Chapman <jchapman@katalix.com>
48Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
49Signed-off-by: David S. Miller <davem@davemloft.net>
50Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
51---
52 net/l2tp/l2tp_ip.c | 5 -----
53 1 files changed, 0 insertions(+), 5 deletions(-)
54
55diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
56index d21e7eb..55670ec 100644
57--- a/net/l2tp/l2tp_ip.c
58+++ b/net/l2tp/l2tp_ip.c
59@@ -393,11 +393,6 @@ static int l2tp_ip_backlog_recv(struct sock *sk, struct sk_buff *skb)
60 {
61 int rc;
62
63- if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb))
64- goto drop;
65-
66- nf_reset(skb);
67-
68 /* Charge it to the socket, dropping if the queue is full. */
69 rc = sock_queue_rcv_skb(sk, skb);
70 if (rc < 0)
71--
721.7.7.4
73
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0075-macvlan-fix-a-possible-use-after-free.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0075-macvlan-fix-a-possible-use-after-free.patch
new file mode 100644
index 00000000..b2c541af
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0075-macvlan-fix-a-possible-use-after-free.patch
@@ -0,0 +1,34 @@
1From 9a5ecd485e43ba300c72a2c44a4e966b23750c5e Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Mon, 23 Jan 2012 05:38:59 +0000
4Subject: [PATCH 75/90] macvlan: fix a possible use after free
5
6[ Upstream commit 4ec7ac1203bcf21f5e3d977c9818b1a56c9ef40d ]
7
8Commit bc416d9768 (macvlan: handle fragmented multicast frames) added a
9possible use after free in macvlan_handle_frame(), since
10ip_check_defrag() uses pskb_may_pull() : skb header can be reallocated.
11
12Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
13Cc: Ben Greear <greearb@candelatech.com>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 drivers/net/macvlan.c | 1 +
18 1 files changed, 1 insertions(+), 0 deletions(-)
19
20diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
21index 7413497..959d448 100644
22--- a/drivers/net/macvlan.c
23+++ b/drivers/net/macvlan.c
24@@ -172,6 +172,7 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb)
25 skb = ip_check_defrag(skb, IP_DEFRAG_MACVLAN);
26 if (!skb)
27 return RX_HANDLER_CONSUMED;
28+ eth = eth_hdr(skb);
29 src = macvlan_hash_lookup(port, eth->h_source);
30 if (!src)
31 /* frame comes from an external address */
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0076-net-bpf_jit-fix-divide-by-0-generation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0076-net-bpf_jit-fix-divide-by-0-generation.patch
new file mode 100644
index 00000000..aaf9a466
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0076-net-bpf_jit-fix-divide-by-0-generation.patch
@@ -0,0 +1,129 @@
1From ad23030b9029340bee87a03793aaaa98b1df8a18 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Wed, 18 Jan 2012 07:21:42 +0000
4Subject: [PATCH 76/90] net: bpf_jit: fix divide by 0 generation
5
6[ Upstream commit d00a9dd21bdf7908b70866794c8313ee8a5abd5c ]
7
8Several problems fixed in this patch :
9
101) Target of the conditional jump in case a divide by 0 is performed
11 by a bpf is wrong.
12
132) Must 'generate' the full function prologue/epilogue at pass=0,
14 or else we can stop too early in pass=1 if the proglen doesnt change.
15 (if the increase of prologue/epilogue equals decrease of all
16 instructions length because some jumps are converted to near jumps)
17
183) Change the wrong length detection at the end of code generation to
19 issue a more explicit message, no need for a full stack trace.
20
21Reported-by: Phil Oester <kernel@linuxace.com>
22Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
23Signed-off-by: David S. Miller <davem@davemloft.net>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 arch/x86/net/bpf_jit_comp.c | 36 ++++++++++++++++++++++--------------
27 1 files changed, 22 insertions(+), 14 deletions(-)
28
29diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
30index 7b65f75..7c1b765 100644
31--- a/arch/x86/net/bpf_jit_comp.c
32+++ b/arch/x86/net/bpf_jit_comp.c
33@@ -151,17 +151,18 @@ void bpf_jit_compile(struct sk_filter *fp)
34 cleanup_addr = proglen; /* epilogue address */
35
36 for (pass = 0; pass < 10; pass++) {
37+ u8 seen_or_pass0 = (pass == 0) ? (SEEN_XREG | SEEN_DATAREF | SEEN_MEM) : seen;
38 /* no prologue/epilogue for trivial filters (RET something) */
39 proglen = 0;
40 prog = temp;
41
42- if (seen) {
43+ if (seen_or_pass0) {
44 EMIT4(0x55, 0x48, 0x89, 0xe5); /* push %rbp; mov %rsp,%rbp */
45 EMIT4(0x48, 0x83, 0xec, 96); /* subq $96,%rsp */
46 /* note : must save %rbx in case bpf_error is hit */
47- if (seen & (SEEN_XREG | SEEN_DATAREF))
48+ if (seen_or_pass0 & (SEEN_XREG | SEEN_DATAREF))
49 EMIT4(0x48, 0x89, 0x5d, 0xf8); /* mov %rbx, -8(%rbp) */
50- if (seen & SEEN_XREG)
51+ if (seen_or_pass0 & SEEN_XREG)
52 CLEAR_X(); /* make sure we dont leek kernel memory */
53
54 /*
55@@ -170,7 +171,7 @@ void bpf_jit_compile(struct sk_filter *fp)
56 * r9 = skb->len - skb->data_len
57 * r8 = skb->data
58 */
59- if (seen & SEEN_DATAREF) {
60+ if (seen_or_pass0 & SEEN_DATAREF) {
61 if (offsetof(struct sk_buff, len) <= 127)
62 /* mov off8(%rdi),%r9d */
63 EMIT4(0x44, 0x8b, 0x4f, offsetof(struct sk_buff, len));
64@@ -260,9 +261,14 @@ void bpf_jit_compile(struct sk_filter *fp)
65 case BPF_S_ALU_DIV_X: /* A /= X; */
66 seen |= SEEN_XREG;
67 EMIT2(0x85, 0xdb); /* test %ebx,%ebx */
68- if (pc_ret0 != -1)
69- EMIT_COND_JMP(X86_JE, addrs[pc_ret0] - (addrs[i] - 4));
70- else {
71+ if (pc_ret0 > 0) {
72+ /* addrs[pc_ret0 - 1] is start address of target
73+ * (addrs[i] - 4) is the address following this jmp
74+ * ("xor %edx,%edx; div %ebx" being 4 bytes long)
75+ */
76+ EMIT_COND_JMP(X86_JE, addrs[pc_ret0 - 1] -
77+ (addrs[i] - 4));
78+ } else {
79 EMIT_COND_JMP(X86_JNE, 2 + 5);
80 CLEAR_A();
81 EMIT1_off32(0xe9, cleanup_addr - (addrs[i] - 4)); /* jmp .+off32 */
82@@ -335,12 +341,12 @@ void bpf_jit_compile(struct sk_filter *fp)
83 }
84 /* fallinto */
85 case BPF_S_RET_A:
86- if (seen) {
87+ if (seen_or_pass0) {
88 if (i != flen - 1) {
89 EMIT_JMP(cleanup_addr - addrs[i]);
90 break;
91 }
92- if (seen & SEEN_XREG)
93+ if (seen_or_pass0 & SEEN_XREG)
94 EMIT4(0x48, 0x8b, 0x5d, 0xf8); /* mov -8(%rbp),%rbx */
95 EMIT1(0xc9); /* leaveq */
96 }
97@@ -483,8 +489,9 @@ common_load: seen |= SEEN_DATAREF;
98 goto common_load;
99 case BPF_S_LDX_B_MSH:
100 if ((int)K < 0) {
101- if (pc_ret0 != -1) {
102- EMIT_JMP(addrs[pc_ret0] - addrs[i]);
103+ if (pc_ret0 > 0) {
104+ /* addrs[pc_ret0 - 1] is the start address */
105+ EMIT_JMP(addrs[pc_ret0 - 1] - addrs[i]);
106 break;
107 }
108 CLEAR_A();
109@@ -599,13 +606,14 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i];
110 * use it to give the cleanup instruction(s) addr
111 */
112 cleanup_addr = proglen - 1; /* ret */
113- if (seen)
114+ if (seen_or_pass0)
115 cleanup_addr -= 1; /* leaveq */
116- if (seen & SEEN_XREG)
117+ if (seen_or_pass0 & SEEN_XREG)
118 cleanup_addr -= 4; /* mov -8(%rbp),%rbx */
119
120 if (image) {
121- WARN_ON(proglen != oldproglen);
122+ if (proglen != oldproglen)
123+ pr_err("bpb_jit_compile proglen=%u != oldproglen=%u\n", proglen, oldproglen);
124 break;
125 }
126 if (proglen == oldproglen) {
127--
1281.7.7.4
129
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0077-net-reintroduce-missing-rcu_assign_pointer-calls.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0077-net-reintroduce-missing-rcu_assign_pointer-calls.patch
new file mode 100644
index 00000000..71efe19e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0077-net-reintroduce-missing-rcu_assign_pointer-calls.patch
@@ -0,0 +1,703 @@
1From c0c50d4a259eca186611e172563f5a6a06566b79 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Thu, 12 Jan 2012 04:41:32 +0000
4Subject: [PATCH 77/90] net: reintroduce missing rcu_assign_pointer() calls
5
6[ Upstream commit cf778b00e96df6d64f8e21b8395d1f8a859ecdc7 ]
7
8commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to
9RCU_INIT_POINTER) did a lot of incorrect changes, since it did a
10complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x,
11y).
12
13We miss needed barriers, even on x86, when y is not NULL.
14
15Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
16CC: Stephen Hemminger <shemminger@vyatta.com>
17CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 net/core/net-sysfs.c | 6 +++---
22 net/core/netpoll.c | 2 +-
23 net/decnet/dn_dev.c | 4 ++--
24 net/ipv4/devinet.c | 2 +-
25 net/ipv4/fib_trie.c | 10 +++++-----
26 net/ipv4/igmp.c | 8 ++++----
27 net/ipv4/ipip.c | 8 ++++----
28 net/ipv4/ipmr.c | 2 +-
29 net/ipv6/addrconf.c | 2 +-
30 net/ipv6/ip6_tunnel.c | 8 ++++----
31 net/ipv6/raw.c | 2 +-
32 net/ipv6/sit.c | 10 +++++-----
33 net/mac80211/agg-rx.c | 2 +-
34 net/mac80211/cfg.c | 4 ++--
35 net/mac80211/ibss.c | 2 +-
36 net/mac80211/sta_info.c | 6 +++---
37 net/netfilter/nf_conntrack_core.c | 2 +-
38 net/netfilter/nf_conntrack_ecache.c | 4 ++--
39 net/netfilter/nf_conntrack_extend.c | 2 +-
40 net/netfilter/nf_conntrack_helper.c | 2 +-
41 net/netfilter/nf_conntrack_netlink.c | 2 +-
42 net/netfilter/nf_log.c | 6 +++---
43 net/netfilter/nf_queue.c | 2 +-
44 net/netfilter/nfnetlink.c | 4 ++--
45 net/netlabel/netlabel_domainhash.c | 4 ++--
46 net/netlabel/netlabel_unlabeled.c | 6 ++----
47 net/phonet/af_phonet.c | 2 +-
48 net/phonet/pn_dev.c | 2 +-
49 net/phonet/socket.c | 2 +-
50 net/socket.c | 2 +-
51 net/sunrpc/auth_gss/auth_gss.c | 2 +-
52 net/xfrm/xfrm_user.c | 2 +-
53 32 files changed, 61 insertions(+), 63 deletions(-)
54
55diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
56index 385aefe..0329404 100644
57--- a/net/core/net-sysfs.c
58+++ b/net/core/net-sysfs.c
59@@ -990,9 +990,9 @@ static ssize_t store_xps_map(struct netdev_queue *queue,
60 nonempty = 1;
61 }
62
63- if (nonempty)
64- RCU_INIT_POINTER(dev->xps_maps, new_dev_maps);
65- else {
66+ if (nonempty) {
67+ rcu_assign_pointer(dev->xps_maps, new_dev_maps);
68+ } else {
69 kfree(new_dev_maps);
70 RCU_INIT_POINTER(dev->xps_maps, NULL);
71 }
72diff --git a/net/core/netpoll.c b/net/core/netpoll.c
73index cf64c1f..5d4d896 100644
74--- a/net/core/netpoll.c
75+++ b/net/core/netpoll.c
76@@ -763,7 +763,7 @@ int __netpoll_setup(struct netpoll *np)
77 }
78
79 /* last thing to do is link it to the net device structure */
80- RCU_INIT_POINTER(ndev->npinfo, npinfo);
81+ rcu_assign_pointer(ndev->npinfo, npinfo);
82
83 return 0;
84
85diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
86index 2ab16e1..74d321a 100644
87--- a/net/decnet/dn_dev.c
88+++ b/net/decnet/dn_dev.c
89@@ -388,7 +388,7 @@ static int dn_dev_insert_ifa(struct dn_dev *dn_db, struct dn_ifaddr *ifa)
90 }
91
92 ifa->ifa_next = dn_db->ifa_list;
93- RCU_INIT_POINTER(dn_db->ifa_list, ifa);
94+ rcu_assign_pointer(dn_db->ifa_list, ifa);
95
96 dn_ifaddr_notify(RTM_NEWADDR, ifa);
97 blocking_notifier_call_chain(&dnaddr_chain, NETDEV_UP, ifa);
98@@ -1093,7 +1093,7 @@ static struct dn_dev *dn_dev_create(struct net_device *dev, int *err)
99
100 memcpy(&dn_db->parms, p, sizeof(struct dn_dev_parms));
101
102- RCU_INIT_POINTER(dev->dn_ptr, dn_db);
103+ rcu_assign_pointer(dev->dn_ptr, dn_db);
104 dn_db->dev = dev;
105 init_timer(&dn_db->timer);
106
107diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
108index 65f01dc..e41c40f 100644
109--- a/net/ipv4/devinet.c
110+++ b/net/ipv4/devinet.c
111@@ -258,7 +258,7 @@ static struct in_device *inetdev_init(struct net_device *dev)
112 ip_mc_up(in_dev);
113
114 /* we can receive as soon as ip_ptr is set -- do this last */
115- RCU_INIT_POINTER(dev->ip_ptr, in_dev);
116+ rcu_assign_pointer(dev->ip_ptr, in_dev);
117 out:
118 return in_dev;
119 out_kfree:
120diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
121index 37b6711..3ce23f9 100644
122--- a/net/ipv4/fib_trie.c
123+++ b/net/ipv4/fib_trie.c
124@@ -205,7 +205,7 @@ static inline struct tnode *node_parent_rcu(const struct rt_trie_node *node)
125 return (struct tnode *)(parent & ~NODE_TYPE_MASK);
126 }
127
128-/* Same as RCU_INIT_POINTER
129+/* Same as rcu_assign_pointer
130 * but that macro() assumes that value is a pointer.
131 */
132 static inline void node_set_parent(struct rt_trie_node *node, struct tnode *ptr)
133@@ -529,7 +529,7 @@ static void tnode_put_child_reorg(struct tnode *tn, int i, struct rt_trie_node *
134 if (n)
135 node_set_parent(n, tn);
136
137- RCU_INIT_POINTER(tn->child[i], n);
138+ rcu_assign_pointer(tn->child[i], n);
139 }
140
141 #define MAX_WORK 10
142@@ -1015,7 +1015,7 @@ static void trie_rebalance(struct trie *t, struct tnode *tn)
143
144 tp = node_parent((struct rt_trie_node *) tn);
145 if (!tp)
146- RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn);
147+ rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn);
148
149 tnode_free_flush();
150 if (!tp)
151@@ -1027,7 +1027,7 @@ static void trie_rebalance(struct trie *t, struct tnode *tn)
152 if (IS_TNODE(tn))
153 tn = (struct tnode *)resize(t, (struct tnode *)tn);
154
155- RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn);
156+ rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn);
157 tnode_free_flush();
158 }
159
160@@ -1164,7 +1164,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen)
161 put_child(t, (struct tnode *)tp, cindex,
162 (struct rt_trie_node *)tn);
163 } else {
164- RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn);
165+ rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn);
166 tp = tn;
167 }
168 }
169diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
170index c3cc64c..c8989a7 100644
171--- a/net/ipv4/igmp.c
172+++ b/net/ipv4/igmp.c
173@@ -1244,7 +1244,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr)
174
175 im->next_rcu = in_dev->mc_list;
176 in_dev->mc_count++;
177- RCU_INIT_POINTER(in_dev->mc_list, im);
178+ rcu_assign_pointer(in_dev->mc_list, im);
179
180 #ifdef CONFIG_IP_MULTICAST
181 igmpv3_del_delrec(in_dev, im->multiaddr);
182@@ -1816,7 +1816,7 @@ int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr)
183 iml->next_rcu = inet->mc_list;
184 iml->sflist = NULL;
185 iml->sfmode = MCAST_EXCLUDE;
186- RCU_INIT_POINTER(inet->mc_list, iml);
187+ rcu_assign_pointer(inet->mc_list, iml);
188 ip_mc_inc_group(in_dev, addr);
189 err = 0;
190 done:
191@@ -2003,7 +2003,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
192 atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc);
193 kfree_rcu(psl, rcu);
194 }
195- RCU_INIT_POINTER(pmc->sflist, newpsl);
196+ rcu_assign_pointer(pmc->sflist, newpsl);
197 psl = newpsl;
198 }
199 rv = 1; /* > 0 for insert logic below if sl_count is 0 */
200@@ -2106,7 +2106,7 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
201 } else
202 (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode,
203 0, NULL, 0);
204- RCU_INIT_POINTER(pmc->sflist, newpsl);
205+ rcu_assign_pointer(pmc->sflist, newpsl);
206 pmc->sfmode = msf->imsf_fmode;
207 err = 0;
208 done:
209diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
210index 0b2e732..17ad951 100644
211--- a/net/ipv4/ipip.c
212+++ b/net/ipv4/ipip.c
213@@ -231,7 +231,7 @@ static void ipip_tunnel_unlink(struct ipip_net *ipn, struct ip_tunnel *t)
214 (iter = rtnl_dereference(*tp)) != NULL;
215 tp = &iter->next) {
216 if (t == iter) {
217- RCU_INIT_POINTER(*tp, t->next);
218+ rcu_assign_pointer(*tp, t->next);
219 break;
220 }
221 }
222@@ -241,8 +241,8 @@ static void ipip_tunnel_link(struct ipip_net *ipn, struct ip_tunnel *t)
223 {
224 struct ip_tunnel __rcu **tp = ipip_bucket(ipn, t);
225
226- RCU_INIT_POINTER(t->next, rtnl_dereference(*tp));
227- RCU_INIT_POINTER(*tp, t);
228+ rcu_assign_pointer(t->next, rtnl_dereference(*tp));
229+ rcu_assign_pointer(*tp, t);
230 }
231
232 static struct ip_tunnel * ipip_tunnel_locate(struct net *net,
233@@ -792,7 +792,7 @@ static int __net_init ipip_fb_tunnel_init(struct net_device *dev)
234 return -ENOMEM;
235
236 dev_hold(dev);
237- RCU_INIT_POINTER(ipn->tunnels_wc[0], tunnel);
238+ rcu_assign_pointer(ipn->tunnels_wc[0], tunnel);
239 return 0;
240 }
241
242diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
243index 76a7f07..d2aae27 100644
244--- a/net/ipv4/ipmr.c
245+++ b/net/ipv4/ipmr.c
246@@ -1225,7 +1225,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, unsi
247
248 ret = ip_ra_control(sk, 1, mrtsock_destruct);
249 if (ret == 0) {
250- RCU_INIT_POINTER(mrt->mroute_sk, sk);
251+ rcu_assign_pointer(mrt->mroute_sk, sk);
252 IPV4_DEVCONF_ALL(net, MC_FORWARDING)++;
253 }
254 rtnl_unlock();
255diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
256index 36806de..836c4ea 100644
257--- a/net/ipv6/addrconf.c
258+++ b/net/ipv6/addrconf.c
259@@ -429,7 +429,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
260 ndev->tstamp = jiffies;
261 addrconf_sysctl_register(ndev);
262 /* protected by rtnl_lock */
263- RCU_INIT_POINTER(dev->ip6_ptr, ndev);
264+ rcu_assign_pointer(dev->ip6_ptr, ndev);
265
266 /* Join all-node multicast group */
267 ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
268diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
269index 4e2e9ff..d19f499 100644
270--- a/net/ipv6/ip6_tunnel.c
271+++ b/net/ipv6/ip6_tunnel.c
272@@ -218,8 +218,8 @@ ip6_tnl_link(struct ip6_tnl_net *ip6n, struct ip6_tnl *t)
273 {
274 struct ip6_tnl __rcu **tp = ip6_tnl_bucket(ip6n, &t->parms);
275
276- RCU_INIT_POINTER(t->next , rtnl_dereference(*tp));
277- RCU_INIT_POINTER(*tp, t);
278+ rcu_assign_pointer(t->next , rtnl_dereference(*tp));
279+ rcu_assign_pointer(*tp, t);
280 }
281
282 /**
283@@ -237,7 +237,7 @@ ip6_tnl_unlink(struct ip6_tnl_net *ip6n, struct ip6_tnl *t)
284 (iter = rtnl_dereference(*tp)) != NULL;
285 tp = &iter->next) {
286 if (t == iter) {
287- RCU_INIT_POINTER(*tp, t->next);
288+ rcu_assign_pointer(*tp, t->next);
289 break;
290 }
291 }
292@@ -1450,7 +1450,7 @@ static int __net_init ip6_fb_tnl_dev_init(struct net_device *dev)
293
294 t->parms.proto = IPPROTO_IPV6;
295 dev_hold(dev);
296- RCU_INIT_POINTER(ip6n->tnls_wc[0], t);
297+ rcu_assign_pointer(ip6n->tnls_wc[0], t);
298 return 0;
299 }
300
301diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
302index 331af3b..361ebf3 100644
303--- a/net/ipv6/raw.c
304+++ b/net/ipv6/raw.c
305@@ -131,7 +131,7 @@ static mh_filter_t __rcu *mh_filter __read_mostly;
306
307 int rawv6_mh_filter_register(mh_filter_t filter)
308 {
309- RCU_INIT_POINTER(mh_filter, filter);
310+ rcu_assign_pointer(mh_filter, filter);
311 return 0;
312 }
313 EXPORT_SYMBOL(rawv6_mh_filter_register);
314diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
315index 96f3623..72a939d 100644
316--- a/net/ipv6/sit.c
317+++ b/net/ipv6/sit.c
318@@ -182,7 +182,7 @@ static void ipip6_tunnel_unlink(struct sit_net *sitn, struct ip_tunnel *t)
319 (iter = rtnl_dereference(*tp)) != NULL;
320 tp = &iter->next) {
321 if (t == iter) {
322- RCU_INIT_POINTER(*tp, t->next);
323+ rcu_assign_pointer(*tp, t->next);
324 break;
325 }
326 }
327@@ -192,8 +192,8 @@ static void ipip6_tunnel_link(struct sit_net *sitn, struct ip_tunnel *t)
328 {
329 struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t);
330
331- RCU_INIT_POINTER(t->next, rtnl_dereference(*tp));
332- RCU_INIT_POINTER(*tp, t);
333+ rcu_assign_pointer(t->next, rtnl_dereference(*tp));
334+ rcu_assign_pointer(*tp, t);
335 }
336
337 static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn)
338@@ -393,7 +393,7 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg)
339 p->addr = a->addr;
340 p->flags = a->flags;
341 t->prl_count++;
342- RCU_INIT_POINTER(t->prl, p);
343+ rcu_assign_pointer(t->prl, p);
344 out:
345 return err;
346 }
347@@ -1177,7 +1177,7 @@ static int __net_init ipip6_fb_tunnel_init(struct net_device *dev)
348 if (!dev->tstats)
349 return -ENOMEM;
350 dev_hold(dev);
351- RCU_INIT_POINTER(sitn->tunnels_wc[0], tunnel);
352+ rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
353 return 0;
354 }
355
356diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
357index 93b2434..41c2310 100644
358--- a/net/mac80211/agg-rx.c
359+++ b/net/mac80211/agg-rx.c
360@@ -326,7 +326,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
361 status = WLAN_STATUS_SUCCESS;
362
363 /* activate it for RX */
364- RCU_INIT_POINTER(sta->ampdu_mlme.tid_rx[tid], tid_agg_rx);
365+ rcu_assign_pointer(sta->ampdu_mlme.tid_rx[tid], tid_agg_rx);
366
367 if (timeout)
368 mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout));
369diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
370index d06c65f..11cee76 100644
371--- a/net/mac80211/cfg.c
372+++ b/net/mac80211/cfg.c
373@@ -575,7 +575,7 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
374
375 sdata->vif.bss_conf.dtim_period = new->dtim_period;
376
377- RCU_INIT_POINTER(sdata->u.ap.beacon, new);
378+ rcu_assign_pointer(sdata->u.ap.beacon, new);
379
380 synchronize_rcu();
381
382@@ -922,7 +922,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
383 return -EBUSY;
384 }
385
386- RCU_INIT_POINTER(vlansdata->u.vlan.sta, sta);
387+ rcu_assign_pointer(vlansdata->u.vlan.sta, sta);
388 }
389
390 sta->sdata = vlansdata;
391diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
392index ede9a8b..3ece106 100644
393--- a/net/mac80211/ibss.c
394+++ b/net/mac80211/ibss.c
395@@ -184,7 +184,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
396 *pos++ = 0; /* U-APSD no in use */
397 }
398
399- RCU_INIT_POINTER(ifibss->presp, skb);
400+ rcu_assign_pointer(ifibss->presp, skb);
401
402 sdata->vif.bss_conf.beacon_int = beacon_int;
403 sdata->vif.bss_conf.basic_rates = basic_rates;
404diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
405index 8eaa746..1fdd8ff 100644
406--- a/net/mac80211/sta_info.c
407+++ b/net/mac80211/sta_info.c
408@@ -73,7 +73,7 @@ static int sta_info_hash_del(struct ieee80211_local *local,
409 if (!s)
410 return -ENOENT;
411 if (s == sta) {
412- RCU_INIT_POINTER(local->sta_hash[STA_HASH(sta->sta.addr)],
413+ rcu_assign_pointer(local->sta_hash[STA_HASH(sta->sta.addr)],
414 s->hnext);
415 return 0;
416 }
417@@ -83,7 +83,7 @@ static int sta_info_hash_del(struct ieee80211_local *local,
418 s = rcu_dereference_protected(s->hnext,
419 lockdep_is_held(&local->sta_lock));
420 if (rcu_access_pointer(s->hnext)) {
421- RCU_INIT_POINTER(s->hnext, sta->hnext);
422+ rcu_assign_pointer(s->hnext, sta->hnext);
423 return 0;
424 }
425
426@@ -232,7 +232,7 @@ static void sta_info_hash_add(struct ieee80211_local *local,
427 struct sta_info *sta)
428 {
429 sta->hnext = local->sta_hash[STA_HASH(sta->sta.addr)];
430- RCU_INIT_POINTER(local->sta_hash[STA_HASH(sta->sta.addr)], sta);
431+ rcu_assign_pointer(local->sta_hash[STA_HASH(sta->sta.addr)], sta);
432 }
433
434 static void sta_unblock(struct work_struct *wk)
435diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
436index 7202b06..1d15193 100644
437--- a/net/netfilter/nf_conntrack_core.c
438+++ b/net/netfilter/nf_conntrack_core.c
439@@ -776,7 +776,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
440 if (exp->helper) {
441 help = nf_ct_helper_ext_add(ct, GFP_ATOMIC);
442 if (help)
443- RCU_INIT_POINTER(help->helper, exp->helper);
444+ rcu_assign_pointer(help->helper, exp->helper);
445 }
446
447 #ifdef CONFIG_NF_CONNTRACK_MARK
448diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
449index b62c414..14af632 100644
450--- a/net/netfilter/nf_conntrack_ecache.c
451+++ b/net/netfilter/nf_conntrack_ecache.c
452@@ -91,7 +91,7 @@ int nf_conntrack_register_notifier(struct net *net,
453 ret = -EBUSY;
454 goto out_unlock;
455 }
456- RCU_INIT_POINTER(net->ct.nf_conntrack_event_cb, new);
457+ rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new);
458 mutex_unlock(&nf_ct_ecache_mutex);
459 return ret;
460
461@@ -128,7 +128,7 @@ int nf_ct_expect_register_notifier(struct net *net,
462 ret = -EBUSY;
463 goto out_unlock;
464 }
465- RCU_INIT_POINTER(net->ct.nf_expect_event_cb, new);
466+ rcu_assign_pointer(net->ct.nf_expect_event_cb, new);
467 mutex_unlock(&nf_ct_ecache_mutex);
468 return ret;
469
470diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
471index 4605c94..641ff5f 100644
472--- a/net/netfilter/nf_conntrack_extend.c
473+++ b/net/netfilter/nf_conntrack_extend.c
474@@ -169,7 +169,7 @@ int nf_ct_extend_register(struct nf_ct_ext_type *type)
475 before updating alloc_size */
476 type->alloc_size = ALIGN(sizeof(struct nf_ct_ext), type->align)
477 + type->len;
478- RCU_INIT_POINTER(nf_ct_ext_types[type->id], type);
479+ rcu_assign_pointer(nf_ct_ext_types[type->id], type);
480 update_alloc_size(type);
481 out:
482 mutex_unlock(&nf_ct_ext_type_mutex);
483diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
484index 93c4bdb..bbe23ba 100644
485--- a/net/netfilter/nf_conntrack_helper.c
486+++ b/net/netfilter/nf_conntrack_helper.c
487@@ -145,7 +145,7 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
488 memset(&help->help, 0, sizeof(help->help));
489 }
490
491- RCU_INIT_POINTER(help->helper, helper);
492+ rcu_assign_pointer(help->helper, helper);
493 out:
494 return ret;
495 }
496diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
497index 257e772..782cdcd 100644
498--- a/net/netfilter/nf_conntrack_netlink.c
499+++ b/net/netfilter/nf_conntrack_netlink.c
500@@ -1163,7 +1163,7 @@ ctnetlink_change_helper(struct nf_conn *ct, const struct nlattr * const cda[])
501 return -EOPNOTSUPP;
502 }
503
504- RCU_INIT_POINTER(help->helper, helper);
505+ rcu_assign_pointer(help->helper, helper);
506
507 return 0;
508 }
509diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
510index ce0c406..957374a 100644
511--- a/net/netfilter/nf_log.c
512+++ b/net/netfilter/nf_log.c
513@@ -55,7 +55,7 @@ int nf_log_register(u_int8_t pf, struct nf_logger *logger)
514 llog = rcu_dereference_protected(nf_loggers[pf],
515 lockdep_is_held(&nf_log_mutex));
516 if (llog == NULL)
517- RCU_INIT_POINTER(nf_loggers[pf], logger);
518+ rcu_assign_pointer(nf_loggers[pf], logger);
519 }
520
521 mutex_unlock(&nf_log_mutex);
522@@ -92,7 +92,7 @@ int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger)
523 mutex_unlock(&nf_log_mutex);
524 return -ENOENT;
525 }
526- RCU_INIT_POINTER(nf_loggers[pf], logger);
527+ rcu_assign_pointer(nf_loggers[pf], logger);
528 mutex_unlock(&nf_log_mutex);
529 return 0;
530 }
531@@ -250,7 +250,7 @@ static int nf_log_proc_dostring(ctl_table *table, int write,
532 mutex_unlock(&nf_log_mutex);
533 return -ENOENT;
534 }
535- RCU_INIT_POINTER(nf_loggers[tindex], logger);
536+ rcu_assign_pointer(nf_loggers[tindex], logger);
537 mutex_unlock(&nf_log_mutex);
538 } else {
539 mutex_lock(&nf_log_mutex);
540diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
541index 99ffd28..b3a7db6 100644
542--- a/net/netfilter/nf_queue.c
543+++ b/net/netfilter/nf_queue.c
544@@ -40,7 +40,7 @@ int nf_register_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh)
545 else if (old)
546 ret = -EBUSY;
547 else {
548- RCU_INIT_POINTER(queue_handler[pf], qh);
549+ rcu_assign_pointer(queue_handler[pf], qh);
550 ret = 0;
551 }
552 mutex_unlock(&queue_handler_mutex);
553diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
554index c879c1a..b4f8d84 100644
555--- a/net/netfilter/nfnetlink.c
556+++ b/net/netfilter/nfnetlink.c
557@@ -59,7 +59,7 @@ int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n)
558 nfnl_unlock();
559 return -EBUSY;
560 }
561- RCU_INIT_POINTER(subsys_table[n->subsys_id], n);
562+ rcu_assign_pointer(subsys_table[n->subsys_id], n);
563 nfnl_unlock();
564
565 return 0;
566@@ -210,7 +210,7 @@ static int __net_init nfnetlink_net_init(struct net *net)
567 if (!nfnl)
568 return -ENOMEM;
569 net->nfnl_stash = nfnl;
570- RCU_INIT_POINTER(net->nfnl, nfnl);
571+ rcu_assign_pointer(net->nfnl, nfnl);
572 return 0;
573 }
574
575diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c
576index 3f905e5..e5330ed 100644
577--- a/net/netlabel/netlabel_domainhash.c
578+++ b/net/netlabel/netlabel_domainhash.c
579@@ -282,7 +282,7 @@ int __init netlbl_domhsh_init(u32 size)
580 INIT_LIST_HEAD(&hsh_tbl->tbl[iter]);
581
582 spin_lock(&netlbl_domhsh_lock);
583- RCU_INIT_POINTER(netlbl_domhsh, hsh_tbl);
584+ rcu_assign_pointer(netlbl_domhsh, hsh_tbl);
585 spin_unlock(&netlbl_domhsh_lock);
586
587 return 0;
588@@ -330,7 +330,7 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry,
589 &rcu_dereference(netlbl_domhsh)->tbl[bkt]);
590 } else {
591 INIT_LIST_HEAD(&entry->list);
592- RCU_INIT_POINTER(netlbl_domhsh_def, entry);
593+ rcu_assign_pointer(netlbl_domhsh_def, entry);
594 }
595
596 if (entry->type == NETLBL_NLTYPE_ADDRSELECT) {
597diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
598index e251c2c..d463f5a 100644
599--- a/net/netlabel/netlabel_unlabeled.c
600+++ b/net/netlabel/netlabel_unlabeled.c
601@@ -354,7 +354,7 @@ static struct netlbl_unlhsh_iface *netlbl_unlhsh_add_iface(int ifindex)
602 INIT_LIST_HEAD(&iface->list);
603 if (netlbl_unlhsh_rcu_deref(netlbl_unlhsh_def) != NULL)
604 goto add_iface_failure;
605- RCU_INIT_POINTER(netlbl_unlhsh_def, iface);
606+ rcu_assign_pointer(netlbl_unlhsh_def, iface);
607 }
608 spin_unlock(&netlbl_unlhsh_lock);
609
610@@ -1447,11 +1447,9 @@ int __init netlbl_unlabel_init(u32 size)
611 for (iter = 0; iter < hsh_tbl->size; iter++)
612 INIT_LIST_HEAD(&hsh_tbl->tbl[iter]);
613
614- rcu_read_lock();
615 spin_lock(&netlbl_unlhsh_lock);
616- RCU_INIT_POINTER(netlbl_unlhsh, hsh_tbl);
617+ rcu_assign_pointer(netlbl_unlhsh, hsh_tbl);
618 spin_unlock(&netlbl_unlhsh_lock);
619- rcu_read_unlock();
620
621 register_netdevice_notifier(&netlbl_unlhsh_netdev_notifier);
622
623diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
624index bf10ea8..d65f699 100644
625--- a/net/phonet/af_phonet.c
626+++ b/net/phonet/af_phonet.c
627@@ -480,7 +480,7 @@ int __init_or_module phonet_proto_register(unsigned int protocol,
628 if (proto_tab[protocol])
629 err = -EBUSY;
630 else
631- RCU_INIT_POINTER(proto_tab[protocol], pp);
632+ rcu_assign_pointer(proto_tab[protocol], pp);
633 mutex_unlock(&proto_tab_lock);
634
635 return err;
636diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
637index c582761..9b9a85e 100644
638--- a/net/phonet/pn_dev.c
639+++ b/net/phonet/pn_dev.c
640@@ -390,7 +390,7 @@ int phonet_route_add(struct net_device *dev, u8 daddr)
641 daddr = daddr >> 2;
642 mutex_lock(&routes->lock);
643 if (routes->table[daddr] == NULL) {
644- RCU_INIT_POINTER(routes->table[daddr], dev);
645+ rcu_assign_pointer(routes->table[daddr], dev);
646 dev_hold(dev);
647 err = 0;
648 }
649diff --git a/net/phonet/socket.c b/net/phonet/socket.c
650index 3f8d0b1..4c7eff3 100644
651--- a/net/phonet/socket.c
652+++ b/net/phonet/socket.c
653@@ -680,7 +680,7 @@ int pn_sock_bind_res(struct sock *sk, u8 res)
654 mutex_lock(&resource_mutex);
655 if (pnres.sk[res] == NULL) {
656 sock_hold(sk);
657- RCU_INIT_POINTER(pnres.sk[res], sk);
658+ rcu_assign_pointer(pnres.sk[res], sk);
659 ret = 0;
660 }
661 mutex_unlock(&resource_mutex);
662diff --git a/net/socket.c b/net/socket.c
663index 2877647..2dce67a 100644
664--- a/net/socket.c
665+++ b/net/socket.c
666@@ -2472,7 +2472,7 @@ int sock_register(const struct net_proto_family *ops)
667 lockdep_is_held(&net_family_lock)))
668 err = -EEXIST;
669 else {
670- RCU_INIT_POINTER(net_families[ops->family], ops);
671+ rcu_assign_pointer(net_families[ops->family], ops);
672 err = 0;
673 }
674 spin_unlock(&net_family_lock);
675diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
676index afb5655..db0efde 100644
677--- a/net/sunrpc/auth_gss/auth_gss.c
678+++ b/net/sunrpc/auth_gss/auth_gss.c
679@@ -122,7 +122,7 @@ gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx)
680 if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags))
681 return;
682 gss_get_ctx(ctx);
683- RCU_INIT_POINTER(gss_cred->gc_ctx, ctx);
684+ rcu_assign_pointer(gss_cred->gc_ctx, ctx);
685 set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
686 smp_mb__before_clear_bit();
687 clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags);
688diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
689index d0a42df..7cae73e 100644
690--- a/net/xfrm/xfrm_user.c
691+++ b/net/xfrm/xfrm_user.c
692@@ -2927,7 +2927,7 @@ static int __net_init xfrm_user_net_init(struct net *net)
693 if (nlsk == NULL)
694 return -ENOMEM;
695 net->xfrm.nlsk_stash = nlsk; /* Don't set to NULL */
696- RCU_INIT_POINTER(net->xfrm.nlsk, nlsk);
697+ rcu_assign_pointer(net->xfrm.nlsk, nlsk);
698 return 0;
699 }
700
701--
7021.7.7.4
703
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0078-rds-Make-rds_sock_lock-BH-rather-than-IRQ-safe.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0078-rds-Make-rds_sock_lock-BH-rather-than-IRQ-safe.patch
new file mode 100644
index 00000000..f8ed71f9
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0078-rds-Make-rds_sock_lock-BH-rather-than-IRQ-safe.patch
@@ -0,0 +1,119 @@
1From cd494e9314acf83a286be19315a4cf99fd8de826 Mon Sep 17 00:00:00 2001
2From: "David S. Miller" <davem@davemloft.net>
3Date: Tue, 24 Jan 2012 17:03:44 -0500
4Subject: [PATCH 78/90] rds: Make rds_sock_lock BH rather than IRQ safe.
5
6[ Upstream commit efc3dbc37412c027e363736b4f4c74ee5e8ecffc ]
7
8rds_sock_info() triggers locking warnings because we try to perform a
9local_bh_enable() (via sock_i_ino()) while hardware interrupts are
10disabled (via taking rds_sock_lock).
11
12There is no reason for rds_sock_lock to be a hardware IRQ disabling
13lock, none of these access paths run in hardware interrupt context.
14
15Therefore making it a BH disabling lock is safe and sufficient to
16fix this bug.
17
18Reported-by: Kumar Sanghvi <kumaras@chelsio.com>
19Reported-by: Josh Boyer <jwboyer@gmail.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 net/rds/af_rds.c | 20 ++++++++------------
24 1 files changed, 8 insertions(+), 12 deletions(-)
25
26diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
27index bb6ad81..424ff62 100644
28--- a/net/rds/af_rds.c
29+++ b/net/rds/af_rds.c
30@@ -68,7 +68,6 @@ static int rds_release(struct socket *sock)
31 {
32 struct sock *sk = sock->sk;
33 struct rds_sock *rs;
34- unsigned long flags;
35
36 if (!sk)
37 goto out;
38@@ -94,10 +93,10 @@ static int rds_release(struct socket *sock)
39 rds_rdma_drop_keys(rs);
40 rds_notify_queue_get(rs, NULL);
41
42- spin_lock_irqsave(&rds_sock_lock, flags);
43+ spin_lock_bh(&rds_sock_lock);
44 list_del_init(&rs->rs_item);
45 rds_sock_count--;
46- spin_unlock_irqrestore(&rds_sock_lock, flags);
47+ spin_unlock_bh(&rds_sock_lock);
48
49 rds_trans_put(rs->rs_transport);
50
51@@ -409,7 +408,6 @@ static const struct proto_ops rds_proto_ops = {
52
53 static int __rds_create(struct socket *sock, struct sock *sk, int protocol)
54 {
55- unsigned long flags;
56 struct rds_sock *rs;
57
58 sock_init_data(sock, sk);
59@@ -426,10 +424,10 @@ static int __rds_create(struct socket *sock, struct sock *sk, int protocol)
60 spin_lock_init(&rs->rs_rdma_lock);
61 rs->rs_rdma_keys = RB_ROOT;
62
63- spin_lock_irqsave(&rds_sock_lock, flags);
64+ spin_lock_bh(&rds_sock_lock);
65 list_add_tail(&rs->rs_item, &rds_sock_list);
66 rds_sock_count++;
67- spin_unlock_irqrestore(&rds_sock_lock, flags);
68+ spin_unlock_bh(&rds_sock_lock);
69
70 return 0;
71 }
72@@ -471,12 +469,11 @@ static void rds_sock_inc_info(struct socket *sock, unsigned int len,
73 {
74 struct rds_sock *rs;
75 struct rds_incoming *inc;
76- unsigned long flags;
77 unsigned int total = 0;
78
79 len /= sizeof(struct rds_info_message);
80
81- spin_lock_irqsave(&rds_sock_lock, flags);
82+ spin_lock_bh(&rds_sock_lock);
83
84 list_for_each_entry(rs, &rds_sock_list, rs_item) {
85 read_lock(&rs->rs_recv_lock);
86@@ -492,7 +489,7 @@ static void rds_sock_inc_info(struct socket *sock, unsigned int len,
87 read_unlock(&rs->rs_recv_lock);
88 }
89
90- spin_unlock_irqrestore(&rds_sock_lock, flags);
91+ spin_unlock_bh(&rds_sock_lock);
92
93 lens->nr = total;
94 lens->each = sizeof(struct rds_info_message);
95@@ -504,11 +501,10 @@ static void rds_sock_info(struct socket *sock, unsigned int len,
96 {
97 struct rds_info_socket sinfo;
98 struct rds_sock *rs;
99- unsigned long flags;
100
101 len /= sizeof(struct rds_info_socket);
102
103- spin_lock_irqsave(&rds_sock_lock, flags);
104+ spin_lock_bh(&rds_sock_lock);
105
106 if (len < rds_sock_count)
107 goto out;
108@@ -529,7 +525,7 @@ out:
109 lens->nr = rds_sock_count;
110 lens->each = sizeof(struct rds_info_socket);
111
112- spin_unlock_irqrestore(&rds_sock_lock, flags);
113+ spin_unlock_bh(&rds_sock_lock);
114 }
115
116 static void rds_exit(void)
117--
1181.7.7.4
119
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0079-tcp-fix-tcp_trim_head-to-adjust-segment-count-with-s.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0079-tcp-fix-tcp_trim_head-to-adjust-segment-count-with-s.patch
new file mode 100644
index 00000000..cea976d6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0079-tcp-fix-tcp_trim_head-to-adjust-segment-count-with-s.patch
@@ -0,0 +1,61 @@
1From 7c06cc6faed622f1060c0d745187d5db147bdcfb Mon Sep 17 00:00:00 2001
2From: Neal Cardwell <ncardwell@google.com>
3Date: Sat, 28 Jan 2012 17:29:46 +0000
4Subject: [PATCH 79/90] tcp: fix tcp_trim_head() to adjust segment count with
5 skb MSS
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10[ Upstream commit 5b35e1e6e9ca651e6b291c96d1106043c9af314a ]
11
12This commit fixes tcp_trim_head() to recalculate the number of
13segments in the skb with the skb's existing MSS, so trimming the head
14causes the skb segment count to be monotonically non-increasing - it
15should stay the same or go down, but not increase.
16
17Previously tcp_trim_head() used the current MSS of the connection. But
18if there was a decrease in MSS between original transmission and ACK
19(e.g. due to PMTUD), this could cause tcp_trim_head() to
20counter-intuitively increase the segment count when trimming bytes off
21the head of an skb. This violated assumptions in tcp_tso_acked() that
22tcp_trim_head() only decreases the packet count, so that packets_acked
23in tcp_tso_acked() could underflow, leading tcp_clean_rtx_queue() to
24pass u32 pkts_acked values as large as 0xffffffff to
25ca_ops->pkts_acked().
26
27As an aside, if tcp_trim_head() had really wanted the skb to reflect
28the current MSS, it should have called tcp_set_skb_tso_segs()
29unconditionally, since a decrease in MSS would mean that a
30single-packet skb should now be sliced into multiple segments.
31
32Signed-off-by: Neal Cardwell <ncardwell@google.com>
33Acked-by: Nandita Dukkipati <nanditad@google.com>
34Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
35Signed-off-by: David S. Miller <davem@davemloft.net>
36Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37---
38 net/ipv4/tcp_output.c | 6 ++----
39 1 files changed, 2 insertions(+), 4 deletions(-)
40
41diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
42index 63170e2..097e0c7 100644
43--- a/net/ipv4/tcp_output.c
44+++ b/net/ipv4/tcp_output.c
45@@ -1138,11 +1138,9 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len)
46 sk_mem_uncharge(sk, len);
47 sock_set_flag(sk, SOCK_QUEUE_SHRUNK);
48
49- /* Any change of skb->len requires recalculation of tso
50- * factor and mss.
51- */
52+ /* Any change of skb->len requires recalculation of tso factor. */
53 if (tcp_skb_pcount(skb) > 1)
54- tcp_set_skb_tso_segs(sk, skb, tcp_current_mss(sk));
55+ tcp_set_skb_tso_segs(sk, skb, tcp_skb_mss(skb));
56
57 return 0;
58 }
59--
601.7.7.4
61
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0080-tcp-md5-using-remote-adress-for-md5-lookup-in-rst-pa.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0080-tcp-md5-using-remote-adress-for-md5-lookup-in-rst-pa.patch
new file mode 100644
index 00000000..f25290f3
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0080-tcp-md5-using-remote-adress-for-md5-lookup-in-rst-pa.patch
@@ -0,0 +1,49 @@
1From fa61f0bd02896b7157e8f283aa3865863c22bf6c Mon Sep 17 00:00:00 2001
2From: shawnlu <shawn.lu@ericsson.com>
3Date: Fri, 20 Jan 2012 12:22:04 +0000
4Subject: [PATCH 80/90] tcp: md5: using remote adress for md5 lookup in rst
5 packet
6
7[ Upstream commit 8a622e71f58ec9f092fc99eacae0e6cf14f6e742 ]
8
9md5 key is added in socket through remote address.
10remote address should be used in finding md5 key when
11sending out reset packet.
12
13Signed-off-by: shawnlu <shawn.lu@ericsson.com>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16---
17 net/ipv4/tcp_ipv4.c | 2 +-
18 net/ipv6/tcp_ipv6.c | 2 +-
19 2 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
22index a9db4b1..c89e354 100644
23--- a/net/ipv4/tcp_ipv4.c
24+++ b/net/ipv4/tcp_ipv4.c
25@@ -630,7 +630,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
26 arg.iov[0].iov_len = sizeof(rep.th);
27
28 #ifdef CONFIG_TCP_MD5SIG
29- key = sk ? tcp_v4_md5_do_lookup(sk, ip_hdr(skb)->daddr) : NULL;
30+ key = sk ? tcp_v4_md5_do_lookup(sk, ip_hdr(skb)->saddr) : NULL;
31 if (key) {
32 rep.opt[0] = htonl((TCPOPT_NOP << 24) |
33 (TCPOPT_NOP << 16) |
34diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
35index 2dea4bb..b859e4a 100644
36--- a/net/ipv6/tcp_ipv6.c
37+++ b/net/ipv6/tcp_ipv6.c
38@@ -1084,7 +1084,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
39
40 #ifdef CONFIG_TCP_MD5SIG
41 if (sk)
42- key = tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr);
43+ key = tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->saddr);
44 #endif
45
46 if (th->ack)
47--
481.7.7.4
49
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0081-USB-serial-CP210x-Added-USB-ID-for-the-Link-Instrume.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0081-USB-serial-CP210x-Added-USB-ID-for-the-Link-Instrume.patch
new file mode 100644
index 00000000..a1a651af
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0081-USB-serial-CP210x-Added-USB-ID-for-the-Link-Instrume.patch
@@ -0,0 +1,32 @@
1From 1a6d99718e0d5b2933b160cd5e7a8690e1c73ecd Mon Sep 17 00:00:00 2001
2From: Renato Caldas <rmsc@fe.up.pt>
3Date: Fri, 6 Jan 2012 15:20:51 +0000
4Subject: [PATCH 81/90] USB: serial: CP210x: Added USB-ID for the Link
5 Instruments MSO-19
6
7commit 791b7d7cf69de11275e4dccec2f538eec02cbff6 upstream.
8
9This device is a Oscilloscope/Logic Analizer/Pattern Generator/TDR,
10using a Silabs CP2103 USB to UART Bridge.
11
12Signed-off-by: Renato Caldas <rmsc@fe.up.pt>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/usb/serial/cp210x.c | 1 +
16 1 files changed, 1 insertions(+), 0 deletions(-)
17
18diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
19index a1a324b..3b43d9b 100644
20--- a/drivers/usb/serial/cp210x.c
21+++ b/drivers/usb/serial/cp210x.c
22@@ -138,6 +138,7 @@ static const struct usb_device_id id_table[] = {
23 { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
24 { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
25 { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
26+ { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */
27 { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
28 { } /* Terminating Entry */
29 };
30--
311.7.7.4
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch
new file mode 100644
index 00000000..b4b68f14
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch
@@ -0,0 +1,47 @@
1From 58521f4f0eea9b60818ecf8368fb0da47373e076 Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Mon, 16 Jan 2012 00:36:48 +0100
4Subject: [PATCH 82/90] USB: cp210x: call generic open last in open
5
6commit 55b2afbb92ad92e9f6b0aa4354eb1c94589280c3 upstream.
7
8Make sure port is fully initialised before calling generic open.
9
10Signed-off-by: Johan Hovold <jhovold@gmail.com>
11Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12---
13 drivers/usb/serial/cp210x.c | 9 ++-------
14 1 files changed, 2 insertions(+), 7 deletions(-)
15
16diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
17index 3b43d9b..cbcaddb 100644
18--- a/drivers/usb/serial/cp210x.c
19+++ b/drivers/usb/serial/cp210x.c
20@@ -393,8 +393,6 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
21
22 static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
23 {
24- int result;
25-
26 dbg("%s - port %d", __func__, port->number);
27
28 if (cp210x_set_config_single(port, CP210X_IFC_ENABLE, UART_ENABLE)) {
29@@ -403,13 +401,10 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
30 return -EPROTO;
31 }
32
33- result = usb_serial_generic_open(tty, port);
34- if (result)
35- return result;
36-
37 /* Configure the termios structure */
38 cp210x_get_termios(tty, port);
39- return 0;
40+
41+ return usb_serial_generic_open(tty, port);
42 }
43
44 static void cp210x_close(struct usb_serial_port *port)
45--
461.7.7.4
47
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0083-USB-cp210x-fix-CP2104-baudrate-usage.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0083-USB-cp210x-fix-CP2104-baudrate-usage.patch
new file mode 100644
index 00000000..e81cfb09
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0083-USB-cp210x-fix-CP2104-baudrate-usage.patch
@@ -0,0 +1,78 @@
1From a9b16102aedd54ff9d2fe79ac4dada6c15cba91d Mon Sep 17 00:00:00 2001
2From: Preston Fick <preston.fick@silabs.com>
3Date: Mon, 16 Jan 2012 18:14:09 -0600
4Subject: [PATCH 83/90] USB: cp210x: fix CP2104 baudrate usage
5
6commit 7f482fc88ac47662228d6b1f05759797c8936a30 upstream.
7
8This fix changes the way baudrates are set on the CP210x devices from
9Silicon Labs. The CP2101/2/3 will respond to both a GET/SET_BAUDDIV
10command, and GET/SET_BAUDRATE command, while CP2104 and higher devices
11only respond to GET/SET_BAUDRATE. The current cp210x.ko driver in
12kernel version 3.2.0 only implements the GET/SET_BAUDDIV command.
13
14This patch implements the two new codes for the GET/SET_BAUDRATE
15commands. Then there is a change in the way that the baudrate is
16assigned or retrieved. This is done according to the CP210x USB
17specification in AN571. This document can be found here:
18http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/AN571.pdf&src=DocumentationWebPart
19
20Sections 5.3/5.4 describe the USB packets for the old baudrate method.
21Sections 5.5/5.6 describe the USB packets for the new method. This
22patch also implements the new request scheme, and eliminates the
23unnecessary baudrate calculations since it uses the "actual baudrate"
24method.
25
26This patch solves the problem reported for the CP2104 in bug 42586,
27and also keeps support for all other devices (CP2101/2/3).
28
29This patchfile is also attached to the bug report on
30bugzilla.kernel.org. This patch has been developed and test on the
313.2.0 mainline kernel version under Ubuntu 10.11.
32
33Signed-off-by: Preston Fick <preston.fick@silabs.com>
34[duplicate patch also sent by Johan - gregkh]
35Signed-off-by: Johan Hovold <jhovold@gmail.com>
36Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37---
38 drivers/usb/serial/cp210x.c | 10 ++++------
39 1 files changed, 4 insertions(+), 6 deletions(-)
40
41diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
42index cbcaddb..60993dc 100644
43--- a/drivers/usb/serial/cp210x.c
44+++ b/drivers/usb/serial/cp210x.c
45@@ -202,6 +202,8 @@ static struct usb_serial_driver cp210x_device = {
46 #define CP210X_EMBED_EVENTS 0x15
47 #define CP210X_GET_EVENTSTATE 0x16
48 #define CP210X_SET_CHARS 0x19
49+#define CP210X_GET_BAUDRATE 0x1D
50+#define CP210X_SET_BAUDRATE 0x1E
51
52 /* CP210X_IFC_ENABLE */
53 #define UART_ENABLE 0x0001
54@@ -456,10 +458,7 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,
55
56 dbg("%s - port %d", __func__, port->number);
57
58- cp210x_get_config(port, CP210X_GET_BAUDDIV, &baud, 2);
59- /* Convert to baudrate */
60- if (baud)
61- baud = cp210x_quantise_baudrate((BAUD_RATE_GEN_FREQ + baud/2)/ baud);
62+ cp210x_get_config(port, CP210X_GET_BAUDRATE, &baud, 4);
63
64 dbg("%s - baud rate = %d", __func__, baud);
65 *baudp = baud;
66@@ -594,8 +593,7 @@ static void cp210x_set_termios(struct tty_struct *tty,
67 if (baud != tty_termios_baud_rate(old_termios) && baud != 0) {
68 dbg("%s - Setting baud rate to %d baud", __func__,
69 baud);
70- if (cp210x_set_config_single(port, CP210X_SET_BAUDDIV,
71- ((BAUD_RATE_GEN_FREQ + baud/2) / baud))) {
72+ if (cp210x_set_config(port, CP210X_SET_BAUDRATE, &baud, 4)) {
73 dbg("Baud rate requested not supported by device");
74 baud = tty_termios_baud_rate(old_termios);
75 }
76--
771.7.7.4
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0084-USB-cp210x-do-not-map-baud-rates-to-B0.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0084-USB-cp210x-do-not-map-baud-rates-to-B0.patch
new file mode 100644
index 00000000..1a934b95
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0084-USB-cp210x-do-not-map-baud-rates-to-B0.patch
@@ -0,0 +1,34 @@
1From 2b7e1cbfd3688396b3be797d2454d6a9f5426f42 Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Mon, 16 Jan 2012 00:36:50 +0100
4Subject: [PATCH 84/90] USB: cp210x: do not map baud rates to B0
5
6commit be125d9c8d59560e7cc2d6e2b65c8fd233498ab7 upstream.
7
8We do not implement B0 hangup yet so map low baudrates to 300bps.
9
10Signed-off-by: Johan Hovold <jhovold@gmail.com>
11Cc: Preston Fick <preston.fick@silabs.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 drivers/usb/serial/cp210x.c | 4 ++--
15 1 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
18index 60993dc..1bac7b9 100644
19--- a/drivers/usb/serial/cp210x.c
20+++ b/drivers/usb/serial/cp210x.c
21@@ -357,8 +357,8 @@ static inline int cp210x_set_config_single(struct usb_serial_port *port,
22 * Quantises the baud rate as per AN205 Table 1
23 */
24 static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
25- if (baud <= 56) baud = 0;
26- else if (baud <= 300) baud = 300;
27+ if (baud <= 300)
28+ baud = 300;
29 else if (baud <= 600) baud = 600;
30 else if (baud <= 1200) baud = 1200;
31 else if (baud <= 1800) baud = 1800;
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0085-USB-cp210x-fix-up-set_termios-variables.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0085-USB-cp210x-fix-up-set_termios-variables.patch
new file mode 100644
index 00000000..67442268
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0085-USB-cp210x-fix-up-set_termios-variables.patch
@@ -0,0 +1,44 @@
1From 921e92f0429586c745c182cea0e8a5ac7dc3ede6 Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Mon, 16 Jan 2012 00:36:49 +0100
4Subject: [PATCH 85/90] USB: cp210x: fix up set_termios variables
5
6commit 34b76fcaee574017862ea3fa0efdcd77a9d0e57d upstream.
7
8[Based on a patch from Johan, mangled by gregkh to keep things in line]
9
10Fix up the variable usage in the set_termios call.
11
12Signed-off-by: Johan Hovold <jhovold@gmail.com>
13Cc: Preston Fick <preston.fick@silabs.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/usb/serial/cp210x.c | 5 +++--
17 1 files changed, 3 insertions(+), 2 deletions(-)
18
19diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
20index 1bac7b9..5c3b7d1 100644
21--- a/drivers/usb/serial/cp210x.c
22+++ b/drivers/usb/serial/cp210x.c
23@@ -576,7 +576,8 @@ static void cp210x_set_termios(struct tty_struct *tty,
24 struct usb_serial_port *port, struct ktermios *old_termios)
25 {
26 unsigned int cflag, old_cflag;
27- unsigned int baud = 0, bits;
28+ u32 baud;
29+ unsigned int bits;
30 unsigned int modem_ctl[4];
31
32 dbg("%s - port %d", __func__, port->number);
33@@ -593,7 +594,7 @@ static void cp210x_set_termios(struct tty_struct *tty,
34 if (baud != tty_termios_baud_rate(old_termios) && baud != 0) {
35 dbg("%s - Setting baud rate to %d baud", __func__,
36 baud);
37- if (cp210x_set_config(port, CP210X_SET_BAUDRATE, &baud, 4)) {
38+ if (cp210x_set_config(port, CP210X_SET_BAUDRATE, &baud, sizeof(baud))) {
39 dbg("Baud rate requested not supported by device");
40 baud = tty_termios_baud_rate(old_termios);
41 }
42--
431.7.7.4
44
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0086-USB-cp210x-clean-up-refactor-and-document-speed-hand.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0086-USB-cp210x-clean-up-refactor-and-document-speed-hand.patch
new file mode 100644
index 00000000..a1bd42a7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0086-USB-cp210x-clean-up-refactor-and-document-speed-hand.patch
@@ -0,0 +1,121 @@
1From ea11e1bb18d77066ee3e17ad703a162993261c69 Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Mon, 16 Jan 2012 00:36:51 +0100
4Subject: [PATCH 86/90] USB: cp210x: clean up, refactor and document speed
5 handling
6
7commit e5990874e511d5bbca23b3396419480cb2ca0ee7 upstream.
8
9Clean up and refactor speed handling.
10Document baud rate handling for CP210{1,2,4,5,10}.
11
12Signed-off-by: Johan Hovold <jhovold@gmail.com>
13Cc: Preston Fick <preston.fick@silabs.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 drivers/usb/serial/cp210x.c | 71 ++++++++++++++++++++++++++++++++++--------
17 1 files changed, 57 insertions(+), 14 deletions(-)
18
19diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
20index 5c3b7d1..d2c4080 100644
21--- a/drivers/usb/serial/cp210x.c
22+++ b/drivers/usb/serial/cp210x.c
23@@ -39,6 +39,8 @@ static void cp210x_get_termios(struct tty_struct *,
24 struct usb_serial_port *port);
25 static void cp210x_get_termios_port(struct usb_serial_port *port,
26 unsigned int *cflagp, unsigned int *baudp);
27+static void cp210x_change_speed(struct tty_struct *, struct usb_serial_port *,
28+ struct ktermios *);
29 static void cp210x_set_termios(struct tty_struct *, struct usb_serial_port *,
30 struct ktermios*);
31 static int cp210x_tiocmget(struct tty_struct *);
32@@ -572,11 +574,62 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,
33 *cflagp = cflag;
34 }
35
36+/*
37+ * CP2101 supports the following baud rates:
38+ *
39+ * 300, 600, 1200, 1800, 2400, 4800, 7200, 9600, 14400, 19200, 28800,
40+ * 38400, 56000, 57600, 115200, 128000, 230400, 460800, 921600
41+ *
42+ * CP2102 and CP2103 support the following additional rates:
43+ *
44+ * 4000, 16000, 51200, 64000, 76800, 153600, 250000, 256000, 500000,
45+ * 576000
46+ *
47+ * The device will map a requested rate to a supported one, but the result
48+ * of requests for rates greater than 1053257 is undefined (see AN205).
49+ *
50+ * CP2104, CP2105 and CP2110 support most rates up to 2M, 921k and 1M baud,
51+ * respectively, with an error less than 1%. The actual rates are determined
52+ * by
53+ *
54+ * div = round(freq / (2 x prescale x request))
55+ * actual = freq / (2 x prescale x div)
56+ *
57+ * For CP2104 and CP2105 freq is 48Mhz and prescale is 4 for request <= 365bps
58+ * or 1 otherwise.
59+ * For CP2110 freq is 24Mhz and prescale is 4 for request <= 300bps or 1
60+ * otherwise.
61+ */
62+static void cp210x_change_speed(struct tty_struct *tty,
63+ struct usb_serial_port *port, struct ktermios *old_termios)
64+{
65+ u32 baud;
66+
67+ baud = tty->termios->c_ospeed;
68+
69+ /* This maps the requested rate to a rate valid on cp2102 or cp2103.
70+ *
71+ * NOTE: B0 is not implemented.
72+ */
73+ baud = cp210x_quantise_baudrate(baud);
74+
75+ dbg("%s - setting baud rate to %u", __func__, baud);
76+ if (cp210x_set_config(port, CP210X_SET_BAUDRATE, &baud,
77+ sizeof(baud))) {
78+ dev_warn(&port->dev, "failed to set baud rate to %u\n", baud);
79+ if (old_termios)
80+ baud = old_termios->c_ospeed;
81+ else
82+ baud = 9600;
83+ }
84+
85+ tty_encode_baud_rate(tty, baud, baud);
86+}
87+
88 static void cp210x_set_termios(struct tty_struct *tty,
89 struct usb_serial_port *port, struct ktermios *old_termios)
90 {
91 unsigned int cflag, old_cflag;
92- u32 baud;
93 unsigned int bits;
94 unsigned int modem_ctl[4];
95
96@@ -588,19 +641,9 @@ static void cp210x_set_termios(struct tty_struct *tty,
97 tty->termios->c_cflag &= ~CMSPAR;
98 cflag = tty->termios->c_cflag;
99 old_cflag = old_termios->c_cflag;
100- baud = cp210x_quantise_baudrate(tty_get_baud_rate(tty));
101-
102- /* If the baud rate is to be updated*/
103- if (baud != tty_termios_baud_rate(old_termios) && baud != 0) {
104- dbg("%s - Setting baud rate to %d baud", __func__,
105- baud);
106- if (cp210x_set_config(port, CP210X_SET_BAUDRATE, &baud, sizeof(baud))) {
107- dbg("Baud rate requested not supported by device");
108- baud = tty_termios_baud_rate(old_termios);
109- }
110- }
111- /* Report back the resulting baud rate */
112- tty_encode_baud_rate(tty, baud, baud);
113+
114+ if (tty->termios->c_ospeed != old_termios->c_ospeed)
115+ cp210x_change_speed(tty, port, old_termios);
116
117 /* If the number of data bits is to be updated */
118 if ((cflag & CSIZE) != (old_cflag & CSIZE)) {
119--
1201.7.7.4
121
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0087-USB-cp210x-initialise-baud-rate-at-open.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0087-USB-cp210x-initialise-baud-rate-at-open.patch
new file mode 100644
index 00000000..85af4e5d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0087-USB-cp210x-initialise-baud-rate-at-open.patch
@@ -0,0 +1,35 @@
1From ee734377c7849fcf39d20c5e2557d39d498622a6 Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Mon, 16 Jan 2012 00:36:52 +0100
4Subject: [PATCH 87/90] USB: cp210x: initialise baud rate at open
5
6commit cdc32fd6f7b2b2580d7f1b74563f888e4dd9eb8a upstream.
7
8The newer cp2104 devices require the baud rate to be initialised after
9power on. Make sure it is set when port is opened.
10
11Signed-off-by: Johan Hovold <jhovold@gmail.com>
12Cc: Preston Fick <preston.fick@silabs.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 drivers/usb/serial/cp210x.c | 4 ++++
16 1 files changed, 4 insertions(+), 0 deletions(-)
17
18diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
19index d2c4080..07d297f 100644
20--- a/drivers/usb/serial/cp210x.c
21+++ b/drivers/usb/serial/cp210x.c
22@@ -408,6 +408,10 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
23 /* Configure the termios structure */
24 cp210x_get_termios(tty, port);
25
26+ /* The baud rate must be initialised on cp2104 */
27+ if (tty)
28+ cp210x_change_speed(tty, port, NULL);
29+
30 return usb_serial_generic_open(tty, port);
31 }
32
33--
341.7.7.4
35
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch
new file mode 100644
index 00000000..1c71c50c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch
@@ -0,0 +1,48 @@
1From 2f180035f2cedd14428f7f81f1ab2826e4a56faf Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Mon, 16 Jan 2012 00:36:53 +0100
4Subject: [PATCH 88/90] USB: cp210x: allow more baud rates above 1Mbaud
5
6commit d1620ca9e7bb0030068c3b45b653defde8839dac upstream.
7
8Allow more baud rates to be set in [1M,2M] baud.
9
10Signed-off-by: Johan Hovold <jhovold@gmail.com>
11Cc: Preston Fick <preston.fick@silabs.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 drivers/usb/serial/cp210x.c | 11 ++++++-----
15 1 files changed, 6 insertions(+), 5 deletions(-)
16
17diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
18index 07d297f..a515237 100644
19--- a/drivers/usb/serial/cp210x.c
20+++ b/drivers/usb/serial/cp210x.c
21@@ -388,10 +388,10 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
22 else if (baud <= 491520) baud = 460800;
23 else if (baud <= 567138) baud = 500000;
24 else if (baud <= 670254) baud = 576000;
25- else if (baud <= 1053257) baud = 921600;
26- else if (baud <= 1474560) baud = 1228800;
27- else if (baud <= 2457600) baud = 1843200;
28- else baud = 3686400;
29+ else if (baud < 1000000)
30+ baud = 921600;
31+ else if (baud > 2000000)
32+ baud = 2000000;
33 return baud;
34 }
35
36@@ -611,7 +611,8 @@ static void cp210x_change_speed(struct tty_struct *tty,
37
38 baud = tty->termios->c_ospeed;
39
40- /* This maps the requested rate to a rate valid on cp2102 or cp2103.
41+ /* This maps the requested rate to a rate valid on cp2102 or cp2103,
42+ * or to an arbitrary rate in [1M,2M].
43 *
44 * NOTE: B0 is not implemented.
45 */
46--
471.7.7.4
48
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0089-mach-ux500-no-MMC_CAP_SD_HIGHSPEED-on-Snowball.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0089-mach-ux500-no-MMC_CAP_SD_HIGHSPEED-on-Snowball.patch
new file mode 100644
index 00000000..006bf259
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0089-mach-ux500-no-MMC_CAP_SD_HIGHSPEED-on-Snowball.patch
@@ -0,0 +1,34 @@
1From 1fd7dd832dba5ee8aa19a3109bff21cf239b1d19 Mon Sep 17 00:00:00 2001
2From: Philippe Langlais <philippe.langlais@linaro.org>
3Date: Fri, 20 Jan 2012 09:20:40 +0100
4Subject: [PATCH 89/90] mach-ux500: no MMC_CAP_SD_HIGHSPEED on Snowball
5
6commit 2ab1159e80e8f416071e9f51e4f77b9173948296 upstream.
7
8MMC_CAP_SD_HIGHSPEED is not supported on Snowball board resulting on
9initialization errors.
10
11Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
12Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com>
13Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
14Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
15---
16 arch/arm/mach-ux500/board-mop500-sdi.c | 2 ++
17 1 files changed, 2 insertions(+), 0 deletions(-)
18
19diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
20index 6826fae..306cff0 100644
21--- a/arch/arm/mach-ux500/board-mop500-sdi.c
22+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
23@@ -233,6 +233,8 @@ void __init snowball_sdi_init(void)
24 {
25 u32 periphid = 0x10480180;
26
27+ /* On Snowball MMC_CAP_SD_HIGHSPEED isn't supported on sdi0 */
28+ mop500_sdi0_data.capabilities &= ~MMC_CAP_SD_HIGHSPEED;
29 mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;
30
31 /* On-board eMMC */
32--
331.7.7.4
34
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0090-Linux-3.2.3.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0090-Linux-3.2.3.patch
new file mode 100644
index 00000000..7cbbd434
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0090-Linux-3.2.3.patch
@@ -0,0 +1,24 @@
1From dbc3ba5c8784f704438c8ac70ae2700b07155703 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Fri, 3 Feb 2012 09:23:33 -0800
4Subject: [PATCH 90/90] Linux 3.2.3
5
6---
7 Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index 2f684da..d45e887 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,6 +1,6 @@
15 VERSION = 3
16 PATCHLEVEL = 2
17-SUBLEVEL = 2
18+SUBLEVEL = 3
19 EXTRAVERSION =
20 NAME = Saber-toothed Squirrel
21
22--
231.7.7.4
24
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0001-Revert-ASoC-Mark-WM5100-register-map-cache-only-when.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0001-Revert-ASoC-Mark-WM5100-register-map-cache-only-when.patch
new file mode 100644
index 00000000..17d5d091
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0001-Revert-ASoC-Mark-WM5100-register-map-cache-only-when.patch
@@ -0,0 +1,32 @@
1From 63fb1539735afe7c76e7ccdf1999f1fc0d7434e1 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Fri, 3 Feb 2012 12:26:40 -0800
4Subject: [PATCH 1/3] Revert "ASoC: Mark WM5100 register map cache only when
5 going into BIAS_OFF"
6
7This reverts commit 11a17e56ac9c607c6eaecf64b618cd17c828ade0
8(e53e417331c57b9b97e3f8be870214a02c99265c upstream) as it breaks the
9build.
10
11Reported-by: Tim Gardner <rtg.canonical@gmail.com>
12Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 sound/soc/codecs/wm5100.c | 1 -
16 1 files changed, 0 insertions(+), 1 deletions(-)
17
18diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
19index d0beeec..c745ce8 100644
20--- a/sound/soc/codecs/wm5100.c
21+++ b/sound/soc/codecs/wm5100.c
22@@ -1406,7 +1406,6 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
23 break;
24
25 case SND_SOC_BIAS_OFF:
26- regcache_cache_only(wm5100->regmap, true);
27 if (wm5100->pdata.ldo_ena)
28 gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
29 regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),
30--
311.7.7.4
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0002-Revert-ASoC-Don-t-go-through-cache-when-applying-WM5.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0002-Revert-ASoC-Don-t-go-through-cache-when-applying-WM5.patch
new file mode 100644
index 00000000..4be90254
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0002-Revert-ASoC-Don-t-go-through-cache-when-applying-WM5.patch
@@ -0,0 +1,39 @@
1From 39fcddc24caa8cda5db70ac62ae743a02551fec5 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Fri, 3 Feb 2012 12:27:49 -0800
4Subject: [PATCH 2/3] Revert "ASoC: Don't go through cache when applying
5 WM5100 rev A updates"
6
7This reverts commit 78fd75340768980ce6ca646106762a6928289e0c (upstream
8commit 495174a8ffbaa0d15153d855cf206cdc46d51cf4) as it breaks the build.
9
10Reported-by: Tim Gardner <rtg.canonical@gmail.com>
11Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 sound/soc/codecs/wm5100.c | 2 --
15 1 files changed, 0 insertions(+), 2 deletions(-)
16
17diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
18index c745ce8..42d9039 100644
19--- a/sound/soc/codecs/wm5100.c
20+++ b/sound/soc/codecs/wm5100.c
21@@ -1379,7 +1379,6 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
22
23 switch (wm5100->rev) {
24 case 0:
25- regcache_cache_bypass(wm5100->regmap, true);
26 snd_soc_write(codec, 0x11, 0x3);
27 snd_soc_write(codec, 0x203, 0xc);
28 snd_soc_write(codec, 0x206, 0);
29@@ -1395,7 +1394,6 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
30 snd_soc_write(codec,
31 wm5100_reva_patches[i].reg,
32 wm5100_reva_patches[i].val);
33- regcache_cache_bypass(wm5100->regmap, false);
34 break;
35 default:
36 break;
37--
381.7.7.4
39
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0003-Linux-3.2.4.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0003-Linux-3.2.4.patch
new file mode 100644
index 00000000..b893e6ea
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.4/0003-Linux-3.2.4.patch
@@ -0,0 +1,24 @@
1From 141936cc59aaec665841740f2d4290c5b6e3506c Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Fri, 3 Feb 2012 12:39:51 -0800
4Subject: [PATCH 3/3] Linux 3.2.4
5
6---
7 Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index d45e887..c8e187e 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,6 +1,6 @@
15 VERSION = 3
16 PATCHLEVEL = 2
17-SUBLEVEL = 3
18+SUBLEVEL = 4
19 EXTRAVERSION =
20 NAME = Saber-toothed Squirrel
21
22--
231.7.7.4
24
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.5/0001-PCI-Rework-ASPM-disable-code.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.5/0001-PCI-Rework-ASPM-disable-code.patch
new file mode 100644
index 00000000..27d41b26
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.5/0001-PCI-Rework-ASPM-disable-code.patch
@@ -0,0 +1,236 @@
1From 2dcce0a318fcc349b50215279290c6cff7ff9379 Mon Sep 17 00:00:00 2001
2From: Matthew Garrett <mjg@redhat.com>
3Date: Thu, 10 Nov 2011 16:38:33 -0500
4Subject: [PATCH 1/2] PCI: Rework ASPM disable code
5
6commit 3c076351c4027a56d5005a39a0b518a4ba393ce2 upstream.
7
8Right now we forcibly clear ASPM state on all devices if the BIOS indicates
9that the feature isn't supported. Based on the Microsoft presentation
10"PCI Express In Depth for Windows Vista and Beyond", I'm starting to think
11that this may be an error. The implication is that unless the platform
12grants full control via _OSC, Windows will not touch any PCIe features -
13including ASPM. In that case clearing ASPM state would be an error unless
14the platform has granted us that control.
15
16This patch reworks the ASPM disabling code such that the actual clearing
17of state is triggered by a successful handoff of PCIe control to the OS.
18The general ASPM code undergoes some changes in order to ensure that the
19ability to clear the bits isn't overridden by ASPM having already been
20disabled. Further, this theoretically now allows for situations where
21only a subset of PCIe roots hand over control, leaving the others in the
22BIOS state.
23
24It's difficult to know for sure that this is the right thing to do -
25there's zero public documentation on the interaction between all of these
26components. But enough vendors enable ASPM on platforms and then set this
27bit that it seems likely that they're expecting the OS to leave them alone.
28
29Measured to save around 5W on an idle Thinkpad X220.
30
31Signed-off-by: Matthew Garrett <mjg@redhat.com>
32Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
33Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34---
35 drivers/acpi/pci_root.c | 7 +++++
36 drivers/pci/pci-acpi.c | 1 -
37 drivers/pci/pcie/aspm.c | 58 +++++++++++++++++++++++++++++----------------
38 include/linux/pci-aspm.h | 4 +-
39 4 files changed, 46 insertions(+), 24 deletions(-)
40
41diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
42index 2672c79..7aff631 100644
43--- a/drivers/acpi/pci_root.c
44+++ b/drivers/acpi/pci_root.c
45@@ -596,6 +596,13 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
46 if (ACPI_SUCCESS(status)) {
47 dev_info(root->bus->bridge,
48 "ACPI _OSC control (0x%02x) granted\n", flags);
49+ if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
50+ /*
51+ * We have ASPM control, but the FADT indicates
52+ * that it's unsupported. Clear it.
53+ */
54+ pcie_clear_aspm(root->bus);
55+ }
56 } else {
57 dev_info(root->bus->bridge,
58 "ACPI _OSC request failed (%s), "
59diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
60index 4ecb640..c8e7585 100644
61--- a/drivers/pci/pci-acpi.c
62+++ b/drivers/pci/pci-acpi.c
63@@ -395,7 +395,6 @@ static int __init acpi_pci_init(void)
64
65 if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
66 printk(KERN_INFO"ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n");
67- pcie_clear_aspm();
68 pcie_no_aspm();
69 }
70
71diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
72index cbfbab1..1cfbf22 100644
73--- a/drivers/pci/pcie/aspm.c
74+++ b/drivers/pci/pcie/aspm.c
75@@ -68,7 +68,7 @@ struct pcie_link_state {
76 struct aspm_latency acceptable[8];
77 };
78
79-static int aspm_disabled, aspm_force, aspm_clear_state;
80+static int aspm_disabled, aspm_force;
81 static bool aspm_support_enabled = true;
82 static DEFINE_MUTEX(aspm_lock);
83 static LIST_HEAD(link_list);
84@@ -500,9 +500,6 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
85 int pos;
86 u32 reg32;
87
88- if (aspm_clear_state)
89- return -EINVAL;
90-
91 /*
92 * Some functions in a slot might not all be PCIe functions,
93 * very strange. Disable ASPM for the whole slot
94@@ -574,9 +571,6 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
95 pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
96 return;
97
98- if (aspm_disabled && !aspm_clear_state)
99- return;
100-
101 /* VIA has a strange chipset, root port is under a bridge */
102 if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT &&
103 pdev->bus->self)
104@@ -608,7 +602,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
105 * the BIOS's expectation, we'll do so once pci_enable_device() is
106 * called.
107 */
108- if (aspm_policy != POLICY_POWERSAVE || aspm_clear_state) {
109+ if (aspm_policy != POLICY_POWERSAVE) {
110 pcie_config_aspm_path(link);
111 pcie_set_clkpm(link, policy_to_clkpm_state(link));
112 }
113@@ -649,8 +643,7 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)
114 struct pci_dev *parent = pdev->bus->self;
115 struct pcie_link_state *link, *root, *parent_link;
116
117- if ((aspm_disabled && !aspm_clear_state) || !pci_is_pcie(pdev) ||
118- !parent || !parent->link_state)
119+ if (!pci_is_pcie(pdev) || !parent || !parent->link_state)
120 return;
121 if ((parent->pcie_type != PCI_EXP_TYPE_ROOT_PORT) &&
122 (parent->pcie_type != PCI_EXP_TYPE_DOWNSTREAM))
123@@ -734,13 +727,18 @@ void pcie_aspm_powersave_config_link(struct pci_dev *pdev)
124 * pci_disable_link_state - disable pci device's link state, so the link will
125 * never enter specific states
126 */
127-static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)
128+static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem,
129+ bool force)
130 {
131 struct pci_dev *parent = pdev->bus->self;
132 struct pcie_link_state *link;
133
134- if (aspm_disabled || !pci_is_pcie(pdev))
135+ if (aspm_disabled && !force)
136+ return;
137+
138+ if (!pci_is_pcie(pdev))
139 return;
140+
141 if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT ||
142 pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM)
143 parent = pdev;
144@@ -768,16 +766,31 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)
145
146 void pci_disable_link_state_locked(struct pci_dev *pdev, int state)
147 {
148- __pci_disable_link_state(pdev, state, false);
149+ __pci_disable_link_state(pdev, state, false, false);
150 }
151 EXPORT_SYMBOL(pci_disable_link_state_locked);
152
153 void pci_disable_link_state(struct pci_dev *pdev, int state)
154 {
155- __pci_disable_link_state(pdev, state, true);
156+ __pci_disable_link_state(pdev, state, true, false);
157 }
158 EXPORT_SYMBOL(pci_disable_link_state);
159
160+void pcie_clear_aspm(struct pci_bus *bus)
161+{
162+ struct pci_dev *child;
163+
164+ /*
165+ * Clear any ASPM setup that the firmware has carried out on this bus
166+ */
167+ list_for_each_entry(child, &bus->devices, bus_list) {
168+ __pci_disable_link_state(child, PCIE_LINK_STATE_L0S |
169+ PCIE_LINK_STATE_L1 |
170+ PCIE_LINK_STATE_CLKPM,
171+ false, true);
172+ }
173+}
174+
175 static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp)
176 {
177 int i;
178@@ -935,6 +948,7 @@ void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev)
179 static int __init pcie_aspm_disable(char *str)
180 {
181 if (!strcmp(str, "off")) {
182+ aspm_policy = POLICY_DEFAULT;
183 aspm_disabled = 1;
184 aspm_support_enabled = false;
185 printk(KERN_INFO "PCIe ASPM is disabled\n");
186@@ -947,16 +961,18 @@ static int __init pcie_aspm_disable(char *str)
187
188 __setup("pcie_aspm=", pcie_aspm_disable);
189
190-void pcie_clear_aspm(void)
191-{
192- if (!aspm_force)
193- aspm_clear_state = 1;
194-}
195-
196 void pcie_no_aspm(void)
197 {
198- if (!aspm_force)
199+ /*
200+ * Disabling ASPM is intended to prevent the kernel from modifying
201+ * existing hardware state, not to clear existing state. To that end:
202+ * (a) set policy to POLICY_DEFAULT in order to avoid changing state
203+ * (b) prevent userspace from changing policy
204+ */
205+ if (!aspm_force) {
206+ aspm_policy = POLICY_DEFAULT;
207 aspm_disabled = 1;
208+ }
209 }
210
211 /**
212diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h
213index 7cea7b6..c832014 100644
214--- a/include/linux/pci-aspm.h
215+++ b/include/linux/pci-aspm.h
216@@ -29,7 +29,7 @@ extern void pcie_aspm_pm_state_change(struct pci_dev *pdev);
217 extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev);
218 extern void pci_disable_link_state(struct pci_dev *pdev, int state);
219 extern void pci_disable_link_state_locked(struct pci_dev *pdev, int state);
220-extern void pcie_clear_aspm(void);
221+extern void pcie_clear_aspm(struct pci_bus *bus);
222 extern void pcie_no_aspm(void);
223 #else
224 static inline void pcie_aspm_init_link_state(struct pci_dev *pdev)
225@@ -47,7 +47,7 @@ static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev)
226 static inline void pci_disable_link_state(struct pci_dev *pdev, int state)
227 {
228 }
229-static inline void pcie_clear_aspm(void)
230+static inline void pcie_clear_aspm(struct pci_bus *bus)
231 {
232 }
233 static inline void pcie_no_aspm(void)
234--
2351.7.7.4
236
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.5/0002-Linux-3.2.5.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.5/0002-Linux-3.2.5.patch
new file mode 100644
index 00000000..87122681
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.5/0002-Linux-3.2.5.patch
@@ -0,0 +1,24 @@
1From 61339713b47d8905f3079bbd63d8e29343dd86ef Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Mon, 6 Feb 2012 09:47:00 -0800
4Subject: [PATCH 2/2] Linux 3.2.5
5
6---
7 Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index c8e187e..e9dd0ff 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,6 +1,6 @@
15 VERSION = 3
16 PATCHLEVEL = 2
17-SUBLEVEL = 4
18+SUBLEVEL = 5
19 EXTRAVERSION =
20 NAME = Saber-toothed Squirrel
21
22--
231.7.7.4
24
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/src.txt b/recipes-kernel/linux/linux-ti33x-psp-3.2/src.txt
new file mode 100644
index 00000000..916c5c50
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/src.txt
@@ -0,0 +1,295 @@
1 file://3.2.1/0001-MAINTAINERS-stable-Update-address.patch \
2 file://3.2.1/0002-Documentation-Update-stable-address.patch \
3 file://3.2.1/0003-firmware-Fix-an-oops-on-reading-fw_priv-fw-in-sysfs-.patch \
4 file://3.2.1/0004-rt2800usb-Move-ID-out-of-unknown.patch \
5 file://3.2.1/0005-offb-Fix-setting-of-the-pseudo-palette-for-8bpp.patch \
6 file://3.2.1/0006-offb-Fix-bug-in-calculating-requested-vram-size.patch \
7 file://3.2.1/0007-libertas-clean-up-scan-thread-handling.patch \
8 file://3.2.1/0008-bcma-support-for-suspend-and-resume.patch \
9 file://3.2.1/0009-wl12xx-Validate-FEM-index-from-ini-file-and-FW.patch \
10 file://3.2.1/0010-wl12xx-Check-buffer-bound-when-processing-nvs-data.patch \
11 file://3.2.1/0011-wl12xx-Restore-testmode-ABI.patch \
12 file://3.2.1/0012-powerpc-time-Handle-wrapping-of-decrementer.patch \
13 file://3.2.1/0013-powerpc-Fix-unpaired-probe_hcall_entry-and-probe_hca.patch \
14 file://3.2.1/0014-IB-qib-Fix-a-possible-data-corruption-when-receiving.patch \
15 file://3.2.1/0015-IB-uverbs-Protect-QP-multicast-list.patch \
16 file://3.2.1/0016-iwlagn-fix-TID-use-bug.patch \
17 file://3.2.1/0017-iwlagn-fix-remove-use-of-PAGE_SIZE.patch \
18 file://3.2.1/0018-perf-Fix-parsing-of-__print_flags-in-TP_printk.patch \
19 file://3.2.1/0019-ore-Fix-crash-in-case-of-an-IO-error.patch \
20 file://3.2.1/0020-ore-fix-BUG_ON-too-few-sgs-when-reading.patch \
21 file://3.2.1/0021-ore-Must-support-none-PAGE-aligned-IO.patch \
22 file://3.2.1/0022-ore-FIX-breakage-when-MISC_FILESYSTEMS-is-not-set.patch \
23 file://3.2.1/0023-reiserfs-Fix-quota-mount-option-parsing.patch \
24 file://3.2.1/0024-reiserfs-Force-inode-evictions-before-umount-to-avoi.patch \
25 file://3.2.1/0025-ext3-Don-t-warn-from-writepage-when-readonly-inode-i.patch \
26 file://3.2.1/0026-drivers-hv-Don-t-OOPS-when-you-cannot-init-vmbus.patch \
27 file://3.2.1/0027-Drivers-hv-Fix-a-bug-in-vmbus_driver_unregister.patch \
28 file://3.2.1/0028-USB-update-documentation-for-usbmon.patch \
29 file://3.2.1/0029-usbfs-Fix-oops-related-to-user-namespace-conversion.patch \
30 file://3.2.1/0030-atmel_serial-fix-spinlock-lockup-in-RS485-code.patch \
31 file://3.2.1/0031-cgroup-fix-to-allow-mounting-a-hierarchy-by-name.patch \
32 file://3.2.1/0032-udf-Fix-deadlock-when-converting-file-from-in-ICB-on.patch \
33 file://3.2.1/0033-drivers-usb-class-cdc-acm.c-clear-dangling-pointer.patch \
34 file://3.2.1/0034-USB-isight-fix-kernel-bug-when-loading-firmware.patch \
35 file://3.2.1/0035-usb-usb-storage-doesn-t-support-dynamic-id-currently.patch \
36 file://3.2.1/0036-USB-pxa168-Fix-compilation-error.patch \
37 file://3.2.1/0037-USB-add-quirk-for-another-camera.patch \
38 file://3.2.1/0038-usb-musb-fix-pm_runtime-mismatch.patch \
39 file://3.2.1/0039-USB-omninet-fix-write_room.patch \
40 file://3.2.1/0040-usb-option-add-ZD-Incorporated-HSPA-modem.patch \
41 file://3.2.1/0041-USB-Add-USB-ID-for-Multiplex-RC-serial-adapter-to-cp.patch \
42 file://3.2.1/0042-usb-fix-number-of-mapped-SG-DMA-entries.patch \
43 file://3.2.1/0043-xhci-Properly-handle-COMP_2ND_BW_ERR.patch \
44 file://3.2.1/0044-usb-ch9-fix-up-MaxStreams-helper.patch \
45 file://3.2.1/0045-igmp-Avoid-zero-delay-when-receiving-odd-mixture-of-.patch \
46 file://3.2.1/0046-asix-fix-infinite-loop-in-rx_fixup.patch \
47 file://3.2.1/0047-bonding-fix-error-handling-if-slave-is-busy-v2.patch \
48 file://3.2.1/0048-usb-cdc-acm-Fix-acm_tty_hangup-vs.-acm_tty_close-rac.patch \
49 file://3.2.1/0049-xfs-fix-acl-count-validation-in-xfs_acl_from_disk.patch \
50 file://3.2.1/0050-Linux-3.2.1.patch \
51 file://3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch \
52 file://3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch \
53 file://3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch \
54 file://3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch \
55 file://3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch \
56 file://3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch \
57 file://3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch \
58 file://3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch \
59 file://3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch \
60 file://3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch \
61 file://3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch \
62 file://3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch \
63 file://3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch \
64 file://3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch \
65 file://3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch \
66 file://3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch \
67 file://3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch \
68 file://3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch \
69 file://3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch \
70 file://3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch \
71 file://3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch \
72 file://3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch \
73 file://3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch \
74 file://3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch \
75 file://3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch \
76 file://3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch \
77 file://3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch \
78 file://3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch \
79 file://3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch \
80 file://3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch \
81 file://3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch \
82 file://3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch \
83 file://3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch \
84 file://3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch \
85 file://3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch \
86 file://3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch \
87 file://3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch \
88 file://3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch \
89 file://3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch \
90 file://3.2.2/0040-ima-free-duplicate-measurement-memory.patch \
91 file://3.2.2/0041-ima-fix-invalid-memory-reference.patch \
92 file://3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch \
93 file://3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch \
94 file://3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch \
95 file://3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch \
96 file://3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch \
97 file://3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch \
98 file://3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch \
99 file://3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch \
100 file://3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch \
101 file://3.2.2/0051-x86-Fix-mmap-random-address-range.patch \
102 file://3.2.2/0052-UBI-fix-nameless-volumes-handling.patch \
103 file://3.2.2/0053-UBI-fix-debugging-messages.patch \
104 file://3.2.2/0054-UBI-make-vid_hdr-non-static.patch \
105 file://3.2.2/0055-UBIFS-fix-debugging-messages.patch \
106 file://3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch \
107 file://3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch \
108 file://3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch \
109 file://3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch \
110 file://3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch \
111 file://3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch \
112 file://3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch \
113 file://3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch \
114 file://3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch \
115 file://3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch \
116 file://3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch \
117 file://3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch \
118 file://3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch \
119 file://3.2.2/0069-nfsd4-fix-lockowner-matching.patch \
120 file://3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch \
121 file://3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch \
122 file://3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch \
123 file://3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch \
124 file://3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch \
125 file://3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch \
126 file://3.2.2/0076-fix-shrink_dcache_parent-livelock.patch \
127 file://3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch \
128 file://3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch \
129 file://3.2.2/0079-pnfsblock-limit-bio-page-count.patch \
130 file://3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch \
131 file://3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch \
132 file://3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch \
133 file://3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch \
134 file://3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch \
135 file://3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch \
136 file://3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch \
137 file://3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch \
138 file://3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch \
139 file://3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch \
140 file://3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch \
141 file://3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch \
142 file://3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch \
143 file://3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch \
144 file://3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch \
145 file://3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch \
146 file://3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch \
147 file://3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch \
148 file://3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch \
149 file://3.2.2/0099-intel_idle-fix-API-misuse.patch \
150 file://3.2.2/0100-ACPI-Store-SRAT-table-revision.patch \
151 file://3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch \
152 file://3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch \
153 file://3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch \
154 file://3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch \
155 file://3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch \
156 file://3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch \
157 file://3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch \
158 file://3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch \
159 file://3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch \
160 file://3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch \
161 file://3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch \
162 file://3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch \
163 file://3.2.2/0113-I2C-OMAP-correct-SYSC-register-offset-for-OMAP4.patch \
164 file://3.2.2/0114-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch \
165 file://3.2.2/0115-x86-UV2-Fix-BAU-destination-timeout-initialization.patch \
166 file://3.2.2/0116-x86-UV2-Work-around-BAU-bug.patch \
167 file://3.2.2/0117-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch \
168 file://3.2.2/0118-rt2800pci-fix-spurious-interrupts-generation.patch \
169 file://3.2.2/0119-xfs-fix-endian-conversion-issue-in-discard-code.patch \
170 file://3.2.2/0120-i2c-eg20t-modified-the-setting-of-transfer-rate.patch \
171 file://3.2.2/0121-score-fix-off-by-one-index-into-syscall-table.patch \
172 file://3.2.2/0122-cifs-lower-default-wsize-when-unix-extensions-are-no.patch \
173 file://3.2.2/0123-kprobes-initialize-before-using-a-hlist.patch \
174 file://3.2.2/0124-proc-clear_refs-do-not-clear-reserved-pages.patch \
175 file://3.2.2/0125-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch \
176 file://3.2.2/0126-iwlagn-check-for-SMPS-mode.patch \
177 file://3.2.2/0127-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch \
178 file://3.2.2/0128-SHM_UNLOCK-fix-long-unpreemptible-section.patch \
179 file://3.2.2/0129-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch \
180 file://3.2.2/0130-Linux-3.2.2.patch \
181 file://3.2.3/0001-ALSA-hda-Fix-buffer-alignment-regression-with-Nvidia.patch \
182 file://3.2.3/0002-ALSA-hda-Fix-silent-outputs-from-docking-station-jac.patch \
183 file://3.2.3/0003-eCryptfs-Sanitize-write-counts-of-dev-ecryptfs.patch \
184 file://3.2.3/0004-ecryptfs-Improve-metadata-read-failure-logging.patch \
185 file://3.2.3/0005-eCryptfs-Make-truncate-path-killable.patch \
186 file://3.2.3/0006-eCryptfs-Check-inode-changes-in-setattr.patch \
187 file://3.2.3/0007-eCryptfs-Fix-oops-when-printing-debug-info-in-extent.patch \
188 file://3.2.3/0008-drm-radeon-kms-Add-an-MSI-quirk-for-Dell-RS690.patch \
189 file://3.2.3/0009-drm-radeon-kms-move-panel-mode-setup-into-encoder-mo.patch \
190 file://3.2.3/0010-drm-radeon-kms-rework-modeset-sequence-for-DCE41-and.patch \
191 file://3.2.3/0011-drm-Fix-authentication-kernel-crash.patch \
192 file://3.2.3/0012-xfs-Fix-missing-xfs_iunlock-on-error-recovery-path-i.patch \
193 file://3.2.3/0013-ASoC-Mark-WM5100-register-map-cache-only-when-going-.patch \
194 file://3.2.3/0014-ASoC-Disable-register-synchronisation-for-low-freque.patch \
195 file://3.2.3/0015-ASoC-Don-t-go-through-cache-when-applying-WM5100-rev.patch \
196 file://3.2.3/0016-ASoC-wm8996-Call-_POST_PMU-callback-for-CPVDD.patch \
197 file://3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch \
198 file://3.2.3/0018-mac80211-fix-work-removal-on-deauth-request.patch \
199 file://3.2.3/0019-jbd-Issue-cache-flush-after-checkpointing.patch \
200 file://3.2.3/0020-crypto-sha512-make-it-work-undo-percpu-message-sched.patch \
201 file://3.2.3/0021-crypto-sha512-reduce-stack-usage-to-safe-number.patch \
202 file://3.2.3/0022-tpm_tis-add-delay-after-aborting-command.patch \
203 file://3.2.3/0023-x86-uv-Fix-uninitialized-spinlocks.patch \
204 file://3.2.3/0024-x86-uv-Fix-uv_gpa_to_soc_phys_ram-shift.patch \
205 file://3.2.3/0025-x86-microcode_amd-Add-support-for-CPU-family-specifi.patch \
206 file://3.2.3/0026-m68k-Fix-assembler-constraint-to-prevent-overeager-g.patch \
207 file://3.2.3/0027-ALSA-hda-set-mute-led-polarity-for-laptops-with-bugg.patch \
208 file://3.2.3/0028-ALSA-hda-Fix-silent-output-on-ASUS-A6Rp.patch \
209 file://3.2.3/0029-ALSA-hda-Fix-silent-output-on-Haier-W18-laptop.patch \
210 file://3.2.3/0030-drm-i915-paper-over-missed-irq-issues-with-force-wak.patch \
211 file://3.2.3/0031-drm-i915-sdvo-always-set-positive-sync-polarity.patch \
212 file://3.2.3/0032-drm-i915-Re-enable-gen7-RC6-and-GPU-turbo-after-resu.patch \
213 file://3.2.3/0033-ARM-at91-fix-at91rm9200-soc-subtype-handling.patch \
214 file://3.2.3/0034-mach-ux500-enable-ARM-errata-764369.patch \
215 file://3.2.3/0035-ARM-7296-1-proc-v7.S-remove-HARVARD_CACHE-preprocess.patch \
216 file://3.2.3/0036-sysfs-Complain-bitterly-about-attempts-to-remove-fil.patch \
217 file://3.2.3/0037-x86-xen-size-struct-xen_spinlock-to-always-fit-in-ar.patch \
218 file://3.2.3/0038-mpt2sas-Removed-redundant-calling-of-_scsih_probe_de.patch \
219 file://3.2.3/0039-USB-option-Add-LG-docomo-L-02C.patch \
220 file://3.2.3/0040-USB-ftdi_sio-fix-TIOCSSERIAL-baud_base-handling.patch \
221 file://3.2.3/0041-USB-ftdi_sio-fix-initial-baud-rate.patch \
222 file://3.2.3/0042-USB-ftdi_sio-add-PID-for-TI-XDS100v2-BeagleBone-A3.patch \
223 file://3.2.3/0043-USB-serial-ftdi-additional-IDs.patch \
224 file://3.2.3/0044-USB-ftdi_sio-Add-more-identifiers.patch \
225 file://3.2.3/0045-USB-cdc-wdm-updating-desc-length-must-be-protected-b.patch \
226 file://3.2.3/0046-USB-cdc-wdm-use-two-mutexes-to-allow-simultaneous-re.patch \
227 file://3.2.3/0047-qcaux-add-more-Pantech-UML190-and-UML290-ports.patch \
228 file://3.2.3/0048-usb-dwc3-ep0-tidy-up-Pending-Request-handling.patch \
229 file://3.2.3/0049-usb-io_ti-Make-edge_remove_sysfs_attrs-the-port_remo.patch \
230 file://3.2.3/0050-TTY-fix-UV-serial-console-regression.patch \
231 file://3.2.3/0051-serial-amba-pl011-lock-console-writes-against-interr.patch \
232 file://3.2.3/0052-jsm-Fixed-EEH-recovery-error.patch \
233 file://3.2.3/0053-iwlwifi-fix-PCI-E-transport-inta-race.patch \
234 file://3.2.3/0054-vmwgfx-Fix-assignment-in-vmw_framebuffer_create_hand.patch \
235 file://3.2.3/0055-USB-Realtek-cr-fix-autopm-scheduling-while-atomic.patch \
236 file://3.2.3/0056-USB-usbsevseg-fix-max-length.patch \
237 file://3.2.3/0057-usb-gadget-langwell-don-t-call-gadget-s-disconnect.patch \
238 file://3.2.3/0058-usb-gadget-storage-endian-fix.patch \
239 file://3.2.3/0059-drivers-usb-host-ehci-fsl.c-add-missing-iounmap.patch \
240 file://3.2.3/0060-xhci-Fix-USB-3.0-device-restart-on-resume.patch \
241 file://3.2.3/0061-xHCI-Cleanup-isoc-transfer-ring-when-TD-length-misma.patch \
242 file://3.2.3/0062-usb-musb-davinci-fix-build-breakage.patch \
243 file://3.2.3/0063-hwmon-f71805f-Fix-clamping-of-temperature-limits.patch \
244 file://3.2.3/0064-hwmon-w83627ehf-Disable-setting-DC-mode-for-pwm2-pwm.patch \
245 file://3.2.3/0065-hwmon-sht15-fix-bad-error-code.patch \
246 file://3.2.3/0066-USB-cdc-wdm-call-wake_up_all-to-allow-driver-to-shut.patch \
247 file://3.2.3/0067-USB-cdc-wdm-better-allocate-a-buffer-that-is-at-leas.patch \
248 file://3.2.3/0068-USB-cdc-wdm-Avoid-hanging-on-interface-with-no-USB_C.patch \
249 file://3.2.3/0069-netns-fix-net_alloc_generic.patch \
250 file://3.2.3/0070-netns-Fail-conspicously-if-someone-uses-net_generic-.patch \
251 file://3.2.3/0071-net-caif-Register-properly-as-a-pernet-subsystem.patch \
252 file://3.2.3/0072-af_unix-fix-EPOLLET-regression-for-stream-sockets.patch \
253 file://3.2.3/0073-bonding-fix-enslaving-in-alb-mode-when-link-down.patch \
254 file://3.2.3/0074-l2tp-l2tp_ip-fix-possible-oops-on-packet-receive.patch \
255 file://3.2.3/0075-macvlan-fix-a-possible-use-after-free.patch \
256 file://3.2.3/0076-net-bpf_jit-fix-divide-by-0-generation.patch \
257 file://3.2.3/0077-net-reintroduce-missing-rcu_assign_pointer-calls.patch \
258 file://3.2.3/0078-rds-Make-rds_sock_lock-BH-rather-than-IRQ-safe.patch \
259 file://3.2.3/0079-tcp-fix-tcp_trim_head-to-adjust-segment-count-with-s.patch \
260 file://3.2.3/0080-tcp-md5-using-remote-adress-for-md5-lookup-in-rst-pa.patch \
261 file://3.2.3/0081-USB-serial-CP210x-Added-USB-ID-for-the-Link-Instrume.patch \
262 file://3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch \
263 file://3.2.3/0083-USB-cp210x-fix-CP2104-baudrate-usage.patch \
264 file://3.2.3/0084-USB-cp210x-do-not-map-baud-rates-to-B0.patch \
265 file://3.2.3/0085-USB-cp210x-fix-up-set_termios-variables.patch \
266 file://3.2.3/0086-USB-cp210x-clean-up-refactor-and-document-speed-hand.patch \
267 file://3.2.3/0087-USB-cp210x-initialise-baud-rate-at-open.patch \
268 file://3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch \
269 file://3.2.3/0089-mach-ux500-no-MMC_CAP_SD_HIGHSPEED-on-Snowball.patch \
270 file://3.2.3/0090-Linux-3.2.3.patch \
271 file://3.2.4/0001-Revert-ASoC-Mark-WM5100-register-map-cache-only-when.patch \
272 file://3.2.4/0002-Revert-ASoC-Don-t-go-through-cache-when-applying-WM5.patch \
273 file://3.2.4/0003-Linux-3.2.4.patch \
274 file://3.2.5/0001-PCI-Rework-ASPM-disable-code.patch \
275 file://3.2.5/0002-Linux-3.2.5.patch \
276 file://0002-f_rndis-HACK-around-undefined-variables.patch \
277 file://0003-da8xx-fb-add-DVI-support-for-beaglebone.patch \
278 file://0004-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch \
279 file://0005-more-beaglebone-merges.patch \
280 file://0006-beaglebone-disable-tsadc.patch \
281 file://0007-tscadc-Add-general-purpose-mode-untested-with-touchs.patch \
282 file://0008-tscadc-Add-board-file-mfd-support-fix-warning.patch \
283 file://0009-AM335X-init-tsc-bone-style-for-new-boards.patch \
284 file://0010-tscadc-make-stepconfig-channel-configurable.patch \
285 file://0011-tscadc-Trigger-through-sysfs.patch \
286 file://0012-meta-ti-Remove-debug-messages-for-meta-ti.patch \
287 file://0013-tscadc-switch-to-polling-instead-of-interrupts.patch \
288 file://0014-beaglebone-fix-ADC-init.patch \
289 file://0015-AM335x-MUX-add-ehrpwm1A.patch \
290 file://0016-beaglebone-enable-PWM-for-lcd-backlight-backlight-is.patch \
291 file://0017-omap_hsmmc-Set-dto-to-max-value-of-14-to-avoid-SD-Ca.patch \
292 file://0018-beaglebone-set-default-brightness-to-50-for-pwm-back.patch \
293 file://0019-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch \
294 file://0020-beaglebone-use-P8_6-gpio1_3-as-w1-bus.patch \
295 file://0021-beaglebone-add-support-for-Towertech-TT3201-CAN-cape.patch \
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
index f2ba8e02..33ae9bdf 100644
--- a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
+++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
@@ -11,7 +11,7 @@ MULTI_CONFIG_BASE_SUFFIX = ""
11 11
12BRANCH = "v3.2-staging" 12BRANCH = "v3.2-staging"
13SRCREV = "09e9651bcf2ee8d86685f2a8075bc6557b1d3b91" 13SRCREV = "09e9651bcf2ee8d86685f2a8075bc6557b1d3b91"
14MACHINE_KERNEL_PR_append = "f+gitr${SRCREV}" 14MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}"
15 15
16COMPATIBLE_MACHINE = "(ti33x)" 16COMPATIBLE_MACHINE = "(ti33x)"
17 17
@@ -25,6 +25,280 @@ SRC_URI += "git://arago-project.org/git/projects/linux-am33x.git;protocol=http;b
25 file://defconfig" 25 file://defconfig"
26 26
27PATCHES_OVER_PSP = " \ 27PATCHES_OVER_PSP = " \
28 file://3.2.1/0001-MAINTAINERS-stable-Update-address.patch \
29 file://3.2.1/0002-Documentation-Update-stable-address.patch \
30 file://3.2.1/0003-firmware-Fix-an-oops-on-reading-fw_priv-fw-in-sysfs-.patch \
31 file://3.2.1/0004-rt2800usb-Move-ID-out-of-unknown.patch \
32 file://3.2.1/0005-offb-Fix-setting-of-the-pseudo-palette-for-8bpp.patch \
33 file://3.2.1/0006-offb-Fix-bug-in-calculating-requested-vram-size.patch \
34 file://3.2.1/0007-libertas-clean-up-scan-thread-handling.patch \
35 file://3.2.1/0008-bcma-support-for-suspend-and-resume.patch \
36 file://3.2.1/0009-wl12xx-Validate-FEM-index-from-ini-file-and-FW.patch \
37 file://3.2.1/0010-wl12xx-Check-buffer-bound-when-processing-nvs-data.patch \
38 file://3.2.1/0011-wl12xx-Restore-testmode-ABI.patch \
39 file://3.2.1/0012-powerpc-time-Handle-wrapping-of-decrementer.patch \
40 file://3.2.1/0013-powerpc-Fix-unpaired-probe_hcall_entry-and-probe_hca.patch \
41 file://3.2.1/0014-IB-qib-Fix-a-possible-data-corruption-when-receiving.patch \
42 file://3.2.1/0015-IB-uverbs-Protect-QP-multicast-list.patch \
43 file://3.2.1/0016-iwlagn-fix-TID-use-bug.patch \
44 file://3.2.1/0017-iwlagn-fix-remove-use-of-PAGE_SIZE.patch \
45 file://3.2.1/0018-perf-Fix-parsing-of-__print_flags-in-TP_printk.patch \
46 file://3.2.1/0019-ore-Fix-crash-in-case-of-an-IO-error.patch \
47 file://3.2.1/0020-ore-fix-BUG_ON-too-few-sgs-when-reading.patch \
48 file://3.2.1/0021-ore-Must-support-none-PAGE-aligned-IO.patch \
49 file://3.2.1/0022-ore-FIX-breakage-when-MISC_FILESYSTEMS-is-not-set.patch \
50 file://3.2.1/0023-reiserfs-Fix-quota-mount-option-parsing.patch \
51 file://3.2.1/0024-reiserfs-Force-inode-evictions-before-umount-to-avoi.patch \
52 file://3.2.1/0025-ext3-Don-t-warn-from-writepage-when-readonly-inode-i.patch \
53 file://3.2.1/0026-drivers-hv-Don-t-OOPS-when-you-cannot-init-vmbus.patch \
54 file://3.2.1/0027-Drivers-hv-Fix-a-bug-in-vmbus_driver_unregister.patch \
55 file://3.2.1/0028-USB-update-documentation-for-usbmon.patch \
56 file://3.2.1/0029-usbfs-Fix-oops-related-to-user-namespace-conversion.patch \
57 file://3.2.1/0030-atmel_serial-fix-spinlock-lockup-in-RS485-code.patch \
58 file://3.2.1/0031-cgroup-fix-to-allow-mounting-a-hierarchy-by-name.patch \
59 file://3.2.1/0032-udf-Fix-deadlock-when-converting-file-from-in-ICB-on.patch \
60 file://3.2.1/0033-drivers-usb-class-cdc-acm.c-clear-dangling-pointer.patch \
61 file://3.2.1/0034-USB-isight-fix-kernel-bug-when-loading-firmware.patch \
62 file://3.2.1/0035-usb-usb-storage-doesn-t-support-dynamic-id-currently.patch \
63 file://3.2.1/0036-USB-pxa168-Fix-compilation-error.patch \
64 file://3.2.1/0037-USB-add-quirk-for-another-camera.patch \
65 file://3.2.1/0038-USB-omninet-fix-write_room.patch \
66 file://3.2.1/0039-usb-option-add-ZD-Incorporated-HSPA-modem.patch \
67 file://3.2.1/0040-USB-Add-USB-ID-for-Multiplex-RC-serial-adapter-to-cp.patch \
68 file://3.2.1/0041-usb-fix-number-of-mapped-SG-DMA-entries.patch \
69 file://3.2.1/0042-xhci-Properly-handle-COMP_2ND_BW_ERR.patch \
70 file://3.2.1/0043-usb-ch9-fix-up-MaxStreams-helper.patch \
71 file://3.2.1/0044-igmp-Avoid-zero-delay-when-receiving-odd-mixture-of-.patch \
72 file://3.2.1/0045-asix-fix-infinite-loop-in-rx_fixup.patch \
73 file://3.2.1/0046-bonding-fix-error-handling-if-slave-is-busy-v2.patch \
74 file://3.2.1/0047-usb-cdc-acm-Fix-acm_tty_hangup-vs.-acm_tty_close-rac.patch \
75 file://3.2.1/0048-xfs-fix-acl-count-validation-in-xfs_acl_from_disk.patch \
76 file://3.2.1/0049-Linux-3.2.1.patch \
77 file://3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch \
78 file://3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch \
79 file://3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch \
80 file://3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch \
81 file://3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch \
82 file://3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch \
83 file://3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch \
84 file://3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch \
85 file://3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch \
86 file://3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch \
87 file://3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch \
88 file://3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch \
89 file://3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch \
90 file://3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch \
91 file://3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch \
92 file://3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch \
93 file://3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch \
94 file://3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch \
95 file://3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch \
96 file://3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch \
97 file://3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch \
98 file://3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch \
99 file://3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch \
100 file://3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch \
101 file://3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch \
102 file://3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch \
103 file://3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch \
104 file://3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch \
105 file://3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch \
106 file://3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch \
107 file://3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch \
108 file://3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch \
109 file://3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch \
110 file://3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch \
111 file://3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch \
112 file://3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch \
113 file://3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch \
114 file://3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch \
115 file://3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch \
116 file://3.2.2/0040-ima-free-duplicate-measurement-memory.patch \
117 file://3.2.2/0041-ima-fix-invalid-memory-reference.patch \
118 file://3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch \
119 file://3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch \
120 file://3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch \
121 file://3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch \
122 file://3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch \
123 file://3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch \
124 file://3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch \
125 file://3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch \
126 file://3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch \
127 file://3.2.2/0051-x86-Fix-mmap-random-address-range.patch \
128 file://3.2.2/0052-UBI-fix-nameless-volumes-handling.patch \
129 file://3.2.2/0053-UBI-fix-debugging-messages.patch \
130 file://3.2.2/0054-UBI-make-vid_hdr-non-static.patch \
131 file://3.2.2/0055-UBIFS-fix-debugging-messages.patch \
132 file://3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch \
133 file://3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch \
134 file://3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch \
135 file://3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch \
136 file://3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch \
137 file://3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch \
138 file://3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch \
139 file://3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch \
140 file://3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch \
141 file://3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch \
142 file://3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch \
143 file://3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch \
144 file://3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch \
145 file://3.2.2/0069-nfsd4-fix-lockowner-matching.patch \
146 file://3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch \
147 file://3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch \
148 file://3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch \
149 file://3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch \
150 file://3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch \
151 file://3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch \
152 file://3.2.2/0076-fix-shrink_dcache_parent-livelock.patch \
153 file://3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch \
154 file://3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch \
155 file://3.2.2/0079-pnfsblock-limit-bio-page-count.patch \
156 file://3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch \
157 file://3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch \
158 file://3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch \
159 file://3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch \
160 file://3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch \
161 file://3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch \
162 file://3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch \
163 file://3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch \
164 file://3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch \
165 file://3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch \
166 file://3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch \
167 file://3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch \
168 file://3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch \
169 file://3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch \
170 file://3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch \
171 file://3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch \
172 file://3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch \
173 file://3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch \
174 file://3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch \
175 file://3.2.2/0099-intel_idle-fix-API-misuse.patch \
176 file://3.2.2/0100-ACPI-Store-SRAT-table-revision.patch \
177 file://3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch \
178 file://3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch \
179 file://3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch \
180 file://3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch \
181 file://3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch \
182 file://3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch \
183 file://3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch \
184 file://3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch \
185 file://3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch \
186 file://3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch \
187 file://3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch \
188 file://3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch \
189 file://3.2.2/0113-I2C-OMAP-correct-SYSC-register-offset-for-OMAP4.patch \
190 file://3.2.2/0114-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch \
191 file://3.2.2/0115-x86-UV2-Fix-BAU-destination-timeout-initialization.patch \
192 file://3.2.2/0116-x86-UV2-Work-around-BAU-bug.patch \
193 file://3.2.2/0117-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch \
194 file://3.2.2/0118-rt2800pci-fix-spurious-interrupts-generation.patch \
195 file://3.2.2/0119-xfs-fix-endian-conversion-issue-in-discard-code.patch \
196 file://3.2.2/0120-i2c-eg20t-modified-the-setting-of-transfer-rate.patch \
197 file://3.2.2/0121-score-fix-off-by-one-index-into-syscall-table.patch \
198 file://3.2.2/0122-cifs-lower-default-wsize-when-unix-extensions-are-no.patch \
199 file://3.2.2/0123-kprobes-initialize-before-using-a-hlist.patch \
200 file://3.2.2/0124-proc-clear_refs-do-not-clear-reserved-pages.patch \
201 file://3.2.2/0125-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch \
202 file://3.2.2/0126-iwlagn-check-for-SMPS-mode.patch \
203 file://3.2.2/0127-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch \
204 file://3.2.2/0128-SHM_UNLOCK-fix-long-unpreemptible-section.patch \
205 file://3.2.2/0129-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch \
206 file://3.2.2/0130-Linux-3.2.2.patch \
207 file://3.2.3/0001-ALSA-hda-Fix-buffer-alignment-regression-with-Nvidia.patch \
208 file://3.2.3/0002-ALSA-hda-Fix-silent-outputs-from-docking-station-jac.patch \
209 file://3.2.3/0003-eCryptfs-Sanitize-write-counts-of-dev-ecryptfs.patch \
210 file://3.2.3/0004-ecryptfs-Improve-metadata-read-failure-logging.patch \
211 file://3.2.3/0005-eCryptfs-Make-truncate-path-killable.patch \
212 file://3.2.3/0006-eCryptfs-Check-inode-changes-in-setattr.patch \
213 file://3.2.3/0007-eCryptfs-Fix-oops-when-printing-debug-info-in-extent.patch \
214 file://3.2.3/0008-drm-radeon-kms-Add-an-MSI-quirk-for-Dell-RS690.patch \
215 file://3.2.3/0009-drm-radeon-kms-move-panel-mode-setup-into-encoder-mo.patch \
216 file://3.2.3/0010-drm-radeon-kms-rework-modeset-sequence-for-DCE41-and.patch \
217 file://3.2.3/0011-drm-Fix-authentication-kernel-crash.patch \
218 file://3.2.3/0012-xfs-Fix-missing-xfs_iunlock-on-error-recovery-path-i.patch \
219 file://3.2.3/0013-ASoC-Mark-WM5100-register-map-cache-only-when-going-.patch \
220 file://3.2.3/0014-ASoC-Disable-register-synchronisation-for-low-freque.patch \
221 file://3.2.3/0015-ASoC-Don-t-go-through-cache-when-applying-WM5100-rev.patch \
222 file://3.2.3/0016-ASoC-wm8996-Call-_POST_PMU-callback-for-CPVDD.patch \
223 file://3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch \
224 file://3.2.3/0018-mac80211-fix-work-removal-on-deauth-request.patch \
225 file://3.2.3/0019-jbd-Issue-cache-flush-after-checkpointing.patch \
226 file://3.2.3/0020-crypto-sha512-make-it-work-undo-percpu-message-sched.patch \
227 file://3.2.3/0021-crypto-sha512-reduce-stack-usage-to-safe-number.patch \
228 file://3.2.3/0022-tpm_tis-add-delay-after-aborting-command.patch \
229 file://3.2.3/0023-x86-uv-Fix-uninitialized-spinlocks.patch \
230 file://3.2.3/0024-x86-uv-Fix-uv_gpa_to_soc_phys_ram-shift.patch \
231 file://3.2.3/0025-x86-microcode_amd-Add-support-for-CPU-family-specifi.patch \
232 file://3.2.3/0026-m68k-Fix-assembler-constraint-to-prevent-overeager-g.patch \
233 file://3.2.3/0027-ALSA-hda-set-mute-led-polarity-for-laptops-with-bugg.patch \
234 file://3.2.3/0028-ALSA-hda-Fix-silent-output-on-ASUS-A6Rp.patch \
235 file://3.2.3/0029-ALSA-hda-Fix-silent-output-on-Haier-W18-laptop.patch \
236 file://3.2.3/0030-drm-i915-paper-over-missed-irq-issues-with-force-wak.patch \
237 file://3.2.3/0031-drm-i915-sdvo-always-set-positive-sync-polarity.patch \
238 file://3.2.3/0032-drm-i915-Re-enable-gen7-RC6-and-GPU-turbo-after-resu.patch \
239 file://3.2.3/0033-ARM-at91-fix-at91rm9200-soc-subtype-handling.patch \
240 file://3.2.3/0034-mach-ux500-enable-ARM-errata-764369.patch \
241 file://3.2.3/0035-ARM-7296-1-proc-v7.S-remove-HARVARD_CACHE-preprocess.patch \
242 file://3.2.3/0036-sysfs-Complain-bitterly-about-attempts-to-remove-fil.patch \
243 file://3.2.3/0037-x86-xen-size-struct-xen_spinlock-to-always-fit-in-ar.patch \
244 file://3.2.3/0038-mpt2sas-Removed-redundant-calling-of-_scsih_probe_de.patch \
245 file://3.2.3/0039-USB-option-Add-LG-docomo-L-02C.patch \
246 file://3.2.3/0040-USB-ftdi_sio-fix-TIOCSSERIAL-baud_base-handling.patch \
247 file://3.2.3/0041-USB-ftdi_sio-fix-initial-baud-rate.patch \
248 file://3.2.3/0042-USB-ftdi_sio-add-PID-for-TI-XDS100v2-BeagleBone-A3.patch \
249 file://3.2.3/0043-USB-serial-ftdi-additional-IDs.patch \
250 file://3.2.3/0044-USB-ftdi_sio-Add-more-identifiers.patch \
251 file://3.2.3/0045-USB-cdc-wdm-updating-desc-length-must-be-protected-b.patch \
252 file://3.2.3/0046-USB-cdc-wdm-use-two-mutexes-to-allow-simultaneous-re.patch \
253 file://3.2.3/0047-qcaux-add-more-Pantech-UML190-and-UML290-ports.patch \
254 file://3.2.3/0048-usb-dwc3-ep0-tidy-up-Pending-Request-handling.patch \
255 file://3.2.3/0049-usb-io_ti-Make-edge_remove_sysfs_attrs-the-port_remo.patch \
256 file://3.2.3/0050-TTY-fix-UV-serial-console-regression.patch \
257 file://3.2.3/0051-serial-amba-pl011-lock-console-writes-against-interr.patch \
258 file://3.2.3/0052-jsm-Fixed-EEH-recovery-error.patch \
259 file://3.2.3/0053-iwlwifi-fix-PCI-E-transport-inta-race.patch \
260 file://3.2.3/0054-vmwgfx-Fix-assignment-in-vmw_framebuffer_create_hand.patch \
261 file://3.2.3/0055-USB-Realtek-cr-fix-autopm-scheduling-while-atomic.patch \
262 file://3.2.3/0056-USB-usbsevseg-fix-max-length.patch \
263 file://3.2.3/0057-usb-gadget-langwell-don-t-call-gadget-s-disconnect.patch \
264 file://3.2.3/0058-usb-gadget-storage-endian-fix.patch \
265 file://3.2.3/0059-drivers-usb-host-ehci-fsl.c-add-missing-iounmap.patch \
266 file://3.2.3/0060-xhci-Fix-USB-3.0-device-restart-on-resume.patch \
267 file://3.2.3/0061-xHCI-Cleanup-isoc-transfer-ring-when-TD-length-misma.patch \
268 file://3.2.3/0062-usb-musb-davinci-fix-build-breakage.patch \
269 file://3.2.3/0063-hwmon-f71805f-Fix-clamping-of-temperature-limits.patch \
270 file://3.2.3/0064-hwmon-w83627ehf-Disable-setting-DC-mode-for-pwm2-pwm.patch \
271 file://3.2.3/0065-hwmon-sht15-fix-bad-error-code.patch \
272 file://3.2.3/0066-USB-cdc-wdm-call-wake_up_all-to-allow-driver-to-shut.patch \
273 file://3.2.3/0067-USB-cdc-wdm-better-allocate-a-buffer-that-is-at-leas.patch \
274 file://3.2.3/0068-USB-cdc-wdm-Avoid-hanging-on-interface-with-no-USB_C.patch \
275 file://3.2.3/0069-netns-fix-net_alloc_generic.patch \
276 file://3.2.3/0070-netns-Fail-conspicously-if-someone-uses-net_generic-.patch \
277 file://3.2.3/0071-net-caif-Register-properly-as-a-pernet-subsystem.patch \
278 file://3.2.3/0072-af_unix-fix-EPOLLET-regression-for-stream-sockets.patch \
279 file://3.2.3/0073-bonding-fix-enslaving-in-alb-mode-when-link-down.patch \
280 file://3.2.3/0074-l2tp-l2tp_ip-fix-possible-oops-on-packet-receive.patch \
281 file://3.2.3/0075-macvlan-fix-a-possible-use-after-free.patch \
282 file://3.2.3/0076-net-bpf_jit-fix-divide-by-0-generation.patch \
283 file://3.2.3/0077-net-reintroduce-missing-rcu_assign_pointer-calls.patch \
284 file://3.2.3/0078-rds-Make-rds_sock_lock-BH-rather-than-IRQ-safe.patch \
285 file://3.2.3/0079-tcp-fix-tcp_trim_head-to-adjust-segment-count-with-s.patch \
286 file://3.2.3/0080-tcp-md5-using-remote-adress-for-md5-lookup-in-rst-pa.patch \
287 file://3.2.3/0081-USB-serial-CP210x-Added-USB-ID-for-the-Link-Instrume.patch \
288 file://3.2.3/0082-USB-cp210x-call-generic-open-last-in-open.patch \
289 file://3.2.3/0083-USB-cp210x-fix-CP2104-baudrate-usage.patch \
290 file://3.2.3/0084-USB-cp210x-do-not-map-baud-rates-to-B0.patch \
291 file://3.2.3/0085-USB-cp210x-fix-up-set_termios-variables.patch \
292 file://3.2.3/0086-USB-cp210x-clean-up-refactor-and-document-speed-hand.patch \
293 file://3.2.3/0087-USB-cp210x-initialise-baud-rate-at-open.patch \
294 file://3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch \
295 file://3.2.3/0089-mach-ux500-no-MMC_CAP_SD_HIGHSPEED-on-Snowball.patch \
296 file://3.2.3/0090-Linux-3.2.3.patch \
297 file://3.2.4/0001-Revert-ASoC-Mark-WM5100-register-map-cache-only-when.patch \
298 file://3.2.4/0002-Revert-ASoC-Don-t-go-through-cache-when-applying-WM5.patch \
299 file://3.2.4/0003-Linux-3.2.4.patch \
300 file://3.2.5/0001-PCI-Rework-ASPM-disable-code.patch \
301 file://3.2.5/0002-Linux-3.2.5.patch \
28 file://0002-f_rndis-HACK-around-undefined-variables.patch \ 302 file://0002-f_rndis-HACK-around-undefined-variables.patch \
29 file://0003-da8xx-fb-add-DVI-support-for-beaglebone.patch \ 303 file://0003-da8xx-fb-add-DVI-support-for-beaglebone.patch \
30 file://0004-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch \ 304 file://0004-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch \