• Kashyap Desai's avatar
    scsi: mpi3mr: Create operational request and reply queue pair · c9566231
    Kashyap Desai authored
    Create operational request and reply queue pair.
    
    The MPI3 transport interface consists of an Administrative Request Queue,
    an Administrative Reply Queue, and Operational Messaging Queues.  The
    Operational Messaging Queues are the primary communication mechanism
    between the host and the I/O Controller (IOC).  Request messages, allocated
    in host memory, identify I/O operations to be performed by the IOC. These
    operations are queued on an Operational Request Queue by the host driver.
    Reply descriptors track I/O operations as they complete.  The IOC queues
    these completions in an Operational Reply Queue.
    
    To fulfil large contiguous memory requirement, driver creates multiple
    segments and provide the list of segments. Each segment size should be 4K
    which is a hardware requirement. An element array is contiguous or
    segmented.  A contiguous element array is located in contiguous physical
    memory.  A contiguous element array must be aligned on an element size
    boundary.  An element's physical address within the array may be directly
    calculated from the base address, the Producer/Consumer index, and the
    element size.
    
    Expected phased identifier bit is used to find out valid entry on reply
    queue. Driver sets <ephase> bit and IOC inverts the value of this bit on
    each pass.
    
    Link: https://lore.kernel.org/r/20210520152545.2710479-4-kashyap.desai@broadcom.com
    Cc: sathya.prakash@broadcom.com
    Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
    Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
    Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
    Signed-off-by: default avatarKashyap Desai <kashyap.desai@broadcom.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    c9566231
mpi3mr_os.c 8.72 KB