public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] [SCSI] lpfc: nested calls to spin_lock_irq()
@ 2011-12-16 20:28 Dan Carpenter
  2011-12-21 15:42 ` James Smart
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-12-16 20:28 UTC (permalink / raw)
  To: James Smart; +Cc: James E.J. Bottomley, linux-scsi, kernel-janitors

We already have disabled IRQs so there is no need to disable them again.
Also the functions are not nestable, the first spin_unlock_irq() will
enable IRQs and we don't want to do that until the second unlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 678a4b1..d7e916b 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -2977,9 +2977,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la)
 				"topology\n");
 				/* Get Loop Map information */
 		if (bf_get(lpfc_mbx_read_top_il, la)) {
-			spin_lock_irq(shost->host_lock);
+			spin_lock(shost->host_lock);
 			vport->fc_flag |= FC_LBIT;
-			spin_unlock_irq(shost->host_lock);
+			spin_unlock(shost->host_lock);
 		}
 
 		vport->fc_myDID = bf_get(lpfc_mbx_read_top_alpa_granted, la);
@@ -3029,9 +3029,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la)
 				phba->sli3_options |= LPFC_SLI3_NPIV_ENABLED;
 		}
 		vport->fc_myDID = phba->fc_pref_DID;
-		spin_lock_irq(shost->host_lock);
+		spin_lock(shost->host_lock);
 		vport->fc_flag |= FC_LBIT;
-		spin_unlock_irq(shost->host_lock);
+		spin_unlock(shost->host_lock);
 	}
 	spin_unlock_irq(&phba->hbalock);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] [SCSI] lpfc: nested calls to spin_lock_irq()
  2011-12-16 20:28 [patch] [SCSI] lpfc: nested calls to spin_lock_irq() Dan Carpenter
@ 2011-12-21 15:42 ` James Smart
  0 siblings, 0 replies; 2+ messages in thread
From: James Smart @ 2011-12-21 15:42 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: James E.J. Bottomley, linux-scsi@vger.kernel.org,
	kernel-janitors@vger.kernel.org

Thanks Dan...

-- james


Acked-by: James Smart <james.smart@emulex.com>


On 12/16/2011 3:28 PM, Dan Carpenter wrote:
> We already have disabled IRQs so there is no need to disable them again.
> Also the functions are not nestable, the first spin_unlock_irq() will
> enable IRQs and we don't want to do that until the second unlock.
>
> Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
> index 678a4b1..d7e916b 100644
> --- a/drivers/scsi/lpfc/lpfc_hbadisc.c
> +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
> @@ -2977,9 +2977,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la)
>   				"topology\n");
>   				/* Get Loop Map information */
>   		if (bf_get(lpfc_mbx_read_top_il, la)) {
> -			spin_lock_irq(shost->host_lock);
> +			spin_lock(shost->host_lock);
>   			vport->fc_flag |= FC_LBIT;
> -			spin_unlock_irq(shost->host_lock);
> +			spin_unlock(shost->host_lock);
>   		}
>
>   		vport->fc_myDID = bf_get(lpfc_mbx_read_top_alpa_granted, la);
> @@ -3029,9 +3029,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la)
>   				phba->sli3_options |= LPFC_SLI3_NPIV_ENABLED;
>   		}
>   		vport->fc_myDID = phba->fc_pref_DID;
> -		spin_lock_irq(shost->host_lock);
> +		spin_lock(shost->host_lock);
>   		vport->fc_flag |= FC_LBIT;
> -		spin_unlock_irq(shost->host_lock);
> +		spin_unlock(shost->host_lock);
>   	}
>   	spin_unlock_irq(&phba->hbalock);
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-21 15:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-16 20:28 [patch] [SCSI] lpfc: nested calls to spin_lock_irq() Dan Carpenter
2011-12-21 15:42 ` James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox