Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964858AbbDPOzJ (ORCPT ); Thu, 16 Apr 2015 10:55:09 -0400 Received: from mga14.intel.com ([192.55.52.115]:60497 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753001AbbDPOzD (ORCPT ); Thu, 16 Apr 2015 10:55:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,588,1422950400"; d="scan'208";a="557133348" Date: Thu, 16 Apr 2015 14:55:02 +0000 (UTC) From: Keith Busch X-X-Sender: vmware@localhost.lm.intel.com To: =?ISO-8859-15?Q?Matias_Bj=F8rling?= cc: hch@infradead.org, axboe@fb.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, javier@paletta.io, keith.busch@intel.com Subject: Re: [PATCH 5/5 v2] nvme: LightNVM support In-Reply-To: <1429101284-19490-6-git-send-email-m@bjorling.me> Message-ID: References: <1429101284-19490-1-git-send-email-m@bjorling.me> <1429101284-19490-6-git-send-email-m@bjorling.me> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-453768380-1429196103=:32385" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1836 Lines: 44 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-453768380-1429196103=:32385 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 15 Apr 2015, Matias Bjørling 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 = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12; > + u64 cap = readq(&dev->bar->cap); > + int shift = NVME_CAP_MPSMIN(cap) + 12; > + int nvm_cmdset = NVME_CAP_NVM(cap); 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 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. > @@ -2332,6 +2704,7 @@ static int nvme_dev_add(struct nvme_dev *dev) > ctrl = mem; > nn = le32_to_cpup(&ctrl->nn); > dev->oncs = le16_to_cpup(&ctrl->oncs); > + dev->oacs = le16_to_cpup(&ctrl->oacs); I don't find OACS used anywhere in the rest of the patch. I think this must be left over from v1. 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. --8323328-453768380-1429196103=:32385-- -- 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/