* [PATCH pata-2.6 fix queue] hpt366: fix kernel oops with HPT302N
[not found] ` <200702162321.40813.sshtylyov@ru.mvista.com>
@ 2007-04-18 19:38 ` Sergei Shtylyov
2007-04-20 19:54 ` Bartlomiej Zolnierkiewicz
2007-04-22 18:05 ` [PATCH pata-2.6 fix queue] aec62xx: fix PIO/DMA setup issues Sergei Shtylyov
1 sibling, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2007-04-18 19:38 UTC (permalink / raw)
To: bzolnier, codermattie; +Cc: linux-ide, linux-kernel
The driver crashes the kernel on HPT302N chips due to the missing initializer
for 'hpt302n.settings' having been unfortunately overlooked so far. :-<
Much thanks to Mike Mattie for pin-pointing the reason of crash.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
Posting at last -- please verify...
drivers/ide/pci/hpt366.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/ide/pci/hpt366.c
===================================================================
--- linux-2.6.orig/drivers/ide/pci/hpt366.c
+++ linux-2.6/drivers/ide/pci/hpt366.c
@@ -1,10 +1,10 @@
/*
- * linux/drivers/ide/pci/hpt366.c Version 1.01 Dec 23, 2006
+ * linux/drivers/ide/pci/hpt366.c Version 1.02 Apr 18, 2007
*
* Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org>
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
* Portions Copyright (C) 2003 Red Hat Inc
- * Portions Copyright (C) 2005-2006 MontaVista Software, Inc.
+ * Portions Copyright (C) 2005-2007 MontaVista Software, Inc.
*
* Thanks to HighPoint Technologies for their assistance, and hardware.
* Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
@@ -494,6 +494,7 @@ static struct hpt_info hpt302n __devinit
.chip_type = HPT302N,
.max_mode = HPT302_ALLOW_ATA133_6 ? 4 : 3,
.dpll_clk = 77,
+ .settings = hpt37x_settings
};
static struct hpt_info hpt371n __devinitdata = {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH pata-2.6 fix queue] hpt366: fix kernel oops with HPT302N
2007-04-18 19:38 ` [PATCH pata-2.6 fix queue] hpt366: fix kernel oops with HPT302N Sergei Shtylyov
@ 2007-04-20 19:54 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-04-20 19:54 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: codermattie, linux-ide, linux-kernel
On Wednesday 18 April 2007, Sergei Shtylyov wrote:
> The driver crashes the kernel on HPT302N chips due to the missing initializer
> for 'hpt302n.settings' having been unfortunately overlooked so far. :-<
>
> Much thanks to Mike Mattie for pin-pointing the reason of crash.
>
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
applied
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH pata-2.6 fix queue] aec62xx: fix PIO/DMA setup issues
[not found] ` <200702162321.40813.sshtylyov@ru.mvista.com>
2007-04-18 19:38 ` [PATCH pata-2.6 fix queue] hpt366: fix kernel oops with HPT302N Sergei Shtylyov
@ 2007-04-22 18:05 ` Sergei Shtylyov
2007-04-23 22:33 ` Bartlomiej Zolnierkiewicz
1 sibling, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2007-04-22 18:05 UTC (permalink / raw)
To: bzolnier, codermattie; +Cc: linux-ide, linux-kernel
Teach the driver's tuneproc() method to do PIO auto-runing properly since it
treated 5 instead of 255 as auto-tune request, and also passed the mode limit
of PIO5 to ide_get_best_pio_mode() despite supporting up to PIO4 only.
While at it, also:
- remove the driver's wrong claim about supporting SWDMA modes;
- stop hooking ide_dma_timeout() method as the handler clearly doesn't fit for
the task...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
Warning: the patch has only been compile tested (the driver was on the way of
some cleanup -- that's why I got around to fixing it :-).
drivers/ide/pci/aec62xx.c | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
Index: linux-2.6/drivers/ide/pci/aec62xx.c
===================================================================
--- linux-2.6.orig/drivers/ide/pci/aec62xx.c
+++ linux-2.6/drivers/ide/pci/aec62xx.c
@@ -1,7 +1,8 @@
/*
- * linux/drivers/ide/pci/aec62xx.c Version 0.11 March 27, 2002
+ * linux/drivers/ide/pci/aec62xx.c Version 0.21 Apr 21, 2007
*
* Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
+ * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com>
*
*/
@@ -193,18 +194,8 @@ static int config_chipset_for_dma (ide_d
static void aec62xx_tune_drive (ide_drive_t *drive, u8 pio)
{
- u8 speed = 0;
- u8 new_pio = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5, NULL);
-
- switch(pio) {
- case 5: speed = new_pio; break;
- case 4: speed = XFER_PIO_4; break;
- case 3: speed = XFER_PIO_3; break;
- case 2: speed = XFER_PIO_2; break;
- case 1: speed = XFER_PIO_1; break;
- default: speed = XFER_PIO_0; break;
- }
- (void) aec62xx_tune_chipset(drive, speed);
+ pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+ (void) aec62xx_tune_chipset(drive, pio + XFER_PIO_0);
}
static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive)
@@ -213,7 +204,7 @@ static int aec62xx_config_drive_xfer_rat
return 0;
if (ide_use_fast_pio(drive))
- aec62xx_tune_drive(drive, 5);
+ aec62xx_tune_drive(drive, 255);
return -1;
}
@@ -288,11 +279,10 @@ static void __devinit init_hwif_aec62xx(
hwif->ultra_mask = 0x7f;
hwif->mwdma_mask = 0x07;
- hwif->swdma_mask = 0x07;
hwif->ide_dma_check = &aec62xx_config_drive_xfer_rate;
hwif->ide_dma_lostirq = &aec62xx_irq_timeout;
- hwif->ide_dma_timeout = &aec62xx_irq_timeout;
+
if (!noautodma)
hwif->autodma = 1;
hwif->drives[0].autodma = hwif->autodma;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH pata-2.6 fix queue] aec62xx: fix PIO/DMA setup issues
2007-04-22 18:05 ` [PATCH pata-2.6 fix queue] aec62xx: fix PIO/DMA setup issues Sergei Shtylyov
@ 2007-04-23 22:33 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-04-23 22:33 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: codermattie, linux-ide, linux-kernel
On Sunday 22 April 2007, Sergei Shtylyov wrote:
> Teach the driver's tuneproc() method to do PIO auto-runing properly since it
> treated 5 instead of 255 as auto-tune request, and also passed the mode limit
> of PIO5 to ide_get_best_pio_mode() despite supporting up to PIO4 only.
>
> While at it, also:
>
> - remove the driver's wrong claim about supporting SWDMA modes;
>
> - stop hooking ide_dma_timeout() method as the handler clearly doesn't fit for
> the task...
>
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> ---
> Warning: the patch has only been compile tested (the driver was on the way of
> some cleanup -- that's why I got around to fixing it :-).
applied
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-23 22:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200702032309.43867.sshtylyov@ru.mvista.com>
[not found] ` <200702040004.24918.sshtylyov@ru.mvista.com>
[not found] ` <200702162321.40813.sshtylyov@ru.mvista.com>
2007-04-18 19:38 ` [PATCH pata-2.6 fix queue] hpt366: fix kernel oops with HPT302N Sergei Shtylyov
2007-04-20 19:54 ` Bartlomiej Zolnierkiewicz
2007-04-22 18:05 ` [PATCH pata-2.6 fix queue] aec62xx: fix PIO/DMA setup issues Sergei Shtylyov
2007-04-23 22:33 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox