scsi: ufs: Misc improvements for DesignWare drivers and UFS
v2 cover scsi: ufs: Misc improvements for DesignWare drivers and UFS
v2 Address review comments from Tomas and adds r-b tag provided by Alim.
---
Misc set of improvements for Synopsys DesignWare drivers and UFS core.
Patch 1/5, allows UFS 3.0 as a valid version for a given Host.
Patch 2/5, removes all mention of G210 to the DesignWare drivers so that we can use same driver among different Test Chips.
Patch 3/5, re-arranges the initialization sequence of PCI driver to be more modular.
Patch 4/5, allows MSI as a valid interrupt type.
Finally at 5/5, we change the Maintainers for UFS DesignWare drivers.
---
Cc: "Winkler, Tomas" <[email protected]>
Cc: Joao Lima <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Alim Akhtar <[email protected]>
Cc: Avri Altman <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
Jose Abreu (5):
scsi: ufs: Allow UFS 3.0 as a valid version
scsi: ufs: Rename tc-dwc-g210 -> tc-dwc
scsi: ufs: tc-dwc-pci: Use PDI ID to match Test Chip type
scsi: ufs: tc-dwc-pci: Allow for MSI interrupt type
MAINTAINERS: Change Maintainers for SCSI UFS DWC Drivers
MAINTAINERS | 3 +-
drivers/scsi/ufs/Kconfig | 4 +-
drivers/scsi/ufs/Makefile | 4 +-
drivers/scsi/ufs/tc-dwc-g210-pci.c | 176 ------------------
drivers/scsi/ufs/tc-dwc-pci.c | 204 +++++++++++++++++++++
.../ufs/{tc-dwc-g210-pltfrm.c => tc-dwc-pltfrm.c} | 37 ++--
drivers/scsi/ufs/{tc-dwc-g210.c => tc-dwc.c} | 6 +-
drivers/scsi/ufs/{tc-dwc-g210.h => tc-dwc.h} | 6 +-
drivers/scsi/ufs/ufshcd.c | 3 +-
drivers/scsi/ufs/ufshci.h | 1 +
10 files changed, 238 insertions(+), 206 deletions(-)
delete mode 100644 drivers/scsi/ufs/tc-dwc-g210-pci.c
create mode 100644 drivers/scsi/ufs/tc-dwc-pci.c
rename drivers/scsi/ufs/{tc-dwc-g210-pltfrm.c => tc-dwc-pltfrm.c} (70%)
rename drivers/scsi/ufs/{tc-dwc-g210.c => tc-dwc.c} (98%)
rename drivers/scsi/ufs/{tc-dwc-g210.h => tc-dwc.h} (78%)Signature · 1 line
2.7.4
PATCH v2 4/5 scsi: ufs: tc-dwc-pci: Allow for MSI interrupt type
Newer Test Chips boards have MSI support. It does no harm to try to request it as the function will fallback to legacy interrupts if MSI is not supported.
---
Changes from v1:
- Do not try to request MSIX vectors (Tomas)
- Add missing call to pci_free_irq_vectors() (Tomas)
--- drivers/scsi/ufs/tc-dwc-pci.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/scsi/ufs/tc-dwc-pci.c +9 -1
@@ -88,6 +88,7 @@ static void tc_dwc_pci_remove(struct pci_dev *pdev)pm_runtime_forbid (&pdev->dev);pm_runtime_get_noresume (&pdev->dev);ufshcd_remove (hba); +pci_free_irq_vectors (pdev); }/**
@@ -136,11 +137,18 @@ tc_dwc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)return -ENOENT ; } + err =pci_alloc_irq_vectors (pdev,1 ,1 ,PCI_IRQ_LEGACY |PCI_IRQ_MSI ); +if (err <0 ) { +dev_err (&pdev->dev,"Allocation failed\n" ); +return err; + } + hba->vops = &data->ops; - err =ufshcd_init (hba, mmio_base, pdev->irq); + err =ufshcd_init (hba, mmio_base,pci_irq_vector (pdev,0 ));if (err) {dev_err (&pdev->dev,"Initialization failed\n" ); +pci_free_irq_vectors (pdev);return err; }
Signature · 1 line
2.7.4
PATCH v2 1/5 scsi: ufs: Allow UFS 3.0 as a valid version
In reply to Jose AbreuAdd a define for UFS version 3.0 and do not print an error message upon probe when using this version.
---
Cc: Joao Lima <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Alim Akhtar <[email protected]>
Cc: Avri Altman <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/scsi/ufs/ufshcd.c | 3 ++- drivers/scsi/ufs/ufshci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +2 -1
@@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)if ((hba->ufs_version !=UFSHCI_VERSION_10 ) && (hba->ufs_version !=UFSHCI_VERSION_11 ) && (hba->ufs_version !=UFSHCI_VERSION_20 ) && - (hba->ufs_version !=UFSHCI_VERSION_21 )) + (hba->ufs_version !=UFSHCI_VERSION_21 ) && + (hba->ufs_version !=UFSHCI_VERSION_30 ))dev_err (hba->dev,"invalid UFS version 0x%x\n" , hba->ufs_version);
drivers/scsi/ufs/ufshci.h +1 -0
@@ -104,6 +104,7 @@ enum {UFSHCI_VERSION_11 =0x00010100 ,/* 1.1 */ UFSHCI_VERSION_20 =0x00000200 ,/* 2.0 */ UFSHCI_VERSION_21 =0x00000210 ,/* 2.1 */ + UFSHCI_VERSION_30 = 0x00000300, /* 3.0 */ };/*
Signature · 1 line
2.7.4
PATCH v2 2/5 scsi: ufs: Rename tc-dwc-g210 -> tc-dwc
In reply to Jose AbreuIn preparation for the addition of new Synopsys Test Chips versions we remove all G210 mentions in files and Kconfig entries so that we can re-use the same driver for different Test Chips.
As the PCI ID for these chips is different and as we will have different DT bindings, there is no reason to add new drivers for them and we can just re-use the existing ones.
No functional change.
---
Cc: Joao Lima <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Alim Akhtar <[email protected]>
Cc: Avri Altman <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/ufs/Kconfig | 4 +-
drivers/scsi/ufs/Makefile | 4 +-
.../scsi/ufs/{tc-dwc-g210-pci.c => tc-dwc-pci.c} | 70 +++++++++++-----------
.../ufs/{tc-dwc-g210-pltfrm.c => tc-dwc-pltfrm.c} | 37 ++++++------
drivers/scsi/ufs/{tc-dwc-g210.c => tc-dwc.c} | 6 +-
drivers/scsi/ufs/{tc-dwc-g210.h => tc-dwc.h} | 6 +-
6 files changed, 64 insertions(+), 63 deletions(-)
rename drivers/scsi/ufs/{tc-dwc-g210-pci.c => tc-dwc-pci.c} (60%)
rename drivers/scsi/ufs/{tc-dwc-g210-pltfrm.c => tc-dwc-pltfrm.c} (70%)
rename drivers/scsi/ufs/{tc-dwc-g210.c => tc-dwc.c} (98%)
rename drivers/scsi/ufs/{tc-dwc-g210.h => tc-dwc.h} (78%)drivers/scsi/ufs/Kconfig +2 -2
@@ -62,7 +62,7 @@ config SCSI_UFSHCD_PCI If unsure, say N. config SCSI_UFS_DWC_TC_PCI - tristate "DesignWare pci support using a G210 Test Chip" + tristate "DesignWare PCI support using a Synopsys Test Chip" depends on SCSI_UFSHCD_PCI ---help--- Synopsys Test Chip is a PHY for prototyping purposes.
@@ -89,7 +89,7 @@ config SCSI_UFS_CDNS_PLATFORM If unsure, say N. config SCSI_UFS_DWC_TC_PLATFORM - tristate "DesignWare platform support using a G210 Test Chip" + tristate "DesignWare platform support using a Synopsys Test Chip" depends on SCSI_UFSHCD_PLATFORM ---help--- Synopsys Test Chip is a PHY for prototyping purposes.
drivers/scsi/ufs/Makefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # UFSHCD makefile -obj-$(CONFIG_SCSI_UFS_DWC_TC_PCI) += tc-dwc-g210-pci.o ufshcd-dwc.o tc-dwc-g210.o -obj-$(CONFIG_SCSI_UFS_DWC_TC_PLATFORM) += tc-dwc-g210-pltfrm.o ufshcd-dwc.o tc-dwc-g210.o +obj-$(CONFIG_SCSI_UFS_DWC_TC_PCI) += tc-dwc-pci.o ufshcd-dwc.o tc-dwc.o +obj-$(CONFIG_SCSI_UFS_DWC_TC_PLATFORM) += tc-dwc-pltfrm.o ufshcd-dwc.o tc-dwc.o obj-$(CONFIG_SCSI_UFS_CDNS_PLATFORM) += cdns-pltfrm.o obj-$(CONFIG_SCSI_UFS_QCOM) += ufs-qcom.o obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o
drivers/scsi/ufs/tc-dwc-pci.c renamed from drivers/scsi/ufs/tc-dwc-g210-pci.c +35 -35
167 lines not on this page · raw message
drivers/scsi/ufs/tc-dwc-pltfrm.c renamed from drivers/scsi/ufs/tc-dwc-g210-pltfrm.c +19 -18
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* Synopsys G210 Test Chip driver +* Synopsys Test Chip driver * * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com) *
@@ -15,7 +15,7 @@#include "ufshcd-pltfrm.h" #include "ufshcd-dwc.h" -#include "tc-dwc-g210.h" +#include "tc-dwc.h" /* * UFS DWC specific variant operations
@@ -32,7 +32,7 @@ static struct ufs_hba_variant_ops tc_dwc_g210_40bit_pltfm_hba_vops = { .phy_initialization = tc_dwc_g210_config_40_bit, }; -static const struct of_device_id tc_dwc_g210_pltfm_match[] = { +static const struct of_device_id tc_dwc_pltfm_match[] = { { .compatible ="snps,g210-tc-6.00-20bit" , .data = &tc_dwc_g210_20bit_pltfm_hba_vops,
@@ -43,21 +43,21 @@ static const struct of_device_id tc_dwc_g210_pltfm_match[] = { }, { }, }; -MODULE_DEVICE_TABLE (of, tc_dwc_g210_pltfm_match); +MODULE_DEVICE_TABLE (of, tc_dwc_pltfm_match);/** -* tc_dwc_g210_pltfm_probe() +* tc_dwc_pltfm_probe() * @pdev: pointer to platform device structure * */ -static int tc_dwc_g210_pltfm_probe (struct platform_device *pdev) +static int tc_dwc_pltfm_probe (struct platform_device *pdev) {int err;const struct of_device_id *of_id;struct ufs_hba_variant_ops *vops;struct device *dev = &pdev->dev; - of_id =of_match_node (tc_dwc_g210_pltfm_match, dev->of_node); + of_id =of_match_node (tc_dwc_pltfm_match, dev->of_node); vops = (struct ufs_hba_variant_ops *)of_id->data;/* Perform generic probe */
@@ -69,11 +69,11 @@ static int tc_dwc_g210_pltfm_probe(struct platform_device *pdev) }/** -* tc_dwc_g210_pltfm_remove() +* tc_dwc_pltfm_remove() * @pdev: pointer to platform device structure * */ -static int tc_dwc_g210_pltfm_remove (struct platform_device *pdev) +static int tc_dwc_pltfm_remove (struct platform_device *pdev) {struct ufs_hba *hba =platform_get_drvdata (pdev);
@@ -83,7 +83,7 @@ static int tc_dwc_g210_pltfm_remove(struct platform_device *pdev)return 0 ; } -static const struct dev_pm_ops tc_dwc_g210_pltfm_pm_ops = { +static const struct dev_pm_ops tc_dwc_pltfm_pm_ops = { .suspend = ufshcd_pltfrm_suspend, .resume = ufshcd_pltfrm_resume, .runtime_suspend = ufshcd_pltfrm_runtime_suspend,
@@ -91,20 +91,21 @@ static const struct dev_pm_ops tc_dwc_g210_pltfm_pm_ops = { .runtime_idle = ufshcd_pltfrm_runtime_idle, }; -static struct platform_driver tc_dwc_g210_pltfm_driver = { - .probe = tc_dwc_g210_pltfm_probe, - .remove = tc_dwc_g210_pltfm_remove, +static struct platform_driver tc_dwc_pltfm_driver = { + .probe = tc_dwc_pltfm_probe, + .remove = tc_dwc_pltfm_remove, .shutdown = ufshcd_pltfrm_shutdown, .driver = { - .name ="tc-dwc-g210-pltfm" , - .pm = &tc_dwc_g210_pltfm_pm_ops, - .of_match_table =of_match_ptr (tc_dwc_g210_pltfm_match), + .name ="tc-dwc-pltfm" , + .pm = &tc_dwc_pltfm_pm_ops, + .of_match_table =of_match_ptr (tc_dwc_pltfm_match), }, }; -module_platform_driver (tc_dwc_g210_pltfm_driver); +module_platform_driver (tc_dwc_pltfm_driver);MODULE_ALIAS ("platform:tc-dwc-g210-pltfm" ); -MODULE_DESCRIPTION ("Synopsys Test Chip G210 platform glue driver" ); +MODULE_ALIAS ("platform:tc-dwc-pltfm" ); +MODULE_DESCRIPTION ("Synopsys Test Chip platform glue driver" );MODULE_AUTHOR ("Joao Pinto <[email protected]>" );MODULE_LICENSE ("Dual BSD/GPL" );
drivers/scsi/ufs/tc-dwc.c renamed from drivers/scsi/ufs/tc-dwc-g210.c +3 -3
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* Synopsys G210 Test Chip driver +* Synopsys Test Chip driver * * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com) *
@@ -12,7 +12,7 @@#include "ufshcd-dwc.h" #include "ufshci-dwc.h" -#include "tc-dwc-g210.h" +#include "tc-dwc.h" /** * tc_dwc_g210_setup_40bit_rmmi()
@@ -313,5 +313,5 @@ int tc_dwc_g210_config_20_bit(struct ufs_hba *hba)EXPORT_SYMBOL (tc_dwc_g210_config_20_bit);MODULE_AUTHOR ("Joao Pinto <[email protected]>" ); -MODULE_DESCRIPTION ("Synopsys G210 Test Chip driver" ); +MODULE_DESCRIPTION ("Synopsys Test Chip driver" );MODULE_LICENSE ("Dual BSD/GPL" );
drivers/scsi/ufs/tc-dwc.h renamed from drivers/scsi/ufs/tc-dwc-g210.h +3 -3
@@ -1,14 +1,14 @@/* SPDX-License-Identifier: GPL-2.0-only */ /* -* Synopsys G210 Test Chip driver +* Synopsys Test Chip driver * * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com) * * Authors: Joao Pinto <[email protected]> */ -#ifndef _TC_DWC_G210_H -#define _TC_DWC_G210_H +#ifndef _TC_DWC_H +#define _TC_DWC_Hint tc_dwc_g210_config_40_bit (struct ufs_hba *hba);int tc_dwc_g210_config_20_bit (struct ufs_hba *hba);
Signature · 1 line
2.7.4
PATCH v2 3/5 scsi: ufs: tc-dwc-pci: Use PDI ID to match Test Chip type
In reply to Jose AbreuIn preparation for the addition of new Test Chips, we re-arrange the initialization sequence so that we rely on PCI ID to match for given Test Chip type.
---
Cc: Joao Lima <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Alim Akhtar <[email protected]>
Cc: Avri Altman <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/scsi/ufs/tc-dwc-pci.c | 68 ++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 24 deletions(-)
drivers/scsi/ufs/tc-dwc-pci.c +44 -24
@@ -14,6 +14,11 @@#include <linux/pci.h> #include <linux/pm_runtime.h> +struct tc_dwc_data { +struct ufs_hba_variant_ops ops; +int (*setup)(struct pci_dev *pdev,struct tc_dwc_data *data); +}; +/* Test Chip type expected values */ #define TC_G210_20BIT 20#define TC_G210_40BIT 40
@@ -23,6 +28,20 @@ static int tc_type = TC_G210_INV;module_param (tc_type, int,0 );MODULE_PARM_DESC (tc_type,"Test Chip Type (20 = 20-bit, 40 = 40-bit)" ); +static int tc_dwc_g210_set_config (struct pci_dev *pdev,struct tc_dwc_data *data) +{ +if (tc_type ==TC_G210_20BIT ) { + data->ops.phy_initialization = tc_dwc_g210_config_20_bit; + }else if (tc_type ==TC_G210_40BIT ) { + data->ops.phy_initialization = tc_dwc_g210_config_40_bit; + }else { +dev_err (&pdev->dev,"test chip version not specified\n" ); +return -EPERM ; + } + +return 0 ; +} +static int tc_dwc_pci_suspend (struct device *dev) {return ufshcd_system_suspend (dev_get_drvdata (dev));
@@ -48,14 +67,6 @@ static int tc_dwc_pci_runtime_idle(struct device *dev)return ufshcd_runtime_idle (dev_get_drvdata (dev)); } -/* -* struct ufs_hba_dwc_vops - UFS DWC specific variant operations -*/ -static struct ufs_hba_variant_ops tc_dwc_pci_hba_vops = { - .name ="tc-dwc-pci" , - .link_startup_notify = ufshcd_dwc_link_startup_notify, -}; -/** * tc_dwc_pci_shutdown - main function to put the controller in reset state * @pdev: pointer to PCI device handle
@@ -89,22 +100,11 @@ static void tc_dwc_pci_remove(struct pci_dev *pdev)static int tc_dwc_pci_probe (struct pci_dev *pdev,const struct pci_device_id *id) { -struct ufs_hba *hba; +struct tc_dwc_data *data = (struct tc_dwc_data *)id->driver_data;void __iomem *mmio_base; +struct ufs_hba *hba;int err; -/* Check Test Chip type and set the specific setup routine */ -if (tc_type ==TC_G210_20BIT ) { - tc_dwc_pci_hba_vops.phy_initialization = - tc_dwc_g210_config_20_bit; - }else if (tc_type ==TC_G210_40BIT ) { - tc_dwc_pci_hba_vops.phy_initialization = - tc_dwc_g210_config_40_bit; - }else { -dev_err (&pdev->dev,"test chip version not specified\n" ); -return -EPERM ; - } - err =pcim_enable_device (pdev);if (err) {dev_err (&pdev->dev,"pcim_enable_device failed\n" );
@@ -127,7 +127,16 @@ tc_dwc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)return err; } - hba->vops = &tc_dwc_pci_hba_vops; +/* Check Test Chip type and set the specific setup routine */ +if (data && data->setup) { + err = data->setup (pdev, data); +if (err) +return err; + }else { +return -ENOENT ; + } + + hba->vops = &data->ops; err =ufshcd_init (hba, mmio_base, pdev->irq);if (err) {
@@ -150,9 +159,20 @@ static const struct dev_pm_ops tc_dwc_pci_pm_ops = { .runtime_idle = tc_dwc_pci_runtime_idle, }; +static struct tc_dwc_data tc_dwc_g210_data = { + .setup = tc_dwc_g210_set_config, + .ops = { + .name ="tc-dwc-g210-pci" , + .link_startup_notify = ufshcd_dwc_link_startup_notify, + }, +}; + +#define PCI_DEVICE_ID_SYNOPSYS_TC_G210_1 0xB101 +#define PCI_DEVICE_ID_SYNOPSYS_TC_G210_2 0xB102 +static const struct pci_device_id tc_dwc_pci_tbl[] = { - {PCI_VENDOR_ID_SYNOPSYS ,0xB101 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {PCI_VENDOR_ID_SYNOPSYS ,0xB102 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, + {PCI_DEVICE_DATA (SYNOPSYS ,TC_G210_1 , &tc_dwc_g210_data) }, + {PCI_DEVICE_DATA (SYNOPSYS ,TC_G210_2 , &tc_dwc_g210_data) }, { }/* terminate list */ };
Signature · 1 line
2.7.4
PATCH v2 5/5 MAINTAINERS: Change Maintainers for SCSI UFS DWC Drivers
In reply to Jose AbreuPedro Sousa is no longer with Synopsys. Joao Lima and me have been working internally with our UFS Controller so we are able to help and we are volunteering as Maintainers for UFS DWC Drivers.
---
Cc: Joao Lima <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: [email protected]
--- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
MAINTAINERS +2 -1
@@ -17307,7 +17307,8 @@ F: Documentation/scsi/ufs.rst F: drivers/scsi/ufs/ UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER DWC HOOKS -M: Pedro Sousa <[email protected]> +M: Joao Lima <[email protected]> +M: Jose Abreu <[email protected]> L: [email protected] S: Supported F: drivers/scsi/ufs/*dwc*
Signature · 1 line
2.7.4
RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
In reply to Jose AbreuHi, Jose
drivers/scsi/ufs/ufshcd.c int ufshcd_init(struct ufs_hba *hba, void __iomem · line 8446
Quoted 8 lines
drivers/scsi/ufs/ufshcd.c +2
-1@@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)if ((hba->ufs_version !=UFSHCI_VERSION_10 ) && (hba->ufs_version !=UFSHCI_VERSION_11 ) && (hba->ufs_version !=UFSHCI_VERSION_20 ) && - (hba->ufs_version !=UFSHCI_VERSION_21 )) + (hba->ufs_version !=UFSHCI_VERSION_21 ) && + (hba->ufs_version !=UFSHCI_VERSION_30 ))
I don't think these checkups of UFSHCI version is necessary, does the UFSHCI have other version number except these? Is there somebody still v1.0 and v1.1?
Quoted 10 lines
drivers/scsi/ufs/ufshci.h +1
-1@@ -104,6 +104,7 @@ enum {UFSHCI_VERSION_11 =0x00010100 ,/* 1.1 */ UFSHCI_VERSION_20 =0x00000200 ,/* 2.0 */ UFSHCI_VERSION_21 =0x00000210 ,/* 2.1 */ + UFSHCI_VERSION_30 = 0x00000300, /* 3.0 */ };/* -- 2.7.4
//Bean
RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
From: Bean Huo (beanhuo) <[email protected]>
Date: Apr/24/2020, 16:57:07 (UTC+00:00)
Quoted 13 lines
Hi, Jose
drivers/scsi/ufs/ufshcd.c int ufshcd_init(struct ufs_hba *hba, void __iomem · line 8446
Quoted 8 lines
drivers/scsi/ufs/ufshcd.c +2
-1@@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)if ((hba->ufs_version !=UFSHCI_VERSION_10 ) && (hba->ufs_version !=UFSHCI_VERSION_11 ) && (hba->ufs_version !=UFSHCI_VERSION_20 ) && - (hba->ufs_version !=UFSHCI_VERSION_21 )) + (hba->ufs_version !=UFSHCI_VERSION_21 ) && + (hba->ufs_version !=UFSHCI_VERSION_30 ))I don't think these checkups of UFSHCI version is necessary, does the UFSHCI have other version number except these? Is there somebody still v1.0 and v1.1?
Probably. I think we can leave them or change the dev_err to a dev_warn. This way we have logs in case someone is using a non-supported version.
What do you think ?
---
Thanks,
Jose Miguel Abreu
RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
Quoted 10 lines
Quoted 10 lines
drivers/scsi/ufs/ufshcd.c int ufshcd_init(struct ufs_hba *hba, void · line 8446
Quoted 8 lines
drivers/scsi/ufs/ufshcd.c +2
-1@@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)if ((hba->ufs_version !=UFSHCI_VERSION_10 ) && (hba->ufs_version !=UFSHCI_VERSION_11 ) && (hba->ufs_version !=UFSHCI_VERSION_20 ) && - (hba->ufs_version !=UFSHCI_VERSION_21 )) + (hba->ufs_version !=UFSHCI_VERSION_21 ) && + (hba->ufs_version !=UFSHCI_VERSION_30 ))I don't think these checkups of UFSHCI version is necessary, does the UFSHCI
Quoted 8 lines
have other version number except these?
Quoted 1 line
Is there somebody still v1.0 and v1.1?
Probably. I think we can leave them or change the
dev_errto adev_warn. This way we have logs in case someone is using a non-supported version.What do you think ?
Hi, Jose
Seems after your patch, all of current released UFS control versions will be supported except the version suffix is non-zero. Right?
Quoted 3 lines
---
Thanks,
Jose Miguel Abreu
RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
From: Bean Huo (beanhuo) <[email protected]>
Date: Apr/29/2020, 13:59:08 (UTC+00:00)
Quoted 13 lines
Quoted 13 lines
Quoted 10 lines
drivers/scsi/ufs/ufshcd.c int ufshcd_init(struct ufs_hba *hba, void · line 8446
Quoted 8 lines
drivers/scsi/ufs/ufshcd.c +2
-1@@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)if ((hba->ufs_version !=UFSHCI_VERSION_10 ) && (hba->ufs_version !=UFSHCI_VERSION_11 ) && (hba->ufs_version !=UFSHCI_VERSION_20 ) && - (hba->ufs_version !=UFSHCI_VERSION_21 )) + (hba->ufs_version !=UFSHCI_VERSION_21 ) && + (hba->ufs_version !=UFSHCI_VERSION_30 ))I don't think these checkups of UFSHCI version is necessary, does the UFSHCI
have other version number except these?
Quoted 1 line
Is there somebody still v1.0 and v1.1?
Quoted 8 lines
Quoted 5 lines
Probably. I think we can leave them or change the
dev_errto adev_warn. This way we have logs in case someone is using a non-supported version.What do you think ?
Hi, Jose
Seems after your patch, all of current released UFS control versions will be supported except the version suffix is non-zero. Right?
I think we cover all versions with this patch.
---
Thanks,
Jose Miguel Abreu
Re: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
Hi Jose
Quoted 6 lines · Jose Abreu
From: Bean Huo (beanhuo) <[email protected]>
Date: Apr/29/2020, 13:59:08 (UTC+00:00)Quoted 3 lines
Quoted 3 lines
Probably. I think we can leave them or change the
dev_errto adev_warn. This way we have logs in case someone is using a non-supported version.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
What do you think ?
Hi, Jose
Seems after your patch, all of current released UFS control versions will be supported except the version suffix is non-zero. Right?I think we cover all versions with this patch.
Are you still on this?
Quoted 3 lines
---
Thanks,
Jose Miguel Abreu
Signature · 2 lines
Regards, Alim
RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
From: Alim Akhtar <[email protected]>
Date: Jun/10/2020, 04:39:48 (UTC+00:00)
Quoted 1 line
Are you still on this?
Yes, apologies but I was caught on some other things. I'll try to re-submit once possible.
---
Thanks,
Jose Miguel Abreu