Date: Thu, 21 Oct 2004 15:55:34 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 63472 for review Message-ID: <200410211555.i9LFtYmY048903@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=63472 Change 63472 by jhb@jhb_slimer on 2004/10/21 15:55:18 IFC @63467. Working if_de(4), compilable LINT, etc. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/promcons.c#21 integrate .. //depot/projects/smpng/sys/alpha/osf1/osf1_misc.c#32 integrate .. //depot/projects/smpng/sys/alpha/tlsb/zs_tlsb.c#18 integrate .. //depot/projects/smpng/sys/amd64/amd64/nexus.c#14 integrate .. //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#5 integrate .. //depot/projects/smpng/sys/boot/common/help.common#16 integrate .. //depot/projects/smpng/sys/boot/common/loader.8#31 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/ahc_isa.c#3 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic7xxx.c#21 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic7xxx.h#12 integrate .. //depot/projects/smpng/sys/dev/ata/ata-all.c#64 integrate .. //depot/projects/smpng/sys/dev/ata/ata-card.c#21 integrate .. //depot/projects/smpng/sys/dev/ata/ata-queue.c#22 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#47 integrate .. //depot/projects/smpng/sys/dev/dcons/dcons_os.c#2 integrate .. //depot/projects/smpng/sys/dev/digi/digi.c#27 integrate .. //depot/projects/smpng/sys/dev/digi/digi.h#10 integrate .. //depot/projects/smpng/sys/dev/ed/if_ed_pccard.c#24 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#38 integrate .. //depot/projects/smpng/sys/dev/ex/if_ex.c#14 integrate .. //depot/projects/smpng/sys/dev/fdc/fdc.c#12 integrate .. //depot/projects/smpng/sys/dev/hifn/hifn7751.c#18 integrate .. //depot/projects/smpng/sys/dev/hifn/hifn7751var.h#5 integrate .. //depot/projects/smpng/sys/dev/if_ndis/if_ndis.c#20 integrate .. //depot/projects/smpng/sys/dev/nmdm/nmdm.c#23 integrate .. //depot/projects/smpng/sys/dev/ofw/ofw_console.c#21 integrate .. //depot/projects/smpng/sys/dev/pci/pci.c#43 integrate .. //depot/projects/smpng/sys/dev/random/harvest.c#10 integrate .. //depot/projects/smpng/sys/dev/sio/sio_pci.c#14 integrate .. //depot/projects/smpng/sys/dev/sound/isa/mss.c#20 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/buffer.c#12 integrate .. //depot/projects/smpng/sys/dev/syscons/syscons.c#44 integrate .. //depot/projects/smpng/sys/dev/syscons/sysmouse.c#11 integrate .. //depot/projects/smpng/sys/dev/usb/ubsa.c#12 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#64 integrate .. //depot/projects/smpng/sys/dev/zs/zs.c#19 integrate .. //depot/projects/smpng/sys/geom/label/g_label.c#7 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#10 integrate .. //depot/projects/smpng/sys/i386/bios/apm.c#9 integrate .. //depot/projects/smpng/sys/i386/i386/nexus.c#16 integrate .. //depot/projects/smpng/sys/i386/i386/vm_machdep.c#54 integrate .. //depot/projects/smpng/sys/i386/isa/npx.c#43 integrate .. //depot/projects/smpng/sys/i386/isa/pcvt/pcvt_drv.c#16 integrate .. //depot/projects/smpng/sys/ia64/ia64/nexus.c#8 integrate .. //depot/projects/smpng/sys/ia64/ia64/ssc.c#15 integrate .. //depot/projects/smpng/sys/isa/atkbdc_isa.c#10 integrate .. //depot/projects/smpng/sys/isa/isahint.c#4 integrate .. //depot/projects/smpng/sys/kern/kern_descrip.c#70 integrate .. //depot/projects/smpng/sys/kern/kern_event.c#34 integrate .. //depot/projects/smpng/sys/kern/kern_switch.c#49 integrate .. //depot/projects/smpng/sys/kern/kern_synch.c#84 integrate .. //depot/projects/smpng/sys/kern/subr_bus.c#42 integrate .. //depot/projects/smpng/sys/kern/subr_kdb.c#7 integrate .. //depot/projects/smpng/sys/kern/tty.c#51 integrate .. //depot/projects/smpng/sys/kern/tty_pty.c#35 integrate .. //depot/projects/smpng/sys/kern/uipc_domain.c#10 integrate .. //depot/projects/smpng/sys/kern/uipc_socket.c#59 integrate .. //depot/projects/smpng/sys/kern/uipc_socket2.c#37 integrate .. //depot/projects/smpng/sys/kern/uipc_syscalls.c#60 integrate .. //depot/projects/smpng/sys/kern/uipc_usrreq.c#41 integrate .. //depot/projects/smpng/sys/kern/vfs_subr.c#86 integrate .. //depot/projects/smpng/sys/modules/ipdivert/Makefile#1 branch .. //depot/projects/smpng/sys/modules/netgraph/device/Makefile#2 integrate .. //depot/projects/smpng/sys/net/if.c#56 integrate .. //depot/projects/smpng/sys/net/if_var.h#31 integrate .. //depot/projects/smpng/sys/net/raw_cb.c#10 integrate .. //depot/projects/smpng/sys/net/raw_usrreq.c#17 integrate .. //depot/projects/smpng/sys/netatalk/ddp_pcb.c#4 integrate .. //depot/projects/smpng/sys/netatm/atm_socket.c#12 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#14 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#12 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#11 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#7 integrate .. //depot/projects/smpng/sys/netgraph/ng_device.c#9 integrate .. //depot/projects/smpng/sys/netgraph/ng_device.h#4 integrate .. //depot/projects/smpng/sys/netinet/in.h#28 integrate .. //depot/projects/smpng/sys/netinet/in_pcb.c#50 integrate .. //depot/projects/smpng/sys/netinet/in_pcb.h#33 integrate .. //depot/projects/smpng/sys/netinet/in_proto.c#17 integrate .. //depot/projects/smpng/sys/netinet/in_var.h#12 integrate .. //depot/projects/smpng/sys/netinet/ip_divert.c#39 integrate .. //depot/projects/smpng/sys/netinet/ip_divert.h#2 integrate .. //depot/projects/smpng/sys/netinet/ip_fastfwd.c#12 integrate .. //depot/projects/smpng/sys/netinet/ip_fw2.c#43 integrate .. //depot/projects/smpng/sys/netinet/ip_fw_pfil.c#6 integrate .. //depot/projects/smpng/sys/netinet/ip_input.c#60 integrate .. //depot/projects/smpng/sys/netinet/ip_var.h#26 integrate .. //depot/projects/smpng/sys/netinet/tcp_subr.c#56 integrate .. //depot/projects/smpng/sys/netinet6/in6_pcb.c#35 integrate .. //depot/projects/smpng/sys/netinet6/ip6_input.c#37 integrate .. //depot/projects/smpng/sys/netipx/ipx_pcb.c#12 integrate .. //depot/projects/smpng/sys/netipx/ipx_usrreq.c#15 integrate .. //depot/projects/smpng/sys/netnatm/natm.c#20 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_vfsops.c#40 integrate .. //depot/projects/smpng/sys/nfsserver/nfs_serv.c#35 integrate .. //depot/projects/smpng/sys/pc98/pc98/fd.c#38 integrate .. //depot/projects/smpng/sys/pc98/pc98/sio.c#49 integrate .. //depot/projects/smpng/sys/pci/if_de.c#21 integrate .. //depot/projects/smpng/sys/pci/if_vr.c#31 integrate .. //depot/projects/smpng/sys/security/mac_bsdextended/mac_bsdextended.c#13 integrate .. //depot/projects/smpng/sys/security/mac_bsdextended/mac_bsdextended.h#4 integrate .. //depot/projects/smpng/sys/sys/bufobj.h#1 branch .. //depot/projects/smpng/sys/sys/proc.h#132 integrate .. //depot/projects/smpng/sys/sys/protosw.h#12 integrate .. //depot/projects/smpng/sys/sys/socketvar.h#41 integrate .. //depot/projects/smpng/sys/sys/tty.h#18 integrate .. //depot/projects/smpng/sys/sys/ttydefaults.h#5 integrate .. //depot/projects/smpng/sys/sys/vnode.h#49 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_alloc.c#30 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_balloc.c#13 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_vnops.c#34 integrate .. //depot/projects/smpng/sys/ufs/ufs/dinode.h#7 integrate .. //depot/projects/smpng/sys/vm/vm_fault.c#42 integrate .. //depot/projects/smpng/sys/vm/vm_page.c#57 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/promcons.c#21 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.41 2004/09/17 11:02:53 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.43 2004/10/20 16:22:53 jhb Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -107,12 +107,7 @@ tp->t_dev = dev; if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsolemode(tp, 0); ttsetwater(tp); setuptimeout = 1; ==== //depot/projects/smpng/sys/alpha/osf1/osf1_misc.c#32 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_misc.c,v 1.49 2004/10/05 18:51:09 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_misc.c,v 1.50 2004/10/14 10:43:47 phk Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1772,7 +1772,7 @@ name[1] = KERN_HOSTNAME; mtx_lock(&Giant); retval = userland_sysctl(td, name, 2, uap->buf, &len, - 1, 0, 0, &bytes); + 1, 0, 0, &bytes, 0); mtx_unlock(&Giant); td->td_retval[0] = bytes; return(retval); ==== //depot/projects/smpng/sys/alpha/tlsb/zs_tlsb.c#18 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.48 2004/09/17 11:04:57 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.49 2004/10/18 21:51:24 phk Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -283,12 +283,7 @@ tp = dev->si_tty; if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsolemode(tp, 0); ttsetwater(tp); setuptimeout = 1; } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { ==== //depot/projects/smpng/sys/amd64/amd64/nexus.c#14 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.63 2004/08/24 19:22:54 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.64 2004/10/14 22:36:47 njl Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -259,6 +259,8 @@ retval += bus_print_child_header(bus, child); retval += nexus_print_all_resources(child); + if (device_get_flags(child)) + retval += printf(" flags %#x", device_get_flags(child)); retval += printf(" on motherboard\n"); /* XXX "motherboard", ick */ return (retval); ==== //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#5 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.4 2004/09/23 21:57:47 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.5 2004/10/21 11:59:33 cognet Exp $"); /* * MacPPC bus dma support routines @@ -687,7 +687,7 @@ int resid; struct iovec *iov; - if (op == BUS_DMASYNC_POSTREAD) + if (op == BUS_DMASYNC_POSTWRITE) return; if (map->flags & DMAMAP_COHERENT) return; ==== //depot/projects/smpng/sys/boot/common/help.common#16 (text+ko) ==== @@ -311,6 +311,18 @@ this option provides a hint as to the actual size of system memory (which will be tested before use). + set hw.{acpi,pci}.host_start_mem=<value> + + Sets the lowest address that the pci code will assign + when it doesn't have other information about the address + to assign (like from a pci bridge). This is only useful + in older systems without a pci bridge. Also, it only + impacts devices that the BIOS doesn't assign to, typically + CardBus bridges. The default <value> is 0x80000000, but + some systems need values like 0xf0000000, 0xfc000000 or + 0xfe000000 may be suitable for older systems (the older + the system, the higher the number typically should be). + set hw.pci.enable_io_modes=<value> Enable PCI resources which are left off by some BIOSes ==== //depot/projects/smpng/sys/boot/common/loader.8#31 (text+ko) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.74 2004/10/01 00:15:13 ru Exp $ +.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.76 2004/10/15 06:44:13 ru Exp $ .\" -.Dd October 1, 2004 +.Dd October 15, 2004 .Dt LOADER 8 .Os .Sh NAME @@ -429,6 +429,15 @@ respectively. An invalid suffix will result in the variable being ignored by the kernel. +.It Va hw.pci.host_start_mem , hw.acpi.host_start_mem +When not otherwise constrained, this limits the memory start +address. +The default is 0x80000000 and should be set to at least size of the +memory and not conflict with other resources. +Typically, only systems without PCI bridges need to set this variable +since PCI bridges typically constrain the memory starting address +(and the variable is only used when bridges do not constrain this +address). .It Va hw.pci.enable_io_modes Enable PCI resources which are left off by some BIOSes or are not enabled correctly by the device driver. ==== //depot/projects/smpng/sys/dev/aic7xxx/ahc_isa.c#3 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_isa.c,v 1.4 2004/08/30 20:15:42 gibbs Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_isa.c,v 1.5 2004/10/15 23:39:52 gibbs Exp $"); #include <dev/aic7xxx/aic7xxx_osm.h> @@ -137,11 +137,15 @@ int error; int zero; - error = ENODEV; + error = ENXIO; zero = 0; regs = NULL; irq = NULL; + /* Skip probes for ISA PnP devices */ + if (isa_get_logicalid(dev) != 0) + return (error); + regs = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &zero, RF_ACTIVE); if (regs == NULL) { device_printf(dev, "No resources allocated.\n"); ==== //depot/projects/smpng/sys/dev/aic7xxx/aic7xxx.c#21 (text+ko) ==== @@ -46,7 +46,7 @@ #include "aicasm/aicasm_insformat.h" #else #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.102 2004/08/17 00:14:30 gibbs Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.103 2004/10/19 20:48:05 gibbs Exp $"); #include <dev/aic7xxx/aic7xxx_osm.h> #include <dev/aic7xxx/aic7xxx_inline.h> #include <dev/aic7xxx/aicasm/aicasm_insformat.h> @@ -2828,11 +2828,17 @@ case MSG_TYPE_TARGET_MSGIN: { int msgdone; - int msgout_request; if (ahc->msgout_len == 0) panic("Target MSGIN with no active message"); +#ifdef AHC_DEBUG + if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) { + ahc_print_devinfo(ahc, &devinfo); + printf("TARGET_MSG_IN"); + } +#endif + /* * If we interrupted a mesgout session, the initiator * will not know this until our first REQ. So, we @@ -2840,24 +2846,47 @@ * first byte. */ if ((ahc_inb(ahc, SCSISIGI) & ATNI) != 0 - && ahc->msgout_index > 0) - msgout_request = TRUE; - else - msgout_request = FALSE; + && ahc->msgout_index > 0) { + + /* + * Change gears and see if this messages is + * of interest to us or should be passed back + * to the sequencer. + */ +#ifdef AHC_DEBUG + if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) + printf(" Honoring ATN Request.\n"); +#endif + ahc->msg_type = MSG_TYPE_TARGET_MSGOUT; - if (msgout_request) { + /* + * Disable SCSI Programmed I/O during the + * phase change so as to avoid phantom REQs. + */ + ahc_outb(ahc, SXFRCTL0, + ahc_inb(ahc, SXFRCTL0) & ~SPIOEN); /* - * Change gears and see if - * this messages is of interest to - * us or should be passed back to - * the sequencer. + * Since SPIORDY asserts when ACK is asserted + * for P_MSGOUT, and SPIORDY's assertion triggered + * our entry into this routine, wait for ACK to + * *de-assert* before changing phases. */ - ahc->msg_type = MSG_TYPE_TARGET_MSGOUT; + while ((ahc_inb(ahc, SCSISIGI) & ACKI) != 0) + ; + ahc_outb(ahc, SCSISIGO, P_MESGOUT | BSYO); + + /* + * All phase line changes require a bus + * settle delay before REQ is asserted. + * [SCSI SPI4 10.7.1] + */ + ahc_flush_device_writes(ahc); + aic_delay(AHC_BUSSETTLE_DELAY); + ahc->msgin_index = 0; - /* Dummy read to REQ for first byte */ - ahc_inb(ahc, SCSIDATL); + /* Enable SCSI Programmed I/O to REQ for first byte */ ahc_outb(ahc, SXFRCTL0, ahc_inb(ahc, SXFRCTL0) | SPIOEN); break; @@ -2874,6 +2903,11 @@ /* * Present the next byte on the bus. */ +#ifdef AHC_DEBUG + if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) + printf(" byte 0x%x\n", + ahc->msgout_buf[ahc->msgout_index]); +#endif ahc_outb(ahc, SXFRCTL0, ahc_inb(ahc, SXFRCTL0) | SPIOEN); ahc_outb(ahc, SCSIDATL, ahc->msgout_buf[ahc->msgout_index++]); break; @@ -2883,6 +2917,12 @@ int lastbyte; int msgdone; +#ifdef AHC_DEBUG + if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) { + ahc_print_devinfo(ahc, &devinfo); + printf("TARGET_MSG_OUT"); + } +#endif /* * The initiator signals that this is * the last byte by dropping ATN. @@ -2896,6 +2936,13 @@ */ ahc_outb(ahc, SXFRCTL0, ahc_inb(ahc, SXFRCTL0) & ~SPIOEN); ahc->msgin_buf[ahc->msgin_index] = ahc_inb(ahc, SCSIDATL); + +#ifdef AHC_DEBUG + if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) + printf(" byte 0x%x\n", + ahc->msgin_buf[ahc->msgin_index]); +#endif + msgdone = ahc_parse_msg(ahc, &devinfo); if (msgdone == MSGLOOP_TERMINATED) { /* @@ -2921,7 +2968,33 @@ * to the Message in phase and send it. */ if (ahc->msgout_len != 0) { +#ifdef AHC_DEBUG + if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) { + ahc_print_devinfo(ahc, &devinfo); + printf(" preparing response.\n"); + } +#endif ahc_outb(ahc, SCSISIGO, P_MESGIN | BSYO); + + /* + * All phase line changes require a bus + * settle delay before REQ is asserted. + * [SCSI SPI4 10.7.1] When transitioning + * from an OUT to an IN phase, we must + * also wait a data release delay to allow + * the initiator time to release the data + * lines. [SCSI SPI4 10.12] + */ + ahc_flush_device_writes(ahc); + aic_delay(AHC_BUSSETTLE_DELAY + + AHC_DATARELEASE_DELAY); + + /* + * Enable SCSI Programmed I/O. This will + * immediately cause SPIORDY to assert, + * and the sequencer will call our message + * loop again. + */ ahc_outb(ahc, SXFRCTL0, ahc_inb(ahc, SXFRCTL0) | SPIOEN); ahc->msg_type = MSG_TYPE_TARGET_MSGIN; @@ -7052,7 +7125,7 @@ active_scb = ahc_lookup_scb(ahc, active_scb_index); if (active_scb != scb) { if (ahc_other_scb_timeout(ahc, scb, - active_scb) != 0) + active_scb) == 0) goto bus_reset; continue; } ==== //depot/projects/smpng/sys/dev/aic7xxx/aic7xxx.h#12 (text+ko) ==== @@ -39,7 +39,7 @@ * * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#85 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.52 2004/08/18 16:31:56 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.53 2004/10/19 20:48:06 gibbs Exp $ */ #ifndef _AIC7XXX_H_ @@ -181,6 +181,10 @@ /* Reset line assertion time in us */ #define AHC_BUSRESET_DELAY 25 +/* Phase change constants used in target mode. */ +#define AHC_BUSSETTLE_DELAY 400 +#define AHC_DATARELEASE_DELAY 400 + /******************* Chip Characteristics/Operating Settings *****************/ /* * Chip Type ==== //depot/projects/smpng/sys/dev/ata/ata-all.c#64 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.232 2004/10/13 15:16:35 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.233 2004/10/19 20:13:38 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -306,6 +306,12 @@ } } + ch->flags &= ~ATA_IMMEDIATE_MODE; + mtx_lock(&ch->state_mtx); + ch->state = ATA_IDLE; + mtx_unlock(&ch->state_mtx); + ch->locking(ch, ATA_LF_UNLOCK); + /* attach new devices */ if ((newdev = ~devices & ch->devices)) { if ((newdev & (ATA_ATA_MASTER | ATA_ATAPI_MASTER)) && @@ -323,12 +329,6 @@ if (bootverbose) ata_printf(ch, -1, "device config done ..\n"); - ch->flags &= ~ATA_IMMEDIATE_MODE; - mtx_lock(&ch->state_mtx); - ch->state = ATA_IDLE; - mtx_unlock(&ch->state_mtx); - ch->locking(ch, ATA_LF_UNLOCK); - ata_start(ch); return 0; } @@ -337,19 +337,19 @@ ata_suspend(device_t dev) { struct ata_channel *ch; - int gotit = 0; if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - while (!gotit) { + while (1) { mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { ch->state = ATA_ACTIVE; - gotit = 1; + mtx_unlock(&ch->state_mtx); + break; } mtx_unlock(&ch->state_mtx); - tsleep(&gotit, PRIBIO, "atasusp", hz/10); + tsleep(ch, PRIBIO, "atasusp", hz/10); } ch->locking(ch, ATA_LF_UNLOCK); return 0; ==== //depot/projects/smpng/sys/dev/ata/ata-card.c#21 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-card.c,v 1.26 2004/10/06 19:46:07 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-card.c,v 1.27 2004/10/19 10:29:00 le Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -91,7 +91,7 @@ static int ata_pccard_locknoop(struct ata_channel *ch, int type) { - return 1; + return ch->unit; } static void ==== //depot/projects/smpng/sys/dev/ata/ata-queue.c#22 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.37 2004/10/13 15:16:35 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.39 2004/10/20 10:11:05 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -182,15 +182,13 @@ /* check for the right state */ mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { + ATA_DEBUG_RQ(request, "starting"); TAILQ_REMOVE(&ch->ata_queue, request, chain); ch->running = request; - - ATA_DEBUG_RQ(request, "starting"); - + ch->state = ATA_ACTIVE; if (!dumping) callout_reset(&request->callout, request->timeout * hz, (timeout_t*)ata_timeout, request); - if (ch->hw.begin_transaction(request) == ATA_OP_FINISHED) { ch->running = NULL; ch->state = ATA_IDLE; @@ -200,8 +198,6 @@ ata_finish(request); return; } - else - ch->state = ATA_ACTIVE; } mtx_unlock(&ch->state_mtx); } @@ -242,14 +238,11 @@ /* if we had a timeout, reinit channel and deal with the falldown */ if (request->flags & ATA_R_TIMEOUT) { - int error = ata_reinit(ch); - - /* if our device disappeared return as cleanup was done already */ - if (!request->device->param) - return; - - /* if reinit succeeded and retries still permit, reinject request */ - if (!error && request->retries-- > 0) { + /* + * if reinit succeeds, retries still permit and device didn't + * get removed by the reinit, reinject request + */ + if (ata_reinit(ch) && request->retries-- > 0 && request->device->param){ request->flags &= ~(ATA_R_TIMEOUT | ATA_R_DEBUG); request->flags |= (ATA_R_IMMEDIATE | ATA_R_REQUEUE); ATA_DEBUG_RQ(request, "completed reinject"); ==== //depot/projects/smpng/sys/dev/bge/if_bge.c#47 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.75 2004/09/25 05:07:20 ps Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.76 2004/10/19 02:42:49 scottl Exp $"); /* * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. @@ -1935,7 +1935,7 @@ * Create tag for RX mbufs. */ nseg = 32; - error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, ETHER_ALIGN, + error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * nseg, nseg, MCLBYTES, 0, NULL, NULL, &sc->bge_cdata.bge_mtag); @@ -2024,7 +2024,7 @@ */ error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, - ETHER_ALIGN, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, + 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * nseg, nseg, BGE_JLEN, 0, NULL, NULL, &sc->bge_cdata.bge_mtag_jumbo); ==== //depot/projects/smpng/sys/dev/dcons/dcons_os.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.1 2004/10/13 05:38:42 simokawa Exp $ + * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.3 2004/10/18 21:51:25 phk Exp $ */ #include <sys/param.h> @@ -294,12 +294,7 @@ s = spltty(); if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsolemode(tp, 0); ttsetwater(tp); } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { splx(s); @@ -493,7 +488,9 @@ static int dcons_drv_init(int stage) { +#ifdef __i386__ int addr, size; +#endif if (drv_init) return(drv_init); ==== //depot/projects/smpng/sys/dev/digi/digi.c#27 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/digi/digi.c,v 1.56 2004/10/06 20:01:49 phk Exp $ + * $FreeBSD: src/sys/dev/digi/digi.c,v 1.57 2004/10/18 21:51:25 phk Exp $ */ /*- @@ -85,9 +85,6 @@ fepcmd(port, cmd, (op2 << 8) | op1, ncmds) #define fepcmd_w fepcmd - -static speed_t digidefaultrate = TTYDEF_SPEED; - struct con_bios { struct con_bios *next; u_char *bios; @@ -589,19 +586,7 @@ bc->edelay = 100; - /* - * We don't use all the flags from <sys/ttydefaults.h> since - * they are only relevant for logins. It's important to have - * echo off initially so that the line doesn't start blathering - * before the echo flag can be turned off. - */ - tp->t_init_in.c_iflag = 0; - tp->t_init_in.c_oflag = 0; - tp->t_init_in.c_cflag = TTYDEF_CFLAG; - tp->t_init_in.c_lflag = 0; - termioschars(&tp->t_init_in); - tp->t_init_in.c_ispeed = tp->t_init_in.c_ospeed = digidefaultrate; - tp->t_init_out = tp->t_init_in; + ttyinitmode(tp, 0, 0); port->send_ring = 1; /* Default action on signal RI */ ttycreate(tp, NULL, 0, MINOR_CALLOUT, "D%r%r", sc->res.unit, i); } ==== //depot/projects/smpng/sys/dev/digi/digi.h#10 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/digi/digi.h,v 1.18 2004/10/06 20:01:49 phk Exp $ + * $FreeBSD: src/sys/dev/digi/digi.h,v 1.19 2004/10/14 18:37:59 phk Exp $ */ #define W(p) (*(u_int16_t *)(p)) @@ -163,7 +163,6 @@ #endif struct digi_p *ports; /* pointer to array of port descriptors */ - struct tty *ttys; /* pointer to array of TTY structures */ volatile struct global_data *gdata; u_char window; /* saved window */ int win_size; ==== //depot/projects/smpng/sys/dev/ed/if_ed_pccard.c#24 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ed/if_ed_pccard.c,v 1.59 2004/07/21 20:38:12 imp Exp $ + * $FreeBSD: src/sys/dev/ed/if_ed_pccard.c,v 1.60 2004/10/20 04:54:50 imp Exp $ */ #include "opt_ed.h" @@ -123,6 +123,7 @@ #define NE2000DVF_AX88190 0x0002 /* chip is ASIX AX88190 */ } ed_pccard_products[] = { { PCMCIA_CARD(ACCTON, EN2212, 0), 0}, + { PCMCIA_CARD(ACCTON, EN2216, 0), 0}, { PCMCIA_CARD(ALLIEDTELESIS, LA_PCM, 0), 0}, { PCMCIA_CARD(AMBICOM, AMB8002T, 0), 0}, { PCMCIA_CARD(BILLIONTON, LNT10TN, 0), 0}, ==== //depot/projects/smpng/sys/dev/em/if_em.c#38 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.47 2004/10/09 07:27:03 scottl Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.50 2004/10/19 23:31:44 mux Exp $*/ #include <dev/em/if_em.h> @@ -1339,6 +1339,8 @@ * Advance the Transmit Descriptor Tail (Tdt), this tells the E1000 * that this frame is available to transmit. */ + bus_dmamap_sync(adapter->txdma.dma_tag, adapter->txdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (adapter->hw.mac_type == em_82547 && adapter->link_duplex == HALF_DUPLEX) { em_82547_move_tail_locked(adapter); @@ -2056,13 +2058,6 @@ goto fail_0; } - r = bus_dmamap_create(dma->dma_tag, BUS_DMA_NOWAIT, &dma->dma_map); - if (r != 0) { - printf("em%d: em_dma_malloc: bus_dmamap_create failed; " - "error %u\n", adapter->unit, r); - goto fail_1; - } - r = bus_dmamem_alloc(dma->dma_tag, (void**) &dma->dma_vaddr, BUS_DMA_NOWAIT, &dma->dma_map); if (r != 0) { @@ -2090,8 +2085,6 @@ bus_dmamap_unload(dma->dma_tag, dma->dma_map); fail_2: bus_dmamem_free(dma->dma_tag, dma->dma_vaddr, dma->dma_map); -fail_1: - bus_dmamap_destroy(dma->dma_tag, dma->dma_map); bus_dma_tag_destroy(dma->dma_tag); fail_0: dma->dma_map = NULL; @@ -2104,7 +2097,6 @@ { bus_dmamap_unload(dma->dma_tag, dma->dma_map); bus_dmamem_free(dma->dma_tag, dma->dma_vaddr, dma->dma_map); - bus_dmamap_destroy(dma->dma_tag, dma->dma_map); bus_dma_tag_destroy(dma->dma_tag); } @@ -2145,7 +2137,7 @@ * Setup DMA descriptor areas. */ if (bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -2400,6 +2392,8 @@ tx_buffer = &adapter->tx_buffer_area[i]; tx_desc = &adapter->tx_desc_base[i]; + bus_dmamap_sync(adapter->txdma.dma_tag, adapter->txdma.dma_map, + BUS_DMASYNC_POSTREAD); while (tx_desc->upper.fields.status & E1000_TXD_STAT_DD) { tx_desc->upper.data = 0; @@ -2407,8 +2401,6 @@ if (tx_buffer->m_head) { ifp->if_opackets++; - bus_dmamap_sync(adapter->txtag, tx_buffer->map, - BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(adapter->txtag, tx_buffer->map); bus_dmamap_destroy(adapter->txtag, tx_buffer->map); @@ -2422,6 +2414,8 @@ tx_buffer = &adapter->tx_buffer_area[i]; tx_desc = &adapter->tx_desc_base[i]; } + bus_dmamap_sync(adapter->txdma.dma_tag, adapter->txdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); adapter->oldest_used_tx_desc = i; @@ -2523,7 +2517,7 @@ sizeof(struct em_buffer) * adapter->num_rx_desc); error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -2561,6 +2555,8 @@ return(error); } } + bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); return(0); @@ -2746,6 +2742,8 @@ ifp = &adapter->interface_data.ac_if; i = adapter->next_rx_desc_to_check; current_desc = &adapter->rx_desc_base[i]; + bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map, + BUS_DMASYNC_POSTREAD); if (!((current_desc->status) & E1000_RXD_STAT_DD)) { #ifdef DBG_STATS @@ -2893,6 +2891,8 @@ } else current_desc++; } + bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); adapter->next_rx_desc_to_check = i; return; } ==== //depot/projects/smpng/sys/dev/ex/if_ex.c#14 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ex/if_ex.c,v 1.53 2004/08/13 23:06:55 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ex/if_ex.c,v 1.54 2004/10/17 21:44:11 glebius Exp $"); /* * Intel EtherExpress Pro/10, Pro/10+ Ethernet driver @@ -697,7 +697,7 @@ ipkt->m_len = MHLEN; while (pkt_len > 0) { - if (pkt_len > MINCLSIZE) { + if (pkt_len >= MINCLSIZE) { MCLGET(m, M_DONTWAIT); if (m->m_flags & M_EXT) { m->m_len = MCLBYTES; ==== //depot/projects/smpng/sys/dev/fdc/fdc.c#12 (text+ko) ==== @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.296 2004/10/10 23:39:59 peadar Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.298 2004/10/15 04:54:16 njl Exp $"); #include "opt_fdc.h" @@ -1682,7 +1682,6 @@ device_t fdc_add_child(device_t dev, const char *name, int unit) { - int flags; struct fdc_ivars *ivar; device_t child; @@ -1697,8 +1696,6 @@ device_set_ivars(child, ivar); ivar->fdunit = unit; ivar->fdtype = FDT_NONE; - if (resource_int_value(name, unit, "flags", &flags) == 0) - device_set_flags(child, flags); if (resource_disabled(name, unit)) device_disable(child); return (child); ==== //depot/projects/smpng/sys/dev/hifn/hifn7751.c#18 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/hifn/hifn7751.c,v 1.28 2004/07/04 16:11:01 stefanf Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hifn/hifn7751.c,v 1.30 2004/10/15 03:54:56 sam Exp $"); /* * Driver for various Hifn encryption processors. @@ -465,10 +465,9 @@ rbase = 'M'; rseg /= 1024; } - device_printf(sc->sc_dev, "%s, rev %u, %d%cB %cram, %u sessions\n", + device_printf(sc->sc_dev, "%s, rev %u, %d%cB %cram\n", hifn_partname(sc), rev, - rseg, rbase, sc->sc_drammodel ? 'd' : 's', >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410211555.i9LFtYmY048903>