• Shivasharan S's avatar
    scsi: megaraid_sas: Add support for 64bit consistent DMA · 107a60dd
    Shivasharan S authored
    The latest MegaRAID Firmware (for Invader series) has support for 64bit
    DMA for both streaming and consistent DMA buffers.  All Ventura series
    controller FW always support 64 bit consistent DMA.  Also, on a few
    architectures 32bit DMA is not supported.
    
    Current driver always prefers 32bit for consistent DMA and 64bit for
    streaming DMA.  This behavior was unintentional and carried forwarded
    from legacy controller FW. Need to enhance the driver to support 64bit
    consistent DMA buffers based on the firmware capability.
    
    Below is the DMA setting strategy in driver with this patch.  For
    Ventura series, always try to set 64bit DMA mask. If it fails fall back
    to 32bit DMA mask.  For Invader series and earlier generation
    controllers, first try to set to 32bit consistent DMA mask irrespective
    of FW capability. This is needed to ensure firmware downgrades do not
    break. If 32bit DMA setting fails, check FW capability and try seting to
    64bit DMA mask.
    
    There are certain restrictions in the hardware for having all sense
    buffers and all reply descriptors to be in the same 4GB memory region.
    This limitation is h/w dependent and can not be changed in firmware.
    This limitation needs to be taken care in driver while allocating the
    buffers.  There was a discussion regarding this - find details at below
    link.  https://www.spinics.net/lists/linux-scsi/msg108251.htmlSigned-off-by: default avatarKashyap Desai <kashyap.desai@broadcom.com>
    Signed-off-by: default avatarShivasharan S <shivasharan.srikanteshwara@broadcom.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    107a60dd
megaraid_sas_fusion.c 144 KB