Bug 276303

Summary: camcontrol stop does not stop a USB-connected SATA drive (regression from 12.4)
Product: Base System Reporter: Martin Birgmeier <d8zNeCFG>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me Keywords: regression
Priority: ---    
Version: 14.0-STABLE   
Hardware: Any   
OS: Any   

Description Martin Birgmeier 2024-01-13 19:36:10 UTC
Scenario:
- FreeBSD stable/14 at c87b594732d7 + very few local patches
- WD My Book 12TB external drive https://www.westerndigital.com/products/external-drives/wd-my-book-usb-3-0-hdd?sku=WDBBGB0120HBK-NESN
- running "camcontrol stop da0

Result:
- The drive continues spinning and is immediately responsive to subsequent read commands.

Expected result:
- The drive should spin down and enter a lower-power state.
- This worked successfully in FreeBSD 12.4.

Notes:
- In 12.4, after the drive entered the low-power state, there would be a delay of several seconds between the time external power to the drive was disconnected and the device being removed from /dev. In stable/14, when disconnecting the external power supply, the device entry is removed immediately. This corroborates the assumption that the drive does not enter a low-power state at all.
- The purpose of executing the "stop" command before removing external power is to ensure that the drive heads are parked and to reduce wear & tear on the drive.

-- Martin
Comment 1 Martin Birgmeier 2024-03-02 15:11:17 UTC
If some FreeBSD guru could look into this please...