summaryrefslogtreecommitdiff
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorMartin Dalecki <dalecki@evision-ventures.com>2002-04-27 21:18:09 -0700
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-04-27 21:18:09 -0700
commit045c90fee1a97b261270c2a03b49a4254d684195 (patch)
tree42ae95906e657c70198181cdc5aaa0683c8c1320 /include/linux/ide.h
parent5ef2759cc3fa1b1ba548a786ba92c1c96709e88a (diff)
[PATCH] 2.5.10 IDE 44
Reduce the "rain forest" of pointers a bit. - Use the channel info from the drive instead of from hwgroup where possible. Since we have now a direct association between a channel and irq, we can fix the handler for unexpected interrupts to don't have to iterate over multiple possibilities. - Finally it was just possible to remove the circular list of channels associated with a hwif. The hwif member of struct hwgroup_s as well as next member if struct ata_channel are gone. - Unify ide_build_sglist() and raw_build_sglist() in to one function. Use the queue associated with a request in the case of a CMD request there instead of referencing the device minor number. This will be pushed even further later.
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 7543af3be0ba..a3c86471e903 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -73,7 +73,6 @@ typedef unsigned char byte; /* used everywhere */
*/
#define DMA_PIO_RETRY 1 /* retrying in PIO */
-#define HWIF(drive) ((drive)->channel)
#define HWGROUP(drive) (drive->channel->hwgroup)
/*
@@ -254,7 +253,7 @@ void ide_setup_ports(hw_regs_t *hw,
#endif
/*
- * Now for the data we need to maintain per-drive: ide_drive_t
+ * Device types - the nomenclature is analogous to SCSI code.
*/
#define ATA_DISK 0x20
@@ -266,7 +265,10 @@ void ide_setup_ports(hw_regs_t *hw,
#define ATA_NO_LUN 0x7f
struct ide_settings_s;
-/* structure describing an ATA/ATAPI device */
+
+/*
+ * ATA/ATAPI device structure :
+ */
typedef
struct ata_device {
struct ata_channel * channel;
@@ -401,7 +403,6 @@ struct ata_channel {
struct device dev; /* device handle */
int unit; /* channel number */
- struct ata_channel *next; /* for linked-list in ide_hwgroup_t */
struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */
ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */
@@ -516,17 +517,14 @@ typedef int (ide_expiry_t)(ide_drive_t *);
#define IDE_DMA 2 /* DMA in progress */
typedef struct hwgroup_s {
- ide_handler_t *handler;/* irq handler, if active */
- unsigned long flags; /* BUSY, SLEEPING */
- ide_drive_t *drive; /* current drive */
- struct ata_channel *hwif; /* ptr to current hwif in linked-list */
-
- struct request *rq; /* current request */
-
- struct timer_list timer; /* failsafe timer */
- struct request wrq; /* local copy of current write rq */
- unsigned long poll_timeout; /* timeout value during long polls */
- ide_expiry_t *expiry; /* queried upon timeouts */
+ ide_handler_t *handler; /* irq handler, if active */
+ unsigned long flags; /* BUSY, SLEEPING */
+ struct ata_device *drive; /* current drive */
+ struct request *rq; /* current request */
+ struct timer_list timer; /* failsafe timer */
+ struct request wrq; /* local copy of current write rq */
+ unsigned long poll_timeout; /* timeout value during long polls */
+ ide_expiry_t *expiry; /* queried upon timeouts */
} ide_hwgroup_t;
/* structure attached to the request for IDE_TASK_CMDS */