Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751900AbdHCJwr (ORCPT ); Thu, 3 Aug 2017 05:52:47 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:33911 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbdHCJwn (ORCPT ); Thu, 3 Aug 2017 05:52:43 -0400 MIME-Version: 1.0 In-Reply-To: References: <1500038560-11231-1-git-send-email-suganath-prabu.subramani@broadcom.com> <1500038560-11231-9-git-send-email-suganath-prabu.subramani@broadcom.com> From: Sreekanth Reddy Date: Thu, 3 Aug 2017 15:22:42 +0530 Message-ID: Subject: Re: [PATCH v2 08/13] mpt3sas: Set NVMe device queue depth as 128 To: Hannes Reinecke Cc: Suganath Prabu S , "jejb@kernel.org" , Christoph Hellwig , "Martin K. Petersen" , "linux-scsi@vger.kernel.org" , Sathya Prakash , Kashyap Desai , "linux-kernel@vger.kernel.org" , Chaitra Basappa , linux-nvme@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v739qr0e002856 Content-Length: 4535 Lines: 105 On Thu, Aug 3, 2017 at 12:09 PM, Hannes Reinecke wrote: > On 07/14/2017 03:22 PM, Suganath Prabu S wrote: >> Sets nvme device queue depth, name and displays device capabilities >> >> Signed-off-by: Chaitra P B >> Signed-off-by: Suganath Prabu S >> --- >> drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- >> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 40 ++++++++++++++++++++++++++++++++++ >> 2 files changed, 41 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h >> index 0a8187e..b7855c8 100644 >> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h >> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h >> @@ -115,7 +115,7 @@ >> >> #define MPT3SAS_RAID_MAX_SECTORS 8192 >> #define MPT3SAS_HOST_PAGE_SIZE_4K 12 >> - >> +#define MPT3SAS_NVME_QUEUE_DEPTH 128 >> #define MPT_NAME_LENGTH 32 /* generic length of strings */ >> #define MPT_STRING_LENGTH 64 >> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c >> index 1dd9674..c5a131f 100644 >> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c >> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c >> @@ -2290,6 +2290,7 @@ scsih_slave_configure(struct scsi_device *sdev) >> struct MPT3SAS_DEVICE *sas_device_priv_data; >> struct MPT3SAS_TARGET *sas_target_priv_data; >> struct _sas_device *sas_device; >> + struct _pcie_device *pcie_device; >> struct _raid_device *raid_device; >> unsigned long flags; >> int qdepth; >> @@ -2420,6 +2421,45 @@ scsih_slave_configure(struct scsi_device *sdev) >> } >> } >> >> + /* PCIe handling */ >> + if (sas_target_priv_data->flags & MPT_TARGET_FLAGS_PCIE_DEVICE) { >> + spin_lock_irqsave(&ioc->pcie_device_lock, flags); >> + pcie_device = __mpt3sas_get_pdev_by_wwid(ioc, >> + sas_device_priv_data->sas_target->sas_address); >> + if (!pcie_device) { >> + spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); >> + dfailprintk(ioc, pr_warn(MPT3SAS_FMT >> + "failure at %s:%d/%s()!\n", ioc->name, __FILE__, >> + __LINE__, __func__)); >> + return 1; >> + } >> + >> + /*TODO-right Queue Depth?*/ >> + qdepth = MPT3SAS_NVME_QUEUE_DEPTH; >> + ds = "NVMe"; >> + /*TODO-Add device name when defined*/ >> + sdev_printk(KERN_INFO, sdev, >> + "%s: handle(0x%04x), wwid(0x%016llx), port(%d)\n", >> + ds, handle, (unsigned long long)pcie_device->wwid, >> + pcie_device->port_num); >> + if (pcie_device->enclosure_handle != 0) >> + sdev_printk(KERN_INFO, sdev, >> + "%s: enclosure logical id(0x%016llx), slot(%d)\n", >> + ds, >> + (unsigned long long)pcie_device->enclosure_logical_id, >> + pcie_device->slot); >> + if (pcie_device->connector_name[0] != '\0') >> + sdev_printk(KERN_INFO, sdev, >> + "%s: enclosure level(0x%04x)," >> + "connector name( %s)\n", ds, >> + pcie_device->enclosure_level, >> + pcie_device->connector_name); >> + pcie_device_put(pcie_device); >> + spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); >> + scsih_change_queue_depth(sdev, qdepth); >> + return 0; >> + } >> + >> spin_lock_irqsave(&ioc->sas_device_lock, flags); >> sas_device = __mpt3sas_get_sdev_by_addr(ioc, >> sas_device_priv_data->sas_target->sas_address); >> > Well; what are these TODOs doing here? > If you know things are not correct, why not doing them correctly? > If you cannot do them correctly, why? Hannes, These TODOs comments are added during initial development phase. We will remove these TODO comments. Thanks, Sreekanth > > Cheers, > > Hannes > -- > Dr. Hannes Reinecke Teamlead Storage & Networking > hare@suse.de +49 911 74053 688 > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton > HRB 21284 (AG Nürnberg)