diff options
author | Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com> | 2017-08-21 14:17:19 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-10-23 17:09:26 +0300 |
commit | ff0d63778ca0c2cec9ce33d69b69fe5f8567169b (patch) | |
tree | 961ac5b96e03fdd8f8774350246562bab4e5bd75 /drivers/ata | |
parent | e8fc8b858cd85de20350bfc72df18306129305b8 (diff) | |
download | linux-ff0d63778ca0c2cec9ce33d69b69fe5f8567169b.tar.xz |
ata: ceva: Disable Device Sleep capability
Since CEVA controller does not support Device Sleep capability,
we need to clear that feature by clearing the DEVSLP bit in word78
of IDENTIFY DEVICE data. This patch does the same.
Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci_ceva.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c index aa32c8a0f083..b63fab2507fa 100644 --- a/drivers/ata/ahci_ceva.c +++ b/drivers/ata/ahci_ceva.c @@ -81,8 +81,26 @@ struct ceva_ahci_priv { int flags; }; +static unsigned int ceva_ahci_read_id(struct ata_device *dev, + struct ata_taskfile *tf, u16 *id) +{ + u32 err_mask; + + err_mask = ata_do_dev_read_id(dev, tf, id); + if (err_mask) + return err_mask; + /* + * Since CEVA controller does not support device sleep feature, we + * need to clear DEVSLP (bit 8) in word78 of the IDENTIFY DEVICE data. + */ + id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8)); + + return 0; +} + static struct ata_port_operations ahci_ceva_ops = { .inherits = &ahci_platform_ops, + .read_id = ceva_ahci_read_id, }; static const struct ata_port_info ahci_ceva_port_info = { |