All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: Added QUIRK for Samsung PM1725a
@ 2020-12-04 16:16 Gopal Tiwari
  2020-12-07 14:04 ` Christoph Hellwig
  2020-12-08 14:04 ` Christoph Hellwig
  0 siblings, 2 replies; 10+ messages in thread
From: Gopal Tiwari @ 2020-12-04 16:16 UTC (permalink / raw)
  To: hch, kbusch, linux-nvme; +Cc: gtiwari, dmilburn

A system with more than one of these SSDs will only have one usable.
Hence failed to detect nvme devices due to duplicate cntlid.

[    6.274554] nvme nvme1: Duplicate cntlid 33 with nvme0, rejecting
[    6.274566] nvme nvme1: Removing after probe failure status: -22

After adding to the NVME_QUIRK_IGNORE_DEV_SUBNQN quirk resolves the issue.

Signed-off-by: Gopal Tiwari <gtiwari@redhat.com>
---
 drivers/nvme/host/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 3be352403839..143f16a9f8d7 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3201,7 +3201,8 @@ static const struct pci_device_id nvme_id_table[] = {
 	{ PCI_DEVICE(0x144d, 0xa821),   /* Samsung PM1725 */
 		.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
 	{ PCI_DEVICE(0x144d, 0xa822),   /* Samsung PM1725a */
-		.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+		.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY |
+				NVME_QUIRK_IGNORE_DEV_SUBNQN, },
 	{ PCI_DEVICE(0x1d1d, 0x1f1f),	/* LighNVM qemu device */
 		.driver_data = NVME_QUIRK_LIGHTNVM, },
 	{ PCI_DEVICE(0x1d1d, 0x2807),	/* CNEX WL */
-- 
2.21.1


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-04 16:16 [PATCH] nvme: Added QUIRK for Samsung PM1725a Gopal Tiwari
@ 2020-12-07 14:04 ` Christoph Hellwig
  2020-12-08 13:28   ` Gopal Tiwari
  2020-12-08 14:04 ` Christoph Hellwig
  1 sibling, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2020-12-07 14:04 UTC (permalink / raw)
  To: Gopal Tiwari; +Cc: kbusch, dmilburn, hch, linux-nvme

Can you send me a dump of nvme id-ctrl /dev/nvmeN for this device?
I'm mostly curious on what spec version it claims compliance to,
and what is stored in the subnqn field.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-07 14:04 ` Christoph Hellwig
@ 2020-12-08 13:28   ` Gopal Tiwari
  2020-12-08 13:29     ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Gopal Tiwari @ 2020-12-08 13:28 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: kbusch, dmilburn, linux-nvme

Hi Christoph,

Please find output for both the device .. 

[~]# nvme id-ctrl /dev/nvme0
NVME Identify Controller:
vid       : 0x144d
ssvid     : 0x1014
sn        : S3RWNA0JC00089
mn        : PCIe3 3.2TB NVMe Flash Adapter II x8
fr        : MN12MN12
rab       : 8
ieee      : 002538
cmic      : 0x3
mdts      : 8
cntlid    : 0x21
ver       : 0x10201
rtd3r     : 0xe4e1c0
rtd3e     : 0x989680
oaes      : 0x300
ctratt    : 0
rrls      : 0
cntrltype : 0
fguid     :
crdt1     : 0
crdt2     : 0
crdt3     : 0
oacs      : 0xe
acl       : 7
aerl      : 15
frmw      : 0x16
lpa       : 0x2
elpe      : 255
npss      : 0
avscc     : 0x1
apsta     : 0
wctemp    : 353
cctemp    : 360
mtfa      : 130
hmpre     : 0
hmmin     : 0
tnvmcap   : 3200631791616
unvmcap   : 0
rpmbs     : 0
edstt     : 0
dsto      : 0
fwug      : 0
kas       : 0
hctma     : 0
mntmt     : 0
mxtmt     : 0
sanicap   : 0
hmminds   : 0
hmmaxd    : 0
nsetidmax : 0
endgidmax : 0
anatt     : 0
anacap    : 0
anagrpmax : 0
nanagrpid : 0
pels      : 0
sqes      : 0x66
cqes      : 0x44
maxcmd    : 0
nn        : 32
oncs      : 0x3e
fuses     : 0
fna       : 0x4
vwc       : 0
awun      : 65535
awupf     : 0
nvscc     : 1
nwpc      : 0
acwu      : 0
sgls      : 0x70001
mnan      : 0
subnqn    : nqn.1994-11.com.samsung:nvme:PM1725a:HHHL:170818P00RC15
ioccsz    : 0
iorcsz    : 0
icdoff    : 0
ctrattr   : 0
msdbd     : 0
ps    0 : mp:25.00W operational enlat:100 exlat:100 rrt:0 rrl:0
          rwt:0 rwl:0 idle_power:- active_power:-

[ ~]# nvme id-ctrl /dev/nvme1
NVME Identify Controller:
vid       : 0x144d
ssvid     : 0x1014
sn        : S3RWNA0JC00053
mn        : PCIe3 3.2TB NVMe Flash Adapter II x8
fr        : MN12MN12
rab       : 8
ieee      : 002538
cmic      : 0x3
mdts      : 8
cntlid    : 0x21
ver       : 0x10201
rtd3r     : 0xe4e1c0
rtd3e     : 0x989680
oaes      : 0x300
ctratt    : 0
rrls      : 0
cntrltype : 0
fguid     :
crdt1     : 0
crdt2     : 0
crdt3     : 0
oacs      : 0xe
acl       : 7
aerl      : 15
frmw      : 0x16
lpa       : 0x2
elpe      : 255
npss      : 0
avscc     : 0x1
apsta     : 0
wctemp    : 353
cctemp    : 360
mtfa      : 130
hmpre     : 0
hmmin     : 0
tnvmcap   : 3200631791616
unvmcap   : 0
rpmbs     : 0
edstt     : 0
dsto      : 0
fwug      : 0
kas       : 0
hctma     : 0
mntmt     : 0
mxtmt     : 0
sanicap   : 0
hmminds   : 0
hmmaxd    : 0
nsetidmax : 0
endgidmax : 0
anatt     : 0
anacap    : 0
anagrpmax : 0
nanagrpid : 0
pels      : 0
sqes      : 0x66
cqes      : 0x44
maxcmd    : 0
nn        : 32
oncs      : 0x3e
fuses     : 0
fna       : 0x4
vwc       : 0
awun      : 65535
awupf     : 0
nvscc     : 1
nwpc      : 0
acwu      : 0
sgls      : 0x70001
mnan      : 0
subnqn    : nqn.1994-11.com.samsung:nvme:PM1725a:HHHL:170818P00RC15
ioccsz    : 0
iorcsz    : 0
icdoff    : 0
ctrattr   : 0
msdbd     : 0
ps    0 : mp:25.00W operational enlat:100 exlat:100 rrt:0 rrl:0
          rwt:0 rwl:0 idle_power:- active_power:-


Thanks 
Gopal 

----- Original Message -----
From: "Christoph Hellwig" <hch@lst.de>
To: "Gopal Tiwari" <gtiwari@redhat.com>
Cc: kbusch@kernel.org, dmilburn@redhat.com, hch@lst.de, linux-nvme@lists.infradead.org
Sent: Monday, December 7, 2020 7:34:28 PM
Subject: Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a

Can you send me a dump of nvme id-ctrl /dev/nvmeN for this device?
I'm mostly curious on what spec version it claims compliance to,
and what is stored in the subnqn field.

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


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-08 13:28   ` Gopal Tiwari
@ 2020-12-08 13:29     ` Christoph Hellwig
  2020-12-08 13:35       ` Gopal Tiwari
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2020-12-08 13:29 UTC (permalink / raw)
  To: Gopal Tiwari; +Cc: kbusch, dmilburn, Christoph Hellwig, linux-nvme

On Tue, Dec 08, 2020 at 08:28:19AM -0500, Gopal Tiwari wrote:
> Hi Christoph,
> 
> Please find output for both the device .. 

So it claims 1.2.1 compliance, and the NQN looks like a valid one.
And that NQN is the same for multiple devices?  Or is this one PCIe
device with multiple functions that report the same controller ID?

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-08 13:29     ` Christoph Hellwig
@ 2020-12-08 13:35       ` Gopal Tiwari
  2020-12-08 13:54         ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Gopal Tiwari @ 2020-12-08 13:35 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: kbusch, dmilburn, linux-nvme

These are two different devices. Only one of the two NVME devices is seen. The other device is rejected  due to “Duplicate cntlid”. 

Thanks 
Gopal 

----- Original Message -----
From: "Christoph Hellwig" <hch@lst.de>
To: "Gopal Tiwari" <gtiwari@redhat.com>
Cc: "Christoph Hellwig" <hch@lst.de>, kbusch@kernel.org, dmilburn@redhat.com, linux-nvme@lists.infradead.org
Sent: Tuesday, December 8, 2020 6:59:51 PM
Subject: Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a

On Tue, Dec 08, 2020 at 08:28:19AM -0500, Gopal Tiwari wrote:
> Hi Christoph,
> 
> Please find output for both the device .. 

So it claims 1.2.1 compliance, and the NQN looks like a valid one.
And that NQN is the same for multiple devices?  Or is this one PCIe
device with multiple functions that report the same controller ID?


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-08 13:35       ` Gopal Tiwari
@ 2020-12-08 13:54         ` Christoph Hellwig
  2020-12-08 19:11           ` Keith Busch
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2020-12-08 13:54 UTC (permalink / raw)
  To: Gopal Tiwari; +Cc: kbusch, dmilburn, Christoph Hellwig, linux-nvme

On Tue, Dec 08, 2020 at 08:35:14AM -0500, Gopal Tiwari wrote:
> These are two different devices. Only one of the two NVME devices is seen. The other device is rejected  due to “Duplicate cntlid”. 

So two card with one controller each, and both have the same subnqn.
Ok.  I guess the quirk is exactly right in this case, although I would
not have expected this bug from an enterprise drive from a somewhat
reputable vendor.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-04 16:16 [PATCH] nvme: Added QUIRK for Samsung PM1725a Gopal Tiwari
  2020-12-07 14:04 ` Christoph Hellwig
@ 2020-12-08 14:04 ` Christoph Hellwig
  2020-12-08 14:16   ` Gopal Tiwari
  1 sibling, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2020-12-08 14:04 UTC (permalink / raw)
  To: Gopal Tiwari; +Cc: kbusch, dmilburn, hch, linux-nvme

Thanks,

applied to nvme-5.11.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-08 14:04 ` Christoph Hellwig
@ 2020-12-08 14:16   ` Gopal Tiwari
  0 siblings, 0 replies; 10+ messages in thread
From: Gopal Tiwari @ 2020-12-08 14:16 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: kbusch, dmilburn, linux-nvme

Thanks & regards,
Gopal Tiwari 


----- Original Message -----
From: "Christoph Hellwig" <hch@lst.de>
To: "Gopal Tiwari" <gtiwari@redhat.com>
Cc: hch@lst.de, kbusch@kernel.org, linux-nvme@lists.infradead.org, dmilburn@redhat.com
Sent: Tuesday, December 8, 2020 7:34:40 PM
Subject: Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a

Thanks,

applied to nvme-5.11.


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-08 13:54         ` Christoph Hellwig
@ 2020-12-08 19:11           ` Keith Busch
  2020-12-09  7:33             ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Keith Busch @ 2020-12-08 19:11 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Gopal Tiwari, dmilburn, linux-nvme

On Tue, Dec 08, 2020 at 02:54:01PM +0100, Christoph Hellwig wrote:
> On Tue, Dec 08, 2020 at 08:35:14AM -0500, Gopal Tiwari wrote:
> > These are two different devices. Only one of the two NVME devices is seen. The other device is rejected  due to “Duplicate cntlid”. 
> 
> So two card with one controller each, and both have the same subnqn.
> Ok.  I guess the quirk is exactly right in this case, although I would
> not have expected this bug from an enterprise drive from a somewhat
> reputable vendor.

And it has CMIC capabilities! The quirk means we're using driver
generated nqn's for multipath detection, so it won't work with
multipath: the fake nqn uses the controller serial number, so all the
controllers in the subsystem will get different nqn's.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] nvme: Added QUIRK for Samsung PM1725a
  2020-12-08 19:11           ` Keith Busch
@ 2020-12-09  7:33             ` Christoph Hellwig
  0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2020-12-09  7:33 UTC (permalink / raw)
  To: Keith Busch; +Cc: Gopal Tiwari, dmilburn, Christoph Hellwig, linux-nvme

On Wed, Dec 09, 2020 at 04:11:52AM +0900, Keith Busch wrote:
> On Tue, Dec 08, 2020 at 02:54:01PM +0100, Christoph Hellwig wrote:
> > On Tue, Dec 08, 2020 at 08:35:14AM -0500, Gopal Tiwari wrote:
> > > These are two different devices. Only one of the two NVME devices is seen. The other device is rejected  due to “Duplicate cntlid”. 
> > 
> > So two card with one controller each, and both have the same subnqn.
> > Ok.  I guess the quirk is exactly right in this case, although I would
> > not have expected this bug from an enterprise drive from a somewhat
> > reputable vendor.
> 
> And it has CMIC capabilities! The quirk means we're using driver
> generated nqn's for multipath detection, so it won't work with
> multipath: the fake nqn uses the controller serial number, so all the
> controllers in the subsystem will get different nqn's.

SN is uniqueue for the whole subsystem:

"Contains the serial number for the NVM subsystem that isassigned by the
 vendor as an ASCII string."

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-12-09  7:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 16:16 [PATCH] nvme: Added QUIRK for Samsung PM1725a Gopal Tiwari
2020-12-07 14:04 ` Christoph Hellwig
2020-12-08 13:28   ` Gopal Tiwari
2020-12-08 13:29     ` Christoph Hellwig
2020-12-08 13:35       ` Gopal Tiwari
2020-12-08 13:54         ` Christoph Hellwig
2020-12-08 19:11           ` Keith Busch
2020-12-09  7:33             ` Christoph Hellwig
2020-12-08 14:04 ` Christoph Hellwig
2020-12-08 14:16   ` Gopal Tiwari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.