Commit 69476b25 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Kalle Valo

orinoco: Annotate firmware loading

The ezusb_program() is invoked via ->program() in preemptible
context during firmware loading. This is also true for the
->program_init() and ->program_end() callback.

Use ezusb_req_ctx_wait_compl() in ezusb_program_init(),
ezusb_program_bytes(), ezusb_program_end() which are part of firmware
loading during device probe.
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201113212252.2243570-6-bigeasy@linutronix.de
parent 46233f77
...@@ -1172,7 +1172,7 @@ static int ezusb_program_init(struct hermes *hw, u32 entry_point) ...@@ -1172,7 +1172,7 @@ static int ezusb_program_init(struct hermes *hw, u32 entry_point)
return ezusb_access_ltv(upriv, ctx, sizeof(data), &data, return ezusb_access_ltv(upriv, ctx, sizeof(data), &data,
EZUSB_FRAME_CONTROL, NULL, 0, NULL, EZUSB_FRAME_CONTROL, NULL, 0, NULL,
ezusb_req_ctx_wait); ezusb_req_ctx_wait_compl);
} }
static int ezusb_program_end(struct hermes *hw) static int ezusb_program_end(struct hermes *hw)
...@@ -1186,7 +1186,7 @@ static int ezusb_program_end(struct hermes *hw) ...@@ -1186,7 +1186,7 @@ static int ezusb_program_end(struct hermes *hw)
return ezusb_access_ltv(upriv, ctx, 0, NULL, return ezusb_access_ltv(upriv, ctx, 0, NULL,
EZUSB_FRAME_CONTROL, NULL, 0, NULL, EZUSB_FRAME_CONTROL, NULL, 0, NULL,
ezusb_req_ctx_wait); ezusb_req_ctx_wait_compl);
} }
static int ezusb_program_bytes(struct hermes *hw, const char *buf, static int ezusb_program_bytes(struct hermes *hw, const char *buf,
...@@ -1203,7 +1203,7 @@ static int ezusb_program_bytes(struct hermes *hw, const char *buf, ...@@ -1203,7 +1203,7 @@ static int ezusb_program_bytes(struct hermes *hw, const char *buf,
err = ezusb_access_ltv(upriv, ctx, sizeof(data), &data, err = ezusb_access_ltv(upriv, ctx, sizeof(data), &data,
EZUSB_FRAME_CONTROL, NULL, 0, NULL, EZUSB_FRAME_CONTROL, NULL, 0, NULL,
ezusb_req_ctx_wait); ezusb_req_ctx_wait_compl);
if (err) if (err)
return err; return err;
...@@ -1213,7 +1213,7 @@ static int ezusb_program_bytes(struct hermes *hw, const char *buf, ...@@ -1213,7 +1213,7 @@ static int ezusb_program_bytes(struct hermes *hw, const char *buf,
return ezusb_access_ltv(upriv, ctx, len, buf, return ezusb_access_ltv(upriv, ctx, len, buf,
EZUSB_FRAME_CONTROL, NULL, 0, NULL, EZUSB_FRAME_CONTROL, NULL, 0, NULL,
ezusb_req_ctx_wait); ezusb_req_ctx_wait_compl);
} }
static int ezusb_program(struct hermes *hw, const char *buf, static int ezusb_program(struct hermes *hw, const char *buf,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment