Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Hook in the mly control interface on i386.
details: https://anonhg.NetBSD.org/src/rev/3e155412603d
branches: trunk
changeset: 513485:3e155412603d
user: ad <ad%NetBSD.org@localhost>
date: Wed Aug 01 20:54:16 2001 +0000
description:
Hook in the mly control interface on i386.
diffstat:
etc/etc.i386/MAKEDEV | 11 ++++++++++-
share/man/man8/man8.i386/MAKEDEV.8 | 5 ++++-
sys/arch/i386/i386/conf.c | 6 +++++-
sys/dev/pci/files.pci | 4 ++--
sys/dev/pci/mly.c | 7 ++++++-
5 files changed, 27 insertions(+), 6 deletions(-)
diffs (136 lines):
diff -r 42038f8925ef -r 3e155412603d etc/etc.i386/MAKEDEV
--- a/etc/etc.i386/MAKEDEV Wed Aug 01 19:50:48 2001 +0000
+++ b/etc/etc.i386/MAKEDEV Wed Aug 01 20:54:16 2001 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: MAKEDEV,v 1.138 2001/06/17 11:48:09 jdolecek Exp $
+# $NetBSD: MAKEDEV,v 1.139 2001/08/01 20:54:17 ad Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -123,6 +123,7 @@
# bktr Brooktree 848/849/878/879 based TV cards
# iop* I2O IOP control interface
# mlx* Mylex DAC960 control interface
+# mly* Mylex AcceleRAID/eXtremeRAID control interface
# altq ALTQ control interface
#
@@ -159,6 +160,7 @@
sh $0 lpt0 lpt1 lpt2 ttyv0 tun0 tun1 tun2 tun3 ipl
sh $0 ccd0 ccd1 ccd2 ccd3 md0 ss0 ch0 uk0 uk1 random
sh $0 speaker lkm mms0 lms0 pms0 joy0 joy1 apm local satlink0 iop0 mlx0
+ sh $0 mly0
sh $0 audio
sh $0 usbs
sh $0 isdn
@@ -789,6 +791,13 @@
chmod 600 mlx$unit
;;
+mly*)
+ unit=${i#mly};
+ rm -f mly$unit
+ mknod mly$unit c 80 $unit
+ chmod 600 mly$unit
+ ;;
+
altq)
mkdir -p altq
chmod 755 altq
diff -r 42038f8925ef -r 3e155412603d share/man/man8/man8.i386/MAKEDEV.8
--- a/share/man/man8/man8.i386/MAKEDEV.8 Wed Aug 01 19:50:48 2001 +0000
+++ b/share/man/man8/man8.i386/MAKEDEV.8 Wed Aug 01 20:54:16 2001 +0000
@@ -6,7 +6,7 @@
.\" *** DO NOT EDIT - any changes will be lost!!!
.\" *** ------------------------------------------------------------------
.\"
-.\" $NetBSD: MAKEDEV.8,v 1.22 2001/06/26 02:28:49 hubertf Exp $
+.\" $NetBSD: MAKEDEV.8,v 1.23 2001/08/01 20:54:17 ad Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -298,6 +298,9 @@
. It Ar mlx#
Mylex DAC960 control interface, see
.Xr \&mlx 4
+. It Ar mly#
+Mylex AcceleRAID/eXtremeRAID control interface, see
+.Xr \&mly 4
. It Ar altq
ALTQ control interface
. El
diff -r 42038f8925ef -r 3e155412603d sys/arch/i386/i386/conf.c
--- a/sys/arch/i386/i386/conf.c Wed Aug 01 19:50:48 2001 +0000
+++ b/sys/arch/i386/i386/conf.c Wed Aug 01 20:54:16 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.142 2001/04/27 05:47:47 lukem Exp $ */
+/* $NetBSD: conf.c,v 1.143 2001/08/01 20:54:17 ad Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -231,6 +231,8 @@
cdev_decl(iop);
#include "mlx.h"
cdev_decl(mlx);
+#include "mly.h"
+cdev_decl(mly);
cdev_decl(edmca);
#include <altq/altqconf.h>
@@ -324,6 +326,7 @@
cdev_altq_init(NALTQ,altq), /* 77: ALTQ control interface */
cdev__oci_init(NMLX,mlx), /* 78: Mylex DAC960 control interface */
cdev_disk_init(NED_MCA,edmca), /* 79: PS/2 ESDI disk */
+ cdev__oci_init(NMLY,mly), /* 80: Newer Mylex control interface */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
@@ -445,6 +448,7 @@
/* 77 */ NODEV,
/* 78 */ NODEV,
/* 79 */ 20,
+ /* 80 */ NODEV,
};
/*
diff -r 42038f8925ef -r 3e155412603d sys/dev/pci/files.pci
--- a/sys/dev/pci/files.pci Wed Aug 01 19:50:48 2001 +0000
+++ b/sys/dev/pci/files.pci Wed Aug 01 20:54:16 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.pci,v 1.134 2001/07/30 19:59:06 ad Exp $
+# $NetBSD: files.pci,v 1.135 2001/08/01 20:54:16 ad Exp $
#
# Config file and device description for machine-independent PCI code.
# Included by ports that need it. Requires that the SCSI files be
@@ -61,7 +61,7 @@
# Newer Mylex AcceleRAID and eXtremeRAID controllers
device mly: scsi
attach mly at pci
-file dev/pci/mly.c mly
+file dev/pci/mly.c mly needs-flag
# DPT EATA SCSI controllers
attach dpt at pci with dpt_pci
diff -r 42038f8925ef -r 3e155412603d sys/dev/pci/mly.c
--- a/sys/dev/pci/mly.c Wed Aug 01 19:50:48 2001 +0000
+++ b/sys/dev/pci/mly.c Wed Aug 01 20:54:16 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mly.c,v 1.5 2001/07/31 02:07:14 ad Exp $ */
+/* $NetBSD: mly.c,v 1.6 2001/08/01 20:54:16 ad Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -2346,6 +2346,11 @@
* Handle data size/direction.
*/
if ((mc->mc_length = abs(uc->DataTransferLength)) != 0) {
+ if (mc->mc_length > MAXPHYS) {
+ rv = EINVAL;
+ goto out;
+ }
+
mc->mc_data = malloc(mc->mc_length, M_DEVBUF, M_WAITOK);
if (mc->mc_data == NULL) {
rv = ENOMEM;
Home |
Main Index |
Thread Index |
Old Index