Date: Mon, 1 Jun 2009 12:35:45 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 163255 for review Message-ID: <200906011235.n51CZjpZ066438@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163255 Change 163255 by hselasky@hselasky_laptop001 on 2009/06/01 12:34:50 IFC @163252 Affected files ... .. //depot/projects/usb/src/sys/arm/xscale/ixp425/if_npe.c#10 integrate .. //depot/projects/usb/src/sys/arm/xscale/ixp425/ixp425_qmgr.c#6 integrate .. //depot/projects/usb/src/sys/arm/xscale/ixp425/ixp425_qmgr.h#2 integrate .. //depot/projects/usb/src/sys/boot/common/boot.c#2 integrate .. //depot/projects/usb/src/sys/boot/uboot/lib/net.c#5 integrate .. //depot/projects/usb/src/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c#4 integrate .. //depot/projects/usb/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c#3 integrate .. //depot/projects/usb/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#6 integrate .. //depot/projects/usb/src/sys/compat/linux/linux_socket.c#13 integrate .. //depot/projects/usb/src/sys/compat/svr4/svr4_stat.c#7 integrate .. //depot/projects/usb/src/sys/conf/NOTES#38 integrate .. //depot/projects/usb/src/sys/conf/files.powerpc#24 integrate .. //depot/projects/usb/src/sys/conf/options#30 integrate .. //depot/projects/usb/src/sys/dev/ata/chipsets/ata-intel.c#5 integrate .. //depot/projects/usb/src/sys/dev/bge/if_bge.c#18 integrate .. //depot/projects/usb/src/sys/dev/dc/if_dc.c#11 integrate .. //depot/projects/usb/src/sys/dev/e1000/if_em.c#7 integrate .. //depot/projects/usb/src/sys/dev/firewire/if_fwe.c#6 integrate .. //depot/projects/usb/src/sys/dev/firewire/if_fwip.c#8 integrate .. //depot/projects/usb/src/sys/dev/fxp/if_fxp.c#11 integrate .. //depot/projects/usb/src/sys/dev/ixgb/if_ixgb.c#6 integrate .. //depot/projects/usb/src/sys/dev/lmc/if_lmc.c#12 integrate .. //depot/projects/usb/src/sys/dev/lmc/if_lmc.h#7 integrate .. //depot/projects/usb/src/sys/dev/mge/if_mge.c#4 integrate .. //depot/projects/usb/src/sys/dev/nfe/if_nfe.c#10 integrate .. //depot/projects/usb/src/sys/dev/nge/if_nge.c#8 integrate .. //depot/projects/usb/src/sys/dev/re/if_re.c#19 integrate .. //depot/projects/usb/src/sys/dev/sf/if_sf.c#2 integrate .. //depot/projects/usb/src/sys/dev/sis/if_sis.c#5 integrate .. //depot/projects/usb/src/sys/dev/smc/if_smc.c#3 integrate .. //depot/projects/usb/src/sys/dev/ste/if_ste.c#2 integrate .. //depot/projects/usb/src/sys/dev/stge/if_stge.c#7 integrate .. //depot/projects/usb/src/sys/dev/syscons/scterm-teken.c#5 integrate .. //depot/projects/usb/src/sys/dev/syscons/teken/sequences#3 integrate .. //depot/projects/usb/src/sys/dev/syscons/teken/teken.c#7 integrate .. //depot/projects/usb/src/sys/dev/syscons/teken/teken.h#6 integrate .. //depot/projects/usb/src/sys/dev/syscons/teken/teken_subr_compat.h#3 integrate .. //depot/projects/usb/src/sys/dev/tsec/if_tsec.c#4 integrate .. //depot/projects/usb/src/sys/dev/usb/storage/umass.c#22 integrate .. //depot/projects/usb/src/sys/dev/usb/usbdevs#62 integrate .. //depot/projects/usb/src/sys/dev/usb/wlan/if_zyd.c#16 integrate .. //depot/projects/usb/src/sys/dev/vge/if_vge.c#9 integrate .. //depot/projects/usb/src/sys/dev/vr/if_vr.c#5 integrate .. //depot/projects/usb/src/sys/dev/xl/if_xl.c#5 integrate .. //depot/projects/usb/src/sys/fs/nfsclient/nfs_clbio.c#4 integrate .. //depot/projects/usb/src/sys/fs/nfsclient/nfs_clnode.c#4 integrate .. //depot/projects/usb/src/sys/fs/nfsclient/nfs_clvnops.c#4 integrate .. //depot/projects/usb/src/sys/fs/nfsserver/nfs_nfsdport.c#5 integrate .. //depot/projects/usb/src/sys/fs/nullfs/null_subr.c#6 integrate .. //depot/projects/usb/src/sys/fs/nullfs/null_vnops.c#14 integrate .. //depot/projects/usb/src/sys/fs/pseudofs/pseudofs_vnops.c#14 integrate .. //depot/projects/usb/src/sys/geom/label/g_label.c#4 integrate .. //depot/projects/usb/src/sys/i386/include/apicvar.h#9 integrate .. //depot/projects/usb/src/sys/i386/xen/mp_machdep.c#10 integrate .. //depot/projects/usb/src/sys/kern/kern_cpu.c#9 integrate .. //depot/projects/usb/src/sys/kern/kern_poll.c#12 integrate .. //depot/projects/usb/src/sys/kern/kern_prot.c#12 integrate .. //depot/projects/usb/src/sys/kern/kern_vimage.c#6 integrate .. //depot/projects/usb/src/sys/kern/uipc_syscalls.c#14 integrate .. //depot/projects/usb/src/sys/kern/vfs_bio.c#23 integrate .. //depot/projects/usb/src/sys/kern/vfs_cache.c#23 integrate .. //depot/projects/usb/src/sys/kern/vfs_default.c#12 integrate .. //depot/projects/usb/src/sys/kern/vfs_mount.c#24 integrate .. //depot/projects/usb/src/sys/kern/vfs_subr.c#22 integrate .. //depot/projects/usb/src/sys/kern/vnode_if.src#14 integrate .. //depot/projects/usb/src/sys/modules/Makefile#34 integrate .. //depot/projects/usb/src/sys/modules/cpufreq/Makefile#4 integrate .. //depot/projects/usb/src/sys/modules/geom/geom_part/geom_part_ebr/Makefile#2 integrate .. //depot/projects/usb/src/sys/modules/usb/Makefile#19 integrate .. //depot/projects/usb/src/sys/modules/zfs/Makefile#10 integrate .. //depot/projects/usb/src/sys/net/if.c#26 integrate .. //depot/projects/usb/src/sys/net/if.h#11 integrate .. //depot/projects/usb/src/sys/net/if_var.h#18 integrate .. //depot/projects/usb/src/sys/net/netisr.c#8 integrate .. //depot/projects/usb/src/sys/net/netisr.h#6 integrate .. //depot/projects/usb/src/sys/net/rtsock.c#23 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_dfs.c#3 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_freebsd.c#17 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_ht.c#12 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_superg.c#6 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_tdma.c#10 integrate .. //depot/projects/usb/src/sys/netatalk/ddp_usrreq.c#7 integrate .. //depot/projects/usb/src/sys/netinet/if_ether.c#20 integrate .. //depot/projects/usb/src/sys/netinet/igmp.c#16 integrate .. //depot/projects/usb/src/sys/netinet/in.h#12 integrate .. //depot/projects/usb/src/sys/netinet/in_pcb.c#24 integrate .. //depot/projects/usb/src/sys/netinet/in_pcb.h#20 integrate .. //depot/projects/usb/src/sys/netinet/ip_divert.c#16 integrate .. //depot/projects/usb/src/sys/netinet/ip_input.c#22 integrate .. //depot/projects/usb/src/sys/netinet/ip_output.c#19 integrate .. //depot/projects/usb/src/sys/netinet/raw_ip.c#22 integrate .. //depot/projects/usb/src/sys/netinet/sctp_pcb.c#17 integrate .. //depot/projects/usb/src/sys/netinet/sctp_sysctl.c#14 integrate .. //depot/projects/usb/src/sys/netinet/sctp_sysctl.h#11 integrate .. //depot/projects/usb/src/sys/netinet/sctp_uio.h#17 integrate .. //depot/projects/usb/src/sys/netinet/sctputil.c#20 integrate .. //depot/projects/usb/src/sys/netinet6/in6.h#9 integrate .. //depot/projects/usb/src/sys/netinet6/in6_pcb.c#18 integrate .. //depot/projects/usb/src/sys/netinet6/ip6_input.c#21 integrate .. //depot/projects/usb/src/sys/netinet6/ip6_output.c#15 integrate .. //depot/projects/usb/src/sys/netinet6/vinet6.h#8 integrate .. //depot/projects/usb/src/sys/netipsec/ipsec_input.c#10 integrate .. //depot/projects/usb/src/sys/netipx/ipx_input.c#6 integrate .. //depot/projects/usb/src/sys/netnatm/natm_proto.c#4 integrate .. //depot/projects/usb/src/sys/nfsclient/nfs_bio.c#15 integrate .. //depot/projects/usb/src/sys/pci/if_rl.c#11 integrate .. //depot/projects/usb/src/sys/powerpc/aim/machdep.c#11 integrate .. //depot/projects/usb/src/sys/powerpc/booke/machdep.c#12 integrate .. //depot/projects/usb/src/sys/powerpc/conf/GENERIC#19 integrate .. //depot/projects/usb/src/sys/powerpc/conf/NOTES#13 integrate .. //depot/projects/usb/src/sys/powerpc/cpufreq/dfs.c#1 branch .. //depot/projects/usb/src/sys/powerpc/mpc85xx/atpic.c#2 integrate .. //depot/projects/usb/src/sys/powerpc/ofw/ofw_cpu.c#1 branch .. //depot/projects/usb/src/sys/powerpc/powermac/pmu.c#3 integrate .. //depot/projects/usb/src/sys/powerpc/powermac/vcoregpio.c#1 branch .. //depot/projects/usb/src/sys/powerpc/powerpc/cpu.c#9 integrate .. //depot/projects/usb/src/sys/rpc/xdr.h#4 integrate .. //depot/projects/usb/src/sys/sys/buf.h#8 integrate .. //depot/projects/usb/src/sys/sys/cpu.h#3 integrate .. //depot/projects/usb/src/sys/sys/mount.h#19 integrate .. //depot/projects/usb/src/sys/sys/param.h#33 integrate .. //depot/projects/usb/src/sys/sys/pcpu.h#10 integrate .. //depot/projects/usb/src/sys/sys/priv.h#15 integrate .. //depot/projects/usb/src/sys/sys/sockio.h#4 integrate .. //depot/projects/usb/src/sys/sys/syscallsubr.h#11 integrate .. //depot/projects/usb/src/sys/sys/vimage.h#13 integrate .. //depot/projects/usb/src/sys/sys/vnode.h#20 integrate .. //depot/projects/usb/src/sys/vm/vm_page.c#15 integrate .. //depot/projects/usb/src/sys/vm/vm_page.h#12 integrate .. //depot/projects/usb/src/sys/xen/evtchn/evtchn.c#7 integrate Differences ... ==== //depot/projects/usb/src/sys/arm/xscale/ixp425/if_npe.c#10 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.15 2009/05/23 19:14:20 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.17 2009/05/30 18:23:55 sam Exp $"); /* * Intel XScale NPE Ethernet driver. @@ -229,7 +229,7 @@ static void npe_txdone(int qid, void *arg); static int npe_rxbuf_init(struct npe_softc *, struct npebuf *, struct mbuf *); -static void npe_rxdone(int qid, void *arg); +static int npe_rxdone(int qid, void *arg); static void npeinit(void *); static void npestart_locked(struct ifnet *); static void npestart(struct ifnet *); @@ -777,7 +777,7 @@ */ sc->rx_qid = npeconfig[sc->sc_npeid].rx_qid; ixpqmgr_qconfig(sc->rx_qid, npe_rxbuf, 0, 1, - IX_QMGR_Q_SOURCE_ID_NOT_E, npe_rxdone, sc); + IX_QMGR_Q_SOURCE_ID_NOT_E, (qconfig_hand_t *)npe_rxdone, sc); sc->rx_freeqid = npeconfig[sc->sc_npeid].rx_freeqid; ixpqmgr_qconfig(sc->rx_freeqid, npe_rxbuf, 0, npe_rxbuf/2, 0, NULL, sc); /* @@ -1091,7 +1091,7 @@ * from the hardware queue and pass the frames up the * stack. Pass the rx buffers to the free list. */ -static void +static int npe_rxdone(int qid, void *arg) { #define P2V(a, dma) \ @@ -1099,6 +1099,7 @@ struct npe_softc *sc = arg; struct npedma *dma = &sc->rxdma; uint32_t entry; + int rx_npkts = 0; while (ixpqmgr_qread(qid, &entry) == 0) { struct npebuf *npe = P2V(NPE_QM_Q_ADDR(entry), dma); @@ -1132,6 +1133,7 @@ ifp->if_ipackets++; ifp->if_input(ifp, mrx); + rx_npkts++; } else { /* discard frame and re-use mbuf */ m = npe->ix_m; @@ -1143,19 +1145,22 @@ /* XXX should not happen */ } } + return rx_npkts; #undef P2V } #ifdef DEVICE_POLLING -static void +static int npe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct npe_softc *sc = ifp->if_softc; + int rx_npkts = 0; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - npe_rxdone(sc->rx_qid, sc); + rx_npkts = npe_rxdone(sc->rx_qid, sc); npe_txdone(sc->tx_doneqid, sc); /* XXX polls both NPE's */ } + return rx_npkts; } #endif /* DEVICE_POLLING */ ==== //depot/projects/usb/src/sys/arm/xscale/ixp425/ixp425_qmgr.c#6 (text+ko) ==== @@ -57,7 +57,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_qmgr.c,v 1.5 2008/12/20 03:26:09 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_qmgr.c,v 1.6 2009/05/30 15:14:44 attilio Exp $"); /* * Intel XScale Queue Manager support. @@ -338,7 +338,7 @@ int ixpqmgr_qconfig(int qId, int qEntries, int ne, int nf, int srcSel, - void (*cb)(int, void *), void *cbarg) + qconfig_hand_t *cb, void *cbarg) { struct ixpqmgr_softc *sc = ixpqmgr_sc; struct qmgrInfo *qi = &sc->qinfo[qId]; ==== //depot/projects/usb/src/sys/arm/xscale/ixp425/ixp425_qmgr.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. * - * $FreeBSD: src/sys/arm/xscale/ixp425/ixp425_qmgr.h,v 1.1 2006/11/19 23:55:23 sam Exp $ + * $FreeBSD: src/sys/arm/xscale/ixp425/ixp425_qmgr.h,v 1.2 2009/05/30 15:14:44 attilio Exp $ */ /*- @@ -229,8 +229,10 @@ #define IX_QMGR_ENTRY2_OFFSET 1 #define IX_QMGR_ENTRY4_OFFSET 3 +typedef void qconfig_hand_t(int, void *); + int ixpqmgr_qconfig(int qId, int qSizeInWords, int ne, int nf, int srcSel, - void (*cb)(int, void *), void *cbarg); + qconfig_hand_t *cb, void *cbarg); int ixpqmgr_qwrite(int qId, uint32_t entry); int ixpqmgr_qread(int qId, uint32_t *entry); int ixpqmgr_qreadm(int qId, uint32_t n, uint32_t *p); ==== //depot/projects/usb/src/sys/boot/common/boot.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/common/boot.c,v 1.31 2005/05/19 23:03:01 sobomax Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/boot.c,v 1.32 2009/06/01 01:02:30 rodrigc Exp $"); /* * Loading modules, booting the system @@ -287,7 +287,7 @@ int getrootmount(char *rootdev) { - char lbuf[128], *cp, *ep, *dev, *fstyp; + char lbuf[128], *cp, *ep, *dev, *fstyp, *options; int fd, error; if (getenv("vfs.root.mountfrom") != NULL) @@ -331,11 +331,30 @@ *cp = 0; fstyp = strdup(ep); - /* build the final result and save it */ + /* skip whitespace up to mount options */ + cp += 1; + while ((*cp != 0) && isspace(*cp)) + cp++; + if (*cp == 0) /* misformatted */ + continue; + /* skip text to end of mount options and delimit */ + ep = cp; + while ((*cp != 0) && !isspace(*cp)) + cp++; + *cp = 0; + options = strdup(ep); + /* Build the <fstype>:<device> and save it in vfs.root.mountfrom */ sprintf(lbuf, "%s:%s", fstyp, dev); free(dev); free(fstyp); setenv("vfs.root.mountfrom", lbuf, 0); + + /* Don't override vfs.root.mountfrom.options if it is already set */ + if (getenv("vfs.root.mountfrom.options") == NULL) { + /* save mount options */ + setenv("vfs.root.mountfrom.options", options, 0); + } + free(options); error = 0; break; } ==== //depot/projects/usb/src/sys/boot/uboot/lib/net.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/uboot/lib/net.c,v 1.7 2008/11/19 17:34:28 raj Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/uboot/lib/net.c,v 1.8 2009/05/30 19:28:38 marcel Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -46,12 +46,6 @@ #include "glue.h" #include "libuboot.h" -#define NETIF_DEBUG -#define NETIF_VERBOSE_DEBUG -#undef NETIF_DEBUG -#undef NETIF_VERBOSE_DEBUG - - static int net_probe(struct netif *, void *); static int net_match(struct netif *, void *); static void net_init(struct iodesc *, void *); @@ -138,7 +132,7 @@ #if defined(NETIF_DEBUG) struct ether_header *eh; - printf("net_put: desc 0x%x, pkt 0x%x, len %d\n", desc, pkt, len); + printf("net_put: desc %p, pkt %p, len %d\n", desc, pkt, len); eh = pkt; printf("dst: %s ", ether_sprintf(eh->ether_dhost)); printf("src: %s ", ether_sprintf(eh->ether_shost)); @@ -175,7 +169,7 @@ int err, rlen; #if defined(NETIF_DEBUG) - printf("net_get: pkt %x, len %d, timeout %d\n", pkt, len, timeout); + printf("net_get: pkt %p, len %d, timeout %d\n", pkt, len, timeout); #endif t = getsecs(); do { ==== //depot/projects/usb/src/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c#4 (text+ko) ==== @@ -564,8 +564,13 @@ if (fp->gfs_parent == NULL || (vp->v_flag & V_XATTRDIR)) goto found; - dp = fp->gfs_parent->v_data; - + /* + * XXX cope with a FreeBSD-specific race wherein the parent's + * snapshot data can be freed before the parent is + */ + if ((dp = fp->gfs_parent->v_data) == NULL) + return (NULL); + /* * First, see if this vnode is cached in the parent. */ ==== //depot/projects/usb/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c#3 (text+ko) ==== @@ -2392,13 +2392,23 @@ /* * Check the vdev configuration to ensure that it's capable of supporting - * a root pool. Currently, we do not support RAID-Z or partial configuration. - * In addition, only a single top-level vdev is allowed and none of the leaves - * can be wholedisks. + * a root pool. + * + * On Solaris, we do not support RAID-Z or partial configuration. In + * addition, only a single top-level vdev is allowed and none of the + * leaves can be wholedisks. + * + * For FreeBSD, we can boot from any configuration. There is a + * limitation that the boot filesystem must be either uncompressed or + * compresses with lzjb compression but I'm not sure how to enforce + * that here. */ boolean_t vdev_is_bootable(vdev_t *vd) { +#ifdef __FreeBSD_version + return (B_TRUE); +#else int c; if (!vd->vdev_ops->vdev_op_leaf) { @@ -2420,4 +2430,5 @@ return (B_FALSE); } return (B_TRUE); +#endif } ==== //depot/projects/usb/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#6 (text+ko) ==== @@ -3121,3 +3121,4 @@ }; DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1); +MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1); ==== //depot/projects/usb/src/sys/compat/linux/linux_socket.c#13 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.92 2009/05/19 09:10:53 dchagin Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.95 2009/05/31 12:16:31 dchagin Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -445,8 +445,6 @@ return (-1); } - - static int linux_to_bsd_msghdr(struct msghdr *bhdr, const struct l_msghdr *lhdr) { @@ -477,6 +475,24 @@ } static int +linux_set_socket_flags(struct thread *td, int s, int flags) +{ + int error; + + if (flags & LINUX_SOCK_NONBLOCK) { + error = kern_fcntl(td, s, F_SETFL, O_NONBLOCK); + if (error) + return (error); + } + if (flags & LINUX_SOCK_CLOEXEC) { + error = kern_fcntl(td, s, F_SETFD, FD_CLOEXEC); + if (error) + return (error); + } + return (0); +} + +static int linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg) { @@ -610,21 +626,11 @@ if (retval_socket) return (retval_socket); - if (socket_flags & LINUX_SOCK_NONBLOCK) { - retval_socket = kern_fcntl(td, td->td_retval[0], - F_SETFL, O_NONBLOCK); - if (retval_socket) { - (void)kern_close(td, td->td_retval[0]); - goto out; - } - } - if (socket_flags & LINUX_SOCK_CLOEXEC) { - retval_socket = kern_fcntl(td, td->td_retval[0], - F_SETFD, FD_CLOEXEC); - if (retval_socket) { - (void)kern_close(td, td->td_retval[0]); - goto out; - } + retval_socket = linux_set_socket_flags(td, td->td_retval[0], + socket_flags); + if (retval_socket) { + (void)kern_close(td, td->td_retval[0]); + goto out; } if (bsd_args.type == SOCK_RAW @@ -878,12 +884,20 @@ int protocol; int *rsv; } */ bsd_args; + int error, socket_flags; + int sv[2]; bsd_args.domain = linux_to_bsd_domain(args->domain); if (bsd_args.domain != PF_LOCAL) return (EAFNOSUPPORT); - bsd_args.type = args->type; + socket_flags = args->type & ~LINUX_SOCK_TYPE_MASK; + if (socket_flags & ~(LINUX_SOCK_CLOEXEC | LINUX_SOCK_NONBLOCK)) + return (EINVAL); + bsd_args.type = args->type & LINUX_SOCK_TYPE_MASK; + if (bsd_args.type < 0 || bsd_args.type > LINUX_SOCK_MAX) + return (EINVAL); + if (args->protocol != 0 && args->protocol != PF_UNIX) /* @@ -896,7 +910,25 @@ else bsd_args.protocol = 0; bsd_args.rsv = (int *)PTRIN(args->rsv); - return (socketpair(td, &bsd_args)); + error = kern_socketpair(td, bsd_args.domain, bsd_args.type, + bsd_args.protocol, sv); + if (error) + return (error); + error = linux_set_socket_flags(td, sv[0], socket_flags); + if (error) + goto out; + error = linux_set_socket_flags(td, sv[1], socket_flags); + if (error) + goto out; + + error = copyout(sv, bsd_args.rsv, 2 * sizeof(int)); + +out: + if (error) { + (void)kern_close(td, sv[0]); + (void)kern_close(td, sv[1]); + } + return (error); } struct linux_send_args { ==== //depot/projects/usb/src/sys/compat/svr4/svr4_stat.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stat.c,v 1.30 2009/05/29 21:27:12 jamie Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stat.c,v 1.31 2009/05/30 07:33:32 delphij Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -458,7 +458,10 @@ break; case SVR4_SI_HW_SERIAL: - snprintf(buf, sizeof(buf), "%lu", hostid); + pr = td->td_ucred->cr_prison; + mtx_lock(&pr->pr_mtx); + snprintf(buf, sizeof(buf), "%lu", pr->pr_hostid); + mtx_unlock(&pr->pr_mtx); str = buf; break; ==== //depot/projects/usb/src/sys/conf/NOTES#38 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1542 2009/05/29 01:49:27 attilio Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1543 2009/06/01 10:30:00 pjd Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -639,14 +639,6 @@ options ALTQ_NOPCC # Required if the TSC is unusable options ALTQ_DEBUG -# IP optional behaviour. -# IP_NONLOCALBIND disables the check that bind() usually makes that the -# address is one that is assigned to an interface on this machine. -# It allows transparent proxies to pretend to be other machines. -# How the packet GET to that machine is a problem solved elsewhere, -# smart routers, ipfw fwd, etc. -options IP_NONLOCALBIND # Allow impersonation for proxies. - # netgraph(4). Enable the base netgraph code with the NETGRAPH option. # Individual node types can be enabled with the corresponding option # listed below; however, this is not strictly necessary as netgraph ==== //depot/projects/usb/src/sys/conf/files.powerpc#24 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.powerpc,v 1.101 2009/05/21 11:43:37 raj Exp $ +# $FreeBSD: src/sys/conf/files.powerpc,v 1.102 2009/05/31 09:01:23 nwhitehorn Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -97,6 +97,7 @@ powerpc/booke/swtch.S optional e500 powerpc/booke/trap.c optional e500 powerpc/booke/vm_machdep.c optional e500 +powerpc/cpufreq/dfs.c optional cpufreq powerpc/fpu/fpu_add.c optional fpu_emu powerpc/fpu/fpu_compare.c optional fpu_emu powerpc/fpu/fpu_div.c optional fpu_emu @@ -114,6 +115,7 @@ powerpc/mpc85xx/ocpbus.c optional mpc85xx powerpc/mpc85xx/opic.c optional mpc85xx powerpc/mpc85xx/pci_ocp.c optional pci mpc85xx +powerpc/ofw/ofw_cpu.c optional aim powerpc/ofw/ofw_pcibus.c optional pci aim powerpc/ofw/ofw_pcib_pci.c optional pci aim powerpc/ofw/ofw_real.c optional aim @@ -133,6 +135,7 @@ powerpc/powermac/pmu.c optional powermac pmu powerpc/powermac/macgpio.c optional powermac pci powerpc/powermac/cpcht.c optional powermac pci +powerpc/powermac/vcoregpio.c optional powermac powerpc/powerpc/altivec.c optional aim powerpc/powerpc/atomic.S standard powerpc/powerpc/autoconf.c standard ==== //depot/projects/usb/src/sys/conf/options#30 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.671 2009/05/29 01:49:27 attilio Exp $ +# $FreeBSD: src/sys/conf/options,v 1.672 2009/06/01 10:30:00 pjd Exp $ # # On the handling of kernel options # @@ -400,7 +400,6 @@ IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h -IP_NONLOCALBIND opt_inet.h IPSEC_FILTERTUNNEL opt_ipsec.h IPSTEALTH IPX ==== //depot/projects/usb/src/sys/dev/ata/chipsets/ata-intel.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-intel.c,v 1.5 2009/03/30 22:18:38 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-intel.c,v 1.6 2009/06/01 07:05:52 delphij Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -104,9 +104,9 @@ { ATA_I82801GB_S1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7" }, { ATA_I82801GB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7" }, { ATA_I82801GB_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7" }, - { ATA_I82801GBM_S1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7M" }, - { ATA_I82801GBM_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7M" }, - { ATA_I82801GBM_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7M" }, + { ATA_I82801GBM_S1, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" }, + { ATA_I82801GBM_R1, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" }, + { ATA_I82801GBM_AH, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" }, { ATA_I63XXESB2, 0, 0, 1, ATA_UDMA5, "63XXESB2" }, { ATA_I63XXESB2_S1, 0, INTEL_AHCI, 0, ATA_SA300, "63XXESB2" }, { ATA_I63XXESB2_S2, 0, INTEL_AHCI, 0, ATA_SA300, "63XXESB2" }, ==== //depot/projects/usb/src/sys/dev/bge/if_bge.c#18 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.222 2009/05/14 22:36:56 delphij Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.225 2009/05/30 17:56:19 attilio Exp $"); /* * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. @@ -332,7 +332,7 @@ static int bge_get_eaddr(struct bge_softc *, uint8_t[]); static void bge_txeof(struct bge_softc *); -static void bge_rxeof(struct bge_softc *); +static int bge_rxeof(struct bge_softc *); static void bge_asf_driver_up (struct bge_softc *); static void bge_tick(void *); @@ -390,7 +390,7 @@ static int bge_miibus_writereg(device_t, int, int, int); static void bge_miibus_statchg(device_t); #ifdef DEVICE_POLLING -static void bge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); +static int bge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif #define BGE_RESET_START 1 @@ -3050,18 +3050,18 @@ * 2) the frame is from the standard receive ring */ -static void +static int bge_rxeof(struct bge_softc *sc) { struct ifnet *ifp; - int stdcnt = 0, jumbocnt = 0; + int rx_npkts = 0, stdcnt = 0, jumbocnt = 0; BGE_LOCK_ASSERT(sc); /* Nothing to do. */ if (sc->bge_rx_saved_considx == sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx) - return; + return (rx_npkts); ifp = sc->bge_ifp; @@ -3193,9 +3193,10 @@ BGE_UNLOCK(sc); (*ifp->if_input)(ifp, m); BGE_LOCK(sc); + rx_npkts++; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) - return; + return (rx_npkts); } if (stdcnt > 0) @@ -3219,6 +3220,7 @@ if (BGE_IS_5705_PLUS(sc)) ifp->if_ierrors += CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_DROPS); #endif + return (rx_npkts); } static void @@ -3271,16 +3273,17 @@ } #ifdef DEVICE_POLLING -static void +static int bge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct bge_softc *sc = ifp->if_softc; uint32_t statusword; - + int rx_npkts = 0; + BGE_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { BGE_UNLOCK(sc); - return; + return (rx_npkts); } bus_dmamap_sync(sc->bge_cdata.bge_status_tag, @@ -3303,16 +3306,17 @@ bge_link_upd(sc); sc->rxcycles = count; - bge_rxeof(sc); + rx_npkts = bge_rxeof(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { BGE_UNLOCK(sc); - return; + return (rx_npkts); } bge_txeof(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) bge_start_locked(ifp); BGE_UNLOCK(sc); + return (rx_npkts); } #endif /* DEVICE_POLLING */ ==== //depot/projects/usb/src/sys/dev/dc/if_dc.c#11 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.199 2009/03/09 13:23:54 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.200 2009/05/30 15:14:44 attilio Exp $"); /* * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143 @@ -236,7 +236,7 @@ static int dc_encap(struct dc_softc *, struct mbuf **); static void dc_pnic_rx_bug_war(struct dc_softc *, int); static int dc_rx_resync(struct dc_softc *); -static void dc_rxeof(struct dc_softc *); +static int dc_rxeof(struct dc_softc *); static void dc_txeof(struct dc_softc *); static void dc_tick(void *); static void dc_tx_underrun(struct dc_softc *); @@ -2640,19 +2640,21 @@ * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void +static int dc_rxeof(struct dc_softc *sc) { struct mbuf *m, *m0; struct ifnet *ifp; struct dc_desc *cur_rx; - int i, total_len = 0; + int i, total_len, rx_npkts; u_int32_t rxstat; DC_LOCK_ASSERT(sc); ifp = sc->dc_ifp; i = sc->dc_cdata.dc_rx_prod; + total_len = 0; + rx_npkts = 0; bus_dmamap_sync(sc->dc_ltag, sc->dc_lmap, BUS_DMASYNC_POSTREAD); while (!(le32toh(sc->dc_ldata->dc_rx_list[i].dc_status) & @@ -2706,7 +2708,7 @@ continue; } else { dc_init_locked(sc); - return; + return (rx_npkts); } } } @@ -2745,9 +2747,11 @@ DC_UNLOCK(sc); (*ifp->if_input)(ifp, m); DC_LOCK(sc); + rx_npkts++; } sc->dc_cdata.dc_rx_prod = i; + return (rx_npkts); } /* @@ -2989,20 +2993,21 @@ #ifdef DEVICE_POLLING static poll_handler_t dc_poll; -static void +static int dc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct dc_softc *sc = ifp->if_softc; + int rx_npkts = 0; DC_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { DC_UNLOCK(sc); - return; + return (rx_npkts); } sc->rxcycles = count; - dc_rxeof(sc); + rx_npkts = dc_rxeof(sc); dc_txeof(sc); if (!IFQ_IS_EMPTY(&ifp->if_snd) && !(ifp->if_drv_flags & IFF_DRV_OACTIVE)) @@ -3017,7 +3022,7 @@ DC_ISR_BUS_ERR); if (!status) { DC_UNLOCK(sc); - return; + return (rx_npkts); } /* ack what we have */ CSR_WRITE_4(sc, DC_ISR, status); @@ -3043,6 +3048,7 @@ } } DC_UNLOCK(sc); + return (rx_npkts); } #endif /* DEVICE_POLLING */ ==== //depot/projects/usb/src/sys/dev/e1000/if_em.c#7 (text+ko) ==== @@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ -/*$FreeBSD: src/sys/dev/e1000/if_em.c,v 1.15 2009/05/14 03:33:04 kmacy Exp $*/ +/*$FreeBSD: src/sys/dev/e1000/if_em.c,v 1.16 2009/05/30 15:14:44 attilio Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -261,7 +261,7 @@ static void em_tx_purge(struct adapter *); static int em_allocate_receive_structures(struct adapter *); static int em_allocate_transmit_structures(struct adapter *); -static int em_rxeof(struct adapter *, int); +static int em_rxeof(struct adapter *, int, int *); #ifndef __NO_STRICT_ALIGNMENT static int em_fixup_rx(struct adapter *); #endif @@ -1653,16 +1653,20 @@ * Legacy polling routine * *********************************************************************/ -static void +static int em_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct adapter *adapter = ifp->if_softc; + struct adapter *adapter; u32 reg_icr; + int rx_npkts; + adapter = ifp->if_softc; + rx_npkts = 0; + EM_CORE_LOCK(adapter); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { EM_CORE_UNLOCK(adapter); - return; + return (rx_npkts); } if (cmd == POLL_AND_CHECK_STATUS) { @@ -1677,7 +1681,7 @@ } EM_CORE_UNLOCK(adapter); - em_rxeof(adapter, count); + em_rxeof(adapter, count, &rx_npkts); EM_TX_LOCK(adapter); em_txeof(adapter); @@ -1685,6 +1689,7 @@ if (!ADAPTER_RING_EMPTY(adapter)) em_start_locked(ifp); EM_TX_UNLOCK(adapter); + return (rx_npkts); } #endif /* DEVICE_POLLING */ @@ -1718,7 +1723,7 @@ EM_TX_LOCK(adapter); em_txeof(adapter); - em_rxeof(adapter, -1); + em_rxeof(adapter, -1, NULL); em_txeof(adapter); EM_TX_UNLOCK(adapter); @@ -1771,7 +1776,7 @@ if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (em_rxeof(adapter, adapter->rx_process_limit) != 0) + if (em_rxeof(adapter, adapter->rx_process_limit, NULL) != 0) taskqueue_enqueue(adapter->tq, &adapter->rxtx_task); EM_TX_LOCK(adapter); em_txeof(adapter); @@ -1882,7 +1887,7 @@ ++adapter->rx_irq; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && - (em_rxeof(adapter, adapter->rx_process_limit) != 0)) + (em_rxeof(adapter, adapter->rx_process_limit, NULL) != 0)) taskqueue_enqueue(adapter->tq, &adapter->rx_task); /* Reenable this interrupt */ E1000_WRITE_REG(&adapter->hw, E1000_IMS, EM_MSIX_RX); @@ -1920,7 +1925,7 @@ struct ifnet *ifp = adapter->ifp; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && - (em_rxeof(adapter, adapter->rx_process_limit) != 0)) + (em_rxeof(adapter, adapter->rx_process_limit, NULL) != 0)) taskqueue_enqueue(adapter->tq, &adapter->rx_task); } @@ -4461,23 +4466,26 @@ * *********************************************************************/ static int -em_rxeof(struct adapter *adapter, int count) +em_rxeof(struct adapter *adapter, int count, int *rx_npktsp) { struct ifnet *ifp = adapter->ifp;; struct mbuf *mp; u8 status, accept_frame = 0, eop = 0; >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906011235.n51CZjpZ066438>
