From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 00:52:46 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 749D3480; Sun, 31 May 2015 00:52:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61D5818AA; Sun, 31 May 2015 00:52:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V0qkn7047711; Sun, 31 May 2015 00:52:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V0qk1e047710; Sun, 31 May 2015 00:52:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505310052.t4V0qk1e047710@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 00:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283796 - stable/10/usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 00:52:46 -0000 Author: bapt Date: Sun May 31 00:52:45 2015 New Revision: 283796 URL: https://svnweb.freebsd.org/changeset/base/283796 Log: MFC: r283695 Remove dead declaration PR: 195928 Modified: stable/10/usr.sbin/pw/pwupd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pwupd.h ============================================================================== --- stable/10/usr.sbin/pw/pwupd.h Sat May 30 23:37:47 2015 (r283795) +++ stable/10/usr.sbin/pw/pwupd.h Sun May 31 00:52:45 2015 (r283796) @@ -93,7 +93,6 @@ char * getpwpath(char const * file); int addgrent(struct group * grp); int delgrent(struct group * grp); int chggrent(char const * name, struct group * grp); -int editgroups(char *name, char **groups); int setgrdir(const char * dir); char * getgrpath(const char *file); From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 12:42:35 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A739E895; Sun, 31 May 2015 12:42:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B24112C0; Sun, 31 May 2015 12:42:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCgZSo020376; Sun, 31 May 2015 12:42:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCgYdT020373; Sun, 31 May 2015 12:42:34 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311242.t4VCgYdT020373@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283821 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 12:42:35 -0000 Author: tuexen Date: Sun May 31 12:42:34 2015 New Revision: 283821 URL: https://svnweb.freebsd.org/changeset/base/283821 Log: MFC r283648: Address some compiler warnings. No functional change. Modified: stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun May 31 12:18:30 2015 (r283820) +++ stable/10/sys/netinet/sctp_indata.c Sun May 31 12:42:34 2015 (r283821) @@ -3462,12 +3462,18 @@ sctp_fs_audit(struct sctp_association *a { struct sctp_tmit_chunk *chk; int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0; - int entry_flight, entry_cnt, ret; + int ret; +#ifndef INVARIANTS + int entry_flight, entry_cnt; + +#endif + + ret = 0; +#ifndef INVARIANTS entry_flight = asoc->total_flight; entry_cnt = asoc->total_flight_count; - ret = 0; - +#endif if (asoc->pr_sctp_cnt >= asoc->sent_queue_cnt) return (0); Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:18:30 2015 (r283820) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:42:34 2015 (r283821) @@ -12012,9 +12012,6 @@ sctp_copy_one(struct sctp_stream_queue_p struct uio *uio, int resv_upfront) { - int left; - - left = sp->length; sp->data = m_uiotombuf(uio, M_WAITOK, sp->length, resv_upfront, 0); if (sp->data == NULL) { Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sun May 31 12:18:30 2015 (r283820) +++ stable/10/sys/netinet/sctputil.c Sun May 31 12:42:34 2015 (r283821) @@ -1449,7 +1449,7 @@ sctp_timeout_handler(void *t) struct socket *so; #endif - int did_output, type; + int did_output; tmr = (struct sctp_timer *)t; inp = (struct sctp_inpcb *)tmr->ep; @@ -1488,7 +1488,6 @@ sctp_timeout_handler(void *t) } /* if this is an iterator timeout, get the struct and clear inp */ tmr->stopped_from = 0xa003; - type = tmr->type; if (inp) { SCTP_INP_INCR_REF(inp); if ((inp->sctp_socket == NULL) && @@ -1873,7 +1872,7 @@ out_decr: } out_no_decr: SCTPDBG(SCTP_DEBUG_TIMER1, "Timer now complete (type %d)\n", - type); + tmr->type); CURVNET_RESTORE(); } From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 12:46:44 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 570559FA; Sun, 31 May 2015 12:46:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43BFC12E0; Sun, 31 May 2015 12:46:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCkiTN021079; Sun, 31 May 2015 12:46:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCkfVA021062; Sun, 31 May 2015 12:46:41 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311246.t4VCkfVA021062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283822 - in stable/10/sys: netinet netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 12:46:44 -0000 Author: tuexen Date: Sun May 31 12:46:40 2015 New Revision: 283822 URL: https://svnweb.freebsd.org/changeset/base/283822 Log: MFC r283650: Fix and cleanup the debug information. This has no user-visible changes. Thanks to Irene Ruengeler for proving a patch. Modified: stable/10/sys/netinet/sctp_asconf.c stable/10/sys/netinet/sctp_cc_functions.c stable/10/sys/netinet/sctp_constants.h stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_timer.c stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c stable/10/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_asconf.c ============================================================================== --- stable/10/sys/netinet/sctp_asconf.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_asconf.c Sun May 31 12:46:40 2015 (r283822) @@ -555,7 +555,9 @@ sctp_process_asconf_set_primary(struct s (stcb->asoc.primary_destination->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) { - sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_TIMER + SCTP_LOC_7); + sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_ASCONF + SCTP_LOC_1); if (sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_FASTHANDOFF)) { sctp_assoc_immediate_retrans(stcb, @@ -991,7 +993,7 @@ sctp_assoc_immediate_retrans(struct sctp SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.primary_destination->ro._l_addr.sa); sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, stcb->asoc.deleted_primary, - SCTP_FROM_SCTP_TIMER + SCTP_LOC_8); + SCTP_FROM_SCTP_ASCONF + SCTP_LOC_3); stcb->asoc.num_send_timers_up--; if (stcb->asoc.num_send_timers_up < 0) { stcb->asoc.num_send_timers_up = 0; @@ -1030,7 +1032,7 @@ sctp_net_immediate_retrans(struct sctp_t SCTPDBG(SCTP_DEBUG_ASCONF1, "net_immediate_retrans: RTO is %d\n", net->RTO); sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_TIMER + SCTP_LOC_5); + SCTP_FROM_SCTP_ASCONF + SCTP_LOC_4); stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net); net->error_count = 0; TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { @@ -1684,7 +1686,7 @@ sctp_handle_asconf_ack(struct mbuf *m, i if (serial_num == asoc->asconf_seq_out - 1) { /* stop our timer */ sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_ASCONF + SCTP_LOC_3); + SCTP_FROM_SCTP_ASCONF + SCTP_LOC_5); } /* process the ASCONF-ACK contents */ ack_length = ntohs(cp->ch.chunk_length) - Modified: stable/10/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/10/sys/netinet/sctp_cc_functions.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_cc_functions.c Sun May 31 12:46:40 2015 (r283822) @@ -226,7 +226,8 @@ sctp_cwnd_update_after_fr(struct sctp_tc } sctp_timer_stop(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_CC_FUNCTIONS + SCTP_LOC_1); sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); } @@ -1732,7 +1733,8 @@ sctp_hs_cwnd_update_after_fr(struct sctp } sctp_timer_stop(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_CC_FUNCTIONS + SCTP_LOC_2); sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); } @@ -2264,7 +2266,8 @@ sctp_htcp_cwnd_update_after_fr(struct sc } sctp_timer_stop(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_CC_FUNCTIONS + SCTP_LOC_3); sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); } Modified: stable/10/sys/netinet/sctp_constants.h ============================================================================== --- stable/10/sys/netinet/sctp_constants.h Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_constants.h Sun May 31 12:46:40 2015 (r283822) @@ -765,18 +765,19 @@ __FBSDID("$FreeBSD$"); */ /* File defines */ -#define SCTP_FROM_SCTP_INPUT 0x10000000 -#define SCTP_FROM_SCTP_PCB 0x20000000 -#define SCTP_FROM_SCTP_INDATA 0x30000000 -#define SCTP_FROM_SCTP_TIMER 0x40000000 -#define SCTP_FROM_SCTP_USRREQ 0x50000000 -#define SCTP_FROM_SCTPUTIL 0x60000000 -#define SCTP_FROM_SCTP6_USRREQ 0x70000000 -#define SCTP_FROM_SCTP_ASCONF 0x80000000 -#define SCTP_FROM_SCTP_OUTPUT 0x90000000 -#define SCTP_FROM_SCTP_PEELOFF 0xa0000000 -#define SCTP_FROM_SCTP_PANDA 0xb0000000 -#define SCTP_FROM_SCTP_SYSCTL 0xc0000000 +#define SCTP_FROM_SCTP_INPUT 0x10000000 +#define SCTP_FROM_SCTP_PCB 0x20000000 +#define SCTP_FROM_SCTP_INDATA 0x30000000 +#define SCTP_FROM_SCTP_TIMER 0x40000000 +#define SCTP_FROM_SCTP_USRREQ 0x50000000 +#define SCTP_FROM_SCTPUTIL 0x60000000 +#define SCTP_FROM_SCTP6_USRREQ 0x70000000 +#define SCTP_FROM_SCTP_ASCONF 0x80000000 +#define SCTP_FROM_SCTP_OUTPUT 0x90000000 +#define SCTP_FROM_SCTP_PEELOFF 0xa0000000 +#define SCTP_FROM_SCTP_PANDA 0xb0000000 +#define SCTP_FROM_SCTP_SYSCTL 0xc0000000 +#define SCTP_FROM_SCTP_CC_FUNCTIONS 0xd0000000 /* Location ID's */ #define SCTP_LOC_1 0x00000001 @@ -812,6 +813,8 @@ __FBSDID("$FreeBSD$"); #define SCTP_LOC_31 0x0000001f #define SCTP_LOC_32 0x00000020 #define SCTP_LOC_33 0x00000021 +#define SCTP_LOC_34 0x00000022 +#define SCTP_LOC_35 0x00000023 /* Free assoc codes */ Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_indata.c Sun May 31 12:46:40 2015 (r283822) @@ -1034,7 +1034,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.TSN_seq, (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1056,7 +1056,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1073,7 +1073,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1100,7 +1100,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1123,7 +1123,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1144,7 +1144,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1162,7 +1162,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.TSN_seq, (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1184,7 +1184,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1476,7 +1476,7 @@ sctp_process_a_data_chunk(struct sctp_tc asoc->strmin[strmno].last_sequence_delivered, tsn, strmno, strmseq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -1713,7 +1713,7 @@ failed_pdapi_express_del: snprintf(msg, sizeof(msg), "Reas. queue emtpy, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", tsn, strmno, strmseq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; if (last_chunk) { @@ -1732,7 +1732,7 @@ failed_pdapi_express_del: snprintf(msg, sizeof(msg), "PD ongoing, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", tsn, strmno, strmseq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_18; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; if (last_chunk) { @@ -1761,7 +1761,7 @@ failed_pdapi_express_del: snprintf(msg, sizeof(msg), "No PD ongoing, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", tsn, strmno, strmseq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; if (last_chunk) { @@ -2159,7 +2159,8 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_20); } sctp_send_shutdown(stcb, ((stcb->asoc.alternate) ? stcb->asoc.alternate : stcb->asoc.primary_destination)); @@ -2382,7 +2383,7 @@ sctp_process_data(struct mbuf **mm, int snprintf(msg, sizeof(msg), "DATA chunk of length %d", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, mflowtype, mflowid, @@ -2397,7 +2398,7 @@ sctp_process_data(struct mbuf **mm, int struct mbuf *op_err; op_err = sctp_generate_no_user_data_cause(ch->dp.tsn); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_22; sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, mflowtype, mflowid, @@ -3628,7 +3629,7 @@ sctp_express_handle_sack(struct sctp_tcb snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", cumack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_23; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -3824,7 +3825,9 @@ sctp_express_handle_sack(struct sctp_tcb } if (net->dest_state & SCTP_ADDR_PF) { net->dest_state &= ~SCTP_ADDR_PF; - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_24); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); asoc->cc_functions.sctp_cwnd_update_exit_pf(stcb, net); /* Done with this net */ @@ -3910,7 +3913,7 @@ again: } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_22); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); } } } @@ -3984,7 +3987,7 @@ again: *abort_now = 1; /* XXX */ op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_26; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); } else { struct sctp_nets *netp; @@ -4197,7 +4200,7 @@ sctp_handle_sack(struct mbuf *m, int off snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", cum_ack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_27; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -4229,7 +4232,7 @@ sctp_handle_sack(struct mbuf *m, int off /* stop any timers */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_26); + stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_28); net->partial_bytes_acked = 0; net->flight_size = 0; } @@ -4434,14 +4437,14 @@ sctp_handle_sack(struct mbuf *m, int off if (net->new_pseudo_cumack) sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_27); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_29); } } else { if (accum_moved) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_28); + stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_30); } } } @@ -4614,7 +4617,9 @@ sctp_handle_sack(struct mbuf *m, int off } if (net->dest_state & SCTP_ADDR_PF) { net->dest_state &= ~SCTP_ADDR_PF; - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_31); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); asoc->cc_functions.sctp_cwnd_update_exit_pf(stcb, net); /* Done with this net */ @@ -4637,7 +4642,8 @@ sctp_handle_sack(struct mbuf *m, int off TAILQ_FOREACH(net, &asoc->nets, sctp_next) { /* stop all timers */ sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_30); + stcb, net, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); net->flight_size = 0; net->partial_bytes_acked = 0; } @@ -4693,7 +4699,7 @@ sctp_handle_sack(struct mbuf *m, int off *abort_now = 1; /* XXX */ op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_31; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } else { @@ -4845,7 +4851,7 @@ again: } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_22); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_34); } } } @@ -5135,7 +5141,7 @@ sctp_handle_forward_tsn(struct sctp_tcb "New cum ack %8.8x too high, highest TSN %8.8x", new_cum_tsn, asoc->highest_tsn_inside_map); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_35; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_input.c Sun May 31 12:46:40 2015 (r283822) @@ -513,7 +513,7 @@ sctp_process_init_ack(struct mbuf *m, in * primary. */ sctp_timer_stop(SCTP_TIMER_TYPE_INIT, stcb->sctp_ep, stcb, - asoc->primary_destination, SCTP_FROM_SCTP_INPUT + SCTP_LOC_4); + asoc->primary_destination, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); /* calculate the RTO */ net->RTO = sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, sctp_align_safe_nocopy, @@ -633,7 +633,8 @@ sctp_handle_heartbeat_ack(struct sctp_he } sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED, stcb, 0, (void *)r_net, SCTP_SO_NOT_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, + r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_4); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net); } old_error_counter = r_net->error_count; @@ -654,7 +655,8 @@ sctp_handle_heartbeat_ack(struct sctp_he stcb->asoc.cc_functions.sctp_cwnd_update_exit_pf(stcb, net); } if (old_error_counter > 0) { - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, + stcb, r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_5); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net); } if (r_net == stcb->asoc.primary_destination) { @@ -673,7 +675,9 @@ sctp_handle_heartbeat_ack(struct sctp_he sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_PRIM_DELETED)) { - sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_TIMER + SCTP_LOC_7); + sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); if (sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_FASTHANDOFF)) { sctp_assoc_immediate_retrans(stcb, @@ -795,7 +799,8 @@ sctp_handle_abort(struct sctp_abort_chun error = 0; } /* stop any receive timers */ - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_7); /* notify user of the abort and clean up... */ sctp_abort_notification(stcb, 1, error, abort, SCTP_SO_NOT_LOCKED); /* free the tcb */ @@ -817,7 +822,7 @@ sctp_handle_abort(struct sctp_abort_chun #endif stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); + SCTP_FROM_SCTP_INPUT + SCTP_LOC_8); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -932,7 +937,8 @@ sctp_handle_shutdown(struct sctp_shutdow * stop the shutdown timer, since we WILL move to * SHUTDOWN-ACK-SENT. */ - sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_8); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, + net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); } /* Now is there unsent data on a stream somewhere? */ some_on_streamwheel = sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED); @@ -1025,7 +1031,8 @@ sctp_handle_shutdown_ack(struct sctp_shu } #endif /* stop the timer */ - sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_10); /* send SHUTDOWN-COMPLETE */ sctp_send_shutdown_complete(stcb, net, 0); /* notify upper layer protocol */ @@ -1046,7 +1053,7 @@ sctp_handle_shutdown_ack(struct sctp_shu atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_10); + SCTP_FROM_SCTP_INPUT + SCTP_LOC_11); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -1206,7 +1213,7 @@ sctp_handle_error(struct sctp_chunkhdr * atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_11); + SCTP_FROM_SCTP_INPUT + SCTP_LOC_12); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -1558,9 +1565,12 @@ sctp_process_cookie_existing(struct mbuf return (NULL); } /* we have already processed the INIT so no problem */ - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, - net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_12); - sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_13); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, + stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_13); + sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, + stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_14); /* update current state */ if (SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_ECHOED) SCTP_STAT_INCR_COUNTER32(sctps_activeestab); @@ -1720,7 +1730,8 @@ sctp_process_cookie_existing(struct mbuf } if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 8; - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_14); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_15); sctp_stop_all_cookie_timers(stcb); /* * since we did not send a HB make sure we don't double @@ -1865,8 +1876,10 @@ sctp_process_cookie_existing(struct mbuf /* temp code */ if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 12; - sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_15); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); + sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_17); /* notify upper layer */ *notification = SCTP_NOTIFY_ASSOC_RESTART; @@ -2134,7 +2147,7 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_TCB_LOCK(stcb); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); + SCTP_FROM_SCTP_INPUT + SCTP_LOC_18); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2165,7 +2178,8 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_19); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2182,7 +2196,8 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_17); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_20); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2211,7 +2226,8 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_18); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_21); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2271,7 +2287,8 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_19); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_22); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2741,7 +2758,8 @@ sctp_handle_cookie_echo(struct mbuf *m, SCTP_TCB_LOCK((*stcb)); atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(*inp_p, *stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_20); + (void)sctp_free_assoc(*inp_p, *stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_23); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(pcb_so, 1); #endif @@ -3173,7 +3191,8 @@ sctp_handle_shutdown_complete(struct sct } #endif /* stop the timer */ - sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_22); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_24); SCTP_STAT_INCR_COUNTER32(sctps_shutdown); /* free the TCB */ SCTPDBG(SCTP_DEBUG_INPUT2, @@ -3186,7 +3205,8 @@ sctp_handle_shutdown_complete(struct sct SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_23); + (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_25); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -3294,7 +3314,8 @@ process_chunk_drop(struct sctp_tcb *stcb /* restart the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, tp1->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_24); + stcb, tp1->whoTo, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_26); sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, tp1->whoTo); @@ -3362,7 +3383,8 @@ process_chunk_drop(struct sctp_tcb *stcb * this, otherwise we let the timer fire. */ sctp_timer_stop(SCTP_TIMER_TYPE_INIT, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_25); + stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_27); sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); } break; @@ -3539,7 +3561,8 @@ sctp_clean_up_stream_reset(struct sctp_t } asoc = &stcb->asoc; - sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, chk->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_26); + sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, + chk->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_28); TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); @@ -4783,7 +4806,8 @@ process_control_chunks: SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_27); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_29); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -5203,7 +5227,8 @@ process_control_chunks: SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_27); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_30); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -5381,7 +5406,8 @@ process_control_chunks: SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_29); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_31); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:46:40 2015 (r283822) @@ -8343,7 +8343,8 @@ again_one_more_time: /* turn off the timer */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - inp, stcb, net, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_1); + inp, stcb, net, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_1); } } ctl_cnt++; @@ -9796,7 +9797,7 @@ one_chunk_around: * t3-expiring. */ sctp_timer_stop(SCTP_TIMER_TYPE_SEND, inp, stcb, net, - SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_4); + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_2); sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); } } @@ -10403,7 +10404,8 @@ sctp_send_sack(struct sctp_tcb *stcb, in /* No memory so we drop the idea, and set a timer */ if (stcb->asoc.delayed_ack) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_5); + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_3); sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); } else { @@ -10471,7 +10473,8 @@ sctp_send_sack(struct sctp_tcb *stcb, in /* sa_ignore NO_NULL_CHK */ if (stcb->asoc.delayed_ack) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_6); + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_4); sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); } else { @@ -12440,7 +12443,8 @@ sctp_lower_sosend(struct socket *so, if (control) { if (sctp_process_cmsgs_for_init(stcb, control, &error)) { - sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_7); + sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_5); hold_tcblock = 0; stcb = NULL; goto out_unlocked; Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_pcb.c Sun May 31 12:46:40 2015 (r283822) @@ -3548,7 +3548,8 @@ sctp_inpcb_free(struct sctp_inpcb *inp, (SCTP_GET_STATE(&asoc->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { SCTP_STAT_DECR_GAUGE32(sctps_currestab); } - if (sctp_free_assoc(inp, asoc, SCTP_PCBFREE_FORCE, SCTP_FROM_SCTP_PCB + SCTP_LOC_8) == 0) { + if (sctp_free_assoc(inp, asoc, SCTP_PCBFREE_FORCE, + SCTP_FROM_SCTP_PCB + SCTP_LOC_8) == 0) { cnt++; } } Modified: stable/10/sys/netinet/sctp_timer.c ============================================================================== --- stable/10/sys/netinet/sctp_timer.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_timer.c Sun May 31 12:46:40 2015 (r283822) @@ -110,7 +110,9 @@ sctp_threshold_management(struct sctp_in net->dest_state |= SCTP_ADDR_PF; net->last_active = sctp_get_tick_count(); sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_TIMER + SCTP_LOC_1); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -153,7 +155,7 @@ sctp_threshold_management(struct sctp_in op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, "Association error counter exceeded"); - inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_1; + inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_2; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (1); } @@ -1046,7 +1048,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, "Cookie timer expired, but no cookie"); - inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_4; + inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_3; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); } else { #ifdef INVARIANTS Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_usrreq.c Sun May 31 12:46:40 2015 (r283822) @@ -288,7 +288,8 @@ sctp_notify(struct sctp_inpcb *inp, SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_2); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_2); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); /* SCTP_TCB_UNLOCK(stcb); MT: I think this is not needed. */ @@ -777,7 +778,8 @@ sctp_disconnect(struct socket *so) (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { SCTP_STAT_DECR_GAUGE32(sctps_currestab); } - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_3); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_3); /* No unlock tcb assoc is gone */ return (0); } @@ -862,7 +864,8 @@ sctp_disconnect(struct socket *so) SCTP_STAT_DECR_GAUGE32(sctps_currestab); } SCTP_INP_RUNLOCK(inp); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_5); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_5); return (0); } else { sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); @@ -1562,7 +1565,8 @@ sctp_do_connect_x(struct socket *so, str sctp_connectx_helper_add(stcb, sa, (totaddr - 1), &error); /* Fill in the return id */ if (error) { - (void)sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6); + (void)sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7); goto out_now; } a_id = (sctp_assoc_t *) optval; @@ -4785,7 +4789,7 @@ sctp_setopt(struct socket *so, int optna (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, stcb->asoc.primary_destination, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_9); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_8); sctp_send_initiate(inp, stcb, SCTP_SO_LOCKED); } else { /* @@ -5203,7 +5207,7 @@ sctp_setopt(struct socket *so, int optna if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED) && !(net->dest_state & SCTP_ADDR_NOHB)) { sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_9); } net->dest_state |= SCTP_ADDR_NOHB; } @@ -5227,7 +5231,7 @@ sctp_setopt(struct socket *so, int optna if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) { if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_11); } net->dest_state |= SCTP_ADDR_NO_PMTUD; net->mtu = paddrp->spp_pathmtu + ovh; @@ -5251,7 +5255,9 @@ sctp_setopt(struct socket *so, int optna (net->error_count > net->pf_threshold)) { net->dest_state |= SCTP_ADDR_PF; sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_12); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -5294,7 +5300,9 @@ sctp_setopt(struct socket *so, int optna (net->error_count > net->pf_threshold)) { net->dest_state |= SCTP_ADDR_PF; sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_13); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -5329,7 +5337,7 @@ sctp_setopt(struct socket *so, int optna net->dest_state &= ~SCTP_ADDR_NOHB; } sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_14); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); } sctp_stcb_feature_off(inp, stcb, SCTP_PCB_FLAGS_DONOT_HEARTBEAT); @@ -5339,7 +5347,9 @@ sctp_setopt(struct socket *so, int optna if (!(net->dest_state & SCTP_ADDR_NOHB)) { net->dest_state |= SCTP_ADDR_NOHB; if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + inp, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_15); } } } @@ -5349,7 +5359,7 @@ sctp_setopt(struct socket *so, int optna TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_16); } net->dest_state |= SCTP_ADDR_NO_PMTUD; net->mtu = paddrp->spp_pathmtu + ovh; @@ -6199,7 +6209,9 @@ sctp_setopt(struct socket *so, int optna (net->error_count <= net->failure_threshold)) { net->dest_state |= SCTP_ADDR_PF; sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_17); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -6228,7 +6240,9 @@ sctp_setopt(struct socket *so, int optna (net->error_count <= net->failure_threshold)) { net->dest_state |= SCTP_ADDR_PF; sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_18); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -7127,7 +7141,8 @@ sctp_accept(struct socket *so, struct so } if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { SCTP_TCB_LOCK(stcb); - sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7); + sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_19); } return (0); } Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctputil.c Sun May 31 12:46:40 2015 (r283822) @@ -6322,14 +6322,14 @@ sctp_connectx_helper_add(struct sctp_tcb (sin->sin_addr.s_addr == INADDR_BROADCAST) || IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_7); *error = EINVAL; goto out_now; } if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_8); *error = ENOBUFS; goto out_now; } @@ -6343,14 +6343,14 @@ sctp_connectx_helper_add(struct sctp_tcb if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) || IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_8); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_9); *error = EINVAL; goto out_now; } if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_8); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_10); *error = ENOBUFS; goto out_now; } Modified: stable/10/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/sctp6_usrreq.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet6/sctp6_usrreq.c Sun May 31 12:46:40 2015 (r283822) @@ -215,7 +215,8 @@ sctp6_notify_mbuf(struct sctp_inpcb *inp */ nxtsz = ntohl(icmp6->icmp6_mtu); /* Stop any PMTU timer */ - sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, NULL, SCTP_FROM_SCTP6_USRREQ + SCTP_LOC_1); + sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, NULL, + SCTP_FROM_SCTP6_USRREQ + SCTP_LOC_1); /* Adjust destination size limit */ if (net->mtu > nxtsz) { @@ -337,7 +338,8 @@ sctp6_notify(struct sctp_inpcb *inp, SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_2); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP6_USRREQ + SCTP_LOC_2); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); /* SCTP_TCB_UNLOCK(stcb); MT: I think this is not needed. */ From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 12:50:11 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D09CABDB; Sun, 31 May 2015 12:50:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B246C130C; Sun, 31 May 2015 12:50:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCoB1n021659; Sun, 31 May 2015 12:50:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCoBef021658; Sun, 31 May 2015 12:50:11 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311250.t4VCoBef021658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283823 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 12:50:11 -0000 Author: tuexen Date: Sun May 31 12:50:10 2015 New Revision: 283823 URL: https://svnweb.freebsd.org/changeset/base/283823 Log: MFC r283654: Some more debug info cleanup. Modified: stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sun May 31 12:46:40 2015 (r283822) +++ stable/10/sys/netinet/sctputil.c Sun May 31 12:50:10 2015 (r283823) @@ -1808,7 +1808,8 @@ sctp_timeout_handler(void *t) SCTP_STAT_INCR(sctps_timoassockill); /* Can we free it yet? */ SCTP_INP_DECR_REF(inp); - sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_1); + sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_1); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); @@ -1817,7 +1818,8 @@ sctp_timeout_handler(void *t) SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_2); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_2); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -1837,7 +1839,8 @@ sctp_timeout_handler(void *t) * killer */ SCTP_INP_DECR_REF(inp); - sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_3); sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, SCTP_CALLED_FROM_INPKILL_TIMER); inp = NULL; @@ -3909,7 +3912,8 @@ sctp_abort_association(struct sctp_inpcb (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { SCTP_STAT_DECR_GAUGE32(sctps_currestab); } - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_4); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_4); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -4033,7 +4037,8 @@ sctp_abort_an_association(struct sctp_in atomic_subtract_int(&stcb->asoc.refcnt, 1); } #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_5); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_5); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if (!so_locked) { SCTP_SOCKET_UNLOCK(so, 1); @@ -5164,7 +5169,8 @@ sctp_user_rcvd(struct sctp_tcb *stcb, ui sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_USR_RCVD, SCTP_SO_LOCKED); /* make sure no timer is running */ - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_6); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_6); SCTP_TCB_UNLOCK(stcb); } else { /* Update how much we have pending */ @@ -6322,14 +6328,16 @@ sctp_connectx_helper_add(struct sctp_tcb (sin->sin_addr.s_addr == INADDR_BROADCAST) || IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_7); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_7); *error = EINVAL; goto out_now; } if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_8); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_8); *error = ENOBUFS; goto out_now; } @@ -6343,14 +6351,16 @@ sctp_connectx_helper_add(struct sctp_tcb if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) || IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_9); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_9); *error = EINVAL; goto out_now; } if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_10); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_10); *error = ENOBUFS; goto out_now; } From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 12:53:17 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94100F4D; Sun, 31 May 2015 12:53:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82293153F; Sun, 31 May 2015 12:53:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCrHZN026224; Sun, 31 May 2015 12:53:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCrH43026223; Sun, 31 May 2015 12:53:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311253.t4VCrH43026223@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283825 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 12:53:17 -0000 Author: tuexen Date: Sun May 31 12:53:16 2015 New Revision: 283825 URL: https://svnweb.freebsd.org/changeset/base/283825 Log: MFC r283658: Use macros for overhead in a consistent way. No functional change. Thanks to Irene Ruengeler for suggesting the change. Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:53:10 2015 (r283824) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:53:16 2015 (r283825) @@ -4063,7 +4063,7 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_route_t iproute; int len; - len = sizeof(struct ip) + sizeof(struct sctphdr); + len = SCTP_MIN_V4_OVERHEAD; if (port) { len += sizeof(struct udphdr); } @@ -4345,7 +4345,7 @@ sctp_lowlevel_chunk_output(struct sctp_i flowlabel = ntohl(((struct in6pcb *)inp)->in6p_flowinfo); } flowlabel &= 0x000fffff; - len = sizeof(struct ip6_hdr) + sizeof(struct sctphdr); + len = SCTP_MIN_OVERHEAD; if (port) { len += sizeof(struct udphdr); } @@ -5107,10 +5107,11 @@ sctp_arethere_unrecognized_parameters(st if (op_err == NULL) { /* Ok need to try to get a mbuf */ #ifdef INET6 - l_len = sizeof(struct ip6_hdr) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_OVERHEAD; #else - l_len = sizeof(struct ip) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_V4_OVERHEAD; #endif + l_len += sizeof(struct sctp_chunkhdr); l_len += plen; l_len += sizeof(struct sctp_paramhdr); op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA); @@ -5176,10 +5177,11 @@ sctp_arethere_unrecognized_parameters(st /* Ok need to try to get an mbuf */ #ifdef INET6 - l_len = sizeof(struct ip6_hdr) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_OVERHEAD; #else - l_len = sizeof(struct ip) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_V4_OVERHEAD; #endif + l_len += sizeof(struct sctp_chunkhdr); l_len += plen; l_len += sizeof(struct sctp_paramhdr); op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA); @@ -5251,10 +5253,11 @@ invalid_size: int l_len; #ifdef INET6 - l_len = sizeof(struct ip6_hdr) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_OVERHEAD; #else - l_len = sizeof(struct ip) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_V4_OVERHEAD; #endif + l_len += sizeof(struct sctp_chunkhdr); l_len += (2 * sizeof(struct sctp_paramhdr)); op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA); if (op_err) { @@ -7977,12 +7980,12 @@ again_one_more_time: switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { #ifdef INET case AF_INET: - mtu = net->mtu - (sizeof(struct ip) + sizeof(struct sctphdr)); + mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; break; #endif #ifdef INET6 case AF_INET6: - mtu = net->mtu - (sizeof(struct ip6_hdr) + sizeof(struct sctphdr)); + mtu = net->mtu - SCTP_MIN_OVERHEAD; break; #endif default: @@ -8529,16 +8532,16 @@ again_one_more_time: switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { #ifdef INET case AF_INET: - if (net->mtu > (sizeof(struct ip) + sizeof(struct sctphdr))) - omtu = net->mtu - (sizeof(struct ip) + sizeof(struct sctphdr)); + if (net->mtu > SCTP_MIN_V4_OVERHEAD) + omtu = net->mtu - SCTP_MIN_V4_OVERHEAD; else omtu = 0; break; #endif #ifdef INET6 case AF_INET6: - if (net->mtu > (sizeof(struct ip6_hdr) + sizeof(struct sctphdr))) - omtu = net->mtu - (sizeof(struct ip6_hdr) + sizeof(struct sctphdr)); + if (net->mtu > SCTP_MIN_OVERHEAD) + omtu = net->mtu - SCTP_MIN_OVERHEAD; else omtu = 0; break; From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 12:56:23 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C502123; Sun, 31 May 2015 12:56:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49F9D1568; Sun, 31 May 2015 12:56:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCuNI0026768; Sun, 31 May 2015 12:56:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCuMnH026764; Sun, 31 May 2015 12:56:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311256.t4VCuMnH026764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283826 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 12:56:23 -0000 Author: tuexen Date: Sun May 31 12:56:22 2015 New Revision: 283826 URL: https://svnweb.freebsd.org/changeset/base/283826 Log: MFC r283662: Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state. This problem was reported by Mark Bonnekessel and Markus Boese. Thanks to Irene Ruengeler for helping me to fix the cause of the problem. It can be tested with the following packetdrill script: +0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3 +0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) +0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 // Check the handshake with an empty(!) cookie +0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...] +0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]] +0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...] +0.1 < sctp: COOKIE_ACK[flgs=0] +0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 +0.0 write(3, ..., 1024) = 1024 +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0] +0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle +0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0] +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0] +0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here? +0.0 > sctp: SHUTDOWN_ACK[flgs=0] +0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0] +0.0 close(3) = 0 Modified: stable/10/sys/netinet/sctp_asconf.c stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_asconf.c ============================================================================== --- stable/10/sys/netinet/sctp_asconf.c Sun May 31 12:53:16 2015 (r283825) +++ stable/10/sys/netinet/sctp_asconf.c Sun May 31 12:56:22 2015 (r283826) @@ -1977,7 +1977,8 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb * * sent when the state goes open. */ if (status == 0 && - SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { + ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED))) { #ifdef SCTP_TIMER_BASED_ASCONF sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, inp, stcb, stcb->asoc.primary_destination); @@ -2225,7 +2226,8 @@ sctp_asconf_iterator_stcb(struct sctp_in * count of queued params. If in the non-open * state, these get sent when the assoc goes open. */ - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { + if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { if (status >= 0) { num_queued++; } @@ -2285,7 +2287,8 @@ sctp_set_primary_ip_address_sa(struct sc "set_primary_ip_address_sa: queued on tcb=%p, ", (void *)stcb); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa); - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { + if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { #ifdef SCTP_TIMER_BASED_ASCONF sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, @@ -2321,7 +2324,8 @@ sctp_set_primary_ip_address(struct sctp_ SCTPDBG(SCTP_DEBUG_ASCONF1, "set_primary_ip_address: queued on stcb=%p, ", (void *)stcb); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &ifa->address.sa); - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { + if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { #ifdef SCTP_TIMER_BASED_ASCONF sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:53:16 2015 (r283825) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:56:22 2015 (r283826) @@ -8551,7 +8551,8 @@ again_one_more_time: omtu = 0; break; } - if ((((asoc->state & SCTP_STATE_OPEN) == SCTP_STATE_OPEN) && + if ((((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) && (skip_data_for_this_net == 0)) || (cookie)) { TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) { From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 12:59:24 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29D6126F; Sun, 31 May 2015 12:59:24 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F20D5157F; Sun, 31 May 2015 12:59:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCxNOY027207; Sun, 31 May 2015 12:59:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCxNEv027204; Sun, 31 May 2015 12:59:23 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311259.t4VCxNEv027204@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283827 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 12:59:24 -0000 Author: tuexen Date: Sun May 31 12:59:22 2015 New Revision: 283827 URL: https://svnweb.freebsd.org/changeset/base/283827 Log: MFC r283664: Retire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined. Modified: stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:56:22 2015 (r283826) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:59:22 2015 (r283827) @@ -5591,11 +5591,7 @@ do_a_abort: stc.ipv6_addr_legal = 0; stc.ipv4_addr_legal = 1; } -#ifdef SCTP_DONT_DO_PRIVADDR_SCOPE - stc.ipv4_scope = 1; -#else stc.ipv4_scope = 0; -#endif if (net == NULL) { to = src; switch (dst->sa_family) { @@ -5616,13 +5612,9 @@ do_a_abort: stc.laddr_type = SCTP_IPV4_ADDRESS; /* scope_id is only for v6 */ stc.scope_id = 0; -#ifndef SCTP_DONT_DO_PRIVADDR_SCOPE if (IN4_ISPRIVATE_ADDRESS(&src4->sin_addr)) { stc.ipv4_scope = 1; } -#else - stc.ipv4_scope = 1; -#endif /* SCTP_DONT_DO_PRIVADDR_SCOPE */ /* Must use the address in this case */ if (sctp_is_address_on_local_host(src, vrf_id)) { stc.loopback_scope = 1; Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Sun May 31 12:56:22 2015 (r283826) +++ stable/10/sys/netinet/sctp_pcb.c Sun May 31 12:59:22 2015 (r283827) @@ -3796,13 +3796,9 @@ sctp_add_remote_addr(struct sctp_tcb *st /* assure len is set */ sin->sin_len = sizeof(struct sockaddr_in); if (set_scope) { -#ifdef SCTP_DONT_DO_PRIVADDR_SCOPE - stcb->asoc.scope.ipv4_local_scope = 1; -#else if (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { stcb->asoc.scope.ipv4_local_scope = 1; } -#endif /* SCTP_DONT_DO_PRIVADDR_SCOPE */ } else { /* Validate the address is in scope */ if ((IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) && From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 13:01:59 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A8083CC; Sun, 31 May 2015 13:01:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 403451750; Sun, 31 May 2015 13:01:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VD1x6m031306; Sun, 31 May 2015 13:01:59 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VD1x7M031305; Sun, 31 May 2015 13:01:59 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311301.t4VD1x7M031305@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 13:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283828 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 13:01:59 -0000 Author: tuexen Date: Sun May 31 13:01:58 2015 New Revision: 283828 URL: https://svnweb.freebsd.org/changeset/base/283828 Log: MFC r283665: Take source and destination address into account when determining the scope. This fixes a problem when a client with a global address connects to a server with a private address. Thanks to Irene Ruengeler in helping me to find the issue. Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:59:22 2015 (r283827) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 13:01:58 2015 (r283828) @@ -5612,7 +5612,8 @@ do_a_abort: stc.laddr_type = SCTP_IPV4_ADDRESS; /* scope_id is only for v6 */ stc.scope_id = 0; - if (IN4_ISPRIVATE_ADDRESS(&src4->sin_addr)) { + if ((IN4_ISPRIVATE_ADDRESS(&src4->sin_addr)) || + (IN4_ISPRIVATE_ADDRESS(&dst4->sin_addr))) { stc.ipv4_scope = 1; } /* Must use the address in this case */ @@ -5636,16 +5637,18 @@ do_a_abort: stc.local_scope = 0; stc.site_scope = 1; stc.ipv4_scope = 1; - } else if (IN6_IS_ADDR_LINKLOCAL(&src6->sin6_addr)) { + } else if (IN6_IS_ADDR_LINKLOCAL(&src6->sin6_addr) || + IN6_IS_ADDR_LINKLOCAL(&dst6->sin6_addr)) { /* - * If the new destination is a - * LINK_LOCAL we must have common - * both site and local scope. Don't - * set local scope though since we - * must depend on the source to be - * added implicitly. We cannot - * assure just because we share one - * link that all links are common. + * If the new destination or source + * is a LINK_LOCAL we must have + * common both site and local scope. + * Don't set local scope though + * since we must depend on the + * source to be added implicitly. We + * cannot assure just because we + * share one link that all links are + * common. */ stc.local_scope = 0; stc.site_scope = 1; @@ -5661,11 +5664,12 @@ do_a_abort: * pull out the scope_id from * incoming pkt */ - } else if (IN6_IS_ADDR_SITELOCAL(&src6->sin6_addr)) { + } else if (IN6_IS_ADDR_SITELOCAL(&src6->sin6_addr) || + IN6_IS_ADDR_SITELOCAL(&dst6->sin6_addr)) { /* - * If the new destination is - * SITE_LOCAL then we must have site - * scope in common. + * If the new destination or source + * is SITE_LOCAL then we must have + * site scope in common. */ stc.site_scope = 1; } From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 13:04:39 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DEE1520; Sun, 31 May 2015 13:04:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F858176F; Sun, 31 May 2015 13:04:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VD4dSo031721; Sun, 31 May 2015 13:04:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VD4dcu031720; Sun, 31 May 2015 13:04:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311304.t4VD4dcu031720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 13:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283829 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 13:04:39 -0000 Author: tuexen Date: Sun May 31 13:04:38 2015 New Revision: 283829 URL: https://svnweb.freebsd.org/changeset/base/283829 Log: MFC r283666: Report the MTU consistently as specified in https://tools.ietf.org/html/rfc6458 Thanks to Irene Ruengeler for helping me to fix this bug. Modified: stable/10/sys/netinet/sctp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Sun May 31 13:01:58 2015 (r283828) +++ stable/10/sys/netinet/sctp_usrreq.c Sun May 31 13:04:38 2015 (r283829) @@ -2439,17 +2439,23 @@ flags_out: /* Applies to the specific association */ paddrp->spp_flags = 0; if (net != NULL) { - int ovh; - - if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { - ovh = SCTP_MED_OVERHEAD; - } else { - ovh = SCTP_MED_V4_OVERHEAD; - } - paddrp->spp_hbinterval = net->heart_beat_delay; paddrp->spp_pathmaxrxt = net->failure_threshold; - paddrp->spp_pathmtu = net->mtu - ovh; + paddrp->spp_pathmtu = net->mtu; + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + paddrp->spp_pathmtu -= SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + paddrp->spp_pathmtu -= SCTP_MIN_V4_OVERHEAD; + break; +#endif + default: + break; + } /* get flags for HB */ if (net->dest_state & SCTP_ADDR_NOHB) { paddrp->spp_flags |= SPP_HB_DISABLE; @@ -2479,7 +2485,7 @@ flags_out: * value */ paddrp->spp_pathmaxrxt = stcb->asoc.def_net_failure; - paddrp->spp_pathmtu = sctp_get_frag_point(stcb, &stcb->asoc); + paddrp->spp_pathmtu = 0; if (stcb->asoc.default_dscp & 0x01) { paddrp->spp_dscp = stcb->asoc.default_dscp & 0xfc; paddrp->spp_flags |= SPP_DSCP; @@ -2615,6 +2621,20 @@ flags_out: paddri->spinfo_rto = net->RTO; paddri->spinfo_assoc_id = sctp_get_associd(stcb); paddri->spinfo_mtu = net->mtu; + switch (addr->sa_family) { +#if defined(INET) + case AF_INET: + paddri->spinfo_mtu -= SCTP_MIN_V4_OVERHEAD; + break; +#endif +#if defined(INET6) + case AF_INET6: + paddri->spinfo_mtu -= SCTP_MIN_OVERHEAD; + break; +#endif + default: + break; + } SCTP_TCB_UNLOCK(stcb); *optsize = sizeof(struct sctp_paddrinfo); } else { @@ -2691,6 +2711,20 @@ flags_out: sstat->sstat_primary.spinfo_srtt = net->lastsa >> SCTP_RTT_SHIFT; sstat->sstat_primary.spinfo_rto = net->RTO; sstat->sstat_primary.spinfo_mtu = net->mtu; + switch (stcb->asoc.primary_destination->ro._l_addr.sa.sa_family) { +#if defined(INET) + case AF_INET: + sstat->sstat_primary.spinfo_mtu -= SCTP_MIN_V4_OVERHEAD; + break; +#endif +#if defined(INET6) + case AF_INET6: + sstat->sstat_primary.spinfo_mtu -= SCTP_MIN_OVERHEAD; + break; +#endif + default: + break; + } sstat->sstat_primary.spinfo_assoc_id = sctp_get_associd(stcb); SCTP_TCB_UNLOCK(stcb); *optsize = sizeof(struct sctp_status); @@ -5188,19 +5222,6 @@ sctp_setopt(struct socket *so, int optna } if (stcb != NULL) { /************************TCB SPECIFIC SET ******************/ - /* - * do we change the timer for HB, we run - * only one? - */ - int ovh = 0; - - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { - ovh = SCTP_MED_OVERHEAD; - } else { - ovh = SCTP_MED_V4_OVERHEAD; - } - - /* network sets ? */ if (net != NULL) { /************************NET SPECIFIC SET ******************/ if (paddrp->spp_flags & SPP_HB_DISABLE) { @@ -5234,7 +5255,21 @@ sctp_setopt(struct socket *so, int optna SCTP_FROM_SCTP_USRREQ + SCTP_LOC_11); } net->dest_state |= SCTP_ADDR_NO_PMTUD; - net->mtu = paddrp->spp_pathmtu + ovh; + net->mtu = paddrp->spp_pathmtu; + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + net->mtu += SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + net->mtu += SCTP_MIN_OVERHEAD; + break; +#endif + default: + break; + } if (net->mtu < stcb->asoc.smallest_mtu) { sctp_pathmtu_adjustment(stcb, net->mtu); } @@ -5362,7 +5397,21 @@ sctp_setopt(struct socket *so, int optna SCTP_FROM_SCTP_USRREQ + SCTP_LOC_16); } net->dest_state |= SCTP_ADDR_NO_PMTUD; - net->mtu = paddrp->spp_pathmtu + ovh; + net->mtu = paddrp->spp_pathmtu; + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + net->mtu += SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + net->mtu += SCTP_MIN_OVERHEAD; + break; +#endif + default: + break; + } if (net->mtu < stcb->asoc.smallest_mtu) { sctp_pathmtu_adjustment(stcb, net->mtu); } From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 13:07:22 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D693068A; Sun, 31 May 2015 13:07:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C50A91790; Sun, 31 May 2015 13:07:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VD7MH9032147; Sun, 31 May 2015 13:07:22 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VD7Mou032146; Sun, 31 May 2015 13:07:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311307.t4VD7Mou032146@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 13:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283830 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 13:07:23 -0000 Author: tuexen Date: Sun May 31 13:07:22 2015 New Revision: 283830 URL: https://svnweb.freebsd.org/changeset/base/283830 Log: MFC r283691: Remove printf() noise... Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 13:04:38 2015 (r283829) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 13:07:22 2015 (r283830) @@ -3160,8 +3160,6 @@ again_with_private_addresses_allowed: sifa = NULL; continue; } - } else { - SCTP_PRINTF("Stcb is null - no print\n"); } atomic_add_int(&sifa->refcount, 1); goto out; From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 22:39:49 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82195632; Sun, 31 May 2015 22:39:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5511E1A2E; Sun, 31 May 2015 22:39:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMdnff030926; Sun, 31 May 2015 22:39:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMdmvj030917; Sun, 31 May 2015 22:39:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312239.t4VMdmvj030917@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283846 - in stable/10: etc etc/mtree etc/tests tests tests/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 22:39:49 -0000 Author: ngie Date: Sun May 31 22:39:48 2015 New Revision: 283846 URL: https://svnweb.freebsd.org/changeset/base/283846 Log: MFC r277627,r277650,r282059,r283056,r283840,r283845: r277627 (by will): Add routing_test:static_ipv6_loopback_route_for_each_fib. It tests that all FIBs get a static IPv6 loopback route. Submitted by: asomers Sponsored by: Spectra Logic MFSpectraBSD: 1048456 on 2014/03/13 1114523 on 2015/01/23 r277650 (by will): Add tests/etc/rc.d to mtree. Submitted by: stefanf MFC with: 277627 r282059: Move etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@ documented and implemented in other areas of the FreeBSD tree r283056: Move all test integration pieces for etc/ from etc/ to tests/ This is being done to fix breakage with make distribution with read-only source trees as make distribution doesn't use make obj like building tests/ does in all cases Reported by: Wolfgang Zenker Suggested by: jhb r283840: Remove empty tests directory r283845: Append to SUBDIR, not set it Pointyhat to: ngie Added: stable/10/tests/etc/ - copied from r283056, head/tests/etc/ Deleted: stable/10/etc/tests/ Modified: stable/10/etc/Makefile stable/10/etc/mtree/BSD.tests.dist stable/10/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Sun May 31 22:24:29 2015 (r283845) +++ stable/10/etc/Makefile Sun May 31 22:39:48 2015 (r283846) @@ -10,10 +10,6 @@ SUBDIR= \ SUBDIR+=sendmail .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif - BIN1= crontab \ devd.conf \ devfs.conf \ Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun May 31 22:24:29 2015 (r283845) +++ stable/10/etc/mtree/BSD.tests.dist Sun May 31 22:39:48 2015 (r283846) @@ -50,6 +50,8 @@ .. .. etc + rc.d + .. .. games .. Modified: stable/10/tests/Makefile ============================================================================== --- stable/10/tests/Makefile Sun May 31 22:24:29 2015 (r283845) +++ stable/10/tests/Makefile Sun May 31 22:39:48 2015 (r283846) @@ -2,7 +2,8 @@ .include -SUBDIR= sys +SUBDIR+= etc +SUBDIR+= sys TESTSDIR= ${TESTSBASE} KYUAFILE= yes From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 22:41:22 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5045776; Sun, 31 May 2015 22:41:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2BC51BBE; Sun, 31 May 2015 22:41:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMfMSt032477; Sun, 31 May 2015 22:41:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMfM3B032476; Sun, 31 May 2015 22:41:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312241.t4VMfM3B032476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283847 - stable/10/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 22:41:23 -0000 Author: ngie Date: Sun May 31 22:41:22 2015 New Revision: 283847 URL: https://svnweb.freebsd.org/changeset/base/283847 Log: MFC r283502: Remove SUBDIR_DEPEND for non-existent libreadline directory libreadline lives under gnu/lib Modified: stable/10/lib/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Sun May 31 22:39:48 2015 (r283846) +++ stable/10/lib/Makefile Sun May 31 22:41:22 2015 (r283847) @@ -136,7 +136,6 @@ SUBDIR_DEPEND_libpam= libcrypt libopie $ SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd -SUBDIR_DEPEND_libreadline= ncurses SUBDIR_DEPEND_libsmb= libkiconv SUBDIR_DEPEND_libstdc++= msun SUBDIR_DEPEND_libtacplus= libmd From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 22:44:15 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BDCD8F8; Sun, 31 May 2015 22:44:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 695751C3B; Sun, 31 May 2015 22:44:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMiFIp035334; Sun, 31 May 2015 22:44:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMiFO8035331; Sun, 31 May 2015 22:44:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312244.t4VMiFO8035331@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283848 - stable/10/contrib/atf/atf-sh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 22:44:15 -0000 Author: ngie Date: Sun May 31 22:44:14 2015 New Revision: 283848 URL: https://svnweb.freebsd.org/changeset/base/283848 Log: MFC r283170: Import proposed fix from upstream for atf-sh/atf_check_test:flush_stdout_on_timeout Many thanks for jmmv for the fix! PR: 197060 Original commit message: From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Tue, 17 Feb 2015 18:10:11 -0500 Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it was playing solely with time. Fix this by making the test more robust and rename it while we are at it: there is nothing left about "timeouts" in this test, considering that ATF itself does not enforce deadlines any longer. Fixes FreeBSD PR 197060. Modified: stable/10/contrib/atf/atf-sh/atf_check_test.sh stable/10/contrib/atf/atf-sh/misc_helpers.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/atf/atf-sh/atf_check_test.sh ============================================================================== --- stable/10/contrib/atf/atf-sh/atf_check_test.sh Sun May 31 22:41:22 2015 (r283847) +++ stable/10/contrib/atf/atf-sh/atf_check_test.sh Sun May 31 22:44:14 2015 (r283848) @@ -164,18 +164,22 @@ equal_body() grep '^failed: \${x} != \${y} (a != b)$' resfile } -atf_test_case flush_stdout_on_timeout -flush_stdout_on_timeout_body() +atf_test_case flush_stdout_on_death +flush_stdout_on_death_body() { - "$(atf_get_srcdir)/misc_helpers" -s "$(atf_get_srcdir)" atf_check_timeout \ - >out 2>err & + CONTROL_FILE="$(pwd)/done" "$(atf_get_srcdir)/misc_helpers" \ + -s "$(atf_get_srcdir)" atf_check_flush_stdout >out 2>err & pid="${!}" - sleep 1 - kill "${pid}" + while [ ! -f ./done ]; do + echo "Still waiting for helper to create control file" + ls + sleep 1 + done + kill -9 "${pid}" grep 'Executing command.*true' out \ || atf_fail 'First command not in output' - grep 'Executing command.*sleep 42' out \ + grep 'Executing command.*false' out \ || atf_fail 'Second command not in output' } @@ -187,7 +191,7 @@ atf_init_test_cases() atf_add_test_case null_stdout atf_add_test_case null_stderr atf_add_test_case equal - atf_add_test_case flush_stdout_on_timeout + atf_add_test_case flush_stdout_on_death } # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 Modified: stable/10/contrib/atf/atf-sh/misc_helpers.sh ============================================================================== --- stable/10/contrib/atf/atf-sh/misc_helpers.sh Sun May 31 22:41:22 2015 (r283847) +++ stable/10/contrib/atf/atf-sh/misc_helpers.sh Sun May 31 22:44:14 2015 (r283848) @@ -139,16 +139,20 @@ atf_check_equal_eval_fail_body() atf_check_equal '${x}' '${y}' } -atf_test_case atf_check_timeout -atf_check_timeout_head() +atf_test_case atf_check_flush_stdout +atf_check_flush_stdout_head() { atf_set "descr" "Helper test case for the t_atf_check test program" - atf_set "timeout" 1 + atf_set "timeout" "30" } -atf_check_timeout_body() +atf_check_flush_stdout_body() { atf_check true - atf_check sleep 42 + atf_check -s exit:1 false + touch "${CONTROL_FILE:-done}" + while :; do + sleep 1 + done } # ------------------------------------------------------------------------- @@ -281,7 +285,7 @@ atf_init_test_cases() atf_add_test_case atf_check_equal_fail atf_add_test_case atf_check_equal_eval_ok atf_add_test_case atf_check_equal_eval_fail - atf_add_test_case atf_check_timeout + atf_add_test_case atf_check_flush_stdout # Add helper tests for t_config. atf_add_test_case config_get From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 22:49:33 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53060A83; Sun, 31 May 2015 22:49:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40B1D1C62; Sun, 31 May 2015 22:49:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMnX65036141; Sun, 31 May 2015 22:49:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMnX4x036140; Sun, 31 May 2015 22:49:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505312249.t4VMnX4x036140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 31 May 2015 22:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283849 - stable/10/sys/netipsec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 22:49:33 -0000 Author: ae Date: Sun May 31 22:49:32 2015 New Revision: 283849 URL: https://svnweb.freebsd.org/changeset/base/283849 Log: MFC r283117: Remove unneded mbuf length adjustment, M_PREPEND() already did that. PR: 139387 Modified: stable/10/sys/netipsec/keysock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/keysock.c ============================================================================== --- stable/10/sys/netipsec/keysock.c Sun May 31 22:44:14 2015 (r283848) +++ stable/10/sys/netipsec/keysock.c Sun May 31 22:49:32 2015 (r283849) @@ -153,8 +153,6 @@ key_sendup0(rp, m, promisc) PFKEYSTAT_INC(in_nomem); return (ENOBUFS); } - m->m_pkthdr.len += sizeof(*pmsg); /* XXX: is this correct? */ - pmsg = mtod(m, struct sadb_msg *); bzero(pmsg, sizeof(*pmsg)); pmsg->sadb_msg_version = PF_KEY_V2; From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 22:56:03 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C76BBD57; Sun, 31 May 2015 22:56:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA341E65; Sun, 31 May 2015 22:56:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMu3JB040996; Sun, 31 May 2015 22:56:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMu3st040995; Sun, 31 May 2015 22:56:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312256.t4VMu3st040995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283851 - stable/10/tools/regression/file X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 22:56:03 -0000 Author: ngie Date: Sun May 31 22:56:03 2015 New Revision: 283851 URL: https://svnweb.freebsd.org/changeset/base/283851 Log: MFC r283357: Remove directory for test that has been integrated in under tests/sys/... Deleted: stable/10/tools/regression/file/ Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 22:58:44 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF3F1F96; Sun, 31 May 2015 22:58:43 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D00561E90; Sun, 31 May 2015 22:58:43 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMwhN5041561; Sun, 31 May 2015 22:58:43 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMwggt041556; Sun, 31 May 2015 22:58:42 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505312258.t4VMwggt041556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 31 May 2015 22:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283852 - in stable/10: sbin/ifconfig sys/net sys/netinet sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 22:58:44 -0000 Author: ae Date: Sun May 31 22:58:41 2015 New Revision: 283852 URL: https://svnweb.freebsd.org/changeset/base/283852 Log: MFC r282965: Add an ability accept encapsulated packets from different sources by one gif(4) interface. Add new option "ignore_source" for gif(4) interface. When it is enabled, gif's encapcheck function requires match only for packet's destination address. Differential Revision: https://reviews.freebsd.org/D2004 Sponsored by: Yandex LLC Modified: stable/10/sbin/ifconfig/ifconfig.8 stable/10/sbin/ifconfig/ifgif.c stable/10/sys/net/if_gif.h stable/10/sys/netinet/in_gif.c stable/10/sys/netinet6/in6_gif.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.8 Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sbin/ifconfig/ifconfig.8 Sun May 31 22:58:41 2015 (r283852) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd March 6, 2015 +.Dd May 15, 2015 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2444,6 +2444,14 @@ This is for backward compatibility with .It Cm -accept_rev_ethip_ver Clear a flag .Cm accept_rev_ethip_ver . +.It Cm ignore_source +Set a flag to accept encapsulated packets destined to this host +independently from source address. +This may be useful for hosts, that receive encapsulated packets +from the load balancers. +.It Cm -ignore_source +Clear a flag +.Cm ignore_source . .It Cm send_rev_ethip_ver Set a flag to send EtherIP packets with reversed version field intentionally. Modified: stable/10/sbin/ifconfig/ifgif.c ============================================================================== --- stable/10/sbin/ifconfig/ifgif.c Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sbin/ifconfig/ifgif.c Sun May 31 22:58:41 2015 (r283852) @@ -51,7 +51,7 @@ static const char rcsid[] = #include "ifconfig.h" -#define GIFBITS "\020\1ACCEPT_REV_ETHIP_VER\5SEND_REV_ETHIP_VER" +#define GIFBITS "\020\1ACCEPT_REV_ETHIP_VER\2IGNORE_SOURCE\5SEND_REV_ETHIP_VER" static void gif_status(int); @@ -95,6 +95,8 @@ setgifopts(const char *val, static struct cmd gif_cmds[] = { DEF_CMD("accept_rev_ethip_ver", GIF_ACCEPT_REVETHIP, setgifopts), DEF_CMD("-accept_rev_ethip_ver",-GIF_ACCEPT_REVETHIP, setgifopts), + DEF_CMD("ignore_source", GIF_IGNORE_SOURCE, setgifopts), + DEF_CMD("-ignore_source", -GIF_IGNORE_SOURCE, setgifopts), DEF_CMD("send_rev_ethip_ver", GIF_SEND_REVETHIP, setgifopts), DEF_CMD("-send_rev_ethip_ver", -GIF_SEND_REVETHIP, setgifopts), }; Modified: stable/10/sys/net/if_gif.h ============================================================================== --- stable/10/sys/net/if_gif.h Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sys/net/if_gif.h Sun May 31 22:58:41 2015 (r283852) @@ -117,7 +117,9 @@ int gif_encapcheck(const struct mbuf *, #define GIFSOPTS _IOW('i', 151, struct ifreq) #define GIF_ACCEPT_REVETHIP 0x0001 +#define GIF_IGNORE_SOURCE 0x0002 #define GIF_SEND_REVETHIP 0x0010 -#define GIF_OPTMASK (GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP) +#define GIF_OPTMASK (GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP| \ + GIF_IGNORE_SOURCE) #endif /* _NET_IF_GIF_H_ */ Modified: stable/10/sys/netinet/in_gif.c ============================================================================== --- stable/10/sys/netinet/in_gif.c Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sys/netinet/in_gif.c Sun May 31 22:58:41 2015 (r283852) @@ -177,13 +177,19 @@ in_gif_input(struct mbuf **mp, int *offp static int gif_validate4(const struct ip *ip, struct gif_softc *sc, struct ifnet *ifp) { + int ret; GIF_RLOCK_ASSERT(sc); /* check for address match */ - if (sc->gif_iphdr->ip_src.s_addr != ip->ip_dst.s_addr || - sc->gif_iphdr->ip_dst.s_addr != ip->ip_src.s_addr) + if (sc->gif_iphdr->ip_src.s_addr != ip->ip_dst.s_addr) return (0); + ret = 32; + if (sc->gif_iphdr->ip_dst.s_addr != ip->ip_src.s_addr) { + if ((sc->gif_options & GIF_IGNORE_SOURCE) == 0) + return (0); + } else + ret += 32; /* martian filters on outer source - NOT done in ip_input! */ if (IN_MULTICAST(ntohl(ip->ip_src.s_addr))) @@ -214,7 +220,7 @@ gif_validate4(const struct ip *ip, struc } RTFREE_LOCKED(rt); } - return (32 * 2); + return (ret); } /* Modified: stable/10/sys/netinet6/in6_gif.c ============================================================================== --- stable/10/sys/netinet6/in6_gif.c Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sys/netinet6/in6_gif.c Sun May 31 22:58:41 2015 (r283852) @@ -180,6 +180,7 @@ static int gif_validate6(const struct ip6_hdr *ip6, struct gif_softc *sc, struct ifnet *ifp) { + int ret; GIF_RLOCK_ASSERT(sc); /* @@ -187,9 +188,14 @@ gif_validate6(const struct ip6_hdr *ip6, * packet. We should compare the *source* address in our configuration * and the *destination* address of the packet, and vice versa. */ - if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_src, &ip6->ip6_dst) || - !IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_dst, &ip6->ip6_src)) + if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_src, &ip6->ip6_dst)) return (0); + ret = 128; + if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_dst, &ip6->ip6_src)) { + if ((sc->gif_options & GIF_IGNORE_SOURCE) == 0) + return (0); + } else + ret += 128; /* martian filters on outer source - done in ip6_input */ @@ -214,7 +220,7 @@ gif_validate6(const struct ip6_hdr *ip6, RTFREE_LOCKED(rt); } - return (128 * 2); + return (ret); } /* From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 23:00:36 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E76D4147; Sun, 31 May 2015 23:00:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4F041F03; Sun, 31 May 2015 23:00:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VN0aUs042116; Sun, 31 May 2015 23:00:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VN0amx042112; Sun, 31 May 2015 23:00:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312300.t4VN0amx042112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 23:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283853 - in stable/10/cddl: sbin usr.bin usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 23:00:37 -0000 Author: ngie Date: Sun May 31 23:00:35 2015 New Revision: 283853 URL: https://svnweb.freebsd.org/changeset/base/283853 Log: MFC r283147: Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are freestanding (they require libraries build via make libraries in buildworld) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/cddl/sbin/Makefile stable/10/cddl/usr.bin/Makefile stable/10/cddl/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/sbin/Makefile ============================================================================== --- stable/10/cddl/sbin/Makefile Sun May 31 22:58:41 2015 (r283852) +++ stable/10/cddl/sbin/Makefile Sun May 31 23:00:35 2015 (r283853) @@ -13,4 +13,6 @@ _zfs= zfs _zpool= zpool .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/cddl/usr.bin/Makefile ============================================================================== --- stable/10/cddl/usr.bin/Makefile Sun May 31 22:58:41 2015 (r283852) +++ stable/10/cddl/usr.bin/Makefile Sun May 31 23:00:35 2015 (r283853) @@ -26,4 +26,6 @@ _zstreamdump = zstreamdump .endif .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/cddl/usr.sbin/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/Makefile Sun May 31 22:58:41 2015 (r283852) +++ stable/10/cddl/usr.sbin/Makefile Sun May 31 23:00:35 2015 (r283853) @@ -36,4 +36,6 @@ _dtruss= dtruss _lockstat= lockstat .endif +SUBDIR_PARALLEL= + .include From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 23:11:27 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16BC1314; Sun, 31 May 2015 23:11:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 035E6125F; Sun, 31 May 2015 23:11:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VNBQOw047731; Sun, 31 May 2015 23:11:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VNBPrx047719; Sun, 31 May 2015 23:11:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201505312311.t4VNBPrx047719@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 31 May 2015 23:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283854 - in stable/10/sys/dev/cxgbe: common tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 23:11:27 -0000 Author: np Date: Sun May 31 23:11:25 2015 New Revision: 283854 URL: https://svnweb.freebsd.org/changeset/base/283854 Log: MFC r272719: cxgbe/tom: don't leak resources tied to an active open request that cannot be sent to the chip because a prerequisite L2 resolution failed. Modified: stable/10/sys/dev/cxgbe/common/t4_msg.h stable/10/sys/dev/cxgbe/tom/t4_connect.c stable/10/sys/dev/cxgbe/tom/t4_tom.c stable/10/sys/dev/cxgbe/tom/t4_tom.h stable/10/sys/dev/cxgbe/tom/t4_tom_l2t.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_msg.h Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/common/t4_msg.h Sun May 31 23:11:25 2015 (r283854) @@ -273,6 +273,7 @@ union opcode_tid { /* extract the TID from a CPL command */ #define GET_TID(cmd) (G_TID(ntohl(OPCODE_TID(cmd)))) +#define GET_OPCODE(cmd) ((cmd)->ot.opcode) /* partitioning of TID fields that also carry a queue id */ #define S_TID_TID 0 Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_connect.c Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/tom/t4_connect.c Sun May 31 23:11:25 2015 (r283854) @@ -115,8 +115,8 @@ do_act_establish(struct sge_iq *iq, cons { struct adapter *sc = iq->adapter; const struct cpl_act_establish *cpl = (const void *)(rss + 1); - unsigned int tid = GET_TID(cpl); - unsigned int atid = G_TID_TID(ntohl(cpl->tos_atid)); + u_int tid = GET_TID(cpl); + u_int atid = G_TID_TID(ntohl(cpl->tos_atid)); struct toepcb *toep = lookup_atid(sc, atid); struct inpcb *inp = toep->inp; @@ -178,17 +178,34 @@ act_open_rpl_status_to_errno(int status) } } +void +act_open_failure_cleanup(struct adapter *sc, u_int atid, u_int status) +{ + struct toepcb *toep = lookup_atid(sc, atid); + struct inpcb *inp = toep->inp; + struct toedev *tod = &toep->td->tod; + + free_atid(sc, atid); + toep->tid = -1; + + if (status != EAGAIN) + INP_INFO_WLOCK(&V_tcbinfo); + INP_WLOCK(inp); + toe_connect_failed(tod, inp, status); + final_cpl_received(toep); /* unlocks inp */ + if (status != EAGAIN) + INP_INFO_WUNLOCK(&V_tcbinfo); +} + static int do_act_open_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { struct adapter *sc = iq->adapter; const struct cpl_act_open_rpl *cpl = (const void *)(rss + 1); - unsigned int atid = G_TID_TID(G_AOPEN_ATID(be32toh(cpl->atid_status))); - unsigned int status = G_AOPEN_STATUS(be32toh(cpl->atid_status)); + u_int atid = G_TID_TID(G_AOPEN_ATID(be32toh(cpl->atid_status))); + u_int status = G_AOPEN_STATUS(be32toh(cpl->atid_status)); struct toepcb *toep = lookup_atid(sc, atid); - struct inpcb *inp = toep->inp; - struct toedev *tod = &toep->td->tod; int rc; KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); @@ -200,20 +217,11 @@ do_act_open_rpl(struct sge_iq *iq, const if (negative_advice(status)) return (0); - free_atid(sc, atid); - toep->tid = -1; - if (status && act_open_has_tid(status)) release_tid(sc, GET_TID(cpl), toep->ctrlq); rc = act_open_rpl_status_to_errno(status); - if (rc != EAGAIN) - INP_INFO_WLOCK(&V_tcbinfo); - INP_WLOCK(inp); - toe_connect_failed(tod, inp, rc); - final_cpl_received(toep); /* unlocks inp */ - if (rc != EAGAIN) - INP_INFO_WUNLOCK(&V_tcbinfo); + act_open_failure_cleanup(sc, atid, rc); return (0); } Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.c Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.c Sun May 31 23:11:25 2015 (r283854) @@ -97,6 +97,7 @@ static void t4_clip_task(void *, int); static void update_clip_table(struct adapter *, struct tom_data *); static void destroy_clip_table(struct adapter *, struct tom_data *); static void free_tom_data(struct adapter *, struct tom_data *); +static void reclaim_wr_resources(void *, int); static int in6_ifaddr_gen; static eventhandler_tag ifaddr_evhandler; @@ -902,6 +903,8 @@ free_tom_data(struct adapter *sc, struct if (td->listen_mask != 0) hashdestroy(td->listen_hash, M_CXGBE, td->listen_mask); + if (mtx_initialized(&td->unsent_wr_lock)) + mtx_destroy(&td->unsent_wr_lock); if (mtx_initialized(&td->lctx_hash_lock)) mtx_destroy(&td->lctx_hash_lock); if (mtx_initialized(&td->toep_list_lock)) @@ -911,6 +914,44 @@ free_tom_data(struct adapter *sc, struct free(td, M_CXGBE); } +static void +reclaim_wr_resources(void *arg, int count) +{ + struct tom_data *td = arg; + STAILQ_HEAD(, wrqe) twr_list = STAILQ_HEAD_INITIALIZER(twr_list); + struct cpl_act_open_req *cpl; + u_int opcode, atid; + struct wrqe *wr; + struct adapter *sc; + + mtx_lock(&td->unsent_wr_lock); + STAILQ_SWAP(&td->unsent_wr_list, &twr_list, wrqe); + mtx_unlock(&td->unsent_wr_lock); + + while ((wr = STAILQ_FIRST(&twr_list)) != NULL) { + STAILQ_REMOVE_HEAD(&twr_list, link); + + cpl = wrtod(wr); + opcode = GET_OPCODE(cpl); + + switch (opcode) { + case CPL_ACT_OPEN_REQ: + case CPL_ACT_OPEN_REQ6: + atid = G_TID_TID(be32toh(OPCODE_TID(cpl))); + sc = td_adapter(td); + + CTR2(KTR_CXGBE, "%s: atid %u ", __func__, atid); + act_open_failure_cleanup(sc, atid, EHOSTUNREACH); + free(wr, M_CXGBE); + break; + default: + log(LOG_ERR, "%s: leaked work request %p, wr_len %d, " + "opcode %x\n", __func__, wr, wr->wr_len, opcode); + /* WR not freed here; go look at it with a debugger. */ + } + } +} + /* * Ground control to Major TOM * Commencing countdown, engines on @@ -938,6 +979,11 @@ t4_tom_activate(struct adapter *sc) td->listen_hash = hashinit_flags(LISTEN_HASH_SIZE, M_CXGBE, &td->listen_mask, HASH_NOWAIT); + /* List of WRs for which L2 resolution failed */ + mtx_init(&td->unsent_wr_lock, "Unsent WR list lock", NULL, MTX_DEF); + STAILQ_INIT(&td->unsent_wr_list); + TASK_INIT(&td->reclaim_wr_resources, 0, reclaim_wr_resources, td); + /* TID tables */ rc = alloc_tid_tabs(&sc->tids); if (rc != 0) @@ -1011,6 +1057,12 @@ t4_tom_deactivate(struct adapter *sc) rc = EBUSY; mtx_unlock(&td->lctx_hash_lock); + taskqueue_drain(taskqueue_thread, &td->reclaim_wr_resources); + mtx_lock(&td->unsent_wr_lock); + if (!STAILQ_EMPTY(&td->unsent_wr_list)) + rc = EBUSY; + mtx_unlock(&td->unsent_wr_lock); + if (rc == 0) { unregister_toedev(sc->tom_softc); free_tom_data(sc, td); Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Sun May 31 23:11:25 2015 (r283854) @@ -199,6 +199,11 @@ struct tom_data { struct mtx clip_table_lock; struct clip_head clip_table; int clip_gen; + + /* WRs that will not be sent to the chip because L2 resolution failed */ + struct mtx unsent_wr_lock; + STAILQ_HEAD(, wrqe) unsent_wr_list; + struct task reclaim_wr_resources; }; static inline struct tom_data * @@ -241,6 +246,7 @@ void release_lip(struct tom_data *, stru void t4_init_connect_cpl_handlers(struct adapter *); int t4_connect(struct toedev *, struct socket *, struct rtentry *, struct sockaddr *); +void act_open_failure_cleanup(struct adapter *, u_int, u_int); /* t4_listen.c */ void t4_init_listen_cpl_handlers(struct adapter *); Modified: stable/10/sys/dev/cxgbe/tom/t4_tom_l2t.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom_l2t.c Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/tom/t4_tom_l2t.c Sun May 31 23:11:25 2015 (r283854) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -161,25 +162,17 @@ send_pending(struct adapter *sc, struct } static void -resolution_failed_for_wr(struct wrqe *wr) +resolution_failed(struct adapter *sc, struct l2t_entry *e) { - log(LOG_ERR, "%s: leaked work request %p, wr_len %d\n", __func__, wr, - wr->wr_len); - - /* free(wr, M_CXGBE); */ -} - -static void -resolution_failed(struct l2t_entry *e) -{ - struct wrqe *wr; + struct tom_data *td = sc->tom_softc; mtx_assert(&e->lock, MA_OWNED); - while ((wr = STAILQ_FIRST(&e->wr_list)) != NULL) { - STAILQ_REMOVE_HEAD(&e->wr_list, link); - resolution_failed_for_wr(wr); - } + mtx_lock(&td->unsent_wr_lock); + STAILQ_CONCAT(&td->unsent_wr_list, &e->wr_list); + mtx_unlock(&td->unsent_wr_lock); + + taskqueue_enqueue(taskqueue_thread, &td->reclaim_wr_resources); } static void @@ -203,7 +196,7 @@ update_entry(struct adapter *sc, struct * need to wlock the table). */ e->state = L2T_STATE_FAILED; - resolution_failed(e); + resolution_failed(sc, e); return; } else if (lladdr == NULL) { @@ -305,12 +298,11 @@ again: if (e->state == L2T_STATE_VALID && !STAILQ_EMPTY(&e->wr_list)) send_pending(sc, e); if (e->state == L2T_STATE_FAILED) - resolution_failed(e); + resolution_failed(sc, e); mtx_unlock(&e->lock); break; case L2T_STATE_FAILED: - resolution_failed_for_wr(wr); return (EHOSTUNREACH); } From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 23:29:05 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84A7280C; Sun, 31 May 2015 23:29:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 723E8158F; Sun, 31 May 2015 23:29:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VNT5JX056650; Sun, 31 May 2015 23:29:05 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VNT5eP056647; Sun, 31 May 2015 23:29:05 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505312329.t4VNT5eP056647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 31 May 2015 23:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283855 - stable/10/sys/net80211 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 23:29:05 -0000 Author: ae Date: Sun May 31 23:29:04 2015 New Revision: 283855 URL: https://svnweb.freebsd.org/changeset/base/283855 Log: MFC r283313: Properly update TX statistics for wlan(4). ieee80211_pwrsave() can fail due to queue overflow, check its return code and increment oerrors counter when it fails. Also handle more error cases and update oerrors counter when we don't send mbuf due to some errors. Return ENETDOWN when parent interface isn't ready. Update obytes and omcasts counters in corresponding places. PR: 184626 Differential Revision: https://reviews.freebsd.org/D2621 Modified: stable/10/sys/net80211/ieee80211_output.c stable/10/sys/net80211/ieee80211_wds.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net80211/ieee80211_output.c ============================================================================== --- stable/10/sys/net80211/ieee80211_output.c Sun May 31 23:11:25 2015 (r283854) +++ stable/10/sys/net80211/ieee80211_output.c Sun May 31 23:29:04 2015 (r283855) @@ -131,7 +131,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 { struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; - int error; + int error, len, mcast; if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) { @@ -141,7 +141,8 @@ ieee80211_vap_pkt_send_dest(struct ieee8 * the frame back when the time is right. * XXX lose WDS vap linkage? */ - (void) ieee80211_pwrsave(ni, m); + if (ieee80211_pwrsave(ni, m) != 0) + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_free_node(ni); /* @@ -170,6 +171,8 @@ ieee80211_vap_pkt_send_dest(struct ieee8 * interface it (might have been) received on. */ m->m_pkthdr.rcvif = (void *)ni; + mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1: 0; + len = m->m_pkthdr.len; BPF_MTAP(ifp, m); /* 802.3 tx */ @@ -235,7 +238,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 /* NB: stat+msg handled in ieee80211_encap */ IEEE80211_TX_UNLOCK(ic); ieee80211_free_node(ni); - /* XXX better status? */ + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENOBUFS); } } @@ -249,8 +252,11 @@ ieee80211_vap_pkt_send_dest(struct ieee8 if (error != 0) { /* NB: IFQ_HANDOFF reclaims mbuf */ ieee80211_free_node(ni); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } else { ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast); + if_inc_counter(ifp, IFCOUNTER_OBYTES, len); } ic->ic_lastdata = ticks; @@ -314,6 +320,7 @@ ieee80211_start_pkt(struct ieee80211vap eh->ether_dhost, "mcast", "%s", "on DWDS"); vap->iv_stats.is_dwds_mcast++; m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); /* XXX better status? */ return (ENOBUFS); } @@ -415,9 +422,9 @@ ieee80211_vap_transmit(struct ifnet *ifp IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, "%s: ignore queue, parent %s not up+running\n", __func__, parent->if_xname); - /* XXX stat */ m_freem(m); - return (EINVAL); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ENETDOWN); } if (vap->iv_state == IEEE80211_S_SLEEP) { /* @@ -444,7 +451,8 @@ ieee80211_vap_transmit(struct ifnet *ifp IEEE80211_UNLOCK(ic); ifp->if_drv_flags |= IFF_DRV_OACTIVE; m_freem(m); - return (EINVAL); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ENETDOWN); } IEEE80211_UNLOCK(ic); } Modified: stable/10/sys/net80211/ieee80211_wds.c ============================================================================== --- stable/10/sys/net80211/ieee80211_wds.c Sun May 31 23:11:25 2015 (r283854) +++ stable/10/sys/net80211/ieee80211_wds.c Sun May 31 23:29:04 2015 (r283855) @@ -300,8 +300,12 @@ ieee80211_dwds_mcast(struct ieee80211vap /* NB: IFQ_HANDOFF reclaims mbuf */ ifp->if_oerrors++; ieee80211_free_node(ni); - } else + } else { ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, + m->m_pkthdr.len); + } } } From owner-svn-src-stable-10@FreeBSD.ORG Sun May 31 23:47:10 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5956EBF8; Sun, 31 May 2015 23:47:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B8DF19C0; Sun, 31 May 2015 23:47:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VNlAcX066263; Sun, 31 May 2015 23:47:10 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VNl9Hm066259; Sun, 31 May 2015 23:47:09 GMT (envelope-from np@FreeBSD.org) Message-Id: <201505312347.t4VNl9Hm066259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 31 May 2015 23:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283856 - in stable/10/sys/dev/cxgbe: iw_cxgbe tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 23:47:10 -0000 Author: np Date: Sun May 31 23:47:08 2015 New Revision: 283856 URL: https://svnweb.freebsd.org/changeset/base/283856 Log: MFC r273480, r273750, r273753, r273797, and r274461. r273480: cxgbe/iw_cxgbe: wake up waiters after flushing the qp. r273750: Some cxgbe/iw_cxgbe fixes: - Free rt in c4iw_connect only if it is allocated. - Call soclose instead of so_shutdown if there is an abort from the peer. - Close socket and return failure if TOE is not enabled. r273753: iwcm_event status needs to be populated for close_complete_upcall r273797: Always request a completion for every work request for iWARP. The initial MPA exchange must be tracked this way so that t4_tom's state for the tid is all clean at the time the tid transitions to RDMA mode. Once it does, t4_tom is out of the way and iw_cxgbe uses the qp endpoints directly. r274461: iw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect fails. Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Sun May 31 23:29:04 2015 (r283855) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Sun May 31 23:47:08 2015 (r283856) @@ -94,7 +94,7 @@ static void abort_socket(struct c4iw_ep static void send_mpa_req(struct c4iw_ep *ep); static int send_mpa_reject(struct c4iw_ep *ep, const void *pdata, u8 plen); static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen); -static void close_complete_upcall(struct c4iw_ep *ep); +static void close_complete_upcall(struct c4iw_ep *ep, int status); static int abort_connection(struct c4iw_ep *ep); static void peer_close_upcall(struct c4iw_ep *ep); static void peer_abort_upcall(struct c4iw_ep *ep); @@ -366,7 +366,7 @@ process_peer_close(struct c4iw_ep *ep) C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); } close_socket(&ep->com, 0); - close_complete_upcall(ep); + close_complete_upcall(ep, 0); __state_set(&ep->com, DEAD); release = 1; disconnect = 0; @@ -474,7 +474,7 @@ process_conn_error(struct c4iw_ep *ep) if (state != ABORTING) { CTR2(KTR_IW_CXGBE, "%s:pce1 %p", __func__, ep); - close_socket(&ep->com, 0); + close_socket(&ep->com, 1); state_set(&ep->com, DEAD); c4iw_put_ep(&ep->com); } @@ -528,7 +528,7 @@ process_close_complete(struct c4iw_ep *e CTR2(KTR_IW_CXGBE, "%s:pcc4 %p", __func__, ep); close_socket(&ep->com, 0); } - close_complete_upcall(ep); + close_complete_upcall(ep, 0); __state_set(&ep->com, DEAD); release = 1; break; @@ -1206,13 +1206,14 @@ static int send_mpa_reply(struct c4iw_ep -static void close_complete_upcall(struct c4iw_ep *ep) +static void close_complete_upcall(struct c4iw_ep *ep, int status) { struct iw_cm_event event; CTR2(KTR_IW_CXGBE, "%s:ccuB %p", __func__, ep); memset(&event, 0, sizeof(event)); event.event = IW_CM_EVENT_CLOSE; + event.status = status; if (ep->com.cm_id) { @@ -1231,7 +1232,7 @@ static int abort_connection(struct c4iw_ int err; CTR2(KTR_IW_CXGBE, "%s:abB %p", __func__, ep); - close_complete_upcall(ep); + close_complete_upcall(ep, -ECONNRESET); state_set(&ep->com, ABORTING); abort_socket(ep); err = close_socket(&ep->com, 0); @@ -2098,14 +2099,15 @@ int c4iw_connect(struct iw_cm_id *cm_id, CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep); printk(KERN_ERR MOD "%s - cannot find route.\n", __func__); err = -EHOSTUNREACH; - goto fail3; + goto fail2; } - - if (!(rt->rt_ifp->if_flags & IFCAP_TOE)) { + if (!(rt->rt_ifp->if_capenable & IFCAP_TOE)) { CTR2(KTR_IW_CXGBE, "%s:cc8 %p", __func__, ep); printf("%s - interface not TOE capable.\n", __func__); + close_socket(&ep->com, 0); + err = -ENOPROTOOPT; goto fail3; } tdev = TOEDEV(rt->rt_ifp); @@ -2126,9 +2128,11 @@ int c4iw_connect(struct iw_cm_id *cm_id, ep->com.thread); if (!err) { - CTR2(KTR_IW_CXGBE, "%s:cca %p", __func__, ep); goto out; + } else { + close_socket(&ep->com, 0); + goto fail2; } fail3: @@ -2225,7 +2229,7 @@ int c4iw_ep_disconnect(struct c4iw_ep *e CTR2(KTR_IW_CXGBE, "%s:ced1 %p", __func__, ep); fatal = 1; - close_complete_upcall(ep); + close_complete_upcall(ep, -EIO); ep->com.state = DEAD; } CTR3(KTR_IW_CXGBE, "%s:ced2 %p %s", __func__, ep, Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Sun May 31 23:29:04 2015 (r283855) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Sun May 31 23:47:08 2015 (r283856) @@ -1359,9 +1359,9 @@ err: qhp->ep = NULL; set_state(qhp, C4IW_QP_STATE_ERROR); free = 1; - wake_up(&qhp->wait); BUG_ON(!ep); flush_qp(qhp); + wake_up(&qhp->wait); out: mutex_unlock(&qhp->mutex); Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sun May 31 23:29:04 2015 (r283855) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sun May 31 23:47:08 2015 (r283856) @@ -769,7 +769,7 @@ t4_push_frames(struct adapter *sc, struc toep->tx_nocompl >= toep->tx_total / 4) compl = 1; - if (compl) { + if (compl || toep->ulp_mode == ULP_MODE_RDMA) { txwr->op_to_immdlen |= htobe32(F_FW_WR_COMPL); toep->tx_nocompl = 0; toep->plen_nocompl = 0; From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 00:09:22 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A8F693; Mon, 1 Jun 2015 00:09:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D9E1E04; Mon, 1 Jun 2015 00:09:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5109Lf1077561; Mon, 1 Jun 2015 00:09:21 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5109LIG077560; Mon, 1 Jun 2015 00:09:21 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010009.t5109LIG077560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 00:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283857 - stable/10/usr.sbin/bsdconfig/share X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 00:09:22 -0000 Author: dteske Date: Mon Jun 1 00:09:21 2015 New Revision: 283857 URL: https://svnweb.freebsd.org/changeset/base/283857 Log: MFC r280921: Fix typo in a comment. Modified: stable/10/usr.sbin/bsdconfig/share/geom.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/geom.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/geom.subr Sun May 31 23:47:08 2015 (r283856) +++ stable/10/usr.sbin/bsdconfig/share/geom.subr Mon Jun 1 00:09:21 2015 (r283857) @@ -409,7 +409,7 @@ f_geom_parent() ############################################################ MAIN # -# Parse GEOM configuration unless requeted otherwise +# Parse GEOM configuration unless requested otherwise # f_dprintf "%s: GEOM_SELF_SCAN_ALL=[%s]" geom.subr "$GEOM_SELF_SCAN_ALL" case "$GEOM_SELF_SCAN_ALL" in From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 01:06:34 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1AE96AE; Mon, 1 Jun 2015 01:06:34 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DEA41ADA; Mon, 1 Jun 2015 01:06:34 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5116YkR006997; Mon, 1 Jun 2015 01:06:34 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5116Ypt006992; Mon, 1 Jun 2015 01:06:34 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010106.t5116Ypt006992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 01:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283859 - in stable/10/usr.sbin/bsdinstall: distextract distfetch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 01:06:34 -0000 Author: dteske Date: Mon Jun 1 01:06:33 2015 New Revision: 283859 URL: https://svnweb.freebsd.org/changeset/base/283859 Log: MFC SVN revisions 272278,272379,275874: r272278: Prevent buffer overflow(s) + style(9) nits r272379: Optimize program performance + style(9) nits r275874: Improve feedback to user by using dpv(3) Modified: stable/10/usr.sbin/bsdinstall/distextract/Makefile stable/10/usr.sbin/bsdinstall/distextract/distextract.c stable/10/usr.sbin/bsdinstall/distfetch/distfetch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/distextract/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/distextract/Makefile Mon Jun 1 00:55:15 2015 (r283858) +++ stable/10/usr.sbin/bsdinstall/distextract/Makefile Mon Jun 1 01:06:33 2015 (r283859) @@ -2,8 +2,8 @@ BINDIR= /usr/libexec/bsdinstall PROG= distextract -DPADD= ${LIBARCHIVE} ${LIBDIALOG} ${LIBM} -LDADD= -larchive -ldialog -lm +DPADD= ${LIBARCHIVE} ${LIBDPV} ${LIBFIGPAR} ${LIBDIALOG} ${LIBM} +LDADD= -larchive -ldpv -lfigpar -ldialog -lm WARNS?= 6 MAN= Modified: stable/10/usr.sbin/bsdinstall/distextract/distextract.c ============================================================================== --- stable/10/usr.sbin/bsdinstall/distextract/distextract.c Mon Jun 1 00:55:15 2015 (r283858) +++ stable/10/usr.sbin/bsdinstall/distextract/distextract.c Mon Jun 1 01:06:33 2015 (r283859) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Nathan Whitehorn + * Copyright (c) 2014 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,118 +23,231 @@ * 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$ */ +#include +__FBSDID("$FreeBSD$"); + #include -#include -#include -#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Data to process */ +static char *distdir = NULL; +static struct archive *archive = NULL; +static struct dpv_file_node *dists = NULL; + +/* Function prototypes */ +static void sig_int(int sig); +static int count_files(const char *file); +static int extract_files(struct dpv_file_node *file, int out); + +#if __FreeBSD_version <= 1000008 /* r232154: bump for libarchive update */ +#define archive_read_support_filter_all(x) \ + archive_read_support_compression_all(x) +#endif -static int extract_files(int nfiles, const char **files); +#define _errx(...) (end_dialog(), errx(__VA_ARGS__)) int main(void) { - char *diststring; - const char **dists; - int i, retval, ndists = 0; - - if (getenv("DISTRIBUTIONS") == NULL) { - fprintf(stderr, "DISTRIBUTIONS variable is not set\n"); - return (1); - } - - diststring = strdup(getenv("DISTRIBUTIONS")); - for (i = 0; diststring[i] != 0; i++) - if (isspace(diststring[i]) && !isspace(diststring[i+1])) - ndists++; - ndists++; /* Last one */ - - dists = calloc(ndists, sizeof(const char *)); - if (dists == NULL) { - fprintf(stderr, "Out of memory!\n"); - free(diststring); - return (1); - } - - for (i = 0; i < ndists; i++) - dists[i] = strsep(&diststring, " \t"); + char *chrootdir; + char *distributions; + int retval; + size_t config_size = sizeof(struct dpv_config); + size_t file_node_size = sizeof(struct dpv_file_node); + size_t span; + struct dpv_config *config; + struct dpv_file_node *dist = dists; + static char backtitle[] = "FreeBSD Installer"; + static char title[] = "Archive Extraction"; + static char aprompt[] = "\n Overall Progress:"; + static char pprompt[] = "Extracting distribution files...\n"; + struct sigaction act; + char error[PATH_MAX + 512]; + + if ((distributions = getenv("DISTRIBUTIONS")) == NULL) + errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); + if ((distdir = getenv("BSDINSTALL_DISTDIR")) == NULL) + distdir = __DECONST(char *, ""); + /* Initialize dialog(3) */ init_dialog(stdin, stdout); - dialog_vars.backtitle = __DECONST(char *, "FreeBSD Installer"); + dialog_vars.backtitle = backtitle; dlg_put_backtitle(); - if (chdir(getenv("BSDINSTALL_CHROOT")) != 0) { - char error[512]; - sprintf(error, "Could could change to directory %s: %s\n", - getenv("BSDINSTALL_DISTDIR"), strerror(errno)); + dialog_msgbox("", + "Checking distribution archives.\nPlease wait...", 4, 35, FALSE); + + /* + * Parse $DISTRIBUTIONS into dpv(3) linked-list + */ + while (*distributions != '\0') { + span = strcspn(distributions, "\t\n\v\f\r "); + if (span < 1) { /* currently on whitespace */ + distributions++; + continue; + } + + /* Allocate a new struct for the distribution */ + if (dist == NULL) { + if ((dist = calloc(1, file_node_size)) == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + dists = dist; + } else { + dist->next = calloc(1, file_node_size); + if (dist->next == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + dist = dist->next; + } + + /* Set path */ + if ((dist->path = malloc(span + 1)) == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + snprintf(dist->path, span + 1, "%s", distributions); + dist->path[span] = '\0'; + + /* Set display name */ + dist->name = strrchr(dist->path, '/'); + if (dist->name == NULL) + dist->name = dist->path; + + /* Set initial length in files (-1 == error) */ + dist->length = count_files(dist->path); + if (dist->length < 0) { + end_dialog(); + return (EXIT_FAILURE); + } + + distributions += span; + } + + /* Optionally chdir(2) into $BSDINSTALL_CHROOT */ + chrootdir = getenv("BSDINSTALL_CHROOT"); + if (chrootdir != NULL && chdir(chrootdir) != 0) { + snprintf(error, sizeof(error), + "Could not change to directory %s: %s\n", + chrootdir, strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); - return (1); + return (EXIT_FAILURE); } - retval = extract_files(ndists, dists); - + /* Set cleanup routine for Ctrl-C action */ + act.sa_handler = sig_int; + sigaction(SIGINT, &act, 0); + + /* + * Hand off to dpv(3) + */ + if ((config = calloc(1, config_size)) == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + config->backtitle = backtitle; + config->title = title; + config->pprompt = pprompt; + config->aprompt = aprompt; + config->options |= DPV_WIDE_MODE; + config->label_size = -1; + config->action = extract_files; + config->status_solo = + "%10lli files read @ %'9.1f files/sec."; + config->status_many = + "%10lli files read @ %'9.1f files/sec. [%i/%i busy/wait]"; end_dialog(); + retval = dpv(config, dists); - free(diststring); - free(dists); + dpv_free(); + while ((dist = dists) != NULL) { + dists = dist->next; + if (dist->path != NULL) + free(dist->path); + free(dist); + } return (retval); } +static void +sig_int(int sig __unused) +{ + dpv_interrupt = TRUE; +} + +/* + * Returns number of files in archive file. Parses $BSDINSTALL_DISTDIR/MANIFEST + * if it exists, otherwise uses archive(3) to read the archive file. + */ static int count_files(const char *file) { - struct archive *archive; - struct archive_entry *entry; static FILE *manifest = NULL; - char path[MAXPATHLEN]; - char errormsg[512]; - int file_count, err; + char *p; + int file_count; + int retval; + size_t span; + struct archive_entry *entry; + char line[512]; + char path[PATH_MAX]; + char errormsg[PATH_MAX + 512]; if (manifest == NULL) { - sprintf(path, "%s/MANIFEST", getenv("BSDINSTALL_DISTDIR")); + snprintf(path, sizeof(path), "%s/MANIFEST", distdir); manifest = fopen(path, "r"); } if (manifest != NULL) { - char line[512]; - char *tok1, *tok2; - rewind(manifest); while (fgets(line, sizeof(line), manifest) != NULL) { - tok2 = line; - tok1 = strsep(&tok2, "\t"); - if (tok1 == NULL || strcmp(tok1, file) != 0) + p = &line[0]; + span = strcspn(p, "\t") ; + if (span < 1 || strncmp(p, file, span) != 0) continue; /* * We're at the right manifest line. The file count is * in the third element */ - tok1 = strsep(&tok2, "\t"); - tok1 = strsep(&tok2, "\t"); - if (tok1 != NULL) - return atoi(tok1); + span = strcspn(p += span + (*p != '\0' ? 1 : 0), "\t"); + span = strcspn(p += span + (*p != '\0' ? 1 : 0), "\t"); + if (span > 0) { + file_count = (int)strtol(p, (char **)NULL, 10); + if (file_count == 0 && errno == EINVAL) + continue; + return (file_count); + } } } - /* Either we didn't have a manifest, or this archive wasn't there */ - archive = archive_read_new(); + /* + * Either no manifest, or manifest didn't mention this archive. + * Use archive(3) to read the archive, counting files within. + */ + if ((archive = archive_read_new()) == NULL) { + snprintf(errormsg, sizeof(errormsg), + "Error: %s\n", archive_error_string(NULL)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + return (-1); + } archive_read_support_format_all(archive); archive_read_support_filter_all(archive); - sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), file); - err = archive_read_open_filename(archive, path, 4096); - if (err != ARCHIVE_OK) { + snprintf(path, sizeof(path), "%s/%s", distdir, file); + retval = archive_read_open_filename(archive, path, 4096); + if (retval != ARCHIVE_OK) { snprintf(errormsg, sizeof(errormsg), "Error while extracting %s: %s\n", file, archive_error_string(archive)); dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + archive = NULL; return (-1); } @@ -141,101 +255,75 @@ count_files(const char *file) while (archive_read_next_header(archive, &entry) == ARCHIVE_OK) file_count++; archive_read_free(archive); + archive = NULL; return (file_count); } static int -extract_files(int nfiles, const char **files) +extract_files(struct dpv_file_node *file, int out __unused) { - const char *items[nfiles*2]; - char path[PATH_MAX]; - int archive_files[nfiles]; - int total_files, current_files, archive_file; - struct archive *archive; + int retval; struct archive_entry *entry; - char errormsg[512]; - char status[8]; - int i, err, progress, last_progress; - - err = 0; - progress = 0; - - /* Make the transfer list for dialog */ - for (i = 0; i < nfiles; i++) { - items[i*2] = strrchr(files[i], '/'); - if (items[i*2] != NULL) - items[i*2]++; - else - items[i*2] = files[i]; - items[i*2 + 1] = "Pending"; - } - - dialog_msgbox("", - "Checking distribution archives.\nPlease wait...", 0, 0, FALSE); + char path[PATH_MAX]; + char errormsg[PATH_MAX + 512]; - /* Count all the files */ - total_files = 0; - for (i = 0; i < nfiles; i++) { - archive_files[i] = count_files(files[i]); - if (archive_files[i] < 0) + /* Open the archive if necessary */ + if (archive == NULL) { + if ((archive = archive_read_new()) == NULL) { + snprintf(errormsg, sizeof(errormsg), + "Error: %s\n", archive_error_string(NULL)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + dpv_abort = 1; return (-1); - total_files += archive_files[i]; - } - - current_files = 0; - - for (i = 0; i < nfiles; i++) { - archive = archive_read_new(); + } archive_read_support_format_all(archive); archive_read_support_filter_all(archive); - sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), files[i]); - err = archive_read_open_filename(archive, path, 4096); - - items[i*2 + 1] = "In Progress"; - archive_file = 0; - - while ((err = archive_read_next_header(archive, &entry)) == - ARCHIVE_OK) { - last_progress = progress; - progress = (current_files*100)/total_files; - - sprintf(status, "-%d", - (archive_file*100)/archive_files[i]); - items[i*2 + 1] = status; - - if (progress > last_progress) - dialog_mixedgauge("Archive Extraction", - "Extracting distribution files...", 0, 0, - progress, nfiles, - __DECONST(char **, items)); - - err = archive_read_extract(archive, entry, - ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_OWNER | - ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL | - ARCHIVE_EXTRACT_XATTR | ARCHIVE_EXTRACT_FFLAGS); - - if (err != ARCHIVE_OK) - break; - - archive_file++; - current_files++; - } - - items[i*2 + 1] = "Done"; - - if (err != ARCHIVE_EOF) { + snprintf(path, sizeof(path), "%s/%s", distdir, file->path); + retval = archive_read_open_filename(archive, path, 4096); + if (retval != 0) { snprintf(errormsg, sizeof(errormsg), - "Error while extracting %s: %s\n", items[i*2], + "Error opening %s: %s\n", file->name, archive_error_string(archive)); - items[i*2 + 1] = "Failed"; - dialog_msgbox("Extract Error", errormsg, 0, 0, - TRUE); - return (err); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + file->status = DPV_STATUS_FAILED; + dpv_abort = 1; + return (-1); } + } + /* Read the next archive header */ + retval = archive_read_next_header(archive, &entry); + + /* If that went well, perform the extraction */ + if (retval == ARCHIVE_OK) + retval = archive_read_extract(archive, entry, + ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_OWNER | + ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL | + ARCHIVE_EXTRACT_XATTR | ARCHIVE_EXTRACT_FFLAGS); + + /* Test for either EOF or error */ + if (retval == ARCHIVE_EOF) { archive_read_free(archive); + archive = NULL; + file->status = DPV_STATUS_DONE; + return (100); + } else if (retval != ARCHIVE_OK) { + snprintf(errormsg, sizeof(errormsg), + "Error while extracting %s: %s\n", file->name, + archive_error_string(archive)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + file->status = DPV_STATUS_FAILED; + dpv_abort = 1; + return (-1); } - return (0); + dpv_overall_read++; + file->read++; + + /* Calculate [overall] percentage of completion (if possible) */ + if (file->length >= 0) + return (file->read * 100 / file->length); + else + return (-1); } Modified: stable/10/usr.sbin/bsdinstall/distfetch/distfetch.c ============================================================================== --- stable/10/usr.sbin/bsdinstall/distfetch/distfetch.c Mon Jun 1 00:55:15 2015 (r283858) +++ stable/10/usr.sbin/bsdinstall/distfetch/distfetch.c Mon Jun 1 01:06:33 2015 (r283859) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Nathan Whitehorn + * Copyright (c) 2014 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,15 +23,21 @@ * 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$ */ +#include +__FBSDID("$FreeBSD$"); + #include -#include +#include +#include +#include #include #include -#include +#include +#include +#include +#include static int fetch_files(int nfiles, char **urls); @@ -39,12 +46,13 @@ main(void) { char *diststring; char **urls; - int i, nfetched, ndists = 0; + int i; + int ndists = 0; + int nfetched; + char error[PATH_MAX + 512]; - if (getenv("DISTRIBUTIONS") == NULL) { - fprintf(stderr, "DISTRIBUTIONS variable is not set\n"); - return (1); - } + if (getenv("DISTRIBUTIONS") == NULL) + errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); diststring = strdup(getenv("DISTRIBUTIONS")); for (i = 0; diststring[i] != 0; i++) @@ -54,9 +62,8 @@ main(void) urls = calloc(ndists, sizeof(const char *)); if (urls == NULL) { - fprintf(stderr, "Out of memory!\n"); free(diststring); - return (1); + errx(EXIT_FAILURE, "Out of memory!"); } init_dialog(stdin, stdout); @@ -65,17 +72,17 @@ main(void) for (i = 0; i < ndists; i++) { urls[i] = malloc(PATH_MAX); - sprintf(urls[i], "%s/%s", getenv("BSDINSTALL_DISTSITE"), - strsep(&diststring, " \t")); + snprintf(urls[i], PATH_MAX, "%s/%s", + getenv("BSDINSTALL_DISTSITE"), strsep(&diststring, " \t")); } if (chdir(getenv("BSDINSTALL_DISTDIR")) != 0) { - char error[512]; - sprintf(error, "Could could change to directory %s: %s\n", + snprintf(error, sizeof(error), + "Could could change to directory %s: %s\n", getenv("BSDINSTALL_DISTDIR"), strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); - return (1); + return (EXIT_FAILURE); } nfetched = fetch_files(ndists, urls); @@ -87,31 +94,32 @@ main(void) free(urls[i]); free(urls); - return ((nfetched == ndists) ? 0 : 1); + return ((nfetched == ndists) ? EXIT_SUCCESS : EXIT_FAILURE); } static int fetch_files(int nfiles, char **urls) { + FILE *fetch_out; + FILE *file_out; const char **items; - FILE *fetch_out, *file_out; - struct url_stat ustat; - off_t total_bytes, current_bytes, fsize; + int i; + int last_progress; + int nsuccess = 0; /* Number of files successfully downloaded */ + int progress = 0; + size_t chunk; + off_t current_bytes; + off_t fsize; + off_t total_bytes; char status[8]; - char errormsg[512]; + struct url_stat ustat; + char errormsg[PATH_MAX + 512]; uint8_t block[4096]; - size_t chunk; - int i, progress, last_progress; - int nsuccess = 0; /* Number of files successfully downloaded */ - progress = 0; - /* Make the transfer list for dialog */ items = calloc(sizeof(char *), nfiles * 2); - if (items == NULL) { - fprintf(stderr, "Out of memory!\n"); - return (-1); - } + if (items == NULL) + errx(EXIT_FAILURE, "Out of memory!"); for (i = 0; i < nfiles; i++) { items[i*2] = strrchr(urls[i], '/'); @@ -177,7 +185,8 @@ fetch_files(int nfiles, char **urls) } if (ustat.size > 0) { - sprintf(status, "-%jd", (fsize*100)/ustat.size); + snprintf(status, sizeof(status), "-%jd", + (fsize*100)/ustat.size); items[i*2 + 1] = status; } @@ -212,4 +221,3 @@ fetch_files(int nfiles, char **urls) free(items); return (nsuccess); } - From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 01:31:51 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 358E94CE; Mon, 1 Jun 2015 01:31:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 230CF105C; Mon, 1 Jun 2015 01:31:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t511VpXO022506; Mon, 1 Jun 2015 01:31:51 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t511VoXL022505; Mon, 1 Jun 2015 01:31:51 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010131.t511VoXL022505@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 01:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283860 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 01:31:51 -0000 Author: dteske Date: Mon Jun 1 01:31:50 2015 New Revision: 283860 URL: https://svnweb.freebsd.org/changeset/base/283860 Log: MFC SVN revisions 280234-280235: r280234: Fix the handbook install option in bsdinstall (allanjude) r280235: Fixup to previous (allanjude) Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/docsinstall Mon Jun 1 01:06:33 2015 (r283859) +++ stable/10/usr.sbin/bsdinstall/scripts/docsinstall Mon Jun 1 01:31:50 2015 (r283860) @@ -154,10 +154,13 @@ f_quietly cp -f $BSDINSTALL_TMPETC/resol # # Install each of the selected packages # +docsets="" for lang in $selected; do - f_package_add $lang-freebsd-doc || return $FAILURE + docsets="$docsets $lang-freebsd-doc" done +ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install $docsets || return $FAILURE + ################################################################################ # END ################################################################################ From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 01:50:10 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B0C7A2E; Mon, 1 Jun 2015 01:50:10 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CE6213B2; Mon, 1 Jun 2015 01:50:10 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t511oA6P029015; Mon, 1 Jun 2015 01:50:10 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t511oAFd029014; Mon, 1 Jun 2015 01:50:10 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010150.t511oAFd029014@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 01:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283861 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 01:50:10 -0000 Author: dteske Date: Mon Jun 1 01:50:09 2015 New Revision: 283861 URL: https://svnweb.freebsd.org/changeset/base/283861 Log: MFC SVN revisions 280310-280311,281160,281167,282443,283023,283288: r280310: Whitespace cleanup(s) r280311: Update copyright(s) r281160: [mergeinfo only] Fix root encryption key permissions (see r281230) r281167: [mergeinfo only] Unbreak ZFS+GELI install option (see r281230) r282443: Add swap size sanity check (allanjude) r283023: Skip adding swap to fstab(5) if unused (allanjude) r283288: Fix a syntax error (allanjude) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Mon Jun 1 01:31:50 2015 (r283860) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Mon Jun 1 01:50:09 2015 (r283861) @@ -1,7 +1,7 @@ #!/bin/sh #- -# Copyright (c) 2013 Allan Jude -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2014 Allan Jude +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -287,10 +287,12 @@ msg_stripe_desc="Stripe - No Redundancy" msg_stripe_help="[1+ Disks] Striping provides maximum storage but no redundancy" msg_swap_encrypt="Encrypt Swap?" msg_swap_encrypt_help="Encrypt swap partitions with temporary keys, discarded on reboot" +msg_swap_invalid="The selected swap size (%s) is invalid. Enter a number optionally followed by units. Example: 2G" msg_swap_mirror="Mirror Swap?" msg_swap_mirror_help="Mirror swap partitions for redundancy, breaks crash dumps" msg_swap_size="Swap Size" msg_swap_size_help="Customize how much swap space is allocated to each selected disk" +msg_swap_toosmall="The selected swap size (%s) is to small. Please enter a value greater than 100MB or enter 0 for no swap" msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." msg_uefi_not_supported="The FreeBSD UEFI loader does not currently support booting root-on-ZFS. Your system will need to boot in legacy (CSM) mode.\nDo you want to continue?" msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'" @@ -320,31 +322,34 @@ dialog_menu_main() [ "$ZFSBOOT_SWAP_MIRROR" ] && swapmirror="$msg_yes" local disks n disks_grammar f_count n $ZFSBOOT_DISKS - { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } || + { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } || disks_grammar=$msg_disk_plural # grammar local menu_list=" - '>>> $msg_install' '$msg_install_desc' - '$msg_install_help' - 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks_grammar' - '$msg_pool_type_disks_help' - '- $msg_rescan_devices' '*' - '$msg_rescan_devices_help' - '- $msg_disk_info' '*' - '$msg_disk_info_help' - 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' - '$msg_pool_name_help' - '4 $msg_force_4k_sectors' '$force4k' - '$msg_force_4k_sectors_help' - 'E $msg_encrypt_disks' '$usegeli' - '$msg_encrypt_disks_help' - 'P $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' - '$msg_partition_scheme_help' - 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' - '$msg_swap_size_help' - 'M $msg_swap_mirror' '$swapmirror' - '$msg_swap_mirror_help' - 'W $msg_swap_encrypt' '$swapgeli' - '$msg_swap_encrypt_help' + '>>> $msg_install' '$msg_install_desc' + '$msg_install_help' + 'T $msg_pool_type_disks' + '$ZFSBOOT_VDEV_TYPE: $n $disks_grammar' + '$msg_pool_type_disks_help' + '- $msg_rescan_devices' '*' + '$msg_rescan_devices_help' + '- $msg_disk_info' '*' + '$msg_disk_info_help' + 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' + '$msg_pool_name_help' + '4 $msg_force_4k_sectors' + '$force4k' + '$msg_force_4k_sectors_help' + 'E $msg_encrypt_disks' '$usegeli' + '$msg_encrypt_disks_help' + 'P $msg_partition_scheme' + '$ZFSBOOT_PARTITION_SCHEME' + '$msg_partition_scheme_help' + 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' + '$msg_swap_size_help' + 'M $msg_swap_mirror' '$swapmirror' + '$msg_swap_mirror_help' + 'W $msg_swap_encrypt' '$swapgeli' + '$msg_swap_encrypt_help' " # END-QUOTE local defaultitem= # Calculated below local hline="$hline_alnum_arrows_punc_tab_enter" @@ -937,17 +942,19 @@ zfs_create_diskpart() # 5. Add freebsd-zfs partition for zroot # f_eval_catch $funcname gpart "$GPART_ADD_INDEX" \ - $mbrindex freebsd-zfs ${disk}s1 || return $FAILURE + $mbrindex freebsd-zfs ${disk}s1 || return $FAILURE f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ - /dev/$disk$targetpart # Pedantic + /dev/$disk$targetpart # Pedantic f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ - /boot/zfsboot /dev/${disk}s1 count=1 || - return $FAILURE + /boot/zfsboot /dev/${disk}s1 count=1 || + return $FAILURE ;; esac # $ZFSBOOT_PARTITION_SCHEME # Update fstab(5) + local swapsize + f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize if [ "$isswapmirror" ]; then # This is not the first disk in the mirror, do nothing elif [ "$ZFSBOOT_SWAP_ENCRYPTION" -a "$ZFSBOOT_SWAP_MIRROR" ]; then @@ -967,6 +974,8 @@ zfs_create_diskpart() /dev/$disk${swappart}.eli none swap sw 0 0 \ $BSDINSTALL_TMPETC/fstab || return $FAILURE + elif [ ${swapsize:-0} -eq 0 ]; then + # If swap is 0 sized, don't add it to fstab else f_eval_catch $funcname printf "$PRINTF_FSTAB" \ /dev/$disk$swappart none swap sw 0 0 \ @@ -1123,7 +1132,7 @@ zfs_create_boot() if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then # Generate an encryption key using random(4) f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ - /dev/random "$bootpool/$zroot_key" \ + /dev/random "$bootpool/$zroot_key" \ "bs=4096 count=1" || return $FAILURE f_eval_catch $funcname chmod "$CHMOD_MODE" \ go-wrx "$bootpool/$zroot_key" || @@ -1180,6 +1189,7 @@ zfs_create_boot() return $FAILURE f_eval_catch -d $funcname umount "$UMOUNT" /mnt # tmpfs fi + # # Create the gmirror(8) GEOMS for swap # @@ -1260,7 +1270,7 @@ zfs_create_boot() # MBR boot loader touch-up if [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then f_dprintf "$funcname: Updating MBR boot loader on disks..." - # Stick the ZFS boot loader in the "convienient hole" after + # Stick the ZFS boot loader in the "convienient hole" after # the ZFS internal metadata for disk in $disks; do f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ @@ -1299,8 +1309,10 @@ zfs_create_boot() $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE if [ "$ZFSBOOT_SWAP_MIRROR" ]; then - f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_mirror_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.gmirror || return $FAILURE + f_eval_catch $funcname echo "$ECHO_APPEND" \ + 'geom_mirror_load=\"YES\"' \ + $BSDINSTALL_TMPBOOT/loader.conf.gmirror || + return $FAILURE fi # We're all done unless we should go on for boot pool @@ -1323,8 +1335,8 @@ zfs_create_boot() return $FAILURE done f_eval_catch $funcname printf "$PRINTF_CONF" vfs.root.mountfrom \ - "\"zfs:$zroot_name/$zroot_bootfs\"" \ - $BSDINSTALL_TMPBOOT/loader.conf.root || return $FAILURE + "\"zfs:$zroot_name/$zroot_bootfs\"" \ + $BSDINSTALL_TMPBOOT/loader.conf.root || return $FAILURE # We're all done unless we should go on to do encryption [ "$ZFSBOOT_GELI_ENCRYPTION" ] || return $SUCCESS @@ -1334,9 +1346,9 @@ zfs_create_boot() # f_dprintf "$funcname: Configuring disk encryption..." f_eval_catch $funcname echo "$ECHO_APPEND" 'aesni_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.aesni || return $FAILURE + $BSDINSTALL_TMPBOOT/loader.conf.aesni || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_eli_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE + $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" \ 'geom_eli_passphrase_prompt=\"YES\"' \ $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE @@ -1410,14 +1422,14 @@ f_dprintf "FSTAB_FMT=[%s]" "$FSTAB_FMT" # ZFS with UEFI yet # if f_interactive; then - bootmethod=$(sysctl -n machdep.bootmethod) - f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" - if [ "$bootmethod" != "BIOS" ]; then - dialog_uefi_prompt - retval=$? - f_dprintf "uefi_prompt=[%s]" "$retval" - [ $retval -eq $DIALOG_OK ] || f_die - fi + bootmethod=$( sysctl -n machdep.bootmethod ) + f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" + if [ "$bootmethod" != "BIOS" ]; then + dialog_uefi_prompt + retval=$? + f_dprintf "uefi_prompt=[%s]" "$retval" + [ $retval -eq $DIALOG_OK ] || f_die + fi fi # @@ -1548,10 +1560,26 @@ while :; do ;; ?" $msg_swap_size") # Prompt the user to input/change the swap size for each disk - f_dialog_input input \ - "$msg_please_enter_amount_of_swap_space" \ - "$ZFSBOOT_SWAP_SIZE" && - ZFSBOOT_SWAP_SIZE="${input:-0}" + while :; do + f_dialog_input input \ + "$msg_please_enter_amount_of_swap_space" \ + "$ZFSBOOT_SWAP_SIZE" && + ZFSBOOT_SWAP_SIZE="${input:-0}" + if f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize + then + if [ $swapsize -ne 0 -a $swapsize -lt 104857600 ]; then + f_show_err "$msg_swap_toosmall" \ + "$ZFSBOOT_SWAP_SIZE" + continue; + else + break; + fi + else + f_show_err "$msg_swap_invalid" \ + "$ZFSBOOT_SWAP_SIZE" + continue; + fi + done ;; ?" $msg_swap_mirror") # Toggle the variable referenced both by the menu and later From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 01:54:22 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 456AAB9B; Mon, 1 Jun 2015 01:54:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19DBC1619; Mon, 1 Jun 2015 01:54:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t511sL9p033141; Mon, 1 Jun 2015 01:54:21 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t511sLmq033140; Mon, 1 Jun 2015 01:54:21 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010154.t511sLmq033140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 01:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283862 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 01:54:22 -0000 Author: dteske Date: Mon Jun 1 01:54:21 2015 New Revision: 283862 URL: https://svnweb.freebsd.org/changeset/base/283862 Log: MFC SVN mergeinfo for revisions 263638,263768 (reduce eligible merges): r263638: Create a root dataset (bdrewery) r263768: Revert the above (bdrewery) Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 06:56:50 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2CABC67; Mon, 1 Jun 2015 06:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A00F11333; Mon, 1 Jun 2015 06:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t516uoxe082417; Mon, 1 Jun 2015 06:56:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t516uovT082416; Mon, 1 Jun 2015 06:56:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506010656.t516uovT082416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Jun 2015 06:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283872 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 06:56:50 -0000 Author: kib Date: Mon Jun 1 06:56:49 2015 New Revision: 283872 URL: https://svnweb.freebsd.org/changeset/base/283872 Log: MFC r283515: Remove excess Giant acquisition around the dounmount() call. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Jun 1 06:54:21 2015 (r283871) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Jun 1 06:56:49 2015 (r283872) @@ -3481,9 +3481,7 @@ zfs_unmount_snap(const char *snapname) #ifdef illumos (void) dounmount(vfsp, MS_FORCE, kcred); #else - mtx_lock(&Giant); /* dounmount() */ (void) dounmount(vfsp, MS_FORCE, curthread); - mtx_unlock(&Giant); /* dounmount() */ #endif return (0); } From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 09:05:00 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59BE689F; Mon, 1 Jun 2015 09:05:00 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 458231453; Mon, 1 Jun 2015 09:05:00 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51950As047321; Mon, 1 Jun 2015 09:05:00 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5194wLM047286; Mon, 1 Jun 2015 09:04:58 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201506010904.t5194wLM047286@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 1 Jun 2015 09:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283875 - in stable/10: . bin/chflags bin/chmod usr.sbin/chown X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 09:05:00 -0000 Author: smh Date: Mon Jun 1 09:04:57 2015 New Revision: 283875 URL: https://svnweb.freebsd.org/changeset/base/283875 Log: MFC r282208: Standardise chmod, chflags, chown and chgrp recursive symlink processing Relnotes: Yes Sponsored by: Multiplay Modified: stable/10/UPDATING stable/10/bin/chflags/chflags.1 stable/10/bin/chflags/chflags.c stable/10/bin/chmod/chmod.1 stable/10/bin/chmod/chmod.c stable/10/usr.sbin/chown/chgrp.1 stable/10/usr.sbin/chown/chown.8 stable/10/usr.sbin/chown/chown.c Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/UPDATING Mon Jun 1 09:04:57 2015 (r283875) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20150601: + chmod, chflags, chown and chgrp now affect symlinks in -R mode as + defined in symlink(7); previously symlinks were silently ignored. + 20150430: The const qualifier has been removed from iconv(3) to comply with POSIX. The ports tree is aware of this from r384038 onwards. Modified: stable/10/bin/chflags/chflags.1 ============================================================================== --- stable/10/bin/chflags/chflags.1 Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/bin/chflags/chflags.1 Mon Jun 1 09:04:57 2015 (r283875) @@ -32,7 +32,7 @@ .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd April 8, 2013 +.Dd April 20, 2015 .Dt CHFLAGS 1 .Os .Sh NAME @@ -66,8 +66,9 @@ nor modify the exit status to reflect su .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl h If the .Ar file @@ -83,8 +84,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the file flags for the file hierarchies rooted -in the files instead of just the files themselves. +Change the file flags of the file hierarchies rooted in the files, +instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl v Cause .Nm Modified: stable/10/bin/chflags/chflags.c ============================================================================== --- stable/10/bin/chflags/chflags.c Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/bin/chflags/chflags.c Mon Jun 1 09:04:57 2015 (r283875) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -65,7 +66,6 @@ main(int argc, char *argv[]) int Hflag, Lflag, Rflag, fflag, hflag, vflag; int ch, fts_options, oct, rval; char *flags, *ep; - int (*change_flags)(const char *, unsigned long); Hflag = Lflag = Rflag = fflag = hflag = vflag = 0; while ((ch = getopt(argc, argv, "HLPRfhv")) != -1) @@ -104,20 +104,23 @@ main(int argc, char *argv[]) usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag) - errx(1, "the -R and -h options " - "may not be specified together"); - if (Hflag) - fts_options |= FTS_COMFOLLOW; + errx(1, "the -R and -h options may not be " + "specified together."); if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; - - change_flags = hflag ? lchflags : chflags; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } flags = *argv; if (*flags >= '0' && *flags <= '7') { @@ -142,12 +145,21 @@ main(int argc, char *argv[]) err(1, NULL); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP if we're recursive. */ if (!Rflag) fts_set(ftsp, p, FTS_SKIP); continue; - case FTS_DNR: /* Warn, chflag, continue. */ + case FTS_DNR: /* Warn, chflags. */ warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; @@ -156,16 +168,6 @@ main(int argc, char *argv[]) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: /* Ignore. */ - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (!hflag) - continue; - /* FALLTHROUGH */ default: break; } @@ -175,7 +177,8 @@ main(int argc, char *argv[]) newflags = (p->fts_statp->st_flags | set) & clear; if (newflags == p->fts_statp->st_flags) continue; - if ((*change_flags)(p->fts_accpath, newflags) && !fflag) { + if (chflagsat(AT_FDCWD, p->fts_accpath, newflags, + atflag) == -1 && !fflag) { warn("%s", p->fts_path); rval = 1; } else if (vflag) { Modified: stable/10/bin/chmod/chmod.1 ============================================================================== --- stable/10/bin/chmod/chmod.1 Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/bin/chmod/chmod.1 Mon Jun 1 09:04:57 2015 (r283875) @@ -32,7 +32,7 @@ .\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd January 26, 2009 +.Dd April 20, 2015 .Dt CHMOD 1 .Os .Sh NAME @@ -63,9 +63,9 @@ nor modify the exit status to reflect su .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed by -default.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during tree traversal are not followed.) .It Fl h If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to. @@ -79,8 +79,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the modes of the file hierarchies rooted in the files +Change the modes of the file hierarchies rooted in the files, instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl v Cause .Nm Modified: stable/10/bin/chmod/chmod.c ============================================================================== --- stable/10/bin/chmod/chmod.c Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/bin/chmod/chmod.c Mon Jun 1 09:04:57 2015 (r283875) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -62,7 +63,7 @@ main(int argc, char *argv[]) FTS *ftsp; FTSENT *p; mode_t *set; - int Hflag, Lflag, Rflag, ch, error, fflag, fts_options, hflag, rval; + int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval; int vflag; char *mode; mode_t newmode; @@ -126,18 +127,23 @@ done: argv += optind; usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag) - errx(1, - "the -R and -h options may not be specified together."); - if (Hflag) - fts_options |= FTS_COMFOLLOW; + errx(1, "the -R and -h options may not be " + "specified together."); if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } mode = *argv; if ((set = setmode(mode)) == NULL) @@ -146,12 +152,21 @@ done: argv += optind; if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL) err(1, "fts_open"); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP. */ if (!Rflag) fts_set(ftsp, p, FTS_SKIP); continue; - case FTS_DNR: /* Warn, chmod, continue. */ + case FTS_DNR: /* Warn, chmod. */ warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; @@ -160,16 +175,6 @@ done: argv += optind; warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: /* Ignore. */ - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (!hflag) - continue; - /* FALLTHROUGH */ default: break; } @@ -182,32 +187,25 @@ done: argv += optind; if (may_have_nfs4acl(p, hflag) == 0 && (newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS)) continue; - if (hflag) - error = lchmod(p->fts_accpath, newmode); - else - error = chmod(p->fts_accpath, newmode); - if (error) { - if (!fflag) { - warn("%s", p->fts_path); - rval = 1; - } - } else { - if (vflag) { - (void)printf("%s", p->fts_path); + if (fchmodat(AT_FDCWD, p->fts_accpath, newmode, atflag) == -1 + && !fflag) { + warn("%s", p->fts_path); + rval = 1; + } else if (vflag) { + (void)printf("%s", p->fts_path); - if (vflag > 1) { - char m1[12], m2[12]; + if (vflag > 1) { + char m1[12], m2[12]; - strmode(p->fts_statp->st_mode, m1); - strmode((p->fts_statp->st_mode & - S_IFMT) | newmode, m2); - (void)printf(": 0%o [%s] -> 0%o [%s]", - p->fts_statp->st_mode, m1, - (p->fts_statp->st_mode & S_IFMT) | - newmode, m2); - } - (void)printf("\n"); + strmode(p->fts_statp->st_mode, m1); + strmode((p->fts_statp->st_mode & + S_IFMT) | newmode, m2); + (void)printf(": 0%o [%s] -> 0%o [%s]", + p->fts_statp->st_mode, m1, + (p->fts_statp->st_mode & S_IFMT) | + newmode, m2); } + (void)printf("\n"); } } if (errno) Modified: stable/10/usr.sbin/chown/chgrp.1 ============================================================================== --- stable/10/usr.sbin/chown/chgrp.1 Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/usr.sbin/chown/chgrp.1 Mon Jun 1 09:04:57 2015 (r283875) @@ -31,7 +31,7 @@ .\" @(#)chgrp.1 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd February 21, 2010 +.Dd April 20, 2015 .Dt CHGRP 1 .Os .Sh NAME @@ -60,8 +60,9 @@ The following options are available: .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl L If the .Fl R @@ -72,8 +73,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the group ID for the file hierarchies rooted -in the files instead of just the files themselves. +Change the group ID of the file hierarchies rooted in the files, +instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl f The force option ignores errors, except for usage errors and does not query about strange modes (unless the user does not have proper permissions). Modified: stable/10/usr.sbin/chown/chown.8 ============================================================================== --- stable/10/usr.sbin/chown/chown.8 Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/usr.sbin/chown/chown.8 Mon Jun 1 09:04:57 2015 (r283875) @@ -28,7 +28,7 @@ .\" @(#)chown.8 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd February 21, 2010 +.Dd April 20, 2015 .Dt CHOWN 8 .Os .Sh NAME @@ -64,8 +64,9 @@ The options are as follows: .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl L If the .Fl R @@ -76,8 +77,8 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the user ID and/or the group ID of the specified directory trees -(recursively, including their contents) and files. +Change the user ID and/or the group ID of the file hierarchies rooted +in the files, instead of just the files themselves. Beware of unintentionally matching the .Dq Pa ".." hard link to the parent directory when using wildcards like Modified: stable/10/usr.sbin/chown/chown.c ============================================================================== --- stable/10/usr.sbin/chown/chown.c Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/usr.sbin/chown/chown.c Mon Jun 1 09:04:57 2015 (r283875) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -119,18 +120,24 @@ main(int argc, char **argv) usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag && (Hflag || Lflag)) errx(1, "the -R%c and -h options may not be " "specified together", Hflag ? 'H' : 'L'); - if (Hflag) - fts_options |= FTS_COMFOLLOW; - else if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + if (Lflag) { + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } + if (xflag) fts_options |= FTS_XDEV; @@ -156,6 +163,15 @@ main(int argc, char **argv) err(1, NULL); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP. */ if (!Rflag) @@ -170,58 +186,44 @@ main(int argc, char **argv) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (hflag) - break; - else - continue; default: break; } if ((uid == (uid_t)-1 || uid == p->fts_statp->st_uid) && (gid == (gid_t)-1 || gid == p->fts_statp->st_gid)) continue; - if ((hflag ? lchown : chown)(p->fts_accpath, uid, gid) == -1) { - if (!fflag) { - chownerr(p->fts_path); - rval = 1; - } - } else { - if (vflag) { - printf("%s", p->fts_path); - if (vflag > 1) { - if (ischown) { - printf(": %ju:%ju -> %ju:%ju", - (uintmax_t) - p->fts_statp->st_uid, - (uintmax_t) - p->fts_statp->st_gid, - (uid == (uid_t)-1) ? - (uintmax_t) - p->fts_statp->st_uid : - (uintmax_t)uid, - (gid == (gid_t)-1) ? - (uintmax_t) - p->fts_statp->st_gid : - (uintmax_t)gid); - } else { - printf(": %ju -> %ju", - (uintmax_t) - p->fts_statp->st_gid, - (gid == (gid_t)-1) ? - (uintmax_t) - p->fts_statp->st_gid : - (uintmax_t)gid); - } + if (fchownat(AT_FDCWD, p->fts_accpath, uid, gid, atflag) + == -1 && !fflag) { + chownerr(p->fts_path); + rval = 1; + } else if (vflag) { + printf("%s", p->fts_path); + if (vflag > 1) { + if (ischown) { + printf(": %ju:%ju -> %ju:%ju", + (uintmax_t) + p->fts_statp->st_uid, + (uintmax_t) + p->fts_statp->st_gid, + (uid == (uid_t)-1) ? + (uintmax_t) + p->fts_statp->st_uid : + (uintmax_t)uid, + (gid == (gid_t)-1) ? + (uintmax_t) + p->fts_statp->st_gid : + (uintmax_t)gid); + } else { + printf(": %ju -> %ju", + (uintmax_t) + p->fts_statp->st_gid, + (gid == (gid_t)-1) ? + (uintmax_t) + p->fts_statp->st_gid : + (uintmax_t)gid); } - printf("\n"); } + printf("\n"); } } if (errno) From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 16:46:53 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40904B2B; Mon, 1 Jun 2015 16:46:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14D051721; Mon, 1 Jun 2015 16:46:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51GkqoA079501; Mon, 1 Jun 2015 16:46:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51GkqpZ079498; Mon, 1 Jun 2015 16:46:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506011646.t51GkqpZ079498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 1 Jun 2015 16:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283880 - stable/10/release/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 16:46:53 -0000 Author: gjb Date: Mon Jun 1 16:46:51 2015 New Revision: 283880 URL: https://svnweb.freebsd.org/changeset/base/283880 Log: MFC r283673, r283674: r283673: Sort configuration options for consistency with other boards. r283674: Export 'BOARDNAME' when differs from the KERNCONF. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/PANDABOARD.conf stable/10/release/arm/RPI2.conf stable/10/release/arm/WANDBOARD.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/PANDABOARD.conf ============================================================================== --- stable/10/release/arm/PANDABOARD.conf Mon Jun 1 11:24:34 2015 (r283879) +++ stable/10/release/arm/PANDABOARD.conf Mon Jun 1 16:46:51 2015 (r283880) @@ -8,13 +8,13 @@ EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-pandaboard" KERNEL="PANDABOARD" -NODOC=1 WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" IMAGE_SIZE="1G" PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" MD_ARGS="-x 63 -y 255" +NODOC=1 arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-pandaboard" Modified: stable/10/release/arm/RPI2.conf ============================================================================== --- stable/10/release/arm/RPI2.conf Mon Jun 1 11:24:34 2015 (r283879) +++ stable/10/release/arm/RPI2.conf Mon Jun 1 16:46:51 2015 (r283880) @@ -9,13 +9,13 @@ EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-rpi2" KERNEL="RPI2" -NODOC=1 WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" IMAGE_SIZE="1G" PART_SCHEME="MBR" FAT_SIZE="50m" FAT_TYPE="16" MD_ARGS="-x 63 -y 255" +NODOC=1 arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" Modified: stable/10/release/arm/WANDBOARD.conf ============================================================================== --- stable/10/release/arm/WANDBOARD.conf Mon Jun 1 11:24:34 2015 (r283879) +++ stable/10/release/arm/WANDBOARD.conf Mon Jun 1 16:46:51 2015 (r283880) @@ -16,6 +16,7 @@ FAT_SIZE="50m -b 16384" FAT_TYPE="16" MD_ARGS="-x 63 -y 255" NODOC=1 +export BOARDNAME="WANDBOARD" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-wandboard" From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 17:57:08 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF8563BD; Mon, 1 Jun 2015 17:57:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACF1D18A4; Mon, 1 Jun 2015 17:57:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51Hv87W016874; Mon, 1 Jun 2015 17:57:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51Hv6tR016850; Mon, 1 Jun 2015 17:57:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506011757.t51Hv6tR016850@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 17:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283884 - in stable/10/sys: conf dev/hwpmc sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 17:57:09 -0000 Author: jhb Date: Mon Jun 1 17:57:05 2015 New Revision: 283884 URL: https://svnweb.freebsd.org/changeset/base/283884 Log: MFC 282641,282658: - Move hwpmc(4) debugging code under a new HWPMC_DEBUG option instead of the broader DEBUG option. - Convert hwpmc(4) debug printfs over to KTR. Sponsored by: Norse Corp, Inc. Modified: stable/10/sys/conf/NOTES stable/10/sys/conf/options stable/10/sys/dev/hwpmc/hwpmc_amd.c stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/dev/hwpmc/hwpmc_logging.c stable/10/sys/dev/hwpmc/hwpmc_mips.c stable/10/sys/dev/hwpmc/hwpmc_mips24k.c stable/10/sys/dev/hwpmc/hwpmc_mod.c stable/10/sys/dev/hwpmc/hwpmc_mpc7xxx.c stable/10/sys/dev/hwpmc/hwpmc_octeon.c stable/10/sys/dev/hwpmc/hwpmc_piv.c stable/10/sys/dev/hwpmc/hwpmc_ppc970.c stable/10/sys/dev/hwpmc/hwpmc_ppro.c stable/10/sys/dev/hwpmc/hwpmc_soft.c stable/10/sys/dev/hwpmc/hwpmc_tsc.c stable/10/sys/dev/hwpmc/hwpmc_uncore.c stable/10/sys/dev/hwpmc/hwpmc_xscale.c stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/conf/NOTES Mon Jun 1 17:57:05 2015 (r283884) @@ -561,6 +561,7 @@ options STACK # please see hwpmc(4). device hwpmc # Driver (also a loadable module) +options HWPMC_DEBUG options HWPMC_HOOKS # Other necessary kernel hooks Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/conf/options Mon Jun 1 17:57:05 2015 (r283884) @@ -858,6 +858,7 @@ DCONS_FORCE_CONSOLE opt_dcons.h DCONS_FORCE_GDB opt_dcons.h # HWPMC options +HWPMC_DEBUG opt_global.h HWPMC_HOOKS HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h Modified: stable/10/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_amd.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_amd.c Mon Jun 1 17:57:05 2015 (r283884) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef DEBUG +#ifdef HWPMC_DEBUG enum pmc_class amd_pmc_class; #endif @@ -282,16 +282,16 @@ amd_read_pmc(int cpu, int ri, pmc_value_ mode = PMC_TO_MODE(pm); - PMCDBG(MDP,REA,1,"amd-read id=%d class=%d", ri, pd->pm_descr.pd_class); + PMCDBG2(MDP,REA,1,"amd-read id=%d class=%d", ri, pd->pm_descr.pd_class); -#ifdef DEBUG +#ifdef HWPMC_DEBUG KASSERT(pd->pm_descr.pd_class == amd_pmc_class, ("[amd,%d] unknown PMC class (%d)", __LINE__, pd->pm_descr.pd_class)); #endif tmp = rdmsr(pd->pm_perfctr); /* RDMSR serializes */ - PMCDBG(MDP,REA,2,"amd-read (pre-munge) id=%d -> %jd", ri, tmp); + PMCDBG2(MDP,REA,2,"amd-read (pre-munge) id=%d -> %jd", ri, tmp); if (PMC_IS_SAMPLING_MODE(mode)) { /* Sign extend 48 bit value to 64 bits. */ tmp = (pmc_value_t) (((int64_t) tmp << 16) >> 16); @@ -299,7 +299,7 @@ amd_read_pmc(int cpu, int ri, pmc_value_ } *v = tmp; - PMCDBG(MDP,REA,2,"amd-read (post-munge) id=%d -> %jd", ri, *v); + PMCDBG2(MDP,REA,2,"amd-read (post-munge) id=%d -> %jd", ri, *v); return 0; } @@ -329,7 +329,7 @@ amd_write_pmc(int cpu, int ri, pmc_value mode = PMC_TO_MODE(pm); -#ifdef DEBUG +#ifdef HWPMC_DEBUG KASSERT(pd->pm_descr.pd_class == amd_pmc_class, ("[amd,%d] unknown PMC class (%d)", __LINE__, pd->pm_descr.pd_class)); @@ -339,7 +339,7 @@ amd_write_pmc(int cpu, int ri, pmc_value if (PMC_IS_SAMPLING_MODE(mode)) v = AMD_RELOAD_COUNT_TO_PERFCTR_VALUE(v); - PMCDBG(MDP,WRI,1,"amd-write cpu=%d ri=%d v=%jx", cpu, ri, v); + PMCDBG3(MDP,WRI,1,"amd-write cpu=%d ri=%d v=%jx", cpu, ri, v); /* write the PMC value */ wrmsr(pd->pm_perfctr, v); @@ -356,7 +356,7 @@ amd_config_pmc(int cpu, int ri, struct p { struct pmc_hw *phw; - PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); @@ -395,7 +395,7 @@ amd_switch_in(struct pmc_cpu *pc, struct { (void) pc; - PMCDBG(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, + PMCDBG3(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, (pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS) != 0); /* enable the RDPMC instruction if needed */ @@ -416,7 +416,7 @@ amd_switch_out(struct pmc_cpu *pc, struc (void) pc; (void) pp; /* can be NULL */ - PMCDBG(MDP,SWO,1, "pc=%p pp=%p enable-msr=%d", pc, pp, pp ? + PMCDBG3(MDP,SWO,1, "pc=%p pp=%p enable-msr=%d", pc, pp, pp ? (pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS) == 1 : 0); /* always turn off the RDPMC instruction */ @@ -453,7 +453,7 @@ amd_allocate_pmc(int cpu, int ri, struct caps = pm->pm_caps; - PMCDBG(MDP,ALL,1,"amd-allocate ri=%d caps=0x%x", ri, caps); + PMCDBG2(MDP,ALL,1,"amd-allocate ri=%d caps=0x%x", ri, caps); if ((pd->pd_caps & caps) != caps) return EPERM; @@ -500,7 +500,7 @@ amd_allocate_pmc(int cpu, int ri, struct pm->pm_md.pm_amd.pm_amd_evsel = config; /* save config value */ - PMCDBG(MDP,ALL,2,"amd-allocate ri=%d -> config=0x%x", ri, config); + PMCDBG2(MDP,ALL,2,"amd-allocate ri=%d -> config=0x%x", ri, config); return 0; } @@ -515,7 +515,7 @@ amd_allocate_pmc(int cpu, int ri, struct static int amd_release_pmc(int cpu, int ri, struct pmc *pmc) { -#ifdef DEBUG +#ifdef HWPMC_DEBUG const struct amd_descr *pd; #endif struct pmc_hw *phw; @@ -532,7 +532,7 @@ amd_release_pmc(int cpu, int ri, struct KASSERT(phw->phw_pmc == NULL, ("[amd,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); -#ifdef DEBUG +#ifdef HWPMC_DEBUG pd = &amd_pmcdesc[ri]; if (pd->pm_descr.pd_class == amd_pmc_class) KASSERT(AMD_PMC_IS_STOPPED(pd->pm_evsel), @@ -567,7 +567,7 @@ amd_start_pmc(int cpu, int ri) ("[amd,%d] starting cpu%d,pmc%d with null pmc record", __LINE__, cpu, ri)); - PMCDBG(MDP,STA,1,"amd-start cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STA,1,"amd-start cpu=%d ri=%d", cpu, ri); KASSERT(AMD_PMC_IS_STOPPED(pd->pm_evsel), ("[amd,%d] pmc%d,cpu%d: Starting active PMC \"%s\"", __LINE__, @@ -576,7 +576,7 @@ amd_start_pmc(int cpu, int ri) /* turn on the PMC ENABLE bit */ config = pm->pm_md.pm_amd.pm_amd_evsel | AMD_PMC_ENABLE; - PMCDBG(MDP,STA,2,"amd-start config=0x%x", config); + PMCDBG1(MDP,STA,2,"amd-start config=0x%x", config); wrmsr(pd->pm_evsel, config); return 0; @@ -610,7 +610,7 @@ amd_stop_pmc(int cpu, int ri) ("[amd,%d] PMC%d, CPU%d \"%s\" already stopped", __LINE__, ri, cpu, pd->pm_descr.pd_name)); - PMCDBG(MDP,STO,1,"amd-stop ri=%d", ri); + PMCDBG1(MDP,STO,1,"amd-stop ri=%d", ri); /* turn off the PMC ENABLE bit */ config = pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE; @@ -637,7 +637,7 @@ amd_intr(int cpu, struct trapframe *tf) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] out of range CPU %d", __LINE__, cpu)); - PMCDBG(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *) tf, + PMCDBG3(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); retval = 0; @@ -769,7 +769,7 @@ amd_pcpu_init(struct pmc_mdep *md, int c KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] insane cpu number %d", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"amd-init cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"amd-init cpu=%d", cpu); amd_pcpu[cpu] = pac = malloc(sizeof(struct amd_cpu), M_PMC, M_WAITOK|M_ZERO); @@ -816,7 +816,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int c KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] insane cpu number (%d)", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"amd-cleanup cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"amd-cleanup cpu=%d", cpu); /* * First, turn off all PMCs on this CPU. @@ -835,7 +835,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int c amd_pcpu[cpu] = NULL; -#ifdef DEBUG +#ifdef HWPMC_DEBUG for (i = 0; i < AMD_NPMCS; i++) { KASSERT(pac->pc_amdpmcs[i].phw_pmc == NULL, ("[amd,%d] CPU%d/PMC%d in use", __LINE__, cpu, i)); @@ -912,7 +912,7 @@ pmc_amd_initialize(void) return NULL; } -#ifdef DEBUG +#ifdef HWPMC_DEBUG amd_pmc_class = class; #endif @@ -976,7 +976,7 @@ pmc_amd_initialize(void) pmc_mdep->pmd_npmc += AMD_NPMCS; - PMCDBG(MDP,INI,0,"%s","amd-initialize"); + PMCDBG0(MDP,INI,0,"amd-initialize"); return (pmc_mdep); Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 17:57:05 2015 (r283884) @@ -123,7 +123,7 @@ core_pcpu_init(struct pmc_mdep *md, int KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[iaf,%d] insane cpu number %d", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"core-init cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"core-init cpu=%d", cpu); core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri; npmc = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_num; @@ -162,7 +162,7 @@ core_pcpu_fini(struct pmc_mdep *md, int KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] insane cpu number (%d)", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"core-pcpu-fini cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"core-pcpu-fini cpu=%d", cpu); if ((cc = core_pcpu[cpu]) == NULL) return (0); @@ -223,7 +223,7 @@ iaf_allocate_pmc(int cpu, int ri, struct KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU %d", __LINE__, cpu)); - PMCDBG(MDP,ALL,1, "iaf-allocate ri=%d reqcaps=0x%x", ri, pm->pm_caps); + PMCDBG2(MDP,ALL,1, "iaf-allocate ri=%d reqcaps=0x%x", ri, pm->pm_caps); if (ri < 0 || ri > core_iaf_npmc) return (EINVAL); @@ -267,7 +267,7 @@ iaf_allocate_pmc(int cpu, int ri, struct pm->pm_md.pm_iaf.pm_iaf_ctrl = (flags << (ri * 4)); - PMCDBG(MDP,ALL,2, "iaf-allocate config=0x%jx", + PMCDBG1(MDP,ALL,2, "iaf-allocate config=0x%jx", (uintmax_t) pm->pm_md.pm_iaf.pm_iaf_ctrl); return (0); @@ -282,7 +282,7 @@ iaf_config_pmc(int cpu, int ri, struct p KASSERT(ri >= 0 && ri < core_iaf_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - PMCDBG(MDP,CFG,1, "iaf-config cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP,CFG,1, "iaf-config cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(core_pcpu[cpu] != NULL, ("[core,%d] null per-cpu %d", __LINE__, cpu)); @@ -362,7 +362,7 @@ iaf_read_pmc(int cpu, int ri, pmc_value_ else *v = tmp; - PMCDBG(MDP,REA,1, "iaf-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, + PMCDBG4(MDP,REA,1, "iaf-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, IAF_RI_TO_MSR(ri), *v); return (0); @@ -371,7 +371,7 @@ iaf_read_pmc(int cpu, int ri, pmc_value_ static int iaf_release_pmc(int cpu, int ri, struct pmc *pmc) { - PMCDBG(MDP,REL,1, "iaf-release cpu=%d ri=%d pm=%p", cpu, ri, pmc); + PMCDBG3(MDP,REL,1, "iaf-release cpu=%d ri=%d pm=%p", cpu, ri, pmc); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU value %d", __LINE__, cpu)); @@ -396,7 +396,7 @@ iaf_start_pmc(int cpu, int ri) KASSERT(ri >= 0 && ri < core_iaf_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - PMCDBG(MDP,STA,1,"iaf-start cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STA,1,"iaf-start cpu=%d ri=%d", cpu, ri); iafc = core_pcpu[cpu]; pm = iafc->pc_corepmcs[ri + core_iaf_ri].phw_pmc; @@ -414,7 +414,7 @@ iaf_start_pmc(int cpu, int ri) IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); - PMCDBG(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", + PMCDBG4(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", iafc->pc_iafctrl, (uint32_t) rdmsr(IAF_CTRL), iafc->pc_globalctrl, rdmsr(IA_GLOBAL_CTRL)); @@ -428,7 +428,7 @@ iaf_stop_pmc(int cpu, int ri) struct core_cpu *iafc; uint64_t msr = 0; - PMCDBG(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); iafc = core_pcpu[cpu]; @@ -445,7 +445,7 @@ iaf_stop_pmc(int cpu, int ri) iafc->pc_iafctrl &= ~fc; - PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); + PMCDBG1(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); @@ -457,7 +457,7 @@ iaf_stop_pmc(int cpu, int ri) IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); - PMCDBG(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", + PMCDBG4(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", iafc->pc_iafctrl, (uint32_t) rdmsr(IAF_CTRL), iafc->pc_globalctrl, rdmsr(IA_GLOBAL_CTRL)); @@ -495,7 +495,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK)); - PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " + PMCDBG6(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " "pmc=%jx", cpu, ri, IAF_RI_TO_MSR(ri), v, (uintmax_t) rdmsr(IAF_CTRL), (uintmax_t) rdpmc(IAF_RI_TO_MSR(ri))); @@ -511,7 +511,7 @@ iaf_initialize(struct pmc_mdep *md, int KASSERT(md != NULL, ("[iaf,%d] md is NULL", __LINE__)); - PMCDBG(MDP,INI,1, "%s", "iaf-initialize"); + PMCDBG0(MDP,INI,1, "iaf-initialize"); pcd = &md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF]; @@ -2265,7 +2265,7 @@ iap_config_pmc(int cpu, int ri, struct p KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - PMCDBG(MDP,CFG,1, "iap-config cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP,CFG,1, "iap-config cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(core_pcpu[cpu] != NULL, ("[core,%d] null per-cpu %d", __LINE__, cpu)); @@ -2344,7 +2344,7 @@ iap_read_pmc(int cpu, int ri, pmc_value_ else *v = tmp & ((1ULL << core_iap_width) - 1); - PMCDBG(MDP,REA,1, "iap-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, + PMCDBG4(MDP,REA,1, "iap-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, ri, *v); return (0); @@ -2355,7 +2355,7 @@ iap_release_pmc(int cpu, int ri, struct { (void) pm; - PMCDBG(MDP,REL,1, "iap-release cpu=%d ri=%d pm=%p", cpu, ri, + PMCDBG3(MDP,REL,1, "iap-release cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -2388,11 +2388,11 @@ iap_start_pmc(int cpu, int ri) ("[core,%d] starting cpu%d,ri%d with no pmc configured", __LINE__, cpu, ri)); - PMCDBG(MDP,STA,1, "iap-start cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STA,1, "iap-start cpu=%d ri=%d", cpu, ri); evsel = pm->pm_md.pm_iap.pm_iap_evsel; - PMCDBG(MDP,STA,2, "iap-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", + PMCDBG4(MDP,STA,2, "iap-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", cpu, ri, IAP_EVSEL0 + ri, evsel); /* Event specific configuration. */ @@ -2440,7 +2440,7 @@ iap_stop_pmc(int cpu, int ri) ("[core,%d] cpu%d ri%d no configured PMC to stop", __LINE__, cpu, ri)); - PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK; wrmsr(IAP_EVSEL0 + ri, msr); /* stop hw */ @@ -2477,7 +2477,7 @@ iap_write_pmc(int cpu, int ri, pmc_value ("[core,%d] cpu%d ri%d no configured PMC to stop", __LINE__, cpu, ri)); - PMCDBG(MDP,WRI,1, "iap-write cpu=%d ri=%d msr=0x%x v=%jx", cpu, ri, + PMCDBG4(MDP,WRI,1, "iap-write cpu=%d ri=%d msr=0x%x v=%jx", cpu, ri, IAP_PMC0 + ri, v); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) @@ -2502,7 +2502,7 @@ iap_initialize(struct pmc_mdep *md, int KASSERT(md != NULL, ("[iap,%d] md is NULL", __LINE__)); - PMCDBG(MDP,INI,1, "%s", "iap-initialize"); + PMCDBG0(MDP,INI,1, "iap-initialize"); /* Remember the set of architectural events supported. */ core_architectural_events = ~flags; @@ -2540,7 +2540,7 @@ core_intr(int cpu, struct trapframe *tf) int error, found_interrupt, ri; uint64_t msr; - PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, + PMCDBG3(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); found_interrupt = 0; @@ -2599,7 +2599,7 @@ core2_intr(int cpu, struct trapframe *tf struct core_cpu *cc; pmc_value_t v; - PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, + PMCDBG3(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); /* @@ -2611,7 +2611,7 @@ core2_intr(int cpu, struct trapframe *tf intrstatus = rdmsr(IA_GLOBAL_STATUS); intrenable = intrstatus & core_pmcmask; - PMCDBG(MDP,INT, 1, "cpu=%d intrstatus=%jx", cpu, + PMCDBG2(MDP,INT, 1, "cpu=%d intrstatus=%jx", cpu, (uintmax_t) intrstatus); found_interrupt = 0; @@ -2657,7 +2657,7 @@ core2_intr(int cpu, struct trapframe *tf /* Reload sampling count. */ wrmsr(IAF_CTR0 + n, v); - PMCDBG(MDP,INT, 1, "iaf-intr cpu=%d error=%d v=%jx(%jx)", cpu, + PMCDBG4(MDP,INT, 1, "iaf-intr cpu=%d error=%d v=%jx(%jx)", cpu, error, (uintmax_t) v, (uintmax_t) rdpmc(IAF_RI_TO_MSR(n))); } @@ -2682,7 +2682,7 @@ core2_intr(int cpu, struct trapframe *tf v = iap_reload_count_to_perfctr_value(pm->pm_sc.pm_reloadcount); - PMCDBG(MDP,INT, 1, "iap-intr cpu=%d error=%d v=%jx", cpu, error, + PMCDBG3(MDP,INT, 1, "iap-intr cpu=%d error=%d v=%jx", cpu, error, (uintmax_t) v); /* Reload sampling count. */ @@ -2692,14 +2692,14 @@ core2_intr(int cpu, struct trapframe *tf /* * Reenable all non-stalled PMCs. */ - PMCDBG(MDP,INT, 1, "cpu=%d intrenable=%jx", cpu, + PMCDBG2(MDP,INT, 1, "cpu=%d intrenable=%jx", cpu, (uintmax_t) intrenable); cc->pc_globalctrl |= intrenable; wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl & IA_GLOBAL_CTRL_MASK); - PMCDBG(MDP,INT, 1, "cpu=%d fixedctrl=%jx globalctrl=%jx status=%jx " + PMCDBG5(MDP,INT, 1, "cpu=%d fixedctrl=%jx globalctrl=%jx status=%jx " "ovf=%jx", cpu, (uintmax_t) rdmsr(IAF_CTRL), (uintmax_t) rdmsr(IA_GLOBAL_CTRL), (uintmax_t) rdmsr(IA_GLOBAL_STATUS), @@ -2724,7 +2724,7 @@ pmc_core_initialize(struct pmc_mdep *md, ipa_version = cpuid[CORE_CPUID_EAX] & 0xFF; - PMCDBG(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", + PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", md->pmd_cputype, maxcpu, ipa_version); if (ipa_version < 1 || ipa_version > 3) { @@ -2770,7 +2770,7 @@ pmc_core_initialize(struct pmc_mdep *md, core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << IAF_OFFSET; } - PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, + PMCDBG2(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, core_iaf_ri); core_pcpu = malloc(sizeof(struct core_cpu **) * maxcpu, M_PMC, @@ -2793,7 +2793,7 @@ pmc_core_initialize(struct pmc_mdep *md, void pmc_core_finalize(struct pmc_mdep *md) { - PMCDBG(MDP,INI,1, "%s", "core-finalize"); + PMCDBG0(MDP,INI,1, "core-finalize"); free(core_pcpu, M_PMC); core_pcpu = NULL; Modified: stable/10/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 1 17:57:05 2015 (r283884) @@ -46,14 +46,14 @@ intel_switch_in(struct pmc_cpu *pc, stru { (void) pc; - PMCDBG(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, + PMCDBG3(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS); /* allow the RDPMC instruction if needed */ if (pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS) load_cr4(rcr4() | CR4_PCE); - PMCDBG(MDP,SWI,1, "cr4=0x%jx", (uintmax_t) rcr4()); + PMCDBG1(MDP,SWI,1, "cr4=0x%jx", (uintmax_t) rcr4()); return 0; } @@ -64,7 +64,7 @@ intel_switch_out(struct pmc_cpu *pc, str (void) pc; (void) pp; /* can be NULL */ - PMCDBG(MDP,SWO,1, "pc=%p pp=%p cr4=0x%jx", pc, pp, + PMCDBG3(MDP,SWO,1, "pc=%p pp=%p cr4=0x%jx", pc, pp, (uintmax_t) rcr4()); /* always turn off the RDPMC instruction */ @@ -83,7 +83,7 @@ pmc_intel_initialize(void) KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL, ("[intel,%d] Initializing non-intel processor", __LINE__)); - PMCDBG(MDP,INI,0, "intel-initialize cpuid=0x%x", cpu_id); + PMCDBG1(MDP,INI,0, "intel-initialize cpuid=0x%x", cpu_id); cputype = -1; nclasses = 2; Modified: stable/10/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_logging.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_logging.c Mon Jun 1 17:57:05 2015 (r283884) @@ -211,9 +211,9 @@ pmclog_get_buffer(struct pmc_owner *po) TAILQ_REMOVE(&pmc_bufferlist, plb, plb_next); mtx_unlock_spin(&pmc_bufferlist_mtx); - PMCDBG(LOG,GTB,1, "po=%p plb=%p", po, plb); + PMCDBG2(LOG,GTB,1, "po=%p plb=%p", po, plb); -#ifdef DEBUG +#ifdef HWPMC_DEBUG if (plb) KASSERT(plb->plb_ptr == plb->plb_base && plb->plb_base < plb->plb_fence, @@ -261,7 +261,7 @@ pmclog_loop(void *arg) ownercred = crhold(p->p_ucred); PROC_UNLOCK(p); - PMCDBG(LOG,INI,1, "po=%p kt=%p", po, po->po_kthread); + PMCDBG2(LOG,INI,1, "po=%p kt=%p", po, po->po_kthread); KASSERT(po->po_kthread == curthread->td_proc, ("[pmclog,%d] proc mismatch po=%p po/kt=%p curproc=%p", __LINE__, po, po->po_kthread, curthread->td_proc)); @@ -312,7 +312,7 @@ pmclog_loop(void *arg) mtx_unlock(&pmc_kthread_mtx); /* process the request */ - PMCDBG(LOG,WRI,2, "po=%p base=%p ptr=%p", po, + PMCDBG3(LOG,WRI,2, "po=%p base=%p ptr=%p", po, lb->plb_base, lb->plb_ptr); /* change our thread's credentials before issuing the I/O */ @@ -343,7 +343,7 @@ pmclog_loop(void *arg) po->po_error = error; /* save for flush log */ - PMCDBG(LOG,WRI,2, "po=%p error=%d", po, error); + PMCDBG2(LOG,WRI,2, "po=%p error=%d", po, error); break; } @@ -403,7 +403,7 @@ pmclog_release(struct pmc_owner *po) mtx_unlock_spin(&po->po_mtx); - PMCDBG(LOG,REL,1, "po=%p", po); + PMCDBG1(LOG,REL,1, "po=%p", po); } @@ -423,7 +423,7 @@ pmclog_reserve(struct pmc_owner *po, int uint32_t *lh; struct timespec ts; - PMCDBG(LOG,ALL,1, "po=%p len=%d", po, length); + PMCDBG2(LOG,ALL,1, "po=%p len=%d", po, length); KASSERT(length % sizeof(uint32_t) == 0, ("[pmclog,%d] length not a multiple of word size", __LINE__)); @@ -519,7 +519,7 @@ pmclog_schedule_io(struct pmc_owner *po) ("[pmclog,%d] buffer invariants po=%p ptr=%p fenc=%p", __LINE__, po, po->po_curbuf->plb_ptr, po->po_curbuf->plb_fence)); - PMCDBG(LOG,SIO, 1, "po=%p", po); + PMCDBG1(LOG,SIO, 1, "po=%p", po); mtx_assert(&po->po_mtx, MA_OWNED); @@ -579,7 +579,7 @@ pmclog_configure_log(struct pmc_mdep *md * the former is not held here. */ sx_assert(&pmc_sx, SA_UNLOCKED); - PMCDBG(LOG,CFG,1, "config po=%p logfd=%d", po, logfd); + PMCDBG2(LOG,CFG,1, "config po=%p logfd=%d", po, logfd); p = po->po_owner; @@ -649,7 +649,7 @@ pmclog_deconfigure_log(struct pmc_owner int error; struct pmclog_buffer *lb; - PMCDBG(LOG,CFG,1, "de-config po=%p", po); + PMCDBG1(LOG,CFG,1, "de-config po=%p", po); if ((po->po_flags & PMC_PO_OWNS_LOGFILE) == 0) return (EINVAL); @@ -700,7 +700,7 @@ pmclog_flush(struct pmc_owner *po) int error; struct pmclog_buffer *lb; - PMCDBG(LOG,FLS,1, "po=%p", po); + PMCDBG1(LOG,FLS,1, "po=%p", po); /* * If there is a pending error recorded by the logger thread, @@ -741,7 +741,7 @@ int pmclog_close(struct pmc_owner *po) { - PMCDBG(LOG,CLO,1, "po=%p", po); + PMCDBG1(LOG,CLO,1, "po=%p", po); mtx_lock(&pmc_kthread_mtx); @@ -773,7 +773,7 @@ pmclog_process_callchain(struct pmc *pm, uint32_t flags; struct pmc_owner *po; - PMCDBG(LOG,SAM,1,"pm=%p pid=%d n=%d", pm, ps->ps_pid, + PMCDBG3(LOG,SAM,1,"pm=%p pid=%d n=%d", pm, ps->ps_pid, ps->ps_nsamples); recordlen = offsetof(struct pmclog_callchain, pl_pc) + @@ -843,7 +843,7 @@ pmclog_process_pmcallocate(struct pmc *p po = pm->pm_owner; - PMCDBG(LOG,ALL,1, "pm=%p", pm); + PMCDBG1(LOG,ALL,1, "pm=%p", pm); if (PMC_TO_CLASS(pm) == PMC_CLASS_SOFT) { PMCLOG_RESERVE(po, PMCALLOCATEDYN, @@ -874,7 +874,7 @@ pmclog_process_pmcattach(struct pmc *pm, int pathlen, recordlen; struct pmc_owner *po; - PMCDBG(LOG,ATT,1,"pm=%p pid=%d", pm, pid); + PMCDBG2(LOG,ATT,1,"pm=%p pid=%d", pm, pid); po = pm->pm_owner; @@ -893,7 +893,7 @@ pmclog_process_pmcdetach(struct pmc *pm, { struct pmc_owner *po; - PMCDBG(LOG,ATT,1,"!pm=%p pid=%d", pm, pid); + PMCDBG2(LOG,ATT,1,"!pm=%p pid=%d", pm, pid); po = pm->pm_owner; @@ -915,7 +915,7 @@ pmclog_process_proccsw(struct pmc *pm, s KASSERT(pm->pm_flags & PMC_F_LOG_PROCCSW, ("[pmclog,%d] log-process-csw called gratuitously", __LINE__)); - PMCDBG(LOG,SWO,1,"pm=%p pid=%d v=%jx", pm, pp->pp_proc->p_pid, + PMCDBG3(LOG,SWO,1,"pm=%p pid=%d v=%jx", pm, pp->pp_proc->p_pid, v); po = pm->pm_owner; @@ -933,7 +933,7 @@ pmclog_process_procexec(struct pmc_owner { int pathlen, recordlen; - PMCDBG(LOG,EXC,1,"po=%p pid=%d path=\"%s\"", po, pid, path); + PMCDBG3(LOG,EXC,1,"po=%p pid=%d path=\"%s\"", po, pid, path); pathlen = strlen(path) + 1; /* #bytes for the path */ recordlen = offsetof(struct pmclog_procexec, pl_pathname) + pathlen; @@ -957,7 +957,7 @@ pmclog_process_procexit(struct pmc *pm, struct pmc_owner *po; ri = PMC_TO_ROWINDEX(pm); - PMCDBG(LOG,EXT,1,"pm=%p pid=%d v=%jx", pm, pp->pp_proc->p_pid, + PMCDBG3(LOG,EXT,1,"pm=%p pid=%d v=%jx", pm, pp->pp_proc->p_pid, pp->pp_pmcs[ri].pp_pmcval); po = pm->pm_owner; @@ -1003,7 +1003,7 @@ pmclog_process_userlog(struct pmc_owner { int error; - PMCDBG(LOG,WRI,1, "writelog po=%p ud=0x%x", po, wl->pm_userdata); + PMCDBG2(LOG,WRI,1, "writelog po=%p ud=0x%x", po, wl->pm_userdata); error = 0; Modified: stable/10/sys/dev/hwpmc/hwpmc_mips.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mips.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_mips.c Mon Jun 1 17:57:05 2015 (r283884) @@ -104,7 +104,7 @@ mips_allocate_pmc(int cpu, int ri, struc pm->pm_md.pm_mips_evsel = config; - PMCDBG(MDP,ALL,2,"mips-allocate ri=%d -> config=0x%x", ri, config); + PMCDBG2(MDP,ALL,2,"mips-allocate ri=%d -> config=0x%x", ri, config); return 0; } @@ -123,7 +123,7 @@ mips_read_pmc(int cpu, int ri, pmc_value pm = mips_pcpu[cpu]->pc_mipspmcs[ri].phw_pmc; tmp = mips_pmcn_read(ri); - PMCDBG(MDP,REA,2,"mips-read id=%d -> %jd", ri, tmp); + PMCDBG2(MDP,REA,2,"mips-read id=%d -> %jd", ri, tmp); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) *v = tmp - (1UL << (mips_pmc_spec.ps_counter_width - 1)); @@ -148,7 +148,7 @@ mips_write_pmc(int cpu, int ri, pmc_valu if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = (1UL << (mips_pmc_spec.ps_counter_width - 1)) - v; - PMCDBG(MDP,WRI,1,"mips-write cpu=%d ri=%d v=%jx", cpu, ri, v); + PMCDBG3(MDP,WRI,1,"mips-write cpu=%d ri=%d v=%jx", cpu, ri, v); mips_pmcn_write(ri, v); @@ -160,7 +160,7 @@ mips_config_pmc(int cpu, int ri, struct { struct pmc_hw *phw; - PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[mips,%d] illegal CPU value %d", __LINE__, cpu)); @@ -376,7 +376,7 @@ mips_pcpu_init(struct pmc_mdep *md, int KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[mips,%d] wrong cpu number %d", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"mips-init cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"mips-init cpu=%d", cpu); mips_pcpu[cpu] = pac = malloc(sizeof(struct mips_cpu), M_PMC, M_WAITOK|M_ZERO); @@ -421,7 +421,7 @@ pmc_mips_initialize() */ mips_npmcs = 2; - PMCDBG(MDP,INI,1,"mips-init npmcs=%d", mips_npmcs); + PMCDBG1(MDP,INI,1,"mips-init npmcs=%d", mips_npmcs); /* * Allocate space for pointers to PMC HW descriptors and for Modified: stable/10/sys/dev/hwpmc/hwpmc_mips24k.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mips24k.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_mips24k.c Mon Jun 1 17:57:05 2015 (r283884) @@ -223,7 +223,7 @@ mips_get_perfctl(int cpu, int ri, uint32 if (caps & PMC_CAP_INTERRUPT) config |= MIPS24K_PMC_INTERRUPT_ENABLE; - PMCDBG(MDP,ALL,2,"mips24k-get_perfctl ri=%d -> config=0x%x", ri, config); + PMCDBG2(MDP,ALL,2,"mips24k-get_perfctl ri=%d -> config=0x%x", ri, config); return (config); } Modified: stable/10/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 17:57:05 2015 (r283884) @@ -173,7 +173,7 @@ static struct pmc_classdep **pmc_rowinde * Prototypes */ -#ifdef DEBUG +#ifdef HWPMC_DEBUG static int pmc_debugflags_sysctl_handler(SYSCTL_HANDLER_ARGS); static int pmc_debugflags_parse(char *newstr, char *fence); #endif @@ -239,7 +239,7 @@ TUNABLE_INT(PMC_SYSCTL_NAME_PREFIX "call SYSCTL_INT(_kern_hwpmc, OID_AUTO, callchaindepth, CTLFLAG_TUN|CTLFLAG_RD, &pmc_callchaindepth, 0, "depth of call chain records"); -#ifdef DEBUG +#ifdef HWPMC_DEBUG struct pmc_debugflags pmc_debugflags = PMC_DEBUG_DEFAULT_FLAGS; char pmc_debugstr[PMC_DEBUG_STRSIZE]; TUNABLE_STR(PMC_SYSCTL_NAME_PREFIX "debugflags", pmc_debugstr, @@ -342,7 +342,7 @@ static moduledata_t pmc_mod = { DECLARE_MODULE(pmc, pmc_mod, SI_SUB_SMP, SI_ORDER_ANY); MODULE_VERSION(pmc, PMC_VERSION); -#ifdef DEBUG +#ifdef HWPMC_DEBUG enum pmc_dbgparse_state { PMCDS_WS, /* in whitespace */ PMCDS_MAJOR, /* seen a major keyword */ @@ -656,12 +656,12 @@ pmc_ri_to_classdep(struct pmc_mdep *md, static void pmc_save_cpu_binding(struct pmc_binding *pb) { - PMCDBG(CPU,BND,2, "%s", "save-cpu"); + PMCDBG0(CPU,BND,2, "save-cpu"); thread_lock(curthread); pb->pb_bound = sched_is_bound(curthread); pb->pb_cpu = curthread->td_oncpu; thread_unlock(curthread); - PMCDBG(CPU,BND,2, "save-cpu cpu=%d", pb->pb_cpu); + PMCDBG1(CPU,BND,2, "save-cpu cpu=%d", pb->pb_cpu); } /* @@ -671,7 +671,7 @@ pmc_save_cpu_binding(struct pmc_binding static void pmc_restore_cpu_binding(struct pmc_binding *pb) { - PMCDBG(CPU,BND,2, "restore-cpu curcpu=%d restore=%d", + PMCDBG2(CPU,BND,2, "restore-cpu curcpu=%d restore=%d", curthread->td_oncpu, pb->pb_cpu); thread_lock(curthread); if (pb->pb_bound) @@ -679,7 +679,7 @@ pmc_restore_cpu_binding(struct pmc_bindi else sched_unbind(curthread); thread_unlock(curthread); - PMCDBG(CPU,BND,2, "%s", "restore-cpu done"); + PMCDBG0(CPU,BND,2, "restore-cpu done"); } /* @@ -696,7 +696,7 @@ pmc_select_cpu(int cpu) KASSERT(pmc_cpu_is_active(cpu), ("[pmc,%d] selecting inactive " "CPU %d", __LINE__, cpu)); - PMCDBG(CPU,SEL,2, "select-cpu cpu=%d", cpu); + PMCDBG1(CPU,SEL,2, "select-cpu cpu=%d", cpu); thread_lock(curthread); sched_bind(curthread, cpu); thread_unlock(curthread); @@ -705,7 +705,7 @@ pmc_select_cpu(int cpu) ("[pmc,%d] CPU not bound [cpu=%d, curr=%d]", __LINE__, cpu, curthread->td_oncpu)); - PMCDBG(CPU,SEL,2, "select-cpu cpu=%d ok", cpu); + PMCDBG1(CPU,SEL,2, "select-cpu cpu=%d ok", cpu); } /* @@ -747,14 +747,14 @@ pmc_remove_owner(struct pmc_owner *po) sx_assert(&pmc_sx, SX_XLOCKED); - PMCDBG(OWN,ORM,1, "remove-owner po=%p", po); + PMCDBG1(OWN,ORM,1, "remove-owner po=%p", po); /* Remove descriptor from the owner hash table */ LIST_REMOVE(po, po_next); /* release all owned PMC descriptors */ LIST_FOREACH_SAFE(pm, &po->po_pmcs, pm_next, tmp) { - PMCDBG(OWN,ORM,2, "pmc=%p", pm); + PMCDBG1(OWN,ORM,2, "pmc=%p", pm); KASSERT(pm->pm_owner == po, ("[pmc,%d] owner %p != po %p", __LINE__, pm->pm_owner, po)); @@ -780,7 +780,7 @@ static void pmc_maybe_remove_owner(struct pmc_owner *po) { - PMCDBG(OWN,OMR,1, "maybe-remove-owner po=%p", po); + PMCDBG1(OWN,OMR,1, "maybe-remove-owner po=%p", po); /* * Remove owner record if @@ -818,10 +818,10 @@ pmc_link_target_process(struct pmc *pm, ri = PMC_TO_ROWINDEX(pm); - PMCDBG(PRC,TLK,1, "link-target pmc=%p ri=%d pmc-process=%p", + PMCDBG3(PRC,TLK,1, "link-target pmc=%p ri=%d pmc-process=%p", pm, ri, pp); -#ifdef DEBUG +#ifdef HWPMC_DEBUG LIST_FOREACH(pt, &pm->pm_targets, pt_next) if (pt->pt_process == pp) KASSERT(0, ("[pmc,%d] pp %p already in pmc %p targets", @@ -871,7 +871,7 @@ pmc_unlink_target_process(struct pmc *pm ri = PMC_TO_ROWINDEX(pm); - PMCDBG(PRC,TUL,1, "unlink-target pmc=%p ri=%d pmc-process=%p", + PMCDBG3(PRC,TUL,1, "unlink-target pmc=%p ri=%d pmc-process=%p", pm, ri, pp); KASSERT(pp->pp_pmcs[ri].pp_pmc == pm, @@ -907,7 +907,7 @@ pmc_unlink_target_process(struct pmc *pm kern_psignal(p, SIGIO); PROC_UNLOCK(p); - PMCDBG(PRC,SIG,2, "signalling proc=%p signal=%d", p, + PMCDBG2(PRC,SIG,2, "signalling proc=%p signal=%d", p, SIGIO); } } @@ -980,7 +980,7 @@ pmc_attach_one_process(struct proc *p, s sx_assert(&pmc_sx, SX_XLOCKED); - PMCDBG(PRC,ATT,2, "attach-one pm=%p ri=%d proc=%p (%d, %s)", pm, + PMCDBG5(PRC,ATT,2, "attach-one pm=%p ri=%d proc=%p (%d, %s)", pm, PMC_TO_ROWINDEX(pm), p, p->p_pid, p->p_comm); /* @@ -1045,7 +1045,7 @@ pmc_attach_process(struct proc *p, struc sx_assert(&pmc_sx, SX_XLOCKED); - PMCDBG(PRC,ATT,1, "attach pm=%p ri=%d proc=%p (%d, %s)", pm, + PMCDBG5(PRC,ATT,1, "attach pm=%p ri=%d proc=%p (%d, %s)", pm, PMC_TO_ROWINDEX(pm), p, p->p_pid, p->p_comm); @@ -1112,7 +1112,7 @@ pmc_detach_one_process(struct proc *p, s ri = PMC_TO_ROWINDEX(pm); - PMCDBG(PRC,ATT,2, "detach-one pm=%p ri=%d proc=%p (%d, %s) flags=0x%x", + PMCDBG6(PRC,ATT,2, "detach-one pm=%p ri=%d proc=%p (%d, %s) flags=0x%x", pm, ri, p, p->p_pid, p->p_comm, flags); if ((pp = pmc_find_process_descriptor(p, 0)) == NULL) @@ -1162,7 +1162,7 @@ pmc_detach_process(struct proc *p, struc sx_assert(&pmc_sx, SX_XLOCKED); - PMCDBG(PRC,ATT,1, "detach pm=%p ri=%d proc=%p (%d, %s)", pm, + PMCDBG5(PRC,ATT,1, "detach pm=%p ri=%d proc=%p (%d, %s)", pm, PMC_TO_ROWINDEX(pm), p, p->p_pid, p->p_comm); if ((pm->pm_flags & PMC_F_DESCENDANTS) == 0) @@ -1233,7 +1233,7 @@ pmc_process_csw_in(struct thread *td) cpu = PCPU_GET(cpuid); /* td->td_oncpu is invalid */ - PMCDBG(CSW,SWI,1, "cpu=%d proc=%p (%d, %s) pp=%p", cpu, p, + PMCDBG5(CSW,SWI,1, "cpu=%d proc=%p (%d, %s) pp=%p", cpu, p, p->p_pid, p->p_comm, pp); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -1300,7 +1300,7 @@ pmc_process_csw_in(struct thread *td) mtx_pool_unlock_spin(pmc_mtxpool, pm); } - PMCDBG(CSW,SWI,1,"cpu=%d ri=%d new=%jd", cpu, ri, newvalue); + PMCDBG3(CSW,SWI,1,"cpu=%d ri=%d new=%jd", cpu, ri, newvalue); pcd->pcd_write_pmc(cpu, adjri, newvalue); pcd->pcd_start_pmc(cpu, adjri); @@ -1361,7 +1361,7 @@ pmc_process_csw_out(struct thread *td) cpu = PCPU_GET(cpuid); /* td->td_oncpu is invalid */ - PMCDBG(CSW,SWO,1, "cpu=%d proc=%p (%d, %s) pp=%p", cpu, p, + PMCDBG5(CSW,SWO,1, "cpu=%d proc=%p (%d, %s) pp=%p", cpu, p, p->p_pid, p->p_comm, pp); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -1423,7 +1423,7 @@ pmc_process_csw_out(struct thread *td) tmp = newvalue - PMC_PCPU_SAVED(cpu,ri); - PMCDBG(CSW,SWO,1,"cpu=%d ri=%d tmp=%jd", cpu, ri, + PMCDBG3(CSW,SWO,1,"cpu=%d ri=%d tmp=%jd", cpu, ri, tmp); if (mode == PMC_MODE_TS) { @@ -1580,7 +1580,7 @@ pmc_log_kernel_mappings(struct pmc *pm) */ kmbase = linker_hwpmc_list_objects(); for (km = kmbase; km->pm_file != NULL; km++) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 18:05:31 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C56E097D; Mon, 1 Jun 2015 18:05:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A75C21AF6; Mon, 1 Jun 2015 18:05:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51I5Vu3021909; Mon, 1 Jun 2015 18:05:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51I5V6Z021907; Mon, 1 Jun 2015 18:05:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506011805.t51I5V6Z021907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 18:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283885 - stable/10/usr.sbin/pmcstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 18:05:31 -0000 Author: jhb Date: Mon Jun 1 18:05:30 2015 New Revision: 283885 URL: https://svnweb.freebsd.org/changeset/base/283885 Log: MFC 282643: Use the kern.bootfile sysctl to set the default kernel path rather than hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when using nextboot -k or 'boot foo' at the loader to boot alternate kernels. Sponsored by: Norse Corp, Inc. Modified: stable/10/usr.sbin/pmcstat/pmcstat.8 stable/10/usr.sbin/pmcstat/pmcstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstat/pmcstat.8 ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.8 Mon Jun 1 17:57:05 2015 (r283884) +++ stable/10/usr.sbin/pmcstat/pmcstat.8 Mon Jun 1 18:05:30 2015 (r283885) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 27, 2014 +.Dd May 8, 2015 .Dt PMCSTAT 8 .Os .Sh NAME @@ -279,8 +279,9 @@ Set the pathname of the kernel directory This directory specifies where .Nm should look for the kernel and its modules. -The default is -.Pa /boot/kernel . +The default is to use the path of the running kernel obtained from the +.Va kern.bootfile +sysctl. .It Fl l Ar secs Set system-wide performance measurement duration for .Ar secs Modified: stable/10/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.c Mon Jun 1 17:57:05 2015 (r283884) +++ stable/10/usr.sbin/pmcstat/pmcstat.c Mon Jun 1 18:05:30 2015 (r283885) @@ -557,7 +557,7 @@ main(int argc, char **argv) int c, check_driver_stats, current_sampling_count; int do_callchain, do_descendants, do_logproccsw, do_logprocexit; int do_print, do_read; - size_t dummy; + size_t len; int graphdepth; int pipefd[2], rfd; int use_cumulative_counts; @@ -586,7 +586,6 @@ main(int argc, char **argv) args.pa_verbosity = 1; args.pa_logfd = -1; args.pa_fsroot = ""; - args.pa_kernel = strdup("/boot/kernel"); args.pa_samplesdir = "."; args.pa_printfile = stderr; args.pa_graphdepth = DEFAULT_CALLGRAPH_DEPTH; @@ -610,12 +609,20 @@ main(int argc, char **argv) ev = NULL; CPU_ZERO(&cpumask); + /* Default to using the running system kernel. */ + len = 0; + if (sysctlbyname("kern.bootfile", NULL, &len, NULL, 0) == -1) + err(EX_OSERR, "ERROR: Cannot determine path of running kernel"); + args.pa_kernel = malloc(len + 1); + if (sysctlbyname("kern.bootfile", args.pa_kernel, &len, NULL, 0) == -1) + err(EX_OSERR, "ERROR: Cannot determine path of running kernel"); + /* * The initial CPU mask specifies all non-halted CPUS in the * system. */ - dummy = sizeof(int); - if (sysctlbyname("hw.ncpu", &ncpu, &dummy, NULL, 0) < 0) + len = sizeof(int); + if (sysctlbyname("hw.ncpu", &ncpu, &len, NULL, 0) < 0) err(EX_OSERR, "ERROR: Cannot determine the number of CPUs"); for (hcpu = 0; hcpu < ncpu; hcpu++) CPU_SET(hcpu, &cpumask); @@ -1061,33 +1068,31 @@ main(int argc, char **argv) ); /* - * Check if "-k kerneldir" was specified, and if whether - * 'kerneldir' actually refers to a file. If so, use - * `dirname path` to determine the kernel directory. - */ - if (args.pa_flags & FLAG_HAS_KERNELPATH) { - (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, - args.pa_kernel); + * Check if 'kerneldir' refers to a file rather than a + * directory. If so, use `dirname path` to determine the + * kernel directory. + */ + (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, + args.pa_kernel); + if (stat(buffer, &sb) < 0) + err(EX_OSERR, "ERROR: Cannot locate kernel \"%s\"", + buffer); + if (!S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) + errx(EX_USAGE, "ERROR: \"%s\": Unsupported file type.", + buffer); + if (!S_ISDIR(sb.st_mode)) { + tmp = args.pa_kernel; + args.pa_kernel = strdup(dirname(args.pa_kernel)); + free(tmp); + (void) snprintf(buffer, sizeof(buffer), "%s%s", + args.pa_fsroot, args.pa_kernel); if (stat(buffer, &sb) < 0) - err(EX_OSERR, "ERROR: Cannot locate kernel \"%s\"", + err(EX_OSERR, "ERROR: Cannot stat \"%s\"", buffer); - if (!S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) - errx(EX_USAGE, "ERROR: \"%s\": Unsupported file type.", + if (!S_ISDIR(sb.st_mode)) + errx(EX_USAGE, + "ERROR: \"%s\" is not a directory.", buffer); - if (!S_ISDIR(sb.st_mode)) { - tmp = args.pa_kernel; - args.pa_kernel = strdup(dirname(args.pa_kernel)); - free(tmp); - (void) snprintf(buffer, sizeof(buffer), "%s%s", - args.pa_fsroot, args.pa_kernel); - if (stat(buffer, &sb) < 0) - err(EX_OSERR, "ERROR: Cannot stat \"%s\"", - buffer); - if (!S_ISDIR(sb.st_mode)) - errx(EX_USAGE, - "ERROR: \"%s\" is not a directory.", - buffer); - } } /* From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 18:08:57 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E2A7BF2; Mon, 1 Jun 2015 18:08:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CA691B48; Mon, 1 Jun 2015 18:08:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51I8vsL022512; Mon, 1 Jun 2015 18:08:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51I8uQ1022510; Mon, 1 Jun 2015 18:08:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506011808.t51I8uQ1022510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 18:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283886 - in stable: 10/sys/dev/hwpmc 9/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 18:08:57 -0000 Author: jhb Date: Mon Jun 1 18:08:56 2015 New Revision: 283886 URL: https://svnweb.freebsd.org/changeset/base/283886 Log: MFC 283123: Fix two bugs that could result in PMC sampling effectively stopping. In both cases, the the effect of the bug was that a very small positive number was written to the counter. This means that a large number of events needed to occur before the next sampling interrupt would trigger. Even with very frequently occurring events like clock cycles wrapping all the way around could take a long time. Both bugs occurred when updating the saved reload count for an outgoing thread on a context switch. First, the counter-independent code compares the current reload count against the count set when the thread switched in and generates a delta to apply to the saved count. If this delta causes the reload counter to go negative, it would add a full reload interval to wrap it around to a positive value. The fix is to add the full reload interval if the resulting counter is zero. Second, occasionally the raw counter value read during a context switch has actually wrapped, but an interrupt has not yet triggered. In this case the existing logic would return a very large reload count (e.g. 2^48 - 2 if the counter had overflowed by a count of 2). This was seen both for fixed-function and programmable counters on an E5-2643. Workaround this case by returning a reload count of zero. PR: 198149 Sponsored by: Norse Corp, Inc. Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/hwpmc/hwpmc_core.c stable/9/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 18:05:30 2015 (r283885) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 18:08:56 2015 (r283886) @@ -203,6 +203,10 @@ core_pcpu_fini(struct pmc_mdep *md, int static pmc_value_t iaf_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iaf_width - 1))) == 0) + return (0); v &= (1ULL << core_iaf_width) - 1; return (1ULL << core_iaf_width) - v; } @@ -1786,6 +1790,10 @@ static const int niap_events = sizeof(ia static pmc_value_t iap_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iap_width - 1))) == 0) + return (0); v &= (1ULL << core_iap_width) - 1; return (1ULL << core_iap_width) - v; } Modified: stable/10/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 18:05:30 2015 (r283885) +++ stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 18:08:56 2015 (r283886) @@ -1440,7 +1440,7 @@ pmc_process_csw_out(struct thread *td) tmp += pm->pm_sc.pm_reloadcount; mtx_pool_lock_spin(pmc_mtxpool, pm); pp->pp_pmcs[ri].pp_pmcval -= tmp; - if ((int64_t) pp->pp_pmcs[ri].pp_pmcval < 0) + if ((int64_t) pp->pp_pmcs[ri].pp_pmcval <= 0) pp->pp_pmcs[ri].pp_pmcval += pm->pm_sc.pm_reloadcount; mtx_pool_unlock_spin(pmc_mtxpool, pm); From owner-svn-src-stable-10@FreeBSD.ORG Mon Jun 1 19:26:25 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B85DD60C; Mon, 1 Jun 2015 19:26:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A65061FDF; Mon, 1 Jun 2015 19:26:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51JQPGv065972; Mon, 1 Jun 2015 19:26:25 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51JQPnZ065970; Mon, 1 Jun 2015 19:26:25 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506011926.t51JQPnZ065970@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 1 Jun 2015 19:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283892 - in stable: 10/sys/dev/acpica 8/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 19:26:25 -0000 Author: jkim Date: Mon Jun 1 19:26:24 2015 New Revision: 283892 URL: https://svnweb.freebsd.org/changeset/base/283892 Log: MFC: r283261 Do not probe Intel PIIX4 south bridge quirks on amd64. Modified: stable/10/sys/dev/acpica/acpi_cpu.c stable/10/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/dev/acpica/acpi_cpu.c stable/8/sys/dev/acpica/acpi_throttle.c stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_cpu.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/10/sys/dev/acpica/acpi_cpu.c Mon Jun 1 19:26:24 2015 (r283892) @@ -171,7 +171,8 @@ static void acpi_cpu_startup_cx(struct a static void acpi_cpu_cx_list(struct acpi_cpu_softc *sc); static void acpi_cpu_idle(sbintime_t sbt); static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); -static int acpi_cpu_quirks(void); +static void acpi_cpu_quirks(void); +static void acpi_cpu_quirks_piix4(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); @@ -1125,12 +1126,9 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); } -static int +static void acpi_cpu_quirks(void) { - device_t acpi_dev; - uint32_t val; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* @@ -1164,6 +1162,16 @@ acpi_cpu_quirks(void) } /* Look for various quirks of the PIIX4 part. */ + acpi_cpu_quirks_piix4(); +} + +static void +acpi_cpu_quirks_piix4(void) +{ +#ifdef __i386__ + device_t acpi_dev; + uint32_t val; + acpi_dev = pci_find_device(PCI_VENDOR_INTEL, PCI_DEVICE_82371AB_3); if (acpi_dev != NULL) { switch (pci_get_revid(acpi_dev)) { @@ -1212,8 +1220,7 @@ acpi_cpu_quirks(void) break; } } - - return (0); +#endif } static int Modified: stable/10/sys/dev/acpica/acpi_throttle.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_throttle.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/10/sys/dev/acpica/acpi_throttle.c Mon Jun 1 19:26:24 2015 (r283892) @@ -96,7 +96,7 @@ static void acpi_throttle_identify(drive static int acpi_throttle_probe(device_t dev); static int acpi_throttle_attach(device_t dev); static int acpi_throttle_evaluate(struct acpi_throttle_softc *sc); -static int acpi_throttle_quirks(struct acpi_throttle_softc *sc); +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc); static int acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count); static int acpi_thr_set(device_t dev, const struct cf_setting *set); @@ -314,9 +314,10 @@ acpi_throttle_evaluate(struct acpi_throt return (0); } -static int +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc) { +#ifdef __i386__ device_t acpi_dev; /* Look for various quirks of the PIIX4 part. */ @@ -339,8 +340,7 @@ acpi_throttle_quirks(struct acpi_throttl break; } } - - return (0); +#endif } static int From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 01:55:55 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBCB18C9; Tue, 2 Jun 2015 01:55:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9AA21EF1; Tue, 2 Jun 2015 01:55:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t521ttg2065880; Tue, 2 Jun 2015 01:55:55 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t521ttKd065879; Tue, 2 Jun 2015 01:55:55 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020155.t521ttKd065879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 01:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283899 - stable/10/sbin/dumpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 01:55:55 -0000 Author: ae Date: Tue Jun 2 01:55:54 2015 New Revision: 283899 URL: https://svnweb.freebsd.org/changeset/base/283899 Log: MFC r283577: Print leading zeroes of UFS2 fs_id like we do for UFS1. PR: 156908 Modified: stable/10/sbin/dumpfs/dumpfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dumpfs/dumpfs.c ============================================================================== --- stable/10/sbin/dumpfs/dumpfs.c Tue Jun 2 01:47:12 2015 (r283898) +++ stable/10/sbin/dumpfs/dumpfs.c Tue Jun 2 01:55:54 2015 (r283899) @@ -165,7 +165,7 @@ dumpfs(const char *name) fstime = afs.fs_time; printf("magic\t%x (UFS2)\ttime\t%s", afs.fs_magic, ctime(&fstime)); - printf("superblock location\t%jd\tid\t[ %x %x ]\n", + printf("superblock location\t%jd\tid\t[ %08x %08x ]\n", (intmax_t)afs.fs_sblockloc, afs.fs_id[0], afs.fs_id[1]); printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n", afs.fs_ncg, (intmax_t)fssize, (intmax_t)afs.fs_dsize); From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 02:05:33 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16577A7C; Tue, 2 Jun 2015 02:05:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC7921103; Tue, 2 Jun 2015 02:05:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5225WuG070903; Tue, 2 Jun 2015 02:05:32 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5225WMf070902; Tue, 2 Jun 2015 02:05:32 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020205.t5225WMf070902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 02:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283900 - stable/10/sys/geom/uncompress X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 02:05:33 -0000 Author: ae Date: Tue Jun 2 02:05:32 2015 New Revision: 283900 URL: https://svnweb.freebsd.org/changeset/base/283900 Log: MFC r283104: Read GEOM_UNCOMPRESS metadata using several requests that fit into MAXPHYS. For large compressed images the metadata size can be bigger than MAXPHYS and this triggers KASSERT in g_read_data(). Also use g_free() to free memory allocated by g_read_data(). PR: 199476 Modified: stable/10/sys/geom/uncompress/g_uncompress.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/uncompress/g_uncompress.c ============================================================================== --- stable/10/sys/geom/uncompress/g_uncompress.c Tue Jun 2 01:55:54 2015 (r283899) +++ stable/10/sys/geom/uncompress/g_uncompress.c Tue Jun 2 02:05:32 2015 (r283900) @@ -464,7 +464,8 @@ g_uncompress_taste(struct g_class *mp, s struct g_provider *pp2; struct g_consumer *cp; struct g_geom *gp; - uint32_t i, total_offsets, type; + uint64_t *offsets; + uint32_t i, r, total, total_offsets, type; uint8_t *buf; int error; @@ -499,8 +500,8 @@ g_uncompress_taste(struct g_class *mp, s */ DPRINTF(("%s: media sectorsize %u, mediasize %jd\n", gp->name, pp->sectorsize, (intmax_t)pp->mediasize)); - i = roundup(sizeof(struct cloop_header), pp->sectorsize); - buf = g_read_data(cp, 0, i, NULL); + total = roundup(sizeof(struct cloop_header), pp->sectorsize); + buf = g_read_data(cp, 0, total, NULL); if (buf == NULL) goto err; header = (struct cloop_header *) buf; @@ -557,20 +558,29 @@ g_uncompress_taste(struct g_class *mp, s gp->name, sc->nblocks); goto err; } - free(buf, M_GEOM); + g_free(buf); - i = roundup((sizeof(struct cloop_header) + - total_offsets * sizeof(uint64_t)), pp->sectorsize); - buf = g_read_data(cp, 0, i, NULL); - if (buf == NULL) - goto err; sc->offsets = malloc(total_offsets * sizeof(uint64_t), - M_GEOM_UNCOMPRESS, M_WAITOK); - for (i = 0; i <= total_offsets; i++) { - sc->offsets[i] = be64toh(((uint64_t *) - (buf+sizeof(struct cloop_header)))[i]); + M_GEOM_UNCOMPRESS, M_WAITOK | M_ZERO); + total = roundup((sizeof(struct cloop_header) + + total_offsets * sizeof(uint64_t)), pp->sectorsize); +#define RSZ ((total - r) > MAXPHYS ? MAXPHYS: (total - r)) + for (r = 0, i = 0; r < total; r += MAXPHYS) { + buf = g_read_data(cp, r, RSZ, &error); + if (buf == NULL) { + free(sc->offsets, M_GEOM_UNCOMPRESS); + goto err; + } + offsets = (uint64_t *)buf; + if (r == 0) + offsets += + sizeof(struct cloop_header) / sizeof(uint64_t); + for (; i < total_offsets && offsets < (uint64_t *)(buf + RSZ); + i++, offsets++) + sc->offsets[i] = be64toh(*offsets); + g_free(buf); } - free(buf, M_GEOM); +#undef RSZ buf = NULL; DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF); @@ -619,7 +629,7 @@ err: g_topology_lock(); g_access(cp, -1, 0, 0); if (buf != NULL) - free(buf, M_GEOM); + g_free(buf); if (gp->softc != NULL) { g_uncompress_softc_free(gp->softc, NULL); gp->softc = NULL; From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 03:14:48 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 834D68EE; Tue, 2 Jun 2015 03:14:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 704A0120B; Tue, 2 Jun 2015 03:14:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t523EmCR006714; Tue, 2 Jun 2015 03:14:48 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t523EhM8006686; Tue, 2 Jun 2015 03:14:43 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020314.t523EhM8006686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 03:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283901 - in stable/10/sys: netinet netinet6 netipsec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 03:14:48 -0000 Author: ae Date: Tue Jun 2 03:14:42 2015 New Revision: 283901 URL: https://svnweb.freebsd.org/changeset/base/283901 Log: MFC r275392: Remove route chaching support from ipsec code. It isn't used for some time. * remove sa_route_union declaration and route_cache member from struct secashead; * remove key_sa_routechange() call from ICMP and ICMPv6 code; * simplify ip_ipsec_mtu(); * remove #include ; Sponsored by: Yandex LLC Modified: stable/10/sys/netinet/ip_icmp.c stable/10/sys/netinet/ip_ipsec.c stable/10/sys/netinet6/icmp6.c stable/10/sys/netinet6/ip6_ipsec.c stable/10/sys/netipsec/ipsec.c stable/10/sys/netipsec/ipsec.h stable/10/sys/netipsec/ipsec_input.c stable/10/sys/netipsec/ipsec_mbuf.c stable/10/sys/netipsec/ipsec_output.c stable/10/sys/netipsec/key.c stable/10/sys/netipsec/key.h stable/10/sys/netipsec/key_debug.c stable/10/sys/netipsec/keydb.h stable/10/sys/netipsec/keysock.c stable/10/sys/netipsec/xform_ah.c stable/10/sys/netipsec/xform_esp.c stable/10/sys/netipsec/xform_ipcomp.c stable/10/sys/netipsec/xform_ipip.c stable/10/sys/netipsec/xform_tcp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_icmp.c ============================================================================== --- stable/10/sys/netinet/ip_icmp.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netinet/ip_icmp.c Tue Jun 2 03:14:42 2015 (r283901) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" -#include "opt_ipsec.h" #include #include @@ -64,10 +63,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET -#ifdef IPSEC -#include -#include -#endif #include @@ -664,9 +659,6 @@ reflect: (struct sockaddr *)&icmpgw, fibnum); } pfctlinput(PRC_REDIRECT_HOST, (struct sockaddr *)&icmpsrc); -#ifdef IPSEC - key_sa_routechange((struct sockaddr *)&icmpsrc); -#endif break; /* Modified: stable/10/sys/netinet/ip_ipsec.c ============================================================================== --- stable/10/sys/netinet/ip_ipsec.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netinet/ip_ipsec.c Tue Jun 2 03:14:42 2015 (r283901) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -215,35 +214,7 @@ ip_ipsec_mtu(struct mbuf *m, int mtu) * tunnel MTU = if MTU - sizeof(IP) - ESP/AH hdrsiz * XXX quickhack!!! */ - struct secpolicy *sp = NULL; - int ipsecerror; - int ipsechdr; - struct route *ro; - sp = ipsec_getpolicybyaddr(m, - IPSEC_DIR_OUTBOUND, - IP_FORWARDING, - &ipsecerror); - if (sp != NULL) { - /* count IPsec header size */ - ipsechdr = ipsec_hdrsiz(m, IPSEC_DIR_OUTBOUND, NULL); - - /* - * find the correct route for outer IPv4 - * header, compute tunnel MTU. - */ - if (sp->req != NULL && - sp->req->sav != NULL && - sp->req->sav->sah != NULL) { - ro = &sp->req->sav->sah->route_cache.sa_route; - if (ro->ro_rt && ro->ro_rt->rt_ifp) { - mtu = ro->ro_rt->rt_mtu ? ro->ro_rt->rt_mtu : - ro->ro_rt->rt_ifp->if_mtu; - mtu -= ipsechdr; - } - } - KEY_FREESP(&sp); - } - return mtu; + return (mtu - ipsec_hdrsiz(m, IPSEC_DIR_OUTBOUND, NULL)); } /* Modified: stable/10/sys/netinet6/icmp6.c ============================================================================== --- stable/10/sys/netinet6/icmp6.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netinet6/icmp6.c Tue Jun 2 03:14:42 2015 (r283901) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_ipsec.h" #include #include @@ -107,11 +106,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef IPSEC -#include -#include -#endif - extern struct domain inet6domain; VNET_PCPUSTAT_DEFINE(struct icmp6stat, icmp6stat); @@ -2503,9 +2497,6 @@ icmp6_redirect_input(struct mbuf *m, int sdst.sin6_len = sizeof(struct sockaddr_in6); bcopy(&reddst6, &sdst.sin6_addr, sizeof(struct in6_addr)); pfctlinput(PRC_REDIRECT_HOST, (struct sockaddr *)&sdst); -#ifdef IPSEC - key_sa_routechange((struct sockaddr *)&sdst); -#endif /* IPSEC */ } freeit: Modified: stable/10/sys/netinet6/ip6_ipsec.c ============================================================================== --- stable/10/sys/netinet6/ip6_ipsec.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netinet6/ip6_ipsec.c Tue Jun 2 03:14:42 2015 (r283901) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/10/sys/netipsec/ipsec.c ============================================================================== --- stable/10/sys/netipsec/ipsec.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec.c Tue Jun 2 03:14:42 2015 (r283901) @@ -55,7 +55,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/ipsec.h ============================================================================== --- stable/10/sys/netipsec/ipsec.h Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec.h Tue Jun 2 03:14:42 2015 (r283901) @@ -47,6 +47,10 @@ #ifdef _KERNEL +#include +#include +#include + #define IPSEC_ASSERT(_c,_m) KASSERT(_c, _m) #define IPSEC_IS_PRIVILEGED_SO(_so) \ Modified: stable/10/sys/netipsec/ipsec_input.c ============================================================================== --- stable/10/sys/netipsec/ipsec_input.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec_input.c Tue Jun 2 03:14:42 2015 (r283901) @@ -57,7 +57,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/ipsec_mbuf.c ============================================================================== --- stable/10/sys/netipsec/ipsec_mbuf.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec_mbuf.c Tue Jun 2 03:14:42 2015 (r283901) @@ -37,11 +37,8 @@ #include #include -#include #include - #include - #include /* Modified: stable/10/sys/netipsec/ipsec_output.c ============================================================================== --- stable/10/sys/netipsec/ipsec_output.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec_output.c Tue Jun 2 03:14:42 2015 (r283901) @@ -45,7 +45,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/key.c Tue Jun 2 03:14:42 2015 (r283901) @@ -58,7 +58,6 @@ #include #include -#include #include #include @@ -2766,10 +2765,6 @@ key_delsah(sah) /* remove from tree of SA index */ if (__LIST_CHAINED(sah)) LIST_REMOVE(sah, chain); - if (sah->route_cache.sa_route.ro_rt) { - RTFREE(sah->route_cache.sa_route.ro_rt); - sah->route_cache.sa_route.ro_rt = (struct rtentry *)NULL; - } free(sah, M_IPSEC_SAH); } } @@ -7893,26 +7888,6 @@ key_sa_recordxfer(sav, m) return; } -/* dumb version */ -void -key_sa_routechange(dst) - struct sockaddr *dst; -{ - struct secashead *sah; - struct route *ro; - - SAHTREE_LOCK(); - LIST_FOREACH(sah, &V_sahtree, chain) { - ro = &sah->route_cache.sa_route; - if (ro->ro_rt && dst->sa_len == ro->ro_dst.sa_len - && bcmp(dst, &ro->ro_dst, dst->sa_len) == 0) { - RTFREE(ro->ro_rt); - ro->ro_rt = (struct rtentry *)NULL; - } - } - SAHTREE_UNLOCK(); -} - static void key_sa_chgstate(struct secasvar *sav, u_int8_t state) { Modified: stable/10/sys/netipsec/key.h ============================================================================== --- stable/10/sys/netipsec/key.h Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/key.h Tue Jun 2 03:14:42 2015 (r283901) @@ -107,7 +107,6 @@ extern void key_init __P((void)); extern void key_destroy(void); #endif extern void key_sa_recordxfer __P((struct secasvar *, struct mbuf *)); -extern void key_sa_routechange __P((struct sockaddr *)); extern void key_sa_stir_iv __P((struct secasvar *)); #ifdef IPSEC_NAT_T u_int16_t key_portfromsaddr(struct sockaddr *); Modified: stable/10/sys/netipsec/key_debug.c ============================================================================== --- stable/10/sys/netipsec/key_debug.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/key_debug.c Tue Jun 2 03:14:42 2015 (r283901) @@ -45,7 +45,6 @@ #endif #include -#include #include #include Modified: stable/10/sys/netipsec/keydb.h ============================================================================== --- stable/10/sys/netipsec/keydb.h Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/keydb.h Tue Jun 2 03:14:42 2015 (r283901) @@ -85,12 +85,6 @@ struct seclifetime { u_int64_t usetime; }; -union sa_route_union { - struct route sa_route; - struct route sin_route; /* Duplicate for consistency. */ - struct route_in6 sin6_route; -}; - /* Security Association Data Base */ struct secashead { LIST_ENTRY(secashead) chain; @@ -105,8 +99,6 @@ struct secashead { LIST_HEAD(_satree, secasvar) savtree[SADB_SASTATE_MAX+1]; /* SA chain */ /* The first of this list is newer SA */ - - union sa_route_union route_cache; }; struct xformsw; Modified: stable/10/sys/netipsec/keysock.c ============================================================================== --- stable/10/sys/netipsec/keysock.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/keysock.c Tue Jun 2 03:14:42 2015 (r283901) @@ -53,7 +53,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/xform_ah.c ============================================================================== --- stable/10/sys/netipsec/xform_ah.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_ah.c Tue Jun 2 03:14:42 2015 (r283901) @@ -56,7 +56,6 @@ #include #include -#include #include #include #include Modified: stable/10/sys/netipsec/xform_esp.c ============================================================================== --- stable/10/sys/netipsec/xform_esp.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_esp.c Tue Jun 2 03:14:42 2015 (r283901) @@ -56,7 +56,6 @@ #include #include -#include #include #include #include Modified: stable/10/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/10/sys/netipsec/xform_ipcomp.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_ipcomp.c Tue Jun 2 03:14:42 2015 (r283901) @@ -48,7 +48,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/xform_ipip.c ============================================================================== --- stable/10/sys/netipsec/xform_ipip.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_ipip.c Tue Jun 2 03:14:42 2015 (r283901) @@ -53,7 +53,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/xform_tcp.c ============================================================================== --- stable/10/sys/netipsec/xform_tcp.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_tcp.c Tue Jun 2 03:14:42 2015 (r283901) @@ -47,7 +47,6 @@ #include #include -#include #include #include From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 03:43:38 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63D08CE8; Tue, 2 Jun 2015 03:43:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50E141955; Tue, 2 Jun 2015 03:43:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t523hc6r021305; Tue, 2 Jun 2015 03:43:38 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t523hbEn021298; Tue, 2 Jun 2015 03:43:37 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020343.t523hbEn021298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 03:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283902 - stable/10/sys/netipsec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 03:43:38 -0000 Author: ae Date: Tue Jun 2 03:43:36 2015 New Revision: 283902 URL: https://svnweb.freebsd.org/changeset/base/283902 Log: MFC r275390: Remove unused declartations. MFC r275437: ANSIfy function declarations. MFC r275438: Remove __P() macro. Sponsored by: Yandex LLC Modified: stable/10/sys/netipsec/ipsec.c stable/10/sys/netipsec/ipsec.h stable/10/sys/netipsec/ipsec6.h stable/10/sys/netipsec/key.c stable/10/sys/netipsec/key.h stable/10/sys/netipsec/key_debug.c stable/10/sys/netipsec/key_debug.h stable/10/sys/netipsec/keydb.h stable/10/sys/netipsec/keysock.c stable/10/sys/netipsec/keysock.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/ipsec.c ============================================================================== --- stable/10/sys/netipsec/ipsec.c Tue Jun 2 03:14:42 2015 (r283901) +++ stable/10/sys/netipsec/ipsec.c Tue Jun 2 03:43:36 2015 (r283902) @@ -236,17 +236,17 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ipsec6, struct ipsecstat, ipsec6stat, "IPsec IPv6 statistics."); #endif /* INET6 */ -static int ipsec_setspidx_inpcb __P((struct mbuf *, struct inpcb *)); -static int ipsec_setspidx __P((struct mbuf *, struct secpolicyindex *, int)); -static void ipsec4_get_ulp __P((struct mbuf *m, struct secpolicyindex *, int)); -static int ipsec4_setspidx_ipaddr __P((struct mbuf *, struct secpolicyindex *)); +static int ipsec_setspidx_inpcb(struct mbuf *, struct inpcb *); +static int ipsec_setspidx(struct mbuf *, struct secpolicyindex *, int); +static void ipsec4_get_ulp(struct mbuf *m, struct secpolicyindex *, int); +static int ipsec4_setspidx_ipaddr(struct mbuf *, struct secpolicyindex *); #ifdef INET6 -static void ipsec6_get_ulp __P((struct mbuf *m, struct secpolicyindex *, int)); -static int ipsec6_setspidx_ipaddr __P((struct mbuf *, struct secpolicyindex *)); +static void ipsec6_get_ulp(struct mbuf *m, struct secpolicyindex *, int); +static int ipsec6_setspidx_ipaddr(struct mbuf *, struct secpolicyindex *); #endif -static void ipsec_delpcbpolicy __P((struct inpcbpolicy *)); -static struct secpolicy *ipsec_deepcopy_policy __P((struct secpolicy *src)); -static void vshiftl __P((unsigned char *, int, int)); +static void ipsec_delpcbpolicy(struct inpcbpolicy *); +static struct secpolicy *ipsec_deepcopy_policy(struct secpolicy *src); +static void vshiftl(unsigned char *, int, int); MALLOC_DEFINE(M_IPSEC_INPCB, "inpcbpolicy", "inpcb-resident ipsec policy"); Modified: stable/10/sys/netipsec/ipsec.h ============================================================================== --- stable/10/sys/netipsec/ipsec.h Tue Jun 2 03:14:42 2015 (r283901) +++ stable/10/sys/netipsec/ipsec.h Tue Jun 2 03:43:36 2015 (r283902) @@ -326,40 +326,39 @@ extern struct ipsecrequest *ipsec_newisr extern void ipsec_delisr(struct ipsecrequest *); struct tdb_ident; -extern struct secpolicy *ipsec_getpolicy __P((struct tdb_ident*, u_int)); +extern struct secpolicy *ipsec_getpolicy(struct tdb_ident*, u_int); struct inpcb; -extern struct secpolicy *ipsec4_checkpolicy __P((struct mbuf *, u_int, u_int, - int *, struct inpcb *)); +extern struct secpolicy *ipsec4_checkpolicy(struct mbuf *, u_int, u_int, + int *, struct inpcb *); extern struct secpolicy * ipsec_getpolicybyaddr(struct mbuf *, u_int, int, int *); struct inpcb; -extern int ipsec_init_policy __P((struct socket *so, struct inpcbpolicy **)); -extern int ipsec_copy_policy - __P((struct inpcbpolicy *, struct inpcbpolicy *)); -extern u_int ipsec_get_reqlevel __P((struct ipsecrequest *)); -extern int ipsec_in_reject __P((struct secpolicy *, struct mbuf *)); - -extern int ipsec_set_policy __P((struct inpcb *inp, int optname, - caddr_t request, size_t len, struct ucred *cred)); -extern int ipsec_get_policy __P((struct inpcb *inpcb, caddr_t request, - size_t len, struct mbuf **mp)); -extern int ipsec_delete_pcbpolicy __P((struct inpcb *)); -extern int ipsec4_in_reject __P((struct mbuf *, struct inpcb *)); +extern int ipsec_init_policy(struct socket *so, struct inpcbpolicy **); +extern int ipsec_copy_policy(struct inpcbpolicy *, struct inpcbpolicy *); +extern u_int ipsec_get_reqlevel(struct ipsecrequest *); +extern int ipsec_in_reject(struct secpolicy *, struct mbuf *); + +extern int ipsec_set_policy(struct inpcb *inp, int optname, + caddr_t request, size_t len, struct ucred *cred); +extern int ipsec_get_policy(struct inpcb *inpcb, caddr_t request, + size_t len, struct mbuf **mp); +extern int ipsec_delete_pcbpolicy(struct inpcb *); +extern int ipsec4_in_reject(struct mbuf *, struct inpcb *); struct secas; struct tcpcb; -extern int ipsec_chkreplay __P((u_int32_t, struct secasvar *)); -extern int ipsec_updatereplay __P((u_int32_t, struct secasvar *)); +extern int ipsec_chkreplay(u_int32_t, struct secasvar *); +extern int ipsec_updatereplay(u_int32_t, struct secasvar *); -extern size_t ipsec_hdrsiz __P((struct mbuf *, u_int, struct inpcb *)); -extern size_t ipsec_hdrsiz_tcp __P((struct tcpcb *)); +extern size_t ipsec_hdrsiz(struct mbuf *, u_int, struct inpcb *); +extern size_t ipsec_hdrsiz_tcp(struct tcpcb *); union sockaddr_union; extern char * ipsec_address(union sockaddr_union* sa); -extern const char *ipsec_logsastr __P((struct secasvar *)); +extern const char *ipsec_logsastr(struct secasvar *); -extern void ipsec_dumpmbuf __P((struct mbuf *)); +extern void ipsec_dumpmbuf(struct mbuf *); struct m_tag; extern void ah4_input(struct mbuf *m, int off); @@ -370,11 +369,11 @@ extern void ipcomp4_input(struct mbuf *m extern int ipsec4_common_input(struct mbuf *m, ...); extern int ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff, struct m_tag *mt); -extern int ipsec4_process_packet __P((struct mbuf *, struct ipsecrequest *, - int, int)); -extern int ipsec_process_done __P((struct mbuf *, struct ipsecrequest *)); +extern int ipsec4_process_packet(struct mbuf *, struct ipsecrequest *, + int, int); +extern int ipsec_process_done(struct mbuf *, struct ipsecrequest *); -extern struct mbuf *ipsec_copypkt __P((struct mbuf *)); +extern struct mbuf *ipsec_copypkt(struct mbuf *); extern void m_checkalignment(const char* where, struct mbuf *m0, int off, int len); @@ -393,11 +392,10 @@ extern void ipsec_bpf(struct mbuf *, str #endif /* _KERNEL */ #ifndef _KERNEL -extern caddr_t ipsec_set_policy __P((char *, int)); -extern int ipsec_get_policylen __P((caddr_t)); -extern char *ipsec_dump_policy __P((caddr_t, char *)); - -extern const char *ipsec_strerror __P((void)); +extern caddr_t ipsec_set_policy(char *, int); +extern int ipsec_get_policylen(caddr_t); +extern char *ipsec_dump_policy(caddr_t, char *); +extern const char *ipsec_strerror(void); #endif /* ! KERNEL */ Modified: stable/10/sys/netipsec/ipsec6.h ============================================================================== --- stable/10/sys/netipsec/ipsec6.h Tue Jun 2 03:14:42 2015 (r283901) +++ stable/10/sys/netipsec/ipsec6.h Tue Jun 2 03:43:36 2015 (r283902) @@ -59,23 +59,13 @@ VNET_DECLARE(int, ip6_ipsec_ecn); #define V_ip6_ipsec_ecn VNET(ip6_ipsec_ecn) struct inpcb; - -extern int ipsec6_in_reject __P((struct mbuf *, struct inpcb *)); - -struct ip6_hdr; -extern const char *ipsec6_logpacketstr __P((struct ip6_hdr *, u_int32_t)); +extern int ipsec6_in_reject(struct mbuf *, struct inpcb *); struct m_tag; extern int ipsec6_common_input(struct mbuf **mp, int *offp, int proto); extern int ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff, struct m_tag *mt); extern void esp6_ctlinput(int, struct sockaddr *, void *); - -struct ipsec_output_state; -extern int ipsec6_output_trans __P((struct ipsec_output_state *, u_char *, - struct mbuf *, struct secpolicy *, int, int *)); -extern int ipsec6_output_tunnel __P((struct ipsec_output_state *, - struct secpolicy *, int)); extern int ipsec6_process_packet(struct mbuf *, struct ipsecrequest *); #endif /*_KERNEL*/ Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Tue Jun 2 03:14:42 2015 (r283901) +++ stable/10/sys/netipsec/key.c Tue Jun 2 03:43:36 2015 (r283902) @@ -408,54 +408,54 @@ struct sadb_msghdr { int extlen[SADB_EXT_MAX + 1]; }; -static struct secasvar *key_allocsa_policy __P((const struct secasindex *)); -static void key_freesp_so __P((struct secpolicy **)); -static struct secasvar *key_do_allocsa_policy __P((struct secashead *, u_int)); -static void key_delsp __P((struct secpolicy *)); -static struct secpolicy *key_getsp __P((struct secpolicyindex *)); +static struct secasvar *key_allocsa_policy(const struct secasindex *); +static void key_freesp_so(struct secpolicy **); +static struct secasvar *key_do_allocsa_policy(struct secashead *, u_int); +static void key_delsp(struct secpolicy *); +static struct secpolicy *key_getsp(struct secpolicyindex *); static void _key_delsp(struct secpolicy *sp); -static struct secpolicy *key_getspbyid __P((u_int32_t)); -static u_int32_t key_newreqid __P((void)); -static struct mbuf *key_gather_mbuf __P((struct mbuf *, - const struct sadb_msghdr *, int, int, ...)); -static int key_spdadd __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static u_int32_t key_getnewspid __P((void)); -static int key_spddelete __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_spddelete2 __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_spdget __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_spdflush __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_spddump __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static struct mbuf *key_setdumpsp __P((struct secpolicy *, - u_int8_t, u_int32_t, u_int32_t)); -static u_int key_getspreqmsglen __P((struct secpolicy *)); -static int key_spdexpire __P((struct secpolicy *)); -static struct secashead *key_newsah __P((struct secasindex *)); -static void key_delsah __P((struct secashead *)); -static struct secasvar *key_newsav __P((struct mbuf *, +static struct secpolicy *key_getspbyid(u_int32_t); +static u_int32_t key_newreqid(void); +static struct mbuf *key_gather_mbuf(struct mbuf *, + const struct sadb_msghdr *, int, int, ...); +static int key_spdadd(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static u_int32_t key_getnewspid(void); +static int key_spddelete(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_spddelete2(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_spdget(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_spdflush(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_spddump(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static struct mbuf *key_setdumpsp(struct secpolicy *, + u_int8_t, u_int32_t, u_int32_t); +static u_int key_getspreqmsglen(struct secpolicy *); +static int key_spdexpire(struct secpolicy *); +static struct secashead *key_newsah(struct secasindex *); +static void key_delsah(struct secashead *); +static struct secasvar *key_newsav(struct mbuf *, const struct sadb_msghdr *, struct secashead *, int *, - const char*, int)); + const char*, int); #define KEY_NEWSAV(m, sadb, sah, e) \ key_newsav(m, sadb, sah, e, __FILE__, __LINE__) -static void key_delsav __P((struct secasvar *)); -static struct secashead *key_getsah __P((struct secasindex *)); -static struct secasvar *key_checkspidup __P((struct secasindex *, u_int32_t)); -static struct secasvar *key_getsavbyspi __P((struct secashead *, u_int32_t)); -static int key_setsaval __P((struct secasvar *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_mature __P((struct secasvar *)); -static struct mbuf *key_setdumpsa __P((struct secasvar *, u_int8_t, - u_int8_t, u_int32_t, u_int32_t)); -static struct mbuf *key_setsadbmsg __P((u_int8_t, u_int16_t, u_int8_t, - u_int32_t, pid_t, u_int16_t)); -static struct mbuf *key_setsadbsa __P((struct secasvar *)); -static struct mbuf *key_setsadbaddr __P((u_int16_t, - const struct sockaddr *, u_int8_t, u_int16_t)); +static void key_delsav(struct secasvar *); +static struct secashead *key_getsah(struct secasindex *); +static struct secasvar *key_checkspidup(struct secasindex *, u_int32_t); +static struct secasvar *key_getsavbyspi(struct secashead *, u_int32_t); +static int key_setsaval(struct secasvar *, struct mbuf *, + const struct sadb_msghdr *); +static int key_mature(struct secasvar *); +static struct mbuf *key_setdumpsa(struct secasvar *, u_int8_t, + u_int8_t, u_int32_t, u_int32_t); +static struct mbuf *key_setsadbmsg(u_int8_t, u_int16_t, u_int8_t, + u_int32_t, pid_t, u_int16_t); +static struct mbuf *key_setsadbsa(struct secasvar *); +static struct mbuf *key_setsadbaddr(u_int16_t, + const struct sockaddr *, u_int8_t, u_int16_t); #ifdef IPSEC_NAT_T static struct mbuf *key_setsadbxport(u_int16_t, u_int16_t); static struct mbuf *key_setsadbxtype(u_int16_t); @@ -463,15 +463,15 @@ static struct mbuf *key_setsadbxtype(u_i static void key_porttosaddr(struct sockaddr *, u_int16_t); #define KEY_PORTTOSADDR(saddr, port) \ key_porttosaddr((struct sockaddr *)(saddr), (port)) -static struct mbuf *key_setsadbxsa2 __P((u_int8_t, u_int32_t, u_int32_t)); -static struct mbuf *key_setsadbxpolicy __P((u_int16_t, u_int8_t, - u_int32_t)); +static struct mbuf *key_setsadbxsa2(u_int8_t, u_int32_t, u_int32_t); +static struct mbuf *key_setsadbxpolicy(u_int16_t, u_int8_t, + u_int32_t); static struct seckey *key_dup_keymsg(const struct sadb_key *, u_int, struct malloc_type *); static struct seclifetime *key_dup_lifemsg(const struct sadb_lifetime *src, struct malloc_type *type); #ifdef INET6 -static int key_ismyaddr6 __P((struct sockaddr_in6 *)); +static int key_ismyaddr6(struct sockaddr_in6 *); #endif /* flags for key_cmpsaidx() */ @@ -479,73 +479,75 @@ static int key_ismyaddr6 __P((struct soc #define CMP_MODE_REQID 2 /* additionally HEAD, reqid, mode. */ #define CMP_REQID 3 /* additionally HEAD, reaid. */ #define CMP_EXACTLY 4 /* all elements. */ -static int key_cmpsaidx - __P((const struct secasindex *, const struct secasindex *, int)); - -static int key_cmpspidx_exactly - __P((struct secpolicyindex *, struct secpolicyindex *)); -static int key_cmpspidx_withmask - __P((struct secpolicyindex *, struct secpolicyindex *)); -static int key_sockaddrcmp __P((const struct sockaddr *, const struct sockaddr *, int)); -static int key_bbcmp __P((const void *, const void *, u_int)); -static u_int16_t key_satype2proto __P((u_int8_t)); -static u_int8_t key_proto2satype __P((u_int16_t)); - -static int key_getspi __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static u_int32_t key_do_getnewspi __P((struct sadb_spirange *, - struct secasindex *)); -static int key_update __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); +static int key_cmpsaidx(const struct secasindex *, + const struct secasindex *, int); +static int key_cmpspidx_exactly(struct secpolicyindex *, + struct secpolicyindex *); +static int key_cmpspidx_withmask(struct secpolicyindex *, + struct secpolicyindex *); +static int key_sockaddrcmp(const struct sockaddr *, + const struct sockaddr *, int); +static int key_bbcmp(const void *, const void *, u_int); +static u_int16_t key_satype2proto(u_int8_t); +static u_int8_t key_proto2satype(u_int16_t); + +static int key_getspi(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static u_int32_t key_do_getnewspi(struct sadb_spirange *, + struct secasindex *); +static int key_update(struct socket *, struct mbuf *, + const struct sadb_msghdr *); #ifdef IPSEC_DOSEQCHECK -static struct secasvar *key_getsavbyseq __P((struct secashead *, u_int32_t)); +static struct secasvar *key_getsavbyseq(struct secashead *, u_int32_t); #endif -static int key_add __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_setident __P((struct secashead *, struct mbuf *, - const struct sadb_msghdr *)); -static struct mbuf *key_getmsgbuf_x1 __P((struct mbuf *, - const struct sadb_msghdr *)); -static int key_delete __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_get __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); - -static void key_getcomb_setlifetime __P((struct sadb_comb *)); -static struct mbuf *key_getcomb_esp __P((void)); -static struct mbuf *key_getcomb_ah __P((void)); -static struct mbuf *key_getcomb_ipcomp __P((void)); -static struct mbuf *key_getprop __P((const struct secasindex *)); - -static int key_acquire __P((const struct secasindex *, struct secpolicy *)); -static struct secacq *key_newacq __P((const struct secasindex *)); -static struct secacq *key_getacq __P((const struct secasindex *)); -static struct secacq *key_getacqbyseq __P((u_int32_t)); -static struct secspacq *key_newspacq __P((struct secpolicyindex *)); -static struct secspacq *key_getspacq __P((struct secpolicyindex *)); -static int key_acquire2 __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_register __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_expire __P((struct secasvar *)); -static int key_flush __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_dump __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_promisc __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_senderror __P((struct socket *, struct mbuf *, int)); -static int key_validate_ext __P((const struct sadb_ext *, int)); -static int key_align __P((struct mbuf *, struct sadb_msghdr *)); +static int key_add(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_setident(struct secashead *, struct mbuf *, + const struct sadb_msghdr *); +static struct mbuf *key_getmsgbuf_x1(struct mbuf *, + const struct sadb_msghdr *); +static int key_delete(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_delete_all(struct socket *, struct mbuf *, + const struct sadb_msghdr *, u_int16_t); +static int key_get(struct socket *, struct mbuf *, + const struct sadb_msghdr *); + +static void key_getcomb_setlifetime(struct sadb_comb *); +static struct mbuf *key_getcomb_esp(void); +static struct mbuf *key_getcomb_ah(void); +static struct mbuf *key_getcomb_ipcomp(void); +static struct mbuf *key_getprop(const struct secasindex *); + +static int key_acquire(const struct secasindex *, struct secpolicy *); +static struct secacq *key_newacq(const struct secasindex *); +static struct secacq *key_getacq(const struct secasindex *); +static struct secacq *key_getacqbyseq(u_int32_t); +static struct secspacq *key_newspacq(struct secpolicyindex *); +static struct secspacq *key_getspacq(struct secpolicyindex *); +static int key_acquire2(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_register(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_expire(struct secasvar *); +static int key_flush(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_dump(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_promisc(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_senderror(struct socket *, struct mbuf *, int); +static int key_validate_ext(const struct sadb_ext *, int); +static int key_align(struct mbuf *, struct sadb_msghdr *); static struct mbuf *key_setlifetime(struct seclifetime *src, u_int16_t exttype); static struct mbuf *key_setkey(struct seckey *src, u_int16_t exttype); #if 0 -static const char *key_getfqdn __P((void)); -static const char *key_getuserfqdn __P((void)); +static const char *key_getfqdn(void); +static const char *key_getuserfqdn(void); #endif -static void key_sa_chgstate __P((struct secasvar *, u_int8_t)); +static void key_sa_chgstate(struct secasvar *, u_int8_t); static __inline void sa_initref(struct secasvar *sav) @@ -610,7 +612,8 @@ key_havesp(u_int dir) * others: found and return the pointer. */ struct secpolicy * -key_allocsp(struct secpolicyindex *spidx, u_int dir, const char* where, int tag) +key_allocsp(struct secpolicyindex *spidx, u_int dir, const char* where, + int tag) { struct secpolicy *sp; @@ -662,11 +665,8 @@ found: * others: found and return the pointer. */ struct secpolicy * -key_allocsp2(u_int32_t spi, - union sockaddr_union *dst, - u_int8_t proto, - u_int dir, - const char* where, int tag) +key_allocsp2(u_int32_t spi, union sockaddr_union *dst, u_int8_t proto, + u_int dir, const char* where, int tag) { struct secpolicy *sp; @@ -1074,11 +1074,8 @@ key_do_allocsa_policy(struct secashead * * keep source address in IPsec SA. We see a tricky situation here. */ struct secasvar * -key_allocsa( - union sockaddr_union *dst, - u_int proto, - u_int32_t spi, - const char* where, int tag) +key_allocsa(union sockaddr_union *dst, u_int proto, u_int32_t spi, + const char* where, int tag) { struct secashead *sah; struct secasvar *sav; @@ -1399,10 +1396,7 @@ _key_delsp(struct secpolicy *sp) * so must be set properly later. */ struct secpolicy * -key_msg2sp(xpl0, len, error) - struct sadb_x_policy *xpl0; - size_t len; - int *error; +key_msg2sp(struct sadb_x_policy *xpl0, size_t len, int *error) { struct secpolicy *newsp; @@ -1634,8 +1628,7 @@ key_newreqid() * copy secpolicy struct to sadb_x_policy structure indicated. */ struct mbuf * -key_sp2msg(sp) - struct secpolicy *sp; +key_sp2msg(struct secpolicy *sp) { struct sadb_x_policy *xpl; int tlen; @@ -1693,17 +1686,8 @@ key_sp2msg(sp) /* m will not be freed nor modified */ static struct mbuf * -#ifdef __STDC__ key_gather_mbuf(struct mbuf *m, const struct sadb_msghdr *mhp, - int ndeep, int nitem, ...) -#else -key_gather_mbuf(m, mhp, ndeep, nitem, va_alist) - struct mbuf *m; - const struct sadb_msghdr *mhp; - int ndeep; - int nitem; - va_dcl -#endif + int ndeep, int nitem, ...) { va_list ap; int idx; @@ -1792,10 +1776,7 @@ fail: * m will always be freed. */ static int -key_spdadd(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spdadd(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_address *src0, *dst0; struct sadb_x_policy *xpl0, *xpl; @@ -2057,10 +2038,8 @@ key_getnewspid() * m will always be freed. */ static int -key_spddelete(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spddelete(struct socket *so, struct mbuf *m, + const struct sadb_msghdr *mhp) { struct sadb_address *src0, *dst0; struct sadb_x_policy *xpl0; @@ -2167,10 +2146,8 @@ key_spddelete(so, m, mhp) * m will always be freed. */ static int -key_spddelete2(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spddelete2(struct socket *so, struct mbuf *m, + const struct sadb_msghdr *mhp) { u_int32_t id; struct secpolicy *sp; @@ -2261,10 +2238,7 @@ key_spddelete2(so, m, mhp) * m will always be freed. */ static int -key_spdget(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spdget(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { u_int32_t id; struct secpolicy *sp; @@ -2315,8 +2289,7 @@ key_spdget(so, m, mhp) * others: error number */ int -key_spdacquire(sp) - struct secpolicy *sp; +key_spdacquire(struct secpolicy *sp) { struct mbuf *result = NULL, *m; struct secspacq *newspacq; @@ -2376,10 +2349,7 @@ key_spdacquire(sp) * m will always be freed. */ static int -key_spdflush(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spdflush(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_msg *newmsg; struct secpolicy *sp; @@ -2428,10 +2398,7 @@ key_spdflush(so, m, mhp) * m will always be freed. */ static int -key_spddump(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spddump(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct secpolicy *sp; int cnt; @@ -2474,7 +2441,8 @@ key_spddump(so, m, mhp) } static struct mbuf * -key_setdumpsp(struct secpolicy *sp, u_int8_t type, u_int32_t seq, u_int32_t pid) +key_setdumpsp(struct secpolicy *sp, u_int8_t type, u_int32_t seq, + u_int32_t pid) { struct mbuf *result = NULL, *m; struct seclifetime lt; @@ -2550,8 +2518,7 @@ fail: * get PFKEY message length for security policy and request. */ static u_int -key_getspreqmsglen(sp) - struct secpolicy *sp; +key_getspreqmsglen(struct secpolicy *sp) { u_int tlen; @@ -2588,8 +2555,7 @@ key_getspreqmsglen(sp) * others : error number */ static int -key_spdexpire(sp) - struct secpolicy *sp; +key_spdexpire(struct secpolicy *sp) { struct mbuf *result = NULL, *m; int len; @@ -2702,8 +2668,7 @@ key_spdexpire(sp) * others : pointer to new SA head. */ static struct secashead * -key_newsah(saidx) - struct secasindex *saidx; +key_newsah(struct secasindex *saidx) { struct secashead *newsah; @@ -2730,8 +2695,7 @@ key_newsah(saidx) * delete SA index and all SA registerd. */ static void -key_delsah(sah) - struct secashead *sah; +key_delsah(struct secashead *sah) { struct secasvar *sav, *nextsav; u_int stateidx; @@ -2782,13 +2746,8 @@ key_delsah(sah) * does not modify mbuf. does not free mbuf on error. */ static struct secasvar * -key_newsav(m, mhp, sah, errp, where, tag) - struct mbuf *m; - const struct sadb_msghdr *mhp; - struct secashead *sah; - int *errp; - const char* where; - int tag; +key_newsav(struct mbuf *m, const struct sadb_msghdr *mhp, + struct secashead *sah, int *errp, const char *where, int tag) { struct secasvar *newsav; const struct sadb_sa *xsa; @@ -2933,8 +2892,7 @@ key_cleansav(struct secasvar *sav) * free() SA variable entry. */ static void -key_delsav(sav) - struct secasvar *sav; +key_delsav(struct secasvar *sav) { IPSEC_ASSERT(sav != NULL, ("null sav")); IPSEC_ASSERT(sav->refcnt == 0, ("reference count %u > 0", sav->refcnt)); @@ -2954,8 +2912,7 @@ key_delsav(sav) * others : found, pointer to a SA. */ static struct secashead * -key_getsah(saidx) - struct secasindex *saidx; +key_getsah(struct secasindex *saidx) { struct secashead *sah; @@ -2979,9 +2936,7 @@ key_getsah(saidx) * others : found, pointer to a SA. */ static struct secasvar * -key_checkspidup(saidx, spi) - struct secasindex *saidx; - u_int32_t spi; +key_checkspidup(struct secasindex *saidx, u_int32_t spi) { struct secashead *sah; struct secasvar *sav; @@ -3015,9 +2970,7 @@ key_checkspidup(saidx, spi) * others : found, pointer to a SA. */ static struct secasvar * -key_getsavbyspi(sah, spi) - struct secashead *sah; - u_int32_t spi; +key_getsavbyspi(struct secashead *sah, u_int32_t spi) { struct secasvar *sav; u_int stateidx, state; @@ -3057,10 +3010,8 @@ key_getsavbyspi(sah, spi) * does not modify mbuf. does not free mbuf on error. */ static int -key_setsaval(sav, m, mhp) - struct secasvar *sav; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_setsaval(struct secasvar *sav, struct mbuf *m, + const struct sadb_msghdr *mhp) { int error = 0; @@ -3598,8 +3549,7 @@ key_setsadbmsg(u_int8_t type, u_int16_t * copy secasvar data into sadb_address. */ static struct mbuf * -key_setsadbsa(sav) - struct secasvar *sav; +key_setsadbsa(struct secasvar *sav) { struct mbuf *m; struct sadb_sa *p; @@ -3629,7 +3579,8 @@ key_setsadbsa(sav) * set data into sadb_address. */ static struct mbuf * -key_setsadbaddr(u_int16_t exttype, const struct sockaddr *saddr, u_int8_t prefixlen, u_int16_t ul_proto) +key_setsadbaddr(u_int16_t exttype, const struct sockaddr *saddr, + u_int8_t prefixlen, u_int16_t ul_proto) { struct mbuf *m; struct sadb_address *p; @@ -3758,7 +3709,7 @@ key_setsadbxport(u_int16_t port, u_int16 /* * Get port from sockaddr. Port is in network byte order. */ -u_int16_t +u_int16_t key_portfromsaddr(struct sockaddr *sa) { @@ -3841,7 +3792,7 @@ key_setsadbxpolicy(u_int16_t type, u_int */ struct seckey * key_dup_keymsg(const struct sadb_key *src, u_int len, - struct malloc_type *type) + struct malloc_type *type) { struct seckey *dst; dst = (struct seckey *)malloc(sizeof(struct seckey), type, M_NOWAIT); @@ -3873,8 +3824,7 @@ key_dup_keymsg(const struct sadb_key *sr */ static struct seclifetime * -key_dup_lifemsg(const struct sadb_lifetime *src, - struct malloc_type *type) +key_dup_lifemsg(const struct sadb_lifetime *src, struct malloc_type *type) { struct seclifetime *dst = NULL; @@ -3925,8 +3875,7 @@ key_ismyaddr(struct sockaddr *sa) #include static int -key_ismyaddr6(sin6) - struct sockaddr_in6 *sin6; +key_ismyaddr6(struct sockaddr_in6 *sin6) { struct in6_ifaddr *ia; #if 0 @@ -3979,10 +3928,8 @@ key_ismyaddr6(sin6) * 0 : not equal */ static int -key_cmpsaidx( - const struct secasindex *saidx0, - const struct secasindex *saidx1, - int flag) +key_cmpsaidx(const struct secasindex *saidx0, const struct secasindex *saidx1, + int flag) { int chkport = 0; @@ -4061,9 +4008,8 @@ key_cmpsaidx( * 0 : not equal */ static int -key_cmpspidx_exactly( - struct secpolicyindex *spidx0, - struct secpolicyindex *spidx1) +key_cmpspidx_exactly(struct secpolicyindex *spidx0, + struct secpolicyindex *spidx1) { /* sanity */ if (spidx0 == NULL && spidx1 == NULL) @@ -4091,9 +4037,8 @@ key_cmpspidx_exactly( * 0 : not equal */ static int -key_cmpspidx_withmask( - struct secpolicyindex *spidx0, - struct secpolicyindex *spidx1) +key_cmpspidx_withmask(struct secpolicyindex *spidx0, + struct secpolicyindex *spidx1) { /* sanity */ if (spidx0 == NULL && spidx1 == NULL) @@ -4184,10 +4129,8 @@ key_cmpspidx_withmask( /* returns 0 on match */ static int -key_sockaddrcmp( - const struct sockaddr *sa1, - const struct sockaddr *sa2, - int port) +key_sockaddrcmp(const struct sockaddr *sa1, const struct sockaddr *sa2, + int port) { #ifdef satosin #undef satosin @@ -4534,9 +4477,7 @@ key_random() } void -key_randomfill(p, l) - void *p; - size_t l; +key_randomfill(void *p, size_t l) { size_t n; u_long v; @@ -4622,10 +4563,7 @@ key_proto2satype(u_int16_t proto) * other if success, return pointer to the message to send. */ static int -key_getspi(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_getspi(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_address *src0, *dst0; struct secasindex saidx; @@ -4857,9 +4795,7 @@ key_getspi(so, m, mhp) * others: success. */ static u_int32_t -key_do_getnewspi(spirange, saidx) - struct sadb_spirange *spirange; - struct secasindex *saidx; +key_do_getnewspi(struct sadb_spirange *spirange, struct secasindex *saidx) { u_int32_t newspi; u_int32_t min, max; @@ -4937,10 +4873,7 @@ key_do_getnewspi(spirange, saidx) * m will always be freed. */ static int -key_update(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_update(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_sa *sa0; struct sadb_address *src0, *dst0; @@ -5184,9 +5117,7 @@ key_update(so, m, mhp) */ #ifdef IPSEC_DOSEQCHECK static struct secasvar * -key_getsavbyseq(sah, seq) - struct secashead *sah; - u_int32_t seq; +key_getsavbyseq(struct secashead *sah, u_int32_t seq) { struct secasvar *sav; u_int state; @@ -5227,10 +5158,7 @@ key_getsavbyseq(sah, seq) * m will always be freed. */ static int -key_add(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_add(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_sa *sa0; struct sadb_address *src0, *dst0; @@ -5441,10 +5369,8 @@ key_add(so, m, mhp) /* m is retained */ static int -key_setident(sah, m, mhp) - struct secashead *sah; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_setident(struct secashead *sah, struct mbuf *m, + const struct sadb_msghdr *mhp) { const struct sadb_ident *idsrc, *iddst; int idsrclen, iddstlen; @@ -5517,9 +5443,7 @@ key_setident(sah, m, mhp) * it is caller's responsibility to free the result. */ static struct mbuf * -key_getmsgbuf_x1(m, mhp) - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_getmsgbuf_x1(struct mbuf *m, const struct sadb_msghdr *mhp) { struct mbuf *n; @@ -5548,9 +5472,6 @@ key_getmsgbuf_x1(m, mhp) return n; } -static int key_delete_all __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *, u_int16_t)); - /* * SADB_DELETE processing * receive @@ -5563,10 +5484,7 @@ static int key_delete_all __P((struct so * m will always be freed. */ static int -key_delete(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_delete(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_sa *sa0; struct sadb_address *src0, *dst0; @@ -5710,8 +5628,8 @@ key_delete(so, m, mhp) * delete all SAs for src/dst. Called from key_delete(). */ static int -key_delete_all(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp, - u_int16_t proto) +key_delete_all(struct socket *so, struct mbuf *m, + const struct sadb_msghdr *mhp, u_int16_t proto) { struct sadb_address *src0, *dst0; struct secasindex saidx; @@ -5831,10 +5749,7 @@ key_delete_all(struct socket *so, struct * m will always be freed. */ static int -key_get(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_get(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_sa *sa0; struct sadb_address *src0, *dst0; @@ -5957,8 +5872,7 @@ key_get(so, m, mhp) /* XXX make it sysctl-configurable? */ static void -key_getcomb_setlifetime(comb) - struct sadb_comb *comb; +key_getcomb_setlifetime(struct sadb_comb *comb) { comb->sadb_comb_soft_allocations = 1; @@ -6050,11 +5964,8 @@ key_getcomb_esp() } static void -key_getsizes_ah( - const struct auth_hash *ah, - int alg, - u_int16_t* min, - u_int16_t* max) +key_getsizes_ah(const struct auth_hash *ah, int alg, u_int16_t* min, + u_int16_t* max) { *min = *max = ah->keysize; @@ -6184,8 +6095,7 @@ key_getcomb_ipcomp() * XXX sysctl interface to ipsec_{ah,esp}_keymin */ static struct mbuf * -key_getprop(saidx) - const struct secasindex *saidx; +key_getprop(const struct secasindex *saidx) { struct sadb_prop *prop; struct mbuf *m, *n; @@ -6457,8 +6367,7 @@ key_getacq(const struct secasindex *said } static struct secacq * -key_getacqbyseq(seq) - u_int32_t seq; +key_getacqbyseq(u_int32_t seq) { struct secacq *acq; @@ -6473,8 +6382,7 @@ key_getacqbyseq(seq) } static struct secspacq * -key_newspacq(spidx) - struct secpolicyindex *spidx; +key_newspacq(struct secpolicyindex *spidx) { struct secspacq *acq; @@ -6499,8 +6407,7 @@ key_newspacq(spidx) } static struct secspacq * -key_getspacq(spidx) - struct secpolicyindex *spidx; +key_getspacq(struct secpolicyindex *spidx) { struct secspacq *acq; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 03:51:34 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20D5FFC4; Tue, 2 Jun 2015 03:51:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02CFA1B11; Tue, 2 Jun 2015 03:51:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t523pXqw026016; Tue, 2 Jun 2015 03:51:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t523pXmU026015; Tue, 2 Jun 2015 03:51:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020351.t523pXmU026015@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 03:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283903 - stable/10/sys/netipsec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 03:51:34 -0000 Author: ae Date: Tue Jun 2 03:51:33 2015 New Revision: 283903 URL: https://svnweb.freebsd.org/changeset/base/283903 Log: MFC r283101: Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD extension header type. The key_flush_sad() now will send SADB_EXPIRE message when HARD lifetime expires. This is required by RFC 2367 and some keying daemons rely on these messages. HARD lifetime messages have precedence over SOFT lifetime messages, so now they will be checked first. Also now SADB_EXPIRE messages will be send even the SA has not been used, because keying daemons might want to rekey such SA. PR: 200282, 200283 MFC r283102: Change SA's state before sending SADB_EXPIRE message. This state will be reported to keying daemon. Modified: stable/10/sys/netipsec/key.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Tue Jun 2 03:43:36 2015 (r283902) +++ stable/10/sys/netipsec/key.c Tue Jun 2 03:51:33 2015 (r283903) @@ -529,7 +529,7 @@ static int key_acquire2(struct socket *, const struct sadb_msghdr *); static int key_register(struct socket *, struct mbuf *, const struct sadb_msghdr *); -static int key_expire(struct secasvar *); +static int key_expire(struct secasvar *, int); static int key_flush(struct socket *, struct mbuf *, const struct sadb_msghdr *); static int key_dump(struct socket *, struct mbuf *, @@ -4302,41 +4302,29 @@ key_flush_sad(time_t now) "time, why?\n", __func__)); continue; } - - /* check SOFT lifetime */ - if (sav->lft_s->addtime != 0 && - now - sav->created > sav->lft_s->addtime) { - key_sa_chgstate(sav, SADB_SASTATE_DYING); - /* - * Actually, only send expire message if - * SA has been used, as it was done before, - * but should we always send such message, - * and let IKE daemon decide if it should be - * renegotiated or not ? - * XXX expire message will actually NOT be - * sent if SA is only used after soft - * lifetime has been reached, see below - * (DYING state) - */ - if (sav->lft_c->usetime != 0) - key_expire(sav); - } - /* check SOFT lifetime by bytes */ /* - * XXX I don't know the way to delete this SA - * when new SA is installed. Caution when it's - * installed too big lifetime by time. + * RFC 2367: + * HARD lifetimes MUST take precedence over SOFT + * lifetimes, meaning if the HARD and SOFT lifetimes + * are the same, the HARD lifetime will appear on the + * EXPIRE message. */ - else if (sav->lft_s->bytes != 0 && - sav->lft_s->bytes < sav->lft_c->bytes) { - + /* check HARD lifetime */ + if ((sav->lft_h->addtime != 0 && + now - sav->created > sav->lft_h->addtime) || + (sav->lft_h->bytes != 0 && + sav->lft_h->bytes < sav->lft_c->bytes)) { + key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); + KEY_FREESAV(&sav); + } + /* check SOFT lifetime */ + else if ((sav->lft_s->addtime != 0 && + now - sav->created > sav->lft_s->addtime) || + (sav->lft_s->bytes != 0 && + sav->lft_s->bytes < sav->lft_c->bytes)) { key_sa_chgstate(sav, SADB_SASTATE_DYING); - /* - * XXX If we keep to send expire - * message in the status of - * DYING. Do remove below code. - */ - key_expire(sav); + key_expire(sav, 0); } } @@ -4356,6 +4344,7 @@ key_flush_sad(time_t now) if (sav->lft_h->addtime != 0 && now - sav->created > sav->lft_h->addtime) { key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); KEY_FREESAV(&sav); } #if 0 /* XXX Should we keep to send expire message until HARD lifetime ? */ @@ -4371,13 +4360,14 @@ key_flush_sad(time_t now) * If there is no SA then sending * expire message. */ - key_expire(sav); + key_expire(sav, 0); } #endif /* check HARD lifetime by bytes */ else if (sav->lft_h->bytes != 0 && sav->lft_h->bytes < sav->lft_c->bytes) { key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); KEY_FREESAV(&sav); } } @@ -6783,7 +6773,7 @@ key_freereg(struct socket *so) * others : error number */ static int -key_expire(struct secasvar *sav) +key_expire(struct secasvar *sav, int hard) { int satype; struct mbuf *result = NULL, *m; @@ -6841,11 +6831,19 @@ key_expire(struct secasvar *sav) lt->sadb_lifetime_usetime = sav->lft_c->usetime; lt = (struct sadb_lifetime *)(mtod(m, caddr_t) + len / 2); lt->sadb_lifetime_len = PFKEY_UNIT64(sizeof(struct sadb_lifetime)); - lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_SOFT; - lt->sadb_lifetime_allocations = sav->lft_s->allocations; - lt->sadb_lifetime_bytes = sav->lft_s->bytes; - lt->sadb_lifetime_addtime = sav->lft_s->addtime; - lt->sadb_lifetime_usetime = sav->lft_s->usetime; + if (hard) { + lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_HARD; + lt->sadb_lifetime_allocations = sav->lft_h->allocations; + lt->sadb_lifetime_bytes = sav->lft_h->bytes; + lt->sadb_lifetime_addtime = sav->lft_h->addtime; + lt->sadb_lifetime_usetime = sav->lft_h->usetime; + } else { + lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_SOFT; + lt->sadb_lifetime_allocations = sav->lft_s->allocations; + lt->sadb_lifetime_bytes = sav->lft_s->bytes; + lt->sadb_lifetime_addtime = sav->lft_s->addtime; + lt->sadb_lifetime_usetime = sav->lft_s->usetime; + } m_cat(result, m); /* set sadb_address for source */ From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 08:03:29 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C2DF239; Tue, 2 Jun 2015 08:03:29 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78FD715C5; Tue, 2 Jun 2015 08:03:29 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5283TnJ052247; Tue, 2 Jun 2015 08:03:29 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5283TQ0052246; Tue, 2 Jun 2015 08:03:29 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201506020803.t5283TQ0052246@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 2 Jun 2015 08:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283905 - stable/10/usr.sbin/pmcstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 08:03:29 -0000 Author: hiren Date: Tue Jun 2 08:03:28 2015 New Revision: 283905 URL: https://svnweb.freebsd.org/changeset/base/283905 Log: MFC: r282866 Fix pmcstat symbol resolution for userland processes. When examining existing processes pmcstat fails to correctly determine the locations of executable sections of the process due to a miscalculated virtual load address. This does not affect the newly launched processes as the same value passed as a "start address" to the pmcstat_image_link() thus nullifying the effect of it. The issue manifests itself in processes not being reported in the pmcstat(8) output and "dubious frames" being reported. Fix it for now by ignoring all the sections except the executable one. This won't fix the issue for objects with multiple executable sections but helps in majority of real world usecases. The real solution would be to modify the MAP-IN event to include the appropriate load address so pmcstat(8) won't have to manually parse object files to try to determine it. PR: 198147, 198148 Submitted by: stas Modified: stable/10/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat_log.c Tue Jun 2 07:26:26 2015 (r283904) +++ stable/10/usr.sbin/pmcstat/pmcstat_log.c Tue Jun 2 08:03:28 2015 (r283905) @@ -716,7 +716,8 @@ pmcstat_image_get_elf_params(struct pmcs ph.p_offset); break; case PT_LOAD: - if ((ph.p_offset & (-ph.p_align)) == 0) + if ((ph.p_flags & PF_X) != 0 && + (ph.p_offset & (-ph.p_align)) == 0) image->pi_vaddr = ph.p_vaddr & (-ph.p_align); break; } From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 09:42:01 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C637915; Tue, 2 Jun 2015 09:42:01 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED2291EFD; Tue, 2 Jun 2015 09:42:00 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t529g0Em001738; Tue, 2 Jun 2015 09:42:00 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t529g0qD001737; Tue, 2 Jun 2015 09:42:00 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201506020942.t529g0qD001737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Tue, 2 Jun 2015 09:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283908 - stable/10/lib/libiconv_modules/UTF7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 09:42:01 -0000 Author: tijl Date: Tue Jun 2 09:42:00 2015 New Revision: 283908 URL: https://svnweb.freebsd.org/changeset/base/283908 Log: MFC r283406,283418: Fix decoding of UTF-7 when a base64 encoded chunk appears at the end of the input buffer. _citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it could restore this state on an incomplete character such that the next call would restart the decoding. The problem was that "-" (end of base64 mode) at the end of a string was also treated as an incomplete character but was also removed from the state buffer. So the initial state would be restored (with base64 mode) and the next call would no longer see the "-" so it continued in base64 mode. This state saving/restoring isn't needed here. It's already handled elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just remove it. Also initialise *nresult. When only 2 bytes can be read from a 4 byte UTF-16 character in a base64 encoded chunk of a UTF-7 string, treat that as an incomplete character and return an error instead of a shift sequence and no error. Also check that the low 2 bytes have a valid value. PR: 200398 Modified: stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c ============================================================================== --- stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Tue Jun 2 09:05:45 2015 (r283907) +++ stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Tue Jun 2 09:42:00 2015 (r283908) @@ -62,8 +62,7 @@ typedef struct { unsigned int mode: 1, /* whether base64 mode */ bits: 4, /* need to hold 0 - 15 */ - cache: 22, /* 22 = BASE64_BIT + UTF16_BIT */ - surrogate: 1; /* whether surrogate pair or not */ + cache: 22; /* 22 = BASE64_BIT + UTF16_BIT */ int chlen; char ch[4]; /* BASE64_IN, 3 * 6 = 18, most closed to UTF16_BIT */ } _UTF7State; @@ -154,21 +153,17 @@ _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo uint16_t * __restrict u16, char ** __restrict s, size_t n, _UTF7State * __restrict psenc, size_t * __restrict nresult) { - _UTF7State sv; char *s0; int done, i, len; + *nresult = 0; s0 = *s; - sv = *psenc; for (i = 0, done = 0; done == 0; i++) { if (i == psenc->chlen) { if (n-- < 1) { *nresult = (size_t)-2; *s = s0; - sv.chlen = psenc->chlen; - memcpy(sv.ch, psenc->ch, sizeof(sv.ch)); - *psenc = sv; return (0); } psenc->ch[psenc->chlen++] = *s0++; @@ -257,34 +252,31 @@ _citrus_UTF7_mbrtowc_priv(_UTF7EncodingI *nresult = (size_t)_ENCODING_IS_STATE_DEPENDENT; return (0); } - if (psenc->surrogate) { - hi = (psenc->cache >> psenc->bits) & UTF16_MAX; - if (hi < HISRG_MIN || hi > HISRG_MAX) - return (EINVAL); - siz = 0; - } else { - err = _citrus_UTF7_mbtoutf16(ei, &hi, s, n, psenc, &nr); - if (nr == (size_t)-1 || nr == (size_t)-2) { - *nresult = nr; - return (err); - } - if (err != 0) - return (err); - n -= nr; - siz = nr; - if (hi < HISRG_MIN || hi > HISRG_MAX) { - u32 = (uint32_t)hi; - goto done; - } - psenc->surrogate = 1; + err = _citrus_UTF7_mbtoutf16(ei, &hi, s, n, psenc, &nr); + if (nr == (size_t)-1 || nr == (size_t)-2) { + *nresult = nr; + return (err); + } + if (err != 0) + return (err); + n -= nr; + siz = nr; + if (hi < HISRG_MIN || hi > HISRG_MAX) { + u32 = (uint32_t)hi; + goto done; } err = _citrus_UTF7_mbtoutf16(ei, &lo, s, n, psenc, &nr); if (nr == (size_t)-1 || nr == (size_t)-2) { + psenc->chlen = 1; /* make get_state_desc return incomplete */ *nresult = nr; return (err); } if (err != 0) return (err); + if (lo < LOSRG_MIN || lo > LOSRG_MAX) { + *nresult = (size_t)-1; + return (EILSEQ); + } hi -= HISRG_MIN; lo -= LOSRG_MIN; u32 = (hi << 10 | lo) + SRG_BASE; @@ -297,7 +289,6 @@ done: _citrus_UTF7_init_state(ei, psenc); } else { *nresult = siz; - psenc->surrogate = 0; } return (err); } @@ -396,7 +387,7 @@ _citrus_UTF7_put_state_reset(_UTF7Encodi { int bits, pos; - if (psenc->chlen != 0 || psenc->bits > BASE64_BIT || psenc->surrogate) + if (psenc->chlen != 0 || psenc->bits > BASE64_BIT) return (EINVAL); if (psenc->mode) { From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 13:07:24 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3ECB6CEF; Tue, 2 Jun 2015 13:07:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2099210C0; Tue, 2 Jun 2015 13:07:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52D7Ose006294; Tue, 2 Jun 2015 13:07:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52D7Nun006291; Tue, 2 Jun 2015 13:07:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021307.t52D7Nun006291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 13:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283909 - stable/10/usr.bin/gcore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 13:07:24 -0000 Author: jhb Date: Tue Jun 2 13:07:22 2015 New Revision: 283909 URL: https://svnweb.freebsd.org/changeset/base/283909 Log: MFC 269128: Create 32-bit core files for 32-bit processes on 64-bit machines. The 64-bit machine supported right now is amd64, but it's not too hard to add powerpc64. Added: stable/10/usr.bin/gcore/elf32core.c - copied unchanged from r269128, head/usr.bin/gcore/elf32core.c Modified: stable/10/usr.bin/gcore/Makefile stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/gcore/Makefile ============================================================================== --- stable/10/usr.bin/gcore/Makefile Tue Jun 2 09:42:00 2015 (r283908) +++ stable/10/usr.bin/gcore/Makefile Tue Jun 2 13:07:22 2015 (r283909) @@ -6,6 +6,10 @@ SRCS= elfcore.c gcore.c DPADD= ${LIBSBUF} ${LIBUTIL} LDADD= -lsbuf -lutil +.if ${MACHINE_ARCH} == "amd64" +SRCS+= elf32core.c +.endif + WARNS?= 1 .include Copied: stable/10/usr.bin/gcore/elf32core.c (from r269128, head/usr.bin/gcore/elf32core.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/gcore/elf32core.c Tue Jun 2 13:07:22 2015 (r283909, copy of r269128, head/usr.bin/gcore/elf32core.c) @@ -0,0 +1,66 @@ +/* $FreeBSD$ */ +#ifndef __LP64__ +#error "this file must be compiled for LP64." +#endif + +#define __ELF_WORD_SIZE 32 +#define _MACHINE_ELF_WANT_32BIT + +#include + +struct prpsinfo32 { + int pr_version; + u_int pr_psinfosz; + char pr_fname[PRFNAMESZ+1]; + char pr_psargs[PRARGSZ+1]; +}; + +struct prstatus32 { + int pr_version; + u_int pr_statussz; + u_int pr_gregsetsz; + u_int pr_fpregsetsz; + int pr_osreldate; + int pr_cursig; + pid_t pr_pid; + struct reg32 pr_reg; +}; + +#define ELFCORE_COMPAT_32 1 +#include "elfcore.c" + +static void +elf_convert_gregset(elfcore_gregset_t *rd, struct reg *rs) +{ +#ifdef __amd64__ + rd->r_gs = rs->r_gs; + rd->r_fs = rs->r_fs; + rd->r_es = rs->r_es; + rd->r_ds = rs->r_ds; + rd->r_edi = rs->r_rdi; + rd->r_esi = rs->r_rsi; + rd->r_ebp = rs->r_rbp; + rd->r_ebx = rs->r_rbx; + rd->r_edx = rs->r_rdx; + rd->r_ecx = rs->r_rcx; + rd->r_eax = rs->r_rax; + rd->r_eip = rs->r_rip; + rd->r_cs = rs->r_cs; + rd->r_eflags = rs->r_rflags; + rd->r_esp = rs->r_rsp; + rd->r_ss = rs->r_ss; +#else +#error Unsupported architecture +#endif +} + +static void +elf_convert_fpregset(elfcore_fpregset_t *rd, struct fpreg *rs) +{ +#ifdef __amd64__ + /* XXX this is wrong... */ + memcpy(rd, rs, sizeof(*rd)); +#else +#error Unsupported architecture +#endif +} Modified: stable/10/usr.bin/gcore/elfcore.c ============================================================================== --- stable/10/usr.bin/gcore/elfcore.c Tue Jun 2 09:42:00 2015 (r283908) +++ stable/10/usr.bin/gcore/elfcore.c Tue Jun 2 13:07:22 2015 (r283909) @@ -28,6 +28,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -74,6 +75,22 @@ struct sseg_closure { size_t size; /* Total size of all writable segments. */ }; +#ifdef ELFCORE_COMPAT_32 +typedef struct fpreg32 elfcore_fpregset_t; +typedef struct reg32 elfcore_gregset_t; +typedef struct prpsinfo32 elfcore_prpsinfo_t; +typedef struct prstatus32 elfcore_prstatus_t; +static void elf_convert_gregset(elfcore_gregset_t *rd, struct reg *rs); +static void elf_convert_fpregset(elfcore_fpregset_t *rd, struct fpreg *rs); +#else +typedef fpregset_t elfcore_fpregset_t; +typedef gregset_t elfcore_gregset_t; +typedef prpsinfo_t elfcore_prpsinfo_t; +typedef prstatus_t elfcore_prstatus_t; +#define elf_convert_gregset(d,s) *d = *s +#define elf_convert_fpregset(d,s) *d = *s +#endif + typedef void* (*notefunc_t)(void *, size_t *); static void cb_put_phdr(vm_map_entry_t, void *); @@ -112,13 +129,28 @@ elf_ident(int efd, pid_t pid __unused, c { Elf_Ehdr hdr; int cnt; + uint16_t machine; cnt = read(efd, &hdr, sizeof(hdr)); if (cnt != sizeof(hdr)) return (0); - if (IS_ELF(hdr)) - return (1); - return (0); + if (!IS_ELF(hdr)) + return (0); + switch (hdr.e_ident[EI_DATA]) { + case ELFDATA2LSB: + machine = le16toh(hdr.e_machine); + break; + case ELFDATA2MSB: + machine = be16toh(hdr.e_machine); + break; + default: + return (0); + } + if (!ELF_MACHINE_OK(machine)) + return (0); + + /* Looks good. */ + return (1); } static void @@ -198,7 +230,7 @@ elf_coredump(int efd __unused, int fd, p uintmax_t nleft = php->p_filesz; iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (caddr_t)php->p_vaddr; + iorequest.piod_offs = (caddr_t)(uintptr_t)php->p_vaddr; while (nleft > 0) { char buf[8*1024]; size_t nwant; @@ -318,6 +350,7 @@ elf_putnotes(pid_t pid, struct sbuf *sb, #endif } +#ifndef ELFCORE_COMPAT_32 elf_putnote(NT_PROCSTAT_PROC, elf_note_procstat_proc, &pid, sb); elf_putnote(NT_PROCSTAT_FILES, elf_note_procstat_files, &pid, sb); elf_putnote(NT_PROCSTAT_VMMAP, elf_note_procstat_vmmap, &pid, sb); @@ -328,6 +361,7 @@ elf_putnotes(pid_t pid, struct sbuf *sb, elf_putnote(NT_PROCSTAT_PSSTRINGS, elf_note_procstat_psstrings, &pid, sb); elf_putnote(NT_PROCSTAT_AUXV, elf_note_procstat_auxv, &pid, sb); +#endif size = sbuf_end_section(sb, old_len, 1, 0); if (size == -1) @@ -499,7 +533,7 @@ static void * elf_note_prpsinfo(void *arg, size_t *sizep) { pid_t pid; - prpsinfo_t *psinfo; + elfcore_prpsinfo_t *psinfo; struct kinfo_proc kip; size_t len; int name[4]; @@ -509,7 +543,7 @@ elf_note_prpsinfo(void *arg, size_t *siz if (psinfo == NULL) errx(1, "out of memory"); psinfo->pr_version = PRPSINFO_VERSION; - psinfo->pr_psinfosz = sizeof(prpsinfo_t); + psinfo->pr_psinfosz = sizeof(*psinfo); name[0] = CTL_KERN; name[1] = KERN_PROC; @@ -531,19 +565,21 @@ static void * elf_note_prstatus(void *arg, size_t *sizep) { lwpid_t tid; - prstatus_t *status; + elfcore_prstatus_t *status; + struct reg greg; tid = *(lwpid_t *)arg; status = calloc(1, sizeof(*status)); if (status == NULL) errx(1, "out of memory"); status->pr_version = PRSTATUS_VERSION; - status->pr_statussz = sizeof(prstatus_t); - status->pr_gregsetsz = sizeof(gregset_t); - status->pr_fpregsetsz = sizeof(fpregset_t); + status->pr_statussz = sizeof(*status); + status->pr_gregsetsz = sizeof(elfcore_gregset_t); + status->pr_fpregsetsz = sizeof(elfcore_fpregset_t); status->pr_osreldate = __FreeBSD_version; status->pr_pid = tid; - ptrace(PT_GETREGS, tid, (void *)&status->pr_reg, 0); + ptrace(PT_GETREGS, tid, (void *)&greg, 0); + elf_convert_gregset(&status->pr_reg, &greg); *sizep = sizeof(*status); return (status); @@ -553,13 +589,15 @@ static void * elf_note_fpregset(void *arg, size_t *sizep) { lwpid_t tid; - prfpregset_t *fpregset; + elfcore_fpregset_t *fpregset; + fpregset_t fpreg; tid = *(lwpid_t *)arg; fpregset = calloc(1, sizeof(*fpregset)); if (fpregset == NULL) errx(1, "out of memory"); - ptrace(PT_GETFPREGS, tid, (void *)fpregset, 0); + ptrace(PT_GETFPREGS, tid, (void *)&fpreg, 0); + elf_convert_fpregset(fpregset, &fpreg); *sizep = sizeof(*fpregset); return (fpregset); @@ -736,5 +774,5 @@ elf_note_procstat_rlimit(void *arg, size return (buf); } -struct dumpers elfdump = { elf_ident, elf_coredump }; -TEXT_SET(dumpset, elfdump); +struct dumpers __elfN(dump) = { elf_ident, elf_coredump }; +TEXT_SET(dumpset, __elfN(dump)); From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 14:54:56 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9866FE90; Tue, 2 Jun 2015 14:54:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 845511CE3; Tue, 2 Jun 2015 14:54:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52EsuN5061549; Tue, 2 Jun 2015 14:54:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52EssdH061540; Tue, 2 Jun 2015 14:54:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021454.t52EssdH061540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 14:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283910 - in stable/10: sys/compat/freebsd32 sys/ia64/include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include usr.bin/gcore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 14:54:56 -0000 Author: jhb Date: Tue Jun 2 14:54:53 2015 New Revision: 283910 URL: https://svnweb.freebsd.org/changeset/base/283910 Log: MFC 281266: Move the 32-bit compatible procfs types from freebsd32.h to and export them to userland. - Define __HAVE_REG32 on platforms that define a reg32 structure and check for this in to control when to export prstatus32, etc. - Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures. libbfd looks for these types, and having them fixes 'gcore' in gdb of a 32-bit process on a 64-bit platform. - Use the structure definitions from in gcore's elf32 core dump code instead of duplicating the definitions. Modified: stable/10/sys/compat/freebsd32/freebsd32.h stable/10/sys/ia64/include/reg.h stable/10/sys/mips/include/reg.h stable/10/sys/powerpc/include/reg.h stable/10/sys/sparc64/include/reg.h stable/10/sys/sys/procfs.h stable/10/sys/x86/include/reg.h stable/10/usr.bin/gcore/elf32core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/compat/freebsd32/freebsd32.h Tue Jun 2 14:54:53 2015 (r283910) @@ -243,32 +243,6 @@ struct i386_ldt_args32 { uint32_t num; }; -/* - * Alternative layouts for - */ -struct prstatus32 { - int pr_version; - u_int pr_statussz; - u_int pr_gregsetsz; - u_int pr_fpregsetsz; - int pr_osreldate; - int pr_cursig; - pid_t pr_pid; - struct reg32 pr_reg; -}; - -struct prpsinfo32 { - int pr_version; - u_int pr_psinfosz; - char pr_fname[PRFNAMESZ+1]; - char pr_psargs[PRARGSZ+1]; -}; - -struct thrmisc32 { - char pr_tname[MAXCOMLEN+1]; - u_int _pad; -}; - struct mq_attr32 { int mq_flags; int mq_maxmsg; Modified: stable/10/sys/ia64/include/reg.h ============================================================================== --- stable/10/sys/ia64/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/ia64/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -81,6 +81,8 @@ struct dbreg { unsigned long dbr_inst[8]; }; +#define __HAVE_REG32 + #ifdef _KERNEL struct thread; Modified: stable/10/sys/mips/include/reg.h ============================================================================== --- stable/10/sys/mips/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/mips/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -70,7 +70,7 @@ struct dbreg { unsigned long junk; }; -#ifdef COMPAT_FREEBSD32 +#ifdef __LP64__ /* Must match struct trapframe */ struct reg32 { uint32_t r_regs[NUMSAVEREGS]; @@ -83,6 +83,8 @@ struct fpreg32 { struct dbreg32 { uint32_t junk; }; + +#define __HAVE_REG32 #endif #ifdef _KERNEL Modified: stable/10/sys/powerpc/include/reg.h ============================================================================== --- stable/10/sys/powerpc/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/powerpc/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -28,7 +28,7 @@ struct dbreg { unsigned int junk; }; -#ifdef COMPAT_FREEBSD32 +#ifdef __LP64__ /* Must match struct trapframe */ struct reg32 { int32_t fixreg[32]; @@ -46,6 +46,8 @@ struct fpreg32 { struct dbreg32 { struct dbreg data; }; + +#define __HAVE_REG32 #endif #ifdef _KERNEL Modified: stable/10/sys/sparc64/include/reg.h ============================================================================== --- stable/10/sys/sparc64/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/sparc64/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -98,6 +98,12 @@ struct dbreg { int dummy; }; +/* + * NB: sparcv8 binaries are not supported even though this header + * defines the relevant structures. + */ +#define __HAVE_REG32 + #ifdef _KERNEL /* * XXX these interfaces are MI, so they should be declared in a MI place. Modified: stable/10/sys/sys/procfs.h ============================================================================== --- stable/10/sys/sys/procfs.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/sys/procfs.h Tue Jun 2 14:54:53 2015 (r283910) @@ -89,4 +89,29 @@ typedef struct thrmisc { typedef uint64_t psaddr_t; /* An address in the target process. */ +#ifdef __HAVE_REG32 +typedef struct prstatus32 { + int32_t pr_version; + uint32_t pr_statussz; + uint32_t pr_gregsetsz; + uint32_t pr_fpregsetsz; + int32_t pr_osreldate; + int32_t pr_cursig; + int32_t pr_pid; + struct reg32 pr_reg; +} prstatus32_t; + +typedef struct prpsinfo32 { + int32_t pr_version; + uint32_t pr_psinfosz; + char pr_fname[PRFNAMESZ+1]; + char pr_psargs[PRARGSZ+1]; +} prpsinfo32_t; + +struct thrmisc32 { + char pr_tname[MAXCOMLEN+1]; + uint32_t _pad; +}; +#endif /* __HAVE_REG32 */ + #endif /* _SYS_PROCFS_H_ */ Modified: stable/10/sys/x86/include/reg.h ============================================================================== --- stable/10/sys/x86/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/x86/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -91,6 +91,7 @@ #define __fpreg64 fpreg #define __dbreg32 dbreg32 #define __dbreg64 dbreg +#define __HAVE_REG32 #endif /* Modified: stable/10/usr.bin/gcore/elf32core.c ============================================================================== --- stable/10/usr.bin/gcore/elf32core.c Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/usr.bin/gcore/elf32core.c Tue Jun 2 14:54:53 2015 (r283910) @@ -8,24 +8,6 @@ #include -struct prpsinfo32 { - int pr_version; - u_int pr_psinfosz; - char pr_fname[PRFNAMESZ+1]; - char pr_psargs[PRARGSZ+1]; -}; - -struct prstatus32 { - int pr_version; - u_int pr_statussz; - u_int pr_gregsetsz; - u_int pr_fpregsetsz; - int pr_osreldate; - int pr_cursig; - pid_t pr_pid; - struct reg32 pr_reg; -}; - #define ELFCORE_COMPAT_32 1 #include "elfcore.c" From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 14:55:56 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BB09FED; Tue, 2 Jun 2015 14:55:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDC401CF0; Tue, 2 Jun 2015 14:55:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52EttNL061820; Tue, 2 Jun 2015 14:55:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52EttKe061819; Tue, 2 Jun 2015 14:55:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021455.t52EttKe061819@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 14:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283911 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 14:55:56 -0000 Author: jhb Date: Tue Jun 2 14:55:55 2015 New Revision: 283911 URL: https://svnweb.freebsd.org/changeset/base/283911 Log: MFC 281601: Remove THRMISC_VERSION. The thrmisc structure doesn't include a version number, so this wasn't used (and can't easily be added). If at some point we want to extend thrmisc, we will probably need to just add a new note type and ensure that the new type includes a version number. Modified: stable/10/sys/sys/procfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/procfs.h ============================================================================== --- stable/10/sys/sys/procfs.h Tue Jun 2 14:54:53 2015 (r283910) +++ stable/10/sys/sys/procfs.h Tue Jun 2 14:55:55 2015 (r283911) @@ -80,8 +80,6 @@ typedef struct prpsinfo { char pr_psargs[PRARGSZ+1]; /* Arguments, null terminated (1) */ } prpsinfo_t; -#define THRMISC_VERSION 1 /* Current version of thrmisc_t */ - typedef struct thrmisc { char pr_tname[MAXCOMLEN+1]; /* Thread name, null terminated (1) */ u_int _pad; /* Convenience pad, 0-filled (1) */ From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 15:02:29 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89347626; Tue, 2 Jun 2015 15:02:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 764C81F59; Tue, 2 Jun 2015 15:02:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F2TiJ066879; Tue, 2 Jun 2015 15:02:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F2Td2066877; Tue, 2 Jun 2015 15:02:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021502.t52F2Td2066877@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283912 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 15:02:29 -0000 Author: jhb Date: Tue Jun 2 15:02:28 2015 New Revision: 283912 URL: https://svnweb.freebsd.org/changeset/base/283912 Log: MFC 281170: vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612 Modified: stable/10/lib/libc/sys/vfork.2 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/lib/libc/sys/vfork.2 stable/9/lib/libc/sys/vfork.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/10/lib/libc/sys/vfork.2 ============================================================================== --- stable/10/lib/libc/sys/vfork.2 Tue Jun 2 14:55:55 2015 (r283911) +++ stable/10/lib/libc/sys/vfork.2 Tue Jun 2 15:02:28 2015 (r283912) @@ -28,7 +28,7 @@ .\" @(#)vfork.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 13, 2009 +.Dd April 6, 2015 .Dt VFORK 2 .Os .Sh NAME @@ -111,7 +111,7 @@ Same as for The .Fn vfork system call appeared in -.Bx 2.9 . +.Bx 3 . .Sh BUGS To avoid a possible deadlock situation, processes that are children in the middle From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 15:07:06 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC66AE55; Tue, 2 Jun 2015 15:07:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AABA11FCE; Tue, 2 Jun 2015 15:07:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F762j067724; Tue, 2 Jun 2015 15:07:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F76pV067723; Tue, 2 Jun 2015 15:07:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021507.t52F76pV067723@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283914 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 15:07:06 -0000 Author: jhb Date: Tue Jun 2 15:07:06 2015 New Revision: 283914 URL: https://svnweb.freebsd.org/changeset/base/283914 Log: MFC 282552: Remove the note about seekdir() removing telldir() cookies. That was removed back in r269204. Modified: stable/10/lib/libc/gen/directory.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/directory.3 ============================================================================== --- stable/10/lib/libc/gen/directory.3 Tue Jun 2 15:02:30 2015 (r283913) +++ stable/10/lib/libc/gen/directory.3 Tue Jun 2 15:07:06 2015 (r283914) @@ -28,7 +28,7 @@ .\" @(#)directory.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 28, 2014 +.Dd May 6, 2015 .Dt DIRECTORY 3 .Os .Sh NAME @@ -263,12 +263,6 @@ function appeared in function appeared in .Fx 10.0 . .Sh BUGS -The invalidation of -.Fn telldir -tokens when calling -.Fn seekdir -is non-standard. This is a compile time option. -.Pp The behaviour of .Fn telldir and From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 15:09:34 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20FD814A; Tue, 2 Jun 2015 15:09:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F0841005; Tue, 2 Jun 2015 15:09:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F9Xoh068122; Tue, 2 Jun 2015 15:09:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F9X3p068121; Tue, 2 Jun 2015 15:09:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021509.t52F9X3p068121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283915 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 15:09:34 -0000 Author: jhb Date: Tue Jun 2 15:09:33 2015 New Revision: 283915 URL: https://svnweb.freebsd.org/changeset/base/283915 Log: MFC 282416: Partially revert r255486, the first argument to socketpair() is a socket domain, not a file descriptor. Use 'domain' instead of the original 'd' for this argument to match socket(2). PR: 199491 Modified: stable/10/lib/libc/sys/socketpair.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/socketpair.2 ============================================================================== --- stable/10/lib/libc/sys/socketpair.2 Tue Jun 2 15:07:06 2015 (r283914) +++ stable/10/lib/libc/sys/socketpair.2 Tue Jun 2 15:09:33 2015 (r283915) @@ -28,7 +28,7 @@ .\" @(#)socketpair.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 11, 2013 +.Dd May 4, 2015 .Dt SOCKETPAIR 2 .Os .Sh NAME @@ -40,13 +40,13 @@ .In sys/types.h .In sys/socket.h .Ft int -.Fn socketpair "int fd" "int type" "int protocol" "int *sv" +.Fn socketpair "int domain" "int type" "int protocol" "int *sv" .Sh DESCRIPTION The .Fn socketpair system call creates an unnamed pair of connected sockets in -the specified domain -.Fa fd , +the specified communications +.Fa domain , of the specified .Fa type , and using the optionally specified From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 15:12:34 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 343AF4DE; Tue, 2 Jun 2015 15:12:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16A2C122E; Tue, 2 Jun 2015 15:12:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52FCXL2072510; Tue, 2 Jun 2015 15:12:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52FCXId072509; Tue, 2 Jun 2015 15:12:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021512.t52FCXId072509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283916 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 15:12:34 -0000 Author: jhb Date: Tue Jun 2 15:12:33 2015 New Revision: 283916 URL: https://svnweb.freebsd.org/changeset/base/283916 Log: MFC 282417: Various updates to the ftruncate(2) documentation: - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472 Modified: stable/10/lib/libc/sys/truncate.2 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/lib/libc/sys/truncate.2 stable/9/lib/libc/sys/truncate.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/10/lib/libc/sys/truncate.2 ============================================================================== --- stable/10/lib/libc/sys/truncate.2 Tue Jun 2 15:09:33 2015 (r283915) +++ stable/10/lib/libc/sys/truncate.2 Tue Jun 2 15:12:33 2015 (r283916) @@ -28,7 +28,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 13, 2006 +.Dd May 4, 2015 .Dt TRUNCATE 2 .Os .Sh NAME @@ -60,9 +60,18 @@ is lost. If the file was smaller than this size, it will be extended as if by writing bytes with the value zero. -With -.Fn ftruncate , -the file must be open for writing. +.Pp +The +.Fn ftruncate +system call causes the file or shared memory object backing the file descriptor +.Fa fd +to be truncated or extended to +.Fa length +bytes in size. +The file descriptor must be a valid file descriptor open for writing. +The file position pointer associated with the file descriptor +.Fa fd +will not be modified. .Sh RETURN VALUES .Rv -std If the file to be modified is not a directory or @@ -129,7 +138,7 @@ is not a valid descriptor. The .Fa fd argument -references a socket, not a file. +references a file descriptor that is not a regular file or shared memory object. .It Bq Er EINVAL The .Fa fd @@ -138,11 +147,14 @@ is not open for writing. .El .Sh SEE ALSO .Xr chflags 2 , -.Xr open 2 +.Xr open 2 , +.Xr shm_open 2 .Sh HISTORY The .Fn truncate -system call appeared in +and +.Fn ftruncate +system calls appeared in .Bx 4.2 . .Sh BUGS These calls should be generalized to allow ranges From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 19:20:57 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A445524; Tue, 2 Jun 2015 19:20:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8436D152F; Tue, 2 Jun 2015 19:20:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52JKvaW098381; Tue, 2 Jun 2015 19:20:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52JKgEH097710; Tue, 2 Jun 2015 19:20:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021920.t52JKgEH097710@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 19:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283927 - in stable: 10/lib/libc/gen 10/lib/libc/include 10/lib/libc/stdio 10/lib/libc/sys 10/share/man/man9 10/sys/amd64/include 10/sys/boot/i386/common 10/sys/dev/pci 10/sys/i386/incl... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 19:20:57 -0000 Author: jhb Date: Tue Jun 2 19:20:39 2015 New Revision: 283927 URL: https://svnweb.freebsd.org/changeset/base/283927 Log: MFC 281887: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. Modified: stable/10/lib/libc/gen/_once_stub.c stable/10/lib/libc/include/compat.h stable/10/lib/libc/stdio/open_memstream.3 stable/10/lib/libc/stdio/open_memstream.c stable/10/lib/libc/stdio/open_wmemstream.c stable/10/lib/libc/sys/closefrom.2 stable/10/lib/libc/sys/procctl.2 stable/10/share/man/man9/BUS_BIND_INTR.9 stable/10/share/man/man9/BUS_CHILD_DELETED.9 stable/10/share/man/man9/BUS_CHILD_DETACHED.9 stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 stable/10/share/man/man9/BUS_NEW_PASS.9 stable/10/share/man/man9/VOP_ADVISE.9 stable/10/share/man/man9/VOP_ALLOCATE.9 stable/10/share/man/man9/bus_adjust_resource.9 stable/10/share/man/man9/bus_generic_new_pass.9 stable/10/share/man/man9/bus_set_pass.9 stable/10/share/man/man9/refcount.9 stable/10/share/man/man9/sglist.9 stable/10/share/man/man9/shm_map.9 stable/10/sys/amd64/include/vm.h stable/10/sys/boot/i386/common/edd.h stable/10/sys/dev/pci/pci_subr.c stable/10/sys/i386/include/vm.h stable/10/sys/sys/procctl.h stable/10/sys/vm/sg_pager.c stable/10/sys/x86/acpica/srat.c stable/10/sys/x86/include/mca.h stable/10/sys/x86/pci/qpi.c stable/10/sys/x86/x86/mca.c stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/10/tools/regression/netinet/arphold/arphold.c stable/10/usr.bin/perror/perror.1 stable/10/usr.bin/perror/perror.c stable/10/usr.bin/procstat/procstat_rusage.c stable/10/usr.bin/protect/protect.1 stable/10/usr.bin/protect/protect.c stable/10/usr.sbin/bhyve/ioapic.c stable/10/usr.sbin/bhyve/ioapic.h stable/10/usr.sbin/bhyve/pci_irq.c stable/10/usr.sbin/bhyve/pci_irq.h stable/10/usr.sbin/bhyve/pm.c stable/10/usr.sbin/etcupdate/etcupdate.8 stable/10/usr.sbin/etcupdate/etcupdate.sh stable/10/usr.sbin/etcupdate/tests/always_test.sh stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh stable/10/usr.sbin/etcupdate/tests/ignore_test.sh stable/10/usr.sbin/etcupdate/tests/preworld_test.sh stable/10/usr.sbin/etcupdate/tests/tests_test.sh stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh stable/10/usr.sbin/pciconf/err.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/7/sys/amd64/amd64/mca.c stable/7/sys/amd64/include/mca.h stable/7/sys/amd64/include/vm.h stable/7/sys/i386/i386/mca.c stable/7/sys/i386/include/mca.h stable/7/sys/i386/include/vm.h stable/7/sys/vm/sg_pager.c stable/7/sys/x86/pci/qpi.c stable/8/lib/libc/gen/_once_stub.c stable/8/lib/libc/include/compat.h stable/8/lib/libc/sys/closefrom.2 stable/8/share/man/man9/BUS_BIND_INTR.9 stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 stable/8/share/man/man9/BUS_NEW_PASS.9 stable/8/share/man/man9/bus_adjust_resource.9 stable/8/share/man/man9/bus_generic_new_pass.9 stable/8/share/man/man9/bus_set_pass.9 stable/8/share/man/man9/refcount.9 stable/8/share/man/man9/sglist.9 stable/8/share/man/man9/shm_map.9 stable/8/sys/amd64/include/mca.h stable/8/sys/amd64/include/vm.h stable/8/sys/boot/i386/common/edd.h stable/8/sys/i386/include/mca.h stable/8/sys/i386/include/vm.h stable/8/sys/vm/sg_pager.c stable/8/sys/x86/pci/qpi.c stable/8/sys/x86/x86/mca.c stable/8/tools/regression/file/closefrom/closefrom.c stable/8/tools/regression/netinet/arphold/arphold.c stable/8/tools/regression/usr.sbin/etcupdate/always.sh stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh stable/8/tools/regression/usr.sbin/etcupdate/tests.sh stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/8/usr.bin/perror/perror.1 stable/8/usr.bin/perror/perror.c stable/8/usr.sbin/etcupdate/etcupdate.8 stable/8/usr.sbin/etcupdate/etcupdate.sh stable/8/usr.sbin/pciconf/err.c stable/9/lib/libc/gen/_once_stub.c stable/9/lib/libc/include/compat.h stable/9/lib/libc/stdio/open_memstream.3 (contents, props changed) stable/9/lib/libc/stdio/open_memstream.c stable/9/lib/libc/stdio/open_wmemstream.c stable/9/lib/libc/sys/closefrom.2 stable/9/lib/libc/sys/procctl.2 stable/9/share/man/man9/BUS_BIND_INTR.9 stable/9/share/man/man9/BUS_CHILD_DELETED.9 stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 stable/9/share/man/man9/BUS_NEW_PASS.9 stable/9/share/man/man9/bus_adjust_resource.9 stable/9/share/man/man9/bus_generic_new_pass.9 stable/9/share/man/man9/bus_set_pass.9 stable/9/share/man/man9/refcount.9 stable/9/share/man/man9/sglist.9 stable/9/share/man/man9/shm_map.9 stable/9/sys/amd64/include/vm.h stable/9/sys/boot/i386/common/edd.h stable/9/sys/dev/pci/pci_subr.c stable/9/sys/i386/include/vm.h stable/9/sys/sys/procctl.h stable/9/sys/vm/sg_pager.c stable/9/sys/x86/acpica/srat.c stable/9/sys/x86/include/mca.h stable/9/sys/x86/pci/qpi.c stable/9/sys/x86/x86/mca.c stable/9/tools/regression/file/closefrom/closefrom.c stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/9/tools/regression/netinet/arphold/arphold.c stable/9/tools/regression/usr.sbin/etcupdate/always.sh stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh stable/9/tools/regression/usr.sbin/etcupdate/tests.sh stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/9/usr.bin/perror/perror.1 stable/9/usr.bin/perror/perror.c stable/9/usr.bin/procstat/procstat_rusage.c stable/9/usr.bin/protect/protect.1 stable/9/usr.bin/protect/protect.c stable/9/usr.sbin/etcupdate/etcupdate.8 stable/9/usr.sbin/etcupdate/etcupdate.sh stable/9/usr.sbin/pciconf/err.c Directory Properties: stable/7/sys/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/vm/ (props changed) stable/8/sys/x86/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.sbin/etcupdate/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) stable/9/tools/regression/netinet/ (props changed) stable/9/usr.bin/procstat/ (props changed) stable/9/usr.bin/protect/ (props changed) stable/9/usr.sbin/etcupdate/ (props changed) stable/9/usr.sbin/pciconf/ (props changed) Modified: stable/10/lib/libc/gen/_once_stub.c ============================================================================== --- stable/10/lib/libc/gen/_once_stub.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/gen/_once_stub.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/lib/libc/include/compat.h ============================================================================== --- stable/10/lib/libc/include/compat.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/include/compat.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/lib/libc/stdio/open_memstream.3 ============================================================================== --- stable/10/lib/libc/stdio/open_memstream.3 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/stdio/open_memstream.3 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/lib/libc/stdio/open_memstream.c ============================================================================== --- stable/10/lib/libc/stdio/open_memstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/stdio/open_memstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/lib/libc/stdio/open_wmemstream.c ============================================================================== --- stable/10/lib/libc/stdio/open_wmemstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/stdio/open_wmemstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/lib/libc/sys/closefrom.2 ============================================================================== --- stable/10/lib/libc/sys/closefrom.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/sys/closefrom.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/lib/libc/sys/procctl.2 ============================================================================== --- stable/10/lib/libc/sys/procctl.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/sys/procctl.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- stable/10/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_CHILD_DELETED.9 ============================================================================== --- stable/10/share/man/man9/BUS_CHILD_DELETED.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_CHILD_DELETED.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_CHILD_DETACHED.9 ============================================================================== --- stable/10/share/man/man9/BUS_CHILD_DETACHED.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_CHILD_DETACHED.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_NEW_PASS.9 ============================================================================== --- stable/10/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/VOP_ADVISE.9 ============================================================================== --- stable/10/share/man/man9/VOP_ADVISE.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/VOP_ADVISE.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/VOP_ALLOCATE.9 ============================================================================== --- stable/10/share/man/man9/VOP_ALLOCATE.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/VOP_ALLOCATE.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/bus_adjust_resource.9 ============================================================================== --- stable/10/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/bus_generic_new_pass.9 ============================================================================== --- stable/10/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/bus_set_pass.9 ============================================================================== --- stable/10/share/man/man9/bus_set_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/bus_set_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/refcount.9 ============================================================================== --- stable/10/share/man/man9/refcount.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/refcount.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/sglist.9 ============================================================================== --- stable/10/share/man/man9/sglist.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/sglist.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/shm_map.9 ============================================================================== --- stable/10/share/man/man9/shm_map.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/shm_map.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/sys/amd64/include/vm.h ============================================================================== --- stable/10/sys/amd64/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/amd64/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/boot/i386/common/edd.h ============================================================================== --- stable/10/sys/boot/i386/common/edd.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/boot/i386/common/edd.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/dev/pci/pci_subr.c ============================================================================== --- stable/10/sys/dev/pci/pci_subr.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/dev/pci/pci_subr.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/i386/include/vm.h ============================================================================== --- stable/10/sys/i386/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/i386/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/sys/procctl.h ============================================================================== --- stable/10/sys/sys/procctl.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/sys/procctl.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/vm/sg_pager.c ============================================================================== --- stable/10/sys/vm/sg_pager.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/vm/sg_pager.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/x86/acpica/srat.c ============================================================================== --- stable/10/sys/x86/acpica/srat.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/x86/acpica/srat.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/x86/include/mca.h ============================================================================== --- stable/10/sys/x86/include/mca.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/x86/include/mca.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/x86/pci/qpi.c ============================================================================== --- stable/10/sys/x86/pci/qpi.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/x86/pci/qpi.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/x86/x86/mca.c ============================================================================== --- stable/10/sys/x86/x86/mca.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/x86/x86/mca.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c ============================================================================== --- stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c ============================================================================== --- stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/tools/regression/netinet/arphold/arphold.c ============================================================================== --- stable/10/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by George Neville-Neil gnn@freebsd.org * All rights reserved. * Modified: stable/10/usr.bin/perror/perror.1 ============================================================================== --- stable/10/usr.bin/perror/perror.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/perror/perror.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. .\" Modified: stable/10/usr.bin/perror/perror.c ============================================================================== --- stable/10/usr.bin/perror/perror.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/perror/perror.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: George V. Neville-Neil * All rights reserved. * Modified: stable/10/usr.bin/procstat/procstat_rusage.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_rusage.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/procstat/procstat_rusage.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.bin/protect/protect.1 ============================================================================== --- stable/10/usr.bin/protect/protect.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/protect/protect.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/usr.bin/protect/protect.c ============================================================================== --- stable/10/usr.bin/protect/protect.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/protect/protect.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/ioapic.c ============================================================================== --- stable/10/usr.sbin/bhyve/ioapic.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/ioapic.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/ioapic.h ============================================================================== --- stable/10/usr.sbin/bhyve/ioapic.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/ioapic.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/pci_irq.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_irq.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/pci_irq.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/pci_irq.h ============================================================================== --- stable/10/usr.sbin/bhyve/pci_irq.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/pci_irq.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/pm.c ============================================================================== --- stable/10/usr.sbin/bhyve/pm.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/pm.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- stable/10/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010-2013 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/always_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/always_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/always_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/ignore_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/ignore_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/ignore_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/preworld_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/preworld_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/preworld_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/tests_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/tests_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/tests_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/pciconf/err.c ============================================================================== --- stable/10/usr.sbin/pciconf/err.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/pciconf/err.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 20:29:59 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 454966EB; Tue, 2 Jun 2015 20:29:59 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3309E157A; Tue, 2 Jun 2015 20:29:59 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52KTxt5032333; Tue, 2 Jun 2015 20:29:59 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52KTx6r032332; Tue, 2 Jun 2015 20:29:59 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201506022029.t52KTx6r032332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Tue, 2 Jun 2015 20:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283928 - stable/10/sbin/geom/class/eli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 20:29:59 -0000 Author: pjd Date: Tue Jun 2 20:29:58 2015 New Revision: 283928 URL: https://svnweb.freebsd.org/changeset/base/283928 Log: MFC r265950 (by thomas): Add mention of metadata version 7 in FreeBSD 10.0. Modified: stable/10/sbin/geom/class/eli/geli.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/eli/geli.8 ============================================================================== --- stable/10/sbin/geom/class/eli/geli.8 Tue Jun 2 19:20:39 2015 (r283927) +++ stable/10/sbin/geom/class/eli/geli.8 Tue Jun 2 20:29:58 2015 (r283928) @@ -1053,6 +1053,8 @@ metadata version supported by the given .It Li 8.2 Ta 5 .Pp .It Li 9.0 Ta 6 +.Pp +.It Li 10.0 Ta 7 .El .Sh AUTHORS .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 21:24:49 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B1A8656; Tue, 2 Jun 2015 21:24:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CC241356; Tue, 2 Jun 2015 21:24:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52LOnjO062200; Tue, 2 Jun 2015 21:24:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52LOm74062196; Tue, 2 Jun 2015 21:24:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201506022124.t52LOm74062196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 2 Jun 2015 21:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283930 - in stable/10: share/mk sys/arm/conf sys/conf sys/modules/dtb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 21:24:49 -0000 Author: imp Date: Tue Jun 2 21:24:47 2015 New Revision: 283930 URL: https://svnweb.freebsd.org/changeset/base/283930 Log: MFC: Merge r276846: Add infrastructure to build dtb files from dts files. Added: stable/10/share/mk/bsd.dtb.mk - copied unchanged from r276846, head/share/mk/bsd.dtb.mk stable/10/sys/conf/dtb.mk - copied, changed from r276846, head/sys/conf/dtb.mk stable/10/sys/modules/dtb/ - copied from r276846, head/sys/modules/dtb/ Modified: stable/10/share/mk/Makefile stable/10/sys/arm/conf/ATMEL Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/Makefile ============================================================================== --- stable/10/share/mk/Makefile Tue Jun 2 20:53:17 2015 (r283929) +++ stable/10/share/mk/Makefile Tue Jun 2 21:24:47 2015 (r283930) @@ -11,6 +11,7 @@ FILES= \ bsd.crunchgen.mk \ bsd.dep.mk \ bsd.doc.mk \ + bsd.dtb.mk \ bsd.endian.mk \ bsd.files.mk \ bsd.incs.mk \ Copied: stable/10/share/mk/bsd.dtb.mk (from r276846, head/share/mk/bsd.dtb.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/mk/bsd.dtb.mk Tue Jun 2 21:24:47 2015 (r283930, copy of r276846, head/share/mk/bsd.dtb.mk) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ + ${.CURDIR}/../../../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +SYSDIR= ${_dir} +.endif +.endfor +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ + !exists(${SYSDIR}/conf/kmod.mk) +.error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif + +.include "${SYSDIR}/conf/dtb.mk" + +.include Modified: stable/10/sys/arm/conf/ATMEL ============================================================================== --- stable/10/sys/arm/conf/ATMEL Tue Jun 2 20:53:17 2015 (r283929) +++ stable/10/sys/arm/conf/ATMEL Tue Jun 2 21:24:47 2015 (r283930) @@ -15,7 +15,7 @@ makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 -makeoptions MODULES_OVERRIDE="" +makeoptions MODULES_OVERRIDE="dtb/atmel" # list all boards here, but not just yet (no multiboard in mainline). options ARM_MANY_BOARD Copied and modified: stable/10/sys/conf/dtb.mk (from r276846, head/sys/conf/dtb.mk) ============================================================================== --- head/sys/conf/dtb.mk Thu Jan 8 18:28:06 2015 (r276846, copy source) +++ stable/10/sys/conf/dtb.mk Tue Jun 2 21:24:47 2015 (r283930) @@ -29,7 +29,7 @@ .include # Grab all the options for a kernel build. For backwards compat, we need to # do this after bsd.own.mk. -.include "kern.opts.mk" +#.include "kern.opts.mk" # commented out to minize difference with 11.x and newer # Search for kernel source tree in standard places. .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys From owner-svn-src-stable-10@FreeBSD.ORG Tue Jun 2 21:36:45 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2AF3947; Tue, 2 Jun 2015 21:36:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0A271622; Tue, 2 Jun 2015 21:36:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52Laji1067577; Tue, 2 Jun 2015 21:36:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52LajY7067576; Tue, 2 Jun 2015 21:36:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201506022136.t52LajY7067576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 2 Jun 2015 21:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283931 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 21:36:46 -0000 Author: imp Date: Tue Jun 2 21:36:45 2015 New Revision: 283931 URL: https://svnweb.freebsd.org/changeset/base/283931 Log: MFC: r283014: Disable unmapped I/O: it is broken for unaligned pages r283126: Fix comments Modified: stable/10/sys/arm/arm/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Tue Jun 2 21:24:47 2015 (r283930) +++ stable/10/sys/arm/arm/pmap.c Tue Jun 2 21:36:45 2015 (r283931) @@ -4324,7 +4324,13 @@ pmap_copy_page(vm_page_t src, vm_page_t pmap_copy_page_func(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst)); } -int unmapped_buf_allowed = 1; +/* + * We have code to do unmapped I/O. However, it isn't quite right and + * causes un-page-aligned I/O to devices to fail (most notably newfs + * or fsck). We give up a little performance to not allow unmapped I/O + * to gain stability. + */ +int unmapped_buf_allowed = 0; void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 02:50:59 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A4B3662; Wed, 3 Jun 2015 02:50:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46E611E90; Wed, 3 Jun 2015 02:50:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t532oxkA032119; Wed, 3 Jun 2015 02:50:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t532oxae032118; Wed, 3 Jun 2015 02:50:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506030250.t532oxae032118@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jun 2015 02:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283937 - stable/10/sys/netipsec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 02:50:59 -0000 Author: ae Date: Wed Jun 3 02:50:58 2015 New Revision: 283937 URL: https://svnweb.freebsd.org/changeset/base/283937 Log: MFC r283146: In the reply to SADB_X_SPDGET message use the same sequence number that was in the request. Some IKE deamons expect it will the same. Linux and NetBSD also follow this behaviour. PR: 137309 Modified: stable/10/sys/netipsec/key.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Tue Jun 2 23:11:12 2015 (r283936) +++ stable/10/sys/netipsec/key.c Wed Jun 3 02:50:58 2015 (r283937) @@ -2226,7 +2226,7 @@ key_spddelete2(struct socket *so, struct } /* - * SADB_X_GET processing + * SADB_X_SPDGET processing * receive * * from the user(?), @@ -2264,7 +2264,8 @@ key_spdget(struct socket *so, struct mbu return key_senderror(so, m, ENOENT); } - n = key_setdumpsp(sp, SADB_X_SPDGET, 0, mhp->msg->sadb_msg_pid); + n = key_setdumpsp(sp, SADB_X_SPDGET, mhp->msg->sadb_msg_seq, + mhp->msg->sadb_msg_pid); KEY_FREESP(&sp); if (n != NULL) { m_freem(m); From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 11:36:48 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C869F774; Wed, 3 Jun 2015 11:36:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B613819D2; Wed, 3 Jun 2015 11:36:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Bamrs094883; Wed, 3 Jun 2015 11:36:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53Bamfg094882; Wed, 3 Jun 2015 11:36:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031136.t53Bamfg094882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 11:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283940 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 11:36:48 -0000 Author: emaste Date: Wed Jun 3 11:36:47 2015 New Revision: 283940 URL: https://svnweb.freebsd.org/changeset/base/283940 Log: MFC r257736 (by pjd): - Remove mac_get_fd/mac_set_fd - those are not syscalls. The __mac_get_fd() and __mac_set_fd() syscalls are listed earlier. - Correct typo in syscall name. It should be sched_rr_get_interval, not sched_rr_getinterval. Modified: stable/10/sys/kern/capabilities.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/capabilities.conf ============================================================================== --- stable/10/sys/kern/capabilities.conf Wed Jun 3 10:10:00 2015 (r283939) +++ stable/10/sys/kern/capabilities.conf Wed Jun 3 11:36:47 2015 (r283940) @@ -386,13 +386,6 @@ listen lseek ## -## Allow MAC label operations by file descriptor, subject to capability -## rights. -## -mac_get_fd -mac_set_fd - -## ## Allow simple VM operations on the current process. ## madvise @@ -552,7 +545,7 @@ sched_get_priority_min ## sched_getparam sched_getscheduler -sched_rr_getinterval +sched_rr_get_interval sched_setparam sched_setscheduler sched_yield From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 11:39:30 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 487AD8F1; Wed, 3 Jun 2015 11:39:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3677C19FA; Wed, 3 Jun 2015 11:39:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53BdUWI095449; Wed, 3 Jun 2015 11:39:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53BdUXJ095448; Wed, 3 Jun 2015 11:39:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031139.t53BdUXJ095448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 11:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283941 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 11:39:30 -0000 Author: emaste Date: Wed Jun 3 11:39:29 2015 New Revision: 283941 URL: https://svnweb.freebsd.org/changeset/base/283941 Log: Regen for r283940. Modified: stable/10/sys/kern/init_sysent.c Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed Jun 3 11:36:47 2015 (r283940) +++ stable/10/sys/kern/init_sysent.c Wed Jun 3 11:39:29 2015 (r283941) @@ -368,7 +368,7 @@ struct sysent sysent[] = { { 0, (sy_call_t *)sys_sched_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 331 = sched_yield */ { AS(sched_get_priority_max_args), (sy_call_t *)sys_sched_get_priority_max, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 332 = sched_get_priority_max */ { AS(sched_get_priority_min_args), (sy_call_t *)sys_sched_get_priority_min, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 333 = sched_get_priority_min */ - { AS(sched_rr_get_interval_args), (sy_call_t *)sys_sched_rr_get_interval, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 334 = sched_rr_get_interval */ + { AS(sched_rr_get_interval_args), (sy_call_t *)sys_sched_rr_get_interval, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 334 = sched_rr_get_interval */ { AS(utrace_args), (sy_call_t *)sys_utrace, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 335 = utrace */ { compat4(AS(freebsd4_sendfile_args),sendfile), AUE_SENDFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 336 = freebsd4 sendfile */ { AS(kldsym_args), (sy_call_t *)sys_kldsym, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 337 = kldsym */ From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 13:10:26 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B56E5E44; Wed, 3 Jun 2015 13:10:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89A5B10BB; Wed, 3 Jun 2015 13:10:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53DAQVD041701; Wed, 3 Jun 2015 13:10:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53DAQSH041699; Wed, 3 Jun 2015 13:10:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031310.t53DAQSH041699@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 13:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283942 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 13:10:26 -0000 Author: emaste Date: Wed Jun 3 13:10:25 2015 New Revision: 283942 URL: https://svnweb.freebsd.org/changeset/base/283942 Log: MFC r259436,259437 by pjd: Allow for pselect(2) in capability mode. Modified: stable/10/sys/kern/capabilities.conf stable/10/sys/kern/init_sysent.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/capabilities.conf ============================================================================== --- stable/10/sys/kern/capabilities.conf Wed Jun 3 11:39:29 2015 (r283941) +++ stable/10/sys/kern/capabilities.conf Wed Jun 3 13:10:25 2015 (r283942) @@ -559,10 +559,11 @@ sctp_generic_sendmsg_iov sctp_peeloff ## -## Allow select(2), which will be scoped by capability rights. +## Allow pselect(2) and select(2), which will be scoped by capability rights. ## ## XXXRW: But is it? ## +pselect select ## Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed Jun 3 11:39:29 2015 (r283941) +++ stable/10/sys/kern/init_sysent.c Wed Jun 3 13:10:25 2015 (r283942) @@ -556,7 +556,7 @@ struct sysent sysent[] = { { AS(pdkill_args), (sy_call_t *)sys_pdkill, AUE_PDKILL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 519 = pdkill */ { AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 520 = pdgetpid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 521 = pdwait4 */ - { AS(pselect_args), (sy_call_t *)sys_pselect, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 522 = pselect */ + { AS(pselect_args), (sy_call_t *)sys_pselect, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 522 = pselect */ { AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 523 = getloginclass */ { AS(setloginclass_args), (sy_call_t *)sys_setloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 524 = setloginclass */ { AS(rctl_get_racct_args), (sy_call_t *)sys_rctl_get_racct, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 525 = rctl_get_racct */ From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 13:12:10 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C12DFAE; Wed, 3 Jun 2015 13:12:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 107761289; Wed, 3 Jun 2015 13:12:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53DC92b045094; Wed, 3 Jun 2015 13:12:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53DC9Yr045092; Wed, 3 Jun 2015 13:12:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031312.t53DC9Yr045092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 13:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283943 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 13:12:10 -0000 Author: emaste Date: Wed Jun 3 13:12:08 2015 New Revision: 283943 URL: https://svnweb.freebsd.org/changeset/base/283943 Log: MFC r261220 by csjp: Allow sigwait(2) in capabilities mode. It's common for multi-threaded processes to create a thread for the purpose of synchronously processing signals. Allow such processes to utilize a capabilities sandbox. Modified: stable/10/sys/kern/capabilities.conf stable/10/sys/kern/init_sysent.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/capabilities.conf ============================================================================== --- stable/10/sys/kern/capabilities.conf Wed Jun 3 13:10:25 2015 (r283942) +++ stable/10/sys/kern/capabilities.conf Wed Jun 3 13:12:08 2015 (r283943) @@ -667,6 +667,7 @@ sigsuspend sigtimedwait sigvec sigwaitinfo +sigwait ## ## Allow creating new socket pairs with socket(2) and socketpair(2). Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed Jun 3 13:10:25 2015 (r283942) +++ stable/10/sys/kern/init_sysent.c Wed Jun 3 13:12:08 2015 (r283943) @@ -463,7 +463,7 @@ struct sysent sysent[] = { { AS(__acl_set_link_args), (sy_call_t *)sys___acl_set_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 426 = __acl_set_link */ { AS(__acl_delete_link_args), (sy_call_t *)sys___acl_delete_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 427 = __acl_delete_link */ { AS(__acl_aclcheck_link_args), (sy_call_t *)sys___acl_aclcheck_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 428 = __acl_aclcheck_link */ - { AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 429 = sigwait */ + { AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 429 = sigwait */ { AS(thr_create_args), (sy_call_t *)sys_thr_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 430 = thr_create */ { AS(thr_exit_args), (sy_call_t *)sys_thr_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 431 = thr_exit */ { AS(thr_self_args), (sy_call_t *)sys_thr_self, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 432 = thr_self */ From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 15:32:45 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8761C3D9; Wed, 3 Jun 2015 15:32:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 730591696; Wed, 3 Jun 2015 15:32:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53FWjsx015139; Wed, 3 Jun 2015 15:32:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53FWhND015132; Wed, 3 Jun 2015 15:32:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506031532.t53FWhND015132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jun 2015 15:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283950 - in stable/10/sys: dev/sound/pcm dev/sound/usb sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 15:32:45 -0000 Author: hselasky Date: Wed Jun 3 15:32:43 2015 New Revision: 283950 URL: https://svnweb.freebsd.org/changeset/base/283950 Log: MFC r282650 and r282651: Extend the maximum number of allowed PCM channels in a PCM stream to 127 and decrease the maximum number of sub-channels to 1. These definitions are only used inside the kernel and can be changed later if more than one sub-channel is desired. This has been done to allow so-called USB audio rack modules to work with FreeBSD. Add support for more than 8 audio channels per PCM stream for USB audio class compliant devices under FreeBSD. Tested using 16 recording and 16 playback audio channels simultaneously. Bump the FreeBSD version to force recompiling all external modules. Modified: stable/10/sys/dev/sound/pcm/channel.c stable/10/sys/dev/sound/pcm/channel.h stable/10/sys/dev/sound/pcm/feeder_chain.c stable/10/sys/dev/sound/pcm/sound.h stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/channel.c ============================================================================== --- stable/10/sys/dev/sound/pcm/channel.c Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/pcm/channel.c Wed Jun 3 15:32:43 2015 (r283950) @@ -1029,32 +1029,17 @@ static const struct { { NULL, NULL, NULL, 0 } }; -static const struct { - char *name, *alias1, *alias2; - int matrix_id; -} matrix_id_tab[] = { - { "1.0", "1", "mono", SND_CHN_MATRIX_1_0 }, - { "2.0", "2", "stereo", SND_CHN_MATRIX_2_0 }, - { "2.1", NULL, NULL, SND_CHN_MATRIX_2_1 }, - { "3.0", "3", NULL, SND_CHN_MATRIX_3_0 }, - { "3.1", NULL, NULL, SND_CHN_MATRIX_3_1 }, - { "4.0", "4", "quad", SND_CHN_MATRIX_4_0 }, - { "4.1", NULL, NULL, SND_CHN_MATRIX_4_1 }, - { "5.0", "5", NULL, SND_CHN_MATRIX_5_0 }, - { "5.1", "6", NULL, SND_CHN_MATRIX_5_1 }, - { "6.0", NULL, NULL, SND_CHN_MATRIX_6_0 }, - { "6.1", "7", NULL, SND_CHN_MATRIX_6_1 }, - { "7.0", NULL, NULL, SND_CHN_MATRIX_7_0 }, - { "7.1", "8", NULL, SND_CHN_MATRIX_7_1 }, - { NULL, NULL, NULL, SND_CHN_MATRIX_UNKNOWN } -}; - uint32_t snd_str2afmt(const char *req) { - uint32_t i, afmt; - int matrix_id; - char b1[8], b2[8]; + int ext; + int ch; + int i; + char b1[8]; + char b2[8]; + + memset(b1, 0, sizeof(b1)); + memset(b2, 0, sizeof(b2)); i = sscanf(req, "%5[^:]:%6s", b1, b2); @@ -1068,88 +1053,78 @@ snd_str2afmt(const char *req) } else return (0); - afmt = 0; - matrix_id = SND_CHN_MATRIX_UNKNOWN; - - for (i = 0; afmt == 0 && afmt_tab[i].name != NULL; i++) { - if (strcasecmp(afmt_tab[i].name, b1) == 0 || - (afmt_tab[i].alias1 != NULL && - strcasecmp(afmt_tab[i].alias1, b1) == 0) || - (afmt_tab[i].alias2 != NULL && - strcasecmp(afmt_tab[i].alias2, b1) == 0)) { - afmt = afmt_tab[i].afmt; - strlcpy(b1, afmt_tab[i].name, sizeof(b1)); - } - } + i = sscanf(b2, "%d.%d", &ch, &ext); - if (afmt == 0) + if (i == 0) { + if (strcasecmp(b2, "mono") == 0) { + ch = 1; + ext = 0; + } else if (strcasecmp(b2, "stereo") == 0) { + ch = 2; + ext = 0; + } else if (strcasecmp(b2, "quad") == 0) { + ch = 4; + ext = 0; + } else + return (0); + } else if (i == 1) { + if (ch < 1 || ch > AFMT_CHANNEL_MAX) + return (0); + ext = 0; + } else if (i == 2) { + if (ext < 0 || ext > AFMT_EXTCHANNEL_MAX) + return (0); + if (ch < 1 || (ch + ext) > AFMT_CHANNEL_MAX) + return (0); + } else return (0); - for (i = 0; matrix_id == SND_CHN_MATRIX_UNKNOWN && - matrix_id_tab[i].name != NULL; i++) { - if (strcmp(matrix_id_tab[i].name, b2) == 0 || - (matrix_id_tab[i].alias1 != NULL && - strcmp(matrix_id_tab[i].alias1, b2) == 0) || - (matrix_id_tab[i].alias2 != NULL && - strcasecmp(matrix_id_tab[i].alias2, b2) == 0)) { - matrix_id = matrix_id_tab[i].matrix_id; - strlcpy(b2, matrix_id_tab[i].name, sizeof(b2)); + for (i = 0; afmt_tab[i].name != NULL; i++) { + if (strcasecmp(afmt_tab[i].name, b1) != 0) { + if (afmt_tab[i].alias1 == NULL) + continue; + if (strcasecmp(afmt_tab[i].alias1, b1) != 0) { + if (afmt_tab[i].alias2 == NULL) + continue; + if (strcasecmp(afmt_tab[i].alias2, b1) != 0) + continue; + } } + /* found a match */ + return (SND_FORMAT(afmt_tab[i].afmt, ch + ext, ext)); } - - if (matrix_id == SND_CHN_MATRIX_UNKNOWN) - return (0); - -#ifndef _KERNEL - printf("Parse OK: '%s' -> '%s:%s' %d\n", req, b1, b2, - (int)(b2[0]) - '0' + (int)(b2[2]) - '0'); -#endif - - return (SND_FORMAT(afmt, b2[0] - '0' + b2[2] - '0', b2[2] - '0')); + /* not a valid format */ + return (0); } uint32_t snd_afmt2str(uint32_t afmt, char *buf, size_t len) { - uint32_t i, enc, ch, ext; - char tmp[AFMTSTR_LEN]; + uint32_t enc; + uint32_t ext; + uint32_t ch; + int i; if (buf == NULL || len < AFMTSTR_LEN) return (0); - - bzero(tmp, sizeof(tmp)); + memset(buf, 0, len); enc = AFMT_ENCODING(afmt); ch = AFMT_CHANNEL(afmt); ext = AFMT_EXTCHANNEL(afmt); - - for (i = 0; afmt_tab[i].name != NULL; i++) { - if (enc == afmt_tab[i].afmt) { - strlcpy(tmp, afmt_tab[i].name, sizeof(tmp)); - strlcat(tmp, ":", sizeof(tmp)); - break; - } - } - - if (strlen(tmp) == 0) + /* check there is at least one channel */ + if (ch <= ext) return (0); - - for (i = 0; matrix_id_tab[i].name != NULL; i++) { - if (ch == (matrix_id_tab[i].name[0] - '0' + - matrix_id_tab[i].name[2] - '0') && - ext == (matrix_id_tab[i].name[2] - '0')) { - strlcat(tmp, matrix_id_tab[i].name, sizeof(tmp)); - break; - } + for (i = 0; afmt_tab[i].name != NULL; i++) { + if (enc != afmt_tab[i].afmt) + continue; + /* found a match */ + snprintf(buf, len, "%s:%d.%d", + afmt_tab[i].name, ch - ext, ext); + return (SND_FORMAT(enc, ch, ext)); } - - if (strlen(tmp) == 0) - return (0); - - strlcpy(buf, tmp, len); - - return (snd_str2afmt(buf)); + return (0); } int Modified: stable/10/sys/dev/sound/pcm/channel.h ============================================================================== --- stable/10/sys/dev/sound/pcm/channel.h Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/pcm/channel.h Wed Jun 3 15:32:43 2015 (r283950) @@ -162,6 +162,7 @@ struct pcm_channel { } channels; struct pcmchan_matrix matrix; + struct pcmchan_matrix matrix_scratch; int volume[SND_VOL_C_MAX][SND_CHN_T_VOL_MAX]; Modified: stable/10/sys/dev/sound/pcm/feeder_chain.c ============================================================================== --- stable/10/sys/dev/sound/pcm/feeder_chain.c Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/pcm/feeder_chain.c Wed Jun 3 15:32:43 2015 (r283950) @@ -562,6 +562,20 @@ feeder_build_mixer(struct pcm_channel *c ((c)->mode == FEEDER_CHAIN_LEAN && \ !((c)->current.afmt & (AFMT_S16_NE | AFMT_S32_NE))))) +static void +feeder_default_matrix(struct pcmchan_matrix *m, uint32_t fmt, int id) +{ + int x; + + memset(m, 0, sizeof(*m)); + + m->id = id; + m->channels = AFMT_CHANNEL(fmt); + m->ext = AFMT_EXTCHANNEL(fmt); + for (x = 0; x != SND_CHN_T_MAX; x++) + m->offset[x] = -1; +} + int feeder_chain(struct pcm_channel *c) { @@ -642,10 +656,10 @@ feeder_chain(struct pcm_channel *c) */ hwmatrix = CHANNEL_GETMATRIX(c->methods, c->devinfo, hwfmt); if (hwmatrix == NULL) { - device_printf(c->dev, - "%s(): failed to acquire hw matrix [0x%08x]\n", - __func__, hwfmt); - return (ENODEV); + /* setup a default matrix */ + hwmatrix = &c->matrix_scratch; + feeder_default_matrix(hwmatrix, hwfmt, + SND_CHN_MATRIX_UNKNOWN); } /* ..... and rebuild hwfmt. */ hwfmt = SND_FORMAT(hwfmt, hwmatrix->channels, hwmatrix->ext); @@ -657,13 +671,14 @@ feeder_chain(struct pcm_channel *c) softmatrix->ext != AFMT_EXTCHANNEL(softfmt)) { softmatrix = feeder_matrix_format_map(softfmt); if (softmatrix == NULL) { - device_printf(c->dev, - "%s(): failed to acquire soft matrix [0x%08x]\n", - __func__, softfmt); - return (ENODEV); + /* setup a default matrix */ + softmatrix = &c->matrix; + feeder_default_matrix(softmatrix, softfmt, + SND_CHN_MATRIX_PCMCHANNEL); + } else { + c->matrix = *softmatrix; + c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL; } - c->matrix = *softmatrix; - c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL; } softfmt = SND_FORMAT(softfmt, softmatrix->channels, softmatrix->ext); if (softfmt != c->format) Modified: stable/10/sys/dev/sound/pcm/sound.h ============================================================================== --- stable/10/sys/dev/sound/pcm/sound.h Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/pcm/sound.h Wed Jun 3 15:32:43 2015 (r283950) @@ -220,10 +220,12 @@ struct snd_mixer; * ~(0xb00ff7ff) */ #define AFMT_ENCODING_MASK 0xf00fffff -#define AFMT_CHANNEL_MASK 0x01f00000 +#define AFMT_CHANNEL_MASK 0x07f00000 #define AFMT_CHANNEL_SHIFT 20 -#define AFMT_EXTCHANNEL_MASK 0x0e000000 -#define AFMT_EXTCHANNEL_SHIFT 25 +#define AFMT_CHANNEL_MAX 0x7f +#define AFMT_EXTCHANNEL_MASK 0x08000000 +#define AFMT_EXTCHANNEL_SHIFT 27 +#define AFMT_EXTCHANNEL_MAX 1 #define AFMT_ENCODING(v) ((v) & AFMT_ENCODING_MASK) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/usb/uaudio.c Wed Jun 3 15:32:43 2015 (r283950) @@ -121,6 +121,8 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ +#define UAUDIO_CHANNELS_MAX MIN(64, AFMT_CHANNEL_MAX) +#define UAUDIO_MATRIX_MAX 8 /* channels */ #define MAKE_WORD(h,l) (((h) << 8) | (l)) #define BIT_TEST(bm,bno) (((bm)[(bno) / 8] >> (7 - ((bno) % 8))) & 1) @@ -352,6 +354,7 @@ struct uaudio_softc { uint8_t sc_uq_au_no_xu:1; uint8_t sc_uq_bad_adc:1; uint8_t sc_uq_au_vendor_class:1; + uint8_t sc_pcm_bitperfect:1; }; struct uaudio_terminal_node { @@ -1068,6 +1071,10 @@ uaudio_attach_sub(device_t dev, kobj_cla */ uaudio_pcm_setflags(dev, SD_F_SOFTPCMVOL); } + if (sc->sc_pcm_bitperfect) { + DPRINTF("device needs bitperfect by default\n"); + uaudio_pcm_setflags(dev, SD_F_BITPERFECT); + } if (mixer_init(dev, mixer_class, sc)) goto detach; sc->sc_mixer_init = 1; @@ -1842,19 +1849,21 @@ uaudio_chan_fill_info_sub(struct uaudio_ format = chan_alt->p_fmt->freebsd_fmt; + /* get default SND_FORMAT() */ + format = SND_FORMAT(format, chan_alt->channels, 0); + switch (chan_alt->channels) { - case 2: - /* stereo */ - format = SND_FORMAT(format, 2, 0); - break; + uint32_t temp_fmt; case 1: - /* mono */ - format = SND_FORMAT(format, 1, 0); + case 2: + /* mono and stereo */ break; default: /* surround and more */ - format = feeder_matrix_default_format( - SND_FORMAT(format, chan_alt->channels, 0)); + temp_fmt = feeder_matrix_default_format(format); + /* if multichannel, then format can be zero */ + if (temp_fmt != 0) + format = temp_fmt; break; } @@ -1881,6 +1890,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan->pcm_cap.fmtlist = chan->pcm_format; chan->pcm_cap.fmtlist[0] = format; + /* check if device needs bitperfect */ + if (chan_alt->channels > UAUDIO_MATRIX_MAX) + sc->sc_pcm_bitperfect = 1; + if (rate < chan->pcm_cap.minspeed || chan->pcm_cap.minspeed == 0) chan->pcm_cap.minspeed = rate; if (rate > chan->pcm_cap.maxspeed || chan->pcm_cap.maxspeed == 0) @@ -1955,15 +1968,15 @@ uaudio_chan_fill_info(struct uaudio_soft channels = 4; break; default: - channels = 16; + channels = UAUDIO_CHANNELS_MAX; break; } - } else if (channels > 16) { - channels = 16; - } - if (sbuf_new(&sc->sc_sndstat, NULL, 4096, SBUF_AUTOEXTEND)) { + } else if (channels > UAUDIO_CHANNELS_MAX) + channels = UAUDIO_CHANNELS_MAX; + + if (sbuf_new(&sc->sc_sndstat, NULL, 4096, SBUF_AUTOEXTEND)) sc->sc_sndstat_valid = 1; - } + /* try to search for a valid config */ for (x = channels; x; x--) { Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/sys/param.h Wed Jun 3 15:32:43 2015 (r283950) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1001516 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001517 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 15:41:04 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03F1E6BF; Wed, 3 Jun 2015 15:41:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAB01178F; Wed, 3 Jun 2015 15:41:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Ff3co018245; Wed, 3 Jun 2015 15:41:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53Ff3S5018244; Wed, 3 Jun 2015 15:41:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506031541.t53Ff3S5018244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jun 2015 15:41:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283951 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 15:41:04 -0000 Author: hselasky Date: Wed Jun 3 15:41:03 2015 New Revision: 283951 URL: https://svnweb.freebsd.org/changeset/base/283951 Log: MFC r283103: Fix for DWC OTG device side isochronous transfers. The even or odd isochronous frame bit needs to be flipped. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Wed Jun 3 15:32:43 2015 (r283950) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Wed Jun 3 15:41:03 2015 (r283951) @@ -1561,6 +1561,22 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc /* release FIFO */ dwc_otg_common_rx_ack(sc); + temp = sc->sc_out_ctl[td->ep_no]; + + /* check for isochronous mode */ + if ((temp & DIEPCTL_EPTYPE_MASK) == + (DIEPCTL_EPTYPE_ISOC << DIEPCTL_EPTYPE_SHIFT)) { + /* toggle odd or even frame bit */ + if (temp & DIEPCTL_SETD1PID) { + temp &= ~DIEPCTL_SETD1PID; + temp |= DIEPCTL_SETD0PID; + } else { + temp &= ~DIEPCTL_SETD0PID; + temp |= DIEPCTL_SETD1PID; + } + sc->sc_out_ctl[td->ep_no] = temp; + } + /* check if we are complete */ if ((td->remainder == 0) || got_short) { if (td->short_pkt) { @@ -2136,10 +2152,23 @@ repeat: temp = sc->sc_in_ctl[td->ep_no]; + /* check for isochronous mode */ + if ((temp & DIEPCTL_EPTYPE_MASK) == + (DIEPCTL_EPTYPE_ISOC << DIEPCTL_EPTYPE_SHIFT)) { + /* toggle odd or even frame bit */ + if (temp & DIEPCTL_SETD1PID) { + temp &= ~DIEPCTL_SETD1PID; + temp |= DIEPCTL_SETD0PID; + } else { + temp &= ~DIEPCTL_SETD0PID; + temp |= DIEPCTL_SETD1PID; + } + sc->sc_in_ctl[td->ep_no] = temp; + } + /* must enable before writing data to FIFO */ DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(td->ep_no), temp | - DIEPCTL_EPENA | - DIEPCTL_CNAK); + DIEPCTL_EPENA | DIEPCTL_CNAK); td->tx_bytes = count; From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 17:45:46 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A82576D1; Wed, 3 Jun 2015 17:45:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93AAB17FA; Wed, 3 Jun 2015 17:45:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53HjkFn081960; Wed, 3 Jun 2015 17:45:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53HjkYT081958; Wed, 3 Jun 2015 17:45:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506031745.t53HjkYT081958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 3 Jun 2015 17:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283958 - stable/10/contrib/traceroute X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 17:45:46 -0000 Author: tuexen Date: Wed Jun 3 17:45:45 2015 New Revision: 283958 URL: https://svnweb.freebsd.org/changeset/base/283958 Log: MFC r283784: Remove trailing whitespaces. MFC r283785: Require the embedded packet to contain 8 bytes after the IP header instead of only 4. This is guaranteed by RFC 792 and the verification of GRE, ICMP and TCP packets use 8 bytes. MFC r283786: There is no payload anymore. So compute the minimum packet length correctly and use 40 as the default (if the minumum allows it), as specified in the man page. MFC r283806: When the packet verification fails in verbose mode, print the correct number of words in host byte order. Also remove a stray 'x'. MFC r283808: Don't send malformed SCTP probe packets. MFC r283813: Use an empty string for field descriptions of unknown protocols. MFC r283817: Don't send illegal packets when using UDP-Lite. MFC r283819: A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only applies to UDP and UDP-Lite. MFC r283820: The code starts with base + 1 as the first port. Fix to documentation to match that. Modified: stable/10/contrib/traceroute/traceroute.8 stable/10/contrib/traceroute/traceroute.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/traceroute/traceroute.8 ============================================================================== --- stable/10/contrib/traceroute/traceroute.8 Wed Jun 3 17:10:52 2015 (r283957) +++ stable/10/contrib/traceroute/traceroute.8 Wed Jun 3 17:45:45 2015 (r283958) @@ -16,7 +16,7 @@ .\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $ .\" $FreeBSD$ .\" -.Dd June 19, 2012 +.Dd May 31, 2015 .Dt TRACEROUTE 8 .Os .Sh NAME @@ -65,7 +65,7 @@ Turn on AS# lookups and use the giv default. .It Fl e Firewall evasion mode. -Use fixed destination ports for UDP and TCP probes. +Use fixed destination ports for UDP, UDP-Lite, TCP and SCTP probes. The destination port does NOT increment with each packet sent. .It Fl f Ar first_ttl Set the initial time-to-live used in the first outgoing probe packet. @@ -110,21 +110,24 @@ Print hop addresses numerically rather t path). .It Fl P Ar proto Send packets of specified IP protocol. The currently supported protocols -are: UDP, TCP, GRE and ICMP. Other protocols may also be specified (either by -name or by number), though +are: UDP, UDP-Lite, TCP, SCTP, GRE and ICMP. Other protocols may also be +specified (either by name or by number), though .Nm does not implement any special knowledge of their packet formats. This option is useful for determining which router along a path may be blocking packets based on IP protocol number. But see BUGS below. .It Fl p Ar port -Protocol specific. For UDP and TCP, sets +Protocol specific. For UDP, UDP-Lite, TCP and SCTP, sets the base .Ar port number used in probes (default is 33434). -Traceroute hopes that nothing is listening on UDP ports -.Em base +Traceroute hopes that nothing is listening on UDP ports (or UDP-Lite ports +if used by +.Nm +and supported by the peer) +.Em base + 1 to -.Em base + nhops * nprobes - 1 +.Em base + nhops * nprobes at the destination host (so an ICMP PORT_UNREACHABLE message will be returned to terminate the route tracing). If something is listening on a port in the default range, this option can be used Modified: stable/10/contrib/traceroute/traceroute.c ============================================================================== --- stable/10/contrib/traceroute/traceroute.c Wed Jun 3 17:10:52 2015 (r283957) +++ stable/10/contrib/traceroute/traceroute.c Wed Jun 3 17:45:45 2015 (r283958) @@ -219,6 +219,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -367,9 +368,10 @@ void freehostinfo(struct hostinfo *); void getaddr(u_int32_t *, char *); struct hostinfo *gethostinfo(char *); u_short in_cksum(u_short *, int); +u_int32_t sctp_crc32c(const void *, u_int32_t); char *inetname(struct in_addr); int main(int, char **); -u_short p_cksum(struct ip *, u_short *, int); +u_short p_cksum(struct ip *, u_short *, int, int); int packet_ok(u_char *, int, struct sockaddr_in *, int); char *pr_type(u_char); void print(u_char *, int, struct sockaddr_in *); @@ -389,8 +391,12 @@ int usleep(u_int); void udp_prep(struct outdata *); int udp_check(const u_char *, int); +void udplite_prep(struct outdata *); +int udplite_check(const u_char *, int); void tcp_prep(struct outdata *); int tcp_check(const u_char *, int); +void sctp_prep(struct outdata *); +int sctp_check(const u_char *, int); void gre_prep(struct outdata *); int gre_check(const u_char *, int); void gen_prep(struct outdata *); @@ -424,6 +430,15 @@ struct outproto protos[] = { udp_check }, { + "udplite", + "spt dpt cov sum", + IPPROTO_UDPLITE, + sizeof(struct udphdr), + 32768 + 666, + udplite_prep, + udplite_check + }, + { "tcp", "spt dpt seq ack xxflwin sum urp", IPPROTO_TCP, @@ -433,6 +448,15 @@ struct outproto protos[] = { tcp_check }, { + "sctp", + "spt dpt vtag crc tyfllen tyfllen ", + IPPROTO_SCTP, + sizeof(struct sctphdr), + 32768 + 666, + sctp_prep, + sctp_check + }, + { "gre", "flg pro len clid", IPPROTO_GRE, @@ -452,7 +476,7 @@ struct outproto protos[] = { }, { NULL, - NULL, + "", 0, 2 * sizeof(u_short), 0, @@ -541,12 +565,12 @@ main(int argc, char **argv) case 'a': as_path = 1; break; - + case 'A': as_path = 1; as_server = optarg; break; - + case 'd': options |= SO_DEBUG; break; @@ -669,8 +693,11 @@ main(int argc, char **argv) if (lsrr > 0) optlen = (lsrr + 1) * sizeof(gwlist[0]); - minpacket = sizeof(*outip) + proto->hdrlen + sizeof(struct outdata) + optlen; - packlen = minpacket; /* minimum sized packet */ + minpacket = sizeof(*outip) + proto->hdrlen + optlen; + if (minpacket > 40) + packlen = minpacket; + else + packlen = 40; /* Process destination and optional packet size */ switch (argc - optind) { @@ -704,6 +731,11 @@ main(int argc, char **argv) #endif protlen = packlen - sizeof(*outip) - optlen; + if ((proto->num == IPPROTO_SCTP) && (packlen & 3)) { + Fprintf(stderr, "%s: packet length must be a multiple of 4\n", + prog); + exit(1); + } outip = (struct ip *)malloc((unsigned)packlen); if (outip == NULL) { @@ -931,7 +963,7 @@ main(int argc, char **argv) as_path = 0; } } - + #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) if (setpolicy(sndsock, "in bypass") < 0) errx(1, "%s", ipsec_strerror()); @@ -1330,7 +1362,7 @@ packet_ok(register u_char *buf, int cc, hiplen = ((u_char *)icp + cc) - (u_char *)hip; hlen = hip->ip_hl << 2; inner = (u_char *)((u_char *)hip + hlen); - if (hlen + 12 <= cc + if (hlen + 16 <= cc && hip->ip_p == proto->num && (*proto->check)(inner, (u_char)seq)) return (type == ICMP_TIMXCEED ? -1 : code + 1); @@ -1343,8 +1375,8 @@ packet_ok(register u_char *buf, int cc, Printf("\n%d bytes from %s to ", cc, inet_ntoa(from->sin_addr)); Printf("%s: icmp type %d (%s) code %d\n", inet_ntoa(ip->ip_dst), type, pr_type(type), icp->icmp_code); - for (i = 4; i < cc ; i += sizeof(*lp)) - Printf("%2d: x%8.8x\n", i, *lp++); + for (i = 4; i <= cc - ICMP_MINLEN; i += sizeof(*lp)) + Printf("%2d: %8.8x\n", i, ntohl(*lp++)); } #endif return(0); @@ -1383,7 +1415,7 @@ udp_prep(struct outdata *outdata) outudp->uh_ulen = htons((u_short)protlen); outudp->uh_sum = 0; if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)outudp, protlen); + u_short sum = p_cksum(outip, (u_short*)outudp, protlen, protlen); outudp->uh_sum = (sum) ? sum : 0xffff; } @@ -1400,6 +1432,32 @@ udp_check(const u_char *data, int seq) } void +udplite_prep(struct outdata *outdata) +{ + struct udphdr *const outudp = (struct udphdr *) outp; + + outudp->uh_sport = htons(ident + (fixedPort ? outdata->seq : 0)); + outudp->uh_dport = htons(port + (fixedPort ? 0 : outdata->seq)); + outudp->uh_ulen = htons(8); + outudp->uh_sum = 0; + if (doipcksum) { + u_short sum = p_cksum(outip, (u_short*)outudp, protlen, 8); + outudp->uh_sum = (sum) ? sum : 0xffff; + } + + return; +} + +int +udplite_check(const u_char *data, int seq) +{ + struct udphdr *const udp = (struct udphdr *) data; + + return (ntohs(udp->uh_sport) == ident + (fixedPort ? seq : 0) && + ntohs(udp->uh_dport) == port + (fixedPort ? 0 : seq)); +} + +void tcp_prep(struct outdata *outdata) { struct tcphdr *const tcp = (struct tcphdr *) outp; @@ -1412,10 +1470,8 @@ tcp_prep(struct outdata *outdata) tcp->th_flags = TH_SYN; tcp->th_sum = 0; - if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)tcp, protlen); - tcp->th_sum = (sum) ? sum : 0xffff; - } + if (doipcksum) + tcp->th_sum = p_cksum(outip, (u_short*)tcp, protlen, protlen); } int @@ -1429,6 +1485,47 @@ tcp_check(const u_char *data, int seq) } void +sctp_prep(struct outdata *outdata) +{ + struct sctphdr *const sctp = (struct sctphdr *) outp; + struct sctp_chunkhdr *chk; + + sctp->src_port = htons(ident); + sctp->dest_port = htons(port + (fixedPort ? 0 : outdata->seq)); + sctp->v_tag = (sctp->src_port << 16) | sctp->dest_port; + sctp->checksum = htonl(0); + if (protlen >= + (int)(sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))) { + chk = (struct sctp_chunkhdr *)(sctp + 1); + chk->chunk_type = SCTP_SHUTDOWN_ACK; + chk->chunk_flags = 0; + chk->chunk_length = htons(4); + } + if (protlen >= + (int)(sizeof(struct sctphdr) + 2 * sizeof(struct sctp_chunkhdr))) { + chk = chk + 1; + chk->chunk_type = SCTP_PAD_CHUNK; + chk->chunk_flags = 0; + chk->chunk_length = htons(protlen - + (sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))); + } + if (doipcksum) { + sctp->checksum = sctp_crc32c(sctp, protlen); + } +} + +int +sctp_check(const u_char *data, int seq) +{ + struct sctphdr *const sctp = (struct sctphdr *) data; + + return (ntohs(sctp->src_port) == ident + && ntohs(sctp->dest_port) == port + (fixedPort ? 0 : seq) + && sctp->v_tag == + (u_int32_t)((sctp->src_port << 16) | sctp->dest_port)); +} + +void gre_prep(struct outdata *outdata) { struct grehdr *const gre = (struct grehdr *) outp; @@ -1494,8 +1591,8 @@ print(register u_char *buf, register int /* * Checksum routine for UDP and TCP headers. */ -u_short -p_cksum(struct ip *ip, u_short *data, int len) +u_short +p_cksum(struct ip *ip, u_short *data, int len, int cov) { static struct ipovly ipo; u_short sum[2]; @@ -1506,7 +1603,7 @@ p_cksum(struct ip *ip, u_short *data, in ipo.ih_dst = ip->ip_dst; sum[1] = in_cksum((u_short*)&ipo, sizeof(ipo)); /* pseudo ip hdr cksum */ - sum[0] = in_cksum(data, len); /* payload data cksum */ + sum[0] = in_cksum(data, cov); /* payload data cksum */ return ~in_cksum(sum, sizeof(sum)); } @@ -1547,6 +1644,98 @@ in_cksum(register u_short *addr, registe } /* + * CRC32C routine for the Stream Control Transmission Protocol + */ + +#define CRC32C(c, d) (c = (c>>8) ^ crc_c[(c^(d))&0xFF]) + +static u_int32_t crc_c[256] = { + 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, + 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, + 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, + 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, + 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, + 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, + 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, + 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, + 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, + 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, + 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, + 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, + 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, + 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, + 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, + 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, + 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, + 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, + 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, + 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, + 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, + 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, + 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, + 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, + 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, + 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, + 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, + 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, + 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, + 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, + 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, + 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, + 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, + 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, + 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, + 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, + 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, + 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, + 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, + 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, + 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, + 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, + 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, + 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, + 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, + 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, + 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, + 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, + 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, + 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, + 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, + 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, + 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, + 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, + 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, + 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, + 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, + 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, + 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, + 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, + 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, + 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, + 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, + 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 +}; + +u_int32_t +sctp_crc32c(const void *packet, u_int32_t len) +{ + u_int32_t i, crc32c; + u_int8_t byte0, byte1, byte2, byte3; + const u_int8_t *buf = (const u_int8_t *)packet; + + crc32c = ~0; + for (i = 0; i < len; i++) + CRC32C(crc32c, buf[i]); + crc32c = ~crc32c; + byte0 = crc32c & 0xff; + byte1 = (crc32c>>8) & 0xff; + byte2 = (crc32c>>16) & 0xff; + byte3 = (crc32c>>24) & 0xff; + crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3); + return htonl(crc32c); +} + +/* * Subtract 2 timeval structs: out = out - in. * Out is assumed to be within about LONG_MAX seconds of in. */ From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 18:33:48 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBFC65E5; Wed, 3 Jun 2015 18:33:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C3F31505; Wed, 3 Jun 2015 18:33:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53IXmwZ006972; Wed, 3 Jun 2015 18:33:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53IXmLI006969; Wed, 3 Jun 2015 18:33:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031833.t53IXmLI006969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 18:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283960 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 18:33:48 -0000 Author: emaste Date: Wed Jun 3 18:33:47 2015 New Revision: 283960 URL: https://svnweb.freebsd.org/changeset/base/283960 Log: MFC r259438 by pjd: Fix syscalls that can be loaded as kernel modules They were not given the flag allowing to call them from capability mode sandbox. And regenerate init_sysent.c Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/init_sysent.c stable/10/sys/kern/makesyscalls.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed Jun 3 18:01:09 2015 (r283959) +++ stable/10/sys/kern/init_sysent.c Wed Jun 3 18:33:47 2015 (r283960) @@ -289,9 +289,9 @@ struct sysent sysent[] = { { AS(openbsd_poll_args), (sy_call_t *)sys_openbsd_poll, AUE_POLL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 252 = openbsd_poll */ { 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 253 = issetugid */ { AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = lchown */ - { AS(aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 255 = aio_read */ - { AS(aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 256 = aio_write */ - { AS(lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 257 = lio_listio */ + { AS(aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 255 = aio_read */ + { AS(aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 256 = aio_write */ + { AS(lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 257 = lio_listio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 258 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 259 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 260 = nosys */ @@ -348,13 +348,13 @@ struct sysent sysent[] = { { AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 311 = setresuid */ { AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 312 = setresgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = obsolete signanosleep */ - { AS(aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 314 = aio_return */ - { AS(aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 315 = aio_suspend */ - { AS(aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 316 = aio_cancel */ - { AS(aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 317 = aio_error */ - { AS(oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 318 = oaio_read */ - { AS(oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 319 = oaio_write */ - { AS(olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 320 = olio_listio */ + { AS(aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 314 = aio_return */ + { AS(aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 315 = aio_suspend */ + { AS(aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 316 = aio_cancel */ + { AS(aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 317 = aio_error */ + { AS(oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 318 = oaio_read */ + { AS(oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 319 = oaio_write */ + { AS(olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 320 = olio_listio */ { 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 321 = yield */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 322 = obsolete thr_sleep */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 323 = obsolete thr_wakeup */ @@ -393,7 +393,7 @@ struct sysent sysent[] = { { AS(extattr_set_file_args), (sy_call_t *)sys_extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 356 = extattr_set_file */ { AS(extattr_get_file_args), (sy_call_t *)sys_extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 357 = extattr_get_file */ { AS(extattr_delete_file_args), (sy_call_t *)sys_extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 358 = extattr_delete_file */ - { AS(aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 359 = aio_waitcomplete */ + { AS(aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 359 = aio_waitcomplete */ { AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 360 = getresuid */ { AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 361 = getresgid */ { 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 362 = kqueue */ @@ -492,14 +492,14 @@ struct sysent sysent[] = { { AS(thr_new_args), (sy_call_t *)sys_thr_new, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 455 = thr_new */ { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 456 = sigqueue */ { AS(kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 457 = kmq_open */ - { AS(kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 458 = kmq_setattr */ - { AS(kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 459 = kmq_timedreceive */ - { AS(kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 460 = kmq_timedsend */ - { AS(kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 461 = kmq_notify */ + { AS(kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 458 = kmq_setattr */ + { AS(kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 459 = kmq_timedreceive */ + { AS(kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 460 = kmq_timedsend */ + { AS(kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 461 = kmq_notify */ { AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 462 = kmq_unlink */ { AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 463 = abort2 */ { AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 464 = thr_set_name */ - { AS(aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 465 = aio_fsync */ + { AS(aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 465 = aio_fsync */ { AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 466 = rtprio_thread */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 467 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */ Modified: stable/10/sys/kern/makesyscalls.sh ============================================================================== --- stable/10/sys/kern/makesyscalls.sh Wed Jun 3 18:01:09 2015 (r283959) +++ stable/10/sys/kern/makesyscalls.sh Wed Jun 3 18:33:47 2015 (r283960) @@ -459,7 +459,7 @@ s/\$//g printf("\t{ %s, (sy_call_t *)", argssize) > sysent column = 8 + 2 + length(argssize) + 15 if (flag("NOSTD")) { - printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT") > sysent + printf("lkmressys, AUE_NULL, NULL, 0, 0, %s, SY_THR_ABSENT },", flags) > sysent column = column + length("lkmressys") + length("AUE_NULL") + 3 } else { if (funcname == "nosys" || funcname == "sysarch" || From owner-svn-src-stable-10@FreeBSD.ORG Wed Jun 3 22:24:58 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24F35BF7; Wed, 3 Jun 2015 22:24:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12C2E1E4C; Wed, 3 Jun 2015 22:24:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53MOvpi023516; Wed, 3 Jun 2015 22:24:57 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53MOvfw023515; Wed, 3 Jun 2015 22:24:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506032224.t53MOvfw023515@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 3 Jun 2015 22:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283971 - stable/10/sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 22:24:58 -0000 Author: dteske Date: Wed Jun 3 22:24:57 2015 New Revision: 283971 URL: https://svnweb.freebsd.org/changeset/base/283971 Log: MFC r268254 (jmg): Add a hint that you can enable this by default if you want; necessary if you want the keyboard break to work early in boot. Modified: stable/10/sys/boot/forth/loader.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Wed Jun 3 22:01:13 2015 (r283970) +++ stable/10/sys/boot/forth/loader.conf Wed Jun 3 22:24:57 2015 (r283971) @@ -138,6 +138,7 @@ module_path="/boot/modules" # Set the mo #vfs.root.mountfrom="" # Specify root partition in a way the # kernel understands #vm.kmem_size="" # Sets the size of kernel memory (bytes) +#debug.kdb.break_to_debugger="0" # Allow console to break into debugger. #debug.ktr.cpumask="0xf" # Bitmask of CPUs to enable KTR on #debug.ktr.mask="0x1200" # Bitmask of KTR events to enable #debug.ktr.verbose="1" # Enable console dump of KTR events From owner-svn-src-stable-10@FreeBSD.ORG Thu Jun 4 01:52:18 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B528A263; Thu, 4 Jun 2015 01:52:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A411D46; Thu, 4 Jun 2015 01:52:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t541qIpq026599; Thu, 4 Jun 2015 01:52:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t541qIME026598; Thu, 4 Jun 2015 01:52:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506040152.t541qIME026598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Jun 2015 01:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283972 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2015 01:52:18 -0000 Author: ian Date: Thu Jun 4 01:52:17 2015 New Revision: 283972 URL: https://svnweb.freebsd.org/changeset/base/283972 Log: MFC r262955: Add 3wire and std as terminal types/classes. These are similar to the existing terminal types/classes that have the baudrate suffix, but differ in that no baudrate is set/defined. Modified: stable/10/etc/gettytab Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/gettytab ============================================================================== --- stable/10/etc/gettytab Wed Jun 3 22:24:57 2015 (r283971) +++ stable/10/etc/gettytab Thu Jun 4 01:52:17 2015 (r283972) @@ -49,6 +49,8 @@ default:\ # autobaud code in getty, and likewise can # be assigned to any table desired (hopefully the same speed). # +std:\ + :np:sp#0: a|std.110|110-baud:\ :np:nd#1:cd#1:uc:sp#110: b|std.134|134.5-baud:\ @@ -219,6 +221,8 @@ al.230400:\ # Entries for 3-wire serial terminals. These don't supply carrier, so # clocal needs to be set, and crtscts needs to be unset. # +3wire:\ + :np:nc:sp#0: 3wire.9600|9600-3wire:\ :np:nc:sp#9600: 3wire.19200|19200-3wire:\ From owner-svn-src-stable-10@FreeBSD.ORG Thu Jun 4 04:50:53 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9969D70D; Thu, 4 Jun 2015 04:50:53 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 863BD1584; Thu, 4 Jun 2015 04:50:53 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t544orAK012583; Thu, 4 Jun 2015 04:50:53 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t544orJN012582; Thu, 4 Jun 2015 04:50:53 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201506040450.t544orJN012582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Thu, 4 Jun 2015 04:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283977 - stable/10/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2015 04:50:53 -0000 Author: pkelsey Date: Thu Jun 4 04:50:52 2015 New Revision: 283977 URL: https://svnweb.freebsd.org/changeset/base/283977 Log: MFC r283652: Provide an unambiguous description of the potential hazard in calling pthread_setspecific(3) from a key destructor. Modified: stable/10/share/man/man3/pthread_setspecific.3 Modified: stable/10/share/man/man3/pthread_setspecific.3 ============================================================================== --- stable/10/share/man/man3/pthread_setspecific.3 Thu Jun 4 02:50:13 2015 (r283976) +++ stable/10/share/man/man3/pthread_setspecific.3 Thu Jun 4 04:50:52 2015 (r283977) @@ -67,7 +67,10 @@ is undefined. The .Fn pthread_setspecific function may be called from a thread-specific data destructor function, -however this may result in lost storage or infinite loops. +however this may result in lost storage or infinite loops if doing so +causes non-NULL key values to remain after +.Bq PTHREAD_DESTRUCTOR_ITERATIONS +iterations of destructor calls have been made. .Sh RETURN VALUES If successful, the .Fn pthread_setspecific From owner-svn-src-stable-10@FreeBSD.ORG Thu Jun 4 04:54:55 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B836898; Thu, 4 Jun 2015 04:54:55 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08A941707; Thu, 4 Jun 2015 04:54:55 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t544ssIM016043; Thu, 4 Jun 2015 04:54:54 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t544ssSN016042; Thu, 4 Jun 2015 04:54:54 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201506040454.t544ssSN016042@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Thu, 4 Jun 2015 04:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283978 - stable/10/sbin/dhclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2015 04:54:55 -0000 Author: pkelsey Date: Thu Jun 4 04:54:54 2015 New Revision: 283978 URL: https://svnweb.freebsd.org/changeset/base/283978 Log: MFC r283641: Add CAP_FCNTL to the lease file capsicum rights, and limit to CAP_FCNTL_GETFL. Without CAP_FCNTL_GETFL, the lease file truncation in rewrite_client_leases() will fail to trim old data when rewriting the file with a lesser amount of data. Modified: stable/10/sbin/dhclient/dhclient.c Modified: stable/10/sbin/dhclient/dhclient.c ============================================================================== --- stable/10/sbin/dhclient/dhclient.c Thu Jun 4 04:50:52 2015 (r283977) +++ stable/10/sbin/dhclient/dhclient.c Thu Jun 4 04:54:54 2015 (r283978) @@ -1847,12 +1847,16 @@ rewrite_client_leases(void) leaseFile = fopen(path_dhclient_db, "w"); if (!leaseFile) error("can't create %s: %m", path_dhclient_db); - cap_rights_init(&rights, CAP_FSTAT, CAP_FSYNC, CAP_FTRUNCATE, - CAP_SEEK, CAP_WRITE); + cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_FSYNC, + CAP_FTRUNCATE, CAP_SEEK, CAP_WRITE); if (cap_rights_limit(fileno(leaseFile), &rights) < 0 && errno != ENOSYS) { error("can't limit lease descriptor: %m"); } + if (cap_fcntls_limit(fileno(leaseFile), CAP_FCNTL_GETFL) < 0 && + errno != ENOSYS) { + error("can't limit lease descriptor fcntls: %m"); + } } else { fflush(leaseFile); rewind(leaseFile); From owner-svn-src-stable-10@FreeBSD.ORG Thu Jun 4 12:35:01 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 655B9513; Thu, 4 Jun 2015 12:35:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5286F182C; Thu, 4 Jun 2015 12:35:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54CZ15E048415; Thu, 4 Jun 2015 12:35:01 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54CZ1dJ048413; Thu, 4 Jun 2015 12:35:01 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201506041235.t54CZ1dJ048413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 4 Jun 2015 12:35:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283987 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2015 12:35:01 -0000 Author: rmacklem Date: Thu Jun 4 12:35:00 2015 New Revision: 283987 URL: https://svnweb.freebsd.org/changeset/base/283987 Log: MFC: r283273 The NFS client wasn't handling getdirentries(2) requests for sizes that are not an exact multiple of DIRBLKSIZ correctly. Fortunately readdir(3) always uses an exact multiple of DIRBLKSIZ, so few applications were affected. This patch fixes this problem by reducing the size of the directory read to an exact multiple of DIRBLKSIZ. Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvnops.c Thu Jun 4 10:55:36 2015 (r283986) +++ stable/10/sys/fs/nfsclient/nfs_clvnops.c Thu Jun 4 12:35:00 2015 (r283987) @@ -2211,7 +2211,7 @@ nfs_readdir(struct vop_readdir_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); struct uio *uio = ap->a_uio; - ssize_t tresid; + ssize_t tresid, left; int error = 0; struct vattr vattr; @@ -2240,6 +2240,17 @@ nfs_readdir(struct vop_readdir_args *ap) } /* + * NFS always guarantees that directory entries don't straddle + * DIRBLKSIZ boundaries. As such, we need to limit the size + * to an exact multiple of DIRBLKSIZ, to avoid copying a partial + * directory entry. + */ + left = uio->uio_resid % DIRBLKSIZ; + if (left == uio->uio_resid) + return (EINVAL); + uio->uio_resid -= left; + + /* * Call ncl_bioread() to do the real work. */ tresid = uio->uio_resid; @@ -2250,6 +2261,9 @@ nfs_readdir(struct vop_readdir_args *ap) if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; } + + /* Add the partial DIRBLKSIZ (left) back in. */ + uio->uio_resid += left; return (error); } From owner-svn-src-stable-10@FreeBSD.ORG Thu Jun 4 16:27:24 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CF67D5E; Thu, 4 Jun 2015 16:27:24 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48B31103F; Thu, 4 Jun 2015 16:27:24 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54GROA5063641; Thu, 4 Jun 2015 16:27:24 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54GRJB1063616; Thu, 4 Jun 2015 16:27:19 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201506041627.t54GRJB1063616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Thu, 4 Jun 2015 16:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283990 - in stable/10/sys/dev/mpr: . mpi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2015 16:27:24 -0000 Author: slm Date: Thu Jun 4 16:27:18 2015 New Revision: 283990 URL: https://svnweb.freebsd.org/changeset/base/283990 Log: MFC: r283661 - Updated all files with 2015 Avago copyright, and updated LSI's copyright dates. - Changed all of the PCI device strings from LSI to Avago Technologies (LSI). - Added a sysctl variable to control how StartStopUnit behavior works. User can select to spin down disks based on if disk is SSD or HDD. - Inquiry data is required to tell if a disk will support SSU at shutdown or not. Due to the addition of mprssas_async, which gets Advanced Info but not Inquiry data, the setting of supports_SSU was moved to the mprsas_scsiio_complete function, which snoops for any Inquiry commands. And, since disks are shutdown as a target and not a LUN, this process was simplified by basing it on targets and not LUNs. - Added a sysctl variable that sets the amount of time to retry after sending a failed SATA ID command. This helps with some bad disks and large disks that require a lot of time to spin up. Part of this change was to add a callout to handle timeouts with the SATA ID command. The callout function is called mprsas_ata_id_timeout(). (Fixes PR 191348) - Changed the way resets work by allowing I/O to continue to devices that are not currently under a reset condition. This uses devq's instead of simq's and makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function called mprsas_prepare_tm(). - Some changes were made to reduce code duplication when getting a SAS address for a SATA disk. - Fixed some formatting and whitespace. - Bump version of mpr driver to 9.255.01.00-fbsd PR: 191348 Modified: stable/10/sys/dev/mpr/mpi/mpi2.h stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h stable/10/sys/dev/mpr/mpi/mpi2_hbd.h stable/10/sys/dev/mpr/mpi/mpi2_history.txt stable/10/sys/dev/mpr/mpi/mpi2_init.h stable/10/sys/dev/mpr/mpi/mpi2_ioc.h stable/10/sys/dev/mpr/mpi/mpi2_ra.h stable/10/sys/dev/mpr/mpi/mpi2_raid.h stable/10/sys/dev/mpr/mpi/mpi2_sas.h stable/10/sys/dev/mpr/mpi/mpi2_targ.h stable/10/sys/dev/mpr/mpi/mpi2_tool.h stable/10/sys/dev/mpr/mpi/mpi2_type.h stable/10/sys/dev/mpr/mpr.c stable/10/sys/dev/mpr/mpr_config.c stable/10/sys/dev/mpr/mpr_ioctl.h stable/10/sys/dev/mpr/mpr_mapping.c stable/10/sys/dev/mpr/mpr_mapping.h stable/10/sys/dev/mpr/mpr_pci.c stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mpr/mpr_sas.h stable/10/sys/dev/mpr/mpr_sas_lsi.c stable/10/sys/dev/mpr/mpr_user.c stable/10/sys/dev/mpr/mprvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpr/mpi/mpi2.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_cnfg.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_hbd.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_hbd.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_hbd.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2009-2011 LSI Corporation. + * Copyright (c) 2009-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_hbd.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_history.txt ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_history.txt Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_history.txt Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ @@ -35,7 +36,8 @@ Fusion-MPT MPI 2.0 / 2.5 Header File Change History ============================== - Copyright (c) 2000-2013 LSI Corporation. + Copyright (c) 2000-2015 LSI Corporation. + Copyright (c) 2013-2015 Avago Technologies --------------------------------------- Header Set Release Version: 02.00.33 Modified: stable/10/sys/dev/mpr/mpi/mpi2_init.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_init.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_init.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_init.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_ioc.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_ioc.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_ioc.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_ioc.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_ra.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_ra.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_ra.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2009 LSI Corporation. + * Copyright (c) 2012-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_ra.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_raid.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_raid.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_raid.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_raid.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_sas.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_sas.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_sas.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_sas.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_targ.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_targ.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_targ.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_targ.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_tool.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_tool.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_tool.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_tool.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_type.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_type.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_type.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2007 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_type.h Modified: stable/10/sys/dev/mpr/mpr.c ============================================================================== --- stable/10/sys/dev/mpr/mpr.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr.c Thu Jun 4 16:27:18 2015 (r283990) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * Copyright (c) 2012-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,12 +25,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD + * */ #include __FBSDID("$FreeBSD$"); -/* Communications core for LSI MPT2 */ +/* Communications core for Avago Technologies (LSI) MPT3 */ /* TODO Move headers to mprvar */ #include @@ -72,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include static int mpr_diag_reset(struct mpr_softc *sc, int sleep_flag); static int mpr_init_queues(struct mpr_softc *sc); @@ -352,11 +354,9 @@ mpr_transition_operational(struct mpr_so static int mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t attaching) { - int error, i; + int error; Mpi2IOCFactsReply_t saved_facts; uint8_t saved_mode, reallocating; - struct mprsas_lun *lun, *lun_tmp; - struct mprsas_target *targ; mpr_dprint(sc, MPR_TRACE, "%s\n", __func__); @@ -513,27 +513,7 @@ mpr_iocfacts_allocate(struct mpr_softc * */ if (reallocating) { mpr_iocfacts_free(sc); - - /* - * The number of targets is based on IOC Facts, so free all of - * the allocated LUNs for each target and then the target buffer - * itself. - */ - for (i=0; i< saved_facts.MaxTargets; i++) { - targ = &sc->sassc->targets[i]; - SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, - lun_tmp) { - free(lun, M_MPR); - } - } - free(sc->sassc->targets, M_MPR); - - sc->sassc->targets = malloc(sizeof(struct mprsas_target) * - sc->facts->MaxTargets, M_MPR, M_WAITOK|M_ZERO); - if (!sc->sassc->targets) { - panic("%s failed to alloc targets with error %d\n", - __func__, ENOMEM); - } + mprsas_realloc_targets(sc, saved_facts.MaxTargets); } /* @@ -775,7 +755,7 @@ mpr_reinit(struct mpr_softc *sc) /* the end of discovery will release the simq, so we're done. */ mpr_dprint(sc, MPR_INFO, "%s finished sc %p post %u free %u\n", __func__, sc, sc->replypostindex, sc->replyfreeindex); - mprsas_release_simq_reinit(sassc); + mprsas_release_simq_reinit(sassc); return 0; } @@ -816,7 +796,8 @@ mpr_wait_db_ack(struct mpr_softc *sc, in * 0.5 milisecond */ if (mtx_owned(&sc->mpr_mtx) && sleep_flag == CAN_SLEEP) - msleep(&sc->msleep_fake_chan, &sc->mpr_mtx, 0, "mprdba", hz/1000); + msleep(&sc->msleep_fake_chan, &sc->mpr_mtx, 0, "mprdba", + hz/1000); else if (sleep_flag == CAN_SLEEP) pause("mprdba", hz/1000); else @@ -982,7 +963,7 @@ mpr_enqueue_request(struct mpr_softc *sc reply_descriptor rd; MPR_FUNCTRACE(sc); - mpr_dprint(sc, MPR_TRACE, "%s SMID %u cm %p ccb %p\n", __func__, + mpr_dprint(sc, MPR_TRACE, "SMID %u cm %p ccb %p\n", cm->cm_desc.Default.SMID, cm, cm->cm_ccb); if (sc->mpr_flags & MPR_FLAGS_ATTACH_DONE && !(sc->mpr_flags & @@ -1372,6 +1353,8 @@ mpr_get_tunables(struct mpr_softc *sc) sc->disable_msix = 0; sc->disable_msi = 0; sc->max_chains = MPR_CHAIN_FRAMES; + sc->enable_ssu = MPR_SSU_ENABLE_SSD_DISABLE_HDD; + sc->spinup_wait_time = DEFAULT_SPINUP_WAIT; /* * Grab the global variables. @@ -1380,6 +1363,8 @@ mpr_get_tunables(struct mpr_softc *sc) TUNABLE_INT_FETCH("hw.mpr.disable_msix", &sc->disable_msix); TUNABLE_INT_FETCH("hw.mpr.disable_msi", &sc->disable_msi); TUNABLE_INT_FETCH("hw.mpr.max_chains", &sc->max_chains); + TUNABLE_INT_FETCH("hw.mpr.enable_ssu", &sc->enable_ssu); + TUNABLE_INT_FETCH("hw.mpr.spinup_wait_time", &sc->spinup_wait_time); /* Grab the unit-instance variables */ snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.debug_level", @@ -1402,6 +1387,14 @@ mpr_get_tunables(struct mpr_softc *sc) snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.exclude_ids", device_get_unit(sc->mpr_dev)); TUNABLE_STR_FETCH(tmpstr, sc->exclude_ids, sizeof(sc->exclude_ids)); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.enable_ssu", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->enable_ssu); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.spinup_wait_time", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->spinup_wait_time); } static void @@ -1474,11 +1467,20 @@ mpr_setup_sysctl(struct mpr_softc *sc) OID_AUTO, "max_chains", CTLFLAG_RD, &sc->max_chains, 0,"maximum chain frames that will be allocated"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "enable_ssu", CTLFLAG_RW, &sc->enable_ssu, 0, + "enable SSU to SATA SSD/HDD at shutdown"); + #if __FreeBSD_version >= 900030 SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "chain_alloc_fail", CTLFLAG_RD, &sc->chain_alloc_fail, "chain allocation failures"); #endif //FreeBSD_version >= 900030 + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "spinup_wait_time", CTLFLAG_RD, + &sc->spinup_wait_time, DEFAULT_SPINUP_WAIT, "seconds to wait for " + "spinup after SATA ID error"); } int @@ -2096,7 +2098,7 @@ mpr_update_events(struct mpr_softc *sc, (reply->IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) error = ENXIO; - if(reply) + if (reply) mpr_print_event(sc, reply); mpr_dprint(sc, MPR_TRACE, "%s finished error %d\n", __func__, error); @@ -2163,8 +2165,8 @@ mpr_deregister_events(struct mpr_softc * * Add a chain element as the next SGE for the specified command. * Reset cm_sge and cm_sgesize to indicate all the available space. Chains are * only required for IEEE commands. Therefore there is no code for commands - * that have the MPR_CM_FLAGS_SGE_SIMPLE flag set (and those commands shouldn't - * be requesting chains). + * that have the MPR_CM_FLAGS_SGE_SIMPLE flag set (and those commands + * shouldn't be requesting chains). */ static int mpr_add_chain(struct mpr_command *cm, int segsleft) @@ -2246,9 +2248,9 @@ mpr_add_chain(struct mpr_command *cm, in /* * Add one scatter-gather element to the scatter-gather list for a command. - * Maintain cm_sglsize and cm_sge as the remaining size and pointer to the next - * SGE to fill in, respectively. In Gen3, the MPI SGL does not have a chain, - * so don't consider any chain additions. + * Maintain cm_sglsize and cm_sge as the remaining size and pointer to the + * next SGE to fill in, respectively. In Gen3, the MPI SGL does not have a + * chain, so don't consider any chain additions. */ int mpr_push_sge(struct mpr_command *cm, MPI2_SGE_SIMPLE64 *sge, size_t len, @@ -2660,7 +2662,7 @@ mpr_request_polled(struct mpr_softc *sc, } } - if(error) { + if (error) { mpr_dprint(sc, MPR_FAULT, "Calling Reinit from %s\n", __func__); rc = mpr_reinit(sc); mpr_dprint(sc, MPR_FAULT, "Reinit %s\n", (rc == 0) ? @@ -2717,9 +2719,12 @@ mpr_read_config_page(struct mpr_softc *s cm->cm_data = params->buffer; cm->cm_length = params->length; - cm->cm_sge = &req->PageBufferSGE; - cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); - cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; + if (cm->cm_data != NULL) { + cm->cm_sge = &req->PageBufferSGE; + cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); + cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; + } else + cm->cm_sge = NULL; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_complete_data = params; @@ -2776,9 +2781,12 @@ mpr_config_complete(struct mpr_softc *sc goto done; } params->status = reply->IOCStatus; - if (params->hdr.Ext.ExtPageType != 0) { + if (params->hdr.Struct.PageType == MPI2_CONFIG_PAGETYPE_EXTENDED) { params->hdr.Ext.ExtPageType = reply->ExtPageType; params->hdr.Ext.ExtPageLength = reply->ExtPageLength; + params->hdr.Ext.PageType = reply->Header.PageType; + params->hdr.Ext.PageNumber = reply->Header.PageNumber; + params->hdr.Ext.PageVersion = reply->Header.PageVersion; } else { params->hdr.Struct.PageType = reply->Header.PageType; params->hdr.Struct.PageNumber = reply->Header.PageNumber; Modified: stable/10/sys/dev/mpr/mpr_config.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_config.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_config.c Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ #include Modified: stable/10/sys/dev/mpr/mpr_ioctl.h ============================================================================== --- stable/10/sys/dev/mpr/mpr_ioctl.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_ioctl.h Thu Jun 4 16:27:18 2015 (r283990) @@ -27,12 +27,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD userland interface + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD userland interface * * $FreeBSD$ */ /*- - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,7 +57,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ Modified: stable/10/sys/dev/mpr/mpr_mapping.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_mapping.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_mapping.c Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ #include @@ -326,11 +327,13 @@ _mapping_get_high_missing_mt_idx(struct { u32 map_idx, high_idx = MPR_ENCTABLE_BAD_IDX; u8 high_missing_count = 0; - u32 start_idx, end_idx, start_idx_ir = 0, end_idx_ir; + u32 start_idx, end_idx, start_idx_ir, end_idx_ir; struct dev_mapping_table *mt_entry; u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); start_idx = 0; + start_idx_ir = 0; + end_idx_ir = 0; end_idx = sc->max_devices; if (ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0) start_idx = 1; @@ -887,14 +890,14 @@ _mapping_get_dev_info(struct mpr_softc * u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); Mpi2ConfigReply_t mpi_reply; Mpi2SasDevicePage0_t sas_device_pg0; - u8 entry, enc_idx, phy_idx; + u8 entry, enc_idx, phy_idx, sata_end_device; u32 map_idx, index, device_info; struct _map_phy_change *phy_change, *tmp_phy_change; uint64_t sas_address; struct enc_mapping_table *et_entry; struct dev_mapping_table *mt_entry; u8 add_code = MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED; - int rc; + int rc = 1; for (entry = 0; entry < topo_change->num_entries; entry++) { phy_change = &topo_change->phy_details[entry]; @@ -908,41 +911,36 @@ _mapping_get_dev_info(struct mpr_softc * continue; } + /* + * Always get SATA Identify information because this is used + * to determine if Start/Stop Unit should be sent to the drive + * when the system is shutdown. + */ device_info = le32toh(sas_device_pg0.DeviceInfo); - if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) { - if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && - (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { - rc = mprsas_get_sas_address_for_sata_disk(sc, - &sas_address, phy_change->dev_handle, - device_info); - if (rc) { - printf("%s: failed to compute the " - "hashed SAS Address for SATA " - "device with handle 0x%04x\n", - __func__, phy_change->dev_handle); - sas_address = - sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; - } + sas_address = sas_device_pg0.SASAddress.High; + sas_address = (sas_address << 32) | + sas_device_pg0.SASAddress.Low; + sata_end_device = 0; + if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && + (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { + sata_end_device = 1; + rc = mprsas_get_sas_address_for_sata_disk(sc, + &sas_address, phy_change->dev_handle, device_info, + &phy_change->is_SATA_SSD); + if (rc) { + mpr_dprint(sc, MPR_ERROR, "%s: failed to get " + "disk type (SSD or HDD) and SAS Address " + "for SATA device with handle 0x%04x\n", + __func__, phy_change->dev_handle); + } else { mpr_dprint(sc, MPR_INFO, "SAS Address for SATA " "device = %jx\n", sas_address); - } else { - sas_address = - sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; } - } else { - sas_address = sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; } + phy_change->physical_id = sas_address; phy_change->slot = le16toh(sas_device_pg0.Slot); - phy_change->device_info = - le32toh(sas_device_pg0.DeviceInfo); + phy_change->device_info = le32toh(sas_device_pg0.DeviceInfo); if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { @@ -950,10 +948,10 @@ _mapping_get_dev_info(struct mpr_softc * topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - printf("%s: failed to add the device with " - "handle 0x%04x because the enclosure is " - "not in the mapping table\n", __func__, - phy_change->dev_handle); + mpr_dprint(sc, MPR_MAPPING, "%s: failed to add " + "the device with handle 0x%04x because the " + "enclosure is not in the mapping table\n", + __func__, phy_change->dev_handle); continue; } if (!((phy_change->device_info & Modified: stable/10/sys/dev/mpr/mpr_mapping.h ============================================================================== --- stable/10/sys/dev/mpr/mpr_mapping.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_mapping.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ @@ -38,6 +39,7 @@ * @dev_handle: device handle for the device pointed by this entry * @slot: slot ID * @is_processed: Flag to indicate whether this entry is processed or not + * @is_SATA_SSD: 1 if this is a SATA device AND an SSD, 0 otherwise */ struct _map_phy_change { uint64_t physical_id; @@ -46,6 +48,8 @@ struct _map_phy_change { uint16_t slot; uint8_t reason; uint8_t is_processed; + uint8_t is_SATA_SSD; + uint8_t reserved; }; /** @@ -66,6 +70,6 @@ struct _map_topology_change { extern int mprsas_get_sas_address_for_sata_disk(struct mpr_softc *ioc, - u64 *sas_address, u16 handle, u32 device_info); + u64 *sas_address, u16 handle, u32 device_info, u8 *is_SATA_SSD); #endif Modified: stable/10/sys/dev/mpr/mpr_pci.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_pci.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_pci.c Thu Jun 4 16:27:18 2015 (r283990) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); -/* PCI/PCI-X/PCIe bus interface for the LSI MPT2 controllers */ +/* PCI/PCI-X/PCIe bus interface for the Avago Tech (LSI) MPT3 controllers */ /* TODO Move headers to mprvar */ #include @@ -99,17 +99,17 @@ struct mpr_ident { const char *desc; } mpr_identifiers[] = { { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3004, - 0xffff, 0xffff, 0, "LSI SAS3004" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3004" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3008, - 0xffff, 0xffff, 0, "LSI SAS3008" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3008" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3108_1, - 0xffff, 0xffff, 0, "LSI SAS3108_1" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3108_1" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3108_2, - 0xffff, 0xffff, 0, "LSI SAS3108_2" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3108_2" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3108_5, - 0xffff, 0xffff, 0, "LSI SAS3108_5" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3108_5" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3108_6, - 0xffff, 0xffff, 0, "LSI SAS3108_6" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3108_6" }, { 0, 0, 0, 0, 0, NULL } }; Modified: stable/10/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_sas.c Thu Jun 4 16:27:18 2015 (r283990) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,12 +24,15 @@ * 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. + * + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD + * */ #include __FBSDID("$FreeBSD$"); -/* Communications core for LSI MPT2 */ +/* Communications core for Avago Technologies (LSI) MPT3 */ /* TODO Move headers to mprvar */ #include @@ -122,14 +126,10 @@ static void mprsas_scsiio_complete(struc static void mprsas_action_resetdev(struct mprsas_softc *, union ccb *); static void mprsas_resetdev_complete(struct mpr_softc *, struct mpr_command *); -static int mprsas_send_abort(struct mpr_softc *sc, struct mpr_command *tm, +static int mprsas_send_abort(struct mpr_softc *sc, struct mpr_command *tm, struct mpr_command *cm); -static int mprsas_send_reset(struct mpr_softc *sc, struct mpr_command *tm, - uint8_t type); static void mprsas_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg); -static void mprsas_prepare_ssu(struct mpr_softc *sc, struct cam_path *path, - struct ccb_getdev *cgd); #if (__FreeBSD_version < 901503) || \ ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) static void mprsas_check_eedp(struct mpr_softc *sc, struct cam_path *path, @@ -142,13 +142,12 @@ static void mprsas_portenable_complete(s struct mpr_command *cm); #if __FreeBSD_version >= 900026 -static void -mprsas_smpio_complete(struct mpr_softc *sc, struct mpr_command *cm); +static void mprsas_smpio_complete(struct mpr_softc *sc, + struct mpr_command *cm); static void mprsas_send_smpcmd(struct mprsas_softc *sassc, - union ccb *ccb, uint64_t sasaddr); -static void -mprsas_action_smpio(struct mprsas_softc *sassc, union ccb *ccb); -#endif + union ccb *ccb, uint64_t sasaddr); +static void mprsas_action_smpio(struct mprsas_softc *sassc, union ccb *ccb); +#endif //FreeBSD_version >= 900026 struct mprsas_target * mprsas_find_target_by_handle(struct mprsas_softc *sassc, int start, @@ -230,7 +229,7 @@ mprsas_startup_decrement(struct mprsas_s } } -/* LSI's firmware requires us to stop sending commands when we're doing task +/* The firmware requires us to stop sending commands when we're doing task * management, so refcount the TMs and keep the simq frozen when any are in * use. */ @@ -241,35 +240,31 @@ mprsas_alloc_tm(struct mpr_softc *sc) MPR_FUNCTRACE(sc); tm = mpr_alloc_high_priority_command(sc); - if (tm != NULL) { - if (sc->sassc->tm_count++ == 0) { - mpr_dprint(sc, MPR_RECOVERY, - "%s freezing simq\n", __func__); - xpt_freeze_simq(sc->sassc->sim, 1); - } - mpr_dprint(sc, MPR_RECOVERY, "%s tm_count %u\n", __func__, - sc->sassc->tm_count); - } return tm; } void mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm) { - mpr_dprint(sc, MPR_TRACE, "%s", __func__); + MPR_FUNCTRACE(sc); if (tm == NULL) return; - /* if there are no TMs in use, we can release the simq. We use our - * own refcount so that it's easier for a diag reset to cleanup and - * release the simq. - */ - if (--sc->sassc->tm_count == 0) { - mpr_dprint(sc, MPR_RECOVERY, "%s releasing simq\n", __func__); - xpt_release_simq(sc->sassc->sim, 1); + /* + * For TM's the devq is frozen for the device. Unfreeze it here and + * free the resources used for freezing the devq. Must clear the + * INRESET flag as well or scsi I/O will not work. + */ + if (tm->cm_targ != NULL) { + tm->cm_targ->flags &= ~MPRSAS_TARGET_INRESET; + } + if (tm->cm_ccb) { + mpr_dprint(sc, MPR_INFO, "Unfreezing devq for target ID %d\n", + tm->cm_targ->tid); + xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE); + xpt_free_path(tm->cm_ccb->ccb_h.path); + xpt_free_ccb(tm->cm_ccb); } - mpr_dprint(sc, MPR_RECOVERY, "%s tm_count %u\n", __func__, - sc->sassc->tm_count); mpr_free_high_priority_command(sc, tm); } @@ -298,8 +293,8 @@ mprsas_rescan_target(struct mpr_softc *s return; } - if (xpt_create_path(&ccb->ccb_h.path, NULL, pathid, - targetid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + if (xpt_create_path(&ccb->ccb_h.path, NULL, pathid, targetid, + CAM_LUN_WILDCARD) != CAM_REQ_CMP) { mpr_dprint(sc, MPR_ERROR, "unable to create path for rescan\n"); xpt_free_ccb(ccb); return; @@ -473,11 +468,16 @@ mprsas_prepare_volume_remove(struct mprs MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY; cm->cm_complete = mprsas_remove_volume; cm->cm_complete_data = (void *)(uintptr_t)handle; + + mpr_dprint(sc, MPR_INFO, "%s: Sending reset for target ID %d\n", + __func__, targ->tid); + mprsas_prepare_for_tm(sc, cm, targ, CAM_LUN_WILDCARD); + mpr_map_command(sc, cm); } /* - * The MPT2 firmware performs debounce on the link to avoid transient link + * The MPT3 firmware performs debounce on the link to avoid transient link * errors and false removals. When it does decide that link has been lost * and a device needs to go away, it expects that the host will perform a * target reset and then an op remove. The reset has the side-effect of @@ -532,6 +532,11 @@ mprsas_prepare_remove(struct mprsas_soft MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY; cm->cm_complete = mprsas_remove_device; cm->cm_complete_data = (void *)(uintptr_t)handle; + + mpr_dprint(sc, MPR_INFO, "%s: Sending reset for target ID %d\n", + __func__, targ->tid); + mprsas_prepare_for_tm(sc, cm, targ, CAM_LUN_WILDCARD); + mpr_map_command(sc, cm); } @@ -596,10 +601,10 @@ mprsas_remove_device(struct mpr_softc *s mpr_map_command(sc, tm); - mpr_dprint(sc, MPR_XINFO, "clearing target %u handle 0x%04x\n", + mpr_dprint(sc, MPR_INFO, "clearing target %u handle 0x%04x\n", targ->tid, handle); if (targ->encl_level_valid) { - mpr_dprint(sc, MPR_XINFO, "At enclosure level %d, slot %d, " + mpr_dprint(sc, MPR_INFO, "At enclosure level %d, slot %d, " "connector name (%4s)\n", targ->encl_level, targ->encl_slot, targ->connector_name); } @@ -608,7 +613,7 @@ mprsas_remove_device(struct mpr_softc *s mpr_dprint(sc, MPR_XINFO, "Completing missed command %p\n", tm); ccb = tm->cm_complete_data; - ccb->ccb_h.status = CAM_DEV_NOT_THERE; + mprsas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); mprsas_scsiio_complete(sc, tm); } } @@ -726,7 +731,7 @@ mpr_attach_sas(struct mpr_softc *sc) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Thu Jun 4 22:11:41 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0769BA29; Thu, 4 Jun 2015 22:11:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE8301506; Thu, 4 Jun 2015 22:11:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54MBea3050303; Thu, 4 Jun 2015 22:11:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54MBeW1050301; Thu, 4 Jun 2015 22:11:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201506042211.t54MBeW1050301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Jun 2015 22:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284002 - in stable/10: share/mk sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2015 22:11:41 -0000 Author: imp Date: Thu Jun 4 22:11:39 2015 New Revision: 284002 URL: https://svnweb.freebsd.org/changeset/base/284002 Log: MFC: Merge more of the dtb machinery Merge 278459,278460,278461,278462 which define DTBDIR and other things needed for install to work. Although the commit in head kinda fixed install_as_user, it's unknown if that works in 10.x (it didn't the last time I tried). Modified: stable/10/share/mk/bsd.own.mk stable/10/sys/conf/dtb.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Thu Jun 4 21:54:46 2015 (r284001) +++ stable/10/share/mk/bsd.own.mk Thu Jun 4 22:11:39 2015 (r284002) @@ -143,6 +143,10 @@ KMODDIR?= /boot/kernel KMODOWN?= ${BINOWN} KMODGRP?= ${BINGRP} KMODMODE?= ${BINMODE} +DTBDIR?= /boot/dtb +DTBOWN?= root +DTBGRP?= wheel +DTBMODE?= 444 LIBDIR?= /usr/lib LIBCOMPATDIR?= /usr/lib/compat @@ -683,7 +687,7 @@ _uid!= id -u USER!= id -un .endif _gid!= id -gn -.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${_gid} .endfor Modified: stable/10/sys/conf/dtb.mk ============================================================================== --- stable/10/sys/conf/dtb.mk Thu Jun 4 21:54:46 2015 (r284001) +++ stable/10/sys/conf/dtb.mk Thu Jun 4 22:11:39 2015 (r284002) @@ -45,7 +45,6 @@ SYSDIR= ${_dir} .PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/boot/fdt/dts/${MACHINE} -DTBDIR?=/boot/dtb DTB=${DTS:R:S/$/.dtb/} all: ${DTB} @@ -64,6 +63,10 @@ CLEANFILES+=${_dts:R:S/$/.dtb/} realinstall: _dtbinstall .ORDER: beforeinstall _kmodinstall _dtbinstall: +# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree +# to make sure the tree is setup properly. This may break ownership of ${DTBDIR} +# for no-root build. + mkdir -p ${DESTDIR}${DTBDIR} .for _dtb in ${DTB} ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR} From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 00:28:39 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE7E3CA; Fri, 5 Jun 2015 00:28:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C67E13BB; Fri, 5 Jun 2015 00:28:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550SdOZ018490; Fri, 5 Jun 2015 00:28:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550Sd7q018489; Fri, 5 Jun 2015 00:28:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506050028.t550Sd7q018489@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 5 Jun 2015 00:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284005 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 00:28:39 -0000 Author: gjb Date: Fri Jun 5 00:28:38 2015 New Revision: 284005 URL: https://svnweb.freebsd.org/changeset/base/284005 Log: MFC r283919: Remove trailing tabs to avoid spamming stdout with long lines. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.ec2 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.ec2 ============================================================================== --- stable/10/release/Makefile.ec2 Thu Jun 4 23:11:24 2015 (r284004) +++ stable/10/release/Makefile.ec2 Fri Jun 5 00:28:38 2015 (r284005) @@ -51,9 +51,9 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @echo "--------------------------------------------------------------" @false .endif - /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ - ${.OBJDIR}/ec2.raw \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ + /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ + ${.OBJDIR}/ec2.raw \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} @touch ${.TARGET} From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 00:35:18 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DFAD44B; Fri, 5 Jun 2015 00:35:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C59A169A; Fri, 5 Jun 2015 00:35:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550ZI0G023110; Fri, 5 Jun 2015 00:35:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550ZICa023109; Fri, 5 Jun 2015 00:35:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201506050035.t550ZICa023109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Jun 2015 00:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284006 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 00:35:18 -0000 Author: mav Date: Fri Jun 5 00:35:17 2015 New Revision: 284006 URL: https://svnweb.freebsd.org/changeset/base/284006 Log: MFC r283936: Restore AHCI quirks printing as base16. smh@ at r278034 made it base17, that is somewhat odd. :) Modified: stable/10/sys/dev/ahci/ahci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.h ============================================================================== --- stable/10/sys/dev/ahci/ahci.h Fri Jun 5 00:28:38 2015 (r284005) +++ stable/10/sys/dev/ahci/ahci.h Fri Jun 5 00:35:17 2015 (r284006) @@ -576,7 +576,7 @@ enum ahci_err_type { #define AHCI_Q_1MSI 0x00020000 #define AHCI_Q_BIT_STRING \ - "\021" \ + "\020" \ "\001NOFORCE" \ "\002NOPMP" \ "\003NONCQ" \ From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 00:39:38 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A85B9A0E; Fri, 5 Jun 2015 00:39:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A898182D; Fri, 5 Jun 2015 00:39:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550dc8a023829; Fri, 5 Jun 2015 00:39:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550dZHM023806; Fri, 5 Jun 2015 00:39:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506050039.t550dZHM023806@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 5 Jun 2015 00:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284008 - stable/10/bin/pax X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 00:39:38 -0000 Author: delphij Date: Fri Jun 5 00:39:34 2015 New Revision: 284008 URL: https://svnweb.freebsd.org/changeset/base/284008 Log: MFC r283257: Eliminate unneeded includes. Modified: stable/10/bin/pax/ar_subs.c stable/10/bin/pax/buf_subs.c stable/10/bin/pax/cache.c stable/10/bin/pax/cpio.c stable/10/bin/pax/file_subs.c stable/10/bin/pax/gen_subs.c stable/10/bin/pax/getoldopt.c stable/10/bin/pax/pat_rep.c stable/10/bin/pax/pax.c stable/10/bin/pax/sel_subs.c stable/10/bin/pax/tar.c stable/10/bin/pax/tty_subs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/pax/ar_subs.c ============================================================================== --- stable/10/bin/pax/ar_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/ar_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "extern.h" Modified: stable/10/bin/pax/buf_subs.c ============================================================================== --- stable/10/bin/pax/buf_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/buf_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "extern.h" Modified: stable/10/bin/pax/cache.c ============================================================================== --- stable/10/bin/pax/cache.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/cache.c Fri Jun 5 00:39:34 2015 (r284008) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "cache.h" Modified: stable/10/bin/pax/cpio.c ============================================================================== --- stable/10/bin/pax/cpio.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/cpio.c Fri Jun 5 00:39:34 2015 (r284008) @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include "pax.h" #include "cpio.h" #include "extern.h" Modified: stable/10/bin/pax/file_subs.c ============================================================================== --- stable/10/bin/pax/file_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/file_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "options.h" #include "extern.h" Modified: stable/10/bin/pax/gen_subs.c ============================================================================== --- stable/10/bin/pax/gen_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/gen_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include "pax.h" #include "extern.h" Modified: stable/10/bin/pax/getoldopt.c ============================================================================== --- stable/10/bin/pax/getoldopt.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/getoldopt.c Fri Jun 5 00:39:34 2015 (r284008) @@ -19,8 +19,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pax.h" -#include "extern.h" +int getoldopt(int, char **, const char *); int getoldopt(int argc, char **argv, const char *optstring) Modified: stable/10/bin/pax/pat_rep.c ============================================================================== --- stable/10/bin/pax/pat_rep.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/pat_rep.c Fri Jun 5 00:39:34 2015 (r284008) @@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #ifdef NET2_REGEX #include #else Modified: stable/10/bin/pax/pax.c ============================================================================== --- stable/10/bin/pax/pax.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/pax.c Fri Jun 5 00:39:34 2015 (r284008) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "extern.h" static int gen_init(void); Modified: stable/10/bin/pax/sel_subs.c ============================================================================== --- stable/10/bin/pax/sel_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/sel_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "sel_subs.h" Modified: stable/10/bin/pax/tar.c ============================================================================== --- stable/10/bin/pax/tar.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/tar.c Fri Jun 5 00:39:34 2015 (r284008) @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include "pax.h" #include "extern.h" #include "tar.h" Modified: stable/10/bin/pax/tty_subs.c ============================================================================== --- stable/10/bin/pax/tty_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/tty_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "extern.h" From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 00:46:51 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 602651D8; Fri, 5 Jun 2015 00:46:51 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 420301D32; Fri, 5 Jun 2015 00:46:51 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550kpPq028463; Fri, 5 Jun 2015 00:46:51 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550ko6w028457; Fri, 5 Jun 2015 00:46:50 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201506050046.t550ko6w028457@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 5 Jun 2015 00:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284009 - in stable/10: etc/rc.d share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 00:46:51 -0000 Author: cperciva Date: Fri Jun 5 00:46:49 2015 New Revision: 284009 URL: https://svnweb.freebsd.org/changeset/base/284009 Log: MFC r273955,274060,274164: Add /etc/rc.d/growfs script. Added: stable/10/etc/rc.d/growfs - copied, changed from r273955, head/etc/rc.d/growfs stable/10/share/man/man7/growfs.7 - copied unchanged from r273955, head/share/man/man7/growfs.7 Modified: stable/10/etc/rc.d/Makefile stable/10/share/man/man7/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Fri Jun 5 00:39:34 2015 (r284008) +++ stable/10/etc/rc.d/Makefile Fri Jun 5 00:46:49 2015 (r284009) @@ -37,6 +37,7 @@ FILES= DAEMON \ geli \ geli2 \ gptboot \ + growfs \ gssd \ ${_hcsecd} \ hostid \ Copied and modified: stable/10/etc/rc.d/growfs (from r273955, head/etc/rc.d/growfs) ============================================================================== --- head/etc/rc.d/growfs Sun Nov 2 00:11:25 2014 (r273955, copy source) +++ stable/10/etc/rc.d/growfs Fri Jun 5 00:46:49 2015 (r284009) @@ -35,9 +35,7 @@ # and have it work on essentially any size drive. # # TODO: Figure out where this should really be ordered. -# I suspect it should go just after fsck but before mountcritlocal -# but it's hard to tell for sure because of the bug described -# below. +# I suspect it should go just after fsck but before mountcritlocal. # . /etc/rc.subr @@ -49,20 +47,20 @@ rcvar="growfs_enable" growfs_start () { - echo "Growing root partition to fill device" - rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') - if [ x"$rootdev" = x"${rootdev%/*}" ]; then - # raw device - rawdev="$rootdev" - else - rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { print $3 }') - if [ x"$rawdev" = x"" ]; then - echo "Can't figure out device for: $rootdev" - return + echo "Growing root partition to fill device" + rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') + if [ x"$rootdev" = x"${rootdev%/*}" ]; then + # raw device + rawdev="$rootdev" + else + rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { print $3 }') + if [ x"$rawdev" = x"" ]; then + echo "Can't figure out device for: $rootdev" + return + fi fi - fi - sysctl -b kern.geom.conftxt | awk ' + sysctl -b kern.geom.conftxt | awk ' { lvl=$1 device[lvl] = $3 @@ -91,7 +89,7 @@ growfs_start () exit 0 } }' dev="$rawdev" - growfs -y /dev/"$rootdev" + growfs -y /dev/"$rootdev" } load_rc_config $name Modified: stable/10/share/man/man7/Makefile ============================================================================== --- stable/10/share/man/man7/Makefile Fri Jun 5 00:39:34 2015 (r284008) +++ stable/10/share/man/man7/Makefile Fri Jun 5 00:46:49 2015 (r284009) @@ -14,6 +14,7 @@ MAN= adding_user.7 \ environ.7 \ ffs.7 \ firewall.7 \ + growfs.7 \ hier.7 \ hostname.7 \ intro.7 \ Copied: stable/10/share/man/man7/growfs.7 (from r273955, head/share/man/man7/growfs.7) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man7/growfs.7 Fri Jun 5 00:46:49 2015 (r284009, copy of r273955, head/share/man/man7/growfs.7) @@ -0,0 +1,64 @@ +.\" Copyright 2014 John-Mark Gurney +.\" 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, 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$ +.\" +.Dd November 1, 2014 +.Dt GROWFS 7 +.Os +.Sh NAME +.Nm growfs +.Nd start up script to grow the root file-system. +.Sh DESCRIPTION +The following options in +.Pa /etc/rc.conf +control the behavior of +.Nm : +.Bl -tag -width ".Va growfs_enable" -offset indent +.It Va growfs_enable +.Pq Dq Li NO +If set to +.Dq Li YES , +the first time the machine boots, the root file-system will be automatically +expanded, if possible, to fill up all available space after it. +.El +.Pp +To expand the root file-system with-out rebooting, run the following command: +.Dl % /etc/rc.d/growfs onestart +.Sh IMPLEMENTATION NOTES +The script requires that +.Pa awk +be present and on the path. +This usually means that +.Pa /usr +should be mounted prior to running the script. +.Sh FILES +.Pa /etc/rc.conf +.Sh EXIT STATUS +.Ex -std +.Sh SEE ALSO +.Xr rc.conf 5 +.Sh AUTHORS +The man page and script were written by +.An John-Mark Gurney Aq Mt jmg@FreeBSD.org . From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 07:17:15 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 019933D9; Fri, 5 Jun 2015 07:17:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2B4E16B7; Fri, 5 Jun 2015 07:17:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t557HEHb022384; Fri, 5 Jun 2015 07:17:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t557HEkI022383; Fri, 5 Jun 2015 07:17:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506050717.t557HEkI022383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 5 Jun 2015 07:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284015 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 07:17:15 -0000 Author: hselasky Date: Fri Jun 5 07:17:14 2015 New Revision: 284015 URL: https://svnweb.freebsd.org/changeset/base/284015 Log: MFC r283922: Fix for control endpoint handling in the DWC OTG driver. The data stage processing is only allowed after the setup complete event has been received. Else a race may occur and the OUT data can be corrupted. While at it ensure resetting a FIFO has the required wait loop. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Fri Jun 5 06:49:08 2015 (r284014) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Fri Jun 5 07:17:14 2015 (r284015) @@ -181,6 +181,22 @@ dwc_otg_get_hw_ep_profile(struct usb_dev *ppf = NULL; } +static void +dwc_otg_tx_fifo_reset(struct dwc_otg_softc *sc, uint32_t value) +{ + uint32_t temp; + + /* reset FIFO */ + DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, value); + + /* wait for reset to complete */ + for (temp = 0; temp != 16; temp++) { + value = DWC_OTG_READ_4(sc, DOTG_GRSTCTL); + if (!(value & (GRSTCTL_TXFFLSH | GRSTCTL_RXFFLSH))) + break; + } +} + static int dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mode) { @@ -335,12 +351,11 @@ dwc_otg_init_fifo(struct dwc_otg_softc * } /* reset RX FIFO */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, - GRSTCTL_RXFFLSH); + dwc_otg_tx_fifo_reset(sc, GRSTCTL_RXFFLSH); if (mode != DWC_MODE_OTG) { /* reset all TX FIFOs */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(0x10) | GRSTCTL_TXFFLSH); } else { @@ -951,15 +966,21 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s if (GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status) != 0) goto not_complete; - if ((sc->sc_last_rx_status & GRXSTSRD_DPID_MASK) != - GRXSTSRD_DPID_DATA0) { + if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_DATA) { + if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_COMPLETE || td->remainder != 0) { + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + goto not_complete; + } /* release FIFO */ dwc_otg_common_rx_ack(sc); - goto not_complete; + return (0); /* complete */ } - if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != - GRXSTSRD_STP_DATA) { + if ((sc->sc_last_rx_status & GRXSTSRD_DPID_MASK) != + GRXSTSRD_DPID_DATA0) { /* release FIFO */ dwc_otg_common_rx_ack(sc); goto not_complete; @@ -973,14 +994,6 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s /* get the packet byte count */ count = GRXSTSRD_BCNT_GET(sc->sc_last_rx_status); - /* verify data length */ - if (count != td->remainder) { - DPRINTFN(0, "Invalid SETUP packet " - "length, %d bytes\n", count); - /* release FIFO */ - dwc_otg_common_rx_ack(sc); - goto not_complete; - } if (count != sizeof(req)) { DPRINTFN(0, "Unsupported SETUP packet " "length, %d bytes\n", count); @@ -1006,43 +1019,27 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s } /* don't send any data by default */ - DWC_OTG_WRITE_4(sc, DOTG_DIEPTSIZ(0), - DXEPTSIZ_SET_NPKT(0) | - DXEPTSIZ_SET_NBYTES(0)); - - temp = sc->sc_in_ctl[0]; - - /* enable IN endpoint */ - DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), - temp | DIEPCTL_EPENA); - DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), - temp | DIEPCTL_SNAK); + DWC_OTG_WRITE_4(sc, DOTG_DIEPTSIZ(0), DIEPCTL_EPDIS); + DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), DOEPCTL_EPDIS); /* reset IN endpoint buffer */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(0) | GRSTCTL_TXFFLSH); /* acknowledge RX status */ dwc_otg_common_rx_ack(sc); - return (0); /* complete */ + td->did_stall = 1; not_complete: /* abort any ongoing transfer, before enabling again */ - - temp = sc->sc_out_ctl[0]; - - temp |= DOEPCTL_EPENA | - DOEPCTL_SNAK; - - /* enable OUT endpoint */ - DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(0), temp); - if (!td->did_stall) { td->did_stall = 1; DPRINTFN(5, "stalling IN and OUT direction\n"); + temp = sc->sc_out_ctl[0]; + /* set stall after enabling endpoint */ DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(0), temp | DOEPCTL_STALL); @@ -1053,13 +1050,6 @@ not_complete: DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), temp | DIEPCTL_STALL); } - - /* setup number of buffers to receive */ - DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), - DXEPTSIZ_SET_MULTI(3) | - DXEPTSIZ_SET_NPKT(1) | - DXEPTSIZ_SET_NBYTES(sizeof(req))); - return (1); /* not complete */ } @@ -1503,7 +1493,9 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc /* check for SETUP packet */ if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) == - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA || + (sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) == + GRXSTSRD_STP_COMPLETE) { if (td->remainder == 0) { /* * We are actually complete and have @@ -1588,15 +1580,10 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc not_complete: - temp = sc->sc_out_ctl[td->ep_no]; - - temp |= DOEPCTL_EPENA | DOEPCTL_CNAK; - - DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(td->ep_no), temp); - /* enable SETUP and transfer complete interrupt */ if (td->ep_no == 0) { DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), + DXEPTSIZ_SET_MULTI(3) | DXEPTSIZ_SET_NPKT(1) | DXEPTSIZ_SET_NBYTES(td->max_packet_size)); } else { @@ -1605,8 +1592,12 @@ not_complete: DXEPTSIZ_SET_MULTI(1) | DXEPTSIZ_SET_NPKT(4) | DXEPTSIZ_SET_NBYTES(4 * - ((td->max_packet_size + 3) & ~3))); + ((td->max_packet_size + 3) & ~3))); } + temp = sc->sc_out_ctl[td->ep_no]; + DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(td->ep_no), temp | + DOEPCTL_EPENA | DOEPCTL_CNAK); + return (1); /* not complete */ } @@ -2008,7 +1999,9 @@ repeat: (GRXSTSRD_CHNUM_GET(temp) == 0)) { if ((temp & GRXSTSRD_PKTSTS_MASK) != - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA && + (temp & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_COMPLETE) { /* dump data - wrong direction */ dwc_otg_common_rx_ack(sc); @@ -2213,7 +2206,9 @@ not_complete: (GRXSTSRD_CHNUM_GET(temp) == 0)) { if ((temp & GRXSTSRD_PKTSTS_MASK) == - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA || + (temp & GRXSTSRD_PKTSTS_MASK) == + GRXSTSRD_STP_COMPLETE) { DPRINTFN(5, "faking complete\n"); /* * Race condition: We are complete! @@ -2638,6 +2633,7 @@ repeat: /* non-data messages we simply skip */ if (temp != GRXSTSRD_STP_DATA && + temp != GRXSTSRD_STP_COMPLETE && temp != GRXSTSRD_OUT_DATA) { dwc_otg_common_rx_ack(sc); goto repeat; @@ -3668,7 +3664,7 @@ dwc_otg_clear_stall_sub_locked(struct dw /* we only reset the transmit FIFO */ if (ep_dir) { - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(ep_no) | GRSTCTL_TXFFLSH); From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 07:23:33 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB86269E; Fri, 5 Jun 2015 07:23:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED2A18CA; Fri, 5 Jun 2015 07:23:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t557NXe0027003; Fri, 5 Jun 2015 07:23:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t557NXJh027002; Fri, 5 Jun 2015 07:23:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506050723.t557NXJh027002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 5 Jun 2015 07:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284016 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 07:23:33 -0000 Author: ae Date: Fri Jun 5 07:23:32 2015 New Revision: 284016 URL: https://svnweb.freebsd.org/changeset/base/284016 Log: Rework r281868 to not skip RTM announces for tunneling interfaces. This is direct commit to stable/10. Tested by: tuexen@ Modified: stable/10/sys/netinet6/in6.c Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Fri Jun 5 07:17:14 2015 (r284015) +++ stable/10/sys/netinet6/in6.c Fri Jun 5 07:23:32 2015 (r284016) @@ -155,29 +155,28 @@ in6_ifaddloop(struct ifaddr *ifa) ia = ifa2ia6(ifa); ifp = ifa->ifa_ifp; - if (nd6_need_cache(ifp) == 0) - return; - IF_AFDATA_LOCK(ifp); - ifa->ifa_rtrequest = nd6_rtrequest; - ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | - LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); - IF_AFDATA_UNLOCK(ifp); - if (ln != NULL) { - ln->la_expire = 0; /* for IPv6 this means permanent */ - ln->ln_state = ND6_LLINFO_REACHABLE; - /* - * initialize for rtmsg generation - */ - bzero(&gateway, sizeof(gateway)); - gateway.sdl_len = sizeof(gateway); - gateway.sdl_family = AF_LINK; - gateway.sdl_nlen = 0; - gateway.sdl_alen = 6; - memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, - sizeof(ln->ll_addr)); - LLE_WUNLOCK(ln); + /* + * initialize for rtmsg generation + */ + bzero(&gateway, sizeof(gateway)); + gateway.sdl_len = sizeof(gateway); + gateway.sdl_family = AF_LINK; + if (nd6_need_cache(ifp) != 0) { + IF_AFDATA_LOCK(ifp); + ifa->ifa_rtrequest = nd6_rtrequest; + ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | + LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); + IF_AFDATA_UNLOCK(ifp); + if (ln != NULL) { + ln->la_expire = 0; /* for IPv6 this means permanent */ + ln->ln_state = ND6_LLINFO_REACHABLE; + + gateway.sdl_alen = 6; + memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, + sizeof(ln->ll_addr)); + LLE_WUNLOCK(ln); + } } - bzero(&rt, sizeof(rt)); rt.rt_gateway = (struct sockaddr *)&gateway; memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 08:10:09 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D29F1E62; Fri, 5 Jun 2015 08:10:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFC711214; Fri, 5 Jun 2015 08:10:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t558A9wl048154; Fri, 5 Jun 2015 08:10:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t558A9d0048147; Fri, 5 Jun 2015 08:10:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506050810.t558A9d0048147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 5 Jun 2015 08:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284018 - in stable/10/sys: net netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 08:10:10 -0000 Author: ae Date: Fri Jun 5 08:10:08 2015 New Revision: 284018 URL: https://svnweb.freebsd.org/changeset/base/284018 Log: MFC r271918 (by hrs): - Virtualize interface cloner for gre(4). This fixes a panic when destroying a vnet jail which has a gre(4) interface. - Make net.link.gre.max_nesting vnet-local. Modified: stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/ip_gre.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Fri Jun 5 07:34:52 2015 (r284017) +++ stable/10/sys/net/if_gre.c Fri Jun 5 08:10:08 2015 (r284018) @@ -102,15 +102,16 @@ struct mtag_gre_nesting { * gre_mtx protects all global variables in if_gre.c. * XXX: gre_softc data not protected yet. */ -struct mtx gre_mtx; +VNET_DEFINE(struct mtx, gre_mtx); +VNET_DEFINE(struct gre_softc_head, gre_softc_list); + static const char grename[] = "gre"; static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation"); -struct gre_softc_head gre_softc_list; - static int gre_clone_create(struct if_clone *, int, caddr_t); static void gre_clone_destroy(struct ifnet *); -static struct if_clone *gre_cloner; +static VNET_DEFINE(struct if_clone *, gre_cloner); +#define V_gre_cloner VNET(gre_cloner) static int gre_ioctl(struct ifnet *, u_long, caddr_t); static int gre_output(struct ifnet *, struct mbuf *, @@ -118,8 +119,6 @@ static int gre_output(struct ifnet *, st static int gre_compute_route(struct gre_softc *sc); -static void greattach(void); - #ifdef INET extern struct domain inetdomain; static const struct protosw in_gre_protosw = { @@ -160,26 +159,34 @@ static SYSCTL_NODE(_net_link, IFT_TUNNEL */ #define MAX_GRE_NEST 1 #endif -static int max_gre_nesting = MAX_GRE_NEST; -SYSCTL_INT(_net_link_gre, OID_AUTO, max_nesting, CTLFLAG_RW, - &max_gre_nesting, 0, "Max nested tunnels"); +static VNET_DEFINE(int, max_gre_nesting) = MAX_GRE_NEST; +#define V_max_gre_nesting VNET(max_gre_nesting) +SYSCTL_INT(_net_link_gre, OID_AUTO, max_nesting, CTLFLAG_RW | CTLFLAG_VNET, + &VNET_NAME(max_gre_nesting), 0, "Max nested tunnels"); -/* ARGSUSED */ static void -greattach(void) +vnet_gre_init(const void *unused __unused) { - - mtx_init(&gre_mtx, "gre_mtx", NULL, MTX_DEF); - LIST_INIT(&gre_softc_list); - gre_cloner = if_clone_simple(grename, gre_clone_create, + LIST_INIT(&V_gre_softc_list); + GRE_LIST_LOCK_INIT(); + V_gre_cloner = if_clone_simple(grename, gre_clone_create, gre_clone_destroy, 0); } +VNET_SYSINIT(vnet_gre_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_gre_init, NULL); + +static void +vnet_gre_uninit(const void *unused __unused) +{ + + if_clone_detach(V_gre_cloner); + GRE_LIST_LOCK_DESTROY(); +} +VNET_SYSUNINIT(vnet_gre_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_gre_uninit, NULL); static int -gre_clone_create(ifc, unit, params) - struct if_clone *ifc; - int unit; - caddr_t params; +gre_clone_create(struct if_clone *ifc, int unit, caddr_t params) { struct gre_softc *sc; @@ -210,21 +217,20 @@ gre_clone_create(ifc, unit, params) sc->key = 0; if_attach(GRE2IFP(sc)); bpfattach(GRE2IFP(sc), DLT_NULL, sizeof(u_int32_t)); - mtx_lock(&gre_mtx); - LIST_INSERT_HEAD(&gre_softc_list, sc, sc_list); - mtx_unlock(&gre_mtx); + GRE_LIST_LOCK(); + LIST_INSERT_HEAD(&V_gre_softc_list, sc, sc_list); + GRE_LIST_UNLOCK(); return (0); } static void -gre_clone_destroy(ifp) - struct ifnet *ifp; +gre_clone_destroy(struct ifnet *ifp) { struct gre_softc *sc = ifp->if_softc; - mtx_lock(&gre_mtx); + GRE_LIST_LOCK(); LIST_REMOVE(sc, sc_list); - mtx_unlock(&gre_mtx); + GRE_LIST_UNLOCK(); #ifdef INET if (sc->encap != NULL) @@ -269,7 +275,7 @@ gre_output(struct ifnet *ifp, struct mbu gt = (struct mtag_gre_nesting *)(mtag + 1); gt->count++; - if (gt->count > min(gt->max,max_gre_nesting)) { + if (gt->count > min(gt->max, V_max_gre_nesting)) { printf("%s: hit maximum recursion limit %u on %s\n", __func__, gt->count - 1, ifp->if_xname); m_freem(m); @@ -301,7 +307,7 @@ gre_output(struct ifnet *ifp, struct mbu * Note: the sysctl does not actually check for saneness, so we * limit the maximum numbers of possible recursions here. */ - max = imin(max_gre_nesting, 256); + max = imin(V_max_gre_nesting, 256); /* If someone sets the sysctl <= 0, we want at least 1. */ max = imax(max, 1); len = sizeof(struct mtag_gre_nesting) + @@ -956,16 +962,12 @@ gremodevent(module_t mod, int type, void switch (type) { case MOD_LOAD: - greattach(); - break; case MOD_UNLOAD: - if_clone_detach(gre_cloner); - mtx_destroy(&gre_mtx); break; default: - return EOPNOTSUPP; + return (EOPNOTSUPP); } - return 0; + return (0); } static moduledata_t gre_mod = { Modified: stable/10/sys/net/if_gre.h ============================================================================== --- stable/10/sys/net/if_gre.h Fri Jun 5 07:34:52 2015 (r284017) +++ stable/10/sys/net/if_gre.h Fri Jun 5 08:10:08 2015 (r284018) @@ -176,8 +176,16 @@ struct mobip_h { #ifdef _KERNEL LIST_HEAD(gre_softc_head, gre_softc); -extern struct mtx gre_mtx; -extern struct gre_softc_head gre_softc_list; +VNET_DECLARE(struct gre_softc_head, gre_softc_list); +#define V_gre_softc_list VNET(gre_softc_list) + +VNET_DECLARE(struct mtx, gre_mtx); +#define V_gre_mtx VNET(gre_mtx) +#define GRE_LIST_LOCK_INIT(x) mtx_init(&V_gre_mtx, "gre_mtx", NULL, \ + MTX_DEF) +#define GRE_LIST_LOCK_DESTROY(x) mtx_destroy(&V_gre_mtx) +#define GRE_LIST_LOCK(x) mtx_lock(&V_gre_mtx) +#define GRE_LIST_UNLOCK(x) mtx_unlock(&V_gre_mtx) u_int16_t gre_in_cksum(u_int16_t *, u_int); #endif /* _KERNEL */ Modified: stable/10/sys/netinet/ip_gre.c ============================================================================== --- stable/10/sys/netinet/ip_gre.c Fri Jun 5 07:34:52 2015 (r284017) +++ stable/10/sys/netinet/ip_gre.c Fri Jun 5 08:10:08 2015 (r284018) @@ -318,18 +318,18 @@ gre_lookup(struct mbuf *m, u_int8_t prot struct ip *ip = mtod(m, struct ip *); struct gre_softc *sc; - mtx_lock(&gre_mtx); - for (sc = LIST_FIRST(&gre_softc_list); sc != NULL; + GRE_LIST_LOCK(); + for (sc = LIST_FIRST(&V_gre_softc_list); sc != NULL; sc = LIST_NEXT(sc, sc_list)) { if ((sc->g_dst.s_addr == ip->ip_src.s_addr) && (sc->g_src.s_addr == ip->ip_dst.s_addr) && (sc->g_proto == proto) && ((GRE2IFP(sc)->if_flags & IFF_UP) != 0)) { - mtx_unlock(&gre_mtx); + GRE_LIST_UNLOCK(); return (sc); } } - mtx_unlock(&gre_mtx); + GRE_LIST_UNLOCK(); return (NULL); } From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 08:23:34 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BBAC2CD; Fri, 5 Jun 2015 08:23:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B5416E2; Fri, 5 Jun 2015 08:23:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t558NYJa057232; Fri, 5 Jun 2015 08:23:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t558NYMA057231; Fri, 5 Jun 2015 08:23:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506050823.t558NYMA057231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jun 2015 08:23:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284019 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 08:23:34 -0000 Author: kib Date: Fri Jun 5 08:23:33 2015 New Revision: 284019 URL: https://svnweb.freebsd.org/changeset/base/284019 Log: MFC r283692: Explicitely enable queued invalidation completion interrupt. Modified: stable/10/sys/x86/iommu/intel_qi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_qi.c ============================================================================== --- stable/10/sys/x86/iommu/intel_qi.c Fri Jun 5 08:10:08 2015 (r284018) +++ stable/10/sys/x86/iommu/intel_qi.c Fri Jun 5 08:23:33 2015 (r284019) @@ -356,6 +356,7 @@ dmar_init_qi(struct dmar_unit *unit) ics = DMAR_ICS_IWC; dmar_write4(unit, DMAR_ICS_REG, ics); } + dmar_enable_qi_intr(unit); DMAR_UNLOCK(unit); return (0); @@ -379,6 +380,7 @@ dmar_fini_qi(struct dmar_unit *unit) dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq); /* only after the quisce, disable queue */ + dmar_disable_qi_intr(unit); dmar_disable_qi(unit); KASSERT(unit->inv_seq_waiters == 0, ("dmar%d: waiters on disabled queue", unit->unit)); From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 08:26:39 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1E5B445; Fri, 5 Jun 2015 08:26:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B032B170A; Fri, 5 Jun 2015 08:26:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t558QdTK057725; Fri, 5 Jun 2015 08:26:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t558QdBQ057724; Fri, 5 Jun 2015 08:26:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506050826.t558QdBQ057724@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jun 2015 08:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284020 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 08:26:39 -0000 Author: kib Date: Fri Jun 5 08:26:38 2015 New Revision: 284020 URL: https://svnweb.freebsd.org/changeset/base/284020 Log: MFC r283745: Do not raise priority of the idle thread on singal delivery. Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri Jun 5 08:23:33 2015 (r284019) +++ stable/10/sys/kern/kern_sig.c Fri Jun 5 08:26:38 2015 (r284020) @@ -2371,9 +2371,12 @@ tdsigwakeup(struct thread *td, int sig, thread_lock(td); /* * Bring the priority of a thread up if we want it to get - * killed in this lifetime. + * killed in this lifetime. Be careful to avoid bumping the + * priority of the idle thread, since we still allow to signal + * kernel processes. */ - if (action == SIG_DFL && (prop & SA_KILL) && td->td_priority > PUSER) + if (action == SIG_DFL && (prop & SA_KILL) != 0 && + td->td_priority > PUSER && !TD_IS_IDLETHREAD(td)) sched_prio(td, PUSER); if (TD_ON_SLEEPQ(td)) { /* @@ -2411,7 +2414,7 @@ tdsigwakeup(struct thread *td, int sig, /* * Give low priority threads a better chance to run. */ - if (td->td_priority > PUSER) + if (td->td_priority > PUSER && !TD_IS_IDLETHREAD(td)) sched_prio(td, PUSER); wakeup_swapper = sleepq_abort(td, intrval); From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 08:36:30 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58B27602; Fri, 5 Jun 2015 08:36:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44A7E1940; Fri, 5 Jun 2015 08:36:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t558aUT9062795; Fri, 5 Jun 2015 08:36:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t558aQFM062775; Fri, 5 Jun 2015 08:36:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506050836.t558aQFM062775@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jun 2015 08:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284021 - in stable/10/sys: amd64/amd64 amd64/ia32 dev/pci kern ufs/ffs ufs/ufs x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 08:36:30 -0000 Author: kib Date: Fri Jun 5 08:36:25 2015 New Revision: 284021 URL: https://svnweb.freebsd.org/changeset/base/284021 Log: MFC r283735: Remove several write-only variables. Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/amd64/ia32/ia32_reg.c stable/10/sys/dev/pci/pci.c stable/10/sys/kern/kern_exit.c stable/10/sys/kern/kern_synch.c stable/10/sys/kern/vfs_cluster.c stable/10/sys/kern/vfs_init.c stable/10/sys/ufs/ffs/ffs_softdep.c stable/10/sys/ufs/ffs/ffs_suspend.c stable/10/sys/ufs/ffs/ffs_vfsops.c stable/10/sys/ufs/ffs/ffs_vnops.c stable/10/sys/ufs/ufs/ufs_bmap.c stable/10/sys/ufs/ufs/ufs_dirhash.c stable/10/sys/x86/iommu/busdma_dmar.c stable/10/sys/x86/iommu/intel_idpgtbl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/amd64/amd64/pmap.c Fri Jun 5 08:36:25 2015 (r284021) @@ -4020,7 +4020,6 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t pd_entry_t newpde; pt_entry_t *firstpte, oldpte, pa, *pte; pt_entry_t PG_G, PG_A, PG_M, PG_RW, PG_V; - vm_offset_t oldpteva; vm_page_t mpte; int PG_PTE_CACHE; @@ -4080,10 +4079,9 @@ setpte: if (!atomic_cmpset_long(pte, oldpte, oldpte & ~PG_RW)) goto setpte; oldpte &= ~PG_RW; - oldpteva = (oldpte & PG_FRAME & PDRMASK) | - (va & ~PDRMASK); CTR2(KTR_PMAP, "pmap_promote_pde: protect for va %#lx" - " in pmap %p", oldpteva, pmap); + " in pmap %p", (oldpte & PG_FRAME & PDRMASK) | + (va & ~PDRMASK), pmap); } if ((oldpte & PG_PTE_PROMOTE) != (newpde & PG_PTE_PROMOTE)) { atomic_add_long(&pmap_pde_p_failures, 1); Modified: stable/10/sys/amd64/ia32/ia32_reg.c ============================================================================== --- stable/10/sys/amd64/ia32/ia32_reg.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/amd64/ia32/ia32_reg.c Fri Jun 5 08:36:25 2015 (r284021) @@ -79,11 +79,9 @@ __FBSDID("$FreeBSD$"); int fill_regs32(struct thread *td, struct reg32 *regs) { - struct pcb *pcb; struct trapframe *tp; tp = td->td_frame; - pcb = td->td_pcb; if (tp->tf_flags & TF_HASSEGS) { regs->r_gs = tp->tf_gs; regs->r_fs = tp->tf_fs; @@ -113,18 +111,16 @@ fill_regs32(struct thread *td, struct re int set_regs32(struct thread *td, struct reg32 *regs) { - struct pcb *pcb; struct trapframe *tp; tp = td->td_frame; if (!EFL_SECURE(regs->r_eflags, tp->tf_rflags) || !CS_SECURE(regs->r_cs)) return (EINVAL); - pcb = td->td_pcb; tp->tf_gs = regs->r_gs; tp->tf_fs = regs->r_fs; tp->tf_es = regs->r_es; tp->tf_ds = regs->r_ds; - set_pcb_flags(pcb, PCB_FULL_IRET); + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); tp->tf_flags = TF_HASSEGS; tp->tf_rdi = regs->r_edi; tp->tf_rsi = regs->r_esi; Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/dev/pci/pci.c Fri Jun 5 08:36:25 2015 (r284021) @@ -2367,7 +2367,7 @@ pci_set_powerstate_method(device_t dev, struct pci_devinfo *dinfo = device_get_ivars(child); pcicfgregs *cfg = &dinfo->cfg; uint16_t status; - int result, oldstate, highest, delay; + int oldstate, highest, delay; if (cfg->pp.pp_cap == 0) return (EOPNOTSUPP); @@ -2402,7 +2402,6 @@ pci_set_powerstate_method(device_t dev, delay = 0; status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_status, 2) & ~PCIM_PSTAT_DMASK; - result = 0; switch (state) { case PCI_POWERSTATE_D0: status |= PCIM_PSTAT_D0; @@ -2962,7 +2961,6 @@ static void pci_ata_maps(device_t bus, device_t dev, struct resource_list *rl, int force, uint32_t prefetchmask) { - struct resource *r; int rid, type, progif; #if 0 /* if this device supports PCI native addressing use it */ @@ -2985,11 +2983,11 @@ pci_ata_maps(device_t bus, device_t dev, } else { rid = PCIR_BAR(0); resource_list_add(rl, type, rid, 0x1f0, 0x1f7, 8); - r = resource_list_reserve(rl, bus, dev, type, &rid, 0x1f0, + (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x1f0, 0x1f7, 8, 0); rid = PCIR_BAR(1); resource_list_add(rl, type, rid, 0x3f6, 0x3f6, 1); - r = resource_list_reserve(rl, bus, dev, type, &rid, 0x3f6, + (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x3f6, 0x3f6, 1, 0); } if (progif & PCIP_STORAGE_IDE_MODESEC) { @@ -3000,11 +2998,11 @@ pci_ata_maps(device_t bus, device_t dev, } else { rid = PCIR_BAR(2); resource_list_add(rl, type, rid, 0x170, 0x177, 8); - r = resource_list_reserve(rl, bus, dev, type, &rid, 0x170, + (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x170, 0x177, 8, 0); rid = PCIR_BAR(3); resource_list_add(rl, type, rid, 0x376, 0x376, 1); - r = resource_list_reserve(rl, bus, dev, type, &rid, 0x376, + (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x376, 0x376, 1, 0); } pci_add_map(bus, dev, PCIR_BAR(4), rl, force, @@ -3650,7 +3648,6 @@ pci_set_power_children(device_t dev, dev int state) { device_t child, pcib; - struct pci_devinfo *dinfo; int dstate, i; /* @@ -3663,7 +3660,6 @@ pci_set_power_children(device_t dev, dev pcib = device_get_parent(dev); for (i = 0; i < numdevs; i++) { child = devlist[i]; - dinfo = device_get_ivars(child); dstate = state; if (device_is_attached(child) && PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/kern/kern_exit.c Fri Jun 5 08:36:25 2015 (r284021) @@ -951,12 +951,10 @@ static int proc_to_reap(struct thread *td, struct proc *p, idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *siginfo) { - struct proc *q; struct rusage *rup; sx_assert(&proctree_lock, SA_XLOCKED); - q = td->td_proc; PROC_LOCK(p); switch (idtype) { Modified: stable/10/sys/kern/kern_synch.c ============================================================================== --- stable/10/sys/kern/kern_synch.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/kern/kern_synch.c Fri Jun 5 08:36:25 2015 (r284021) @@ -432,11 +432,9 @@ mi_switch(int flags, struct thread *newt { uint64_t runtime, new_switchtime; struct thread *td; - struct proc *p; td = curthread; /* XXX */ THREAD_LOCK_ASSERT(td, MA_OWNED | MA_NOTRECURSED); - p = td->td_proc; /* XXX */ KASSERT(!TD_ON_RUNQ(td), ("mi_switch: called by old code")); #ifdef INVARIANTS if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td)) @@ -476,7 +474,7 @@ mi_switch(int flags, struct thread *newt PCPU_INC(cnt.v_swtch); PCPU_SET(switchticks, ticks); CTR4(KTR_PROC, "mi_switch: old thread %ld (td_sched %p, pid %ld, %s)", - td->td_tid, td->td_sched, p->p_pid, td->td_name); + td->td_tid, td->td_sched, td->td_proc->p_pid, td->td_name); #if (KTR_COMPILE & KTR_SCHED) != 0 if (TD_IS_IDLETHREAD(td)) KTR_STATE1(KTR_SCHED, "thread", sched_tdname(td), "idle", @@ -495,7 +493,7 @@ mi_switch(int flags, struct thread *newt "prio:%d", td->td_priority); CTR4(KTR_PROC, "mi_switch: new thread %ld (td_sched %p, pid %ld, %s)", - td->td_tid, td->td_sched, p->p_pid, td->td_name); + td->td_tid, td->td_sched, td->td_proc->p_pid, td->td_name); /* * If the last thread was exiting, finish cleaning it up. Modified: stable/10/sys/kern/vfs_cluster.c ============================================================================== --- stable/10/sys/kern/vfs_cluster.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/kern/vfs_cluster.c Fri Jun 5 08:36:25 2015 (r284021) @@ -310,7 +310,6 @@ static struct buf * cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn, daddr_t blkno, long size, int run, int gbflags, struct buf *fbp) { - struct bufobj *bo; struct buf *bp, *tbp; daddr_t bn; off_t off; @@ -376,7 +375,6 @@ cluster_rbuild(struct vnode *vp, u_quad_ bp->b_npages = 0; inc = btodb(size); - bo = &vp->v_bufobj; for (bn = blkno, i = 0; i < run; ++i, bn += inc) { if (i == 0) { VM_OBJECT_WLOCK(tbp->b_bufobj->bo_object); Modified: stable/10/sys/kern/vfs_init.c ============================================================================== --- stable/10/sys/kern/vfs_init.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/kern/vfs_init.c Fri Jun 5 08:36:25 2015 (r284021) @@ -312,9 +312,7 @@ static int vfs_unregister(struct vfsconf *vfc) { struct vfsconf *vfsp; - int error, i, maxtypenum; - - i = vfc->vfc_typenum; + int error, maxtypenum; vfsconf_lock(); vfsp = vfs_byname_locked(vfc->vfc_name); Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Fri Jun 5 08:36:25 2015 (r284021) @@ -4692,12 +4692,10 @@ softdep_setup_dotdot_link(dp, ip) struct inodedep *inodedep; struct jaddref *jaddref; struct vnode *dvp; - struct vnode *vp; KASSERT(MOUNTEDSOFTDEP(UFSTOVFS(dp->i_ump)) != 0, ("softdep_setup_dotdot_link called on non-softdep filesystem")); dvp = ITOV(dp); - vp = ITOV(ip); jaddref = NULL; /* * We don't set MKDIR_PARENT as this is not tied to a mkdir and @@ -7066,7 +7064,6 @@ trunc_dependencies(ip, freeblks, lastlbn struct bufobj *bo; struct vnode *vp; struct buf *bp; - struct fs *fs; int blkoff; /* @@ -7075,7 +7072,6 @@ trunc_dependencies(ip, freeblks, lastlbn * Once they are all there, walk the list and get rid of * any dependencies. */ - fs = ip->i_fs; vp = ITOV(ip); bo = &vp->v_bufobj; BO_LOCK(bo); @@ -9511,12 +9507,10 @@ handle_written_sbdep(sbdep, bp) struct buf *bp; { struct inodedep *inodedep; - struct mount *mp; struct fs *fs; LOCK_OWNED(sbdep->sb_ump); fs = sbdep->sb_fs; - mp = UFSTOVFS(sbdep->sb_ump); /* * If the superblock doesn't match the in-memory list start over. */ Modified: stable/10/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_suspend.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ffs/ffs_suspend.c Fri Jun 5 08:36:25 2015 (r284021) @@ -176,7 +176,6 @@ out: static int ffs_susp_suspend(struct mount *mp) { - struct fs *fs; struct ufsmount *ump; int error; @@ -188,7 +187,6 @@ ffs_susp_suspend(struct mount *mp) return (EBUSY); ump = VFSTOUFS(mp); - fs = ump->um_fs; /* * Make sure the calling thread is permitted to access the mounted Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vfsops.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ffs/ffs_vfsops.c Fri Jun 5 08:36:25 2015 (r284021) @@ -1485,7 +1485,7 @@ ffs_sync(mp, waitfor) struct inode *ip; struct ufsmount *ump = VFSTOUFS(mp); struct fs *fs; - int error, count, wait, lockreq, allerror = 0; + int error, count, lockreq, allerror = 0; int suspend; int suspended; int secondary_writes; @@ -1494,7 +1494,6 @@ ffs_sync(mp, waitfor) int softdep_accdeps; struct bufobj *bo; - wait = 0; suspend = 0; suspended = 0; td = curthread; @@ -1516,10 +1515,8 @@ ffs_sync(mp, waitfor) suspend = 1; waitfor = MNT_WAIT; } - if (waitfor == MNT_WAIT) { - wait = 1; + if (waitfor == MNT_WAIT) lockreq = LK_EXCLUSIVE; - } lockreq |= LK_INTERLOCK | LK_SLEEPFAIL; loop: /* Grab snapshot of secondary write counts */ @@ -2023,7 +2020,6 @@ static int ffs_bufwrite(struct buf *bp) { struct buf *newbp; - int oldflags; CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); if (bp->b_flags & B_INVAL) { @@ -2031,8 +2027,6 @@ ffs_bufwrite(struct buf *bp) return (0); } - oldflags = bp->b_flags; - if (!BUF_ISLOCKED(bp)) panic("bufwrite: buffer is not busy???"); /* Modified: stable/10/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vnops.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ffs/ffs_vnops.c Fri Jun 5 08:36:25 2015 (r284021) @@ -1407,11 +1407,6 @@ struct vop_openextattr_args { }; */ { - struct inode *ip; - struct fs *fs; - - ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1435,11 +1430,6 @@ struct vop_closeextattr_args { }; */ { - struct inode *ip; - struct fs *fs; - - ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1553,13 +1543,11 @@ vop_getextattr { */ { struct inode *ip; - struct fs *fs; u_char *eae, *p; unsigned easize; int error, ealen; ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1608,14 +1596,12 @@ vop_listextattr { */ { struct inode *ip; - struct fs *fs; u_char *eae, *p, *pe, *pn; unsigned easize; uint32_t ul; int error, ealen; ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); Modified: stable/10/sys/ufs/ufs/ufs_bmap.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_bmap.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ufs/ufs_bmap.c Fri Jun 5 08:36:25 2015 (r284021) @@ -114,7 +114,6 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, ru struct buf *bp; struct ufsmount *ump; struct mount *mp; - struct vnode *devvp; struct indir a[NIADDR+1], *ap; ufs2_daddr_t daddr; ufs_lbn_t metalbn; @@ -125,7 +124,6 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, ru ip = VTOI(vp); mp = vp->v_mount; ump = VFSTOUFS(mp); - devvp = ump->um_devvp; if (runp) { maxrun = mp->mnt_iosize_max / mp->mnt_stat.f_iosize - 1; Modified: stable/10/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_dirhash.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ufs/ufs_dirhash.c Fri Jun 5 08:36:25 2015 (r284021) @@ -189,9 +189,7 @@ ufsdirhash_create(struct inode *ip) struct dirhash *ndh; struct dirhash *dh; struct vnode *vp; - int error; - error = 0; ndh = dh = NULL; vp = ip->i_vnode; for (;;) { @@ -273,11 +271,9 @@ static struct dirhash * ufsdirhash_acquire(struct inode *ip) { struct dirhash *dh; - struct vnode *vp; ASSERT_VOP_ELOCKED(ip->i_vnode, __FUNCTION__); - vp = ip->i_vnode; dh = ip->i_dirhash; if (dh == NULL) return (NULL); Modified: stable/10/sys/x86/iommu/busdma_dmar.c ============================================================================== --- stable/10/sys/x86/iommu/busdma_dmar.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/x86/iommu/busdma_dmar.c Fri Jun 5 08:36:25 2015 (r284021) @@ -815,7 +815,6 @@ dmar_bus_task_dmamap(void *arg, int pend struct bus_dma_tag_dmar *tag; struct bus_dmamap_dmar *map; struct dmar_unit *unit; - struct dmar_ctx *ctx; unit = arg; DMAR_LOCK(unit); @@ -823,7 +822,6 @@ dmar_bus_task_dmamap(void *arg, int pend TAILQ_REMOVE(&unit->delayed_maps, map, delay_link); DMAR_UNLOCK(unit); tag = map->tag; - ctx = map->tag->ctx; map->cansleep = true; map->locked = false; bus_dmamap_load_mem((bus_dma_tag_t)tag, (bus_dmamap_t)map, @@ -844,9 +842,7 @@ dmar_bus_task_dmamap(void *arg, int pend static void dmar_bus_schedule_dmamap(struct dmar_unit *unit, struct bus_dmamap_dmar *map) { - struct dmar_ctx *ctx; - ctx = map->tag->ctx; map->locked = false; DMAR_LOCK(unit); TAILQ_INSERT_TAIL(&unit->delayed_maps, map, delay_link); Modified: stable/10/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- stable/10/sys/x86/iommu/intel_idpgtbl.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/x86/iommu/intel_idpgtbl.c Fri Jun 5 08:36:25 2015 (r284021) @@ -107,7 +107,7 @@ static void ctx_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, dmar_gaddr_t addr) { - vm_page_t m, m1; + vm_page_t m1; dmar_pte_t *pte; struct sf_buf *sf; dmar_gaddr_t f, pg_sz; @@ -117,7 +117,7 @@ ctx_idmap_nextlvl(struct idpgtbl *tbl, i VM_OBJECT_ASSERT_LOCKED(tbl->pgtbl_obj); if (addr >= tbl->maxaddr) return; - m = dmar_pgalloc(tbl->pgtbl_obj, idx, DMAR_PGF_OBJL | DMAR_PGF_WAITOK | + (void)dmar_pgalloc(tbl->pgtbl_obj, idx, DMAR_PGF_OBJL | DMAR_PGF_WAITOK | DMAR_PGF_ZERO); base = idx * DMAR_NPTEPG + 1; /* Index of the first child page of idx */ pg_sz = pglvl_page_size(tbl->pglvl, lvl); @@ -597,7 +597,7 @@ ctx_unmap_buf_locked(struct dmar_ctx *ct dmar_pte_t *pte; struct sf_buf *sf; vm_pindex_t idx; - dmar_gaddr_t pg_sz, base1, size1; + dmar_gaddr_t pg_sz; int lvl; DMAR_CTX_ASSERT_PGLOCKED(ctx); @@ -624,8 +624,6 @@ ctx_unmap_buf_locked(struct dmar_ctx *ct KASSERT((flags & ~DMAR_PGF_WAITOK) == 0, ("invalid flags %x", flags)); pg_sz = 0; /* silence gcc */ - base1 = base; - size1 = size; flags |= DMAR_PGF_OBJL; TD_PREP_PINNED_ASSERT; From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 15:51:24 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35487A7E; Fri, 5 Jun 2015 15:51:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 081121216; Fri, 5 Jun 2015 15:51:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55FpNGi081548; Fri, 5 Jun 2015 15:51:23 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55FpNAh081547; Fri, 5 Jun 2015 15:51:23 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051551.t55FpNAh081547@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 15:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284026 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 15:51:24 -0000 Author: avg Date: Fri Jun 5 15:51:23 2015 New Revision: 284026 URL: https://svnweb.freebsd.org/changeset/base/284026 Log: MFC r282766: zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 5 15:32:04 2015 (r284025) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 5 15:51:23 2015 (r284026) @@ -4196,7 +4196,11 @@ zfs_ioc_recv(zfs_cmd_t *zc) return (error); fd = zc->zc_cookie; - fp = getf(fd, cap_rights_init(&rights, CAP_PREAD)); +#ifdef illumos + fp = getf(fd); +#else + fget_read(curthread, fd, cap_rights_init(&rights, CAP_PREAD), &fp); +#endif if (fp == NULL) { nvlist_free(props); return (SET_ERROR(EBADF)); @@ -4442,8 +4446,12 @@ zfs_ioc_send(zfs_cmd_t *zc) file_t *fp; cap_rights_t rights; - fp = getf(zc->zc_cookie, - cap_rights_init(&rights, CAP_WRITE)); +#ifdef illumos + fp = getf(zc->zc_cookie); +#else + fget_write(curthread, zc->zc_cookie, + cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); @@ -5039,7 +5047,12 @@ zfs_ioc_diff(zfs_cmd_t *zc) offset_t off; int error; - fp = getf(zc->zc_cookie, cap_rights_init(&rights, CAP_WRITE)); +#ifdef illumos + fp = getf(zc->zc_cookie); +#else + fget_write(curthread, zc->zc_cookie, + cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); @@ -5404,6 +5417,7 @@ static int zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) { cap_rights_t rights; + file_t *fp; int error; offset_t off; char *fromname = NULL; @@ -5420,7 +5434,11 @@ zfs_ioc_send_new(const char *snapname, n largeblockok = nvlist_exists(innvl, "largeblockok"); embedok = nvlist_exists(innvl, "embedok"); - file_t *fp = getf(fd, cap_rights_init(&rights, CAP_READ)); +#ifdef illumos + file_t *fp = getf(fd); +#else + fget_write(curthread, fd, cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 16:02:25 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA2E4ED2; Fri, 5 Jun 2015 16:02:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96F3815C5; Fri, 5 Jun 2015 16:02:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55G2Pl5086842; Fri, 5 Jun 2015 16:02:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55G2Pgi086841; Fri, 5 Jun 2015 16:02:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051602.t55G2Pgi086841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 16:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284028 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 16:02:25 -0000 Author: avg Date: Fri Jun 5 16:02:24 2015 New Revision: 284028 URL: https://svnweb.freebsd.org/changeset/base/284028 Log: MFC r283524: dsl_dataset_promote_check: ensure that shared snaps do not become too long Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 16:02:07 2015 (r284027) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 16:02:24 2015 (r284028) @@ -2161,12 +2161,14 @@ dsl_dataset_promote_check(void *arg, dmu int err; uint64_t unused; uint64_t ss_mv_cnt; + size_t max_snap_len; err = promote_hold(ddpa, dp, FTAG); if (err != 0) return (err); hds = ddpa->ddpa_clone; + max_snap_len = MAXNAMELEN - strlen(ddpa->ddpa_clonename) - 1; if (dsl_dataset_phys(hds)->ds_flags & DS_FLAG_NOPROMOTE) { promote_rele(ddpa, FTAG); @@ -2230,6 +2232,10 @@ dsl_dataset_promote_check(void *arg, dmu /* Check that the snapshot name does not conflict */ VERIFY0(dsl_dataset_get_snapname(ds)); + if (strlen(ds->ds_snapname) >= max_snap_len) { + err = SET_ERROR(ENAMETOOLONG); + goto out; + } err = dsl_dataset_snap_lookup(hds, ds->ds_snapname, &val); if (err == 0) { (void) strcpy(ddpa->err_ds, snap->ds->ds_snapname); From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 17:05:12 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 283F082A; Fri, 5 Jun 2015 17:05:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 141C815DA; Fri, 5 Jun 2015 17:05:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H5Crs019150; Fri, 5 Jun 2015 17:05:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H595d019140; Fri, 5 Jun 2015 17:05:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506051705.t55H595d019140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Jun 2015 17:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284034 - in stable/10/sys/dev: pccbb pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 17:05:12 -0000 Author: jhb Date: Fri Jun 5 17:05:09 2015 New Revision: 284034 URL: https://svnweb.freebsd.org/changeset/base/284034 Log: MFC 274633,274639,274663,277233-277235,281870,281871,281873,281874: Various fixes for suspend and resume of PCI to PCI and PCI to Cardbus bridges. 274633: Remove stray empty comment. The code is adequately explained in the block comment above, so there's nothing to add here. 274639: Modernize comments about BIOSes being lame since in this detail they aren't lame, the rules changed along the way. Catch up to 1999 or so with the new rules. 274663: Fix typo pointed out by avg@ and Joerg Sonnenberger. Add a clarifying sentence too. 277233: Suspend and resume were the only two functions not to follow the brdev convention here, so fix that. 277234: Move the suspsned and resume functions to the bus attachment. They were accessing PCI config registers, which won't work for the ISA version. 277235: Always enable I/O, memory and dma cycles. Some BIOSes don't enable them, sometimes they are reset for power state transitions or during whatever happens while suspended. Also, it is good practice to always do this. 281870: Cosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1. 281871: The minimim grant and maximum latency PCI config registers are only valid for type 0 devices, not type 1 or 2 bridges. Don't read them for bridge devices during bus scans and return an error when attempting to read them as ivars for bridge devices. 281873: Don't explicitly manage power states for PCI-PCI bridge devices in the driver's suspend and resume routines. These have been redundant no-ops since r214065 changed the PCI bus driver to manage power states for all devices (including type 1/2 bridge devices) during suspend and resume. 281874: Update the pci_cfg_save/restore routines to operate on bridge devices (type 1 and type 2) as well as leaf devices (type 0). In particular, this allows the existing PCI bus logic to save and restore capability registers such as MSI and PCI-express work for bridge devices rather than requiring that code to be duplicated in bridge drivers. It also means that bridge drivers no longer need to save and restore basic registers such as the PCI command register or BARs nor manage powerstates for the bridge device. While here, pci_setup_secbus() has been changed to initialize the 'sec' and 'sub' fields in the 'secbus' structure instead of requiring the pcib and pccbb drivers to do this in the NEW_PCIB + PCI_RES_BUS case. Modified: stable/10/sys/dev/pccbb/pccbb.c stable/10/sys/dev/pccbb/pccbb_isa.c stable/10/sys/dev/pccbb/pccbb_pci.c stable/10/sys/dev/pccbb/pccbbvar.h stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pci_pci.c stable/10/sys/dev/pci/pcib_private.h stable/10/sys/dev/pci/pcivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pccbb/pccbb.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pccbb/pccbb.c Fri Jun 5 17:05:09 2015 (r284034) @@ -996,8 +996,6 @@ cbb_cardbus_reset_power(device_t brdev, * a cardbus bus, so that's the only register we check here. */ if (on && CBB_CARD_PRESENT(cbb_get(sc, CBB_SOCKET_STATE))) { - /* - */ PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL, &~CBBM_BRIDGECTRL_RESET, 2); b = pcib_get_bus(child); @@ -1569,57 +1567,6 @@ cbb_write_ivar(device_t brdev, device_t } int -cbb_suspend(device_t self) -{ - int error = 0; - struct cbb_softc *sc = device_get_softc(self); - - error = bus_generic_suspend(self); - if (error != 0) - return (error); - cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ - sc->cardok = 0; /* Card is bogus now */ - return (0); -} - -int -cbb_resume(device_t self) -{ - int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(self); - uint32_t tmp; - - /* - * Some BIOSes will not save the BARs for the pci chips, so we - * must do it ourselves. If the BAR is reset to 0 for an I/O - * device, it will read back as 0x1, so no explicit test for - * memory devices are needed. - * - * Note: The PCI bus code should do this automatically for us on - * suspend/resume, but until it does, we have to cope. - */ - pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((self, "PCI Memory allocated: %08lx\n", - rman_get_start(sc->base_res))); - - sc->chipinit(sc); - - /* reset interrupt -- Do we really need to do this? */ - tmp = cbb_get(sc, CBB_SOCKET_EVENT); - cbb_set(sc, CBB_SOCKET_EVENT, tmp); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* Signal the thread to wakeup. */ - wakeup(&sc->intrhand); - - error = bus_generic_resume(self); - - return (error); -} - -int cbb_child_present(device_t parent, device_t child) { struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(parent); Modified: stable/10/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb_isa.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pccbb/pccbb_isa.c Fri Jun 5 17:05:09 2015 (r284034) @@ -205,13 +205,25 @@ cbb_isa_attach(device_t dev) return (ENOMEM); } +static int +cbb_isa_suspend(device_t dev) +{ + return (0); +} + +static int +cbb_isa_resume(device_t dev) +{ + return (0); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_isa_probe), DEVMETHOD(device_attach, cbb_isa_attach), DEVMETHOD(device_detach, cbb_detach), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_isa_suspend), + DEVMETHOD(device_resume, cbb_isa_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: stable/10/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb_pci.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pccbb/pccbb_pci.c Fri Jun 5 17:05:09 2015 (r284034) @@ -259,32 +259,6 @@ cbb_pci_probe(device_t brdev) } /* - * Still need this because the pci code only does power for type 0 - * header devices. - */ -static void -cbb_powerstate_d0(device_t dev) -{ - u_int32_t membase, irq; - - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - /* Save important PCI config data. */ - membase = pci_read_config(dev, CBBR_SOCKBASE, 4); - irq = pci_read_config(dev, PCIR_INTLINE, 4); - - /* Reset the power state. */ - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - - /* Restore PCI config data. */ - pci_write_config(dev, CBBR_SOCKBASE, membase, 4); - pci_write_config(dev, PCIR_INTLINE, irq, 4); - } -} - -/* * Print out the config space */ static void @@ -321,15 +295,15 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->exca[0].pccarddev = NULL; sc->domain = pci_get_domain(brdev); - sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); sc->pribus = pcib_get_bus(parent); #if defined(NEW_PCIB) && defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); +#else + sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); + sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); #endif SLIST_INIT(&sc->rl); - cbb_powerstate_d0(brdev); rid = CBBR_SOCKBASE; sc->base_res = bus_alloc_resource_any(brdev, SYS_RES_MEMORY, &rid, @@ -467,22 +441,17 @@ cbb_chipinit(struct cbb_softc *sc) uint32_t mux, sysctrl, reg; /* Set CardBus latency timer */ - if (pci_read_config(sc->dev, PCIR_SECLAT_1, 1) < 0x20) - pci_write_config(sc->dev, PCIR_SECLAT_1, 0x20, 1); + if (pci_read_config(sc->dev, PCIR_SECLAT_2, 1) < 0x20) + pci_write_config(sc->dev, PCIR_SECLAT_2, 0x20, 1); /* Set PCI latency timer */ if (pci_read_config(sc->dev, PCIR_LATTIMER, 1) < 0x20) pci_write_config(sc->dev, PCIR_LATTIMER, 0x20, 1); - /* Restore bus configuration */ - pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1); - pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1); - pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1); - - /* Enable memory access */ + /* Enable DMA, memory access for this card and I/O acces for children */ pci_enable_busmaster(sc->dev); - /* XXX: This should not be necessary, but some chipsets require it */ - PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); + pci_enable_io(sc->dev, SYS_RES_IOPORT); + pci_enable_io(sc->dev, SYS_RES_MEMORY); /* disable Legacy IO */ switch (sc->chipset) { @@ -877,14 +846,64 @@ cbb_write_config(device_t brdev, u_int b b, s, f, reg, val, width); } +static int +cbb_pci_suspend(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = device_get_softc(brdev); + + error = bus_generic_suspend(brdev); + if (error != 0) + return (error); + cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ + sc->cardok = 0; /* Card is bogus now */ + return (0); +} + +static int +cbb_pci_resume(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); + uint32_t tmp; + + /* + * In the APM and early ACPI era, BIOSes saved the PCI config + * registers. As chips became more complicated, that functionality moved + * into the ACPI code / tables. We must therefore, restore the settings + * we made here to make sure the device come back. Transitions to Dx + * from D0 and back to D0 cause the bridge to lose its config space, so + * all the bus mappings and such are preserved. + * + * The PCI layer handles standard PCI registers like the + * command register and BARs, but cbb-specific registers are + * handled here. + */ + sc->chipinit(sc); + + /* reset interrupt -- Do we really need to do this? */ + tmp = cbb_get(sc, CBB_SOCKET_EVENT); + cbb_set(sc, CBB_SOCKET_EVENT, tmp); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* Signal the thread to wakeup. */ + wakeup(&sc->intrhand); + + error = bus_generic_resume(brdev); + + return (error); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), DEVMETHOD(device_detach, cbb_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_pci_suspend), + DEVMETHOD(device_resume, cbb_pci_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: stable/10/sys/dev/pccbb/pccbbvar.h ============================================================================== --- stable/10/sys/dev/pccbb/pccbbvar.h Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pccbb/pccbbvar.h Fri Jun 5 17:05:09 2015 (r284034) @@ -134,11 +134,9 @@ int cbb_read_ivar(device_t brdev, device uintptr_t *result); int cbb_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); -int cbb_resume(device_t self); int cbb_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -int cbb_suspend(device_t self); int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); int cbb_write_ivar(device_t brdev, device_t child, int which, Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pci/pci.c Fri Jun 5 17:05:09 2015 (r284034) @@ -585,12 +585,24 @@ pci_hdrtypedata(device_t pcib, int b, in case PCIM_HDRTYPE_NORMAL: cfg->subvendor = REG(PCIR_SUBVEND_0, 2); cfg->subdevice = REG(PCIR_SUBDEV_0, 2); + cfg->mingnt = REG(PCIR_MINGNT, 1); + cfg->maxlat = REG(PCIR_MAXLAT, 1); cfg->nummaps = PCI_MAXMAPS_0; break; case PCIM_HDRTYPE_BRIDGE: + cfg->bridge.br_seclat = REG(PCIR_SECLAT_1, 1); + cfg->bridge.br_subbus = REG(PCIR_SUBBUS_1, 1); + cfg->bridge.br_secbus = REG(PCIR_SECBUS_1, 1); + cfg->bridge.br_pribus = REG(PCIR_PRIBUS_1, 1); + cfg->bridge.br_control = REG(PCIR_BRIDGECTL_1, 2); cfg->nummaps = PCI_MAXMAPS_1; break; case PCIM_HDRTYPE_CARDBUS: + cfg->bridge.br_seclat = REG(PCIR_SECLAT_2, 1); + cfg->bridge.br_subbus = REG(PCIR_SUBBUS_2, 1); + cfg->bridge.br_secbus = REG(PCIR_SECBUS_2, 1); + cfg->bridge.br_pribus = REG(PCIR_PRIBUS_2, 1); + cfg->bridge.br_control = REG(PCIR_BRIDGECTL_2, 2); cfg->subvendor = REG(PCIR_SUBVEND_2, 2); cfg->subdevice = REG(PCIR_SUBDEV_2, 2); cfg->nummaps = PCI_MAXMAPS_2; @@ -637,9 +649,6 @@ pci_read_device(device_t pcib, int d, in cfg->intpin = REG(PCIR_INTPIN, 1); cfg->intline = REG(PCIR_INTLINE, 1); - cfg->mingnt = REG(PCIR_MINGNT, 1); - cfg->maxlat = REG(PCIR_MAXLAT, 1); - cfg->mfdev = (cfg->hdrtype & PCIM_MFDEV) != 0; cfg->hdrtype &= ~PCIM_MFDEV; STAILQ_INIT(&cfg->maps); @@ -4360,9 +4369,17 @@ pci_read_ivar(device_t dev, device_t chi *result = cfg->cachelnsz; break; case PCI_IVAR_MINGNT: + if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) { + *result = -1; + return (EINVAL); + } *result = cfg->mingnt; break; case PCI_IVAR_MAXLAT: + if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) { + *result = -1; + return (EINVAL); + } *result = cfg->maxlat; break; case PCI_IVAR_LATTIMER: @@ -4931,16 +4948,6 @@ pci_cfg_restore(device_t dev, struct pci { /* - * Only do header type 0 devices. Type 1 devices are bridges, - * which we know need special treatment. Type 2 devices are - * cardbus bridges which also require special treatment. - * Other types are unknown, and we err on the side of safety - * by ignoring them. - */ - if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) - return; - - /* * Restore the device to full power mode. We must do this * before we restore the registers because moving from D3 to * D0 will cause the chip's BARs and some other registers to @@ -4950,16 +4957,44 @@ pci_cfg_restore(device_t dev, struct pci */ if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) pci_set_powerstate(dev, PCI_POWERSTATE_D0); - pci_restore_bars(dev); pci_write_config(dev, PCIR_COMMAND, dinfo->cfg.cmdreg, 2); pci_write_config(dev, PCIR_INTLINE, dinfo->cfg.intline, 1); pci_write_config(dev, PCIR_INTPIN, dinfo->cfg.intpin, 1); - pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1); - pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1); pci_write_config(dev, PCIR_CACHELNSZ, dinfo->cfg.cachelnsz, 1); pci_write_config(dev, PCIR_LATTIMER, dinfo->cfg.lattimer, 1); pci_write_config(dev, PCIR_PROGIF, dinfo->cfg.progif, 1); pci_write_config(dev, PCIR_REVID, dinfo->cfg.revid, 1); + switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1); + pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1); + break; + case PCIM_HDRTYPE_BRIDGE: + pci_write_config(dev, PCIR_SECLAT_1, + dinfo->cfg.bridge.br_seclat, 1); + pci_write_config(dev, PCIR_SUBBUS_1, + dinfo->cfg.bridge.br_subbus, 1); + pci_write_config(dev, PCIR_SECBUS_1, + dinfo->cfg.bridge.br_secbus, 1); + pci_write_config(dev, PCIR_PRIBUS_1, + dinfo->cfg.bridge.br_pribus, 1); + pci_write_config(dev, PCIR_BRIDGECTL_1, + dinfo->cfg.bridge.br_control, 2); + break; + case PCIM_HDRTYPE_CARDBUS: + pci_write_config(dev, PCIR_SECLAT_2, + dinfo->cfg.bridge.br_seclat, 1); + pci_write_config(dev, PCIR_SUBBUS_2, + dinfo->cfg.bridge.br_subbus, 1); + pci_write_config(dev, PCIR_SECBUS_2, + dinfo->cfg.bridge.br_secbus, 1); + pci_write_config(dev, PCIR_PRIBUS_2, + dinfo->cfg.bridge.br_pribus, 1); + pci_write_config(dev, PCIR_BRIDGECTL_2, + dinfo->cfg.bridge.br_control, 2); + break; + } + pci_restore_bars(dev); /* * Restore extended capabilities for PCI-Express and PCI-X @@ -5028,40 +5063,57 @@ pci_cfg_save(device_t dev, struct pci_de int ps; /* - * Only do header type 0 devices. Type 1 devices are bridges, which - * we know need special treatment. Type 2 devices are cardbus bridges - * which also require special treatment. Other types are unknown, and - * we err on the side of safety by ignoring them. Powering down - * bridges should not be undertaken lightly. - */ - if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) - return; - - /* * Some drivers apparently write to these registers w/o updating our * cached copy. No harm happens if we update the copy, so do so here * so we can restore them. The COMMAND register is modified by the * bus w/o updating the cache. This should represent the normally - * writable portion of the 'defined' part of type 0 headers. In - * theory we also need to save/restore the PCI capability structures - * we know about, but apart from power we don't know any that are - * writable. + * writable portion of the 'defined' part of type 0/1/2 headers. */ - dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2); - dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2); dinfo->cfg.vendor = pci_read_config(dev, PCIR_VENDOR, 2); dinfo->cfg.device = pci_read_config(dev, PCIR_DEVICE, 2); dinfo->cfg.cmdreg = pci_read_config(dev, PCIR_COMMAND, 2); dinfo->cfg.intline = pci_read_config(dev, PCIR_INTLINE, 1); dinfo->cfg.intpin = pci_read_config(dev, PCIR_INTPIN, 1); - dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1); - dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1); dinfo->cfg.cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1); dinfo->cfg.lattimer = pci_read_config(dev, PCIR_LATTIMER, 1); dinfo->cfg.baseclass = pci_read_config(dev, PCIR_CLASS, 1); dinfo->cfg.subclass = pci_read_config(dev, PCIR_SUBCLASS, 1); dinfo->cfg.progif = pci_read_config(dev, PCIR_PROGIF, 1); dinfo->cfg.revid = pci_read_config(dev, PCIR_REVID, 1); + switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2); + dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2); + dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1); + dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1); + break; + case PCIM_HDRTYPE_BRIDGE: + dinfo->cfg.bridge.br_seclat = pci_read_config(dev, + PCIR_SECLAT_1, 1); + dinfo->cfg.bridge.br_subbus = pci_read_config(dev, + PCIR_SUBBUS_1, 1); + dinfo->cfg.bridge.br_secbus = pci_read_config(dev, + PCIR_SECBUS_1, 1); + dinfo->cfg.bridge.br_pribus = pci_read_config(dev, + PCIR_PRIBUS_1, 1); + dinfo->cfg.bridge.br_control = pci_read_config(dev, + PCIR_BRIDGECTL_1, 2); + break; + case PCIM_HDRTYPE_CARDBUS: + dinfo->cfg.bridge.br_seclat = pci_read_config(dev, + PCIR_SECLAT_2, 1); + dinfo->cfg.bridge.br_subbus = pci_read_config(dev, + PCIR_SUBBUS_2, 1); + dinfo->cfg.bridge.br_secbus = pci_read_config(dev, + PCIR_SECBUS_2, 1); + dinfo->cfg.bridge.br_pribus = pci_read_config(dev, + PCIR_PRIBUS_2, 1); + dinfo->cfg.bridge.br_control = pci_read_config(dev, + PCIR_BRIDGECTL_2, 2); + dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_2, 2); + dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_2, 2); + break; + } if (dinfo->cfg.pcie.pcie_location != 0) pci_cfg_save_pcie(dev, dinfo); Modified: stable/10/sys/dev/pci/pci_pci.c ============================================================================== --- stable/10/sys/dev/pci/pci_pci.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pci/pci_pci.c Fri Jun 5 17:05:09 2015 (r284034) @@ -549,18 +549,22 @@ void pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count) { char buf[64]; - int error, rid; + int error, rid, sec_reg; switch (pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) { case PCIM_HDRTYPE_BRIDGE: + sec_reg = PCIR_SECBUS_1; bus->sub_reg = PCIR_SUBBUS_1; break; case PCIM_HDRTYPE_CARDBUS: + sec_reg = PCIR_SECBUS_2; bus->sub_reg = PCIR_SUBBUS_2; break; default: panic("not a PCI bridge"); } + bus->sec = pci_read_config(dev, sec_reg, 1); + bus->sub = pci_read_config(dev, bus->sub_reg, 1); bus->dev = dev; bus->rman.rm_start = 0; bus->rman.rm_end = PCI_BUSMAX; @@ -845,20 +849,16 @@ pcib_set_mem_decode(struct pcib_softc *s static void pcib_cfg_save(struct pcib_softc *sc) { +#ifndef NEW_PCIB device_t dev; + uint16_t command; dev = sc->dev; - sc->command = pci_read_config(dev, PCIR_COMMAND, 2); - sc->pribus = pci_read_config(dev, PCIR_PRIBUS_1, 1); - sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); - sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); - sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); - sc->seclat = pci_read_config(dev, PCIR_SECLAT_1, 1); -#ifndef NEW_PCIB - if (sc->command & PCIM_CMD_PORTEN) + command = pci_read_config(dev, PCIR_COMMAND, 2); + if (command & PCIM_CMD_PORTEN) pcib_get_io_decode(sc); - if (sc->command & PCIM_CMD_MEMEN) + if (command & PCIM_CMD_MEMEN) pcib_get_mem_decode(sc); #endif } @@ -870,21 +870,18 @@ static void pcib_cfg_restore(struct pcib_softc *sc) { device_t dev; - +#ifndef NEW_PCIB + uint16_t command; +#endif dev = sc->dev; - pci_write_config(dev, PCIR_COMMAND, sc->command, 2); - pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1); - pci_write_config(dev, PCIR_SECBUS_1, sc->bus.sec, 1); - pci_write_config(dev, PCIR_SUBBUS_1, sc->bus.sub, 1); - pci_write_config(dev, PCIR_BRIDGECTL_1, sc->bridgectl, 2); - pci_write_config(dev, PCIR_SECLAT_1, sc->seclat, 1); #ifdef NEW_PCIB pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); #else - if (sc->command & PCIM_CMD_PORTEN) + command = pci_read_config(dev, PCIR_COMMAND, 2); + if (command & PCIM_CMD_PORTEN) pcib_set_io_decode(sc); - if (sc->command & PCIM_CMD_MEMEN) + if (command & PCIM_CMD_MEMEN) pcib_set_mem_decode(sc); #endif } @@ -918,7 +915,11 @@ pcib_attach_common(device_t dev) * Get current bridge configuration. */ sc->domain = pci_get_domain(dev); - sc->secstat = pci_read_config(dev, PCIR_SECSTAT_1, 2); +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) + sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); + sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); +#endif + sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); pcib_cfg_save(sc); /* @@ -1097,32 +1098,15 @@ pcib_attach(device_t dev) int pcib_suspend(device_t dev) { - device_t pcib; - int dstate, error; pcib_cfg_save(device_get_softc(dev)); - error = bus_generic_suspend(dev); - if (error == 0 && pci_do_power_suspend) { - dstate = PCI_POWERSTATE_D3; - pcib = device_get_parent(device_get_parent(dev)); - if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) - pci_set_powerstate(dev, dstate); - } - return (error); + return (bus_generic_suspend(dev)); } int pcib_resume(device_t dev) { - device_t pcib; - int dstate; - if (pci_do_power_resume) { - pcib = device_get_parent(device_get_parent(dev)); - dstate = PCI_POWERSTATE_D0; - if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) - pci_set_powerstate(dev, dstate); - } pcib_cfg_restore(device_get_softc(dev)); return (bus_generic_resume(dev)); } Modified: stable/10/sys/dev/pci/pcib_private.h ============================================================================== --- stable/10/sys/dev/pci/pcib_private.h Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pci/pcib_private.h Fri Jun 5 17:05:09 2015 (r284034) @@ -106,7 +106,6 @@ struct pcib_softc #define PCIB_DISABLE_MSI 0x2 #define PCIB_DISABLE_MSIX 0x4 #define PCIB_ENABLE_ARI 0x8 - uint16_t command; /* command register */ u_int domain; /* domain number */ u_int pribus; /* primary bus number */ struct pcib_secbus bus; /* secondary bus numbers */ @@ -122,9 +121,7 @@ struct pcib_softc uint32_t iobase; /* base address of port window */ uint32_t iolimit; /* topmost address of port window */ #endif - uint16_t secstat; /* secondary bus status register */ uint16_t bridgectl; /* bridge control register */ - uint8_t seclat; /* secondary bus latency timer */ }; #define PCIB_SUPPORTED_ARI_VER 1 Modified: stable/10/sys/dev/pci/pcivar.h ============================================================================== --- stable/10/sys/dev/pci/pcivar.h Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pci/pcivar.h Fri Jun 5 17:05:09 2015 (r284034) @@ -39,6 +39,15 @@ typedef uint64_t pci_addr_t; +/* Config registers for PCI-PCI and PCI-Cardbus bridges. */ +struct pcicfg_bridge { + uint8_t br_seclat; + uint8_t br_subbus; + uint8_t br_secbus; + uint8_t br_pribus; + uint16_t br_control; +}; + /* Interesting values for PCI power management */ struct pcicfg_pp { uint16_t pp_cap; /* PCI power management capabilities */ @@ -179,6 +188,7 @@ typedef struct pcicfg { uint8_t slot; /* config space slot address */ uint8_t func; /* config space function number */ + struct pcicfg_bridge bridge; /* Bridges */ struct pcicfg_pp pp; /* Power management */ struct pcicfg_vpd vpd; /* Vital product data */ struct pcicfg_msi msi; /* PCI MSI */ From owner-svn-src-stable-10@FreeBSD.ORG Fri Jun 5 20:38:23 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4133060F; Fri, 5 Jun 2015 20:38:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F4331954; Fri, 5 Jun 2015 20:38:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55KcNsk030816; Fri, 5 Jun 2015 20:38:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55KcNkF030815; Fri, 5 Jun 2015 20:38:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506052038.t55KcNkF030815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Jun 2015 20:38:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284045 - in stable: 10/sys/modules/oce 9/sys/modules/oce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 20:38:23 -0000 Author: jhb Date: Fri Jun 5 20:38:22 2015 New Revision: 284045 URL: https://svnweb.freebsd.org/changeset/base/284045 Log: MFC 281932: Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge about kld filenames for network drivers that requires them to follow the pattern of if_. This also fixes the existing documentation in the manpage which says to use if_oce_load=YES in loader.conf. PR: 199095 Modified: stable/10/sys/modules/oce/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/modules/oce/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/10/sys/modules/oce/Makefile ============================================================================== --- stable/10/sys/modules/oce/Makefile Fri Jun 5 20:30:36 2015 (r284044) +++ stable/10/sys/modules/oce/Makefile Fri Jun 5 20:38:22 2015 (r284045) @@ -3,7 +3,7 @@ # .PATH: ${.CURDIR}/../../dev/oce -KMOD = oce +KMOD = if_oce SRCS = oce_if.c oce_hw.c oce_mbox.c oce_util.c oce_queue.c oce_sysctl.c SRCS += bus_if.h device_if.h pci_if.h opt_inet.h opt_inet6.h From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 09:28:43 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 840B35CA; Sat, 6 Jun 2015 09:28:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8CB1811; Sat, 6 Jun 2015 09:28:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t569ShhJ020879; Sat, 6 Jun 2015 09:28:43 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t569SfjD020849; Sat, 6 Jun 2015 09:28:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506060928.t569SfjD020849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 09:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284052 - in stable/10/sys: arm/conf conf dev/cxgbe modules modules/cxgbe/if_cxgbe powerpc/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 09:28:43 -0000 Author: np Date: Sat Jun 6 09:28:40 2015 New Revision: 284052 URL: https://svnweb.freebsd.org/changeset/base/284052 Log: MFC r276480, r276485, r276498, r277225, r277226, r277227, r277230, r277637, and r283149 (by emaste@). r276485 is the real change here, the rest deal with the fallout of mp_ring's reliance on 64b atomics. Use the incorrectly spelled 'eigth' from struct pkthdr in this branch instead of MFC'ing r261733, which would have renamed the field of a public structure in a -STABLE branch. --- r276480: Temporarily unplug cxgbe(4) from !amd64 builds. r276485: cxgbe(4): major tx rework. a) Front load as much work as possible in if_transmit, before any driver lock or software queue has to get involved. b) Replace buf_ring with a brand new mp_ring (multiproducer ring). This is specifically for the tx multiqueue model where one of the if_transmit producer threads becomes the consumer and other producers carry on as usual. mp_ring is implemented as standalone code and it should be possible to use it in any driver with tx multiqueue. It also has: - the ability to enqueue/dequeue multiple items. This might become significant if packet batching is ever implemented. - an abdication mechanism to allow a thread to give up writing tx descriptors and have another if_transmit thread take over. A thread that's writing tx descriptors can end up doing so for an unbounded time period if a) there are other if_transmit threads continuously feeding the sofware queue, and b) the chip keeps up with whatever the thread is throwing at it. - accurate statistics about interesting events even when the stats come at the expense of additional branches/conditional code. The NIC txq lock is uncontested on the fast path at this point. I've left it there for synchronization with the control events (interface up/down, modload/unload). c) Add support for "type 1" coalescing work request in the normal NIC tx path. This work request is optimized for frames with a single item in the DMA gather list. These are very common when forwarding packets. Note that netmap tx in cxgbe already uses these "type 1" work requests. d) Do not request automatic cidx updates every 32 descriptors. Instead, request updates via bits in individual work requests (still every 32 descriptors approximately). Also, request an automatic final update when the queue idles after activity. This means NIC tx reclaim is still performed lazily but it will catch up quickly as soon as the queue idles. This seems to be the best middle ground and I'll probably do something similar for netmap tx as well. e) Implement a faster tx path for WRQs (used by TOE tx and control queues, _not_ by the normal NIC tx). Allow work requests to be written directly to the hardware descriptor ring if room is available. I will convert t4_tom and iw_cxgbe modules to this faster style gradually. r276498: cxgbe(4): remove buf_ring specific restriction on the txq size. r277225: Make cxgbe(4) buildable with the gcc in base. r277226: Allow cxgbe(4) to be built on i386. Driver attach will succeed only on a subset of i386 systems. r277227: Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it on amd64 only. r277230: Build cxgbe(4) on powerpc64 too. r277637: Make sure the compiler flag to get cxgbe(4) to compile with gcc is used only when gcc is being used. This is what r277225 should have been. Added: stable/10/sys/dev/cxgbe/t4_mp_ring.c - copied, changed from r276485, head/sys/dev/cxgbe/t4_mp_ring.c stable/10/sys/dev/cxgbe/t4_mp_ring.h - copied unchanged from r276485, head/sys/dev/cxgbe/t4_mp_ring.h Modified: stable/10/sys/arm/conf/NOTES stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_l2t.c stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/modules/Makefile stable/10/sys/modules/cxgbe/if_cxgbe/Makefile stable/10/sys/powerpc/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/NOTES ============================================================================== --- stable/10/sys/arm/conf/NOTES Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/arm/conf/NOTES Sat Jun 6 09:28:40 2015 (r284052) @@ -82,6 +82,7 @@ nodevice snake_saver nodevice star_saver nodevice warp_saver +nodevice cxgbe nodevice pcii nodevice snd_cmi nodevice tnt4882 Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/conf/NOTES Sat Jun 6 09:28:40 2015 (r284052) @@ -1907,8 +1907,8 @@ device xmphy # XaQti XMAC II # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn # cm: Arcnet SMC COM90c26 / SMC COM90c56 # (and SMC COM90c66 in '56 compatibility mode) adapters. -# cxgbe: Support for PCI express 10Gb/1Gb adapters based on the Chelsio T4 -# (Terminator 4) ASIC. +# cxgb: Chelsio T3 based 1GbE/10GbE PCIe Ethernet adapters. +# cxgbe:Chelsio T4 and T5 based 1GbE/10GbE/40GbE PCIe Ethernet adapters. # dc: Support for PCI fast ethernet adapters based on the DEC/Intel 21143 # and various workalikes including: # the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics @@ -2057,6 +2057,7 @@ device bge # Broadcom BCM570xx Gigabit device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn device cxgb # Chelsio T3 10 Gigabit Ethernet device cxgb_t3fw # Chelsio T3 10 Gigabit Ethernet firmware +device cxgbe # Chelsio T4 and T5 1GbE/10GbE/40GbE device dc # DEC/Intel 21143 and various workalikes device et # Agere ET1310 10/100/Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) @@ -2085,7 +2086,6 @@ device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # PCI Ethernet NICs. -device cxgbe # Chelsio T4 10GbE PCIe adapter device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel Pro/1000 Gigabit Ethernet device igb # Intel Pro/1000 PCIE Gigabit Ethernet Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/conf/files Sat Jun 6 09:28:40 2015 (r284052) @@ -1135,6 +1135,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe ${GCC_MS_EXTENSIONS}" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 09:28:40 2015 (r284052) @@ -146,7 +146,8 @@ enum { CL_METADATA_SIZE = CACHE_LINE_SIZE, SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ - TX_SGL_SEGS = 36, + TX_SGL_SEGS = 39, + TX_SGL_SEGS_TSO = 38, TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; @@ -266,6 +267,7 @@ struct port_info { struct timeval last_refreshed; struct port_stats stats; + u_int tx_parse_error; eventhandler_tag vlan_c; @@ -301,23 +303,9 @@ struct tx_desc { __be64 flit[8]; }; -struct tx_map { - struct mbuf *m; - bus_dmamap_t map; -}; - -/* DMA maps used for tx */ -struct tx_maps { - struct tx_map *maps; - uint32_t map_total; /* # of DMA maps */ - uint32_t map_pidx; /* next map to be used */ - uint32_t map_cidx; /* reclaimed up to this index */ - uint32_t map_avail; /* # of available maps */ -}; - struct tx_sdesc { + struct mbuf *m; /* m_nextpkt linked chain of frames */ uint8_t desc_used; /* # of hardware descriptors used by the WR */ - uint8_t credits; /* NIC txq: # of frames sent out in the WR */ }; @@ -371,16 +359,12 @@ struct sge_iq { enum { EQ_CTRL = 1, EQ_ETH = 2, -#ifdef TCP_OFFLOAD EQ_OFLD = 3, -#endif /* eq flags */ - EQ_TYPEMASK = 7, /* 3 lsbits hold the type */ - EQ_ALLOCATED = (1 << 3), /* firmware resources allocated */ - EQ_DOOMED = (1 << 4), /* about to be destroyed */ - EQ_CRFLUSHED = (1 << 5), /* expecting an update from SGE */ - EQ_STALLED = (1 << 6), /* out of hw descriptors or dmamaps */ + EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see above) */ + EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ + EQ_ENABLED = (1 << 3), /* open for business */ }; /* Listed in order of preference. Update t4_sysctls too if you change these */ @@ -395,32 +379,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB struct sge_eq { unsigned int flags; /* MUST be first */ unsigned int cntxt_id; /* SGE context id for the eq */ - bus_dma_tag_t desc_tag; - bus_dmamap_t desc_map; - char lockname[16]; struct mtx eq_lock; struct tx_desc *desc; /* KVA of descriptor ring */ - bus_addr_t ba; /* bus address of descriptor ring */ - struct sge_qstat *spg; /* status page, for convenience */ uint16_t doorbells; volatile uint32_t *udb; /* KVA of doorbell (lies within BAR2) */ u_int udb_qid; /* relative qid within the doorbell page */ - uint16_t cap; /* max # of desc, for convenience */ - uint16_t avail; /* available descriptors, for convenience */ - uint16_t qsize; /* size (# of entries) of the queue */ + uint16_t sidx; /* index of the entry with the status page */ uint16_t cidx; /* consumer idx (desc idx) */ uint16_t pidx; /* producer idx (desc idx) */ - uint16_t pending; /* # of descriptors used since last doorbell */ + uint16_t equeqidx; /* EQUEQ last requested at this pidx */ + uint16_t dbidx; /* pidx of the most recent doorbell */ uint16_t iqid; /* iq that gets egr_update for the eq */ uint8_t tx_chan; /* tx channel used by the eq */ - struct task tx_task; - struct callout tx_callout; + volatile u_int equiq; /* EQUIQ outstanding */ - /* stats */ - - uint32_t egr_update; /* # of SGE_EGR_UPDATE notifications for eq */ - uint32_t unstalled; /* recovered from stall */ + bus_dma_tag_t desc_tag; + bus_dmamap_t desc_map; + bus_addr_t ba; /* bus address of descriptor ring */ + char lockname[16]; }; struct sw_zone_info { @@ -492,18 +469,19 @@ struct sge_fl { struct cluster_layout cll_alt; /* alternate refill zone, layout */ }; +struct mp_ring; + /* txq: SGE egress queue + what's needed for Ethernet NIC */ struct sge_txq { struct sge_eq eq; /* MUST be first */ struct ifnet *ifp; /* the interface this txq belongs to */ - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ - struct buf_ring *br; /* tx buffer ring */ + struct mp_ring *r; /* tx software ring */ struct tx_sdesc *sdesc; /* KVA of software descriptor ring */ - struct mbuf *m; /* held up due to temporary resource shortage */ - - struct tx_maps txmaps; + struct sglist *gl; + __be32 cpl_ctrl0; /* for convenience */ + struct task tx_reclaim_task; /* stats for common events first */ uint64_t txcsum; /* # of times hardware assisted with checksum */ @@ -512,13 +490,12 @@ struct sge_txq { uint64_t imm_wrs; /* # of work requests with immediate data */ uint64_t sgl_wrs; /* # of work requests with direct SGL */ uint64_t txpkt_wrs; /* # of txpkt work requests (not coalesced) */ - uint64_t txpkts_wrs; /* # of coalesced tx work requests */ - uint64_t txpkts_pkts; /* # of frames in coalesced tx work requests */ + uint64_t txpkts0_wrs; /* # of type0 coalesced tx work requests */ + uint64_t txpkts1_wrs; /* # of type1 coalesced tx work requests */ + uint64_t txpkts0_pkts; /* # of frames in type0 coalesced tx WRs */ + uint64_t txpkts1_pkts; /* # of frames in type1 coalesced tx WRs */ /* stats for not-that-common events */ - - uint32_t no_dmamap; /* no DMA map to load the mbuf */ - uint32_t no_desc; /* out of hardware descriptors */ } __aligned(CACHE_LINE_SIZE); /* rxq: SGE ingress queue + SGE free list + miscellaneous items */ @@ -567,7 +544,13 @@ struct wrqe { STAILQ_ENTRY(wrqe) link; struct sge_wrq *wrq; int wr_len; - uint64_t wr[] __aligned(16); + char wr[] __aligned(16); +}; + +struct wrq_cookie { + TAILQ_ENTRY(wrq_cookie) link; + int ndesc; + int pidx; }; /* @@ -578,17 +561,32 @@ struct sge_wrq { struct sge_eq eq; /* MUST be first */ struct adapter *adapter; + struct task wrq_tx_task; + + /* Tx desc reserved but WR not "committed" yet. */ + TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) incomplete_wrs; - /* List of WRs held up due to lack of tx descriptors */ + /* List of WRs ready to go out as soon as descriptors are available. */ STAILQ_HEAD(, wrqe) wr_list; + u_int nwr_pending; + u_int ndesc_needed; /* stats for common events first */ - uint64_t tx_wrs; /* # of tx work requests */ + uint64_t tx_wrs_direct; /* # of WRs written directly to desc ring. */ + uint64_t tx_wrs_ss; /* # of WRs copied from scratch space. */ + uint64_t tx_wrs_copied; /* # of WRs queued and copied to desc ring. */ /* stats for not-that-common events */ - uint32_t no_desc; /* out of hardware descriptors */ + /* + * Scratch space for work requests that wrap around after reaching the + * status page, and some infomation about the last WR that used it. + */ + uint16_t ss_pidx; + uint16_t ss_len; + uint8_t ss[SGE_MAX_WR_LEN]; + } __aligned(CACHE_LINE_SIZE); @@ -737,7 +735,7 @@ struct adapter { struct sge sge; int lro_timeout; - struct taskqueue *tq[NCHAN]; /* taskqueues that flush data out */ + struct taskqueue *tq[NCHAN]; /* General purpose taskqueues */ struct port_info *port[MAX_NPORTS]; uint8_t chan_map[NCHAN]; @@ -970,12 +968,11 @@ static inline int tx_resume_threshold(struct sge_eq *eq) { - return (eq->qsize / 4); + /* not quite the same as qsize / 4, but this will do. */ + return (eq->sidx / 4); } /* t4_main.c */ -void t4_tx_task(void *, int); -void t4_tx_callout(void *); int t4_os_find_pci_capability(struct adapter *, int); int t4_os_pci_save_state(struct adapter *); int t4_os_pci_restore_state(struct adapter *); @@ -1016,16 +1013,15 @@ int t4_setup_adapter_queues(struct adapt int t4_teardown_adapter_queues(struct adapter *); int t4_setup_port_queues(struct port_info *); int t4_teardown_port_queues(struct port_info *); -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int); -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); void t4_intr_all(void *); void t4_intr(void *); void t4_intr_err(void *); void t4_intr_evt(void *); void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *); -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); void t4_update_fl_bufsize(struct ifnet *); -int can_resume_tx(struct sge_eq *); +int parse_pkt(struct mbuf **); +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); +void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); int tnl_cong(struct port_info *); /* t4_tracer.c */ Modified: stable/10/sys/dev/cxgbe/t4_l2t.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_l2t.c Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/dev/cxgbe/t4_l2t.c Sat Jun 6 09:28:40 2015 (r284052) @@ -112,16 +112,15 @@ found: int t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) { - struct wrqe *wr; + struct wrq_cookie cookie; struct cpl_l2t_write_req *req; int idx = e->idx + sc->vres.l2t.start; mtx_assert(&e->lock, MA_OWNED); - wr = alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); - if (wr == NULL) + req = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), 16), &cookie); + if (req == NULL) return (ENOMEM); - req = wrtod(wr); INIT_TP_WR(req, 0); OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, idx | @@ -131,7 +130,7 @@ t4_write_l2e(struct adapter *sc, struct req->vlan = htons(e->vlan); memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); - t4_wrq_tx(sc, wr); + commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); if (sync && e->state != L2T_STATE_SWITCHING) e->state = L2T_STATE_SYNC_WRITE; Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 09:28:40 2015 (r284052) @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -66,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs_values.h" #include "t4_ioctl.h" #include "t4_l2t.h" +#include "t4_mp_ring.h" /* T4 bus driver interface */ static int t4_probe(device_t); @@ -377,7 +380,8 @@ static void build_medialist(struct port_ static int cxgbe_init_synchronized(struct port_info *); static int cxgbe_uninit_synchronized(struct port_info *); static int setup_intr_handlers(struct adapter *); -static void quiesce_eq(struct adapter *, struct sge_eq *); +static void quiesce_txq(struct adapter *, struct sge_txq *); +static void quiesce_wrq(struct adapter *, struct sge_wrq *); static void quiesce_iq(struct adapter *, struct sge_iq *); static void quiesce_fl(struct adapter *, struct sge_fl *); static int t4_alloc_irq(struct adapter *, struct irq *, int rid, @@ -433,7 +437,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); #endif -static inline void txq_start(struct ifnet *, struct sge_txq *); static uint32_t fconf_to_mode(uint32_t); static uint32_t mode_to_fconf(uint32_t); static uint32_t fspec_to_fconf(struct t4_filter_specification *); @@ -665,6 +668,14 @@ t4_attach(device_t dev) goto done; } +#if defined(__i386__) + if ((cpu_feature & CPUID_CX8) == 0) { + device_printf(dev, "64 bit atomics not available.\n"); + rc = ENOTSUP; + goto done; + } +#endif + /* Prepare the firmware for operation */ rc = prep_firmware(sc); if (rc != 0) @@ -1386,67 +1397,36 @@ cxgbe_transmit(struct ifnet *ifp, struct { struct port_info *pi = ifp->if_softc; struct adapter *sc = pi->adapter; - struct sge_txq *txq = &sc->sge.txq[pi->first_txq]; - struct buf_ring *br; + struct sge_txq *txq; + void *items[1]; int rc; M_ASSERTPKTHDR(m); + MPASS(m->m_nextpkt == NULL); /* not quite ready for this yet */ if (__predict_false(pi->link_cfg.link_ok == 0)) { m_freem(m); return (ENETDOWN); } - /* check if flowid is set */ - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) - txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi->rsrv_noflowq)) - + pi->rsrv_noflowq); - br = txq->br; - - if (TXQ_TRYLOCK(txq) == 0) { - struct sge_eq *eq = &txq->eq; - - /* - * It is possible that t4_eth_tx finishes up and releases the - * lock between the TRYLOCK above and the drbr_enqueue here. We - * need to make sure that this mbuf doesn't just sit there in - * the drbr. - */ - - rc = drbr_enqueue(ifp, br, m); - if (rc == 0 && callout_pending(&eq->tx_callout) == 0 && - !(eq->flags & EQ_DOOMED)) - callout_reset(&eq->tx_callout, 1, t4_tx_callout, eq); + rc = parse_pkt(&m); + if (__predict_false(rc != 0)) { + MPASS(m == NULL); /* was freed already */ + atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is ok */ return (rc); } - /* - * txq->m is the mbuf that is held up due to a temporary shortage of - * resources and it should be put on the wire first. Then what's in - * drbr and finally the mbuf that was just passed in to us. - * - * Return code should indicate the fate of the mbuf that was passed in - * this time. - */ - - TXQ_LOCK_ASSERT_OWNED(txq); - if (drbr_needs_enqueue(ifp, br) || txq->m) { - - /* Queued for transmission. */ - - rc = drbr_enqueue(ifp, br, m); - m = txq->m ? txq->m : drbr_dequeue(ifp, br); - (void) t4_eth_tx(ifp, txq, m); - TXQ_UNLOCK(txq); - return (rc); - } + /* Select a txq. */ + txq = &sc->sge.txq[pi->first_txq]; + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi->rsrv_noflowq)) + + pi->rsrv_noflowq); - /* Direct transmission. */ - rc = t4_eth_tx(ifp, txq, m); - if (rc != 0 && txq->m) - rc = 0; /* held, will be transmitted soon (hopefully) */ + items[0] = m; + rc = mp_ring_enqueue(txq->r, items, 1, 4096); + if (__predict_false(rc != 0)) + m_freem(m); - TXQ_UNLOCK(txq); return (rc); } @@ -1456,17 +1436,17 @@ cxgbe_qflush(struct ifnet *ifp) struct port_info *pi = ifp->if_softc; struct sge_txq *txq; int i; - struct mbuf *m; /* queues do not exist if !PORT_INIT_DONE. */ if (pi->flags & PORT_INIT_DONE) { for_each_txq(pi, i, txq) { TXQ_LOCK(txq); - m_freem(txq->m); - txq->m = NULL; - while ((m = buf_ring_dequeue_sc(txq->br)) != NULL) - m_freem(m); + txq->eq.flags &= ~EQ_ENABLED; TXQ_UNLOCK(txq); + while (!mp_ring_is_idle(txq->r)) { + mp_ring_check_drainage(txq->r, 0); + pause("qflush", 1); + } } } if_qflush(ifp); @@ -3135,7 +3115,8 @@ cxgbe_init_synchronized(struct port_info { struct adapter *sc = pi->adapter; struct ifnet *ifp = pi->ifp; - int rc = 0; + int rc = 0, i; + struct sge_txq *txq; ASSERT_SYNCHRONIZED_OP(sc); @@ -3164,6 +3145,17 @@ cxgbe_init_synchronized(struct port_info } /* + * Can't fail from this point onwards. Review cxgbe_uninit_synchronized + * if this changes. + */ + + for_each_txq(pi, i, txq) { + TXQ_LOCK(txq); + txq->eq.flags |= EQ_ENABLED; + TXQ_UNLOCK(txq); + } + + /* * The first iq of the first port to come up is used for tracing. */ if (sc->traceq < 0) { @@ -3196,7 +3188,8 @@ cxgbe_uninit_synchronized(struct port_in { struct adapter *sc = pi->adapter; struct ifnet *ifp = pi->ifp; - int rc; + int rc, i; + struct sge_txq *txq; ASSERT_SYNCHRONIZED_OP(sc); @@ -3213,6 +3206,12 @@ cxgbe_uninit_synchronized(struct port_in return (rc); } + for_each_txq(pi, i, txq) { + TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_ENABLED; + TXQ_UNLOCK(txq); + } + clrbit(&sc->open_device_map, pi->port_id); PORT_LOCK(pi); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; @@ -3443,15 +3442,17 @@ port_full_uninit(struct port_info *pi) if (pi->flags & PORT_INIT_DONE) { - /* Need to quiesce queues. XXX: ctrl queues? */ + /* Need to quiesce queues. */ + + quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); for_each_txq(pi, i, txq) { - quiesce_eq(sc, &txq->eq); + quiesce_txq(sc, txq); } #ifdef TCP_OFFLOAD for_each_ofld_txq(pi, i, ofld_txq) { - quiesce_eq(sc, &ofld_txq->eq); + quiesce_wrq(sc, ofld_txq); } #endif @@ -3476,23 +3477,39 @@ port_full_uninit(struct port_info *pi) } static void -quiesce_eq(struct adapter *sc, struct sge_eq *eq) +quiesce_txq(struct adapter *sc, struct sge_txq *txq) { - EQ_LOCK(eq); - eq->flags |= EQ_DOOMED; + struct sge_eq *eq = &txq->eq; + struct sge_qstat *spg = (void *)&eq->desc[eq->sidx]; - /* - * Wait for the response to a credit flush if one's - * pending. - */ - while (eq->flags & EQ_CRFLUSHED) - mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); - EQ_UNLOCK(eq); + (void) sc; /* unused */ - callout_drain(&eq->tx_callout); /* XXX: iffy */ - pause("callout", 10); /* Still iffy */ +#ifdef INVARIANTS + TXQ_LOCK(txq); + MPASS((eq->flags & EQ_ENABLED) == 0); + TXQ_UNLOCK(txq); +#endif - taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); + /* Wait for the mp_ring to empty. */ + while (!mp_ring_is_idle(txq->r)) { + mp_ring_check_drainage(txq->r, 0); + pause("rquiesce", 1); + } + + /* Then wait for the hardware to finish. */ + while (spg->cidx != htobe16(eq->pidx)) + pause("equiesce", 1); + + /* Finally, wait for the driver to reclaim all descriptors. */ + while (eq->cidx != eq->pidx) + pause("dquiesce", 1); +} + +static void +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) +{ + + /* XXXTX */ } static void @@ -4287,7 +4304,7 @@ cxgbe_refresh_stats(struct adapter *sc, drops = s->tx_drop; for_each_txq(pi, i, txq) - drops += txq->br->br_drops; + drops += counter_u64_fetch(txq->r->drops); ifp->if_snd.ifq_drops = drops; ifp->if_oerrors = s->tx_error_frames; @@ -4818,6 +4835,9 @@ cxgbe_sysctls(struct port_info *pi) oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", CTLFLAG_RD, NULL, "port statistics"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "tx_parse_error", CTLFLAG_RD, + &pi->tx_parse_error, 0, + "# of tx packets with invalid length or # of segments"); #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ @@ -5177,8 +5197,7 @@ sysctl_qsize_txq(SYSCTL_HANDLER_ARGS) if (rc != 0 || req->newptr == NULL) return (rc); - /* bufring size must be powerof2 */ - if (qsize < 128 || !powerof2(qsize)) + if (qsize < 128 || qsize > 65536) return (EINVAL); rc = begin_synchronized_op(sc, pi, HOLD_LOCK | SLEEP_OK | INTR_OK, @@ -6876,74 +6895,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) } #endif -static inline void -txq_start(struct ifnet *ifp, struct sge_txq *txq) -{ - struct buf_ring *br; - struct mbuf *m; - - TXQ_LOCK_ASSERT_OWNED(txq); - - br = txq->br; - m = txq->m ? txq->m : drbr_dequeue(ifp, br); - if (m) - t4_eth_tx(ifp, txq, m); -} - -void -t4_tx_callout(void *arg) -{ - struct sge_eq *eq = arg; - struct adapter *sc; - - if (EQ_TRYLOCK(eq) == 0) - goto reschedule; - - if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { - EQ_UNLOCK(eq); -reschedule: - if (__predict_true(!(eq->flags && EQ_DOOMED))) - callout_schedule(&eq->tx_callout, 1); - return; - } - - EQ_LOCK_ASSERT_OWNED(eq); - - if (__predict_true((eq->flags & EQ_DOOMED) == 0)) { - - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { - struct sge_txq *txq = arg; - struct port_info *pi = txq->ifp->if_softc; - - sc = pi->adapter; - } else { - struct sge_wrq *wrq = arg; - - sc = wrq->adapter; - } - - taskqueue_enqueue(sc->tq[eq->tx_chan], &eq->tx_task); - } - - EQ_UNLOCK(eq); -} - -void -t4_tx_task(void *arg, int count) -{ - struct sge_eq *eq = arg; - - EQ_LOCK(eq); - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { - struct sge_txq *txq = arg; - txq_start(txq->ifp, txq); - } else { - struct sge_wrq *wrq = arg; - t4_wrq_tx_locked(wrq->adapter, wrq, NULL); - } - EQ_UNLOCK(eq); -} - static uint32_t fconf_to_mode(uint32_t fconf) { @@ -7373,9 +7324,9 @@ static int set_filter_wr(struct adapter *sc, int fidx) { struct filter_entry *f = &sc->tids.ftid_tab[fidx]; - struct wrqe *wr; struct fw_filter_wr *fwr; unsigned int ftid; + struct wrq_cookie cookie; ASSERT_SYNCHRONIZED_OP(sc); @@ -7394,12 +7345,10 @@ set_filter_wr(struct adapter *sc, int fi ftid = sc->tids.ftid_base + fidx; - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); - if (wr == NULL) + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), &cookie); + if (fwr == NULL) return (ENOMEM); - - fwr = wrtod(wr); - bzero(fwr, sizeof (*fwr)); + bzero(fwr, sizeof(*fwr)); fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); @@ -7468,7 +7417,7 @@ set_filter_wr(struct adapter *sc, int fi f->pending = 1; sc->tids.ftids_in_use++; - t4_wrq_tx(sc, wr); + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); return (0); } @@ -7476,22 +7425,21 @@ static int del_filter_wr(struct adapter *sc, int fidx) { struct filter_entry *f = &sc->tids.ftid_tab[fidx]; - struct wrqe *wr; struct fw_filter_wr *fwr; unsigned int ftid; + struct wrq_cookie cookie; ftid = sc->tids.ftid_base + fidx; - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); - if (wr == NULL) + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), &cookie); + if (fwr == NULL) return (ENOMEM); - fwr = wrtod(wr); bzero(fwr, sizeof (*fwr)); t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); f->pending = 1; - t4_wrq_tx(sc, wr); + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); return (0); } @@ -8091,6 +8039,7 @@ t4_ioctl(struct cdev *dev, unsigned long /* MAC stats */ t4_clr_port_stats(sc, pi->tx_chan); + pi->tx_parse_error = 0; if (pi->flags & PORT_INIT_DONE) { struct sge_rxq *rxq; @@ -8113,24 +8062,24 @@ t4_ioctl(struct cdev *dev, unsigned long txq->imm_wrs = 0; txq->sgl_wrs = 0; txq->txpkt_wrs = 0; - txq->txpkts_wrs = 0; - txq->txpkts_pkts = 0; - txq->br->br_drops = 0; - txq->no_dmamap = 0; - txq->no_desc = 0; + txq->txpkts0_wrs = 0; + txq->txpkts1_wrs = 0; + txq->txpkts0_pkts = 0; + txq->txpkts1_pkts = 0; + mp_ring_reset_stats(txq->r); } #ifdef TCP_OFFLOAD /* nothing to clear for each ofld_rxq */ for_each_ofld_txq(pi, i, wrq) { - wrq->tx_wrs = 0; - wrq->no_desc = 0; + wrq->tx_wrs_direct = 0; + wrq->tx_wrs_copied = 0; } #endif wrq = &sc->sge.ctrlq[pi->port_id]; - wrq->tx_wrs = 0; - wrq->no_desc = 0; + wrq->tx_wrs_direct = 0; + wrq->tx_wrs_copied = 0; } break; } Copied and modified: stable/10/sys/dev/cxgbe/t4_mp_ring.c (from r276485, head/sys/dev/cxgbe/t4_mp_ring.c) ============================================================================== --- head/sys/dev/cxgbe/t4_mp_ring.c Wed Dec 31 23:19:16 2014 (r276485, copy source) +++ stable/10/sys/dev/cxgbe/t4_mp_ring.c Sat Jun 6 09:28:40 2015 (r284052) @@ -38,6 +38,11 @@ __FBSDID("$FreeBSD$"); #include "t4_mp_ring.h" +#if defined(__i386__) +#define atomic_cmpset_acq_64 atomic_cmpset_64 +#define atomic_cmpset_rel_64 atomic_cmpset_64 +#endif + union ring_state { struct { uint16_t pidx_head; Copied: stable/10/sys/dev/cxgbe/t4_mp_ring.h (from r276485, head/sys/dev/cxgbe/t4_mp_ring.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/cxgbe/t4_mp_ring.h Sat Jun 6 09:28:40 2015 (r284052, copy of r276485, head/sys/dev/cxgbe/t4_mp_ring.h) @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 2014 Chelsio Communications, Inc. + * All rights reserved. + * Written by: Navdeep Parhar + * + * 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, 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$ + * + */ + +#ifndef __CXGBE_MP_RING_H +#define __CXGBE_MP_RING_H + +#ifndef _KERNEL +#error "no user-serviceable parts inside" +#endif + +struct mp_ring; +typedef u_int (*ring_drain_t)(struct mp_ring *, u_int, u_int); +typedef u_int (*ring_can_drain_t)(struct mp_ring *); + +struct mp_ring { + volatile uint64_t state __aligned(CACHE_LINE_SIZE); + + int size __aligned(CACHE_LINE_SIZE); + void * cookie; + struct malloc_type * mt; + ring_drain_t drain; + ring_can_drain_t can_drain; /* cheap, may be unreliable */ + counter_u64_t enqueues; + counter_u64_t drops; + counter_u64_t starts; + counter_u64_t stalls; + counter_u64_t restarts; /* recovered after stalling */ + counter_u64_t abdications; + + void * volatile items[] __aligned(CACHE_LINE_SIZE); +}; + +int mp_ring_alloc(struct mp_ring **, int, void *, ring_drain_t, + ring_can_drain_t, struct malloc_type *, int); +void mp_ring_free(struct mp_ring *); +int mp_ring_enqueue(struct mp_ring *, void **, int, int); +void mp_ring_check_drainage(struct mp_ring *, int); +void mp_ring_reset_stats(struct mp_ring *); +int mp_ring_is_idle(struct mp_ring *); + +#endif Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 6 09:28:40 2015 (r284052) @@ -35,12 +35,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs.h" #include "common/t4_regs_values.h" #include "common/t4_msg.h" +#include "t4_mp_ring.h" #ifdef T4_PKT_TIMESTAMP #define RX_COPY_THRESHOLD (MINCLSIZE - 8) @@ -146,19 +147,17 @@ TUNABLE_INT("hw.cxgbe.largest_rx_cluster static int safest_rx_cluster = PAGE_SIZE; TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); -/* Used to track coalesced tx work request */ struct txpkts { - uint64_t *flitp; /* ptr to flit where next pkt should start */ - uint8_t npkt; /* # of packets in this work request */ - uint8_t nflits; /* # of flits used by this work request */ - uint16_t plen; /* total payload (sum of all packets) */ + u_int wr_type; /* type 0 or type 1 */ + u_int npkt; /* # of packets in this work request */ + u_int plen; /* total payload (sum of all packets) */ + u_int len16; /* # of 16B pieces used by this work request */ }; /* A packet's SGL. This + m_pkthdr has all info needed for tx */ struct sgl { - int nsegs; /* # of segments in the SGL, 0 means imm. tx */ - int nflits; /* # of flits needed for the SGL */ - bus_dma_segment_t seg[TX_SGL_SEGS]; + struct sglist sg; + struct sglist_seg seg[TX_SGL_SEGS]; }; static int service_iq(struct sge_iq *, int); @@ -220,26 +219,31 @@ static void find_best_refill_source(stru static void find_safe_refill_source(struct adapter *, struct sge_fl *); static void add_fl_to_sfl(struct adapter *, struct sge_fl *); -static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int); -static int free_pkt_sgl(struct sge_txq *, struct sgl *); -static int write_txpkt_wr(struct port_info *, struct sge_txq *, struct mbuf *, - struct sgl *); -static int add_to_txpkts(struct port_info *, struct sge_txq *, struct txpkts *, - struct mbuf *, struct sgl *); -static void write_txpkts_wr(struct sge_txq *, struct txpkts *); -static inline void write_ulp_cpl_sgl(struct port_info *, struct sge_txq *, - struct txpkts *, struct mbuf *, struct sgl *); -static int write_sgl_to_txd(struct sge_eq *, struct sgl *, caddr_t *); +static inline void get_pkt_gl(struct mbuf *, struct sglist *); +static inline u_int txpkt_len16(u_int, u_int); +static inline u_int txpkts0_len16(u_int); +static inline u_int txpkts1_len16(void); +static u_int write_txpkt_wr(struct sge_txq *, struct fw_eth_tx_pkt_wr *, + struct mbuf *, u_int); +static int try_txpkts(struct mbuf *, struct mbuf *, struct txpkts *, u_int); +static int add_to_txpkts(struct mbuf *, struct txpkts *, u_int); +static u_int write_txpkts_wr(struct sge_txq *, struct fw_eth_tx_pkts_wr *, + struct mbuf *, const struct txpkts *, u_int); +static void write_gl_to_txd(struct sge_txq *, struct mbuf *, caddr_t *, int); static inline void copy_to_txd(struct sge_eq *, caddr_t, caddr_t *, int); -static inline void ring_eq_db(struct adapter *, struct sge_eq *); -static inline int reclaimable(struct sge_eq *); -static int reclaim_tx_descs(struct sge_txq *, int, int); -static void write_eqflush_wr(struct sge_eq *); -static __be64 get_flit(bus_dma_segment_t *, int, int); +static inline void ring_eq_db(struct adapter *, struct sge_eq *, u_int); +static inline uint16_t read_hw_cidx(struct sge_eq *); +static inline u_int reclaimable_tx_desc(struct sge_eq *); +static inline u_int total_available_tx_desc(struct sge_eq *); +static u_int reclaim_tx_descs(struct sge_txq *, u_int); +static void tx_reclaim(void *, int); +static __be64 get_flit(struct sglist_seg *, int, int); static int handle_sge_egr_update(struct sge_iq *, const struct rss_header *, struct mbuf *); static int handle_fw_msg(struct sge_iq *, const struct rss_header *, struct mbuf *); +static void wrq_tx_drain(void *, int); +static void drain_wrq_wr_list(struct adapter *, struct sge_wrq *); static int sysctl_uint16(SYSCTL_HANDLER_ARGS); static int sysctl_bufsizes(SYSCTL_HANDLER_ARGS); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 12:44:46 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A80F6D02; Sat, 6 Jun 2015 12:44:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92DE414A5; Sat, 6 Jun 2015 12:44:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56Cikfu020988; Sat, 6 Jun 2015 12:44:46 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56CihN9020959; Sat, 6 Jun 2015 12:44:43 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061244.t56CihN9020959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 12:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284066 - in stable/10: . sbin/ifconfig share/man/man4 sys/conf sys/modules sys/modules/if_gif sys/modules/if_gre sys/modules/if_me sys/net sys/netinet sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 12:44:46 -0000 Author: ae Date: Sat Jun 6 12:44:42 2015 New Revision: 284066 URL: https://svnweb.freebsd.org/changeset/base/284066 Log: MFC r274246: Overhaul if_gre(4). Split it into two modules: if_gre(4) for GRE encapsulation and if_me(4) for minimal encapsulation within IP. gre(4) changes: * convert to if_transmit; * rework locking: protect access to softc with rmlock, protect from concurrent ioctls with sx lock; * correct interface accounting for outgoing datagramms (count only payload size); * implement generic support for using IPv6 as delivery header; * make implementation conform to the RFC 2784 and partially to RFC 2890; * add support for GRE checksums - calculate for outgoing datagramms and check for inconming datagramms; * add support for sending sequence number in GRE header; * remove support of cached routes. This fixes problem, when gre(4) doesn't work at system startup. But this also removes support for having tunnels with the same addresses for inner and outer header. * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD. Use our standard ioctls for tunnels. me(4): * implementation conform to RFC 2004; * use if_transmit; * use the same locking model as gre(4); PR: 164475 MFC r274289 (by bz): gcc requires variables to be initialised in two places. One of them is correctly used only under the same conditional though. For module builds properly check if the kernel supports INET or INET6, as otherwise various mips kernels without IPv6 support would fail to build. MFC r274964: Add ip_gre.h to ObsoleteFiles.inc. Added: stable/10/share/man/man4/me.4 - copied unchanged from r274246, head/share/man/man4/me.4 stable/10/sys/modules/if_me/ - copied from r274246, head/sys/modules/if_me/ stable/10/sys/net/if_me.c - copied, changed from r274246, head/sys/net/if_me.c stable/10/sys/netinet6/ip6_gre.c - copied, changed from r274246, head/sys/netinet6/ip6_gre.c Deleted: stable/10/sys/netinet/ip_gre.h Modified: stable/10/ObsoleteFiles.inc stable/10/sbin/ifconfig/ifgre.c stable/10/share/man/man4/Makefile stable/10/share/man/man4/gre.4 stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/modules/Makefile stable/10/sys/modules/if_gif/Makefile stable/10/sys/modules/if_gre/Makefile stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/ip_gre.c stable/10/sys/netinet6/in6_proto.c Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/ObsoleteFiles.inc Sat Jun 6 12:44:42 2015 (r284066) @@ -44,6 +44,8 @@ OLD_FILES+=usr/share/man/man9/NDHASGIANT OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test OLD_FILES+=usr/tests/sbin/mdconfig/run.pl +# 20141107: overhaul if_gre(4) +OLD_FILES+=usr/include/netinet/ip_gre.h # 20141028: debug files accidentally installed as directory name OLD_FILES+=usr/lib/debug/usr/lib/i18n OLD_FILES+=usr/lib/debug/usr/lib/private Modified: stable/10/sbin/ifconfig/ifgre.c ============================================================================== --- stable/10/sbin/ifconfig/ifgre.c Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sbin/ifconfig/ifgre.c Sat Jun 6 12:44:42 2015 (r284066) @@ -23,52 +23,50 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); #include #include #include #include - -#include -#include - -#include #include #include -#include #include +#include #include -#include #include -#include +#include #include -#include #include "ifconfig.h" +#define GREBITS "\020\01ENABLE_CSUM\02ENABLE_SEQ" + static void gre_status(int s); static void gre_status(int s) { - int grekey = 0; + uint32_t opts = 0; - ifr.ifr_data = (caddr_t)&grekey; + ifr.ifr_data = (caddr_t)&opts; if (ioctl(s, GREGKEY, &ifr) == 0) - if (grekey != 0) - printf("\tgrekey: %d\n", grekey); + if (opts != 0) + printf("\tgrekey: 0x%x (%u)\n", opts, opts); + opts = 0; + if (ioctl(s, GREGOPTS, &ifr) != 0 || opts == 0) + return; + printb("\toptions", opts, GREBITS); + putchar('\n'); } static void setifgrekey(const char *val, int dummy __unused, int s, const struct afswtch *afp) { - uint32_t grekey = atol(val); + uint32_t grekey = strtol(val, NULL, 0); strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); ifr.ifr_data = (caddr_t)&grekey; @@ -76,8 +74,35 @@ setifgrekey(const char *val, int dummy _ warn("ioctl (set grekey)"); } +static void +setifgreopts(const char *val, int d, int s, const struct afswtch *afp) +{ + uint32_t opts; + + ifr.ifr_data = (caddr_t)&opts; + if (ioctl(s, GREGOPTS, &ifr) == -1) { + warn("ioctl(GREGOPTS)"); + return; + } + + if (d < 0) + opts &= ~(-d); + else + opts |= d; + + if (ioctl(s, GRESOPTS, &ifr) == -1) { + warn("ioctl(GIFSOPTS)"); + return; + } +} + + static struct cmd gre_cmds[] = { DEF_CMD_ARG("grekey", setifgrekey), + DEF_CMD("enable_csum", GRE_ENABLE_CSUM, setifgreopts), + DEF_CMD("-enable_csum",-GRE_ENABLE_CSUM,setifgreopts), + DEF_CMD("enable_seq", GRE_ENABLE_SEQ, setifgreopts), + DEF_CMD("-enable_seq",-GRE_ENABLE_SEQ, setifgreopts), }; static struct afswtch af_gre = { .af_name = "af_gre", Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/share/man/man4/Makefile Sat Jun 6 12:44:42 2015 (r284066) @@ -250,6 +250,7 @@ MAN= aac.4 \ malo.4 \ mcd.4 \ md.4 \ + me.4 \ mem.4 \ meteor.4 \ mfi.4 \ Modified: stable/10/share/man/man4/gre.4 ============================================================================== --- stable/10/share/man/man4/gre.4 Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/share/man/man4/gre.4 Sat Jun 6 12:44:42 2015 (r284066) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2008 +.Dd November 7, 2014 .Dt GRE 4 .Os .Sh NAME @@ -68,163 +68,30 @@ and .Cm destroy subcommands. .Pp -This driver currently supports the following modes of operation: -.Bl -tag -width indent -.It "GRE encapsulation (IP protocol number 47)" -Encapsulated datagrams are -prepended an outer datagram and a GRE header. +This driver corresponds to RFC 2784. +Encapsulated datagrams are prepended an outer datagram and a GRE header. The GRE header specifies the type of the encapsulated datagram and thus allows for tunneling other protocols than IP like e.g.\& AppleTalk. GRE mode is also the default tunnel mode on Cisco routers. -This is also the default mode of operation of the -.Nm -interfaces. -As part of the GRE mode, .Nm also supports Cisco WCCP protocol, both version 1 and version 2. -Since there is no reliable way to distinguish between WCCP versions, it -should be configured manually using the -.Cm link2 -flag. -If the -.Cm link2 -flag is not set (default), then WCCP version 1 is selected. -.It "MOBILE encapsulation (IP protocol number 55)" -Datagrams are -encapsulated into IP, but with a shorter encapsulation. -The original -IP header is modified and the modifications are inserted between the -so modified header and the original payload. -Like -.Xr gif 4 , -only for IP-in-IP encapsulation. -.El .Pp The .Nm -interfaces support a number of -.Xr ioctl 2 Ns s , -such as: -.Bl -tag -width ".Dv GRESADDRS" -.It Dv GRESADDRS -Set the IP address of the local tunnel end. -This is the source address -set by or displayed by -.Xr ifconfig 8 -for the -.Nm -interface. -.It Dv GRESADDRD -Set the IP address of the remote tunnel end. -This is the destination address -set by or displayed by -.Xr ifconfig 8 -for the -.Nm -interface. -.It Dv GREGADDRS -Query the IP address that is set for the local tunnel end. -This is the -address the encapsulation header carries as local address (i.e., the real -address of the tunnel start point). -.It Dv GREGADDRD -Query the IP address that is set for the remote tunnel end. -This is the -address the encapsulated packets are sent to (i.e., the real address of -the remote tunnel endpoint). -.It Dv GRESPROTO -Set the operation mode to the specified IP protocol value. -The -protocol is passed to the interface in -.Po Vt "struct ifreq" Pc Ns Li -> Ns Va ifr_flags . -The operation mode can also be given as -.Pp -.Bl -tag -width ".Cm -link0" -compact -.It Cm link0 -.Dv IPPROTO_GRE -.It Cm -link0 -.Dv IPPROTO_MOBILE -.El -.Pp -to -.Xr ifconfig 8 . -.Pp -The -.Cm link1 -flag is not used to choose encapsulation, but to modify the -internal route search for the remote tunnel endpoint, see the -.Sx BUGS -section below. -.It Dv GREGPROTO -Query operation mode. -.It Dv GRESKEY +interfaces support a number of additional parameters to the +.Xr ifconfig 8 : +.Bl -tag -width "enable_csum" +.It Ar grekey Set the GRE key used for outgoing packets. A value of 0 disables the key option. -.It Dv GREGKEY -Get the GRE key currently used for outgoing packets. -0 means no outgoing key. +.It Ar enable_csum +Enables checksum calculation for outgoing packets. +.It Ar enable_seq +Enables use of sequence number field in the GRE header for outgoing packets. .El -.Pp -Note that the IP addresses of the tunnel endpoints may be the same as the -ones defined with -.Xr ifconfig 8 -for the interface (as if IP is encapsulated), but need not be, as e.g.\& when -encapsulating AppleTalk. .Sh EXAMPLES -Configuration example: -.Bd -literal -Host X-- Host A ----------------tunnel---------- Cisco D------Host E - \\ | - \\ / - +------Host B----------Host C----------+ -.Ed .Pp -On host A -.Pq Fx : -.Bd -literal -offset indent -route add default B -ifconfig greN create -ifconfig greN A D netmask 0xffffffff linkX up -ifconfig greN tunnel A D -route add E D -.Ed -.Pp -On Host D (Cisco): -.Bd -literal -offset indent -Interface TunnelX - ip unnumbered D ! e.g. address from Ethernet interface - tunnel source D ! e.g. address from Ethernet interface - tunnel destination A -ip route C -ip route A mask C -ip route X mask tunnelX -.Ed -.Pp -OR -.Pp -On Host D -.Pq Fx : -.Bd -literal -offset indent -route add default C -ifconfig greN create -ifconfig greN D A -ifconfig greN tunnel D A -.Ed -.Pp -If all goes well, you should see packets flowing ;-) -.Pp -If you want to reach Host A over the tunnel (from Host D (Cisco)), then -you have to have an alias on Host A for e.g.\& the Ethernet interface like: -.Pp -.Dl "ifconfig alias Y" -.Pp -and on the Cisco: -.Pp -.Dl "ip route Y mask tunnelX" -.Pp -A similar setup can be used to create a link between two private networks -(for example in the 192.168 subnet) over the Internet: .Bd -literal 192.168.1.* --- Router A -------tunnel-------- Router B --- 192.168.2.* \\ / @@ -239,29 +106,22 @@ Assuming router A has the (external) IP On router A: .Bd -literal -offset indent ifconfig greN create -ifconfig greN 192.168.1.1 192.168.2.1 link1 -ifconfig greN tunnel A B +ifconfig greN inet 192.168.1.1 192.168.2.1 +ifconfig greN inet tunnel A B route add -net 192.168.2 -netmask 255.255.255.0 192.168.2.1 .Ed .Pp On router B: .Bd -literal -offset indent ifconfig greN create -ifconfig greN 192.168.2.1 192.168.1.1 link1 -ifconfig greN tunnel B A +ifconfig greN inet 192.168.2.1 192.168.1.1 +ifconfig greN inet tunnel B A route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1 .Ed -.Pp -Note that this is a safe situation where the -.Cm link1 -flag (as discussed in the -.Sx BUGS -section below) may (and probably should) be set. .Sh NOTES The MTU of .Nm interfaces is set to 1476 by default, to match the value used by Cisco routers. -If grekey is set this is lowered to 1472. This may not be an optimal value, depending on the link between the two tunnel endpoints. It can be adjusted via @@ -269,25 +129,8 @@ It can be adjusted via .Pp For correct operation, the .Nm -device needs a route to the destination that is less specific than the -one over the tunnel. -(Basically, there needs to be a route to the decapsulating host that -does not run over the tunnel, as this would be a loop.) -If the addresses are ambiguous, doing the -.Nm ifconfig Cm tunnel -step before the -.Xr ifconfig 8 -call to set the -.Nm -IP addresses will help to find a route outside the tunnel. -.Pp -In order to tell -.Xr ifconfig 8 -to actually mark the interface as -.Dq up , -the keyword -.Cm up -must be given last on its command line. +device needs a route to the decapsulating host that does not run over the tunnel, +as this would be a loop. .Pp The kernel must be set to forward datagrams by setting the .Va net.inet.ip.forwarding @@ -298,41 +141,20 @@ variable to non-zero. .Xr gif 4 , .Xr inet 4 , .Xr ip 4 , +.Xr me 4 , .Xr netintro 4 , -.\" Xr options 4 , .Xr protocols 5 , .Xr ifconfig 8 , .Xr sysctl 8 .Pp -A description of GRE encapsulation can be found in RFC 1701 and RFC 1702. -.Pp -A description of MOBILE encapsulation can be found in RFC 2004. +A description of GRE encapsulation can be found in RFC 2784 and RFC 2890. .Sh AUTHORS -.An Heiko W.Rupp Aq hwr@pilhuhn.de +.An Andrey V. Elsukov Aq Mt ae@FreeBSD.org +.An Heiko W.Rupp Aq Mt hwr@pilhuhn.de .Sh BUGS -The -.Fn compute_route -code in -.Pa if_gre.c -toggles the last bit of the -IP-address to provoke the search for a less specific route than the -one directly over the tunnel to prevent loops. -This is possibly not the best solution. -.Pp -To avoid the address munging described above, turn on the -.Cm link1 -flag on the -.Xr ifconfig 8 -command line. -This implies that the GRE packet destination and the ifconfig remote host -are not the same IP addresses, and that the GRE destination does not route -over the -.Nm -interface itself. .Pp The current implementation uses the key only for outgoing packets. Incoming packets with a different key or without a key will be treated as if they would belong to this interface. .Pp -RFC1701 is not fully supported, however all unsupported features have been -deprecated in RFC2784. +The sequence number field also used only for outgoing packets. Copied: stable/10/share/man/man4/me.4 (from r274246, head/share/man/man4/me.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/me.4 Sat Jun 6 12:44:42 2015 (r284066, copy of r274246, head/share/man/man4/me.4) @@ -0,0 +1,85 @@ +.\" Copyright (c) Andrey V. Elsukov +.\" 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, 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd November 7, 2014 +.Dt ME 4 +.Os +.Sh NAME +.Nm me +.Nd encapsulating network device +.Sh SYNOPSIS +To compile the +driver into the kernel, place the following line in the kernel +configuration file: +.Bd -ragged -offset indent +.Cd "device me" +.Ed +.Pp +Alternatively, to load the +driver as a module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_me_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +network interface pseudo device encapsulates datagrams +into IP. +These encapsulated datagrams are routed to a destination host, +where they are decapsulated and further routed to their final destination. +.Pp +.Nm +interfaces are dynamically created and destroyed with the +.Xr ifconfig 8 +.Cm create +and +.Cm destroy +subcommands. +.Pp +This driver corresponds to RFC 2004. +Datagrams are encapsulated into IP with a shorter encapsulation. +The original +IP header is modified and the modifications are inserted between the +so modified header and the original payload. +The protocol number 55 is used for outer header. +.Sh NOTES +.Pp +For correct operation, the +.Nm +device needs a route to the decapsulating host that does not run over the tunnel, +as this would be a loop. +.Sh SEE ALSO +.Xr gif 4 , +.Xr gre 4 , +.Xr inet 4 , +.Xr ip 4 , +.Xr netintro 4 , +.Xr protocols 5 , +.Xr ifconfig 8 , +.Xr sysctl 8 +.Sh AUTHORS +.An Andrey V. Elsukov Aq Mt ae@FreeBSD.org Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/conf/NOTES Sat Jun 6 12:44:42 2015 (r284066) @@ -867,12 +867,15 @@ device tun # The `gif' device implements IPv6 over IP4 tunneling, # IPv4 over IPv6 tunneling, IPv4 over IPv4 tunneling and # IPv6 over IPv6 tunneling. -# The `gre' device implements two types of IP4 over IP4 tunneling: -# GRE and MOBILE, as specified in the RFC1701 and RFC2004. +# The `gre' device implements GRE (Generic Routing Encapsulation) tunneling, +# as specified in the RFC 2784 and RFC 2890. +# The `me' device implements Minimal Encapsulation within IPv4 as +# specified in the RFC 2004. # The XBONEHACK option allows the same pair of addresses to be configured on # multiple gif interfaces. device gif device gre +device me options XBONEHACK # The `faith' device captures packets sent to it and diverts them Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/conf/files Sat Jun 6 12:44:42 2015 (r284066) @@ -3224,11 +3224,12 @@ net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip net/if_gif.c optional gif inet | gif inet6 | \ netgraph_gif inet | netgraph_gif inet6 -net/if_gre.c optional gre inet +net/if_gre.c optional gre inet | gre inet6 net/if_iso88025subr.c optional token net/if_lagg.c optional lagg net/if_loop.c optional loop net/if_llatbl.c standard +net/if_me.c optional me inet net/if_media.c standard net/if_mib.c standard net/if_spppfr.c optional sppp | netgraph_sppp @@ -3469,6 +3470,7 @@ netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 netinet6/in6_src.c optional inet6 netinet6/ip6_forward.c optional inet6 +netinet6/ip6_gre.c optional gre inet6 netinet6/ip6_id.c optional inet6 netinet6/ip6_input.c optional inet6 netinet6/ip6_mroute.c optional mrouting inet6 Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/modules/Makefile Sat Jun 6 12:44:42 2015 (r284066) @@ -141,8 +141,9 @@ SUBDIR= \ if_ef \ if_epair \ if_faith \ - if_gif \ + ${_if_gif} \ ${_if_gre} \ + ${_if_me} \ if_lagg \ ${_if_ndis} \ if_stf \ @@ -425,10 +426,12 @@ _random= random defined(ALL_MODULES) _carp= carp _toecore= toecore +_if_gif= if_gif +_if_gre= if_gre .endif .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) -_if_gre= if_gre +_if_me= if_me .endif .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) Modified: stable/10/sys/modules/if_gif/Makefile ============================================================================== --- stable/10/sys/modules/if_gif/Makefile Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/modules/if_gif/Makefile Sat Jun 6 12:44:42 2015 (r284066) @@ -19,7 +19,7 @@ opt_inet6.h: opt_mrouting.h: echo "#define MROUTING 1" > ${.TARGET} .else -OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h +OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo .if empty(OPT_INET6) MK_INET6_SUPPORT= no .endif Modified: stable/10/sys/modules/if_gre/Makefile ============================================================================== --- stable/10/sys/modules/if_gre/Makefile Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/modules/if_gre/Makefile Sat Jun 6 12:44:42 2015 (r284066) @@ -1,19 +1,36 @@ # $FreeBSD$ +.include .PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet ${.CURDIR}/../../netinet6 KMOD= if_gre -SRCS= if_gre.c ip_gre.c opt_inet.h opt_inet6.h opt_atalk.h +SRCS= if_gre.c opt_inet.h opt_inet6.h .if !defined(KERNBUILDDIR) opt_inet.h: echo "#define INET 1" > ${.TARGET} +.if ${MK_INET6_SUPPORT} != "no" opt_inet6.h: echo "#define INET6 1" > ${.TARGET} +.endif +.else +OPT_INET!= cat ${KERNBUILDDIR}/opt_inet.h; echo +.if empty(OPT_INET) +MK_INET_SUPPORT=no +.endif +OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo +.if empty(OPT_INET6) +MK_INET6_SUPPORT=no +.endif +.endif + +.if ${MK_INET_SUPPORT} != "no" +SRCS+= ip_gre.c +.endif -opt_atalk.h: - echo "#define NETATALK 1" > ${.TARGET} +.if ${MK_INET6_SUPPORT} != "no" +SRCS+= ip6_gre.c .endif .include Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/net/if_gre.c Sat Jun 6 12:44:42 2015 (r284066) @@ -1,8 +1,6 @@ -/* $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */ -/* $FreeBSD$ */ - /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. + * Copyright (c) 2014 Andrey V. Elsukov * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -30,24 +28,20 @@ * 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. + * + * $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */ -/* - * Encapsulate L3 protocols into IP - * See RFC 2784 (successor of RFC 1701 and 1702) for more details. - * If_gre is compatible with Cisco GRE tunnels, so you can - * have a NetBSD box as the other end of a tunnel interface of a Cisco - * router. See gre(4) for more details. - * Also supported: IP in IP encaps (proto 55) as of RFC 2004 - */ +#include +__FBSDID("$FreeBSD$"); -#include "opt_atalk.h" #include "opt_inet.h" #include "opt_inet6.h" #include #include #include +#include #include #include #include @@ -55,94 +49,84 @@ #include #include #include +#include #include #include +#include #include +#include #include #include #include #include +#include #include -#include +#include #include -#ifdef INET #include +#ifdef INET #include #include #include -#include #include -#include -#else -#error "Huh? if_gre without inet?" #endif -#include +#ifdef INET6 +#include +#include +#include +#include +#endif +#include +#include #include -/* - * It is not easy to calculate the right value for a GRE MTU. - * We leave this task to the admin and use the same default that - * other vendors use. - */ -#define GREMTU 1476 - -#define MTAG_COOKIE_GRE 1307983903 -#define MTAG_GRE_NESTING 1 -struct mtag_gre_nesting { - uint16_t count; - uint16_t max; - struct ifnet *ifp[]; -}; - -/* - * gre_mtx protects all global variables in if_gre.c. - * XXX: gre_softc data not protected yet. - */ -VNET_DEFINE(struct mtx, gre_mtx); -VNET_DEFINE(struct gre_softc_head, gre_softc_list); +#include +#include +#define GREMTU 1500 static const char grename[] = "gre"; static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation"); +static VNET_DEFINE(struct mtx, gre_mtx); +#define V_gre_mtx VNET(gre_mtx) +#define GRE_LIST_LOCK_INIT(x) mtx_init(&V_gre_mtx, "gre_mtx", NULL, \ + MTX_DEF) +#define GRE_LIST_LOCK_DESTROY(x) mtx_destroy(&V_gre_mtx) +#define GRE_LIST_LOCK(x) mtx_lock(&V_gre_mtx) +#define GRE_LIST_UNLOCK(x) mtx_unlock(&V_gre_mtx) + +static VNET_DEFINE(LIST_HEAD(, gre_softc), gre_softc_list); +#define V_gre_softc_list VNET(gre_softc_list) +static struct sx gre_ioctl_sx; +SX_SYSINIT(gre_ioctl_sx, &gre_ioctl_sx, "gre_ioctl"); static int gre_clone_create(struct if_clone *, int, caddr_t); static void gre_clone_destroy(struct ifnet *); static VNET_DEFINE(struct if_clone *, gre_cloner); #define V_gre_cloner VNET(gre_cloner) +static void gre_qflush(struct ifnet *); +static int gre_transmit(struct ifnet *, struct mbuf *); static int gre_ioctl(struct ifnet *, u_long, caddr_t); static int gre_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); -static int gre_compute_route(struct gre_softc *sc); +static void gre_updatehdr(struct gre_softc *); +static int gre_set_tunnel(struct ifnet *, struct sockaddr *, + struct sockaddr *); +static void gre_delete_tunnel(struct ifnet *); +int gre_input(struct mbuf **, int *, int); #ifdef INET -extern struct domain inetdomain; -static const struct protosw in_gre_protosw = { - .pr_type = SOCK_RAW, - .pr_domain = &inetdomain, - .pr_protocol = IPPROTO_GRE, - .pr_flags = PR_ATOMIC|PR_ADDR, - .pr_input = gre_input, - .pr_output = (pr_output_t *)rip_output, - .pr_ctlinput = rip_ctlinput, - .pr_ctloutput = rip_ctloutput, - .pr_usrreqs = &rip_usrreqs -}; -static const struct protosw in_mobile_protosw = { - .pr_type = SOCK_RAW, - .pr_domain = &inetdomain, - .pr_protocol = IPPROTO_MOBILE, - .pr_flags = PR_ATOMIC|PR_ADDR, - .pr_input = gre_mobile_input, - .pr_output = (pr_output_t *)rip_output, - .pr_ctlinput = rip_ctlinput, - .pr_ctloutput = rip_ctloutput, - .pr_usrreqs = &rip_usrreqs -}; +extern int in_gre_attach(struct gre_softc *); +extern int in_gre_output(struct mbuf *, int, int); +#endif +#ifdef INET6 +extern int in6_gre_attach(struct gre_softc *); +extern int in6_gre_output(struct mbuf *, int, int); #endif SYSCTL_DECL(_net_link); @@ -159,6 +143,7 @@ static SYSCTL_NODE(_net_link, IFT_TUNNEL */ #define MAX_GRE_NEST 1 #endif + static VNET_DEFINE(int, max_gre_nesting) = MAX_GRE_NEST; #define V_max_gre_nesting VNET(max_gre_nesting) SYSCTL_INT(_net_link_gre, OID_AUTO, max_nesting, CTLFLAG_RW | CTLFLAG_VNET, @@ -191,34 +176,22 @@ gre_clone_create(struct if_clone *ifc, i struct gre_softc *sc; sc = malloc(sizeof(struct gre_softc), M_GRE, M_WAITOK | M_ZERO); - + sc->gre_fibnum = curthread->td_proc->p_fibnum; GRE2IFP(sc) = if_alloc(IFT_TUNNEL); - if (GRE2IFP(sc) == NULL) { - free(sc, M_GRE); - return (ENOSPC); - } - + GRE_LOCK_INIT(sc); GRE2IFP(sc)->if_softc = sc; if_initname(GRE2IFP(sc), grename, unit); - GRE2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; - GRE2IFP(sc)->if_addrlen = 0; - GRE2IFP(sc)->if_hdrlen = 24; /* IP + GRE */ - GRE2IFP(sc)->if_mtu = GREMTU; + GRE2IFP(sc)->if_mtu = sc->gre_mtu = GREMTU; GRE2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; GRE2IFP(sc)->if_output = gre_output; GRE2IFP(sc)->if_ioctl = gre_ioctl; - sc->g_dst.s_addr = sc->g_src.s_addr = INADDR_ANY; - sc->g_proto = IPPROTO_GRE; - GRE2IFP(sc)->if_flags |= IFF_LINK0; - sc->encap = NULL; - sc->gre_fibnum = curthread->td_proc->p_fibnum; - sc->wccp_ver = WCCP_V1; - sc->key = 0; + GRE2IFP(sc)->if_transmit = gre_transmit; + GRE2IFP(sc)->if_qflush = gre_qflush; if_attach(GRE2IFP(sc)); bpfattach(GRE2IFP(sc), DLT_NULL, sizeof(u_int32_t)); GRE_LIST_LOCK(); - LIST_INSERT_HEAD(&V_gre_softc_list, sc, sc_list); + LIST_INSERT_HEAD(&V_gre_softc_list, sc, gre_list); GRE_LIST_UNLOCK(); return (0); } @@ -226,734 +199,752 @@ gre_clone_create(struct if_clone *ifc, i static void gre_clone_destroy(struct ifnet *ifp) { - struct gre_softc *sc = ifp->if_softc; + struct gre_softc *sc; + sx_xlock(&gre_ioctl_sx); + sc = ifp->if_softc; + gre_delete_tunnel(ifp); GRE_LIST_LOCK(); - LIST_REMOVE(sc, sc_list); + LIST_REMOVE(sc, gre_list); GRE_LIST_UNLOCK(); - -#ifdef INET - if (sc->encap != NULL) - encap_detach(sc->encap); -#endif bpfdetach(ifp); if_detach(ifp); + ifp->if_softc = NULL; + sx_xunlock(&gre_ioctl_sx); + if_free(ifp); + GRE_LOCK_DESTROY(sc); free(sc, M_GRE); } -/* - * The output routine. Takes a packet and encapsulates it in the protocol - * given by sc->g_proto. See also RFC 1701 and RFC 2004 - */ static int -gre_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, - struct route *ro) +gre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { - int error = 0; - struct gre_softc *sc = ifp->if_softc; - struct greip *gh; - struct ip *ip; - struct m_tag *mtag; - struct mtag_gre_nesting *gt; - size_t len; - u_short gre_ip_id = 0; - uint8_t gre_ip_tos = 0; - u_int16_t etype = 0; - struct mobile_h mob_h; - u_int32_t af; - int extra = 0, max; - - /* - * gre may cause infinite recursion calls when misconfigured. High - * nesting level may cause stack exhaustion. We'll prevent this by - * detecting loops and by introducing upper limit. - */ - mtag = m_tag_locate(m, MTAG_COOKIE_GRE, MTAG_GRE_NESTING, NULL); - if (mtag != NULL) { - struct ifnet **ifp2; - - gt = (struct mtag_gre_nesting *)(mtag + 1); - gt->count++; - if (gt->count > min(gt->max, V_max_gre_nesting)) { - printf("%s: hit maximum recursion limit %u on %s\n", - __func__, gt->count - 1, ifp->if_xname); - m_freem(m); - error = EIO; /* is there better errno? */ - goto end; - } - - ifp2 = gt->ifp; - for (max = gt->count - 1; max > 0; max--) { - if (*ifp2 == ifp) - break; - ifp2++; - } - if (*ifp2 == ifp) { - printf("%s: detected loop with nexting %u on %s\n", - __func__, gt->count-1, ifp->if_xname); - m_freem(m); - error = EIO; /* is there better errno? */ - goto end; - } - *ifp2 = ifp; + GRE_RLOCK_TRACKER; + struct ifreq *ifr = (struct ifreq *)data; + struct sockaddr *src, *dst; + struct gre_softc *sc; +#ifdef INET + struct sockaddr_in *sin = NULL; +#endif +#ifdef INET6 + struct sockaddr_in6 *sin6 = NULL; +#endif + uint32_t opt; + int error; - } else { - /* - * Given that people should NOT increase max_gre_nesting beyond - * their real needs, we allocate once per packet rather than - * allocating an mtag once per passing through gre. - * - * Note: the sysctl does not actually check for saneness, so we - * limit the maximum numbers of possible recursions here. - */ - max = imin(V_max_gre_nesting, 256); - /* If someone sets the sysctl <= 0, we want at least 1. */ - max = imax(max, 1); - len = sizeof(struct mtag_gre_nesting) + - max * sizeof(struct ifnet *); - mtag = m_tag_alloc(MTAG_COOKIE_GRE, MTAG_GRE_NESTING, len, - M_NOWAIT); - if (mtag == NULL) { - m_freem(m); - error = ENOMEM; - goto end; - } - gt = (struct mtag_gre_nesting *)(mtag + 1); - bzero(gt, len); - gt->count = 1; - gt->max = max; - *gt->ifp = ifp; - m_tag_prepend(m, mtag); + switch (cmd) { + case SIOCSIFMTU: + /* XXX: */ + if (ifr->ifr_mtu < 576) + return (EINVAL); + break; + case SIOCSIFADDR: + ifp->if_flags |= IFF_UP; + case SIOCSIFFLAGS: + case SIOCADDMULTI: + case SIOCDELMULTI: + return (0); + case GRESADDRS: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 13:26:16 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FD737B3; Sat, 6 Jun 2015 13:26:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80A6D1D63; Sat, 6 Jun 2015 13:26:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DQGhM041489; Sat, 6 Jun 2015 13:26:16 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DQEei041476; Sat, 6 Jun 2015 13:26:14 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061326.t56DQEei041476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284072 - in stable/10: . sys/net sys/netinet sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 13:26:16 -0000 Author: ae Date: Sat Jun 6 13:26:13 2015 New Revision: 284072 URL: https://svnweb.freebsd.org/changeset/base/284072 Log: MFC r276148: Remove in_gif.h and in6_gif.h files. They only contain function declarations used by gif(4). Instead declare these functions in C files. Also make some variables static. MFC r276215: Extern declarations in C files loses compile-time checking that the functions' calls match their definitions. Move them to header files. Deleted: stable/10/sys/netinet/in_gif.h stable/10/sys/netinet6/in6_gif.h Modified: stable/10/ObsoleteFiles.inc stable/10/sys/net/if_gif.c stable/10/sys/net/if_gif.h stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/in_gif.c stable/10/sys/netinet/ip_gre.c stable/10/sys/netinet6/in6_gif.c stable/10/sys/netinet6/ip6_gre.c Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/ObsoleteFiles.inc Sat Jun 6 13:26:13 2015 (r284072) @@ -40,6 +40,9 @@ # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz +# 20141223: remove in6_gif.h and in_gif.h +OLD_FILES+=usr/include/netinet/in_gif.h +OLD_FILES+=usr/include/netinet6/in6_gif.h # 20141205: convert sbin/mdconfig/tests to ATF format tests OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET #include -#include #include #endif /* INET */ @@ -85,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #endif /* INET6 */ Modified: stable/10/sys/net/if_gif.h ============================================================================== --- stable/10/sys/net/if_gif.h Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gif.h Sat Jun 6 13:26:13 2015 (r284072) @@ -111,6 +111,16 @@ void gif_input(struct mbuf *, struct ifn int gif_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); int gif_encapcheck(const struct mbuf *, int, int, void *); +#ifdef INET +int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in_gif_encapcheck(const struct mbuf *, int, int, void *); +int in_gif_attach(struct gif_softc *); +#endif +#ifdef INET6 +int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in6_gif_encapcheck(const struct mbuf *, int, int, void *); +int in6_gif_attach(struct gif_softc *); +#endif #endif /* _KERNEL */ #define GIFGOPTS _IOWR('i', 150, struct ifreq) Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -119,16 +119,6 @@ static int gre_set_tunnel(struct ifnet * struct sockaddr *); static void gre_delete_tunnel(struct ifnet *); -int gre_input(struct mbuf **, int *, int); -#ifdef INET -extern int in_gre_attach(struct gre_softc *); -extern int in_gre_output(struct mbuf *, int, int); -#endif -#ifdef INET6 -extern int in6_gre_attach(struct gre_softc *); -extern int in6_gre_output(struct mbuf *, int, int); -#endif - SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW, 0, "Generic Routing Encapsulation"); Modified: stable/10/sys/net/if_gre.h ============================================================================== --- stable/10/sys/net/if_gre.h Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gre.h Sat Jun 6 13:26:13 2015 (r284072) @@ -100,6 +100,15 @@ struct gre_softc { #define gre_oip gre_gihdr->gi_ip #define gre_oip6 gre_gi6hdr->gi6_ip6 +int gre_input(struct mbuf **, int *, int); +#ifdef INET +int in_gre_attach(struct gre_softc *); +int in_gre_output(struct mbuf *, int, int); +#endif +#ifdef INET6 +int in6_gre_attach(struct gre_softc *); +int in6_gre_output(struct mbuf *, int, int); +#endif /* * CISCO uses special type for GRE tunnel created as part of WCCP * connection, while in fact those packets are just IPv4 encapsulated Modified: stable/10/sys/netinet/in_gif.c ============================================================================== --- stable/10/sys/netinet/in_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet/in_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -70,10 +69,11 @@ __FBSDID("$FreeBSD$"); static int gif_validate4(const struct ip *, struct gif_softc *, struct ifnet *); +static int in_gif_input(struct mbuf **, int *, int); static void in_gif_input10(struct mbuf *, int); extern struct domain inetdomain; -struct protosw in_gif_protosw = { +static struct protosw in_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inetdomain, .pr_protocol = 0/* IPPROTO_IPV[46] */, @@ -84,7 +84,8 @@ struct protosw in_gif_protosw = { .pr_usrreqs = &rip_usrreqs }; -VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; +#define GIF_TTL 30 +static VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; #define V_ip_gif_ttl VNET(ip_gif_ttl) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, &VNET_NAME(ip_gif_ttl), 0, ""); @@ -143,7 +144,7 @@ in_gif_input10(struct mbuf *m, int off) in_gif_input(&m, &off, proto); } -int +static int in_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; Modified: stable/10/sys/netinet/ip_gre.c ============================================================================== --- stable/10/sys/netinet/ip_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet/ip_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -73,11 +73,6 @@ __FBSDID("$FreeBSD$"); #include extern struct domain inetdomain; -extern int gre_input(struct mbuf **, int *, int); - -int in_gre_attach(struct gre_softc *); -int in_gre_output(struct mbuf *, int, int); - static void gre_input10(struct mbuf *, int); static const struct protosw in_gre_protosw = { .pr_type = SOCK_RAW, Modified: stable/10/sys/netinet6/in6_gif.c ============================================================================== --- stable/10/sys/netinet6/in6_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet6/in6_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include -#include #include #endif #include @@ -75,7 +74,8 @@ __FBSDID("$FreeBSD$"); #include -VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; +#define GIF_HLIM 30 +static VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; #define V_ip6_gif_hlim VNET(ip6_gif_hlim) SYSCTL_DECL(_net_inet6_ip6); @@ -84,9 +84,10 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_ static int gif_validate6(const struct ip6_hdr *, struct gif_softc *, struct ifnet *); +static int in6_gif_input(struct mbuf **, int *, int); extern struct domain inet6domain; -struct ip6protosw in6_gif_protosw = { +static struct ip6protosw in6_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, .pr_protocol = 0, /* IPPROTO_IPV[46] */ @@ -145,7 +146,7 @@ in6_gif_output(struct ifnet *ifp, struct return (ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL)); } -int +static int in6_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; Modified: stable/10/sys/netinet6/ip6_gre.c ============================================================================== --- stable/10/sys/netinet6/ip6_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet6/ip6_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -63,11 +63,6 @@ __FBSDID("$FreeBSD$"); #include extern struct domain inet6domain; -extern int gre_input(struct mbuf **, int *, int); - -int in6_gre_attach(struct gre_softc *); -int in6_gre_output(struct mbuf *, int, int); - struct ip6protosw in6_gre_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 13:29:42 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 821CA925; Sat, 6 Jun 2015 13:29:42 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7084C1D72; Sat, 6 Jun 2015 13:29:42 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DTgb4042001; Sat, 6 Jun 2015 13:29:42 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DTgdE042000; Sat, 6 Jun 2015 13:29:42 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061329.t56DTgdE042000@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:29:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284073 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 13:29:42 -0000 Author: ae Date: Sat Jun 6 13:29:41 2015 New Revision: 284073 URL: https://svnweb.freebsd.org/changeset/base/284073 Log: MFC r276902,282536: Pass mtag argument into m_tag_locate() to continue the search from the last found mtag. Modified: stable/10/sys/net/if_me.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_me.c ============================================================================== --- stable/10/sys/net/if_me.c Sat Jun 6 13:26:13 2015 (r284072) +++ stable/10/sys/net/if_me.c Sat Jun 6 13:29:41 2015 (r284073) @@ -487,7 +487,7 @@ me_check_nesting(struct ifnet *ifp, stru count = 1; mtag = NULL; - while ((mtag = m_tag_locate(m, MTAG_ME, 0, NULL)) != NULL) { + while ((mtag = m_tag_locate(m, MTAG_ME, 0, mtag)) != NULL) { if (*(struct ifnet **)(mtag + 1) == ifp) { log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname); return (EIO); From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 13:37:14 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 412F7B01; Sat, 6 Jun 2015 13:37:14 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DD361F97; Sat, 6 Jun 2015 13:37:14 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DbE1w046706; Sat, 6 Jun 2015 13:37:14 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DbCU4046700; Sat, 6 Jun 2015 13:37:12 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061337.t56DbCU4046700@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284074 - in stable/10: sbin/ifconfig sys/net sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 13:37:14 -0000 Author: ae Date: Sat Jun 6 13:37:11 2015 New Revision: 284074 URL: https://svnweb.freebsd.org/changeset/base/284074 Log: MFC r282809: Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated packets on tunnel interfaces. Add support of these ioctls to gre(4), gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use if_fib value from ifnet structure, use proper value in gre(4) and me(4). Differential Revision: https://reviews.freebsd.org/D2462 Modified: stable/10/sbin/ifconfig/ifconfig.8 stable/10/sbin/ifconfig/iffib.c stable/10/sys/net/if_gif.c stable/10/sys/net/if_gre.c stable/10/sys/net/if_me.c stable/10/sys/sys/sockio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.8 Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sbin/ifconfig/ifconfig.8 Sat Jun 6 13:37:11 2015 (r284074) @@ -321,6 +321,14 @@ using the kernel configuration option, or the .Va net.fibs tunable. +.It Cm tunnelfib Ar fib_number +Specify tunnel FIB. +A FIB +.Ar fib_number +is assigned to all packets encapsulated by tunnel interface, e.g., +.Xr gif 4 +and +.Xr gre 4 . .It Cm ipdst This is used to specify an Internet host who is willing to receive IP packets encapsulating IPX packets bound for a remote network. Modified: stable/10/sbin/ifconfig/iffib.c ============================================================================== --- stable/10/sbin/ifconfig/iffib.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sbin/ifconfig/iffib.c Sat Jun 6 13:37:11 2015 (r284074) @@ -50,15 +50,15 @@ fib_status(int s) memset(&ifr, 0, sizeof(ifr)); strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) == 0 && + ifr.ifr_fib != RT_DEFAULT_FIB) + printf("\tfib: %u\n", ifr.ifr_fib); - if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) < 0) - return; - - /* Ignore if it is the default. */ - if (ifr.ifr_fib == 0) - return; - - printf("\tfib: %u\n", ifr.ifr_fib); + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGTUNFIB, (caddr_t)&ifr) == 0 && + ifr.ifr_fib != RT_DEFAULT_FIB) + printf("\ttunnelfib: %u\n", ifr.ifr_fib); } static void @@ -80,8 +80,28 @@ setiffib(const char *val, int dummy __un warn("ioctl (SIOCSIFFIB)"); } +static void +settunfib(const char *val, int dummy __unused, int s, + const struct afswtch *afp) +{ + unsigned long fib; + char *ep; + + fib = strtoul(val, &ep, 0); + if (*ep != '\0' || fib > UINT_MAX) { + warn("fib %s not valid", val); + return; + } + + strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); + ifr.ifr_fib = fib; + if (ioctl(s, SIOCSTUNFIB, (caddr_t)&ifr) < 0) + warn("ioctl (SIOCSTUNFIB)"); +} + static struct cmd fib_cmds[] = { DEF_CMD_ARG("fib", setiffib), + DEF_CMD_ARG("tunnelfib", settunfib), }; static struct afswtch af_fib = { Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sys/net/if_gif.c Sat Jun 6 13:37:11 2015 (r284074) @@ -919,6 +919,17 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, #endif } break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->gif_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->gif_fibnum = ifr->ifr_fib; + break; case GIFGOPTS: options = sc->gif_options; error = copyout(&options, ifr->ifr_data, sizeof(options)); @@ -934,7 +945,6 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, else sc->gif_options = options; break; - default: error = EINVAL; break; Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sys/net/if_gre.c Sat Jun 6 13:37:11 2015 (r284074) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef INET @@ -441,6 +442,17 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, #endif } break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->gre_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->gre_fibnum = ifr->ifr_fib; + break; case GRESKEY: if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) break; @@ -454,7 +466,8 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, } break; case GREGKEY: - error = copyout(&sc->gre_key, ifr->ifr_data, sizeof(sc->gre_key)); + error = copyout(&sc->gre_key, ifr->ifr_data, + sizeof(sc->gre_key)); break; case GRESOPTS: if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) @@ -725,7 +738,7 @@ gre_input(struct mbuf **mp, int *offp, i m_adj(m, *offp + hlen); m_clrprotoflags(m); m->m_pkthdr.rcvif = ifp; - M_SETFIB(m, sc->gre_fibnum); + M_SETFIB(m, ifp->if_fib); #ifdef MAC mac_ifnet_create_mbuf(ifp, m); #endif Modified: stable/10/sys/net/if_me.c ============================================================================== --- stable/10/sys/net/if_me.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sys/net/if_me.c Sat Jun 6 13:37:11 2015 (r284074) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -298,6 +299,17 @@ me_ioctl(struct ifnet *ifp, u_long cmd, if (error != 0) memset(src, 0, sizeof(*src)); break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->me_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->me_fibnum = ifr->ifr_fib; + break; default: error = EINVAL; break; @@ -463,7 +475,7 @@ me_input(struct mbuf **mp, int *offp, in m_clrprotoflags(m); m->m_pkthdr.rcvif = ifp; m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID); - M_SETFIB(m, sc->me_fibnum); + M_SETFIB(m, ifp->if_fib); hlen = AF_INET; BPF_MTAP2(ifp, &hlen, sizeof(hlen), m); if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); Modified: stable/10/sys/sys/sockio.h ============================================================================== --- stable/10/sys/sys/sockio.h Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sys/sys/sockio.h Sat Jun 6 13:37:11 2015 (r284074) @@ -113,6 +113,9 @@ #define SIOCGIFFIB _IOWR('i', 92, struct ifreq) /* get IF fib */ #define SIOCSIFFIB _IOW('i', 93, struct ifreq) /* set IF fib */ +#define SIOCGTUNFIB _IOWR('i', 94, struct ifreq) /* get tunnel fib */ +#define SIOCSTUNFIB _IOW('i', 95, struct ifreq) /* set tunnel fib */ + #define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific parameters */ #define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 13:39:21 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C868DC5E; Sat, 6 Jun 2015 13:39:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA781FB2; Sat, 6 Jun 2015 13:39:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DdLGJ047039; Sat, 6 Jun 2015 13:39:21 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DdL1C047038; Sat, 6 Jun 2015 13:39:21 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061339.t56DdL1C047038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284075 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 13:39:21 -0000 Author: ae Date: Sat Jun 6 13:39:20 2015 New Revision: 284075 URL: https://svnweb.freebsd.org/changeset/base/284075 Log: MFC r283897: Add example how to configure gre(4) tunnel with the same inner and outer addresses using multiple FIBs. Modified: stable/10/share/man/man4/gre.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/gre.4 ============================================================================== --- stable/10/share/man/man4/gre.4 Sat Jun 6 13:37:11 2015 (r284074) +++ stable/10/share/man/man4/gre.4 Sat Jun 6 13:39:20 2015 (r284075) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2014 +.Dd June 2, 2015 .Dt GRE 4 .Os .Sh NAME @@ -118,6 +118,44 @@ ifconfig greN inet 192.168.2.1 192.168.1 ifconfig greN inet tunnel B A route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1 .Ed +.Pp +In case when internal and external IP addresses are the same, +different routing tables (FIB) should be used. +The default FIB will be applied to IP packets before GRE encapsulation. +After encapsulation GRE interface should set different FIB number to +outgoing packet. +Then different FIB will be applied to such encapsulated packets. +According to this FIB packet should be routed to tunnel endpoint. +.Bd -literal +Host X -- Host A (198.51.100.1) ---tunnel--- Cisco D (203.0.113.1) -- Host E + \\ / + \\ / + +----- Host B ----- Host C -----+ + (198.51.100.254) +.Ed +.Pp +On Host A (FreeBSD): +.Pp +First of multiple FIBs should be configured via loader.conf: +.Bd -literal -offset indent +net.fibs=2 +net.add_addr_allfibs=0 +.Ed +.Pp +Then routes to the gateway and remote tunnel endpoint via this gateway +should be added to the second FIB: +.Bd -literal -offset indent +route add -net 198.51.100.0 -netmask 255.255.255.0 -fib 1 -iface em0 +route add -host 203.0.113.1 -fib 1 198.51.100.254 +.Ed +.Pp +And GRE tunnel should be configured to change FIB for encapsulated packets: +.Bd -literal -offset indent +ifconfig greN create +ifconfig greN inet 198.51.100.1 203.0.113.1 +ifconfig greN inet tunnel 198.51.100.1 203.0.113.1 tunnelfib 1 +.Ed +.Pp .Sh NOTES The MTU of .Nm From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 18:00:38 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74A3D304; Sat, 6 Jun 2015 18:00:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 612C41A68; Sat, 6 Jun 2015 18:00:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56I0cUv079043; Sat, 6 Jun 2015 18:00:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56I0aWC078910; Sat, 6 Jun 2015 18:00:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506061800.t56I0aWC078910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 18:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284089 - in stable/10/sys/dev/cxgbe: . iw_cxgbe tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 18:00:38 -0000 Author: np Date: Sat Jun 6 18:00:36 2015 New Revision: 284089 URL: https://svnweb.freebsd.org/changeset/base/284089 Log: MFC r278239 and r278374. r278239: cxgbe(4): reserve id for iSCSI upper layer driver. r278374: cxgbe(4): tidy up some of the interaction between the Upper Layer Drivers (ULDs) and the base if_cxgbe driver. Track the per-adapter activation of ULDs in a new "active_ulds" field. This was done pretty arbitrarily before this change -- via TOM_INIT_DONE in adapter->flags for TOM, and the (1 << MAX_NPORTS) bit in adapter->offload_map for iWARP. iWARP and hw-accelerated iSCSI rely on the TOE (supported by the TOM ULD). The rules are: a) If the iWARP and/or iSCSI ULDs are available when TOE is enabled then iWARP and/or iSCSI are enabled too. b) When the iWARP and iSCSI modules are loaded they go looking for adapters with TOE enabled and enable themselves on that adapter. c) You cannot deactivate or unload the TOM module from underneath iWARP or iSCSI. Any such attempt will fail with EBUSY. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/iw_cxgbe/device.c stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 18:00:36 2015 (r284089) @@ -186,7 +186,7 @@ enum { /* INTR_DIRECT = (1 << 2), No longer used. */ MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), - TOM_INIT_DONE = (1 << 5), + /* TOM_INIT_DONE= (1 << 5), No longer used */ BUF_PACKING_OK = (1 << 6), CXGBE_BUSY = (1 << 9), @@ -751,7 +751,8 @@ struct adapter { uint16_t doorbells; int open_device_map; #ifdef TCP_OFFLOAD - int offload_map; + int offload_map; /* ports with IFCAP_TOE enabled */ + int active_ulds; /* ULDs activated on this adapter */ #endif int flags; Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Sat Jun 6 18:00:36 2015 (r284089) @@ -213,7 +213,7 @@ c4iw_activate(struct adapter *sc) ASSERT_SYNCHRONIZED_OP(sc); - if (isset(&sc->offload_map, MAX_NPORTS)) { + if (uld_active(sc, ULD_IWARP)) { KASSERT(0, ("%s: RDMA already eanbled on sc %p", __func__, sc)); return (0); } @@ -265,9 +265,9 @@ c4iw_activate_all(struct adapter *sc, vo if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwact") != 0) return; - if (!isset(&sc->offload_map, MAX_NPORTS) && - t4_activate_uld(sc, ULD_IWARP) == 0) - setbit(&sc->offload_map, MAX_NPORTS); + /* Activate iWARP if any port on this adapter has IFCAP_TOE enabled. */ + if (sc->offload_map && !uld_active(sc, ULD_IWARP)) + (void) t4_activate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } @@ -279,9 +279,8 @@ c4iw_deactivate_all(struct adapter *sc, if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwdea") != 0) return; - if (isset(&sc->offload_map, MAX_NPORTS) && - t4_deactivate_uld(sc, ULD_IWARP) == 0) - clrbit(&sc->offload_map, MAX_NPORTS); + if (uld_active(sc, ULD_IWARP)) + (void) t4_deactivate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/offload.h Sat Jun 6 18:00:36 2015 (r284089) @@ -127,8 +127,10 @@ struct t4_virt_res { #ifdef TCP_OFFLOAD enum { - ULD_TOM = 1, - ULD_IWARP = 2, + ULD_TOM = 0, + ULD_IWARP, + ULD_ISCSI, + ULD_MAX = ULD_ISCSI }; struct adapter; @@ -155,5 +157,6 @@ int t4_unregister_uld(struct uld_info *) int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); void t4_iscsi_init(struct ifnet *, unsigned int, const unsigned int *); +int uld_active(struct adapter *, int); #endif #endif Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 18:00:36 2015 (r284089) @@ -7057,7 +7057,7 @@ set_filter_mode(struct adapter *sc, uint } #ifdef TCP_OFFLOAD - if (sc->offload_map) { + if (uld_active(sc, ULD_TOM)) { rc = EBUSY; goto done; } @@ -8142,7 +8142,7 @@ toe_capability(struct port_info *pi, int if (isset(&sc->offload_map, pi->port_id)) return (0); - if (!(sc->flags & TOM_INIT_DONE)) { + if (!uld_active(sc, ULD_TOM)) { rc = t4_activate_uld(sc, ULD_TOM); if (rc == EAGAIN) { log(LOG_WARNING, @@ -8153,16 +8153,22 @@ toe_capability(struct port_info *pi, int return (rc); KASSERT(sc->tom_softc != NULL, ("%s: TOM activated but softc NULL", __func__)); - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM activated but flag not set", __func__)); } + /* Activate iWARP and iSCSI too, if the modules are loaded. */ + if (!uld_active(sc, ULD_IWARP)) + (void) t4_activate_uld(sc, ULD_IWARP); + if (!uld_active(sc, ULD_ISCSI)) + (void) t4_activate_uld(sc, ULD_ISCSI); + setbit(&sc->offload_map, pi->port_id); } else { if (!isset(&sc->offload_map, pi->port_id)) return (0); - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM never initialized?", __func__)); clrbit(&sc->offload_map, pi->port_id); } @@ -8222,11 +8228,15 @@ done: int t4_activate_uld(struct adapter *sc, int id) { - int rc = EAGAIN; + int rc; struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); + if (id < 0 || id > ULD_MAX) + return (EINVAL); + rc = EAGAIN; /* kldoad the module with this ULD and try again. */ + sx_slock(&t4_uld_list_lock); SLIST_FOREACH(ui, &t4_uld_list, link) { @@ -8234,16 +8244,18 @@ t4_activate_uld(struct adapter *sc, int if (!(sc->flags & FULL_INIT_DONE)) { rc = adapter_full_init(sc); if (rc != 0) - goto done; + break; } rc = ui->activate(sc); - if (rc == 0) + if (rc == 0) { + setbit(&sc->active_ulds, id); ui->refcount++; - goto done; + } + break; } } -done: + sx_sunlock(&t4_uld_list_lock); return (rc); @@ -8252,26 +8264,41 @@ done: int t4_deactivate_uld(struct adapter *sc, int id) { - int rc = EINVAL; + int rc; struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); + if (id < 0 || id > ULD_MAX) + return (EINVAL); + rc = ENXIO; + sx_slock(&t4_uld_list_lock); SLIST_FOREACH(ui, &t4_uld_list, link) { if (ui->uld_id == id) { rc = ui->deactivate(sc); - if (rc == 0) + if (rc == 0) { + clrbit(&sc->active_ulds, id); ui->refcount--; - goto done; + } + break; } } -done: + sx_sunlock(&t4_uld_list_lock); return (rc); } + +int +uld_active(struct adapter *sc, int uld_id) +{ + + MPASS(uld_id >= 0 && uld_id <= ULD_MAX); + + return (isset(&sc->active_ulds, uld_id)); +} #endif /* Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_listen.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Sat Jun 6 18:00:36 2015 (r284089) @@ -523,7 +523,7 @@ t4_listen_start(struct toedev *tod, stru goto done; } - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM not initialized", __func__)); #endif Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.c Sat Jun 6 18:00:36 2015 (r284089) @@ -745,7 +745,7 @@ update_clip(struct adapter *sc, void *ar if (begin_synchronized_op(sc, NULL, HOLD_LOCK, "t4tomuc")) return; - if (sc->flags & TOM_INIT_DONE) + if (uld_active(sc, ULD_TOM)) update_clip_table(sc, sc->tom_softc); end_synchronized_op(sc, LOCK_HELD); @@ -1024,7 +1024,6 @@ t4_tom_activate(struct adapter *sc) TOEDEV(sc->port[i]->ifp) = &td->tod; sc->tom_softc = td; - sc->flags |= TOM_INIT_DONE; register_toedev(sc->tom_softc); done: @@ -1047,6 +1046,9 @@ t4_tom_deactivate(struct adapter *sc) if (sc->offload_map != 0) return (EBUSY); /* at least one port has IFCAP_TOE enabled */ + if (uld_active(sc, ULD_IWARP) || uld_active(sc, ULD_ISCSI)) + return (EBUSY); /* both iWARP and iSCSI rely on the TOE. */ + mtx_lock(&td->toep_list_lock); if (!TAILQ_EMPTY(&td->toep_list)) rc = EBUSY; @@ -1067,7 +1069,6 @@ t4_tom_deactivate(struct adapter *sc) unregister_toedev(sc->tom_softc); free_tom_data(sc, td); sc->tom_softc = NULL; - sc->flags &= ~TOM_INIT_DONE; } return (rc); @@ -1121,7 +1122,7 @@ tom_uninit(struct adapter *sc, void *arg return; /* Try to free resources (works only if no port has IFCAP_TOE) */ - if (sc->flags & TOM_INIT_DONE) + if (uld_active(sc, ULD_TOM)) t4_deactivate_uld(sc, ULD_TOM); end_synchronized_op(sc, 0); From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 18:03:39 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E94B1482; Sat, 6 Jun 2015 18:03:38 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D06B91C18; Sat, 6 Jun 2015 18:03:38 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56I3cLj080520; Sat, 6 Jun 2015 18:03:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56I3buw080506; Sat, 6 Jun 2015 18:03:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506061803.t56I3buw080506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 18:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284090 - in stable/10/sys/gnu/dts: . arm include/dt-bindings/arm include/dt-bindings/clk include/dt-bindings/clock include/dt-bindings/dma include/dt-bindings/gpio include/dt-bindings/... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 18:03:39 -0000 Author: ian Date: Sat Jun 6 18:03:36 2015 New Revision: 284090 URL: https://svnweb.freebsd.org/changeset/base/284090 Log: MFC r279385, r279902, r281412: Merge latest dts files (commit c8c1b3a77934768c7f7a4a9c10140c8bec529059) from the git tree. File names with commas in them cause issues for freebsd-update. We don't actually use these files at the moment, so eliminate them until we actually do. In the mean time, freebsd-update will be updated to eliminate the issues. The GNU Amlogic DTS files have some errors (e.g. bad register address, bad IRQ, etc) which are fixed by this patch. Added: stable/10/sys/gnu/dts/arm/aks-cdu.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/aks-cdu.dts stable/10/sys/gnu/dts/arm/am335x-base0033.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-base0033.dts stable/10/sys/gnu/dts/arm/am335x-bone-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-bone-common.dtsi stable/10/sys/gnu/dts/arm/am335x-bone.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-bone.dts stable/10/sys/gnu/dts/arm/am335x-boneblack.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-boneblack.dts stable/10/sys/gnu/dts/arm/am335x-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-evm.dts stable/10/sys/gnu/dts/arm/am335x-evmsk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-evmsk.dts stable/10/sys/gnu/dts/arm/am335x-igep0033.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-igep0033.dtsi stable/10/sys/gnu/dts/arm/am335x-lxm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-lxm.dts stable/10/sys/gnu/dts/arm/am335x-nano.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-nano.dts stable/10/sys/gnu/dts/arm/am335x-pepper.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-pepper.dts stable/10/sys/gnu/dts/arm/am33xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am33xx-clocks.dtsi stable/10/sys/gnu/dts/arm/am33xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am33xx.dtsi stable/10/sys/gnu/dts/arm/am3517-craneboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am3517-craneboard.dts stable/10/sys/gnu/dts/arm/am3517-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am3517-evm.dts stable/10/sys/gnu/dts/arm/am3517.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am3517.dtsi stable/10/sys/gnu/dts/arm/am3517_mt_ventoux.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am3517_mt_ventoux.dts stable/10/sys/gnu/dts/arm/am35xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am35xx-clocks.dtsi stable/10/sys/gnu/dts/arm/am4372.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am4372.dtsi stable/10/sys/gnu/dts/arm/am437x-gp-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am437x-gp-evm.dts stable/10/sys/gnu/dts/arm/am437x-idk-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am437x-idk-evm.dts stable/10/sys/gnu/dts/arm/am437x-sk-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am437x-sk-evm.dts stable/10/sys/gnu/dts/arm/am43x-epos-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am43x-epos-evm.dts stable/10/sys/gnu/dts/arm/am43xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am43xx-clocks.dtsi stable/10/sys/gnu/dts/arm/am57xx-beagle-x15.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am57xx-beagle-x15.dts stable/10/sys/gnu/dts/arm/arm-realview-pb1176.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/arm-realview-pb1176.dts stable/10/sys/gnu/dts/arm/armada-370-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-db.dts stable/10/sys/gnu/dts/arm/armada-370-mirabox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-mirabox.dts stable/10/sys/gnu/dts/arm/armada-370-netgear-rn102.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-netgear-rn102.dts stable/10/sys/gnu/dts/arm/armada-370-netgear-rn104.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-netgear-rn104.dts stable/10/sys/gnu/dts/arm/armada-370-rd.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-rd.dts stable/10/sys/gnu/dts/arm/armada-370-synology-ds213j.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-synology-ds213j.dts stable/10/sys/gnu/dts/arm/armada-370-xp.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-xp.dtsi stable/10/sys/gnu/dts/arm/armada-370.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370.dtsi stable/10/sys/gnu/dts/arm/armada-375-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-375-db.dts stable/10/sys/gnu/dts/arm/armada-375.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-375.dtsi stable/10/sys/gnu/dts/arm/armada-380.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-380.dtsi stable/10/sys/gnu/dts/arm/armada-385-db-ap.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-385-db-ap.dts stable/10/sys/gnu/dts/arm/armada-385.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-385.dtsi stable/10/sys/gnu/dts/arm/armada-388-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-388-db.dts stable/10/sys/gnu/dts/arm/armada-388-gp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-388-gp.dts stable/10/sys/gnu/dts/arm/armada-388-rd.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-388-rd.dts stable/10/sys/gnu/dts/arm/armada-388.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-388.dtsi stable/10/sys/gnu/dts/arm/armada-38x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-38x.dtsi stable/10/sys/gnu/dts/arm/armada-xp-axpwifiap.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-axpwifiap.dts stable/10/sys/gnu/dts/arm/armada-xp-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-db.dts stable/10/sys/gnu/dts/arm/armada-xp-gp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-gp.dts stable/10/sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts stable/10/sys/gnu/dts/arm/armada-xp-matrix.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-matrix.dts stable/10/sys/gnu/dts/arm/armada-xp-mv78230.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-mv78230.dtsi stable/10/sys/gnu/dts/arm/armada-xp-mv78260.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-mv78260.dtsi stable/10/sys/gnu/dts/arm/armada-xp-mv78460.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-mv78460.dtsi stable/10/sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts stable/10/sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts stable/10/sys/gnu/dts/arm/armada-xp-synology-ds414.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-synology-ds414.dts stable/10/sys/gnu/dts/arm/armada-xp.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp.dtsi stable/10/sys/gnu/dts/arm/armv7-m.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armv7-m.dtsi stable/10/sys/gnu/dts/arm/at91-sama5d4ek.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/at91-sama5d4ek.dts stable/10/sys/gnu/dts/arm/at91sam9xe.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/at91sam9xe.dtsi stable/10/sys/gnu/dts/arm/atlas6-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/atlas6-evb.dts stable/10/sys/gnu/dts/arm/atlas6.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/atlas6.dtsi stable/10/sys/gnu/dts/arm/atlas7-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/atlas7-evb.dts stable/10/sys/gnu/dts/arm/atlas7.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/atlas7.dtsi stable/10/sys/gnu/dts/arm/axm5516-cpus.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/axm5516-cpus.dtsi stable/10/sys/gnu/dts/arm/axp209.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/axp209.dtsi stable/10/sys/gnu/dts/arm/bcm-cygnus-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm-cygnus-clock.dtsi stable/10/sys/gnu/dts/arm/bcm-cygnus.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm-cygnus.dtsi stable/10/sys/gnu/dts/arm/bcm11351.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm11351.dtsi stable/10/sys/gnu/dts/arm/bcm21664-garnet.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm21664-garnet.dts stable/10/sys/gnu/dts/arm/bcm21664.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm21664.dtsi stable/10/sys/gnu/dts/arm/bcm28155-ap.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm28155-ap.dts stable/10/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts stable/10/sys/gnu/dts/arm/bcm2835-rpi-b.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm2835-rpi-b.dts stable/10/sys/gnu/dts/arm/bcm2835-rpi.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm2835-rpi.dtsi stable/10/sys/gnu/dts/arm/bcm2835.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm2835.dtsi stable/10/sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts stable/10/sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts stable/10/sys/gnu/dts/arm/bcm4708-netgear-r6250.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708-netgear-r6250.dts stable/10/sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts stable/10/sys/gnu/dts/arm/bcm4708.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708.dtsi stable/10/sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts stable/10/sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts stable/10/sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts stable/10/sys/gnu/dts/arm/bcm47081.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm47081.dtsi stable/10/sys/gnu/dts/arm/bcm5301x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm5301x.dtsi stable/10/sys/gnu/dts/arm/bcm59056.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm59056.dtsi stable/10/sys/gnu/dts/arm/bcm63138.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm63138.dtsi stable/10/sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts stable/10/sys/gnu/dts/arm/bcm7445.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm7445.dtsi stable/10/sys/gnu/dts/arm/bcm911360_entphn.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm911360_entphn.dts stable/10/sys/gnu/dts/arm/bcm911360k.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm911360k.dts stable/10/sys/gnu/dts/arm/bcm958300k.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm958300k.dts stable/10/sys/gnu/dts/arm/bcm963138dvt.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm963138dvt.dts stable/10/sys/gnu/dts/arm/berlin2-sony-nsz-gs7.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2-sony-nsz-gs7.dts stable/10/sys/gnu/dts/arm/berlin2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2.dtsi stable/10/sys/gnu/dts/arm/berlin2cd-google-chromecast.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2cd-google-chromecast.dts stable/10/sys/gnu/dts/arm/berlin2cd.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2cd.dtsi stable/10/sys/gnu/dts/arm/berlin2q-marvell-dmp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2q-marvell-dmp.dts stable/10/sys/gnu/dts/arm/berlin2q.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2q.dtsi stable/10/sys/gnu/dts/arm/cros-adc-thermistors.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/cros-adc-thermistors.dtsi stable/10/sys/gnu/dts/arm/cros-ec-keyboard.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/cros-ec-keyboard.dtsi stable/10/sys/gnu/dts/arm/cx92755.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/cx92755.dtsi stable/10/sys/gnu/dts/arm/cx92755_equinox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/cx92755_equinox.dts stable/10/sys/gnu/dts/arm/da850-enbw-cmc.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/da850-enbw-cmc.dts stable/10/sys/gnu/dts/arm/da850-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/da850-evm.dts stable/10/sys/gnu/dts/arm/da850.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/da850.dtsi stable/10/sys/gnu/dts/arm/dm8168-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dm8168-evm.dts stable/10/sys/gnu/dts/arm/dm816x-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dm816x-clocks.dtsi stable/10/sys/gnu/dts/arm/dm816x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dm816x.dtsi stable/10/sys/gnu/dts/arm/dove-cm-a510.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-cm-a510.dts stable/10/sys/gnu/dts/arm/dove-cubox-es.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-cubox-es.dts stable/10/sys/gnu/dts/arm/dove-cubox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-cubox.dts stable/10/sys/gnu/dts/arm/dove-d2plug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-d2plug.dts stable/10/sys/gnu/dts/arm/dove-d3plug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-d3plug.dts stable/10/sys/gnu/dts/arm/dove-dove-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-dove-db.dts stable/10/sys/gnu/dts/arm/dove.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dove.dtsi stable/10/sys/gnu/dts/arm/dra7-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dra7-evm.dts stable/10/sys/gnu/dts/arm/dra7.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dra7.dtsi stable/10/sys/gnu/dts/arm/dra72-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dra72-evm.dts stable/10/sys/gnu/dts/arm/dra72x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dra72x.dtsi stable/10/sys/gnu/dts/arm/dra74x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dra74x.dtsi stable/10/sys/gnu/dts/arm/dra7xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dra7xx-clocks.dtsi stable/10/sys/gnu/dts/arm/ea3250.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ea3250.dts stable/10/sys/gnu/dts/arm/ecx-2000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ecx-2000.dts stable/10/sys/gnu/dts/arm/ecx-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ecx-common.dtsi stable/10/sys/gnu/dts/arm/efm32gg-dk3750.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/efm32gg-dk3750.dts stable/10/sys/gnu/dts/arm/efm32gg.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/efm32gg.dtsi stable/10/sys/gnu/dts/arm/elpida_ecb240abacn.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/elpida_ecb240abacn.dtsi stable/10/sys/gnu/dts/arm/emev2-kzm9d.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/emev2-kzm9d.dts stable/10/sys/gnu/dts/arm/emev2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/emev2.dtsi stable/10/sys/gnu/dts/arm/exynos3250-monk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos3250-monk.dts stable/10/sys/gnu/dts/arm/exynos3250-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos3250-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos3250-rinato.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos3250-rinato.dts stable/10/sys/gnu/dts/arm/exynos3250.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos3250.dtsi stable/10/sys/gnu/dts/arm/exynos4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4.dtsi stable/10/sys/gnu/dts/arm/exynos4210-origen.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-origen.dts stable/10/sys/gnu/dts/arm/exynos4210-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos4210-smdkv310.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-smdkv310.dts stable/10/sys/gnu/dts/arm/exynos4210-trats.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-trats.dts stable/10/sys/gnu/dts/arm/exynos4210-universal_c210.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-universal_c210.dts stable/10/sys/gnu/dts/arm/exynos4210.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210.dtsi stable/10/sys/gnu/dts/arm/exynos4212.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4212.dtsi stable/10/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi stable/10/sys/gnu/dts/arm/exynos4412-odroidu3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-odroidu3.dts stable/10/sys/gnu/dts/arm/exynos4412-odroidx.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-odroidx.dts stable/10/sys/gnu/dts/arm/exynos4412-odroidx2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-odroidx2.dts stable/10/sys/gnu/dts/arm/exynos4412-origen.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-origen.dts stable/10/sys/gnu/dts/arm/exynos4412-smdk4412.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-smdk4412.dts stable/10/sys/gnu/dts/arm/exynos4412-tiny4412.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-tiny4412.dts stable/10/sys/gnu/dts/arm/exynos4412-trats2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-trats2.dts stable/10/sys/gnu/dts/arm/exynos4412.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412.dtsi stable/10/sys/gnu/dts/arm/exynos4415-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4415-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos4415.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4415.dtsi stable/10/sys/gnu/dts/arm/exynos4x12-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4x12-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos4x12.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4x12.dtsi stable/10/sys/gnu/dts/arm/exynos5.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5.dtsi stable/10/sys/gnu/dts/arm/exynos5250-arndale.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250-arndale.dts stable/10/sys/gnu/dts/arm/exynos5250-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos5250-smdk5250.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250-smdk5250.dts stable/10/sys/gnu/dts/arm/exynos5250-spring.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250-spring.dts stable/10/sys/gnu/dts/arm/exynos5250.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250.dtsi stable/10/sys/gnu/dts/arm/exynos5260-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5260-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos5260-xyref5260.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5260-xyref5260.dts stable/10/sys/gnu/dts/arm/exynos5260.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5260.dtsi stable/10/sys/gnu/dts/arm/exynos5410-smdk5410.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5410-smdk5410.dts stable/10/sys/gnu/dts/arm/exynos5410.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5410.dtsi stable/10/sys/gnu/dts/arm/exynos5420-arndale-octa.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5420-arndale-octa.dts stable/10/sys/gnu/dts/arm/exynos5420-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5420-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos5420-smdk5420.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5420-smdk5420.dts stable/10/sys/gnu/dts/arm/exynos5420.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5420.dtsi stable/10/sys/gnu/dts/arm/exynos5422-odroidxu3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5422-odroidxu3.dts stable/10/sys/gnu/dts/arm/exynos5440-sd5v1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5440-sd5v1.dts stable/10/sys/gnu/dts/arm/exynos5440-ssdk5440.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5440-ssdk5440.dts stable/10/sys/gnu/dts/arm/exynos5440.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5440.dtsi stable/10/sys/gnu/dts/arm/exynos5800.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5800.dtsi stable/10/sys/gnu/dts/arm/hi3620-hi4511.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/hi3620-hi4511.dts stable/10/sys/gnu/dts/arm/hi3620.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/hi3620.dtsi stable/10/sys/gnu/dts/arm/highbank.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/highbank.dts stable/10/sys/gnu/dts/arm/hip01-ca9x2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/hip01-ca9x2.dts stable/10/sys/gnu/dts/arm/hip01.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/hip01.dtsi stable/10/sys/gnu/dts/arm/hip04-d01.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/hip04-d01.dts stable/10/sys/gnu/dts/arm/hip04.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/hip04.dtsi stable/10/sys/gnu/dts/arm/hisi-x5hd2-dkb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/hisi-x5hd2-dkb.dts stable/10/sys/gnu/dts/arm/hisi-x5hd2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/hisi-x5hd2.dtsi stable/10/sys/gnu/dts/arm/imx1-ads.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx1-ads.dts stable/10/sys/gnu/dts/arm/imx1-apf9328.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx1-apf9328.dts stable/10/sys/gnu/dts/arm/imx1-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx1-pinfunc.h stable/10/sys/gnu/dts/arm/imx1.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx1.dtsi stable/10/sys/gnu/dts/arm/imx23-evk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23-evk.dts stable/10/sys/gnu/dts/arm/imx23-olinuxino.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23-olinuxino.dts stable/10/sys/gnu/dts/arm/imx23-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23-pinfunc.h stable/10/sys/gnu/dts/arm/imx23-stmp378x_devb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23-stmp378x_devb.dts stable/10/sys/gnu/dts/arm/imx23.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23.dtsi stable/10/sys/gnu/dts/arm/imx25-eukrea-cpuimx25.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-cpuimx25.dtsi stable/10/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts stable/10/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts stable/10/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts stable/10/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts stable/10/sys/gnu/dts/arm/imx25-karo-tx25.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-karo-tx25.dts stable/10/sys/gnu/dts/arm/imx25-pdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-pdk.dts stable/10/sys/gnu/dts/arm/imx25-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-pinfunc.h stable/10/sys/gnu/dts/arm/imx25.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25.dtsi stable/10/sys/gnu/dts/arm/imx27-apf27.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-apf27.dts stable/10/sys/gnu/dts/arm/imx27-apf27dev.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-apf27dev.dts stable/10/sys/gnu/dts/arm/imx27-eukrea-cpuimx27.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-eukrea-cpuimx27.dtsi stable/10/sys/gnu/dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts stable/10/sys/gnu/dts/arm/imx27-pdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-pdk.dts stable/10/sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts stable/10/sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi stable/10/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts stable/10/sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi stable/10/sys/gnu/dts/arm/imx27-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-pinfunc.h stable/10/sys/gnu/dts/arm/imx27.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27.dtsi stable/10/sys/gnu/dts/arm/imx28-apf28.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-apf28.dts stable/10/sys/gnu/dts/arm/imx28-apf28dev.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-apf28dev.dts stable/10/sys/gnu/dts/arm/imx28-apx4devkit.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-apx4devkit.dts stable/10/sys/gnu/dts/arm/imx28-cfa10036.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10036.dts stable/10/sys/gnu/dts/arm/imx28-cfa10037.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10037.dts stable/10/sys/gnu/dts/arm/imx28-cfa10049.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10049.dts stable/10/sys/gnu/dts/arm/imx28-cfa10055.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10055.dts stable/10/sys/gnu/dts/arm/imx28-cfa10056.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10056.dts stable/10/sys/gnu/dts/arm/imx28-cfa10057.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10057.dts stable/10/sys/gnu/dts/arm/imx28-cfa10058.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10058.dts stable/10/sys/gnu/dts/arm/imx28-duckbill.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-duckbill.dts stable/10/sys/gnu/dts/arm/imx28-eukrea-mbmx283lc.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-eukrea-mbmx283lc.dts stable/10/sys/gnu/dts/arm/imx28-eukrea-mbmx287lc.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-eukrea-mbmx287lc.dts stable/10/sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi stable/10/sys/gnu/dts/arm/imx28-evk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-evk.dts stable/10/sys/gnu/dts/arm/imx28-m28.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-m28.dtsi stable/10/sys/gnu/dts/arm/imx28-m28cu3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-m28cu3.dts stable/10/sys/gnu/dts/arm/imx28-m28evk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-m28evk.dts stable/10/sys/gnu/dts/arm/imx28-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-pinfunc.h stable/10/sys/gnu/dts/arm/imx28-sps1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-sps1.dts stable/10/sys/gnu/dts/arm/imx28-tx28.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-tx28.dts stable/10/sys/gnu/dts/arm/imx28.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28.dtsi stable/10/sys/gnu/dts/arm/imx31-bug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx31-bug.dts stable/10/sys/gnu/dts/arm/imx31.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx31.dtsi stable/10/sys/gnu/dts/arm/imx35-eukrea-cpuimx35.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35-eukrea-cpuimx35.dtsi stable/10/sys/gnu/dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts stable/10/sys/gnu/dts/arm/imx35-pdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35-pdk.dts stable/10/sys/gnu/dts/arm/imx35-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35-pinfunc.h stable/10/sys/gnu/dts/arm/imx35.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35.dtsi stable/10/sys/gnu/dts/arm/imx50-evk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx50-evk.dts stable/10/sys/gnu/dts/arm/imx50-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx50-pinfunc.h stable/10/sys/gnu/dts/arm/imx50.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx50.dtsi stable/10/sys/gnu/dts/arm/imx6dl-gw552x.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6dl-gw552x.dts stable/10/sys/gnu/dts/arm/imx6dl-udoo.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6dl-udoo.dts stable/10/sys/gnu/dts/arm/imx6q-gw552x.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6q-gw552x.dts stable/10/sys/gnu/dts/arm/imx6q-hummingboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6q-hummingboard.dts stable/10/sys/gnu/dts/arm/imx6q-tbs2910.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6q-tbs2910.dts stable/10/sys/gnu/dts/arm/imx6qdl-gw552x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-gw552x.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-microsom-ar8035.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-microsom-ar8035.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-microsom.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-microsom.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-udoo.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-udoo.dtsi stable/10/sys/gnu/dts/arm/imx6sx-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6sx-pinfunc.h stable/10/sys/gnu/dts/arm/imx6sx-sabreauto.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6sx-sabreauto.dts stable/10/sys/gnu/dts/arm/integrator.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/integrator.dtsi stable/10/sys/gnu/dts/arm/integratorap.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/integratorap.dts stable/10/sys/gnu/dts/arm/integratorcp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/integratorcp.dts stable/10/sys/gnu/dts/arm/k2e-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2e-clocks.dtsi stable/10/sys/gnu/dts/arm/k2e-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/k2e-evm.dts stable/10/sys/gnu/dts/arm/k2e.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2e.dtsi stable/10/sys/gnu/dts/arm/k2hk-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2hk-clocks.dtsi stable/10/sys/gnu/dts/arm/k2hk-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/k2hk-evm.dts stable/10/sys/gnu/dts/arm/k2hk.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2hk.dtsi stable/10/sys/gnu/dts/arm/k2l-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2l-clocks.dtsi stable/10/sys/gnu/dts/arm/k2l-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/k2l-evm.dts stable/10/sys/gnu/dts/arm/k2l.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2l.dtsi stable/10/sys/gnu/dts/arm/keystone-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/keystone-clocks.dtsi stable/10/sys/gnu/dts/arm/keystone.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/keystone.dtsi stable/10/sys/gnu/dts/arm/kirkwood-6192.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-6192.dtsi stable/10/sys/gnu/dts/arm/kirkwood-6281.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-6281.dtsi stable/10/sys/gnu/dts/arm/kirkwood-6282.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-6282.dtsi stable/10/sys/gnu/dts/arm/kirkwood-98dx4122.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-98dx4122.dtsi stable/10/sys/gnu/dts/arm/kirkwood-b3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-b3.dts stable/10/sys/gnu/dts/arm/kirkwood-blackarmor-nas220.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-blackarmor-nas220.dts stable/10/sys/gnu/dts/arm/kirkwood-cloudbox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-cloudbox.dts stable/10/sys/gnu/dts/arm/kirkwood-d2net.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-d2net.dts stable/10/sys/gnu/dts/arm/kirkwood-db-88f6281.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-db-88f6281.dts stable/10/sys/gnu/dts/arm/kirkwood-db-88f6282.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-db-88f6282.dts stable/10/sys/gnu/dts/arm/kirkwood-db.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-db.dtsi stable/10/sys/gnu/dts/arm/kirkwood-dir665.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dir665.dts stable/10/sys/gnu/dts/arm/kirkwood-dns320.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dns320.dts stable/10/sys/gnu/dts/arm/kirkwood-dns325.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dns325.dts stable/10/sys/gnu/dts/arm/kirkwood-dnskw.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dnskw.dtsi stable/10/sys/gnu/dts/arm/kirkwood-dockstar.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dockstar.dts stable/10/sys/gnu/dts/arm/kirkwood-dreamplug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dreamplug.dts stable/10/sys/gnu/dts/arm/kirkwood-ds109.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds109.dts stable/10/sys/gnu/dts/arm/kirkwood-ds110jv10.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds110jv10.dts stable/10/sys/gnu/dts/arm/kirkwood-ds111.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds111.dts stable/10/sys/gnu/dts/arm/kirkwood-ds112.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds112.dts stable/10/sys/gnu/dts/arm/kirkwood-ds209.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds209.dts stable/10/sys/gnu/dts/arm/kirkwood-ds210.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds210.dts stable/10/sys/gnu/dts/arm/kirkwood-ds212.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds212.dts stable/10/sys/gnu/dts/arm/kirkwood-ds212j.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds212j.dts stable/10/sys/gnu/dts/arm/kirkwood-ds409.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds409.dts stable/10/sys/gnu/dts/arm/kirkwood-ds409slim.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds409slim.dts stable/10/sys/gnu/dts/arm/kirkwood-ds411.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds411.dts stable/10/sys/gnu/dts/arm/kirkwood-ds411j.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds411j.dts stable/10/sys/gnu/dts/arm/kirkwood-ds411slim.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds411slim.dts stable/10/sys/gnu/dts/arm/kirkwood-goflexnet.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-goflexnet.dts stable/10/sys/gnu/dts/arm/kirkwood-guruplug-server-plus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-guruplug-server-plus.dts stable/10/sys/gnu/dts/arm/kirkwood-ib62x0.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ib62x0.dts stable/10/sys/gnu/dts/arm/kirkwood-iconnect.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-iconnect.dts stable/10/sys/gnu/dts/arm/kirkwood-iomega_ix2_200.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-iomega_ix2_200.dts stable/10/sys/gnu/dts/arm/kirkwood-is2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-is2.dts stable/10/sys/gnu/dts/arm/kirkwood-km_common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-km_common.dtsi stable/10/sys/gnu/dts/arm/kirkwood-km_fixedeth.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-km_fixedeth.dts stable/10/sys/gnu/dts/arm/kirkwood-km_kirkwood.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-km_kirkwood.dts stable/10/sys/gnu/dts/arm/kirkwood-laplug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-laplug.dts stable/10/sys/gnu/dts/arm/kirkwood-lschlv2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-lschlv2.dts stable/10/sys/gnu/dts/arm/kirkwood-lsxhl.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-lsxhl.dts stable/10/sys/gnu/dts/arm/kirkwood-lsxl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-lsxl.dtsi stable/10/sys/gnu/dts/arm/kirkwood-mplcec4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-mplcec4.dts stable/10/sys/gnu/dts/arm/kirkwood-mv88f6281gtw-ge.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-mv88f6281gtw-ge.dts stable/10/sys/gnu/dts/arm/kirkwood-net2big.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-net2big.dts stable/10/sys/gnu/dts/arm/kirkwood-net5big.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-net5big.dts stable/10/sys/gnu/dts/arm/kirkwood-netgear_readynas_duo_v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-netgear_readynas_duo_v2.dts stable/10/sys/gnu/dts/arm/kirkwood-netgear_readynas_nv+_v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-netgear_readynas_nv+_v2.dts stable/10/sys/gnu/dts/arm/kirkwood-netxbig.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-netxbig.dtsi stable/10/sys/gnu/dts/arm/kirkwood-ns2-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2-common.dtsi stable/10/sys/gnu/dts/arm/kirkwood-ns2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2.dts stable/10/sys/gnu/dts/arm/kirkwood-ns2lite.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2lite.dts stable/10/sys/gnu/dts/arm/kirkwood-ns2max.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2max.dts stable/10/sys/gnu/dts/arm/kirkwood-ns2mini.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2mini.dts stable/10/sys/gnu/dts/arm/kirkwood-nsa310.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-nsa310.dts stable/10/sys/gnu/dts/arm/kirkwood-nsa310a.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-nsa310a.dts stable/10/sys/gnu/dts/arm/kirkwood-nsa320.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-nsa320.dts stable/10/sys/gnu/dts/arm/kirkwood-nsa3x0-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-nsa3x0-common.dtsi stable/10/sys/gnu/dts/arm/kirkwood-openblocks_a6.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openblocks_a6.dts stable/10/sys/gnu/dts/arm/kirkwood-openblocks_a7.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openblocks_a7.dts stable/10/sys/gnu/dts/arm/kirkwood-openrd-base.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openrd-base.dts stable/10/sys/gnu/dts/arm/kirkwood-openrd-client.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openrd-client.dts stable/10/sys/gnu/dts/arm/kirkwood-openrd-ultimate.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openrd-ultimate.dts stable/10/sys/gnu/dts/arm/kirkwood-openrd.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openrd.dtsi stable/10/sys/gnu/dts/arm/kirkwood-pogo_e02.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-pogo_e02.dts stable/10/sys/gnu/dts/arm/kirkwood-rd88f6192.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rd88f6192.dts stable/10/sys/gnu/dts/arm/kirkwood-rd88f6281-a.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rd88f6281-a.dts stable/10/sys/gnu/dts/arm/kirkwood-rd88f6281-z0.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rd88f6281-z0.dts stable/10/sys/gnu/dts/arm/kirkwood-rd88f6281.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rd88f6281.dtsi stable/10/sys/gnu/dts/arm/kirkwood-rs212.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rs212.dts stable/10/sys/gnu/dts/arm/kirkwood-rs409.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rs409.dts stable/10/sys/gnu/dts/arm/kirkwood-rs411.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rs411.dts stable/10/sys/gnu/dts/arm/kirkwood-sheevaplug-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-sheevaplug-common.dtsi stable/10/sys/gnu/dts/arm/kirkwood-sheevaplug-esata.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-sheevaplug-esata.dts stable/10/sys/gnu/dts/arm/kirkwood-sheevaplug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-sheevaplug.dts stable/10/sys/gnu/dts/arm/kirkwood-synology.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-synology.dtsi stable/10/sys/gnu/dts/arm/kirkwood-t5325.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-t5325.dts stable/10/sys/gnu/dts/arm/kirkwood-topkick.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-topkick.dts stable/10/sys/gnu/dts/arm/kirkwood-ts219-6281.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts219-6281.dts stable/10/sys/gnu/dts/arm/kirkwood-ts219-6282.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts219-6282.dts stable/10/sys/gnu/dts/arm/kirkwood-ts219.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts219.dtsi stable/10/sys/gnu/dts/arm/kirkwood-ts419-6281.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts419-6281.dts stable/10/sys/gnu/dts/arm/kirkwood-ts419-6282.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts419-6282.dts stable/10/sys/gnu/dts/arm/kirkwood-ts419.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts419.dtsi stable/10/sys/gnu/dts/arm/kirkwood.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood.dtsi stable/10/sys/gnu/dts/arm/lpc32xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/lpc32xx.dtsi stable/10/sys/gnu/dts/arm/ls1021a-qds.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ls1021a-qds.dts stable/10/sys/gnu/dts/arm/ls1021a-twr.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ls1021a-twr.dts stable/10/sys/gnu/dts/arm/ls1021a.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ls1021a.dtsi stable/10/sys/gnu/dts/arm/meson.dtsi - copied, changed from r279385, head/sys/gnu/dts/arm/meson.dtsi stable/10/sys/gnu/dts/arm/meson6-atv1200.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/meson6-atv1200.dts stable/10/sys/gnu/dts/arm/meson6.dtsi - copied, changed from r279385, head/sys/gnu/dts/arm/meson6.dtsi stable/10/sys/gnu/dts/arm/meson8.dtsi - copied, changed from r279385, head/sys/gnu/dts/arm/meson8.dtsi stable/10/sys/gnu/dts/arm/moxart-uc7112lx.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/moxart-uc7112lx.dts stable/10/sys/gnu/dts/arm/moxart.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/moxart.dtsi stable/10/sys/gnu/dts/arm/mt6589-aquaris5.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/mt6589-aquaris5.dts stable/10/sys/gnu/dts/arm/mt6589.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/mt6589.dtsi stable/10/sys/gnu/dts/arm/mt6592-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/mt6592-evb.dts stable/10/sys/gnu/dts/arm/mt6592.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/mt6592.dtsi stable/10/sys/gnu/dts/arm/mt8127-moose.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/mt8127-moose.dts stable/10/sys/gnu/dts/arm/mt8127.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/mt8127.dtsi stable/10/sys/gnu/dts/arm/mt8135-evbp1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/mt8135-evbp1.dts stable/10/sys/gnu/dts/arm/mt8135.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/mt8135.dtsi stable/10/sys/gnu/dts/arm/mxs-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/mxs-pinfunc.h stable/10/sys/gnu/dts/arm/nspire-classic.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire-classic.dtsi stable/10/sys/gnu/dts/arm/nspire-clp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire-clp.dts stable/10/sys/gnu/dts/arm/nspire-cx.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire-cx.dts stable/10/sys/gnu/dts/arm/nspire-tp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire-tp.dts stable/10/sys/gnu/dts/arm/nspire.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire.dtsi stable/10/sys/gnu/dts/arm/omap-gpmc-smsc911x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap-gpmc-smsc911x.dtsi stable/10/sys/gnu/dts/arm/omap-gpmc-smsc9221.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap-gpmc-smsc9221.dtsi stable/10/sys/gnu/dts/arm/omap-zoom-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap-zoom-common.dtsi stable/10/sys/gnu/dts/arm/omap2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2.dtsi stable/10/sys/gnu/dts/arm/omap2420-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-clocks.dtsi stable/10/sys/gnu/dts/arm/omap2420-h4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-h4.dts stable/10/sys/gnu/dts/arm/omap2420-n800.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-n800.dts stable/10/sys/gnu/dts/arm/omap2420-n810-wimax.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-n810-wimax.dts stable/10/sys/gnu/dts/arm/omap2420-n810.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-n810.dts stable/10/sys/gnu/dts/arm/omap2420-n8x0-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-n8x0-common.dtsi stable/10/sys/gnu/dts/arm/omap2420.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420.dtsi stable/10/sys/gnu/dts/arm/omap2430-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2430-clocks.dtsi stable/10/sys/gnu/dts/arm/omap2430-sdp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2430-sdp.dts stable/10/sys/gnu/dts/arm/omap2430.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2430.dtsi stable/10/sys/gnu/dts/arm/omap24xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap24xx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap3-beagle-xm-ab.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-beagle-xm-ab.dts stable/10/sys/gnu/dts/arm/omap3-beagle-xm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-beagle-xm.dts stable/10/sys/gnu/dts/arm/omap3-beagle.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-beagle.dts stable/10/sys/gnu/dts/arm/omap3-cm-t3517.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3517.dts stable/10/sys/gnu/dts/arm/omap3-cm-t3530.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3530.dts stable/10/sys/gnu/dts/arm/omap3-cm-t3730.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3730.dts stable/10/sys/gnu/dts/arm/omap3-cm-t3x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3x.dtsi stable/10/sys/gnu/dts/arm/omap3-cm-t3x30.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3x30.dtsi stable/10/sys/gnu/dts/arm/omap3-devkit8000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-devkit8000.dts stable/10/sys/gnu/dts/arm/omap3-evm-37xx.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-evm-37xx.dts stable/10/sys/gnu/dts/arm/omap3-evm-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-evm-common.dtsi stable/10/sys/gnu/dts/arm/omap3-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-evm.dts stable/10/sys/gnu/dts/arm/omap3-gta04.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-gta04.dtsi stable/10/sys/gnu/dts/arm/omap3-gta04a3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-gta04a3.dts stable/10/sys/gnu/dts/arm/omap3-gta04a4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-gta04a4.dts stable/10/sys/gnu/dts/arm/omap3-gta04a5.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-gta04a5.dts stable/10/sys/gnu/dts/arm/omap3-ha-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-ha-common.dtsi stable/10/sys/gnu/dts/arm/omap3-ha-lcd.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-ha-lcd.dts stable/10/sys/gnu/dts/arm/omap3-ha.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-ha.dts stable/10/sys/gnu/dts/arm/omap3-igep.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep.dtsi stable/10/sys/gnu/dts/arm/omap3-igep0020-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0020-common.dtsi stable/10/sys/gnu/dts/arm/omap3-igep0020-rev-f.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0020-rev-f.dts stable/10/sys/gnu/dts/arm/omap3-igep0020.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0020.dts stable/10/sys/gnu/dts/arm/omap3-igep0030-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0030-common.dtsi stable/10/sys/gnu/dts/arm/omap3-igep0030-rev-g.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0030-rev-g.dts stable/10/sys/gnu/dts/arm/omap3-igep0030.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0030.dts stable/10/sys/gnu/dts/arm/omap3-ldp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-ldp.dts stable/10/sys/gnu/dts/arm/omap3-lilly-a83x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-lilly-a83x.dtsi stable/10/sys/gnu/dts/arm/omap3-lilly-dbb056.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-lilly-dbb056.dts stable/10/sys/gnu/dts/arm/omap3-n9.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-n9.dts stable/10/sys/gnu/dts/arm/omap3-n900.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-n900.dts stable/10/sys/gnu/dts/arm/omap3-n950-n9.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-n950-n9.dtsi stable/10/sys/gnu/dts/arm/omap3-n950.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-n950.dts stable/10/sys/gnu/dts/arm/omap3-overo-alto35-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-alto35-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-alto35.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-alto35.dts stable/10/sys/gnu/dts/arm/omap3-overo-base.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-base.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-chestnut43-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-chestnut43-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-chestnut43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-chestnut43.dts stable/10/sys/gnu/dts/arm/omap3-overo-common-dvi.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-common-dvi.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-common-lcd35.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-common-lcd35.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-common-lcd43.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-common-lcd43.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-common-peripherals.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-common-peripherals.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-gallop43-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-gallop43-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-gallop43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-gallop43.dts stable/10/sys/gnu/dts/arm/omap3-overo-palo43-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-palo43-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-palo43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-palo43.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-alto35.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-alto35.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-chestnut43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-chestnut43.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-gallop43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-gallop43.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-palo43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-palo43.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-summit.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-summit.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-tobi.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-tobi.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-summit-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-summit-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-summit.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-summit.dts stable/10/sys/gnu/dts/arm/omap3-overo-tobi-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-tobi-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-tobi.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-tobi.dts stable/10/sys/gnu/dts/arm/omap3-overo.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo.dtsi stable/10/sys/gnu/dts/arm/omap3-panel-sharp-ls037v7dw01.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-panel-sharp-ls037v7dw01.dtsi stable/10/sys/gnu/dts/arm/omap3-sb-t35.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-sb-t35.dtsi stable/10/sys/gnu/dts/arm/omap3-sbc-t3517.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-sbc-t3517.dts stable/10/sys/gnu/dts/arm/omap3-sbc-t3530.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-sbc-t3530.dts stable/10/sys/gnu/dts/arm/omap3-sbc-t3730.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-sbc-t3730.dts stable/10/sys/gnu/dts/arm/omap3-tao3530.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-tao3530.dtsi stable/10/sys/gnu/dts/arm/omap3-thunder.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-thunder.dts stable/10/sys/gnu/dts/arm/omap3-zoom3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-zoom3.dts stable/10/sys/gnu/dts/arm/omap3.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3.dtsi stable/10/sys/gnu/dts/arm/omap3430-sdp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3430-sdp.dts stable/10/sys/gnu/dts/arm/omap3430es1-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3430es1-clocks.dtsi stable/10/sys/gnu/dts/arm/omap34xx-hs.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap34xx-hs.dtsi stable/10/sys/gnu/dts/arm/omap34xx-omap36xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap34xx-omap36xx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap34xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap34xx.dtsi stable/10/sys/gnu/dts/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi stable/10/sys/gnu/dts/arm/omap36xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap36xx-hs.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx-hs.dtsi stable/10/sys/gnu/dts/arm/omap36xx-omap3430es2plus-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx-omap3430es2plus-clocks.dtsi stable/10/sys/gnu/dts/arm/omap36xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx.dtsi stable/10/sys/gnu/dts/arm/omap3xxx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3xxx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap4-cpu-thermal.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-cpu-thermal.dtsi stable/10/sys/gnu/dts/arm/omap4-duovero-parlor.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-duovero-parlor.dts stable/10/sys/gnu/dts/arm/omap4-duovero.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-duovero.dtsi stable/10/sys/gnu/dts/arm/omap4-panda-a4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-panda-a4.dts stable/10/sys/gnu/dts/arm/omap4-panda-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-panda-common.dtsi stable/10/sys/gnu/dts/arm/omap4-panda-es.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-panda-es.dts stable/10/sys/gnu/dts/arm/omap4-panda.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-panda.dts stable/10/sys/gnu/dts/arm/omap4-sdp-es23plus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-sdp-es23plus.dts stable/10/sys/gnu/dts/arm/omap4-sdp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-sdp.dts stable/10/sys/gnu/dts/arm/omap4-var-dvk-om44.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-dvk-om44.dts stable/10/sys/gnu/dts/arm/omap4-var-om44customboard.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-om44customboard.dtsi stable/10/sys/gnu/dts/arm/omap4-var-som-om44-wlan.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-som-om44-wlan.dtsi stable/10/sys/gnu/dts/arm/omap4-var-som-om44.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-som-om44.dtsi stable/10/sys/gnu/dts/arm/omap4-var-stk-om44.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-stk-om44.dts stable/10/sys/gnu/dts/arm/omap4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4.dtsi stable/10/sys/gnu/dts/arm/omap443x-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap443x-clocks.dtsi stable/10/sys/gnu/dts/arm/omap443x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap443x.dtsi stable/10/sys/gnu/dts/arm/omap4460.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4460.dtsi stable/10/sys/gnu/dts/arm/omap446x-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap446x-clocks.dtsi stable/10/sys/gnu/dts/arm/omap44xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap44xx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap5-cm-t54.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-cm-t54.dts stable/10/sys/gnu/dts/arm/omap5-core-thermal.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-core-thermal.dtsi stable/10/sys/gnu/dts/arm/omap5-gpu-thermal.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-gpu-thermal.dtsi stable/10/sys/gnu/dts/arm/omap5-sbc-t54.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-sbc-t54.dts stable/10/sys/gnu/dts/arm/omap5-uevm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-uevm.dts stable/10/sys/gnu/dts/arm/omap5.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5.dtsi stable/10/sys/gnu/dts/arm/omap54xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap54xx-clocks.dtsi stable/10/sys/gnu/dts/arm/orion5x-lacie-d2-network.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-lacie-d2-network.dts stable/10/sys/gnu/dts/arm/orion5x-lacie-ethernet-disk-mini-v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-lacie-ethernet-disk-mini-v2.dts stable/10/sys/gnu/dts/arm/orion5x-maxtor-shared-storage-2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-maxtor-shared-storage-2.dts stable/10/sys/gnu/dts/arm/orion5x-mv88f5182.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-mv88f5182.dtsi stable/10/sys/gnu/dts/arm/orion5x-rd88f5182-nas.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-rd88f5182-nas.dts stable/10/sys/gnu/dts/arm/orion5x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x.dtsi stable/10/sys/gnu/dts/arm/phy3250.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/phy3250.dts stable/10/sys/gnu/dts/arm/picoxcell-pc3x2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/picoxcell-pc3x2.dtsi stable/10/sys/gnu/dts/arm/picoxcell-pc3x3.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/picoxcell-pc3x3.dtsi stable/10/sys/gnu/dts/arm/picoxcell-pc7302-pc3x2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/picoxcell-pc7302-pc3x2.dts stable/10/sys/gnu/dts/arm/picoxcell-pc7302-pc3x3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/picoxcell-pc7302-pc3x3.dts stable/10/sys/gnu/dts/arm/prima2-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/prima2-evb.dts stable/10/sys/gnu/dts/arm/prima2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/prima2.dtsi stable/10/sys/gnu/dts/arm/pxa27x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/pxa27x.dtsi stable/10/sys/gnu/dts/arm/pxa2xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/pxa2xx.dtsi stable/10/sys/gnu/dts/arm/pxa3xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/pxa3xx.dtsi stable/10/sys/gnu/dts/arm/r7s72100-genmai.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r7s72100-genmai.dts stable/10/sys/gnu/dts/arm/r7s72100.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r7s72100.dtsi stable/10/sys/gnu/dts/arm/r8a73a4-ape6evm-reference.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a73a4-ape6evm-reference.dts stable/10/sys/gnu/dts/arm/r8a73a4-ape6evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a73a4-ape6evm.dts stable/10/sys/gnu/dts/arm/r8a73a4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a73a4.dtsi stable/10/sys/gnu/dts/arm/r8a7740-armadillo800eva.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7740-armadillo800eva.dts stable/10/sys/gnu/dts/arm/r8a7740.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7740.dtsi stable/10/sys/gnu/dts/arm/r8a7778-bockw-reference.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7778-bockw-reference.dts stable/10/sys/gnu/dts/arm/r8a7778-bockw.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7778-bockw.dts stable/10/sys/gnu/dts/arm/r8a7778.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7778.dtsi stable/10/sys/gnu/dts/arm/r8a7779-marzen.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7779-marzen.dts stable/10/sys/gnu/dts/arm/r8a7779.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7779.dtsi stable/10/sys/gnu/dts/arm/r8a7790-lager.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7790-lager.dts stable/10/sys/gnu/dts/arm/r8a7790.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7790.dtsi stable/10/sys/gnu/dts/arm/r8a7791-henninger.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7791-henninger.dts stable/10/sys/gnu/dts/arm/r8a7791-koelsch.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7791-koelsch.dts stable/10/sys/gnu/dts/arm/r8a7791.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7791.dtsi stable/10/sys/gnu/dts/arm/r8a7794-alt.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7794-alt.dts stable/10/sys/gnu/dts/arm/r8a7794.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7794.dtsi stable/10/sys/gnu/dts/arm/r8a77xx-aa104xd12-panel.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a77xx-aa104xd12-panel.dtsi stable/10/sys/gnu/dts/arm/rk3066a-bqcurie2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3066a-bqcurie2.dts stable/10/sys/gnu/dts/arm/rk3066a-marsboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3066a-marsboard.dts stable/10/sys/gnu/dts/arm/rk3066a-rayeager.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3066a-rayeager.dts stable/10/sys/gnu/dts/arm/rk3066a.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3066a.dtsi stable/10/sys/gnu/dts/arm/rk3188-radxarock.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3188-radxarock.dts stable/10/sys/gnu/dts/arm/rk3188.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3188.dtsi stable/10/sys/gnu/dts/arm/rk3288-evb-act8846.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-evb-act8846.dts stable/10/sys/gnu/dts/arm/rk3288-evb-rk808.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-evb-rk808.dts stable/10/sys/gnu/dts/arm/rk3288-evb.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-evb.dtsi stable/10/sys/gnu/dts/arm/rk3288-firefly-beta.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-firefly-beta.dts stable/10/sys/gnu/dts/arm/rk3288-firefly.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-firefly.dts stable/10/sys/gnu/dts/arm/rk3288-firefly.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-firefly.dtsi stable/10/sys/gnu/dts/arm/rk3288-thermal.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-thermal.dtsi stable/10/sys/gnu/dts/arm/rk3288.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288.dtsi stable/10/sys/gnu/dts/arm/rk3xxx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3xxx.dtsi stable/10/sys/gnu/dts/arm/s3c2416-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s3c2416-pinctrl.dtsi stable/10/sys/gnu/dts/arm/s3c2416-smdk2416.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s3c2416-smdk2416.dts stable/10/sys/gnu/dts/arm/s3c2416.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s3c2416.dtsi stable/10/sys/gnu/dts/arm/s3c24xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s3c24xx.dtsi stable/10/sys/gnu/dts/arm/s5pv210-aquila.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-aquila.dts stable/10/sys/gnu/dts/arm/s5pv210-goni.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-goni.dts stable/10/sys/gnu/dts/arm/s5pv210-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-pinctrl.dtsi stable/10/sys/gnu/dts/arm/s5pv210-smdkc110.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-smdkc110.dts stable/10/sys/gnu/dts/arm/s5pv210-smdkv210.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-smdkv210.dts stable/10/sys/gnu/dts/arm/s5pv210-torbreck.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-torbreck.dts stable/10/sys/gnu/dts/arm/s5pv210.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210.dtsi stable/10/sys/gnu/dts/arm/sama5d4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sama5d4.dtsi stable/10/sys/gnu/dts/arm/samsung_k3pe0e000b.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/samsung_k3pe0e000b.dtsi stable/10/sys/gnu/dts/arm/sh7372-mackerel.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sh7372-mackerel.dts stable/10/sys/gnu/dts/arm/sh7372.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sh7372.dtsi stable/10/sys/gnu/dts/arm/sh73a0-kzm9g-reference.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sh73a0-kzm9g-reference.dts stable/10/sys/gnu/dts/arm/sh73a0-kzm9g.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sh73a0-kzm9g.dts stable/10/sys/gnu/dts/arm/sh73a0.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sh73a0.dtsi stable/10/sys/gnu/dts/arm/spear1310-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear1310-evb.dts stable/10/sys/gnu/dts/arm/spear1310.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear1310.dtsi stable/10/sys/gnu/dts/arm/spear1340-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear1340-evb.dts stable/10/sys/gnu/dts/arm/spear1340.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear1340.dtsi stable/10/sys/gnu/dts/arm/spear13xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear13xx.dtsi stable/10/sys/gnu/dts/arm/spear300-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear300-evb.dts stable/10/sys/gnu/dts/arm/spear300.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear300.dtsi stable/10/sys/gnu/dts/arm/spear310-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear310-evb.dts stable/10/sys/gnu/dts/arm/spear310.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear310.dtsi stable/10/sys/gnu/dts/arm/spear320-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear320-evb.dts stable/10/sys/gnu/dts/arm/spear320-hmi.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear320-hmi.dts stable/10/sys/gnu/dts/arm/spear320.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear320.dtsi stable/10/sys/gnu/dts/arm/spear3xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear3xx.dtsi stable/10/sys/gnu/dts/arm/spear600-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear600-evb.dts stable/10/sys/gnu/dts/arm/spear600.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear600.dtsi stable/10/sys/gnu/dts/arm/st-pincfg.h - copied unchanged from r279385, head/sys/gnu/dts/arm/st-pincfg.h stable/10/sys/gnu/dts/arm/ste-ccu8540-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-ccu8540-pinctrl.dtsi stable/10/sys/gnu/dts/arm/ste-ccu8540.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-ccu8540.dts stable/10/sys/gnu/dts/arm/ste-ccu9540.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-ccu9540.dts stable/10/sys/gnu/dts/arm/ste-dbx5x0.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-dbx5x0.dtsi stable/10/sys/gnu/dts/arm/ste-href-ab8500.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-ab8500.dtsi stable/10/sys/gnu/dts/arm/ste-href-ab8505.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-ab8505.dtsi stable/10/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi stable/10/sys/gnu/dts/arm/ste-href-stuib.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-stuib.dtsi stable/10/sys/gnu/dts/arm/ste-href-tvk1281618.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-tvk1281618.dtsi stable/10/sys/gnu/dts/arm/ste-href.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href.dtsi stable/10/sys/gnu/dts/arm/ste-hrefprev60-stuib.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefprev60-stuib.dts stable/10/sys/gnu/dts/arm/ste-hrefprev60-tvk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefprev60-tvk.dts stable/10/sys/gnu/dts/arm/ste-hrefprev60.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefprev60.dtsi stable/10/sys/gnu/dts/arm/ste-hrefv60plus-stuib.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefv60plus-stuib.dts stable/10/sys/gnu/dts/arm/ste-hrefv60plus-tvk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefv60plus-tvk.dts stable/10/sys/gnu/dts/arm/ste-hrefv60plus.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefv60plus.dtsi stable/10/sys/gnu/dts/arm/ste-nomadik-nhk15.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-nomadik-nhk15.dts stable/10/sys/gnu/dts/arm/ste-nomadik-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-nomadik-pinctrl.dtsi stable/10/sys/gnu/dts/arm/ste-nomadik-s8815.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-nomadik-s8815.dts stable/10/sys/gnu/dts/arm/ste-nomadik-stn8815.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-nomadik-stn8815.dtsi stable/10/sys/gnu/dts/arm/ste-snowball.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-snowball.dts stable/10/sys/gnu/dts/arm/ste-u300.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-u300.dts stable/10/sys/gnu/dts/arm/stih407-b2120.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407-b2120.dts stable/10/sys/gnu/dts/arm/stih407-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407-clock.dtsi stable/10/sys/gnu/dts/arm/stih407-family.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407-family.dtsi stable/10/sys/gnu/dts/arm/stih407-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407-pinctrl.dtsi stable/10/sys/gnu/dts/arm/stih407.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407.dtsi stable/10/sys/gnu/dts/arm/stih410-b2120.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih410-b2120.dts stable/10/sys/gnu/dts/arm/stih410-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih410-clock.dtsi stable/10/sys/gnu/dts/arm/stih410-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih410-pinctrl.dtsi stable/10/sys/gnu/dts/arm/stih410.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih410.dtsi stable/10/sys/gnu/dts/arm/stih415-b2000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415-b2000.dts stable/10/sys/gnu/dts/arm/stih415-b2020.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415-b2020.dts stable/10/sys/gnu/dts/arm/stih415-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415-clock.dtsi stable/10/sys/gnu/dts/arm/stih415-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415-pinctrl.dtsi stable/10/sys/gnu/dts/arm/stih415.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415.dtsi stable/10/sys/gnu/dts/arm/stih416-b2000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-b2000.dts stable/10/sys/gnu/dts/arm/stih416-b2020.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-b2020.dts stable/10/sys/gnu/dts/arm/stih416-b2020e.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-b2020e.dts stable/10/sys/gnu/dts/arm/stih416-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-clock.dtsi stable/10/sys/gnu/dts/arm/stih416-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-pinctrl.dtsi stable/10/sys/gnu/dts/arm/stih416.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416.dtsi stable/10/sys/gnu/dts/arm/stih418-b2199.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih418-b2199.dts stable/10/sys/gnu/dts/arm/stih418-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih418-clock.dtsi stable/10/sys/gnu/dts/arm/stih418.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih418.dtsi stable/10/sys/gnu/dts/arm/stih41x-b2000.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih41x-b2000.dtsi stable/10/sys/gnu/dts/arm/stih41x-b2020.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih41x-b2020.dtsi stable/10/sys/gnu/dts/arm/stih41x-b2020x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih41x-b2020x.dtsi stable/10/sys/gnu/dts/arm/stih41x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih41x.dtsi stable/10/sys/gnu/dts/arm/stihxxx-b2120.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stihxxx-b2120.dtsi stable/10/sys/gnu/dts/arm/sun4i-a10-a1000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-a1000.dts stable/10/sys/gnu/dts/arm/sun4i-a10-ba10-tvbox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-ba10-tvbox.dts stable/10/sys/gnu/dts/arm/sun4i-a10-chuwi-v7-cw0825.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-chuwi-v7-cw0825.dts stable/10/sys/gnu/dts/arm/sun4i-a10-cubieboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-cubieboard.dts stable/10/sys/gnu/dts/arm/sun4i-a10-hackberry.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-hackberry.dts stable/10/sys/gnu/dts/arm/sun4i-a10-hyundai-a7hd.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-hyundai-a7hd.dts stable/10/sys/gnu/dts/arm/sun4i-a10-inet97fv2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-inet97fv2.dts stable/10/sys/gnu/dts/arm/sun4i-a10-marsboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-marsboard.dts stable/10/sys/gnu/dts/arm/sun4i-a10-mini-xplus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-mini-xplus.dts stable/10/sys/gnu/dts/arm/sun4i-a10-mk802.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-mk802.dts stable/10/sys/gnu/dts/arm/sun4i-a10-mk802ii.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-mk802ii.dts stable/10/sys/gnu/dts/arm/sun4i-a10-olinuxino-lime.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-olinuxino-lime.dts stable/10/sys/gnu/dts/arm/sun4i-a10-pcduino.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-pcduino.dts stable/10/sys/gnu/dts/arm/sun4i-a10.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10.dtsi stable/10/sys/gnu/dts/arm/sun5i-a10s-mk802.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a10s-mk802.dts stable/10/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts stable/10/sys/gnu/dts/arm/sun5i-a10s-r7-tv-dongle.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a10s-r7-tv-dongle.dts stable/10/sys/gnu/dts/arm/sun5i-a10s.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a10s.dtsi stable/10/sys/gnu/dts/arm/sun5i-a13-hsg-h702.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a13-hsg-h702.dts stable/10/sys/gnu/dts/arm/sun5i-a13-olinuxino-micro.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a13-olinuxino-micro.dts stable/10/sys/gnu/dts/arm/sun5i-a13-olinuxino.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a13-olinuxino.dts stable/10/sys/gnu/dts/arm/sun5i-a13.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a13.dtsi stable/10/sys/gnu/dts/arm/sun6i-a31-app4-evb1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31-app4-evb1.dts stable/10/sys/gnu/dts/arm/sun6i-a31-colombus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31-colombus.dts stable/10/sys/gnu/dts/arm/sun6i-a31-hummingbird.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31-hummingbird.dts stable/10/sys/gnu/dts/arm/sun6i-a31-m9.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31-m9.dts stable/10/sys/gnu/dts/arm/sun6i-a31.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31.dtsi stable/10/sys/gnu/dts/arm/sun6i-a31s-cs908.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31s-cs908.dts stable/10/sys/gnu/dts/arm/sun6i-a31s.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31s.dtsi stable/10/sys/gnu/dts/arm/sun7i-a20-bananapi.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-bananapi.dts stable/10/sys/gnu/dts/arm/sun7i-a20-bananapro.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-bananapro.dts stable/10/sys/gnu/dts/arm/sun7i-a20-cubieboard2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-cubieboard2.dts stable/10/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts stable/10/sys/gnu/dts/arm/sun7i-a20-hummingbird.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-hummingbird.dts stable/10/sys/gnu/dts/arm/sun7i-a20-i12-tvbox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-i12-tvbox.dts stable/10/sys/gnu/dts/arm/sun7i-a20-m3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-m3.dts stable/10/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime.dts stable/10/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts stable/10/sys/gnu/dts/arm/sun7i-a20-olinuxino-micro.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-olinuxino-micro.dts stable/10/sys/gnu/dts/arm/sun7i-a20-pcduino3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-pcduino3.dts stable/10/sys/gnu/dts/arm/sun7i-a20.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20.dtsi stable/10/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v1.2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v1.2.dts stable/10/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v5.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v5.dts stable/10/sys/gnu/dts/arm/sun8i-a23.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun8i-a23.dtsi stable/10/sys/gnu/dts/arm/sun9i-a80-optimus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun9i-a80-optimus.dts stable/10/sys/gnu/dts/arm/sun9i-a80.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun9i-a80.dtsi stable/10/sys/gnu/dts/arm/sunxi-common-regulators.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sunxi-common-regulators.dtsi stable/10/sys/gnu/dts/arm/tegra114-dalmore.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra114-dalmore.dts stable/10/sys/gnu/dts/arm/tegra114-roth.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra114-roth.dts stable/10/sys/gnu/dts/arm/tegra114-tn7.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra114-tn7.dts stable/10/sys/gnu/dts/arm/tegra114.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra114.dtsi stable/10/sys/gnu/dts/arm/tegra124-jetson-tk1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts stable/10/sys/gnu/dts/arm/tegra124-nyan-big.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra124-nyan-big.dts stable/10/sys/gnu/dts/arm/tegra124-venice2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra124-venice2.dts stable/10/sys/gnu/dts/arm/tegra124.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra124.dtsi stable/10/sys/gnu/dts/arm/tegra20-colibri-512.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-colibri-512.dtsi stable/10/sys/gnu/dts/arm/tegra20-harmony.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-harmony.dts stable/10/sys/gnu/dts/arm/tegra20-iris-512.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-iris-512.dts stable/10/sys/gnu/dts/arm/tegra20-medcom-wide.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-medcom-wide.dts stable/10/sys/gnu/dts/arm/tegra20-paz00.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-paz00.dts stable/10/sys/gnu/dts/arm/tegra20-plutux.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-plutux.dts stable/10/sys/gnu/dts/arm/tegra20-seaboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-seaboard.dts stable/10/sys/gnu/dts/arm/tegra20-tamonten.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-tamonten.dtsi stable/10/sys/gnu/dts/arm/tegra20-tec.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-tec.dts stable/10/sys/gnu/dts/arm/tegra20-trimslice.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-trimslice.dts stable/10/sys/gnu/dts/arm/tegra20-ventana.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-ventana.dts stable/10/sys/gnu/dts/arm/tegra20-whistler.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-whistler.dts stable/10/sys/gnu/dts/arm/tegra20.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20.dtsi stable/10/sys/gnu/dts/arm/tegra30-apalis-eval.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-apalis-eval.dts stable/10/sys/gnu/dts/arm/tegra30-apalis.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-apalis.dtsi stable/10/sys/gnu/dts/arm/tegra30-beaver.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-beaver.dts stable/10/sys/gnu/dts/arm/tegra30-cardhu-a02.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-cardhu-a02.dts stable/10/sys/gnu/dts/arm/tegra30-cardhu-a04.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-cardhu-a04.dts stable/10/sys/gnu/dts/arm/tegra30-cardhu.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-cardhu.dtsi stable/10/sys/gnu/dts/arm/tegra30-colibri-eval-v3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-colibri-eval-v3.dts stable/10/sys/gnu/dts/arm/tegra30-colibri.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-colibri.dtsi stable/10/sys/gnu/dts/arm/tegra30.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30.dtsi stable/10/sys/gnu/dts/arm/tps6507x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tps6507x.dtsi stable/10/sys/gnu/dts/arm/tps65217.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tps65217.dtsi stable/10/sys/gnu/dts/arm/tps65910.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tps65910.dtsi stable/10/sys/gnu/dts/arm/twl4030.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/twl4030.dtsi stable/10/sys/gnu/dts/arm/twl4030_omap3.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/twl4030_omap3.dtsi stable/10/sys/gnu/dts/arm/twl6030.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/twl6030.dtsi stable/10/sys/gnu/dts/arm/twl6030_omap4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/twl6030_omap4.dtsi stable/10/sys/gnu/dts/arm/usb_a9g20-dab-mmx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/usb_a9g20-dab-mmx.dtsi stable/10/sys/gnu/dts/arm/versatile-ab.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/versatile-ab.dts stable/10/sys/gnu/dts/arm/versatile-pb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/versatile-pb.dts stable/10/sys/gnu/dts/arm/vexpress-v2m-rs1.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2m-rs1.dtsi stable/10/sys/gnu/dts/arm/vexpress-v2m.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2m.dtsi stable/10/sys/gnu/dts/arm/vexpress-v2p-ca15-tc1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2p-ca15-tc1.dts stable/10/sys/gnu/dts/arm/vexpress-v2p-ca15_a7.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2p-ca15_a7.dts stable/10/sys/gnu/dts/arm/vexpress-v2p-ca5s.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2p-ca5s.dts stable/10/sys/gnu/dts/arm/vexpress-v2p-ca9.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2p-ca9.dts stable/10/sys/gnu/dts/arm/vf-colibri-eval-v3.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf-colibri-eval-v3.dtsi stable/10/sys/gnu/dts/arm/vf-colibri.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf-colibri.dtsi stable/10/sys/gnu/dts/arm/vf500-colibri-eval-v3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vf500-colibri-eval-v3.dts stable/10/sys/gnu/dts/arm/vf500-colibri.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf500-colibri.dtsi stable/10/sys/gnu/dts/arm/vf500.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf500.dtsi stable/10/sys/gnu/dts/arm/vf610-colibri-eval-v3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-colibri-eval-v3.dts stable/10/sys/gnu/dts/arm/vf610-colibri.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-colibri.dtsi stable/10/sys/gnu/dts/arm/vf610-cosmic.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-cosmic.dts stable/10/sys/gnu/dts/arm/vf610-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-pinfunc.h stable/10/sys/gnu/dts/arm/vf610-twr.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-twr.dts stable/10/sys/gnu/dts/arm/vfxxx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vfxxx.dtsi stable/10/sys/gnu/dts/arm/vt8500-bv07.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vt8500-bv07.dts stable/10/sys/gnu/dts/arm/vt8500.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vt8500.dtsi stable/10/sys/gnu/dts/arm/wm8505-ref.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8505-ref.dts stable/10/sys/gnu/dts/arm/wm8505.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8505.dtsi stable/10/sys/gnu/dts/arm/wm8650-mid.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8650-mid.dts stable/10/sys/gnu/dts/arm/wm8650.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8650.dtsi stable/10/sys/gnu/dts/arm/wm8750-apc8750.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8750-apc8750.dts stable/10/sys/gnu/dts/arm/wm8750.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8750.dtsi stable/10/sys/gnu/dts/arm/wm8850-w70v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8850-w70v2.dts stable/10/sys/gnu/dts/arm/wm8850.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8850.dtsi stable/10/sys/gnu/dts/arm/xenvm-4.2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/xenvm-4.2.dts stable/10/sys/gnu/dts/arm/zynq-7000.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-7000.dtsi stable/10/sys/gnu/dts/arm/zynq-parallella.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-parallella.dts stable/10/sys/gnu/dts/arm/zynq-zc702.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-zc702.dts stable/10/sys/gnu/dts/arm/zynq-zc706.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-zc706.dts stable/10/sys/gnu/dts/arm/zynq-zed.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-zed.dts stable/10/sys/gnu/dts/arm/zynq-zybo.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-zybo.dts stable/10/sys/gnu/dts/include/dt-bindings/arm/ - copied from r279385, head/sys/gnu/dts/include/dt-bindings/arm/ stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos4415.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/exynos4415.h stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos7-clk.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/exynos7-clk.h stable/10/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7740-clock.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/r8a7740-clock.h stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7794-clock.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/r8a7794-clock.h stable/10/sys/gnu/dts/include/dt-bindings/clock/sh73a0-clock.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/sh73a0-clock.h stable/10/sys/gnu/dts/include/dt-bindings/clock/stih407-clks.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/stih407-clks.h stable/10/sys/gnu/dts/include/dt-bindings/clock/stih410-clks.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/stih410-clks.h stable/10/sys/gnu/dts/include/dt-bindings/clock/stih418-clks.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/stih418-clks.h stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra124-car-common.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/tegra124-car-common.h stable/10/sys/gnu/dts/include/dt-bindings/dma/sun4i-a10.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/dma/sun4i-a10.h stable/10/sys/gnu/dts/include/dt-bindings/gpio/meson8-gpio.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/gpio/meson8-gpio.h stable/10/sys/gnu/dts/include/dt-bindings/input/ti-drv260x.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/input/ti-drv260x.h stable/10/sys/gnu/dts/include/dt-bindings/interrupt-controller/mips-gic.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/interrupt-controller/mips-gic.h stable/10/sys/gnu/dts/include/dt-bindings/memory/ - copied from r279385, head/sys/gnu/dts/include/dt-bindings/memory/ stable/10/sys/gnu/dts/include/dt-bindings/mfd/qcom-rpm.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/mfd/qcom-rpm.h stable/10/sys/gnu/dts/include/dt-bindings/phy/phy.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/phy/phy.h stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/sun4i-a10.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/pinctrl/sun4i-a10.h stable/10/sys/gnu/dts/include/dt-bindings/reset-controller/stih407-resets.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/reset-controller/stih407-resets.h stable/10/sys/gnu/dts/include/dt-bindings/sound/cs35l32.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/sound/cs35l32.h stable/10/sys/gnu/dts/include/dt-bindings/sound/samsung-i2s.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/sound/samsung-i2s.h stable/10/sys/gnu/dts/include/dt-bindings/thermal/tegra124-soctherm.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/thermal/tegra124-soctherm.h stable/10/sys/gnu/dts/include/dt-bindings/thermal/thermal_exynos.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/thermal/thermal_exynos.h Deleted: stable/10/sys/gnu/dts/include/dt-bindings/clock/lsi,axm5516-clks.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-apq8084.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq806x.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8660.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8960.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8974.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-apq8084.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8960.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8974.h stable/10/sys/gnu/dts/include/dt-bindings/clock/samsung,s3c64xx-clock.h stable/10/sys/gnu/dts/include/dt-bindings/reset/ stable/10/sys/gnu/dts/include/dt-bindings/soc/ Modified: stable/10/sys/gnu/dts/arm/at91rm9200.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91rm9200ek.dts (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9260.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9261.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9263.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9g20.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9g20ek_common.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9g45.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9m10g45ek.dts (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9n12.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9n12ek.dts (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9rl.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x25.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x35.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x5.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_can.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_usart3.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x5ek.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/ethernut5.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx51-apf51dev.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx51-babbage.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx51.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx53-qsrb.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx53-smd.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx53.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6dl-hummingboard.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6dl.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6q-gw5400-a.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6q-udoo.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6q.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-cubox-i.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-phytec-pfla02.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-rex.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-sabrelite.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-sabresd.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6sl-evk.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6sl.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6sx-sdb.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6sx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d3.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d31.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d33.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d34.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d35.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d36.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d3_can.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d3xcm.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d3xmb.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/vf610.dtsi (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos3250.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos4.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5420.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/hix5hd2-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx5-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx6qdl-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx6sx-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7790-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7791-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru-common.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/rk3288-cru.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra114-car.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra124-car.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra20-car.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/vf610-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/dma/at91.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/interrupt-controller/arm-gic.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/at91.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/dra.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/omap.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/rockchip.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/thermal/thermal.h (contents, props changed) Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) stable/10/sys/gnu/dts/FreeBSD-list (props changed) stable/10/sys/gnu/dts/FreeBSD-upgrade (props changed) stable/10/sys/gnu/dts/arm/animeo_ip.dts (props changed) stable/10/sys/gnu/dts/arm/at91-ariag25.dts (props changed) stable/10/sys/gnu/dts/arm/at91-cosino.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91-cosino_mega2560.dts (props changed) stable/10/sys/gnu/dts/arm/at91-foxg20.dts (props changed) stable/10/sys/gnu/dts/arm/at91-qil_a9260.dts (props changed) stable/10/sys/gnu/dts/arm/at91-sama5d3_xplained.dts (props changed) stable/10/sys/gnu/dts/arm/at91rm9200_pqfp.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9261ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9263ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g15.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9g15ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g20ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g20ek_2mmc.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g25.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9g25ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g35.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9g35ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9rlek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9x25ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9x35ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_isi.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_lcd.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_macb0.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_macb1.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5cm.dtsi (props changed) stable/10/sys/gnu/dts/arm/evk-pro3.dts (props changed) stable/10/sys/gnu/dts/arm/ge863-pro3.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx51-apf51.dts (props changed) stable/10/sys/gnu/dts/arm/imx51-digi-connectcore-jsk.dts (props changed) stable/10/sys/gnu/dts/arm/imx51-digi-connectcore-som.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx51-eukrea-cpuimx51.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts (props changed) stable/10/sys/gnu/dts/arm/imx51-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/imx53-ard.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-evk.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-m53.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx53-m53evk.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-mba53.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/imx53-qsb-common.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx53-qsb.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-tqma53.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx53-tx53-x03x.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-tx53-x13x.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-tx53.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx53-voipac-bsb.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-voipac-dmm-668.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6dl-aristainetos_4.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-aristainetos_7.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-cubox-i.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-dfi-fs700-m60.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-gw51xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-gw52xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-gw53xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-gw54xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-nitrogen6x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-phytec-pbab01.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-phytec-pfla02.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6dl-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/imx6dl-rex-basic.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-riotboard.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-sabreauto.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-sabrelite.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-sabresd.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-tx6dl-comtft.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-tx6u-801x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-tx6u-811x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-wandboard-revb1.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-wandboard.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-arm2.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-cm-fx6.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-cubox-i.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-dfi-fs700-m60.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-dmo-edmqmx6.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gk802.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gw51xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gw52xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gw53xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gw54xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-nitrogen6x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-phytec-pbab01.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-phytec-pfla02.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6q-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/imx6q-rex-pro.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-sabreauto.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-sabrelite.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-sabresd.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-sbc6x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1010-comtft.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1010.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1020-comtft.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1020.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1110.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-wandboard-revb1.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-wandboard.dts (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-aristainetos.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-dfi-fs700-m60.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-tx6.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-wandboard-revb1.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-wandboard-revc1.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-wandboard.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6sl-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/kizbox.dts (props changed) stable/10/sys/gnu/dts/arm/mpa1600.dts (props changed) stable/10/sys/gnu/dts/arm/pm9g45.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d31ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d33ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d34ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d35ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d36ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d3_emac.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_gmac.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_lcd.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_mci2.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_tcb1.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_uart.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3xdm.dtsi (props changed) stable/10/sys/gnu/dts/arm/skeleton.dtsi (props changed) stable/10/sys/gnu/dts/arm/skeleton64.dtsi (props changed) stable/10/sys/gnu/dts/arm/tny_a9260.dts (props changed) stable/10/sys/gnu/dts/arm/tny_a9260_common.dtsi (props changed) stable/10/sys/gnu/dts/arm/tny_a9263.dts (props changed) stable/10/sys/gnu/dts/arm/tny_a9g20.dts (props changed) stable/10/sys/gnu/dts/arm/usb_a9260.dts (props changed) stable/10/sys/gnu/dts/arm/usb_a9260_common.dtsi (props changed) stable/10/sys/gnu/dts/arm/usb_a9263.dts (props changed) stable/10/sys/gnu/dts/arm/usb_a9g20.dts (props changed) stable/10/sys/gnu/dts/arm/usb_a9g20_common.dtsi (props changed) stable/10/sys/gnu/dts/arm/usb_a9g20_lpw.dts (props changed) stable/10/sys/gnu/dts/include/dt-bindings/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clk/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clk/at91.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clk/exynos-audss-clk.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clk/ti-dra7-atl.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/at91.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/bcm21664.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/bcm281xx.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/berlin2.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/berlin2q.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/clps711x-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/efm32-cmu.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos-audss-clk.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5250.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5260-clk.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5410.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5440.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/hi3620-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/hip04-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx1-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx21-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx27-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/mpc512x-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/r7s72100-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7779-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/rk3066a-cru.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s3c2410.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s3c2412.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s3c2443.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s5pv210-audss.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s5pv210.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/stih415-clks.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/stih416-clks.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra30-car.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/dma/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/dma/nbpfaxi.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/gpio/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/gpio/gpio.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/gpio/tegra-gpio.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/input/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/input/input.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/interrupt-controller/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/interrupt-controller/irq.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/mfd/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/mfd/as3722.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/mfd/dbx500-prcmu.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/mfd/palmas.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/phy/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/phy/phy-miphy365x.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/am33xx.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/am43xx.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/nomadik.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pwm/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pwm/pwm.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/reset-controller/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/reset-controller/stih415-resets.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/reset-controller/stih416-resets.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/sound/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/sound/fsl-imx-audmux.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/sound/tlv320aic31xx-micbias.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/spmi/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/spmi/spmi.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/thermal/ (props changed) Copied: stable/10/sys/gnu/dts/arm/aks-cdu.dts (from r279385, head/sys/gnu/dts/arm/aks-cdu.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/aks-cdu.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/aks-cdu.dts) @@ -0,0 +1,119 @@ +/* + * aks-cdu.dts - Device Tree file for AK signal CDU + * + * Copyright (C) 2012 AK signal Brno a.s. + * 2012 Jiri Prchal + * + * Licensed under GPLv2 or later. + */ + +/dts-v1/; + +#include "ge863-pro3.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs"; + }; + + clocks { + slow_xtal { + clock-frequency = <32768>; + }; + }; + + ahb { + apb { + usart0: serial@fffb0000 { + status = "okay"; + }; + + usart1: serial@fffb4000 { + status = "okay"; + linux,rs485-enabled-at-boot-time; + rs485-rts-delay = <0 0>; + }; + + usart2: serial@fffb8000 { + status = "okay"; + linux,rs485-enabled-at-boot-time; + rs485-rts-delay = <0 0>; + }; + + usart3: serial@fffd0000 { + status = "okay"; + linux,rs485-enabled-at-boot-time; + rs485-rts-delay = <0 0>; + }; + + macb0: ethernet@fffc4000 { + phy-mode = "rmii"; + status = "okay"; + }; + + usb1: gadget@fffa4000 { + atmel,vbus-gpio = <&pioC 15 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + }; + + usb0: ohci@00500000 { + num-ports = <2>; + status = "okay"; + }; + + nand0: nand@40000000 { + nand-bus-width = <8>; + nand-ecc-mode = "soft"; + nand-on-flash-bbt; + status = "okay"; + + bootstrap@0 { + label = "bootstrap"; + reg = <0x0 0x40000>; + }; + + uboot@40000 { + label = "uboot"; + reg = <0x40000 0x80000>; + }; + ubootenv@c0000 { + label = "ubootenv"; + reg = <0xc0000 0x40000>; + }; + kernel@100000 { + label = "kernel"; + reg = <0x100000 0x400000>; + }; + rootfs@500000 { + label = "rootfs"; + reg = <0x500000 0x7b00000>; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + + red { + gpios = <&pioC 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "none"; + }; + + green { + gpios = <&pioA 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "none"; + default-state = "on"; + }; + + yellow { + gpios = <&pioB 20 GPIO_ACTIVE_LOW>; + linux,default-trigger = "none"; + }; + + blue { + gpios = <&pioB 21 GPIO_ACTIVE_LOW>; + linux,default-trigger = "none"; + }; + }; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-base0033.dts (from r279385, head/sys/gnu/dts/arm/am335x-base0033.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-base0033.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-base0033.dts) @@ -0,0 +1,95 @@ +/* + * am335x-base0033.dts - Device Tree file for IGEP AQUILA EXPANSION + * + * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "am335x-igep0033.dtsi" + +/ { + model = "IGEP COM AM335x on AQUILA Expansion"; + compatible = "isee,am335x-base0033", "isee,am335x-igep0033", "ti,am33xx"; + + hdmi { + compatible = "ti,tilcdc,slave"; + i2c = <&i2c0>; + pinctrl-names = "default", "off"; + pinctrl-0 = <&nxp_hdmi_pins>; + pinctrl-1 = <&nxp_hdmi_off_pins>; + status = "okay"; + }; + + leds_base { + pinctrl-names = "default"; + pinctrl-0 = <&leds_base_pins>; + + compatible = "gpio-leds"; + + led@0 { + label = "base:red:user"; + gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; /* gpio1_21 */ + default-state = "off"; + }; + + led@1 { + label = "base:green:user"; + gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; /* gpio2_0 */ + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + nxp_hdmi_pins: pinmux_nxp_hdmi_pins { + pinctrl-single,pins = < + 0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ + 0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0 */ + 0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1 */ + 0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2 */ + 0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3 */ + 0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4 */ + 0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5 */ + 0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6 */ + 0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7 */ + 0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8 */ + 0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9 */ + 0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10 */ + 0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11 */ + 0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12 */ + 0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13 */ + 0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14 */ + 0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15 */ + 0xe0 (PIN_OUTPUT | MUX_MODE0) /* lcd_vsync */ + 0xe4 (PIN_OUTPUT | MUX_MODE0) /* lcd_hsync */ + 0xe8 (PIN_OUTPUT | MUX_MODE0) /* lcd_pclk */ + 0xec (PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en */ + >; + }; + nxp_hdmi_off_pins: pinmux_nxp_hdmi_off_pins { + pinctrl-single,pins = < + 0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ + >; + }; + + leds_base_pins: pinmux_leds_base_pins { + pinctrl-single,pins = < + 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ + 0x88 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn3.gpio2_0 */ + >; + }; +}; + +&lcdc { + status = "okay"; +}; + +&i2c0 { + eeprom: eeprom@50 { + compatible = "at,24c256"; + reg = <0x50>; + }; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-bone-common.dtsi (from r279385, head/sys/gnu/dts/arm/am335x-bone-common.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-bone-common.dtsi Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-bone-common.dtsi) @@ -0,0 +1,302 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/ { + cpus { + cpu@0 { + cpu0-supply = <&dcdc2_reg>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + + leds { + pinctrl-names = "default"; + pinctrl-0 = <&user_leds_s0>; + + compatible = "gpio-leds"; + + led@2 { + label = "beaglebone:green:heartbeat"; + gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + + led@3 { + label = "beaglebone:green:mmc0"; + gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc0"; + default-state = "off"; + }; + + led@4 { + label = "beaglebone:green:usr2"; + gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "cpu0"; + default-state = "off"; + }; + + led@5 { + label = "beaglebone:green:usr3"; + gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc1"; + default-state = "off"; + }; + }; + + vmmcsd_fixed: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&clkout2_pin>; + + user_leds_s0: user_leds_s0 { + pinctrl-single,pins = < + 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ + 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ + 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ + 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ + >; + }; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + clkout2_pin: pinmux_clkout2_pin { + pinctrl-single,pins = < + 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ + >; + }; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ + 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ + 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ + 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ + 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ + 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ + 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ + 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */ + 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ + 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ + 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ + 0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ + 0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */ + >; + }; + + cpsw_sleep: cpsw_sleep { + pinctrl-single,pins = < + /* Slave 1 reset value */ + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + davinci_mdio_sleep: davinci_mdio_sleep { + pinctrl-single,pins = < + /* MDIO reset value */ + 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + 0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */ + >; + }; + + emmc_pins: pinmux_emmc_pins { + pinctrl-single,pins = < + 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ + 0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ + 0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ + 0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ + 0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ + 0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ + 0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ + 0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ + 0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ + 0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ + >; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + + status = "okay"; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb1_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&usb1 { + status = "okay"; + dr_mode = "host"; +}; + +&cppi41dma { + status = "okay"; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + + status = "okay"; + clock-frequency = <400000>; + + tps: tps@24 { + reg = <0x24>; + }; + +}; + +/include/ "tps65217.dtsi" + +&tps { + regulators { + dcdc1_reg: regulator@0 { + regulator-name = "vdds_dpr"; + regulator-always-on; + }; + + dcdc2_reg: regulator@1 { + /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ + regulator-name = "vdd_mpu"; + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <1325000>; + regulator-boot-on; + regulator-always-on; + }; + + dcdc3_reg: regulator@2 { + /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ + regulator-name = "vdd_core"; + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1_reg: regulator@3 { + regulator-name = "vio,vrtc,vdds"; + regulator-always-on; + }; + + ldo2_reg: regulator@4 { + regulator-name = "vdd_3v3aux"; + regulator-always-on; + }; + + ldo3_reg: regulator@5 { + regulator-name = "vdd_1v8"; + regulator-always-on; + }; + + ldo4_reg: regulator@6 { + regulator-name = "vdd_3v3a"; + regulator-always-on; + }; + }; +}; + +&cpsw_emac0 { + phy_id = <&davinci_mdio>, <0>; + phy-mode = "mii"; +}; + +&cpsw_emac1 { + phy_id = <&davinci_mdio>, <1>; + phy-mode = "mii"; +}; + +&mac { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cpsw_default>; + pinctrl-1 = <&cpsw_sleep>; + status = "okay"; +}; + +&davinci_mdio { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&davinci_mdio_default>; + pinctrl-1 = <&davinci_mdio_sleep>; + status = "okay"; +}; + +&mmc1 { + status = "okay"; + bus-width = <0x4>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; + cd-inverted; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-bone.dts (from r279385, head/sys/gnu/dts/arm/am335x-bone.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-bone.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-bone.dts) @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "am33xx.dtsi" +#include "am335x-bone-common.dtsi" + +/ { + model = "TI AM335x BeagleBone"; + compatible = "ti,am335x-bone", "ti,am33xx"; +}; + +&ldo3_reg { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; +}; + +&mmc1 { + vmmc-supply = <&ldo3_reg>; +}; + +&sham { + status = "okay"; +}; + +&aes { + status = "okay"; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-boneblack.dts (from r279385, head/sys/gnu/dts/arm/am335x-boneblack.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-boneblack.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-boneblack.dts) @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "am33xx.dtsi" +#include "am335x-bone-common.dtsi" + +/ { + model = "TI AM335x BeagleBone Black"; + compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; +}; + +&ldo3_reg { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; +}; + +&mmc1 { + vmmc-supply = <&vmmcsd_fixed>; +}; + +&mmc2 { + vmmc-supply = <&vmmcsd_fixed>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_pins>; + bus-width = <8>; + status = "okay"; +}; + +&am33xx_pinmux { + nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { + pinctrl-single,pins = < + 0x1b0 0x03 /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ + 0xa0 0x08 /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa4 0x08 /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa8 0x08 /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xac 0x08 /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb0 0x08 /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb4 0x08 /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb8 0x08 /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xbc 0x08 /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc0 0x08 /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc4 0x08 /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc8 0x08 /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xcc 0x08 /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd0 0x08 /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd4 0x08 /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd8 0x08 /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xdc 0x08 /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xe0 0x00 /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe4 0x00 /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe8 0x00 /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + >; + }; + nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { + pinctrl-single,pins = < + 0x1b0 0x03 /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ + >; + }; +}; + +&lcdc { + status = "okay"; +}; + +/ { + hdmi { + compatible = "ti,tilcdc,slave"; + i2c = <&i2c0>; + pinctrl-names = "default", "off"; + pinctrl-0 = <&nxp_hdmi_bonelt_pins>; + pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; + status = "okay"; + }; +}; + +&rtc { + system-power-controller; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-evm.dts (from r279385, head/sys/gnu/dts/arm/am335x-evm.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-evm.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-evm.dts) @@ -0,0 +1,680 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "am33xx.dtsi" + +/ { + model = "TI AM335x EVM"; + compatible = "ti,am335x-evm", "ti,am33xx"; + + cpus { + cpu@0 { + cpu0-supply = <&vdd1_reg>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + + vbat: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vbat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; + + lis3_reg: fixedregulator@1 { + compatible = "regulator-fixed"; + regulator-name = "lis3_reg"; + regulator-boot-on; + }; + + matrix_keypad: matrix_keypad@0 { + compatible = "gpio-matrix-keypad"; + debounce-delay-ms = <5>; + col-scan-delay-us = <2>; + + row-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH /* Bank1, pin25 */ + &gpio1 26 GPIO_ACTIVE_HIGH /* Bank1, pin26 */ + &gpio1 27 GPIO_ACTIVE_HIGH>; /* Bank1, pin27 */ + + col-gpios = <&gpio1 21 GPIO_ACTIVE_HIGH /* Bank1, pin21 */ + &gpio1 22 GPIO_ACTIVE_HIGH>; /* Bank1, pin22 */ + + linux,keymap = <0x0000008b /* MENU */ + 0x0100009e /* BACK */ + 0x02000069 /* LEFT */ + 0x0001006a /* RIGHT */ + 0x0101001c /* ENTER */ + 0x0201006c>; /* DOWN */ + }; + + gpio_keys: volume_keys@0 { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + autorepeat; + + switch@9 { + label = "volume-up"; + linux,code = <115>; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + gpio-key,wakeup; + }; + + switch@10 { + label = "volume-down"; + linux,code = <114>; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + gpio-key,wakeup; + }; + }; + + backlight { + compatible = "pwm-backlight"; + pwms = <&ecap0 0 50000 0>; + brightness-levels = <0 51 53 56 62 75 101 152 255>; + default-brightness-level = <8>; + }; + + panel { + compatible = "ti,tilcdc,panel"; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_pins_s0>; + panel-info { + ac-bias = <255>; + ac-bias-intrpt = <0>; + dma-burst-sz = <16>; + bpp = <32>; + fdd = <0x80>; + sync-edge = <0>; + sync-ctrl = <1>; + raster-order = <0>; + fifo-th = <0>; + }; + + display-timings { + 800x480p62 { + clock-frequency = <30000000>; + hactive = <800>; + vactive = <480>; + hfront-porch = <39>; + hback-porch = <39>; + hsync-len = <47>; + vback-porch = <29>; + vfront-porch = <13>; + vsync-len = <2>; + hsync-active = <1>; + vsync-active = <1>; + }; + }; + }; + + sound { + compatible = "ti,da830-evm-audio"; + ti,model = "AM335x-EVM"; + ti,audio-codec = <&tlv320aic3106>; + ti,mcasp-controller = <&mcasp1>; + ti,codec-clock-rate = <12000000>; + ti,audio-routing = + "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT", + "LINE1L", "Line In", + "LINE1R", "Line In"; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin>; + + matrix_keypad_s0: matrix_keypad_s0 { + pinctrl-single,pins = < + 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ + 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a6.gpio1_22 */ + 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.gpio1_25 */ + 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a10.gpio1_26 */ + 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.gpio1_27 */ + >; + }; + + volume_keys_s0: volume_keys_s0 { + pinctrl-single,pins = < + 0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_sclk.gpio0_2 */ + 0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_d0.gpio0_3 */ + >; + }; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + 0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_d1.i2c1_sda */ + 0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + clkout2_pin: pinmux_clkout2_pin { + pinctrl-single,pins = < + 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ + >; + }; + + nandflash_pins_s0: nandflash_pins_s0 { + pinctrl-single,pins = < + 0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ + 0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ + 0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ + 0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ + 0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ + 0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ + 0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ + 0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ + 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ + 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ + 0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ + 0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ + 0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ + 0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ + 0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ + >; + }; + + ecap0_pins: backlight_pins { + pinctrl-single,pins = < + 0x164 0x0 /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */ + >; + }; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */ + 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ + 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ + 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ + 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ + 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ + 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ + 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ + 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ + 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ + 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ + 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ + >; + }; + + cpsw_sleep: cpsw_sleep { + pinctrl-single,pins = < + /* Slave 1 reset value */ + 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + davinci_mdio_sleep: davinci_mdio_sleep { + pinctrl-single,pins = < + /* MDIO reset value */ + 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + 0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */ + >; + }; + + lcd_pins_s0: lcd_pins_s0 { + pinctrl-single,pins = < + 0x20 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad8.lcd_data23 */ + 0x24 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad9.lcd_data22 */ + 0x28 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad10.lcd_data21 */ + 0x2c (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad11.lcd_data20 */ + 0x30 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad12.lcd_data19 */ + 0x34 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad13.lcd_data18 */ + 0x38 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad14.lcd_data17 */ + 0x3c (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad15.lcd_data16 */ + 0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */ + 0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */ + 0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */ + 0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */ + 0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */ + 0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */ + 0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */ + 0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */ + 0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */ + 0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */ + 0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */ + 0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */ + 0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */ + 0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */ + 0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */ + 0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */ + 0xe0 (PIN_OUTPUT | MUX_MODE0) /* lcd_vsync.lcd_vsync */ + 0xe4 (PIN_OUTPUT | MUX_MODE0) /* lcd_hsync.lcd_hsync */ + 0xe8 (PIN_OUTPUT | MUX_MODE0) /* lcd_pclk.lcd_pclk */ + 0xec (PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */ + >; + }; + + am335x_evm_audio_pins: am335x_evm_audio_pins { + pinctrl-single,pins = < + 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */ + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */ + 0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */ + 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */ + >; + }; + + dcan1_pins_default: dcan1_pins_default { + pinctrl-single,pins = < + 0x168 (PIN_OUTPUT | MUX_MODE2) /* uart0_ctsn.d_can1_tx */ + 0x16c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* uart0_rtsn.d_can1_rx */ + >; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + + status = "okay"; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + + status = "okay"; + clock-frequency = <400000>; + + tps: tps@2d { + reg = <0x2d>; + }; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&usb0_phy { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 18:21:17 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D6BAFA6; Sat, 6 Jun 2015 18:21:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B07D1F66; Sat, 6 Jun 2015 18:21:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56ILHV3090417; Sat, 6 Jun 2015 18:21:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56ILH3L090416; Sat, 6 Jun 2015 18:21:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506061821.t56ILH3L090416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 18:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284091 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 18:21:17 -0000 Author: ian Date: Sat Jun 6 18:21:16 2015 New Revision: 284091 URL: https://svnweb.freebsd.org/changeset/base/284091 Log: MFC r278458, r278519: Pass MODULES_EXTRA to the modules build. While I'm here, also always pass WITHOUT_MODULES down. There's no need to make this conditional. Properly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they are passed down properly when there's more than one. Modified: stable/10/sys/conf/kern.pre.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kern.pre.mk ============================================================================== --- stable/10/sys/conf/kern.pre.mk Sat Jun 6 18:03:36 2015 (r284090) +++ stable/10/sys/conf/kern.pre.mk Sat Jun 6 18:21:16 2015 (r284091) @@ -182,15 +182,13 @@ SYSTEM_DEP+= ${LDSCRIPT} MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} +MKMODULESENV+= MODULES_EXTRA="${MODULES_EXTRA}" WITHOUT_MODULES="${WITHOUT_MODULES}" .if (${KERN_IDENT} == LINT) MKMODULESENV+= ALL_MODULES=LINT .endif .if defined(MODULES_OVERRIDE) MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" .endif -.if defined(WITHOUT_MODULES) -MKMODULESENV+= WITHOUT_MODULES="${WITHOUT_MODULES}" -.endif .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 18:31:29 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3493E424; Sat, 6 Jun 2015 18:31:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 088531293; Sat, 6 Jun 2015 18:31:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56IVS11097867; Sat, 6 Jun 2015 18:31:28 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56IVSRQ097866; Sat, 6 Jun 2015 18:31:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506061831.t56IVSRQ097866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 18:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284092 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 18:31:29 -0000 Author: np Date: Sat Jun 6 18:31:28 2015 New Revision: 284092 URL: https://svnweb.freebsd.org/changeset/base/284092 Log: MFC r280878: cxgbe/tom: return rx credits promptly if the socket buffer's low water mark cannot be reached because the window advertised to the peer isn't wide enough. While here, tweak the normal credit return too. Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Jun 6 18:21:16 2015 (r284091) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Jun 6 18:31:28 2015 (r284092) @@ -390,19 +390,17 @@ t4_rcvd(struct toedev *tod, struct tcpcb toep->rx_credits += toep->sb_cc - sb->sb_cc; toep->sb_cc = sb->sb_cc; } - credits = toep->rx_credits; - SOCKBUF_UNLOCK(sb); - - if (credits > 0 && - (credits + 16384 >= tp->rcv_wnd || credits >= 15 * 1024)) { + if (toep->rx_credits > 0 && + (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || + (toep->rx_credits >= 16 * 1024 && tp->rcv_wnd <= 128 * 1024) || + toep->sb_cc + tp->rcv_wnd < sb->sb_lowat)) { - credits = send_rx_credits(sc, toep, credits); - SOCKBUF_LOCK(sb); + credits = send_rx_credits(sc, toep, toep->rx_credits); toep->rx_credits -= credits; - SOCKBUF_UNLOCK(sb); tp->rcv_wnd += credits; tp->rcv_adv += credits; } + SOCKBUF_UNLOCK(sb); } /* @@ -1618,6 +1616,14 @@ do_rx_data(struct sge_iq *iq, const stru toep->rx_credits += toep->sb_cc - sb->sb_cc; sbappendstream_locked(sb, m); toep->sb_cc = sb->sb_cc; + if (toep->rx_credits > 0 && toep->sb_cc + tp->rcv_wnd < sb->sb_lowat) { + int credits; + + credits = send_rx_credits(sc, toep, toep->rx_credits); + toep->rx_credits -= credits; + tp->rcv_wnd += credits; + tp->rcv_adv += credits; + } sorwakeup_locked(so); SOCKBUF_UNLOCK_ASSERT(sb); From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 18:46:38 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8465C9AC; Sat, 6 Jun 2015 18:46:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71E3F164F; Sat, 6 Jun 2015 18:46:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56Ikcpb003629; Sat, 6 Jun 2015 18:46:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Ikcd7003626; Sat, 6 Jun 2015 18:46:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506061846.t56Ikcd7003626@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 18:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284093 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 18:46:38 -0000 Author: np Date: Sat Jun 6 18:46:37 2015 New Revision: 284093 URL: https://svnweb.freebsd.org/changeset/base/284093 Log: MFC r283858 and r284007. r283858: cxgbe: set minimum burst size when fetching freelist buffers to 128B. r284007: cxgbe: set the minimum burst size when fetching fl buffers to 128B for netmap rx queues too. This should have gone in as part of r283858. Modified: stable/10/sys/dev/cxgbe/t4_netmap.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_netmap.c Sat Jun 6 18:31:28 2015 (r284092) +++ stable/10/sys/dev/cxgbe/t4_netmap.c Sat Jun 6 18:46:37 2015 (r284093) @@ -297,7 +297,7 @@ alloc_nm_rxq_hwq(struct port_info *pi, s (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0) | (black_hole == 2 ? F_FW_IQ_CMD_FL0PACKEN : 0)); c.fl0dcaen_to_fl0cidxfthresh = - htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | + htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_128B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); c.fl0size = htobe16(na->num_rx_desc / 8 + spg_len / EQ_ESIZE); c.fl0addr = htobe64(nm_rxq->fl_ba); Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 6 18:31:28 2015 (r284092) +++ stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 6 18:46:37 2015 (r284093) @@ -2660,7 +2660,7 @@ alloc_iq_fl(struct port_info *pi, struct F_FW_IQ_CMD_FL0CONGEN); } c.fl0dcaen_to_fl0cidxfthresh = - htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | + htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_128B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); c.fl0size = htobe16(fl->qsize); c.fl0addr = htobe64(fl->ba); From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 18:49:04 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79AF2B1A; Sat, 6 Jun 2015 18:49:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BF98165E; Sat, 6 Jun 2015 18:49:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56In4po003986; Sat, 6 Jun 2015 18:49:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56In3of003978; Sat, 6 Jun 2015 18:49:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506061849.t56In3of003978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 18:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284094 - in stable/10/sys: arm/conf modules modules/dtb/imx6 modules/dtb/rpi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 18:49:04 -0000 Author: ian Date: Sat Jun 6 18:49:02 2015 New Revision: 284094 URL: https://svnweb.freebsd.org/changeset/base/284094 Log: MFC r278338, r278340, r278458, r278519: Create a module to install the Raspberry Pi dtb files. Pull in the rpi.dts -> rpi.dtb module (dtb/rpi) and have it install rpi.dtb in /boot/dtb by default. Add a module to build the dtb files for all supported imx6 systems. Remove imx6s-wandboard.dts, there is no such file. Added: stable/10/sys/modules/dtb/imx6/ - copied from r279551, head/sys/modules/dtb/imx6/ stable/10/sys/modules/dtb/rpi/ - copied from r278338, head/sys/modules/dtb/rpi/ Modified: stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/RPI-B stable/10/sys/modules/Makefile stable/10/sys/modules/dtb/imx6/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Sat Jun 6 18:46:37 2015 (r284093) +++ stable/10/sys/arm/conf/IMX6 Sat Jun 6 18:49:02 2015 (r284094) @@ -153,6 +153,7 @@ device u3g # USB modems # Flattened Device Tree options FDT # Configure using FDT/DTB data +makeoptions MODULES_EXTRA=dtb/imx6 # SoC-specific devices device ffec # Freescale Fast Ethernet Controller Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Sat Jun 6 18:46:37 2015 (r284093) +++ stable/10/sys/arm/conf/RPI-B Sat Jun 6 18:49:02 2015 (r284094) @@ -138,4 +138,5 @@ options FDT # Configure using FDT/DTB # Note: DTB is normally loaded and modified by RPi boot loader, then # handed to kernel via U-Boot and ubldr. #options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=rpi.dts +#makeoptions FDT_DTS_FILE=rpi.dts +makeoptions MODULES_EXTRA=dtb/rpi Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Sat Jun 6 18:46:37 2015 (r284093) +++ stable/10/sys/modules/Makefile Sat Jun 6 18:49:02 2015 (r284094) @@ -894,6 +894,8 @@ _zfs= zfs SUBDIR=${MODULES_OVERRIDE} .endif +SUBDIR+=${MODULES_EXTRA} + .for reject in ${WITHOUT_MODULES} SUBDIR:= ${SUBDIR:N${reject}} .endfor Modified: stable/10/sys/modules/dtb/imx6/Makefile ============================================================================== --- head/sys/modules/dtb/imx6/Makefile Mon Mar 2 22:12:56 2015 (r279551) +++ stable/10/sys/modules/dtb/imx6/Makefile Sat Jun 6 18:49:02 2015 (r284094) @@ -5,8 +5,7 @@ DTS= \ imx6q-cubox-i.dts \ imx6dl-hummingboard.dts \ imx6q-hummingboard.dts \ - imx6q-wandboard.dts \ imx6dl-wandboard.dts \ - imx6s-wandboard.dts + imx6q-wandboard.dts .include From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 19:15:49 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18DD7248; Sat, 6 Jun 2015 19:15:49 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 060D11CE2; Sat, 6 Jun 2015 19:15:49 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56JFmZ5018394; Sat, 6 Jun 2015 19:15:48 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56JFmDU018393; Sat, 6 Jun 2015 19:15:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506061915.t56JFmDU018393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 19:15:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284096 - in stable/10/sys: arm/conf modules/dtb/am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 19:15:49 -0000 Author: ian Date: Sat Jun 6 19:15:48 2015 New Revision: 284096 URL: https://svnweb.freebsd.org/changeset/base/284096 Log: MFC r279824, r279827, r279825: Add a dtb module for AM335x systems (just Beaglebone right now). Remove the static DTB config and instead build modules/dtb/am335x. Also, remove WITHOUT_MODULES="ahc" which was added long ago to work around build problems that have long since been fixed correctly. Revert accidentally commited modules/Makefile file from r279824. Added: stable/10/sys/modules/dtb/am335x/ - copied from r279824, head/sys/modules/dtb/am335x/ Modified: stable/10/sys/arm/conf/BEAGLEBONE Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Sat Jun 6 19:15:08 2015 (r284095) +++ stable/10/sys/arm/conf/BEAGLEBONE Sat Jun 6 19:15:48 2015 (r284096) @@ -25,7 +25,7 @@ ident BEAGLEBONE include "../ti/am335x/std.am335x" -makeoptions WITHOUT_MODULES="ahc" +makeoptions MODULES_EXTRA="dtb/am335x" options HZ=100 options SCHED_4BSD # 4BSD scheduler @@ -158,5 +158,3 @@ device usfs # Flattened Device Tree options FDT # Configure using FDT/DTB data -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=beaglebone.dts From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 20:01:07 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46F8EEAD; Sat, 6 Jun 2015 20:01:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34E4F16DB; Sat, 6 Jun 2015 20:01:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56K17dU040195; Sat, 6 Jun 2015 20:01:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56K17Dk040194; Sat, 6 Jun 2015 20:01:07 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506062001.t56K17Dk040194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 20:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284098 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 20:01:07 -0000 Author: np Date: Sat Jun 6 20:01:06 2015 New Revision: 284098 URL: https://svnweb.freebsd.org/changeset/base/284098 Log: MFC r259150 (by adrian@) and r283864. r259150: Print out the full PCIe link negotiation during dmesg. I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot or not. r283864: cxgbe: no need to display the per-lane GT/s rating of the pcie link. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 19:43:41 2015 (r284097) +++ stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 20:01:06 2015 (r284098) @@ -906,9 +906,9 @@ t4_attach(device_t dev) } device_printf(dev, - "PCIe x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", - sc->params.pci.width, sc->params.nports, sc->intr_count, - sc->intr_type == INTR_MSIX ? "MSI-X" : + "PCIe gen%d x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", + sc->params.pci.speed, sc->params.pci.width, sc->params.nports, + sc->intr_count, sc->intr_type == INTR_MSIX ? "MSI-X" : (sc->intr_type == INTR_MSI ? "MSI" : "INTx"), sc->intr_count > 1 ? "s" : "", sc->sge.neq, sc->sge.niq); From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 20:14:59 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BA18378; Sat, 6 Jun 2015 20:14:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2940A1A31; Sat, 6 Jun 2015 20:14:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56KExcH047997; Sat, 6 Jun 2015 20:14:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56KExfb047996; Sat, 6 Jun 2015 20:14:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506062014.t56KExfb047996@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 20:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284099 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 20:14:59 -0000 Author: ian Date: Sat Jun 6 20:14:58 2015 New Revision: 284099 URL: https://svnweb.freebsd.org/changeset/base/284099 Log: MFC r279236: Change struct attribute to avoid aligned operations mismatch Previous __alignment(4) allowed compiler to assume that operations are performed on aligned region. On ARM processor, this led to alignment fault Modified: stable/10/sys/netinet/ip.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip.h ============================================================================== --- stable/10/sys/netinet/ip.h Sat Jun 6 20:01:06 2015 (r284098) +++ stable/10/sys/netinet/ip.h Sat Jun 6 20:14:58 2015 (r284099) @@ -67,7 +67,7 @@ struct ip { u_char ip_p; /* protocol */ u_short ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ -} __packed __aligned(4); +} __packed __aligned(2); #define IP_MAXPACKET 65535 /* maximum packet size */ From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 20:37:43 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 530928C6; Sat, 6 Jun 2015 20:37:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FE2A1F2F; Sat, 6 Jun 2015 20:37:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56KbhQ3058569; Sat, 6 Jun 2015 20:37:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56KbfsP058560; Sat, 6 Jun 2015 20:37:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506062037.t56KbfsP058560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 6 Jun 2015 20:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284100 - in stable: 10/sys/vm 9/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 20:37:43 -0000 Author: jhb Date: Sat Jun 6 20:37:40 2015 New Revision: 284100 URL: https://svnweb.freebsd.org/changeset/base/284100 Log: MFC 261811,282660,282706: Place VM objects on the object list when created and never remove them. 261811: Fix function name in KASSERT(). 282660: Place VM objects on the object list when created and never remove them. This is ok since objects come from a NOFREE zone and allows objects to be locked while traversing the object list without triggering a LOR. Ensure that objects on the list are marked DEAD while free or stillborn, and that they have a refcount of zero. This required updating most of the pagers to explicitly mark an object as dead when deallocating it. (Only the vnode pager did this previously.) 282706: Satisfy vm_object uma zone destructor requirements after r282660 when vnode object creation raced. Modified: stable/10/sys/vm/default_pager.c stable/10/sys/vm/device_pager.c stable/10/sys/vm/phys_pager.c stable/10/sys/vm/sg_pager.c stable/10/sys/vm/swap_pager.c stable/10/sys/vm/vm_meter.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vnode_pager.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/vm/default_pager.c stable/9/sys/vm/device_pager.c stable/9/sys/vm/phys_pager.c stable/9/sys/vm/sg_pager.c stable/9/sys/vm/swap_pager.c stable/9/sys/vm/vm_meter.c stable/9/sys/vm/vm_object.c stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/vm/default_pager.c ============================================================================== --- stable/10/sys/vm/default_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/default_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -113,6 +113,7 @@ default_pager_dealloc(object) /* * OBJT_DEFAULT objects have no special resources allocated to them. */ + object->type = OBJT_DEAD; } /* Modified: stable/10/sys/vm/device_pager.c ============================================================================== --- stable/10/sys/vm/device_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/device_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -252,6 +252,8 @@ dev_pager_dealloc(object) != NULL) dev_pager_free_page(object, m); } + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/10/sys/vm/phys_pager.c ============================================================================== --- stable/10/sys/vm/phys_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/phys_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -131,6 +131,8 @@ phys_pager_dealloc(vm_object_t object) mtx_unlock(&phys_pager_mtx); VM_OBJECT_WLOCK(object); } + object->handle = NULL; + object->type = OBJT_DEAD; } /* Modified: stable/10/sys/vm/sg_pager.c ============================================================================== --- stable/10/sys/vm/sg_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/sg_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -130,6 +130,8 @@ sg_pager_dealloc(vm_object_t object) sg = object->handle; sglist_free(sg); + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/10/sys/vm/swap_pager.c ============================================================================== --- stable/10/sys/vm/swap_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/swap_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -693,6 +693,8 @@ swap_pager_dealloc(vm_object_t object) * if paging is still in progress on some objects. */ swp_pager_meta_free_all(object); + object->handle = NULL; + object->type = OBJT_DEAD; } /************************************************************************ Modified: stable/10/sys/vm/vm_meter.c ============================================================================== --- stable/10/sys/vm/vm_meter.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/vm_meter.c Sat Jun 6 20:37:40 2015 (r284100) @@ -111,14 +111,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) */ mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { - if (!VM_OBJECT_TRYWLOCK(object)) { - /* - * Avoid a lock-order reversal. Consequently, - * the reported number of active pages may be - * greater than the actual number. - */ - continue; - } + VM_OBJECT_WLOCK(object); vm_object_clear_flag(object, OBJ_ACTIVE); VM_OBJECT_WUNLOCK(object); } @@ -196,10 +189,9 @@ vmtotal(SYSCTL_HANDLER_ARGS) mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { /* - * Perform unsynchronized reads on the object to avoid - * a lock-order reversal. In this case, the lack of - * synchronization should not impair the accuracy of - * the reported statistics. + * Perform unsynchronized reads on the object. In + * this case, the lack of synchronization should not + * impair the accuracy of the reported statistics. */ if ((object->flags & OBJ_FICTITIOUS) != 0) { /* Modified: stable/10/sys/vm/vm_object.c ============================================================================== --- stable/10/sys/vm/vm_object.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/vm_object.c Sat Jun 6 20:37:40 2015 (r284100) @@ -166,6 +166,8 @@ vm_object_zdtor(void *mem, int size, voi vm_object_t object; object = (vm_object_t)mem; + KASSERT(object->ref_count == 0, + ("object %p ref_count = %d", object, object->ref_count)); KASSERT(TAILQ_EMPTY(&object->memq), ("object %p has resident pages in its memq", object)); KASSERT(vm_radix_is_empty(&object->rtree), @@ -187,6 +189,9 @@ vm_object_zdtor(void *mem, int size, voi KASSERT(object->shadow_count == 0, ("object %p shadow_count = %d", object, object->shadow_count)); + KASSERT(object->type == OBJT_DEAD, + ("object %p has non-dead type %d", + object, object->type)); } #endif @@ -200,6 +205,8 @@ vm_object_zinit(void *mem, int size, int rw_init_flags(&object->lock, "vm object", RW_DUPOK); /* These are true for any object that has been freed */ + object->type = OBJT_DEAD; + object->ref_count = 0; object->rtree.rt_root = 0; object->rtree.rt_flags = 0; object->paging_in_progress = 0; @@ -207,6 +214,10 @@ vm_object_zinit(void *mem, int size, int object->shadow_count = 0; object->cache.rt_root = 0; object->cache.rt_flags = 0; + + mtx_lock(&vm_object_list_mtx); + TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); + mtx_unlock(&vm_object_list_mtx); return (0); } @@ -253,10 +264,6 @@ _vm_object_allocate(objtype_t type, vm_p #if VM_NRESERVLEVEL > 0 LIST_INIT(&object->rvq); #endif - - mtx_lock(&vm_object_list_mtx); - TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); - mtx_unlock(&vm_object_list_mtx); } /* @@ -672,20 +679,9 @@ vm_object_destroy(vm_object_t object) { /* - * Remove the object from the global object list. - */ - mtx_lock(&vm_object_list_mtx); - TAILQ_REMOVE(&vm_object_list, object, object_list); - mtx_unlock(&vm_object_list_mtx); - - /* * Release the allocation charge. */ if (object->cred != NULL) { - KASSERT(object->type == OBJT_DEFAULT || - object->type == OBJT_SWAP, - ("vm_object_terminate: non-swap obj %p has cred", - object)); swap_release_by_cred(object->charge, object->cred); object->charge = 0; crfree(object->cred); @@ -790,6 +786,10 @@ vm_object_terminate(vm_object_t object) if (__predict_false(!vm_object_cache_is_empty(object))) vm_page_cache_free(object, 0, 0); + KASSERT(object->cred == NULL || object->type == OBJT_DEFAULT || + object->type == OBJT_SWAP, + ("%s: non-swap obj %p has cred", __func__, object)); + /* * Let the pager know object is dead. */ @@ -1805,6 +1805,8 @@ vm_object_collapse(vm_object_t object) KASSERT(backing_object->ref_count == 1, ( "backing_object %p was somehow re-referenced during collapse!", backing_object)); + backing_object->type = OBJT_DEAD; + backing_object->ref_count = 0; VM_OBJECT_WUNLOCK(backing_object); vm_object_destroy(backing_object); Modified: stable/10/sys/vm/vnode_pager.c ============================================================================== --- stable/10/sys/vm/vnode_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/vnode_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -227,6 +227,12 @@ retry: * Object has been created while we were sleeping */ VI_UNLOCK(vp); + VM_OBJECT_WLOCK(object); + KASSERT(object->ref_count == 1, + ("leaked ref %p %d", object, object->ref_count)); + object->type = OBJT_DEAD; + object->ref_count = 0; + VM_OBJECT_WUNLOCK(object); vm_object_destroy(object); goto retry; } From owner-svn-src-stable-10@FreeBSD.ORG Sat Jun 6 20:54:42 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C6FACA2; Sat, 6 Jun 2015 20:54:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6005D141A; Sat, 6 Jun 2015 20:54:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56KsgNR067938; Sat, 6 Jun 2015 20:54:42 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Ksggh067937; Sat, 6 Jun 2015 20:54:42 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201506062054.t56Ksggh067937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 6 Jun 2015 20:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284101 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 20:54:42 -0000 Author: rmacklem Date: Sat Jun 6 20:54:41 2015 New Revision: 284101 URL: https://svnweb.freebsd.org/changeset/base/284101 Log: MFC: r283330 The NFS client generated directory block(s) with d_fileno == 0 so that it would not return less data than requested. Since returning less directory data than requested is not a problem for FreeBSD and even UFS no longer returns directory structures with d_fileno == 0, this patch stops the client from doing this. Although entries with d_fileno == 0 should not be a problem, the man pages no longer document that these entries should be ignored, so there was a concern that these entries might be an issue in the future. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 6 20:37:40 2015 (r284100) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 6 20:54:41 2015 (r284101) @@ -3070,25 +3070,6 @@ nfsrpc_readdir(vnode_t vp, struct uio *u *eofp = eof; } - /* - * Add extra empty records to any remaining DIRBLKSIZ chunks. - */ - while (uio_uio_resid(uiop) > 0 && ((size_t)(uio_uio_resid(uiop))) != tresid) { - dp = (struct dirent *) CAST_DOWN(caddr_t, uio_iov_base(uiop)); - dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - tl = (u_int32_t *)&dp->d_name[4]; - *tl++ = cookie.lval[0]; - *tl = cookie.lval[1]; - dp->d_reclen = DIRBLKSIZ; - uio_iov_base_add(uiop, DIRBLKSIZ); - uio_iov_len_add(uiop, -(DIRBLKSIZ)); - uio_uio_resid_add(uiop, -(DIRBLKSIZ)); - uiop->uio_offset += DIRBLKSIZ; - } - nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); @@ -3563,25 +3544,6 @@ nfsrpc_readdirplus(vnode_t vp, struct ui *eofp = eof; } - /* - * Add extra empty records to any remaining DIRBLKSIZ chunks. - */ - while (uio_uio_resid(uiop) > 0 && uio_uio_resid(uiop) != tresid) { - dp = (struct dirent *)uio_iov_base(uiop); - dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - tl = (u_int32_t *)&dp->d_name[4]; - *tl++ = cookie.lval[0]; - *tl = cookie.lval[1]; - dp->d_reclen = DIRBLKSIZ; - uio_iov_base_add(uiop, DIRBLKSIZ); - uio_iov_len_add(uiop, -(DIRBLKSIZ)); - uio_uio_resid_add(uiop, -(DIRBLKSIZ)); - uiop->uio_offset += DIRBLKSIZ; - } - nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep);