Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752190AbbDPPOS (ORCPT ); Thu, 16 Apr 2015 11:14:18 -0400 Received: from mail-la0-f48.google.com ([209.85.215.48]:36751 "EHLO mail-la0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751935AbbDPPOM (ORCPT ); Thu, 16 Apr 2015 11:14:12 -0400 Subject: Re: [PATCH 5/5 v2] nvme: LightNVM support Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_20DA8A89-0E07-4D28-ABAF-8A23EB103C59"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: =?utf-8?Q?Javier_Gonz=C3=A1lez?= In-Reply-To: Date: Thu, 16 Apr 2015 17:14:06 +0200 Cc: =?utf-8?Q?Matias_Bj=C3=B8rling?= , hch@infradead.org, axboe@fb.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Message-Id: <694D3575-E49B-45BB-8E48-7188169B75F0@paletta.io> References: <1429101284-19490-1-git-send-email-m@bjorling.me> <1429101284-19490-6-git-send-email-m@bjorling.me> To: Keith Busch X-Mailer: Apple Mail (2.2098) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3073 Lines: 85 --Apple-Mail=_20DA8A89-0E07-4D28-ABAF-8A23EB103C59 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, > On 16 Apr 2015, at 16:55, Keith Busch wrote: >=20 > On Wed, 15 Apr 2015, Matias Bj=C3=B8rling wrote: >> @@ -2316,7 +2686,9 @@ static int nvme_dev_add(struct nvme_dev *dev) >> struct nvme_id_ctrl *ctrl; >> void *mem; >> dma_addr_t dma_addr; >> - int shift =3D NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12; >> + u64 cap =3D readq(&dev->bar->cap); >> + int shift =3D NVME_CAP_MPSMIN(cap) + 12; >> + int nvm_cmdset =3D NVME_CAP_NVM(cap); >=20 > The controller capabilities' command sets supported used here is the > right way to key off on support for this new command set, IMHO, but I = do > not see in this patch the command set being selected when the = controller > is enabled >=20 > Also if we're going this route, I think we need to define this = reserved > bit in the spec, but I'm not sure how to help with that. >=20 >> @@ -2332,6 +2704,7 @@ static int nvme_dev_add(struct nvme_dev *dev) >> ctrl =3D mem; >> nn =3D le32_to_cpup(&ctrl->nn); >> dev->oncs =3D le16_to_cpup(&ctrl->oncs); >> + dev->oacs =3D le16_to_cpup(&ctrl->oacs); >=20 > I don't find OACS used anywhere in the rest of the patch. I think this > must be left over from v1. >=20 > Otherwise it looks pretty good to me, but I think it would be cleaner = if > the lightnvm stuff is not mixed in the same file with the standard = nvme > command set. We might end up splitting nvme-core in the future anyway > for command sets and transports. Would you be ok with having nvme-lightnvm for LightNVM specific commands? Javier. --Apple-Mail=_20DA8A89-0E07-4D28-ABAF-8A23EB103C59 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVL9G+AAoJEDLOfM9RJRPENjMQAJxbT2rQSvLhMEGyscyxXEeU Bao/0+0bWmqL4FzOUlAVXWHp0/x5fBwMu3GMgAYAPIAevGHC32vNOAsEiII+Kgko s1AwehzJvOZmANIH9XuNz9cVYSx0HMpkQ9YV65KkIAFj6al05qMdRIhqxxt1Lo5W zZ3Oli9CBnAYNZyjnudE081kL7Zz6OyZTfZ1aVUZuwNGJ6Xm0irt43BRJpyKtL0x NsvtJUoV4M5mDBL/yW3s9A2xCzZxCHdIfBqF1xNF/sf6NYhPGX5Zk1n/LFz7w/Li hHVQL9m4cSpINA9BJb5QcV95GfpFGDrhMq5bIJprLqDl08TH8pWs8bz7nDX8TUd/ x64WwYw6SV+6YNJ1ShsF5qdc480713Rjw234XWZ2KiloR5OgpIA7nETbVaZTPXsW 4oybJjXjp0Ta9VCGovxd2qOyNLxESEQ7TszJSdMqsKBGh3luVlrMbGdQ6dot8tjG iH4UNyZwEdDv+b+hBWED5gex7PsyZq5clIuBlspe79zFQ+3qFg6RjtZNOr13oMUw J5hpEhFhUlZBACFAN+KSPyduRXCVW5X7A1nD1iHwVXzP0dTFpZGCyQt2exgbBxA4 kz1+iBrUnx/qY02C6h79DzJ4mS+nNAxgYzWB3sWggQwIa6iIJWLGz1h54/dtgajZ HP1HLprzcOGT4gmSA4wr =97LZ -----END PGP SIGNATURE----- --Apple-Mail=_20DA8A89-0E07-4D28-ABAF-8A23EB103C59-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/