public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: mattia <mattia@nixlab.net>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: DriveReady SeekComplete Error
Date: Fri, 4 Jun 2004 14:17:11 +0200	[thread overview]
Message-ID: <20040604121711.GZ1946@suse.de> (raw)
In-Reply-To: <200406041415.36566.bzolnier@elka.pw.edu.pl>

On Fri, Jun 04 2004, Bartlomiej Zolnierkiewicz wrote:
> On Friday 04 of June 2004 13:56, Jens Axboe wrote:
> > On Fri, Jun 04 2004, Bartlomiej Zolnierkiewicz wrote:
> > > On Friday 04 of June 2004 12:22, Jens Axboe wrote:
> > > > damnit, don't trim the cc list!
> > > >
> > > > On Fri, Jun 04 2004, mattia wrote:
> > > > > I have the following error (kernel 2.6.6):
> > > > >
> > > > > Jun  4 08:05:43 blink kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > > > > Jun  4 08:05:43 blink kernel: hdc: Maxtor 6Y160P0, ATA DISK drive
> > > > > Jun  4 08:05:43 blink kernel: hdd: Maxtor 6Y120L0, ATA DISK drive
> > > > > Jun  4 08:05:43 blink kernel: ide1 at 0x170-0x177,0x376 on irq 15
> > > > > Jun  4 08:05:43 blink kernel: hda: max request size: 128KiB
> > > > > Jun  4 08:05:43 blink kernel: hda: 78177792 sectors (40027 MB)
> > > > > w/1819KiB Cache, CHS=65535/16/63, UDMA(100)
> > > > > Jun  4 08:05:43 blink kernel:  hda: hda1 hda2 hda3
> > > > > Jun  4 08:05:43 blink kernel: hdc: max request size: 1024KiB
> > > > > Jun  4 08:05:43 blink kernel: hdc: 320173056 sectors (163928 MB)
> > > > > w/7936KiB Cache, CHS=19929/255/63, UDMA(100)
> > > > > Jun  4 08:05:43 blink kernel:  hdc: hdc1
> > > > > Jun  4 08:05:43 blink kernel: hdd: max request size: 128KiB
> > > > > Jun  4 08:05:43 blink kernel: hdd: 240121728 sectors (122942 MB)
> > > > > w/2048KiB Cache, CHS=65535/16/63, UDMA(100)
> > > > > Jun  4 08:05:43 blink kernel:  hdd: hdd1 hdd2 hdd3
> > > > > Jun  4 08:05:43 blink kernel: hdd: task_no_data_intr: status=0x51 {
> > > > > DriveReady SeekComplete Error }
> > > > > Jun  4 08:05:43 blink kernel: hdd: task_no_data_intr: error=0x04 {
> > > > > DriveStatusError }
> > > > > Jun  4 08:05:43 blink kernel: hdd: Write Cache FAILED Flushing!
> > > > >
> > > > >
> > > > > I found somewhere that's something wrong with that maxtor drive.
> > > > > However, everything works fine.
> > > >
> > > > There's nothing wrong with the drive technically, it's just odd (lba48
> > > > without FLUSH_CACHE_EXT). It's really a linux ide bug that's fixed in
> > > > newer kernels. 2.6.7 will fix your problem.
> > >
> > > Wrong.
> > >
> > > Bug is a combination of a very minor firmware quirk
> > > and lack of strict checking in Linux IDE driver.
> > >
> > > FLUSH_CACHE_EXT bit is set but it is not supported
> > > (but it is not a problem because LBA48 is not supported also).
> >
> > Ah my bad, I didn't realize this bit was actually set correctly (you
> > mean (cfs_enable_2 & 0x2400) == 0x2400 is actually true?).
> 
> Yes but only on unaffected drives. ;-)
> 
> 0x2000 is FLUSH_CACHE_EXT support
> 0x0400 is LBA48 support
> 
> Affected drives have 0x2000 set incorrectly so we have to check also 0x0400.
> (== 0x2400 is needed because & 0x2400 is true if & 0x2000 OR if & 0x0400).
> 
> Everything is explained in the patch changelog:
> 
> | - many Maxtor disks incorrectly claim CACHE FLUSH EXT command support,
> |   fix it by checking both CACHE FLUSH EXT command and LBA48 support
> |   (thanks to Eric D. Mudama for help in fixing this)
> 
> and in the patch itself:
> 
> +/* some Maxtor disks have bit 13 defined incorrectly so check bit 10 too */
> +#define ide_id_has_flush_cache_ext(id)	\
> +	(((id)->cfs_enable_2 & 0x2400) == 0x2400)

Ok, so I didn't miss anything. Was just wondering because of your
comment on -mm2.

> > > It is fixed in 2.6.7-rc1 but your IDE barrier patch has this problem
> > > (just reminding you that it is still not fixed in 2.6.7-rc2-mm2).
> >
> > So where's the bug? I don't see it...
> 
> ide_fill_flush_cmd()
> 
> +	if (drive->id->cfs_enable_2 & 0x2400)
> +		rq->buffer[0] = WIN_FLUSH_CACHE_EXT;

Just checked a fresh copy of 2.6.7-rc2-mm2, and it has it correctly:

static void ide_fill_flush_cmd(ide_drive_t *drive, struct request *rq)
{
        char *buf = rq->cmd;

        /*
         * reuse cdb space for ata command
         */
        memset(buf, 0, sizeof(rq->cmd));

        rq->flags |= REQ_DRIVE_TASK | REQ_STARTED;
        rq->buffer = buf;
        rq->buffer[0] = WIN_FLUSH_CACHE;

        if (ide_id_has_flush_cache_ext(drive->id))
                rq->buffer[0] = WIN_FLUSH_CACHE_EXT;
}

So that's why I didn't follow what you meant, there should be no problem
here. You are reading disk-barrier-ide.patch, barrier-update.patch is
applied on top of that.

So we are back to step 1, why is his drive complaining. I'm guessing it
doesn't have write back caching enabled and aborts the flush on those
grounds - Ed, what is the output of hdparm -i on your booted system?

-- 
Jens Axboe


  reply	other threads:[~2004-06-04 12:17 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04 10:15 DriveReady SeekComplete Error mattia
2004-06-04 10:22 ` Jens Axboe
2004-06-04 11:44   ` Bartlomiej Zolnierkiewicz
2004-06-04 11:56     ` Jens Axboe
2004-06-04 12:15       ` Bartlomiej Zolnierkiewicz
2004-06-04 12:17         ` Jens Axboe [this message]
2004-06-04 12:40           ` Bartlomiej Zolnierkiewicz
2004-06-04 21:55           ` Ed Tomlinson
2004-06-04 19:58 ` Eric D. Mudama
2004-06-05 13:48   ` mattia
  -- strict thread matches above, loose matches on Subject: below --
2004-07-13 17:23 Piszcz, Justin Michael
2004-07-14 20:10 ` Dwayne Rightler
2004-07-15  4:08   ` Dhruv Matani
2004-07-26 14:32   ` Dhruv Matani
2004-07-26 14:51     ` Dwayne Rightler
2004-08-20  3:22   ` Dhruv Matani
2004-07-13 12:44 Piszcz, Justin Michael
2004-07-13 15:57 ` Dwayne Rightler
2004-07-13 12:30 Dhruv Matani
2004-07-13 12:32 ` Dwayne Rightler
     [not found] ` <40F3D4AC.9050407@gardenali.biz>
2004-07-13 14:27   ` Dhruv Matani
2004-07-13 14:29   ` Dhruv Matani
2004-07-13 14:47   ` Dhruv Matani
2004-07-13 15:01     ` Bartlomiej Zolnierkiewicz
2004-06-04  7:54 Rick Jansen
2004-06-04  9:02 ` Daniel Egger
2004-06-04  9:38   ` John Bradford
2004-06-04  9:43 ` John Bradford
2004-06-04  9:54   ` Rick Jansen
2004-06-04  9:59     ` Jens Axboe
2004-06-04 10:02       ` Rick Jansen
2004-06-04 10:08         ` Jens Axboe
2004-06-04 13:02           ` Andy Hawkins
2004-06-04 13:41     ` Daniel Egger
2004-06-04 13:53       ` Rick Jansen
2004-06-04 14:05         ` John Bradford
2004-06-04 14:18           ` Rick Jansen
2004-06-04 19:32             ` Bruce Allen
2004-06-04 14:15         ` Daniel Egger
2004-06-04 14:09     ` John Bradford

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=20040604121711.GZ1946@suse.de \
    --to=axboe@suse.de \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattia@nixlab.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox