Subject: Re: Support for polled IDE controllers
To: Ben Harris <>
From: Manuel Bouyer <>
List: tech-kern
Date: 06/11/2001 21:35:35
On Sat, Jun 09, 2001 at 01:38:06PM +0100, Ben Harris wrote:
> Since breaking the IDE drivers is likely to make me very unpopular, could
> someone who understands them better than I sanity-check the following?
> I've got a couple of IDE controllers that don't have their interrupt lines
> wired up, and I'd like the NetBSD wdc driver to handle them.  I've
> arranged this by adding a new capability, WDC_CAPABILITY_NOIRQ, and having
> the three functions that can queue transfers (wdc_ata_bio(),
> wdc_exec_command() and wdc_atapi_scsipi_request()) check that and mark all
> transfers as polled if it's set.
> In order to make this work, I found that I also had to disable the checks
> for ATA_POLL in wdc_ata_bio_done() and wdc_ata_bio_kill_xfer() and have
> them unconditionally call wddone().  On the assumption that those tests
> were there to avoid calling wddone() when dumping, I added a check on
> sc_bp in wddone(), and made wddump() clear it, so that wddone() is a no-op
> if the transfer was caused by wddump().

Hum I'm not sure how to make this work properly, especially with the
new scsipi code for ATAPI (you've already found some problems with this).

Maybe the best way would be to do the pool from a callout, or in a specific
kernel thread ?
Otherwise we need a way to pass this capability up to wd or scsipi, so that
the polling flag can be set from the beggining. Setting it in the
middle of the xfer won't work.

Manuel Bouyer <>