Re: svn commit: r213714 - in head/sys: kern sys
Peter Holm wrote: On Tue, Oct 12, 2010 at 12:36:56AM +, David Xu wrote: Author: davidxu Date: Tue Oct 12 00:36:56 2010 New Revision: 213714 URL: http://svn.freebsd.org/changeset/base/213714 Log: Add a flag TDF_TIDHASH to prevent a thread from being added to or removed from thread hash table multiple times. Modified: head/sys/kern/kern_thread.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c == --- head/sys/kern/kern_thread.c Mon Oct 11 23:24:57 2010(r213713) Is this the same problem? panic: Bad link elm 0xc767e870 next-prev != elm on r213828. http://people.freebsd.org/~pho/stress/log/leopard3.002.txt - Peter Thanks for testing, can you try this patch ? http://people.freebsd.org/~davidxu/tidhash/tidhash4.diff ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213829 - head/sys/kern
Author: davidxu Date: Thu Oct 14 08:01:33 2010 New Revision: 213829 URL: http://svn.freebsd.org/changeset/base/213829 Log: In kern_sigtimedwait(), move initialization code out of process lock, instead of using SIGISMEMBER to test every interesting signal, just unmask the signal set and let cursig() return one, get the signal after it returns, call reschedule_signal() after signals are blocked again. In kern_sigprocmask(), don't call reschedule_signal() when it is unnecessary. In reschedule_signal(), replace SIGISEMPTY() + SIGISMEMBER() with sig_ffs(), rename variable 'i' to sig. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c == --- head/sys/kern/kern_sig.cThu Oct 14 03:13:20 2010(r213828) +++ head/sys/kern/kern_sig.cThu Oct 14 08:01:33 2010(r213829) @@ -466,6 +466,7 @@ sigqueue_move_set(sigqueue_t *src, sigqu SIGSETNAND(src-sq_signals, tmp); } +#if 0 static void sigqueue_move(sigqueue_t *src, sigqueue_t *dst, int signo) { @@ -475,6 +476,7 @@ sigqueue_move(sigqueue_t *src, sigqueue_ SIGADDSET(set, signo); sigqueue_move_set(src, dst, set); } +#endif static void sigqueue_delete_set(sigqueue_t *sq, const sigset_t *set) @@ -973,7 +975,6 @@ kern_sigprocmask(struct thread *td, int *oset = td-td_sigmask; error = 0; - SIGEMPTYSET(new_block); if (set != NULL) { switch (how) { case SIG_BLOCK: @@ -986,7 +987,7 @@ kern_sigprocmask(struct thread *td, int case SIG_UNBLOCK: SIGSETNAND(td-td_sigmask, *set); signotify(td); - break; + goto out; case SIG_SETMASK: SIG_CANTMASK(*set); oset1 = td-td_sigmask; @@ -1000,22 +1001,23 @@ kern_sigprocmask(struct thread *td, int break; default: error = EINVAL; - break; + goto out; } - } - /* -* The new_block set contains signals that were not previously -* blocked, but are blocked now. -* -* In case we block any signal that was not previously blocked -* for td, and process has the signal pending, try to schedule -* signal delivery to some thread that does not block the signal, -* possibly waking it up. -*/ - if (p-p_numthreads != 1) - reschedule_signals(p, new_block, flags); + /* +* The new_block set contains signals that were not previously +* blocked, but are blocked now. +* +* In case we block any signal that was not previously blocked +* for td, and process has the signal pending, try to schedule +* signal delivery to some thread that does not block the +* signal, possibly waking it up. +*/ + if (p-p_numthreads != 1) + reschedule_signals(p, new_block, flags); + } +out: if (!(flags SIGPROCMASK_PROC_LOCKED)) PROC_UNLOCK(p); return (error); @@ -1161,23 +1163,18 @@ kern_sigtimedwait(struct thread *td, sig struct timespec *timeout) { struct sigacts *ps; - sigset_t savedmask; + sigset_t saved_mask, new_block; struct proc *p; - int error, sig, hz, i, timevalid = 0; + int error, sig, timo, timevalid = 0; struct timespec rts, ets, ts; struct timeval tv; p = td-td_proc; error = 0; - sig = 0; ets.tv_sec = 0; ets.tv_nsec = 0; - SIG_CANTMASK(waitset); - PROC_LOCK(p); - ps = p-p_sigacts; - savedmask = td-td_sigmask; - if (timeout) { + if (timeout != NULL) { if (timeout-tv_nsec = 0 timeout-tv_nsec 10) { timevalid = 1; getnanouptime(rts); @@ -1185,89 +1182,78 @@ kern_sigtimedwait(struct thread *td, sig timespecadd(ets, timeout); } } - -restart: - for (i = 1; i = _SIG_MAXSIG; ++i) { - if (!SIGISMEMBER(waitset, i)) - continue; - if (!SIGISMEMBER(td-td_sigqueue.sq_signals, i)) { - if (SIGISMEMBER(p-p_sigqueue.sq_signals, i)) { - sigqueue_move(p-p_sigqueue, - td-td_sigqueue, i); - } else - continue; - } - - SIGFILLSET(td-td_sigmask); - SIG_CANTMASK(td-td_sigmask); - SIGDELSET(td-td_sigmask, i); + ksiginfo_init(ksi); + /*
Re: svn commit: r213643 - head/usr.bin/ar
Den 13/10/2010 kl. 05.55 skrev Bruce Evans: I also don't like distributions that stamp every file with their release build time (or maybe a little later, with a single release time). How would do you prevent clobbering metadata outside of archives? What I do is install with -C -p (and also -v -v to report changes), and then compare installed copies or just look at the install -v -v output. What does install(1) do to determine if files are different, if not mtime, size or checksums? Metadata like OBJDIR, SRCDIR, timestamps and user email address might still differ, even though the binaries are functionally equivalent. Would strip(1) or objcopy(1) be able to remove or alter these? I'm a real beginner here. As I read the manuals (GNU ar and BSD ar), the only flags that really control archive contents on archive creation is 'q' and 'r'. The 'l' is ignored, 'c' and 'v' control verbosity, and 'u' and 's' are for performance purposes that are largely irrelevant today (extracting every single *.a file and recreating it wit ar -rD takes less than 10 secs on my slow machine). Is there any negative impact at runtime from having all archives created with either -rD or -qD (ignoring verbosity at build time for now)? I don't really know. 's' is also useful for non-libraries. 'u' is related to clobbering times, but goes the wrong way by updating the archive if the file is newer. I think all FreeBSD libraries should be built with the same flags (probably ARFLAGS, with you putting -D in it if you don't want the timestamp update). However, the places that already use ARFLAGS but set it themselves may be a problem. Some Makefiles initentionally avoid using bsd.lib.mk because they are special and it does the wrong things for them. They probably don't really care about the exact archive flags, but need to be checked individually. I'd like to give it a try. This is where an easy-to-use regression suite with reasonable coverage for FreeBSD would come in handy :-) Thanks, Erik
svn commit: r213831 - head/usr.sbin/ntp
Author: glebius Date: Thu Oct 14 11:20:23 2010 New Revision: 213831 URL: http://svn.freebsd.org/changeset/base/213831 Log: Enable the shared memory reference clock driver. The GPS devices are getting more and more popular, as source of precise time, and the gpsd daemon from ports is using the shared memory to synchronize with ntpd. Reviewed by: roberto Modified: head/usr.sbin/ntp/config.h Modified: head/usr.sbin/ntp/config.h == --- head/usr.sbin/ntp/config.h Thu Oct 14 09:29:59 2010(r213830) +++ head/usr.sbin/ntp/config.h Thu Oct 14 11:20:23 2010(r213831) @@ -126,7 +126,7 @@ /* #undef CLOCK_SCHMID */ /* clock thru shared memory */ -/* #undef CLOCK_SHM */ +#define CLOCK_SHM /* Spectracom 8170/Netclock/2 WWVB receiver */ /* #undef CLOCK_SPECTRACOM */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213832 - head/sys/netinet
Author: bz Date: Thu Oct 14 12:32:49 2010 New Revision: 213832 URL: http://svn.freebsd.org/changeset/base/213832 Log: Use ifa_ifwithaddr_check() rather than ifa_ifwithaddr() as we are not interested in the result and would leak a reference otherwise. PR: kern/151435 Submitted by: Andrew Boyer (aboyer averesystems.com) MFC after:3 days Modified: head/sys/netinet/ip_options.c Modified: head/sys/netinet/ip_options.c == --- head/sys/netinet/ip_options.c Thu Oct 14 11:20:23 2010 (r213831) +++ head/sys/netinet/ip_options.c Thu Oct 14 12:32:49 2010 (r213832) @@ -341,7 +341,7 @@ dropit: } (void)memcpy(ipaddr.sin_addr, sin, sizeof(struct in_addr)); - if (ifa_ifwithaddr((SA)ipaddr) == NULL) + if (ifa_ifwithaddr_check((SA)ipaddr) == 0) continue; cp[IPOPT_OFFSET] += sizeof(struct in_addr); off += sizeof(struct in_addr); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213813 - in head: share/man/man9 sys/kern sys/sys
On Wednesday, October 13, 2010 6:59:04 pm Matthew D Fleming wrote: Author: mdf Date: Wed Oct 13 22:59:04 2010 New Revision: 213813 URL: http://svn.freebsd.org/changeset/base/213813 Log: Use a safer mechanism for determining if a task is currently running, that does not rely on the lifetime of pointers being the same. This also restores the task KBI. Suggested by: jhb MFC after: 1 month Thanks! -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213835 - head/gnu/usr.bin/groff/tmac
Author: jh Date: Thu Oct 14 14:48:11 2010 New Revision: 213835 URL: http://svn.freebsd.org/changeset/base/213835 Log: Add FreeBSD 8.2. Reviewed by: ru MFC after:3 days Modified: head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/gnu/usr.bin/groff/tmac/mdoc.local == --- head/gnu/usr.bin/groff/tmac/mdoc.local Thu Oct 14 14:13:44 2010 (r213834) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Thu Oct 14 14:48:11 2010 (r213835) @@ -79,6 +79,7 @@ .ds doc-operating-system-FreeBSD-7.47.4 .ds doc-operating-system-FreeBSD-8.08.0 .ds doc-operating-system-FreeBSD-8.18.1 +.ds doc-operating-system-FreeBSD-8.28.2 .ds doc-operating-system-FreeBSD-9.09.0 . .\ Definitions not (yet) in doc-syms ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213836 - head/sys/netipsec
Author: bz Date: Thu Oct 14 14:49:49 2010 New Revision: 213836 URL: http://svn.freebsd.org/changeset/base/213836 Log: Style: make the asterisk go with the variable name, not the type. MFC after:3 days Modified: head/sys/netipsec/ipsec_output.c Modified: head/sys/netipsec/ipsec_output.c == --- head/sys/netipsec/ipsec_output.cThu Oct 14 14:48:11 2010 (r213835) +++ head/sys/netipsec/ipsec_output.cThu Oct 14 14:49:49 2010 (r213836) @@ -758,7 +758,7 @@ ipsec6_output_tunnel(struct ipsec_output struct ipsecrequest *isr; struct secasindex saidx; int error; - struct sockaddr_in6* dst6; + struct sockaddr_in6 *dst6; struct mbuf *m; IPSEC_ASSERT(state != NULL, (null state)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213714 - in head/sys: kern sys
On Tue, Oct 12, 2010 at 12:36:56AM +, David Xu wrote: Author: davidxu Date: Tue Oct 12 00:36:56 2010 New Revision: 213714 URL: http://svn.freebsd.org/changeset/base/213714 Log: Add a flag TDF_TIDHASH to prevent a thread from being added to or removed from thread hash table multiple times. Modified: head/sys/kern/kern_thread.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c == --- head/sys/kern/kern_thread.c Mon Oct 11 23:24:57 2010 (r213713) Is this the same problem? panic: Bad link elm 0xc767e870 next-prev != elm on r213828. http://people.freebsd.org/~pho/stress/log/leopard3.002.txt - Peter ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213837 - head/sys/netipsec
Author: bz Date: Thu Oct 14 15:15:22 2010 New Revision: 213837 URL: http://svn.freebsd.org/changeset/base/213837 Log: Remove dead code: assignment to a local variable not used anywhere after that. MFC after:3 days Modified: head/sys/netipsec/ipsec_output.c Modified: head/sys/netipsec/ipsec_output.c == --- head/sys/netipsec/ipsec_output.cThu Oct 14 14:49:49 2010 (r213836) +++ head/sys/netipsec/ipsec_output.cThu Oct 14 15:15:22 2010 (r213837) @@ -853,10 +853,8 @@ ipsec6_output_tunnel(struct ipsec_output } /* adjust state-dst if tunnel endpoint is offlink */ - if (state-ro-ro_rt-rt_flags RTF_GATEWAY) { + if (state-ro-ro_rt-rt_flags RTF_GATEWAY) state-dst = (struct sockaddr *)state-ro-ro_rt-rt_gateway; - dst6 = (struct sockaddr_in6 *)state-dst; - } } m = ipsec6_splithdr(m); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
I'm migrating a box from 8-STABLE to -CURRENT this morning and this commit seems to break buildkernel: cc -O2 -pipe -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c cc1: warnings being treated as errors /usr/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: warning: function declaration isn't a prototype *** Error code 1 I don't have any custom CFLAGS, etc defined. Commenting out the new #defines from this patch allows the build to continue. I'm guessing this doesn't happen on machines already running -CURRENT or tinderbox (and others) would have noticed. However if this is (going to be) a supported upgrade path from 8.x to 9.0 perhaps there's a way to make both clang and gcc from 8.x happy? JN On Oct 13, 2010, at 6:33 AM, Rui Paulo wrote: Author: rpaulo Date: Wed Oct 13 10:33:01 2010 New Revision: 213765 URL: http://svn.freebsd.org/changeset/base/213765 Log: Define YY_NO_INPUT. This makes aicasm buildable by clang with Werror turned on. Modified: head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l head/sys/dev/aic7xxx/aicasm/aicasm_scan.l Modified: head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l == --- head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Wed Oct 13 10:31:32 2010(r213764) +++ head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Wed Oct 13 10:33:01 2010(r213765) @@ -61,6 +61,7 @@ #include aicasm_symbol.h #include aicasm_macro_gram.h +#define YY_NO_INPUT #define MAX_STR_CONST 4096 static char string_buf[MAX_STR_CONST]; static char *string_buf_ptr; Modified: head/sys/dev/aic7xxx/aicasm/aicasm_scan.l == --- head/sys/dev/aic7xxx/aicasm/aicasm_scan.l Wed Oct 13 10:31:32 2010 (r213764) +++ head/sys/dev/aic7xxx/aicasm/aicasm_scan.l Wed Oct 13 10:33:01 2010 (r213765) @@ -61,6 +61,7 @@ #include aicasm_symbol.h #include aicasm_gram.h +#define YY_NO_INPUT /* This is used for macro body capture too, so err on the large size. */ #define MAX_STR_CONST 4096 static char string_buf[MAX_STR_CONST]; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Thursday 14 October 2010 11:18 am, John Nielsen wrote: I'm migrating a box from 8-STABLE to -CURRENT this morning and this commit seems to break buildkernel: cc -O2 -pipe -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c cc1: warnings being treated as errors /usr/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: warning: function declaration isn't a prototype *** Error code 1 I don't have any custom CFLAGS, etc defined. Commenting out the new #defines from this patch allows the build to continue. I'm guessing this doesn't happen on machines already running -CURRENT or tinderbox (and others) would have noticed. However if this is (going to be) a supported upgrade path from 8.x to 9.0 perhaps there's a way to make both clang and gcc from 8.x happy? If you want to upgrade from N to N+1, make buildworld is required. Jung-uk Kim ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Oct 14, 2010, at 12:17 PM, Jung-uk Kim wrote: On Thursday 14 October 2010 11:18 am, John Nielsen wrote: I'm migrating a box from 8-STABLE to -CURRENT this morning and this commit seems to break buildkernel: cc -O2 -pipe -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c cc1: warnings being treated as errors /usr/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: warning: function declaration isn't a prototype *** Error code 1 I don't have any custom CFLAGS, etc defined. Commenting out the new #defines from this patch allows the build to continue. I'm guessing this doesn't happen on machines already running -CURRENT or tinderbox (and others) would have noticed. However if this is (going to be) a supported upgrade path from 8.x to 9.0 perhaps there's a way to make both clang and gcc from 8.x happy? If you want to upgrade from N to N+1, make buildworld is required. Sorry, I did do a make buildworld (which succeeded) prior to the make buildkernel (which failed as I described).___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Thu, 14 Oct 2010, John Nielsen wrote: JN I'm migrating a box from 8-STABLE to -CURRENT this morning and this JN commit seems to break buildkernel: JN JN cc -O2 -pipe -nostdinc -I/usr/include -I. JN -I/usr/src/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers JN -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter JN -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith JN -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow JN -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c JN cc1: warnings being treated as errors JN /usr/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: warning: JN function declaration isn't a prototype *** Error code 1 JN JN I don't have any custom CFLAGS, etc defined. Commenting out the new JN #defines from this patch allows the build to continue. JN JN I'm guessing this doesn't happen on machines already running JN -CURRENT or tinderbox (and others) would have noticed. However if JN this is (going to be) a supported upgrade path from 8.x to 9.0 JN perhaps there's a way to make both clang and gcc from 8.x happy? JN JN If you want to upgrade from N to N+1, make buildworld is required. JN JN Sorry, I did do a make buildworld (which succeeded) prior to the make buildkernel (which failed as I described). I can confirm this: my build machine, which is FreeBSD beaver.rinet.ru 8.1-STABLE FreeBSD 8.1-STABLE #1 r213380M: Sun Oct 3 13:25:15 MSD 2010 is now failing 'buildworld buildkernel __MAKE_CONF=/dev/null' for HEAD sources both for TARGET=amd64 and i386 -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: ma...@freebsd.org ] *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213839 - head/sys/dev/mps
Author: mdf Date: Thu Oct 14 16:44:05 2010 New Revision: 213839 URL: http://svn.freebsd.org/changeset/base/213839 Log: Re-work the internals of adding items to the driver's scatter-gather list. Use the new internals to simplify adding transaction context elements, and in future diffs, more complicated SGLs. Modified: head/sys/dev/mps/mps.c head/sys/dev/mps/mps_user.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mps/mps.c == --- head/sys/dev/mps/mps.c Thu Oct 14 15:42:32 2010(r213838) +++ head/sys/dev/mps/mps.c Thu Oct 14 16:44:05 2010(r213839) @@ -380,7 +380,7 @@ mps_request_sync(struct mps_softc *sc, v return (0); } -static void +void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm) { @@ -1374,33 +1374,88 @@ mps_deregister_events(struct mps_softc * return (mps_update_events(sc, NULL, NULL)); } -static void -mps_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +/* + * Add a chain element as the next SGE for the specified command. + * Reset cm_sge and cm_sgesize to indicate all the available space. + */ +static int +mps_add_chain(struct mps_command *cm) { - MPI2_SGE_SIMPLE64 *sge; MPI2_SGE_CHAIN32 *sgc; - struct mps_softc *sc; - struct mps_command *cm; struct mps_chain *chain; - u_int i, segsleft, sglspace, dir, flags, sflags; + int space; - cm = (struct mps_command *)arg; - sc = cm-cm_sc; + if (cm-cm_sglsize MPS_SGC_SIZE) + panic(MPS: Need SGE Error Code\n); -segsleft = nsegs; -sglspace = cm-cm_sglsize; -sge = (MPI2_SGE_SIMPLE64 *)cm-cm_sge-MpiSimple; + chain = mps_alloc_chain(cm-cm_sc); + if (chain == NULL) + return (ENOBUFS); + + space = (int)cm-cm_sc-facts-IOCRequestFrameSize * 4; /* -* Set up DMA direction flags. Note no support for -* bi-directional transactions. +* Note: a double-linked list is used to make it easier to +* walk for debugging. */ -sflags = MPI2_SGE_FLAGS_ADDRESS_SIZE; -if (cm-cm_flags MPS_CM_FLAGS_DATAOUT) { -sflags |= MPI2_SGE_FLAGS_DIRECTION; - dir = BUS_DMASYNC_PREWRITE; - } else - dir = BUS_DMASYNC_PREREAD; + TAILQ_INSERT_TAIL(cm-cm_chain_list, chain, chain_link); + + sgc = (MPI2_SGE_CHAIN32 *)cm-cm_sge-MpiChain; + sgc-Length = space; + sgc-NextChainOffset = 0; + sgc-Flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT; + sgc-Address = chain-chain_busaddr; + + cm-cm_sge = (MPI2_SGE_IO_UNION *)chain-chain-MpiSimple; + cm-cm_sglsize = space; + return (0); +} + +/* + * Add one scatter-gather element (chain, simple, transaction context) + * to the scatter-gather list for a command. Maintain cm_sglsize and + * cm_sge as the remaining size and pointer to the next SGE to fill + * in, respectively. + */ +int +mps_push_sge(struct mps_command *cm, void *sgep, size_t len, int segsleft) +{ + MPI2_SGE_TRANSACTION_UNION *tc = sgep; + MPI2_SGE_SIMPLE64 *sge = sgep; + int error, type; + + type = (tc-Flags MPI2_SGE_FLAGS_ELEMENT_MASK); + +#ifdef INVARIANTS + switch (type) { + case MPI2_SGE_FLAGS_TRANSACTION_ELEMENT: { + if (len != tc-DetailsLength + 4) + panic(TC %p length %u or %zu?, tc, + tc-DetailsLength + 4, len); + } + break; + case MPI2_SGE_FLAGS_CHAIN_ELEMENT: + /* Driver only uses 32-bit chain elements */ + if (len != MPS_SGC_SIZE) + panic(CHAIN %p length %u or %zu?, sgep, + MPS_SGC_SIZE, len); + break; + case MPI2_SGE_FLAGS_SIMPLE_ELEMENT: + /* Driver only uses 64-bit SGE simple elements */ + sge = sgep; + if (len != MPS_SGE64_SIZE) + panic(SGE simple %p length %u or %zu?, sge, + MPS_SGE64_SIZE, len); + if (((sge-FlagsLength MPI2_SGE_FLAGS_SHIFT) + MPI2_SGE_FLAGS_ADDRESS_SIZE) == 0) + panic(SGE simple %p flags %02x not marked 64-bit?, + sge, sge-FlagsLength MPI2_SGE_FLAGS_SHIFT); + + break; + default: + panic(Unexpected SGE %p, flags %02x, tc, tc-Flags); + } +#endif /* * case 1: 1 more segment, enough room for it @@ -1408,70 +1463,128 @@ mps_data_cb(void *arg, bus_dma_segment_t * case 3: =2 more segments, only enough room for 1 and a chain * case 4: =1 more segment, enough room for only a chain * case 5: =1 more segment, no room for anything (error) -*/ + */ - for (i = 0; i nsegs; i++) { + /* +*
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Thursday, October 14, 2010 12:41:45 pm Dmitry Morozovsky wrote: On Thu, 14 Oct 2010, John Nielsen wrote: JN I'm migrating a box from 8-STABLE to -CURRENT this morning and this JN commit seems to break buildkernel: JN JN cc -O2 -pipe -nostdinc -I/usr/include -I. JN -I/usr/src/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers JN -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter JN -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith JN -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow JN -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c JN cc1: warnings being treated as errors JN /usr/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: warning: JN function declaration isn't a prototype *** Error code 1 JN JN I don't have any custom CFLAGS, etc defined. Commenting out the new JN #defines from this patch allows the build to continue. JN JN I'm guessing this doesn't happen on machines already running JN -CURRENT or tinderbox (and others) would have noticed. However if JN this is (going to be) a supported upgrade path from 8.x to 9.0 JN perhaps there's a way to make both clang and gcc from 8.x happy? JN JN If you want to upgrade from N to N+1, make buildworld is required. JN JN Sorry, I did do a make buildworld (which succeeded) prior to the make buildkernel (which failed as I described). I can confirm this: my build machine, which is FreeBSD beaver.rinet.ru 8.1-STABLE FreeBSD 8.1-STABLE #1 r213380M: Sun Oct 3 13:25:15 MSD 2010 is now failing 'buildworld buildkernel __MAKE_CONF=/dev/null' for HEAD sources both for TARGET=amd64 and i386 The tinderboxes are also failing (at least sun4v). -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213841 - head/sys/dev/dc
Author: yongari Date: Thu Oct 14 17:22:38 2010 New Revision: 213841 URL: http://svn.freebsd.org/changeset/base/213841 Log: It seems some multi-port dc(4) controllers shares SROM of the first port such that reading station address from second port always returned 0xFF:0xFF:0xFF:0xFF:0xFF:0xFF Unfortunately it seems there is no easy way to know whether SROM is shared or not. Workaround the issue by traversing dc(4) device list and see whether we're using second port and use station address of controller 0 as base station address of second port. PR: kern/79262 MFC after:2 weeks Modified: head/sys/dev/dc/if_dc.c head/sys/dev/dc/if_dcreg.h Modified: head/sys/dev/dc/if_dc.c == --- head/sys/dev/dc/if_dc.c Thu Oct 14 16:44:44 2010(r213840) +++ head/sys/dev/dc/if_dc.c Thu Oct 14 17:22:38 2010(r213841) @@ -293,6 +293,7 @@ static void dc_decode_leaf_sia(struct dc static void dc_decode_leaf_mii(struct dc_softc *, struct dc_eblock_mii *); static void dc_decode_leaf_sym(struct dc_softc *, struct dc_eblock_sym *); static void dc_apply_fixup(struct dc_softc *, int); +static int dc_check_multiport(struct dc_softc *); #ifdef DC_USEIOSPACE #define DC_RES SYS_RES_IOPORT @@ -2088,6 +2089,20 @@ dc_attach(device_t dev) break; } + bcopy(eaddr, sc-dc_eaddr, sizeof(eaddr)); + /* +* If we still have invalid station address, see whether we can +* find station address for chip 0. Some multi-port controllers +* just store station address for chip 0 if they have a shared +* SROM. +*/ + if ((sc-dc_eaddr[0] == 0 (sc-dc_eaddr[1] ~0x) == 0) || + (sc-dc_eaddr[0] == 0x + (sc-dc_eaddr[1] 0x) == 0x)) { + if (dc_check_multiport(sc) == 0) + bcopy(sc-dc_eaddr, eaddr, sizeof(eaddr)); + } + /* Allocate a busdma tag and DMA safe memory for TX/RX descriptors. */ error = bus_dma_tag_create(bus_get_dma_tag(dev), PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, @@ -3808,3 +3823,34 @@ dc_shutdown(device_t dev) return (0); } + +static int +dc_check_multiport(struct dc_softc *sc) +{ + struct dc_softc *dsc; + devclass_t dc; + device_t child; + uint8_t *eaddr; + int unit; + + dc = devclass_find(dc); + for (unit = 0; unit devclass_get_maxunit(dc); unit++) { + child = devclass_get_device(dc, unit); + if (child == NULL) + continue; + if (child == sc-dc_dev) + continue; + if (device_get_parent(child) != device_get_parent(sc-dc_dev)) + continue; + if (unit device_get_unit(sc-dc_dev)) + continue; + dsc = device_get_softc(child); + device_printf(sc-dc_dev, Using station address of %s as base, + device_get_nameunit(child)); + bcopy(dsc-dc_eaddr, sc-dc_eaddr, ETHER_ADDR_LEN); + eaddr = (uint8_t *)sc-dc_eaddr; + eaddr[5]++; + return (0); + } + return (ENOENT); +} Modified: head/sys/dev/dc/if_dcreg.h == --- head/sys/dev/dc/if_dcreg.h Thu Oct 14 16:44:44 2010(r213840) +++ head/sys/dev/dc/if_dcreg.h Thu Oct 14 17:22:38 2010(r213841) @@ -745,6 +745,7 @@ struct dc_softc { int dc_if_media; u_int32_t dc_flags; u_int32_t dc_txthresh; + u_int32_t dc_eaddr[2]; u_int8_t*dc_srom; struct dc_mediainfo *dc_mi; struct dc_list_data *dc_ldata; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213842 - head/sys/dev/alc
Author: yongari Date: Thu Oct 14 17:57:52 2010 New Revision: 213842 URL: http://svn.freebsd.org/changeset/base/213842 Log: Backout r204230. TX mbuf parser for VLAN is still required to enable TX checksum offloading if VLAN hardware tagging is disabled. Modified: head/sys/dev/alc/if_alc.c Modified: head/sys/dev/alc/if_alc.c == --- head/sys/dev/alc/if_alc.c Thu Oct 14 17:22:38 2010(r213841) +++ head/sys/dev/alc/if_alc.c Thu Oct 14 17:57:52 2010(r213842) @@ -2019,7 +2019,7 @@ alc_encap(struct alc_softc *sc, struct m struct tcphdr *tcp; bus_dma_segment_t txsegs[ALC_MAXTXSEGS]; bus_dmamap_t map; - uint32_t cflags, hdrlen, poff, vtag; + uint32_t cflags, hdrlen, ip_off, poff, vtag; int error, idx, nsegs, prod; ALC_LOCK_ASSERT(sc); @@ -2029,7 +2029,7 @@ alc_encap(struct alc_softc *sc, struct m m = *m_head; ip = NULL; tcp = NULL; - poff = 0; + ip_off = poff = 0; if ((m-m_pkthdr.csum_flags (ALC_CSUM_FEATURES | CSUM_TSO)) != 0) { /* * AR813x/AR815x requires offset of TCP/UDP header in its @@ -2039,6 +2039,7 @@ alc_encap(struct alc_softc *sc, struct m * cycles on FreeBSD so fast host CPU is required to get * smooth TSO performance. */ + struct ether_header *eh; if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ @@ -2052,15 +2053,32 @@ alc_encap(struct alc_softc *sc, struct m *m_head = m; } - m = m_pullup(m, sizeof(struct ether_header) + - sizeof(struct ip)); + ip_off = sizeof(struct ether_header); + m = m_pullup(m, ip_off); if (m == NULL) { *m_head = NULL; return (ENOBUFS); } - ip = (struct ip *)(mtod(m, char *) + - sizeof(struct ether_header)); - poff = sizeof(struct ether_header) + (ip-ip_hl 2); + eh = mtod(m, struct ether_header *); + /* +* Check if hardware VLAN insertion is off. +* Additional check for LLC/SNAP frame? +*/ + if (eh-ether_type == htons(ETHERTYPE_VLAN)) { + ip_off = sizeof(struct ether_vlan_header); + m = m_pullup(m, ip_off); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } + } + m = m_pullup(m, ip_off + sizeof(struct ip)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } + ip = (struct ip *)(mtod(m, char *) + ip_off); + poff = ip_off + (ip-ip_hl 2); if ((m-m_pkthdr.csum_flags CSUM_TSO) != 0) { m = m_pullup(m, poff + sizeof(struct tcphdr)); if (m == NULL) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213844 - in head/sys/dev: age alc ale bce bge fxp jme sge
Author: yongari Date: Thu Oct 14 18:31:40 2010 New Revision: 213844 URL: http://svn.freebsd.org/changeset/base/213844 Log: Make sure to not use stale ip/tcp header pointers. The ip/tcp header parser uses m_pullup(9) to get access to mbuf chain. m_pullup(9) can allocate new mbuf chain and free old one if the space left in the mbuf chain is not enough to hold requested contiguous bytes. Previously drivers can use stale ip/tcp header pointer if m_pullup(9) returned new mbuf chain. Reported by: Andrew Boyer (aboyer averesystems dot com) MFC after:10 days Modified: head/sys/dev/age/if_age.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/bce/if_bce.c head/sys/dev/bge/if_bge.c head/sys/dev/fxp/if_fxp.c head/sys/dev/jme/if_jme.c head/sys/dev/sge/if_sge.c Modified: head/sys/dev/age/if_age.c == --- head/sys/dev/age/if_age.c Thu Oct 14 18:02:31 2010(r213843) +++ head/sys/dev/age/if_age.c Thu Oct 14 18:31:40 2010(r213844) @@ -1565,6 +1565,7 @@ age_encap(struct age_softc *sc, struct m *m_head = NULL; return (ENOBUFS); } + ip = (struct ip *)(mtod(m, char *) + ip_off); tcp = (struct tcphdr *)(mtod(m, char *) + poff); /* * L1 requires IP/TCP header size and offset as Modified: head/sys/dev/alc/if_alc.c == --- head/sys/dev/alc/if_alc.c Thu Oct 14 18:02:31 2010(r213843) +++ head/sys/dev/alc/if_alc.c Thu Oct 14 18:31:40 2010(r213844) @@ -2104,6 +2104,8 @@ alc_encap(struct alc_softc *sc, struct m * Reset IP checksum and recompute TCP pseudo * checksum as NDIS specification said. */ + ip = (struct ip *)(mtod(m, char *) + ip_off); + tcp = (struct tcphdr *)(mtod(m, char *) + poff); ip-ip_sum = 0; tcp-th_sum = in_pseudo(ip-ip_src.s_addr, ip-ip_dst.s_addr, htons(IPPROTO_TCP)); Modified: head/sys/dev/ale/if_ale.c == --- head/sys/dev/ale/if_ale.c Thu Oct 14 18:02:31 2010(r213843) +++ head/sys/dev/ale/if_ale.c Thu Oct 14 18:31:40 2010(r213844) @@ -1677,6 +1677,7 @@ ale_encap(struct ale_softc *sc, struct m *m_head = NULL; return (ENOBUFS); } + ip = (struct ip *)(mtod(m, char *) + ip_off); tcp = (struct tcphdr *)(mtod(m, char *) + poff); m = m_pullup(m, poff + (tcp-th_off 2)); if (m == NULL) { Modified: head/sys/dev/bce/if_bce.c == --- head/sys/dev/bce/if_bce.c Thu Oct 14 18:02:31 2010(r213843) +++ head/sys/dev/bce/if_bce.c Thu Oct 14 18:31:40 2010(r213844) @@ -6736,6 +6736,7 @@ bce_tso_setup(struct bce_softc *sc, stru } /* Get the TCP header length in bytes (min 20) */ + ip = (struct ip *)(m-m_data + sizeof(struct ether_header)); th = (struct tcphdr *)((caddr_t)ip + ip_hlen); tcp_hlen = (th-th_off 2); @@ -6748,6 +6749,7 @@ bce_tso_setup(struct bce_softc *sc, stru } /* IP header length and checksum will be calc'd by hardware */ + ip = (struct ip *)(m-m_data + sizeof(struct ether_header)); ip_len = ip-ip_len; ip-ip_len = 0; ip-ip_sum = 0; Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Thu Oct 14 18:02:31 2010(r213843) +++ head/sys/dev/bge/if_bge.c Thu Oct 14 18:31:40 2010(r213844) @@ -4097,9 +4097,11 @@ bge_setup_tso(struct bge_softc *sc, stru * checksum. These checksum computed by upper stack should be 0. */ *mss = m-m_pkthdr.tso_segsz; + ip = (struct ip *)(mtod(m, char *) + sizeof(struct ether_header)); ip-ip_sum = 0; ip-ip_len = htons(*mss + (ip-ip_hl 2) + (tcp-th_off 2)); /* Clear pseudo checksum computed by TCP stack. */ + tcp = (struct tcphdr *)(mtod(m, char *) + poff); tcp-th_sum = 0; /* * Broadcom controllers uses different descriptor format for Modified: head/sys/dev/fxp/if_fxp.c == --- head/sys/dev/fxp/if_fxp.c Thu Oct 14 18:02:31 2010(r213843) +++
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Thursday 14 October 2010 01:06 pm, John Baldwin wrote: On Thursday, October 14, 2010 12:41:45 pm Dmitry Morozovsky wrote: On Thu, 14 Oct 2010, John Nielsen wrote: JN I'm migrating a box from 8-STABLE to -CURRENT this morning and this JN commit seems to break buildkernel: JN JN cc -O2 -pipe -nostdinc -I/usr/include -I. JN -I/usr/src/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers JN -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter JN -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith JN -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow JN -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c JN cc1: warnings being treated as errors JN /usr/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: warning: JN function declaration isn't a prototype *** Error code 1 JN JN I don't have any custom CFLAGS, etc defined. Commenting out the new JN #defines from this patch allows the build to continue. JN JN I'm guessing this doesn't happen on machines already running JN -CURRENT or tinderbox (and others) would have noticed. However if JN this is (going to be) a supported upgrade path from 8.x to 9.0 JN perhaps there's a way to make both clang and gcc from 8.x happy? JN JN If you want to upgrade from N to N+1, make buildworld is required. JN JN Sorry, I did do a make buildworld (which succeeded) prior to the make buildkernel (which failed as I described). I can confirm this: my build machine, which is FreeBSD beaver.rinet.ru 8.1-STABLE FreeBSD 8.1-STABLE #1 r213380M: Sun Oct 3 13:25:15 MSD 2010 is now failing 'buildworld buildkernel __MAKE_CONF=/dev/null' for HEAD sources both for TARGET=amd64 and i386 The tinderboxes are also failing (at least sun4v). No, it's fixed already: http://svn.freebsd.org/viewvc/base?view=revisionrevision=213764 Jung-uk Kim ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Thu, 14 Oct 2010, Jung-uk Kim wrote: JK JN I'm migrating a box from 8-STABLE to -CURRENT this morning JK and this JN commit seems to break buildkernel: [snip] JK I can confirm this: my build machine, which is JK JK FreeBSD beaver.rinet.ru 8.1-STABLE FreeBSD 8.1-STABLE #1 JK r213380M: Sun Oct 3 13:25:15 MSD 2010 JK JK is now failing 'buildworld buildkernel __MAKE_CONF=/dev/null' for JK HEAD sources both for TARGET=amd64 and i386 JK JK The tinderboxes are also failing (at least sun4v). JK JK No, it's fixed already: JK JK http://svn.freebsd.org/viewvc/base?view=revisionrevision=213764 It does not seem so, at least in my case: ma...@beaver:/FreeBSD svn info src.current.svn/ Path: src.current.svn URL: file:///FreeBSD/svnmirror/base/head Repository Root: file:///FreeBSD/svnmirror/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 213844 Node Kind: directory Schedule: normal Last Changed Author: yongari Last Changed Rev: 213844 Last Changed Date: 2010-10-14 22:31:40 +0400 (Thu, 14 Oct 2010) ma...@beaver:/FreeBSD tail /var/tmp/buildlog.svn.i386 cc -O2 -pipe -nostdinc -I/usr/include -I. -I/FreeBSD/src.current.svn/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_macro_gram.c cc -O2 -pipe -nostdinc -I/usr/include -I. -I/FreeBSD/src.current.svn/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c cc1: warnings being treated as errors /FreeBSD/src.current.svn/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: warning: function declaration isn't a prototype *** Error code 1 1 error *** Error code 2 1 error *** Error code 2 1 error -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: ma...@freebsd.org ] *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Thursday 14 October 2010 03:05 pm, Jung-uk Kim wrote: On Thursday 14 October 2010 01:06 pm, John Baldwin wrote: On Thursday, October 14, 2010 12:41:45 pm Dmitry Morozovsky wrote: On Thu, 14 Oct 2010, John Nielsen wrote: JN I'm migrating a box from 8-STABLE to -CURRENT this morning and this JN commit seems to break buildkernel: JN JN cc -O2 -pipe -nostdinc -I/usr/include -I. JN -I/usr/src/sys/dev/aic7xxx/aicasm -std=gnu99 -Wsystem-headers JN -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter JN -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith JN -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow JN -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c JN cc1: warnings being treated as errors JN /usr/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: warning: JN function declaration isn't a prototype *** Error code 1 JN JN I don't have any custom CFLAGS, etc defined. Commenting out the new JN #defines from this patch allows the build to continue. JN JN I'm guessing this doesn't happen on machines already running JN -CURRENT or tinderbox (and others) would have noticed. However if JN this is (going to be) a supported upgrade path from 8.x to 9.0 JN perhaps there's a way to make both clang and gcc from 8.x happy? JN JN If you want to upgrade from N to N+1, make buildworld is required. JN JN Sorry, I did do a make buildworld (which succeeded) prior to the make buildkernel (which failed as I described). I can confirm this: my build machine, which is FreeBSD beaver.rinet.ru 8.1-STABLE FreeBSD 8.1-STABLE #1 r213380M: Sun Oct 3 13:25:15 MSD 2010 is now failing 'buildworld buildkernel __MAKE_CONF=/dev/null' for HEAD sources both for TARGET=amd64 and i386 The tinderboxes are also failing (at least sun4v). No, it's fixed already: http://svn.freebsd.org/viewvc/base?view=revisionrevision=213764 I should have said lex(1) was fixed first, then aicasm_scan.l was changed. I guess there was a brief inconsistency in tinderbox environment. Shrug... Jung-uk Kim ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213845 - head/sys/dev/aic7xxx/aicasm
Author: rpaulo Date: Thu Oct 14 19:19:19 2010 New Revision: 213845 URL: http://svn.freebsd.org/changeset/base/213845 Log: Revert r213765. This is required because our build infrastructure uses the host lex instead of the lex built during buildworld. I will MFC the lex changes soon and in a few weeks this I'll commit again r213765. Modified: head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l head/sys/dev/aic7xxx/aicasm/aicasm_scan.l Modified: head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l == --- head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Thu Oct 14 18:31:40 2010(r213844) +++ head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Thu Oct 14 19:19:19 2010(r213845) @@ -61,7 +61,6 @@ #include aicasm_symbol.h #include aicasm_macro_gram.h -#define YY_NO_INPUT #define MAX_STR_CONST 4096 static char string_buf[MAX_STR_CONST]; static char *string_buf_ptr; Modified: head/sys/dev/aic7xxx/aicasm/aicasm_scan.l == --- head/sys/dev/aic7xxx/aicasm/aicasm_scan.l Thu Oct 14 18:31:40 2010 (r213844) +++ head/sys/dev/aic7xxx/aicasm/aicasm_scan.l Thu Oct 14 19:19:19 2010 (r213845) @@ -61,7 +61,6 @@ #include aicasm_symbol.h #include aicasm_gram.h -#define YY_NO_INPUT /* This is used for macro body capture too, so err on the large size. */ #define MAX_STR_CONST 4096 static char string_buf[MAX_STR_CONST]; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Thu, 14 Oct 2010, Jung-uk Kim wrote: JK JK JK JN I'm migrating a box from 8-STABLE to -CURRENT this JK morning JK and this JN commit seems to break buildkernel: JK JK [snip] JK JK JK I can confirm this: my build machine, which is JK JK JK JK FreeBSD beaver.rinet.ru 8.1-STABLE FreeBSD 8.1-STABLE #1 JK JK r213380M: Sun Oct 3 13:25:15 MSD 2010 JK JK JK JK is now failing 'buildworld buildkernel JK __MAKE_CONF=/dev/null' for JK HEAD sources both for JK TARGET=amd64 and i386 JK JK JK JK The tinderboxes are also failing (at least sun4v). JK JK JK JK No, it's fixed already: JK JK JK JK JK http://svn.freebsd.org/viewvc/base?view=revisionrevision=213764 JK JK It does not seem so, at least in my case: JK JK ma...@beaver:/FreeBSD svn info src.current.svn/ JK Path: src.current.svn JK URL: file:///FreeBSD/svnmirror/base/head JK Repository Root: file:///FreeBSD/svnmirror/base JK Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f JK Revision: 213844 JK Node Kind: directory JK Schedule: normal JK Last Changed Author: yongari JK Last Changed Rev: 213844 JK Last Changed Date: 2010-10-14 22:31:40 +0400 (Thu, 14 Oct 2010) JK JK ma...@beaver:/FreeBSD tail /var/tmp/buildlog.svn.i386 JK cc -O2 -pipe -nostdinc -I/usr/include -I. JK -I/FreeBSD/src.current.svn/sys/dev/aic7xxx/aicasm -std=gnu99 JK -Wsystem-headers -Werror -Wall -Wno-format-y2k -W JK -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes JK -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch JK -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c JK aicasm_macro_gram.c JK cc -O2 -pipe -nostdinc -I/usr/include -I. JK -I/FreeBSD/src.current.svn/sys/dev/aic7xxx/aicasm -std=gnu99 JK -Wsystem-headers -Werror -Wall -Wno-format-y2k -W JK -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes JK -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch JK -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c JK aicasm_scan.c JK cc1: warnings being treated as errors JK /FreeBSD/src.current.svn/sys/dev/aic7xxx/aicasm/aicasm_scan.l:840: JK warning: function declaration isn't a prototype JK *** Error code 1 JK 1 error JK *** Error code 2 JK 1 error JK *** Error code 2 JK 1 error JK JK Hmm... That means make buildkernel did not pick up newly built lex. JK That's bad. :-( It seems Rui's r213845 should fix this; I'm checking this right now... -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: ma...@freebsd.org ] *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213846 - head/sys/compat/linux
Author: kib Date: Thu Oct 14 19:30:44 2010 New Revision: 213846 URL: http://svn.freebsd.org/changeset/base/213846 Log: Remove stale comment. Submitted by: arundel MFC after:3 days Modified: head/sys/compat/linux/linux_util.h Modified: head/sys/compat/linux/linux_util.h == --- head/sys/compat/linux/linux_util.h Thu Oct 14 19:19:19 2010 (r213845) +++ head/sys/compat/linux/linux_util.h Thu Oct 14 19:30:44 2010 (r213846) @@ -31,11 +31,6 @@ * $FreeBSD$ */ -/* - * This file is pretty much the same as Christos' svr4_util.h - * (for now). - */ - #ifndef_LINUX_UTIL_H_ #define_LINUX_UTIL_H_ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213845 - head/sys/dev/aic7xxx/aicasm
On Thursday, October 14, 2010 3:19:19 pm Rui Paulo wrote: Author: rpaulo Date: Thu Oct 14 19:19:19 2010 New Revision: 213845 URL: http://svn.freebsd.org/changeset/base/213845 Log: Revert r213765. This is required because our build infrastructure uses the host lex instead of the lex built during buildworld. I will MFC the lex changes soon and in a few weeks this I'll commit again r213765. Can't you make 'lex' a build-tool to workaround this? -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213793 - in head/sys/dev: ce cp
On Wednesday 13 October 2010 09:16 pm, Bruce Evans wrote: On Wed, 13 Oct 2010, Jung-uk Kim wrote: On Wednesday 13 October 2010 01:27 pm, Roman Divacky wrote: Modified: head/sys/dev/ce/if_ce.c === == = --- head/sys/dev/ce/if_ce.c Wed Oct 13 17:16:08 2010 (r213792) +++ head/sys/dev/ce/if_ce.c Wed Oct 13 17:17:50 2010 (r213793) @@ -1313,7 +1313,7 @@ static int ce_ioctl (struct cdev *dev, u IFP2SP(d-ifp)-pp_flags = ~(PP_FR); IFP2SP(d-ifp)-pp_flags |= PP_KEEPALIVE; d-ifp-if_flags |= PP_CISCO; - } else if (! strcmp (fr, (char*)data) PP_FR) { + } else if (! strcmp (fr, (char*)data)) { this is wrong I think... the PP_FR was used for compiling in/out support for something.. see the comment: /* If we don't have Cronyx's sppp version, we don't have fr support via sppp */ #ifndef PP_FR #define PP_FR 0 #endif note that PP_FR is used in some other places as a flag. I guess that by compiling with something like make -DPP_FR=42 some magic would happen. anyway - this does not look like a bug but like an intent, please revert. I think the attached patch should do. % Index: sys/dev/ce/if_ce.c % === % --- sys/dev/ce/if_ce.c (revision 213782) % +++ sys/dev/ce/if_ce.c (working copy) % @@ -1313,9 +1313,11 @@ static int ce_ioctl (struct cdev *dev, u_long cmd, % IFP2SP(d-ifp)-pp_flags = ~(PP_FR); % IFP2SP(d-ifp)-pp_flags |= PP_KEEPALIVE; % d-ifp-if_flags |= PP_CISCO; % - } else if (! strcmp (fr, (char*)data) PP_FR) { % +#if PP_FR 0 % + } else if (! strcmp (fr, (char*)data)) { % d-ifp-if_flags = ~(PP_CISCO); % IFP2SP(d-ifp)-pp_flags |= PP_FR | PP_KEEPALIVE; % +#endif % } else if (! strcmp (ppp, (char*)data)) { % IFP2SP(d-ifp)-pp_flags = ~PP_FR; % IFP2SP(d-ifp)-pp_flags = ~PP_KEEPALIVE; % ... This gives different behaviour if PP_FR is even or negative. Even values used to fail the match, but now the match succeeds for even values 0 and then the bits of PP_FR are put in pp_flags. Negative values used to pass the match if they were odd, but now the match is not attempted for any negative value. It just might be useful for PP_FR to have multiple bits set, with the 1 bit used for enabling this and the other bits used for setting pp_flags. If not, then only values of 0 and 1 for PP_FR make sense, and the ifdef should be #if PP_FR == 1. I don't understand your remarks about PP_FR being even/odd. Maybe you are confused '' with ''? ;-) Is the attached patch okay for you, then? Jung-uk Kim Index: sys/dev/ce/if_ce.c === --- sys/dev/ce/if_ce.c (revision 213846) +++ sys/dev/ce/if_ce.c (working copy) @@ -1313,9 +1313,11 @@ static int ce_ioctl (struct cdev *dev, u_long cmd, IFP2SP(d-ifp)-pp_flags = ~(PP_FR); IFP2SP(d-ifp)-pp_flags |= PP_KEEPALIVE; d-ifp-if_flags |= PP_CISCO; - } else if (! strcmp (fr, (char*)data) PP_FR) { +#if PP_FR != 0 + } else if (! strcmp (fr, (char*)data)) { d-ifp-if_flags = ~(PP_CISCO); IFP2SP(d-ifp)-pp_flags |= PP_FR | PP_KEEPALIVE; +#endif } else if (! strcmp (ppp, (char*)data)) { IFP2SP(d-ifp)-pp_flags = ~PP_FR; IFP2SP(d-ifp)-pp_flags = ~PP_KEEPALIVE; Index: sys/dev/cp/if_cp.c === --- sys/dev/cp/if_cp.c (revision 213846) +++ sys/dev/cp/if_cp.c (working copy) @@ -1052,9 +1052,11 @@ static int cp_ioctl (struct cdev *dev, u_long cmd, IFP2SP(d-ifp)-pp_flags = ~(PP_FR); IFP2SP(d-ifp)-pp_flags |= PP_KEEPALIVE; d-ifp-if_flags |= PP_CISCO; - } else if (! strcmp (fr, (char*)data) PP_FR) { +#if PP_FR != 0 + } else if (! strcmp (fr, (char*)data)) { d-ifp-if_flags = ~(PP_CISCO); IFP2SP(d-ifp)-pp_flags |= PP_FR | PP_KEEPALIVE; +#endif } else if (! strcmp (ppp, (char*)data)) { IFP2SP(d-ifp)-pp_flags = ~PP_FR; IFP2SP(d-ifp)-pp_flags = ~PP_KEEPALIVE; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213848 - head/lib/libusb
Author: hselasky Date: Thu Oct 14 20:04:36 2010 New Revision: 213848 URL: http://svn.freebsd.org/changeset/base/213848 Log: LibUSB (new API): - Add a new API function to check the connected status of the USB handle in the LibUSB v1.0 and LibUSB v0.1 interfaces. Approved by:thompsa (mentor) Modified: head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10.c head/lib/libusb/libusb20_compat01.c head/lib/libusb/usb.h Modified: head/lib/libusb/libusb.3 == --- head/lib/libusb/libusb.3Thu Oct 14 20:04:05 2010(r213847) +++ head/lib/libusb/libusb.3Thu Oct 14 20:04:36 2010(r213848) @@ -231,6 +231,14 @@ been disconnected and a LIBUSB_ERROR cod .Pp . .Ft int +.Fn libusb_check_connected libusb_device_handle *devh +Test if USB device is still connected. Returns 0 on success, +LIBUSB_ERROR_NO_DEVICE if has been disconnected and a LIBUSB_ERROR +code on failure. +. +.Pp +. +.Ft int .Fn libusb_kernel_driver_active libusb_device_handle *devh int interface Determine if a driver is active on a interface. Returns 0 if no kernel driver is active, returns 1 if a kernel driver is active, returns LIBUSB_ERROR_NO_DEVICE @@ -488,6 +496,7 @@ The library is also compliant with LibUS .Fn usb_find_devices .Fn usb_device .Fn usb_get_busses +.Fn usb_check_connected . .Sh SEE ALSO .Xr libusb20 3 , Modified: head/lib/libusb/libusb.h == --- head/lib/libusb/libusb.hThu Oct 14 20:04:05 2010(r213847) +++ head/lib/libusb/libusb.hThu Oct 14 20:04:36 2010(r213848) @@ -316,6 +316,7 @@ int libusb_set_configuration(libusb_devi intlibusb_claim_interface(libusb_device_handle * devh, int interface_number); intlibusb_release_interface(libusb_device_handle * devh, int interface_number); intlibusb_reset_device(libusb_device_handle * devh); +intlibusb_check_connected(libusb_device_handle * devh); intlibusb_kernel_driver_active(libusb_device_handle * devh, int interface); intlibusb_detach_kernel_driver(libusb_device_handle * devh, int interface); intlibusb_attach_kernel_driver(libusb_device_handle * devh, int interface); Modified: head/lib/libusb/libusb10.c == --- head/lib/libusb/libusb10.c Thu Oct 14 20:04:05 2010(r213847) +++ head/lib/libusb/libusb10.c Thu Oct 14 20:04:36 2010(r213848) @@ -663,6 +663,21 @@ libusb_reset_device(struct libusb20_devi } int +libusb_check_connected(struct libusb20_device *pdev) +{ + libusb_device *dev; + int err; + + dev = libusb_get_device(pdev); + if (dev == NULL) + return (LIBUSB_ERROR_INVALID_PARAM); + + err = libusb20_dev_check_connected(pdev); + + return (err ? LIBUSB_ERROR_NO_DEVICE : 0); +} + +int libusb_kernel_driver_active(struct libusb20_device *pdev, int interface) { if (pdev == NULL) Modified: head/lib/libusb/libusb20_compat01.c == --- head/lib/libusb/libusb20_compat01.c Thu Oct 14 20:04:05 2010 (r213847) +++ head/lib/libusb/libusb20_compat01.c Thu Oct 14 20:04:36 2010 (r213848) @@ -795,6 +795,19 @@ usb_reset(usb_dev_handle * dev) return (usb_close(dev)); } +int +usb_check_connected(usb_dev_handle * dev) +{ + int err; + + err = libusb20_dev_check_connected((void *)dev); + + if (err) + return (-1); + + return (0); +} + const char * usb_strerror(void) { Modified: head/lib/libusb/usb.h == --- head/lib/libusb/usb.h Thu Oct 14 20:04:05 2010(r213847) +++ head/lib/libusb/usb.h Thu Oct 14 20:04:36 2010(r213848) @@ -291,6 +291,7 @@ int usb_set_altinterface(usb_dev_handle intusb_resetep(usb_dev_handle * dev, unsigned int ep); intusb_clear_halt(usb_dev_handle * dev, unsigned int ep); intusb_reset(usb_dev_handle * dev); +intusb_check_connected(usb_dev_handle * dev); const char *usb_strerror(void); void usb_init(void); void usb_set_debug(int level); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213849 - head/lib/libusb
Author: hselasky Date: Thu Oct 14 20:18:39 2010 New Revision: 213849 URL: http://svn.freebsd.org/changeset/base/213849 Log: - Fix some compile warnings regarding comparing signed to unsigned. Approved by:thompsa (mentor) Modified: head/lib/libusb/libusb10_io.c Modified: head/lib/libusb/libusb10_io.c == --- head/lib/libusb/libusb10_io.c Thu Oct 14 20:04:36 2010 (r213848) +++ head/lib/libusb/libusb10_io.c Thu Oct 14 20:18:39 2010 (r213849) @@ -141,7 +141,7 @@ libusb10_handle_events_sub(struct libusb err = LIBUSB_ERROR_IO; if (err 1) { - for (i = 0; i != nfds; i++) { + for (i = 0; i != (int)nfds; i++) { if (ppdev[i] != NULL) { CTX_UNLOCK(ctx); libusb_unref_device(libusb_get_device(ppdev[i])); @@ -150,7 +150,7 @@ libusb10_handle_events_sub(struct libusb } goto do_done; } - for (i = 0; i != nfds; i++) { + for (i = 0; i != (int)nfds; i++) { if (ppdev[i] != NULL) { dev = libusb_get_device(ppdev[i]); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213765 - head/sys/dev/aic7xxx/aicasm
On Thu, 14 Oct 2010, Dmitry Morozovsky wrote: [snip] DM JK Hmm... That means make buildkernel did not pick up newly built lex. DM JK That's bad. :-( DM DM It seems Rui's r213845 should fix this; I'm checking this right now... Confirmed: this revision really fixed build. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: ma...@freebsd.org ] *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213852 - in head: lib/libusb sys/dev/usb
Author: hselasky Date: Thu Oct 14 20:38:18 2010 New Revision: 213852 URL: http://svn.freebsd.org/changeset/base/213852 Log: - Add support for LibUSB in 32-bit compatibility mode. Approved by:thompsa (mentor) Modified: head/lib/libusb/Makefile head/lib/libusb/libusb20.c head/lib/libusb/libusb20_int.h head/lib/libusb/libusb20_ugen20.c head/sys/dev/usb/usb_ioctl.h Modified: head/lib/libusb/Makefile == --- head/lib/libusb/MakefileThu Oct 14 20:31:07 2010(r213851) +++ head/lib/libusb/MakefileThu Oct 14 20:38:18 2010(r213852) @@ -30,5 +30,9 @@ SRCS+=libusb10.c SRCS+= libusb10_desc.c SRCS+= libusb10_io.c +.if defined(COMPAT_32BIT) +CFLAGS+= -DCOMPAT_32BIT +.endif + .include bsd.lib.mk Modified: head/lib/libusb/libusb20.c == --- head/lib/libusb/libusb20.c Thu Oct 14 20:31:07 2010(r213851) +++ head/lib/libusb/libusb20.c Thu Oct 14 20:38:18 2010(r213852) @@ -320,7 +320,7 @@ libusb20_tr_clear_stall_sync(struct libu void libusb20_tr_set_buffer(struct libusb20_transfer *xfer, void *buffer, uint16_t frIndex) { - xfer-ppBuffer[frIndex] = buffer; + xfer-ppBuffer[frIndex] = libusb20_pass_ptr(buffer); return; } @@ -386,7 +386,7 @@ libusb20_tr_set_total_frames(struct libu void libusb20_tr_setup_bulk(struct libusb20_transfer *xfer, void *pBuf, uint32_t length, uint32_t timeout) { - xfer-ppBuffer[0] = pBuf; + xfer-ppBuffer[0] = libusb20_pass_ptr(pBuf); xfer-pLength[0] = length; xfer-timeout = timeout; xfer-nFrames = 1; @@ -398,7 +398,7 @@ libusb20_tr_setup_control(struct libusb2 { uint16_t len; - xfer-ppBuffer[0] = psetup; + xfer-ppBuffer[0] = libusb20_pass_ptr(psetup); xfer-pLength[0] = 8; /* fixed */ xfer-timeout = timeout; @@ -406,7 +406,7 @@ libusb20_tr_setup_control(struct libusb2 if (len != 0) { xfer-nFrames = 2; - xfer-ppBuffer[1] = pBuf; + xfer-ppBuffer[1] = libusb20_pass_ptr(pBuf); xfer-pLength[1] = len; } else { xfer-nFrames = 1; @@ -417,7 +417,7 @@ libusb20_tr_setup_control(struct libusb2 void libusb20_tr_setup_intr(struct libusb20_transfer *xfer, void *pBuf, uint32_t length, uint32_t timeout) { - xfer-ppBuffer[0] = pBuf; + xfer-ppBuffer[0] = libusb20_pass_ptr(pBuf); xfer-pLength[0] = length; xfer-timeout = timeout; xfer-nFrames = 1; @@ -431,7 +431,7 @@ libusb20_tr_setup_isoc(struct libusb20_t /* should not happen */ return; } - xfer-ppBuffer[frIndex] = pBuf; + xfer-ppBuffer[frIndex] = libusb20_pass_ptr(pBuf); xfer-pLength[frIndex] = length; return; } @@ -1167,7 +1167,7 @@ libusb20_be_alloc_ugen20(void) { struct libusb20_backend *pbe; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) pbe = libusb20_be_alloc(libusb20_ugen20_backend); #else pbe = NULL; Modified: head/lib/libusb/libusb20_int.h == --- head/lib/libusb/libusb20_int.h Thu Oct 14 20:31:07 2010 (r213851) +++ head/lib/libusb/libusb20_int.h Thu Oct 14 20:38:18 2010 (r213852) @@ -31,6 +31,12 @@ #ifndef _LIBUSB20_INT_H_ #define_LIBUSB20_INT_H_ +#ifdef COMPAT_32BIT +#definelibusb20_pass_ptr(ptr) ((uint64_t)(uintptr_t)(ptr)) +#else +#definelibusb20_pass_ptr(ptr) (ptr) +#endif + struct libusb20_device; struct libusb20_backend; struct libusb20_transfer; @@ -146,7 +152,11 @@ struct libusb20_transfer { /* * Pointer to a list of buffer pointers: */ +#ifdef COMPAT_32BIT + uint64_t *ppBuffer; +#else void **ppBuffer; +#endif /* * Pointer to frame lengths, which are updated to actual length * after the USB transfer completes: Modified: head/lib/libusb/libusb20_ugen20.c == --- head/lib/libusb/libusb20_ugen20.c Thu Oct 14 20:31:07 2010 (r213851) +++ head/lib/libusb/libusb20_ugen20.c Thu Oct 14 20:38:18 2010 (r213852) @@ -226,7 +226,7 @@ ugen20_readdir(struct ugen20_urd_state * repeat: if (st-ptr == NULL) { st-urd.urd_startentry += st-nparsed; - st-urd.urd_data = st-buf; + st-urd.urd_data = libusb20_pass_ptr(st-buf); st-urd.urd_maxlen = sizeof(st-buf); st-nparsed = 0; @@ -339,7 +339,7 @@ ugen20_tr_renew(struct libusb20_device * memset(fs_init, 0, sizeof(fs_init)); - fs_init.pEndpoints = pdev-privBeData; + fs_init.pEndpoints =
svn commit: r213853 - head/lib/libusb
Author: hselasky Date: Thu Oct 14 20:50:33 2010 New Revision: 213853 URL: http://svn.freebsd.org/changeset/base/213853 Log: - Add missing LibUSB API functions: * libusb_strerror() * libusb_get_driver[_np]() * libusb_detach_kernel_driver[_np]() - Factor out setting of non-blocking flag inside libusb. - Add missing NULL check after libusb_get_device() call. - Correct some wrong error codes due to copy and paste error. PR: usb/150546 Submitted by: Robert Jenssen, Alexander Leidinger Approved by:thompsa (mentor) Modified: head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10.c head/lib/libusb/libusb20.3 Modified: head/lib/libusb/libusb.3 == --- head/lib/libusb/libusb.3Thu Oct 14 20:38:18 2010(r213852) +++ head/lib/libusb/libusb.3Thu Oct 14 20:50:33 2010(r213853) @@ -26,7 +26,7 @@ .\ .\ $FreeBSD$ .\ -.Dd June 22, 2009 +.Dd October 14, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -72,6 +72,15 @@ Deinitialise libusb. Must be called at t . .Pp . +.Ft const char * +.Fn libusb_strerror int code +Get ASCII representation of the error given by the +.Fa code +argument. +. +. +.Pp +. .Ft void .Fn libusb_set_debug libusb_context *ctx int level Set debug to the @@ -247,12 +256,37 @@ if the device has been disconnected and .Pp . .Ft int +.Fn libusb_get_driver libusb_device_handle *devh int interface char *name int namelen +or +.Ft int +.Fn libusb_get_driver_np libusb_device_handle *devh int interface char *name int namelen +Gets the name of the driver attached to the given +.Fa device +and +.Fa interface +into the buffer given by +.Fa name +and +.Fa namelen . +Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if no kernel driver is attached +to the given interface and LIBUSB_ERROR_INVALID_PARAM if the interface does +not exist. +This function is non-portable. +The buffer pointed to by +.Fa name +is only zero terminated on success. +. +.Pp +. +.Ft int .Fn libusb_detach_kernel_driver libusb_device_handle *devh int interface -Detach a kernel driver from an interface. This is needed to claim an interface -required by a kernel driver. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if -no kernel driver was active, LIBUSB_ERROR_INVALID_PARAM if the interface does not -exist, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a -LIBUSB_ERROR code on failure. +or +.Ft int +.Fn libusb_detach_kernel_driver_np libusb_device_handle *devh int interface +Detach a kernel driver from an interface. +This is needed to claim an interface required by a kernel driver. +Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if no kernel driver was active, +LIBUSB_ERROR_INVALID_PARAM if the interface does not exist, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a LIBUSB_ERROR code on failure. This function is non-portable. . .Pp . @@ -279,7 +313,7 @@ failure. . .Pp .Ft int -.Fn libsub_get_active_config_descriptor libusb_device *dev libusb_device_descriptor **config +.Fn libsub_get_active_config_descriptor libusb_device *dev struct libusb_config_descriptor **config Get the USB configuration descriptor for the active configuration. Returns 0 on success, returns LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state and return another LIBUSB_ERROR code on error. @@ -345,7 +379,7 @@ LIBUSB_ERROR code on failure. . .Pp .Ft int -.Fn libusb_control_transfer libusb_device_handle *devh uint8_t bmRequestType uint16_t wIndex unsigned char *data uint16_t wLength unsigned int timeout +.Fn libusb_control_transfer libusb_device_handle *devh uint8_t bmRequestType uint8_t bRequest uint16_t wValue uint16_t wIndex unsigned char *data uint16_t wLength unsigned int timeout Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and Modified: head/lib/libusb/libusb.h == --- head/lib/libusb/libusb.hThu Oct 14 20:38:18 2010(r213852) +++ head/lib/libusb/libusb.hThu Oct 14 20:50:33 2010(r213853) @@ -294,6 +294,7 @@ typedef struct libusb_transfer { /* Library initialisation */ void libusb_set_debug(libusb_context * ctx, int level); +const char *libusb_strerror(int code); intlibusb_init(libusb_context ** context); void libusb_exit(struct libusb_context *ctx); @@ -318,6 +319,9 @@ int libusb_release_interface(libusb_devi intlibusb_reset_device(libusb_device_handle * devh); intlibusb_check_connected(libusb_device_handle * devh); intlibusb_kernel_driver_active(libusb_device_handle * devh, int interface); +intlibusb_get_driver_np(libusb_device_handle * devh, int interface, char *name, int namelen); +intlibusb_get_driver(libusb_device_handle * devh, int
svn commit: r213856 - in head/sys/dev/usb: . quirk
Author: hselasky Date: Thu Oct 14 21:09:37 2010 New Revision: 213856 URL: http://svn.freebsd.org/changeset/base/213856 Log: - Add more USB devices to usbdevs and rename some previously unknown ones. - Add more USB mass storage quirks. Submitted by: Dmitry Luhtionov PR: usb/149934, usb/143045 Approved by:thompsa (mentor) Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c == --- head/sys/dev/usb/quirk/usb_quirk.c Thu Oct 14 21:09:04 2010 (r213855) +++ head/sys/dev/usb/quirk/usb_quirk.c Thu Oct 14 21:09:37 2010 (r213856) @@ -159,10 +159,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(ALCOR, AU6390, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ALCOR, UMCR_9361, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), - USB_QUIRK(ALCOR, TRANSCEND, 0x0142, 0x0142, UQ_MSC_FORCE_WIRE_BBB, - UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(ALCOR, TRANSCEND, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, - UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), + USB_QUIRK(ALCOR, TRANSCEND, 0x, 0x, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY), USB_QUIRK(APACER, HT202, 0x, 0x, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ASAHIOPTICAL, OPTIO230, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, @@ -195,7 +193,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(FREECOM, DVD, 0x, 0x, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(FREECOM, HDD, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(FUJIPHOTO, MASS0100, 0x, 0x, UQ_MSC_FORCE_WIRE_CBI_I, - UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_RS_CLEAR_UA), + UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(GENESYS, GL641USB2IDE, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_SYNC_CACHE), @@ -456,8 +454,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(ACTIONS, MP4, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ASUS, GMSC, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(UNKNOWN4, USBMEMSTICK, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(UNKNOWN5, USB2IDEBRIDGE, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(CHIPSBANK, USBMEMSTICK, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(CHIPSBANK, USBMEMSTICK1, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(NEWLINK, USB2IDEBRIDGE, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), }; #undef USB_QUIRK_VP #undef USB_QUIRK Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsThu Oct 14 21:09:04 2010(r213855) +++ head/sys/dev/usb/usbdevsThu Oct 14 21:09:37 2010(r213856) @@ -58,7 +58,7 @@ $FreeBSD$ vendor UNKNOWN10x0053 Unknown vendor vendor UNKNOWN20x0105 Unknown vendor vendor EGALAX2 0x0123 eGalax, Inc. -vendor UNKNOWN40x0204 Unknown vendor +vendor CHIPSBANK 0x0204 Chipsbank Microelectronics Co. vendor HUMAX 0x02ad HUMAX vendor LTS 0x0386 LTS vendor BWCT0x03da Bernd Walter Computer Technology @@ -403,7 +403,7 @@ vendor ARASAN 0x07da Arasan Chip System vendor ALLIEDCABLE 0x07e6 Allied Cable vendor STSN0x07ef STSN vendor CENTURY 0x07f7 Century Corp -vendor UNKNOWN50x07ff Unknown +vendor NEWLINK 0x07ff NEWlink vendor ZOOM0x0803 Zoom Telephonics vendor PCS 0x0810 Personal Communication Systems vendor ALPHASMART 0x081e AlphaSmart, Inc. @@ -651,18 +651,21 @@ vendor METAGEEK 0x1781 MetaGeek vendor WAVESENSE 0x17f4 WaveSense vendor VAISALA 0x1843 Vaisala vendor AMIT0x18c5 AMIT +vendor GOOGLE 0x18d1 Google vendor QCOM0x18e8 Qcom vendor ELV 0x18ef ELV vendor LINKSYS30x1915 Linksys vendor QUALCOMMINC 0x19d2 Qualcomm, Incorporated vendor WCH20x1a86 QinHeng Electronics vendor STELERA 0x1a8d Stelera Wireless +vendor MATRIXORBITAL 0x1b3d Matrix Orbital vendor OVISLINK0x1b75 OvisLink vendor TCTMOBILE 0x1bbb TCT Mobile vendor TELIT 0x1bc7 Telit vendor LONGCHEER 0x1c9e Longcheer Holdings, Ltd. vendor MPMAN 0x1cae MpMan vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik +vendor NEOTEL 0x1d09 Neotel vendor PEGATRON
Re: svn commit: r213845 - head/sys/dev/aic7xxx/aicasm
On 2010-10-14 21:39, John Baldwin wrote: On Thursday, October 14, 2010 3:19:19 pm Rui Paulo wrote: ... Revert r213765. This is required because our build infrastructure uses the host lex instead of the lex built during buildworld. I will MFC the lex changes soon and in a few weeks this I'll commit again r213765. Can't you make 'lex' a build-tool to workaround this? That will not help for cd conf/CONF make kernel, apparently. It will always use the host lex. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213857 - head/sys/dev/usb/controller
Author: hselasky Date: Thu Oct 14 21:14:33 2010 New Revision: 213857 URL: http://svn.freebsd.org/changeset/base/213857 Log: Correct EHCI port register read. Approved by:thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c == --- head/sys/dev/usb/controller/ehci.c Thu Oct 14 21:09:37 2010 (r213856) +++ head/sys/dev/usb/controller/ehci.c Thu Oct 14 21:14:33 2010 (r213857) @@ -3318,7 +3318,7 @@ ehci_roothub_exec(struct usb_device *ude err = USB_ERR_IOERROR; goto done; } - v = EOREAD4(sc, EHCI_HCSPARAMS); + v = EREAD4(sc, EHCI_HCSPARAMS); sc-sc_hub_desc.hubd = ehci_hubd; sc-sc_hub_desc.hubd.bNbrPorts = sc-sc_noport; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213861 - head/sys/dev/usb/controller
Author: hselasky Date: Thu Oct 14 21:18:18 2010 New Revision: 213861 URL: http://svn.freebsd.org/changeset/base/213861 Log: Correct EHCI root HUB interface descriptor. Approved by:thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c == --- head/sys/dev/usb/controller/ehci.c Thu Oct 14 21:17:32 2010 (r213860) +++ head/sys/dev/usb/controller/ehci.c Thu Oct 14 21:18:18 2010 (r213861) @@ -3063,8 +3063,7 @@ static const struct ehci_config_desc ehc .bNumEndpoints = 1, .bInterfaceClass = UICLASS_HUB, .bInterfaceSubClass = UISUBCLASS_HUB, - .bInterfaceProtocol = UIPROTO_HSHUBSTT, - 0 + .bInterfaceProtocol = 0, }, .endpd = { .bLength = sizeof(struct usb_endpoint_descriptor), ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213864 - head/sys/dev/usb/controller
Author: hselasky Date: Thu Oct 14 21:26:06 2010 New Revision: 213864 URL: http://svn.freebsd.org/changeset/base/213864 Log: Avoid using endless retransmission at EHCI hardware level, hence this hide errors from the applications. Only use endless retransmission while in the non-addressed state on a High-Speed device. Approved by:thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c == --- head/sys/dev/usb/controller/ehci.c Thu Oct 14 21:19:08 2010 (r213863) +++ head/sys/dev/usb/controller/ehci.c Thu Oct 14 21:26:06 2010 (r213864) @@ -1860,7 +1860,8 @@ ehci_setup_standard_chain(struct usb_xfe temp.auto_data_toggle = 1; } - if (usbd_get_speed(xfer-xroot-udev) != USB_SPEED_HIGH) { + if (xfer-xroot-udev-parent_hs_hub != NULL || + xfer-xroot-udev-address != 0) { /* max 3 retries */ temp.qtd_status |= htohc32(temp.sc, EHCI_QTD_SET_CERR(3)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213867 - head/sys/dev/mii
Author: marius Date: Thu Oct 14 21:30:13 2010 New Revision: 213867 URL: http://svn.freebsd.org/changeset/base/213867 Log: Just like xmphy(4) this driver doesn't use any of the generic subroutines so there's no need to fill mii_{ext,}capabilities either. Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c == --- head/sys/dev/mii/brgphy.c Thu Oct 14 21:29:51 2010(r213866) +++ head/sys/dev/mii/brgphy.c Thu Oct 14 21:30:13 2010(r213867) @@ -279,10 +279,6 @@ brgphy_attach(device_t dev) brgphy_reset(sc); - /* Read the PHY's capabilities. */ - sc-mii_capabilities = PHY_READ(sc, MII_BMSR) ma-mii_capmask; - if (sc-mii_capabilities BMSR_EXTSTAT) - sc-mii_extcapabilities = PHY_READ(sc, MII_EXTSR); device_printf(dev, ); #defineADD(m, c) ifmedia_add(mii-mii_media, (m), (c), NULL) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213868 - head/sys/sparc64/sparc64
Author: marius Date: Thu Oct 14 21:34:53 2010 New Revision: 213868 URL: http://svn.freebsd.org/changeset/base/213868 Log: - In the spirit of r212559 add a comment describing what will eventually lower the PIL. - Just as with the AP ensure that the (S)TICK timer(s) are in a known state when starting BSPs. Modified: head/sys/sparc64/sparc64/mp_machdep.c Modified: head/sys/sparc64/sparc64/mp_machdep.c == --- head/sys/sparc64/sparc64/mp_machdep.c Thu Oct 14 21:30:13 2010 (r213867) +++ head/sys/sparc64/sparc64/mp_machdep.c Thu Oct 14 21:34:53 2010 (r213868) @@ -433,6 +433,12 @@ cpu_mp_bootstrap(struct pcpu *pc) */ cache_enable(pc-pc_impl); + /* +* Clear (S)TICK timer(s) (including NPT) and ensure they are stopped. +*/ + tick_clear(pc-pc_impl); + tick_stop(pc-pc_impl); + /* Lock the kernel TSB in the TLB. */ pmap_map_tsb(); @@ -445,7 +451,11 @@ cpu_mp_bootstrap(struct pcpu *pc) /* Initialize global registers. */ cpu_setregs(pc); - /* Enable interrupts. */ + /* +* Enable interrupts. +* Note that the PIL we be lowered indirectly via sched_throw(NULL) +* when fake spinlock held by the idle thread eventually is released. +*/ wrpr(pstate, 0, PSTATE_KERNEL); smp_cpus++; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213872 - head/sys/dev/usb/serial
Author: hselasky Date: Thu Oct 14 21:45:41 2010 New Revision: 213872 URL: http://svn.freebsd.org/changeset/base/213872 Log: Fix forwarding of Line Register Status changes to TTY layer. PR: usb/149675 Approved by:thompsa (mentor) Modified: head/sys/dev/usb/serial/usb_serial.c Modified: head/sys/dev/usb/serial/usb_serial.c == --- head/sys/dev/usb/serial/usb_serial.cThu Oct 14 21:41:08 2010 (r213871) +++ head/sys/dev/usb/serial/usb_serial.cThu Oct 14 21:45:41 2010 (r213872) @@ -942,6 +942,7 @@ ucom_cfg_status_change(struct usb_proc_m uint8_t new_msr; uint8_t new_lsr; uint8_t onoff; + uint8_t lsr_delta; tp = sc-sc_tty; @@ -965,6 +966,7 @@ ucom_cfg_status_change(struct usb_proc_m return; } onoff = ((sc-sc_msr ^ new_msr) SER_DCD); + lsr_delta = (sc-sc_lsr ^ new_lsr); sc-sc_msr = new_msr; sc-sc_lsr = new_lsr; @@ -977,6 +979,30 @@ ucom_cfg_status_change(struct usb_proc_m ttydisc_modem(tp, onoff); } + + if ((lsr_delta ULSR_BI) (sc-sc_lsr ULSR_BI)) { + + DPRINTF(BREAK detected\n); + + ttydisc_rint(tp, 0, TRE_BREAK); + ttydisc_rint_done(tp); + } + + if ((lsr_delta ULSR_FE) (sc-sc_lsr ULSR_FE)) { + + DPRINTF(Frame error detected\n); + + ttydisc_rint(tp, 0, TRE_FRAMING); + ttydisc_rint_done(tp); + } + + if ((lsr_delta ULSR_PE) (sc-sc_lsr ULSR_PE)) { + + DPRINTF(Parity error detected\n); + + ttydisc_rint(tp, 0, TRE_PARITY); + ttydisc_rint_done(tp); + } } void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213873 - head/sys/sparc64/sparc64
Author: marius Date: Thu Oct 14 21:46:53 2010 New Revision: 213873 URL: http://svn.freebsd.org/changeset/base/213873 Log: Explicitly lower the PIL to 0 as part of enabling interrupts, similar to what is done on other platforms. Unlike as with the sched_throw(NULL) called on BSPs during their startup apparently there's nothing which will reliably lower it on APs. I'm unsure why this only came up on V215 though, breaking these with r207248. My best guess is that these are the only supported ones so far fast enough to loose some race. PR: 151404 MFC after:3 days Modified: head/sys/sparc64/sparc64/machdep.c Modified: head/sys/sparc64/sparc64/machdep.c == --- head/sys/sparc64/sparc64/machdep.c Thu Oct 14 21:45:41 2010 (r213872) +++ head/sys/sparc64/sparc64/machdep.c Thu Oct 14 21:46:53 2010 (r213873) @@ -590,6 +590,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * enable them. */ intr_init2(); + wrpr(pil, 0, 0); wrpr(pstate, 0, PSTATE_KERNEL); /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213875 - in head/usr.bin/calendar: . calendars
Author: edwin Date: Thu Oct 14 21:53:25 2010 New Revision: 213875 URL: http://svn.freebsd.org/changeset/base/213875 Log: Update manual with regarding to the status of calendars/calendar.judaic. Modified: head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendars/calendar.judaic Modified: head/usr.bin/calendar/calendar.1 == --- head/usr.bin/calendar/calendar.1Thu Oct 14 21:51:53 2010 (r213874) +++ head/usr.bin/calendar/calendar.1Thu Oct 14 21:53:25 2010 (r213875) @@ -257,8 +257,8 @@ Other holidays, including the not-well-k obscure. .It Pa calendar.judaic Jewish holidays. -This calendar should be updated yearly by the local system administrator -so that roving holidays are set correctly for the current year. +The entries for this calendar have been obtained from the port +deskutils/hebcal. .It Pa calendar.music Musical events, births, and deaths. Strongly oriented toward rock 'n' roll. Modified: head/usr.bin/calendar/calendars/calendar.judaic == --- head/usr.bin/calendar/calendars/calendar.judaic Thu Oct 14 21:51:53 2010(r213874) +++ head/usr.bin/calendar/calendars/calendar.judaic Thu Oct 14 21:53:25 2010(r213875) @@ -13,9 +13,8 @@ #define _calendar_judaic_ /* - * The calendar below has gotten from the port deskutils/hebcal for - * the year of 2010 and for the city of New York. - * This should be updated every year! + * The calendar below has been obtained from the port deskutils/hebcal + * for the year of 2010 to 2015 and for the city of New York. */ 2010/Jan/16* Rosh Chodesh Sh'vat ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213876 - head/sys/dev/usb/serial
Author: hselasky Date: Thu Oct 14 21:53:42 2010 New Revision: 213876 URL: http://svn.freebsd.org/changeset/base/213876 Log: Add more USB device IDs to supported list of devices. Submitted by: Nick Hibma PR: usb/149900 Approved by:thompsa (mentor) Modified: head/sys/dev/usb/serial/uftdi.c Modified: head/sys/dev/usb/serial/uftdi.c == --- head/sys/dev/usb/serial/uftdi.c Thu Oct 14 21:53:25 2010 (r213875) +++ head/sys/dev/usb/serial/uftdi.c Thu Oct 14 21:53:42 2010 (r213876) @@ -226,6 +226,7 @@ static struct usb_device_id uftdi_devs[] UFTDI_DEV(FTDI, CFA_633, 8U232AM), UFTDI_DEV(FTDI, CFA_634, 8U232AM), UFTDI_DEV(FTDI, CFA_635, 8U232AM), + UFTDI_DEV(FTDI, USB_UIRT, 8U232AM), UFTDI_DEV(FTDI, USBSERIAL, 8U232AM), UFTDI_DEV(FTDI, KBS, 8U232AM), UFTDI_DEV(FTDI, MX2_3, 8U232AM), @@ -247,6 +248,7 @@ static struct usb_device_id uftdi_devs[] UFTDI_DEV(INTREPIDCS, VALUECAN, 8U232AM), UFTDI_DEV(INTREPIDCS, NEOVI, 8U232AM), UFTDI_DEV(BBELECTRONICS, USOTL4, 8U232AM), + UFTDI_DEV(MATRIXORBITAL, MOUA, 8U232AM), UFTDI_DEV(MARVELL, SHEEVAPLUG, 8U232AM), UFTDI_DEV(MELCO, PCOPRS1, 8U232AM), UFTDI_DEV(RATOC, REXUSB60F, 8U232AM), ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213878 - in head/sys: dev/mii modules/mii
Author: marius Date: Thu Oct 14 22:01:40 2010 New Revision: 213878 URL: http://svn.freebsd.org/changeset/base/213878 Log: Add a NetBSD-compatible mii_attach(), which is intended to eventually replace mii_phy_probe() altogether. Compared to the latter the advantages of mii_attach() are: - intended to be called multiple times in order to attach PHYs in multiple passes (f.e. in order to only use sub-ranges of the 0 to MII_NPHY - 1 range) - being able to pass along the capability mask from the NIC to the PHY drivers - being able to specify at which address (phyloc) to probe for a PHY (instead of always probing at all addresses from 0 to MII_NPHY - 1) - being able to specify which PHY instance (offloc) to attach - being able to pass along MIIF_* flags from the NIC to the PHY drivers (f.e. as required to indicated to the PHY drivers that flow control is supported by the NIC driver, which actually is the motivation for this change). While at it, I used the opportunity to get rid of some hacks in mii(4) like miibus_probe() generally doing work besides sheer probing and the EVIL HACK (which will vanish entirely along with mii_phy_probe()) by passing the struct ifnet pointer via an argument of mii_attach() as well as to fix some resource leaks in mii(4) in case something fails. Commits which will update the PHY drivers to honor the MII flags passed down from the NIC drivers and take advantage of mii_attach() to get rid of certain types of hacks in NIC and PHY drivers as well as a conversion of the remaining uses of mii_phy_probe() will follow shortly. Reviewed by: jhb, yongari Obtained from:NetBSD (partially) Modified: head/sys/dev/mii/mii.c head/sys/dev/mii/mii.h head/sys/dev/mii/miivar.h head/sys/modules/mii/Makefile Modified: head/sys/dev/mii/mii.c == --- head/sys/dev/mii/mii.c Thu Oct 14 21:58:51 2010(r213877) +++ head/sys/dev/mii/mii.c Thu Oct 14 22:01:40 2010(r213878) @@ -58,6 +58,8 @@ MODULE_VERSION(miibus, 1); #include miibus_if.h static int miibus_print_child(device_t dev, device_t child); +static int miibus_read_ivar(device_t dev, device_t child, int which, +uintptr_t *result); static int miibus_child_location_str(device_t bus, device_t child, char *buf, size_t buflen); static int miibus_child_pnpinfo_str(device_t bus, device_t child, char *buf, @@ -77,6 +79,7 @@ static device_method_t miibus_methods[] /* bus interface */ DEVMETHOD(bus_print_child, miibus_print_child), + DEVMETHOD(bus_read_ivar,miibus_read_ivar), DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_child_pnpinfo_str, miibus_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, miibus_child_location_str), @@ -100,87 +103,52 @@ driver_t miibus_driver = { }; struct miibus_ivars { + struct ifnet*ifp; ifm_change_cb_t ifmedia_upd; ifm_stat_cb_t ifmedia_sts; + int mii_flags; }; -/* - * Helper function used by network interface drivers, attaches PHYs - * to the network interface driver parent. - */ int miibus_probe(device_t dev) { - struct mii_attach_args ma, *args; - struct mii_data *mii; - device_tchild = NULL, parent; - int bmsr, capmask = 0x; - - mii = device_get_softc(dev); - parent = device_get_parent(dev); - LIST_INIT(mii-mii_phys); - - for (ma.mii_phyno = 0; ma.mii_phyno MII_NPHY; ma.mii_phyno++) { - /* -* Check to see if there is a PHY at this address. Note, -* many braindead PHYs report 0/0 in their ID registers, -* so we test for media in the BMSR. -*/ - bmsr = MIIBUS_READREG(parent, ma.mii_phyno, MII_BMSR); - if (bmsr == 0 || bmsr == 0x || - (bmsr (BMSR_EXTSTAT | BMSR_MEDIAMASK)) == 0) { - /* Assume no PHY at this address. */ - continue; - } - - /* -* Extract the IDs. Braindead PHYs will be handled by -* the `ukphy' driver, as we have no ID information to -* match on. -*/ - ma.mii_id1 = MIIBUS_READREG(parent, ma.mii_phyno, - MII_PHYIDR1); - ma.mii_id2 = MIIBUS_READREG(parent, ma.mii_phyno, - MII_PHYIDR2); - - ma.mii_data = mii; - ma.mii_capmask = capmask; - - args = malloc(sizeof(struct mii_attach_args), - M_DEVBUF, M_NOWAIT); - bcopy((char *)ma, (char *)args, sizeof(ma)); - child = device_add_child(dev, NULL, -1); - device_set_ivars(child, args); - } - - if
svn commit: r213879 - in head/sys/dev/usb: . serial
Author: hselasky Date: Thu Oct 14 22:06:52 2010 New Revision: 213879 URL: http://svn.freebsd.org/changeset/base/213879 Log: - Add more USB devices to usbdevs and rename some previously unknown ones. - Add more USB mass storage quirks. Submitted by: Dmitry Luhtionov PR: usb/149934, usb/143045 Approved by:thompsa (mentor) Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Thu Oct 14 22:01:40 2010 (r213878) +++ head/sys/dev/usb/serial/u3g.c Thu Oct 14 22:06:52 2010 (r213879) @@ -285,10 +285,12 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), U3G_DEV(MERLIN, V620, 0), + U3G_DEV(NEOTEL, PRIME, 0), U3G_DEV(NOVATEL, E725, 0), U3G_DEV(NOVATEL, ES620, 0), U3G_DEV(NOVATEL, ES620_2, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsThu Oct 14 22:01:40 2010(r213878) +++ head/sys/dev/usb/usbdevsThu Oct 14 22:06:52 2010(r213879) @@ -2686,6 +2686,7 @@ product QUALCOMMINC E0076 0x0076 3G mode product QUALCOMMINC E0078 0x0078 3G modem product QUALCOMMINC E0082 0x0082 3G modem product QUALCOMMINC E0086 0x0086 3G modem +product QUALCOMMINC E2000 0x2000 3G modem product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213880 - head/sys/dev/usb/wlan
Author: hselasky Date: Thu Oct 14 22:14:55 2010 New Revision: 213880 URL: http://svn.freebsd.org/changeset/base/213880 Log: Add new USB device IDs to the list of supported devices. PR: usb/151043 Approved by:thompsa (mentor) Modified: head/sys/dev/usb/wlan/if_rum.c Modified: head/sys/dev/usb/wlan/if_rum.c == --- head/sys/dev/usb/wlan/if_rum.c Thu Oct 14 22:06:52 2010 (r213879) +++ head/sys/dev/usb/wlan/if_rum.c Thu Oct 14 22:14:55 2010 (r213880) @@ -118,6 +118,8 @@ static const struct usb_device_id rum_de RUM_DEV(HUAWEI3COM, WUB320G), RUM_DEV(MELCO, G54HP), RUM_DEV(MELCO, SG54HP), +RUM_DEV(MELCO, WLRUCG), +RUM_DEV(MELCO, WLRUCGAOSS), RUM_DEV(MSI, RT2573_1), RUM_DEV(MSI, RT2573_2), RUM_DEV(MSI, RT2573_3), ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213879 - in head/sys/dev/usb: . serial
On Friday 15 October 2010 00:06:52 Hans Petter Selasky wrote: r213879 Correct commit message: Add more USB device IDs to the supported list of devices. Fix U3G kernel build breakage since r213856 due to a missing usbdevs entry. Submitted by: Nick Hibma PR: usb/149764 Approved by:thompsa (mentor) Enough patching for today :-) --HPS ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213882 - head/sys/dev/mps
Author: mdf Date: Thu Oct 14 23:26:08 2010 New Revision: 213882 URL: http://svn.freebsd.org/changeset/base/213882 Log: Fixes to mps_user_command(): - fix the leak of command struct on error - simplify the cleanup logic - EINPROGRESS is not a fatal error - buggy comment and error message Reviewed by: ken Modified: head/sys/dev/mps/mps_user.c Modified: head/sys/dev/mps/mps_user.c == --- head/sys/dev/mps/mps_user.c Thu Oct 14 22:45:14 2010(r213881) +++ head/sys/dev/mps/mps_user.c Thu Oct 14 23:26:08 2010(r213882) @@ -579,7 +579,7 @@ mps_user_command(struct mps_softc *sc, s MPI2_REQUEST_HEADER *hdr; MPI2_DEFAULT_REPLY *rpl; void *buf = NULL; - struct mps_command *cm; + struct mps_command *cm = NULL; int err = 0; int sz; @@ -631,11 +631,12 @@ mps_user_command(struct mps_softc *sc, s mps_lock(sc); err = mps_map_command(sc, cm); - if (err != 0) { - mps_printf(sc, mps_user_command: request timed out\n); + if (err != 0 err != EINPROGRESS) { + mps_printf(sc, %s: invalid request: error %d\n, + __func__, err); goto Ret; } - msleep(cm, sc-mps_mtx, 0, mpsuser, 0); /* 30 seconds */ + msleep(cm, sc-mps_mtx, 0, mpsuser, 0); rpl = (MPI2_DEFAULT_REPLY *)cm-cm_reply; sz = rpl-MsgLength * 4; @@ -652,22 +653,14 @@ mps_user_command(struct mps_softc *sc, s copyout(rpl, cmd-rpl, sz); if (buf != NULL) copyout(buf, cmd-buf, cmd-len); - mps_lock(sc); - mps_dprint(sc, MPS_INFO, mps_user_command: reply size %d\n, sz ); - mps_free_command(sc, cm); -Ret: - mps_unlock(sc); - if (buf != NULL) - free(buf, M_MPSUSER); - return (err); - RetFreeUnlocked: mps_lock(sc); - mps_free_command(sc, cm); + if (cm != NULL) + mps_free_command(sc, cm); +Ret: mps_unlock(sc); - if (buf != NULL) free(buf, M_MPSUSER); return (err); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213883 - head/tools/regression/bin/sh/builtins
Author: obrien Date: Thu Oct 14 23:28:31 2010 New Revision: 213883 URL: http://svn.freebsd.org/changeset/base/213883 Log: Embellish this testcase a little bit to be more clear what the output is and why. The first case is correct usage which has but one correct output. The 2nd and 3rd cases are incorrect usage in which the exact output is not standardized and various shells give various allowable output. Modified: head/tools/regression/bin/sh/builtins/getopts1.0 head/tools/regression/bin/sh/builtins/getopts1.0.stdout Modified: head/tools/regression/bin/sh/builtins/getopts1.0 == --- head/tools/regression/bin/sh/builtins/getopts1.0Thu Oct 14 23:26:08 2010(r213882) +++ head/tools/regression/bin/sh/builtins/getopts1.0Thu Oct 14 23:28:31 2010(r213883) @@ -1,12 +1,25 @@ # $FreeBSD$ + +echo '-1-' set -- -abc getopts ab: OPTION echo ${OPTION} +# In this case 'getopts' should realize that we have not provided the +# required argument for -b. +# Note that Solaris 10's (UNIX 03) /usr/xpg4/bin/sh, /bin/sh, and /bin/ksh; +# ksh93 20090505; pdksh 5.2.14p2; mksh R39c; bash 4.1 PL7; and zsh 4.3.10. +# all recognize that b is missing its argument on the *first* iteration +# of 'getopts' and do not produce the a in $OPTION. +echo '-2-' set -- -ab getopts ab: OPTION echo ${OPTION} +getopts ab: OPTION +echo ${OPTION} +# The 'shift' is aimed at causing an error. +echo '-3-' shift 1 getopts ab: OPTION echo ${OPTION} Modified: head/tools/regression/bin/sh/builtins/getopts1.0.stdout == --- head/tools/regression/bin/sh/builtins/getopts1.0.stdout Thu Oct 14 23:26:08 2010(r213882) +++ head/tools/regression/bin/sh/builtins/getopts1.0.stdout Thu Oct 14 23:28:31 2010(r213883) @@ -1,3 +1,8 @@ +-1- a +-2- a +No arg for -b option +? +-3- ? ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213846 - head/sys/compat/linux
On Thu Oct 14 10, Konstantin Belousov wrote: Author: kib Date: Thu Oct 14 19:30:44 2010 New Revision: 213846 URL: http://svn.freebsd.org/changeset/base/213846 Log: Remove stale comment. thanks a lot. :) Submitted by: arundel MFC after: 3 days Modified: head/sys/compat/linux/linux_util.h Modified: head/sys/compat/linux/linux_util.h == --- head/sys/compat/linux/linux_util.hThu Oct 14 19:19:19 2010 (r213845) +++ head/sys/compat/linux/linux_util.hThu Oct 14 19:30:44 2010 (r213846) @@ -31,11 +31,6 @@ * $FreeBSD$ */ -/* - * This file is pretty much the same as Christos' svr4_util.h - * (for now). - */ - #ifndef _LINUX_UTIL_H_ #define _LINUX_UTIL_H_ -- a13x ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213884 - in head/sys: conf modules/acpi/acpi
Author: jkim Date: Thu Oct 14 23:31:58 2010 New Revision: 213884 URL: http://svn.freebsd.org/changeset/base/213884 Log: Stop hard coding nm(1) and make it overridable. Modified: head/sys/conf/files.amd64 head/sys/modules/acpi/acpi/Makefile Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Thu Oct 14 23:28:31 2010(r213883) +++ head/sys/conf/files.amd64 Thu Oct 14 23:31:58 2010(r213884) @@ -87,7 +87,7 @@ acpi_wakecode.h optionalacpi \ clean acpi_wakecode.h acpi_wakedata.hoptionalacpi \ dependency acpi_wakecode.o \ - compile-with'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo #define $${what}0x$${offset}; done ${.TARGET}' \ + compile-with'${NM} -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo #define $${what}0x$${offset}; done ${.TARGET}' \ no-obj no-implicit-rule before-depend \ clean acpi_wakedata.h # Modified: head/sys/modules/acpi/acpi/Makefile == --- head/sys/modules/acpi/acpi/Makefile Thu Oct 14 23:28:31 2010 (r213883) +++ head/sys/modules/acpi/acpi/Makefile Thu Oct 14 23:31:58 2010 (r213884) @@ -108,18 +108,22 @@ CFLAGS+=-DSMP SRCS+= acpi_switch.S acpi_wakedata.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS=-x assembler-with-cpp -DLOCORE ${CFLAGS} +NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +NM?= nm acpi_switch.o: acpi_switch.S - ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} + ${NORMAL_S} acpi_wakecode.o: acpi_wakecode.S assym.s - ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} + ${NORMAL_S} acpi_wakecode.bin: acpi_wakecode.o objcopy -S -O binary acpi_wakecode.o ${.TARGET} acpi_wakecode.h: acpi_wakecode.bin file2c -sx 'static char wakecode[] = {' '};' acpi_wakecode.bin \ ${.TARGET} acpi_wakedata.h: acpi_wakecode.o - nm -n --defined-only ${.ALLSRC} | while read offset dummy what; do \ - echo #define $${what}0x$${offset}; done ${.TARGET} + ${NM} -n --defined-only acpi_wakecode.o | \ + while read offset dummy what; do \ + echo #define $${what}0x$${offset}; \ + done ${.TARGET} .else acpi_wakecode.h: acpi_wakecode.S assym.s ${MAKE} -f ${.CURDIR}/../../../${MACHINE_CPUARCH}/acpica/Makefile \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213643 - head/usr.bin/ar
On Thu, 14 Oct 2010, Erik Cederstrand wrote: Den 13/10/2010 kl. 05.55 skrev Bruce Evans: [Erik wrote, but the attribution was stripped] I'm a real beginner here. As I read the manuals (GNU ar and BSD ar), the only flags that really control archive contents on archive creation is 'q' and 'r'. The 'l' is ignored, 'c' and 'v' control verbosity, and 'u' and 's' are for performance purposes that are largely irrelevant today (extracting every single *.a file and recreating it wit ar -rD takes less than 10 secs on my slow machine). Is there any negative impact at runtime from having all archives created with either -rD or -qD (ignoring verbosity at build time for now)? I don't really know. 's' is also useful for non-libraries. 'u' is related to clobbering times, but goes the wrong way by updating the archive if the file is newer. I think all FreeBSD libraries should be built with the same flags (probably ARFLAGS, with you putting -D in it if you don't want the timestamp update). However, the places that already use ARFLAGS but set it themselves may be a problem. Some Makefiles initentionally avoid using bsd.lib.mk because they are special and it does the wrong things for them. They probably don't really care about the exact archive flags, but need to be checked individually. I'd like to give it a try. This is where an easy-to-use regression suite with reasonable coverage for FreeBSD would come in handy :-) I am certainly willing to help test, and maybe even help check the uses of ARFLAGS (though I seem to have a severe shortage of time). I still have my test environment where ar(1) bails without -D, which would probably be helpful. -Ben ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r213793 - in head/sys/dev: ce cp
On Thu, 14 Oct 2010, Jung-uk Kim wrote: On Wednesday 13 October 2010 09:16 pm, Bruce Evans wrote: On Wed, 13 Oct 2010, Jung-uk Kim wrote: ... I think the attached patch should do. % Index: sys/dev/ce/if_ce.c % === % --- sys/dev/ce/if_ce.c(revision 213782) % +++ sys/dev/ce/if_ce.c(working copy) % @@ -1313,9 +1313,11 @@ static int ce_ioctl (struct cdev *dev, u_long cmd, % IFP2SP(d-ifp)-pp_flags = ~(PP_FR); % IFP2SP(d-ifp)-pp_flags |= PP_KEEPALIVE; % d-ifp-if_flags |= PP_CISCO; % - } else if (! strcmp (fr, (char*)data) PP_FR) { % +#if PP_FR 0 % + } else if (! strcmp (fr, (char*)data)) { % d-ifp-if_flags = ~(PP_CISCO); % IFP2SP(d-ifp)-pp_flags |= PP_FR | PP_KEEPALIVE; % +#endif % } else if (! strcmp (ppp, (char*)data)) { % IFP2SP(d-ifp)-pp_flags = ~PP_FR; % IFP2SP(d-ifp)-pp_flags = ~PP_KEEPALIVE; % ... This gives different behaviour if PP_FR is even or negative. Even values used to fail the match, but now the match succeeds for even values 0 and then the bits of PP_FR are put in pp_flags. Negative values used to pass the match if they were odd, but now the match is not attempted for any negative value. It just might be useful for PP_FR to have multiple bits set, with the 1 bit used for enabling this and the other bits used for setting pp_flags. If not, then only values of 0 and 1 for PP_FR make sense, and the ifdef should be #if PP_FR == 1. I don't understand your remarks about PP_FR being even/odd. Maybe you are confused '' with ''? ;-) Oops. Is the attached patch okay for you, then? This seems to restore the original behaviour. [... Patch lost to attachment.] Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org