* Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA capable controllers
[not found] <20070125150905.652f9ce2@localhost.localdomain>
@ 2007-01-25 23:36 ` Jeff Garzik
0 siblings, 0 replies; only message in thread
From: Jeff Garzik @ 2007-01-25 23:36 UTC (permalink / raw)
To: Alan; +Cc: torvalds, linux-kernel, linux-ide@vger.kernel.org
Alan wrote:
> Fixes bogus accesses to ports 0-15 with a non DMA capable controller.
> This I think should go in for 2.6.20
applied to #upstream-fixes, but it's a hack based on a misunderstanding.
See comments below for further work needed.
> Arguably it shouldn't be called for PIO commands at all but thats a
> matter for Jeff to decide
You are getting misled by the function name.
ata_bmdma_post_internal_cmd() is the common ->post_internal_cmd() hook
for BMDMA-like (SFF-like) controllers. ->post_internal_cmd() hook will
always be called, for all commands, when present.
For PIO-only controllers, simply delete the post_internal_cmd hook from
that specific driver's ata_port_operations. (assuming no other cleanup
is needed)
For other SFF controllers, perhaps ata_bmdma_post_internal_cmd() should
be revised to check the taskfile protocol (PIO, DMA, ...)?
I leave that up to your judgement, to figure out what's best. I
certainly AGREE that an unconditional ata_bmdma_stop() for all commands,
for all taskfile protocols, sounds wrong.
Jeff
^ permalink raw reply [flat|nested] only message in thread