[ros-kernel] BusLogic 958 SCSI miniport

Filip Navara xnavara at volny.cz
Thu Mar 25 22:30:15 CET 2004


Hi,

I have tried to add an in-progress IRP queue where IRPs were added at 
the beginning of ScsiPortIo and the queue was checked for completed SRBs 
(marked by ScsiPortNotification like in my last patch) at the end of 
ScsiPortStartIo and ScsiPortDpcForIsr. Unfortunetly it didn't work as I 
expected, propably because of some faults in my code. If there isn't any 
volunteer (!!!) for coding the correct queuing logic with per logical 
unit queues, I'll continue my attempts, but I definitely think that I'm 
not the right person for this. There are currently these two problems 
with the ScsiPort code:

- When more SRBs are queued by the miniport driver, only one is 
completed, because the ScsiPort driver just processes only the last one.
- For SrbExtension always the same memory is used and this wouldn't work 
when more SRBs are queued by the miniport driver. We can either a) 
allocate bunch of SrbExtensions in ScsiPortGetUncachedExtension and 
distribute them to the incomming Srbs in ScsiPortStartIo or b) we can 
allocate spearate buffer for each Srb and free it on completition. The 
later approach requires keeping track of allocated buffers in per-device 
list (in DeviceExtension) and adapting ScsiPortGetPhysicalAddress and 
ScsiPortGetVirtualAddress, but overall it seems easier to code and more 
universal.

I also found this page: 
http://www.osjournal.hopto.org/cgi-bin/index.pl?action=viewfile&file=8 
that partially describes how the Srbs should be queued. Although it 
looks incorrect on some places, I found it worth reading and it comes 
with sample code (http://www.o3one.org/sources/aic78xx/).

- Filip

Hartmut Birr wrote:

>Hi,
>
>queuing the irps is the easy part. Determining which of the queued
>irp's/srb's was completed is difficult.
>
>- Hartmut 
>  
>



More information about the Ros-kernel mailing list