Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src Pull up revisions:
details: https://anonhg.NetBSD.org/src/rev/b49a593af7e7
branches: netbsd-6
changeset: 774296:b49a593af7e7
user: jdc <jdc%NetBSD.org@localhost>
date: Wed Jul 04 20:41:45 2012 +0000
description:
Pull up revisions:
src/etc/etc.vax/MAKEDEV.conf revision 1.14
src/sys/arch/vax/conf/GENERIC revision 1.182
src/sys/arch/vax/conf/INSTALL revision 1.60
src/sys/arch/vax/conf/VAX780 revision 1.9
src/sys/arch/vax/conf/majors.vax revision 1.24
src/sys/arch/vax/vax/disksubr.c revision 1.53
src/sys/dev/DEVNAMES revision 1.275
src/sys/dev/mscp/files.mscp revision 1.8
src/sys/dev/mscp/mscp_disk.c revision 1.72
src/sys/dev/mscp/mscp_subr.c revision 1.42
src/distrib/vax/ramdisk/Makefile revision 1.29
(requested by abs in ticket #385).
- Add racd* devices for MSCP based CD-ROM drives (RRD40s), as opposed
to mixing them in with the ra* disks, modelled loosely on how MSCP
rx* floppies are handled
- racd* defaults to the same single iso9660 partition as cd*
- Cleanup config option handling slightly so any combination of ra*,
rx* (and now raccd*) can be defined without build errors.
- Avoid ugly printf when disks have all zero disklabel magic number
Include racd0 and racd1 on ramdisk
diffstat:
distrib/vax/ramdisk/Makefile | 4 +-
etc/etc.vax/MAKEDEV.conf | 7 +-
sys/arch/vax/conf/GENERIC | 7 +-
sys/arch/vax/conf/INSTALL | 3 +-
sys/arch/vax/conf/VAX780 | 3 +-
sys/arch/vax/conf/majors.vax | 3 +-
sys/arch/vax/vax/disksubr.c | 7 +-
sys/dev/DEVNAMES | 3 +-
sys/dev/mscp/files.mscp | 12 +-
sys/dev/mscp/mscp_disk.c | 279 ++++++++++++++++++++++++++----------------
sys/dev/mscp/mscp_subr.c | 8 +-
11 files changed, 209 insertions(+), 127 deletions(-)
diffs (truncated from 751 to 300 lines):
diff -r d68e524cf44d -r b49a593af7e7 distrib/vax/ramdisk/Makefile
--- a/distrib/vax/ramdisk/Makefile Wed Jul 04 20:30:00 2012 +0000
+++ b/distrib/vax/ramdisk/Makefile Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2010/02/11 09:06:51 roy Exp $
+# $NetBSD: Makefile,v 1.26.8.1 2012/07/04 20:41:47 jdc Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -15,7 +15,7 @@
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= le
MAKEDEVTARGETS= std mt0 st0 rd0 rd1 dz0 dl0 dhu0 rx0 ra0 ra1 ra2 ra3 hp0 hp1 \
- sd0 sd1 sd2 md0 pty0 cd0 cd1
+ sd0 sd1 sd2 md0 pty0 cd0 cd1 racd0 racd1
IMAGEDEPENDS= ${CRUNCHBIN} \
dot.profile \
${DESTDIR}/boot ${DESTDIR}/usr/mdec/xxboot \
diff -r d68e524cf44d -r b49a593af7e7 etc/etc.vax/MAKEDEV.conf
--- a/etc/etc.vax/MAKEDEV.conf Wed Jul 04 20:30:00 2012 +0000
+++ b/etc/etc.vax/MAKEDEV.conf Wed Jul 04 20:41:45 2012 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: MAKEDEV.conf,v 1.13 2011/10/12 17:03:49 njoly Exp $
+# $NetBSD: MAKEDEV.conf,v 1.13.4.1 2012/07/04 20:41:45 jdc Exp $
all_md)
makedev mt0 mt1 ts0 ts1 st0 st1 uk0 ss0 cd0 vt0
makedev ra0 ra1 ra2 ra3 hp0 hp1 hp2 hp3 sd0 sd1 sd2 sd3 rd0 rd1 rd2
- makedev dz0 dl0 dhu0 rx0 rx1
+ makedev dz0 dl0 dhu0 racd0 racd1 rx0 rx1
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev std_vax
@@ -60,11 +60,12 @@
esac
;;
-hp[0-9]*|hk[0-9]*|up[0-9]*|ra[0-9]*|rl[0-9]*|rb[0-9]*|rd[0-9]*|rx[0-9]*)
+hp[0-9]*|hk[0-9]*|up[0-9]*|ra[0-9]*|racd[0-9]*|rl[0-9]*|rb[0-9]*|rd[0-9]*|rx[0-9]*)
case $i in
hp*) name=hp; unit=${i#hp}; blk=0; chr=4;;
hk*) name=hk; unit=${i#hk}; blk=3; chr=11;;
up*) name=up; unit=${i#up}; blk=2; chr=13;;
+ racd*) name=racd; unit=${i#racd}; blk=28; chr=28;; # before ra*
ra*) name=ra; unit=${i#ra}; blk=9; chr=9;;
rb*) name=rb; unit=${i#rb}; blk=11; chr=23;;
rx*) name=rx; unit=${i#rx}; blk=12; chr=30;;
diff -r d68e524cf44d -r b49a593af7e7 sys/arch/vax/conf/GENERIC
--- a/sys/arch/vax/conf/GENERIC Wed Jul 04 20:30:00 2012 +0000
+++ b/sys/arch/vax/conf/GENERIC Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.179.2.1 2012/06/12 17:47:58 riz Exp $
+# $NetBSD: GENERIC,v 1.179.2.2 2012/07/04 20:41:45 jdc Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.179.2.1 $"
+#ident "GENERIC-$Revision: 1.179.2.2 $"
# Here are all different supported CPU types listed.
#options VAX8800 # VAX 8500, 8530, 8550, 8700, 8800
@@ -271,7 +271,8 @@
mscpbus* at mtc?
mscpbus* at kdb?
-ra* at mscpbus? drive? # MSCP disk
+ra* at mscpbus? drive? # MSCP disk
+racd* at mscpbus? drive? # MSCP CD-ROM (RRD40)
rx* at mscpbus? drive? # MSCP floppy
mt* at mscpbus? drive? # MSCP tape
diff -r d68e524cf44d -r b49a593af7e7 sys/arch/vax/conf/INSTALL
--- a/sys/arch/vax/conf/INSTALL Wed Jul 04 20:30:00 2012 +0000
+++ b/sys/arch/vax/conf/INSTALL Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.58 2011/12/18 05:49:33 dholland Exp $
+# $NetBSD: INSTALL,v 1.58.2.1 2012/07/04 20:41:45 jdc Exp $
#
# INSTALL kernel; all supported devices but nothing fancy.
#
@@ -160,6 +160,7 @@
# MSCP devices
ra* at mscpbus? drive? # MSCP disk
+racd* at mscpbus? drive? # MSCP CD-ROM (RRD40)
rx* at mscpbus? drive? # MSCP floppy
mt* at mscpbus? drive? # MSCP tape
diff -r d68e524cf44d -r b49a593af7e7 sys/arch/vax/conf/VAX780
--- a/sys/arch/vax/conf/VAX780 Wed Jul 04 20:30:00 2012 +0000
+++ b/sys/arch/vax/conf/VAX780 Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: VAX780,v 1.7 2011/12/18 05:49:33 dholland Exp $
+# $NetBSD: VAX780,v 1.7.2.1 2012/07/04 20:41:46 jdc Exp $
#
# 11/780,750,730 machine description file
#
@@ -256,6 +256,7 @@
#mscpbus* at kdb?
ra* at mscpbus? drive? # MSCP disk
+racd* at mscpbus? drive? # MSCP CD-ROM (RRD40)
rx* at mscpbus? drive? # MSCP floppy
mt* at mscpbus? drive? # MSCP tape
diff -r d68e524cf44d -r b49a593af7e7 sys/arch/vax/conf/majors.vax
--- a/sys/arch/vax/conf/majors.vax Wed Jul 04 20:30:00 2012 +0000
+++ b/sys/arch/vax/conf/majors.vax Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: majors.vax,v 1.23 2011/06/30 20:09:38 wiz Exp $
+# $NetBSD: majors.vax,v 1.23.8.1 2012/07/04 20:41:46 jdc Exp $
#
# Device majors for vax
#
@@ -36,6 +36,7 @@
vaxany
device-major lpa char 26 lpa
device-major ps char 27 ps
+device-major racd char 28 block 28 racd
device-major ad char 29 ad
device-major rx char 30 block 12 rx
device-major ik char 31 ik
diff -r d68e524cf44d -r b49a593af7e7 sys/arch/vax/vax/disksubr.c
--- a/sys/arch/vax/vax/disksubr.c Wed Jul 04 20:30:00 2012 +0000
+++ b/sys/arch/vax/vax/disksubr.c Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.52 2010/12/14 23:44:49 matt Exp $ */
+/* $NetBSD: disksubr.c,v 1.52.14.1 2012/07/04 20:41:46 jdc Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.52 2010/12/14 23:44:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.52.14.1 2012/07/04 20:41:46 jdc Exp $");
#include "opt_compat_ultrix.h"
@@ -157,7 +157,8 @@
int part;
if (dlp->magic != DEC_LABEL_MAGIC) {
- printf("label: %x\n",dlp->magic);
+ if (dlp->magic != 0)
+ printf("label: %x\n",dlp->magic);
msg = ((msg != NULL) ? msg: "no disk label");
goto done;
}
diff -r d68e524cf44d -r b49a593af7e7 sys/dev/DEVNAMES
--- a/sys/dev/DEVNAMES Wed Jul 04 20:30:00 2012 +0000
+++ b/sys/dev/DEVNAMES Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: DEVNAMES,v 1.271 2012/01/22 13:53:48 christos Exp $
+# $NetBSD: DEVNAMES,v 1.271.2.1 2012/07/04 20:41:46 jdc Exp $
#
# This file contains all used device names and defined attributes in
# alphabetical order. New devices added to the system somewhere should first
@@ -1103,6 +1103,7 @@
qt MI
qv vax
ra MI
+racd MI
radio MI
radio MI Attribute
rambo mipsco
diff -r d68e524cf44d -r b49a593af7e7 sys/dev/mscp/files.mscp
--- a/sys/dev/mscp/files.mscp Wed Jul 04 20:30:00 2012 +0000
+++ b/sys/dev/mscp/files.mscp Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.mscp,v 1.7 1999/06/06 19:16:18 ragge Exp $
+# $NetBSD: files.mscp,v 1.7.182.1 2012/07/04 20:41:46 jdc Exp $
#
# File and device description for MSCP devices.
#
@@ -10,12 +10,16 @@
device mscpbus {drive = -1}
attach mscpbus at mscp
+device ra: disk
+attach ra at mscpbus
+
+device racd: disk
+attach racd at mscpbus
+
device rx: disk
attach rx at mscpbus
-device ra: disk
-attach ra at mscpbus
-file dev/mscp/mscp_disk.c ra | rx needs-flag
+file dev/mscp/mscp_disk.c ra | racd | rx needs-flag
device mt: tape
attach mt at mscpbus
diff -r d68e524cf44d -r b49a593af7e7 sys/dev/mscp/mscp_disk.c
--- a/sys/dev/mscp/mscp_disk.c Wed Jul 04 20:30:00 2012 +0000
+++ b/sys/dev/mscp/mscp_disk.c Wed Jul 04 20:41:45 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_disk.c,v 1.71 2009/09/12 18:01:50 tsutsui Exp $ */
+/* $NetBSD: mscp_disk.c,v 1.71.18.1 2012/07/04 20:41:46 jdc Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -73,6 +73,7 @@
/*
* RA disk device driver
* RX MSCP floppy disk device driver
+ * RRD MSCP CD device driver
*/
/*
@@ -81,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.71 2009/09/12 18:01:50 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.71.18.1 2012/07/04 20:41:46 jdc Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -125,19 +126,24 @@
};
#define rx_softc ra_softc
+#define racd_softc ra_softc
-void rxattach(device_t, device_t, void *);
+void raattach(device_t, device_t, void *);
int rx_putonline(struct rx_softc *);
void rrmakelabel(struct disklabel *, long);
+int ra_putonline(dev_t, struct ra_softc *);
+static inline struct ra_softc *mscp_device_lookup(dev_t);
#if NRA
int ramatch(device_t, cfdata_t, void *);
-void raattach(device_t, device_t, void *);
-int ra_putonline(struct ra_softc *);
CFATTACH_DECL(ra, sizeof(struct ra_softc),
- ramatch, rxattach, NULL, NULL);
+ ramatch, raattach, NULL, NULL);
+
+#endif /* NRA */
+
+#if NRA || NRACD || NRX
dev_type_open(raopen);
dev_type_close(raclose);
@@ -148,6 +154,8 @@
dev_type_dump(radump);
dev_type_size(rasize);
+#if NRA
+
const struct bdevsw ra_bdevsw = {
raopen, raclose, rastrategy, raioctl, radump, rasize, D_DISK
};
@@ -177,45 +185,17 @@
cf->cf_loc[MSCPBUSCF_DRIVE] != mp->mscp_unit)
return 0;
/*
- * Check if this disk is a floppy; then don't configure it.
+ * Check if this disk is a floppy (RX) or cd (RRD)
* Seems to be a safe way to test it per Chris Torek.
*/
if (MSCP_MID_ECH(1, mp->mscp_guse.guse_mediaid) == 'X' - '@')
return 0;
+ if (MSCP_MID_ECH(1, mp->mscp_guse.guse_mediaid) == 'R' - '@')
+ return 0;
return 1;
}
-/*
- * (Try to) put the drive online. This is done the first time the
- * drive is opened, or if it har fallen offline.
- */
-int
-ra_putonline(struct ra_softc *ra)
-{
- struct disklabel *dl;
- const char *msg;
- int maj;
-
- if (rx_putonline(ra) != MSCP_DONE)
- return MSCP_FAILED;
-
- dl = ra->ra_disk.dk_label;
-
- ra->ra_state = DK_RDLABEL;
- printf("%s", device_xname(&ra->ra_dev));
- maj = cdevsw_lookup_major(&ra_cdevsw);
- if ((msg = readdisklabel(MAKEDISKDEV(maj, device_unit(&ra->ra_dev),
- RAW_PART), rastrategy, dl, NULL)) != NULL)
Home |
Main Index |
Thread Index |
Old Index