ahci_xgene: Fix the endianess issue in APM X-Gene SoC AHCI SATA controller driver.
authorSuman Tripathi <stripathi@apm.com>
Mon, 29 Dec 2014 03:22:46 +0000 (08:52 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2015 01:40:45 +0000 (17:40 -0800)
commit 5c0b8e0de76a86edb99e46612fd9d341b4c4fa0a upstream.

This patch fixes the big endian mode issue with function
xgene_ahci_read_id.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ata/ahci_xgene.c

index 0f8538f238b63f60fb323e075f6f721c5e22c16a..0ffd3c930bed9ae186609d9a1b2c977802511366 100644 (file)
@@ -188,7 +188,7 @@ static unsigned int xgene_ahci_read_id(struct ata_device *dev,
         *
         * Clear reserved bit 8 (DEVSLP bit) as we don't support DEVSLP
         */
-       id[ATA_ID_FEATURE_SUPP] &= ~(1 << 8);
+       id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
 
        return 0;
 }