[ros-kernel] BusLogic 958 SCSI miniport

Hartmut Birr Hartmut.Birr at gmx.de
Fri Mar 26 18:42:15 CET 2004


Hi,    

I've looked a little bit more to scsiport.c. Currently, scsiport can
only process one srb/irp at the same time. There exist some fields
within the device extension which used for each irp (CurrentIrp,
OriginalSrb, InternalSrb, InternalSenseData). But this fields must be
unique for each irp/srb. I think we should at this fields and some new
fields (a back pointer to the device extension, a list entry for the
srb/irp queue...) to the srb extension (after or previous the real srb
extension). There should be allocated a separate extension for each srb,
like your mail step b). Some functions are currently called with the
device extension as context. The context of this function must be
changed to the srb. The complete notification routine adds the srb to
the complete queue and the DpcForIsr function complete all irp/srb from
this queue or starts some more processing. I can start the
implementation at the week end, but I can only test with atapi.    

- Hartmut

> -----Original Message-----
> From: ros-kernel-bounces at reactos.com 
> [mailto:ros-kernel-bounces at reactos.com] On Behalf Of Filip Navara
> Sent: Thursday, March 25, 2004 10:30 PM
> To: ReactOS Kernel List
> Subject: Re: [ros-kernel] BusLogic 958 SCSI miniport
> 
> 
> 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=viewfil
e&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
>  
>

_______________________________________________
Ros-kernel mailing list
Ros-kernel at reactos.com http://reactos.com/mailman/listinfo/ros-kernel



More information about the Ros-kernel mailing list