Should UserSendCBD work on UAS interfaces?

The device I am trying to develop a firmware updater for is an NVMe drive with a USB4 interface. It can connect in USB4 mode (tunneled NVMe), in USB 3 mode or in USB 2 mode.

In USB 2 and USB 3 mode, the device descriptor shows one interface with two alternates. Alternate 0 uses the bulk-only protocol, with one IN and one OUT pipe. Alternate 1 uses the UAS protocol, with two IN and two OUT pipes.

I use identical code in my driver to send custom CDBs. I can see using IORegistryExplorer that in USB 2 mode, macOS chooses alternate 0, the bulk-only protocol. My custom CDBs and their accompanying data pay loads are put on the bus, more or less as expected.

In USB 3 mode, macOS chooses alternate 1, the UAS protocol. My custom CDB is put on the bus, but no payload data is transferred.

Is this expected behavior? If so, is there a way to force the OS to choose alternate 0 even when on USB 3, perhaps with another dext?

I'll file a bug about this when Feedback Assistant lets me.

Filed FB20382589

I'm not sure what's going on here.

Can you upload IORegistryExplorer files for the two cases (working and failure) to your bug? Saved from the app please, not the ioreg tool. Working with ioreg text files is always a pain.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

I uploaded the requested IORegistryExplorer files.

I also note a couple of other things:

  1. every time I re-attach the device, I get a new driver process and a new IOUserServer at the root of the IORegistry. Even if I delete the app the existing driver process keeps running, unless I kill it from Activity Monitor. Maybe there's something I'm not cleaning up properly, but I don't know what.

  2. when I eject the disk, there is a very perceptible delay between ejecting the volume and its associated - Data container. I use Finder/Settings and check the External Disks item in the Sidebar/Locations list. After I click the eject control next to the volume, I unplug the device as soon as it disappears from the sidebar, and very often see a notification about ejecting "volume - data" when it wasn't ready to be ejected.

If I keep /Volumes open I can see that "Volume"'s icon disappears first, then "Volume - Data"'s icon.

Is this a bug worth filing?

Should UserSendCBD work on UAS interfaces?
 
 
Q