linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>,
	linux-ide@vger.kernel.org
Subject: PATCH: Allow per driver taskfile filters
Date: Fri, 05 Nov 2004 16:36:10 +0000	[thread overview]
Message-ID: <1099672568.5564.49.camel@localhost.localdomain> (raw)

This is needed for the IT8212 merge

diff --exclude-from /usr/src/exclude -u --new-file --recursive linux.vanilla-2.6.10rc1/include/linux/ide.h linux-2.6.10rc1/include/linux/ide.h
--- linux.vanilla-2.6.10rc1/include/linux/ide.h	2004-11-05 15:42:18.000000000 +0000
+++ linux-2.6.10rc1/include/linux/ide.h	2004-11-05 16:26:18.000000000 +0000
@@ -794,6 +795,7 @@
 #define IDE_CHIPSET_IS_PCI(c)	((IDE_CHIPSET_PCI_MASK >> (c)) & 1)
 
 struct ide_pci_device_s;
+struct ide_task_s;
 
 typedef struct hwif_s {
 	struct hwif_s *next;		/* for linked-list in ide_hwgroup_t */
@@ -856,6 +858,8 @@
 //	u8	(*ratemask)(ide_drive_t *);
 //	/* device rate limiter */
 //	u8	(*ratefilter)(ide_drive_t *, u8);
+	/* allow command filter/control */
+	int	(*raw_taskfile)(ide_drive_t *, struct ide_task_s *, u8 *);
 #endif
 
 	void (*ata_input_data)(ide_drive_t *, void *, u32);
@@ -1374,6 +1378,7 @@
 extern ide_startstop_t task_out_intr(ide_drive_t *);
 
 extern int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *);
+extern int ide_diag_taskfile(ide_drive_t *, ide_task_t *, unsigned long, u8 *);
 
 int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long);
 int ide_cmd_ioctl(ide_drive_t *, unsigned int, unsigned long);
diff --exclude-from /usr/src/exclude -u --new-file --recursive linux.vanilla-2.6.10rc1/drivers/ide/ide.c linux-2.6.10rc1/drivers/ide/ide.c
--- linux.vanilla-2.6.10rc1/drivers/ide/ide.c	2004-11-05 15:42:15.000000000 +0000
+++ linux-2.6.10rc1/drivers/ide/ide.c	2004-11-05 16:06:29.000000000 +0000
@@ -678,6 +678,7 @@
 	hwif->maskproc			= tmp_hwif->maskproc;
 	hwif->quirkproc			= tmp_hwif->quirkproc;
 	hwif->busproc			= tmp_hwif->busproc;
+	hwif->raw_taskfile		= tmp_hwif->raw_taskfile;
 
 	hwif->ata_input_data		= tmp_hwif->ata_input_data;
 	hwif->ata_output_data		= tmp_hwif->ata_output_data;
diff --exclude-from /usr/src/exclude -u --new-file --recursive linux.vanilla-2.6.10rc1/drivers/ide/ide-taskfile.c linux-2.6.10rc1/drivers/ide/ide-taskfile.c
--- linux.vanilla-2.6.10rc1/drivers/ide/ide-taskfile.c	2004-11-05 15:42:15.000000000 +0000
+++ linux-2.6.10rc1/drivers/ide/ide-taskfile.c	2004-11-05 16:07:34.000000000 +0000
@@ -511,7 +511,11 @@
 
 int ide_raw_taskfile (ide_drive_t *drive, ide_task_t *args, u8 *buf)
 {
-	return ide_diag_taskfile(drive, args, 0, buf);
+	ide_hwif_t *hwif = HWIF(drive);
+	if(hwif->raw_taskfile)
+		return hwif->raw_taskfile(drive, args, buf);
+	else
+		return ide_diag_taskfile(drive, args, 0, buf);
 }
 
 EXPORT_SYMBOL(ide_raw_taskfile);


             reply	other threads:[~2004-11-05 17:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05 16:36 Alan Cox [this message]
2004-11-05 22:11 ` PATCH: Allow per driver taskfile filters Bartlomiej Zolnierkiewicz
2004-11-05 23:25   ` Alan Cox
2004-11-06  0:42     ` Bartlomiej Zolnierkiewicz
2004-11-05 23:45       ` 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=1099672568.5564.49.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).