Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some flash drives may not be detected after reboot #1051

Closed
philipandag opened this issue Sep 13, 2024 · 9 comments
Closed

Some flash drives may not be detected after reboot #1051

philipandag opened this issue Sep 13, 2024 · 9 comments
Assignees
Labels
bug Something isn't working firmware needs review novacustom_v54_mtl NovaCustom V54 Series

Comments

@philipandag
Copy link

philipandag commented Sep 13, 2024

Component

Dasharo firmware

Device

NovaCustom V54 14th Gen

Dasharo version

v0.9.1-rc5

Dasharo Tools Suite version

--

Test case ID

SUD003.001

Brief summary

Flash drives not detected after three subsequent reboots

How reproducible

100%, tried two times with laptop powered from USB-C, and one time on AC and battery respectively

How to reproduce

Run SUD003.001 test case,

Expected behavior

The flash drives should be detected every time

Actual behavior

It looks that they are not detected after exactly three quick reboots. I couldn't reproduce it manually but in automatic tests it's 100% reproducible.

Screenshots

All the logs I have gathered. They look mostly the same, the flash drive is not detected after the third reboot.
7 usb-type-a-devices-detection.robot_log.zip
6 usb-type-a-devices-detection.robot_log.zip
5 usb-type-a-devices-detection.robot_log.zip
4 usb-type-a-devices-detection.robot_log.zip
3 usb-type-a-devices-detection.robot_log.zip
2 usb-type-a-devices-detection.robot_log.zip
1 usb-type-a-devices-detection.robot_log.zip

Additional context

I couldn't reproduce it manually. Only using the test suite, so maybe the time between the reboots is important? I have checked that after those exactly three reboots the flash drive is not detected also in the firmware, checked by entering the boot menu on every reboot.

May be related to #990

Solutions you've tried

Doing the test manually, repeating when powered by USB-C, from AC and from the battery.

@mkopec
Copy link
Member

mkopec commented Oct 2, 2024

I have 100% reproduction with Sandisk Ultra Flair but not with Kingston DT 100. Buggy flash drive doesn't handle the reset correctly, perhaps?

@SebastianCzapla
Copy link
Contributor

SebastianCzapla commented Oct 4, 2024

Some observations from various configurations related to reboots and usb pendrive detection, tested on 6.11 kernel with rc6 FW and EC.
First, lsusb -v shows Sandisk as the only pendrive that negotiates 900mA of current draw (USB 3.0 limit), while other pendrives keep it up to 500mA (USB 2.0 limit)

Test fails with Sandisk, but pass with Kingston pendrive and other pendrives too.
To test real power draws I connected pendrive via "Charger Doctor" usb power meter.

When connected via this meter, Sandisk negotiates only 224 mA instead of 900 mA.
Tests pass with Sandisk connected via meter.
Tests also pass when connected to Echo11 docking station frontal usb port, lsusb shows also only 224mA negotiated.
Back USB ports of Echo11 straight up don't detect the pendrive at all.

So pretty much test fails on any config that results in negotiated power draw above 500mA.

@SebastianCzapla
Copy link
Contributor

Here's a diff of two cbmem -1 dumps, one after passing the test, and one of the failed test

176a177,178
> UsbEnumeratePort: port 12 state - 00, change - 10 on 683C9C98
> UsbEnumeratePort: device disconnected event on port 12

@miczyg1
Copy link
Contributor

miczyg1 commented Oct 7, 2024

Tests pass with Sandisk connected via meter.

The meter may downgrade the connection to USB 2.0.

@miczyg1
Copy link
Contributor

miczyg1 commented Oct 7, 2024

log_usb_test.zip

On first test launch the SanDisk USB needed only 1 reboot to not be detected. I used the port near DC jack.

When I swapped to the port near audio jack, it also needed just 1 reboot to fail.

@miczyg1
Copy link
Contributor

miczyg1 commented Oct 7, 2024

The FSP doesn't seem to program USB MODPHY at all. Maybe this is something we can explore.

@mkopec
Copy link
Member

mkopec commented Oct 14, 2024

I have 100% reproduction with Sandisk Ultra Flair but not with Kingston DT 100.

Also does not happen with Goodram 32GB sticks.

@mkopec mkopec changed the title V540TND v0.9.1-rc5 Flash drives not detected after three subsequent reboots Some flash drives may not be detected after reboot Oct 16, 2024
@filipleple
Copy link
Member

I've got a pass with a SanDisk Ultra Flair attached to a docking station on V540TND rc-7

==============================================================================
Usb-Type-A-Devices-Detection
==============================================================================
SUD002.001 USB devices detection after warm boot (Ubuntu) :: Check... | SKIP |
Skipped with Skip keyword.
------------------------------------------------------------------------------
SUD003.001 USB devices detection after reboot (Ubuntu) :: Check wh... | PASS |
------------------------------------------------------------------------------

@SebastianCzapla
Copy link
Contributor

Also passes with Goodram 32GB sticks on rc-7

==============================================================================
Usb-Type-A-Devices-Detection                                                  
==============================================================================
SUD002.001 USB devices detection after warm boot (Ubuntu) :: Check... ........
Checking if fwts is installed...

Package fwts is installed
SUD002.001 USB devices detection after warm boot (Ubuntu) :: Check... | PASS |
------------------------------------------------------------------------------
SUD003.001 USB devices detection after reboot (Ubuntu) :: Check wh... | PASS |
------------------------------------------------------------------------------
SUD004.001 USB devices detection after suspension (Ubuntu) :: Chec... | PASS |
------------------------------------------------------------------------------
SUD004.002 USB devices detection after suspension (Ubuntu) (S0ix) ... | SKIP |
SUD004.002 not supported
------------------------------------------------------------------------------
SUD004.003 USB devices detection after suspension (Ubuntu) (S3) ::... | SKIP |
SUD004.003 not supported
------------------------------------------------------------------------------
Usb-Type-A-Devices-Detection                                          | PASS |
5 tests, 3 passed, 0 failed, 2 skipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working firmware needs review novacustom_v54_mtl NovaCustom V54 Series
Projects
Development

No branches or pull requests

5 participants