From owner-svn-src-stable-8@FreeBSD.ORG Tue May 21 06:03:33 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 35067CD0; Tue, 21 May 2013 06:03:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 26D5A1DF; Tue, 21 May 2013 06:03:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4L63Wlv039964; Tue, 21 May 2013 06:03:33 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4L63WcQ039963; Tue, 21 May 2013 06:03:32 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201305210603.r4L63WcQ039963@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 21 May 2013 06:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r250843 - stable/8/sys/dev/usb/wlan X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2013 06:03:33 -0000 Author: hselasky Date: Tue May 21 06:03:32 2013 New Revision: 250843 URL: http://svnweb.freebsd.org/changeset/base/250843 Log: Add new USB ID. PR: usb/177173 Modified: stable/8/sys/dev/usb/wlan/if_rum.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Tue May 21 06:01:41 2013 (r250842) +++ stable/8/sys/dev/usb/wlan/if_rum.c Tue May 21 06:03:32 2013 (r250843) @@ -120,6 +120,7 @@ static const STRUCT_USB_HOST_ID rum_devs RUM_DEV(HUAWEI3COM, WUB320G), RUM_DEV(MELCO, G54HP), RUM_DEV(MELCO, SG54HP), + RUM_DEV(MELCO, SG54HG), RUM_DEV(MELCO, WLIUCG), RUM_DEV(MELCO, WLRUCG), RUM_DEV(MELCO, WLRUCGAOSS), From owner-svn-src-stable-8@FreeBSD.ORG Tue May 21 06:06:16 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CFB05E52; Tue, 21 May 2013 06:06:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C09E51F3; Tue, 21 May 2013 06:06:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4L66GgR040619; Tue, 21 May 2013 06:06:16 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4L66GuA040617; Tue, 21 May 2013 06:06:16 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201305210606.r4L66GuA040617@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 21 May 2013 06:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r250844 - in stable/8/sys/dev/usb: . serial X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2013 06:06:16 -0000 Author: hselasky Date: Tue May 21 06:06:16 2013 New Revision: 250844 URL: http://svnweb.freebsd.org/changeset/base/250844 Log: MFC r248499: Add new USB ID. PR: usb/177105 Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Tue May 21 06:03:32 2013 (r250843) +++ stable/8/sys/dev/usb/serial/u3g.c Tue May 21 06:06:16 2013 (r250844) @@ -238,6 +238,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(DELL, U5730_2, 0), U3G_DEV(DELL, U5730_3, 0), U3G_DEV(DELL, U740, 0), + U3G_DEV(DLINK, DWR510_CD, U3GINIT_SCSIEJECT), + U3G_DEV(DLINK, DWR510, 0), U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue May 21 06:03:32 2013 (r250843) +++ stable/8/sys/dev/usb/usbdevs Tue May 21 06:06:16 2013 (r250844) @@ -1510,6 +1510,8 @@ product DLINK DSB650TX3 0x400b 10/100 E product DLINK DSB650TX2 0x4102 10/100 Ethernet product DLINK DSB650 0xabc1 10/100 Ethernet product DLINK DUBH7 0xf103 DUB-H7 USB 2.0 7-Port Hub +product DLINK DWR510_CD 0xa805 DWR-510 CD-ROM Mode +product DLINK DWR510 0x7e12 DWR-510 product DLINK2 DWA120 0x3a0c DWA-120 product DLINK2 DWA120_NF 0x3a0d DWA-120 (no firmware) product DLINK2 DWLG122C1 0x3c03 DWL-G122 c1 From owner-svn-src-stable-8@FreeBSD.ORG Tue May 21 06:09:20 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2ED79258; Tue, 21 May 2013 06:09:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1F505211; Tue, 21 May 2013 06:09:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4L69KN1041362; Tue, 21 May 2013 06:09:20 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4L69JWr041360; Tue, 21 May 2013 06:09:19 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201305210609.r4L69JWr041360@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 21 May 2013 06:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r250846 - in stable/8/sys/dev/usb: . wlan X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2013 06:09:20 -0000 Author: hselasky Date: Tue May 21 06:09:19 2013 New Revision: 250846 URL: http://svnweb.freebsd.org/changeset/base/250846 Log: MFC r248458: Add new USB ID. PR: usb/177013 Modified: stable/8/sys/dev/usb/usbdevs stable/8/sys/dev/usb/wlan/if_run.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue May 21 06:06:52 2013 (r250845) +++ stable/8/sys/dev/usb/usbdevs Tue May 21 06:09:19 2013 (r250846) @@ -2493,6 +2493,7 @@ product LOGITEC RT2870_2 0x0163 RT2870 product LOGITEC RT2870_3 0x0164 RT2870 product LOGITEC LANW300NU2 0x0166 LAN-W300N/U2 product LOGITEC LANW150NU2 0x0168 LAN-W150N/U2 +product LOGITEC LANW300NU2S 0x0169 LAN-W300N/U2S /* Longcheer Holdings, Ltd. products */ product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Tue May 21 06:06:52 2013 (r250845) +++ stable/8/sys/dev/usb/wlan/if_run.c Tue May 21 06:09:19 2013 (r250846) @@ -209,6 +209,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, RT2870_2), RUN_DEV(LOGITEC, RT2870_3), RUN_DEV(LOGITEC, LANW300NU2), + RUN_DEV(LOGITEC, LANW300NU2S), RUN_DEV(MELCO, RT2870_1), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), From owner-svn-src-stable-8@FreeBSD.ORG Tue May 21 19:25:20 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D256B984; Tue, 21 May 2013 19:25:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C4BD487C; Tue, 21 May 2013 19:25:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4LJPK7s023724; Tue, 21 May 2013 19:25:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4LJPK1q023718; Tue, 21 May 2013 19:25:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201305211925.r4LJPK1q023718@svn.freebsd.org> From: John Baldwin Date: Tue, 21 May 2013 19:25:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r250880 - in stable/8/sys/amd64: amd64 include X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2013 19:25:20 -0000 Author: jhb Date: Tue May 21 19:25:19 2013 New Revision: 250880 URL: http://svnweb.freebsd.org/changeset/base/250880 Log: MFC 238450,250152-250153,250415: - Add support for the XSAVEOPT instruction use. - The check to ensure that xstate_bv always has XFEATURE_ENABLED_X87 and XFEATURE_ENABLED_SSE bits set is not needed. CPU correctly handles any bitmask which is subset of the enabled bits in %XCR0. - Partially saved extended state must be handled always, i.e. for both fpu-owned context, and for pcb-saved one. - Correct the type for the literal used on the left side of the shift up to 63 bit positions. Do not fill the save area and do not set the saved bit in the xstate bit vector for the state which is not marked as enabled in xsave_mask. Modified: stable/8/sys/amd64/amd64/cpu_switch.S stable/8/sys/amd64/amd64/fpu.c stable/8/sys/amd64/include/md_var.h stable/8/sys/amd64/include/specialreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/x86/ (props changed) Modified: stable/8/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/8/sys/amd64/amd64/cpu_switch.S Tue May 21 19:23:49 2013 (r250879) +++ stable/8/sys/amd64/amd64/cpu_switch.S Tue May 21 19:25:19 2013 (r250880) @@ -122,6 +122,9 @@ done_store_dr: 1: movq %rdx,%rcx movl xsave_mask,%eax movl xsave_mask+4,%edx + .globl ctx_switch_xsave +ctx_switch_xsave: + /* This is patched to xsaveopt if supported, see fpuinit_bsp1() */ /* xsave (%r8) */ .byte 0x41,0x0f,0xae,0x20 movq %rcx,%rdx Modified: stable/8/sys/amd64/amd64/fpu.c ============================================================================== --- stable/8/sys/amd64/amd64/fpu.c Tue May 21 19:23:49 2013 (r250879) +++ stable/8/sys/amd64/amd64/fpu.c Tue May 21 19:25:19 2013 (r250880) @@ -154,6 +154,11 @@ int use_xsave; /* non-static for cpu_s uint64_t xsave_mask; /* the same */ static struct savefpu *fpu_initialstate; +struct xsave_area_elm_descr { + u_int offset; + u_int size; +} *xsave_area_desc; + void fpusave(void *addr) { @@ -200,6 +205,16 @@ fpuinit_bsp1(void) TUNABLE_ULONG_FETCH("hw.xsave_mask", &xsave_mask_user); xsave_mask_user |= XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; xsave_mask &= xsave_mask_user; + + cpuid_count(0xd, 0x1, cp); + if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) { + /* + * Patch the XSAVE instruction in the cpu_switch code + * to XSAVEOPT. We assume that XSAVE encoding used + * REX byte, and set the bit 4 of the r/m byte. + */ + ctx_switch_xsave[3] |= 0x10; + } } /* @@ -270,6 +285,7 @@ static void fpuinitstate(void *arg __unused) { register_t saveintr; + int cp[4], i, max_ext_n; fpu_initialstate = malloc(cpu_max_ext_state_size, M_DEVBUF, M_WAITOK | M_ZERO); @@ -291,6 +307,28 @@ fpuinitstate(void *arg __unused) */ bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc)); + /* + * Create a table describing the layout of the CPU Extended + * Save Area. + */ + if (use_xsave) { + max_ext_n = flsl(xsave_mask); + xsave_area_desc = malloc(max_ext_n * sizeof(struct + xsave_area_elm_descr), M_DEVBUF, M_WAITOK | M_ZERO); + /* x87 state */ + xsave_area_desc[0].offset = 0; + xsave_area_desc[0].size = 160; + /* XMM */ + xsave_area_desc[1].offset = 160; + xsave_area_desc[1].size = 288 - 160; + + for (i = 2; i < max_ext_n; i++) { + cpuid_count(0xd, i, cp); + xsave_area_desc[i].offset = cp[1]; + xsave_area_desc[i].size = cp[0]; + } + } + start_emulating(); intr_restore(saveintr); } @@ -578,8 +616,14 @@ fpudna(void) * This is the first time this thread has used the FPU or * the PCB doesn't contain a clean FPU state. Explicitly * load an initial state. + * + * We prefer to restore the state from the actual save + * area in PCB instead of directly loading from + * fpu_initialstate, to ignite the XSAVEOPT + * tracking engine. */ - fpurestore(fpu_initialstate); + bcopy(fpu_initialstate, pcb->pcb_save, cpu_max_ext_state_size); + fpurestore(pcb->pcb_save); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) fldcw(pcb->pcb_initial_fpucw); if (PCB_USER_FPU(pcb)) @@ -614,6 +658,9 @@ int fpugetregs(struct thread *td) { struct pcb *pcb; + uint64_t *xstate_bv, bit; + char *sa; + int max_ext_n, i, owned; pcb = td->td_pcb; if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) { @@ -627,12 +674,31 @@ fpugetregs(struct thread *td) critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { fpusave(get_pcb_user_save_pcb(pcb)); - critical_exit(); - return (_MC_FPOWNED_FPU); + owned = _MC_FPOWNED_FPU; } else { - critical_exit(); - return (_MC_FPOWNED_PCB); + owned = _MC_FPOWNED_PCB; } + critical_exit(); + if (use_xsave) { + /* + * Handle partially saved state. + */ + sa = (char *)get_pcb_user_save_pcb(pcb); + xstate_bv = (uint64_t *)(sa + sizeof(struct savefpu) + + offsetof(struct xstate_hdr, xstate_bv)); + max_ext_n = flsl(xsave_mask); + for (i = 0; i < max_ext_n; i++) { + bit = 1ULL << i; + if ((xsave_mask & bit) == 0 || (*xstate_bv & bit) != 0) + continue; + bcopy((char *)fpu_initialstate + + xsave_area_desc[i].offset, + sa + xsave_area_desc[i].offset, + xsave_area_desc[i].size); + *xstate_bv |= bit; + } + } + return (owned); } void @@ -676,9 +742,6 @@ fpusetxstate(struct thread *td, char *xf */ if (bv & ~xsave_mask) return (EINVAL); - if ((bv & (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE)) != - (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE)) - return (EINVAL); hdr = (struct xstate_hdr *)(get_pcb_user_save_td(td) + 1); Modified: stable/8/sys/amd64/include/md_var.h ============================================================================== --- stable/8/sys/amd64/include/md_var.h Tue May 21 19:23:49 2013 (r250879) +++ stable/8/sys/amd64/include/md_var.h Tue May 21 19:25:19 2013 (r250880) @@ -57,6 +57,7 @@ extern u_int cpu_procinfo; extern u_int cpu_procinfo2; extern char cpu_vendor[]; extern u_int cpu_vendor_id; +extern char ctx_switch_xsave[]; extern char kstack[]; extern char sigcode[]; extern int szsigcode; Modified: stable/8/sys/amd64/include/specialreg.h ============================================================================== --- stable/8/sys/amd64/include/specialreg.h Tue May 21 19:23:49 2013 (r250879) +++ stable/8/sys/amd64/include/specialreg.h Tue May 21 19:25:19 2013 (r250880) @@ -230,6 +230,11 @@ #define CPUID_TYPE_CORE 2 /* + * CPUID instruction 0xd Processor Extended State Enumeration Sub-leaf 1 + */ +#define CPUID_EXTSTATE_XSAVEOPT 0x00000001 + +/* * AMD extended function 8000_0007h edx info */ #define AMDPM_TS 0x00000001 From owner-svn-src-stable-8@FreeBSD.ORG Fri May 24 18:26:12 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E5FB4D47; Fri, 24 May 2013 18:26:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D666E819; Fri, 24 May 2013 18:26:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4OIQCSq033558; Fri, 24 May 2013 18:26:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4OIQCsc033557; Fri, 24 May 2013 18:26:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201305241826.r4OIQCsc033557@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 24 May 2013 18:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r250970 - stable/8/sys/dev/pci X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2013 18:26:13 -0000 Author: kib Date: Fri May 24 18:26:12 2013 New Revision: 250970 URL: http://svnweb.freebsd.org/changeset/base/250970 Log: MFC r250740: Add new capability types encodings from HyperTransport I/O Link Specification revisions 3.00 and 3.10. Modified: stable/8/sys/dev/pci/pcireg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/pci/ (props changed) Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Fri May 24 15:53:13 2013 (r250969) +++ stable/8/sys/dev/pci/pcireg.h Fri May 24 18:26:12 2013 (r250970) @@ -609,6 +609,10 @@ #define PCIM_HTCAP_VCSET 0xb800 /* 10111 */ #define PCIM_HTCAP_RETRY_MODE 0xc000 /* 11000 */ #define PCIM_HTCAP_X86_ENCODING 0xc800 /* 11001 */ +#define PCIM_HTCAP_GEN3 0xd000 /* 11010 */ +#define PCIM_HTCAP_FLE 0xd800 /* 11011 */ +#define PCIM_HTCAP_PM 0xe000 /* 11100 */ +#define PCIM_HTCAP_HIGH_NODE_COUNT 0xe800 /* 11101 */ /* HT MSI Mapping Capability definitions. */ #define PCIM_HTCMD_MSI_ENABLE 0x0001 From owner-svn-src-stable-8@FreeBSD.ORG Fri May 24 18:28:27 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9801AFBA; Fri, 24 May 2013 18:28:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8837C836; Fri, 24 May 2013 18:28:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4OISRUw034038; Fri, 24 May 2013 18:28:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4OISRCa034037; Fri, 24 May 2013 18:28:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201305241828.r4OISRCa034037@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 24 May 2013 18:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r250971 - stable/8/usr.sbin/pciconf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2013 18:28:27 -0000 Author: kib Date: Fri May 24 18:28:27 2013 New Revision: 250971 URL: http://svnweb.freebsd.org/changeset/base/250971 Log: MFC r250741: Decode new HT 3.00 and 3.10 capabilities. Modified: stable/8/usr.sbin/pciconf/cap.c Directory Properties: stable/8/usr.sbin/pciconf/ (props changed) Modified: stable/8/usr.sbin/pciconf/cap.c ============================================================================== --- stable/8/usr.sbin/pciconf/cap.c Fri May 24 18:26:12 2013 (r250970) +++ stable/8/usr.sbin/pciconf/cap.c Fri May 24 18:28:27 2013 (r250971) @@ -276,6 +276,18 @@ cap_ht(int fd, struct pci_conf *p, uint8 case PCIM_HTCAP_X86_ENCODING: printf("X86 encoding"); break; + case PCIM_HTCAP_GEN3: + printf("Gen3"); + break; + case PCIM_HTCAP_FLE: + printf("function-level extension"); + break; + case PCIM_HTCAP_PM: + printf("power management"); + break; + case PCIM_HTCAP_HIGH_NODE_COUNT: + printf("high node count"); + break; default: printf("unknown %02x", command); break; From owner-svn-src-stable-8@FreeBSD.ORG Sat May 25 17:19:07 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6A87F9A8; Sat, 25 May 2013 17:19:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC41B16; Sat, 25 May 2013 17:19:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4PHJ7Zb018865; Sat, 25 May 2013 17:19:07 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4PHJ7th018863; Sat, 25 May 2013 17:19:07 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201305251719.r4PHJ7th018863@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 25 May 2013 17:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r250988 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2013 17:19:07 -0000 Author: hselasky Date: Sat May 25 17:19:06 2013 New Revision: 250988 URL: http://svnweb.freebsd.org/changeset/base/250988 Log: MFC r250763 and r250765: Fix some USB audio device issues. PR: usb/178722 Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Sat May 25 17:16:31 2013 (r250987) +++ stable/8/sys/dev/sound/usb/uaudio.c Sat May 25 17:19:06 2013 (r250988) @@ -868,6 +868,7 @@ uaudio_attach(device_t dev) struct usb_attach_arg *uaa = device_get_ivars(dev); struct uaudio_softc *sc = device_get_softc(dev); struct usb_interface_descriptor *id; + usb_error_t err; device_t child; sc->sc_play_chan.priv_sc = sc; @@ -925,6 +926,19 @@ uaudio_attach(device_t dev) if (sc->sc_play_chan.num_alt > 0) { uint8_t x; + + /* + * Need to set a default alternate interface, else + * some USB audio devices might go into an infinte + * re-enumeration loop: + */ + err = usbd_set_alt_interface_index(sc->sc_udev, + sc->sc_play_chan.usb_alt[0].iface_index, + sc->sc_play_chan.usb_alt[0].iface_alt_index); + if (err) { + DPRINTF("setting of alternate index failed: %s!\n", + usbd_errstr(err)); + } for (x = 0; x != sc->sc_play_chan.num_alt; x++) { device_printf(dev, "Play: %d Hz, %d ch, %s format, " "2x8ms buffer.\n", @@ -938,6 +952,19 @@ uaudio_attach(device_t dev) if (sc->sc_rec_chan.num_alt > 0) { uint8_t x; + + /* + * Need to set a default alternate interface, else + * some USB audio devices might go into an infinte + * re-enumeration loop: + */ + err = usbd_set_alt_interface_index(sc->sc_udev, + sc->sc_rec_chan.usb_alt[0].iface_index, + sc->sc_rec_chan.usb_alt[0].iface_alt_index); + if (err) { + DPRINTF("setting of alternate index failed: %s!\n", + usbd_errstr(err)); + } for (x = 0; x != sc->sc_rec_chan.num_alt; x++) { device_printf(dev, "Record: %d Hz, %d ch, %s format, " "2x8ms buffer.\n", @@ -5565,7 +5592,6 @@ umidi_open(struct usb_fifo *fifo, int ff } /* clear stall first */ mtx_lock(&chan->mtx); - usbd_xfer_set_stall(chan->xfer[UMIDI_TX_TRANSFER]); chan->write_open_refcount++; sub->write_open = 1; @@ -5664,9 +5690,6 @@ umidi_probe(device_t dev) mtx_lock(&chan->mtx); - /* clear stall first */ - usbd_xfer_set_stall(chan->xfer[UMIDI_RX_TRANSFER]); - /* * NOTE: At least one device will not work properly unless the * BULK IN pipe is open all the time. This might have to do @@ -5771,8 +5794,11 @@ tr_setup: break; default: /* Error */ + + DPRINTF("error=%s\n", usbd_errstr(error)); + if (error != USB_ERR_CANCELLED) { - /* try clear stall first */ + /* try to clear stall first */ usbd_xfer_set_stall(xfer); goto tr_setup; }