diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-04-01 20:05:45 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-04-06 09:53:55 -0400 |
commit | b35ea54a7586bbfb004ebf4c928d9b18b8a974fa (patch) | |
tree | 53d92c1e4f7eee8a17a981cdd568a0dc53778e8e /src/hw/virtio-scsi.c | |
parent | d449a117a501ecf95e36a11526140ffc91073f56 (diff) | |
download | seabios-hppa-b35ea54a7586bbfb004ebf4c928d9b18b8a974fa.zip seabios-hppa-b35ea54a7586bbfb004ebf4c928d9b18b8a974fa.tar.gz seabios-hppa-b35ea54a7586bbfb004ebf4c928d9b18b8a974fa.tar.bz2 |
virtio: Use threads when scanning for virtio devices
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/virtio-scsi.c')
-rw-r--r-- | src/hw/virtio-scsi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c index 322d469..5fb9409 100644 --- a/src/hw/virtio-scsi.c +++ b/src/hw/virtio-scsi.c @@ -16,6 +16,7 @@ #include "pcidevice.h" // foreachpci #include "pci_ids.h" // PCI_DEVICE_ID_VIRTIO_BLK #include "pci_regs.h" // PCI_VENDOR_ID +#include "stacks.h" // run_thread #include "std/disk.h" // DISK_RET_SUCCESS #include "string.h" // memset #include "util.h" // usleep @@ -132,8 +133,9 @@ virtio_scsi_scan_target(struct pci_device *pci, struct vp_device *vp, } static void -init_virtio_scsi(struct pci_device *pci) +init_virtio_scsi(void *data) { + struct pci_device *pci = data; dprintf(1, "found virtio-scsi at %pP\n", pci); struct vring_virtqueue *vq = NULL; struct vp_device *vp = malloc_high(sizeof(*vp)); @@ -199,6 +201,6 @@ virtio_scsi_setup(void) (pci->device != PCI_DEVICE_ID_VIRTIO_SCSI_09 && pci->device != PCI_DEVICE_ID_VIRTIO_SCSI_10)) continue; - init_virtio_scsi(pci); + run_thread(init_virtio_scsi, pci); } } |