svn commit: r368453 - head/etc/mtree
Author: n_hibma Date: Tue Dec 8 17:44:34 2020 New Revision: 368453 URL: https://svnweb.freebsd.org/changeset/base/368453 Log: Missed adding netgraph to mtree in r368443: New Netgraph module ng_macfilter: Macfilter to route packets through different hooks based on sender MAC address. Based on ng_macfilter written by Pekka Nikander Sponsered by Retina b.v. Reviewed by:afedorov MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27268 Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Tue Dec 8 17:42:32 2020 (r368452) +++ head/etc/mtree/BSD.tests.dist Tue Dec 8 17:44:34 2020 (r368453) @@ -798,6 +798,8 @@ .. net .. +netgraph +.. netinet .. netinet6 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368452 - head/etc/mtree
Author: n_hibma Date: Tue Dec 8 17:42:32 2020 New Revision: 368452 URL: https://svnweb.freebsd.org/changeset/base/368452 Log: Fix indenting for netmap. Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Tue Dec 8 17:28:42 2020 (r368451) +++ head/etc/mtree/BSD.tests.dist Tue Dec 8 17:42:32 2020 (r368452) @@ -808,8 +808,8 @@ tunnel .. .. -netmap -.. +netmap +.. netpfil common .. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368443 - in head: share/man/man4 sys/conf sys/modules/netgraph sys/modules/netgraph/macfilter sys/netgraph tests/sys tests/sys/netgraph
kid=1 packets_in=3571 bytes_in=592631 packets_out=3437 bytes_out=777142 } ] } +.Ed +.Sh SEE ALSO +.Xr divert 4 , +.Xr ipfw 4 , +.Xr netgraph 4 , +.Xr ng_ether 4 , +.Xr ng_one2many 4 , +.Xr ng_tag 4 , +.Xr ngctl 8 +.Sh AUTHORS +.An -nosplit +The original version of this code was written by Pekka Nikander, and +subsequently modified heavily by +.An Nick Hibma Aq Mt n_hi...@freebsd.org . +.Sh BUGS +None known. Modified: head/sys/conf/files == --- head/sys/conf/files Tue Dec 8 15:00:07 2020(r368442) +++ head/sys/conf/files Tue Dec 8 15:09:42 2020(r368443) @@ -4299,6 +4299,7 @@ netgraph/ng_ipfw.coptional netgraph_ipfw inet ipfire netgraph/ng_ksocket.c optional netgraph_ksocket netgraph/ng_l2tp.c optional netgraph_l2tp netgraph/ng_lmi.c optional netgraph_lmi +netgraph/ng_macfilter.coptional netgraph_macfilter netgraph/ng_mppc.c optional netgraph_mppc_compression | \ netgraph_mppc_encryption netgraph/ng_nat.c optional netgraph_nat inet libalias Modified: head/sys/modules/netgraph/Makefile == --- head/sys/modules/netgraph/Makefile Tue Dec 8 15:00:07 2020 (r368442) +++ head/sys/modules/netgraph/Makefile Tue Dec 8 15:09:42 2020 (r368443) @@ -31,6 +31,7 @@ SUBDIR= async \ ksocket \ l2tp \ lmi \ + macfilter \ ${_mppc} \ nat \ netflow \ Copied and modified: head/sys/modules/netgraph/macfilter/Makefile (from r367755, head/sys/modules/netgraph/tag/Makefile) == --- head/sys/modules/netgraph/tag/Makefile Tue Nov 17 10:27:42 2020 (r367755, copy source) +++ head/sys/modules/netgraph/macfilter/MakefileTue Dec 8 15:09:42 2020(r368443) @@ -1,6 +1,9 @@ # $FreeBSD$ -KMOD= ng_tag -SRCS= ng_tag.c +KMOD= ng_macfilter +SRCS= ng_macfilter.c .include + +#CFLAGS+= -DNG_MACFILTER_DEBUG +#CFLAGS+= -DNG_MACFILTER_DEBUG_RECVDATA Added: head/sys/netgraph/ng_macfilter.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netgraph/ng_macfilter.c Tue Dec 8 15:09:42 2020 (r368443) @@ -0,0 +1,878 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2002 Ericsson Research & Pekka Nikander + * Copyright (c) 2020 Nick Hibma + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice unmodified, this list of conditions, and the following + *disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * MACFILTER NETGRAPH NODE TYPE + * + * This node type routes packets from the ether hook to either the default hook + * if sender MAC address is not in the MAC table, or out over the specified + * hook if it is. + * + * Other node types can then be used to apply specific processing to the + * packets on each hook. + * + * If compiled with NG_MACFILTER_DEBUG the flow and resizing of the MAC table + * are logged to the console. + * + * If compiled with NG_MACFILTER_DEBUG_RECVDATA every packet handled is logged + * on the console. + */ + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +#include "ng_macfilter.h" + +#ifdef NG_SEPARATE_MALLOC +MALLOC_DEFINE(M_NETGRAPH_MACFILTER, "netgraph_macfilter", "netgraph macfilter node "); +#else +#define M_NETGRAPH_MACFILTER M_NETGRAPH +#endif + +#define MA
svn commit: r367804 - head/share/man/man4
Author: n_hibma Date: Wed Nov 18 15:23:43 2020 New Revision: 367804 URL: https://svnweb.freebsd.org/changeset/base/367804 Log: Fix mandoc lint warnings. Modified: head/share/man/man4/ng_tag.4 Modified: head/share/man/man4/ng_tag.4 == --- head/share/man/man4/ng_tag.4Wed Nov 18 15:20:01 2020 (r367803) +++ head/share/man/man4/ng_tag.4Wed Nov 18 15:23:43 2020 (r367804) @@ -150,9 +150,7 @@ If .Va strip flag is non-zero, then found tag is deleted from list of packet tags. .It Dv NGM_TAG_GET_HOOKIN Pq Ic gethookin -This command takes an -.Tn ASCII -string argument, the hook name, and returns the +This command takes an ASCII string argument, the hook name, and returns the corresponding .Vt "struct ng_tag_hookin" as shown above. @@ -176,22 +174,16 @@ Other variables mean basically the same as in .Vt "struct ng_tag_hookin" shown above, except used for setting values in a new tag. .It Dv NGM_TAG_GET_HOOKOUT Pq Ic gethookout -This command takes an -.Tn ASCII -string argument, the hook name, and returns the +This command takes an ASCII string argument, the hook name, and returns the corresponding .Vt "struct ng_tag_hookout" as shown above. .It Dv NGM_TAG_GET_STATS Pq Ic getstats -This command takes an -.Tn ASCII -string argument, the hook name, and returns the +This command takes an ASCII string argument, the hook name, and returns the statistics associated with the hook as a .Vt "struct ng_tag_hookstat" . .It Dv NGM_TAG_CLR_STATS Pq Ic clrstats -This command takes an -.Tn ASCII -string argument, the hook name, and clears the +This command takes an ASCII string argument, the hook name, and clears the statistics associated with the hook. .It Dv NGM_TAG_GETCLR_STATS Pq Ic getclrstats This command is identical to @@ -199,7 +191,7 @@ This command is identical to except that the statistics are also atomically cleared. .El .Pp -.Em Note: +.Em Note : statistics counters as well as three statistics messages above work only if code was compiled with the .Dv NG_TAG_DEBUG ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r357074 - head/share/man/man4
Author: n_hibma Date: Fri Jan 24 11:22:33 2020 New Revision: 357074 URL: https://svnweb.freebsd.org/changeset/base/357074 Log: Fix a few spacing issues to make the page more readable. Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 == --- head/share/man/man4/netmap.4Fri Jan 24 07:48:11 2020 (r357073) +++ head/share/man/man4/netmap.4Fri Jan 24 11:22:33 2020 (r357074) @@ -985,7 +985,7 @@ interfaces, as in or even connect the NIC to the host stack using netmap .Dl bridge -i netmap:ix0 .Ss USING THE NATIVE API -The following code implements a traffic generator +The following code implements a traffic generator: .Pp .Bd -literal -compact #include @@ -1020,7 +1020,8 @@ void sender(void) } .Ed .Ss HELPER FUNCTIONS -A simple receiver can be implemented using the helper functions +A simple receiver can be implemented using the helper functions: +.Pp .Bd -literal -compact #define NETMAP_WITH_LIBS #include @@ -1049,6 +1050,7 @@ it is possible to do packet forwarding between ports swapping buffers. The buffer from the transmit ring is used to replenish the receive ring: +.Pp .Bd -literal -compact uint32_t tmp; struct netmap_slot *src, *dst; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r337961 - head/usr.sbin/ppp
Author: n_hibma Date: Fri Aug 17 10:18:45 2018 New Revision: 337961 URL: https://svnweb.freebsd.org/changeset/base/337961 Log: Add the possibility to mark packets urgent based on their length. This allows preferring small (e.g. ACK) packets, in upload heavy environments. It was already possible to mark packets urgent based on destination port. This option piggy backs on that feature. Modified: head/usr.sbin/ppp/command.c head/usr.sbin/ppp/ip.c head/usr.sbin/ppp/ncp.c head/usr.sbin/ppp/ncp.h head/usr.sbin/ppp/ppp.8 Modified: head/usr.sbin/ppp/command.c == --- head/usr.sbin/ppp/command.c Fri Aug 17 07:27:15 2018(r337960) +++ head/usr.sbin/ppp/command.c Fri Aug 17 10:18:45 2018(r337961) @@ -139,7 +139,7 @@ #defineVAR_CD 30 #defineVAR_PARITY 31 #define VAR_CRTSCTS32 -#define VAR_URGENTPORTS33 +#define VAR_URGENT 33 #defineVAR_LOGOUT 34 #defineVAR_IFQUEUE 35 #defineVAR_MPPE36 @@ -2267,7 +2267,7 @@ SetVariable(struct cmdargs const *arg) } break; - case VAR_URGENTPORTS: + case VAR_URGENT: if (arg->argn == arg->argc) { ncp_SetUrgentTOS(>bundle->ncp); ncp_ClearUrgentTcpPorts(>bundle->ncp); @@ -2291,6 +2291,11 @@ SetVariable(struct cmdargs const *arg) ncp_ClearUrgentTcpPorts(>bundle->ncp); ncp_ClearUrgentUdpPorts(>bundle->ncp); ncp_ClearUrgentTOS(>bundle->ncp); +} else if (!strcasecmp(arg->argv[arg->argn], "length")) { + if (arg->argn == arg->argc - 1) + ncp_SetUrgentTcpLen(>bundle->ncp, 0); + else + ncp_SetUrgentTcpLen(>bundle->ncp, atoi(arg->argv[arg->argn + 1])); } else { ncp_SetUrgentTOS(>bundle->ncp); first = arg->argn; @@ -2469,8 +2474,8 @@ static struct cmdtab const SetCommands[] = { "STOPPED timeouts", "set stopped [LCPseconds [CCPseconds]]", NULL}, {"timeout", NULL, SetVariable, LOCAL_AUTH, "Idle timeout", "set timeout idletime", (const void *)VAR_IDLETIMEOUT}, - {"urgent", NULL, SetVariable, LOCAL_AUTH, "urgent ports", - "set urgent [tcp|udp] [+|-]port...", (const void *)VAR_URGENTPORTS}, + {"urgent", NULL, SetVariable, LOCAL_AUTH, "urgent traffic", + "set urgent [[tcp|udp] [+|-]port...]|[length len]", (const void *)VAR_URGENT}, {"vj", NULL, ipcp_vjset, LOCAL_AUTH, "vj values", "set vj slots|slotcomp [value]", NULL}, {"help", "?", HelpCommand, LOCAL_AUTH | LOCAL_NO_AUTH, Modified: head/usr.sbin/ppp/ip.c == --- head/usr.sbin/ppp/ip.c Fri Aug 17 07:27:15 2018(r337960) +++ head/usr.sbin/ppp/ip.c Fri Aug 17 10:18:45 2018(r337961) @@ -820,6 +820,8 @@ PacketCheck(struct bundle *bundle, u_int32_t family, if (!frag && ncp_IsUrgentTcpPort(>ncp, ntohs(th->th_sport), ntohs(th->th_dport))) pri++; +else if (!frag && ncp_IsUrgentTcpLen(>ncp, datalen)) + pri++; if (logit && loglen < sizeof logbuf) { len = datalen - (th->th_off << 2); @@ -851,6 +853,8 @@ PacketCheck(struct bundle *bundle, u_int32_t family, loglen += strlen(logbuf + loglen); } } + snprintf(logbuf + loglen, sizeof logbuf - loglen, " pri:%d", pri); + loglen += strlen(logbuf + loglen); } break; Modified: head/usr.sbin/ppp/ncp.c == --- head/usr.sbin/ppp/ncp.c Fri Aug 17 07:27:15 2018(r337960) +++ head/usr.sbin/ppp/ncp.c Fri Aug 17 10:18:45 2018(r337961) @@ -441,6 +441,21 @@ ncp_ClearUrgentPorts(struct port_range *range) } int +ncp_IsUrgentTcpLen(struct ncp *ncp, int len) +{ + if (len < ncp->cfg.urgent.len) +return 1; + else +return 0; +} + +void +ncp_SetUrgentTcpLen(struct ncp *ncp, int len) +{ +ncp->cfg.urgent.len = len; +} + +int ncp_Show(struct cmdargs const *arg) { struct ncp *ncp = >bundle->ncp; Modified: head/usr.sbin/ppp/ncp.h == --- head/usr.sbin/ppp/ncp.h Fri Aug 17 07:27:15 2018(r337960) +++ head/usr.sbin/ppp/ncp.h Fri Aug 17 10:18:45 2018(r337961) @@ -42,6 +42,7 @@ struct ncp { struct { struct port_range tcp, udp; /* The range of urgent ports */ unsigned tos : 1;/* Urgent IPTOS_LOWDELAY packets ? */ + int len; /* The size below which traffic is prioritised */ } urgent; } cfg; @@ -68,6 +69,8 @@ extern size_t ncp_QueueLen(struct ncp *); extern size_t ncp_FillPhysicalQueues(struct ncp *, struct bundle *); extern int ncp_PushPacket(struct ncp *, int *, struct link *); extern int ncp_IsUrgentPort(struct port_range *, u_short, u_short); +extern int ncp_IsUrgentTcpLen(struct ncp *, int);
svn commit: r329655 - stable/11/sbin/ipfw
Author: n_hibma Date: Tue Feb 20 19:33:33 2018 New Revision: 329655 URL: https://svnweb.freebsd.org/changeset/base/329655 Log: Merge rev. 329197 from HEAD: DSCP values passed to setdscp need to be lowercase. Modified: stable/11/sbin/ipfw/ipfw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 == --- stable/11/sbin/ipfw/ipfw.8 Tue Feb 20 19:21:34 2018(r329654) +++ stable/11/sbin/ipfw/ipfw.8 Tue Feb 20 19:33:33 2018(r329655) @@ -1070,49 +1070,49 @@ Set specified DiffServ codepoint for an IPv4/IPv6 pack Processing continues at the next rule. Supported values are: .Pp -.Cm CS0 +.Cm cs0 .Pq Dv 00 , -.Cm CS1 +.Cm cs1 .Pq Dv 001000 , -.Cm CS2 +.Cm cs2 .Pq Dv 01 , -.Cm CS3 +.Cm cs3 .Pq Dv 011000 , -.Cm CS4 +.Cm cs4 .Pq Dv 10 , -.Cm CS5 +.Cm cs5 .Pq Dv 101000 , -.Cm CS6 +.Cm cs6 .Pq Dv 11 , -.Cm CS7 +.Cm cs7 .Pq Dv 111000 , -.Cm AF11 +.Cm af11 .Pq Dv 001010 , -.Cm AF12 +.Cm af12 .Pq Dv 001100 , -.Cm AF13 +.Cm af13 .Pq Dv 001110 , -.Cm AF21 +.Cm af21 .Pq Dv 010010 , -.Cm AF22 +.Cm af22 .Pq Dv 010100 , -.Cm AF23 +.Cm af23 .Pq Dv 010110 , -.Cm AF31 +.Cm af31 .Pq Dv 011010 , -.Cm AF32 +.Cm af32 .Pq Dv 011100 , -.Cm AF33 +.Cm af33 .Pq Dv 00 , -.Cm AF41 +.Cm af41 .Pq Dv 100010 , -.Cm AF42 +.Cm af42 .Pq Dv 100100 , -.Cm AF43 +.Cm af43 .Pq Dv 100110 , -.Cm EF +.Cm ef .Pq Dv 101110 , -.Cm BE +.Cm be .Pq Dv 00 . Additionally, DSCP value can be specified by number (0..64). It is also possible to use the ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r329197 - head/sbin/ipfw
Author: n_hibma Date: Tue Feb 13 10:11:39 2018 New Revision: 329197 URL: https://svnweb.freebsd.org/changeset/base/329197 Log: DSCP values passed to setdscp need to be lowercase. See definition of f_ipdscp values. They are compared against using bcmp which is case sensitive. MFC after:1 week Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 == --- head/sbin/ipfw/ipfw.8 Tue Feb 13 08:17:19 2018(r329196) +++ head/sbin/ipfw/ipfw.8 Tue Feb 13 10:11:39 2018(r329197) @@ -1070,49 +1070,49 @@ Set specified DiffServ codepoint for an IPv4/IPv6 pack Processing continues at the next rule. Supported values are: .Pp -.Cm CS0 +.Cm cs0 .Pq Dv 00 , -.Cm CS1 +.Cm cs1 .Pq Dv 001000 , -.Cm CS2 +.Cm cs2 .Pq Dv 01 , -.Cm CS3 +.Cm cs3 .Pq Dv 011000 , -.Cm CS4 +.Cm cs4 .Pq Dv 10 , -.Cm CS5 +.Cm cs5 .Pq Dv 101000 , -.Cm CS6 +.Cm cs6 .Pq Dv 11 , -.Cm CS7 +.Cm cs7 .Pq Dv 111000 , -.Cm AF11 +.Cm af11 .Pq Dv 001010 , -.Cm AF12 +.Cm af12 .Pq Dv 001100 , -.Cm AF13 +.Cm af13 .Pq Dv 001110 , -.Cm AF21 +.Cm af21 .Pq Dv 010010 , -.Cm AF22 +.Cm af22 .Pq Dv 010100 , -.Cm AF23 +.Cm af23 .Pq Dv 010110 , -.Cm AF31 +.Cm af31 .Pq Dv 011010 , -.Cm AF32 +.Cm af32 .Pq Dv 011100 , -.Cm AF33 +.Cm af33 .Pq Dv 00 , -.Cm AF41 +.Cm af41 .Pq Dv 100010 , -.Cm AF42 +.Cm af42 .Pq Dv 100100 , -.Cm AF43 +.Cm af43 .Pq Dv 100110 , -.Cm EF +.Cm ef .Pq Dv 101110 , -.Cm BE +.Cm be .Pq Dv 00 . Additionally, DSCP value can be specified by number (0..64). It is also possible to use the ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r328888 - in stable/11/sys/dev/usb: . serial
Author: n_hibma Date: Mon Feb 5 16:28:03 2018 New Revision: 32 URL: https://svnweb.freebsd.org/changeset/base/32 Log: Merge r327951 Add IDs for Quectel EC25. Submitted by: Samuel Crookes Modified: stable/11/sys/dev/usb/serial/u3g.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/u3g.c == --- stable/11/sys/dev/usb/serial/u3g.c Mon Feb 5 16:01:34 2018 (r328887) +++ stable/11/sys/dev/usb/serial/u3g.c Mon Feb 5 16:28:03 2018 (r32) @@ -487,6 +487,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUANTA, GLX, 0), U3G_DEV(QUANTA, Q101, 0), U3G_DEV(QUANTA, Q111, 0), + U3G_DEV(QUECTEL, EC25, 0), U3G_DEV(SIERRA, AC402, 0), U3G_DEV(SIERRA, AC595U, 0), U3G_DEV(SIERRA, AC313U, 0), Modified: stable/11/sys/dev/usb/usbdevs == --- stable/11/sys/dev/usb/usbdevs Mon Feb 5 16:01:34 2018 (r328887) +++ stable/11/sys/dev/usb/usbdevs Mon Feb 5 16:28:03 2018 (r32) @@ -746,6 +746,7 @@ vendor TRIPPLITE0x2478 Tripp-Lite vendor HIROSE 0x2631 Hirose Electric vendor NHJ 0x2770 NHJ vendor PLANEX 0x2c02 Planex Communications +vendor QUECTEL 0x2c7c Quectel Wireless Solutions vendor VIDZMEDIA 0x3275 VidzMedia Pte Ltd vendor LINKINSTRUMENTS 0x3195 Link Instruments Inc. vendor AEI 0x3334 AEI @@ -3757,11 +3758,14 @@ product QUANTA GKE 0xea05 HSDPA modem product QUANTA GLE 0xea06 HSDPA modem product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS -/* Qtronix products */ -product QTRONIX 980N 0x2011 Scorpion-980N keyboard +/* Quectel products */ +product QUECTEL EC25 0x0125 LTE modem /* Quickshot products */ product QUICKSHOT STRIKEPAD0x6238 USB StrikePad + +/* Qtronix products */ +product QTRONIX 980N 0x2011 Scorpion-980N keyboard /* Radio Shack */ product RADIOSHACK USBCABLE0x4026 USB to Serial Cable ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r327951 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Sat Jan 13 23:31:21 2018 New Revision: 327951 URL: https://svnweb.freebsd.org/changeset/base/327951 Log: Add support for Quectel EC25. Submitted by: Samuel Crookes MFC after:3 days 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 Sat Jan 13 23:14:53 2018 (r327950) +++ head/sys/dev/usb/serial/u3g.c Sat Jan 13 23:31:21 2018 (r327951) @@ -491,6 +491,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUANTA, GLX, 0), U3G_DEV(QUANTA, Q101, 0), U3G_DEV(QUANTA, Q111, 0), + U3G_DEV(QUECTEL, EC25, 0), U3G_DEV(SIERRA, AC402, 0), U3G_DEV(SIERRA, AC595U, 0), U3G_DEV(SIERRA, AC313U, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSat Jan 13 23:14:53 2018(r327950) +++ head/sys/dev/usb/usbdevsSat Jan 13 23:31:21 2018(r327951) @@ -751,6 +751,7 @@ vendor HIROSE 0x2631 Hirose Electric vendor NHJ 0x2770 NHJ vendor THINGM 0x27b8 ThingM vendor PLANEX 0x2c02 Planex Communications +vendor QUECTEL 0x2c7c Quectel Wireless Solutions vendor VIDZMEDIA 0x3275 VidzMedia Pte Ltd vendor LINKINSTRUMENTS 0x3195 Link Instruments Inc. vendor AEI 0x3334 AEI @@ -3812,11 +3813,14 @@ product QUANTA GKE 0xea05 HSDPA modem product QUANTA GLE 0xea06 HSDPA modem product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS -/* Qtronix products */ -product QTRONIX 980N 0x2011 Scorpion-980N keyboard +/* Quectel products */ +product QUECTEL EC25 0x0125 LTE modem /* Quickshot products */ product QUICKSHOT STRIKEPAD0x6238 USB StrikePad + +/* Qtronix products */ +product QTRONIX 980N 0x2011 Scorpion-980N keyboard /* Radio Shack */ product RADIOSHACK USBCABLE0x4026 USB to Serial Cable ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324548 - stable/11/sys/dev/smc
Author: n_hibma Date: Thu Oct 12 14:08:55 2017 New Revision: 324548 URL: https://svnweb.freebsd.org/changeset/base/324548 Log: MFC 324088: Make smc compile with DEVICE_POLLING set. smc_poll had the wrong prototype. Reviewed by: benno Modified: stable/11/sys/dev/smc/if_smc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/smc/if_smc.c == --- stable/11/sys/dev/smc/if_smc.c Thu Oct 12 13:59:23 2017 (r324547) +++ stable/11/sys/dev/smc/if_smc.c Thu Oct 12 14:08:55 2017 (r324548) @@ -782,7 +782,7 @@ smc_task_rx(void *context, int pending) } #ifdef DEVICE_POLLING -static void +static int smc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct smc_softc*sc; @@ -792,12 +792,13 @@ smc_poll(struct ifnet *ifp, enum poll_cmd cmd, int cou SMC_LOCK(sc); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { SMC_UNLOCK(sc); - return; + return (0); } SMC_UNLOCK(sc); if (cmd == POLL_AND_CHECK_STATUS) taskqueue_enqueue(sc->smc_tq, >smc_intr); +return (0); } #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324089 - head/sys/dev/neta
Author: n_hibma Date: Thu Sep 28 19:57:46 2017 New Revision: 324089 URL: https://svnweb.freebsd.org/changeset/base/324089 Log: Make this compile if NO_SYSCTL_DESCR is defined. Defining a variable with the description and then only use it in the SYSCTL declaration led to an unused variable warning. In the SYSCTL the passed value is discarded using __DESCR. Modified: head/sys/dev/neta/if_mvneta.c Modified: head/sys/dev/neta/if_mvneta.c == --- head/sys/dev/neta/if_mvneta.c Thu Sep 28 19:33:36 2017 (r324088) +++ head/sys/dev/neta/if_mvneta.c Thu Sep 28 19:57:46 2017 (r324089) @@ -3411,6 +3411,7 @@ sysctl_mvneta_init(struct mvneta_softc *sc) }; #undef MVNETA_SYSCTL_NAME +#ifndef NO_SYSCTL_DESCR #defineMVNETA_SYSCTL_DESCR(num) "configuration parameters for queue " # num static const char *sysctl_queue_descrs[] = { MVNETA_SYSCTL_DESCR(0), MVNETA_SYSCTL_DESCR(1), @@ -3419,6 +3420,7 @@ sysctl_mvneta_init(struct mvneta_softc *sc) MVNETA_SYSCTL_DESCR(6), MVNETA_SYSCTL_DESCR(7), }; #undef MVNETA_SYSCTL_DESCR +#endif ctx = device_get_sysctl_ctx(sc->dev); @@ -3442,15 +3444,14 @@ sysctl_mvneta_init(struct mvneta_softc *sc) */ /* dev.mvneta.[unit].mib. */ for (i = 0; i < MVNETA_PORTMIB_NOCOUNTER; i++) { - const char *name = mvneta_mib_list[i].sysctl_name; - const char *desc = mvneta_mib_list[i].desc; struct mvneta_sysctl_mib *mib_arg = >sysctl_mib[i]; mib_arg->sc = sc; mib_arg->index = i; - SYSCTL_ADD_PROC(ctx, mchildren, OID_AUTO, name, + SYSCTL_ADD_PROC(ctx, mchildren, OID_AUTO, + mvneta_mib_list[i].sysctl_name, CTLTYPE_U64|CTLFLAG_RD, (void *)mib_arg, 0, - sysctl_read_mib, "I", desc); + sysctl_read_mib, "I", mvneta_mib_list[i].desc); } SYSCTL_ADD_UQUAD(ctx, mchildren, OID_AUTO, "rx_discard", CTLFLAG_RD, >counter_pdfc, "Port Rx Discard Frame Counter"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324088 - head/sys/dev/smc
Author: n_hibma Date: Thu Sep 28 19:33:36 2017 New Revision: 324088 URL: https://svnweb.freebsd.org/changeset/base/324088 Log: Make this compile with DEVICE_POLLING set. smc_poll had the wrong prototype. It returns 0 as it does not check anything but submits a taskqueue. Reviewed by: benno MFC after:2 weeks Modified: head/sys/dev/smc/if_smc.c Modified: head/sys/dev/smc/if_smc.c == --- head/sys/dev/smc/if_smc.c Thu Sep 28 17:55:41 2017(r324087) +++ head/sys/dev/smc/if_smc.c Thu Sep 28 19:33:36 2017(r324088) @@ -782,7 +782,7 @@ smc_task_rx(void *context, int pending) } #ifdef DEVICE_POLLING -static void +static int smc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct smc_softc*sc; @@ -792,12 +792,13 @@ smc_poll(struct ifnet *ifp, enum poll_cmd cmd, int cou SMC_LOCK(sc); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { SMC_UNLOCK(sc); - return; + return (0); } SMC_UNLOCK(sc); if (cmd == POLL_AND_CHECK_STATUS) taskqueue_enqueue(sc->smc_tq, >smc_intr); +return (0); } #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324082 - head/usr.sbin/config
Author: n_hibma Date: Thu Sep 28 12:43:25 2017 New Revision: 324082 URL: https://svnweb.freebsd.org/changeset/base/324082 Log: Typo in filename in comment. Modified: head/usr.sbin/config/config.h Modified: head/usr.sbin/config/config.h == --- head/usr.sbin/config/config.h Thu Sep 28 11:26:37 2017 (r324081) +++ head/usr.sbin/config/config.h Thu Sep 28 12:43:25 2017 (r324082) @@ -152,7 +152,7 @@ struct includepath { SLIST_HEAD(, includepath) includepath; /* - * Tag present in the kernelconf.tmlp template file. It's mandatory for those + * Tag present in the kernconf.tmpl template file. It's mandatory for those * two strings to be the same. Otherwise you'll get into trouble. */ #defineKERNCONFTAG "%%KERNCONFFILE%%" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r323855 - head/tools/tools/nanobsd
Author: n_hibma Date: Thu Sep 21 10:13:48 2017 New Revision: 323855 URL: https://svnweb.freebsd.org/changeset/base/323855 Log: Remove an 'unused' function. This function was only set in legacy.sh and only at the very end after the disk image had been successfully created. The only difference will be that the message 'Error encountered. Please check...' will not appear if nanobsd.sh exits with an error after the disk image has been created. Modified: head/tools/tools/nanobsd/defaults.sh head/tools/tools/nanobsd/legacy.sh Modified: head/tools/tools/nanobsd/defaults.sh == --- head/tools/tools/nanobsd/defaults.shThu Sep 21 10:10:42 2017 (r323854) +++ head/tools/tools/nanobsd/defaults.shThu Sep 21 10:13:48 2017 (r323855) @@ -291,11 +291,6 @@ CR0 ( ) { chroot "${NANO_WORLDDIR}" /bin/sh -c "$*" || true } -nano_cleanup ( ) ( - [ $? -eq 0 ] || echo "Error encountered. Check for errors in last log file." 1>&2 - exit $? -) - clean_build ( ) ( pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" Modified: head/tools/tools/nanobsd/legacy.sh == --- head/tools/tools/nanobsd/legacy.sh Thu Sep 21 10:10:42 2017 (r323854) +++ head/tools/tools/nanobsd/legacy.sh Thu Sep 21 10:13:48 2017 (r323855) @@ -198,7 +198,6 @@ create_diskimage ( ) ( mdconfig -d -u $MD trap - 1 2 15 - trap nano_cleanup EXIT ) > ${NANO_LOG}/_.di 2>&1 ) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r323849 - head/tools/tools/nanobsd
Author: n_hibma Date: Thu Sep 21 09:27:44 2017 New Revision: 323849 URL: https://svnweb.freebsd.org/changeset/base/323849 Log: Fix up style for consistency. Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh == --- head/tools/tools/nanobsd/defaults.shThu Sep 21 09:22:41 2017 (r323848) +++ head/tools/tools/nanobsd/defaults.shThu Sep 21 09:27:44 2017 (r323849) @@ -256,7 +256,6 @@ rm ( ) { # are relative to NANO_WORLDDIR. # tgt_touch ( ) ( - cd "${NANO_WORLDDIR}" for i; do touch $i @@ -270,7 +269,7 @@ tgt_touch ( ) ( # directory is removed and a symlink is created. If we're doing # a nopriv build, then append this fact to the metalog # -tgt_dir2symlink () ( +tgt_dir2symlink ( ) ( dir=$1 symlink=$2 @@ -334,8 +333,6 @@ build_world ( ) ( ) build_kernel ( ) ( - local extra - pprint 2 "build kernel ($NANO_KERNEL)" pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" @@ -402,7 +399,6 @@ install_world ( ) ( ) install_etc ( ) ( - pprint 2 "install /etc" pprint 3 "log: ${NANO_LOG}/_.etc" @@ -418,8 +414,6 @@ install_etc ( ) ( ) install_kernel ( ) ( - local extra - pprint 2 "install kernel ($NANO_KERNEL)" pprint 3 "log: ${NANO_LOG}/_.ik" @@ -458,8 +452,7 @@ native_xtools ( ) ( # Run the requested set of early customization scripts, run before # buildworld. # -run_early_customize() { - +run_early_customize ( ) { pprint 2 "run early customize scripts" for c in $NANO_EARLY_CUSTOMIZE do @@ -492,7 +485,6 @@ run_customize ( ) ( # setup nanobsd, prune empty dirs from /usr, etc # run_late_customize ( ) ( - pprint 2 "run late customize scripts" for c in $NANO_LATE_CUSTOMIZE do @@ -511,7 +503,6 @@ run_late_customize ( ) ( # a user's cfg file would override this. # fixup_before_diskimage ( ) ( - # Run the deduplication script that takes the matalog journal and # combines multiple entries for the same file (see source for # details). We take the extra step of removing the size keywords. This @@ -599,7 +590,6 @@ setup_nanobsd_etc ( ) ( ) prune_usr ( ) ( - # Remove all empty directories in /usr find "${NANO_WORLDDIR}"/usr -type d -depth -print | while read d @@ -754,7 +744,6 @@ cust_install_files ( ) ( # Install packages from ${NANO_PACKAGE_DIR} cust_pkgng ( ) ( - mkdir -p ${NANO_WORLDDIR}/usr/local/etc local PKG_CONF="${NANO_WORLDDIR}/usr/local/etc/pkg.conf" local PKGCMD="env ASSUME_ALWAYS_YES=YES PKG_DBDIR=${NANO_PKG_META_BASE}/pkg SIGNATURE_TYPE=none /usr/sbin/pkg" @@ -820,7 +809,7 @@ cust_pkgng ( ) ( # Register all args as early customize function to run just before # build commences. -early_customize_cmd () { +early_customize_cmd ( ) { NANO_EARLY_CUSTOMIZE="$NANO_EARLY_CUSTOMIZE $*" } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r323848 - head/tools/tools/nanobsd/embedded
Author: n_hibma Date: Thu Sep 21 09:22:41 2017 New Revision: 323848 URL: https://svnweb.freebsd.org/changeset/base/323848 Log: Speling mistakes. Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common == --- head/tools/tools/nanobsd/embedded/commonThu Sep 21 09:18:05 2017 (r323847) +++ head/tools/tools/nanobsd/embedded/commonThu Sep 21 09:22:41 2017 (r323848) @@ -66,7 +66,7 @@ # o common tooling for creating images for odd-ball platforms # o support for boot loaders other than uboot in the image # or via special instructions -# o No pony support. Sadly, you cannot have a pony. +# o no pony support; sadly, you cannot have a pony # if [ -z $NANO_NAME ]; then @@ -281,7 +281,7 @@ create_diskimage_mbr ( ) ( out=${NANO_DISKIMGDIR}/_.disk.image.${NANO_NAME}${fmt} # below depends on https://reviews.freebsd.org/D4403 not yet in the tree # but there's problems: it marks all partitions as active, so you have to - # boot off parittion 3 or 2 by hand if you're playing around with this WIP + # boot off partition 3 or 2 by hand if you're playing around with this WIP case ${NANO_LAYOUT} in std-embedded) mkimg -a 3 ${skiparg} ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r323738 - stable/11/tools/tools/nanobsd/embedded
Author: n_hibma Date: Tue Sep 19 07:56:24 2017 New Revision: 323738 URL: https://svnweb.freebsd.org/changeset/base/323738 Log: MFC 323197: Bug fix: Don't treat NANO_IMAGES as a directory. This was accidentally broken in r295377 . Submitted by: Igor Serikov Modified: stable/11/tools/tools/nanobsd/embedded/common Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/nanobsd/embedded/common == --- stable/11/tools/tools/nanobsd/embedded/common Tue Sep 19 07:39:39 2017(r323737) +++ stable/11/tools/tools/nanobsd/embedded/common Tue Sep 19 07:56:24 2017(r323738) @@ -106,8 +106,6 @@ mkdir -p ${NANO_OBJ} NANO_OBJ=$(realpath ${NANO_OBJ}) mkdir -p ${NANO_LOG} NANO_LOG=$(realpath ${NANO_LOG}) -mkdir -p ${NANO_IMAGES} -NANO_IMAGES=$(realpath ${NANO_IMAGES}) mkdir -p ${NANO_WORLDDIR} NANO_WORLDDIR=$(realpath ${NANO_WORLDDIR}) mkdir -p ${NANO_DISKIMGDIR} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r323197 - head/tools/tools/nanobsd/embedded
Author: n_hibma Date: Tue Sep 5 21:17:20 2017 New Revision: 323197 URL: https://svnweb.freebsd.org/changeset/base/323197 Log: Bugfix: Don't treat NANO_IMAGES as a direcotory. This was probably accidentally broken in r295377 . Submitted by: Igor Serikov MFC after:2 weeks Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common == --- head/tools/tools/nanobsd/embedded/commonTue Sep 5 21:00:33 2017 (r323196) +++ head/tools/tools/nanobsd/embedded/commonTue Sep 5 21:17:20 2017 (r323197) @@ -106,8 +106,6 @@ mkdir -p ${NANO_OBJ} NANO_OBJ=$(realpath ${NANO_OBJ}) mkdir -p ${NANO_LOG} NANO_LOG=$(realpath ${NANO_LOG}) -mkdir -p ${NANO_IMAGES} -NANO_IMAGES=$(realpath ${NANO_IMAGES}) mkdir -p ${NANO_WORLDDIR} NANO_WORLDDIR=$(realpath ${NANO_WORLDDIR}) mkdir -p ${NANO_DISKIMGDIR} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r321769 - head/usr.bin/calendar/calendars
Author: n_hibma Date: Mon Jul 31 08:16:12 2017 New Revision: 321769 URL: https://svnweb.freebsd.org/changeset/base/321769 Log: Add my birthday entry to the calendar file. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdMon Jul 31 08:11:58 2017(r321768) +++ head/usr.bin/calendar/calendars/calendar.freebsdMon Jul 31 08:16:12 2017(r321769) @@ -34,6 +34,7 @@ 01/23 Hideyuki KURASHINA <rush...@freebsd.org> born in Niigata, Japan, 1982 01/24 Fabien Thomas <fabi...@freebsd.org> born in Avignon, France, 1971 01/24 Matteo Riondato <mat...@freebsd.org> born in Padova, Italy, 1986 +01/25 Nick Hibma <n_hi...@freebsd.org> born in Groningen, the Netherlands, 1972 01/25 Bernd Walter <ti...@freebsd.org> born in Moers, Nordrhein-Westfalen, Germany, 1974 01/26 Andrew Gallatin <galla...@freebsd.org> born in Buffalo, New York, United States, 1970 01/27 Nick Sayer <nsa...@freebsd.org> born in San Diego, California, United States, 1968 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r318965 - stable/11/etc/rc.d
Author: n_hibma Date: Fri May 26 19:19:47 2017 New Revision: 318965 URL: https://svnweb.freebsd.org/changeset/base/318965 Log: MFC 317729: Silence sysctl in startup scripts. This makes 'stop' behave consistently with 'start' in the script. Also use $SYSCTL instead of sysctl for consistency within that script. Modified: stable/11/etc/rc.d/ipfw stable/11/etc/rc.d/routing Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.d/ipfw == --- stable/11/etc/rc.d/ipfw Fri May 26 19:11:24 2017(r318964) +++ stable/11/etc/rc.d/ipfw Fri May 26 19:19:47 2017(r318965) @@ -56,7 +56,7 @@ ipfw_start() # if checkyesno firewall_logging; then echo 'Firewall logging enabled.' - sysctl net.inet.ip.fw.verbose=1 >/dev/null + ${SYSCTL} net.inet.ip.fw.verbose=1 >/dev/null fi if checkyesno firewall_logif; then ifconfig ipfw0 create @@ -78,11 +78,11 @@ ipfw_poststart() # Enable the firewall # - if ! ${SYSCTL} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then + if ! ${SYSCTL} net.inet.ip.fw.enable=1 >/dev/null 2>&1; then warn "failed to enable IPv4 firewall" fi if afexists inet6; then - if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 + if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 >/dev/null 2>&1 then warn "failed to enable IPv6 firewall" fi @@ -95,9 +95,9 @@ ipfw_stop() # Disable the firewall # - ${SYSCTL} net.inet.ip.fw.enable=0 + ${SYSCTL} net.inet.ip.fw.enable=0 >/dev/null if afexists inet6; then - ${SYSCTL} net.inet6.ip6.fw.enable=0 + ${SYSCTL} net.inet6.ip6.fw.enable=0 >/dev/null fi # Stop firewall coscripts Modified: stable/11/etc/rc.d/routing == --- stable/11/etc/rc.d/routing Fri May 26 19:11:24 2017(r318964) +++ stable/11/etc/rc.d/routing Fri May 26 19:19:47 2017(r318965) @@ -286,7 +286,7 @@ static_inet6() esac ifconfig ${ipv6_default_interface} inet6 defaultif - sysctl net.inet6.ip6.use_defaultzone=1 + ${SYSCTL} net.inet6.ip6.use_defaultzone=1 > /dev/null } static_atm() ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r318735 - stable/11
Author: n_hibma Date: Tue May 23 09:20:31 2017 New Revision: 318735 URL: https://svnweb.freebsd.org/changeset/base/318735 Log: Commit the mergeinfo for the commit to sbin/dhclient. Modified: Directory Properties: stable/11/ (props changed) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r318630 - stable/11/sbin/dhclient
Author: n_hibma Date: Mon May 22 10:28:17 2017 New Revision: 318630 URL: https://svnweb.freebsd.org/changeset/base/318630 Log: MFC: r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines Fix the output of very large rebind, renew and lease time options in lease file. Some routers set very large values for rebind time (Netgear) and these are erroneously reported as negative in the leasefile. This was due to a wrong printf format specification of %ld for an unsigned long on 32-bit platforms. r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines Fix handling of large DHCP expiry values. They would overflow a signed 32-bit time_t on 32 bit architectures. This was taken care of, but a compiler optimisation makes this behave erratically. This could be resolved by adding a -fwrapv flag, but instead we can check the value before adding the current timestamp to it. In the lease file values are still wrong though: option dhcp-rebinding-time -644245096; PR: 218980 Modified: stable/11/sbin/dhclient/dhclient.c stable/11/sbin/dhclient/options.c Modified: stable/11/sbin/dhclient/dhclient.c == --- stable/11/sbin/dhclient/dhclient.c Mon May 22 08:20:50 2017 (r318629) +++ stable/11/sbin/dhclient/dhclient.c Mon May 22 10:28:17 2017 (r318630) @@ -107,7 +107,11 @@ struct pidfh *pidfile; */ #define ASSERT_STATE(state_is, state_shouldbe) {} -#define TIME_MAX 2147483647 +/* + * We need to check that the expiry, renewal and rebind times are not beyond + * the end of time (~2038 when a 32-bit time_t is being used). + */ +#define TIME_MAXtime_t) 1 << (sizeof(time_t) * CHAR_BIT - 2)) - 1) * 2 + 1) intlog_priority; intno_daemon; @@ -762,15 +766,17 @@ dhcpack(struct packet *packet) else ip->client->new->expiry = default_lease_time; /* A number that looks negative here is really just very large, - because the lease expiry offset is unsigned. */ - if (ip->client->new->expiry < 0) - ip->client->new->expiry = TIME_MAX; + because the lease expiry offset is unsigned. Also make sure that + the addition of cur_time below does not overflow (a 32 bit) time_t. */ + if (ip->client->new->expiry < 0 || +ip->client->new->expiry > TIME_MAX - cur_time) + ip->client->new->expiry = TIME_MAX - cur_time; /* XXX should be fixed by resetting the client state */ if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; /* Unless overridden in the config, take the server-provided renewal - * time if there is one; otherwise figure it out according to the spec. + * time if there is one. Otherwise figure it out according to the spec. * Also make sure the renewal time does not exceed the expiry time. */ if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == @@ -782,7 +788,8 @@ dhcpack(struct packet *packet) ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; -if (ip->client->new->renewal > ip->client->new->expiry / 2) +if (ip->client->new->renewal < 0 || +ip->client->new->renewal > ip->client->new->expiry / 2) ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ @@ -794,20 +801,15 @@ dhcpack(struct packet *packet) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; -if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) -ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - - ip->client->new->expiry += cur_time; - /* Lease lengths can never be negative. */ - if (ip->client->new->expiry < cur_time) - ip->client->new->expiry = TIME_MAX; - ip->client->new->renewal += cur_time; - if (ip->client->new->renewal < cur_time) - ip->client->new->renewal = TIME_MAX; - ip->client->new->rebind += cur_time; - if (ip->client->new->rebind < cur_time) - ip->client->new->rebind = TIME_MAX; + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + if (ip->client->new->rebind < 0 || +ip->client->new->rebind >
svn commit: r317923 - head/sbin/dhclient
Author: n_hibma Date: Sun May 7 21:11:28 2017 New Revision: 317923 URL: https://svnweb.freebsd.org/changeset/base/317923 Log: Fix the output of very large rebind, renew and lease time options in lease file. Some routers set very large values for rebind time (Netgear) and these are erroneously reported as negative in the leasefile. This was due to a wrong printf format specification of %ld for an unsigned long on 32-bit platforms. Modified: head/sbin/dhclient/options.c Modified: head/sbin/dhclient/options.c == --- head/sbin/dhclient/options.cSun May 7 21:06:23 2017 (r317922) +++ head/sbin/dhclient/options.cSun May 7 21:11:28 2017 (r317923) @@ -783,7 +783,7 @@ pretty_print_option(unsigned int code, u dp += 4; break; case 'L': - opcount = snprintf(op, opleft, "%ld", + opcount = snprintf(op, opleft, "%lu", (unsigned long)getULong(dp)); if (opcount >= opleft || opcount == -1) goto toobig; @@ -799,7 +799,7 @@ pretty_print_option(unsigned int code, u dp += 2; break; case 'S': - opcount = snprintf(op, opleft, "%d", + opcount = snprintf(op, opleft, "%u", getUShort(dp)); if (opcount >= opleft || opcount == -1) goto toobig; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317915 - head/sbin/dhclient
Author: n_hibma Date: Sun May 7 19:59:37 2017 New Revision: 317915 URL: https://svnweb.freebsd.org/changeset/base/317915 Log: Fix handling of large DHCP expiry values. They would overflow a signed 32-bit time_t on 32 bit architectures. This was taken care of, but a compiler optimisation makes this behave erratically. This could be resolved by adding a -fwrapv flag, but instead we can check the value before adding the current timestamp to it. In the lease file values are still wrong though: option dhcp-rebinding-time -644245096; PR: 218980 Reported by: Bob Eager MFC after:2 weeks Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Sun May 7 19:57:45 2017 (r317914) +++ head/sbin/dhclient/dhclient.c Sun May 7 19:59:37 2017 (r317915) @@ -108,7 +108,11 @@ struct pidfh *pidfile; */ #define ASSERT_STATE(state_is, state_shouldbe) {} -#define TIME_MAX 2147483647 +/* + * We need to check that the expiry, renewal and rebind times are not beyond + * the end of time (~2038 when a 32-bit time_t is being used). + */ +#define TIME_MAXtime_t) 1 << (sizeof(time_t) * CHAR_BIT - 2)) - 1) * 2 + 1) intlog_priority; intno_daemon; @@ -766,15 +770,17 @@ dhcpack(struct packet *packet) else ip->client->new->expiry = default_lease_time; /* A number that looks negative here is really just very large, - because the lease expiry offset is unsigned. */ - if (ip->client->new->expiry < 0) - ip->client->new->expiry = TIME_MAX; + because the lease expiry offset is unsigned. Also make sure that + the addition of cur_time below does not overflow (a 32 bit) time_t. */ + if (ip->client->new->expiry < 0 || +ip->client->new->expiry > TIME_MAX - cur_time) + ip->client->new->expiry = TIME_MAX - cur_time; /* XXX should be fixed by resetting the client state */ if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; /* Unless overridden in the config, take the server-provided renewal - * time if there is one; otherwise figure it out according to the spec. + * time if there is one. Otherwise figure it out according to the spec. * Also make sure the renewal time does not exceed the expiry time. */ if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == @@ -786,7 +792,8 @@ dhcpack(struct packet *packet) ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; -if (ip->client->new->renewal > ip->client->new->expiry / 2) +if (ip->client->new->renewal < 0 || +ip->client->new->renewal > ip->client->new->expiry / 2) ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ @@ -798,20 +805,15 @@ dhcpack(struct packet *packet) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; -if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) -ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - - ip->client->new->expiry += cur_time; - /* Lease lengths can never be negative. */ - if (ip->client->new->expiry < cur_time) - ip->client->new->expiry = TIME_MAX; - ip->client->new->renewal += cur_time; - if (ip->client->new->renewal < cur_time) - ip->client->new->renewal = TIME_MAX; - ip->client->new->rebind += cur_time; - if (ip->client->new->rebind < cur_time) - ip->client->new->rebind = TIME_MAX; + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + if (ip->client->new->rebind < 0 || +ip->client->new->rebind > ip->client->new->renewal / 4 * 7) +ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + +/* Convert the time offsets into seconds-since-the-epoch */ +ip->client->new->expiry += cur_time; +ip->client->new->renewal += cur_time; +ip->client->new->rebind += cur_time; bind_lease(ip); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317729 - head/etc/rc.d
Author: n_hibma Date: Wed May 3 08:10:03 2017 New Revision: 317729 URL: https://svnweb.freebsd.org/changeset/base/317729 Log: Silence sysctl in startup scripts. This makes 'stop' behave consistently with 'start' in the script. Also use $SYSCTL instead of sysctl for consistency within that script. MFC after:3 weeks Modified: head/etc/rc.d/ipfw head/etc/rc.d/routing Modified: head/etc/rc.d/ipfw == --- head/etc/rc.d/ipfw Wed May 3 07:53:15 2017(r317728) +++ head/etc/rc.d/ipfw Wed May 3 08:10:03 2017(r317729) @@ -56,7 +56,7 @@ ipfw_start() # if checkyesno firewall_logging; then echo 'Firewall logging enabled.' - sysctl net.inet.ip.fw.verbose=1 >/dev/null + ${SYSCTL} net.inet.ip.fw.verbose=1 >/dev/null fi if checkyesno firewall_logif; then ifconfig ipfw0 create @@ -78,11 +78,11 @@ ipfw_poststart() # Enable the firewall # - if ! ${SYSCTL} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then + if ! ${SYSCTL} net.inet.ip.fw.enable=1 >/dev/null 2>&1; then warn "failed to enable IPv4 firewall" fi if afexists inet6; then - if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 + if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 >/dev/null 2>&1 then warn "failed to enable IPv6 firewall" fi @@ -95,9 +95,9 @@ ipfw_stop() # Disable the firewall # - ${SYSCTL} net.inet.ip.fw.enable=0 + ${SYSCTL} net.inet.ip.fw.enable=0 >/dev/null if afexists inet6; then - ${SYSCTL} net.inet6.ip6.fw.enable=0 + ${SYSCTL} net.inet6.ip6.fw.enable=0 >/dev/null fi # Stop firewall coscripts Modified: head/etc/rc.d/routing == --- head/etc/rc.d/routing Wed May 3 07:53:15 2017(r317728) +++ head/etc/rc.d/routing Wed May 3 08:10:03 2017(r317729) @@ -281,7 +281,7 @@ static_inet6() esac ifconfig ${ipv6_default_interface} inet6 defaultif - sysctl net.inet6.ip6.use_defaultzone=1 + ${SYSCTL} net.inet6.ip6.use_defaultzone=1 > /dev/null } ropts_init() ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317136 - head/tools/tools/nanobsd/embedded
Author: n_hibma Date: Wed Apr 19 12:39:45 2017 New Revision: 317136 URL: https://svnweb.freebsd.org/changeset/base/317136 Log: A test was moved but without the definition of $d. The test however always succeeds because 'test -d' always returns true. Also some speling fixes. Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common == --- head/tools/tools/nanobsd/embedded/commonWed Apr 19 11:38:07 2017 (r317135) +++ head/tools/tools/nanobsd/embedded/commonWed Apr 19 12:39:45 2017 (r317136) @@ -65,7 +65,7 @@ # Long Term # o common tooling for creating images for odd-ball platforms # o support for boot loaders other than uboot in the image -# or via special insturctions +# or via special instructions # o No pony support. Sadly, you cannot have a pony. # @@ -343,8 +343,8 @@ die( ) { # Automatically include the packaging port here so it is always first so it # builds the port and adds the package so we can add other packages. #XXX Doesn't work for cross build, so punting until I can integreate qemu-static -#XXX or poudere, both of which require priv'd execution. Or qemu-system, which -#XXX is super, super slow. +#XXX or poudriere, both of which require priv'd execution. Or qemu-system, +#XXX which is super, super slow. #add_port ports-mgmt/pkg #add_port security/sudo #add_port ftp/curl @@ -480,6 +480,7 @@ dos_boot_part ( ) ( ) if [ -n "$NANO_BOOT_PKG" ]; then + local d=/usr/local/share/u-boot/${NANO_BOOT_PKG} if [ ! -d ${d} ]; then echo ${NANO_BOOT_PKG} not installed. Sadly, it must be. exit 1 @@ -492,7 +493,7 @@ if [ -n "$NANO_BOOT_PKG" ]; then fi product_custom ( ) ( - # not quie ready to tweak these in nopriv build + # not quite ready to tweak these in nopriv build if [ -z ${NANO_NOPRIV_BUILD} ]; then # Last second tweaks -- generally not needed chown -R root:wheel ${NANO_WORLDDIR}/root ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r316604 - stable/11/sbin/dhclient
Author: n_hibma Date: Fri Apr 7 09:13:26 2017 New Revision: 316604 URL: https://svnweb.freebsd.org/changeset/base/316604 Log: MFC 316283: Allow superseding the lease renewal and rebind times. Also make sure that the renewal is never more than 1/2 * expiry and rebind never more than 7/4 * renewal (the default values in the spec). This should allow adjusting high values from the server as well as making sure the values from the server make sense. Renewal and rebind times will be adjusted down if the expiry time is set very high in a server, not the other way around. This change just makes sure the values keep making sense. and 316285: Make dhcp-lease-time option supersedable as well. Note: It is not recommended to set this value to above the value that the server provided, unless that value is bogus. Modified: stable/11/sbin/dhclient/dhclient.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/dhclient/dhclient.c == --- stable/11/sbin/dhclient/dhclient.c Fri Apr 7 07:46:21 2017 (r316603) +++ stable/11/sbin/dhclient/dhclient.c Fri Apr 7 09:13:26 2017 (r316604) @@ -752,7 +752,11 @@ dhcpack(struct packet *packet) cancel_timeout(send_request, ip); /* Figure out the lease time. */ - if (ip->client->new->options[DHO_DHCP_LEASE_TIME].data) +if (ip->client->config->default_actions[DHO_DHCP_LEASE_TIME] == +ACTION_SUPERSEDE) + ip->client->new->expiry = getULong( + ip->client->config->defaults[DHO_DHCP_LEASE_TIME].data); +else if (ip->client->new->options[DHO_DHCP_LEASE_TIME].data) ip->client->new->expiry = getULong( ip->client->new->options[DHO_DHCP_LEASE_TIME].data); else @@ -765,21 +769,34 @@ dhcpack(struct packet *packet) if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; - /* Take the server-provided renewal time if there is one; - otherwise figure it out according to the spec. */ - if (ip->client->new->options[DHO_DHCP_RENEWAL_TIME].len) +/* Unless overridden in the config, take the server-provided renewal + * time if there is one; otherwise figure it out according to the spec. + * Also make sure the renewal time does not exceed the expiry time. + */ +if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == +ACTION_SUPERSEDE) + ip->client->new->renewal = getULong( + ip->client->config->defaults[DHO_DHCP_RENEWAL_TIME].data); +else if (ip->client->new->options[DHO_DHCP_RENEWAL_TIME].len) ip->client->new->renewal = getULong( ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; +if (ip->client->new->renewal > ip->client->new->expiry / 2) +ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ - if (ip->client->new->options[DHO_DHCP_REBINDING_TIME].len) +if (ip->client->config->default_actions[DHO_DHCP_REBINDING_TIME] == +ACTION_SUPERSEDE) + ip->client->new->rebind = getULong( + ip->client->config->defaults[DHO_DHCP_REBINDING_TIME].data); +else if (ip->client->new->options[DHO_DHCP_REBINDING_TIME].len) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal + - ip->client->new->renewal / 2 + ip->client->new->renewal / 4; + ip->client->new->rebind = ip->client->new->renewal * 7 / 4; +if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) +ip->client->new->rebind = ip->client->new->renewal * 7 / 4; ip->client->new->expiry += cur_time; /* Lease lengths can never be negative. */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r316451 - stable/11/sys/conf
Author: n_hibma Date: Mon Apr 3 10:28:18 2017 New Revision: 316451 URL: https://svnweb.freebsd.org/changeset/base/316451 Log: MFC 316275: Add nctgpio conf lines so it can be compiled into the kernel. Modified: stable/11/sys/conf/files.amd64 stable/11/sys/conf/files.i386 Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files.amd64 == --- stable/11/sys/conf/files.amd64 Mon Apr 3 10:15:58 2017 (r316450) +++ stable/11/sys/conf/files.amd64 Mon Apr 3 10:28:18 2017 (r316451) @@ -314,6 +314,7 @@ dev/hyperv/vmbus/vmbus_if.m optional dev/hyperv/vmbus/vmbus_xact.c optionalhyperv dev/hyperv/vmbus/amd64/hyperv_machdep.coptional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optionalhyperv +dev/nctgpio/nctgpio.c optionalnctgpio dev/nfe/if_nfe.c optionalnfe pci dev/ntb/if_ntb/if_ntb.coptionalif_ntb dev/ntb/ntb_transport.coptionalif_ntb Modified: stable/11/sys/conf/files.i386 == --- stable/11/sys/conf/files.i386 Mon Apr 3 10:15:58 2017 (r316450) +++ stable/11/sys/conf/files.i386 Mon Apr 3 10:28:18 2017 (r316451) @@ -290,6 +290,7 @@ dev/ipmi/ipmi_linux.c optional ipmi com dev/le/if_le_isa.c optional le isa dev/mse/mse.c optional mse dev/mse/mse_isa.c optional mse isa +dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.coptional if_ntb dev/ntb/ntb_transport.coptional if_ntb ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r316285 - head/sbin/dhclient
Author: n_hibma Date: Thu Mar 30 18:20:04 2017 New Revision: 316285 URL: https://svnweb.freebsd.org/changeset/base/316285 Log: Make dhcp-lease-time option supersedable as well. Note: It is not recommended to set this value to above the value that the server provided, unless that value is bogus. Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Thu Mar 30 17:37:12 2017 (r316284) +++ head/sbin/dhclient/dhclient.c Thu Mar 30 18:20:04 2017 (r316285) @@ -756,7 +756,11 @@ dhcpack(struct packet *packet) cancel_timeout(send_request, ip); /* Figure out the lease time. */ - if (ip->client->new->options[DHO_DHCP_LEASE_TIME].data) +if (ip->client->config->default_actions[DHO_DHCP_LEASE_TIME] == +ACTION_SUPERSEDE) + ip->client->new->expiry = getULong( + ip->client->config->defaults[DHO_DHCP_LEASE_TIME].data); +else if (ip->client->new->options[DHO_DHCP_LEASE_TIME].data) ip->client->new->expiry = getULong( ip->client->new->options[DHO_DHCP_LEASE_TIME].data); else ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r316283 - head/sbin/dhclient
Author: n_hibma Date: Thu Mar 30 17:31:12 2017 New Revision: 316283 URL: https://svnweb.freebsd.org/changeset/base/316283 Log: Allow superseding the lease renewal and rebind times. Also make sure that the renewal is never more than 1/2 * expiry and rebind never more than 7/4 * renewal (the default values in the spec). This should allow adjusting high values from the server as well as making sure the values from the server make sense. Renewal and rebind times will be adjusted down if the expiry time is set very high in a server, not the other way around. This change just makes sure the values keep making sense. Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Thu Mar 30 17:23:40 2017 (r316282) +++ head/sbin/dhclient/dhclient.c Thu Mar 30 17:31:12 2017 (r316283) @@ -769,21 +769,34 @@ dhcpack(struct packet *packet) if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; - /* Take the server-provided renewal time if there is one; - otherwise figure it out according to the spec. */ - if (ip->client->new->options[DHO_DHCP_RENEWAL_TIME].len) +/* Unless overridden in the config, take the server-provided renewal + * time if there is one; otherwise figure it out according to the spec. + * Also make sure the renewal time does not exceed the expiry time. + */ +if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == +ACTION_SUPERSEDE) + ip->client->new->renewal = getULong( + ip->client->config->defaults[DHO_DHCP_RENEWAL_TIME].data); +else if (ip->client->new->options[DHO_DHCP_RENEWAL_TIME].len) ip->client->new->renewal = getULong( ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; +if (ip->client->new->renewal > ip->client->new->expiry / 2) +ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ - if (ip->client->new->options[DHO_DHCP_REBINDING_TIME].len) +if (ip->client->config->default_actions[DHO_DHCP_REBINDING_TIME] == +ACTION_SUPERSEDE) + ip->client->new->rebind = getULong( + ip->client->config->defaults[DHO_DHCP_REBINDING_TIME].data); +else if (ip->client->new->options[DHO_DHCP_REBINDING_TIME].len) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal + - ip->client->new->renewal / 2 + ip->client->new->renewal / 4; + ip->client->new->rebind = ip->client->new->renewal * 7 / 4; +if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) +ip->client->new->rebind = ip->client->new->renewal * 7 / 4; ip->client->new->expiry += cur_time; /* Lease lengths can never be negative. */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r316275 - head/sys/conf
Author: n_hibma Date: Thu Mar 30 15:05:10 2017 New Revision: 316275 URL: https://svnweb.freebsd.org/changeset/base/316275 Log: Add nctgpio conf lines so it can be compiled into the kernel. MFC after:2 days Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Thu Mar 30 14:20:27 2017(r316274) +++ head/sys/conf/files.amd64 Thu Mar 30 15:05:10 2017(r316275) @@ -324,6 +324,7 @@ dev/hyperv/vmbus/vmbus_if.m optional dev/hyperv/vmbus/vmbus_xact.c optionalhyperv dev/hyperv/vmbus/amd64/hyperv_machdep.coptional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optionalhyperv +dev/nctgpio/nctgpio.c optionalnctgpio dev/nfe/if_nfe.c optionalnfe pci dev/ntb/if_ntb/if_ntb.coptionalif_ntb dev/ntb/ntb_transport.coptionalif_ntb Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Thu Mar 30 14:20:27 2017(r316274) +++ head/sys/conf/files.i386Thu Mar 30 15:05:10 2017(r316275) @@ -267,6 +267,7 @@ dev/ipmi/ipmi_linux.c optional ipmi com dev/le/if_le_isa.c optional le isa dev/mse/mse.c optional mse dev/mse/mse_isa.c optional mse isa +dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.coptional if_ntb dev/ntb/ntb_transport.coptional if_ntb ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r309410 - head/share/man/man4
Author: n_hibma Date: Fri Dec 2 11:32:11 2016 New Revision: 309410 URL: https://svnweb.freebsd.org/changeset/base/309410 Log: Fix man page: - It should say 'read' in the I2CREAD section. - last in the struct indicates the last command in a sequence, not the reverse. Reviewed by: imp MFC after:3 days Modified: head/share/man/man4/iic.4 Modified: head/share/man/man4/iic.4 == --- head/share/man/man4/iic.4 Fri Dec 2 11:30:21 2016(r309409) +++ head/share/man/man4/iic.4 Fri Dec 2 11:32:11 2016(r309410) @@ -104,7 +104,8 @@ element is the number of bytes to write. The .Va last element is a boolean flag. -It is non-zero when additional write commands will follow. +It must be zero when additional read commands will follow, or non-zero if this +is the last command. The .Va buf element is a pointer to the data to write to the bus. @@ -120,11 +121,12 @@ The element is ignored. The .Va count -element is the number of bytes to write. +element is the number of bytes to read. The .Va last element is a boolean flag. -It is non-zero when additional write commands will follow. +It must be zero when additional read commands will follow, or non-zero if this +is the last command. The .Va buf element is a pointer to where to store the data read from the bus. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r309409 - head/usr.sbin/i2c
Author: n_hibma Date: Fri Dec 2 11:30:21 2016 New Revision: 309409 URL: https://svnweb.freebsd.org/changeset/base/309409 Log: More typos in strings. Submitted by: bde MFC after:3 days Modified: head/usr.sbin/i2c/i2c.c Modified: head/usr.sbin/i2c/i2c.c == --- head/usr.sbin/i2c/i2c.c Fri Dec 2 10:47:10 2016(r309408) +++ head/usr.sbin/i2c/i2c.c Fri Dec 2 11:30:21 2016(r309409) @@ -413,7 +413,7 @@ err1: cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, ); if (error == -1) - fprintf(stderr, "error sending stop condtion\n"); + fprintf(stderr, "error sending stop condition\n"); err2: if (err_msg) fprintf(stderr, "%s\n", err_msg); @@ -466,7 +466,7 @@ i2c_read(char *dev, struct options i2c_o cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, ); if (error == -1) { - err_msg = "error sending stop condtion"; + err_msg = "error sending stop condition"; goto err2; } } @@ -491,7 +491,7 @@ i2c_read(char *dev, struct options i2c_o } error = ioctl(fd, I2CSTOP, ); if (error == -1) { - err_msg = "error sending stop condtion"; + err_msg = "error sending stop condition"; goto err2; } @@ -510,7 +510,7 @@ err1: cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, ); if (error == -1) - fprintf(stderr, "error sending stop condtion\n"); + fprintf(stderr, "error sending stop condition\n"); err2: if (err_msg) fprintf(stderr, "%s\n", err_msg); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r309357 - head/usr.sbin/i2c
Author: n_hibma Date: Thu Dec 1 09:14:58 2016 New Revision: 309357 URL: https://svnweb.freebsd.org/changeset/base/309357 Log: Speling fixes and fix line endings for err_msg output. In some cases there was not \n, in other cases there was. Modified: head/usr.sbin/i2c/i2c.c Modified: head/usr.sbin/i2c/i2c.c == --- head/usr.sbin/i2c/i2c.c Thu Dec 1 07:50:44 2016(r309356) +++ head/usr.sbin/i2c/i2c.c Thu Dec 1 09:14:58 2016(r309357) @@ -310,7 +310,7 @@ i2c_write(char *dev, struct options i2c_ error = ioctl(fd, I2CWRITE, ); free(buf); if (error == -1) { - err_msg = "ioctl: error when write offset"; + err_msg = "ioctl: error writing offset"; goto err1; } } @@ -335,7 +335,7 @@ i2c_write(char *dev, struct options i2c_ cmd.last = 0; error = ioctl(fd, I2CWRITE, ); if (error == -1) { - err_msg = "ioctl: error when write"; + err_msg = "ioctl: error writing"; goto err1; } break; @@ -350,7 +350,7 @@ i2c_write(char *dev, struct options i2c_ error = ioctl(fd, I2CWRITE, ); free(buf); if (error == -1) { - err_msg = "ioctl: error when write offset"; + err_msg = "ioctl: error writing offset"; goto err1; } } @@ -371,7 +371,7 @@ i2c_write(char *dev, struct options i2c_ cmd.last = 0; error = ioctl(fd, I2CWRITE, ); if (error == -1) { - err_msg = "ioctl: error when write"; + err_msg = "ioctl: error writing"; goto err1; } break; @@ -394,7 +394,7 @@ i2c_write(char *dev, struct options i2c_ error = ioctl(fd, I2CWRITE, ); free(buf); if (error == -1) { - err_msg = "ioctl: error when write"; + err_msg = "ioctl: error writing"; goto err1; } break; @@ -416,7 +416,7 @@ err1: fprintf(stderr, "error sending stop condtion\n"); err2: if (err_msg) - fprintf(stderr, "%s", err_msg); + fprintf(stderr, "%s\n", err_msg); close(fd); return (1); @@ -458,7 +458,7 @@ i2c_read(char *dev, struct options i2c_o error = ioctl(fd, I2CWRITE, ); free(buf); if (error == -1) { - err_msg = "ioctl: error when write offset"; + err_msg = "ioctl: error writing offset"; goto err1; } @@ -466,7 +466,7 @@ i2c_read(char *dev, struct options i2c_o cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, ); if (error == -1) { - err_msg = "error sending stop condtion\n"; + err_msg = "error sending stop condtion"; goto err2; } } @@ -491,7 +491,7 @@ i2c_read(char *dev, struct options i2c_o } error = ioctl(fd, I2CSTOP, ); if (error == -1) { - err_msg = "error sending stop condtion\n"; + err_msg = "error sending stop condtion"; goto err2; } @@ -513,7 +513,7 @@ err1: fprintf(stderr, "error sending stop condtion\n"); err2: if (err_msg) - fprintf(stderr, "%s", err_msg); + fprintf(stderr, "%s\n", err_msg); close(fd); return (1); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301129 - stable/10/sys/net
Author: n_hibma Date: Wed Jun 1 15:08:27 2016 New Revision: 301129 URL: https://svnweb.freebsd.org/changeset/base/301129 Log: MFC 300670 (slightly adapted for 10-STABLE): Change net.link.log_promisc_mode_change to a read-only tunable. PR: 166255 Submitted by: eugen.grosbein.net Obtained from:hselasky Modified: stable/10/sys/net/if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if.c == --- stable/10/sys/net/if.c Wed Jun 1 14:57:53 2016(r301128) +++ stable/10/sys/net/if.c Wed Jun 1 15:08:27 2016(r301129) @@ -116,7 +116,8 @@ SYSCTL_INT(_net_link, OID_AUTO, log_link /* Log promiscuous mode change events */ static int log_promisc_mode_change = 1; -SYSCTL_INT(_net_link, OID_AUTO, log_promisc_mode_change, CTLFLAG_RW, +TUNABLE_INT("net.link.log_promisc_mode_change", _promisc_mode_change); +SYSCTL_INT(_net_link, OID_AUTO, log_promisc_mode_change, CTLFLAG_RDTUN, _promisc_mode_change, 1, "log promiscuous mode change events"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301078 - stable/10
Author: n_hibma Date: Tue May 31 21:21:32 2016 New Revision: 301078 URL: https://svnweb.freebsd.org/changeset/base/301078 Log: Fixup botched merge in rev. r300488. This commit only updates mergeinfo, not sys/net/if.c. Modified: Directory Properties: stable/10/ (props changed) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r300670 - head/sys/net
Author: n_hibma Date: Wed May 25 09:00:05 2016 New Revision: 300670 URL: https://svnweb.freebsd.org/changeset/base/300670 Log: Change net.link.log_promisc_mode_change to a read-only tunable PR: 166255 Submitted by: eugen.grosbein.net Obtained from:hselasky MFC after:3 days Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Wed May 25 08:45:03 2016(r300669) +++ head/sys/net/if.c Wed May 25 09:00:05 2016(r300670) @@ -115,7 +115,7 @@ SYSCTL_INT(_net_link, OID_AUTO, log_link /* Log promiscuous mode change events */ static int log_promisc_mode_change = 1; -SYSCTL_INT(_net_link, OID_AUTO, log_promisc_mode_change, CTLFLAG_RW, +SYSCTL_INT(_net_link, OID_AUTO, log_promisc_mode_change, CTLFLAG_RDTUN, _promisc_mode_change, 1, "log promiscuous mode change events"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r300488 - stable/10/sys/net
Author: n_hibma Date: Mon May 23 09:44:06 2016 New Revision: 300488 URL: https://svnweb.freebsd.org/changeset/base/300488 Log: MFC 299559: Allow silencing of 'promiscuous mode enabled/disabled' messages. Modified: stable/10/sys/net/if.c Modified: stable/10/sys/net/if.c == --- stable/10/sys/net/if.c Mon May 23 07:32:34 2016(r300487) +++ stable/10/sys/net/if.c Mon May 23 09:44:06 2016(r300488) @@ -113,6 +113,13 @@ SYSCTL_INT(_net_link, OID_AUTO, log_link _link_state_change, 0, "log interface link state change events"); +/* Log promiscuous mode change events */ +static int log_promisc_mode_change = 1; + +SYSCTL_INT(_net_link, OID_AUTO, log_promisc_mode_change, CTLFLAG_RW, + _promisc_mode_change, 1, + "log promiscuous mode change events"); + /* Interface description */ static unsigned int ifdescr_maxlen = 1024; SYSCTL_UINT(_net, OID_AUTO, ifdescr_maxlen, CTLFLAG_RW, @@ -2394,9 +2401,11 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, ifp->if_flags |= IFF_PROMISC; else if (ifp->if_pcount == 0) ifp->if_flags &= ~IFF_PROMISC; - log(LOG_INFO, "%s: permanently promiscuous mode %s\n", - ifp->if_xname, - (new_flags & IFF_PPROMISC) ? "enabled" : "disabled"); + if (log_promisc_mode_change) +log(LOG_INFO, "%s: permanently promiscuous mode %s\n", +ifp->if_xname, +((new_flags & IFF_PPROMISC) ? + "enabled" : "disabled")); } ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) | (new_flags &~ IFF_CANTCHANGE); @@ -2951,7 +2960,8 @@ ifpromisc(struct ifnet *ifp, int pswitch error = if_setflag(ifp, IFF_PROMISC, IFF_PPROMISC, >if_pcount, pswitch); /* If promiscuous mode status has changed, log a message */ - if (error == 0 && ((ifp->if_flags ^ oldflags) & IFF_PROMISC)) + if (error == 0 && ((ifp->if_flags ^ oldflags) & IFF_PROMISC) && +log_promisc_mode_change) log(LOG_INFO, "%s: promiscuous mode %s\n", ifp->if_xname, (ifp->if_flags & IFF_PROMISC) ? "enabled" : "disabled"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299562 - head/share/misc
Author: n_hibma Date: Thu May 12 20:04:09 2016 New Revision: 299562 URL: https://svnweb.freebsd.org/changeset/base/299562 Log: Add myself to the list of src committers. I've never been added it seems. Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Thu May 12 19:50:14 2016 (r299561) +++ head/share/misc/committers-src.dot Thu May 12 20:04:09 2016 (r299562) @@ -247,6 +247,7 @@ ngie [label="Garrett Cooper\nngie@FreeBS nork [label="Norikatsu Shigemura\nn...@freebsd.org\n2009/06/09"] np [label="Navdeep Parhar\n...@freebsd.org\n2009/06/05"] nwhitehorn [label="Nathan Whitehorn\nnwhiteh...@freebsd.org\n2008/07/03"] +n_hibma [label="Nick Hibma\nn_hi...@freebsd.org\n1998/11/26"] obrien [label="David E. O'Brien\nobr...@freebsd.org\n1996/10/29"] olli [label="Oliver Fromme\no...@freebsd.org\n2008/02/14"] oshogbo [label="Mariusz Zaborski\nosho...@freebsd.org\n2015/04/15"] ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299559 - head/sys/net
Author: n_hibma Date: Thu May 12 19:42:13 2016 New Revision: 299559 URL: https://svnweb.freebsd.org/changeset/base/299559 Log: Allow silencing of 'promiscuous mode enabled/disabled' messages. PR: 166255 Submitted by: eugen.grosbein.net Obtained from:eugen.grosbein.net MFC after:1 week Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Thu May 12 19:40:47 2016(r299558) +++ head/sys/net/if.c Thu May 12 19:42:13 2016(r299559) @@ -112,6 +112,13 @@ SYSCTL_INT(_net_link, OID_AUTO, log_link _link_state_change, 0, "log interface link state change events"); +/* Log promiscuous mode change events */ +static int log_promisc_mode_change = 1; + +SYSCTL_INT(_net_link, OID_AUTO, log_promisc_mode_change, CTLFLAG_RW, + _promisc_mode_change, 1, + "log promiscuous mode change events"); + /* Interface description */ static unsigned int ifdescr_maxlen = 1024; SYSCTL_UINT(_net, OID_AUTO, ifdescr_maxlen, CTLFLAG_RW, @@ -2326,9 +2333,11 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, ifp->if_flags |= IFF_PROMISC; else if (ifp->if_pcount == 0) ifp->if_flags &= ~IFF_PROMISC; - log(LOG_INFO, "%s: permanently promiscuous mode %s\n", - ifp->if_xname, - (new_flags & IFF_PPROMISC) ? "enabled" : "disabled"); + if (log_promisc_mode_change) +log(LOG_INFO, "%s: permanently promiscuous mode %s\n", +ifp->if_xname, +((new_flags & IFF_PPROMISC) ? + "enabled" : "disabled")); } ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) | (new_flags &~ IFF_CANTCHANGE); @@ -2813,7 +2822,8 @@ ifpromisc(struct ifnet *ifp, int pswitch error = if_setflag(ifp, IFF_PROMISC, IFF_PPROMISC, >if_pcount, pswitch); /* If promiscuous mode status has changed, log a message */ - if (error == 0 && ((ifp->if_flags ^ oldflags) & IFF_PROMISC)) + if (error == 0 && ((ifp->if_flags ^ oldflags) & IFF_PROMISC) && +log_promisc_mode_change) log(LOG_INFO, "%s: promiscuous mode %s\n", ifp->if_xname, (ifp->if_flags & IFF_PROMISC) ? "enabled" : "disabled"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r277714 - head/sbin/ipfw
On 26 Jan 2015, at 22:24, John Baldwin j...@freebsd.org wrote: On Monday, January 26, 2015 09:34:39 PM Olivier Cochard-Labbé wrote: On Sun, Jan 25, 2015 at 9:37 PM, John Baldwin j...@freebsd.org wrote: Author: jhb Date: Sun Jan 25 20:37:32 2015 New Revision: 277714 URL: https://svnweb.freebsd.org/changeset/base/277714 Log: natd(8) will work with an unconfigured interface and effectively not do anything until the interface is assigned an address. This fixes ipfw_nat to do the same by using an IP of INADDR_ANY instead of aborting the nat setup if the requested interface is not yet configured. Hi, I've still a problem with ipfw_nat and unconfigured interface: On my setup I'm using ipfw with NAT rules using an OpenVPN tunnel interface as source address for NATting. During the machine startup, ipfw is started before openvpn (hopefully) and its configuration mention do to NAT using tun0 IP address. Then OpenVPN start and create a tun0 and set an IP address on it. = But no unicast traffic is allowed on this tun0 interface until I restart ipfw. If I correctly understand the log of this commit: This behavior should be fixed by this commit, right ? It might. What happened for me is that I was using nat over wlan0 for VM's on my laptop to reach the outside world, but wlan0 doesn't get an IP until later in the boot after it associates. As a result, wlan0 wasn't passing any IP traffic until this fix (or if I reloaded ipfw after wlan0 was configured). I don’t think it does. The interface is not available until openvpn is started.You need to clone the interface during boot by adding cloned_interfaces=‘tun0’ in your /etc/rc.conf. Initialisation is then done later by openvpn. Let me know if that works for you. Nick ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r275180 - head/tools/tools/nanobsd
Author: n_hibma Date: Thu Nov 27 09:17:42 2014 New Revision: 275180 URL: https://svnweb.freebsd.org/changeset/base/275180 Log: clean_build is not always done (*), so move the mkdir to the first step that needs it and is always done: make.conf build. (*) In our build environment we actually never do a clean build unless instructed to do so, to make sure we do not accidentally delete the built world when on a tight schedule. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh == --- head/tools/tools/nanobsd/nanobsd.sh Thu Nov 27 08:41:31 2014 (r275179) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Nov 27 09:17:42 2014 (r275180) @@ -213,13 +213,14 @@ clean_build ( ) ( chflags -R noschg ${MAKEOBJDIRPREFIX}/ nano_rm -r ${MAKEOBJDIRPREFIX}/ fi - mkdir -p ${MAKEOBJDIRPREFIX} - printenv ${MAKEOBJDIRPREFIX}/_.env ) make_conf_build ( ) ( pprint 2 Construct build make.conf ($NANO_MAKE_CONF_BUILD) + mkdir -p ${MAKEOBJDIRPREFIX} + printenv ${MAKEOBJDIRPREFIX}/_.env + echo ${CONF_WORLD} ${NANO_MAKE_CONF_BUILD} echo ${CONF_BUILD} ${NANO_MAKE_CONF_BUILD} ) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r274892 - stable/10/tools/tools/nanobsd
Author: n_hibma Date: Sat Nov 22 20:55:21 2014 New Revision: 274892 URL: https://svnweb.freebsd.org/changeset/base/274892 Log: MFC: r274792 | n_hibma | 2014-11-21 15:53:42 +0100 (Fri, 21 Nov 2014) | 5 lines Simply remove the tmp dir before creating the symlink. We are doing chroots all over the place, so there is bound to be a stale file lying around in there (in my case samba lock files from creating accounts). If we don't do that, the symlink later will fail. Modified: stable/10/tools/tools/nanobsd/nanobsd.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/nanobsd/nanobsd.sh == --- stable/10/tools/tools/nanobsd/nanobsd.shSat Nov 22 20:48:21 2014 (r274891) +++ stable/10/tools/tools/nanobsd/nanobsd.shSat Nov 22 20:55:21 2014 (r274892) @@ -421,7 +421,7 @@ setup_nanobsd ( ) ( echo mount -o ro /dev/${NANO_DRIVE}s3 conf/default/etc/remount # Put /tmp on the /var ramdisk (could be symlink already) - test -d tmp rmdir tmp || nano_rm -f tmp + nano_rm -rf tmp ln -s var/tmp tmp ) ${NANO_OBJ}/_.dl 21 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r274792 - head/tools/tools/nanobsd
Author: n_hibma Date: Fri Nov 21 14:53:42 2014 New Revision: 274792 URL: https://svnweb.freebsd.org/changeset/base/274792 Log: Simply remove the tmp dir before creating the symlink. We are doing chroots all over the place, so there is bound to be a stale file lying around in there (in my case samba lock files from creating accounts). If we don't do that, the symlink later will fail. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh == --- head/tools/tools/nanobsd/nanobsd.sh Fri Nov 21 12:35:18 2014 (r274791) +++ head/tools/tools/nanobsd/nanobsd.sh Fri Nov 21 14:53:42 2014 (r274792) @@ -421,7 +421,7 @@ setup_nanobsd ( ) ( echo mount -o ro /dev/${NANO_DRIVE}s3 conf/default/etc/remount # Put /tmp on the /var ramdisk (could be symlink already) - test -d tmp rmdir tmp || nano_rm -f tmp + nano_rm -rf tmp ln -s var/tmp tmp ) ${NANO_OBJ}/_.dl 21 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r269569 - in head/sys/dev/usb: controller serial wlan
Author: n_hibma Date: Tue Aug 5 08:24:41 2014 New Revision: 269569 URL: http://svnweb.freebsd.org/changeset/base/269569 Log: Remove unused defines. Fix some device_printf's that were missing '\n' at the end or had speling errors. PR: 145319 Submitted by: rozhuk.im gmail.com Modified: head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/wlan/if_upgt.c Modified: head/sys/dev/usb/controller/ehci.c == --- head/sys/dev/usb/controller/ehci.c Tue Aug 5 08:00:01 2014 (r269568) +++ head/sys/dev/usb/controller/ehci.c Tue Aug 5 08:24:41 2014 (r269569) @@ -210,7 +210,7 @@ ehci_reset(ehci_softc_t *sc) return (0); } } - device_printf(sc-sc_bus.bdev, Reset timeout\n); + device_printf(sc-sc_bus.bdev, reset timeout\n); return (USB_ERR_IOERROR); } @@ -285,7 +285,7 @@ ehci_init_sub(struct ehci_softc *sc) } } if (hcr) { - device_printf(sc-sc_bus.bdev, Run timeout\n); + device_printf(sc-sc_bus.bdev, run timeout\n); return (USB_ERR_IOERROR); } return (USB_ERR_NORMAL_COMPLETION); Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:00:01 2014 (r269568) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:24:41 2014 (r269569) @@ -76,15 +76,6 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #defineU3G_CONFIG_INDEX0 #defineU3G_BSIZE 2048 -#defineU3GSP_GPRS 0 -#defineU3GSP_EDGE 1 -#defineU3GSP_CDMA 2 -#defineU3GSP_UMTS 3 -#defineU3GSP_HSDPA 4 -#defineU3GSP_HSUPA 5 -#defineU3GSP_HSPA 6 -#defineU3GSP_MAX 7 - /* Eject methods; See also usb_quirks.h:UQ_MSC_EJECT_* */ #defineU3GINIT_HUAWEI 1 /* Requires Huawei init command */ #defineU3GINIT_SIERRA 2 /* Requires Sierra init command */ @@ -890,7 +881,7 @@ u3g_attach(device_t dev) sc-sc_iface[nports] = id-bInterfaceNumber; if (bootverbose sc-sc_xfer[nports][U3G_INTR]) { - device_printf(dev, port %d supports modem control, + device_printf(dev, port %d supports modem control\n, nports); } Modified: head/sys/dev/usb/serial/uftdi.c == --- head/sys/dev/usb/serial/uftdi.c Tue Aug 5 08:00:01 2014 (r269568) +++ head/sys/dev/usb/serial/uftdi.c Tue Aug 5 08:24:41 2014 (r269569) @@ -1034,7 +1034,7 @@ uftdi_devtype_setup(struct uftdi_softc * } else { sc-sc_devtype = DEVT_232R; device_printf(sc-sc_dev, Warning: unknown FTDI - device type, bcdDevice=0x%04x, assuming 232R, + device type, bcdDevice=0x%04x, assuming 232R\n, uaa-info.bcdDevice); } sc-sc_ucom.sc_portno = 0; Modified: head/sys/dev/usb/wlan/if_upgt.c == --- head/sys/dev/usb/wlan/if_upgt.c Tue Aug 5 08:00:01 2014 (r269568) +++ head/sys/dev/usb/wlan/if_upgt.c Tue Aug 5 08:24:41 2014 (r269569) @@ -428,7 +428,7 @@ upgt_get_stats(struct upgt_softc *sc) data_cmd = upgt_getbuf(sc); if (data_cmd == NULL) { - device_printf(sc-sc_dev, %s: out of buffer.\n, __func__); + device_printf(sc-sc_dev, %s: out of buffers.\n, __func__); return; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r269571 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Tue Aug 5 08:29:16 2014 New Revision: 269571 URL: http://svnweb.freebsd.org/changeset/base/269571 Log: Add ID for Novatel MC990D to u3g. PR: 145319 Submitted by: rozhuk.im gmail.com MFC after:3 days 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 Tue Aug 5 08:28:29 2014 (r269570) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:29:16 2014 (r269571) @@ -336,6 +336,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(NOVATEL, MC547, 0), U3G_DEV(NOVATEL, MC679, 0), U3G_DEV(NOVATEL, MC950D, 0), + U3G_DEV(NOVATEL, MC990D, 0), U3G_DEV(NOVATEL, MIFI2200, U3GINIT_SCSIEJECT), U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT), U3G_DEV(NOVATEL, U720, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Aug 5 08:28:29 2014(r269570) +++ head/sys/dev/usb/usbdevsTue Aug 5 08:29:16 2014(r269571) @@ -3231,6 +3231,7 @@ product NOVATEL EU740 0x2410 Expedite E product NOVATEL EU870D 0x2420 Expedite EU870D product NOVATEL U727 0x4100 Merlin U727 CDMA product NOVATEL MC950D 0x4400 Novatel MC950D HSUPA +product NOVATEL MC990D 0x7001 Novatel MC990D product NOVATEL ZEROCD 0x5010 Novatel ZeroCD product NOVATEL MIFI2200V 0x5020 Novatel MiFi 2200 CDMA Virgin Mobile product NOVATEL ZEROCD20x5030 Novatel ZeroCD ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r269575 - head/sys/dev/usb
Author: n_hibma Date: Tue Aug 5 08:48:24 2014 New Revision: 269575 URL: http://svnweb.freebsd.org/changeset/base/269575 Log: Reset the error value in the softc before starting a BBB transfer. PR: 145319 Submitted by: rozhuk.im gmail.com MFC after:3 days Modified: head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_msctest.c == --- head/sys/dev/usb/usb_msctest.c Tue Aug 5 08:30:38 2014 (r269574) +++ head/sys/dev/usb/usb_msctest.c Tue Aug 5 08:48:24 2014 (r269575) @@ -485,6 +485,7 @@ bbb_command_start(struct bbb_transfer *s sc-data_rem = data_len; sc-data_timeout = (data_timeout + USB_MS_HZ); sc-actlen = 0; + sc-error = 0; sc-cmd_len = cmd_len; memset(sc-cbw-CBWCDB, 0, sizeof(sc-cbw-CBWCDB)); memcpy(sc-cbw-CBWCDB, cmd_ptr, cmd_len); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r269576 - in head/sys/dev/usb: . quirk serial
Author: n_hibma Date: Tue Aug 5 09:35:25 2014 New Revision: 269576 URL: http://svnweb.freebsd.org/changeset/base/269576 Log: Add a second Huawei SCSI eject command as USB mode switch config files sometimes use one or the other. Maybe newer Huawei modems switched. Add a quirk for it as well. PR: 145319 Submitted by: rozhuk.im gmail.com Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/quirk/usb_quirk.h head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/usb_msctest.h Modified: head/sys/dev/usb/quirk/usb_quirk.c == --- head/sys/dev/usb/quirk/usb_quirk.c Tue Aug 5 08:48:24 2014 (r269575) +++ head/sys/dev/usb/quirk/usb_quirk.c Tue Aug 5 09:35:25 2014 (r269576) @@ -562,6 +562,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_MSC_EJECT_WAIT] = UQ_MSC_EJECT_WAIT, [UQ_MSC_EJECT_SAEL_M460]= UQ_MSC_EJECT_SAEL_M460, [UQ_MSC_EJECT_HUAWEISCSI] = UQ_MSC_EJECT_HUAWEISCSI, + [UQ_MSC_EJECT_HUAWEISCSI2] = UQ_MSC_EJECT_HUAWEISCSI2, [UQ_MSC_EJECT_TCT] = UQ_MSC_EJECT_TCT, [UQ_BAD_MIDI] = UQ_BAD_MIDI, [UQ_AU_VENDOR_CLASS]= UQ_AU_VENDOR_CLASS, Modified: head/sys/dev/usb/quirk/usb_quirk.h == --- head/sys/dev/usb/quirk/usb_quirk.h Tue Aug 5 08:48:24 2014 (r269575) +++ head/sys/dev/usb/quirk/usb_quirk.h Tue Aug 5 09:35:25 2014 (r269576) @@ -102,6 +102,7 @@ enum { UQ_MSC_EJECT_WAIT, /* wait for the device to eject */ UQ_MSC_EJECT_SAEL_M460, /* ejects after Sael USB commands */ UQ_MSC_EJECT_HUAWEISCSI,/* ejects after Huawei SCSI command */ + UQ_MSC_EJECT_HUAWEISCSI2, /* ejects after Huawei SCSI 2 command */ UQ_MSC_EJECT_TCT, /* ejects after TCT SCSI command */ UQ_BAD_MIDI,/* device claims MIDI class, but isn't */ Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:48:24 2014 (r269575) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 09:35:25 2014 (r269576) @@ -86,7 +86,8 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #defineU3GINIT_WAIT7 /* Device reappears after a delay */ #defineU3GINIT_SAEL_M460 8 /* Requires vendor init */ #defineU3GINIT_HUAWEISCSI 9 /* Requires Huawei SCSI init command */ -#defineU3GINIT_TCT 10 /* Requires TCT Mobile init command */ +#defineU3GINIT_HUAWEISCSI2 10 /* Requires Huawei SCSI init command (2) */ +#defineU3GINIT_TCT 11 /* Requires TCT Mobile init command */ enum { U3G_BULK_WR, @@ -720,6 +721,8 @@ u3g_test_autoinst(void *arg, struct usb_ method = U3GINIT_WAIT; else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI)) method = U3GINIT_HUAWEISCSI; + else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI2)) + method = U3GINIT_HUAWEISCSI2; else if (usb_test_quirk(uaa, UQ_MSC_EJECT_TCT)) method = U3GINIT_TCT; else if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa) == 0) @@ -740,6 +743,9 @@ u3g_test_autoinst(void *arg, struct usb_ case U3GINIT_HUAWEISCSI: error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI); break; + case U3GINIT_HUAWEISCSI2: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI2); + break; case U3GINIT_SCSIEJECT: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); break; Modified: head/sys/dev/usb/usb_msctest.c == --- head/sys/dev/usb/usb_msctest.c Tue Aug 5 08:48:24 2014 (r269575) +++ head/sys/dev/usb/usb_msctest.c Tue Aug 5 09:35:25 2014 (r269576) @@ -103,6 +103,9 @@ static uint8_t scsi_cmotech_eject[] = static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_huawei_eject2[] = { 0x11, 0x06, 0x20, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_tct_eject[] = { 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 }; static uint8_t scsi_sync_cache[] = { 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
svn commit: r269578 - head/sys/dev/usb
Author: n_hibma Date: Tue Aug 5 09:59:16 2014 New Revision: 269578 URL: http://svnweb.freebsd.org/changeset/base/269578 Log: Return USB_ERR_INVAL if the eject method is not known. PR: 145319 Submitted by: rozhuk.im gmail.com Modified: head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_msctest.c == --- head/sys/dev/usb/usb_msctest.c Tue Aug 5 09:44:10 2014 (r269577) +++ head/sys/dev/usb/usb_msctest.c Tue Aug 5 09:59:16 2014 (r269578) @@ -859,9 +859,10 @@ usb_msc_eject(struct usb_device *udev, u break; default: DPRINTF(Unknown eject method (%d)\n, method); - err = 0; - break; + bbb_detach(sc); + return (USB_ERR_INVAL); } + DPRINTF(Eject CD command status: %s\n, usbd_errstr(err)); bbb_detach(sc); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r269582 - head/sys/dev/usb/serial
Author: n_hibma Date: Tue Aug 5 11:50:16 2014 New Revision: 269582 URL: http://svnweb.freebsd.org/changeset/base/269582 Log: don't OR integer error values together as this does not make sense. Instead bail on the first failed command. Modified: head/sys/dev/usb/serial/u3g.c Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Tue Aug 5 10:48:53 2014 (r269581) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 11:50:16 2014 (r269582) @@ -754,7 +754,8 @@ u3g_test_autoinst(void *arg, struct usb_ break; case U3GINIT_ZTESTOR: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); - error |= usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); + if (error == 0) + error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); break; case U3GINIT_CMOTECH: error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r269584 - in head/sys/dev/usb: . net
Author: n_hibma Date: Tue Aug 5 12:08:50 2014 New Revision: 269584 URL: http://svnweb.freebsd.org/changeset/base/269584 Log: Add support for Huawei E3272 modems which are supported by the CDC ethernet class. Note: This is untested as I do not have a device like this. That is reflected in the MFC timeout. PR: 192345 Submitted by: rozhuk.im gmail.com MFC after:4 weeks Modified: head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/net/if_cdce.c == --- head/sys/dev/usb/net/if_cdce.c Tue Aug 5 12:04:40 2014 (r269583) +++ head/sys/dev/usb/net/if_cdce.c Tue Aug 5 12:08:50 2014 (r269584) @@ -80,6 +80,7 @@ __FBSDID($FreeBSD$); #defineUSB_DEBUG_VAR cdce_debug #include dev/usb/usb_debug.h #include dev/usb/usb_process.h +#include dev/usb/usb_msctest.h #include usb_if.h #include dev/usb/net/usb_ethernet.h @@ -251,8 +252,11 @@ static driver_t cdce_driver = { }; static devclass_t cdce_devclass; +static eventhandler_tag cdce_etag; -DRIVER_MODULE(cdce, uhub, cdce_driver, cdce_devclass, NULL, 0); +static int cdce_driver_loaded(struct module *, int, void *); + +DRIVER_MODULE(cdce, uhub, cdce_driver, cdce_devclass, cdce_driver_loaded, 0); MODULE_VERSION(cdce, 1); MODULE_DEPEND(cdce, uether, 1, 1, 1); MODULE_DEPEND(cdce, usb, 1, 1, 1); @@ -267,6 +271,10 @@ static const struct usb_ether_methods cd .ue_setpromisc = cdce_setpromisc, }; +static const STRUCT_USB_HOST_ID cdce_switch_devs[] = { + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3272_INIT, MSC_EJECT_HUAWEI2)}, +}; + static const STRUCT_USB_HOST_ID cdce_host_devs[] = { {USB_VPI(USB_VENDOR_ACERLABS, USB_PRODUCT_ACERLABS_M5632, CDCE_FLAG_NO_UNION)}, {USB_VPI(USB_VENDOR_AMBIT, USB_PRODUCT_AMBIT_NTL_250, CDCE_FLAG_NO_UNION)}, @@ -281,6 +289,16 @@ static const STRUCT_USB_HOST_ID cdce_hos {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, + + {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x16), + USB_DRIVER_INFO(0)}, + {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x46), + USB_DRIVER_INFO(0)}, + {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x76), + USB_DRIVER_INFO(0)}, }; static const STRUCT_USB_DUAL_ID cdce_dual_devs[] = { @@ -474,6 +492,48 @@ cdce_ncm_init(struct cdce_softc *sc) } #endif +static void +cdce_test_autoinst(void *arg, struct usb_device *udev, +struct usb_attach_arg *uaa) +{ + struct usb_interface *iface; + struct usb_interface_descriptor *id; + + if (uaa-dev_state != UAA_DEV_READY) + return; + + iface = usbd_get_iface(udev, 0); + if (iface == NULL) + return; + id = iface-idesc; + if (id == NULL || id-bInterfaceClass != UICLASS_MASS) + return; + if (usbd_lookup_id_by_uaa(cdce_switch_devs, sizeof(cdce_switch_devs), uaa)) + return; /* no device match */ + + if (usb_msc_eject(udev, 0, USB_GET_DRIVER_INFO(uaa)) == 0) { + /* success, mark the udev as disappearing */ + uaa-dev_state = UAA_DEV_EJECTING; + } +} + +static int +cdce_driver_loaded(struct module *mod, int what, void *arg) +{ + switch (what) { + case MOD_LOAD: + /* register our autoinstall handler */ + cdce_etag = EVENTHANDLER_REGISTER(usb_dev_configured, + cdce_test_autoinst, NULL, EVENTHANDLER_PRI_ANY); + return (0); + case MOD_UNLOAD: + EVENTHANDLER_DEREGISTER(usb_dev_configured, cdce_etag); + return (0); + default: + return (EOPNOTSUPP); + } +} + static int cdce_probe(device_t dev) { Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Aug 5 12:04:40 2014(r269583) +++ head/sys/dev/usb/usbdevsTue Aug 5 12:08:50 2014(r269584) @@ -2342,9 +2342,11 @@ product HUAWEI E392 0x1505 LTE modem product HUAWEI E3131 0x1506 3G modem product HUAWEI K3765_INIT 0x1520 K3765 Initial product HUAWEI K4505_INIT 0x1521 K4505 Initial +product HUAWEI E3272_INIT 0x155b LTE modem initial product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E1730x1c05 3G modem
svn commit: r269326 - head/lib/libc/stdio
Author: n_hibma Date: Thu Jul 31 08:28:42 2014 New Revision: 269326 URL: http://svnweb.freebsd.org/changeset/base/269326 Log: Fix the example: free the memory that was allocated by getline(). Modified: head/lib/libc/stdio/getline.3 Modified: head/lib/libc/stdio/getline.3 == --- head/lib/libc/stdio/getline.3 Thu Jul 31 08:07:23 2014 (r269325) +++ head/lib/libc/stdio/getline.3 Thu Jul 31 08:28:42 2014 (r269326) @@ -95,6 +95,7 @@ size_t linecap = 0; ssize_t linelen; while ((linelen = getline(line, linecap, fp)) 0) fwrite(line, linelen, 1, stdout); +free(line); .Ed .Sh COMPATIBILITY Many application writers used the name ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r267621 - stable/10/sys/dev/usb
Author: n_hibma Date: Wed Jun 18 22:09:33 2014 New Revision: 267621 URL: http://svnweb.freebsd.org/changeset/base/267621 Log: MFC r261270: Fix the ordering of the arguments to printf in uhub_child_location_string(). This produced bogus information in dev.USB driver.id.%location output from sysctl. Modified: stable/10/sys/dev/usb/usb_hub.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_hub.c == --- stable/10/sys/dev/usb/usb_hub.c Wed Jun 18 19:32:38 2014 (r267620) +++ stable/10/sys/dev/usb/usb_hub.c Wed Jun 18 22:09:33 2014 (r267621) @@ -1625,8 +1625,9 @@ uhub_child_location_string(device_t pare goto done; } snprintf(buf, buflen, bus=%u hubaddr=%u port=%u devaddr=%u interface=%u, + device_get_unit(res.udev-bus-bdev), (res.udev-parent_hub != NULL) ? res.udev-parent_hub-device_index : 0, - res.portno, device_get_unit(res.udev-bus-bdev), + res.portno, res.udev-device_index, res.iface_index); done: mtx_unlock(Giant); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r261270 - head/sys/dev/usb
Author: n_hibma Date: Wed Jan 29 16:24:50 2014 New Revision: 261270 URL: http://svnweb.freebsd.org/changeset/base/261270 Log: Fix the ordering of the arguments to printf in uhub_child_location_string(). This produced bogus information in dev.USB driver.id.%location output from sysctl. MFC after:2 weeks Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c == --- head/sys/dev/usb/usb_hub.c Wed Jan 29 15:50:01 2014(r261269) +++ head/sys/dev/usb/usb_hub.c Wed Jan 29 16:24:50 2014(r261270) @@ -1597,8 +1597,9 @@ uhub_child_location_string(device_t pare goto done; } snprintf(buf, buflen, bus=%u hubaddr=%u port=%u devaddr=%u interface=%u, + device_get_unit(res.udev-bus-bdev), (res.udev-parent_hub != NULL) ? res.udev-parent_hub-device_index : 0, - res.portno, device_get_unit(res.udev-bus-bdev), + res.portno, res.udev-device_index, res.iface_index); done: mtx_unlock(Giant); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r261115 - stable/10/sys/dev/usb/net
It’s not just the GTM661 that supports uhso, the GTM382 does so to I think. Perhaps you want to move them all in that case? Or add them to both and let devd decide? Nick On 24 Jan 2014, at 09:22, Hans Petter Selasky hsela...@freebsd.org wrote: Author: hselasky Date: Fri Jan 24 08:22:29 2014 New Revision: 261115 URL: http://svnweb.freebsd.org/changeset/base/261115 Log: MFC r260534: Move USB ID from u3g driver to uhso driver. Modified: stable/10/sys/dev/usb/net/uhso.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/uhso.c == --- stable/10/sys/dev/usb/net/uhso.c Fri Jan 24 08:19:50 2014 (r261114) +++ stable/10/sys/dev/usb/net/uhso.c Fri Jan 24 08:22:29 2014 (r261115) @@ -268,6 +268,8 @@ static const STRUCT_USB_HOST_ID uhso_dev UHSO_DEV(OPTION, ICON401, UHSO_AUTO_IFACE), /* Option GlobeTrotter Module 382 */ UHSO_DEV(OPTION, GMT382, UHSO_AUTO_IFACE), + /* Option GTM661W */ + UHSO_DEV(OPTION, GTM661W, UHSO_AUTO_IFACE), /* Option iCON EDGE */ UHSO_DEV(OPTION, ICONEDGE, UHSO_STATIC_IFACE), /* Option Module HSxPA */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r258705 - head/tools/tools/nanobsd
Author: n_hibma Date: Thu Nov 28 08:54:15 2013 New Revision: 258705 URL: http://svnweb.freebsd.org/changeset/base/258705 Log: Do a parallel buildworld buildkernel (using NANO_PMAKE), but use a single threaded installworld, installkernel and distribution (using NANO_MAKE). Setting NANO_PMAKE to 'make -j 12' would otherwise bomb during installation of world. MFC after:2 weeks Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh == --- head/tools/tools/nanobsd/nanobsd.sh Thu Nov 28 08:48:49 2013 (r258704) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Nov 28 08:54:15 2013 (r258705) @@ -57,7 +57,8 @@ NANO_PACKAGE_LIST=* # default is ${NANO_OBJ} #NANO_DISKIMGDIR= -# Parallel Make +# Make parallel Make +NANO_MAKE=make NANO_PMAKE=make -j 3 # The default name for any image we create. @@ -254,7 +255,7 @@ install_world ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ + ${NANO_MAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ DESTDIR=${NANO_WORLDDIR} \ ${NANO_OBJ}/_.iw 21 chflags -R noschg ${NANO_WORLDDIR} @@ -267,7 +268,7 @@ install_etc ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ + ${NANO_MAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ DESTDIR=${NANO_WORLDDIR} \ ${NANO_OBJ}/_.etc 21 # make.conf doesn't get created by default, but some ports need it @@ -288,7 +289,7 @@ install_kernel ( ) ( fi cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ DESTDIR=${NANO_WORLDDIR} \ __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ ${kernconfdir:+KERNCONFDIR=}${kernconfdir} \ @@ -878,6 +879,7 @@ fi if $do_clean ; then true else + NANO_MAKE=${NANO_MAKE} -DNO_CLEAN NANO_PMAKE=${NANO_PMAKE} -DNO_CLEAN fi @@ -897,6 +899,7 @@ export NANO_DRIVE export NANO_HEADS export NANO_IMAGES export NANO_IMGNAME +export NANO_MAKE export NANO_MAKE_CONF_BUILD export NANO_MAKE_CONF_INSTALL export NANO_MEDIASIZE ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r257132 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Fri Oct 25 19:39:22 2013 New Revision: 257132 URL: http://svnweb.freebsd.org/changeset/base/257132 Log: Add id for GTM661W. 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 Fri Oct 25 19:19:12 2013 (r257131) +++ head/sys/dev/usb/serial/u3g.c Fri Oct 25 19:39:22 2013 (r257132) @@ -387,6 +387,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(OPTION, GTMAXHSUPA, 0), U3G_DEV(OPTION, GTMAXHSUPAE, 0), U3G_DEV(OPTION, VODAFONEMC3G, 0), + U3G_DEV(OPTION, GTM661W, 0), U3G_DEV(QISDA, H20_1, 0), U3G_DEV(QISDA, H20_2, 0), U3G_DEV(QISDA, H21_1, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsFri Oct 25 19:19:12 2013(r257131) +++ head/sys/dev/usb/usbdevsFri Oct 25 19:39:22 2013(r257132) @@ -3248,6 +3248,7 @@ product OPTION GMT382 0x7501 Globetrott product OPTION GE40X_1 0x7301 Globetrotter HSUPA product OPTION GE40X_2 0x7361 Globetrotter HSUPA product OPTION GE40X_3 0x7381 Globetrotter HSUPA +product OPTION GTM661W 0x9000 GTM661W product OPTION ICONEDGE0xc031 GlobeSurfer iCON EDGE product OPTION MODHSXPA0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r250034 - head/tools/tools/nanobsd
Author: n_hibma Date: Sun Apr 28 21:44:44 2013 New Revision: 250034 URL: http://svnweb.freebsd.org/changeset/base/250034 Log: Doing a cpio from /var/empty if dir was not specified or non-existent copies its mode to the destination. This is not desirable. Rephrase this code to be more sensible. PR: 173483 MFC after:1 week Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh == --- head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 21:14:23 2013 (r250033) +++ head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 21:44:44 2013 (r250034) @@ -413,12 +413,13 @@ populate_slice ( ) ( dir=$2 mnt=$3 lbl=$4 - test -z $2 dir=${NANO_WORLDDIR}/var/empty - test -d $dir || dir=${NANO_WORLDDIR}/var/empty - echo Creating ${dev} with ${dir} (mounting on ${mnt}) - newfs_part $dev $mnt $lbl - cd ${dir} - find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt} + echo Creating ${dev} (mounting on ${mnt}) + newfs_part ${dev} ${mnt} ${lbl} + if [ -n ${dir} -a -d ${dir} ]; then + echo Populating ${lbl} from ${dir} + cd ${dir} + find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt} + fi df -i ${mnt} umount ${mnt} ) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r250036 - head/tools/tools/nanobsd
Author: n_hibma Date: Sun Apr 28 22:12:40 2013 New Revision: 250036 URL: http://svnweb.freebsd.org/changeset/base/250036 Log: Replace a silly command sequence with a proper if-then-else. Generate images sparsely. This saves space and time, especially when generating images inside a VM (PR 173482). Add a 'true' statement to last_orders to prevent some version of sh from tripping over an empty function. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh == --- head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 22:05:01 2013 (r250035) +++ head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 22:12:40 2013 (r250036) @@ -359,8 +359,7 @@ setup_nanobsd ( ) ( echo mount -o ro /dev/${NANO_DRIVE}s3 conf/default/etc/remount # Put /tmp on the /var ramdisk (could be symlink already) - rmdir tmp || true - rm tmp || true + test -d tmp rmdir tmp || rm -f tmp ln -s var/tmp tmp ) ${NANO_OBJ}/_.dl 21 @@ -541,7 +540,7 @@ create_i386_diskimage ( ) ( if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) echo Duplicating to second image... - dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k + dd conv=sparse if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k mount /dev/${MD}s2a ${MNT} for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab do @@ -565,12 +564,12 @@ create_i386_diskimage ( ) ( if [ ${NANO_MD_BACKING} = swap ] ; then echo Writing out ${NANO_IMGNAME}... - dd if=/dev/${MD} of=${IMG} bs=64k + dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k fi if ${do_copyout_partition} ; then echo Writing out _.disk.image... - dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k + dd conv=sparse if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k fi mdconfig -d -u $MD @@ -589,6 +588,7 @@ last_orders () ( # after the build completed, for instance to copy the finished # image to a more convenient place: # cp ${NANO_DISKIMGDIR}/_.disk.image /home/ftp/pub/nanobsd.disk + true ) ### ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r247359 - head/sbin/reboot
Author: n_hibma Date: Tue Feb 26 23:18:35 2013 New Revision: 247359 URL: http://svnweb.freebsd.org/changeset/base/247359 Log: Clarify that overriding the -h/-D flags through flags in device.hints only works for sio(4) but not for uart(4) which no longer has this flag. Modified: head/sbin/reboot/boot_i386.8 Modified: head/sbin/reboot/boot_i386.8 == --- head/sbin/reboot/boot_i386.8Tue Feb 26 22:08:10 2013 (r247358) +++ head/sbin/reboot/boot_i386.8Tue Feb 26 23:18:35 2013 (r247359) @@ -220,15 +220,14 @@ you can use the option to force the kernel to use the serial port as its console device. The serial port driver -.Xr uart 4 +.Xr sio 4 +(but not +.Xr uart 4 ) has a flag (0x20) to override this option. If that flag is set, the serial port will always be used as the console, regardless of the .Fl h option described here. -See the man page for -.Xr uart 4 -for more details. .It Fl m mute the console to suppress all console input and output during the boot. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r243086 - stable/9/etc
Author: n_hibma Date: Thu Nov 15 15:48:40 2012 New Revision: 243086 URL: http://svnweb.freebsd.org/changeset/base/243086 Log: MFC r242784: Not only load pccard_ether settings, also load network settings. This is only a problem when a /etc/rc.conf.d/network file is being used. PR: conf/160373 Submitted by: n_hibma Modified: stable/9/etc/pccard_ether Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/pccard_ether == --- stable/9/etc/pccard_ether Thu Nov 15 15:21:58 2012(r243085) +++ stable/9/etc/pccard_ether Thu Nov 15 15:48:40 2012(r243086) @@ -123,4 +123,5 @@ else fi load_rc_config pccard_ether +load_rc_config network run_rc_command $args ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r243087 - stable/8/etc
Author: n_hibma Date: Thu Nov 15 15:49:37 2012 New Revision: 243087 URL: http://svnweb.freebsd.org/changeset/base/243087 Log: MFC 242784: Not only load pccard_ether settings, also load network settings. This is only a problem when a /etc/rc.conf.d/network file is being used. PR: conf/160373 Submitted by: n_hibma Modified: stable/8/etc/pccard_ether Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/pccard_ether == --- stable/8/etc/pccard_ether Thu Nov 15 15:48:40 2012(r243086) +++ stable/8/etc/pccard_ether Thu Nov 15 15:49:37 2012(r243087) @@ -123,4 +123,5 @@ else fi load_rc_config pccard_ether +load_rc_config network run_rc_command $args ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r242784 - head/etc
Author: n_hibma Date: Thu Nov 8 20:34:12 2012 New Revision: 242784 URL: http://svnweb.freebsd.org/changeset/base/242784 Log: Not only load pccard_ether settings, also load network settings. This is only a problem when a /etc/rc.conf.d/network file is being used. PR: conf/160373 Submitted by: n_hibma MFC after:1 week Modified: head/etc/pccard_ether Modified: head/etc/pccard_ether == --- head/etc/pccard_ether Thu Nov 8 20:15:12 2012(r242783) +++ head/etc/pccard_ether Thu Nov 8 20:34:12 2012(r242784) @@ -123,4 +123,5 @@ else fi load_rc_config pccard_ether +load_rc_config network run_rc_command $args ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r242128 - stable/8/sys/dev/usb/serial
Author: n_hibma Date: Fri Oct 26 12:24:38 2012 New Revision: 242128 URL: http://svn.freebsd.org/changeset/base/242128 Log: MFC 241555: Implement modem control in u3g. Tested on Option GTM382W, Huawei E220, and Sierra Wireless MC8790V. Also implement the .ucom_poll method. Note: It resolves ppp hanging during the PPp phase. Modified: stable/8/sys/dev/usb/serial/u3g.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c == --- stable/8/sys/dev/usb/serial/u3g.c Fri Oct 26 11:41:57 2012 (r242127) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Oct 26 12:24:38 2012 (r242128) @@ -53,6 +53,7 @@ #include dev/usb/usb.h #include dev/usb/usbdi.h #include dev/usb/usbdi_util.h +#include dev/usb/usb_cdc.h #include usbdevs.h #defineUSB_DEBUG_VAR u3g_debug @@ -99,6 +100,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, enum { U3G_BULK_WR, U3G_BULK_RD, + U3G_INTR, U3G_N_TRANSFER, }; @@ -107,12 +109,15 @@ struct u3g_softc { struct ucom_softc sc_ucom[U3G_MAXPORTS]; struct usb_xfer *sc_xfer[U3G_MAXPORTS][U3G_N_TRANSFER]; + uint8_t sc_iface[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_lsr[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_msr[U3G_MAXPORTS]; /* u3g status register */ + uint16_t sc_line[U3G_MAXPORTS]; /* line status */ + struct usb_device *sc_udev; struct mtx sc_mtx; - uint8_t sc_lsr; /* local status register */ - uint8_t sc_msr; /* U3G status register */ - uint8_t sc_numports; + uint8_t sc_numports; }; static device_probe_t u3g_probe; @@ -121,11 +126,16 @@ static device_detach_t u3g_detach; static usb_callback_t u3g_write_callback; static usb_callback_t u3g_read_callback; +static usb_callback_t u3g_intr_callback; +static void u3g_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static void u3g_cfg_set_dtr(struct ucom_softc *, uint8_t); +static void u3g_cfg_set_rts(struct ucom_softc *, uint8_t); static void u3g_start_read(struct ucom_softc *ucom); static void u3g_stop_read(struct ucom_softc *ucom); static void u3g_start_write(struct ucom_softc *ucom); static void u3g_stop_write(struct ucom_softc *ucom); +static void u3g_poll(struct ucom_softc *ucom); static void u3g_test_autoinst(void *, struct usb_device *, @@ -153,13 +163,26 @@ static const struct usb_config u3g_confi .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = u3g_read_callback, }, + + [U3G_INTR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = u3g_intr_callback, + }, }; static const struct ucom_callback u3g_callback = { + .ucom_cfg_get_status = u3g_cfg_get_status, + .ucom_cfg_set_dtr = u3g_cfg_set_dtr, + .ucom_cfg_set_rts = u3g_cfg_set_rts, .ucom_start_read = u3g_start_read, .ucom_stop_read = u3g_stop_read, .ucom_start_write = u3g_start_write, .ucom_stop_write = u3g_stop_write, + .ucom_poll = u3g_poll, }; static device_method_t u3g_methods[] = { @@ -839,6 +862,15 @@ u3g_attach(device_t dev) continue; } + iface = usbd_get_iface(uaa-device, i); + id = usbd_get_interface_descriptor(iface); + sc-sc_iface[nports] = id-bInterfaceNumber; + + if (bootverbose sc-sc_xfer[nports][U3G_INTR]) { + device_printf(dev, port %d supports modem control, + nports); + } + /* set stall by default */ mtx_lock(sc-sc_mtx); usbd_xfer_set_stall(sc-sc_xfer[nports][U3G_BULK_WR]); @@ -896,6 +928,9 @@ u3g_start_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom-sc_parent; + /* start interrupt endpoint (if configured) */ + usbd_transfer_start(sc-sc_xfer[ucom-sc_subunit][U3G_INTR]); + /* start read endpoint */ usbd_transfer_start(sc-sc_xfer[ucom-sc_subunit][U3G_BULK_RD]); return; @@ -906,6 +941,9 @@ u3g_stop_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom-sc_parent; + /* stop interrupt endpoint (if configured) */ + usbd_transfer_stop(sc-sc_xfer[ucom-sc_subunit][U3G_INTR]); + /* stop read endpoint */ usbd_transfer_stop(sc-sc_xfer[ucom-sc_subunit][U3G_BULK_RD]); return; @@
svn commit: r242095 - stable/9/usr.sbin/ppp
Author: n_hibma Date: Thu Oct 25 20:45:57 2012 New Revision: 242095 URL: http://svn.freebsd.org/changeset/base/242095 Log: MFC 241496: Some 3G modems return the wrong signature in echo packets and make it impossible to use LQR/ECHO. They return want_magic instead. With this change it is now possible to use enable lqr set lqrperiod 5 enable echo set echoperiod 5 in your ppp.conf file. Modified: stable/9/usr.sbin/ppp/lqr.c Directory Properties: stable/9/usr.sbin/ppp/ (props changed) Modified: stable/9/usr.sbin/ppp/lqr.c == --- stable/9/usr.sbin/ppp/lqr.c Thu Oct 25 20:34:44 2012(r242094) +++ stable/9/usr.sbin/ppp/lqr.c Thu Oct 25 20:45:57 2012(r242095) @@ -108,7 +108,8 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf * die as a result. */ } -if (lqr.signature == SIGNATURE) { +if (lqr.signature == SIGNATURE + || lqr.signature == lcp-want_magic) { /* some implementations return the wrong magic */ /* careful not to update lqm.echo.seq_recv with older values */ if ((hdlc-lqm.echo.seq_recv (u_int32_t)0 - 5 lqr.sequence 5) || (hdlc-lqm.echo.seq_recv = (u_int32_t)0 - 5 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r242098 - stable/8/usr.sbin/ppp
Author: n_hibma Date: Thu Oct 25 21:08:31 2012 New Revision: 242098 URL: http://svn.freebsd.org/changeset/base/242098 Log: MFC 241496: Some 3G modems return the wrong signature in echo packets and make it impossible to use LQR/ECHO. They return want_magic instead. With this change it is now possible to use enable lqr set lqrperiod 5 enable echo set echoperiod 5 in your ppp.conf file. Modified: stable/8/usr.sbin/ppp/lqr.c Directory Properties: stable/8/usr.sbin/ppp/ (props changed) Modified: stable/8/usr.sbin/ppp/lqr.c == --- stable/8/usr.sbin/ppp/lqr.c Thu Oct 25 21:08:02 2012(r242097) +++ stable/8/usr.sbin/ppp/lqr.c Thu Oct 25 21:08:31 2012(r242098) @@ -108,7 +108,8 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf * die as a result. */ } -if (lqr.signature == SIGNATURE) { +if (lqr.signature == SIGNATURE + || lqr.signature == lcp-want_magic) { /* some implementations return the wrong magic */ /* careful not to update lqm.echo.seq_recv with older values */ if ((hdlc-lqm.echo.seq_recv (u_int32_t)0 - 5 lqr.sequence 5) || (hdlc-lqm.echo.seq_recv = (u_int32_t)0 - 5 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r242100 - stable/9/sys/dev/usb/serial
Author: n_hibma Date: Thu Oct 25 21:22:05 2012 New Revision: 242100 URL: http://svn.freebsd.org/changeset/base/242100 Log: MFC 241555: Implement modem control in u3g. Tested on Option GTM382W, Huawei E220, and Sierra Wireless MC8790V. Also implement the .ucom_poll method. Note: It resolves ppp hanging during the PPp phase. Modified: stable/9/sys/dev/usb/serial/u3g.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c == --- stable/9/sys/dev/usb/serial/u3g.c Thu Oct 25 21:09:42 2012 (r242099) +++ stable/9/sys/dev/usb/serial/u3g.c Thu Oct 25 21:22:05 2012 (r242100) @@ -53,6 +53,7 @@ #include dev/usb/usb.h #include dev/usb/usbdi.h #include dev/usb/usbdi_util.h +#include dev/usb/usb_cdc.h #include usbdevs.h #defineUSB_DEBUG_VAR u3g_debug @@ -99,6 +100,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, enum { U3G_BULK_WR, U3G_BULK_RD, + U3G_INTR, U3G_N_TRANSFER, }; @@ -107,12 +109,15 @@ struct u3g_softc { struct ucom_softc sc_ucom[U3G_MAXPORTS]; struct usb_xfer *sc_xfer[U3G_MAXPORTS][U3G_N_TRANSFER]; + uint8_t sc_iface[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_lsr[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_msr[U3G_MAXPORTS]; /* u3g status register */ + uint16_t sc_line[U3G_MAXPORTS]; /* line status */ + struct usb_device *sc_udev; struct mtx sc_mtx; - uint8_t sc_lsr; /* local status register */ - uint8_t sc_msr; /* U3G status register */ - uint8_t sc_numports; + uint8_t sc_numports; }; static device_probe_t u3g_probe; @@ -122,12 +127,17 @@ static void u3g_free_softc(struct u3g_so static usb_callback_t u3g_write_callback; static usb_callback_t u3g_read_callback; +static usb_callback_t u3g_intr_callback; -static void u3g_free(struct ucom_softc *ucom); +static void u3g_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static void u3g_cfg_set_dtr(struct ucom_softc *, uint8_t); +static void u3g_cfg_set_rts(struct ucom_softc *, uint8_t); static void u3g_start_read(struct ucom_softc *ucom); static void u3g_stop_read(struct ucom_softc *ucom); static void u3g_start_write(struct ucom_softc *ucom); static void u3g_stop_write(struct ucom_softc *ucom); +static void u3g_poll(struct ucom_softc *ucom); +static void u3g_free(struct ucom_softc *ucom); static void u3g_test_autoinst(void *, struct usb_device *, @@ -155,13 +165,26 @@ static const struct usb_config u3g_confi .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = u3g_read_callback, }, + + [U3G_INTR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = u3g_intr_callback, + }, }; static const struct ucom_callback u3g_callback = { + .ucom_cfg_get_status = u3g_cfg_get_status, + .ucom_cfg_set_dtr = u3g_cfg_set_dtr, + .ucom_cfg_set_rts = u3g_cfg_set_rts, .ucom_start_read = u3g_start_read, .ucom_stop_read = u3g_stop_read, .ucom_start_write = u3g_start_write, .ucom_stop_write = u3g_stop_write, + .ucom_poll = u3g_poll, .ucom_free = u3g_free, }; @@ -849,6 +872,15 @@ u3g_attach(device_t dev) continue; } + iface = usbd_get_iface(uaa-device, i); + id = usbd_get_interface_descriptor(iface); + sc-sc_iface[nports] = id-bInterfaceNumber; + + if (bootverbose sc-sc_xfer[nports][U3G_INTR]) { + device_printf(dev, port %d supports modem control, + nports); + } + /* set stall by default */ mtx_lock(sc-sc_mtx); usbd_xfer_set_stall(sc-sc_xfer[nports][U3G_BULK_WR]); @@ -926,6 +958,9 @@ u3g_start_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom-sc_parent; + /* start interrupt endpoint (if configured) */ + usbd_transfer_start(sc-sc_xfer[ucom-sc_subunit][U3G_INTR]); + /* start read endpoint */ usbd_transfer_start(sc-sc_xfer[ucom-sc_subunit][U3G_BULK_RD]); } @@ -935,6 +970,9 @@ u3g_stop_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom-sc_parent; + /* stop interrupt endpoint (if configured) */ + usbd_transfer_stop(sc-sc_xfer[ucom-sc_subunit][U3G_INTR]); + /* stop read endpoint */ usbd_transfer_stop(sc-sc_xfer[ucom-sc_subunit][U3G_BULK_RD]); } @@
svn commit: r241555 - head/sys/dev/usb/serial
Author: n_hibma Date: Sun Oct 14 19:15:54 2012 New Revision: 241555 URL: http://svn.freebsd.org/changeset/base/241555 Log: Implement modem control in u3g. Tested on Option GTM382W, Huawei E220, and Sierra Wireless MC8790V. Also implement the .ucom_poll method. Note: This makes it possible to use lqr/echo in ppp.conf. And it resolves ppp hanging during the PPp phase. Reviewed by: hps MFC after:1 week Modified: head/sys/dev/usb/serial/u3g.c Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Sun Oct 14 18:13:33 2012 (r241554) +++ head/sys/dev/usb/serial/u3g.c Sun Oct 14 19:15:54 2012 (r241555) @@ -53,6 +53,7 @@ #include dev/usb/usb.h #include dev/usb/usbdi.h #include dev/usb/usbdi_util.h +#include dev/usb/usb_cdc.h #include usbdevs.h #defineUSB_DEBUG_VAR u3g_debug @@ -99,6 +100,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, enum { U3G_BULK_WR, U3G_BULK_RD, + U3G_INTR, U3G_N_TRANSFER, }; @@ -107,12 +109,15 @@ struct u3g_softc { struct ucom_softc sc_ucom[U3G_MAXPORTS]; struct usb_xfer *sc_xfer[U3G_MAXPORTS][U3G_N_TRANSFER]; + uint8_t sc_iface[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_lsr[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_msr[U3G_MAXPORTS]; /* u3g status register */ + uint16_t sc_line[U3G_MAXPORTS]; /* line status */ + struct usb_device *sc_udev; struct mtx sc_mtx; - uint8_t sc_lsr; /* local status register */ - uint8_t sc_msr; /* U3G status register */ - uint8_t sc_numports; + uint8_t sc_numports; }; static device_probe_t u3g_probe; @@ -122,12 +127,17 @@ static void u3g_free_softc(struct u3g_so static usb_callback_t u3g_write_callback; static usb_callback_t u3g_read_callback; +static usb_callback_t u3g_intr_callback; -static void u3g_free(struct ucom_softc *ucom); +static void u3g_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static void u3g_cfg_set_dtr(struct ucom_softc *, uint8_t); +static void u3g_cfg_set_rts(struct ucom_softc *, uint8_t); static void u3g_start_read(struct ucom_softc *ucom); static void u3g_stop_read(struct ucom_softc *ucom); static void u3g_start_write(struct ucom_softc *ucom); static void u3g_stop_write(struct ucom_softc *ucom); +static void u3g_poll(struct ucom_softc *ucom); +static void u3g_free(struct ucom_softc *ucom); static void u3g_test_autoinst(void *, struct usb_device *, @@ -155,13 +165,26 @@ static const struct usb_config u3g_confi .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = u3g_read_callback, }, + + [U3G_INTR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = u3g_intr_callback, + }, }; static const struct ucom_callback u3g_callback = { + .ucom_cfg_get_status = u3g_cfg_get_status, + .ucom_cfg_set_dtr = u3g_cfg_set_dtr, + .ucom_cfg_set_rts = u3g_cfg_set_rts, .ucom_start_read = u3g_start_read, .ucom_stop_read = u3g_stop_read, .ucom_start_write = u3g_start_write, .ucom_stop_write = u3g_stop_write, + .ucom_poll = u3g_poll, .ucom_free = u3g_free, }; @@ -849,6 +872,15 @@ u3g_attach(device_t dev) continue; } + iface = usbd_get_iface(uaa-device, i); + id = usbd_get_interface_descriptor(iface); + sc-sc_iface[nports] = id-bInterfaceNumber; + + if (bootverbose sc-sc_xfer[nports][U3G_INTR]) { + device_printf(dev, port %d supports modem control, + nports); + } + /* set stall by default */ mtx_lock(sc-sc_mtx); usbd_xfer_set_stall(sc-sc_xfer[nports][U3G_BULK_WR]); @@ -926,6 +958,9 @@ u3g_start_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom-sc_parent; + /* start interrupt endpoint (if configured) */ + usbd_transfer_start(sc-sc_xfer[ucom-sc_subunit][U3G_INTR]); + /* start read endpoint */ usbd_transfer_start(sc-sc_xfer[ucom-sc_subunit][U3G_BULK_RD]); } @@ -935,6 +970,9 @@ u3g_stop_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom-sc_parent; + /* stop interrupt endpoint (if configured) */ + usbd_transfer_stop(sc-sc_xfer[ucom-sc_subunit][U3G_INTR]); + /* stop read endpoint */ usbd_transfer_stop(sc-sc_xfer[ucom-sc_subunit][U3G_BULK_RD]); } @@ -1012,3 +1050,134 @@
svn commit: r241496 - head/usr.sbin/ppp
Author: n_hibma Date: Fri Oct 12 22:48:33 2012 New Revision: 241496 URL: http://svn.freebsd.org/changeset/base/241496 Log: Some 3G modems return the wrong signature in echo packets and make it impossible to use LQR/ECHO. They return want_magic instead. With this change it is now possible to use enable lqr set lqrperiod 5 enable echo set echoperiod 5 in your ppp.conf file. MFC after:3 days Modified: head/usr.sbin/ppp/lqr.c Modified: head/usr.sbin/ppp/lqr.c == --- head/usr.sbin/ppp/lqr.c Fri Oct 12 22:06:06 2012(r241495) +++ head/usr.sbin/ppp/lqr.c Fri Oct 12 22:48:33 2012(r241496) @@ -108,7 +108,8 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf * die as a result. */ } -if (lqr.signature == SIGNATURE) { +if (lqr.signature == SIGNATURE + || lqr.signature == lcp-want_magic) { /* some implementations return the wrong magic */ /* careful not to update lqm.echo.seq_recv with older values */ if ((hdlc-lqm.echo.seq_recv (u_int32_t)0 - 5 lqr.sequence 5) || (hdlc-lqm.echo.seq_recv = (u_int32_t)0 - 5 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r221612 - in stable/8/sys/dev/usb: . net serial
Author: n_hibma Date: Sat May 7 22:20:01 2011 New Revision: 221612 URL: http://svn.freebsd.org/changeset/base/221612 Log: MFC overview: - Fix busg in events provided to devd from the USB stack. - Provide more info on the u3g devices that attached. - Make the ucom device numbering more sane. MFC r214429 Add support for setting per-interface PnP information. MFC r214761 - Simplify the way unit/subunit allocation is done in ucom. - hw.usb.ucom.cons_unit is now split into hw.usb.ucom.cons_unit/...cons_subunit. Note: The tunable/sysctl hw.usb.ucom.cons_unit needs to be reviewed if a) a console was defined a USB serial devices, and a USB device with more than 1 subunit is present, and this device is attached before the device functioning as a console or b) a console was defined on a USB device with more than 1 subunit MFC r214809 Don't terminate the notification with \n. This is done in usb_device.c:devctl_notify_f(). MFC r214830 Bugfix: Move the 'at location string' to the beginning of the attach notification. devd would stop evaluating at 'at' (not 'k=v') and hence prevent 'port=X' (and 'bus=on string) from making it into the environment for the devd action. MFC r214831 - Remove an unused entry from the softc (only used in a debugging printf). - Fix the loop count on detach (causing a panic on detaching a serial dongle). - Increase a buffer in case some driver want extra long tty device names (postfixing the purpose of the tty for example, e.g. u3g.ppp). MFC r214843 Implement ucom_set_pnpinfo_usb() providing ttyname and port number information through devd. My E220 now produces the notification (1 line): +u3g0 at bus=1 hubaddr=1 port=0 devaddr=2 interface=0 \ vendor=0x12d1 product=0x1003 devclass=0x00 devsubclass=0x00 \ sernum= release=0x intclass=0xff intsubclass=0xff \ ttyname=U0 ttyports=2 on uhub0 Note: serial/ufoma and net/uhso still provide port number and tty name (uhso only) information through sysctls, which should now be removed. MFC r214919 Bugfix: Set the bit that marks a device number in use. This would cause a panic when disconnecting the second serial device. Modified: stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/serial/uark.c stable/8/sys/dev/usb/serial/ubsa.c stable/8/sys/dev/usb/serial/ubser.c stable/8/sys/dev/usb/serial/uchcom.c stable/8/sys/dev/usb/serial/ucycom.c stable/8/sys/dev/usb/serial/ufoma.c stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/serial/ugensa.c stable/8/sys/dev/usb/serial/uipaq.c stable/8/sys/dev/usb/serial/umct.c stable/8/sys/dev/usb/serial/umodem.c stable/8/sys/dev/usb/serial/umoscom.c stable/8/sys/dev/usb/serial/uplcom.c stable/8/sys/dev/usb/serial/usb_serial.c stable/8/sys/dev/usb/serial/usb_serial.h stable/8/sys/dev/usb/serial/uslcom.c stable/8/sys/dev/usb/serial/uvisor.c stable/8/sys/dev/usb/serial/uvscom.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usbdi.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/net/uhso.c == --- stable/8/sys/dev/usb/net/uhso.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/net/uhso.c Sat May 7 22:20:01 2011 (r221612) @@ -633,11 +633,10 @@ uhso_attach(device_t self) ht-ht_name[0] = 0; if (sc-sc_ttys == 1) - snprintf(ht-ht_name, 32, cuaU%d, ucom-sc_unit); + snprintf(ht-ht_name, 32, cuaU%d, ucom-sc_super-sc_unit); else { snprintf(ht-ht_name, 32, cuaU%d.%d, - ucom-sc_unit - ucom-sc_local_unit, - ucom-sc_local_unit); + ucom-sc_super-sc_unit, ucom-sc_subunit); } desc = uhso_port_type[port]; @@ -666,7 +665,7 @@ uhso_detach(device_t self) usbd_transfer_unsetup(sc-sc_xfer, 3); usbd_transfer_unsetup(sc-sc_ctrl_xfer, UHSO_CTRL_MAX); if (sc-sc_ttys 0) { - ucom_detach(sc-sc_super_ucom, sc-sc_ucom, sc-sc_ttys); + ucom_detach(sc-sc_super_ucom, sc-sc_ucom); for (i = 0; i sc-sc_ttys; i++) { if (sc-sc_tty[i].ht_muxport != -1) { @@ -903,6 +902,7 @@ uhso_probe_iface(struct uhso_softc *sc, device_printf(sc-sc_dev, ucom_attach failed\n); return (ENXIO); } +
svn commit: r221553 - in stable/8/sys/dev/usb: . serial
Author: n_hibma Date: Fri May 6 21:09:33 2011 New Revision: 221553 URL: http://svn.freebsd.org/changeset/base/221553 Log: MFC r217637,218178 Add another ID for the ZTE MF190 Surf Stick New ID for the Novatel MC547 Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c == --- stable/8/sys/dev/usb/serial/u3g.c Fri May 6 20:46:29 2011 (r221552) +++ stable/8/sys/dev/usb/serial/u3g.c Fri May 6 21:09:33 2011 (r221553) @@ -302,6 +302,7 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, EU740, 0), U3G_DEV(NOVATEL, EU870D, 0), U3G_DEV(NOVATEL, MC760, 0), + U3G_DEV(NOVATEL, MC547, 0), U3G_DEV(NOVATEL, MC950D, 0), U3G_DEV(NOVATEL, U720, 0), U3G_DEV(NOVATEL, U727, 0), @@ -415,6 +416,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E0078, 0), U3G_DEV(QUALCOMMINC, E0082, 0), U3G_DEV(QUALCOMMINC, E0086, 0), + U3G_DEV(QUALCOMMINC, SURFSTICK, 0), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), Modified: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsFri May 6 20:46:29 2011 (r221552) +++ stable/8/sys/dev/usb/usbdevsFri May 6 21:09:33 2011 (r221553) @@ -2385,6 +2385,7 @@ product NOVATEL ZEROCD2 0x5030 Novatel product NOVATEL U727_2 0x5100 Merlin U727 CDMA product NOVATEL U760 0x6000 Novatel U760 product NOVATEL MC760 0x6002 Novatel MC760 +product NOVATEL MC547 0x7042 Novatel MC547 product NOVATEL2 FLEXPACKGPS 0x0100 NovAtel FlexPack GPS receiver /* Merlin products */ @@ -2693,6 +2694,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 SURFSTICK 0x0117 11 Surf Stick product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r218422 - in head/sys/dev/usb: . quirk
Author: n_hibma Date: Mon Feb 7 22:37:27 2011 New Revision: 218422 URL: http://svn.freebsd.org/changeset/base/218422 Log: Curitel UM150 needs a quirk to stop it from detaching straight after attach (resetting actually). Submitted by: Oleg Nauman MFC after:1 week 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 Mon Feb 7 22:33:39 2011 (r218421) +++ head/sys/dev/usb/quirk/usb_quirk.c Mon Feb 7 22:37:27 2011 (r218422) @@ -136,6 +136,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(SIEMENS2, ES75, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(QUALCOMM, CDMA_MSM, 0x, 0x, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(QUALCOMM2, CDMA_MSM, 0x, 0x, UQ_ASSUME_CM_OVER_DATA), + USB_QUIRK(CURITEL, UM150, 0x, 0x, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM175, 0x, 0x, UQ_ASSUME_CM_OVER_DATA), /* USB Mass Storage Class Quirks */ Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsMon Feb 7 22:33:39 2011(r218421) +++ head/sys/dev/usb/usbdevsMon Feb 7 22:37:27 2011(r218422) @@ -1309,6 +1309,7 @@ product CTX EX13000x Ex1300 hub product CURITEL HX550C 0x1101 CDMA 2000 1xRTT USB modem (HX-550C) product CURITEL HX57XB 0x2101 CDMA 2000 1xRTT USB modem (HX-570/575B/PR-600) product CURITEL PC5740 0x3701 Broadband Wireless modem +product CURITEL UM150 0x3711 EVDO modem product CURITEL UM175 0x3714 EVDO modem /* CyberPower products */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r218178 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Tue Feb 1 22:26:06 2011 New Revision: 218178 URL: http://svn.freebsd.org/changeset/base/218178 Log: New ID for the Novatel MC547 PR: 154127 Submitted by: Mike Tancsa MFC after:1 day 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 Tue Feb 1 21:15:35 2011 (r218177) +++ head/sys/dev/usb/serial/u3g.c Tue Feb 1 22:26:06 2011 (r218178) @@ -302,6 +302,7 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, EU740, 0), U3G_DEV(NOVATEL, EU870D, 0), U3G_DEV(NOVATEL, MC760, 0), + U3G_DEV(NOVATEL, MC547, 0), U3G_DEV(NOVATEL, MC950D, 0), U3G_DEV(NOVATEL, U720, 0), U3G_DEV(NOVATEL, U727, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Feb 1 21:15:35 2011(r218177) +++ head/sys/dev/usb/usbdevsTue Feb 1 22:26:06 2011(r218178) @@ -2387,6 +2387,7 @@ product NOVATEL ZEROCD2 0x5030 Novatel product NOVATEL U727_2 0x5100 Merlin U727 CDMA product NOVATEL U760 0x6000 Novatel U760 product NOVATEL MC760 0x6002 Novatel MC760 +product NOVATEL MC547 0x7042 Novatel MC547 product NOVATEL2 FLEXPACKGPS 0x0100 NovAtel FlexPack GPS receiver /* Merlin products */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r217637 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Thu Jan 20 13:02:54 2011 New Revision: 217637 URL: http://svn.freebsd.org/changeset/base/217637 Log: Add another ID for the ZTE MF190 Surf Stick Submitted by: nagilum MFC after:1 day 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 Jan 20 12:45:29 2011 (r217636) +++ head/sys/dev/usb/serial/u3g.c Thu Jan 20 13:02:54 2011 (r217637) @@ -415,6 +415,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E0078, 0), U3G_DEV(QUALCOMMINC, E0082, 0), U3G_DEV(QUALCOMMINC, E0086, 0), + U3G_DEV(QUALCOMMINC, SURFSTICK, 0), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsThu Jan 20 12:45:29 2011(r217636) +++ head/sys/dev/usb/usbdevsThu Jan 20 13:02:54 2011(r217637) @@ -2695,6 +2695,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 SURFSTICK 0x0117 11 Surf Stick product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r216074 - head/share/man/man4
Author: n_hibma Date: Tue Nov 30 09:34:47 2010 New Revision: 216074 URL: http://svn.freebsd.org/changeset/base/216074 Log: Fix two errors in the man page Submitted by: ruslan MFC after:1 day Modified: head/share/man/man4/usb_quirk.4 Modified: head/share/man/man4/usb_quirk.4 == --- head/share/man/man4/usb_quirk.4 Tue Nov 30 08:39:05 2010 (r216073) +++ head/share/man/man4/usb_quirk.4 Tue Nov 30 09:34:47 2010 (r216074) @@ -27,7 +27,7 @@ To compile this module into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent -.Cd device ucom +.Cd device usb .Ed .Pp Alternatively, to load the module at boot @@ -183,7 +183,6 @@ device which appears as a USB device on usbconfig -d ugen0.3 add_quirk UQ_MSC_EJECT_WAIT .Ed .Sh SEE ALSO -.Xr usb_quirk 4 , .Xr usbconfig 5 .Sh HISTORY The ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r216018 - in stable/8: share/man/man4 sys/dev/usb/quirk sys/dev/usb/serial usr.sbin/usbconfig
+.It UQ_KBD_IGNORE +device should be ignored by kbd class +.It UQ_KBD_BOOTPROTO +device should set the boot protocol +.It UQ_MS_BAD_CLASS +doesn't identify properly +.It UQ_MS_LEADING_BYTE +mouse sends an unknown leading byte +.It UQ_MS_REVZ +mouse has Z-axis reversed +.It UQ_NO_STRINGS +string descriptors are broken +.It UQ_OPEN_CLEARSTALL +device needs clear endpoint stall +.It UQ_POWER_CLAIM +hub lies about power status +.It UQ_SPUR_BUT_UP +spurious mouse button up events +.It UQ_SWAP_UNICODE +has some Unicode strings swapped +.It UQ_CFG_INDEX_1 +select configuration index 1 by default +.It UQ_CFG_INDEX_2 +select configuration index 2 by default +.It UQ_CFG_INDEX_3 +select configuration index 3 by default +.It UQ_CFG_INDEX_4 +select configuration index 4 by default +.It UQ_CFG_INDEX_0 +select configuration index 0 by default +.It UQ_ASSUME_CM_OVER_DATA +assume cm over data feature +.El +.Sh USB Mass Storage Quirks +.Bl -tag -width Ds +.It UQ_MSC_NO_TEST_UNIT_READY +send start/stop instead of TUR +.It UQ_MSC_NO_RS_CLEAR_UA +does not reset Unit Att. +.It UQ_MSC_NO_START_STOP +does not support start/stop +.It UQ_MSC_NO_GETMAXLUN +does not support get max LUN +.It UQ_MSC_NO_INQUIRY +fake generic inq response +.It UQ_MSC_NO_INQUIRY_EVPD +does not support inq EVPD +.It UQ_MSC_NO_SYNC_CACHE +does not support sync cache +.It UQ_MSC_SHUTTLE_INIT +requires Shuttle init sequence +.It UQ_MSC_ALT_IFACE_1 +switch to alternate interface 1 +.It UQ_MSC_FLOPPY_SPEED +does floppy speeds (20kb/s) +.It UQ_MSC_IGNORE_RESIDUE +gets residue wrong +.It UQ_MSC_WRONG_CSWSIG +uses wrong CSW signature +.It UQ_MSC_RBC_PAD_TO_12 +pad RBC requests to 12 bytes +.It UQ_MSC_READ_CAP_OFFBY1 +reports sector count, not max sec. +.It UQ_MSC_FORCE_SHORT_INQ +does not support full inq. +.It UQ_MSC_FORCE_WIRE_BBB +force BBB wire protocol +.It UQ_MSC_FORCE_WIRE_CBI +force CBI wire protocol +.It UQ_MSC_FORCE_WIRE_CBI_I +force CBI with int. wire protocol +.It UQ_MSC_FORCE_PROTO_SCSI +force SCSI command protocol +.It UQ_MSC_FORCE_PROTO_ATAPI +force ATAPI command protocol +.It UQ_MSC_FORCE_PROTO_UFI +force UFI command protocol +.It UQ_MSC_FORCE_PROTO_RBC +force RBC command protocol +.El +.Sh Mass Storage Change (u3g) quirks: +.Bl -tag -width Ds +.It UQ_MSC_EJECT_HUAWEI +ejects after Huawei USB command +.It UQ_MSC_EJECT_SIERRA +ejects after Sierra USB command +.It UQ_MSC_EJECT_SCSIEJECT +ejects after SCSI eject command +0x1b000200 +.It UQ_MSC_EJECT_REZERO +ejects after SCSI rezero command +0x0100 +.It UQ_MSC_EJECT_ZTESTOR +ejects after ZTE SCSI command +0x85010101180101010101 +.It UQ_MSC_EJECT_CMOTECH +ejects after C-motech SCSI command +0xff52444556434847 +.It UQ_MSC_EJECT_WAIT +wait for the device to eject +.It UQ_MSC_EJECT_SAEL_M460 +ejects after Sael USB commands +.It UQ_MSC_EJECT_HUAWEISCSI +ejects after Huawei SCSI command +0x1106 +.It UQ_MSC_EJECT_TCT +ejects after TCT SCSI command +0x06f504025270 +.El +See +.Pa /sys/dev/usb/quirk/usb_quirk.h +for the complete list of supported quirks. +.Sh EXAMPLES +After attaching a +.Nm u3g +device which appears as a USB device on +.Pa ugen0.3 : +.Bd -literal -offset indent +usbconfig -d ugen0.3 add_quirk UQ_MSC_EJECT_WAIT +.Ed +.Sh SEE ALSO +.Xr usb_quirk 4 , +.Xr usbconfig 5 +.Sh HISTORY +The +.Nm +module appeared in +.Fx 8.0 , +and was written by +.An Hans Petter Selasky Aq hsela...@freebsd.org . +This manual page was written by +.An Nick Hibma Aq n_hi...@freebsd.org . Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c == --- stable/8/sys/dev/usb/quirk/usb_quirk.c Sun Nov 28 20:56:51 2010 (r216017) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Sun Nov 28 22:07:08 2010 (r216018) @@ -512,6 +512,16 @@ static const char *usb_quirk_str[USB_QUI [UQ_MSC_FORCE_PROTO_ATAPI] = UQ_MSC_FORCE_PROTO_ATAPI, [UQ_MSC_FORCE_PROTO_UFI]= UQ_MSC_FORCE_PROTO_UFI, [UQ_MSC_FORCE_PROTO_RBC]= UQ_MSC_FORCE_PROTO_RBC, + [UQ_MSC_EJECT_HUAWEI] = UQ_MSC_EJECT_HUAWEI, + [UQ_MSC_EJECT_SIERRA] = UQ_MSC_EJECT_SIERRA, + [UQ_MSC_EJECT_SCSIEJECT]= UQ_MSC_EJECT_SCSIEJECT, + [UQ_MSC_EJECT_REZERO] = UQ_MSC_EJECT_REZERO, + [UQ_MSC_EJECT_ZTESTOR] = UQ_MSC_EJECT_ZTESTOR, + [UQ_MSC_EJECT_CMOTECH] = UQ_MSC_EJECT_CMOTECH, + [UQ_MSC_EJECT_WAIT] = UQ_MSC_EJECT_WAIT, + [UQ_MSC_EJECT_SAEL_M460]= UQ_MSC_EJECT_SAEL_M460, + [UQ_MSC_EJECT_HUAWEISCSI] = UQ_MSC_EJECT_HUAWEISCSI, + [UQ_MSC_EJECT_TCT] = UQ_MSC_EJECT_TCT, }; /** Modified: stable/8/sys/dev/usb/quirk/usb_quirk.h == --- stable/8/sys/dev/usb/quirk/usb_quirk.h Sun Nov 28 20:56:51 2010 (r216017) +++ stable/8/sys
svn commit: r215795 - stable/8/sys/dev/usb/serial
Author: n_hibma Date: Wed Nov 24 09:36:36 2010 New Revision: 215795 URL: http://svn.freebsd.org/changeset/base/215795 Log: MFC 213876: Add more USB device IDs to supported list of devices. Modified: stable/8/sys/dev/usb/serial/uftdi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/serial/uftdi.c == --- stable/8/sys/dev/usb/serial/uftdi.c Wed Nov 24 08:09:33 2010 (r215794) +++ stable/8/sys/dev/usb/serial/uftdi.c Wed Nov 24 09:36:36 2010 (r215795) @@ -233,6 +233,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), @@ -254,6 +255,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-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r215734 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Tue Nov 23 08:15:14 2010 New Revision: 215734 URL: http://svn.freebsd.org/changeset/base/215734 Log: Make the Huawei E1820 work (Emile Coetzee). Shorten the descriptive strings for Huawei devices. The vendor or operator name should not be included in the device name. Submitted by: Emile Coetzee MFC after:3 days 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 Tue Nov 23 06:31:09 2010 (r215733) +++ head/sys/dev/usb/serial/u3g.c Tue Nov 23 08:15:14 2010 (r215734) @@ -281,12 +281,12 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E143D, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E143E, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E143F, U3GINIT_HUAWEI), - U3G_DEV(HUAWEI, E14AC, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E180V, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, K3765_INIT, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Nov 23 06:31:09 2010(r215733) +++ head/sys/dev/usb/usbdevsTue Nov 23 08:15:14 2010(r215734) @@ -1789,8 +1789,8 @@ product HTC LEGENDINTERNET0x0ffe HTC Le /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile -product HUAWEI E2200x1003 Huawei HSDPA modem -product HUAWEI E220BIS 0x1004 Huawei HSDPA modem +product HUAWEI E2200x1003 HSDPA modem +product HUAWEI E220BIS 0x1004 HSDPA modem product HUAWEI E1401 0x1401 3G modem product HUAWEI E1402 0x1402 3G modem product HUAWEI E1403 0x1403 3G modem @@ -1802,7 +1802,7 @@ product HUAWEI E1408 0x1408 3G modem product HUAWEI E1409 0x1409 3G modem product HUAWEI E140A 0x140a 3G modem product HUAWEI E140B 0x140b 3G modem -product HUAWEI E180V 0x140c Huawei Mobile E180V +product HUAWEI E180V 0x140c E180V product HUAWEI E140D 0x140d 3G modem product HUAWEI E140E 0x140e 3G modem product HUAWEI E140F 0x140f 3G modem @@ -1856,8 +1856,8 @@ product HUAWEI E143E 0x143e 3G modem product HUAWEI E143F 0x143f 3G modem product HUAWEI E1752 0x1446 3G modem product HUAWEI K3765 0x1465 3G modem -product HUAWEI E14AC 0x14ac 3G modem -product HUAWEI K3765_INIT 0x1520 HUAWEI Mobile K3765 Initial +product HUAWEI E1820 0x14ac E1820 HSPA+ USB Slider +product HUAWEI K3765_INIT 0x1520 K3765 Initial /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r215762 - in stable/8/sys/dev/usb: . quirk
Author: n_hibma Date: Tue Nov 23 19:22:44 2010 New Revision: 215762 URL: http://svn.freebsd.org/changeset/base/215762 Log: MFC r213856 - Add more USB devices to usbdevs and rename some previously unknown ones. - Add more USB mass storage quirks. Note: In this MFC the QUALCOMMINC E2000 entry is left intact as it is in use. Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c == --- stable/8/sys/dev/usb/quirk/usb_quirk.c Tue Nov 23 19:21:44 2010 (r215761) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Tue Nov 23 19:22:44 2010 (r215762) @@ -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: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsTue Nov 23 19:21:44 2010 (r215761) +++ stable/8/sys/dev/usb/usbdevsTue Nov 23 19:22:44 2010 (r215762) @@ -65,7 +65,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 @@ -410,7 +410,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. @@ -658,18 +658,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
svn commit: r215723 - stable/8/sys/netinet/libalias
Author: n_hibma Date: Mon Nov 22 22:41:43 2010 New Revision: 215723 URL: http://svn.freebsd.org/changeset/base/215723 Log: MFC r214754: Don't spam the console with 'Loading alias module' messages. This cannot be hidden behind 'bootverbose' as this file is included from userland. Modified: stable/8/sys/netinet/libalias/alias.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/libalias/alias.c == --- stable/8/sys/netinet/libalias/alias.c Mon Nov 22 22:13:26 2010 (r215722) +++ stable/8/sys/netinet/libalias/alias.c Mon Nov 22 22:41:43 2010 (r215723) @@ -1665,7 +1665,6 @@ LibAliasRefreshModules(void) if (buf[i] == '#') continue; buf[len - 1] = '\0'; - printf(Loading %s\n, buf); LibAliasLoadModule(buf); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r215258 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Sat Nov 13 20:45:16 2010 New Revision: 215258 URL: http://svn.freebsd.org/changeset/base/215258 Log: Add the switch config for the XS Stick. It speaks AT commands on 2 out of 3 serial ports, but it has not been verified to work at all speaking PPP yet. 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 Sat Nov 13 20:41:47 2010 (r215257) +++ head/sys/dev/usb/serial/u3g.c Sat Nov 13 20:45:16 2010 (r215258) @@ -291,6 +291,8 @@ static const struct usb_device_id u3g_de U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), + U3G_DEV(LONGCHEER, DISK, U3GINIT_TCT), + U3G_DEV(LONGCHEER, W14, 0), U3G_DEV(MERLIN, V620, 0), U3G_DEV(NEOTEL, PRIME, 0), U3G_DEV(NOVATEL, E725, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSat Nov 13 20:41:47 2010(r215257) +++ head/sys/dev/usb/usbdevsSat Nov 13 20:45:16 2010(r215258) @@ -2086,7 +2086,10 @@ product LOGITEC RT2870_2 0x0163 RT2870 product LOGITEC RT2870_3 0x0164 RT2870 /* Longcheer Holdings, Ltd. products */ -product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA USB modem +product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA +product LONGCHEER W14 0x9603 Mobilcom W14 +product LONGCHEER DISK 0xf000 Driver disk + /* Lucent products */ product LUCENT EVALKIT 0x1001 USS-720 evaluation kit ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r215095 - in head/sys/dev/usb: quirk serial
Author: n_hibma Date: Wed Nov 10 18:41:38 2010 New Revision: 215095 URL: http://svn.freebsd.org/changeset/base/215095 Log: Allow specification of eject method through quirks, so people can test drive eject methods before supplying patches. Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/quirk/usb_quirk.h head/sys/dev/usb/serial/u3g.c Modified: head/sys/dev/usb/quirk/usb_quirk.c == --- head/sys/dev/usb/quirk/usb_quirk.c Wed Nov 10 18:37:03 2010 (r215094) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Nov 10 18:41:38 2010 (r215095) @@ -512,6 +512,16 @@ static const char *usb_quirk_str[USB_QUI [UQ_MSC_FORCE_PROTO_ATAPI] = UQ_MSC_FORCE_PROTO_ATAPI, [UQ_MSC_FORCE_PROTO_UFI]= UQ_MSC_FORCE_PROTO_UFI, [UQ_MSC_FORCE_PROTO_RBC]= UQ_MSC_FORCE_PROTO_RBC, + [UQ_MSC_EJECT_HUAWEI] = UQ_MSC_EJECT_HUAWEI, + [UQ_MSC_EJECT_SIERRA] = UQ_MSC_EJECT_SIERRA, + [UQ_MSC_EJECT_SCSIEJECT]= UQ_MSC_EJECT_SCSIEJECT, + [UQ_MSC_EJECT_REZERO] = UQ_MSC_EJECT_REZERO, + [UQ_MSC_EJECT_ZTESTOR] = UQ_MSC_EJECT_ZTESTOR, + [UQ_MSC_EJECT_CMOTECH] = UQ_MSC_EJECT_CMOTECH, + [UQ_MSC_EJECT_WAIT] = UQ_MSC_EJECT_WAIT, + [UQ_MSC_EJECT_SAEL_M460]= UQ_MSC_EJECT_SAEL_M460, + [UQ_MSC_EJECT_HUAWEISCSI] = UQ_MSC_EJECT_HUAWEISCSI, + [UQ_MSC_EJECT_TCT] = UQ_MSC_EJECT_TCT, }; /** Modified: head/sys/dev/usb/quirk/usb_quirk.h == --- head/sys/dev/usb/quirk/usb_quirk.h Wed Nov 10 18:37:03 2010 (r215094) +++ head/sys/dev/usb/quirk/usb_quirk.h Wed Nov 10 18:41:38 2010 (r215095) @@ -59,31 +59,43 @@ enum { /* keep in sync with usb_quirk_st UQ_CFG_INDEX_3, /* select configuration index 3 by default */ UQ_CFG_INDEX_4, /* select configuration index 4 by default */ UQ_CFG_INDEX_0, /* select configuration index 0 by default */ - UQ_ASSUME_CM_OVER_DATA, /* modem device breaks on cm over data */ + UQ_ASSUME_CM_OVER_DATA, /* assume cm over data feature */ /* USB Mass Storage Quirks. See storage/umass.c for a detailed description. */ - UQ_MSC_NO_TEST_UNIT_READY, - UQ_MSC_NO_RS_CLEAR_UA, - UQ_MSC_NO_START_STOP, - UQ_MSC_NO_GETMAXLUN, - UQ_MSC_NO_INQUIRY, - UQ_MSC_NO_INQUIRY_EVPD, - UQ_MSC_NO_SYNC_CACHE, - UQ_MSC_SHUTTLE_INIT, - UQ_MSC_ALT_IFACE_1, - UQ_MSC_FLOPPY_SPEED, - UQ_MSC_IGNORE_RESIDUE, - UQ_MSC_WRONG_CSWSIG, - UQ_MSC_RBC_PAD_TO_12, - UQ_MSC_READ_CAP_OFFBY1, - UQ_MSC_FORCE_SHORT_INQ, - UQ_MSC_FORCE_WIRE_BBB, - UQ_MSC_FORCE_WIRE_CBI, - UQ_MSC_FORCE_WIRE_CBI_I, - UQ_MSC_FORCE_PROTO_SCSI, - UQ_MSC_FORCE_PROTO_ATAPI, - UQ_MSC_FORCE_PROTO_UFI, - UQ_MSC_FORCE_PROTO_RBC, + UQ_MSC_NO_TEST_UNIT_READY, /* send start/stop instead of TUR */ + UQ_MSC_NO_RS_CLEAR_UA, /* does not reset Unit Att. */ + UQ_MSC_NO_START_STOP, /* does not support start/stop */ + UQ_MSC_NO_GETMAXLUN,/* does not support get max LUN */ + UQ_MSC_NO_INQUIRY, /* fake generic inq response */ + UQ_MSC_NO_INQUIRY_EVPD, /* does not support inq EVPD */ + UQ_MSC_NO_SYNC_CACHE, /* does not support sync cache */ + UQ_MSC_SHUTTLE_INIT,/* requires Shuttle init sequence */ + UQ_MSC_ALT_IFACE_1, /* switch to alternate interface 1 */ + UQ_MSC_FLOPPY_SPEED,/* does floppy speeds (20kb/s) */ + UQ_MSC_IGNORE_RESIDUE, /* gets residue wrong */ + UQ_MSC_WRONG_CSWSIG,/* uses wrong CSW signature */ + UQ_MSC_RBC_PAD_TO_12, /* pad RBC requests to 12 bytes */ + UQ_MSC_READ_CAP_OFFBY1, /* reports sector count, not max sec. */ + UQ_MSC_FORCE_SHORT_INQ, /* does not support full inq. */ + UQ_MSC_FORCE_WIRE_BBB, /* force BBB wire protocol */ + UQ_MSC_FORCE_WIRE_CBI, /* force CBI wire protocol */ + UQ_MSC_FORCE_WIRE_CBI_I,/* force CBI with int. wire protocol */ + UQ_MSC_FORCE_PROTO_SCSI,/* force SCSI command protocol */ + UQ_MSC_FORCE_PROTO_ATAPI, /* force ATAPI command protocol */ + UQ_MSC_FORCE_PROTO_UFI, /* force UFI command protocol */ + UQ_MSC_FORCE_PROTO_RBC, /* force RBC command protocol */ + + /* Ejection of mass storage (driver disk) */ + UQ_MSC_EJECT_HUAWEI,/* ejects after Huawei USB command */ + UQ_MSC_EJECT_SIERRA,/* ejects after Sierra USB command */ +
svn commit: r215104 - in head: share/man/man4 sys/dev/usb/quirk usr.sbin/usbconfig
...@freebsd.org . +This manual page was written by .An Nick Hibma Aq n_hi...@freebsd.org . -Hardware for testing was provided by AnyWi Technologies, Leiden, NL. Modified: head/sys/dev/usb/quirk/usb_quirk.h == --- head/sys/dev/usb/quirk/usb_quirk.h Wed Nov 10 23:36:13 2010 (r215103) +++ head/sys/dev/usb/quirk/usb_quirk.h Wed Nov 10 23:45:44 2010 (r215104) @@ -27,11 +27,14 @@ #ifndef _USB_QUIRK_H_ #define_USB_QUIRK_H_ -/* NOTE: UQ_NONE is not a valid quirk */ -enum { /* keep in sync with usb_quirk_str table */ - UQ_NONE, +enum { + /* +* Keep in sync with theusb_quirk_str usb_quirk.c, and with the +* share/man/man4/usb_quirk.4 +*/ + UQ_NONE,/* not a valid quirk */ - UQ_MATCH_VENDOR_ONLY, + UQ_MATCH_VENDOR_ONLY, /* match quirk on vendor only */ /* Various quirks */ Modified: head/usr.sbin/usbconfig/usbconfig.8 == --- head/usr.sbin/usbconfig/usbconfig.8 Wed Nov 10 23:36:13 2010 (r215103) +++ head/usr.sbin/usbconfig/usbconfig.8 Wed Nov 10 23:45:44 2010 (r215104) @@ -92,5 +92,9 @@ Display a list of available quirk names: .Pp .Dl usbconfig dump_quirk_names .Pp +See +.Xr usb_quirk 4 +for more information on quirks. .Sh SEE ALSO -.Xr usb 4 +.Xr usb 4 , +.Xr usb_quirk 4 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214919 - head/sys/dev/usb/serial
Author: n_hibma Date: Sun Nov 7 15:36:07 2010 New Revision: 214919 URL: http://svn.freebsd.org/changeset/base/214919 Log: Bugfix: Set the bit that marks a device number in use. This would cause a panic when disconnecting the second serial device. Submitted by: Lucius Windschuh 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.cSun Nov 7 14:39:40 2010 (r214918) +++ head/sys/dev/usb/serial/usb_serial.cSun Nov 7 15:36:07 2010 (r214919) @@ -200,9 +200,12 @@ ucom_unit_alloc(void) mtx_lock(ucom_bitmap_mtx); - for (unit = 0; unit UCOM_UNIT_MAX; unit++) - if ((ucom_bitmap[unit / 8] (1 (unit % 8))) == 0) + for (unit = 0; unit UCOM_UNIT_MAX; unit++) { + if ((ucom_bitmap[unit / 8] (1 (unit % 8))) == 0) { + ucom_bitmap[unit / 8] |= (1 (unit % 8)); break; + } + } mtx_unlock(ucom_bitmap_mtx); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214955 - head/tools/tools/nanobsd
Author: n_hibma Date: Sun Nov 7 21:57:57 2010 New Revision: 214955 URL: http://svn.freebsd.org/changeset/base/214955 Log: - Set -x flag when executing customisation scripts to aid in debugging them. - Use KERNCONFDIR with KERNCONF instead of copying the kernel config into the source tree so included kernel configs work. - Put more stuff in the _.bk/_.ik log file, not just make statements. - Add the kernel config name to the pprint during kernel installation. - Add NANO_MODULES providing a list of modules to build and install. Reviewed by: imp MFC after:2 weeks Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh == --- head/tools/tools/nanobsd/nanobsd.sh Sun Nov 7 21:48:49 2010 (r214954) +++ head/tools/tools/nanobsd/nanobsd.sh Sun Nov 7 21:57:57 2010 (r214955) @@ -75,6 +75,9 @@ CONF_WORLD=' ' # Kernel config file to use NANO_KERNEL=GENERIC +# Kernel modules to build; default is none +NANO_MODULES= + # Customize commands. NANO_CUSTOMIZE= @@ -189,19 +192,26 @@ build_kernel ( ) ( pprint 2 build kernel ($NANO_KERNEL) pprint 3 log: ${MAKEOBJDIRPREFIX}/_.bk + ( if [ -f ${NANO_KERNEL} ] ; then - cp ${NANO_KERNEL} ${NANO_SRC}/sys/${NANO_ARCH}/conf + kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) + kernconf=$(basename ${NANO_KERNEL}) + else + kernconf=${NANO_KERNEL} fi - (cd ${NANO_SRC}; + cd ${NANO_SRC}; # unset these just in case to avoid compiler complaints # when cross-building unset TARGET_CPUTYPE unset TARGET_BIG_ENDIAN + # Note: We intentionally build all modules, not only the ones in + # NANO_MODULES so the built world can be reused by multiple images. env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ - __MAKE_CONF=${NANO_MAKE_CONF_BUILD} KERNCONF=`basename ${NANO_KERNEL}` \ -${MAKEOBJDIRPREFIX}/_.bk 21 - ) + __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ + ${kernconfdir:+KERNCONFDIR=}${kernconfdir} \ + KERNCONF=${kernconf} + ) ${MAKEOBJDIRPREFIX}/_.bk 21 ) clean_world ( ) ( @@ -258,14 +268,25 @@ install_etc ( ) ( ) install_kernel ( ) ( - pprint 2 install kernel + pprint 2 install kernel ($NANO_KERNEL) pprint 3 log: ${NANO_OBJ}/_.ik + ( + if [ -f ${NANO_KERNEL} ] ; then + kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) + kernconf=$(basename ${NANO_KERNEL}) + else + kernconf=${NANO_KERNEL} + fi + cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} KERNCONF=`basename ${NANO_KERNEL}` \ -${NANO_OBJ}/_.ik 21 + __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ + ${kernconfdir:+KERNCONFDIR=}${kernconfdir} \ + KERNCONF=${kernconf} \ + MODULES_OVERRIDE=${NANO_MODULES} + ) ${NANO_OBJ}/_.ik 21 ) run_customize() ( @@ -276,7 +297,7 @@ run_customize() ( pprint 2 customize \$c\ pprint 3 log: ${NANO_OBJ}/_.cust.$c pprint 4 `type $c` - ( $c ) ${NANO_OBJ}/_.cust.$c 21 + ( set -x ; $c ) ${NANO_OBJ}/_.cust.$c 21 done ) @@ -288,7 +309,7 @@ run_late_customize() ( pprint 2 late customize \$c\ pprint 3 log: ${NANO_OBJ}/_.late_cust.$c pprint 4 `type $c` - ( $c ) ${NANO_OBJ}/_.late_cust.$c 21 + ( set -x ; $c ) ${NANO_OBJ}/_.late_cust.$c 21 done ) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214830 - head/sys/dev/usb
Author: n_hibma Date: Fri Nov 5 08:30:16 2010 New Revision: 214830 URL: http://svn.freebsd.org/changeset/base/214830 Log: Bugfix: Move the 'at location string' to the beginning of the attach notification. devd would stop evaluating at 'at' (not 'k=v') and hence prevent 'port=X' (and 'bus=on string) from making it into the environment for the devd action. Reviewed by: hselasky MFC after:2 weeks Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c == --- head/sys/dev/usb/usb_device.c Fri Nov 5 07:49:47 2010 (r214829) +++ head/sys/dev/usb/usb_device.c Fri Nov 5 08:30:16 2010 (r214830) @@ -2426,14 +2426,13 @@ usb_notify_addq_compat(const char *type, #if USB_HAVE_UGEN %s #endif + at port=%u vendor=0x%04x product=0x%04x devclass=0x%02x devsubclass=0x%02x sernum=\%s\ release=0x%04x - at - port=%u #if USB_HAVE_UGEN on %s\n #endif @@ -2442,13 +2441,13 @@ usb_notify_addq_compat(const char *type, #if USB_HAVE_UGEN udev-ugen_name, #endif + udev-port_no, UGETW(udev-ddesc.idVendor), UGETW(udev-ddesc.idProduct), udev-ddesc.bDeviceClass, udev-ddesc.bDeviceSubClass, usb_get_serial(udev), - UGETW(udev-ddesc.bcdDevice), - udev-port_no + UGETW(udev-ddesc.bcdDevice) #if USB_HAVE_UGEN , udev-parent_hub != NULL ? udev-parent_hub-ugen_name : ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214831 - head/sys/dev/usb/serial
Author: n_hibma Date: Fri Nov 5 09:06:23 2010 New Revision: 214831 URL: http://svn.freebsd.org/changeset/base/214831 Log: - Remove an unused entry from the softc (only used in a debugging printf). - Fix the loop count on detach (causing a panic on detaching a serial dongle). - Increase a buffer in case some driver want extra long tty device names (postfixing the purpose of the tty for example, e.g. u3g.ppp). Modified: head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h Modified: head/sys/dev/usb/serial/usb_serial.c == --- head/sys/dev/usb/serial/usb_serial.cFri Nov 5 08:30:16 2010 (r214830) +++ head/sys/dev/usb/serial/usb_serial.cFri Nov 5 09:06:23 2010 (r214831) @@ -255,7 +255,7 @@ ucom_attach(struct ucom_super_softc *ssc } ssc-sc_subunits = subunits; - for (subunit = 0; subunit != ssc-sc_subunits; subunit++) { + for (subunit = 0; subunit ssc-sc_subunits; subunit++) { sc[subunit].sc_subunit = subunit; sc[subunit].sc_super = ssc; sc[subunit].sc_mtx = mtx; @@ -270,8 +270,8 @@ ucom_attach(struct ucom_super_softc *ssc sc[subunit].sc_flag |= UCOM_FLAG_ATTACHED; } - DPRINTF(tp = %p, unit = %d, subunits = %d, device name subunit 0 = %s\n, - sc-sc_tty, ssc-sc_unit, ssc-sc_subunits, sc[0].sc_devname); + DPRINTF(tp = %p, unit = %d, subunits = %d\n, + sc-sc_tty, ssc-sc_unit, ssc-sc_subunits); return (0); } @@ -287,7 +287,7 @@ ucom_detach(struct ucom_super_softc *ssc usb_proc_drain(ssc-sc_tq); - for (subunit = 0; subunit = ssc-sc_subunits; subunit++) { + for (subunit = 0; subunit ssc-sc_subunits; subunit++) { if (sc[subunit].sc_flag UCOM_FLAG_ATTACHED) { ucom_detach_tty(sc[subunit]); @@ -304,7 +304,7 @@ static int ucom_attach_tty(struct ucom_super_softc *ssc, struct ucom_softc *sc) { struct tty *tp; - char buf[10]; /* temporary TTY device name buffer */ + char buf[32]; /* temporary TTY device name buffer */ tp = tty_alloc_mutex(ucom_class, sc, sc-sc_mtx); if (tp == NULL) Modified: head/sys/dev/usb/serial/usb_serial.h == --- head/sys/dev/usb/serial/usb_serial.hFri Nov 5 08:30:16 2010 (r214830) +++ head/sys/dev/usb/serial/usb_serial.hFri Nov 5 09:06:23 2010 (r214831) @@ -160,7 +160,6 @@ struct ucom_softc { const struct ucom_callback *sc_callback; struct ucom_super_softc *sc_super; struct tty *sc_tty; - char sc_devname[10]; struct mtx *sc_mtx; void *sc_parent; uint32_t sc_subunit; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214843 - in head/sys/dev/usb: net serial
Author: n_hibma Date: Fri Nov 5 19:12:48 2010 New Revision: 214843 URL: http://svn.freebsd.org/changeset/base/214843 Log: Implement ucom_set_pnpinfo_usb() providing ttyname and port number information through devd. My E220 now produces the notification (1 line): +u3g0 at bus=1 hubaddr=1 port=0 devaddr=2 interface=0 \ vendor=0x12d1 product=0x1003 devclass=0x00 devsubclass=0x00 \ sernum= release=0x intclass=0xff intsubclass=0xff \ ttyname=U0 ttyports=2 on uhub0 Note: serial/ufoma and net/uhso still provide port number and tty name (uhso only) information through sysctls, which should now be removed. Reviewed by: hpselasky Modified: head/sys/dev/usb/net/uhso.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/uark.c head/sys/dev/usb/serial/ubsa.c head/sys/dev/usb/serial/ubser.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/ucycom.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/ugensa.c head/sys/dev/usb/serial/uipaq.c head/sys/dev/usb/serial/umct.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/serial/umoscom.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/serial/uvisor.c head/sys/dev/usb/serial/uvscom.c Modified: head/sys/dev/usb/net/uhso.c == --- head/sys/dev/usb/net/uhso.c Fri Nov 5 18:24:50 2010(r214842) +++ head/sys/dev/usb/net/uhso.c Fri Nov 5 19:12:48 2010(r214843) @@ -902,6 +902,7 @@ uhso_probe_iface(struct uhso_softc *sc, device_printf(sc-sc_dev, ucom_attach failed\n); return (ENXIO); } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, sc-sc_dev); mtx_lock(sc-sc_mtx); usbd_transfer_start(sc-sc_xfer[UHSO_MUX_ENDPT_INTR]); @@ -920,6 +921,7 @@ uhso_probe_iface(struct uhso_softc *sc, device_printf(sc-sc_dev, ucom_attach failed\n); return (ENXIO); } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, sc-sc_dev); } else { UHSO_DPRINTF(0, Unknown type %x\n, type); Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Fri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/u3g.c Fri Nov 5 19:12:48 2010 (r214843) @@ -818,8 +818,10 @@ u3g_attach(device_t dev) DPRINTF(ucom_attach failed\n); goto detach; } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev); device_printf(dev, Found %u port%s.\n, sc-sc_numports, sc-sc_numports 1 ? s:); + return (0); detach: Modified: head/sys/dev/usb/serial/uark.c == --- head/sys/dev/usb/serial/uark.c Fri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/uark.c Fri Nov 5 19:12:48 2010 (r214843) @@ -227,6 +227,8 @@ uark_attach(device_t dev) DPRINTF(ucom_attach failed\n); goto detach; } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev); + return (0); /* success */ detach: Modified: head/sys/dev/usb/serial/ubsa.c == --- head/sys/dev/usb/serial/ubsa.c Fri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/ubsa.c Fri Nov 5 19:12:48 2010 (r214843) @@ -331,6 +331,8 @@ ubsa_attach(device_t dev) DPRINTF(ucom_attach failed\n); goto detach; } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev); + return (0); detach: Modified: head/sys/dev/usb/serial/ubser.c == --- head/sys/dev/usb/serial/ubser.c Fri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/ubser.c Fri Nov 5 19:12:48 2010 (r214843) @@ -296,6 +296,7 @@ ubser_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev); mtx_lock(sc-sc_mtx); usbd_xfer_set_stall(sc-sc_xfer[UBSER_BULK_DT_WR]); Modified: head/sys/dev/usb/serial/uchcom.c == --- head/sys/dev/usb/serial/uchcom.cFri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/uchcom.cFri Nov 5 19:12:48 2010 (r214843) @@ -354,6 +354,8 @@ uchcom_attach(device_t dev) if (error) { goto detach; } +
Re: svn commit: r214843 - in head/sys/dev/usb: net serial
Forgot to mention: MFC:2 weeks On 5 Nov 2010, at 20:12, Nick Hibma wrote: Author: n_hibma Date: Fri Nov 5 19:12:48 2010 New Revision: 214843 URL: http://svn.freebsd.org/changeset/base/214843 Log: Implement ucom_set_pnpinfo_usb() providing ttyname and port number information through devd. My E220 now produces the notification (1 line): +u3g0 at bus=1 hubaddr=1 port=0 devaddr=2 interface=0 \ vendor=0x12d1 product=0x1003 devclass=0x00 devsubclass=0x00 \ sernum= release=0x intclass=0xff intsubclass=0xff \ ttyname=U0 ttyports=2 on uhub0 Note: serial/ufoma and net/uhso still provide port number and tty name (uhso only) information through sysctls, which should now be removed. Reviewed by: hpselasky Modified: head/sys/dev/usb/net/uhso.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/uark.c head/sys/dev/usb/serial/ubsa.c head/sys/dev/usb/serial/ubser.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/ucycom.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/ugensa.c head/sys/dev/usb/serial/uipaq.c head/sys/dev/usb/serial/umct.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/serial/umoscom.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/serial/uvisor.c head/sys/dev/usb/serial/uvscom.c Modified: head/sys/dev/usb/net/uhso.c == --- head/sys/dev/usb/net/uhso.c Fri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/net/uhso.c Fri Nov 5 19:12:48 2010 (r214843) @@ -902,6 +902,7 @@ uhso_probe_iface(struct uhso_softc *sc, device_printf(sc-sc_dev, ucom_attach failed\n); return (ENXIO); } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, sc-sc_dev); mtx_lock(sc-sc_mtx); usbd_transfer_start(sc-sc_xfer[UHSO_MUX_ENDPT_INTR]); @@ -920,6 +921,7 @@ uhso_probe_iface(struct uhso_softc *sc, device_printf(sc-sc_dev, ucom_attach failed\n); return (ENXIO); } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, sc-sc_dev); } else { UHSO_DPRINTF(0, Unknown type %x\n, type); Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Fri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/u3g.c Fri Nov 5 19:12:48 2010 (r214843) @@ -818,8 +818,10 @@ u3g_attach(device_t dev) DPRINTF(ucom_attach failed\n); goto detach; } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev); device_printf(dev, Found %u port%s.\n, sc-sc_numports, sc-sc_numports 1 ? s:); + return (0); detach: Modified: head/sys/dev/usb/serial/uark.c == --- head/sys/dev/usb/serial/uark.cFri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/uark.cFri Nov 5 19:12:48 2010 (r214843) @@ -227,6 +227,8 @@ uark_attach(device_t dev) DPRINTF(ucom_attach failed\n); goto detach; } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev); + return (0); /* success */ detach: Modified: head/sys/dev/usb/serial/ubsa.c == --- head/sys/dev/usb/serial/ubsa.cFri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/ubsa.cFri Nov 5 19:12:48 2010 (r214843) @@ -331,6 +331,8 @@ ubsa_attach(device_t dev) DPRINTF(ucom_attach failed\n); goto detach; } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev); + return (0); detach: Modified: head/sys/dev/usb/serial/ubser.c == --- head/sys/dev/usb/serial/ubser.c Fri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/ubser.c Fri Nov 5 19:12:48 2010 (r214843) @@ -296,6 +296,7 @@ ubser_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev); mtx_lock(sc-sc_mtx); usbd_xfer_set_stall(sc-sc_xfer[UBSER_BULK_DT_WR]); Modified: head/sys/dev/usb/serial/uchcom.c == --- head/sys/dev/usb/serial/uchcom.c Fri Nov 5 18:24:50 2010 (r214842) +++ head/sys/dev/usb/serial/uchcom.c Fri Nov 5 19:12:48 2010 (r214843) @@ -354,6 +354,8
svn commit: r214852 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Fri Nov 5 21:17:55 2010 New Revision: 214852 URL: http://svn.freebsd.org/changeset/base/214852 Log: Bugfix: In rev 213509 Alexander committed a duplicate ID for ZTE STOR based devices (QUALCOMMINC 0x2000). He made it use SCSI eject instead of ZTE STOR eject. This prevented my ZTE MF626 dongle from switching. - Apply both eject methods for ZTE STOR based devices. Works on my as well as mav's device. - Remove the duplicate. - Sort the usbdevs entries for Qualcomm so this won't happen again. - Add bootverbose message displaying the fact that we are ejecting (and how). Reviewed by: mav MFC after:2 weeks 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 Fri Nov 5 21:13:16 2010 (r214851) +++ head/sys/dev/usb/serial/u3g.c Fri Nov 5 21:17:55 2010 (r214852) @@ -411,7 +411,6 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E0078, 0), U3G_DEV(QUALCOMMINC, E0082, 0), U3G_DEV(QUALCOMMINC, E0086, 0), - U3G_DEV(QUALCOMMINC, E2000, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), @@ -655,6 +654,12 @@ u3g_test_autoinst(void *arg, struct usb_ if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa)) return; /* no device match */ + if (bootverbose) { + printf(Ejecting 0x%04x:0x%04x using method %ld\n, + uaa-info.idVendor, uaa-info.idProduct, + USB_GET_DRIVER_INFO(uaa)); + } + switch (USB_GET_DRIVER_INFO(uaa)) { case U3GINIT_HUAWEI: error = u3g_huawei_init(udev); @@ -669,7 +674,8 @@ u3g_test_autoinst(void *arg, struct usb_ error = usb_msc_eject(udev, 0, MSC_EJECT_REZERO); break; case U3GINIT_ZTESTOR: - error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); + error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); + error |= usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); break; case U3GINIT_CMOTECH: error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH); Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsFri Nov 5 21:13:16 2010(r214851) +++ head/sys/dev/usb/usbdevsFri Nov 5 21:17:55 2010(r214852) @@ -2612,15 +2612,11 @@ product QISDA H20_2 0x4519 3G modem /* Qualcomm products */ product QUALCOMM CDMA_MSM 0x6000 CDMA Technologies MSM phone +product QUALCOMM2 MF3300x6613 MF330 product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMM2 AC8700 0x6000 AC8700 -product QUALCOMM2 MF3300x6613 MF330 product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem -product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage -product QUALCOMMINC AC8710 0xfff1 3G modem -product QUALCOMMINC AC2726 0xfff5 3G modem -product QUALCOMMINC AC8700 0xfffe CDMA 1xEVDO USB modem product QUALCOMMINC E0002 0x0002 3G modem product QUALCOMMINC E0003 0x0003 3G modem product QUALCOMMINC E0004 0x0004 3G modem @@ -2686,9 +2682,12 @@ product QUALCOMMINC E00760x0076 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 ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem +product QUALCOMMINC AC8710 0xfff1 3G modem +product QUALCOMMINC AC2726 0xfff5 3G modem +product QUALCOMMINC AC8700 0xfffe CDMA 1xEVDO USB modem /* Quanta products */ product QUANTA RW6815_10x00ce HP iPAQ rw6815 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214809 - head/sys/dev/usb
Author: n_hibma Date: Thu Nov 4 21:06:36 2010 New Revision: 214809 URL: http://svn.freebsd.org/changeset/base/214809 Log: Don't terminate the notification with \n. This is done in usb_device.c:devctl_notify_f(). Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c == --- head/sys/dev/usb/usb_device.c Thu Nov 4 21:03:50 2010 (r214808) +++ head/sys/dev/usb/usb_device.c Thu Nov 4 21:06:36 2010 (r214809) @@ -2486,7 +2486,7 @@ usb_notify_addq(const char *type, struct mode=%s port=%u #if USB_HAVE_UGEN - parent=%s\n + parent=%s #endif , #if USB_HAVE_UGEN @@ -2534,7 +2534,7 @@ usb_notify_addq(const char *type, struct endpoints=%d intclass=0x%02x intsubclass=0x%02x - intprotocol=0x%02x\n, + intprotocol=0x%02x, #if USB_HAVE_UGEN udev-ugen_name, #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214754 - head/sys/netinet/libalias
Author: n_hibma Date: Wed Nov 3 21:10:12 2010 New Revision: 214754 URL: http://svn.freebsd.org/changeset/base/214754 Log: Don't spam the console with loaded modules during boot and/or during startup of ppp. Note: This cannot be hidden behind bootverbose as this file is included from lib/libalias as well. Modified: head/sys/netinet/libalias/alias.c Modified: head/sys/netinet/libalias/alias.c == --- head/sys/netinet/libalias/alias.c Wed Nov 3 20:50:41 2010 (r214753) +++ head/sys/netinet/libalias/alias.c Wed Nov 3 21:10:12 2010 (r214754) @@ -1665,7 +1665,6 @@ LibAliasRefreshModules(void) if (buf[i] == '#') continue; buf[len - 1] = '\0'; - printf(Loading %s\n, buf); LibAliasLoadModule(buf); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214761 - in head/sys/dev/usb: net serial
Author: n_hibma Date: Wed Nov 3 21:50:49 2010 New Revision: 214761 URL: http://svn.freebsd.org/changeset/base/214761 Log: - Simplify the way unit/subunit allocation is done in ucom. - hw.usb.ucom.cons_unit is now split into hw.usb.ucom.cons_unit/...cons_subunit. Note: The tunable/sysctl hw.usb.ucom.cons_unit needs to be reviewed if a) a console was defined a USB serial devices, and a USB device with more than 1 subunit is present, and this device is attached before the device functioning as a console or b) a console was defined on a USB device with more than 1 subunit Reviewed by: hps MFC after:2 weeks Modified: head/sys/dev/usb/net/uhso.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/uark.c head/sys/dev/usb/serial/ubsa.c head/sys/dev/usb/serial/ubser.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/ucycom.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/ugensa.c head/sys/dev/usb/serial/uipaq.c head/sys/dev/usb/serial/umct.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/serial/umoscom.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/serial/uvisor.c head/sys/dev/usb/serial/uvscom.c Modified: head/sys/dev/usb/net/uhso.c == --- head/sys/dev/usb/net/uhso.c Wed Nov 3 21:40:57 2010(r214760) +++ head/sys/dev/usb/net/uhso.c Wed Nov 3 21:50:49 2010(r214761) @@ -633,11 +633,10 @@ uhso_attach(device_t self) ht-ht_name[0] = 0; if (sc-sc_ttys == 1) - snprintf(ht-ht_name, 32, cuaU%d, ucom-sc_unit); + snprintf(ht-ht_name, 32, cuaU%d, ucom-sc_super-sc_unit); else { snprintf(ht-ht_name, 32, cuaU%d.%d, - ucom-sc_unit - ucom-sc_local_unit, - ucom-sc_local_unit); + ucom-sc_super-sc_unit, ucom-sc_subunit); } desc = uhso_port_type[port]; @@ -666,7 +665,7 @@ uhso_detach(device_t self) usbd_transfer_unsetup(sc-sc_xfer, 3); usbd_transfer_unsetup(sc-sc_ctrl_xfer, UHSO_CTRL_MAX); if (sc-sc_ttys 0) { - ucom_detach(sc-sc_super_ucom, sc-sc_ucom, sc-sc_ttys); + ucom_detach(sc-sc_super_ucom, sc-sc_ucom); for (i = 0; i sc-sc_ttys; i++) { if (sc-sc_tty[i].ht_muxport != -1) { @@ -1448,11 +1447,11 @@ uhso_ucom_start_read(struct ucom_softc * { struct uhso_softc *sc = ucom-sc_parent; - UHSO_DPRINTF(3, unit=%d, local_unit=%d\n, - ucom-sc_unit, ucom-sc_local_unit); + UHSO_DPRINTF(3, unit=%d, subunit=%d\n, + ucom-sc_super-sc_unit, ucom-sc_subunit); if (UHSO_IFACE_USB_TYPE(sc-sc_type) UHSO_IF_MUX) { - sc-sc_tty[ucom-sc_local_unit].ht_open = 1; + sc-sc_tty[ucom-sc_subunit].ht_open = 1; usbd_transfer_start(sc-sc_xfer[UHSO_MUX_ENDPT_INTR]); } else if (UHSO_IFACE_USB_TYPE(sc-sc_type) UHSO_IF_BULK) { @@ -1470,9 +1469,9 @@ uhso_ucom_stop_read(struct ucom_softc *u struct uhso_softc *sc = ucom-sc_parent; if (UHSO_IFACE_USB_TYPE(sc-sc_type) UHSO_IF_MUX) { - sc-sc_tty[ucom-sc_local_unit].ht_open = 0; + sc-sc_tty[ucom-sc_subunit].ht_open = 0; usbd_transfer_stop( - sc-sc_tty[ucom-sc_local_unit].ht_xfer[UHSO_CTRL_READ]); + sc-sc_tty[ucom-sc_subunit].ht_xfer[UHSO_CTRL_READ]); } else if (UHSO_IFACE_USB_TYPE(sc-sc_type) UHSO_IF_BULK) { sc-sc_tty[0].ht_open = 0; @@ -1488,15 +1487,15 @@ uhso_ucom_start_write(struct ucom_softc struct uhso_softc *sc = ucom-sc_parent; if (UHSO_IFACE_USB_TYPE(sc-sc_type) UHSO_IF_MUX) { - UHSO_DPRINTF(3, local unit %d\n, ucom-sc_local_unit); + UHSO_DPRINTF(3, local unit %d\n, ucom-sc_subunit); usbd_transfer_start(sc-sc_xfer[UHSO_MUX_ENDPT_INTR]); usbd_xfer_set_priv( - sc-sc_tty[ucom-sc_local_unit].ht_xfer[UHSO_CTRL_WRITE], - sc-sc_tty[ucom-sc_local_unit]); + sc-sc_tty[ucom-sc_subunit].ht_xfer[UHSO_CTRL_WRITE], + sc-sc_tty[ucom-sc_subunit]); usbd_transfer_start( - sc-sc_tty[ucom-sc_local_unit].ht_xfer[UHSO_CTRL_WRITE]); + sc-sc_tty[ucom-sc_subunit].ht_xfer[UHSO_CTRL_WRITE]); } else if (UHSO_IFACE_USB_TYPE(sc-sc_type) UHSO_IF_BULK) { @@ -1511,7 +1510,7 @@ uhso_ucom_stop_write(struct ucom_softc * if (UHSO_IFACE_USB_TYPE(sc-sc_type) UHSO_IF_MUX) { usbd_transfer_stop( -
svn commit: r212829 - head/usr.sbin/ppp
Author: n_hibma Date: Sat Sep 18 22:26:50 2010 New Revision: 212829 URL: http://svn.freebsd.org/changeset/base/212829 Log: Bugfix: Reset the packet counters at the same time as the byte counts. Reviewed by: brian MFC after:3 weeks Modified: head/usr.sbin/ppp/throughput.c Modified: head/usr.sbin/ppp/throughput.c == --- head/usr.sbin/ppp/throughput.c Sat Sep 18 20:50:36 2010 (r212828) +++ head/usr.sbin/ppp/throughput.c Sat Sep 18 22:26:50 2010 (r212829) @@ -201,7 +201,7 @@ throughput_start(struct pppThroughput *t for (i = 0; i t-SamplePeriod; i++) t-in.SampleOctets[i] = t-out.SampleOctets[i] = 0; t-nSample = 0; - t-OctetsIn = t-OctetsOut = 0; + t-OctetsIn = t-OctetsOut = t-PacketsIn = t-PacketsOut = 0; t-in.OctetsPerSecond = t-out.OctetsPerSecond = t-BestOctetsPerSecond = 0; time(t-BestOctetsPerSecondTime); t-downtime = 0; @@ -268,7 +268,7 @@ throughput_clear(struct pppThroughput *t divisor = 1; prompt_Printf(prompt, overall cleared (was %6qu bytes/sec)\n, (t-OctetsIn + t-OctetsOut) / divisor); -t-OctetsIn = t-OctetsOut = 0; +t-OctetsIn = t-OctetsOut = t-PacketsIn = t-PacketsOut = 0; t-downtime = 0; time(t-uptime); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r212830 - head/sys/dev/usb
Author: n_hibma Date: Sat Sep 18 22:37:47 2010 New Revision: 212830 URL: http://svn.freebsd.org/changeset/base/212830 Log: Cleanup white space and typos. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSat Sep 18 22:26:50 2010(r212829) +++ head/sys/dev/usb/usbdevsSat Sep 18 22:37:47 2010(r212830) @@ -488,7 +488,7 @@ vendor GEOCAST 0x0a79 Geocast Network S vendor IDQUANTIQUE 0x0aba id Quantique vendor ZYDAS 0x0ace Zydas Technology Corporation vendor NEODIO 0x0aec Neodio -vendor OPTION 0x0af0 Option N.V: +vendor OPTION 0x0af0 Option N.V. vendor ASUS0x0b05 ASUSTeK Computer vendor TODOS 0x0b0c Todos Data System vendor SIIG2 0x0b39 SIIG @@ -1444,7 +1444,7 @@ product EDIMAX EW7718 0x7718 EW-7718 /* eGalax Products */ product EGALAX TPANEL 0x0001 Touch Panel product EGALAX TPANEL2 0x0002 Touch Panel -product EGALAX2 TPANEL 0x0001 Touch Panel +product EGALAX2 TPANEL 0x0001 Touch Panel /* Eicon Networks */ product EICON DIVA852 0x4905 Diva 852 ISDN TA @@ -2096,7 +2096,7 @@ product MELCO LUATX1 0x0001 LUA-TX Ethe product MELCO LUATX5 0x0005 LUA-TX Ethernet product MELCO LUA2TX5 0x0009 LUA2-TX Ethernet product MELCO LUAKTX 0x0012 LUA-KTX Ethernet -product MELCO DUBPXXG 0x001c USB-IDE Bridge: DUB-PxxG +product MELCO DUBPXXG 0x001c DUB-PxxG product MELCO LUAU2KTX 0x003d LUA-U2-KTX Ethernet product MELCO KG54YB 0x005e WLI-U2-KG54-YB WLAN product MELCO KG54 0x0066 WLI-U2-KG54 WLAN @@ -2456,7 +2456,7 @@ product PANASONIC TYTP50P6S 0x3900 TY-TP /* PARA Industrial products */ product PARA RT30700x RT3070 - + /* Pegatron products */ product PEGATRON RT28700x0002 RT2870 product PEGATRON RT30700x000c RT3070 @@ -2742,7 +2742,7 @@ product SAGEM XG76NA 0x0062 XG-76NA product SAMSUNG ML6060 0x3008 ML-6060 laser printer product SAMSUNG YP_U2 0x5050 YP-U2 MP3 Player product SAMSUNG YP_U4 0x5092 YP-U4 MP3 Player -product SAMSUNG I500 0x6601 I500 Palm USB Phone +product SAMSUNG I500 0x6601 I500 Palm USB Phone product SAMSUNG I330 0x8001 I330 phone cradle product SAMSUNG2 RT2870_1 0x2018 RT2870 @@ -3371,7 +3371,7 @@ product ZOOM 2986L0x9700 2986L Fax mod product ZORAN EX20DSC 0x4343 Digital Camera EX-20 DSC /* Zydas Technology Corporation products */ -product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg +product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg product ZYDAS ZD1211B 0x1215 ZD1211B /* ZyXEL Communication Co. products */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r207272 - stable/7/sys/dev/usb
Author: n_hibma Date: Tue Apr 27 12:50:42 2010 New Revision: 207272 URL: http://svn.freebsd.org/changeset/base/207272 Log: Typo in comment. Modified: stable/7/sys/dev/usb/uhub.c Modified: stable/7/sys/dev/usb/uhub.c == --- stable/7/sys/dev/usb/uhub.c Tue Apr 27 10:50:09 2010(r207271) +++ stable/7/sys/dev/usb/uhub.c Tue Apr 27 12:50:42 2010(r207272) @@ -435,7 +435,7 @@ uhub_explore(usbd_device_handle dev) #if 0 defined(DIAGNOSTIC) if (up-device == NULL (status UPS_CURRENT_CONNECT_STATUS)) - deivce_printf(sc-sc_dev, + device_printf(sc-sc_dev, connected, no device\n); #endif continue; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r207201 - stable/7/sys/dev/usb
Author: n_hibma Date: Sun Apr 25 19:22:06 2010 New Revision: 207201 URL: http://svn.freebsd.org/changeset/base/207201 Log: Remove the call to usbd_reset_device() as this panics the kernel on devices with many serial ports (the device is reset for each port that reports IOERROR). Remove statements that should have been removed when rewriting the if statement. Modified: stable/7/sys/dev/usb/ucom.c Modified: stable/7/sys/dev/usb/ucom.c == --- stable/7/sys/dev/usb/ucom.c Sun Apr 25 19:21:19 2010(r207200) +++ stable/7/sys/dev/usb/ucom.c Sun Apr 25 19:22:06 2010(r207201) @@ -689,11 +689,7 @@ ucomwritecb(usbd_xfer_handle xfer, usbd_ printf(%s: ucomwritecb: STALLED; clearing.\n, device_get_nameunit(sc-sc_dev)); usbd_clear_endpoint_stall_async(sc-sc_bulkout_pipe); - } else if (status == USBD_IOERROR) { - printf(%s: ucomwritecb: IOERROR; resetting device.\n, - device_get_nameunit(sc-sc_dev)); - usbd_reset_device(sc-sc_udev); - } else if (status != USBD_CANCELLED) { + } else { printf(%s: ucomwritecb: %s\n, device_get_nameunit(sc-sc_dev), usbd_errstr(status)); @@ -775,19 +771,13 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_p printf(%s: ucomreadcb: %s\n, device_get_nameunit(sc-sc_dev), usbd_errstr(status)); sc-sc_state |= UCS_RXSTOP; - if (status == USBD_STALLED) - usbd_clear_endpoint_stall_async(sc-sc_bulkin_pipe); - else if (status == USBD_IOERROR) - usbd_reset_device(sc-sc_udev); if (status == USBD_STALLED) { printf(%s: ucomreadcb: STALLED; clearing.\n, device_get_nameunit(sc-sc_dev)); usbd_clear_endpoint_stall_async(sc-sc_bulkin_pipe); - } else if (status == USBD_IOERROR) { - printf(%s: ucomreadcb: IOERROR; resetting device.\n, - device_get_nameunit(sc-sc_dev)); - usbd_reset_device(sc-sc_udev); - } else if (status != USBD_CANCELLED) { + } else if (status == USBD_CANCELLED) { + /* noop */ + } else { printf(%s: ucomreadcb: %s\n, device_get_nameunit(sc-sc_dev), usbd_errstr(status)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r206561 - stable/7/sys/dev/usb
Author: n_hibma Date: Tue Apr 13 19:43:16 2010 New Revision: 206561 URL: http://svn.freebsd.org/changeset/base/206561 Log: Make the list of allocated ports dynamic. The Option GTM382 has 10 serial ports (yes, 10, it has a built in GPS and other stuff) and we need to access the last one for PPP access to the card. Other ports are HSO (Option specific protocol; see Linux driver). Reviewed by: thompsa Modified: stable/7/sys/dev/usb/u3g.c Modified: stable/7/sys/dev/usb/u3g.c == --- stable/7/sys/dev/usb/u3g.c Tue Apr 13 18:53:39 2010(r206560) +++ stable/7/sys/dev/usb/u3g.c Tue Apr 13 19:43:16 2010(r206561) @@ -58,10 +58,8 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, u3gdebug, 0, u3g debug level); #define DPRINTF(x...) if (u3gdebug) device_printf(sc-sc_dev, ##x) -#define U3G_MAXPORTS 6 - struct u3g_softc { - struct ucom_softc sc_ucom[U3G_MAXPORTS]; + struct ucom_softc *sc_ucom; device_tsc_dev; usbd_device_handle sc_udev; u_int8_tsc_speed; @@ -254,9 +252,8 @@ u3g_attach(device_t self) sc-sc_init = u3g_dev_type-init; sc-sc_speed = u3g_dev_type-speed; - sprintf(devnamefmt,U%d.%%d, device_get_unit(self)); int portno = 0; - for (i = 0; i uaa-nifaces portno U3G_MAXPORTS; i++) { + for (i = 0; i uaa-nifaces; i++) { DPRINTF(Interface %d of %d, %sin use\n, i, uaa-nifaces, (uaa-ifaces[i]? not :)); @@ -279,7 +276,7 @@ u3g_attach(device_t self) int bulkin_no = -1, bulkout_no = -1; int claim_iface = 0; - for (n = 0; n id-bNumEndpoints portno U3G_MAXPORTS; n++) { + for (n = 0; n id-bNumEndpoints; n++) { ed = usbd_interface2endpoint_descriptor(uaa-ifaces[i], n); DPRINTF( Endpoint %d of %d%s\n, n, id-bNumEndpoints, @@ -298,6 +295,7 @@ u3g_attach(device_t self) * the bulk-in and bulk-out endpoints appear in pairs. */ if (bulkin_no != -1 bulkout_no != -1) { + sc-sc_ucom = realloc(sc-sc_ucom, (portno+1)*sizeof(struct ucom_softc), M_USBDEV, M_WAITOK); struct ucom_softc *ucom = sc-sc_ucom[portno]; ucom-sc_dev = self; @@ -318,13 +316,6 @@ u3g_attach(device_t self) portno, i, ucom-sc_bulkin_no, ucom-sc_bulkout_no); -#if __FreeBSD_version 70 - ucom_attach_tty(ucom, MINOR_CALLOUT, devnamefmt, portno); -#elif __FreeBSD_version 80 - ucom_attach_tty(ucom, TS_CALLOUT, devnamefmt, portno); -#else - ucom_attach_tty(ucom, devnamefmt, portno); -#endif claim_iface = 1; portno++; @@ -336,6 +327,19 @@ u3g_attach(device_t self) } sc-sc_numports = portno; + sprintf(devnamefmt,U%d.%%d, device_get_unit(self)); + for (portno = 0; portno sc-sc_numports; portno++) { + struct ucom_softc *ucom = sc-sc_ucom[portno]; + +#if __FreeBSD_version 70 + ucom_attach_tty(ucom, MINOR_CALLOUT, devnamefmt, portno); +#elif __FreeBSD_version 80 + ucom_attach_tty(ucom, TS_CALLOUT, devnamefmt, portno); +#else + ucom_attach_tty(ucom, devnamefmt, portno); +#endif + } + device_printf(self, configured %d serial ports (%s)\n, sc-sc_numports, devnamefmt); return 0; @@ -357,6 +361,9 @@ u3g_detach(device_t self) } } + if (sc-sc_ucom) + free(sc-sc_ucom, M_USBDEV); + return 0; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r206412 - stable/7/sys/dev/usb
Author: n_hibma Date: Fri Apr 9 08:20:43 2010 New Revision: 206412 URL: http://svn.freebsd.org/changeset/base/206412 Log: Add the ID for the Matrix Orbital LCD display MOU-Axxx series. Simplify a switch statement in the uftdi driver to an if-then-else-endif as it encoded those two cases only. Reviewed by: imp Modified: stable/7/sys/dev/usb/uftdi.c stable/7/sys/dev/usb/usbdevs Modified: stable/7/sys/dev/usb/uftdi.c == --- stable/7/sys/dev/usb/uftdi.cFri Apr 9 06:47:36 2010 (r206411) +++ stable/7/sys/dev/usb/uftdi.cFri Apr 9 08:20:43 2010 (r206412) @@ -184,6 +184,9 @@ uftdi_match(device_t self) if (uaa-vendor == USB_VENDOR_MELCO (uaa-product == USB_PRODUCT_MELCO_PCOPRS1)) return (UMATCH_VENDOR_PRODUCT); + if (uaa-vendor == USB_VENDOR_MATRIXORBITAL + (uaa-product == USB_PRODUCT_MATRIXORBITAL_MOUA)) + return (UMATCH_VENDOR_PRODUCT); return (UMATCH_NONE); } @@ -227,94 +230,13 @@ uftdi_attach(device_t self) id = usbd_get_interface_descriptor(iface); ucom-sc_iface = iface; - switch( uaa-vendor ){ - case USB_VENDOR_FTDI: - switch( uaa-product ){ - case USB_PRODUCT_FTDI_SERIAL_8U100AX: - sc-sc_type = UFTDI_TYPE_SIO; - sc-sc_hdrlen = 1; - break; - case USB_PRODUCT_FTDI_SEMC_DSS20: - case USB_PRODUCT_FTDI_SERIAL_8U232AM: - case USB_PRODUCT_FTDI_SERIAL_2232C: - case USB_PRODUCT_FTDI_CFA_631: - case USB_PRODUCT_FTDI_CFA_632: - case USB_PRODUCT_FTDI_CFA_633: - case USB_PRODUCT_FTDI_CFA_634: - case USB_PRODUCT_FTDI_CFA_635: - case USB_PRODUCT_FTDI_USBSERIAL: - case USB_PRODUCT_FTDI_MX2_3: - case USB_PRODUCT_FTDI_MX4_5: - case USB_PRODUCT_FTDI_LK202: - case USB_PRODUCT_FTDI_LK204: - case USB_PRODUCT_FTDI_TACTRIX_OPENPORT_13M: - case USB_PRODUCT_FTDI_TACTRIX_OPENPORT_13S: - case USB_PRODUCT_FTDI_TACTRIX_OPENPORT_13U: - case USB_PRODUCT_FTDI_EISCOU: - case USB_PRODUCT_FTDI_UOPTBR: - case USB_PRODUCT_FTDI_EMCU2D: - case USB_PRODUCT_FTDI_PCMSFU: - case USB_PRODUCT_FTDI_EMCU2H: - sc-sc_type = UFTDI_TYPE_8U232AM; - sc-sc_hdrlen = 0; - break; - - default:/* Can't happen */ - goto bad; - } - break; - - case USB_VENDOR_INTREPIDCS: - switch( uaa-product ){ - case USB_PRODUCT_INTREPIDCS_VALUECAN: - case USB_PRODUCT_INTREPIDCS_NEOVI: - sc-sc_type = UFTDI_TYPE_8U232AM; - sc-sc_hdrlen = 0; - break; - - default:/* Can't happen */ - goto bad; - } - break; - - case USB_VENDOR_SIIG2: - switch( uaa-product ){ - case USB_PRODUCT_SIIG2_US2308: - sc-sc_type = UFTDI_TYPE_8U232AM; - sc-sc_hdrlen = 0; - break; - default:/* Can't happen */ - goto bad; - } - break; - - case USB_VENDOR_BBELECTRONICS: - switch( uaa-product ){ - case USB_PRODUCT_BBELECTRONICS_USOTL4: - sc-sc_type = UFTDI_TYPE_8U232AM; - sc-sc_hdrlen = 0; - break; - - default:/* Can't happen */ - goto bad; - } - break; - - case USB_VENDOR_MELCO: - switch( uaa-product ){ - case USB_PRODUCT_MELCO_PCOPRS1: - sc-sc_type = UFTDI_TYPE_8U232AM; - sc-sc_hdrlen = 0; - break; - - default:/* Can't happen */ - goto bad; - } - break; - - default:/* Can't happen */ - goto bad; + if (uaa-vendor == USB_VENDOR_FTDI uaa-product == USB_PRODUCT_FTDI_SERIAL_8U100AX) { + sc-sc_type = UFTDI_TYPE_SIO; + sc-sc_hdrlen = 1; + } else { + sc-sc_type = UFTDI_TYPE_8U232AM; + sc-sc_hdrlen = 0; } ucom-sc_bulkin_no = ucom-sc_bulkout_no = -1; Modified: stable/7/sys/dev/usb/usbdevs == --- stable/7/sys/dev/usb/usbdevsFri Apr 9 06:47:36