All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: "C.Y.M." <syphir@syphir.sytes.net>
Cc: linux-kernel@vger.kernel.org, "'Alan Cox'" <alan@lxorguk.ukuu.org.uk>
Subject: Re: Changes to ide-probe.c in 2.6.9-rc2 causing improper detection
Date: Tue, 14 Sep 2004 09:15:56 +0200	[thread overview]
Message-ID: <20040914071555.GJ2336@suse.de> (raw)
In-Reply-To: <20040914070649.GI2336@suse.de>

On Tue, Sep 14 2004, Jens Axboe wrote:
> They do support it, they just don't flag the support in the capability
> flags. And of course some don't support it at all, you can try this on
> your drives if you want to know for sure.

Forgot to attach the code, here it is...

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/hdreg.h>

int main(int argc, char *argv[])
{
	char args[7];
	int fd;

	if (argc < 2) {
		printf("%s: <dev>\n", argv[0]);
		return 1;
	}

	fd = open(argv[1], O_RDONLY | O_NONBLOCK);
	if (fd == -1) {
		perror("open");
		return 2;
	}

	memset(args, 0, 7);
	args[0] = 0xE7;

	printf("issuing FLUSH_CACHE: ");
	if (ioctl(fd, HDIO_DRIVE_TASK, args) == -1)
		printf("failed 0x%x/0x%x!\n", args[0], args[1]);
	else
		printf("worked\n");

	memset(args, 0, 7);
	args[0] = 0xEA;

	printf("issuing FLUSH_CACHE_EXT: ");
	if (ioctl(fd, HDIO_DRIVE_TASK, args) == -1)
		printf("failed 0x%x/0x%x!\n", args[0], args[1]);
	else
		printf("worked\n");

	close(fd);
	return 0;
}

-- 
Jens Axboe


  reply	other threads:[~2004-09-14  7:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-14  2:26 Changes to ide-probe.c in 2.6.9-rc2 causing improper detection C.Y.M.
2004-09-14  6:06 ` Jens Axboe
2004-09-14  7:03   ` C.Y.M.
2004-09-14  7:06     ` Jens Axboe
2004-09-14  7:15       ` Jens Axboe [this message]
2004-09-14  8:20         ` C.Y.M.
2004-09-14  8:28           ` Jens Axboe
2004-09-14 10:09         ` Alan Cox
2004-09-14 11:12           ` Jens Axboe
2004-09-14 10:35             ` Alan Cox
2004-09-14 11:43               ` Jens Axboe
2004-09-14 11:19                 ` Alan Cox
2004-09-14 12:21                   ` Jens Axboe
2004-09-14 11:37         ` Gene Heskett
2004-09-14 10:07       ` Alan Cox
2004-09-14 11:11         ` Jens Axboe
2004-09-14 11:59     ` Bartlomiej Zolnierkiewicz
2004-09-14 13:15       ` Jens Axboe
2004-09-14 10:05   ` Alan Cox
2004-09-14 11:09     ` Jens Axboe
2004-09-14 12:07     ` Bartlomiej Zolnierkiewicz
2004-09-14 15:18     ` Jeff Garzik
2004-09-14 15:25       ` Jens Axboe
2004-09-14 15:05         ` Alan Cox
2004-09-14 15:33         ` Mark Lord
2004-09-14 15:39           ` Mark Lord
2004-09-14 15:51             ` Jeff Garzik
2004-09-14 15:06               ` Alan Cox
2004-09-14 15:45           ` Jeff Garzik
2004-09-14 15:31       ` Mark Lord

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=20040914071555.GJ2336@suse.de \
    --to=axboe@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syphir@syphir.sytes.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.