All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomas Henzl <thenzl@redhat.com>
To: james.smart@emulex.com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 02/21] lpfc: Add Lancer Temperature Event support to the lpfc driver
Date: Tue, 17 Feb 2015 14:01:03 +0100	[thread overview]
Message-ID: <54E33B8F.4060403@redhat.com> (raw)
In-Reply-To: <54E2167F.3070500@emulex.com>

On 02/16/2015 05:10 PM, James Smart wrote:
> On 2/6/2015 7:16 AM, Tomas Henzl wrote:
>> On 02/05/2015 08:23 PM, James Smart wrote:
>>> ---
>>>   drivers/scsi/lpfc/lpfc_hw4.h  |   1 +
>>>   drivers/scsi/lpfc/lpfc_init.c | 179 +++++++++++++++++++++++++++++-------------
>>>   2 files changed, 125 insertions(+), 55 deletions(-)
>>>
>>> diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
>>> index f432ec1..3121ec4 100644
>>> --- a/drivers/scsi/lpfc/lpfc_hw4.h
>>> +++ b/drivers/scsi/lpfc/lpfc_hw4.h
>>> @@ -3244,6 +3244,7 @@ struct lpfc_acqe_sli {
>>>   #define LPFC_SLI_EVENT_TYPE_NVLOG_POST		0x4
>>>   #define LPFC_SLI_EVENT_TYPE_DIAG_DUMP		0x5
>>>   #define LPFC_SLI_EVENT_TYPE_MISCONFIGURED	0x9
>>> +#define LPFC_SLI_EVENT_TYPE_REMOTE_DPORT	0xA
>>>   };
>>>   
>>>   /*
>>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>>> index 2b5b910..4ba91af 100644
>>> --- a/drivers/scsi/lpfc/lpfc_init.c
>>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>>> @@ -1330,13 +1330,14 @@ lpfc_offline_eratt(struct lpfc_hba *phba)
>>>   void
>>>   lpfc_sli4_offline_eratt(struct lpfc_hba *phba)
>>>   {
>>> +	spin_lock_irq(&phba->hbalock);
>>> +	phba->link_state = LPFC_HBA_ERROR;
>>> +	spin_unlock_irq(&phba->hbalock);
>> Hi James,
>> please explain why is the spinlock^ needed?
>> There seems to be lot of other places where link_state is not protected,
>> for example it is evaluated in lpfc_sli4_handle_received_buffer with no lock.
>>
>> Could you please also add some more description to the of the body your mails,
>> sometimes  a subject only is not enough.
>>
>> Thanks,
>> Tomas
> Well - good question - access should be under lock, and it wouldn't 
> surprise me if there are some cases, especially read checks, where it 
> isn't. In most cases, this bad behavior works, as the variable doesn't 
> change often, and even when it does, there's very long time delays 
> before something would reference the change. Not trying to say it 
> shouldn't be fixed, but rather why it hasn't been an issue. This one 
> will take a little bit to clean up - it reached this point historically 
> over many successive changes.

OK, makes sense, I have found at least one place where is a spinlock used,
his is a start for an longer process - I'm fine with the explanation.
and also with your response in 7/21+10/21.

>
> Yes, I'll add a little meat to future patches.

Thanks.

tomash

>
> -- james s
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2015-02-17 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 19:23 [PATCH 02/21] lpfc: Add Lancer Temperature Event support to the lpfc driver James Smart
2015-02-06 12:16 ` Tomas Henzl
2015-02-16 16:10   ` James Smart
2015-02-17 13:01     ` Tomas Henzl [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-04-03 21:10 James Smart
2015-04-10  6:05 ` Hannes Reinecke

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=54E33B8F.4060403@redhat.com \
    --to=thenzl@redhat.com \
    --cc=james.smart@emulex.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.