[PATCH resend] can: rcar_canfd: fix possible IRQ storm on high load

2019-06-26 Thread Nikita Yushchenko
IRQ storm: unmasked Rx interrupt happens again and again is misprocessed in the same way. This patch fixes that scenario by unmasking Rx interrupts only when napi_complete_done() returns true, which means it has cleared NAPIF_STATE_SCHED in state. Signed-off-by: Nikita Yushchenko --- drivers

Re: [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0

2019-05-31 Thread Nikita Yushchenko
>> Kernel currently does, but it is caught in >> mv88e6xxx_port_check_hw_vlan() and returns -ENOTSUPP from there. > > But VID 0 has a special meaning for the kernel, it means the port's private > database (when it is isolated, non-bridged), it is not meant to be programmed > in the switch. That's

Re: [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0

2019-05-31 Thread Nikita Yushchenko
31.05.2019 17:37, Andrew Lunn wrote: >> I'm not sure that I like the semantic of it, because the driver can actually >> support VID 0 per-se, only the kernel does not use VLAN 0. Thus I would avoid >> calling the port_vlan_del() ops for VID 0, directly into the upper DSA layer. >> >> Florian, An

[PATCH] media: avoid skipping MEDIA_PAD_FL_MUST_CONNECT logic

2019-05-31 Thread Nikita Yushchenko
In the current code, __media_pipeline_start() skips check of MEDIA_PAD_FL_MUST_CONNECT logic for entity not providing link_validate() op. Fix that by checking for existence of link_validate() at different code location. Signed-off-by: Nikita Yushchenko --- drivers/media/mc/mc-entity.c | 6

[PATCH] net: phy: support C45 phys in SIOCGMIIREG/SIOCSMIIREG ioctls

2019-05-31 Thread Nikita Yushchenko
This change allows phytool [1] and similar tools to read and write C45 phy registers from userspace. This is useful for debugging and for porting vendor phy diagnostics tools. [1] https://github.com/wkz/phytool Signed-off-by: Nikita Yushchenko --- drivers/net/phy/phy.c | 17

[PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0

2019-05-31 Thread Nikita Yushchenko
then this error code is explicitly cleared in dsa_slave_vlan_rx_kill_vid() and error message is no longer logged. Signed-off-by: Nikita Yushchenko --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/ne

[PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0

2019-05-31 Thread Nikita Yushchenko
When non-bridged, non-vlan'ed mv88e6xxx port is moving down, error message is logged: failed to kill vid 0081/0 for device eth_cu_1000_4 This is caused by call from __vlan_vid_del() with vin set to zero, over call chain this results into _mv88e6xxx_port_vlan_del() called with vid=0, and mv88e6xxx

Re: [1/3] ARM: dts: imx51-zii-common: create common include dtsi

2018-06-27 Thread Nikita Yushchenko
> There are three boards that share that configuration almost to a T, > with the only difference is the particular GPIOs used. Putting it into > a common file avoids repeating the boilerplate and makes it explicit > to the reader that those settings are shared. I'd agree if that boilerplate was 10

Re: [1/3] ARM: dts: imx51-zii-common: create common include dtsi

2018-06-27 Thread Nikita Yushchenko
> + i2c_gpio: i2c-gpio { > + compatible = "i2c-gpio"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_swi2c>; > + i2c-gpio,delay-us = <50>; > + status = "okay"; > + > + #address-cells = <1>; > + #size-c

Re: [PATCH v2] ARM: dts: imx51-zii-rdu1: Make sure SD1_WP is low

2018-05-31 Thread Nikita Yushchenko
To fix that add a pinmux configuration line configureing the pad to > function as a GPIO. While we are at it, add a corresponding > output-high GPIO hog in an effort to minimize current consumption. > > Cc: Nikita Yushchenko > Cc: Shawn Guo > Cc: Fabio Estevam > Cc: Lucas Stac

[PATCH] ARM: dts: imx51-zii-rdu1: add rave-sp subdevices

2018-05-17 Thread Nikita Yushchenko
This adds rave-sp powerbutton and backlight devices to RDU1 device tree. Signed-off-by: Nikita Yushchenko --- arch/arm/boot/dts/imx51-zii-rdu1.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/imx51-zii-rdu1.dts b/arch/arm/boot/dts/imx51-zii-rdu1.dts index

[PATCH] ARM: dts: imx51-zii-rdu1: cleanup eMMC node

2018-05-15 Thread Nikita Yushchenko
On RDU1, sdhc1 is used for eMMC, and that is 3.3V only. Thus configure device node not to probe it as SD/SDIO and not try 1.8V. Signed-off-by: Nikita Yushchenko --- arch/arm/boot/dts/imx51-zii-rdu1.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/imx51-zii-rdu1.dts

[PATCH] ARM: dts: vf610-zii-dev: enable vf610 builtin temp sensor

2018-05-15 Thread Nikita Yushchenko
Vybrid has single internal temperature sensor connected to both internal ADC modules. vf610-zii-dev already has ADC0 enabled. Now, to get temperature sensor captured by iio_hwmon driver, need to configure iio_hwmon node to use that ADC. Signed-off-by: Nikita Yushchenko --- arch/arm/boot/dts

[PATCH] ARM: dts: imx51-zii-rdu1: limit usbh1 to full-speed

2018-05-15 Thread Nikita Yushchenko
On RDU1, imx51 usbh1 interface is either not used, or used via external block that breaks USB2 signalling. To keep things working if high-speed device gets connected to that block, use ChipIdea feature to limit port to full speed. Signed-off-by: Nikita Yushchenko --- arch/arm/boot/dts/imx51

[PATCH] ARM: dts: imx51-zii-rdu1: fix touchscreen bindings

2018-05-07 Thread Nikita Yushchenko
This fixes errors in RDU1 device tree that cause touch screens not working. Signed-off-by: Nikita Yushchenko --- arch/arm/boot/dts/imx51-zii-rdu1.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx51-zii-rdu1.dts b/arch/arm/boot/dts/imx51-zii

[PATCH] ASoC: rsnd: set pm_ops in hibernate-compatible way

2018-03-20 Thread Nikita Yushchenko
Use SET_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to .suspend and .resume fields. This makes driver working after restore from hibernation. Signed-off-by: Nikita Yushchenko --- sound/soc/sh/rcar/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound

[PATCH] clk: cs2000: set pm_ops in hibernate-compatible way

2018-03-20 Thread Nikita Yushchenko
Use SET_LATE_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to .resume_early field. This fixes initialization of CS2000 in restore from hibernation in case of kernel used to load image did not initialize CS2000 while kernel being restored had CS2000 initialized. Signed-off-by: Nikita

cancel_work_sync() can cause priority invertion

2017-12-27 Thread Nikita Yushchenko
Hi For those who care about linux RT behavior: while analyzing traces, just found priority inversion caused by RT task calling cancel_work_sync(), while work item in question is executing in non-RT kworker that was preempted for significant time. WBR, Nikita Yushchenko

Re: [PATCH v6 1/2] platform: Add driver for RAVE Supervisory Processor

2017-08-31 Thread Nikita Yushchenko
>> I think that trying to make this generic is purely synthetic. This >> information is board-specific per it's nature, it comes from what board >> is designed for, different boards have quite different sets of possible >> reset reasons. What is needed is - pass this board-specific information >> t

Re: [PATCH v6 1/2] platform: Add driver for RAVE Supervisory Processor

2017-08-31 Thread Nikita Yushchenko
30.08.2017 23:38, Pavel Machek wrote: > Hi! > + * 9 -> Illegal Trap + * 10 -> Unknown + * 11 -> Crew Panel Requested >>> >>> Anyway... If you move management chip to .. I don't know, i2c, the >>> path would change. Also it would be

[PATCH v2] rtc: ds1307: add basic support for ds1341 chip

2017-08-23 Thread Nikita Yushchenko
for common use case. Full (and cumbersome) implementation can be added later if ever needed. Signed-off-by: Nikita Yushchenko Reviewed-by: Linus Walleij Tested-by: Aleksander Morgado --- drivers/rtc/Kconfig | 10 +- drivers/rtc/rtc-ds1307.c | 13 + 2 files changed,

[PATCH] rtc: ds1307: add basic support for ds1341 chip

2017-08-22 Thread Nikita Yushchenko
This adds support for reading and writing date/time from/to ds1314 chip. Other functionality (alarms, inout clock, output clock) is not added yet, because availability of that depends on chip connections. Signed-off-by: Nikita Yushchenko --- drivers/rtc/Kconfig | 10 +- drivers

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-29 Thread Nikita Yushchenko
>> - Thinking further on this, I realized that for common case signal >> polarity is something defined by chip, and thus this knowledge belongs >> to chip's driver and not to chip user's device tree. Moreover, device >> tree writer could easily be not aware of signal polarity (too many >> datasheet

Re: [PATCH/RFC] iio: hi8435: do not enable all events by default

2017-05-28 Thread Nikita Yushchenko
>> Still, isn't there subsystem-level default that all events are disabled >> by default? If such, then current hi8435 state breaks subsystem-level >> rules, which is a [userspace-visible] bug. I'm not sure how far should >> we go in bug compatibility. > > It is indeed the subsystem default (as m

Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device

2017-05-25 Thread Nikita Yushchenko
>> +&edma1 { >> +status = "okay"; >> +}; >> + >> +&dspi2 { > > Please keep these labelled nodes sort alphabetically. Ok >> +bus-num = <1>; >> +pinctrl-names = "default"; >> +pinctrl-0 = <&pinctrl_dspi2>; >> +status = "okay"; > > We usually have 'status' line at the bottom of

Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device

2017-05-25 Thread Nikita Yushchenko
>> "Crap origin" here is that in vast majority of cases, polarity is >> per-chip, not per-chip-use, knowledge. And proper location for per-chip >> knowledge is chip's driver. Moving this knowledge to per-chip-use >> location in device trees only provides a source for errors, with little >> gain. >

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-24 Thread Nikita Yushchenko
> Reset GPIO is active low. > > Currently driver uses gpiod_set_value(1) to clean reset, which depends > on device tree to contain GPIO_ACTIVE_HIGH - that does not match reality. > > This fixes driver to use _raw version of gpiod_set_value() to enforce > active-low seman

Re: [PATCH/RFC] iio: hi8435: do not enable all events by default

2017-05-24 Thread Nikita Yushchenko
24.05.2017 22:27, Jonathan Cameron wrote: > On Tue, 23 May 2017 11:08:30 +0300 > Nikita Yushchenko wrote: > >> Having all events enabled by default is misleading. >> Userspace should explicitly enable events they want to receive. >> >> Signed-off-by: Nikita Y

Re: [PATCH] iio: hi8435: fix race between event enable and event generation

2017-05-24 Thread Nikita Yushchenko
>> Add locking to avoid interference between reading/processing current >> sence in event enable and event generation paths. >> >> Signed-off-by: Nikita Yushchenko > Make sense. Could you give a little more detail on the seriousness > of this bug? I need to asse

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-23 Thread Nikita Yushchenko
>> Reset GPIO is active low. >> >> Currently driver uses gpiod_set_value(1) to clean reset, which depends >> on device tree to contain GPIO_ACTIVE_HIGH - that does not match reality. >> >> This fixes driver to use _raw version of gpiod_set_value() to enforce >> active-low semantics despite of what'

[PATCH/RFC] iio: hi8435: do not enable all events by default

2017-05-23 Thread Nikita Yushchenko
Having all events enabled by default is misleading. Userspace should explicitly enable events they want to receive. Signed-off-by: Nikita Yushchenko --- drivers/iio/adc/hi8435.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/iio/adc/hi8435.c b/drivers/iio/adc/hi8435.c index

[PATCH] iio: hi8435: remote ampersands from hi8435_info definition

2017-05-23 Thread Nikita Yushchenko
C syntax allows apersands when initializing structures fields with function pointers, but in Linux sources ampersands are normally not used in thix context. Signed-off-by: Nikita Yushchenko --- drivers/iio/adc/hi8435.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH] iio: hi8435: fix race between event enable and event generation

2017-05-23 Thread Nikita Yushchenko
Add locking to avoid interference between reading/processing current sence in event enable and event generation paths. Signed-off-by: Nikita Yushchenko --- drivers/iio/adc/hi8435.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/iio/adc/hi8435.c b/drivers/iio/adc/hi8435.c

Re: [PATCH 2/4] iio: hi8435: avoid garbage event at first enable

2017-05-23 Thread Nikita Yushchenko
>> +int ret; >> +u32 tmp; >> + >> +if (state) { >> +ret = hi8435_readl(priv, HI8435_SO31_0_REG, &tmp); >> +if (ret < 0) >> +return ret; >> +if (tmp & BIT(chan->channel)) >> +priv->event_prev_val |= BIT(chan->channel); >> +else >> +

Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device

2017-05-22 Thread Nikita Yushchenko
>> However, hi8435 driver historically was coded using inverted values >> passed to gpiolib calls. And there are setups in the wild with device >> trees containing GPIO_ACTIVE_HIGH that I'd prefer not breaking. >> >> To solve, I submitted a patch on hi8435 driver that changes to _raw() >> gpio cal

Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

2017-05-22 Thread Nikita Yushchenko
Hi, Alternative solution could be - have separate write path for earlycon. >>> >>> It looks to me having the same issue with a separate write patch >>> for earlycon as we still need distinguish Little or Big endian >>> for Layerscape and IMX. >>> At a glance, it is dozen lines of code. >

Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device

2017-05-22 Thread Nikita Yushchenko
>> +hi8435@1 { >> +compatible = "holt,hi8435"; >> +reg = <1>; >> +spi-max-frequency = <2000>; >> +gpios = <&gpio5 3 0>; > > Nit: GPIO_ACTIVE_HIGH instead of 0? Gray area here. Chip's reset input is active LOW. However, hi8435 driver histor

[PATCH] spi: spi-fsl-dspi: ensure non-zero return on error path

2017-05-22 Thread Nikita Yushchenko
Propagate error return from dspi_request_dma() into probe routine's return. Signed-off-by: Nikita Yushchenko --- drivers/spi/spi-fsl-dspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 1520164

[PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device

2017-05-22 Thread Nikita Yushchenko
ZII dev board rev B has a Holt Hi8435 connected to dspi2. Add it to device tree. ZII dev board rev C does not have that, so use rev-b dts file, not common dtsi file. Signed-off-by: Nikita Yushchenko --- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 19 +++ 1 file changed, 19

[PATCH 2/4] iio: hi8435: avoid garbage event at first enable

2017-05-19 Thread Nikita Yushchenko
es reliable sequence for userspace: - enable event, - AFTER THAT read current value, - AFTER THAT each event will correspond to change. Signed-off-by: Nikita Yushchenko --- drivers/iio/adc/hi8435.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/iio/ad

[PATCH 3/4] iio: hi8435: make in_voltage_sensing_mode_available visible

2017-05-19 Thread Nikita Yushchenko
Possible values of sensing_mode are encoded with strings and actual atrings used are not obvious. Provide a hint by enabling in_voltage_sensing_mode_available attribute. Signed-off-by: Nikita Yushchenko --- drivers/iio/adc/hi8435.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

[PATCH 1/4] iio: hi8435: add raw access

2017-05-19 Thread Nikita Yushchenko
With current event-only driver, it is not possible for user space application to know current senses if they don't change since application starts. Address that by adding raw access to channels. Signed-off-by: Nikita Yushchenko --- drivers/iio/adc/hi8435.c | 22 ++ 1

[PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-19 Thread Nikita Yushchenko
en in device tree. Allowing device tree to override that only opens possibility for errors and does not add any value. Additionally, use _cansleep version to make things work with i2c-gpio and other sleeping gpio drivers. Signed-off-by: Nikita Yushchenko --- drivers/iio/adc/hi8435.c | 12 +++---

Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

2017-05-17 Thread Nikita Yushchenko
Hi My view of your statement is: - you currently assume only a few cases for this driver - builtin UART in vf610, ls1012a and imx7, - in each of these cases, all lpuart instances share same endian, thus having that in global var works for these cases, - having that in global var makes it possible

Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

2017-05-16 Thread Nikita Yushchenko
>> Code should be consistent. >> > > Yes. > >> There is no good reason to have sport->lpuart32 inside sport, but >> lpuart_is_be outside of it. Both these values describe properties of >> particular device, and thus should be in per-device structure. >> > > That's for special case, normally we w

Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

2017-05-16 Thread Nikita Yushchenko
> static u32 lpuart32_read(void __iomem *addr) > { > - return ioread32be(addr); > + return lpuart_is_be ? ioread32be(addr) : readl(addr); > } > > static void lpuart32_write(u32 val, void __iomem *addr) > { > - iowrite32be(val, addr); > + if (lpuart_is_

Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

2017-05-16 Thread Nikita Yushchenko
>>> @@ -2000,6 +2007,7 @@ static int lpuart_probe(struct platform_device *pdev) >>> } >>> sport->port.line = ret; >>> sport->lpuart32 = sdata->is_32; >>> + lpuart_is_be = sdata->is_be; >> >> Setting a global variable in per-device routine is quite bad design. >> > > There is a reason

Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

2017-05-16 Thread Nikita Yushchenko
17.05.2017 06:39, Dong Aisheng wrote: > On Tue, May 16, 2017 at 02:15:08PM +0300, Nikita Yushchenko wrote: >>> static u32 lpuart32_read(void __iomem *addr) >>> { >>> - return ioread32be(addr); >>> + return lpuart_is_be ? ioread32be(addr) : rea

Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

2017-05-16 Thread Nikita Yushchenko
> static u32 lpuart32_read(void __iomem *addr) > { > - return ioread32be(addr); > + return lpuart_is_be ? ioread32be(addr) : readl(addr); > } > > static void lpuart32_write(u32 val, void __iomem *addr) > { > - iowrite32be(val, addr); > + if (lpuart_is_be) > + iowr

Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

2017-05-16 Thread Nikita Yushchenko
> @@ -2000,6 +2007,7 @@ static int lpuart_probe(struct platform_device *pdev) > } > sport->port.line = ret; > sport->lpuart32 = sdata->is_32; > + lpuart_is_be = sdata->is_be; Setting a global variable in per-device routine is quite bad design.

Re: [PATCH] pinctrl: when claiming hog, skip maps not served by same device

2017-05-12 Thread Nikita Yushchenko
>> +/* >> + * If pctldev is not null, we are claiming hog for it, >> + * that means, setting that is served by pctldev by itself. >> + * >> + * Thus we must skip map that is for this device but is served >> + * by other device.

[PATCH] pinctrl: when claiming hog, skip maps not served by same device

2017-05-11 Thread Nikita Yushchenko
et to pinctrl device being registered. Need also check that map's control device is also set to the same. Signed-off-by: Nikita Yushchenko --- drivers/pinctrl/core.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 1653

Re: pinctrl-sx150x.c broken in 4.11

2017-05-11 Thread Nikita Yushchenko
>>> Maybe create_pinctrl() could check if the pin controller device >>> for a potential hog points to the device itself and bail out >>> if that's not the case? >> >> Well that's exactly what patch from my first mail in this thread does. >> This indeed fixes my case, but I don't know if it is corre

Re: pinctrl-sx150x.c broken in 4.11

2017-05-11 Thread Nikita Yushchenko
>>> Hmm maybe yeah. I don't quite follow the above the "pinctrl-0 property >>> of sx150x device tree node, is misinterpreted as hog" part though. >> >> sx150x is i2c-gpio device. It has 16 GPIO lines that are communicated >> with via i2c bus, and an interrupt line. >> >> Interrupt line is typicall

Re: pinctrl-sx150x.c broken in 4.11

2017-05-11 Thread Nikita Yushchenko
> Hmm maybe yeah. I don't quite follow the above the "pinctrl-0 property > of sx150x device tree node, is misinterpreted as hog" part though. sx150x is i2c-gpio device. It has 16 GPIO lines that are communicated with via i2c bus, and an interrupt line. Interrupt line is typically connected to So

pinctrl-sx150x.c broken in 4.11

2017-05-10 Thread Nikita Yushchenko
Hi Looks like recent pinctrl changes - possibly commit 99e4f67508e1 ("pinctrl: core: Use delayed work for hogs") - breaks pinctrl-sx150x driver in all setups where it has any pinctrl settings in device tree. AFAIU, pinctrl-sx150x is not a real pinctrl/pinmux driver, but it uses pinctrl subsystem

Re: regression for m68k/coldfire

2017-02-02 Thread Nikita Yushchenko
> Hi, > > your commit 80cca775cdc4f8555612d2943a2872076b33e0ff breaks Linux > booting in qemu-system-m68k: Hi. Do you compile with CONFIG_M5272? Is f85de347c974cdf97b1026180995d912d7d0 also in your tree? Nikita

Re: blk_queue_bounce_limit() broken for mask=0xffffffff on 64bit archs

2017-01-12 Thread Nikita Yushchenko
>> There is a use cases when architecture is 64-bit but hardware supports >> only DMA to lower 4G of address space. E.g. NVMe device on RCar PCIe host. >> >> For such cases, it looks proper to call blk_queue_bounce_limit() with >> mask set to 0x - thus making block layer to use bounce buff

Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops()

2017-01-12 Thread Nikita Yushchenko
Hmm, I think when the dma-ranges are missing, we should either enforce a 32-bit mask, or disallow DMA completely. It's probably too late for the latter, I wish we had done this earlier in order to force everyone on ARM64 to have a valid dma-ranges property for any DMA master.

Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops()

2017-01-11 Thread Nikita Yushchenko
12.01.2017 08:52, Nikita Yushchenko wrote: >>> diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c >>> b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c >>> index 5ac373c..480b644 100644 >>> --- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c >>> +++ b/drivers/

Re: [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops()

2017-01-11 Thread Nikita Yushchenko
>> diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c >> b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c >> index 5ac373c..480b644 100644 >> --- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c >> +++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c >> @@ -540,7 +540,7 @@ int fsl_mc_device_add(struct dprc_obj_desc

Re: [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports

2017-01-11 Thread Nikita Yushchenko
>> @@ -959,6 +990,15 @@ void arch_setup_dma_ops(struct device *dev, u64 >> dma_base, u64 size, >> if (!dev->archdata.dma_ops) >> dev->archdata.dma_ops = &swiotlb_dma_ops; >> >> + /* >> +* Whatever the parent bus can set. A device must not set >> +* a

[PATCH resend] swiotlb: ensure that page-sized mappings are page-aligned

2017-01-11 Thread Nikita Yushchenko
-by: Nikita Yushchenko --- lib/swiotlb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 975b8fc..a8d74a7 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -483,11 +483,11 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev

[PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops()

2017-01-11 Thread Nikita Yushchenko
ional boolean argument to arch_setup_dma_ops() to show if range originates from authorative source and thus should be enforced, or is just a guess and should be handled as such. Signed-off-by: Nikita Yushchenko --- arch/arm/include/asm/dma-mapping.h | 1 + arch/arm/mm/dma-mapp

[PATCH 0/2] arm64: fix handling of DMA masks wider than bus supports

2017-01-11 Thread Nikita Yushchenko
> I reckon the easiest way forward would be to pass in some flag to > arch_setup_dma_ops to indicate whether it's an explicitly-configured > range or not - then simply initialising parent_dma_mask to ~0 for the > default case *should* keep things working as before. Tried to do t

[PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports

2017-01-11 Thread Nikita Yushchenko
evice capabilities. To avoid breakage, actual mask must not be set wider than device connection allows. Signed-off-by: Nikita Yushchenko CC: Arnd Bergmann CC: Robin Murphy CC: Will Deacon --- arch/arm64/Kconfig | 3 +++ arch/arm64/include/asm/device.h | 1 + arch/arm64/in

Re: [PATCH v2] arm64: do not set dma masks that device connection can't handle

2017-01-11 Thread Nikita Yushchenko
> I actually have a third variation of this problem involving a PCI root > complex which *could* drive full-width (40-bit) addresses, but won't, > due to the way its PCI<->AXI interface is programmed. That would require > even more complicated dma-ranges handling to describe the windows of > valid

Re: [PATCH v2] arm64: do not set dma masks that device connection can't handle

2017-01-10 Thread Nikita Yushchenko
>> What issue "IOMMU doesn't solve"? >> >> Issue I'm trying to address is - inconsistency within swiotlb >> dma_map_ops, where (1) any wide mask is silently accepted, but (2) then >> mask is used to decide if bounce buffers are needed or not. This >> inconsistency causes NVMe+R-Car cobmo not workin

Re: [PATCH v2] arm64: do not set dma masks that device connection can't handle

2017-01-10 Thread Nikita Yushchenko
Hi > The point here is that an IOMMU doesn't solve your issue, and the > IOMMU-backed DMA ops need the same treatment. In light of that, it really > feels to me like the DMA masks should be restricted in of_dma_configure > so that the parent mask is taken into account there, rather than hook > int

Re: NVMe vs DMA addressing limitations

2017-01-09 Thread Nikita Yushchenko
eeded here. Nikita > On Tue, Jan 10, 2017 at 09:47:21AM +0300, Nikita Yushchenko wrote: >> I'm now working with HW that: >> - is now way "low end" or "obsolete", it has 4G of RAM and 8 CPU cores, >> and is being manufactured and developed, >>

NVMe vs DMA addressing limitations

2017-01-09 Thread Nikita Yushchenko
>> I believe the bounce buffering code you refer to is not in SATA/SCSI/MMC >> but in block layer, in particular it should be controlled by >> blk_queue_bounce_limit(). [Yes there is CONFIG_MMC_BLOCK_BOUNCE but it >> is something completely different, namely it is for request merging for >> hw not

blk_queue_bounce_limit() broken for mask=0xffffffff on 64bit archs

2017-01-09 Thread Nikita Yushchenko
Hi There is a use cases when architecture is 64-bit but hardware supports only DMA to lower 4G of address space. E.g. NVMe device on RCar PCIe host. For such cases, it looks proper to call blk_queue_bounce_limit() with mask set to 0x - thus making block layer to use bounce buffers for any

Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask

2017-01-09 Thread Nikita Yushchenko
[CCing NVMe maintainers since we are discussion issues in that driver] >> With my patch applied and thus 32bit dma_mask set for NVMe device, I do >> see high addresses passed to dma_map_*() routines and handled by >> swiotlb. Thus your statement that behavior "succeed 64bit dma_set_mask() >> opera

Re: [alsa-devel] [PATCH] Revert "ASoC: core: replace aux_comp_list to component_dev_list"

2017-01-08 Thread Nikita Yushchenko
>>> I run into same issue and posted a patch: >> >>> "ASoC: Fix binding and probing of auxiliary components". >> >> Which I applied so I guess things are fine now without the revert? I'm >> still working through backlog from the holidays so didn't check >> properly yet. > > This fixes the Allwinn

[PATCH v2] arm64: do not set dma masks that device connection can't handle

2017-01-08 Thread Nikita Yushchenko
and dev->dma_coherent_mask must still keep values that hardware handles physically. This patch enforces that. Based on original version by Arnd Bergmann , extended with coherent mask hadnling. Signed-off-by: Nikita Yushchenko CC: Arnd Bergmann --- Changes since v1: - fixed issues noted by Serg

Re: [PATCH] arm64: do not set dma masks that device connection can't handle

2017-01-08 Thread Nikita Yushchenko
>> +if (mask > dev->archdata.parent_dma_mask) >> +mask = dev->archdata.parent_dma_mask; >> + >> + > >One empty line is enough... Ok >> +/* >> + * Whatever the parent bus can set. A device must not set >> + * a DMA mask larger than this. >> + */ >> +dev->archda

[PATCH] arm64: do not set dma masks that device connection can't handle

2017-01-06 Thread Nikita Yushchenko
and dev->dma_coherent_mask must still keep values that hardware handles physically. This patch enforces that. Based on original version by Arnd Bergmann , extended with coherent mask hadnling. Signed-off-by: Nikita Yushchenko CC: Arnd Bergmann --- ... now with initially missed change in arch_se

[PATCH] arm64: do not set dma masks that device connection can't handle

2017-01-06 Thread Nikita Yushchenko
and dev->dma_coherent_mask must still keep values that hardware handles physically. This patch enforces that. Based on original version by Arnd Bergmann , extended with coherent mask hadnling. Signed-off-by: Nikita Yushchenko CC: Arnd Bergmann --- arch/arm64/Kconfig | 3 +++

Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask

2017-01-06 Thread Nikita Yushchenko
>>> Just a guess, but if the inbound translation windows in the host >>> bridge are wider than 32-bit, the reason for setting up a single >>> 32-bit window is probably because that is what the parent bus supports. I've re-checked rcar-pcie hardware documentation. It indeed mentions that AXI bus i

Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask

2017-01-04 Thread Nikita Yushchenko
For OF platforms, this is called via of_dma_configure(), that checks dma-ranges of node that is *parent* for host bridge. Host bridge currently does not control this at all. >>> >>> We need to think about this a bit. Is it actually the PCI host >>> bridge that limits the ranges here,

Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask

2017-01-04 Thread Nikita Yushchenko
>> For OF platforms, this is called via of_dma_configure(), that checks >> dma-ranges of node that is *parent* for host bridge. Host bridge >> currently does not control this at all. > > We need to think about this a bit. Is it actually the PCI host > bridge that limits the ranges here, or the bus

Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask

2017-01-03 Thread Nikita Yushchenko
> commit 9a57d58d116800a535510053136c6dd7a9c26e25 > Author: Arnd Bergmann > Date: Tue Nov 17 14:06:55 2015 +0100 > > [EXPERIMENTAL] ARM64: check implement dma_set_mask > > Needs work for coherent mask > > Signed-off-by: Arnd Bergmann Unfortunately this is far incomplete

Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask

2017-01-03 Thread Nikita Yushchenko
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 290a84f..49645277 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -28,6 +28,7 @@ #include #include #include +#include #include

Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask

2017-01-03 Thread Nikita Yushchenko
t; >> This is the least destructive approach: currently dma_mask of that device >> object is not used anyhow, thus all existing setups will work as before, >> and modification is required only in actually affected components - >> driver of particular PCI host bridge, and dma_

[PATCH] swiotlb: ensure that page-sized mappings are page-aligned

2017-01-03 Thread Nikita Yushchenko
Some drivers (e.g. nvme) do depend on page mappings to be page aligned. Swiotlb already enforces such alignment for mappings greater than page, extend that to page-sized mappings as well. Signed-off-by: Nikita Yushchenko --- lib/swiotlb.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [RFC] input: Add disable sysfs entry for every input device

2016-12-30 Thread Nikita Yushchenko
Hi > &dev_attr_properties.attr, > + &dev_arrr_disable.attr, Typo here. After fixing that, Tested-by: Nikita Yushchenko

[PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask

2016-12-29 Thread Nikita Yushchenko
on is required only in actually affected components - driver of particular PCI host bridge, and dma_map_ops of particular platform. Signed-off-by: Nikita Yushchenko --- arch/arm64/mm/dma-mapping.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/

[PATCH 2/2] rcar-pcie: set host bridge's DMA mask

2016-12-29 Thread Nikita Yushchenko
This gives platform DMA mapping code a chance to disallow setting device DMA mask to something that host bridge can't support. Signed-off-by: Nikita Yushchenko --- drivers/pci/host/pcie-rcar.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/pci/host/pcie-rcar.c b/driver

Re: [alsa-devel] [PATCH] Revert "ASoC: core: replace aux_comp_list to component_dev_list"

2016-12-29 Thread Nikita Yushchenko
>> This reverts commit 1a653aa44725668590b36bbe2d7fe4736a69f055 ("ASoC: >> core: replace aux_comp_list to component_dev_list"). >> >> That commit tries to remove card->aux_comp_list, using flagged entries >> in card->component_dev_list instead. >> >> However, components are added to card->component

[PATCH] Revert "ASoC: core: replace aux_comp_list to component_dev_list"

2016-12-29 Thread Nikita Yushchenko
soc_probe_component() was not yet called for them. Thus all aux devices are lost and any setup that needs them no longer works. Signed-off-by: Nikita Yushchenko --- Fixed lost line in commit message ;) include/sound/soc.h | 4 +++- sound/soc/soc-core.c | 17 + 2 files cha

[PATCH] Revert "ASoC: core: replace aux_comp_list to component_dev_list"

2016-12-29 Thread Nikita Yushchenko
aux devices are lost and any setup that needs them no longer works. Signed-off-by: Nikita Yushchenko --- include/sound/soc.h | 4 +++- sound/soc/soc-core.c | 17 + 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 2

lkml.org issues

2016-12-26 Thread Nikita Yushchenko
Hi Is lkml.org supported? Currently: - [headers] link on top of pages does not show message headers, - [forward] link on top of pages is not functional - it requests text from captcha but does not show image. [forward] could be useful to get a list mail that one did not receive, to be able to

Re: arm64: mm: bug around swiotlb_dma_ops

2016-12-23 Thread Nikita Yushchenko
> If trying to avoid big changes and only fixing particular problem with > particular device not working on arm64, I think best way is to > alter__swiotlb_dma_supported() in arch/arm64/mm/dma-mapping.c to detect > and decline (with -EIO) mask that is unsupported by device connection. > This will co

Re: arm64: mm: bug around swiotlb_dma_ops

2016-12-23 Thread Nikita Yushchenko
>> Thus recommended dma_set_mask_and_coherent() call, instead of checking >> if platform supports 64-bit DMA addressing, unconditionally enables >> 64-bit DMA addressing. In case of device actually can't do DMA to 64-bit >> addresses (e.g. because of limitations in PCIe controller), this breaks >>

Re: [v4,1/3] ARM: dts: vf610-zii-dev-rev-b: Remove leftover PWM pingroup

2016-12-21 Thread Nikita Yushchenko
Andrey Smirnov Tested-by: Nikita Yushchenko

Re: [v4, 3/3] ARM: dts: vf610-zii-dev-rev-b: Remove 'fixed-link' from DSA ports

2016-12-21 Thread Nikita Yushchenko
> Remove 'fixed-link' nodes from DSA ports since they are not needed (they > are not limiting link's speed and the ports will be configured to their > maximux speed as a default) > > Suggested-by: Andrew Lunn > Signed-off-by: Andrey Smirnov With this patch, ports connected to revB's second switc

Re: at86rf230: Allow slow GPIO pins for "rstn"

2016-12-21 Thread Nikita Yushchenko
f where such restriction might be inconvenient, > consider a hardware design where "rstn" is connected to a pin of I2C/SPI > GPIO expander chip. > > Cc: Chris Healy > Signed-off-by: Andrey Smirnov Reviewed-by: Nikita Yushchenko

Re: [PATCH v2] clk: imx: pllv3: support fractional multiplier on vf610 PLL1/PLL2

2016-12-19 Thread Nikita Yushchenko
> Anyway, regardless of my comments above: > > Teseted-by: Andrey Smirnov Thanks. Just sent v3 with all comments worked on. Nikita

[PATCH v3] clk: imx: pllv3: support fractional multiplier on vf610 PLL1/PLL2

2016-12-19 Thread Nikita Yushchenko
ly Signed-off-by: Nikita Yushchenko Tested-by: Andrey Smirnov --- Changes since v2: - restructured per suggesions by Andrey Smirnov: - returned register access routines back to recalc_rate() / set_rate(), - renamed mf <-> rate convertion routines - fixed spelling errors. Changes since v1

arm64: mm: bug around swiotlb_dma_ops

2016-12-15 Thread Nikita Yushchenko
Hi. Per Documentation/DMA-API-HOWTO.txt, driver of device capable of 64-bit DMA addressing, should call dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)) and if that succeeds, assume that 64-bit DMA addressing is available. This behaves incorrectly on arm64 system (Renesas r8a7795-h3ulcb) here. -

  1   2   >