From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>,
"jejb@kernel.org" <jejb@kernel.org>,
Christoph Hellwig <hch@infradead.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Sathya Prakash <Sathya.Prakash@broadcom.com>,
Kashyap Desai <kashyap.desai@broadcom.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Chaitra Basappa <chaitra.basappa@broadcom.com>,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2 02/13] mpt3sas: Add nvme device support in slave alloc, target alloc and probe
Date: Thu, 3 Aug 2017 15:39:53 +0530 [thread overview]
Message-ID: <CAK=zhgo9X+mz3Cq1vxOuE+YB_GjsnRcmRvGLRVdFW3TUrq1fwA@mail.gmail.com> (raw)
In-Reply-To: <5fb13656-0f40-fdc4-8612-ec1bf04cf696@suse.de>
On Thu, Aug 3, 2017 at 11:57 AM, Hannes Reinecke <hare@suse.de> wrote:
> On 07/14/2017 03:22 PM, Suganath Prabu S wrote:
>> 1) Added support for probing pcie device and adding NVMe drives to
>> SML and driver's internal list pcie_device_list.
>>
>> 2) Added support for determing NVMe as boot device.
>>
>> 3) Added nvme device support for call back functions scan_finished
>> target_alloc,slave_alloc,target destroy and slave destroy.
>>
>> a) During scan, pcie devices are probed and added to SML to drivers
>> internal list.
>>
>> b) target_alloc & slave alloc API's allocates resources for
>> (MPT3SAS_TARGET & MPT3SAS_DEVICE) private datas and holds
>> information like handle, target_id etc.
>>
>> c) slave_destroy & target_destroy are called when driver unregisters
>> or removes device. Also frees allocated resources and info.
>>
>> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
>> Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
>> ---
>> drivers/scsi/mpt3sas/mpt3sas_base.h | 110 ++++++++-
>> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 431 +++++++++++++++++++++++++++++++---
>> 2 files changed, 507 insertions(+), 34 deletions(-)
>>
> Have you considered using 'scan_start()/scan_finished()' SCSI midlayer
> callbacks here?
> Seeing that you are enumerating the devices internally already that
> should give you better control about the scanning process.
Yes mpt3sas driver has defined scan_start() & scan_finished()
callbacks function. In the scan_start() callback function driver will
issue Port Enable request to the HBA Firmware to enable the HBA ports,
so the driver can start receiving drives (SAS/SATA/NVMe) discovery
events from firmware and add the discovered drives to the respective
drive type list. (e.g. SAS & SATA drives are added sas_device_list and
NVMe drives are added to pcie_device_list) . Once the driver receives
the Port Enable completion reply message from firmware then in the
scan_finished() callback function driver will register the SAS & SATA
devices added in the sas_device_list to SCSI Transport Layer by using
sas_rphy_add() API and NVMe devices added in the pcie_device_list are
directly added to SML by using scsi_add_device() API with channel
number set to two.
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)
next prev parent reply other threads:[~2017-08-03 10:09 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 13:22 [PATCH v2 00/13] mpt3sas driver NVMe support: Suganath Prabu S
2017-07-14 13:22 ` [PATCH v2 01/13] mpt3sas: Update MPI Header Suganath Prabu S
2017-08-03 6:24 ` Hannes Reinecke
2017-08-03 7:55 ` Johannes Thumshirn
2017-08-03 9:34 ` Sreekanth Reddy
2017-07-14 13:22 ` [PATCH v2 02/13] mpt3sas: Add nvme device support in slave alloc, target alloc and probe Suganath Prabu S
2017-08-03 6:27 ` Hannes Reinecke
2017-08-03 10:09 ` Sreekanth Reddy [this message]
2017-07-14 13:22 ` [PATCH v2 03/13] mpt3sas: SGL to PRP Translation for I/Os to NVMe devices Suganath Prabu S
2017-07-27 13:26 ` Martin K. Petersen
2017-07-14 13:22 ` [PATCH v2 04/13] mpt3sas: Added support for nvme encapsulated request message Suganath Prabu S
2017-08-03 6:33 ` Hannes Reinecke
2017-07-14 13:22 ` [PATCH v2 05/13] mpt3sas: API 's to support NVMe drive addition to SML Suganath Prabu S
2017-08-03 6:35 ` Hannes Reinecke
2017-07-14 13:22 ` [PATCH v2 06/13] mpt3sas: API's to remove nvme drive from sml Suganath Prabu S
2017-08-03 6:36 ` Hannes Reinecke
2017-07-14 13:22 ` [PATCH v2 07/13] mpt3sas: Handle NVMe PCIe device related events generated from firmware Suganath Prabu S
2017-08-03 6:38 ` Hannes Reinecke
2017-07-14 13:22 ` [PATCH v2 08/13] mpt3sas: Set NVMe device queue depth as 128 Suganath Prabu S
2017-08-03 6:39 ` Hannes Reinecke
2017-08-03 9:52 ` Sreekanth Reddy
2017-07-14 13:22 ` [PATCH v2 09/13] mpt3sas: scan and add nvme device after controller reset Suganath Prabu S
2017-08-03 6:40 ` Hannes Reinecke
2017-08-03 10:19 ` Sreekanth Reddy
2017-07-14 13:22 ` [PATCH v2 10/13] mpt3as: Add-Task-management-debug-info-for-NVMe-drives Suganath Prabu S
2017-08-03 6:43 ` Hannes Reinecke
2017-07-14 13:22 ` [PATCH v2 11/13] mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info Suganath Prabu S
2017-08-03 6:44 ` Hannes Reinecke
2017-07-14 13:22 ` [PATCH v2 12/13] mpt3sas: Fix nvme drives checking for tlr Suganath Prabu S
2017-08-03 6:44 ` Hannes Reinecke
2017-07-14 13:22 ` [PATCH v2 13/13] mpt3sas: Update mpt3sas driver version Suganath Prabu S
2017-08-03 6:45 ` Hannes Reinecke
2017-07-25 5:20 ` [PATCH v2 00/13] mpt3sas driver NVMe support: Suganath Prabu Subramani
2017-08-02 8:14 ` Hannes Reinecke
2017-08-03 6:48 ` Hannes Reinecke
2017-08-05 13:53 ` Christoph Hellwig
2017-08-05 14:42 ` James Bottomley
2017-08-07 13:56 ` Kashyap Desai
2017-08-07 14:18 ` James Bottomley
2017-08-07 14:31 ` Kashyap Desai
2017-08-07 15:45 ` James Bottomley
2017-08-08 4:04 ` Keith Busch
2017-08-08 7:03 ` Sreekanth Reddy
2017-08-08 7:29 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK=zhgo9X+mz3Cq1vxOuE+YB_GjsnRcmRvGLRVdFW3TUrq1fwA@mail.gmail.com' \
--to=sreekanth.reddy@broadcom.com \
--cc=Sathya.Prakash@broadcom.com \
--cc=chaitra.basappa@broadcom.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=jejb@kernel.org \
--cc=kashyap.desai@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=suganath-prabu.subramani@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).