Date: Wed, 18 Jun 2008 21:28:05 GMT From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 143718 for review Message-ID: <200806182128.m5ILS5Jc022133@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143718 Change 143718 by julian@julian_trafmon1 on 2008/06/18 21:27:56 IFC@143713 Affected files ... .. //depot/projects/vimage/src/sys/boot/i386/libi386/time.c#2 integrate .. //depot/projects/vimage/src/sys/compat/ndis/subr_ntoskrnl.c#8 integrate .. //depot/projects/vimage/src/sys/ddb/db_ps.c#6 integrate .. //depot/projects/vimage/src/sys/dev/smc/if_smc.c#5 integrate .. //depot/projects/vimage/src/sys/fs/devfs/devfs_devs.c#5 integrate .. //depot/projects/vimage/src/sys/fs/devfs/devfs_int.h#4 integrate .. //depot/projects/vimage/src/sys/fs/devfs/devfs_vnops.c#14 integrate .. //depot/projects/vimage/src/sys/fs/tmpfs/tmpfs_subr.c#8 integrate .. //depot/projects/vimage/src/sys/geom/part/g_part.c#8 integrate .. //depot/projects/vimage/src/sys/geom/part/g_part.h#7 integrate .. //depot/projects/vimage/src/sys/geom/part/g_part_if.m#3 integrate .. //depot/projects/vimage/src/sys/geom/part/g_part_mbr.c#4 integrate .. //depot/projects/vimage/src/sys/kern/kern_conf.c#13 integrate .. //depot/projects/vimage/src/sys/kern/kern_dtrace.c#2 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_pcb.c#26 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_pcb.h#18 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_usrreq.c#27 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_var.h#18 integrate .. //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#27 integrate .. //depot/projects/vimage/src/sys/pci/if_rl.c#9 integrate .. //depot/projects/vimage/src/sys/pci/if_rlreg.h#11 integrate .. //depot/projects/vimage/src/sys/pci/nfsmb.c#6 integrate .. //depot/projects/vimage/src/sys/sys/conf.h#10 integrate .. //depot/projects/vimage/src/sys/sys/param.h#20 integrate Differences ... ==== //depot/projects/vimage/src/sys/boot/i386/libi386/time.c#2 (text+ko) ==== @@ -25,25 +25,23 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/time.c,v 1.5 2003/08/25 23:28:31 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/time.c,v 1.6 2008/06/16 17:04:04 olli Exp $"); #include <stand.h> #include <btxv86.h> #include "bootstrap.h" #include "libi386.h" +static int bios_seconds(void); + /* - * Return the time in seconds since the beginning of the day. + * Return the BIOS time-of-day value. * - * If we pass midnight, don't wrap back to 0. - * * XXX uses undocumented BCD support from libstand. */ - -time_t -time(time_t *t) +static int +bios_seconds(void) { - static time_t lasttime, now; int hr, minute, sec; v86.ctl = 0; @@ -55,7 +53,33 @@ minute = bcd2bin(v86.ecx & 0xff); /* minute in %cl */ sec = bcd2bin((v86.edx & 0xff00) >> 8); /* second in %dh */ - now = hr * 3600 + minute * 60 + sec; + return (hr * 3600 + minute * 60 + sec); +} + +/* + * Return the time in seconds since the beginning of the day. + * + * Some BIOSes (notably qemu) don't correctly read the RTC + * registers in an atomic way, sometimes returning bogus values. + * Therefore we "debounce" the reading by accepting it only when + * we got two identical values in succession. + * + * If we pass midnight, don't wrap back to 0. + */ +time_t +time(time_t *t) +{ + static time_t lasttime; + time_t now, check; + int try; + + try = 0; + check = bios_seconds(); + do { + now = check; + check = bios_seconds(); + } while (now != check && ++try < 1000); + if (now < lasttime) now += 24 * 3600; lasttime = now; ==== //depot/projects/vimage/src/sys/compat/ndis/subr_ntoskrnl.c#8 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.95 2008/05/30 06:31:55 weongyo Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.96 2008/06/15 13:37:29 cokane Exp $"); #include <sys/ctype.h> #include <sys/unistd.h> @@ -225,6 +225,8 @@ static ndis_status PsCreateSystemThread(ndis_handle *, uint32_t, void *, ndis_handle, void *, void *, void *); static ndis_status PsTerminateSystemThread(ndis_status); +static ndis_status IoGetDeviceObjectPointer(unicode_string *, + uint32_t, void *, device_object *); static ndis_status IoGetDeviceProperty(device_object *, uint32_t, uint32_t, void *, uint32_t *); static void KeInitializeMutex(kmutant *, uint32_t); @@ -3235,6 +3237,16 @@ } static ndis_status +IoGetDeviceObjectPointer(name, reqaccess, fileobj, devobj) + unicode_string *name; + uint32_t reqaccess; + void *fileobj; + device_object *devobj; +{ + return(STATUS_SUCCESS); +} + +static ndis_status IoGetDeviceProperty(devobj, regprop, buflen, prop, reslen) device_object *devobj; uint32_t regprop; @@ -4391,6 +4403,7 @@ IMPORT_SFUNC(MmUnmapIoSpace, 2), IMPORT_SFUNC(KeInitializeSpinLock, 1), IMPORT_SFUNC(IoIsWdmVersionAvailable, 2), + IMPORT_SFUNC(IoGetDeviceObjectPointer, 4), IMPORT_SFUNC(IoGetDeviceProperty, 5), IMPORT_SFUNC(IoAllocateWorkItem, 1), IMPORT_SFUNC(IoFreeWorkItem, 1), ==== //depot/projects/vimage/src/sys/ddb/db_ps.c#6 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/ddb/db_ps.c,v 1.68 2008/03/25 20:36:32 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_ps.c,v 1.69 2008/06/18 20:42:01 attilio Exp $"); #include <sys/param.h> #include <sys/cons.h> @@ -292,6 +292,7 @@ DB_SHOW_COMMAND(thread, db_show_thread) { struct thread *td; + struct lock_object *lock; boolean_t comma; /* Determine which thread to examine. */ @@ -299,6 +300,7 @@ td = db_lookup_thread(addr, FALSE); else td = kdb_thread; + lock = (struct lock_object *)td->td_lock; db_printf("Thread %d at %p:\n", td->td_tid, td); db_printf(" proc (pid %d): %p\n", td->td_proc->p_pid, td->td_proc); @@ -365,6 +367,7 @@ db_printf(" wmesg: %s wchan: %p\n", td->td_wmesg, td->td_wchan); db_printf(" priority: %d\n", td->td_priority); + db_printf(" container lock: %s (%p)\n", lock->lo_name, lock); } DB_SHOW_COMMAND(proc, db_show_proc) ==== //depot/projects/vimage/src/sys/dev/smc/if_smc.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/smc/if_smc.c,v 1.5 2008/06/13 00:48:09 benno Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/smc/if_smc.c,v 1.6 2008/06/17 05:48:42 benno Exp $"); /* * Driver for SMSC LAN91C111, may work for older variants. @@ -394,6 +394,13 @@ smc_stop(sc); SMC_UNLOCK(sc); + if (sc->smc_ifp != NULL) { + ether_ifdetach(sc->smc_ifp); + } + + callout_drain(&sc->smc_watchdog); + callout_drain(&sc->smc_mii_tick_ch); + #ifdef DEVICE_POLLING if (sc->smc_ifp->if_capenable & IFCAP_POLLING) ether_poll_deregister(sc->smc_ifp); @@ -409,10 +416,8 @@ taskqueue_free(sc->smc_tq); sc->smc_tq = NULL; } - if (sc->smc_ifp != NULL) { - ether_ifdetach(sc->smc_ifp); if_free(sc->smc_ifp); } ==== //depot/projects/vimage/src/sys/fs/devfs/devfs_devs.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ * * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vfsops.c 1.36 * - * $FreeBSD: src/sys/fs/devfs/devfs_devs.c,v 1.53 2008/01/13 14:44:03 attilio Exp $ + * $FreeBSD: src/sys/fs/devfs/devfs_devs.c,v 1.54 2008/06/16 17:34:59 kib Exp $ */ #include "opt_mac.h" @@ -125,7 +125,6 @@ cdp->cdp_maxdirent = 0; cdev = &cdp->cdp_c; - cdev->si_priv = cdp; cdev->si_name = cdev->__si_namebuf; LIST_INIT(&cdev->si_children); @@ -137,7 +136,7 @@ { struct cdev_priv *cdp; - cdp = cdev->si_priv; + cdp = cdev2priv(cdev); if (cdev->si_cred != NULL) crfree(cdev->si_cred); if (cdp->cdp_inode > 0) @@ -510,7 +509,7 @@ struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); - cdp = dev->si_priv; + cdp = cdev2priv(dev); cdp->cdp_flags |= CDP_ACTIVE; cdp->cdp_inode = alloc_unrl(devfs_inos); dev_refl(dev); @@ -524,7 +523,7 @@ struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); - cdp = dev->si_priv; + cdp = cdev2priv(dev); cdp->cdp_flags &= ~CDP_ACTIVE; devfs_generation++; } ==== //depot/projects/vimage/src/sys/fs/devfs/devfs_int.h#4 (text+ko) ==== @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/devfs/devfs_int.h,v 1.5 2008/05/21 09:31:44 kib Exp $ + * $FreeBSD: src/sys/fs/devfs/devfs_int.h,v 1.6 2008/06/16 17:34:59 kib Exp $ */ /* @@ -68,6 +68,8 @@ LIST_HEAD(, cdev_privdata) cdp_fdpriv; }; +#define cdev2priv(c) member2struct(cdev_priv, cdp_c, c) + struct cdev *devfs_alloc(void); void devfs_free(struct cdev *); void devfs_create(struct cdev *dev); ==== //depot/projects/vimage/src/sys/fs/devfs/devfs_vnops.c#14 (text+ko) ==== @@ -31,7 +31,7 @@ * @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vnops.c 1.43 * - * $FreeBSD: src/sys/fs/devfs/devfs_vnops.c,v 1.162 2008/06/05 09:15:47 kib Exp $ + * $FreeBSD: src/sys/fs/devfs/devfs_vnops.c,v 1.163 2008/06/16 17:34:59 kib Exp $ */ /* @@ -132,7 +132,7 @@ fp = curthread->td_fpop; if (fp == NULL) return (ENOENT); - cdp = ((struct cdev *)fp->f_data)->si_priv; + cdp = cdev2priv((struct cdev *)fp->f_data); p = malloc(sizeof(struct cdev_privdata), M_CDEVPDATA, M_WAITOK); p->cdpd_data = priv; p->cdpd_dtr = priv_dtr; @@ -541,7 +541,7 @@ fix(dev->si_ctime); vap->va_ctime = dev->si_ctime; - vap->va_rdev = dev->si_priv->cdp_inode; + vap->va_rdev = cdev2priv(dev)->cdp_inode; } vap->va_gen = 0; vap->va_flags = 0; @@ -742,7 +742,7 @@ } dev_lock(); - dde = &cdev->si_priv->cdp_dirents[dmp->dm_idx]; + dde = &cdev2priv(cdev)->cdp_dirents[dmp->dm_idx]; if (dde != NULL && *dde != NULL) de = *dde; dev_unlock(); @@ -1141,7 +1141,7 @@ KASSERT((ap->a_flags & REVOKEALL) != 0, ("devfs_revoke !REVOKEALL")); dev = vp->v_rdev; - cdp = dev->si_priv; + cdp = cdev2priv(dev); dev_lock(); cdp->cdp_inuse++; @@ -1419,7 +1419,7 @@ { if (x == NULL) return (NODEV); - return (x->si_priv->cdp_inode); + return (cdev2priv(x)->cdp_inode); } static struct fileops devfs_ops_f = { ==== //depot/projects/vimage/src/sys/fs/tmpfs/tmpfs_subr.c#8 (text+ko) ==== @@ -41,7 +41,7 @@ * Efficient memory file system supporting functions. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_subr.c,v 1.16 2008/02/25 18:45:56 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_subr.c,v 1.17 2008/06/15 18:40:58 kib Exp $"); #include <sys/param.h> #include <sys/namei.h> @@ -391,11 +391,8 @@ vnode_pager_setsize(vp, node->tn_size); error = insmntque(vp, mp); - if (error) { - vgone(vp); - vput(vp); + if (error) vp = NULL; - } unlock: TMPFS_NODE_LOCK(node); ==== //depot/projects/vimage/src/sys/geom/part/g_part.c#8 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002, 2005, 2006, 2007 Marcel Moolenaar + * Copyright (c) 2002, 2005-2008 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/geom/part/g_part.c,v 1.18 2008/04/23 20:13:05 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/part/g_part.c,v 1.19 2008/06/18 01:13:34 marcel Exp $"); #include <sys/param.h> #include <sys/bio.h> @@ -121,7 +121,9 @@ G_PART_CTL_MOVE, G_PART_CTL_RECOVER, G_PART_CTL_RESIZE, - G_PART_CTL_UNDO + G_PART_CTL_SET, + G_PART_CTL_UNDO, + G_PART_CTL_UNSET }; /* @@ -954,6 +956,53 @@ } static int +g_part_ctl_setunset(struct gctl_req *req, struct g_part_parms *gpp, + unsigned int set) +{ + char buf[32]; + struct g_geom *gp; + struct g_part_entry *entry; + struct g_part_table *table; + struct sbuf *sb; + int error; + + gp = gpp->gpp_geom; + G_PART_TRACE((G_T_TOPOLOGY, "%s(%s)", __func__, gp->name)); + g_topology_assert(); + + table = gp->softc; + + LIST_FOREACH(entry, &table->gpt_entry, gpe_entry) { + if (entry->gpe_deleted || entry->gpe_internal) + continue; + if (entry->gpe_index == gpp->gpp_index) + break; + } + if (entry == NULL) { + gctl_error(req, "%d index '%d'", ENOENT, gpp->gpp_index); + return (ENOENT); + } + + error = G_PART_SETUNSET(table, entry, gpp->gpp_attrib, set); + if (error) { + gctl_error(req, "%d attrib '%s'", error, gpp->gpp_attrib); + return (error); + } + + /* Provide feedback if so requested. */ + if (gpp->gpp_parms & G_PART_PARM_OUTPUT) { + sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); + sbuf_printf(sb, "%s%s has %s %sset\n", gp->name, + G_PART_NAME(table, entry, buf, sizeof(buf)), + gpp->gpp_attrib, (set) ? "" : "un"); + sbuf_finish(sb); + gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); + sbuf_delete(sb); + } + return (0); +} + +static int g_part_ctl_undo(struct gctl_req *req, struct g_part_parms *gpp) { struct g_consumer *cp; @@ -1129,11 +1178,22 @@ mparms |= G_PART_PARM_GEOM | G_PART_PARM_INDEX; } break; + case 's': + if (!strcmp(verb, "set")) { + ctlreq = G_PART_CTL_SET; + mparms |= G_PART_PARM_ATTRIB | G_PART_PARM_GEOM | + G_PART_PARM_INDEX; + } + break; case 'u': if (!strcmp(verb, "undo")) { ctlreq = G_PART_CTL_UNDO; mparms |= G_PART_PARM_GEOM; modifies = 0; + } else if (!strcmp(verb, "unset")) { + ctlreq = G_PART_CTL_UNSET; + mparms |= G_PART_PARM_ATTRIB | G_PART_PARM_GEOM | + G_PART_PARM_INDEX; } break; } @@ -1147,6 +1207,10 @@ ap = &req->arg[i]; parm = 0; switch (ap->name[0]) { + case 'a': + if (!strcmp(ap->name, "attrib")) + parm = G_PART_PARM_ATTRIB; + break; case 'b': if (!strcmp(ap->name, "bootcode")) parm = G_PART_PARM_BOOTCODE; @@ -1215,6 +1279,9 @@ return; } switch (parm) { + case G_PART_PARM_ATTRIB: + error = g_part_parm_str(p, &gpp.gpp_attrib); + break; case G_PART_PARM_BOOTCODE: gpp.gpp_codeptr = p; gpp.gpp_codesize = len; @@ -1328,9 +1395,15 @@ case G_PART_CTL_RESIZE: error = g_part_ctl_resize(req, &gpp); break; + case G_PART_CTL_SET: + error = g_part_ctl_setunset(req, &gpp, 1); + break; case G_PART_CTL_UNDO: error = g_part_ctl_undo(req, &gpp); break; + case G_PART_CTL_UNSET: + error = g_part_ctl_setunset(req, &gpp, 0); + break; } /* Implement automatic commit. */ ==== //depot/projects/vimage/src/sys/geom/part/g_part.h#7 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006, 2007 Marcel Moolenaar + * Copyright (c) 2006-2008 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -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/geom/part/g_part.h,v 1.9 2008/04/13 19:54:54 marcel Exp $ + * $FreeBSD: src/sys/geom/part/g_part.h,v 1.10 2008/06/18 01:13:34 marcel Exp $ */ #ifndef _GEOM_PART_H_ @@ -136,6 +136,7 @@ #define G_PART_PARM_TYPE 0x0400 #define G_PART_PARM_VERSION 0x0800 #define G_PART_PARM_BOOTCODE 0x1000 +#define G_PART_PARM_ATTRIB 0x2000 struct g_part_parms { unsigned int gpp_parms; @@ -152,6 +153,7 @@ unsigned int gpp_version; const void *gpp_codeptr; unsigned int gpp_codesize; + const char *gpp_attrib; }; void g_part_geometry_heads(off_t, u_int, off_t *, u_int *); ==== //depot/projects/vimage/src/sys/geom/part/g_part_if.m#3 (text+ko) ==== @@ -1,5 +1,5 @@ #- -# Copyright (c) 2006, 2007 Marcel Moolenaar +# Copyright (c) 2006-2008 Marcel Moolenaar # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -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/geom/part/g_part_if.m,v 1.3 2008/04/13 19:54:54 marcel Exp $ +# $FreeBSD: src/sys/geom/part/g_part_if.m,v 1.4 2008/06/18 01:13:34 marcel Exp $ #include <sys/param.h> #include <sys/lock.h> @@ -108,6 +108,14 @@ struct g_consumer *cp; }; +# setunset() - set or unset partition entry attributes. +METHOD int setunset { + struct g_part_table *table; + struct g_part_entry *entry; + const char *attrib; + unsigned int set; +}; + # type() - return a string representation of the partition type. # Preferrably, the alias names. METHOD const char * type { ==== //depot/projects/vimage/src/sys/geom/part/g_part_mbr.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Marcel Moolenaar + * Copyright (c) 2007, 2008 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/geom/part/g_part_mbr.c,v 1.8 2008/06/12 05:56:03 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/part/g_part_mbr.c,v 1.9 2008/06/18 01:13:34 marcel Exp $"); #include <sys/param.h> #include <sys/bio.h> @@ -71,6 +71,8 @@ char *, size_t); static int g_part_mbr_probe(struct g_part_table *, struct g_consumer *); static int g_part_mbr_read(struct g_part_table *, struct g_consumer *); +static int g_part_mbr_setunset(struct g_part_table *, struct g_part_entry *, + const char *, unsigned int); static const char *g_part_mbr_type(struct g_part_table *, struct g_part_entry *, char *, size_t); static int g_part_mbr_write(struct g_part_table *, struct g_consumer *); @@ -86,6 +88,7 @@ KOBJMETHOD(g_part_name, g_part_mbr_name), KOBJMETHOD(g_part_probe, g_part_mbr_probe), KOBJMETHOD(g_part_read, g_part_mbr_read), + KOBJMETHOD(g_part_setunset, g_part_mbr_setunset), KOBJMETHOD(g_part_type, g_part_mbr_type), KOBJMETHOD(g_part_write, g_part_mbr_write), { 0, 0 } @@ -262,6 +265,8 @@ /* confxml: partition entry information */ sbuf_printf(sb, "%s<rawtype>%u</rawtype>\n", indent, entry->ent.dp_typ); + if (entry->ent.dp_flag & 0x80) + sbuf_printf(sb, "%s<attrib>active</attrib>\n", indent); } else { /* confxml: scheme information */ } @@ -420,6 +425,43 @@ return (0); } +static int +g_part_mbr_setunset(struct g_part_table *table, struct g_part_entry *baseentry, + const char *attrib, unsigned int set) +{ + struct g_part_entry *iter; + struct g_part_mbr_entry *entry; + int changed; + + if (strcasecmp(attrib, "active") != 0) + return (EINVAL); + + /* Only one entry can have the active attribute. */ + LIST_FOREACH(iter, &table->gpt_entry, gpe_entry) { + if (iter->gpe_deleted) + continue; + changed = 0; + entry = (struct g_part_mbr_entry *)iter; + if (iter == baseentry) { + if (set && (entry->ent.dp_flag & 0x80) == 0) { + entry->ent.dp_flag |= 0x80; + changed = 1; + } else if (!set && (entry->ent.dp_flag & 0x80)) { + entry->ent.dp_flag &= ~0x80; + changed = 1; + } + } else { + if (set && (entry->ent.dp_flag & 0x80)) { + entry->ent.dp_flag &= ~0x80; + changed = 1; + } + } + if (changed && !iter->gpe_created) + iter->gpe_modified = 1; + } + return (0); +} + static const char * g_part_mbr_type(struct g_part_table *basetable, struct g_part_entry *baseentry, char *buf, size_t bufsz) ==== //depot/projects/vimage/src/sys/kern/kern_conf.c#13 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_conf.c,v 1.217 2008/06/12 08:30:54 ed Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_conf.c,v 1.218 2008/06/16 17:34:59 kib Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -115,7 +115,7 @@ struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); - cdp = cdev->si_priv; + cdp = cdev2priv(cdev); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } @@ -187,7 +187,7 @@ dev_lock(); csw = dev->si_devsw; if (csw != NULL) { - cdp = dev->si_priv; + cdp = cdev2priv(dev); if ((cdp->cdp_flags & CDP_SCHED_DTR) == 0) dev->si_threadcount++; else @@ -208,7 +208,7 @@ dev_lock(); *devp = vp->v_rdev; if (*devp != NULL) { - cdp = (*devp)->si_priv; + cdp = cdev2priv(*devp); if ((cdp->cdp_flags & CDP_SCHED_DTR) == 0) { csw = (*devp)->si_devsw; if (csw != NULL) @@ -851,7 +851,7 @@ dev_unlock(); notify_destroy(dev); mtx_lock(&cdevpriv_mtx); - LIST_FOREACH_SAFE(p, &dev->si_priv->cdp_fdpriv, cdpd_list, p1) { + LIST_FOREACH_SAFE(p, &cdev2priv(dev)->cdp_fdpriv, cdpd_list, p1) { devfs_destroy_cdevpriv(p); mtx_lock(&cdevpriv_mtx); } @@ -1071,7 +1071,7 @@ KASSERT(dev->si_flags & SI_CLONELIST, ("Dev %p(%s) should be on clonelist", dev, dev->si_name)); dev->si_flags &= ~SI_CLONELIST; - cp = dev->si_priv; + cp = cdev2priv(dev); if (!(cp->cdp_flags & CDP_SCHED_DTR)) { cp->cdp_flags |= CDP_SCHED_DTR; KASSERT(dev->si_flags & SI_NAMED, @@ -1125,7 +1125,7 @@ struct cdev_priv *cp; mtx_assert(&devmtx, MA_OWNED); - cp = dev->si_priv; + cp = cdev2priv(dev); if (cp->cdp_flags & CDP_SCHED_DTR) { dev_unlock(); return (0); ==== //depot/projects/vimage/src/sys/kern/kern_dtrace.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_dtrace.c,v 1.1 2008/05/18 19:43:52 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_dtrace.c,v 1.2 2008/06/16 04:44:29 jb Exp $"); #include "opt_kdb.h" @@ -106,15 +106,3 @@ } SYSINIT(kdtrace, SI_SUB_KDTRACE, SI_ORDER_FIRST, init_dtrace, NULL); - -#ifndef KDB -/* - * This is a stub for the kernel debugger for the DTrace actions to call - * when the kernel has been built without KDB. - */ -void -kdb_enter(const char *why, const char *msg) -{ - printf("Cannot enter kernel debugger - No KDB in kernel.\n%s - %s\n", why, msg); -} -#endif ==== //depot/projects/vimage/src/sys/netinet/sctp_pcb.c#26 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet/sctp_pcb.c,v 1.69 2008/06/14 07:58:05 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_pcb.c,v 1.70 2008/06/15 12:31:23 rrs Exp $"); #include <netinet/sctp_os.h> #include <sys/proc.h> @@ -5330,6 +5330,7 @@ #if defined(SCTP_USE_THREAD_BASED_ITERATOR) SCTP_BASE_INFO(iterator_running) = 0; + SCTP_BASE_INFO(threads_must_exit) = 0; sctp_startup_iterator(); #endif @@ -5357,6 +5358,11 @@ int i; /* FIXME MT */ + SCTP_BASE_INFO(threads_must_exit) = 1; +#if defined(SCTP_USE_THREAD_BASED_ITERATOR) + /* Wake the thread up so it will exit now */ + sctp_wakeup_iterator(); +#endif /* * free the vrf/ifn/ifa lists and hashes (be sure address monitor is * destroyed first). @@ -5428,6 +5434,16 @@ SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_strmoq)); SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf)); SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf_ack)); + /* Get rid of other stuff to */ + if (SCTP_BASE_INFO(sctp_asochash) != NULL) + SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_asochash), SCTP_BASE_INFO(hashasocmark)); + if (SCTP_BASE_INFO(sctp_ephash) != NULL) + SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_ephash), SCTP_BASE_INFO(hashmark)); + if (SCTP_BASE_INFO(sctp_tcpephash) != NULL) + SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_tcpephash), SCTP_BASE_INFO(hashtcpmark)); + if (SCTP_BASE_INFO(sctp_restarthash) != NULL) + SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_restarthash), SCTP_BASE_INFO(hashrestartmark)); + } ==== //depot/projects/vimage/src/sys/netinet/sctp_pcb.h#18 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_pcb.h,v 1.21 2005/07/16 01:18:47 suz Exp $ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet/sctp_pcb.h,v 1.35 2008/06/14 07:58:05 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_pcb.h,v 1.36 2008/06/15 12:31:23 rrs Exp $"); #ifndef __sctp_pcb_h__ #define __sctp_pcb_h__ @@ -177,7 +177,7 @@ struct sctpladdr addr_wq; struct sctpiterators iteratorhead; - + int threads_must_exit; /* ep zone info */ sctp_zone_t ipi_zone_ep; sctp_zone_t ipi_zone_asoc; ==== //depot/projects/vimage/src/sys/netinet/sctp_usrreq.c#27 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_usrreq.c,v 1.48 2005/03/07 23:26:08 itojun Exp $ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet/sctp_usrreq.c,v 1.56 2008/06/14 07:58:05 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_usrreq.c,v 1.57 2008/06/15 12:31:23 rrs Exp $"); #include <netinet/sctp_os.h> #include <sys/proc.h> #include <netinet/sctp_pcb.h> @@ -98,23 +98,6 @@ sctp_pcb_finish(); } -/* - * cleanup of the SCTP_BASE_INFO() structure. - * Assumes that the SCTP_BASE_INFO() lock is held. - */ -void -sctp_pcbinfo_cleanup(void) -{ - /* free the hash tables */ - if (SCTP_BASE_INFO(sctp_asochash) != NULL) - SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_asochash), SCTP_BASE_INFO(hashasocmark)); - if (SCTP_BASE_INFO(sctp_ephash) != NULL) - SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_ephash), SCTP_BASE_INFO(hashmark)); - if (SCTP_BASE_INFO(sctp_tcpephash) != NULL) - SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_tcpephash), SCTP_BASE_INFO(hashtcpmark)); - if (SCTP_BASE_INFO(sctp_restarthash) != NULL) - SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_restarthash), SCTP_BASE_INFO(hashrestartmark)); -} void ==== //depot/projects/vimage/src/sys/netinet/sctp_var.h#18 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_var.h,v 1.24 2005/03/06 16:04:19 itojun Exp $ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet/sctp_var.h,v 1.25 2008/06/14 07:58:05 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_var.h,v 1.26 2008/06/15 12:31:23 rrs Exp $"); #ifndef _NETINET_SCTP_VAR_H_ #define _NETINET_SCTP_VAR_H_ @@ -308,7 +308,6 @@ void sctp_finish(void); -void sctp_pcbinfo_cleanup(void); int sctp_flush(struct socket *, int); int sctp_shutdown __P((struct socket *)); void sctp_notify ==== //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#27 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet/tcp_syncache.c,v 1.145 2008/05/09 23:02:58 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/tcp_syncache.c,v 1.147 2008/06/16 20:08:22 ups Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -887,11 +887,14 @@ goto failed; } /* - * The SEQ must match the received initial receive sequence - * number + 1 (the SYN) because we didn't ACK any data that - * may have come with the SYN. + * The SEQ must fall in the window starting a the received initial receive + * sequence number + 1 (the SYN). */ - if (th->th_seq != sc->sc_irs + 1 && !TOEPCB_ISSET(sc)) { + + if ((SEQ_LEQ(th->th_seq, sc->sc_irs) || + SEQ_GT(th->th_seq, sc->sc_irs + sc->sc_wnd )) && + !TOEPCB_ISSET(sc)) + { if ((s = tcp_log_addrs(inc, th, NULL, NULL))) log(LOG_DEBUG, "%s; %s: SEQ %u != IRS+1 %u, segment " "rejected\n", s, __func__, th->th_seq, sc->sc_irs); @@ -1602,7 +1605,7 @@ * The secret wasn't updated for the lifetime of a syncookie, * so this SYN-ACK/ACK is either too old (replay) or totally bogus. */ - if (sch->sch_reseed < time_uptime) { + if (sch->sch_reseed + SYNCOOKIE_LIFETIME < time_uptime) { return (NULL); } ==== //depot/projects/vimage/src/sys/pci/if_rl.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/pci/if_rl.c,v 1.174 2008/04/10 01:06:05 yongari Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/if_rl.c,v 1.175 2008/06/16 18:32:20 remko Exp $"); /* * RealTek 8129/8139 PCI NIC driver @@ -144,6 +144,8 @@ "RealTek 8129 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8139, RL_8139, "RealTek 8139 10/100BaseTX" }, + { RT_VENDORID, RT_DEVICEID_8139D, RL_8139, + "RealTek 8139 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8138, RL_8139, "RealTek 8139 10/100BaseTX CardBus" }, { RT_VENDORID, RT_DEVICEID_8100, RL_8139, ==== //depot/projects/vimage/src/sys/pci/if_rlreg.h#11 (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 DAMAGE. * - * $FreeBSD: src/sys/pci/if_rlreg.h,v 1.74 2008/03/31 04:03:14 yongari Exp $ + * $FreeBSD: src/sys/pci/if_rlreg.h,v 1.75 2008/06/16 18:32:20 remko Exp $ */ /* @@ -862,6 +862,7 @@ /* * RealTek chip device IDs. */ +#define RT_DEVICEID_8139D 0x8039 #define RT_DEVICEID_8129 0x8129 #define RT_DEVICEID_8101E 0x8136 #define RT_DEVICEID_8138 0x8138 ==== //depot/projects/vimage/src/sys/pci/nfsmb.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/pci/nfsmb.c,v 1.9 2008/06/06 18:29:56 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/nfsmb.c,v 1.10 2008/06/18 20:39:56 joerg Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -64,6 +64,7 @@ #define NFSMB_DEVICEID_NF4_51_SMB 0x0264 #define NFSMB_DEVICEID_NF4_55_SMB 0x0368 #define NFSMB_DEVICEID_NF4_61_SMB 0x03eb +#define NFSMB_DEVICEID_NF4_65_SMB 0x0446 /* PCI Configuration space registers */ #define NF2PCI_SMBASE_1 PCIR_BAR(4) @@ -156,6 +157,7 @@ case NFSMB_DEVICEID_NF4_51_SMB: case NFSMB_DEVICEID_NF4_55_SMB: case NFSMB_DEVICEID_NF4_61_SMB: + case NFSMB_DEVICEID_NF4_65_SMB: device_set_desc(dev, "nForce2/3/4 MCP SMBus Controller"); >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806182128.m5ILS5Jc022133>