[RESEND,SRU,Artful] scsi: hisi_sas: support zone management commands

Message ID 20180104175217.GP5311@xps13.dannf
State New
Headers show
Series
  • [RESEND,SRU,Artful] scsi: hisi_sas: support zone management commands
Related show

Commit Message

dann frazier Jan. 4, 2018, 5:52 p.m.
From: Xiaofei Tan <tanxiaofei@huawei.com>

BugLink: https://bugs.launchpad.net/bugs/1739891

Add two ATA commands, ATA_CMD_ZAC_MGMT_IN and ATA_CMD_ZAC_MGMT_OUT in
hisi_sas_get_ata_protocol(), to support SATA SMR disk.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit c3fe8a2bbbc22bd4945ea69ab5a29913baeb35e4)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Paolo Pisati Jan. 15, 2018, 3:32 p.m. | #1
Clean cherry picks.

Acked-by: Paolo Pisati <paolo.pisati@canonical.com>

On Thu, Jan 4, 2018 at 6:52 PM, dann frazier <dann.frazier@canonical.com> wrote:
> From: Xiaofei Tan <tanxiaofei@huawei.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1739891
>
> Add two ATA commands, ATA_CMD_ZAC_MGMT_IN and ATA_CMD_ZAC_MGMT_OUT in
> hisi_sas_get_ata_protocol(), to support SATA SMR disk.
>
> Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
> Signed-off-by: John Garry <john.garry@huawei.com>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> (cherry picked from commit c3fe8a2bbbc22bd4945ea69ab5a29913baeb35e4)
> Signed-off-by: dann frazier <dann.frazier@canonical.com>
> ---
>  drivers/scsi/hisi_sas/hisi_sas_main.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index 44f3f9e0b0d4..9d9c2c248027 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -61,6 +61,7 @@ u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
>         case ATA_CMD_WRITE_QUEUED:
>         case ATA_CMD_WRITE_LOG_DMA_EXT:
>         case ATA_CMD_WRITE_STREAM_DMA_EXT:
> +       case ATA_CMD_ZAC_MGMT_IN:
>         return HISI_SAS_SATA_PROTOCOL_DMA;
>
>         case ATA_CMD_CHK_POWER:
> @@ -73,6 +74,7 @@ u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
>         case ATA_CMD_SET_FEATURES:
>         case ATA_CMD_STANDBY:
>         case ATA_CMD_STANDBYNOW1:
> +       case ATA_CMD_ZAC_MGMT_OUT:
>         return HISI_SAS_SATA_PROTOCOL_NONDATA;
>         default:
>                 if (direction == DMA_NONE)
> --
> 2.15.1
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Stefan Bader Jan. 24, 2018, 1:42 p.m. | #2
On 04.01.2018 18:52, dann frazier wrote:
> From: Xiaofei Tan <tanxiaofei@huawei.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1739891
> 
> Add two ATA commands, ATA_CMD_ZAC_MGMT_IN and ATA_CMD_ZAC_MGMT_OUT in
> hisi_sas_get_ata_protocol(), to support SATA SMR disk.
> 
> Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
> Signed-off-by: John Garry <john.garry@huawei.com>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> (cherry picked from commit c3fe8a2bbbc22bd4945ea69ab5a29913baeb35e4)
> Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>

> ---
>  drivers/scsi/hisi_sas/hisi_sas_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index 44f3f9e0b0d4..9d9c2c248027 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -61,6 +61,7 @@ u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
>  	case ATA_CMD_WRITE_QUEUED:
>  	case ATA_CMD_WRITE_LOG_DMA_EXT:
>  	case ATA_CMD_WRITE_STREAM_DMA_EXT:
> +	case ATA_CMD_ZAC_MGMT_IN:
>  	return HISI_SAS_SATA_PROTOCOL_DMA;
>  
>  	case ATA_CMD_CHK_POWER:
> @@ -73,6 +74,7 @@ u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
>  	case ATA_CMD_SET_FEATURES:
>  	case ATA_CMD_STANDBY:
>  	case ATA_CMD_STANDBYNOW1:
> +	case ATA_CMD_ZAC_MGMT_OUT:
>  	return HISI_SAS_SATA_PROTOCOL_NONDATA;
>  	default:
>  		if (direction == DMA_NONE)
>
Kleber Souza Feb. 6, 2018, 12:01 p.m. | #3
On 01/04/18 18:52, dann frazier wrote:
> From: Xiaofei Tan <tanxiaofei@huawei.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1739891
> 
> Add two ATA commands, ATA_CMD_ZAC_MGMT_IN and ATA_CMD_ZAC_MGMT_OUT in
> hisi_sas_get_ata_protocol(), to support SATA SMR disk.
> 
> Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
> Signed-off-by: John Garry <john.garry@huawei.com>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> (cherry picked from commit c3fe8a2bbbc22bd4945ea69ab5a29913baeb35e4)
> Signed-off-by: dann frazier <dann.frazier@canonical.com>
> ---
>  drivers/scsi/hisi_sas/hisi_sas_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index 44f3f9e0b0d4..9d9c2c248027 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -61,6 +61,7 @@ u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
>  	case ATA_CMD_WRITE_QUEUED:
>  	case ATA_CMD_WRITE_LOG_DMA_EXT:
>  	case ATA_CMD_WRITE_STREAM_DMA_EXT:
> +	case ATA_CMD_ZAC_MGMT_IN:
>  	return HISI_SAS_SATA_PROTOCOL_DMA;
>  
>  	case ATA_CMD_CHK_POWER:
> @@ -73,6 +74,7 @@ u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
>  	case ATA_CMD_SET_FEATURES:
>  	case ATA_CMD_STANDBY:
>  	case ATA_CMD_STANDBYNOW1:
> +	case ATA_CMD_ZAC_MGMT_OUT:
>  	return HISI_SAS_SATA_PROTOCOL_NONDATA;
>  	default:
>  		if (direction == DMA_NONE)
> 

Applied to artful/master-next branch.

Thanks,
Kleber

Patch

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 44f3f9e0b0d4..9d9c2c248027 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -61,6 +61,7 @@  u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
 	case ATA_CMD_WRITE_QUEUED:
 	case ATA_CMD_WRITE_LOG_DMA_EXT:
 	case ATA_CMD_WRITE_STREAM_DMA_EXT:
+	case ATA_CMD_ZAC_MGMT_IN:
 	return HISI_SAS_SATA_PROTOCOL_DMA;
 
 	case ATA_CMD_CHK_POWER:
@@ -73,6 +74,7 @@  u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
 	case ATA_CMD_SET_FEATURES:
 	case ATA_CMD_STANDBY:
 	case ATA_CMD_STANDBYNOW1:
+	case ATA_CMD_ZAC_MGMT_OUT:
 	return HISI_SAS_SATA_PROTOCOL_NONDATA;
 	default:
 		if (direction == DMA_NONE)