* [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576
@ 2010-08-17 12:13 Tejun Heo
2010-08-17 12:56 ` Bartlomiej Zolnierkiewicz
2010-08-17 21:30 ` Jeff Garzik
0 siblings, 2 replies; 8+ messages in thread
From: Tejun Heo @ 2010-08-17 12:13 UTC (permalink / raw)
To: Jeff Garzik, "linux-ide@vger.kernel.org" st, stable
Cc: Bartlomiej Zolnierkiewicz, Alan Cox, Milan Kocian
Commit d62f5576 (pata_cmd64x: fix handling of address setup timings)
incorrectly called ata_timing_compute() on UDMA mode on 0 @UT leading
to devide by zero fault. Revert it until better fix is available.
This is reported in bko#16607 by Milan Kocian who also root caused it.
https://bugzilla.kernel.org/show_bug.cgi?id=16607
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-and-root-caused-by: Milan Kocian <milan.kocian@wq.cz>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: stable@kernel.org
---
drivers/ata/pata_cmd64x.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 9f5da1c..905ff76 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -121,14 +121,8 @@ static void cmd64x_set_timing(struct ata_port *ap, struct ata_device *adev, u8 m
if (pair) {
struct ata_timing tp;
-
ata_timing_compute(pair, pair->pio_mode, &tp, T, 0);
ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP);
- if (pair->dma_mode) {
- ata_timing_compute(pair, pair->dma_mode,
- &tp, T, 0);
- ata_timing_merge(&tp, &t, &t, ATA_TIMING_SETUP);
- }
}
}
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576
2010-08-17 12:13 [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576 Tejun Heo
@ 2010-08-17 12:56 ` Bartlomiej Zolnierkiewicz
2010-08-17 15:01 ` Tejun Heo
2010-08-17 21:30 ` Jeff Garzik
1 sibling, 1 reply; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2010-08-17 12:56 UTC (permalink / raw)
To: Tejun Heo
Cc: Jeff Garzik, "linux-ide@vger.kernel.org" st, stable,
Alan Cox, Milan Kocian
On Tuesday 17 August 2010 02:13:42 pm Tejun Heo wrote:
> Commit d62f5576 (pata_cmd64x: fix handling of address setup timings)
> incorrectly called ata_timing_compute() on UDMA mode on 0 @UT leading
> to devide by zero fault. Revert it until better fix is available.
> This is reported in bko#16607 by Milan Kocian who also root caused it.
>
> https://bugzilla.kernel.org/show_bug.cgi?id=16607
How's about giving the ATA maintainer some time to resolve the issue
properly?
The revert should be a last resort action (+ the issue was reported
only yesterday) as it introduces another regression (it just replaces
new bug with the old bug while adding noise in the process)..
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-and-root-caused-by: Milan Kocian <milan.kocian@wq.cz>
> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Cc: stable@kernel.org
> ---
> drivers/ata/pata_cmd64x.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
> index 9f5da1c..905ff76 100644
> --- a/drivers/ata/pata_cmd64x.c
> +++ b/drivers/ata/pata_cmd64x.c
> @@ -121,14 +121,8 @@ static void cmd64x_set_timing(struct ata_port *ap, struct ata_device *adev, u8 m
>
> if (pair) {
> struct ata_timing tp;
> -
> ata_timing_compute(pair, pair->pio_mode, &tp, T, 0);
> ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP);
> - if (pair->dma_mode) {
> - ata_timing_compute(pair, pair->dma_mode,
> - &tp, T, 0);
> - ata_timing_merge(&tp, &t, &t, ATA_TIMING_SETUP);
> - }
> }
> }
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576
2010-08-17 12:56 ` Bartlomiej Zolnierkiewicz
@ 2010-08-17 15:01 ` Tejun Heo
2010-08-17 15:39 ` Alan Cox
0 siblings, 1 reply; 8+ messages in thread
From: Tejun Heo @ 2010-08-17 15:01 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Jeff Garzik, "linux-ide@vger.kernel.org" st, stable,
Alan Cox, Milan Kocian
Hello,
On 08/17/2010 02:56 PM, Bartlomiej Zolnierkiewicz wrote:
> On Tuesday 17 August 2010 02:13:42 pm Tejun Heo wrote:
>> Commit d62f5576 (pata_cmd64x: fix handling of address setup timings)
>> incorrectly called ata_timing_compute() on UDMA mode on 0 @UT leading
>> to devide by zero fault. Revert it until better fix is available.
>> This is reported in bko#16607 by Milan Kocian who also root caused it.
>>
>> https://bugzilla.kernel.org/show_bug.cgi?id=16607
>
> How's about giving the ATA maintainer some time to resolve the issue
> properly?
Yeap, sure.
> The revert should be a last resort action (+ the issue was reported
> only yesterday) as it introduces another regression (it just replaces
> new bug with the old bug while adding noise in the process)..
The old problem is much less severe tho. The introduced regression
causes oops while the old bug probably doesn't show itself too often.
Does it really need to merge the DMA timings too? If the device can't
do certain timing, it's PIO configuration should reflect that so
merging PIO part only should be enough for PIO configuration, no?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576
2010-08-17 15:01 ` Tejun Heo
@ 2010-08-17 15:39 ` Alan Cox
2010-08-17 16:39 ` Bartlomiej Zolnierkiewicz
2010-08-17 17:41 ` Sergei Shtylyov
0 siblings, 2 replies; 8+ messages in thread
From: Alan Cox @ 2010-08-17 15:39 UTC (permalink / raw)
To: Tejun Heo
Cc: Bartlomiej Zolnierkiewicz, Jeff Garzik,
"linux-ide@vger.kernel.org" st, stable, Milan Kocian
> The old problem is much less severe tho. The introduced regression
> causes oops while the old bug probably doesn't show itself too often.
If ever
> Does it really need to merge the DMA timings too? If the device can't
> do certain timing, it's PIO configuration should reflect that so
> merging PIO part only should be enough for PIO configuration, no?
The timing code knows about DMA/PIO constraints itself. The whole mucking
around passing both timings is just bogus.
Pass pair->dma_mode only and it'll work out the PIO for you. Not that it
matters - no real hardware has a DMA mode with a slower address setup
than its PIO mode.
and for UT just stick in some value (eg 33000) so it works in PCI clocks
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576
2010-08-17 15:39 ` Alan Cox
@ 2010-08-17 16:39 ` Bartlomiej Zolnierkiewicz
2010-08-17 17:41 ` Sergei Shtylyov
1 sibling, 0 replies; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2010-08-17 16:39 UTC (permalink / raw)
To: Alan Cox
Cc: Tejun Heo, Jeff Garzik, "linux-ide@vger.kernel.org" st,
stable, Milan Kocian
On Tuesday 17 August 2010 05:39:17 pm Alan Cox wrote:
> > The old problem is much less severe tho. The introduced regression
> > causes oops while the old bug probably doesn't show itself too often.
>
> If ever
>
> > Does it really need to merge the DMA timings too? If the device can't
> > do certain timing, it's PIO configuration should reflect that so
> > merging PIO part only should be enough for PIO configuration, no?
>
> The timing code knows about DMA/PIO constraints itself. The whole mucking
> around passing both timings is just bogus.
>
> Pass pair->dma_mode only and it'll work out the PIO for you. Not that it
> matters - no real hardware has a DMA mode with a slower address setup
> than its PIO mode.
There were some PIO3/MWDMA1 devices out in the wild (Iomega ZIP IIRC)..
Anyway the patch has never been submitted upstream:
*) I have absolutely no time to support it or related changes
*) it was not critical enough and/or important for other related work
(it is more important in atang/ide2libata context)
> and for UT just stick in some value (eg 33000) so it works in PCI clocks
Exactly, ->udma is never used by the driver itself..
Thanks.
--
Bartlomiej Zolnierkiewicz
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576
2010-08-17 15:39 ` Alan Cox
2010-08-17 16:39 ` Bartlomiej Zolnierkiewicz
@ 2010-08-17 17:41 ` Sergei Shtylyov
1 sibling, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2010-08-17 17:41 UTC (permalink / raw)
To: Alan Cox
Cc: Tejun Heo, Bartlomiej Zolnierkiewicz, Jeff Garzik,
"linux-ide@vger.kernel.org" st, stable, Milan Kocian
Alan Cox wrote:
>> Does it really need to merge the DMA timings too? If the device can't
>> do certain timing, it's PIO configuration should reflect that so
>> merging PIO part only should be enough for PIO configuration, no?
> The timing code knows about DMA/PIO constraints itself. The whole mucking
> around passing both timings is just bogus.
> Pass pair->dma_mode only and it'll work out the PIO for you. Not that it
> matters - no real hardware has a DMA mode with a slower address setup
> than its PIO mode.
The address setup timing means *exactly nothing* for DMA modes. I keep
wondering why it has been added to the libata timing table...
MBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576
2010-08-17 12:13 [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576 Tejun Heo
2010-08-17 12:56 ` Bartlomiej Zolnierkiewicz
@ 2010-08-17 21:30 ` Jeff Garzik
2010-08-19 10:30 ` Milan Kocian
1 sibling, 1 reply; 8+ messages in thread
From: Jeff Garzik @ 2010-08-17 21:30 UTC (permalink / raw)
To: Tejun Heo
Cc: "linux-ide@vger.kernel.org" st, stable,
Bartlomiej Zolnierkiewicz, Alan Cox, Milan Kocian
On 08/17/2010 08:13 AM, Tejun Heo wrote:
> Commit d62f5576 (pata_cmd64x: fix handling of address setup timings)
> incorrectly called ata_timing_compute() on UDMA mode on 0 @UT leading
> to devide by zero fault. Revert it until better fix is available.
> This is reported in bko#16607 by Milan Kocian who also root caused it.
>
> https://bugzilla.kernel.org/show_bug.cgi?id=16607
>
> Signed-off-by: Tejun Heo<tj@kernel.org>
> Reported-and-root-caused-by: Milan Kocian<milan.kocian@wq.cz>
> Cc: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> Cc: stable@kernel.org
> ---
> drivers/ata/pata_cmd64x.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
> index 9f5da1c..905ff76 100644
> --- a/drivers/ata/pata_cmd64x.c
> +++ b/drivers/ata/pata_cmd64x.c
> @@ -121,14 +121,8 @@ static void cmd64x_set_timing(struct ata_port *ap, struct ata_device *adev, u8 m
>
> if (pair) {
> struct ata_timing tp;
> -
> ata_timing_compute(pair, pair->pio_mode,&tp, T, 0);
> ata_timing_merge(&t,&tp,&t, ATA_TIMING_SETUP);
> - if (pair->dma_mode) {
> - ata_timing_compute(pair, pair->dma_mode,
> - &tp, T, 0);
> - ata_timing_merge(&tp,&t,&t, ATA_TIMING_SETUP);
applied; even if not perfect, this gets us into a better state.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576
2010-08-17 21:30 ` Jeff Garzik
@ 2010-08-19 10:30 ` Milan Kocian
0 siblings, 0 replies; 8+ messages in thread
From: Milan Kocian @ 2010-08-19 10:30 UTC (permalink / raw)
To: Jeff Garzik
Cc: Tejun Heo, linux-ide@vger.kernel.org st, stable,
Bartlomiej Zolnierkiewicz, Alan Cox, Milan Kocian
On Tue, Aug 17, 2010 at 05:30:07PM -0400, Jeff Garzik wrote:
> On 08/17/2010 08:13 AM, Tejun Heo wrote:
> >Commit d62f5576 (pata_cmd64x: fix handling of address setup timings)
> >incorrectly called ata_timing_compute() on UDMA mode on 0 @UT leading
> >to devide by zero fault. Revert it until better fix is available.
> >This is reported in bko#16607 by Milan Kocian who also root caused it.
> >
> > https://bugzilla.kernel.org/show_bug.cgi?id=16607
> >
> >Signed-off-by: Tejun Heo<tj@kernel.org>
> >Reported-and-root-caused-by: Milan Kocian<milan.kocian@wq.cz>
> >Cc: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> >Cc: stable@kernel.org
> >---
> > drivers/ata/pata_cmd64x.c | 6 ------
> > 1 file changed, 6 deletions(-)
> >
> >diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
> >index 9f5da1c..905ff76 100644
> >--- a/drivers/ata/pata_cmd64x.c
> >+++ b/drivers/ata/pata_cmd64x.c
> >@@ -121,14 +121,8 @@ static void cmd64x_set_timing(struct ata_port *ap, struct ata_device *adev, u8 m
> >
> > if (pair) {
> > struct ata_timing tp;
> >-
> > ata_timing_compute(pair, pair->pio_mode,&tp, T, 0);
> > ata_timing_merge(&t,&tp,&t, ATA_TIMING_SETUP);
> >- if (pair->dma_mode) {
> >- ata_timing_compute(pair, pair->dma_mode,
> >- &tp, T, 0);
> >- ata_timing_merge(&tp,&t,&t, ATA_TIMING_SETUP);
>
> applied; even if not perfect, this gets us into a better state.
>
>
Thank all for solving this. Should I close the bug now ?
regards
--
Milan Kocian
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-08-19 10:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17 12:13 [PATCH #upstream-fixes] pata_cmd64x: revert commit d62f5576 Tejun Heo
2010-08-17 12:56 ` Bartlomiej Zolnierkiewicz
2010-08-17 15:01 ` Tejun Heo
2010-08-17 15:39 ` Alan Cox
2010-08-17 16:39 ` Bartlomiej Zolnierkiewicz
2010-08-17 17:41 ` Sergei Shtylyov
2010-08-17 21:30 ` Jeff Garzik
2010-08-19 10:30 ` Milan Kocian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox