* PATCH: header updates for IDE changes
@ 2004-08-15 14:55 Alan Cox
2004-08-16 15:08 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2004-08-15 14:55 UTC (permalink / raw)
To: linux-ide, linux-kernel, torvalds
Add a "key" (generation) field to the ide taks object so that we can fix
the crash when you unload a pcmcia ide device (and later other pci hotplug
devices etc) while having a proc file accessed
Add a remove function to be called on unload by later patches
Add a raw_taskfile function to allow drives to do command filters
Add configured bit so that we can differentiate currently ambigious interface
states when unloading.
Add a prototype for ide_diag_taskfile (for raw_taskfile users)
Add prototypes for the ide key functions (code changes in next patch)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.8-rc3/include/linux/ide.h linux-2.6.8-rc3/include/linux/ide.h
--- linux.vanilla-2.6.8-rc3/include/linux/ide.h 2004-08-09 15:50:59.000000000 +0100
+++ linux-2.6.8-rc3/include/linux/ide.h 2004-08-12 16:45:17.000000000 +0100
@@ -849,12 +849,14 @@
#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 */
struct hwif_s *mate; /* other hwif from same PCI chip */
struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */
struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
+ u16 key; /* /proc persistent keying */
char name[6]; /* name of interface, eg. "ide0" */
@@ -909,10 +911,10 @@
int (*quirkproc)(ide_drive_t *);
/* driver soft-power interface */
int (*busproc)(ide_drive_t *, int);
-// /* host rate limiter */
-// u8 (*ratemask)(ide_drive_t *);
-// /* device rate limiter */
-// u8 (*ratefilter)(ide_drive_t *, u8);
+ /* hwif remove hook, called on unload/pci remove paths*/
+ void (*remove)(struct hwif_s *);
+ /* allow command filter/control */
+ int (*raw_taskfile)(ide_drive_t *, struct ide_task_s *, u8 *);
#endif
#if 0
@@ -980,7 +982,8 @@
unsigned long select_data; /* for use by chipset-specific code */
unsigned noprobe : 1; /* don't probe for this interface */
- unsigned present : 1; /* this interface exists */
+ unsigned present : 1; /* this interface exists logically (ie users) */
+ unsigned configured : 1; /* this hwif exists and is set up (may not be "present") */
unsigned hold : 1; /* this interface is always present */
unsigned serialized : 1; /* serialized all channel operation */
unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */
@@ -1082,6 +1085,9 @@
extern int ide_write_setting(ide_drive_t *drive, ide_settings_t *setting, int val);
extern void ide_add_generic_settings(ide_drive_t *drive);
+extern void *ide_drive_to_key(ide_drive_t *drive);
+extern ide_drive_t *ide_drive_from_key(void *);
+
/*
* /proc/ide interface
*/
@@ -1452,8 +1458,8 @@
extern ide_startstop_t pre_task_mulout_intr(ide_drive_t *, struct request *);
extern ide_startstop_t task_mulout_intr(ide_drive_t *);
+extern int ide_diag_taskfile(ide_drive_t *, ide_task_t *, unsigned long, u8 *);
extern int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *);
-
int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long);
int ide_cmd_ioctl(ide_drive_t *, unsigned int, unsigned long);
int ide_task_ioctl(ide_drive_t *, unsigned int, unsigned long);
Signed-off-by: Alan Cox <alan@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: header updates for IDE changes
2004-08-15 14:55 PATCH: header updates for IDE changes Alan Cox
@ 2004-08-16 15:08 ` Bartlomiej Zolnierkiewicz
2004-08-16 15:26 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-08-16 15:08 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide, linux-kernel, torvalds
These changes belong to the patches making actual use of them...
BTW What is the ordering in which your patches should be applied?
On Sunday 15 August 2004 16:55, Alan Cox wrote:
> Add a "key" (generation) field to the ide taks object so that we can fix
> the crash when you unload a pcmcia ide device (and later other pci hotplug
> devices etc) while having a proc file accessed
>
> Add a remove function to be called on unload by later patches
> Add a raw_taskfile function to allow drives to do command filters
> Add configured bit so that we can differentiate currently ambigious
> interface states when unloading.
> Add a prototype for ide_diag_taskfile (for raw_taskfile users)
> Add prototypes for the ide key functions (code changes in next patch)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: header updates for IDE changes
2004-08-16 15:08 ` Bartlomiej Zolnierkiewicz
@ 2004-08-16 15:26 ` Alan Cox
0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2004-08-16 15:26 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Alan Cox, linux-ide, linux-kernel, torvalds
On Mon, Aug 16, 2004 at 05:08:04PM +0200, Bartlomiej Zolnierkiewicz wrote:
> These changes belong to the patches making actual use of them...
They just don't split along those lines and compile sanely. I did the entire
thing as one operation because for a lot of it there are no middle grounds.
> BTW What is the ordering in which your patches should be applied?
Time order of message sending. I guess I should have added a PATCH n of m
to it but didn't realise in time. While I've split them up for ease of
understanding its likely a few steps along the way don't yield working
IDE because of the interdependancies.
Alan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-16 15:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-15 14:55 PATCH: header updates for IDE changes Alan Cox
2004-08-16 15:08 ` Bartlomiej Zolnierkiewicz
2004-08-16 15:26 ` Alan Cox
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).