linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()
@ 2009-12-01  7:08 Benjamin Herrenschmidt
  2009-12-01  7:25 ` Tejun Heo
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2009-12-01  7:08 UTC (permalink / raw)
  To: linux-ide; +Cc: linuxppc-dev, jeff, tj

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

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 drivers/ata/libata-sff.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-work.orig/drivers/ata/libata-sff.c	2009-12-01 17:48:27.000000000 +1100
+++ linux-work/drivers/ata/libata-sff.c	2009-12-01 17:48:48.000000000 +1100
@@ -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);
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()
  2009-12-01  7:08 [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop() Benjamin Herrenschmidt
@ 2009-12-01  7:25 ` Tejun Heo
  2009-12-01  7:29   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2009-12-01  7:25 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linux-ide, linuxppc-dev, jeff

On 12/01/2009 04:08 PM, Benjamin Herrenschmidt wrote:
> 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
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

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

Acked-by: Tejun Heo <tj@kernel.org>

-- 
tejun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()
  2009-12-01  7:25 ` Tejun Heo
@ 2009-12-01  7:29   ` Benjamin Herrenschmidt
  2009-12-01  7:33     ` Tejun Heo
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2009-12-01  7:29 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide, linuxppc-dev, jeff

On Tue, 2009-12-01 at 16:25 +0900, Tejun Heo wrote:
> On 12/01/2009 04:08 PM, Benjamin Herrenschmidt wrote:
> > 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
> > 
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> Oh... that's a scary bug lurking around.  Thanks for catching it.
> 
> Acked-by: Tejun Heo <tj@kernel.org>

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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()
  2009-12-01  7:29   ` Benjamin Herrenschmidt
@ 2009-12-01  7:33     ` Tejun Heo
  2009-12-01  7:57       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2009-12-01  7:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linux-ide, linuxppc-dev, jeff

On 12/01/2009 04:29 PM, Benjamin Herrenschmidt wrote:
> On Tue, 2009-12-01 at 16:25 +0900, Tejun Heo wrote:
>> On 12/01/2009 04:08 PM, Benjamin Herrenschmidt wrote:
>>> 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
>>>
>>> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>
>> Oh... that's a scary bug lurking around.  Thanks for catching it.
>>
>> Acked-by: Tejun Heo <tj@kernel.org>
> 
> 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.

-- 
tejun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()
  2009-12-01  7:33     ` Tejun Heo
@ 2009-12-01  7:57       ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2009-12-01  7:57 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide, linuxppc-dev, jeff

On Tue, 2009-12-01 at 16:33 +0900, Tejun Heo wrote:
> > 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?  :-) 

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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()
@ 2009-12-02  0:36 Benjamin Herrenschmidt
  2009-12-03  7:35 ` Jeff Garzik
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2009-12-02  0:36 UTC (permalink / raw)
  To: linux-ide; +Cc: linuxppc-dev, jeff, tj

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

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 drivers/ata/libata-sff.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-work.orig/drivers/ata/libata-sff.c	2009-12-01 17:48:27.000000000 +1100
+++ linux-work/drivers/ata/libata-sff.c	2009-12-01 17:48:48.000000000 +1100
@@ -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);
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()
  2009-12-02  0:36 Benjamin Herrenschmidt
@ 2009-12-03  7:35 ` Jeff Garzik
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2009-12-03  7:35 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linux-ide, linuxppc-dev, tj

On 12/01/2009 07:36 PM, Benjamin Herrenschmidt wrote:
> 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
>
> Signed-off-by: Benjamin Herrenschmidt<benh@kernel.crashing.org>
> ---
>
>   drivers/ata/libata-sff.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-work.orig/drivers/ata/libata-sff.c	2009-12-01 17:48:27.000000000 +1100
> +++ linux-work/drivers/ata/libata-sff.c	2009-12-01 17:48:48.000000000 +1100
> @@ -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);

applied

As we discussed, feel free to carry this in your tree as well.  git 
should be able to sort it out.

Acked-by: Jeff Garzik <jgarzik@redhat.com>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-03  7:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01  7:08 [PATCH 4/5] libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop() Benjamin Herrenschmidt
2009-12-01  7:25 ` Tejun Heo
2009-12-01  7:29   ` Benjamin Herrenschmidt
2009-12-01  7:33     ` Tejun Heo
2009-12-01  7:57       ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2009-12-02  0:36 Benjamin Herrenschmidt
2009-12-03  7:35 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).