From: Jens Axboe <axboe@suse.de>
To: Nicolas Mailhot <nicolas.mailhot@laposte.net>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Tejun Heo <htejun@gmail.com>, Jeff Garzik <jgarzik@pobox.com>,
Linux-ide <linux-ide@vger.kernel.org>
Subject: Re: regarding bug #5914 - fs corruption on SATA
Date: Mon, 30 Jan 2006 16:08:43 +0100 [thread overview]
Message-ID: <20060130150843.GS4209@suse.de> (raw)
In-Reply-To: <1138406042.2953.0.camel@rousalka.dyndns.org>
On Sat, Jan 28 2006, Nicolas Mailhot wrote:
> Le vendredi 27 janvier 2006 à 20:37 +0100, Nicolas Mailhot a écrit :
> > Le vendredi 27 janvier 2006 à 10:50 +0100, Jens Axboe a écrit :
> >
> > > Of course, silly typo! Thanks for catching that. Update patch below.
> >
> > ...
> >
> > a patched kernel reboots before finishing to initialize (Just before it
> > prints a line starting with SCSI - the rest is too fast for me to catch)
> >
> > Now the kernel base is slightly different from yesterday, so the bug may
> > be in the base not the patch. I'll rebuild a new kernel with the same
> > base and yesterday's patch to check this now
>
> I can confirm today's patch is not OK. The same baseline with
> yesterday's patch boot fine.
Is this any better?
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index cfbceb5..07b1e7c 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1700,6 +1700,31 @@ static unsigned int ata_msense_rw_recove
return sizeof(def_rw_recovery_mpage);
}
+/*
+ * We can turn this into a real blacklist if it's needed, for now just
+ * blacklist any Maxtor BANC1G10 revision firmware
+ */
+static int ata_dev_supports_fua(u16 *id)
+{
+ unsigned char model[41], fw[9];
+
+ if (!ata_id_has_fua(id))
+ return 0;
+
+ model[40] = '\0';
+ fw[8] = '\0';
+
+ ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1);
+ ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1);
+
+ if (strncmp(model, "Maxtor", 6))
+ return 1;
+ if (strncmp(fw, "BANC1G10", 8))
+ return 1;
+
+ return 0; /* blacklisted */
+}
+
/**
* ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands
* @args: device IDENTIFY data / SCSI command of interest.
@@ -1797,7 +1822,7 @@ unsigned int ata_scsiop_mode_sense(struc
return 0;
dpofua = 0;
- if (ata_id_has_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 &&
+ if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 &&
(!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count))
dpofua = 1 << 4;
--
Jens Axboe
next prev parent reply other threads:[~2006-01-30 15:10 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-26 5:50 regarding bug #5914 - fs corruption on SATA Tejun Heo
2006-01-26 5:51 ` Tejun Heo
2006-01-26 9:14 ` Nicolas Mailhot
2006-01-26 9:21 ` Jens Axboe
2006-01-26 10:01 ` Nicolas Mailhot
[not found] ` <5840.192.54.193.25.1138269692.squirrel@rousalka.dyndns.org>
2006-01-26 21:04 ` Nicolas Mailhot
2006-01-27 8:13 ` Jens Axboe
2006-01-27 8:53 ` Nicolas Mailhot
2006-01-27 9:10 ` Jens Axboe
2006-01-27 9:20 ` Jens Axboe
2006-01-27 9:27 ` Nicolas Mailhot
2006-01-27 9:46 ` Bartlomiej Zolnierkiewicz
2006-01-27 9:50 ` Jens Axboe
2006-01-27 19:37 ` Nicolas Mailhot
2006-01-27 23:54 ` Nicolas Mailhot
2006-01-30 15:08 ` Jens Axboe [this message]
2006-01-30 23:33 ` Nicolas Mailhot
2006-01-31 7:26 ` Jens Axboe
2006-01-31 8:39 ` Nicolas Mailhot
2006-01-31 8:47 ` Jens Axboe
2006-01-31 22:54 ` Nicolas Mailhot
2006-01-27 12:12 ` Ric Wheeler
2006-01-27 12:23 ` Jens Axboe
2006-01-26 9:18 ` Jens Axboe
2006-01-26 14:11 ` Bartlomiej Zolnierkiewicz
2006-01-26 14:27 ` Jens Axboe
2006-01-26 16:41 ` David Greaves
2006-01-26 16:58 ` Jeff Garzik
2006-01-26 17:15 ` David Greaves
2006-02-07 18:35 ` SMART on SATA reporting errors? (was Re: regarding bug #5914 - fs corruption on SATA) David Greaves
2006-02-07 19:30 ` Jeff Garzik
2006-02-08 7:21 ` David Greaves
2006-01-26 17:20 ` regarding bug #5914 - fs corruption on SATA Soeren Sonnenburg
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=20060130150843.GS4209@suse.de \
--to=axboe@suse.de \
--cc=bzolnier@gmail.com \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=nicolas.mailhot@laposte.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.