Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175785644
D58947.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58947.diff
View Options
diff --git a/sys/dev/ufshci/ufshci_ctrlr.c b/sys/dev/ufshci/ufshci_ctrlr.c
--- a/sys/dev/ufshci/ufshci_ctrlr.c
+++ b/sys/dev/ufshci/ufshci_ctrlr.c
@@ -151,10 +151,11 @@
/* TODO: Configure Background Operations */
/*
- * If the reset is due to a timeout, it is already attached to the SIM
- * and does not need to be attached again.
+ * A reset normally arrives after the SIM is attached. But if the
+ * first start attempt failed early, the reset path runs without a
+ * SIM. Attach it whenever it does not exist yet.
*/
- if (!resetting && ufshci_sim_attach(ctrlr) != 0) {
+ if (ctrlr->ufshci_sim == NULL && ufshci_sim_attach(ctrlr) != 0) {
ufshci_ctrlr_fail(ctrlr);
return;
}
diff --git a/sys/dev/ufshci/ufshci_sim.c b/sys/dev/ufshci/ufshci_sim.c
--- a/sys/dev/ufshci/ufshci_sim.c
+++ b/sys/dev/ufshci/ufshci_sim.c
@@ -454,6 +454,10 @@
uint64_t scsi_lun;
uint64_t timeout;
+ /* The reset path can get here before the SIM is attached. */
+ if (ctrlr->ufshci_sim == NULL)
+ return (NULL);
+
scsi_lun = ufshci_sim_translate_ufs_to_scsi_lun(wlun);
if (xpt_create_path(&path, /*periph*/ NULL,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 14, 8:41 AM (2 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40739834
Default Alt Text
D58947.diff (1 KB)
Attached To
Mode
D58947: ufshci: handle a recovery reset before the SIM attach
Attached
Detach File
Event Timeline
Log In to Comment