Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA capable controllers

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff Garzik
Date: Thursday, January 25, 2007 - 4:36 pm

Alan wrote:

applied to #upstream-fixes, but it's a hack based on a misunderstanding. 
  See comments below for further work needed.



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



-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA c ..., Jeff Garzik, (Thu Jan 25, 4:36 pm)
Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA c ..., Benjamin Herrenschmidt, (Sun Jan 28, 3:49 pm)
Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA c ..., Benjamin Herrenschmidt, (Sun Jan 28, 3:57 pm)
Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA c ..., Benjamin Herrenschmidt, (Sun Jan 28, 4:01 pm)
Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA c ..., Benjamin Herrenschmidt, (Sun Jan 28, 4:04 pm)