• James Smart's avatar
    scsi: lpfc: use __raw_writeX on DPP copies · 4c06619f
    James Smart authored
    Commit 1351e69f ("scsi: lpfc: Add push-to-adapter support to sli4")
    fails compilation on some 32-bit systems as writeq() is not supported on
    all architectures. Additionally, it was pointed out that as writeX()
    does byteswapping if necessary for pci vs the cpu endianness, the code
    was broken on BE PPC.
    
    After discussions with Arnd Bergmann, we've resolved the issue
    to the following:
      Instead of writeX(), use __raw_writeX() - which writes to io
        space while preserving byte order. To use this, the code
        was changed to use a different buffer that lpfc prepped
        via sli_pcimem_bcopy() that was set to the bytestream to
        be written.
      On platforms with __raw_writeq support, use the routine, otherwise
        use __raw_writel()
    
    [mkp: checkpatch]
    
    Fixes: 1351e69f ("scsi: lpfc: Add push-to-adapter support to sli4")
    Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
    Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
    Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    4c06619f
lpfc_sli.c 588 KB