File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
drivers/firmware/arm_scmi Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,21 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
247
247
}
248
248
249
249
xfer = & minfo -> xfer_block [xfer_id ];
250
+ /*
251
+ * Even if a response was indeed expected on this slot at this point,
252
+ * a buggy platform could wrongly reply feeding us an unexpected
253
+ * delayed response we're not prepared to handle: bail-out safely
254
+ * blaming firmware.
255
+ */
256
+ if (unlikely (msg_type == MSG_TYPE_DELAYED_RESP && !xfer -> async_done )) {
257
+ dev_err (dev ,
258
+ "Delayed Response for %d not expected! Buggy F/W ?\n" ,
259
+ xfer_id );
260
+ info -> desc -> ops -> clear_channel (cinfo );
261
+ /* It was unexpected, so nobody will clear the xfer if not us */
262
+ __scmi_xfer_put (minfo , xfer );
263
+ return ;
264
+ }
250
265
251
266
scmi_dump_header_dbg (dev , & xfer -> hdr );
252
267
You can’t perform that action at this time.
0 commit comments