• Avri Altman's avatar
    scsi: ufs: Add API to execute raw upiu commands · 5e0a86ee
    Avri Altman authored
    The UFS host software uses a combination of a host register set and
    Transfer Request Descriptors in system memory to communicate with host
    controller hardware. In its mmio space, a separate places are assigned
    to UTP Transfer Request Descriptor ("utrd") list, and to UTP Task
    Management Request Descriptor ("utmrd") list.
    
    The provided API supports utrd-typed requests: nop out and device
    management commands. It also supports utmrd-type requests:
    task management requests. Other UPIU types are not supported for now.
    
    We utilize the already existing code for tag and task work queues.
    That is, all utrd-typed UPIUs are "disguised" as device management
    commands. Similarly, the utmrd-typed UPUIs uses the task management
    infrastructure.
    
    It is up to the caller to fill the upiu request properly, as it will be
    copied without any further input validations.
    Signed-off-by: default avatarAvri Altman <avri.altman@wdc.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarBart Van Assche <Bart.VanAssche@wdc.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    5e0a86ee
ufshcd.c 220 KB