All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Re: Calling scsi_done from queuecommand()
  2006-01-12  7:59 ` Arjan van de Ven
@ 2006-01-12  9:47   ` Zhikun Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Zhikun Wang @ 2006-01-12  9:47 UTC (permalink / raw)
  To: Arjan van de Ven, linux-scsi

>On Thu, 2006-01-12 at 11:57 +0800, Zhikun Wang wrote:
> Hi list, 
> 	Can we call scsi_done() to complete the I/O from the queuecommand() ? 

>>yes that should be fine *IF THE COMMAND COMPLETED*. (for example that
>>can be done for battery backed ram cards)

> (e.g. to make queuecommand synchronous). 
> 	I try this method in my LsiLogic 22320 SCSI card driver 

>>but... that sounds unlikely to be right. That is real scsi, which means
>>you have to wait a REALLY long time (easily 5 miliseconds) before the
>>command completes, and you cannot sleep in queuecommand (it's called
>>from interrupt context). So this sounds really fishy

I intend to use a global variable to make queuecommand synchronously. In the <queuecommand function> i set the global variable to 0.
	......
	global = 0;
	......
	while(!global)
    	barrier();
    SCpnt->scsi_done(SCpnt);
	......
When the command completes, in the <interrupt routine> i set the global variable to 1.
	......
	global = 1;
    ......
this method works for read command, but write command will stop at scsi_done routine and then timeout!
i am very puzzled about this!

> in Redhat9,

>>you do realize you're using a truely antique linux kernel/distribution
>>there, right? I suggest you go to a far more recent (and an actual
>>maintained) distribution

i know Redhat9 is out of time, but i must use this kernel/distribution
in my project!




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

* Re: RE: Calling scsi_done from queuecommand()
       [not found] <F331B95B72AFFB4B87467BE1C8E9CF5F18160D@NAMAIL2.ad.lsil.com>
@ 2006-01-13  1:44 ` Zhikun Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Zhikun Wang @ 2006-01-13  1:44 UTC (permalink / raw)
  To: Moore, Eric, linux-scsi



> On Wednesday, January 11, 2006 9:21 PM, Zhikun Wang wrote: 

> Mr. Moore:
> 	Can we call scsi_done() to complete the I/O from the 
> queuecommand() ? (e.g. to make 
> queuecommand synchronous).   I try this method in my LsiLogic 
> 22320 SCSI card driver 
> inMoore, Eric Redhat9, and i can correctly handle read command. But 
> Write command is stop when i 
> call scsi_done() in the queuecommand. I am very puzzled!   
> Thanks for any answers!
> 

> I see no problem with that as long as your waiting for the firmware

> to complete the command.
My problem is write command is completed for the firmware, but call scsi_done() is stopped!


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

end of thread, other threads:[~2006-01-13  1:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <F331B95B72AFFB4B87467BE1C8E9CF5F18160D@NAMAIL2.ad.lsil.com>
2006-01-13  1:44 ` RE: Calling scsi_done from queuecommand() Zhikun Wang
2006-01-12  3:57 Zhikun Wang
2006-01-12  7:59 ` Arjan van de Ven
2006-01-12  9:47   ` Zhikun Wang

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.