Re: [PATCH 1/2] ahci: st: Add ports-implemented property in support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/10/2016 6:37 PM, patrice.chotard@xxxxxx wrote:

From: Patrice Chotard <patrice.chotard@xxxxxx>

Despite ST AHCI version = 1.3, reading HOST_PORTS_IMPL
returns 0. So force_port_map to 1 by using ports-implemented
DT property.

Signed-off-by: Patrice Chotard <patrice.chotard@xxxxxx>
---
 drivers/ata/ahci_st.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index 8ff428f..bc345f2 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -147,6 +147,7 @@ static struct scsi_host_template ahci_platform_sht = {

 static int st_ahci_probe(struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;

   Why? You could just use 'pdev'.

 	struct st_ahci_drv_data *drv_data;
 	struct ahci_host_priv *hpriv;
 	int err;
@@ -170,6 +171,9 @@ static int st_ahci_probe(struct platform_device *pdev)

 	st_ahci_configure_oob(hpriv->mmio);

+	of_property_read_u32(dev->of_node,

   pdev->dev.of_node

+			     "ports-implemented", &hpriv->force_port_map);
+
 	err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info,
 				      &ahci_platform_sht);
 	if (err) {

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux