mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC v4 14/19] buslogic: Remove host_lock unlock() + lock() from BusLogic_QueueCommand()
@ 2010-09-28  2:07 Nicholas A. Bellinger
  2010-09-29  7:55 ` Nicholas A. Bellinger
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas A. Bellinger @ 2010-09-28  2:07 UTC (permalink / raw)
  To: linux-scsi, linux-kernel, Vasu Dev, Tim Chen, Andi Kleen,
	Matthew Wilcox, James Bottomley, Mike Christie, Jens Axboe
  Cc: James Smart, Andrew Vasquez, FUJITA Tomonori, Hannes Reinecke,
	Joe Eykholt, Christoph Hellwig, Jon Hawley, MPTFusionLinux,
	eata.c maintainer, Luben Tuikov, mvsas maintainer,
	pm8001 maintainer Jack Wang, Nicholas Bellinger

From: Nicholas Bellinger <nab@linux-iscsi.org>

This patch removes the now legacy host_lock unlock() + lock() optimization
from buslogic.c:BusLogic_QueueCommand()

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
---
 drivers/scsi/BusLogic.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index fc0b4b8..f39b4fc 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -2837,9 +2837,7 @@ static int BusLogic_QueueCommand(struct scsi_cmnd *Command, void (*CompletionRou
 	 */
 	CCB = BusLogic_AllocateCCB(HostAdapter);
 	if (CCB == NULL) {
-		spin_unlock_irq(HostAdapter->SCSI_Host->host_lock);
 		BusLogic_Delay(1);
-		spin_lock_irq(HostAdapter->SCSI_Host->host_lock);
 		CCB = BusLogic_AllocateCCB(HostAdapter);
 		if (CCB == NULL) {
 			Command->result = DID_ERROR << 16;
@@ -2965,10 +2963,8 @@ static int BusLogic_QueueCommand(struct scsi_cmnd *Command, void (*CompletionRou
 		   error as a Host Adapter Hard Reset should be initiated soon.
 		 */
 		if (!BusLogic_WriteOutgoingMailbox(HostAdapter, BusLogic_MailboxStartCommand, CCB)) {
-			spin_unlock_irq(HostAdapter->SCSI_Host->host_lock);
 			BusLogic_Warning("Unable to write Outgoing Mailbox - " "Pausing for 1 second\n", HostAdapter);
 			BusLogic_Delay(1);
-			spin_lock_irq(HostAdapter->SCSI_Host->host_lock);
 			if (!BusLogic_WriteOutgoingMailbox(HostAdapter, BusLogic_MailboxStartCommand, CCB)) {
 				BusLogic_Warning("Still unable to write Outgoing Mailbox - " "Host Adapter Dead?\n", HostAdapter);
 				BusLogic_DeallocateCCB(CCB);
-- 
1.7.3


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

* Re: [RFC v4 14/19] buslogic: Remove host_lock unlock() + lock() from BusLogic_QueueCommand()
  2010-09-28  2:07 [RFC v4 14/19] buslogic: Remove host_lock unlock() + lock() from BusLogic_QueueCommand() Nicholas A. Bellinger
@ 2010-09-29  7:55 ` Nicholas A. Bellinger
  0 siblings, 0 replies; 2+ messages in thread
From: Nicholas A. Bellinger @ 2010-09-29  7:55 UTC (permalink / raw)
  To: linux-scsi
  Cc: linux-kernel, Vasu Dev, Tim Chen, Andi Kleen, Matthew Wilcox,
	James Bottomley, Mike Christie, Jens Axboe, James Smart,
	Andrew Vasquez, FUJITA Tomonori, Hannes Reinecke, Joe Eykholt,
	Christoph Hellwig, Jon Hawley, MPTFusionLinux, eata.c maintainer,
	Luben Tuikov, mvsas maintainer, pm8001 maintainer Jack Wang

On Mon, 2010-09-27 at 19:07 -0700, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
> 
> This patch removes the now legacy host_lock unlock() + lock() optimization
> from buslogic.c:BusLogic_QueueCommand()
> 

FYI Guys, I have gone ahead and dropped this patch for RFCv5 as the
BusLogic LLD was the only patch in the v4 series who did not set
SHT->unlocked_qcmds=1, so we will still need the BusLogic_QueueCommand()
unlock -> lock before calling BusLogic_Delay() for the two cases below.

Thanks,

--nab

> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
> ---
>  drivers/scsi/BusLogic.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
> index fc0b4b8..f39b4fc 100644
> --- a/drivers/scsi/BusLogic.c
> +++ b/drivers/scsi/BusLogic.c
> @@ -2837,9 +2837,7 @@ static int BusLogic_QueueCommand(struct scsi_cmnd *Command, void (*CompletionRou
>  	 */
>  	CCB = BusLogic_AllocateCCB(HostAdapter);
>  	if (CCB == NULL) {
> -		spin_unlock_irq(HostAdapter->SCSI_Host->host_lock);
>  		BusLogic_Delay(1);
> -		spin_lock_irq(HostAdapter->SCSI_Host->host_lock);
>  		CCB = BusLogic_AllocateCCB(HostAdapter);
>  		if (CCB == NULL) {
>  			Command->result = DID_ERROR << 16;
> @@ -2965,10 +2963,8 @@ static int BusLogic_QueueCommand(struct scsi_cmnd *Command, void (*CompletionRou
>  		   error as a Host Adapter Hard Reset should be initiated soon.
>  		 */
>  		if (!BusLogic_WriteOutgoingMailbox(HostAdapter, BusLogic_MailboxStartCommand, CCB)) {
> -			spin_unlock_irq(HostAdapter->SCSI_Host->host_lock);
>  			BusLogic_Warning("Unable to write Outgoing Mailbox - " "Pausing for 1 second\n", HostAdapter);
>  			BusLogic_Delay(1);
> -			spin_lock_irq(HostAdapter->SCSI_Host->host_lock);
>  			if (!BusLogic_WriteOutgoingMailbox(HostAdapter, BusLogic_MailboxStartCommand, CCB)) {
>  				BusLogic_Warning("Still unable to write Outgoing Mailbox - " "Host Adapter Dead?\n", HostAdapter);
>  				BusLogic_DeallocateCCB(CCB);


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

end of thread, other threads:[~2010-09-29  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-28  2:07 [RFC v4 14/19] buslogic: Remove host_lock unlock() + lock() from BusLogic_QueueCommand() Nicholas A. Bellinger
2010-09-29  7:55 ` Nicholas A. Bellinger

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

all inboxes | Powered by JetHome®