* PATCH: Use the fixup layer to fix the various SI3112 hangs
@ 2004-11-05 16:42 Alan Cox
2004-11-05 22:59 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2004-11-05 16:42 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz, linux-ide
The current driver looks at fields before it is safe too, we move the
mod15rm bug handler to be a fixup and this ensures the probe has been
completed before we use the ident data.
diff --exclude-from /usr/src/exclude -u --new-file --recursive
linux.vanilla-2.6.10rc1/drivers/ide/pci/siimage.c
linux-2.6.10rc1/drivers/ide/pci/siimage.c
--- linux.vanilla-2.6.10rc1/drivers/ide/pci/siimage.c 2004-11-05
15:34:47.000000000 +0000
+++ linux-2.6.10rc1/drivers/ide/pci/siimage.c 2004-11-05
16:08:46.000000000 +0000
@@ -988,6 +988,21 @@
}
/**
+ * siimage_fixup - post probe fixups
+ * @hwif: interface to fix up
+ *
+ * Called after drive probe we use this to decide whether the
+ * Seagate fixup must be applied. This used otbe in init_iops but
+ * that can occur before we know what drives are present.
+ */
+
+static void siimage_fixup(ide_hwif_t *hwif) {
+ /* Try and raise the rqsize */
+ if (!is_sata(hwif) || !is_dev_seagate_sata(&hwif->drives[0]))
+ hwif->rqsize = 128;
+}
+
+/**
* init_iops_siimage - set up iops
* @hwif: interface to set up
*
@@ -1007,9 +1022,8 @@
hwif->hwif_data = NULL;
- hwif->rqsize = 128;
- if (is_sata(hwif) && is_dev_seagate_sata(&hwif->drives[0]))
- hwif->rqsize = 15;
+ /* Pessimal until we finish probing */
+ hwif->rqsize = 15;
if (pci_get_drvdata(dev) == NULL)
return;
@@ -1101,6 +1115,7 @@
.channels = 2, \
.autodma = AUTODMA, \
.bootable = ON_BOARD, \
+ .fixup = siimage_fixup \
}
static ide_pci_device_t siimage_chipsets[] __devinitdata = {
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: PATCH: Use the fixup layer to fix the various SI3112 hangs
2004-11-05 16:42 PATCH: Use the fixup layer to fix the various SI3112 hangs Alan Cox
@ 2004-11-05 22:59 ` Bartlomiej Zolnierkiewicz
2004-11-05 23:24 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-11-05 22:59 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide
all fixup patches applied
(after merging into 2 changesets & cleanup)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Use the fixup layer to fix the various SI3112 hangs
2004-11-05 22:59 ` Bartlomiej Zolnierkiewicz
@ 2004-11-05 23:24 ` Bartlomiej Zolnierkiewicz
2004-11-05 23:34 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-11-05 23:24 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide
On Fri, 5 Nov 2004 23:59:09 +0100, Bartlomiej Zolnierkiewicz
<bzolnier@gmail.com> wrote:
> all fixup patches applied
> (after merging into 2 changesets & cleanup)
and fixed bug preventing both fixups from correct working,
fixup() must be called _before_ hwif_init() call!!!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Use the fixup layer to fix the various SI3112 hangs
2004-11-05 23:24 ` Bartlomiej Zolnierkiewicz
@ 2004-11-05 23:34 ` Alan Cox
2004-11-06 1:00 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2004-11-05 23:34 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide
On Gwe, 2004-11-05 at 23:24, Bartlomiej Zolnierkiewicz wrote:
> On Fri, 5 Nov 2004 23:59:09 +0100, Bartlomiej Zolnierkiewicz
> <bzolnier@gmail.com> wrote:
> > all fixup patches applied
> > (after merging into 2 changesets & cleanup)
>
> and fixed bug preventing both fixups from correct working,
> fixup() must be called _before_ hwif_init() call!!!
Moving it is definitely better I agree there - it also allows fixup to
be used for irq mangling and sg table tweaks which couldn't be done
before.
I don't see why ita a bug in the present situation - and the code
certainly works against 10rc1 and 2.6.9 that way but since moving it is
better I've no problem at all
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Use the fixup layer to fix the various SI3112 hangs
2004-11-05 23:34 ` Alan Cox
@ 2004-11-06 1:00 ` Bartlomiej Zolnierkiewicz
2004-11-06 0:50 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-11-06 1:00 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide
On Fri, 05 Nov 2004 23:34:29 +0000, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Gwe, 2004-11-05 at 23:24, Bartlomiej Zolnierkiewicz wrote:
>
>
> > On Fri, 5 Nov 2004 23:59:09 +0100, Bartlomiej Zolnierkiewicz
> > <bzolnier@gmail.com> wrote:
> > > all fixup patches applied
> > > (after merging into 2 changesets & cleanup)
> >
> > and fixed bug preventing both fixups from correct working,
> > fixup() must be called _before_ hwif_init() call!!!
>
> Moving it is definitely better I agree there - it also allows fixup to
> be used for irq mangling and sg table tweaks which couldn't be done
> before.
>
> I don't see why ita a bug in the present situation - and the code
> certainly works against 10rc1 and 2.6.9 that way but since moving it is
> better I've no problem at all
It depends which fixup you are talking about...
undecoded slave: hwif_init()->init_gendisk()-> drive->present checked
(sysfs and devfs entries registered for "ghost" drive but fixup works)
siimage: hwif_init()->init_irq()->ide_init_queue()-> hwif->rqsize used
(so fixup was executed too late previously)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Use the fixup layer to fix the various SI3112 hangs
2004-11-06 1:00 ` Bartlomiej Zolnierkiewicz
@ 2004-11-06 0:50 ` Alan Cox
0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2004-11-06 0:50 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide
On Sad, 2004-11-06 at 01:00, Bartlomiej Zolnierkiewicz wrote:
> It depends which fixup you are talking about...
>
> undecoded slave: hwif_init()->init_gendisk()-> drive->present checked
> (sysfs and devfs entries registered for "ghost" drive but fixup works)
>
> siimage: hwif_init()->init_irq()->ide_init_queue()-> hwif->rqsize used
> (so fixup was executed too late previously)
Ok yes I missed that.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-11-06 1:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-05 16:42 PATCH: Use the fixup layer to fix the various SI3112 hangs Alan Cox
2004-11-05 22:59 ` Bartlomiej Zolnierkiewicz
2004-11-05 23:24 ` Bartlomiej Zolnierkiewicz
2004-11-05 23:34 ` Alan Cox
2004-11-06 1:00 ` Bartlomiej Zolnierkiewicz
2004-11-06 0:50 ` Alan Cox
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).