Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2012 22:23:07 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        jack sparrow <jacks.1785@gmail.com>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: Exclusive access of SCSI/ATA devices from user space
Message-ID:  <505B6D1B.7070506@FreeBSD.org>
In-Reply-To: <5059CC56.8040705@FreeBSD.org>
References:  <CACmXQA09W56rSvVrprD8cuAbZ3T7hFmFKmfREiyXGOZwfpH5=g@mail.gmail.com> <201209190825.07384.jhb@freebsd.org> <5059CC56.8040705@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
 > Is there really no sorting of I/O requests inside cam passthrough
 > driver, or cam transport layer? Say if I send one i/o request to
 > selected device via cam passthrough driver and then send other one,
 > before previous one is completed.

There is no sorting in pass driver, as it passes all requests to CAM 
immediately. CAM transport also does not intentionally sort requests 
during normal operation. In some rare error recovery cases it may be 
difficult to manage original request order during requests requeueing or 
retrying. CAM tries to do it right, but I am not sure it can be guarantied.

 > Do I need to modify cam transport layer also, to switch ata device
 > from PIO to DMA and vice versa for data transfer and to disable SATA
 > NCQ, and Command tag queing ;  or CAM passthrough driver will be able
 > to do that.

No, you don't need to modify. CAM provides APIs to control mode setting 
and command queuing via methods of the same PASS interface. If you are 
using pass interface, it is actually your duty to use proper command set 
(PIO/DMA/FPDMA) with the device, respecting current operation mode set 
by CAM. If CAM negotiated DMA with NCQ, you are free to use any of these 
kinds of commands in a mix you like.

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?505B6D1B.7070506>