Fix shutdown for virtio devices

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
This commit is contained in:
Nikunj A Dadhania 2014-01-15 16:22:50 +05:30 committed by Avik Sil
parent eab9584a40
commit a8c1a27c16
2 changed files with 8 additions and 4 deletions

View File

@ -29,8 +29,10 @@ virtiodev virtio-setup-vd
\ Quiesce the virtqueue of this device so that no more background
\ transactions can be pending.
: shutdown ( -- )
virtiodev virtio-blk-shutdown
FALSE to initialized?
initialized? IF
virtiodev virtio-blk-shutdown
FALSE to initialized?
THEN
;
\ Basic device initialization - which has only to be done once

View File

@ -196,8 +196,10 @@ scsi-close \ no further scsi words required
;
: virito-scsi-shutdown ( -- )
virtiodev virtio-scsi-shutdown
FALSE to initialized?
initialized? IF
virtiodev virtio-scsi-shutdown
FALSE to initialized?
THEN
;
: virtio-scsi-init-and-scan ( -- )