Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Zhouhua Liu <liuzhouhua@huawei.com>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: wangzan <wangzan@huawei.com>,
	Kangwenhong <kangwenhong@huawei.com>,
	"Wangchong \(Michael\)" <Michael.wangchong@huawei.com>
Subject: Re: [PATCH nvme-cli] edit huawei ssd filter
Date: Fri, 22 May 2020 00:58:56 +0000
Message-ID: <BYAPR04MB49653F95BB628CADD7DB057F86B40@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: <6f5a1e9e-a3f8-3653-56c6-4e71ddc26a2d@huawei.com>

On 5/21/20 2:35 AM, Zhouhua Liu wrote:
> Chaitanya,
> 
> thank you for your suggestion, the new patch is blow:
> 
> Signed-off-by: Zhouhua Liu <liuzhouhua@huawei.com>
> ---
>   plugins/huawei/huawei-nvme.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/plugins/huawei/huawei-nvme.c b/plugins/huawei/huawei-nvme.c
> index c935f47..b4aef1e 100644
> --- a/plugins/huawei/huawei-nvme.c
> +++ b/plugins/huawei/huawei-nvme.c
> @@ -41,6 +41,7 @@
>   #define CREATE_CMD
>   #include "huawei-nvme.h"
> 
> +#define HW_SSD_PCI_VENDOR_ID 0x19E5
>   #define ARRAY_NAME_LEN 80
>   #define NS_NAME_LEN    40
> 
> @@ -80,16 +81,15 @@ static int huawei_get_nvme_info(int fd, struct huawei_list_item *item, const cha
>                  return err;
> 
>          /*identify huawei device*/
> -       if (strstr(item->ctrl.mn, "Huawei") == NULL) {
> +       if ((strstr(item->ctrl.mn, "Huawei") == NULL) &&
> +               (le16_to_cpu(item->ctrl.vid) != HW_SSD_PCI_VENDOR_ID)) {
>                  item->huawei_device = false;
>                  return 0;
>          }
> -       else
> -               item->huawei_device = true;
> 
> +       item->huawei_device = true;
>          item->nsid = nvme_get_nsid(fd);
> -       err = nvme_identify_ns(fd, item->nsid,
> -                                                       0, &item->ns);
> +       err = nvme_identify_ns(fd, item->nsid, 0, &item->ns);
>          if (err)
>                  return err;
> 
This looks okay to me. You need to send a separate patch with V2 prefix 
and document the code changes from V1.


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

      reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20  1:39 l00293085
2020-05-20  8:04 ` Chaitanya Kulkarni
2020-05-21  9:34   ` Zhouhua Liu
2020-05-22  0:58     ` Chaitanya Kulkarni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR04MB49653F95BB628CADD7DB057F86B40@BYAPR04MB4965.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=Michael.wangchong@huawei.com \
    --cc=kangwenhong@huawei.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=liuzhouhua@huawei.com \
    --cc=wangzan@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git