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

Re: Just a couple of things.



> A process wants to send a command to a SCSI device which may take a while to
> respond. It uses the SCSI API layer to send the command. The SCSI device
> driver sends the command, disconnects from the device, puts the process
> on an I/O wait queue and returns control to MiNT. Sometime later the device
> responds to the command, the SCSI driver notices, passes the reply into the
> address space of the process and puts the process on the run queue.
> 
> A device driver below MiNT cannot do this.

There's no reason why it shouldn't be able to do this. In fact, I
tested such schemes. It didn't work because we don't have reentrancy
in the kernel, but it's perfectly possible to do for the hard disk
driver once the kernel problems are resolved. We would just have to 
specify an XHDI call which tells the hard disk driver that it 
should perform the transfers in the background. Or, even simpler, 
the SCSI device driver would switch the low-level driver to 
background transfer when it comes up, and from then on, *all* 
transfers, not only those through the device driver would perform
in the background.

> It would be a good starting place for the driver code. It's important that
> the code is also forward looking, able to handle devices with sizes greater
> than 4GB etc. This would mean being able to support at least 64bit block
> numbers.

There certainly is the potential for such an expansion. CBHD is also
one of the very, very few hard disk drivers which handles 1024-byte
physical sectors, not only 512-byte sectors, and that can be very
easily extended to other physical sizes that the device might support.
Try that with AHDI 8-)

CBHD's SCSI code is also one of the very few that implements
arbitration, so yes, I think the code could be called forward looking.

--clausb@hpbeo79.bbn.hp.com-----------------------------------------------
Claus Brod, MDD, HP Boeblingen         Have you hugged your manager today?
--#include <std_disclaimer>-----------------------------------------------