summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-12-15video: tegra: dc: Move DSI clock configuration to DC.Kevin Huang
We'd better place clock set-up in dc as HDMI. It makes code cleaner. Also eliminate a false warning. Bug 902786 Bug 850852 Signed-off-by: Kevin Huang <kevinh@nvidia.com> Reviewed-on: http://git-master/r/65024 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> (cherry picked from commit e570e8dd45a66f11f0fc432f5919c5a036e34ba0) Change-Id: I90d73602048e2b3c706550128ba04665c307da22 Reviewed-on: http://git-master/r/68863 Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com> Tested-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2011-12-15arm: tegra: Fix build break when PM_SLEEP is not selectedScott Williams
Fix the build break when PM_SLEEP is not select that was introduced by the restructuring of the reset handler code for Trusted Foundations support. Change-Id: I039d84f9244be52dd0a6a3b50d78d7189acb2ea8 Reviewed-on: http://git-master/r/68753 Tested-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Chris Johnson <cwj@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com>
2011-12-15nvmap_mru: fix off-by-oneColin Patrick McCabe
Change-Id: I1b8fa9d950dc2e8260363593ec0e41f70d275fac Signed-off-by: Colin Patrick McCabe <cmccabe@nvidia.com> Reviewed-on: http://git-master/r/68745 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com>
2011-12-15video: tegra: nvmap: Update page attributes as per request.Krishna Reddy
After allocating pages, Update page attributes in kernel page table as per mem type requested. Bug 865816 Reviewed-on: http://git-master/r/56334 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com> (cherry picked from commit bea4d449f4ff7090e0c2797693d2348f4586d8f6) Reviewed-on: http://git-master/r/62720 Tested-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Hiro Sugawara <hsugawara@nvidia.com> Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> (cherry picked from commit 975fb95585543124de282faa4481433b147f61c6) Change-Id: Iee71f8b37c405731314a1441cdb30ca848b41399 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/68744 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2011-12-15nvmap_dev: fix BUG_ON of unsigned numberColin Patrick McCabe
Change-Id: Ic5f70fe468651dab331059feda438d6e8871ef8a Signed-off-by: Colin Patrick McCabe <cmccabe@nvidia.com> Reviewed-on: http://git-master/r/68741 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com>
2011-12-15net: wireless: bcm4329: Fix build with gcc-4.6.1Stephen Warren
Add a couple -Wno-error options when building with the new toolchain; it's stricter. These can be removed once the code is fixed not to cause warnings (see bug 888158). Bug 830289 Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Matt Pedro <mapedro@nvidia.com> (cherry picked from commit 4a2bbb6dc6ab70a8e562d8db4d6016c28c290ce0) Change-Id: I9944bf4a5fac005fed5ff5d92c38c5be32ea6f55 Reviewed-on: http://git-master/r/68740 Tested-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Allen Martin <amartin@nvidia.com>
2011-12-15Revert "ARM: tegra: power: Use peek ahead timers not event notification"Prashant Gaikwad
This reverts commit 3f5e640849383b1d5ed551aa84e0a89578519f09. Change-Id: I5af3fab193204d121a0ea4a939d6e950d2c4a633 Reviewed-on: http://git-master/r/68680 Reviewed-by: Andy Park <andyp@nvidia.com> Tested-by: Andy Park <andyp@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com>
2011-12-15tegra: HDMI: add underscan capability exposure via sysfsVictor Ryabukhin
TVs/monitors which do not support underscan will crop HDMI picture. Underscan information might be needed in userspace to adjust HDMI resolution so that the picture will be shown correctly on such devices. Bug 911580 Bug 912187 Change-Id: I1eec810d860e13dafef895cb85b32fd8187a4e02 Signed-off-by: Victor Ryabukhin <vryabukhin@nvidia.com> Reviewed-on: http://git-master/r/68616 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-12-15ARM: defconfig: Enable CAIF support.Raj Jayaraman
Bug 886459 (cherry picked from commit 80b35eff76334a1a62192aa99c9d5dcb8c1ba76b) Change-Id: I7f7914eeff30001ce6c56ecd26d1c61e6e981df1 Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com> Reviewed-on: http://git-master/r/68559 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2011-12-15misc: tegra-baseband: Control M7400 service pin.Raj Jayaraman
M7400 service pin should be held high by a pullup internal to it for flashless mode. This is not working. As a fix, drive the signal high from AP. Bug 886459 (cherry picked from commit 1516ce643ca9c6e52540023342c27791b8a69867) Change-Id: I8a5ba9be6bcaf9119f5b81fe30de20cb8dc412d0 Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com> Reviewed-on: http://git-master/r/68505 Reviewed-by: Steve Lin <stlin@nvidia.com>
2011-12-15media: video: tegra: sh532u focuser driverErik Lilliebjerg
Adding default calibration data for the cases where no focuser EPROM data exists. Bug 909087 Change-Id: I303e8dd3883f93c1ebca1dd00c6726b0afc099d2 Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/68466 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2011-12-15arm: tegra: enterprise: Add support for M7400 modem.Raj Jayaraman
Bug 878736 Bug 886459 (cherry picked from commit b840e235505829d7e11f2a984fb39d34bfb8f8d9) Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com> Change-Id: I08e48d03eced6e24f2b005d6f6a73cd4fec5c368 Reviewed-on: http://git-master/r/68295 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2011-12-15ARM: tegra: whistler: remove baseband init when there is no modemVarun Wadekar
When personnality/odmdata is not set to 0x2 (no i450 baseband) baseband init is called. Side effect is loss of console on UARTA and LP0 failure. Bug 912378 Bug 913070 Bug 907350 Signed-off-by: Martin Chabot <mchabot@nvidia.com> Reviewed-on: http://git-master/r/68980 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com> Conflicts: arch/arm/mach-tegra/board-whistler.c Change-Id: Iab96d89b3741ae4535ce3d3eccb8ba31d13a85ff Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-15misc: tegra-baseband: Add support for M7400 modem.Raj Jayaraman
Bug 878736 Bug 886459 (cherry picked from commit 6f6a3b6759f95b833a3c98ee45015592f388b161) Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com> Change-Id: Ieb5e9313ad9d6a32a813dadd911f448d8b334b42 Reviewed-on: http://git-master/r/68289 Reviewed-by: Rajkumar Jayaraman <rjayaraman@nvidia.com> Tested-by: Rajkumar Jayaraman <rjayaraman@nvidia.com> Reviewed-by: Steve Lin <stlin@nvidia.com>
2011-12-15arm: tegra: enterprise: Power down CEC and CLK_32K_OUT/BLINK padsDaniel Solomon
- Disabling HDMI CEC, which is generally not supported by T30. - Clear APBDEV_PMC_DPD_PADS_ORIDE_0_BLINK at boot time - Pull down CLK_32K_OUT/BLINK Bug 898597 Cherry-picked From: http://git-master/r/#change,63408 Signed-off-by: Daniel Solomon <daniels@nvidia.com> Change-Id: Ic6e6a5ddf16adf9e8f5a847a31ce7c902e3df9bc Reviewed-on: http://git-master/r/68558 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2011-12-15video: tegra: host: Return EBUSY when mutex busyTerje Bergstrom
ERESTARTSYS can be used only when there is a signal pending to cause a system call restart. In other cases, we must return a proper error number to use space. Change-Id: I018b051ec4cb63a0509762c39b47cc4420a21baa Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/68178 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2011-12-15video: tegra: host: Use polling in nvhost_cdma_flush()Terje Bergstrom
nvhost_cdma_flush() waits for channel to become empty before returning. If there is already another process waiting for semaphore, nvhost_cdma_flush() needs to use polling. Change-Id: Ic0c3d7adc68b3ed93056ec73c16f685d6f1ba15e Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/68163 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2011-12-15video: tegra: host: Fix race in suspend/resumeTerje Bergstrom
Implement proper mutex locking for nvhost_module_suspend(). At the same time the ordering of suspend is changed to first suspend clients and then host1x. This simplifies the power management code, and makes nvhost_resume() a no-op. Bug 906607 Change-Id: I60048773944369f73094140fb16682638966c731 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/68084 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2011-12-15ASoC: Tegra WM8753 machine: Disable regulator when not in useSumit Bhattacharya
On whistler audio regulator used to remain enabled always independent of whether audio playback/capture is going on or not. Only enable audio regulator when any playback/capture is going on using audio codec. Change-Id: Ifb8bf722434306a429aa08345215efde75c8ab38 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/68695 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15ASoC: Tegra: return accurate pcm pointer positionSumit Bhattacharya
Use DMA driver tegra_dma_get_transfer_count api to get current DMA position and use it to return accurate PCM poiter position. Change-Id: I28906a1f2dd47dd91f03b8a79f53196752be6083 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/68692 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15tegra: fb: HDMI monitor spec. not correct via "mode" device.Andre Sihera
When monitor is auto-detected on HDMI port, a special structure is initialised to hold the video mode properties for the plugged- in monitor. From this the display string is generated for displa via the "mode" character device under /sys. When the monitor is disconnected, the structures associated with the monitor tself are cleared, but the pointer to the video mode properties structure was left initialised and so pointed into thin air, which resulted in garbage appearing on the "mode" device. Added explicit deinitialisation code to reset pointer to video mode properties so "cat mode" within /sys yields an empty string when the HDMI monitor is unplugged. Bug 849877 Reviewed-on: http://git-master/r/41205 (cherry picked from commit 8cecf2d7fbdf4d00945f3dd13bfe00161d4231d5) Change-Id: Ibf3f070fa7904e8a01966d2886bbe07e9b69a607 Reviewed-on: http://git-master/r/68588 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15kernel: sound: soc: Enable voice call dai linkVinod G
Enabling the dai link for voice call devices. Change-Id: Ie89ae4cbc1ae987c56776706c5e4cf1bbd6c8f18 Reviewed-on: http://git-master/r/68575 Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-12-15kernel: arm: tegra: Enable baseband device.Vinod G
Add bandband device needed for voice call connection. Change-Id: I01c068d13dbb42d0689c3caa4f4c9a69dad2cb3a Reviewed-on: http://git-master/r/68574 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15arm: tegra: defconfig: remove CONFIG_USB_EHCI_ONOFF_FEATURESeshendra Gadagottu
CONFIG_USB_EHCI_ONOFF_FEATURE is removed. Dynamic add/removel of hcd driver can be used instead of this feature. BUG 787720 Change-Id: I325d870b0d2242b97273eff40cfb228d5c965682 Reviewed-on: http://git-master/r/68394 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15usb: host: tegra: CONFIG_USB_EHCI_ONOFF_FEATURE deprecatedSeshendra Gadagottu
CONFIG_USB_EHCI_ONOFF_FEATURE is removed. Dynamic add/removel of hcd driver can be used instead of above feature. BUG 787720 Reviewed-on: http://git-master/r/65105 (cherry picked from commit a07377e01cd0a67f04cb74345e5a372bfc0059fb) Change-Id: I185c08d09440cf683afc5eb1dc3f0dff5f93d25b Reviewed-on: http://git-master/r/68393 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15arm: tegra: enterprise: register/unregister functions for hsicSeshendra Gadagottu
Added functions for register and unregister usb hsic device with kernel. Updated xmm platform data with these function pointers. BUG 787270 Reviewed-on: http://git-master/r/65092 (cherry picked from commit 7655d416cfef35bd68c9b0daf16253b4f4e013c6) Change-Id: Ie3c5478164a4ee1a5b2e00e39827bb005d30a904 Reviewed-on: http://git-master/r/68392 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15arm: tegra: irq: any polarity lp0 wake changeBitan Biswas
False lp0 wakeup due to wake sources configured as any polarity was traced to an earlier change. Reverting the change. bug 906073 bug 909193 Change-Id: I1b2d8ecb265e9a57b5d2514f86853bd59481b58a Signed-off-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-on: http://git-master/r/68700 Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2011-12-15ASoC: Tegra: Acquire wake_lock during playback captureSumit Bhattacharya
Acquire wake_lock from alsa kernel when pcm playback/capture starts and hold it until playack/capture ends. It is needed to prevent device from going into suspend state in middle of audio playback. Change-Id: I71e5fae0268f73a3e57f8d886c1b228d46899ea4 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/68671 Reviewed-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-12-15ASoC: WM8903: Disable irq before suspendSumit Bhattacharya
When codec enters suspend mic bias gets turned off. As a result if a mic is already plugged in a mic removal event gets triggered. Once codec driver gets mic removal interrupt it sleeps for the duration of debounce time which causes kernel power manager to abort suspend. To avoid this scenario disable mic detect IRQ before powering off codec and enable the same during resume. Change-Id: Ic3c90d73c9f2742b6771f7e3fe0e3fb1f59e1cd9 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/68662 Reviewed-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-12-15arm: tegra: comms: dynamic loading of hcd driverSeshendra Gadagottu
ehci on/off mechanism is replaced with dynamic add/removel of ehci-hcd driver. BUG 787270 Reviewed-on: http://git-master/r/65091 (cherry picked from commit 50381a027547354140d599876f452ff6a304e330) Change-Id: Ic9827c23fdbf367b87bb4ba153b65e7c867576d3 Reviewed-on: http://git-master/r/68391 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2011-12-15usb : tegra : reduce the EMC clock for USBHyungwoo Yang
This change reduces the EMC clock required by USB host/gadget from 150Mhz to 100Mhz. Bug ID : 817811 Reviewed-on: http://git-master/r/54571 (cherry picked from commit 6b208d6dae6844410b9cc29c30664ce7df44e989) Change-Id: I0d227121b7d212f44db82348ea66b2798150f387 Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com> Reviewed-on: http://git-master/r/68072 Reviewed-by: Luke Huang <lhuang@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2011-12-15regulator: fan53555: Adding driverJake Park
Adding regulator driver for the device FAN53555. Bug 892117 Change-Id: I895094d3e0aaeb85cfd33f1bc16008c66961b403 Reviewed-on: http://git-master/r/67862 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Jake Park <jakep@nvidia.com>
2011-12-14Merge branch 'linux-3.1.5' into android-tegra-nv-3.1Varun Wadekar
Conflicts: arch/arm/Kconfig Change-Id: If8aaaf3efcbbf6c9017b38efb6d76ef933f147fa Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-14arm: tegra: pm: preserve r4 - r11 across a suspendVarun Wadekar
Make cpu_suspend()..return function preserve r4 to r11 across a suspend cycle. This is in preparation of relieving platform support code from this task. Original commit: 5fa94c812c0001ac7c3d8868e956ec514734a352 Bug 911002 Change-Id: If33c32ba7de449288eac8f83cb0898ba77a46333 Acked-by: Frank Hofmann <frank.hofmann@tomtom.com> Tested-by: Kevin Hilman <khilman@ti.com> Acked-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-14arm: tegra: pm: move return address (for cpu_resume) to top of stackVarun Wadekar
Move the return address for cpu_resume to the top of stack so that cpu_resume looks more like a normal function. Original commit: 2fefbcd58590cf33189c6178098e12b31b994b5f Bug 911002 Change-Id: I275930306a3b4ecb551a32da5f9f26dba53459ec Acked-by: Frank Hofmann <frank.hofmann@tomtom.com> Tested-by: Kevin Hilman <khilman@ti.com> Acked-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-13Revert "ARM: pm: move cpu_init() call into core code"Varun Wadekar
This reverts commit 14cd8fd574bce1cfbe510ccb1f73c7c1024d770f. Conflicts: arch/arm/kernel/sleep.S Bug 911002 Change-Id: I814e25bb8c4ae5b5351fd2bec58d57c9d86ef429 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/68652 Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
2011-12-09Linux 3.1.5v3.1.5Greg Kroah-Hartman
2011-12-09sch_red: fix red_changeEric Dumazet
[ Upstream commit 1ee5fa1e9970a16036e37c7b9d5ce81c778252fc ] Le mercredi 30 novembre 2011 à 14:36 -0800, Stephen Hemminger a écrit : > (Almost) nobody uses RED because they can't figure it out. > According to Wikipedia, VJ says that: > "there are not one, but two bugs in classic RED." RED is useful for high throughput routers, I doubt many linux machines act as such devices. I was considering adding Adaptative RED (Sally Floyd, Ramakrishna Gummadi, Scott Shender), August 2001 In this version, maxp is dynamic (from 1% to 50%), and user only have to setup min_th (target average queue size) (max_th and wq (burst in linux RED) are automatically setup) By the way it seems we have a small bug in red_change() if (skb_queue_empty(&sch->q)) red_end_of_idle_period(&q->parms); First, if queue is empty, we should call red_start_of_idle_period(&q->parms); Second, since we dont use anymore sch->q, but q->qdisc, the test is meaningless. Oh well... [PATCH] sch_red: fix red_change() Now RED is classful, we must check q->qdisc->q.qlen, and if queue is empty, we start an idle period, not end it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09sch_red: fix red_calc_qavg_from_idle_timeEric Dumazet
[ Upstream commit ea6a5d3b97b768561db6358f15e4c84ced0f4f7e ] Since commit a4a710c4a7490587 (pkt_sched: Change PSCHED_SHIFT from 10 to 6) it seems RED/GRED are broken. red_calc_qavg_from_idle_time() computes a delay in us units, but this delay is now 16 times bigger than real delay, so the final qavg result smaller than expected. Use standard kernel time services since there is no need to obfuscate them. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09ipv4: make sure RTO_ONLINK is saved in routing cacheJulian Anastasov
[ Upstream commit f61759e6b831a55b89e584b198c3da325e2bc379 ] __mkroute_output fails to work with the original tos and uses value with stripped RTO_ONLINK bit. Make sure we put the original TOS bits into rt_key_tos because it used to match cached route. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09ipv4: Perform peer validation on cached route lookup.David S. Miller
[ Upstream commit efbc368dcc6426d5430b9b8eeda944cf2cb74b8c, incorporating a follow-on change to prevent an OOPS ] Otherwise we won't notice the peer GENID change. Reported-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09inet: add a redirect generation id in inetpeerEric Dumazet
[ Upstream commit de68dca1816660b0d3ac89fa59ffb410007a143f ] Now inetpeer is the place where we cache redirect information for ipv4 destinations, we must be able to invalidate informations when a route is added/removed on host. As inetpeer is not yet namespace aware, this patch adds a shared redirect_genid, and a per inetpeer redirect_genid. This might be changed later if inetpeer becomes ns aware. Cache information for one inerpeer is valid as long as its redirect_genid has the same value than global redirect_genid. Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com> Tested-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09ipv4: fix redirect handlingEric Dumazet
[ Upstream commit 9cc20b268a5a14f5e57b8ad405a83513ab0d78dc ] commit f39925dbde77 (ipv4: Cache learned redirect information in inetpeer.) introduced a regression in ICMP redirect handling. It assumed ipv4_dst_check() would be called because all possible routes were attached to the inetpeer we modify in ip_rt_redirect(), but thats not true. commit 7cc9150ebe (route: fix ICMP redirect validation) tried to fix this but solution was not complete. (It fixed only one route) So we must lookup existing routes (including different TOS values) and call check_peer_redir() on them. Reported-by: Ivan Zahariev <famzah@icdsoft.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09route: fix ICMP redirect validationFlavio Leitner
[ Upstream commit 7cc9150ebe8ec06cafea9f1c10d92ddacf88d8ae ] The commit f39925dbde7788cfb96419c0f092b086aa325c0f (ipv4: Cache learned redirect information in inetpeer.) removed some ICMP packet validations which are required by RFC 1122, section 3.2.2.2: ... A Redirect message SHOULD be silently discarded if the new gateway address it specifies is not on the same connected (sub-) net through which the Redirect arrived [INTRO:2, Appendix A], or if the source of the Redirect is not the current first-hop gateway for the specified destination (see Section 3.3.1). Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09ipv4: avoid useless call of the function check_peer_pmtuGao feng
[ Upstream commit 59445b6b1f90b97c4e28062b96306bacfa4fb170 ] In func ipv4_dst_check,check_peer_pmtu should be called only when peer is updated. So,if the peer is not updated in ip_rt_frag_needed,we can not inc __rt_peer_genid. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09sch_teql: fix lockdep splatEric Dumazet
[ Upstream commit f7e57044eeb1841847c24aa06766c8290c202583 ] We need rcu_read_lock() protection before using dst_get_neighbour(), and we must cache its value (pass it to __teql_resolve()) teql_master_xmit() is called under rcu_read_lock_bh() protection, its not enough. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09qeth: l3 fix rcu splat in xmitFrank Blaschka
[ Upstream commit 1d36cb479f204a0fedc1a3e7ce7b32c0a2c48769 ] when use dst_get_neighbour to get neighbour, we need rcu_read_lock to protect, since dst_get_neighbour uses rcu_dereference. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09ipv4: fix lockdep splat in rt_cache_seq_showEric Dumazet
[ Upstream commit 218fa90f072e4aeff9003d57e390857f4f35513e ] After commit f2c31e32b378 (fix NULL dereferences in check_peer_redir()), dst_get_neighbour() should be guarded by rcu_read_lock() / rcu_read_unlock() section. Reported-by: Miles Lane <miles.lane@gmail.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09ipv4: fix for ip_options_rcv_srr() daddr update.Li Wei
[ Upstream commit b12f62efb8ec0b9523bdb6c2d412c07193086de9 ] When opt->srr_is_hit is set skb_rtable(skb) has been updated for 'nexthop' and iph->daddr should always equals to skb_rtable->rt_dst holds, We need update iph->daddr either. Signed-off-by: Li Wei <lw@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09ah: Read nexthdr value before overwriting it in ahash input callback.Nick Bowler
[ Upstream commit b7ea81a58adc123a4e980cb0eff9eb5c144b5dc7 ] The AH4/6 ahash input callbacks read out the nexthdr field from the AH header *after* they overwrite that header. This is obviously not going to end well. Fix it up. Signed-off-by: Nick Bowler <nbowler@elliptictech.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>