RE: [PATCH 01/11] Use msleep() rather than schedule_timeout().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>On Tue, 2006-03-07 at 16:35 -0800, Arjan van de Van wrote:
>On Tue, 2006-03-07 at 16:35 -0800, ravi.anand@xxxxxxxxxx wrote:


> diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
> index 8720357..6959adc 100644
> --- a/drivers/scsi/qla4xxx/ql4_mbx.c
> +++ b/drivers/scsi/qla4xxx/ql4_mbx.c
> @@ -95,7 +95,6 @@ qla4xxx_mailbox_command(scsi_qla_host_t 
>  	spin_unlock_irqrestore(&ha->hardware_lock, flags);
>  
>  	/* Wait for completion */
> -	set_current_state(TASK_UNINTERRUPTIBLE);
>  	add_wait_queue(&ha->mailbox_wait_queue, &wait);
>  
>  	/*
> @@ -105,7 +104,6 @@ qla4xxx_mailbox_command(scsi_qla_host_t 
>  	 */
>  	if (outCount == 0) {
>  		status = QLA_SUCCESS;
> -		set_current_state(TASK_RUNNING);
>  		remove_wait_queue(&ha->mailbox_wait_queue, &wait);
>  		goto mbox_exit;
>  	}
> @@ -130,20 +128,8 @@ qla4xxx_mailbox_command(scsi_qla_host_t 
>  		}
>  		spin_unlock_irqrestore(&ha->hardware_lock, flags);
>  
> -		/*
> -		 * Delay for 10 microseconds
> -		 * NOTE: Interrupt_handler may be called here,
> -		 *       if interrupts are enabled
> -		 */
> -#if 0
> -		udelay(10);
> -
> -#else				/*  */
> -		schedule_timeout(10);
> -
> -#endif				/*  */
> -	}			/* wait loop */
> -	set_current_state(TASK_RUNNING);
> +		mdelay(10);
> +	}
>  	remove_wait_queue(&ha->mailbox_wait_queue, &wait);
>  

>>this looks like a major step backwards; this orginal code was right!

Good catch. Overlooked, since msleep() does the context switching as well.
We will queue it for the next release.

Thanx
Ravi






-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux