Re: [PATCH 0/2] Make finding fixup nodes more robust

2018-01-26 Thread Sascha Hauer
Hi Sam, On Fri, Jan 26, 2018 at 09:46:32PM +0100, Sam Ravnborg wrote: > Hi Sasha. > > On Fri, Jan 26, 2018 at 08:26:42PM +0100, Sascha Hauer wrote: > > Recently the node names in i.MX6 device tree files have changed. The > > leading zeroes were removed from the addresses. With this a newer > > ba

Re: [PATCH] fs: Fix memory leak in mount()

2018-01-26 Thread Sam Ravnborg
Hi Sasha. On Fri, Jan 26, 2018 at 08:42:27PM +0100, Sascha Hauer wrote: > "path" is allocated by normalise_path() and thus must be > freed. This was done in the error path, but not in the success > path. > > Signed-off-by: Sascha Hauer > --- > fs/fs.c | 2 ++ > 1 file changed, 2 insertions(+) >

[PATCH] bootargs: Fix memory leak in linux_bootargs_get()

2018-01-26 Thread Sascha Hauer
globalvar_get_match() returns an allocated string which may be empty. We have to free() the empty string aswell. Signed-off-by: Sascha Hauer --- common/bootargs.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/bootargs.c b/common/bootargs.c index a89f23a3f2..f0a

Re: [PATCH 0/2] Make finding fixup nodes more robust

2018-01-26 Thread Sam Ravnborg
Hi Sasha. On Fri, Jan 26, 2018 at 08:26:42PM +0100, Sascha Hauer wrote: > Recently the node names in i.MX6 device tree files have changed. The > leading zeroes were removed from the addresses. With this a newer > barebox doesn't find the nodes to fixup in an old device tree and > an older barebox

[PATCH] fs: Fix memory leak in mount()

2018-01-26 Thread Sascha Hauer
"path" is allocated by normalise_path() and thus must be freed. This was done in the error path, but not in the success path. Signed-off-by: Sascha Hauer --- fs/fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/fs.c b/fs/fs.c index 6f15e93ba9..7d0d97906d 100644 --- a/fs/fs.c +++ b/fs

[PATCH 0/2] Make finding fixup nodes more robust

2018-01-26 Thread Sascha Hauer
Recently the node names in i.MX6 device tree files have changed. The leading zeroes were removed from the addresses. With this a newer barebox doesn't find the nodes to fixup in an old device tree and an older barebox doesn't find the nodes in a new device tree. To fix this we create new names of t

[PATCH 2/2] of: mtd: partition: Use reproducible node names for fixup

2018-01-26 Thread Sascha Hauer
The full names of device nodes are not as stable as we like them to be. Lately the leading zeroes in the i.MX6 device trees were removed which led to the result that we can no longer find the partition nodes in the to be fixed tree. Use reproducible names to overcome this. Signed-off-by: Sascha Ha

[PATCH 1/2] of: Add function to find the same node in another tree

2018-01-26 Thread Sascha Hauer
For our device tree fixups we have to find a node corresponding to another node in another device tree. We used to use the full name to match the nodes, but this falls apart when nodes get renamed or for example a new bus hierarchy is introduced. To make this more robust we create reproducible name

[PATCH v3 2/5] net/e1000: use correct bit for flash detection

2018-01-26 Thread Lucas Stach
Fixes: 95c346ccaa6d (net/e1000: don't access the (simulated) eeprom when it is invalid) Signed-off-by: Lucas Stach --- drivers/net/e1000/e1000.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 155

[PATCH v3 5/5] net/e1000: don't register EERPOM device if the content is invalid

2018-01-26 Thread Lucas Stach
If the EEPROM content isn't valid, there is no point in registering the EEPROM device, as it will reject any read attempt anyway. Signed-off-by: Lucas Stach --- drivers/net/e1000/eeprom.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --gi

[PATCH v3 3/5] net/e1000: EEPROM isn't valid if only iNVM is available

2018-01-26 Thread Lucas Stach
There is no point in registering the emulated EEPROM device if only the iNVM is available with no external flash attached to the i210, as in practice it's only shadowing the iNVM. When the EEPROM is populated from iNVM, the signature is not valid, which causes other parts of the driver to fall ove

[PATCH v3 4/5] net/e1000: don't check EEPROM signature if populated from iNVM

2018-01-26 Thread Lucas Stach
The EEPROM device will contain an invalid signature if it has been populated from iNVM. Since the iNVM enum type has been removed, the only way to tell if a signature check makes sense is to look at the EEPROM valid status. Signed-off-by: Lucas Stach --- drivers/net/e1000/eeprom.c | 10 -

[PATCH v3 1/5] net/e1000: remove one level of indentation

2018-01-26 Thread Lucas Stach
By returning early if the MAC type isn't e1000_igb. Signed-off-by: Lucas Stach --- drivers/net/e1000/eeprom.c | 121 +++-- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c index 748d8af

Re: [PATCH v3 3/3] sandbox: add i2c and spi libftdi1 bit-bang example

2018-01-26 Thread Antony Pavlov
On Thu, 25 Jan 2018 08:12:36 +0100 Sascha Hauer wrote: > On Mon, Jan 22, 2018 at 12:59:18PM +0300, Antony Pavlov wrote: > > Make necessary changes in sandbox_defconfig: > > enable gpio, spi, i2c and led stuff. > > > > Usage: > > > > barebox$ make sandbox_defconfig > > barebox$ sed -i "s/# C