Age | Commit message (Collapse) | Author | Files | Lines |
|
The -EIO returned here can end up overriding whatever error is marked in
the address space, and be returned at fsync time, even when there is a
more appropriate error stored in the mapping.
Read errors are also sometimes tracked on a per-page level using
PG_error. Suppose we have a read error on a page, and then that page is
subsequently dirtied by overwriting the whole page. Writeback doesn't
clear PG_error, so we can then end up successfully writing back that
page and still return -EIO on fsync.
Worse yet, PG_error is cleared during a sync() syscall, but the -EIO
return from that is silently discarded. Any subsystem that is relying on
PG_error to report errors during fsync can easily lose writeback errors
due to this. All you need is a stray sync() call to wait for writeback
to complete and you've lost the error.
Since the handling of the PG_error flag is somewhat inconsistent across
subsystems, let's just rely on marking the address space when there are
writeback errors. Change the TestClearPageError call to ClearPageError,
and make __filemap_fdatawait_range a void return function.
Signed-off-by: Jeff Layton <[email protected]>
|
|
filemap_write_and_wait{_range} will return an error if writeback
initiation fails, but won't clear errors in the address_space. This is
particularly problematic on DAX, as filemap_fdatawrite* is
effectively synchronous there. Ensure that we clear the AS_EIO/AS_ENOSPC
flags when filemap_fdatawrite* returns an error.
Signed-off-by: Jeff Layton <[email protected]>
|
|
Resetting this flag is almost certainly racy, and will be problematic
with some coming changes.
Make filemap_fdatawait_keep_errors return int, but not clear the flag(s).
Have jbd2 call it instead of filemap_fdatawait and don't attempt to
re-set the error flag if it fails.
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Carlos Maiolino <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
|
|
I noticed on xfs that I could still sometimes get back an error on fsync
on a fd that was opened after the error condition had been cleared.
The problem is that the buffer code sets the write_io_error flag and
then later checks that flag to set the error in the mapping. That flag
perisists for quite a while however. If the file is later opened with
O_TRUNC, the buffers will then be invalidated and the mapping's error
set such that a subsequent fsync will return error. I think this is
incorrect, as there was no writeback between the open and fsync.
Add a new mark_buffer_write_io_error operation that sets the flag and
the error in the mapping at the same time. Replace all calls to
set_buffer_write_io_error with mark_buffer_write_io_error, and remove
the places that check this flag in order to set the error in the
mapping.
This sets the error in the mapping earlier, at the time that it's first
detected.
Signed-off-by: Jeff Layton <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Carlos Maiolino <[email protected]>
|
|
ext2 currently does a test+clear of the AS_EIO flag, which is
is problematic for some coming changes.
What we really need to do instead is call filemap_check_errors
in __generic_file_fsync after syncing out the buffers. That
will be sufficient for this case, and help other callers detect
these errors properly as well.
With that, we don't need to twiddle it in ext2.
Suggested-by: Jan Kara <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Matthew Wilcox <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Matthew Wilcox <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
|
|
The error code should be negative. Since this ends up in the default case
anyway, this is harmless, but it's less confusing to negate it. Also,
later patches will require a negative error code here.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jeff Layton <[email protected]>
Reviewed-by: Ross Zwisler <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Matthew Wilcox <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
|
|
With gcc 4.1.2:
drivers/ptp/ptp_dte.c: In function ‘dte_write_nco_delta’:
drivers/ptp/ptp_dte.c:105: warning: integer constant is too large for ‘long’ type
drivers/ptp/ptp_dte.c:112: warning: integer constant is too large for ‘long’ type
drivers/ptp/ptp_dte.c:114: warning: integer constant is too large for ‘long’ type
Add the missing "LL" suffix to fix this.
Fixes: 8a56aa107f1e8123 ("ptp: Add a ptp clock driver for Broadcom DTE")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
to find the correct route entry.
if there are several same route entries with different outgoing net device,
application's socket specifies the oif through setsockopt with
SO_BINDTODEVICE, sctpv6 should choose the route entry whose outgoing net
device is the oif which was specified by socket, set the value of
flowi6_oif to sk->sk_bound_dev_if to make sctp_v6_get_dst to find the
correct route entry.
Signed-off-by: Zheng Li <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
copy_to_user() copies the struct the pointer is pointing to, but the
length check compares against sizeof(pointer) and not sizeof(struct).
On 32-bit the size is probably the same, so it might have worked
accidentally.
Signed-off-by: Matthias Rosenfelder <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Fixes: 6797318e623d ("tcp: md5: add an address prefix for key lookup")
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Lennert reported a failure to add different mpls encaps in a multipath
route:
$ ip -6 route add 1234::/16 \
nexthop encap mpls 10 via fe80::1 dev ens3 \
nexthop encap mpls 20 via fe80::1 dev ens3
RTNETLINK answers: File exists
The problem is that the duplicate nexthop detection does not compare
lwtunnel configuration. Add it.
Fixes: 19e42e451506 ("ipv6: support for fib route lwtunnel encap attributes")
Signed-off-by: David Ahern <[email protected]>
Reported-by: João Taveira Araújo <[email protected]>
Reported-by: Lennert Buytenhek <[email protected]>
Acked-by: Roopa Prabhu <[email protected]>
Tested-by: Lennert Buytenhek <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
The code that detects a failed soft reset of Octeon is comparing the wrong
value against the reset value of the Octeon SLI_SCRATCH_1 register,
resulting in an inability to detect a soft reset failure. Fix it by using
the correct value in the comparison, which is any non-zero value.
Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
Fixes: c0eab5b3580a ("liquidio: CN23XX firmware download")
Signed-off-by: Derek Chickles <[email protected]>
Signed-off-by: Satanand Burla <[email protected]>
Signed-off-by: Raghu Vatsavayi <[email protected]>
Signed-off-by: Felix Manlunas <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Vikram reported the following backtrace:
BUG: scheduling while atomic: swapper/7/0/0x00000002
CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.9.32-perf+ #680
schedule
schedule_hrtimeout_range_clock
schedule_hrtimeout
wait_task_inactive
__kthread_bind_mask
__kthread_bind
__kthread_unpark
kthread_unpark
cpuhp_online_idle
cpu_startup_entry
secondary_start_kernel
He analyzed correctly that a parked cpu hotplug thread of an offlined CPU
was still on the runqueue when the CPU came back online and tried to unpark
it. This causes the thread which invoked kthread_unpark() to call
wait_task_inactive() and subsequently schedule() with preemption disabled.
His proposed workaround was to "make sure" that a parked thread has
scheduled out when the CPU goes offline, so the situation cannot happen.
But that's still wrong because the root cause is not the fact that the
percpu thread is still on the runqueue and neither that preemption is
disabled, which could be simply solved by enabling preemption before
calling kthread_unpark().
The real issue is that the calling thread is the idle task of the upcoming
CPU, which is not supposed to call anything which might sleep. The moron,
who wrote that code, missed completely that kthread_unpark() might end up
in schedule().
The solution is simpler than expected. The thread which controls the
hotplug operation is waiting for the CPU to call complete() on the hotplug
state completion. So the idle task of the upcoming CPU can set its state to
CPUHP_AP_ONLINE_IDLE and invoke complete(). This in turn wakes the control
task on a different CPU, which then can safely do the unpark and kick the
now unparked hotplug thread of the upcoming CPU to complete the bringup to
the final target state.
Control CPU AP
bringup_cpu();
__cpu_up() ------------>
bringup_ap();
bringup_wait_for_ap()
wait_for_completion();
cpuhp_online_idle();
<------------ complete();
unpark(AP->stopper);
unpark(AP->hotplugthread);
while(1)
do_idle();
kick(AP->hotplugthread);
wait_for_completion(); hotplug_thread()
run_online_callbacks();
complete();
Fixes: 8df3e07e7f21 ("cpu/hotplug: Let upcoming cpu bring itself fully up")
Reported-by: Vikram Mulukutla <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Sebastian Sewior <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Andrew Morton <[email protected]>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1707042218020.2131@nanos
Signed-off-by: Thomas Gleixner <[email protected]>
|
|
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Daniel Thompson <[email protected]>
Acked-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
include/linux/i2c is not for client devices.
Move the header file to a more appropriate location.
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Daniel Thompson <[email protected]>
Acked-by: Michael Hennerich <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
The LP87565 chip is a power management IC for Portable Navigation Systems
and Tablet Computing devices. It contains the following components:
- Configurable Bucks(Single and multi-phase).
- Configurable General Purpose Output Signals (GPO).
The LP87565-Q1 variant device uses two 2-phase outputs configuration,
Buck0 is master for Buck0/1 output and Buck2 is master for Buck2/3
output.
Signed-off-by: Keerthy <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Currently we request the irq when probing, but never free it. So after
unbind ec driver, this irq will be left requested, which would break
the next bind:
[ 2683.338437] genirq: Flags mismatch irq 64. 00002008 (chromeos-ec) vs. 00002008 (chromeos-ec)
[ 2683.338591] cros-ec-spi spi5.0: request irq 64: error -16
[ 2683.338610] cros-ec-spi spi5.0: cannot register EC
[ 2683.338656] cros-ec-spi: probe of spi5.0 failed with error -16
Signed-off-by: Jeffy Chen <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Acked-by: Rob Herring <[email protected]>
Reviewed-by: Jingoo Han <[email protected]>
Signed-off-by: Olimpiu Dejeu <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Remove the register DA9062AA_BBAT_CONT (0x0C5) from the DA9061 chip model
regmap access ranges. This applies to both da9061_aa_readable_ranges[]
and da9061_aa_writeable_ranges[].
This change is to correct the DA9061 chip model and align it with the
latest DA9061 Datasheet.
This register previously appeared in the DA9061 Datasheet, Revision 3.2,
01-Mar-2016 and has been removed from later DA9061 datasheet from Dialog,
Revision 3.3, 04-Apr-2017.
Signed-off-by: Steve Twiss <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Remove the register DA9062AA_BBAT_CONT (0x0C5) from the DA9061 chip model
regmap access ranges. This applies to both da9061_aa_readable_ranges[]
and da9061_aa_writeable_ranges[].
This change is to correct the DA9061 chip model and align it with the
latest DA9061 Datasheet.
This register previously appeared in the DA9061 Datasheet, Revision 3.2,
01-Mar-2016 and has been removed from later DA9061 datasheet from Dialog,
Revision 3.3, 04-Apr-2017.
Signed-off-by: Steve Twiss <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
On x86 the AXP288 PMIC provides an ACPI OpRegion handler, which must be
available before other drivers using it are loaded, which can only be
ensured if the MFD, OpRegion and i2c-bus drivers are built-in.
Since the AXP20x MFD code is used on non x86 too we cannot simply change
this into a bool, I've tried some Kconfig magic with if x86 but I could
not get this working correctly, so this commit just documents that this
should be built-in on x86, which fixes errors like these during boot:
mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion]
ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-2
ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93
ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Node ffff93543b
acpi 80860F14:02: Failed to change power state to D0
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Chen-Yu Tsai <[email protected]>
Tested-by: russianneuromancer <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Add mfd driver for Intel CHT Whiskey Cove PMIC, based on various non
upstreamed CHT Whiskey Cove PMIC patches.
This is a somewhat minimal version which adds irqchip support and cells
for: ACPI PMIC opregion support, the i2c-controller driving the external
charger irc and the pwrsrc/extcon block.
Further cells can be added in the future if/when drivers are upstreamed
for them.
[The above patch caused a build error on some archetectures]
From: Arnd Bergmann <[email protected]>
I ran into a build error on ARM with a platform that has a non-standard
clk implementation:
drivers/clk/clk.o: In function `clk_disable':
clk.c:(.text.clk_disable+0x0): multiple definition of `clk_disable'
arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_disable+0x0): first defined here
drivers/clk/clk.o: In function `clk_enable':
clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable'
arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_enable+0x0): first defined here
The problem is a device driver that uses 'select COMMON_CLK', which is
generally a bad idea: selecting a subsystem should only be done from
a platform, otherwise we run into circular dependencies. The same driver
also selects 'GPIOLIB' and 'I2C', which has a similar effect.
This turns all three into 'depends on', as it should be.
Finally, we can limit the build to x86, unless we are compile testing.
First patch:
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Fix for first patch (squashed):
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
The SIMATIC IOT2020 and IOT2040 are derived from the Galileo Gen2 board
and share its I2C frequency.
Signed-off-by: Sascha Weisenberger <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Avoids reimplementation of DMI matching in intel_quark_i2c_setup.
Signed-off-by: Jan Kiszka <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Usage of devm_of_platform_populate() simplify driver code
by allowing to delete cpcap_remove().
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Usage of devm_of_platform_populate() simplify driver code
by allowing to delete pmic_spmi_remove().
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Use devm_of_platform_populate() instead of of_platform_populate()
and suppress stm32_timers_remove() which become useless.
Signed-off-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
The Crystal Cove PMIC provides an ACPI OPRegion handler, which must be
available before other drivers using it are loaded, which is why
INTEL_SOC_PMIC is a bool.
Just having the driver is not enough, the driver for the i2c-bus must
also be built in, to ensure this, this patch adds a select for it.
This fixes errors like these during boot:
mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion] (20170119/evregion-166)
ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-299)
ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93543b0cde10), AE_NOT_EXIST (20170119/psparse-543)
ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Node ffff93543b0b5cd0), AE_NOT_EXIST (20170119/psparse-543)
acpi 80860F14:02: Failed to change power state to D0
While at it this patch also changes the human readable name of the Kconfig
option to make clear the INTEL_SOC_PMIC option selects support for the
Intel Crystal Cove PMIC and documents why this is a bool.
[The above patch caused a build error on some archetectures]
From: Arnd Bergmann <[email protected]>
I ran into a build error on ARM with a platform that has a non-standard
clk implementation:
drivers/clk/clk.o: In function `clk_disable':
clk.c:(.text.clk_disable+0x0): multiple definition of `clk_disable'
arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_disable+0x0): first defined here
drivers/clk/clk.o: In function `clk_enable':
clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable'
arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_enable+0x0): first defined here
The problem is a device driver that uses 'select COMMON_CLK', which is
generally a bad idea: selecting a subsystem should only be done from
a platform, otherwise we run into circular dependencies. The same driver
also selects 'GPIOLIB' and 'I2C', which has a similar effect.
This turns all three into 'depends on', as it should be.
Finally, we can limit the build to x86, unless we are compile testing.
First patch:
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Fix for first patch (squashed):
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Additions to search terms for files supported by Dialog Semiconductor.
This update will allow Dialog support to follow files for device tree
bindings (onkey, thermal and watchdog) and source code for chip thermal
monitoring drivers.
Signed-off-by: Steve Twiss <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
struct irq_domain_ops is not modified, so it can be made const.
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
found
As silently failing isn't that nice, emit an error message at a place
that was silent on failure up to now.
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Link to the generic GPIO specifier bindings now that the second cell of
the binding has some support in the driver.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Add NULL check before dereferencing pointer of_id in order to avoid
a potential NULL pointer dereference.
Addresses-Coverity-ID: 1408830
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Add NULL check before dereferencing pointer of_id in order to avoid
a potential NULL pointer dereference.
Addresses-Coverity-ID: 1408829
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
The request should be resent when DMA transfer error occurred.
For rts5227, the clock rate needs to be reduced when error occurred.
Signed-off-by: Steven Feng <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
As axp20x-regulator now supports AXP803, add a cell for it.
Signed-off-by: Icenowy Zheng <[email protected]>
Acked-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Remove the restart handler registered in probe on device remove.
Fixes: a370f60a58ec ("mfd: rn5t618: Register restart handler")
Signed-off-by: Stefan Agner <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Since a copy of the pdata was added into the core struct in
commit f6dd8449cd50 ("mfd: wm831x: Add basic device tree binding")
the pdata pointer in probe can no longer be NULL. As such remove
the redundant checks for this case.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
These hexdumps get printed no matter if CONFIG_DEBUG is set or
not. Just get rid of them.
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Intel Cannonlake PCH has the same LPSS than Intel Kabylake. Add the new IDs
to the list of supported devices.
Signed-off-by: Mika Westerberg <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Signed-off-by: Al Viro <[email protected]>
|
|
the drm_file parameter is unused, so remove it.
Signed-off-by: Chris Wilson <[email protected]>
Cc: Dave Airlie <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
|