Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148712733
D47431.1788222100.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47431.1788222100.diff
View Options
diff --git a/sys/dev/firmware/arm/scmi.h b/sys/dev/firmware/arm/scmi.h
--- a/sys/dev/firmware/arm/scmi.h
+++ b/sys/dev/firmware/arm/scmi.h
@@ -35,6 +35,7 @@
#include <sys/sysctl.h>
#include "scmi_if.h"
+#include "scmi_raw.h"
#define SCMI_DEF_MAX_MSG 32
#define SCMI_DEF_MAX_MSG_PAYLD_SIZE 128
diff --git a/sys/dev/firmware/arm/scmi.c b/sys/dev/firmware/arm/scmi.c
--- a/sys/dev/firmware/arm/scmi.c
+++ b/sys/dev/firmware/arm/scmi.c
@@ -53,6 +53,7 @@
#include <dev/ofw/ofw_bus_subr.h>
#include "scmi.h"
+#include "scmi_raw.h"
#include "scmi_protocols.h"
SDT_PROVIDER_DEFINE(scmi);
@@ -223,6 +224,13 @@
SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(sysctl_trans), OID_AUTO, "max_rx_timeout_ms",
CTLFLAG_RD, &sc->trs_desc.reply_timo_ms, 0, "SCMI Max message RX timeout ms");
+ error = scmi_raw_init(dev);
+ if (error != 0)
+ device_printf(dev, "Failed to initialize SCMI RAW. Carry-on.\n");
+
+ if (sc->drivers_disabled)
+ return (0);
+
/*
* Allow devices to identify.
*/
@@ -245,6 +253,7 @@
struct scmi_softc *sc;
sc = device_get_softc(dev);
+ scmi_raw_cleanup(dev);
scmi_transport_cleanup(sc);
return (0);
@@ -663,10 +672,13 @@
}
mtx_unlock_spin(&req->mtx);
- if (timed_out)
+ if (timed_out) {
device_printf(sc->dev,
"Late reply for timed-out request - token: 0x%X. Ignore.\n",
req->token);
+ if (req->is_raw)
+ scmi_raw_error_report(sc->dev, &req->msg.hdr, req->msg.rx_len);
+ }
/*
* In case of a late reply to a timed-out transaction this will
@@ -808,6 +820,8 @@
req = tsk_to_req(ta);
sc = device_get_softc(req->dev);
scmi_wait_for_response(sc, req, NULL);
+ if (!req->timed_out && req->is_raw)
+ scmi_raw_reply_report(req->dev, &req->msg.hdr, req->msg.rx_len);
scmi_msg_put(req->dev, &req->msg);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 1, 12:21 AM (6 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29493525
Default Alt Text
D47431.1788222100.diff (1 KB)
Attached To
Mode
D47431: scmi: Add RAW interface call hooks into the core
Attached
Detach File
Event Timeline
Log In to Comment