* [PATCH V2] nvme-cli: Add huawei vendor id as filter in command "nvme huawei list"
@ 2020-05-22 3:40 Zhouhua Liu
2020-05-26 19:44 ` Keith Busch
0 siblings, 1 reply; 2+ messages in thread
From: Zhouhua Liu @ 2020-05-22 3:40 UTC (permalink / raw)
To: kbusch, Chaitanya.Kulkarni, linux-nvme
Cc: wangzan, Kangwenhong, Wangchong (Michael)
This patch V2 is to add huawei vendor id as filter in command "nvme huawei list".
And comparing with the last patch, I have remove the symbol \ to comply with coding style.
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;
--
2.22.0
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH V2] nvme-cli: Add huawei vendor id as filter in command "nvme huawei list"
2020-05-22 3:40 [PATCH V2] nvme-cli: Add huawei vendor id as filter in command "nvme huawei list" Zhouhua Liu
@ 2020-05-26 19:44 ` Keith Busch
0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2020-05-26 19:44 UTC (permalink / raw)
To: Zhouhua Liu
Cc: Kangwenhong, wangzan, linux-nvme, Chaitanya.Kulkarni,
Wangchong (Michael)
On Fri, May 22, 2020 at 11:40:40AM +0800, Zhouhua Liu wrote:
> This patch V2 is to add huawei vendor id as filter in command "nvme huawei list".
> And comparing with the last patch, I have remove the symbol \ to comply with coding style.
>
> Signed-off-by: Zhouhua Liu <liuzhouhua@huawei.com>
I've hand applied this with a more appropriate commit message (no need
to mention version changes there), and fixed tabs/spaces. Thanks!
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-26 19:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 3:40 [PATCH V2] nvme-cli: Add huawei vendor id as filter in command "nvme huawei list" Zhouhua Liu
2020-05-26 19:44 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).