Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/dev Add Device and drive info of 2202A, 7908A...



details:   https://anonhg.NetBSD.org/src/rev/7d9aecd8c3db
branches:  trunk
changeset: 1022277:7d9aecd8c3db
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jul 11 13:00:52 2021 +0000

description:
Add Device and drive info of 2202A, 7908A, 7911A, and 7941A.

Geometries and description info are taken from hpdrive.ini.sample
in HPDrive.  Briefly tested on HPDisk.

diffstat:

 sys/arch/hp300/dev/rd.c    |  50 ++++++++++++++++++++++++++++++++++++++++++---
 sys/arch/hp300/dev/rdreg.h |  30 +++++++++++++++++++++++---
 2 files changed, 72 insertions(+), 8 deletions(-)

diffs (185 lines):

diff -r ed786b7971b7 -r 7d9aecd8c3db sys/arch/hp300/dev/rd.c
--- a/sys/arch/hp300/dev/rd.c   Sun Jul 11 12:12:30 2021 +0000
+++ b/sys/arch/hp300/dev/rd.c   Sun Jul 11 13:00:52 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rd.c,v 1.108 2021/07/09 17:05:33 tsutsui Exp $ */
+/*     $NetBSD: rd.c,v 1.109 2021/07/11 13:00:52 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.108 2021/07/09 17:05:33 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.109 2021/07/11 13:00:52 tsutsui Exp $");
 
 #include "opt_useleds.h"
 
@@ -355,6 +355,42 @@
                .ri_ntpc = NRD2203ATRK,
                .ri_ncyl = 1449,
                .ri_nblocks = 1309896
+       },
+
+       [RD2202A] = {
+               .ri_hwid = RD2202AID,
+               .ri_desc = "2202A",
+               .ri_nbpt = NRD2202ABPT,
+               .ri_ntpc = NRD2202ATRK,
+               .ri_ncyl = 1449,
+               .ri_nblocks = 1309896
+       },
+
+       [RD7908A] = {
+               .ri_hwid = RD7908AID,
+               .ri_desc = "7908A",
+               .ri_nbpt = NRD7908ABPT,
+               .ri_ntpc = NRD7908ATRK,
+               .ri_ncyl = 185,
+               .ri_nblocks = 32375
+       },
+
+       [RD7911A] = {
+               .ri_hwid = RD7911AID,
+               .ri_desc = "7911A",
+               .ri_nbpt = NRD7911ABPT,
+               .ri_ntpc = NRD7911ATRK,
+               .ri_ncyl = 572,
+               .ri_nblocks = 54912
+       },
+
+       [RD7941A] = {
+               .ri_hwid = RD7946AID,
+               .ri_desc = "7941A",
+               .ri_nbpt = NRD7941ABPT,
+               .ri_ntpc = NRD7941ATRK,
+               .ri_ncyl = 968,
+               .ri_nblocks = 46464
        }
 };
 static const int numrdidentinfo = __arraycount(rdidentinfo);
@@ -380,7 +416,11 @@
        { RD7958BNAME,  RD7958B },
        { RD7959BNAME,  RD7959B },
        { RD2200ANAME,  RD2200A },
-       { RD2203ANAME,  RD2203A }
+       { RD2203ANAME,  RD2203A },
+       { RD2202ANAME,  RD2202A },
+       { RD7908ANAME,  RD7908A },
+       { RD7911ANAME,  RD7911A },
+       { RD7941ANAME,  RD7941A }
 };
 static const int numrdname2id = __arraycount(rdname2id);
 
@@ -618,7 +658,7 @@
 
        /*
         * Take care of a couple of anomolies:
-        * 1. 7945A and 7946A both return same HW id
+        * 1. 7945A, 7946A, and 7941A all return same HW id
         * 2. 9122S and 9134D both return same HW id
         * 3. 9122D and 9134L both return same HW id
         */
@@ -626,6 +666,8 @@
        case RD7946AID:
                if (memcmp(name, RD7945ANAME, RDNAMELEN) == 0)
                        id = RD7945A;
+               else if (memcmp(name, RD7941ANAME, RDNAMELEN) == 0)
+                       id = RD7941A;
                else
                        id = RD7946A;
                break;
diff -r ed786b7971b7 -r 7d9aecd8c3db sys/arch/hp300/dev/rdreg.h
--- a/sys/arch/hp300/dev/rdreg.h        Sun Jul 11 12:12:30 2021 +0000
+++ b/sys/arch/hp300/dev/rdreg.h        Sun Jul 11 13:00:52 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rdreg.h,v 1.16 2021/07/09 17:05:33 tsutsui Exp $       */
+/*     $NetBSD: rdreg.h,v 1.17 2021/07/11 13:00:52 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -104,7 +104,7 @@
 } __attribute__((__packed__));
 
 /* HW ids */
-#define        RD7946AID       0x220   /* also 7945A */
+#define        RD7946AID       0x220   /* also 7945A and 7941A */
 #define        RD9134DID       0x221   /* also 9122S */
 #define        RD9134LID       0x222   /* also 9122D */
 #define        RD7912PID       0x209
@@ -120,6 +120,9 @@
 #define        RD7959BID       0x22E   /* another guess based on 7958B */
 #define        RD2200AID       0x22F
 #define        RD2203AID       0x230   /* yet another guess */
+#define        RD2202AID       0x231   /* from hpdrive.ini.sample */
+#define        RD7908AID       0x200   /* from hpdrive.ini.sample */
+#define        RD7911AID       0x204   /* from hpdrive.ini.sample */
 
 /* Drive names -- per identify description structure */
 #define        RD7945ANAME     "079450"
@@ -140,6 +143,10 @@
 #define        RD7959BNAME     "079591"
 #define        RD2200ANAME     "022000"
 #define        RD2203ANAME     "022030"
+#define        RD2202ANAME     "022020"
+#define        RD7908ANAME     "079080"
+#define        RD7911ANAME     "079110"
+#define        RD7941ANAME     "079410"
 
 #define        RDNAMELEN       6
 
@@ -163,6 +170,10 @@
 #define        RD7959B         16
 #define        RD2200A         17
 #define        RD2203A         18
+#define        RD2202A         19
+#define        RD7908A         20
+#define        RD7911A         21
+#define        RD7941A         22
 
 #define        NRD7945ABPT     16
 #define        NRD7945ATRK     7
@@ -178,6 +189,10 @@
 #define        NRD7933HTRK     13
 #define        NRD9134LBPT     16
 #define        NRD9134LTRK     5
+#define        NRD7911ABPT     32
+#define        NRD7911ATRK     3
+#define        NRD7941ABPT     16
+#define        NRD7941ATRK     3
 
 /*
  * Several HP drives have an odd number of 256 byte sectors per track.
@@ -190,8 +205,8 @@
  * DISK                REAL (256 BPS)          HPUX (1024 BPS)         BSD (512 BPS)
  *             SPT x HD x CYL          SPT x HD x CYL          SPT x HD x CYL
  * -----       ---------------         ---------------         --------------
- * 7936:       123 x  7 x 1396          25 x  7 x 1716         123 x  7 x  698
- * 7937:       123 x 13 x 1396          25 x 16 x 1395         123 x 13 x  698
+ * 7936H:      123 x  7 x 1396          25 x  7 x 1716         123 x  7 x  698
+ * 7937H:      123 x 13 x 1396          25 x 16 x 1395         123 x 13 x  698
  *
  * 7957A:       63 x  5 x 1013          11 x  7 x 1036          22 x  7 x 1036
  * 7958A:       63 x  8 x 1013          21 x  6 x 1013          36 x  7 x 1013
@@ -202,6 +217,9 @@
  *
  * 2200A:      113 x  8 x 1449         113 x  2 x 1449         113 x  4 x 1449
  * 2203A:      113 x 16 x 1449         113 x  4 x 1449         113 x  8 x 1449
+ * 2202A:      113 x 16 x 1449         113 x  4 x 1449         113 x  8 x 1449
+ *
+ * 7908A:       35 x  5 x  370         ??? x  ? x  ???          35 x  5 x  185
  */
 #define        NRD7936HBPT     123
 #define        NRD7936HTRK     7
@@ -221,6 +239,10 @@
 #define        NRD2200ATRK     4
 #define        NRD2203ABPT     113
 #define        NRD2203ATRK     8
+#define        NRD2202ABPT     113
+#define        NRD2202ATRK     8
+#define        NRD7908ABPT     35
+#define        NRD7908ATRK     5
 
 /* controller "unit" number */
 #define        RDCTLR          15



Home | Main Index | Thread Index | Old Index