Date: Fri, 27 Mar 2009 18:13:46 GMT From: Andrew Thompson <thompsa@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 159915 for review Message-ID: <200903271813.n2RIDkmm030576@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=159915 Change 159915 by thompsa@thompsa_burger on 2009/03/27 18:13:16 IFC @159914 Affected files ... .. //depot/projects/usb/src/sys/amd64/amd64/fpu.c#7 integrate .. //depot/projects/usb/src/sys/amd64/amd64/machdep.c#15 integrate .. //depot/projects/usb/src/sys/amd64/linux32/linux.h#11 integrate .. //depot/projects/usb/src/sys/cddl/dev/dtnfsclient/dtnfsclient.c#2 delete .. //depot/projects/usb/src/sys/compat/freebsd32/freebsd32_misc.c#15 integrate .. //depot/projects/usb/src/sys/compat/linprocfs/linprocfs.c#17 integrate .. //depot/projects/usb/src/sys/compat/linux/linux_file.c#12 integrate .. //depot/projects/usb/src/sys/conf/files.amd64#19 integrate .. //depot/projects/usb/src/sys/conf/files.i386#21 integrate .. //depot/projects/usb/src/sys/dev/acpica/acpi_cpu.c#8 integrate .. //depot/projects/usb/src/sys/dev/drm/drm_irq.c#9 integrate .. //depot/projects/usb/src/sys/dev/ed/if_ed.c#5 integrate .. //depot/projects/usb/src/sys/dev/ed/if_ed_pccard.c#7 integrate .. //depot/projects/usb/src/sys/dev/fe/if_fe_pccard.c#5 integrate .. //depot/projects/usb/src/sys/dev/ipmi/ipmi_linux.c#1 branch .. //depot/projects/usb/src/sys/dev/pccard/pccarddevs#12 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#10 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_endian.h#4 integrate .. //depot/projects/usb/src/sys/dev/wpi/if_wpi.c#9 integrate .. //depot/projects/usb/src/sys/dev/wpi/if_wpireg.h#3 integrate .. //depot/projects/usb/src/sys/geom/label/g_label.c#3 integrate .. //depot/projects/usb/src/sys/geom/label/g_label.h#2 integrate .. //depot/projects/usb/src/sys/geom/label/g_label_ufs.c#3 integrate .. //depot/projects/usb/src/sys/geom/part/g_part_apm.c#11 integrate .. //depot/projects/usb/src/sys/geom/part/g_part_bsd.c#10 integrate .. //depot/projects/usb/src/sys/geom/part/g_part_ebr.c#4 integrate .. //depot/projects/usb/src/sys/i386/i386/machdep.c#13 integrate .. //depot/projects/usb/src/sys/i386/isa/npx.c#11 integrate .. //depot/projects/usb/src/sys/kern/kern_jail.c#17 integrate .. //depot/projects/usb/src/sys/kern/subr_bus.c#21 integrate .. //depot/projects/usb/src/sys/kern/vfs_mount.c#19 integrate .. //depot/projects/usb/src/sys/modules/dtrace/dtnfsclient/Makefile#2 integrate .. //depot/projects/usb/src/sys/modules/ipmi/Makefile#3 integrate .. //depot/projects/usb/src/sys/modules/ipmi/ipmi_linux/Makefile#1 branch .. //depot/projects/usb/src/sys/modules/linprocfs/Makefile#4 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211.h#13 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_output.c#19 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_proto.h#12 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_superg.c#2 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_superg.h#2 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_tdma.c#7 integrate .. //depot/projects/usb/src/sys/net80211/ieee80211_tdma.h#4 integrate .. //depot/projects/usb/src/sys/nfsclient/nfs_kdtrace.c#1 branch .. //depot/projects/usb/src/sys/pc98/pc98/machdep.c#11 integrate .. //depot/projects/usb/src/sys/sys/jail.h#11 integrate .. //depot/projects/usb/src/sys/ufs/ffs/ffs_vnops.c#13 integrate Differences ... ==== //depot/projects/usb/src/sys/amd64/amd64/fpu.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.164 2009/03/25 14:17:08 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.165 2009/03/25 22:08:30 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -480,7 +480,6 @@ s = intr_disable(); if (td == PCPU_GET(fpcurthread)) { - fpu_clean_state(); fxrstor(addr); intr_restore(s); } else { @@ -499,10 +498,10 @@ * In order to avoid leaking this information across processes, we clean * these values by performing a dummy load before executing fxrstor(). */ -static double dummy_variable = 0.0; static void fpu_clean_state(void) { + static float dummy_variable = 0.0; u_short status; /* ==== //depot/projects/usb/src/sys/amd64/amd64/machdep.c#15 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.693 2009/03/11 15:30:12 dfr Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.694 2009/03/26 18:07:13 kib Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -818,87 +818,86 @@ /* software prototypes -- in more palatable form */ struct soft_segment_descriptor gdt_segs[] = { /* GNULL_SEL 0 Null Descriptor */ -{ 0x0, /* segment base address */ - 0x0, /* length */ - 0, /* segment type */ - 0, /* segment descriptor priority level */ - 0, /* segment descriptor present */ - 0, /* long */ - 0, /* default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0x0, + .ssd_type = 0, + .ssd_dpl = 0, + .ssd_p = 0, + .ssd_long = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* GCODE_SEL 1 Code Descriptor for kernel */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMERA, /* segment type */ - SEL_KPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 1, /* long */ - 0, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMERA, + .ssd_dpl = SEL_KPL, + .ssd_p = 1, + .ssd_long = 1, + .ssd_def32 = 0, + .ssd_gran = 1 }, /* GDATA_SEL 2 Data Descriptor for kernel */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - SEL_KPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 1, /* long */ - 0, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = SEL_KPL, + .ssd_p = 1, + .ssd_long = 1, + .ssd_def32 = 0, + .ssd_gran = 1 }, /* GUCODE32_SEL 3 32 bit Code Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMERA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, /* long */ - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMERA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_long = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GUDATA_SEL 4 32/64 bit Data Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, /* long */ - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_long = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GUCODE_SEL 5 64 bit Code Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMERA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 1, /* long */ - 0, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMERA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_long = 1, + .ssd_def32 = 0, + .ssd_gran = 1 }, /* GPROC0_SEL 6 Proc 0 Tss Descriptor */ -{ - 0x0, /* segment base address */ - sizeof(struct amd64tss)-1,/* length */ - SDT_SYSTSS, /* segment type */ - SEL_KPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, /* long */ - 0, /* unused - default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = sizeof(struct amd64tss)-1, + .ssd_type = SDT_SYSTSS, + .ssd_dpl = SEL_KPL, + .ssd_p = 1, + .ssd_long = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* Actually, the TSS is a system descriptor which is double size */ -{ 0x0, /* segment base address */ - 0x0, /* length */ - 0, /* segment type */ - 0, /* segment descriptor priority level */ - 0, /* segment descriptor present */ - 0, /* long */ - 0, /* default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0x0, + .ssd_type = 0, + .ssd_dpl = 0, + .ssd_p = 0, + .ssd_long = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* GUGS32_SEL 8 32 bit GS Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, /* long */ - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_long = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, }; void ==== //depot/projects/usb/src/sys/amd64/linux32/linux.h#11 (text+ko) ==== @@ -27,7 +27,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/amd64/linux32/linux.h,v 1.23 2009/03/04 12:14:33 dchagin Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux.h,v 1.25 2009/03/27 17:00:49 ambrisko Exp $ */ #ifndef _AMD64_LINUX_H_ @@ -179,8 +179,8 @@ l_int prot; l_int flags; l_int fd; - l_off_t pgoff; -} __packed; + l_ulong pgoff; +}; /* * stat family of syscalls ==== //depot/projects/usb/src/sys/compat/freebsd32/freebsd32_misc.c#15 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.87 2009/03/02 23:26:30 jamie Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.88 2009/03/27 13:13:59 jamie Exp $"); #include "opt_compat.h" @@ -2043,8 +2043,9 @@ error = copyin(uap->jail, &version, sizeof(uint32_t)); if (error) return (error); + switch (version) { - case 0: + case 0: { /* FreeBSD single IPv4 jails. */ struct jail32_v0 j32_v0; ==== //depot/projects/usb/src/sys/compat/linprocfs/linprocfs.c#17 (text+ko) ==== @@ -43,7 +43,7 @@ #include "opt_compat.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.136 2009/02/27 14:12:05 bz Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.137 2009/03/26 17:14:22 ambrisko Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -75,6 +75,7 @@ #include <sys/vmmeter.h> #include <sys/vnode.h> #include <sys/vimage.h> +#include <sys/bus.h> #include <net/if.h> #include <net/route.h> @@ -90,6 +91,9 @@ #include <machine/clock.h> +#include <geom/geom.h> +#include <geom/geom_int.h> + #if defined(__i386__) || defined(__amd64__) #include <machine/cputypes.h> #include <machine/md_var.h> @@ -359,6 +363,9 @@ sbuf_printf(sb, "/sys %s sysfs %s", mntto, mp->mnt_stat.f_flags & MNT_RDONLY ? "ro" : "rw"); } else { + /* For Linux msdosfs is called vfat */ + if (strcmp(fstype, "msdosfs") == 0) + fstype = "vfat"; sbuf_printf(sb, "%s %s %s %s", mntfrom, mntto, fstype, mp->mnt_stat.f_flags & MNT_RDONLY ? "ro" : "rw"); } @@ -383,6 +390,69 @@ } /* + * Filler function for proc/partitions + * + */ +static int +linprocfs_dopartitions(PFS_FILL_ARGS) +{ + struct g_class *cp; + struct g_geom *gp; + struct g_provider *pp; + struct nameidata nd; + const char *lep; + char *dlep, *flep; + size_t lep_len; + int error; + int major, minor; + + /* resolve symlinks etc. in the emulation tree prefix */ + NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); + flep = NULL; + error = namei(&nd); + lep = linux_emul_path; + if (error == 0) { + if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) + lep = dlep; + vrele(nd.ni_vp); + VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); + } + lep_len = strlen(lep); + + g_topology_lock(); + error = 0; + sbuf_printf(sb, "major minor #blocks name rio rmerge rsect " + "ruse wio wmerge wsect wuse running use aveq\n"); + + LIST_FOREACH(cp, &g_classes, class) { + if (strcmp(cp->name, "DISK") == 0 || + strcmp(cp->name, "PART") == 0) + LIST_FOREACH(gp, &cp->geom, geom) { + LIST_FOREACH(pp, &gp->provider, provider) { + if (linux_driver_get_major_minor( + pp->name, &major, &minor) != 0) { + major = 0; + minor = 0; + } + sbuf_printf(sb, "%d %d %lld %s " + "%d %d %d %d %d " + "%d %d %d %d %d %d\n", + major, minor, + (long long)pp->mediasize, pp->name, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0); + } + } + } + g_topology_unlock(); + + if (flep != NULL) + free(flep, M_TEMP); + return (error); +} + + +/* * Filler function for proc/stat */ static int @@ -1206,6 +1276,8 @@ NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "mtab", &linprocfs_domtab, NULL, NULL, NULL, PFS_RD); + pfs_create_file(root, "partitions", &linprocfs_dopartitions, + NULL, NULL, NULL, PFS_RD); pfs_create_link(root, "self", &procfs_docurproc, NULL, NULL, NULL, 0); pfs_create_file(root, "stat", &linprocfs_dostat, ==== //depot/projects/usb/src/sys/compat/linux/linux_file.c#12 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.117 2009/02/13 18:18:14 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.118 2009/03/26 17:14:22 ambrisko Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -1109,6 +1109,9 @@ } else if (strcmp(fstypename, "proc") == 0) { strcpy(fstypename, "linprocfs"); fsdata = NULL; + } else if (strcmp(fstypename, "vfat") == 0) { + strcpy(fstypename, "msdosfs"); + fsdata = NULL; } else { return (ENODEV); } @@ -1135,6 +1138,12 @@ "fstype", fstypename, "fspath", mntonname, NULL); + } else if (strcmp(fstypename, "msdosfs") == 0) { + error = kernel_vmount(fsflags, + "fstype", fstypename, + "fspath", mntonname, + "from", mntfromname, + NULL); } else error = EOPNOTSUPP; return (error); ==== //depot/projects/usb/src/sys/conf/files.amd64#19 (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.amd64,v 1.133 2009/03/17 00:48:11 jkim Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.135 2009/03/26 20:23:21 ambrisko Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -183,6 +183,7 @@ dev/ipmi/ipmi_smbios.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus dev/ipmi/ipmi_pci.c optional ipmi pci +dev/ipmi/ipmi_linux.c optional ipmi compat_linux32 dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa ==== //depot/projects/usb/src/sys/conf/files.i386#21 (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.i386,v 1.617 2009/03/15 14:21:05 rwatson Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.619 2009/03/26 20:23:21 ambrisko Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -196,6 +196,7 @@ dev/ipmi/ipmi_smbios.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus dev/ipmi/ipmi_pci.c optional ipmi pci +dev/ipmi/ipmi_linux.c optional ipmi compat_linux dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd dev/le/if_le_isa.c optional le isa dev/mem/memutil.c optional mem ==== //depot/projects/usb/src/sys/dev/acpica/acpi_cpu.c#8 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.73 2009/02/19 14:39:52 avg Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.74 2009/03/26 21:10:35 jhb Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -609,10 +609,6 @@ sc->cpu_cx_count++; } } - - /* Update the largest cx_count seen so far */ - if (sc->cpu_cx_count > cpu_cx_count) - cpu_cx_count = sc->cpu_cx_count; } /* @@ -752,6 +748,8 @@ for (i = 0; i < cpu_ndevices; i++) { sc = device_get_softc(cpu_devices[i]); acpi_cpu_generic_cx_probe(sc); + if (sc->cpu_cx_count > cpu_cx_count) + cpu_cx_count = sc->cpu_cx_count; } /* ==== //depot/projects/usb/src/sys/dev/drm/drm_irq.c#9 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/drm/drm_irq.c,v 1.13 2009/03/25 01:50:56 rnoland Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/drm_irq.c,v 1.14 2009/03/26 02:10:18 rnoland Exp $"); /** @file drm_irq.c * Support code for handling setup/teardown of interrupt handlers and @@ -463,16 +463,19 @@ } else { DRM_DEBUG("waiting on vblank count %d, crtc %d\n", vblwait->request.sequence, crtc); - mtx_lock(&dev->irq_lock); dev->vblank[crtc].last = vblwait->request.sequence; for ( ret = 0 ; !ret && !(((drm_vblank_count(dev, crtc) - vblwait->request.sequence) <= (1 << 23)) || !dev->irq_enabled) ; ) { - ret = mtx_sleep(&dev->vblank[crtc].queue, - &dev->irq_lock, PCATCH, "vblwtq", - 3 * DRM_HZ); + mtx_lock(&dev->irq_lock); + if (!(((drm_vblank_count(dev, crtc) - + vblwait->request.sequence) <= (1 << 23)) || + !dev->irq_enabled)) + ret = mtx_sleep(&dev->vblank[crtc].queue, + &dev->irq_lock, PCATCH, "vblwtq", + 3 * DRM_HZ); + mtx_unlock(&dev->irq_lock); } - mtx_unlock(&dev->irq_lock); if (ret != EINTR && ret != ERESTART) { struct timeval now; ==== //depot/projects/usb/src/sys/dev/ed/if_ed.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.272 2008/08/06 22:22:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.274 2009/03/26 17:36:19 imp Exp $"); /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -389,7 +389,8 @@ callout_drain(&sc->tick_ch); ether_ifdetach(ifp); } - bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); + if (sc->irq_res != NULL && sc->irq_handle) + bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); ed_release_resources(dev); ED_LOCK_DESTROY(sc); bus_generic_detach(dev); @@ -806,14 +807,15 @@ /* * Length is a wild value. There's a good chance that * this was caused by the NIC being old and buggy. - * The bug is that the length low byte is duplicated in - * the high byte. Try to recalculate the length based on - * the pointer to the next packet. + * The bug is that the length low byte is duplicated + * in the high byte. Try to recalculate the length + * based on the pointer to the next packet. Also, + * need ot preserve offset into page. + * + * NOTE: sc->next_packet is pointing at the current + * packet. */ - /* - * NOTE: sc->next_packet is pointing at the current packet. - */ - len &= ED_PAGE_SIZE - 1; /* preserve offset into page */ + len &= ED_PAGE_SIZE - 1; if (packet_hdr.next_packet >= sc->next_packet) len += (packet_hdr.next_packet - sc->next_packet) * ED_PAGE_SIZE; @@ -834,14 +836,14 @@ } /* - * Be fairly liberal about what we allow as a "reasonable" length - * so that a [crufty] packet will make it to BPF (and can thus - * be analyzed). Note that all that is really important is that - * we have a length that will fit into one mbuf cluster or less; - * the upper layer protocols can then figure out the length from - * their own length field(s). - * But make sure that we have at least a full ethernet header - * or we would be unable to call ether_input() later. + * Be fairly liberal about what we allow as a "reasonable" + * length so that a [crufty] packet will make it to BPF (and + * can thus be analyzed). Note that all that is really + * important is that we have a length that will fit into one + * mbuf cluster or less; the upper layer protocols can then + * figure out the length from their own length field(s). But + * make sure that we have at least a full ethernet header or + * we would be unable to call ether_input() later. */ if ((len >= sizeof(struct ed_ring) + ETHER_HDR_LEN) && (len <= MCLBYTES) && ==== //depot/projects/usb/src/sys/dev/ed/if_ed_pccard.c#7 (text+ko) ==== @@ -25,7 +25,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.116 2009/03/12 06:35:00 imp Exp $ + * $FreeBSD: src/sys/dev/ed/if_ed_pccard.c,v 1.117 2009/03/25 22:21:38 imp Exp $ */ /* @@ -206,6 +206,7 @@ { PCMCIA_CARD(RACORE, FASTENET), NE2000DVF_AX88X90}, { PCMCIA_CARD(RACORE, 8041TX), NE2000DVF_AX88X90 | NE2000DVF_TC5299J}, { PCMCIA_CARD(RELIA, COMBO), 0}, + { PCMCIA_CARD(RIOS, PCCARD3), 0}, { PCMCIA_CARD(RPTI, EP400), 0}, { PCMCIA_CARD(RPTI, EP401), 0}, { PCMCIA_CARD(SMC, EZCARD), 0}, ==== //depot/projects/usb/src/sys/dev/fe/if_fe_pccard.c#5 (text+ko) ==== @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/fe/if_fe_pccard.c,v 1.37 2009/03/15 02:31:34 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fe/if_fe_pccard.c,v 1.38 2009/03/25 22:12:07 imp Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -73,6 +73,7 @@ { PCMCIA_CARD(FUJITSU2, FMV_J182A), 0 }, { PCMCIA_CARD(FUJITSU2, ITCFJ182A), 0 }, /* These need to be second */ + { PCMCIA_CARD(TDK, LAK_CD011), 0 }, { PCMCIA_CARD(TDK, LAK_CD021BX), 0 }, { PCMCIA_CARD(TDK, LAK_CF010), 0 }, #if 0 /* XXX 86960-based? */ ==== //depot/projects/usb/src/sys/dev/pccard/pccarddevs#12 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.139 2009/03/25 07:26:24 imp Exp $ +$FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.140 2009/03/25 22:20:36 imp Exp $ /* $NetBSD: pcmciadevs,v 1.226 2008/06/19 18:20:33 imp Exp $ */ /* $OpenBSD: pcmciadevs,v 1.93 2002/06/21 08:31:10 henning Exp $ */ @@ -181,6 +181,7 @@ * with '0xc' look coherent enough that maybe somebody other than PCMCIA is * assigning numbers in that range. Maybe JEITA? */ +vendor RIOS 0x492f RIOS Systems Co vendor AIRVAST 0x50c2 AirVast Technology vendor ARCHOS 0x5241 Archos vendor DUAL 0x890f Dual @@ -545,6 +546,9 @@ /* RELIA Technologies Corporation */ product RELIA COMBO 0x2452 Reliable Combo-L/M-56K +/* RIOS Systems Co */ +product RIOS PCCARD3 0x0000 PC Card Ethernet + /* Roland */ product ROLAND SCP55 0x0001 Roland SCP-55 ==== //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#10 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/controller/ohci.c,v 1.5 2009/03/20 21:57:54 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/controller/ohci.c,v 1.6 2009/03/27 16:56:01 thompsa Exp $"); /* * USB Open Host Controller driver. @@ -1350,9 +1350,12 @@ temp->td_flags &= ~htole32(OHCI_TD_TOGGLE_MASK); if (average == 0) { - + /* + * The buffer start and end phys addresses should be + * 0x0 for a zero length packet. + */ td->td_cbp = 0; - td->td_be = ~0; + td->td_be = 0; td->len = 0; } else { ==== //depot/projects/usb/src/sys/dev/usb/usb_endian.h#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/usb/usb_endian.h,v 1.2 2009/03/20 18:59:53 thompsa Exp $ */ +/* $FreeBSD: src/sys/dev/usb/usb_endian.h,v 1.3 2009/03/21 05:44:22 thompsa Exp $ */ /* * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * @@ -48,19 +48,19 @@ #define UGETW(w) \ ((w)[0] | \ - (((uint16_t)((w)[1])) << 8)) + ((w)[1] << 8)) #define UGETDW(w) \ ((w)[0] | \ - (((uint16_t)((w)[1])) << 8) | \ - (((uint32_t)((w)[2])) << 16) | \ - (((uint32_t)((w)[3])) << 24)) + ((w)[1] << 8) | \ + ((w)[2] << 16) | \ + ((w)[3] << 24)) #define UGETQW(w) \ ((w)[0] | \ - (((uint16_t)((w)[1])) << 8) | \ - (((uint32_t)((w)[2])) << 16) | \ - (((uint32_t)((w)[3])) << 24) | \ + ((w)[1] << 8) | \ + ((w)[2] << 16) | \ + ((w)[3] << 24) | \ (((uint64_t)((w)[4])) << 32) | \ (((uint64_t)((w)[5])) << 40) | \ (((uint64_t)((w)[6])) << 48) | \ ==== //depot/projects/usb/src/sys/dev/wpi/if_wpi.c#9 (text+ko) ==== @@ -19,7 +19,7 @@ #define VERSION "20071127" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/wpi/if_wpi.c,v 1.19 2009/02/13 16:17:05 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/wpi/if_wpi.c,v 1.21 2009/03/27 05:44:53 jmallett Exp $"); /* * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters. @@ -1473,6 +1473,20 @@ le16toh(head->len), (int8_t)stat->rssi, head->rate, head->chan, (uintmax_t)le64toh(tail->tstamp))); + /* discard Rx frames with bad CRC early */ + if ((le32toh(tail->flags) & WPI_RX_NOERROR) != WPI_RX_NOERROR) { + DPRINTFN(WPI_DEBUG_RX, ("%s: rx flags error %x\n", __func__, + le32toh(tail->flags))); + ifp->if_ierrors++; + return; + } + if (le16toh(head->len) < sizeof (struct ieee80211_frame)) { + DPRINTFN(WPI_DEBUG_RX, ("%s: frame too short: %d\n", __func__, + le16toh(head->len))); + ifp->if_ierrors++; + return; + } + /* XXX don't need mbuf, just dma buffer */ mnew = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (mnew == NULL) { @@ -1573,7 +1587,7 @@ */ wn->amn.amn_txcnt++; if (stat->ntries > 0) { - DPRINTFN(3, ("%d retries\n", stat->ntries)); + DPRINTFN(WPI_DEBUG_TX, ("%d retries\n", stat->ntries)); wn->amn.amn_retrycnt++; } @@ -2029,7 +2043,7 @@ return; for (;;) { - IFQ_POLL(&ifp->if_snd, m); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; /* no QoS encapsulation for EAPOL frames */ @@ -2040,7 +2054,6 @@ ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; m = ieee80211_encap(ni, m); if (m == NULL) { ==== //depot/projects/usb/src/sys/dev/wpi/if_wpireg.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/wpi/if_wpireg.h,v 1.3 2008/03/10 23:16:48 thompsa Exp $ */ +/* $FreeBSD: src/sys/dev/wpi/if_wpireg.h,v 1.4 2009/03/27 03:17:25 jmallett Exp $ */ /*- * Copyright (c) 2006,2007 @@ -235,12 +235,10 @@ struct wpi_rx_tail { uint32_t flags; -#if 0 #define WPI_RX_NO_CRC_ERR (1 << 0) #define WPI_RX_NO_OVFL_ERR (1 << 1) /* shortcut for the above */ #define WPI_RX_NOERROR (WPI_RX_NO_CRC_ERR | WPI_RX_NO_OVFL_ERR) -#endif uint64_t tstamp; uint32_t tbeacon; } __packed; ==== //depot/projects/usb/src/sys/geom/label/g_label.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/geom/label/g_label.c,v 1.21 2006/08/12 15:30:24 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/label/g_label.c,v 1.22 2009/03/25 20:38:57 ivoras Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -77,7 +77,8 @@ * 6. Add your file system to manual page sbin/geom/class/label/glabel.8. */ const struct g_label_desc *g_labels[] = { - &g_label_ufs, + &g_label_ufs_id, + &g_label_ufs_volume, &g_label_iso9660, &g_label_msdosfs, &g_label_ext2fs, ==== //depot/projects/usb/src/sys/geom/label/g_label.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/geom/label/g_label.h,v 1.7 2006/02/01 12:06:00 pjd Exp $ + * $FreeBSD: src/sys/geom/label/g_label.h,v 1.8 2009/03/25 20:38:57 ivoras Exp $ */ #ifndef _G_LABEL_H_ @@ -64,7 +64,8 @@ }; /* Supported labels. */ -extern const struct g_label_desc g_label_ufs; +extern const struct g_label_desc g_label_ufs_id; +extern const struct g_label_desc g_label_ufs_volume; extern const struct g_label_desc g_label_iso9660; extern const struct g_label_desc g_label_msdosfs; extern const struct g_label_desc g_label_ext2fs; ==== //depot/projects/usb/src/sys/geom/label/g_label_ufs.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/geom/label/g_label_ufs.c,v 1.11 2006/09/16 11:24:41 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/label/g_label_ufs.c,v 1.12 2009/03/25 20:38:57 ivoras Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -39,12 +39,16 @@ #include <geom/geom.h> #include <geom/label/g_label.h> -#define G_LABEL_UFS_DIR "ufs" +#define G_LABEL_UFS_VOLUME_DIR "ufs" +#define G_LABEL_UFS_ID_DIR "ufsid" + +#define G_LABEL_UFS_VOLUME 0 +#define G_LABEL_UFS_ID 1 static const int superblocks[] = SBLOCKSEARCH; static void -g_label_ufs_taste(struct g_consumer *cp, char *label, size_t size) +g_label_ufs_taste_common(struct g_consumer *cp, char *label, size_t size, int what) { struct g_provider *pp; int sb, superblock; @@ -96,18 +100,50 @@ } G_LABEL_DEBUG(1, "%s file system detected on %s.", fs->fs_magic == FS_UFS1_MAGIC ? "UFS1" : "UFS2", pp->name); - /* Check for volume label */ - if (fs->fs_volname[0] == '\0') { - g_free(fs); - continue; + switch (what) { + case G_LABEL_UFS_VOLUME: + /* Check for volume label */ + if (fs->fs_volname[0] == '\0') { + g_free(fs); + continue; + } + strlcpy(label, fs->fs_volname, size); + break; + case G_LABEL_UFS_ID: + if (fs->fs_id[0] == 0 && fs->fs_id[1] == 0) { + g_free(fs); + continue; + } + snprintf(label, size, "%08x%08x", fs->fs_id[0], + fs->fs_id[1]); + break; } - strlcpy(label, fs->fs_volname, size); g_free(fs); break; } } -const struct g_label_desc g_label_ufs = { - .ld_taste = g_label_ufs_taste, - .ld_dir = G_LABEL_UFS_DIR +static void +g_label_ufs_volume_taste(struct g_consumer *cp, char *label, size_t size) +{ + + g_label_ufs_taste_common(cp, label, size, G_LABEL_UFS_VOLUME); +} + +static void +g_label_ufs_id_taste(struct g_consumer *cp, char *label, size_t size) +{ + + g_label_ufs_taste_common(cp, label, size, G_LABEL_UFS_ID); +} + + +const struct g_label_desc g_label_ufs_volume = { + .ld_taste = g_label_ufs_volume_taste, + .ld_dir = G_LABEL_UFS_VOLUME_DIR +}; + +const struct g_label_desc g_label_ufs_id = { + .ld_taste = g_label_ufs_id_taste, + .ld_dir = G_LABEL_UFS_ID_DIR }; ==== //depot/projects/usb/src/sys/geom/part/g_part_apm.c#11 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/geom/part/g_part_apm.c,v 1.10 2009/02/10 02:43:07 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/part/g_part_apm.c,v 1.11 2009/03/27 05:35:25 svn Exp $"); #include <sys/param.h> #include <sys/apm.h> @@ -216,6 +216,11 @@ { struct g_provider *pp; struct g_part_apm_table *table; + uint32_t last; + + /* We don't nest, which means that our depth should be 0. */ + if (basetable->gpt_depth != 0) >>> TRUNCATED FOR MAIL (1000 lines) <<<help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903271813.n2RIDkmm030576>
