Bug 212106

Summary: loading vmm and then passing through some devices makes hot swap unusable
Product: Base System Reporter: t10661789
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: 11.0-STABLE   
Hardware: amd64   
OS: Any   

Description t10661789 2016-08-24 12:18:13 UTC
If I enabled vmm in /boot/loader.conf and added some entries like pptdev="1/0/0", hot swap became unusable. The corresponding entries in /var/log/messages are

Aug 24 19:50:54 aaa kernel: ahcich1: Poll timeout on slot 2 port 15
Aug 24 19:50:54 aaa kernel: ahcich1: is 00000000 cs 00000000 ss 00000000 rs 00000004 tfd 150 serr 00000000 cmd 00710217
Aug 24 19:50:54 aaa kernel: (aprobe0:ahcich1:0:15:0): NOP FLUSHQUEUE. ACB: 00 00 00 00 00 00 00 00 00 00 00 00
Aug 24 19:50:54 aaa kernel: (aprobe0:ahcich1:0:15:0): CAM status: Command timeout
Aug 24 19:50:54 aaa kernel: (aprobe0:ahcich1:0:15:0): Error 5, Retries exhausted
Aug 24 19:51:09 aaa kernel: ahcich1: Poll timeout on slot 4 port 0
Aug 24 19:51:09 aaa kernel: ahcich1: is 00000000 cs 00000000 ss 00000000 rs 00000010 tfd 150 serr 00000000 cmd 00710417
Aug 24 19:51:09 aaa kernel: (aprobe0:ahcich1:0:0:0): NOP FLUSHQUEUE. ACB: 00 00 00 00 00 00 00 00 00 00 00 00
Aug 24 19:51:09 aaa kernel: (aprobe0:ahcich1:0:0:0): CAM status: Command timeout
Aug 24 19:51:09 aaa kernel: (aprobe0:ahcich1:0:0:0): Error 5, Retries exhausted

With the line on pptdev commented out and then reboot the system, hot swap was again usable and in /var/log/messages

Aug 24 18:53:14 aaa kernel: ada6 at ahcich1 bus 0 scbus1 target 0 lun 0
Aug 24 18:53:14 aaa kernel: ada6: <VK0800GDJYA 4IWVHPG0> ATA8-ACS SATA 3.x device
Aug 24 18:53:14 aaa kernel: ada6: Serial Number XXXXXXXX
Aug 24 18:53:14 aaa kernel: ada6: 600.000MB/s transfers (SATA 3.x, UDMA5, PIO 512bytes)
Aug 24 18:53:14 aaa kernel: ada6: Command Queueing enabled
Aug 24 18:53:14 aaa kernel: ada6: 763097MB (1562824368 512 byte sectors)
Aug 24 18:53:33 aaa kernel: ada6 at ahcich1 bus 0 scbus1 target 0 lun 0
Aug 24 18:53:33 aaa kernel: ada6: <VK0800GDJYA 4IWVHPG0> s/n XXXXXXX detached
Aug 24 18:53:33 aaa kernel: (ada6:ahcich1:0:0:0): Periph destroyed

The above behaviour is the same whether I pass through a vga card or a usb 3.0 device. The motherboard in question is ASRock C226WS and the SATA controller is a Marvell 9172.