OSDN Git Service

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)
committerTejun Heo <tj@kernel.org>
Mon, 5 Jan 2015 14:02:56 +0000 (09:02 -0500)
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>
drivers/ata/ahci_xgene.c

index feeb8f1..f190b92 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;
 }