• Jeff Garzik's avatar
    [libata] only DMA map data for DMA commands (fix >=4GB bug) · 046de9be
    Jeff Garzik authored
    libata made the assumption that (for PIO commands in this case)
    it could modify DMA memory at the kernel-virtual address, after
    mapping this.  This is incorrect, and fails on e.g. platforms that
    copy DMA memory back and forth (swiotlb on Intel EM64T and IA64).
    
    Remove this assumption by ensuring that we only call the DMA mapping
    routines if we really are going to use DMA for data xfer.
    
    Also:  remove a bogus WARN_ON() in ata_sg_init_one() which caused
    bug reports (but no problems).
    046de9be
libata-core.c 88.4 KB