History log of /haiku/src/add-ons/kernel/busses/scsi/virtio/VirtioSCSIPrivate.h
Revision Date Author Comments
# 6d42b430 03-Oct-2023 Jérôme Duval <jerome.duval@gmail.com>

virtio: support modern devices

fixes #17239 #17238

Change-Id: Ia5b6347110a60fab18852079b30dca6301010474
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6995
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 66d6afec 31-Aug-2019 Michael Lotz <mmlr@mlotz.ch>

virtio_scsi: Abort requests on timeout.

Previously the CCB would never complete when a timeout occured, leading
to all further IO stopping.

Abort the request by setting the CCB status to aborted and handing the
CCB back to the SCSI layer. That one will then handle the error (and
possibly retrying). This is similar to how such errors are handled in
AHCI and the ATA stack.

Since it is now possible that we receive a completion interrupt for an
already aborted request, we need to keep track of what request the
interrupts belong to and only notify when the current one completes. As
there currently can't be multiple requests in flight, a simple counter
is used.

Change-Id: Ib80e146605efd2f81123803f424cc7f66f52a6c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1815
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 85fbdab0 31-Aug-2019 Michael Lotz <mmlr@mlotz.ch>

virtio_scsi: Remove unused fExpectsInterrupt and its spinlock.

The value is never actually checked. The use of a condition variable
makes it redundant since it will already either have a waiting entry,
or not.

Change-Id: Iafaecb7f9e56a2cf8932e05b82aad2b350fbce1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1812
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# d2fecacd 31-Aug-2019 Michael Lotz <mmlr@mlotz.ch>

virtio_scsi: Whitespace and line length cleanup only.

Change-Id: I12efb32c9222b9397bc44be927f37700e030e89a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1811
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 2f2f475b 18-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio*: remove trailing spaces


# e598dee7 17-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio_scsi: now handles events like capacity data changed.

* push event requests on the event queue, handles them.
* activate feature VIRTIO_SCSI_F_CHANGE.
* when a capacity data changed event is received, schedule a rescan of the scsi device node
on the scsi dpc queue. we find out unique child node and call the rescan_node() hook.
* Haiku only handles media changed events on removable devices, so the feature
only actually works when the device is defined as such, aka for QEMU the following option:
-device scsi-hd,drive=hd,removable=true


# ed4a8e4d 17-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio: changed a bit the driver API by adding a driverCookie.

* the processing of requests in drivers is eased a bit with this change, but
this could be improved for instance by enabling a driver to dequeue items
in a service thread instead of the interrupt handler.
* made a few methods const.


# 82fda49e 02-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

Virtio: added a driver with basic support for SCSI devices.

* Here is the Qemu command line option for Virtio SCSI devices:
-drive if=none,id=hd,file=haiku.image -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd
* virtio_scsi.h is copied unchanged from FreeBSD, except for the _PACKED directive.


# 2f2f475b1d35e32e2afdefe624686d8ab5936c35 18-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio*: remove trailing spaces


# e598dee7522bba2b525730cb6e888c5a69c8aead 17-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio_scsi: now handles events like capacity data changed.

* push event requests on the event queue, handles them.
* activate feature VIRTIO_SCSI_F_CHANGE.
* when a capacity data changed event is received, schedule a rescan of the scsi device node
on the scsi dpc queue. we find out unique child node and call the rescan_node() hook.
* Haiku only handles media changed events on removable devices, so the feature
only actually works when the device is defined as such, aka for QEMU the following option:
-device scsi-hd,drive=hd,removable=true


# ed4a8e4d11d7972d6fb6f025c108915ad06c73af 17-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio: changed a bit the driver API by adding a driverCookie.

* the processing of requests in drivers is eased a bit with this change, but
this could be improved for instance by enabling a driver to dequeue items
in a service thread instead of the interrupt handler.
* made a few methods const.


# 82fda49e52a6d4fe217de033c350fee60ce56bff 02-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

Virtio: added a driver with basic support for SCSI devices.

* Here is the Qemu command line option for Virtio SCSI devices:
-drive if=none,id=hd,file=haiku.image -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd
* virtio_scsi.h is copied unchanged from FreeBSD, except for the _PACKED directive.