diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-04-05 13:04:07 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-04-06 09:53:55 -0400 |
commit | 79bafa1f4037f371b2f03c54647565c9537cc0c2 (patch) | |
tree | 3cd56cbb049289e156a2a596c4b144e22745b909 /src/hw/lsi-scsi.c | |
parent | b35ea54a7586bbfb004ebf4c928d9b18b8a974fa (diff) | |
download | seabios-79bafa1f4037f371b2f03c54647565c9537cc0c2.tar.gz |
scsi: Launch a thread when scanning for drives in the scsi drivers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/lsi-scsi.c')
-rw-r--r-- | src/hw/lsi-scsi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hw/lsi-scsi.c b/src/hw/lsi-scsi.c index fd695fa7..b63430dc 100644 --- a/src/hw/lsi-scsi.c +++ b/src/hw/lsi-scsi.c @@ -20,6 +20,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 @@ -168,8 +169,9 @@ lsi_scsi_scan_target(struct pci_device *pci, u32 iobase, u8 target) } static void -init_lsi_scsi(struct pci_device *pci) +init_lsi_scsi(void *data) { + struct pci_device *pci = data; u32 iobase = pci_enable_iobar(pci, PCI_BASE_ADDRESS_0); if (!iobase) return; @@ -183,8 +185,6 @@ init_lsi_scsi(struct pci_device *pci) int i; for (i = 0; i < 7; i++) lsi_scsi_scan_target(pci, iobase, i); - - return; } void @@ -201,6 +201,6 @@ lsi_scsi_setup(void) if (pci->vendor != PCI_VENDOR_ID_LSI_LOGIC || pci->device != PCI_DEVICE_ID_LSI_53C895A) continue; - init_lsi_scsi(pci); + run_thread(init_lsi_scsi, pci); } } |