On 07/30/2018 08:01 PM, Bart Van Assche wrote:
On Sun, 2018-07-29 at 16:33 +0300, Avri Altman wrote:
Here is a proposal to use the scsi transport subsystem to manage
ufs devices.
scsi transport is a framework that allow to send scsi commands to
a non-scsi devices. Still, it is flexible enough to allow
sending non-scsi commands as well. We will use this framework to
manage ufs devices by sending UPIU transactions.
We added a new scsi transport module, a ufs-bsg LLD companion,
and some new API to the ufs driver.
My understanding is that all upstream code uses the bsg interface for *SCSI*
commands. Sending UPIU commands over a bsg interface seems like abuse of that
interface to me. Aren't you opening a can of worms with such an approach?
I beg to disagree.
bsg was precisely designed to handle non-SCSI commands, as this was the
main limitation of the original 'sg' interface.
The original intention was to allow sending of transport frames for the
various SCSI transports (like FC or SAS), but there is no direct
requirement for bsg to be limited to SCSI.
Quite the contrary.
Cheers,
Hannes