svn commit: r186393 - head/sys/netinet6
Author: bz Date: Mon Dec 22 12:54:52 2008 New Revision: 186393 URL: http://svn.freebsd.org/changeset/base/186393 Log: Correct variable name in comment. MFC after:4 weeks Modified: head/sys/netinet6/ip6_input.c Modified: head/sys/netinet6/ip6_input.c == --- head/sys/netinet6/ip6_input.c Mon Dec 22 07:11:15 2008 (r186392) +++ head/sys/netinet6/ip6_input.c Mon Dec 22 12:54:52 2008 (r186393) @@ -248,7 +248,7 @@ ip6_init(void) if (pr == 0) panic(ip6_init); - /* Initialize the entire ip_protox[] array to IPPROTO_RAW. */ + /* Initialize the entire ip6_protox[] array to IPPROTO_RAW. */ for (i = 0; i IPPROTO_MAX; i++) ip6_protox[i] = pr - inet6sw; /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186395 - head/sys/sparc64/sparc64
Author: marius Date: Mon Dec 22 15:34:06 2008 New Revision: 186395 URL: http://svn.freebsd.org/changeset/base/186395 Log: - According to comments in OpenBSD, E{2,4}50 tend to have fragile firmware versions which wedge when using the OFW test service, so given that we don't really depend on SUNW,stop-self just nuke it altogether instead of risking problems. - At least Fire V880 have a small hardware glitch which causes the reception of IDR_NACKs for CPUs we actually haven't tried to send an IPI to, even not as part of the initial try. According to tests this apparently can be safely ignored though, so just return if checking for the individual IDR_NACKs indicates no outstanding dispatch. Serializing the sending of IPIs between MD and MI code by the combined usage of smp_ipi_mtx makes no difference to this phenomenon. [1] - Provide relevant debugging bits already with the initial panic in case of problems with the IPI dispatch, which would have allowed to diagnose the above problem without a specially built kernel. - In case of cheetah_ipi_selected() base the delay we wait for other CPUs which also might want to dispatch IPIs on the total amount of CPUs instead of just the number of CPUs we let this CPU send IPIs to because in the worst case all CPUs also want to IPI us at the same time. Reported and access for extensive tests provided by: Beat Gaetzi [1] Modified: head/sys/sparc64/sparc64/mp_machdep.c Modified: head/sys/sparc64/sparc64/mp_machdep.c == --- head/sys/sparc64/sparc64/mp_machdep.c Mon Dec 22 13:36:15 2008 (r186394) +++ head/sys/sparc64/sparc64/mp_machdep.c Mon Dec 22 15:34:06 2008 (r186395) @@ -116,14 +116,12 @@ cpu_ipi_selected_t *cpu_ipi_selected; static vm_offset_t mp_tramp; static u_int cpuid_to_mid[MAXCPU]; -static int has_stopself; static int isjbus; static volatile u_int shutdown_cpus; static void cpu_mp_unleash(void *v); static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); -static void sun4u_stopself(void); static cpu_ipi_selected_t cheetah_ipi_selected; static cpu_ipi_selected_t spitfire_ipi_selected; @@ -225,24 +223,6 @@ sun4u_startcpu(phandle_t cpu, void *func } /* - * Stop the calling CPU. - */ -static void -sun4u_stopself(void) -{ - static struct { - cell_t name; - cell_t nargs; - cell_t nreturns; - } args = { - (cell_t)SUNW_STOPSELF, - }; - - ofw_exit(args); - panic(%s: failed., __func__); -} - -/* * Fire up any non-boot processors. */ void @@ -260,9 +240,6 @@ cpu_mp_start(void) mtx_init(ipi_mtx, ipi, NULL, MTX_SPIN); - if (OF_test(SUNW_STOPSELF) == 0) - has_stopself = 1; - intr_setup(PIL_AST, cpu_ipi_ast, -1, NULL, NULL); intr_setup(PIL_RENDEZVOUS, (ih_func_t *)smp_rendezvous_action, -1, NULL, NULL); @@ -457,8 +434,6 @@ cpu_ipi_stop(struct trapframe *tf) while ((started_cpus PCPU_GET(cpumask)) == 0) { if ((shutdown_cpus PCPU_GET(cpumask)) != 0) { atomic_clear_int(shutdown_cpus, PCPU_GET(cpumask)); - if (has_stopself != 0) - sun4u_stopself(); (void)intr_disable(); for (;;) ; @@ -538,7 +513,8 @@ spitfire_ipi_send(u_int mid, u_long d0, printf(%s: couldn't send IPI to module 0x%u\n, __func__, mid); else - panic(%s: couldn't send IPI, __func__); + panic(%s: couldn't send IPI to module 0x%u, + __func__, mid); } static void @@ -592,11 +568,18 @@ cheetah_ipi_selected(u_int cpus, u_long } } /* +* On at least Fire V880 we may receive IDR_NACKs for +* CPUs we actually haven't tried to send an IPI to, +* but which apparently can be safely ignored. +*/ + if (cpus == 0) + return; + /* * Leave interrupts enabled for a bit before retrying * in order to avoid deadlocks if the other CPUs are * also trying to send IPIs. */ - DELAY(2 * bnp); + DELAY(2 * mp_ncpus); } if ( #ifdef KDB @@ -606,5 +589,6 @@ cheetah_ipi_selected(u_int cpus, u_long printf(%s: couldn't send IPI (cpus=0x%u ids=0x%lu)\n, __func__, cpus, ids); else - panic(%s: couldn't send IPI, __func__); + panic(%s: couldn't send IPI (cpus=0x%u ids=0x%lu), +
svn commit: r186396 - head/sys/cam
Author: scottl Date: Mon Dec 22 16:58:47 2008 New Revision: 186396 URL: http://svn.freebsd.org/changeset/base/186396 Log: Fix a comment to reflect what really happens. Modified: head/sys/cam/cam_sim.h Modified: head/sys/cam/cam_sim.h == --- head/sys/cam/cam_sim.h Mon Dec 22 15:34:06 2008(r186395) +++ head/sys/cam/cam_sim.h Mon Dec 22 16:58:47 2008(r186396) @@ -109,7 +109,7 @@ struct cam_sim { struct cam_devq *devq; /* Device Queue to use for this SIM */ int refcount; /* References to the SIM. */ - /* Pool of inactive ccbs managed by xpt_alloc_ccb and xpt_free_ccb */ + /* Pool of inactive ccbs managed by xpt_get_ccb and xpt_release_ccb */ SLIST_HEAD(,ccb_hdr)ccb_freeq; /* * Maximum size of ccb pool. Modified as devices are added/removed ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186397 - head/sys/security/mac
Author: alc Date: Mon Dec 22 17:32:52 2008 New Revision: 186397 URL: http://svn.freebsd.org/changeset/base/186397 Log: Make preparations for resurrecting shared/read locks on vm maps: mac_proc_vm_revoke_recurse() requests a read lock on the vm map at the start but does not handle failure by vm_map_lock_upgrade() when it seeks to modify the vm map. At present, this works because all lock request on a vm map are implemented as exclusive locks. Thus, vm_map_lock_upgrade() is a no-op that always reports success. However, that is about to change, and proc_vm_revoke_recurse() will require substantial modifications to handle vm_map_lock_upgrade() failures. For the time being, I am changing mac_proc_vm_revoke_recurse() to request a write lock on the vm map at the start. Approved by: rwatson MFC after:3 months Modified: head/sys/security/mac/mac_process.c Modified: head/sys/security/mac/mac_process.c == --- head/sys/security/mac/mac_process.c Mon Dec 22 16:58:47 2008 (r186396) +++ head/sys/security/mac/mac_process.c Mon Dec 22 17:32:52 2008 (r186397) @@ -260,7 +260,7 @@ mac_proc_vm_revoke_recurse(struct thread if (!mac_mmap_revocation) return; - vm_map_lock_read(map); + vm_map_lock(map); for (vme = map-header.next; vme != map-header; vme = vme-next) { if (vme-eflags MAP_ENTRY_IS_SUB_MAP) { mac_proc_vm_revoke_recurse(td, cred, @@ -315,7 +315,6 @@ mac_proc_vm_revoke_recurse(struct thread prot2str(revokeperms), (u_long)vme-start, (long)(vme-end - vme-start), prot2str(vme-max_protection), prot2str(vme-protection)); - vm_map_lock_upgrade(map); /* * This is the really simple case: if a map has more * max_protection than is allowed, but it's not being @@ -369,10 +368,9 @@ mac_proc_vm_revoke_recurse(struct thread vme-protection ~revokeperms); vm_map_simplify_entry(map, vme); } - vm_map_lock_downgrade(map); VFS_UNLOCK_GIANT(vfslocked); } - vm_map_unlock_read(map); + vm_map_unlock(map); } int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186398 - head/sbin/kldstat
Author: thompsa Date: Mon Dec 22 19:52:21 2008 New Revision: 186398 URL: http://svn.freebsd.org/changeset/base/186398 Log: Only show the pathname in verbose output as intended in the last commit (r172862). Modified: head/sbin/kldstat/kldstat.c Modified: head/sbin/kldstat/kldstat.c == --- head/sbin/kldstat/kldstat.c Mon Dec 22 17:32:52 2008(r186397) +++ head/sbin/kldstat/kldstat.c Mon Dec 22 19:52:21 2008(r186398) @@ -60,17 +60,19 @@ static void printfile(int fileid, int ve if (kldstat(fileid, stat) 0) warn(can't stat file id %d, fileid); else - printf(%2d %4d %p %-8jx %s (%s)\n, + printf(%2d %4d %p %-8jx %s, stat.id, stat.refs, stat.address, (uintmax_t)stat.size, - stat.name, stat.pathname); + stat.name); if (verbose) { + printf( (%s)\n, stat.pathname); printf(\tContains modules:\n); printf(\t\tId Name\n); for (modid = kldfirstmod(fileid); modid 0; modid = modfnext(modid)) printmod(modid); -} +} else + printf(\n); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186401 - head/usr.bin/ncal
Author: wollman Date: Mon Dec 22 21:22:42 2008 New Revision: 186401 URL: http://svn.freebsd.org/changeset/base/186401 Log: Implement a new feature for the -m option: if the month number is followed by 'f' or 'p', use the following or preceding month of that number, respectively. Document this. Also includes other minor grammatical and punctuation fixes to the manual page (capitalize Easter, etc.). MFC after:1 month Modified: head/usr.bin/ncal/ncal.1 head/usr.bin/ncal/ncal.c Modified: head/usr.bin/ncal/ncal.1 == --- head/usr.bin/ncal/ncal.1Mon Dec 22 20:38:00 2008(r186400) +++ head/usr.bin/ncal/ncal.1Mon Dec 22 21:22:42 2008(r186401) @@ -30,7 +30,7 @@ .Sh NAME .Nm cal , .Nm ncal -.Nd displays a calendar and the date of easter +.Nd displays a calendar and the date of Easter .Sh SYNOPSIS .Nm .Op Fl jy @@ -57,7 +57,7 @@ The .Nm utility displays a simple calendar in traditional format and .Nm ncal -offers an alternative layout, more options and the date of easter. +offers an alternative layout, more options and the date of Easter. The new format is a little cramped but it makes a year fit on a 25x80 terminal. If arguments are not specified, @@ -68,16 +68,24 @@ The options are as follows: .It Fl J Display Julian Calendar, if combined with the .Fl e -option, display date of easter according to the Julian Calendar. +option, display date of Easter according to the Julian Calendar. .It Fl e -Display date of easter (for western churches). +Display date of Easter (for western churches). .It Fl j Display Julian days (days one-based, numbered from January 1). .It Fl m Ar month Display the specified .Ar month . +If +.Ar month +is specified as a decimal number, it may be followed by the letter +.Ql f +or +.Ql p +to indicate the following or preceding month of that number, +respectively. .It Fl o -Display date of orthodox easter (Greek and Russian +Display date of Orthodox Easter (Greek and Russian Orthodox Churches). .It Fl p Print the country codes and switching days from Julian to Gregorian @@ -101,7 +109,7 @@ Print the number of the week below each Display a calendar for the specified year. .El .Pp -A single parameter specifies the year (1 - ) to be displayed; +A single parameter specifies the year (1\(en) to be displayed; note the year must be fully specified: .Dq Li cal 89 will @@ -113,7 +121,7 @@ Month and year default to those of the c .Dq Li cal -m 8 will display a calendar for the month of August in the current year). .Pp -A year starts on Jan 1. +A year starts on January 1. .Sh SEE ALSO .Xr calendar 3 , .Xr strftime 3 @@ -132,7 +140,7 @@ The command and manual were written by .An Wolfgang Helbig Aq hel...@freebsd.org . .Sh BUGS -The assignment of Julian\(emGregorian switching dates to +The assignment of Julian\(enGregorian switching dates to country codes is historically naive for many countries. .Pp The Modified: head/usr.bin/ncal/ncal.c == --- head/usr.bin/ncal/ncal.cMon Dec 22 20:38:00 2008(r186400) +++ head/usr.bin/ncal/ncal.cMon Dec 22 21:22:42 2008(r186401) @@ -162,7 +162,7 @@ char *center(char *s, char *t, int w); void mkmonth(int year, int month, int jd_flag, struct monthlines * monthl); voidmkmonthb(int year, int month, int jd_flag, struct monthlines * monthl); voidmkweekdays(struct weekdays * wds); -int parsemonth(const char *s); +int parsemonth(const char *s, int *m, int *y); voidprintcc(void); voidprinteaster(int year, int julian, int orthodox); voidprintmonth(int year, int month, int jd_flag); @@ -322,11 +322,11 @@ main(int argc, char *argv[]) } if (flag_month != NULL) { - m = parsemonth(flag_month); - if (m 1 || m 12) + if (parsemonth(flag_month, m, y)) { errx(EX_USAGE, %s is neither a month number (1..12) nor a name, flag_month); + } } if (flag_easter) @@ -859,18 +859,34 @@ center(char *s, char *t, int w) } int -parsemonth(const char *s) +parsemonth(const char *s, int *m, int *y) { - int v; + int nm, ny; char *cp; struct tm tm; - v = (int)strtol(s, cp, 10); - if (cp != s) - return (v); - if (strptime(s, %B, tm) != NULL) - return (tm.tm_mon + 1); - if (strptime(s, %b, tm) != NULL) - return (tm.tm_mon + 1); - return (0); + nm = (int)strtol(s, cp, 10); + if (cp != s) { + ny = *y; + if (*cp == '\0') { + ; /* no special action */ + } else if (*cp == 'f' || *cp == 'F') { + if (nm = *m) +
svn commit: r186402 - head/sys/conf
Author: alfred Date: Mon Dec 22 21:37:06 2008 New Revision: 186402 URL: http://svn.freebsd.org/changeset/base/186402 Log: Fix typo for udav include. Add link to the u3g2 driver. Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Mon Dec 22 21:22:42 2008(r186401) +++ head/sys/conf/files Mon Dec 22 21:37:06 2008(r186402) @@ -1594,7 +1594,7 @@ dev/usb2/ethernet/if_cdce2.c optional u dev/usb2/ethernet/if_cue2.coptional usb2_core usb2_ethernet usb2_ethernet_cue dev/usb2/ethernet/if_kue2.coptional usb2_core usb2_ethernet usb2_ethernet_kue dev/usb2/ethernet/if_rue2.coptional usb2_core usb2_ethernet usb2_ethernet_rue -dev/usb2/ethernet/if_udav2.c optional usb2_core usb2_ethernet usb2_ethernet_udav +dev/usb2/ethernet/if_udav2.c optional usb2_core usb2_ethernet usb2_ethernet_dav dev/usb2/ethernet/usb2_ethernet.c optional usb2_core usb2_ethernet # # USB2 WLAN drivers @@ -1623,6 +1623,7 @@ dev/usb2/serial/uplcom2.c optional usb2_ dev/usb2/serial/usb2_serial.c optional usb2_core usb2_serial dev/usb2/serial/uvisor2.c optional usb2_core usb2_serial usb2_serial_visor dev/usb2/serial/uvscom2.c optional usb2_core usb2_serial usb2_serial_vscom +dev/usb2/serial/u3g2.c optional usb2_core usb2_serial usb2_serial_3g # # USB2 bluetooth drivers # ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186403 - head/sys/dev/sound/pci/hda
Author: mav Date: Mon Dec 22 22:40:17 2008 New Revision: 186403 URL: http://svn.freebsd.org/changeset/base/186403 Log: Add 9 more Analog Devices codec names. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c == --- head/sys/dev/sound/pci/hda/hdac.c Mon Dec 22 21:37:06 2008 (r186402) +++ head/sys/dev/sound/pci/hda/hdac.c Mon Dec 22 22:40:17 2008 (r186403) @@ -83,7 +83,7 @@ #include mixer_if.h -#define HDA_DRV_TEST_REV 20081219_0119 +#define HDA_DRV_TEST_REV 20081223_0120 SND_DECLARE_FILE($FreeBSD$); @@ -568,12 +568,21 @@ static const struct { /* Analog Devices */ #define ANALOGDEVICES_VENDORID 0x11d4 +#define HDA_CODEC_AD1884A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x184a) +#define HDA_CODEC_AD1882 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1882) +#define HDA_CODEC_AD1883 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1883) +#define HDA_CODEC_AD1884 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1884) +#define HDA_CODEC_AD1984A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194a) +#define HDA_CODEC_AD1984B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194b) #define HDA_CODEC_AD1981HD HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1981) #define HDA_CODEC_AD1983 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1983) #define HDA_CODEC_AD1984 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1984) #define HDA_CODEC_AD1986A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1986) +#define HDA_CODEC_AD1987 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1987) #define HDA_CODEC_AD1988 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1988) #define HDA_CODEC_AD1988B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x198b) +#define HDA_CODEC_AD1882A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x882a) +#define HDA_CODEC_AD1989B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989b) #define HDA_CODEC_AD HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x) /* CMedia */ @@ -722,12 +731,21 @@ static const struct { { HDA_CODEC_ALC885,Realtek ALC885 }, { HDA_CODEC_ALC888,Realtek ALC888 }, { HDA_CODEC_ALC889,Realtek ALC889 }, + { HDA_CODEC_AD1882,Analog Devices AD1882 }, + { HDA_CODEC_AD1882A, Analog Devices AD1882A }, + { HDA_CODEC_AD1883,Analog Devices AD1883 }, + { HDA_CODEC_AD1884,Analog Devices AD1884 }, + { HDA_CODEC_AD1884A, Analog Devices AD1884A }, { HDA_CODEC_AD1981HD, Analog Devices AD1981HD }, { HDA_CODEC_AD1983,Analog Devices AD1983 }, { HDA_CODEC_AD1984,Analog Devices AD1984 }, + { HDA_CODEC_AD1984A, Analog Devices AD1984A }, + { HDA_CODEC_AD1984B, Analog Devices AD1984B }, { HDA_CODEC_AD1986A, Analog Devices AD1986A }, - { HDA_CODEC_AD1988,Analog Devices AD1988 }, + { HDA_CODEC_AD1987,Analog Devices AD1987 }, + { HDA_CODEC_AD1988,Analog Devices AD1988A }, { HDA_CODEC_AD1988B, Analog Devices AD1988B }, + { HDA_CODEC_AD1989B, Analog Devices AD1989B }, { HDA_CODEC_CMI9880, CMedia CMI9880 }, { HDA_CODEC_STAC9200D, Sigmatel STAC9200D }, { HDA_CODEC_STAC9204X, Sigmatel STAC9204X }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r185746 - head/sys/boot/forth
Luigi Rizzo wrote: Author: luigi Date: Sun Dec 7 19:42:20 2008 New Revision: 185746 URL: http://svn.freebsd.org/changeset/base/185746 Log: PROBLEM: putting in a loader config file a line of the form loader_conf_files=foo bar baz should cause loading the files listed, and then resume with the remaining config files (from previous values of the variable). Unfortunately, sometimes the line was ignored -- actually even modifying the line in /boot/default/loader.conf sometimes doesn't work. ANALYSIS: After much investigation, turned out to be a bug in the logic. The existing code detected a new assignment by looking at the address of the the variable containing the string. This only worked by pure chance, i.e. if the new string is longer than the previous value then the memory allocator may return a different address to store the string hence triggering the detection. SOLUTION: This commit contains a minimal change to fix the problem, without altering too much the existing structure of the code. However, as a step towards improving the quality and reliability of this code, I have introduced a handful of one-line functions (strget, strset, strfree, string= ) that could be used in dozens of places in the existing code. HOWEVER: There is a much bigger problem here. Even though I am no Forth expert (as most fellow src committers) I can tell that much of the forth code (in support.4th at least) is in severe need of a review/refactoring: + pieces of code are replicated multiple times instead of writing functions (see e.g. set_module_*); + a lot of stale code (e.g. structure definitions for preloaded_files, kernel_module, pnp stuff) which is not used or at least belongs elsewhere. The code bload is extremely bad as the loader runs with very small memory constraints, and we already hit the limit once (see http://svn.freebsd.org/viewvc/base?view=revisionrevision=185132 Reducing the footprint of the forth files is critical. + two different styles of coding, one using pure stack functions (maybe beautiful but surely highly unreadable), one using high level mechanisms to give names to arguments and local variables (which leads to readable code). Note that this code is used by default by all FreeBSD installations, so the fragility and the code bloat are extremely damaging. I will try to work fixing the three items above, but if others have time, please have a look at these issues. MFC after: 4 weeks Modified: head/sys/boot/forth/support.4th Modified: head/sys/boot/forth/support.4th == --- head/sys/boot/forth/support.4th Sun Dec 7 19:29:11 2008 (r185745) +++ head/sys/boot/forth/support.4th Sun Dec 7 19:42:20 2008 (r185746) @@ -288,6 +288,17 @@ only forth also support-functions defini : free-memory free if free_error throw then ; +: strget { var -- addr len } var .addr @ var .len @ ; + +\ assign addr len to variable. +: strset { addr len var -- } addr var .addr ! len var .len ! ; + +\ free memory and reset fields +: strfree { var -- } var .addr @ ?dup if free-memory 0 0 var strset then ; + +\ free old content, make a copy of the string and assign to variable +: string= { addr len var -- } var strfree addr len strdup var strset ; + \ Assignment data temporary storage string name_buffer @@ -712,19 +723,6 @@ only forth also support-functions also f module_loaderror_suffix suffix_type? ; -: set_conf_files - conf_files .addr @ ?dup if -free-memory - then - value_buffer .addr @ c@ [char] = if -value_buffer .addr @ char+ value_buffer .len @ 2 chars - - else -value_buffer .addr @ value_buffer .len @ - then - strdup - conf_files .len ! conf_files .addr ! -; - : set_nextboot_conf nextboot_conf_file .addr @ ?dup if free-memory @@ -888,6 +886,11 @@ only forth also support-functions also f then ; +: set_conf_files + set_environment_variable + s loader_conf_files getenv conf_files string= +; + : set_nextboot_flag yes_value? to nextboot? ; @@ -1045,7 +1048,6 @@ only forth also support-functions defini \ Variables used for processing multiple conf files string current_file_name -variable current_conf_files \ Indicates if any conf file was succesfully read @@ -1053,16 +1055,8 @@ variable current_conf_files \ loader_conf_files processing support functions -: set_current_conf_files - conf_files .addr @ current_conf_files ! -; - -: get_conf_files - conf_files .addr @ conf_files .len @ strdup -; - -: recurse_on_conf_files? - current_conf_files @ conf_files .addr @ +: get_conf_files ( -- addr len ) \ put addr/len on stack, reset var + conf_files strget 0 0 conf_files strset ; : skip_leading_spaces { addr len pos -- addr len pos' } @@ -1133,7 +1127,6 @@ variable current_conf_files \ Interface to
svn commit: r186405 - head/libexec/ftpd head/sys/kern releng/6.3 releng/6.3/libexec/ftpd releng/6.3/sys/conf releng/6.3/sys/kern releng/6.4 releng/6.4/libexec/ftpd releng/6.4/sys/conf releng/6.4/sy...
Author: cperciva Date: Tue Dec 23 01:23:09 2008 New Revision: 186405 URL: http://svn.freebsd.org/changeset/base/186405 Log: Prevent cross-site forgery attacks on ftpd(8) due to splitting long commands into multiple requests. [08:12] Avoid calling uninitialized function pointers in protocol switch code. [08:13] Merry Christmas everybody... Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw Modified: stable/7/libexec/ftpd/extern.h stable/7/libexec/ftpd/ftpcmd.y stable/7/libexec/ftpd/ftpd.c stable/7/sys/kern/uipc_domain.c Changes in other areas also in this revision: Modified: head/libexec/ftpd/extern.h head/libexec/ftpd/ftpcmd.y head/libexec/ftpd/ftpd.c head/sys/kern/uipc_domain.c releng/6.3/UPDATING releng/6.3/libexec/ftpd/extern.h releng/6.3/libexec/ftpd/ftpcmd.y releng/6.3/libexec/ftpd/ftpd.c releng/6.3/sys/conf/newvers.sh releng/6.3/sys/kern/uipc_domain.c releng/6.4/UPDATING releng/6.4/libexec/ftpd/extern.h releng/6.4/libexec/ftpd/ftpcmd.y releng/6.4/libexec/ftpd/ftpd.c releng/6.4/sys/conf/newvers.sh releng/6.4/sys/kern/uipc_domain.c releng/7.0/UPDATING releng/7.0/libexec/ftpd/extern.h releng/7.0/libexec/ftpd/ftpcmd.y releng/7.0/libexec/ftpd/ftpd.c releng/7.0/sys/conf/newvers.sh releng/7.0/sys/kern/uipc_domain.c releng/7.1/UPDATING releng/7.1/libexec/ftpd/extern.h releng/7.1/libexec/ftpd/ftpcmd.y releng/7.1/libexec/ftpd/ftpd.c releng/7.1/sys/kern/uipc_domain.c stable/6/libexec/ftpd/extern.h stable/6/libexec/ftpd/ftpcmd.y stable/6/libexec/ftpd/ftpd.c stable/6/sys/kern/uipc_domain.c Modified: stable/7/libexec/ftpd/extern.h == --- stable/7/libexec/ftpd/extern.h Tue Dec 23 01:22:57 2008 (r186404) +++ stable/7/libexec/ftpd/extern.h Tue Dec 23 01:23:09 2008 (r186405) @@ -46,7 +46,7 @@ void fatalerror(char *); voidftpd_logwtmp(char *, char *, struct sockaddr *addr); intftpd_pclose(FILE *); FILE *ftpd_popen(char *, char *); -char *getline(char *, int, FILE *); +intgetline(char *, int, FILE *); void lreply(int, const char *, ...) __printflike(2, 3); void makedir(char *); void nack(char *); Modified: stable/7/libexec/ftpd/ftpcmd.y == --- stable/7/libexec/ftpd/ftpcmd.y Tue Dec 23 01:22:57 2008 (r186404) +++ stable/7/libexec/ftpd/ftpcmd.y Tue Dec 23 01:23:09 2008 (r186405) @@ -1191,7 +1191,7 @@ lookup(struct tab *p, char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1207,7 +1207,7 @@ getline(char *s, int n, FILE *iop) if (ftpdebug) syslog(LOG_DEBUG, command: %s, s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1244,13 +1244,24 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n = 0 || c == '\n') + if (--n = 0) { + /* +* If command doesn't fit into buffer, discard the +* rest of the command and indicate truncation. +* This prevents the command to be split up into +* multiple commands. +*/ + while (c != '\n' (c = getc(iop)) != EOF) + ; + return (-2); + } + if (c == '\n') break; } got_eof: sigprocmask(SIG_SETMASK, osset, NULL); if (c == EOF cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpdebug) { if (!guest strncasecmp(pass , s, 5) == 0) { @@ -1270,7 +1281,7 @@ got_eof: syslog(LOG_DEBUG, command: %.*s, len, s); } } - return (s); + return (0); } static void @@ -1300,9 +1311,14 @@ yylex(void) case CMD: (void) signal(SIGALRM, toolong); (void) alarm(timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + n = getline(cbuf, sizeof(cbuf)-1, stdin); + if (n == -1) { reply(221, You could at least say goodbye.); dologout(0); + } else if (n == -2) { + reply(500, Command too long.); + (void) alarm(0); +
svn commit: r186405 - head/libexec/ftpd head/sys/kern releng/6.3 releng/6.3/libexec/ftpd releng/6.3/sys/conf releng/6.3/sys/kern releng/6.4 releng/6.4/libexec/ftpd releng/6.4/sys/conf releng/6.4/sy...
Author: cperciva Date: Tue Dec 23 01:23:09 2008 New Revision: 186405 URL: http://svn.freebsd.org/changeset/base/186405 Log: Prevent cross-site forgery attacks on ftpd(8) due to splitting long commands into multiple requests. [08:12] Avoid calling uninitialized function pointers in protocol switch code. [08:13] Merry Christmas everybody... Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw Modified: head/libexec/ftpd/extern.h head/libexec/ftpd/ftpcmd.y head/libexec/ftpd/ftpd.c head/sys/kern/uipc_domain.c Changes in other areas also in this revision: Modified: releng/6.3/UPDATING releng/6.3/libexec/ftpd/extern.h releng/6.3/libexec/ftpd/ftpcmd.y releng/6.3/libexec/ftpd/ftpd.c releng/6.3/sys/conf/newvers.sh releng/6.3/sys/kern/uipc_domain.c releng/6.4/UPDATING releng/6.4/libexec/ftpd/extern.h releng/6.4/libexec/ftpd/ftpcmd.y releng/6.4/libexec/ftpd/ftpd.c releng/6.4/sys/conf/newvers.sh releng/6.4/sys/kern/uipc_domain.c releng/7.0/UPDATING releng/7.0/libexec/ftpd/extern.h releng/7.0/libexec/ftpd/ftpcmd.y releng/7.0/libexec/ftpd/ftpd.c releng/7.0/sys/conf/newvers.sh releng/7.0/sys/kern/uipc_domain.c releng/7.1/UPDATING releng/7.1/libexec/ftpd/extern.h releng/7.1/libexec/ftpd/ftpcmd.y releng/7.1/libexec/ftpd/ftpd.c releng/7.1/sys/kern/uipc_domain.c stable/6/libexec/ftpd/extern.h stable/6/libexec/ftpd/ftpcmd.y stable/6/libexec/ftpd/ftpd.c stable/6/sys/kern/uipc_domain.c stable/7/libexec/ftpd/extern.h stable/7/libexec/ftpd/ftpcmd.y stable/7/libexec/ftpd/ftpd.c stable/7/sys/kern/uipc_domain.c Modified: head/libexec/ftpd/extern.h == --- head/libexec/ftpd/extern.h Tue Dec 23 01:22:57 2008(r186404) +++ head/libexec/ftpd/extern.h Tue Dec 23 01:23:09 2008(r186405) @@ -46,7 +46,7 @@ void fatalerror(char *); voidftpd_logwtmp(char *, char *, struct sockaddr *addr); intftpd_pclose(FILE *); FILE *ftpd_popen(char *, char *); -char *getline(char *, int, FILE *); +intgetline(char *, int, FILE *); void lreply(int, const char *, ...) __printflike(2, 3); void makedir(char *); void nack(char *); Modified: head/libexec/ftpd/ftpcmd.y == --- head/libexec/ftpd/ftpcmd.y Tue Dec 23 01:22:57 2008(r186404) +++ head/libexec/ftpd/ftpcmd.y Tue Dec 23 01:23:09 2008(r186405) @@ -1191,7 +1191,7 @@ lookup(struct tab *p, char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1207,7 +1207,7 @@ getline(char *s, int n, FILE *iop) if (ftpdebug) syslog(LOG_DEBUG, command: %s, s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1244,13 +1244,24 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n = 0 || c == '\n') + if (--n = 0) { + /* +* If command doesn't fit into buffer, discard the +* rest of the command and indicate truncation. +* This prevents the command to be split up into +* multiple commands. +*/ + while (c != '\n' (c = getc(iop)) != EOF) + ; + return (-2); + } + if (c == '\n') break; } got_eof: sigprocmask(SIG_SETMASK, osset, NULL); if (c == EOF cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpdebug) { if (!guest strncasecmp(pass , s, 5) == 0) { @@ -1270,7 +1281,7 @@ got_eof: syslog(LOG_DEBUG, command: %.*s, len, s); } } - return (s); + return (0); } static void @@ -1300,9 +1311,14 @@ yylex(void) case CMD: (void) signal(SIGALRM, toolong); (void) alarm(timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + n = getline(cbuf, sizeof(cbuf)-1, stdin); + if (n == -1) { reply(221, You could at least say goodbye.); dologout(0); + } else if (n == -2) { + reply(500, Command too long.); + (void) alarm(0); + continue;
svn commit: r186405 - head/libexec/ftpd head/sys/kern releng/6.3 releng/6.3/libexec/ftpd releng/6.3/sys/conf releng/6.3/sys/kern releng/6.4 releng/6.4/libexec/ftpd releng/6.4/sys/conf releng/6.4/sy...
Author: cperciva Date: Tue Dec 23 01:23:09 2008 New Revision: 186405 URL: http://svn.freebsd.org/changeset/base/186405 Log: Prevent cross-site forgery attacks on ftpd(8) due to splitting long commands into multiple requests. [08:12] Avoid calling uninitialized function pointers in protocol switch code. [08:13] Merry Christmas everybody... Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw Modified: releng/6.3/UPDATING releng/6.3/libexec/ftpd/extern.h releng/6.3/libexec/ftpd/ftpcmd.y releng/6.3/libexec/ftpd/ftpd.c releng/6.3/sys/conf/newvers.sh releng/6.3/sys/kern/uipc_domain.c releng/6.4/UPDATING releng/6.4/libexec/ftpd/extern.h releng/6.4/libexec/ftpd/ftpcmd.y releng/6.4/libexec/ftpd/ftpd.c releng/6.4/sys/conf/newvers.sh releng/6.4/sys/kern/uipc_domain.c releng/7.0/UPDATING releng/7.0/libexec/ftpd/extern.h releng/7.0/libexec/ftpd/ftpcmd.y releng/7.0/libexec/ftpd/ftpd.c releng/7.0/sys/conf/newvers.sh releng/7.0/sys/kern/uipc_domain.c releng/7.1/UPDATING releng/7.1/libexec/ftpd/extern.h releng/7.1/libexec/ftpd/ftpcmd.y releng/7.1/libexec/ftpd/ftpd.c releng/7.1/sys/kern/uipc_domain.c Changes in other areas also in this revision: Modified: head/libexec/ftpd/extern.h head/libexec/ftpd/ftpcmd.y head/libexec/ftpd/ftpd.c head/sys/kern/uipc_domain.c stable/6/libexec/ftpd/extern.h stable/6/libexec/ftpd/ftpcmd.y stable/6/libexec/ftpd/ftpd.c stable/6/sys/kern/uipc_domain.c stable/7/libexec/ftpd/extern.h stable/7/libexec/ftpd/ftpcmd.y stable/7/libexec/ftpd/ftpd.c stable/7/sys/kern/uipc_domain.c Modified: releng/6.3/UPDATING == --- releng/6.3/UPDATING Tue Dec 23 01:22:57 2008(r186404) +++ releng/6.3/UPDATING Tue Dec 23 01:23:09 2008(r186405) @@ -8,6 +8,13 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20081223: p7 FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw + Prevent cross-site forgery attacks on ftpd(8) due to splitting + long commands into multiple requests. [08:12] + + Avoid calling uninitialized function pointers in protocol switch + code. [08:13] + 20081124: p6 FreeBSD-SA-08:11.arc4random Make sure arc4random(9) is properly seeded when /etc/rc.d/initrandom returns. Modified: releng/6.3/libexec/ftpd/extern.h == --- releng/6.3/libexec/ftpd/extern.hTue Dec 23 01:22:57 2008 (r186404) +++ releng/6.3/libexec/ftpd/extern.hTue Dec 23 01:23:09 2008 (r186405) @@ -46,7 +46,7 @@ void fatalerror(char *); voidftpd_logwtmp(char *, char *, struct sockaddr *addr); intftpd_pclose(FILE *); FILE *ftpd_popen(char *, char *); -char *getline(char *, int, FILE *); +intgetline(char *, int, FILE *); void lreply(int, const char *, ...) __printflike(2, 3); void makedir(char *); void nack(char *); Modified: releng/6.3/libexec/ftpd/ftpcmd.y == --- releng/6.3/libexec/ftpd/ftpcmd.yTue Dec 23 01:22:57 2008 (r186404) +++ releng/6.3/libexec/ftpd/ftpcmd.yTue Dec 23 01:23:09 2008 (r186405) @@ -1191,7 +1191,7 @@ lookup(struct tab *p, char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1207,7 +1207,7 @@ getline(char *s, int n, FILE *iop) if (ftpdebug) syslog(LOG_DEBUG, command: %s, s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1244,13 +1244,24 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n = 0 || c == '\n') + if (--n = 0) { + /* +* If command doesn't fit into buffer, discard the +* rest of the command and indicate truncation. +* This prevents the command to be split up into +* multiple commands. +*/ + while (c != '\n' (c = getc(iop)) != EOF) + ; + return (-2); + } + if (c == '\n') break; } got_eof: sigprocmask(SIG_SETMASK, osset, NULL); if (c == EOF cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpdebug) { if (!guest strncasecmp(pass , s, 5) == 0) {
svn commit: r186408 - releng/7.1/sys/conf
Author: kensmith Date: Tue Dec 23 02:05:56 2008 New Revision: 186408 URL: http://svn.freebsd.org/changeset/base/186408 Log: Prepare for 7.1-RC2 builds. Approved by: re (implicit) Modified: releng/7.1/sys/conf/newvers.sh Modified: releng/7.1/sys/conf/newvers.sh == --- releng/7.1/sys/conf/newvers.sh Tue Dec 23 01:57:51 2008 (r186407) +++ releng/7.1/sys/conf/newvers.sh Tue Dec 23 02:05:56 2008 (r186408) @@ -32,7 +32,7 @@ TYPE=FreeBSD REVISION=7.1 -BRANCH=RC1 +BRANCH=RC2 if [ X${BRANCH_OVERRIDE} != X ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186409 - stable/7/sys/pc98/conf
Author: nyan Date: Tue Dec 23 02:14:42 2008 New Revision: 186409 URL: http://svn.freebsd.org/changeset/base/186409 Log: MFH: part of 186372 Disable the pccard, parallel, GbE and wireless lan related devices to decrease a kernel size. Approved by: re (kensmith) Modified: stable/7/sys/pc98/conf/GENERIC Modified: stable/7/sys/pc98/conf/GENERIC == --- stable/7/sys/pc98/conf/GENERIC Tue Dec 23 02:05:56 2008 (r186408) +++ stable/7/sys/pc98/conf/GENERIC Tue Dec 23 02:14:42 2008 (r186409) @@ -95,9 +95,9 @@ devicesym # NCR/Symbios Logic (newer device aic # PC-9801-100 device ct # host adapter using WD33C93[ABC] chip (C bus) -device ncv # NCR 53C500 -device nsp # Workbit Ninja SCSI-3 -device stg # TMC 18C30/18C50 +#devicencv # NCR 53C500 +#devicensp # Workbit Ninja SCSI-3 +#devicestg # TMC 18C30/18C50 # SCSI peripherals device scbus # SCSI bus (required for SCSI) @@ -136,9 +136,9 @@ device sc # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support -device cbb # cardbus (yenta) bridge -device pccard # PC Card (16-bit) bus -device cardbus # CardBus (32-bit) bus +#devicecbb # cardbus (yenta) bridge +#devicepccard # PC Card (16-bit) bus +#devicecardbus # CardBus (32-bit) bus # Serial (COM) ports optionsCOM_MULTIPORT @@ -149,11 +149,11 @@ devicemse #devicejoy # NEW Parallel port -device ppc -device ppbus # Parallel port bus (required) -device lpt # Printer -device plip# TCP/IP over parallel -device ppi # Parallel port interface device +#deviceppc +#deviceppbus # Parallel port bus (required) +#devicelpt # Printer +#deviceplip# TCP/IP over parallel +#deviceppi # Parallel port interface device #devicevpo # Requires scbus and da # OLD Parallel port # Please stay olpt driver after ppc driver @@ -161,7 +161,7 @@ device ppi # Parallel port interface d # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') -device em # Intel PRO/1000 adapter Gigabit Ethernet Card +#deviceem # Intel PRO/1000 adapter Gigabit Ethernet Card device le # AMD Am7900 LANCE and Am79C9xx PCnet device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') @@ -170,22 +170,22 @@ devicevx # 3Com 3c590, 3c595 (``Vorte # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device bfe # Broadcom BCM440x 10/100 Ethernet -device bge # Broadcom BCM570xx Gigabit Ethernet +#devicebge # Broadcom BCM570xx Gigabit Ethernet device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device lge # Level 1 LXT1001 gigabit Ethernet -device nge # NatSemi DP83820 gigabit Ethernet +#devicelge # Level 1 LXT1001 gigabit Ethernet +#devicenge # NatSemi DP83820 gigabit Ethernet device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') device sis # Silicon Integrated Systems SiS 900/SiS 7016 -device sk # SysKonnect SK-984x SK-982x gigabit Ethernet +#devicesk # SysKonnect SK-984x SK-982x gigabit Ethernet device ste # Sundance ST201 (D-Link DFE-550TX) device ti # Alteon Networks Tigon I/II gigabit Ethernet device tl # Texas Instruments ThunderLAN device tx # SMC EtherPower II (83c170 ``EPIC'') -device vge # VIA VT612x gigabit Ethernet +#devicevge # VIA VT612x gigabit Ethernet device vr # VIA Rhine, Rhine II device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'',
svn commit: r186410 - releng/7.1/sys/pc98/conf
Author: nyan Date: Tue Dec 23 02:19:14 2008 New Revision: 186410 URL: http://svn.freebsd.org/changeset/base/186410 Log: MFH: part of 186372 Disable the pccard, parallel, GbE and wireless lan related devices to decrease a kernel size. Approved by: re (kensmith) Modified: releng/7.1/sys/pc98/conf/GENERIC Modified: releng/7.1/sys/pc98/conf/GENERIC == --- releng/7.1/sys/pc98/conf/GENERICTue Dec 23 02:14:42 2008 (r186409) +++ releng/7.1/sys/pc98/conf/GENERICTue Dec 23 02:19:14 2008 (r186410) @@ -95,9 +95,9 @@ devicesym # NCR/Symbios Logic (newer device aic # PC-9801-100 device ct # host adapter using WD33C93[ABC] chip (C bus) -device ncv # NCR 53C500 -device nsp # Workbit Ninja SCSI-3 -device stg # TMC 18C30/18C50 +#devicencv # NCR 53C500 +#devicensp # Workbit Ninja SCSI-3 +#devicestg # TMC 18C30/18C50 # SCSI peripherals device scbus # SCSI bus (required for SCSI) @@ -136,9 +136,9 @@ device sc # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support -device cbb # cardbus (yenta) bridge -device pccard # PC Card (16-bit) bus -device cardbus # CardBus (32-bit) bus +#devicecbb # cardbus (yenta) bridge +#devicepccard # PC Card (16-bit) bus +#devicecardbus # CardBus (32-bit) bus # Serial (COM) ports optionsCOM_MULTIPORT @@ -149,11 +149,11 @@ devicemse #devicejoy # NEW Parallel port -device ppc -device ppbus # Parallel port bus (required) -device lpt # Printer -device plip# TCP/IP over parallel -device ppi # Parallel port interface device +#deviceppc +#deviceppbus # Parallel port bus (required) +#devicelpt # Printer +#deviceplip# TCP/IP over parallel +#deviceppi # Parallel port interface device #devicevpo # Requires scbus and da # OLD Parallel port # Please stay olpt driver after ppc driver @@ -161,7 +161,7 @@ device ppi # Parallel port interface d # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') -device em # Intel PRO/1000 adapter Gigabit Ethernet Card +#deviceem # Intel PRO/1000 adapter Gigabit Ethernet Card device le # AMD Am7900 LANCE and Am79C9xx PCnet device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') @@ -170,22 +170,22 @@ devicevx # 3Com 3c590, 3c595 (``Vorte # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device bfe # Broadcom BCM440x 10/100 Ethernet -device bge # Broadcom BCM570xx Gigabit Ethernet +#devicebge # Broadcom BCM570xx Gigabit Ethernet device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device lge # Level 1 LXT1001 gigabit Ethernet -device nge # NatSemi DP83820 gigabit Ethernet +#devicelge # Level 1 LXT1001 gigabit Ethernet +#devicenge # NatSemi DP83820 gigabit Ethernet device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') device sis # Silicon Integrated Systems SiS 900/SiS 7016 -device sk # SysKonnect SK-984x SK-982x gigabit Ethernet +#devicesk # SysKonnect SK-984x SK-982x gigabit Ethernet device ste # Sundance ST201 (D-Link DFE-550TX) device ti # Alteon Networks Tigon I/II gigabit Ethernet device tl # Texas Instruments ThunderLAN device tx # SMC EtherPower II (83c170 ``EPIC'') -device vge # VIA VT612x gigabit Ethernet +#devicevge # VIA VT612x gigabit Ethernet device vr # VIA Rhine, Rhine II device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'',
svn commit: r186411 - head/sys/netinet
Author: qingli Date: Tue Dec 23 03:33:32 2008 New Revision: 186411 URL: http://svn.freebsd.org/changeset/base/186411 Log: Don't create a bogus ARP entry for 0.0.0.0. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Tue Dec 23 02:19:14 2008(r186410) +++ head/sys/netinet/if_ether.c Tue Dec 23 03:33:32 2008(r186411) @@ -758,23 +758,24 @@ arp_ifinit(struct ifnet *ifp, struct ifa { struct llentry *lle; - if (ntohl(IA_SIN(ifa)-sin_addr.s_addr) != INADDR_ANY) + if (ntohl(IA_SIN(ifa)-sin_addr.s_addr) != INADDR_ANY) { arprequest(ifp, IA_SIN(ifa)-sin_addr, IA_SIN(ifa)-sin_addr, IF_LLADDR(ifp)); - /* -* interface address is considered static entry -* because the output of the arp utility shows -* that L2 entry as permanent -*/ - IF_AFDATA_LOCK(ifp); - lle = lla_lookup(LLTABLE(ifp), (LLE_CREATE | LLE_IFADDR | LLE_STATIC), - (struct sockaddr *)IA_SIN(ifa)); - IF_AFDATA_UNLOCK(ifp); - if (lle == NULL) - log(LOG_INFO, arp_ifinit: cannot create arp - entry for interface address\n); - else - LLE_RUNLOCK(lle); + /* +* interface address is considered static entry +* because the output of the arp utility shows +* that L2 entry as permanent +*/ + IF_AFDATA_LOCK(ifp); + lle = lla_lookup(LLTABLE(ifp), (LLE_CREATE | LLE_IFADDR | LLE_STATIC), +(struct sockaddr *)IA_SIN(ifa)); + IF_AFDATA_UNLOCK(ifp); + if (lle == NULL) + log(LOG_INFO, arp_ifinit: cannot create arp + entry for interface address\n); + else + LLE_RUNLOCK(lle); + } ifa-ifa_rtrequest = NULL; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186415 - head/sys/dev/usb
Author: sam Date: Tue Dec 23 04:42:10 2008 New Revision: 186415 URL: http://svn.freebsd.org/changeset/base/186415 Log: o add Transaction Translator support (still missing ISOC xfers) o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be set in USBMODE o split reset work into new public routine ehci_reset so bus shim drivers can force big-endian byte-select before ehci_init Modified: head/sys/dev/usb/ehci.c head/sys/dev/usb/ehcivar.h Modified: head/sys/dev/usb/ehci.c == --- head/sys/dev/usb/ehci.c Tue Dec 23 04:36:11 2008(r186414) +++ head/sys/dev/usb/ehci.c Tue Dec 23 04:42:10 2008(r186415) @@ -310,33 +310,18 @@ static struct usbd_pipe_methods ehci_dev ehci_device_isoc_done, }; -static usbd_status -ehci_hcreset(ehci_softc_t *sc) +usbd_status +ehci_reset(ehci_softc_t *sc) { u_int32_t hcr; u_int i; - EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ - for (i = 0; i 100; i++) { - usb_delay_ms(sc-sc_bus, 1); - hcr = EOREAD4(sc, EHCI_USBSTS) EHCI_STS_HCH; - if (hcr) - break; - } - if (!hcr) - /* - * Fall through and try reset anyway even though - * Table 2-9 in the EHCI spec says this will result - * in undefined behavior. - */ - device_printf(sc-sc_bus.bdev, stop timeout\n); - EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); for (i = 0; i 100; i++) { usb_delay_ms(sc-sc_bus, 1); hcr = EOREAD4(sc, EHCI_USBCMD) EHCI_CMD_HCRESET; if (!hcr) { - if (sc-sc_flags EHCI_SCFLG_SETMODE) { + if (sc-sc_flags (EHCI_SCFLG_SETMODE | EHCI_SCFLG_BIGEMMIO)) { /* * Force USBMODE as requested. Controllers * may have multiple operating modes. @@ -347,6 +332,11 @@ ehci_hcreset(ehci_softc_t *sc) device_printf(sc-sc_bus.bdev, set host controller mode\n); } + if (sc-sc_flags EHCI_SCFLG_BIGEMMIO) { + usbmode = (usbmode ~ EHCI_UM_ES) | EHCI_UM_ES_BE; + device_printf(sc-sc_bus.bdev, + set big-endian mode\n); + } EOWRITE4(sc, EHCI_USBMODE, usbmode); } return (USBD_NORMAL_COMPLETION); @@ -356,6 +346,30 @@ ehci_hcreset(ehci_softc_t *sc) return (USBD_IOERROR); } +static usbd_status +ehci_hcreset(ehci_softc_t *sc) +{ + u_int32_t hcr; + u_int i; + + EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ + for (i = 0; i 100; i++) { + usb_delay_ms(sc-sc_bus, 1); + hcr = EOREAD4(sc, EHCI_USBSTS) EHCI_STS_HCH; + if (hcr) + break; + } + if (!hcr) + /* + * Fall through and try reset anyway even though + * Table 2-9 in the EHCI spec says this will result + * in undefined behavior. + */ + device_printf(sc-sc_bus.bdev, stop timeout\n); + + return ehci_reset(sc); +} + usbd_status ehci_init(ehci_softc_t *sc) { @@ -2008,7 +2022,7 @@ ehci_root_ctrl_start(usbd_xfer_handle xf i = UPS_HIGH_SPEED; - if (sc-sc_flags EHCI_SCFLG_FORCESPEED) { + if (sc-sc_flags (EHCI_SCFLG_FORCESPEED | EHCI_SCFLG_TT)) { if ((v 0xc00) == 0x800) i = UPS_HIGH_SPEED; else if ((v 0xc00) == 0x400) @@ -2056,7 +2070,8 @@ ehci_root_ctrl_start(usbd_xfer_handle xf case UHF_PORT_RESET: DPRINTFN(5,(ehci_root_ctrl_start: reset port %d\n, index)); - if (EHCI_PS_IS_LOWSPEED(v)) { + if (EHCI_PS_IS_LOWSPEED(v) + (sc-sc_flags EHCI_SCFLG_TT) == 0) { /* Low speed device, give up ownership. */ ehci_disown(sc, index, 1); break; @@ -2089,7 +2104,8 @@ ehci_root_ctrl_start(usbd_xfer_handle xf device_get_nameunit(sc-sc_bus.bdev)); return (USBD_TIMEOUT); } - if (!(v EHCI_PS_PE)) { + if (!(v EHCI_PS_PE) + (sc-sc_flags EHCI_SCFLG_TT)
svn commit: r186416 - head/sys/arm/xscale/ixp425
Author: sam Date: Tue Dec 23 04:44:23 2008 New Revision: 186416 URL: http://svn.freebsd.org/changeset/base/186416 Log: o enable TT and big-endian MMIO o force a reset before ehci_init to get byte-select setup LS, FS, and HS devices now work on the Cambria board Modified: head/sys/arm/xscale/ixp425/ixp435_ehci.c Modified: head/sys/arm/xscale/ixp425/ixp435_ehci.c == --- head/sys/arm/xscale/ixp425/ixp435_ehci.cTue Dec 23 04:42:10 2008 (r186415) +++ head/sys/arm/xscale/ixp425/ixp435_ehci.cTue Dec 23 04:44:23 2008 (r186416) @@ -225,11 +225,14 @@ ehci_ixp_attach(device_t self) * which means port speed must be read from the Port Status * register following a port enable. */ - sc-sc_flags |= EHCI_SCFLG_SETMODE -| EHCI_SCFLG_NORESTERM -| EHCI_SCFLG_FORCESPEED + sc-sc_flags |= EHCI_SCFLG_TT +| EHCI_SCFLG_SETMODE | EHCI_SCFLG_BIGEDESC +| EHCI_SCFLG_BIGEMMIO +| EHCI_SCFLG_NORESTERM ; + (void) ehci_reset(sc); + err = ehci_init(sc); if (!err) { sc-sc_flags |= EHCI_SCFLG_DONEINIT; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186417 - head/sys/arm/include
Author: sam Date: Tue Dec 23 04:46:13 2008 New Revision: 186417 URL: http://svn.freebsd.org/changeset/base/186417 Log: add IXP465 and generic IXP425 definition Modified: head/sys/arm/include/armreg.h Modified: head/sys/arm/include/armreg.h == --- head/sys/arm/include/armreg.h Tue Dec 23 04:44:23 2008 (r186416) +++ head/sys/arm/include/armreg.h Tue Dec 23 04:46:13 2008 (r186417) @@ -171,10 +171,12 @@ #defineCPU_ID_80219_4000x69052e20 /* A0 stepping/revision. */ #defineCPU_ID_80219_6000x69052e30 /* A0 stepping/revision. */ #defineCPU_ID_813420x69056810 +#defineCPU_ID_IXP425 0x690541c0 #defineCPU_ID_IXP425_533 0x690541c0 #defineCPU_ID_IXP425_400 0x690541d0 #defineCPU_ID_IXP425_266 0x690541f0 #defineCPU_ID_IXP435 0x69054040 +#defineCPU_ID_IXP465 0x69054200 /* ARM3-specific coprocessor 15 registers */ #define ARM3_CP15_FLUSH1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186419 - head/sys/arm/xscale/ixp425
Author: sam Date: Tue Dec 23 04:49:01 2008 New Revision: 186419 URL: http://svn.freebsd.org/changeset/base/186419 Log: kill NPE_PORTS_MAX, it's not used and likely will not be Modified: head/sys/arm/xscale/ixp425/if_npereg.h Modified: head/sys/arm/xscale/ixp425/if_npereg.h == --- head/sys/arm/xscale/ixp425/if_npereg.h Tue Dec 23 04:48:27 2008 (r186418) +++ head/sys/arm/xscale/ixp425/if_npereg.h Tue Dec 23 04:49:01 2008 (r186419) @@ -84,7 +84,6 @@ struct npehwbuf { } ix_ne[NPE_MAXSEG]; }; -#define NPE_PORTS_MAX 2 /* logical ports */ #define NPE_FRAME_SIZE_DEFAULT 1536 #define NPE_FRAME_SIZE_MAX (65536-64) #define NPE_FRAME_SIZE_MIN 64 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org