summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2003-03-21 02:40:56 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-03-21 02:40:56 -0800
commitcc4e6724fe984061ea97e0692de811ce3e7da9d8 (patch)
tree5f52e6fb852a099f1d6f316fd1130097afb12603 /include
parent1379e500a1cf3e16baac8e6bd334c11ffb6d7d0f (diff)
[PATCH] update ide headers to match changes
Diffstat (limited to 'include')
-rw-r--r--include/linux/ide.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 3f4079f0af82..813c37500937 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -726,6 +726,7 @@ typedef struct ide_drive_s {
unsigned present : 1; /* drive is physically present */
unsigned dead : 1; /* device ejected hint */
+ unsigned id_read : 1; /* 1=id read from disk 0 = synthetic */
unsigned noprobe : 1; /* from: hdx=noprobe */
unsigned removable : 1; /* 1 if need to do check_media_change */
unsigned is_flash : 1; /* 1 if probed as flash */
@@ -845,7 +846,7 @@ typedef struct ide_dma_ops_s {
#define task_rq_offset(rq) \
(((rq)->nr_sectors - (rq)->current_nr_sectors) * SECTOR_SIZE)
-extern inline void *ide_map_buffer(struct request *rq, unsigned long *flags)
+static inline void *ide_map_buffer(struct request *rq, unsigned long *flags)
{
/*
* fs request
@@ -859,7 +860,7 @@ extern inline void *ide_map_buffer(struct request *rq, unsigned long *flags)
return rq->buffer + task_rq_offset(rq);
}
-extern inline void ide_unmap_buffer(struct request *rq, char *buffer, unsigned long *flags)
+static inline void ide_unmap_buffer(struct request *rq, char *buffer, unsigned long *flags)
{
if (rq->bio)
bio_kunmap_irq(buffer, flags);
@@ -973,7 +974,7 @@ typedef struct hwif_s {
ide_startstop_t (*ide_dma_queued_start)(ide_drive_t *drive);
void (*OUTB)(u8 addr, unsigned long port);
- void (*OUTBSYNC)(u8 addr, unsigned long port);
+ void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port);
void (*OUTW)(u16 addr, unsigned long port);
void (*OUTL)(u32 addr, unsigned long port);
void (*OUTSW)(unsigned long port, void *addr, u32 count);
@@ -1179,6 +1180,7 @@ typedef struct ide_driver_s {
int (*end_request)(ide_drive_t *, int, int);
u8 (*sense)(ide_drive_t *, const char *, u8);
ide_startstop_t (*error)(ide_drive_t *, const char *, u8);
+ ide_startstop_t (*abort)(ide_drive_t *, const char *);
int (*ioctl)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
void (*pre_reset)(ide_drive_t *);
unsigned long (*capacity)(ide_drive_t *);
@@ -1278,6 +1280,13 @@ byte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat);
ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat);
/*
+ * Abort a running command on the controller triggering the abort
+ * from a host side, non error situation
+ * (drive, msg)
+ */
+extern ide_startstop_t ide_abort(ide_drive_t *, const char *);
+
+/*
* Issue a simple drive command
* The drive must be selected beforehand.
*
@@ -1325,12 +1334,6 @@ extern unsigned long current_capacity (ide_drive_t *drive);
extern ide_startstop_t ide_do_reset (ide_drive_t *);
/*
- * Re-Start an operation for an IDE interface.
- * The caller should return immediately after invoking this.
- */
-extern int restart_request (ide_drive_t *, struct request *);
-
-/*
* This function is intended to be used prior to invoking ide_do_drive_cmd().
*/
extern void ide_init_drive_cmd (struct request *rq);
@@ -1725,6 +1728,19 @@ extern void ide_toggle_bounce(ide_drive_t *drive, int on);
extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
extern spinlock_t ide_lock;
+extern struct semaphore ide_cfg_sem;
+/*
+ * Structure locking:
+ *
+ * ide_cfg_sem and ide_lock together protect changes to
+ * ide_hwif_t->{next,hwgroup}
+ * ide_drive_t->next
+ *
+ * ide_hwgroup_t->busy: ide_lock
+ * ide_hwgroup_t->hwif: ide_lock
+ * ide_hwif_t->mate: constant, no locking
+ * ide_drive_t->hwif: constant, no locking
+ */
#define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable(); } while (0)