Date: Tue, 16 Sep 2003 20:22:59 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 38169 for review Message-ID: <200309170322.h8H3MxQM004928@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38169 Change 38169 by marcel@marcel_nfs on 2003/09/16 20:22:52 IFC @38168 Affected files ... .. //depot/projects/ia64/Makefile.inc1#84 integrate .. //depot/projects/ia64/crypto/openssh/buffer.c#4 integrate .. //depot/projects/ia64/crypto/openssh/channels.c#9 integrate .. //depot/projects/ia64/crypto/openssh/version.h#11 integrate .. //depot/projects/ia64/etc/rc.d/dhclient#9 integrate .. //depot/projects/ia64/etc/services#10 integrate .. //depot/projects/ia64/lib/libc/net/inet_net_pton.c#3 integrate .. //depot/projects/ia64/lib/libpthread/arch/amd64/amd64/context.S#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#35 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/errata/article.sgml#26 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#124 integrate .. //depot/projects/ia64/share/man/man4/ath.4#8 integrate .. //depot/projects/ia64/share/man/man4/ath_hal.4#5 integrate .. //depot/projects/ia64/sys/boot/i386/libi386/comconsole.c#3 integrate .. //depot/projects/ia64/sys/boot/pc98/libpc98/comconsole.c#3 integrate .. //depot/projects/ia64/sys/dev/aac/aac.c#31 integrate .. //depot/projects/ia64/sys/dev/ata/ata-lowlevel.c#8 integrate .. //depot/projects/ia64/sys/dev/ata/atapi-cd.c#30 integrate .. //depot/projects/ia64/sys/dev/ic/ns16550.h#3 integrate .. //depot/projects/ia64/sys/dev/sio/sioreg.h#9 integrate .. //depot/projects/ia64/sys/dev/sound/isa/mpu.c#4 integrate .. //depot/projects/ia64/sys/dev/sound/isa/uartsio.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus.h#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_core.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_i8251.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_ns8250.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_sab82532.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_z8530.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_if.m#2 integrate .. //depot/projects/ia64/sys/modules/uart/Makefile#5 integrate .. //depot/projects/ia64/sys/net/bridge.c#20 integrate .. //depot/projects/ia64/sys/netinet/ip_dummynet.c#22 integrate .. //depot/projects/ia64/sys/netinet/ip_fw2.c#26 integrate .. //depot/projects/ia64/sys/pci/agp_intel.c#14 integrate .. //depot/projects/ia64/sys/pci/if_dc.c#49 integrate .. //depot/projects/ia64/usr.sbin/Makefile#50 integrate Differences ... ==== //depot/projects/ia64/Makefile.inc1#84 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.391 2003/09/15 21:18:30 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.392 2003/09/16 12:53:18 ru Exp $ # # Make command line options: # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) @@ -51,6 +51,17 @@ SUBDIR+= lib .endif +# When upgrading to a dynamically linked root, install the runtime +# linker early into its new location before make(1) has a chance +# to run the dynamically linked /bin/sh. +.if defined(WITH_DYNAMICROOT) && !defined(NOPIC) && \ + (!defined(TARGET_ARCH) || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ + !defined(DISTDIR) && \ + (!defined(DESTDIR) || empty(DESTDIR) || ${DESTDIR} == "/") && \ + !exists(/libexec/ld-elf.so.1) +SUBDIR+= libexec/rtld-elf +.endif + .if exists(${.CURDIR}/bin) SUBDIR+= bin .endif ==== //depot/projects/ia64/crypto/openssh/buffer.c#4 (text+ko) ==== @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: buffer.c,v 1.16 2002/06/26 08:54:18 markus Exp $"); +RCSID("$OpenBSD: buffer.c,v 1.17 2003/09/16 03:03:47 deraadt Exp $"); #include "xmalloc.h" #include "buffer.h" @@ -23,8 +23,11 @@ void buffer_init(Buffer *buffer) { - buffer->alloc = 4096; - buffer->buf = xmalloc(buffer->alloc); + const u_int len = 4096; + + buffer->alloc = 0; + buffer->buf = xmalloc(len); + buffer->alloc = len; buffer->offset = 0; buffer->end = 0; } @@ -34,8 +37,10 @@ void buffer_free(Buffer *buffer) { - memset(buffer->buf, 0, buffer->alloc); - xfree(buffer->buf); + if (buffer->alloc > 0) { + memset(buffer->buf, 0, buffer->alloc); + xfree(buffer->buf); + } } /* @@ -69,6 +74,7 @@ void * buffer_append_space(Buffer *buffer, u_int len) { + u_int newlen; void *p; if (len > 0x100000) @@ -98,11 +104,13 @@ goto restart; } /* Increase the size of the buffer and retry. */ - buffer->alloc += len + 32768; - if (buffer->alloc > 0xa00000) + + newlen = buffer->alloc + len + 32768; + if (newlen > 0xa00000) fatal("buffer_append_space: alloc %u not supported", - buffer->alloc); - buffer->buf = xrealloc(buffer->buf, buffer->alloc); + newlen); + buffer->buf = xrealloc(buffer->buf, newlen); + buffer->alloc = newlen; goto restart; /* NOTREACHED */ } ==== //depot/projects/ia64/crypto/openssh/channels.c#9 (text+ko) ==== @@ -229,12 +229,13 @@ if (found == -1) { /* There are no free slots. Take last+1 slot and expand the array. */ found = channels_alloc; - channels_alloc += 10; if (channels_alloc > 10000) fatal("channel_new: internal error: channels_alloc %d " "too big.", channels_alloc); + channels = xrealloc(channels, + (channels_alloc + 10) * sizeof(Channel *)); + channels_alloc += 10; debug2("channel: expanding %d", channels_alloc); - channels = xrealloc(channels, channels_alloc * sizeof(Channel *)); for (i = found; i < channels_alloc; i++) channels[i] = NULL; } ==== //depot/projects/ia64/crypto/openssh/version.h#11 (text+ko) ==== @@ -1,11 +1,11 @@ /* $OpenBSD: version.h,v 1.37 2003/04/01 10:56:46 markus Exp $ */ -/* $FreeBSD: src/crypto/openssh/version.h,v 1.20 2003/04/23 17:10:53 des Exp $ */ +/* $FreeBSD: src/crypto/openssh/version.h,v 1.21 2003/09/16 14:31:46 nectar Exp $ */ #ifndef SSH_VERSION #define SSH_VERSION (ssh_version_get()) #define SSH_VERSION_BASE "OpenSSH_3.6.1p1" -#define SSH_VERSION_ADDENDUM "FreeBSD-20030423" +#define SSH_VERSION_ADDENDUM "FreeBSD-20030916" const char *ssh_version_get(void); void ssh_version_set_addendum(const char *add); ==== //depot/projects/ia64/etc/rc.d/dhclient#9 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/dhclient,v 1.9 2003/07/28 08:15:52 mbr Exp $ +# $FreeBSD: src/etc/rc.d/dhclient,v 1.10 2003/09/16 02:56:13 mbr Exp $ # # PROVIDE: dhclient @@ -53,8 +53,9 @@ dhclient_prestart() { - dhclient_common || return 1 - + if [ $dhclient_common_error -eq 1 ]; then + return 1 + fi for ifn in ${_cooked_list}; do ifscript_up ${ifn} done @@ -78,8 +79,9 @@ dhclient_prestop() { - dhclient_common || return 1 - + if [ $dhclient_common_error -eq 1 ]; then + return 1 + fi for ifn in ${_cooked_list}; do ipx_down ${ifn} ifalias_down ${ifn} @@ -110,4 +112,11 @@ fi load_rc_config $name +dhclient_common_error=0 +dhclient_common || dhclient_common_error=1; +if [ -n "$_cooked_list" ]; then + if [ -s $pidfile ]; then + stop_cmd=":" + fi +fi run_rc_command "$1" ==== //depot/projects/ia64/etc/services#10 (text+ko) ==== @@ -16,7 +16,7 @@ # Kerberos services are for Kerberos v4, and are unofficial. Sites running # v5 should uncomment v5 entries and comment v4 entries. # -# $FreeBSD: src/etc/services,v 1.94 2003/08/06 18:15:10 dcs Exp $ +# $FreeBSD: src/etc/services,v 1.95 2003/09/16 23:17:43 obrien Exp $ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS @@ -1924,6 +1924,7 @@ ccmail 3264/udp #cc:mail/lotus dec-notes 3333/tcp #DEC Notes dec-notes 3333/udp #DEC Notes +rdp 3389/tcp #Microsoft Remote Desktop Protocol rsvp-encap 3455/udp #RSVP encapsulated in UDP nut 3493/tcp #Network UPS Tools nut 3493/udp #Network UPS Tools ==== //depot/projects/ia64/lib/libc/net/inet_net_pton.c#3 (text+ko) ==== @@ -19,7 +19,7 @@ static const char orig_rcsid[] = "From Id: inet_net_pton.c,v 1.8 1996/11/21 10:28:12 vixie Exp $"; #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/inet_net_pton.c,v 1.8 2002/03/22 21:52:29 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/inet_net_pton.c,v 1.9 2003/09/15 23:38:06 fenner Exp $"); #include <sys/types.h> #include <sys/socket.h> @@ -186,7 +186,7 @@ else /* Class A */ bits = 8; /* If imputed mask is narrower than specified octets, widen. */ - if (bits >= 8 && bits < ((dst - odst) * 8)) + if (bits < ((dst - odst) * 8)) bits = (dst - odst) * 8; } /* Extend network to cover the actual mask. */ ==== //depot/projects/ia64/lib/libpthread/arch/amd64/amd64/context.S#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <machine/asm.h> -__FBSDID("$FreeBSD: src/lib/libpthread/arch/amd64/amd64/context.S,v 1.2 2003/07/26 02:36:50 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libpthread/arch/amd64/amd64/context.S,v 1.3 2003/09/16 00:00:53 deischen Exp $"); /* * The following notes ("cheat sheet") was provided by Peter Wemm. @@ -72,22 +72,13 @@ * translations from i386 but with the register names updated, etc. * The main gotcha is that FPU save/restore is in SSE format, which * means a sparse 512 byte FPU context. - * - * Note that the FPU is suppose to be 512 bytes but that the - * definition for the FPU bits in struct mcontext does not - * agree: - * - * long mc_fpstate[128] __aligned(16); - * - * This would actually use 1024 bytes, not 512, since long is - * 8 bytes on amd64. */ /* * Where do we define these? */ -#define MC_SIZE 1312 /* sizeof mcontext_t */ +#define MC_SIZE 800 /* sizeof mcontext_t */ #define MC_LEN_OFFSET (24*8) /* offset to mc_len from mcontext */ #define MC_FPFMT_OFFSET (25*8) /* offset to mc_fpformat from mcontext */ #define MC_FPFMT_NODEV 0x10000 ==== //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#35 (text+ko) ==== @@ -33,7 +33,7 @@ * */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.94 2003/09/14 22:52:16 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.95 2003/09/16 02:03:39 davidxu Exp $"); #include <sys/types.h> #include <sys/kse.h> @@ -330,6 +330,7 @@ */ sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); curthread->kse->k_kcb->kcb_kmbx.km_curthread = NULL; + curthread->attr.flags |= PTHREAD_SCOPE_SYSTEM; _thr_active_threads = 1; #endif } @@ -1642,7 +1643,7 @@ for (i = 1; i <= _SIG_MAXSIG; ++i) { if (SIGISMEMBER(thread->sigpend, i) && !SIGISMEMBER(thread->sigmask, i)) { - restart = _thread_sigact[1 - 1].sa_flags & SA_RESTART; + restart = _thread_sigact[i - 1].sa_flags & SA_RESTART; kse_thr_interrupt(&thread->tcb->tcb_tmbx, restart ? KSE_INTR_RESTART : KSE_INTR_INTERRUPT, 0); break; ==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/errata/article.sgml#26 (text+ko) ==== @@ -38,7 +38,7 @@ The &os; Project </corpauthor> - <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/errata/article.sgml,v 1.48 2003/09/08 14:53:01 simon Exp $</pubdate> + <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/errata/article.sgml,v 1.49 2003/09/16 23:25:48 bmah Exp $</pubdate> <copyright> <year>2000</year> @@ -149,6 +149,14 @@ &release.prev; security fix branch. More information can be found in security advisory <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:10.ibcs2.asc">FreeBSD-SA-03:10</ulink>.</para> + + <para><application>OpenSSH</application> contains a bug in its + buffer management code that could potentially cause it to crash. + This bug has been fixed via a vendor-supplied patch on the + &release.branch; development branch and the &release.prev; + security fix branch. For more details, refer to security + advisory + <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:12.openssh.asc">FreeBSD-SA-03:12</ulink>.</para> ]]> </sect1> ==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#124 (text+ko) ==== @@ -3,7 +3,7 @@ <corpauthor>The FreeBSD Project</corpauthor> - <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.622 2003/09/14 18:20:24 bmah Exp $</pubdate> + <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.623 2003/09/16 23:25:48 bmah Exp $</pubdate> <copyright> <year>2000</year> @@ -134,6 +134,13 @@ module is not enabled in &os; by default. For more information, see security advisory <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:10.ibcs2.asc">FreeBSD-SA-03:10</ulink>. &merged;</para> + + <para>A buffer management bug in + <application>OpenSSH</application>, which could potentially + cause a crash, has been fixed. More information can be found in + security advisory + <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:12.openssh.asc">FreeBSD-SA-03:12</ulink>. &merged;</para> + </sect2> <sect2 id="kernel"> ==== //depot/projects/ia64/share/man/man4/ath.4#8 (text+ko) ==== @@ -29,7 +29,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGES. .\" -.\" $FreeBSD: src/share/man/man4/ath.4,v 1.8 2003/09/01 23:09:09 imp Exp $ +.\" $FreeBSD: src/share/man/man4/ath.4,v 1.9 2003/09/16 22:43:36 shiba Exp $ .\"/ .Dd August 1, 2003 .Dt ATH 4 @@ -118,6 +118,7 @@ Linksys WMP55AG AR5212 PCI Linksys WPC51AB AR5211 CardBus Linksys WPC55AG AR5212 CardBus +NEC PA-WL/54AG AR5212 CardBus Netgear WAB501 AR5211 CardBus Netgear WAG511 AR5212 CardBus Proxim Skyline 4030 AR5210 CardBus ==== //depot/projects/ia64/share/man/man4/ath_hal.4#5 (text+ko) ==== @@ -29,7 +29,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGES. .\" -.\" $FreeBSD: src/share/man/man4/ath_hal.4,v 1.4 2003/09/01 23:09:09 imp Exp $ +.\" $FreeBSD: src/share/man/man4/ath_hal.4,v 1.5 2003/09/16 22:43:36 shiba Exp $ .\"/ .Dd June 23, 2003 .Dt ATH_HAL 4 @@ -64,6 +64,7 @@ Linksys WMP55AG AR5212 PCI Linksys WPC51AB AR5211 CardBus Linksys WPC55AG AR5212 CardBus +NEC PA-WL/54AG AR5212 CardBus Netgear WAB501 AR5211 CardBus Netgear WAG511 AR5212 CardBus Proxim Skyline 4030 AR5210 CardBus ==== //depot/projects/ia64/sys/boot/i386/libi386/comconsole.c#3 (text+ko) ==== @@ -24,33 +24,14 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/comconsole.c,v 1.9 2003/08/25 23:28:31 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/comconsole.c,v 1.10 2003/09/16 11:24:23 bde Exp $"); #include <stand.h> #include <bootstrap.h> #include <machine/cpufunc.h> +#include <dev/ic/ns16550.h> #include "libi386.h" -/* selected defines from ns16550.h */ -#define com_data 0 /* data register (R/W) */ -#define com_dlbl 0 /* divisor latch low (W) */ -#define com_dlbh 1 /* divisor latch high (W) */ -#define com_ier 1 /* interrupt enable (W) */ -#define com_iir 2 /* interrupt identification (R) */ -#define com_fifo 2 /* FIFO control (W) */ -#define com_lctl 3 /* line control register (R/W) */ -#define com_cfcr 3 /* line control register (R/W) */ -#define com_mcr 4 /* modem control register (R/W) */ -#define com_lsr 5 /* line status register (R/W) */ -#define com_msr 6 /* modem status register (R/W) */ - -/* selected defines from sioreg.h */ -#define CFCR_DLAB 0x80 -#define MCR_RTS 0x02 -#define MCR_DTR 0x01 -#define LSR_TXRDY 0x20 -#define LSR_RXRDY 0x01 - #define COMC_FMT 0x3 /* 8N1 */ #define COMC_TXWAIT 0x40000 /* transmit timeout */ #define COMC_BPS(x) (115200 / (x)) /* speed to DLAB divisor */ ==== //depot/projects/ia64/sys/boot/pc98/libpc98/comconsole.c#3 (text+ko) ==== @@ -24,33 +24,14 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/pc98/libpc98/comconsole.c,v 1.4 2003/09/08 09:11:20 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/pc98/libpc98/comconsole.c,v 1.5 2003/09/16 11:24:23 bde Exp $"); #include <stand.h> #include <bootstrap.h> #include <machine/cpufunc.h> +#include <dev/ic/ns16550.h> #include "libi386.h" -/* selected defines from ns16550.h */ -#define com_data 0 /* data register (R/W) */ -#define com_dlbl 0 /* divisor latch low (W) */ -#define com_dlbh 1 /* divisor latch high (W) */ -#define com_ier 1 /* interrupt enable (W) */ -#define com_iir 2 /* interrupt identification (R) */ -#define com_fifo 2 /* FIFO control (W) */ -#define com_lctl 3 /* line control register (R/W) */ -#define com_cfcr 3 /* line control register (R/W) */ -#define com_mcr 4 /* modem control register (R/W) */ -#define com_lsr 5 /* line status register (R/W) */ -#define com_msr 6 /* modem status register (R/W) */ - -/* selected defines from sioreg.h */ -#define CFCR_DLAB 0x80 -#define MCR_RTS 0x02 -#define MCR_DTR 0x01 -#define LSR_TXRDY 0x20 -#define LSR_RXRDY 0x01 - #define COMC_FMT 0x3 /* 8N1 */ #define COMC_TXWAIT 0x40000 /* transmit timeout */ #define COMC_BPS(x) (115200 / (x)) /* speed to DLAB divisor */ ==== //depot/projects/ia64/sys/dev/aac/aac.c#31 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.77 2003/09/01 20:44:18 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.78 2003/09/16 16:07:15 scottl Exp $"); /* * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters. @@ -1877,7 +1877,11 @@ error = ENOENT; goto out; } - + + /* wrap the pi so the following test works */ + if (pi >= aac_qinfo[queue].size) + pi = 0; + notify = 0; if (ci == pi + 1) notify++; ==== //depot/projects/ia64/sys/dev/ata/ata-lowlevel.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.11 2003/09/10 09:57:16 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.13 2003/09/16 15:21:37 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -270,14 +270,28 @@ { struct ata_channel *ch = (struct ata_channel *)data; struct ata_request *request = ch->running; - u_int8_t status; int length; - /* if the channel is idle this interrupt is not for us (shared) */ - if (ch->state == ATA_IDLE) + /* ignore this interrupt if there is no running request */ + if (!request) { + if (ATA_LOCK_CH(ch, ATA_CONTROL)) { + u_int8_t status = ATA_IDX_INB(ch, ATA_STATUS); + u_int8_t error = ATA_IDX_INB(ch, ATA_ERROR); + + if (bootverbose) + ata_printf(ch, -1, + "spurious interrupt - status=0x%02x error=0x%02x\n", + status, error); + ATA_UNLOCK_CH(ch); + } + else { + if (bootverbose) + ata_printf(ch, -1, "spurious interrupt - channel busy\n"); + } return; + } - /* if device is busy it didn't interrupt, ignore interrupt (shared) */ + /* ignore interrupt if device is busy */ if (ATA_IDX_INB(ch, ATA_ALTSTAT) & ATA_S_BUSY) { DELAY(100); if (!(ATA_IDX_INB(ch, ATA_ALTSTAT) & ATA_S_DRQ)) @@ -285,23 +299,8 @@ } /* clear interrupt and get status */ - status = ATA_IDX_INB(ch, ATA_STATUS); + request->status = ATA_IDX_INB(ch, ATA_STATUS); - /* if we dont have a running request shout and ignore this interrupt */ - if (request == NULL) { - if (1 || bootverbose) { - printf("ata%d: spurious interrupt - ", device_get_unit(ch->dev)); - if (request) - printf("request OK - "); - printf("status=0x%02x error=0x%02x reason=0x%02x\n", - status, ATA_IDX_INB(ch, ATA_ERROR), - ATA_IDX_INB(ch, ATA_IREASON)); - } - return; - } - - request->status = status; - switch (request->flags & (ATA_R_ATAPI | ATA_R_DMA)) { /* ATA PIO data transfer and control commands */ @@ -545,15 +544,19 @@ stat0, err, lsb, msb); if (!(stat0 & ATA_S_BUSY)) { if (err == ATA_E_ILI) { - if (stat0 & ATA_S_READY) { + if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { + ch->devices |= ATA_ATAPI_MASTER; + } + else if (stat0 & ATA_S_READY) { ch->devices |= ATA_ATA_MASTER; } - else if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { - ch->devices |= ATA_ATAPI_MASTER; - } + } + else if (err == lsb && err == msb) { + ATA_IDX_OUTB(ch, ATA_ERROR, 0xff); + DELAY(10); + if (stat0 == ATA_IDX_INB(ch, ATA_STATUS)) + stat0 |= ATA_S_BUSY; } - else if (err == lsb && err == msb) - stat0 |= ATA_S_BUSY; } } if (stat1 & ATA_S_BUSY) { @@ -569,15 +572,19 @@ stat1, err, lsb, msb); if (!(stat1 & ATA_S_BUSY)) { if (err == ATA_E_ILI) { - if (stat1 & ATA_S_READY) { + if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { + ch->devices |= ATA_ATAPI_SLAVE; + } + else if (stat1 & ATA_S_READY) { ch->devices |= ATA_ATA_SLAVE; } - else if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { - ch->devices |= ATA_ATAPI_SLAVE; - } + } + else if (err == lsb && err == msb) { + ATA_IDX_OUTB(ch, ATA_ERROR, 0xff); + DELAY(10); + if (stat1 == ATA_IDX_INB(ch, ATA_STATUS)) + stat1 |= ATA_S_BUSY; } - else if (err == lsb && err == msb) - stat1 |= ATA_S_BUSY; } } if (mask == 0x01) /* wait for master only */ ==== //depot/projects/ia64/sys/dev/ata/atapi-cd.c#30 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.144 2003/09/11 19:27:24 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.145 2003/09/16 14:41:44 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -1034,7 +1034,7 @@ break; case DIOCGMEDIASIZE: - *(off_t *)addr = cdp->disk_size * cdp->block_size; + *(off_t *)addr = (off_t)cdp->disk_size * (off_t)cdp->block_size; break; case DIOCGSECTORSIZE: ==== //depot/projects/ia64/sys/dev/ic/ns16550.h#3 (text+ko) ==== @@ -31,21 +31,165 @@ * SUCH DAMAGE. * * from: @(#)ns16550.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/dev/ic/ns16550.h,v 1.9 2002/09/22 08:51:28 phk Exp $ + * $FreeBSD: src/sys/dev/ic/ns16550.h,v 1.14 2003/09/16 14:21:17 bde Exp $ */ /* - * NS16550 UART registers + * NS8250... UART registers. */ + +/* 8250 registers #[0-6]. */ + #define com_data 0 /* data register (R/W) */ -#define com_dlbl 0 /* divisor latch low (W) */ -#define com_dlbh 1 /* divisor latch high (W) */ -#define com_ier 1 /* interrupt enable (W) */ -#define com_iir 2 /* interrupt identification (R) */ -#define com_fifo 2 /* FIFO control (W) */ -#define com_lctl 3 /* line control register (R/W) */ -#define com_cfcr 3 /* line control register (R/W) */ +#define com_thr com_data /* transmitter holding register (W) */ +#define com_rhr com_data /* receiver holding register (R) */ + +#define com_ier 1 /* interrupt enable register (W) */ +#define IER_ERXRDY 0x1 +#define IER_ETXRDY 0x2 +#define IER_ERLS 0x4 +#define IER_EMSC 0x8 + +#define com_iir 2 /* interrupt identification register (R) */ +#define com_isr com_iir /* interrupt status register (R) */ +#define IIR_IMASK 0xf +#define IIR_RXTOUT 0xc +#define IIR_RLS 0x6 +#define IIR_RXRDY 0x4 +#define IIR_TXRDY 0x2 +#define IIR_NOPEND 0x1 +#define IIR_MLSC 0x0 +#define IIR_FIFO_MASK 0xc0 /* set if FIFOs are enabled */ + +#define com_lcr 3 /* line control register (R/W) */ +#define com_lctl com_lcr +#define com_cfcr com_lcr /* character format control register (R/W) */ +#define LCR_DLAB 0x80 +#define CFCR_DLAB LCR_DLAB +#define LCR_EFR_ENABLE 0xbf /* magic to enable EFR on 16650 up */ +#define CFCR_EFR_ENABLE LCR_EFR_ENABLE +#define CFCR_SBREAK 0x40 +#define CFCR_PZERO 0x30 +#define CFCR_PONE 0x20 +#define CFCR_PEVEN 0x10 +#define CFCR_PODD 0x00 +#define CFCR_PENAB 0x08 +#define CFCR_STOPB 0x04 +#define CFCR_8BITS 0x03 +#define CFCR_7BITS 0x02 +#define CFCR_6BITS 0x01 +#define CFCR_5BITS 0x00 + #define com_mcr 4 /* modem control register (R/W) */ +#define MCR_PRESCALE 0x80 /* only available on 16650 up */ +#define MCR_LOOPBACK 0x10 +#define MCR_IENABLE 0x08 +#define MCR_DRS 0x04 +#define MCR_RTS 0x02 +#define MCR_DTR 0x01 + #define com_lsr 5 /* line status register (R/W) */ +#define LSR_RCV_FIFO 0x80 +#define LSR_TSRE 0x40 +#define LSR_TXRDY 0x20 +#define LSR_BI 0x10 +#define LSR_FE 0x08 +#define LSR_PE 0x04 +#define LSR_OE 0x02 +#define LSR_RXRDY 0x01 +#define LSR_RCV_MASK 0x1f + #define com_msr 6 /* modem status register (R/W) */ -#define com_scr 7 /* scratch register for 16450 up (R/W) */ +#define MSR_DCD 0x80 +#define MSR_RI 0x40 +#define MSR_DSR 0x20 +#define MSR_CTS 0x10 +#define MSR_DDCD 0x08 +#define MSR_TERI 0x04 +#define MSR_DDSR 0x02 +#define MSR_DCTS 0x01 + +/* 8250 multiplexed registers #[0-1]. Access enabled by LCR[7]. */ +#define com_dll 0 /* divisor latch low (R/W) */ +#define com_dlbl com_dll +#define com_dlm 1 /* divisor latch high (R/W) */ +#define com_dlbh com_dlm + +/* 16450 register #7. Not multiplexed. */ +#define com_scr 7 /* scratch register (R/W) */ + +/* 16550 register #2. Not multiplexed. */ +#define com_fcr 2 /* FIFO control register (W) */ +#define com_fifo com_fcr +#define FIFO_ENABLE 0x01 +#define FIFO_RCV_RST 0x02 +#define FIFO_XMT_RST 0x04 +#define FIFO_DMA_MODE 0x08 +#define FIFO_RX_LOW 0x00 +#define FIFO_RX_MEDL 0x40 +#define FIFO_RX_MEDH 0x80 +#define FIFO_RX_HIGH 0xc0 + +/* 16650 registers #2,[4-7]. Access enabled by LCR_EFR_ENABLE. */ + +#define com_efr 2 /* enhanced features register (R/W) */ +#define EFR_AUTOCTS 0x80 +#define EFR_AUTORTS 0x40 +#define EFR_EFE 0x10 /* enhanced functions enable */ + +#define com_xon1 4 /* XON 1 character (R/W) */ +#define com_xon2 5 /* XON 2 character (R/W) */ +#define com_xoff1 6 /* XOFF 1 character (R/W) */ +#define com_xoff2 7 /* XOFF 2 character (R/W) */ + +/* 16950 register #1. Access enabled by ACR[7]. Also requires !LCR[7]. */ +#define com_asr 1 /* additional status register (R[0-7]/W[0-1]) */ + +/* 16950 register #3. R/W access enabled by ACR[7]. */ +#define com_rfl 3 /* receiver fifo level (R) */ + +/* + * 16950 register #4. Access enabled by ACR[7]. Also requires + * !LCR_EFR_ENABLE. + */ +#define com_tfl 4 /* transmitter fifo level (R) */ + +/* + * 16950 register #5. Accessible if !LCR_EFR_ENABLE. Read access also + * requires ACR[6]. + */ +#define com_icr 5 /* index control register (R/W) */ + +/* + * 16950 register #7. It is the same as com_scr except it has a different + * abbreviation in the manufacturer's data sheet and it also serves as an + * index into the Indexed Control register set. + */ +#define com_spr com_scr /* scratch pad (and index) register (R/W) */ + +/* + * 16950 indexed control registers #[0-0x13]. Access is via index in SPR, + * data in ICR (if ICR is accessible). + */ + +#define com_acr 0 /* additional control register (R/W) */ +#define ACR_ASE 0x80 /* ASR/RFL/TFL enable */ +#define ACR_ICRE 0x40 /* ICR enable */ +#define ACR_TLE 0x20 /* TTL/RTL enable */ + +#define com_cpr 1 /* clock prescaler register (R/W) */ +#define com_tcr 2 /* times clock register (R/W) */ +#define com_ttl 4 /* transmitter trigger level (R/W) */ +#define com_rtl 5 /* receiver trigger level (R/W) */ +/* ... */ + +#ifdef PC98 +/* Hardware extension mode register for RSB-2000/3000. */ +#define com_emr com_msr +#define EMR_EXBUFF 0x04 +#define EMR_CTSFLW 0x08 +#define EMR_DSRFLW 0x10 +#define EMR_RTSFLW 0x20 +#define EMR_DTRFLW 0x40 +#define EMR_EFMODE 0x80 +#endif ==== //depot/projects/ia64/sys/dev/sio/sioreg.h#9 (text+ko) ==== @@ -31,97 +31,12 @@ * SUCH DAMAGE. * * from: @(#)comreg.h 7.2 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/dev/sio/sioreg.h,v 1.22 2003/03/18 21:26:28 sobomax Exp $ + * $FreeBSD: src/sys/dev/sio/sioreg.h,v 1.23 2003/09/16 08:08:08 bde Exp $ */ /* Receiver clock frequency for "standard" pc serial ports. */ #define DEFAULT_RCLK 1843200 -/* interrupt enable register */ -#define IER_ERXRDY 0x1 -#define IER_ETXRDY 0x2 -#define IER_ERLS 0x4 -#define IER_EMSC 0x8 - -/* interrupt identification register */ -#define IIR_IMASK 0xf -#define IIR_RXTOUT 0xc -#define IIR_RLS 0x6 -#define IIR_RXRDY 0x4 -#define IIR_TXRDY 0x2 -#define IIR_NOPEND 0x1 -#define IIR_MLSC 0x0 -#define IIR_FIFO_MASK 0xc0 /* set if FIFOs are enabled */ - -/* fifo control register */ -#define FIFO_ENABLE 0x01 -#define FIFO_RCV_RST 0x02 -#define FIFO_XMT_RST 0x04 -#define FIFO_DMA_MODE 0x08 -#define FIFO_RX_LOW 0x00 -#define FIFO_RX_MEDL 0x40 -#define FIFO_RX_MEDH 0x80 -#define FIFO_RX_HIGH 0xc0 - -/* character format control register (aka line control register) */ -#define CFCR_DLAB 0x80 -#define CFCR_SBREAK 0x40 -#define CFCR_PZERO 0x30 -#define CFCR_PONE 0x20 -#define CFCR_PEVEN 0x10 -#define CFCR_PODD 0x00 -#define CFCR_PENAB 0x08 -#define CFCR_STOPB 0x04 -#define CFCR_8BITS 0x03 -#define CFCR_7BITS 0x02 -#define CFCR_6BITS 0x01 -#define CFCR_5BITS 0x00 -#define CFCR_EFR_ENABLE 0xbf /* magic to enable EFR on 16650 up */ - -/* modem control register */ -#define MCR_PRESCALE 0x80 /* only available on 16650 up */ -#define MCR_LOOPBACK 0x10 -#define MCR_IENABLE 0x08 -#define MCR_DRS 0x04 -#define MCR_RTS 0x02 -#define MCR_DTR 0x01 - -/* line status register */ -#define LSR_RCV_FIFO 0x80 -#define LSR_TSRE 0x40 -#define LSR_TXRDY 0x20 -#define LSR_BI 0x10 -#define LSR_FE 0x08 -#define LSR_PE 0x04 -#define LSR_OE 0x02 -#define LSR_RXRDY 0x01 -#define LSR_RCV_MASK 0x1f - -/* modem status register */ -#define MSR_DCD 0x80 -#define MSR_RI 0x40 -#define MSR_DSR 0x20 -#define MSR_CTS 0x10 -#define MSR_DDCD 0x08 -#define MSR_TERI 0x04 -#define MSR_DDSR 0x02 -#define MSR_DCTS 0x01 - -/* enhanced feature register (only available on 16650 up) */ -#define com_efr com_fifo -#define EFR_EFE 0x10 /* enhanced functions enable */ - -#ifdef PC98 -/* Hardware extension mode register for RSB-2000/3000. */ -#define com_emr com_msr -#define EMR_EXBUFF 0x04 -#define EMR_CTSFLW 0x08 -#define EMR_DSRFLW 0x10 -#define EMR_RTSFLW 0x20 -#define EMR_DTRFLW 0x40 -#define EMR_EFMODE 0x80 -#endif - /* speed to initialize to during chip tests */ #define SIO_TEST_SPEED 9600 ==== //depot/projects/ia64/sys/dev/sound/isa/mpu.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ * This handles io against /dev/midi, the midi {in, out}put event queues * and the event/message transmittion to/from an MPU401 interface. * - * $FreeBSD: src/sys/dev/sound/isa/mpu.c,v 1.16 2002/04/04 21:03:16 jhb Exp $ + * $FreeBSD: src/sys/dev/sound/isa/mpu.c,v 1.17 2003/09/16 11:04:22 bde Exp $ * */ @@ -42,7 +42,6 @@ #include <machine/cpufunc.h> #include <isa/isavar.h> -#include <dev/sio/sioreg.h> #include <dev/ic/ns16550.h> static devclass_t midi_devclass; ==== //depot/projects/ia64/sys/dev/sound/isa/uartsio.c#5 (text+ko) ==== @@ -42,11 +42,10 @@ * This handles io against /dev/midi, the midi {in, out}put event queues * and the event/message transmittion to/from a serial port interface. * - * $FreeBSD: src/sys/dev/sound/isa/uartsio.c,v 1.13 2002/12/18 22:53:23 semenu Exp $ + * $FreeBSD: src/sys/dev/sound/isa/uartsio.c,v 1.15 2003/09/17 01:09:10 bde Exp $ * */ -#include <dev/sio/sioreg.h> #include <dev/ic/ns16550.h> #include <dev/sound/midi/midi.h> ==== //depot/projects/ia64/sys/dev/uart/uart_bus.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/uart/uart_bus.h,v 1.2 2003/09/11 23:06:42 marcel Exp $ + * $FreeBSD: src/sys/dev/uart/uart_bus.h,v 1.3 2003/09/17 01:41:21 marcel Exp $ */ #ifndef _DEV_UART_BUS_H_ @@ -113,6 +113,8 @@ struct uart_bas sc_bas; device_t sc_dev; + struct mtx sc_hwmtx; /* Spinlock protecting hardware. */ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309170322.h8H3MxQM004928>
