svn commit: r199254 - in user/ed/newcons: . bin/sh etc etc/etc.ia64 etc/etc.pc98 etc/root lib/libc/locale lib/libc/net lib/libc/nls lib/libpam/modules/pam_unix release/picobsd/floppy.tree/etc relea...

Ed Schouten ed at FreeBSD.org
Fri Nov 13 13:08:35 UTC 2009


Author: ed
Date: Fri Nov 13 13:08:34 2009
New Revision: 199254
URL: http://svn.freebsd.org/changeset/base/199254

Log:
  MFC at r199252.

Added:
  user/ed/newcons/etc/etc.pc98/
     - copied from r199252, head/etc/etc.pc98/
  user/ed/newcons/sys/libkern/inet_aton.c
     - copied unchanged from r199252, head/sys/libkern/inet_aton.c
  user/ed/newcons/tools/regression/lib/libutil/test-pidfile.c
     - copied unchanged from r199252, head/tools/regression/lib/libutil/test-pidfile.c
Modified:
  user/ed/newcons/UPDATING
  user/ed/newcons/bin/sh/trap.c
  user/ed/newcons/etc/Makefile
  user/ed/newcons/etc/etc.ia64/ttys
  user/ed/newcons/etc/root/dot.profile
  user/ed/newcons/lib/libc/locale/isblank.3
  user/ed/newcons/lib/libc/locale/isgraph.3
  user/ed/newcons/lib/libc/locale/isprint.3
  user/ed/newcons/lib/libc/net/getnameinfo.c
  user/ed/newcons/lib/libc/net/ip6opt.c
  user/ed/newcons/lib/libc/nls/nl_NL.ISO8859-1.msg
  user/ed/newcons/lib/libpam/modules/pam_unix/pam_unix.8
  user/ed/newcons/release/picobsd/floppy.tree/etc/ttys
  user/ed/newcons/release/picobsd/tinyware/oinit/oinit.c
  user/ed/newcons/sbin/mount/mount.8
  user/ed/newcons/share/man/man4/snd_hda.4
  user/ed/newcons/share/misc/organization.dot
  user/ed/newcons/share/skel/dot.profile
  user/ed/newcons/share/timedef/ja_JP.SJIS.src
  user/ed/newcons/share/timedef/ja_JP.UTF-8.src
  user/ed/newcons/share/timedef/ja_JP.eucJP.src
  user/ed/newcons/sys/amd64/amd64/initcpu.c
  user/ed/newcons/sys/amd64/amd64/pmap.c
  user/ed/newcons/sys/boot/common/Makefile.inc
  user/ed/newcons/sys/boot/common/boot.c
  user/ed/newcons/sys/boot/uboot/lib/glue.c
  user/ed/newcons/sys/cam/ata/ata_all.c
  user/ed/newcons/sys/cam/ata/ata_all.h
  user/ed/newcons/sys/cam/ata/ata_da.c
  user/ed/newcons/sys/cam/ata/ata_xpt.c
  user/ed/newcons/sys/cam/cam.c
  user/ed/newcons/sys/cam/cam_ccb.h
  user/ed/newcons/sys/cam/cam_xpt.c
  user/ed/newcons/sys/cam/cam_xpt_internal.h
  user/ed/newcons/sys/cam/scsi/scsi_xpt.c
  user/ed/newcons/sys/cddl/boot/zfs/zfssubr.c
  user/ed/newcons/sys/conf/NOTES
  user/ed/newcons/sys/conf/files
  user/ed/newcons/sys/conf/options
  user/ed/newcons/sys/contrib/rdma/krping/krping.c
  user/ed/newcons/sys/dev/ahci/ahci.c
  user/ed/newcons/sys/dev/bwi/if_bwi.c
  user/ed/newcons/sys/dev/bwi/if_bwivar.h
  user/ed/newcons/sys/dev/cxgb/common/cxgb_ael1002.c
  user/ed/newcons/sys/dev/cxgb/common/cxgb_aq100x.c
  user/ed/newcons/sys/dev/cxgb/common/cxgb_xgmac.c
  user/ed/newcons/sys/dev/cxgb/cxgb_main.c
  user/ed/newcons/sys/dev/dpms/dpms.c
  user/ed/newcons/sys/dev/e1000/if_igb.c
  user/ed/newcons/sys/dev/fb/vesa.c
  user/ed/newcons/sys/dev/fb/vgareg.h
  user/ed/newcons/sys/dev/pci/vga_pci.c
  user/ed/newcons/sys/dev/siis/siis.c
  user/ed/newcons/sys/dev/syscons/scterm-teken.c
  user/ed/newcons/sys/fs/nfsclient/nfs_clvnops.c
  user/ed/newcons/sys/geom/part/g_part_gpt.c
  user/ed/newcons/sys/i386/i386/identcpu.c
  user/ed/newcons/sys/i386/i386/initcpu.c
  user/ed/newcons/sys/i386/i386/pmap.c
  user/ed/newcons/sys/i386/xen/pmap.c
  user/ed/newcons/sys/isa/vga_isa.c
  user/ed/newcons/sys/kern/subr_bus.c
  user/ed/newcons/sys/kern/vfs_default.c
  user/ed/newcons/sys/kern/vfs_mount.c
  user/ed/newcons/sys/net80211/ieee80211_action.c
  user/ed/newcons/sys/net80211/ieee80211_proto.h
  user/ed/newcons/sys/netinet/in.h
  user/ed/newcons/sys/netinet/libalias/alias_proxy.c
  user/ed/newcons/sys/netinet6/nd6.c
  user/ed/newcons/sys/pc98/cbus/cbus_dma.c
  user/ed/newcons/sys/powerpc/aim/mmu_oea64.c
  user/ed/newcons/sys/teken/teken.c
  user/ed/newcons/sys/teken/teken.h
  user/ed/newcons/tools/regression/lib/libutil/Makefile
  user/ed/newcons/tools/regression/lib/libutil/test-flopen.c
  user/ed/newcons/tools/regression/lib/libutil/test-grp.c
  user/ed/newcons/tools/regression/lib/libutil/test-trimdomain-nodomain.c
  user/ed/newcons/tools/regression/lib/libutil/test-trimdomain.c
  user/ed/newcons/tools/tools/nanobsd/gateworks/Files/root/.profile
  user/ed/newcons/tools/tools/nanobsd/rescue/Files/etc/ttys
  user/ed/newcons/tools/tools/tinybsd/conf/wrap/etc/ttys
  user/ed/newcons/usr.bin/gencat/gencat.c
  user/ed/newcons/usr.bin/systat/Makefile
  user/ed/newcons/usr.bin/systat/main.c
  user/ed/newcons/usr.sbin/sade/termcap.c
  user/ed/newcons/usr.sbin/sysinstall/termcap.c
  user/ed/newcons/usr.sbin/vidcontrol/vidcontrol.1
  user/ed/newcons/usr.sbin/vidcontrol/vidcontrol.c
Directory Properties:
  user/ed/newcons/   (props changed)

Modified: user/ed/newcons/UPDATING
==============================================================================
--- user/ed/newcons/UPDATING	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/UPDATING	Fri Nov 13 13:08:34 2009	(r199254)
@@ -22,6 +22,21 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20091113:
+	The default terminal emulation for syscons(4) has been changed
+	from cons25 to xterm on all platforms except pc98.  This means
+	that the /etc/ttys file needs to be updated to ensure correct
+	operation of applications on the console.
+
+	The terminal emulation style can be toggled per window by using
+	vidcontrol(1)'s -T flag.  The TEKEN_CONS25 kernel configuration
+	options can be used to change the compile-time default back to
+	cons25.
+
+	To prevent graphical artifacts, make sure the TERM environment
+	variable is set to match the terminal emulation that is being
+	performed by syscons(4).
+
 20091109:
 	The layout of the structure ieee80211req_scan_result has changed.
 	Applications that require wireless scan results (e.g. ifconfig(8))

Modified: user/ed/newcons/bin/sh/trap.c
==============================================================================
--- user/ed/newcons/bin/sh/trap.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/bin/sh/trap.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -244,7 +244,8 @@ void
 setsignal(int signo)
 {
 	int action;
-	sig_t sig, sigact = SIG_DFL;
+	sig_t sigact = SIG_DFL;
+	struct sigaction sa;
 	char *t;
 
 	if ((t = trap[signo]) == NULL)
@@ -320,9 +321,10 @@ setsignal(int signo)
 		case S_IGN:	sigact = SIG_IGN;	break;
 	}
 	*t = action;
-	sig = signal(signo, sigact);
-	if (sig != SIG_ERR && action == S_CATCH)
-		siginterrupt(signo, 1);
+	sa.sa_handler = sigact;
+	sa.sa_flags = 0;
+	sigemptyset(&sa.sa_mask);
+	sigaction(signo, &sa, NULL);
 }
 
 

Modified: user/ed/newcons/etc/Makefile
==============================================================================
--- user/ed/newcons/etc/Makefile	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/etc/Makefile	Fri Nov 13 13:08:34 2009	(r199254)
@@ -18,8 +18,13 @@ BIN1=	auth.conf \
 	rc rc.bsdextended rc.firewall rc.firewall6 rc.initdiskless \
 	rc.sendmail rc.shutdown \
 	rc.subr remote rpc services shells \
-	sysctl.conf syslog.conf \
-	etc.${MACHINE_ARCH}/ttys
+	sysctl.conf syslog.conf
+
+.if exists(${.CURDIR}/etc.${MACHINE}/ttys)
+BIN1+=	etc.${MACHINE}/ttys
+.else
+BIN1+=	etc.${MACHINE_ARCH}/ttys
+.endif
 
 OPENBSMDIR=			${.CURDIR}/../contrib/openbsm
 BSM_ETC_OPEN_FILES=		${OPENBSMDIR}/etc/audit_class \

Modified: user/ed/newcons/etc/etc.ia64/ttys
==============================================================================
--- user/ed/newcons/etc/etc.ia64/ttys	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/etc/etc.ia64/ttys	Fri Nov 13 13:08:34 2009	(r199254)
@@ -31,7 +31,7 @@
 console	none				unknown	off secure
 #
 ttyv0	"/usr/libexec/getty Pc"		xterm	off secure
-# Virtual terminals.
+# Virtual terminals
 ttyv1	"/usr/libexec/getty Pc"		xterm	off secure
 ttyv2	"/usr/libexec/getty Pc"		xterm	off secure
 ttyv3	"/usr/libexec/getty Pc"		xterm	off secure

Modified: user/ed/newcons/etc/root/dot.profile
==============================================================================
--- user/ed/newcons/etc/root/dot.profile	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/etc/root/dot.profile	Fri Nov 13 13:08:34 2009	(r199254)
@@ -4,7 +4,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/
 export PATH
 HOME=/root
 export HOME
-TERM=${TERM:-cons25}
+TERM=${TERM:-xterm}
 export TERM
 PAGER=more
 export PAGER

Modified: user/ed/newcons/lib/libc/locale/isblank.3
==============================================================================
--- user/ed/newcons/lib/libc/locale/isblank.3	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/lib/libc/locale/isblank.3	Fri Nov 13 13:08:34 2009	(r199254)
@@ -50,9 +50,9 @@ For any locale, this includes the follow
 .It "\&``\et''\t`` ''"
 .El
 .Pp
-In the "C" locale
+In the "C" locale, a successful
 .Fn isblank
-successful test is limited to this characters only.
+test is limited to these characters only.
 The value of the argument must be representable as an
 .Vt "unsigned char"
 or the value of

Modified: user/ed/newcons/lib/libc/locale/isgraph.3
==============================================================================
--- user/ed/newcons/lib/libc/locale/isgraph.3	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/lib/libc/locale/isgraph.3	Fri Nov 13 13:08:34 2009	(r199254)
@@ -50,7 +50,7 @@ The
 function tests for any printing character except space
 .Pq Ql "\ "
 and other
-locale specific space-like characters.
+locale-specific space-like characters.
 The value of the argument must be representable as an
 .Vt "unsigned char"
 or the value of

Modified: user/ed/newcons/lib/libc/locale/isprint.3
==============================================================================
--- user/ed/newcons/lib/libc/locale/isprint.3	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/lib/libc/locale/isprint.3	Fri Nov 13 13:08:34 2009	(r199254)
@@ -47,7 +47,7 @@
 .Sh DESCRIPTION
 The
 .Fn isprint
-function tests for any printing character including space
+function tests for any printing character, including space
 .Pq Ql "\ " .
 The value of the argument must be representable as an
 .Vt "unsigned char"

Modified: user/ed/newcons/lib/libc/net/getnameinfo.c
==============================================================================
--- user/ed/newcons/lib/libc/net/getnameinfo.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/lib/libc/net/getnameinfo.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
 #include <net/if.h>
 #include <net/if_dl.h>
 #include <net/if_types.h>
+#include <net/firewire.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <arpa/nameser.h>
@@ -385,6 +386,7 @@ getnameinfo_link(const struct sockaddr *
 {
 	const struct sockaddr_dl *sdl =
 	    (const struct sockaddr_dl *)(const void *)sa;
+	const struct fw_hwaddr *iha;
 	int n;
 
 	if (serv != NULL && servlen > 0)
@@ -400,6 +402,15 @@ getnameinfo_link(const struct sockaddr *
 	}
 
 	switch (sdl->sdl_type) {
+	case IFT_IEEE1394:
+		if (sdl->sdl_alen < sizeof(iha->sender_unique_ID_hi) +
+		    sizeof(iha->sender_unique_ID_lo))
+			return EAI_FAMILY;
+		iha = (const struct fw_hwaddr *)(const void *)LLADDR(sdl);
+		return hexname((const u_int8_t *)&iha->sender_unique_ID_hi,
+		    sizeof(iha->sender_unique_ID_hi) +
+		    sizeof(iha->sender_unique_ID_lo),
+		    host, hostlen);
 	/*
 	 * The following have zero-length addresses.
 	 * IFT_ATM	(net/if_atmsubr.c)

Modified: user/ed/newcons/lib/libc/net/ip6opt.c
==============================================================================
--- user/ed/newcons/lib/libc/net/ip6opt.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/lib/libc/net/ip6opt.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -55,8 +55,7 @@ static void inet6_insert_padopt(u_char *
  * byte, the length byte, and the option data.
  */
 int
-inet6_option_space(nbytes)
-	int nbytes;
+inet6_option_space(int nbytes)
 {
 	nbytes += 2;	/* we need space for nxt-hdr and length fields */
 	return(CMSG_SPACE((nbytes + 7) & ~7));
@@ -68,10 +67,7 @@ inet6_option_space(nbytes)
  * success or -1 on an error.
  */
 int
-inet6_option_init(bp, cmsgp, type)
-	void *bp;
-	struct cmsghdr **cmsgp;
-	int type;
+inet6_option_init(void *bp, struct cmsghdr **cmsgp, int type)
 {
 	struct cmsghdr *ch = (struct cmsghdr *)bp;
 
@@ -98,11 +94,8 @@ inet6_option_init(bp, cmsgp, type)
  * earlier.  It must have a value between 0 and 7, inclusive.
  */
 int
-inet6_option_append(cmsg, typep, multx, plusy)
-	struct cmsghdr *cmsg;
-	const u_int8_t *typep;
-	int multx;
-	int plusy;
+inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx,
+    int plusy)
 {
 	int padlen, optlen, off;
 	u_char *bp = (u_char *)cmsg + cmsg->cmsg_len;
@@ -171,11 +164,7 @@ inet6_option_append(cmsg, typep, multx, 
  * 
  */
 u_int8_t *
-inet6_option_alloc(cmsg, datalen, multx, plusy)
-	struct cmsghdr *cmsg;
-	int datalen;
-	int multx;
-	int plusy;
+inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy)
 {
 	int padlen, off;
 	u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len;
@@ -238,9 +227,7 @@ inet6_option_alloc(cmsg, datalen, multx,
  * (RFC 2292, 6.3.5)
  */
 int
-inet6_option_next(cmsg, tptrp)
-	const struct cmsghdr *cmsg;
-	u_int8_t **tptrp;
+inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp)
 {
 	struct ip6_ext *ip6e;
 	int hdrlen, optlen;
@@ -296,10 +283,7 @@ inet6_option_next(cmsg, tptrp)
  *       it's a typo. The variable should be type of u_int8_t **.
  */
 int
-inet6_option_find(cmsg, tptrp, type)
-	const struct cmsghdr *cmsg;
-	u_int8_t **tptrp;
-	int type;
+inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type)
 {
 	struct ip6_ext *ip6e;
 	int hdrlen, optlen;
@@ -352,8 +336,7 @@ inet6_option_find(cmsg, tptrp, type)
  * calculated length and the limitation of the buffer.
  */
 static int
-ip6optlen(opt, lim)
-	u_int8_t *opt, *lim;
+ip6optlen(u_int8_t *opt, u_int8_t *lim)
 {
 	int optlen;
 

Modified: user/ed/newcons/lib/libc/nls/nl_NL.ISO8859-1.msg
==============================================================================
--- user/ed/newcons/lib/libc/nls/nl_NL.ISO8859-1.msg	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/lib/libc/nls/nl_NL.ISO8859-1.msg	Fri Nov 13 13:08:34 2009	(r199254)
@@ -26,7 +26,7 @@ $ EBADF
 $ ECHILD
 10 Geen kindprocessen
 $ EDEADLK
-11 Een deadlock is vermeden
+11 Een deadlock op een bron is vermeden
 $ ENOMEM
 12 Kan geen geheugen meer verkrijgen
 $ EACCES
@@ -40,13 +40,13 @@ $ EBUSY
 $ EEXIST
 17 Bestand bestaat reeds
 $ EXDEV
-18 Verwijzing tussen bestanden op verschillende bestandssystemen
+18 Verwijzing tussen verschillende apparaten
 $ ENODEV
 19 Bewerking wordt niet ondersteund door dit apparaat
 $ ENOTDIR
 20 Dit is geen map
 $ EISDIR
-21 Dit is een map 
+21 Dit is een map
 $ EINVAL
 22 Ongeldig argument
 $ ENFILE
@@ -62,7 +62,7 @@ $ EFBIG
 $ ENOSPC
 28 Geen ruimte meer op dit apparaat
 $ ESPIPE
-29 Onuitvoerbare zoekopdracht
+29 Ongeldige zoekopdracht
 $ EROFS
 30 Van dit bestandssysteem kan alleen worden gelezen
 $ EMLINK
@@ -84,7 +84,7 @@ $ ENOTSOCK
 $ EDESTADDRREQ
 39 Een bestemmingsadres is vereist
 $ EMSGSIZE
-40 Te grote bericht
+40 Te groot bericht
 $ EPROTOTYPE
 41 Protocol past niet bij dit contactpunt
 $ ENOPROTOOPT
@@ -116,7 +116,7 @@ $ ECONNRESET
 $ ENOBUFS
 55 Geen bufferruimte meer beschikbaar
 $ EISCONN
-56 Dit contactpunt is al verbonden
+56 Contactpunt is al verbonden
 $ ENOTCONN
 57 Contactpunt is niet verbonden
 $ ESHUTDOWN
@@ -136,9 +136,9 @@ $ EHOSTDOWN
 $ EHOSTUNREACH
 65 Bestemming niet bereikbaar
 $ ENOTEMPTY
-66 Directory is niet leeg
+66 Map is niet leeg
 $ EPROCLIM
-67 Te veel taken
+67 Te veel processen
 $ EUSERS
 68 Te veel gebruikers
 $ EDQUOT
@@ -160,7 +160,7 @@ $ EPROCUNAVAIL
 $ ENOLCK
 77 Geen sloten beschikbaar
 $ ENOSYS
-78 Deze systeemfunctie is niet geimplementeerd
+78 Systeemfunctie is niet geimplementeerd
 $ EFTYPE
 79 Bestandsformaat niet van toepassing
 $ EAUTH
@@ -173,30 +173,24 @@ $ ENOMSG
 83 Geen bericht van het gewenste type
 $ EOVERFLOW
 84 Waarde te groot om te bewaren in gegevenstype
-$ EILSEQ
-85 Ongeldige bytereeks
-$ ENOTSUP
-86 Niet ondersteund
 $ ECANCELED
-87 Bewerking geannuleerd
-$ EBADMSG
-88 Verkeerd of defect bericht
-$ ENODATA
-89 Geen bericht beschikbaar
-$ ENOSR
-90 Geen STREAM-voorraad
-$ ENOSTR
-91 Dit is geen STREAM
-$ ETIME
-92 STREAM-ioctl verlopen
+85 Bewerking geannuleerd
+$ EILSEQ
+86 Ongeldige bytereeks
 $ ENOATTR
-93 Attribuut niet gevonden
+87 Attribuut niet gevonden
+$ EDOOFUS
+88 Programmeerfout
+$ EBADMSG
+89 Verkeerd of defect bericht
 $ EMULTIHOP
-94 Multihopverzoek
+90 Multihopverzoek
 $ ENOLINK
-95 Verbinding werd verstoord
+91 Verbinding werd verstoord
 $ EPROTO
-96 Protocolfout
+92 Protocolfout
+$ ENOTCAPABLE
+93 Onvoldoende mogelijkheden
 $
 $ strsignal() support catalog
 $
@@ -263,5 +257,38 @@ $ SIGUSR1
 30 Gebruikersignaal 1
 $ SIGUSR2
 31 Gebruikersignaal 2
-$ SIGPWR
-32 Stroomuitval/stroominschakeling
+$
+$ gai_strerror() support catalog
+$set 3
+$ 1 (obsolete)
+1 Adresfamilie voor hostnaam niet ondersteund
+$ EAI_AGAIN
+2 Tijdelijke fout in naamresolutie
+$ EAI_BADFLAGS
+3 Ongeldige waarde voor ai_flags
+$ EAI_FAIL
+4 Onherstelbare fout in naamresolutie
+$ EAI_FAMILY
+5 ai_familie niet ondersteund
+$ EAI_MEMORY
+6 Geheugenallocatiefout
+$ 7 (obsolete)
+7 Geen adres met hostnaam geassocieerd
+$ EAI_NONAME
+8 hostname noch servname gegeven, of onbekend
+$ EAI_SERVICE
+9 servname niet ondersteund voor ai_socktype
+$ EAI_SOCKTYPE
+10 ai_socktype niet ondersteund
+$ EAI_SYSTEM
+11 Systeemfout geretourneerd in errno
+$ EAI_BADHINTS
+12 Ongeldige waarde voor hints
+$ EAI_PROTOCOL
+13 Opgelost protocol is onbekend
+$ EAI_OVERFLOW
+14 Argumentbuffer overstroomd
+$ 0
+32766 Succes
+$ NL_MSGMAX
+32767 Onbekende fout

Modified: user/ed/newcons/lib/libpam/modules/pam_unix/pam_unix.8
==============================================================================
--- user/ed/newcons/lib/libpam/modules/pam_unix/pam_unix.8	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/lib/libpam/modules/pam_unix/pam_unix.8	Fri Nov 13 13:08:34 2009	(r199254)
@@ -105,6 +105,17 @@ sufficient.
 If the password database has no password for the entity being
 authenticated, then this option will forgo password prompting, and
 silently allow authentication to succeed.
+.Pp
+.Sy NOTE:
+If
+.Nm
+is invoked by a process that does not have the privileges required to
+access the password database (in most cases, this means root
+privileges), the
+.Cm nullok
+option may cause
+.Nm
+to allow any user to log in with any password.
 .It Cm local_pass
 Use only the local password database, even if NIS is in use.
 This will cause an authentication failure if the system is configured

Modified: user/ed/newcons/release/picobsd/floppy.tree/etc/ttys
==============================================================================
--- user/ed/newcons/release/picobsd/floppy.tree/etc/ttys	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/release/picobsd/floppy.tree/etc/ttys	Fri Nov 13 13:08:34 2009	(r199254)
@@ -8,19 +8,19 @@
 # This entry needed for asking password when init goes to single-user mode
 # If you want to be asked for password, change "secure" to "insecure" here
 #console	none				unknown	off secure
-vga	none				cons25	off secure
+vga	none				xterm	off secure
 #
-ttyv0	"/usr/libexec/getty Pc"		cons25	on  secure
+ttyv0	"/usr/libexec/getty Pc"		xterm	on  secure
 # Virtual terminals
-ttyv1	"/usr/libexec/getty Pc"		cons25	on  secure
-ttyv2	"/usr/libexec/getty Pc"		cons25	on  secure
-ttyv3	"/usr/libexec/getty Pc"		cons25	on  secure
-ttyv4	"/usr/libexec/getty Pc"		cons25	on  secure
-ttyv5	"/usr/libexec/getty Pc"		cons25	on  secure
-ttyv6	"/usr/libexec/getty Pc"		cons25	on  secure
-ttyv7	"/usr/libexec/getty Pc"		cons25	on  secure
-#ttyv8	"/usr/libexec/getty Pc"		cons25	on  secure
-#ttyv9	"/usr/libexec/getty Pc"		cons25	on  secure
+ttyv1	"/usr/libexec/getty Pc"		xterm	on  secure
+ttyv2	"/usr/libexec/getty Pc"		xterm	on  secure
+ttyv3	"/usr/libexec/getty Pc"		xterm	on  secure
+ttyv4	"/usr/libexec/getty Pc"		xterm	on  secure
+ttyv5	"/usr/libexec/getty Pc"		xterm	on  secure
+ttyv6	"/usr/libexec/getty Pc"		xterm	on  secure
+ttyv7	"/usr/libexec/getty Pc"		xterm	on  secure
+#ttyv8	"/usr/libexec/getty Pc"		xterm	on  secure
+#ttyv9	"/usr/libexec/getty Pc"		xterm	on  secure
 # Pseudo terminals
 ttyp0	none			network secure
 ttyp1	none			network secure

Modified: user/ed/newcons/release/picobsd/tinyware/oinit/oinit.c
==============================================================================
--- user/ed/newcons/release/picobsd/tinyware/oinit/oinit.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/release/picobsd/tinyware/oinit/oinit.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -116,7 +116,7 @@ struct command bltins[]={
 	{"cd","Change working directory","cd [dir]","cd /etc",cd},
 	{"pwd","Print current directory","pwd","pwd",pwd},
 	{"exit","Exit from shell()","exit","exit",xit},
-	{"set","Set environment variable","set [VAR=value]","set TERM=cons25",set},
+	{"set","Set environment variable","set [VAR=value]","set TERM=xterm",set},
 	{"unset","Unset environment variable","unset VAR","unset EDITOR",unset},
 	{"echo","Echo arguments on stdout","echo arg1 arg2 ...","echo Hello World!",echo},
 	{"env","Print all environment variables","env","env",env},
@@ -572,7 +572,7 @@ start_session(int vty, int argc, char **
 	if(fd>2) close(fd);
 	login_tty(fd);
 	setpgid(0,getpid());
-	putenv("TERM=cons25");
+	putenv("TERM=xterm");
 	putenv("HOME=/");
 	putenv("PATH=/stand:/bin:/usr/bin:/sbin:.");
 	signal(SIGHUP,SIG_DFL);

Modified: user/ed/newcons/sbin/mount/mount.8
==============================================================================
--- user/ed/newcons/sbin/mount/mount.8	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sbin/mount/mount.8	Fri Nov 13 13:08:34 2009	(r199254)
@@ -527,7 +527,9 @@ support for a particular file system mig
 .Xr mount_smbfs 8 ,
 .Xr mount_udf 8 ,
 .Xr mount_unionfs 8 ,
-.Xr umount 8
+.Xr umount 8 ,
+.Xr zfs 8 ,
+.Xr zpool 8
 .Sh CAVEATS
 After a successful
 .Nm ,

Modified: user/ed/newcons/share/man/man4/snd_hda.4
==============================================================================
--- user/ed/newcons/share/man/man4/snd_hda.4	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/share/man/man4/snd_hda.4	Fri Nov 13 13:08:34 2009	(r199254)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 7, 2009
+.Dd November 13, 2009
 .Dt SND_HDA 4
 .Os
 .Sh NAME
@@ -59,7 +59,7 @@ driver that allows the generic audio dri
 to be used with this hardware.
 Only audio functions are supported by
 .Nm .
-Modem, HDMI and other possible functions are not implemented.
+Modem and other possible functions are not implemented.
 .Pp
 The
 .Nm
@@ -500,6 +500,14 @@ nVidia MCP68
 .It
 nVidia MCP69
 .It
+nVidia MCP73
+.It
+nVidia MCP78
+.It
+nVidia MCP79
+.It
+nVidia MCP89
+.It
 SiS 966
 .It
 VIA VT8251/8237A
@@ -626,5 +634,11 @@ trying to fix problem that way, make sur
 and the PCM audio device you are using really corresponds to expected
 audio connector.
 .Pp
+Some vendors use non-standardized General Purpose I/O (GPIO) pins of codec
+to control external amplifiers. In some cases setting proper combination of
+GPIO bits may be needed to make sound work on specific device.
+.Pp
+HDMI and DisplayPort audio may also require support from video driver.
+.Pp
 Due to OSS limitation multichannel (not multidevice) playback is not
 supported.

Modified: user/ed/newcons/share/misc/organization.dot
==============================================================================
--- user/ed/newcons/share/misc/organization.dot	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/share/misc/organization.dot	Fri Nov 13 13:08:34 2009	(r199254)
@@ -28,7 +28,7 @@ _misc [label="Miscellaneous Hats"]
 core [label="Core Team\ncore at FreeBSD.org\nwilko, brooks, keramida, imp,\ngnn, wes, hrs, murray,\nrwatson"]
 coresecretary [label="Core Team Secretary\ncore-secretary at FreeBSD.org\njoel"]
 doccommitters [label="Doc/www Committers\ndoc-committers at FreeBSD.org"]
-doceng [label="Documentation Engineering Team\ndoceng at FreeBSD.org\nnik, blackend, hrs,\nmurray"]
+doceng [label="Documentation Engineering Team\ndoceng at FreeBSD.org\nnik, blackend, hrs,\nkeramida"]
 portscommitters [label="Ports Committers\nports-committers at FreeBSD.org"]
 portmgr [label="Port Management Team\nportmgr at FreeBSD.org\nmarcus, kris, erwin,\nlinimon, pav, krion"]
 portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary at FreeBSD.org\nerwin"]

Modified: user/ed/newcons/share/skel/dot.profile
==============================================================================
--- user/ed/newcons/share/skel/dot.profile	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/share/skel/dot.profile	Fri Nov 13 13:08:34 2009	(r199254)
@@ -11,8 +11,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/
 # Setting TERM is normally done through /etc/ttys.  Do only override
 # if you're sure that you'll never log in via telnet or xterm or a
 # serial line.
-# Use cons25l1 for iso-* fonts
-# TERM=cons25; 	export TERM
+# TERM=xterm; 	export TERM
 
 BLOCKSIZE=K;	export BLOCKSIZE
 EDITOR=vi;   	export EDITOR

Modified: user/ed/newcons/share/timedef/ja_JP.SJIS.src
==============================================================================
--- user/ed/newcons/share/timedef/ja_JP.SJIS.src	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/share/timedef/ja_JP.SJIS.src	Fri Nov 13 13:08:34 2009	(r199254)
@@ -5,18 +5,18 @@
 #
 # Short month names
 #
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
+ 1ŒŽ
+ 2ŒŽ
+ 3ŒŽ
+ 4ŒŽ
+ 5ŒŽ
+ 6ŒŽ
+ 7ŒŽ
+ 8ŒŽ
+ 9ŒŽ
+10ŒŽ
+11ŒŽ
+12ŒŽ
 #
 # Long month names (as in a date)
 #

Modified: user/ed/newcons/share/timedef/ja_JP.UTF-8.src
==============================================================================
--- user/ed/newcons/share/timedef/ja_JP.UTF-8.src	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/share/timedef/ja_JP.UTF-8.src	Fri Nov 13 13:08:34 2009	(r199254)
@@ -4,18 +4,18 @@
 # WARNING: empty lines are essential too
 #
 # Short month names
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
+ 1月
+ 2月
+ 3月
+ 4月
+ 5月
+ 6月
+ 7月
+ 8月
+ 9月
+10月
+11月
+12月
 #
 # Long month names (as in a date)
 #

Modified: user/ed/newcons/share/timedef/ja_JP.eucJP.src
==============================================================================
--- user/ed/newcons/share/timedef/ja_JP.eucJP.src	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/share/timedef/ja_JP.eucJP.src	Fri Nov 13 13:08:34 2009	(r199254)
@@ -4,18 +4,18 @@
 # WARNING: empty lines are essential too
 #
 # Short month names
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
+ 1·î
+ 2·î
+ 3·î
+ 4·î
+ 5·î
+ 6·î
+ 7·î
+ 8·î
+ 9·î
+10·î
+11·î
+12·î
 #
 # Long month names (as in a date)
 #

Modified: user/ed/newcons/sys/amd64/amd64/initcpu.c
==============================================================================
--- user/ed/newcons/sys/amd64/amd64/initcpu.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/amd64/amd64/initcpu.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -47,6 +47,12 @@ __FBSDID("$FreeBSD$");
 static int	hw_instruction_sse;
 SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD,
     &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU");
+/*
+ * -1: automatic (default)
+ *  0: keep enable CLFLUSH
+ *  1: force disable CLFLUSH
+ */
+static int	hw_clflush_disable = -1;
 
 int	cpu;			/* Are we 386, 386sx, 486, etc? */
 u_int	cpu_feature;		/* Feature flags */
@@ -169,6 +175,15 @@ initializecpu(void)
 	 * XXXKIB: (temporary) hack to work around traps generated when
 	 * CLFLUSHing APIC registers window.
 	 */
-	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS))
+	TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
+	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) &&
+	    hw_clflush_disable == -1)
+		cpu_feature &= ~CPUID_CLFSH;
+	/*
+	 * Allow to disable CLFLUSH feature manually by
+	 * hw.clflush_disable tunable.  This may help Xen guest on some AMD
+	 * CPUs.
+	 */
+	if (hw_clflush_disable == 1)
 		cpu_feature &= ~CPUID_CLFSH;
 }

Modified: user/ed/newcons/sys/amd64/amd64/pmap.c
==============================================================================
--- user/ed/newcons/sys/amd64/amd64/pmap.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/amd64/amd64/pmap.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -183,7 +183,7 @@ static int pat_works = 0;		/* Is page at
 SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters");
 
 static int pg_ps_enabled = 1;
-SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RD, &pg_ps_enabled, 0,
+SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0,
     "Are large page mappings enabled?");
 
 static u_int64_t	KPTphys;	/* phys addr of kernel level 1 */

Modified: user/ed/newcons/sys/boot/common/Makefile.inc
==============================================================================
--- user/ed/newcons/sys/boot/common/Makefile.inc	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/boot/common/Makefile.inc	Fri Nov 13 13:08:34 2009	(r199254)
@@ -38,4 +38,8 @@ MAN+=	../forth/loader.conf.5
 MAN+=	../forth/loader.4th.8
 .endif
 
+.if defined(BOOT_PROMPT_123)
+CFLAGS+=	-DBOOT_PROMPT_123
+.endif
+
 MAN+=	loader.8

Modified: user/ed/newcons/sys/boot/common/boot.c
==============================================================================
--- user/ed/newcons/sys/boot/common/boot.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/boot/common/boot.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -162,6 +162,9 @@ autoboot(int timeout, char *prompt)
     int		c, yes;
     char	*argv[2], *cp, *ep;
     char	*kernelname;
+#ifdef BOOT_PROMPT_123
+    const char	*seq = "123", *p = seq;
+#endif
 
     autoboot_tried = 1;
 
@@ -192,14 +195,29 @@ autoboot(int timeout, char *prompt)
 
         yes = 0;
 
+#ifdef BOOT_PROMPT_123
+        printf("%s\n", (prompt == NULL) ? "Hit [Enter] to boot immediately, or "
+	    "1 2 3 sequence for command prompt." : prompt);
+#else
         printf("%s\n", (prompt == NULL) ? "Hit [Enter] to boot immediately, or any other key for command prompt." : prompt);
+#endif
 
         for (;;) {
 	    if (ischar()) {
 	        c = getchar();
+#ifdef BOOT_PROMPT_123
+		if ((c == '\r') || (c == '\n')) {
+			yes = 1;
+			break;
+		} else if (c != *p++)
+			p = seq;
+		if (*p == 0)
+			break;
+#else
 	        if ((c == '\r') || (c == '\n'))
 		    yes = 1;
 	        break;
+#endif
 	    }
 	    ntime = time(NULL);
 	    if (ntime >= when) {

Modified: user/ed/newcons/sys/boot/uboot/lib/glue.c
==============================================================================
--- user/ed/newcons/sys/boot/uboot/lib/glue.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/boot/uboot/lib/glue.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -467,7 +467,7 @@ ub_stor_type(int type)
 	if (type & DT_STOR_USB)
 		return ("USB");
 
-	if (type & DT_STOR_MMC);
+	if (type & DT_STOR_MMC)
 		return ("MMC");
 
 	return ("Unknown");
@@ -581,11 +581,6 @@ ub_env_enum(const char *last)
 	if (!env)
 		/* no more env. variables to enumerate */
 		return (NULL);
-#if 0
-	if (last && strncmp(env, last, strlen(last)) == 0);
-		/* error, trying to enumerate non existing env. variable */
-		return NULL;
-#endif
 
 	/* next enumerated env var */
 	memset(env_name, 0, 256);

Modified: user/ed/newcons/sys/cam/ata/ata_all.c
==============================================================================
--- user/ed/newcons/sys/cam/ata/ata_all.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/cam/ata/ata_all.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -509,3 +509,38 @@ ata_max_mode(struct ata_params *ap, int 
     return (mode);
 }
 
+int
+ata_identify_match(caddr_t identbuffer, caddr_t table_entry)
+{
+	struct scsi_inquiry_pattern *entry;
+	struct ata_params *ident;
+ 
+	entry = (struct scsi_inquiry_pattern *)table_entry;
+	ident = (struct ata_params *)identbuffer;
+
+	if ((cam_strmatch(ident->model, entry->product,
+			  sizeof(ident->model)) == 0)
+	 && (cam_strmatch(ident->revision, entry->revision,
+			  sizeof(ident->revision)) == 0)) {
+		return (0);
+	}
+        return (-1);
+}
+
+int
+ata_static_identify_match(caddr_t identbuffer, caddr_t table_entry)
+{
+	struct scsi_static_inquiry_pattern *entry;
+	struct ata_params *ident;
+ 
+	entry = (struct scsi_static_inquiry_pattern *)table_entry;
+	ident = (struct ata_params *)identbuffer;
+
+	if ((cam_strmatch(ident->model, entry->product,
+			  sizeof(ident->model)) == 0)
+	 && (cam_strmatch(ident->revision, entry->revision,
+			  sizeof(ident->revision)) == 0)) {
+		return (0);
+	}
+        return (-1);
+}

Modified: user/ed/newcons/sys/cam/ata/ata_all.h
==============================================================================
--- user/ed/newcons/sys/cam/ata/ata_all.h	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/cam/ata/ata_all.h	Fri Nov 13 13:08:34 2009	(r199254)
@@ -114,4 +114,7 @@ int	ata_max_wmode(struct ata_params *ap)
 int	ata_max_umode(struct ata_params *ap);
 int	ata_max_mode(struct ata_params *ap, int mode, int maxmode);
 
+int	ata_identify_match(caddr_t identbuffer, caddr_t table_entry);
+int	ata_static_identify_match(caddr_t identbuffer, caddr_t table_entry);
+
 #endif

Modified: user/ed/newcons/sys/cam/ata/ata_da.c
==============================================================================
--- user/ed/newcons/sys/cam/ata/ata_da.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/cam/ata/ata_da.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -122,9 +122,17 @@ struct ada_quirk_entry {
 	ada_quirks quirks;
 };
 
-//static struct ada_quirk_entry ada_quirk_table[] =
-//{
-//};
+static struct ada_quirk_entry ada_quirk_table[] =
+{
+	{
+		/* Default */
+		{
+		  T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED,
+		  /*vendor*/"*", /*product*/"*", /*revision*/"*"
+		},
+		/*quirks*/0
+	},
+};
 
 static	disk_strategy_t	adastrategy;
 static	dumper_t	adadump;
@@ -618,7 +626,7 @@ adaregister(struct cam_periph *periph, v
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_FLUSHCACHE)
 		softc->flags |= ADA_FLAG_CAN_FLUSHCACHE;
 	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
-	    cgd->ident_data.queue >= 31)
+	    cgd->inq_flags & SID_CmdQue)
 		softc->flags |= ADA_FLAG_CAN_NCQ;
 	softc->state = ADA_STATE_NORMAL;
 
@@ -627,12 +635,10 @@ adaregister(struct cam_periph *periph, v
 	/*
 	 * See if this device has any quirks.
 	 */
-//	match = cam_quirkmatch((caddr_t)&cgd->inq_data,
-//			       (caddr_t)ada_quirk_table,
-//			       sizeof(ada_quirk_table)/sizeof(*ada_quirk_table),
-//			       sizeof(*ada_quirk_table), scsi_inquiry_match);
-	match = NULL;
-
+	match = cam_quirkmatch((caddr_t)&cgd->ident_data,
+			       (caddr_t)ada_quirk_table,
+			       sizeof(ada_quirk_table)/sizeof(*ada_quirk_table),
+			       sizeof(*ada_quirk_table), ata_identify_match);
 	if (match != NULL)
 		softc->quirks = ((struct ada_quirk_entry *)match)->quirks;
 	else
@@ -700,11 +706,6 @@ adaregister(struct cam_periph *periph, v
 		dp->secsize, dp->heads,
 		dp->secs_per_track, dp->cylinders);
 	xpt_announce_periph(periph, announce_buf);
-	if (softc->flags & ADA_FLAG_CAN_NCQ) {
-		printf("%s%d: Native Command Queueing enabled\n",
-		       periph->periph_name, periph->unit_number);
-	}
-
 	/*
 	 * Add async callbacks for bus reset and
 	 * bus device reset calls.  I don't bother

Modified: user/ed/newcons/sys/cam/ata/ata_xpt.c
==============================================================================
--- user/ed/newcons/sys/cam/ata/ata_xpt.c	Fri Nov 13 13:07:01 2009	(r199253)
+++ user/ed/newcons/sys/cam/ata/ata_xpt.c	Fri Nov 13 13:08:34 2009	(r199254)
@@ -66,17 +66,12 @@ __FBSDID("$FreeBSD$");
 #include <machine/stdarg.h>	/* for xpt_print below */
 #include "opt_cam.h"
 
-struct scsi_quirk_entry {
+struct ata_quirk_entry {
 	struct scsi_inquiry_pattern inq_pat;
 	u_int8_t quirks;
-#define	CAM_QUIRK_NOLUNS	0x01
-#define	CAM_QUIRK_NOSERIAL	0x02
-#define	CAM_QUIRK_HILUNS	0x04
-#define	CAM_QUIRK_NOHILUNS	0x08
-	u_int mintags;
+#define	CAM_QUIRK_MAXTAGS	0x01
 	u_int maxtags;
 };
-#define SCSI_QUIRK(dev)	((struct scsi_quirk_entry *)((dev)->quirk))
 
 static periph_init_t probe_periph_init;
 
@@ -138,7 +133,7 @@ typedef struct {
 	struct cam_periph *periph;
 } probe_softc;
 
-static struct scsi_quirk_entry scsi_quirk_table[] =
+static struct ata_quirk_entry ata_quirk_table[] =
 {
 	{
 		/* Default tagged queuing parameters for all devices */
@@ -146,12 +141,12 @@ static struct scsi_quirk_entry scsi_quir
 		  T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED,
 		  /*vendor*/"*", /*product*/"*", /*revision*/"*"
 		},
-		/*quirks*/0, /*mintags*/2, /*maxtags*/32
+		/*quirks*/0, /*maxtags*/0
 	},
 };
 
-static const int scsi_quirk_table_size =
-	sizeof(scsi_quirk_table) / sizeof(*scsi_quirk_table);
+static const int ata_quirk_table_size =
+	sizeof(ata_quirk_table) / sizeof(*ata_quirk_table);
 
 static cam_status	proberegister(struct cam_periph *periph,
 				      void *arg);
@@ -162,7 +157,7 @@ static void	 probestart(struct cam_perip
 //				     struct cam_ed *device);
 static void	 probedone(struct cam_periph *periph, union ccb *done_ccb);
 static void	 probecleanup(struct cam_periph *periph);
-static void	 scsi_find_quirk(struct cam_ed *device);
+static void	 ata_find_quirk(struct cam_ed *device);
 static void	 ata_scan_bus(struct cam_periph *periph, union ccb *ccb);
 static void	 ata_scan_lun(struct cam_periph *periph,
 			       struct cam_path *path, cam_flags flags,
@@ -172,10 +167,9 @@ static struct cam_ed *
 		 ata_alloc_device(struct cam_eb *bus, struct cam_et *target,
 				   lun_id_t lun_id);
 static void	 ata_device_transport(struct cam_path *path);
-static void	 scsi_set_transfer_settings(struct ccb_trans_settings *cts,
+static void	 ata_set_transfer_settings(struct ccb_trans_settings *cts,
 					    struct cam_ed *device,
 					    int async_update);
-static void	 scsi_toggle_tags(struct cam_path *path);
 static void	 ata_dev_async(u_int32_t async_code,
 				struct cam_eb *bus,
 				struct cam_et *target,
@@ -717,6 +711,17 @@ noerror:
 
 			path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
 		}
+		if (ident_buf->satacapabilities & ATA_SUPPORT_NCQ) {
+			path->device->mintags = path->device->maxtags =
+			    ATA_QUEUE_LEN(ident_buf->queue) + 1;
+		}
+		ata_find_quirk(path->device);
+		/* XXX: If not all tags allowed, we must to tell SIM which are. */
+		if (path->device->mintags < path->bus->sim->max_tagged_dev_openings)
+			path->device->mintags = path->device->maxtags = 0;
+		if (path->device->mintags != 0) {
+			xpt_start_tags(path);
+		}
 		ata_device_transport(path);
 		PROBE_SET_ACTION(softc, PROBE_SETMODE);
 		xpt_release_ccb(done_ccb);
@@ -776,7 +781,6 @@ noerror:
 			return;
 		}
 
-		scsi_find_quirk(path->device);
 		ata_device_transport(path);
 		if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
 			path->device->flags &= ~CAM_DEV_UNCONFIGURED;
@@ -853,24 +857,23 @@ probecleanup(struct cam_periph *periph)
 }
 
 static void
-scsi_find_quirk(struct cam_ed *device)
+ata_find_quirk(struct cam_ed *device)
 {
-	struct scsi_quirk_entry *quirk;
+	struct ata_quirk_entry *quirk;
 	caddr_t	match;
 
-	match = cam_quirkmatch((caddr_t)&device->inq_data,
-			       (caddr_t)scsi_quirk_table,
-			       sizeof(scsi_quirk_table) /
-			       sizeof(*scsi_quirk_table),
-			       sizeof(*scsi_quirk_table), scsi_inquiry_match);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list