Module Name:    src
Committed By:   tsutsui
Date:           Sun Jul 11 13:00:53 UTC 2021

Modified Files:
        src/sys/arch/hp300/dev: rd.c rdreg.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/hp300/dev/rd.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp300/dev/rdreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/rd.c
diff -u src/sys/arch/hp300/dev/rd.c:1.108 src/sys/arch/hp300/dev/rd.c:1.109
--- src/sys/arch/hp300/dev/rd.c:1.108	Fri Jul  9 17:05:33 2021
+++ src/sys/arch/hp300/dev/rd.c	Sun Jul 11 13:00:52 2021
@@ -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 @@ static const struct rdidentinfo rdidenti
 		.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 @@ static const struct rdname2id rdname2id[
 	{ 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 @@ rdident(device_t parent, struct rd_softc
 
 	/*
 	 * 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 @@ rdident(device_t parent, struct rd_softc
 	case RD7946AID:
 		if (memcmp(name, RD7945ANAME, RDNAMELEN) == 0)
 			id = RD7945A;
+		else if (memcmp(name, RD7941ANAME, RDNAMELEN) == 0)
+			id = RD7941A;
 		else
 			id = RD7946A;
 		break;

Index: src/sys/arch/hp300/dev/rdreg.h
diff -u src/sys/arch/hp300/dev/rdreg.h:1.16 src/sys/arch/hp300/dev/rdreg.h:1.17
--- src/sys/arch/hp300/dev/rdreg.h:1.16	Fri Jul  9 17:05:33 2021
+++ src/sys/arch/hp300/dev/rdreg.h	Sun Jul 11 13:00:52 2021
@@ -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 @@ struct	rd_clearcmd {
 } __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 @@ struct	rd_clearcmd {
 #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 @@ struct	rd_clearcmd {
 #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 @@ struct	rd_clearcmd {
 #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 @@ struct	rd_clearcmd {
 #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 @@ struct	rd_clearcmd {
  * 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 @@ struct	rd_clearcmd {
  *
  * 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 @@ struct	rd_clearcmd {
 #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

Reply via email to