virtio_pci: Use device_probe_and_attach(), instead of DEVICE_ATTACH().
authorImre Vadasz <imre@vdsz.com>
Sat, 22 Nov 2014 08:29:49 +0000 (09:29 +0100)
committerImre Vadasz <imre@vdsz.com>
Sat, 22 Nov 2014 10:02:25 +0000 (11:02 +0100)
commitb17fe9c54b9825d21bcfd7ff28cc36a5e31d74f4
tree26f7ebe58867f2dcea45aea3867276aba1319f5e
parent4e3d9e11e7d9e81412b5db414ebe9054f555487d
virtio_pci: Use device_probe_and_attach(), instead of DEVICE_ATTACH().

* By directly calling DEVICE_ATTACH(), we didn't get automatically created
  sysctl nodes (added in 8e4d13764bdfc916c23fb22158c65e486dce631c), and
  we didn't get automatic dmesg messages on child driver attachement
  (e.g. "vtblk0: <VirtIO Block Adapter> on virtio_pci1") .

* Since we have no direct equivalent to FreeBSD's device_attach(), use
  device_probe_and_attach(). This means we do a vtpci_set_status() cycle
  even if no matching driver is found.
sys/dev/virtual/virtio/pci/virtio_pci.c