Skip to contentSkip to conversation

libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()

PATCH In review Benjamin Herrenschmidt 2 participants 5 messages Dec 1, 2009 libata

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()

In libata-sff, ata_sff_post_internal_cmd() directly calls ata_bmdma_stop() instead of ap->ops->bmdma_stop(). This can be a problem for controllers that use their own bmdma_stop for which the generic sff one isn't suitable

---

 drivers/ata/libata-sff.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libata-sff.c +1 -1
@@ -2384,7 +2384,7 @@ void ata_sff_post_internal_cmd(struct at
 	ap->hsm_task_state = HSM_ST_IDLE;
 
 	if (ap->ioaddr.bmdma_addr)
-		ata_bmdma_stop(qc);
+		ap->ops->bmdma_stop(qc);
 
 	spin_unlock_irqrestore(ap->lock, flags);
 }
Acked-by on v1 4/5
#1 lore raw
Quoted 5 lines · Benjamin Herrenschmidt

In libata-sff, ata_sff_post_internal_cmd() directly calls ata_bmdma_stop() instead of ap->ops->bmdma_stop(). This can be a problem for controllers that use their own bmdma_stop for which the generic sff one isn't suitable

Oh... that's a scary bug lurking around. Thanks for catching it.

Signature · 1 line
tejun
#2 lore raw
Quoted 10 lines · Tejun Heo
Quoted 5 lines · Benjamin Herrenschmidt

In libata-sff, ata_sff_post_internal_cmd() directly calls ata_bmdma_stop() instead of ap->ops->bmdma_stop(). This can be a problem for controllers that use their own bmdma_stop for which the generic sff one isn't suitable

Oh... that's a scary bug lurking around. Thanks for catching it.

Feel free to pick that one up earlier if you want (ie for 2.6.32), as long as we manage to get it in in 2.6.33 -before- I push powerpc-next to Linus, I'm happy :-) (or we can have it in both trees).

Cheers,
Ben.

#3 lore raw
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 7 lines · Tejun Heo
Quoted 5 lines · Benjamin Herrenschmidt

In libata-sff, ata_sff_post_internal_cmd() directly calls ata_bmdma_stop() instead of ap->ops->bmdma_stop(). This can be a problem for controllers that use their own bmdma_stop for which the generic sff one isn't suitable

Quoted 7 lines
Quoted 3 lines

Oh... that's a scary bug lurking around. Thanks for catching it.

Feel free to pick that one up earlier if you want (ie for 2.6.32), as long as we manage to get it in in 2.6.33 -before- I push powerpc-next to Linus, I'm happy :-) (or we can have it in both trees).

As nasty as the bug might be, given that we haven't had too much problem with that, I think it would be best to give it some time to be tested before releasing it to users. It causes behavior differences for all bmdma drivers which implement custom bmdma_stop. It's an apparent bug fix but well the nasty ones are always apparent bug fixes, right? :-)

Thanks.

Signature · 1 line
tejun
#4 lore raw
Quoted 4 lines · Tejun Heo
Quoted 1 line

Feel free to pick that one up earlier if you want (ie for 2.6.32),

as

Quoted 1 line

long as we manage to get it in in 2.6.33 -before- I push

powerpc-next to

Quoted 8 lines
Quoted 1 line

Linus, I'm happy :-) (or we can have it in both trees).

As nasty as the bug might be, given that we haven't had too much problem with that, I think it would be best to give it some time to be tested before releasing it to users. It causes behavior differences for all bmdma drivers which implement custom bmdma_stop. It's an apparent bug fix but well the nasty ones are always apparent bug fixes, right? :-)

Yeah, I agree. I wouldn't be comfortable pushing it into .32 to be honest after a quick grep of how many drivers actually use that hook and considering that no problem was reported so far...

I'll merge it with the rest of the powerpc stuff during the .33 merge window if you are ok with that.

Cheers,
Ben.