From: Mike Christie <michaelc@cs.wisc.edu>
To: Jayamohan Kallickal <Jayamohan.Kallickal@Emulex.Com>
Cc: Jayamohan Kallickal <jayamohank@gmail.com>,
"jbottomley@parallels.com" <jbottomley@parallels.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Sony John-N <Sony.John-N@Emulex.Com>,
"cleech@redhat.com" <cleech@redhat.com>
Subject: Re: [PATCH 3/6] be2iscsi: Fix MCCQ posting for Mbx-Cmd after driver initialization is complete
Date: Thu, 03 Apr 2014 13:30:39 -0500 [thread overview]
Message-ID: <533DA8CF.3080800@cs.wisc.edu> (raw)
In-Reply-To: <d28ae082-c08a-4ac1-ad7f-044d6220fb98@CMEXHTCAS1.ad.emulex.com>
On 04/03/2014 12:02 AM, Jayamohan Kallickal wrote:
>
>
> -----Original Message-----
> From: Mike Christie [mailto:michaelc@cs.wisc.edu]
> Sent: Thursday, March 27, 2014 5:46 PM
> To: Jayamohan Kallickal; jbottomley@parallels.com; linux-scsi@vger.kernel.org
> Cc: Jayamohan Kallickal; Sony John-N
> Subject: Re: [PATCH 3/6] be2iscsi: Fix MCCQ posting for Mbx-Cmd after driver initialization is complete
>
> On 03/27/2014 09:39 AM, Jayamohan Kallickal wrote:
>> Even before probe for function was completed, iSCSI Daemon had
>> initiated login to target while OS was coming up. The targets which
>> had node.startup=automatic, login process was initiated.Since
>> function specific initialization was still in progress this lead to kernel panic.
>> The reson was MCCQ was not yet created and login Mbx_Cmd was sent on MCCQ.
>> wrb_from_mccq() failed with kernel-panic access.
>>
>> In the fix checking in alloc_mcc_tag() if driver initialization is complete or not.
>> Based on the result driver continues or return with an Error.
>>
>> Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
>> Signed-off-by: Jayamohan Kallickal <Jayamohan.Kallickal@emulex.com>
>> ---
>> drivers/scsi/be2iscsi/be_cmds.c | 8 ++++++++
>> drivers/scsi/be2iscsi/be_main.c | 2 ++
>> drivers/scsi/be2iscsi/be_main.h | 1 +
>> 3 files changed, 11 insertions(+)
>>
>> diff --git a/drivers/scsi/be2iscsi/be_cmds.c
>> b/drivers/scsi/be2iscsi/be_cmds.c index 1432ed5..4cabf5f 100644
>> --- a/drivers/scsi/be2iscsi/be_cmds.c
>> +++ b/drivers/scsi/be2iscsi/be_cmds.c
>> @@ -118,6 +118,14 @@ unsigned int alloc_mcc_tag(struct beiscsi_hba
>> *phba) {
>> unsigned int tag = 0;
>>
>> +
>> + if (phba->state & BE_ADAPTER_INIT_PHASE) {
>> + beiscsi_log(phba, KERN_ERR,
>> + BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
>> + "BC_%d : Driver Initialization still in progress\n");
>> + return tag;
>> + }
>> +
>
>> I think normally we do not call scsi_host_add and expose the host until the driver can handle requests from entry points like sysfs and queuecommand.
>
>> Can you just move iscsi_host_add from beiscsi_hba_alloc to beiscsi_dev_probe after beiscsi_setup_boot_info is called?
>
> Tried moving iscsi_add_host and it did not help the issue where the ep_connect was being called before the probe is completed.
>
> Chris Leech has a solution for this and when applied along with this patch works for us.
>
Did you test the host add solution with Chris's fix? With your patch and
Chris's patch __session_create will return error. iscsiadm would then
retry and eventually the host would be added. With your patch,
__session_create -> iscsi_sysfs_get_host_no_from_hwinfo would probably
fail, because iscsid tries to read a host attr and gets a error because
the host is not yet setup.
If you move the host add and uses Chris's patch then something similar
should happen. The host will not even be in sysfs yet, so
iscsi_sysfs_get_host_no_from_hwinfo will fail. __session_create will
return error and iscsiadm will retry.
For what I am suggesting you do not need "if full_init" tests in every
driver. The host is not added until it is actually setup.
next prev parent reply other threads:[~2014-04-03 18:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 16:39 [PATCH 1/6] be2iscsi: Fix retrieving MCCQ_WRB in non-embedded Mbox path Jayamohan Kallickal
2014-03-27 16:39 ` [PATCH 2/6] be2iscsi: relinquishing control after processing 512 CQE Jayamohan Kallickal
2014-03-31 5:25 ` Mike Christie
2014-04-03 5:02 ` Jayamohan Kallickal
2014-03-27 16:39 ` [PATCH 3/6] be2iscsi: Fix MCCQ posting for Mbx-Cmd after driver initialization is complete Jayamohan Kallickal
2014-03-28 0:45 ` Mike Christie
2014-04-03 5:02 ` Jayamohan Kallickal
2014-04-03 18:30 ` Mike Christie [this message]
2014-04-03 18:39 ` Mike Christie
2014-03-27 16:39 ` [PATCH 4/6] be2iscsi: Fix interrupt Coalescing mechanism Jayamohan Kallickal
2014-03-27 16:39 ` [PATCH 5/6] be2iscsi: Fix TCP parameters while connection offloading Jayamohan Kallickal
2014-03-31 4:53 ` Mike Christie
2014-04-03 5:02 ` Jayamohan Kallickal
2014-03-27 16:39 ` [PATCH 6/6] be2iscsi: Bump the driver version Jayamohan Kallickal
2014-03-27 16:39 ` [PATCH 0/6] be2iscsi: Update to 10.2.218.0 Jayamohan Kallickal
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=533DA8CF.3080800@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=Jayamohan.Kallickal@Emulex.Com \
--cc=Sony.John-N@Emulex.Com \
--cc=cleech@redhat.com \
--cc=jayamohank@gmail.com \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
/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 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.