On Tue, May 21, 2019 at 04:44:13PM +0200, Jan Remmet wrote:
> if written_length is read from a partial written bucket it may be to
> big and xmalloc will panic barebox.
>
> Check if the value is sane.
>
> Signed-off-by: Jan Remmet
> ---
> common/state/backend_bucket_direct.c | 4
> 1 file
Starting with commit 5a1a5ed2537d ("ARM: images: use piggydata") this file type
is not known anymore, so clean up.
Signed-off-by: Ulrich Ölmann
---
images/.gitignore | 1 -
images/Makefile | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/images/.gitignore b/images/.gitigno
Table 3. Boot mode setting in the user's guide[1] lists
0010 as 'Boot from EMMC'. Adjust diagram accordingly.
[1]: https://www.mouser.com/ds/2/302/IMX8MDQLQEVKHUG-1280333.pdf
Signed-off-by: Ahmad Fatoum
---
Documentation/boards/imx/nxp-imx8mq-evk.rst | 2 +-
1 file changed, 1 insertion(+), 1 de
From: Sascha Hauer
This adds initial support for OP-TEE, see https://www.op-tee.org/
barebox starts in secure mode as usual. When booting a kernel
the bootm code also loads the optee_os binary. Instead of jumping
into the kernel barebox jumps into the optee_os binary and puts
the kernel executio
Since ehci->qh_list is an array, convert the code to use
ehci->qh_list[0] to access its first element to make things a bit more
clear. No functional change intended.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-
Memory allocated by dma_alloc_coherent() is already zeroed out,
ehci->qh_list[0] never changes during the operation of the driver and
ehci->qh_list[1] will be explicitly initialized by ehci_submit_async()
so this additional memset() shouldn't be necessary.
Signed-off-by: Andrey Smirnov
---
drive
Re-organize the epilogue of ehci_submit_async() to bail out early if
token is still marked as "active" and drop no longer necessary check
for "dev->status != USB_ST_NOT_PROC". While at it return -EIO instead
of -1 in the case of error.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a6f497925..050a3166e 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hc
We use a fixed circular list for asynchronous schedule that never
changes, so if we drop an explicit memset() that zeros out an entire
struct and replace it with code initializine all of the fields
explicitly, we can set QH list once in ehci_init() and never touch it
again.
While at it move qt_alt
Neither of those is necessary, since both will be overwritten further
down in the code.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 7194a48c0..0
Change the type of 'c' to bool and drop the trigrah.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 03ab56b30..f0d899e82 100644
--- a/drivers/u
Import a number of missing macros from U-Boot and convert ehci-hcd to
use them instead of explicitly specifying magic shifts. No functional
change intended.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 96 +
drivers/usb/host/ehci.h | 49
Use NUM_QH, not NUM_TD to specify allocation size.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index b336164f6..f3be177ce 100644
--- a/drivers/usb/host/
Rework the code of ehci_td_buffer() with following trivial changes:
* Switch to using dma_addr_t for 'delta' and 'next'
* Convert while to for loop
* Replace explicit magic number with dedicated contants derived
via ARRAY_SIZE
* Use ALIGN_DOWN to calculate 'next'
* Return
Add a comment explaining the rationale behinde QT_TOKEN_IOC(req ==
NULL).
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f0d899e82..a6f497925 100644
--- a/d
Move shared struct qTD initialization code into a subroutine and
convert the rest of the code to use it. No functional change intended.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 66 -
1 file changed, 35 insertions(+), 31 deletions(-)
dif
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 39 +++--
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 54ab32830..4ccaec743 100644
--- a/drivers/usb/host/ehci-hcd.c
+
Convert the code to initialize only used qTDs as well as initializing
all of the fields explicitly without doing a wholesale memset() first.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehc
Everyone:
This series is a number of improvements (or so I though) I made while
woring with USB on i.MX6. All of the patches are optional, so if some
of the changes don't seem like an improvmement they can be dropped.
Feedback is welcome!
Thanks,
Andrey Smirnov
Andrey Smirnov (18):
usb: host:
This looks like a leftover from U-Boot. Analogous code there would
walk all qTDs and call ehci_free() on each one of them, but since we
don't have anything of the sort it seems the whole loop can be
dropped. Note that U-Boot dropped that code in
de98e8b22a10676fd226318c92a9be7f519208ca
Signed-off-
Only two buffers ever need to be sychronized and DMA direction of it
is always known based on the type of request we are
processing. Simplify the code by moving synchronization to be a part
of ehci_prepare_qtd(). While at it convert the code to use
dma_map_single() API.
Signed-off-by: Andrey Smirn
Memory returned by dma_alloc_coherent() should already be zeroed
out, so there's no need to do this explicitly.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-hcd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 87af9
For loop below is:
for (lun=0; lun<=us->max_lun; lun++)
...
so we need to set max_lun to 0 in order to default to having only one
LUN. Otherwise, we end up assuming the device has 2 valid LUNs.
Signed-off-by: Andrey Smirnov
---
drivers/usb/storage/usb.c | 2 +-
1 file chang
Since we already set up our last qTD to have IOC flag set we may as
well take advange of that and poll USBSTS to wait for transfer
completion. Doesn't change much, but allows us to drop a custom
polling loop and re-use handshake() instead.
Signed-off-by: Andrey Smirnov
---
drivers/usb/host/ehci-
TEST_UNIT_READY is 6 bytes long instead of 12. Fix it.
Signed-off-by: Andrey Smirnov
---
drivers/usb/storage/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 79561ee6f..63d624e91 100644
--- a/drivers/usb/storage
Since cbw.Length can be less that sizeof(cbw.CDB), add code to zero
the whole struct out to avoid sending random stack data as a part of
payload. There's no known case where this causes a problem, but it's a
reasonable thing to do anyway.
Signed-off-by: Andrey Smirnov
---
drivers/usb/storage/tra
26 matches
Mail list logo