From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>,
linux-ide@vger.kernel.org
Subject: PATCH: Use the fixup layer to fix the various SI3112 hangs
Date: Fri, 05 Nov 2004 16:42:33 +0000 [thread overview]
Message-ID: <1099672950.5630.59.camel@localhost.localdomain> (raw)
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 = {
next reply other threads:[~2004-11-05 17:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-05 16:42 Alan Cox [this message]
2004-11-05 22:59 ` PATCH: Use the fixup layer to fix the various SI3112 hangs 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1099672950.5630.59.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).