Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ata Move struct ata_bio from wdvar.h to atavar.h.



details:   https://anonhg.NetBSD.org/src/rev/60aef9e91e75
branches:  trunk
changeset: 556355:60aef9e91e75
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Dec 14 05:03:28 2003 +0000

description:
Move struct ata_bio from wdvar.h to atavar.h.

diffstat:

 sys/dev/ata/atavar.h |  34 +++++++++++++++++++++++++++++++++-
 sys/dev/ata/wdvar.h  |  32 +-------------------------------
 2 files changed, 34 insertions(+), 32 deletions(-)

diffs (94 lines):

diff -r 9e12583b7392 -r 60aef9e91e75 sys/dev/ata/atavar.h
--- a/sys/dev/ata/atavar.h      Sun Dec 14 04:59:40 2003 +0000
+++ b/sys/dev/ata/atavar.h      Sun Dec 14 05:03:28 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atavar.h,v 1.31 2003/12/14 04:59:40 thorpej Exp $      */
+/*     $NetBSD: atavar.h,v 1.32 2003/12/14 05:03:28 thorpej Exp $      */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -101,6 +101,38 @@
 #define ATA_CONFIG_UDMA_OFF    8
 
 /*
+ * Parameters/state needed by the controller to perform an ATA bio.
+ */
+struct ata_bio {
+       volatile u_int16_t flags;/* cmd flags */
+#define        ATA_NOSLEEP     0x0001  /* Can't sleep */   
+#define        ATA_POLL        0x0002  /* poll for completion */
+#define        ATA_ITSDONE     0x0004  /* the transfer is as done as it gets */
+#define        ATA_SINGLE      0x0008  /* transfer must be done in singlesector mode */
+#define        ATA_LBA         0x0010  /* transfer uses LBA addressing */
+#define        ATA_READ        0x0020  /* transfer is a read (otherwise a write) */
+#define        ATA_CORR        0x0040  /* transfer had a corrected error */
+#define        ATA_LBA48       0x0080  /* transfer uses 48-bit LBA addressing */
+       int             multi;  /* # of blocks to transfer in multi-mode */
+       struct disklabel *lp;   /* pointer to drive's label info */
+       daddr_t         blkno;  /* block addr */
+       daddr_t         blkdone;/* number of blks transferred */
+       daddr_t         nblks;  /* number of block currently transferring */
+       int             nbytes; /* number of bytes currently transferring */
+       long            bcount; /* total number of bytes */
+       char            *databuf;/* data buffer address */
+       volatile int    error;
+#define        NOERROR         0       /* There was no error (r_error invalid) */
+#define        ERROR           1       /* check r_error */
+#define        ERR_DF          2       /* Drive fault */
+#define        ERR_DMA         3       /* DMA error */
+#define        TIMEOUT         4       /* device timed out */
+#define        ERR_NODEV       5       /* device has been gone */
+       u_int8_t        r_error;/* copy of error register */
+       daddr_t         badsect[127];/* 126 plus trailing -1 marker */
+};
+
+/*
  * ATA/ATAPI commands description 
  *
  * This structure defines the interface between the ATA/ATAPI device driver
diff -r 9e12583b7392 -r 60aef9e91e75 sys/dev/ata/wdvar.h
--- a/sys/dev/ata/wdvar.h       Sun Dec 14 04:59:40 2003 +0000
+++ b/sys/dev/ata/wdvar.h       Sun Dec 14 05:03:28 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdvar.h,v 1.21 2003/11/07 04:10:56 mycroft Exp $       */
+/*     $NetBSD: wdvar.h,v 1.22 2003/12/14 05:03:28 thorpej Exp $       */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -30,36 +30,6 @@
  *
  */
 
-/* Params needed by the controller to perform an ATA bio */
-struct ata_bio {
-       volatile u_int16_t flags;/* cmd flags */
-#define        ATA_NOSLEEP     0x0001  /* Can't sleep */   
-#define        ATA_POLL        0x0002  /* poll for completion */
-#define        ATA_ITSDONE     0x0004  /* the transfer is as done as it gets */
-#define        ATA_SINGLE      0x0008  /* transfer must be done in singlesector mode */
-#define        ATA_LBA         0x0010  /* transfer uses LBA addressing */
-#define        ATA_READ        0x0020  /* transfer is a read (otherwise a write) */
-#define        ATA_CORR        0x0040  /* transfer had a corrected error */
-#define        ATA_LBA48       0x0080  /* transfer uses 48-bit LBA addressing */
-       int             multi;  /* # of blocks to transfer in multi-mode */
-       struct disklabel *lp;   /* pointer to drive's label info */
-       daddr_t         blkno;  /* block addr */
-       daddr_t         blkdone;/* number of blks transferred */
-       daddr_t         nblks;  /* number of block currently transferring */
-       int             nbytes; /* number of bytes currently transferring */
-       long            bcount; /* total number of bytes */
-       char            *databuf;/* data buffer address */
-       volatile int    error;
-#define        NOERROR         0       /* There was no error (r_error invalid) */
-#define        ERROR           1       /* check r_error */
-#define        ERR_DF          2       /* Drive fault */
-#define        ERR_DMA         3       /* DMA error */
-#define        TIMEOUT         4       /* device timed out */
-#define        ERR_NODEV       5       /* device has been gone */
-       u_int8_t        r_error;/* copy of error register */
-       daddr_t         badsect[127];/* 126 plus trailing -1 marker */
-};
-
 /*
  * ata_bustype. The first field has to be compatible with scsipi_bustype,
  * as it's used for autoconfig by both ata and atapi drivers



Home | Main Index | Thread Index | Old Index