From 02507604e7979d8d3c4e48572799374a47eb71ac Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 21 Jun 2010 16:19:49 +0000 Subject: [PATCH] read_write(): Consider a request created from an io_operation DMA safe. This saves some checking in the bus manager. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37199 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/generic/scsi_periph/io.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/add-ons/kernel/generic/scsi_periph/io.cpp b/src/add-ons/kernel/generic/scsi_periph/io.cpp index caef4cb421..846e95855c 100644 --- a/src/add-ons/kernel/generic/scsi_periph/io.cpp +++ b/src/add-ons/kernel/generic/scsi_periph/io.cpp @@ -123,6 +123,11 @@ read_write(scsi_periph_device_info *device, scsi_ccb *request, request->flags = isWrite ? SCSI_DIR_OUT : SCSI_DIR_IN; + // io_operations are generated by a DMAResource and thus contain DMA + // safe physical vectors + if (operation != NULL) + request->flags |= SCSI_DMA_SAFE; + // make sure we avoid 10 byte commands if they aren't supported if (!device->rw10_enabled || device->preferred_ccb_size == 6) { // restricting transfer is OK - the block manager will