Date: Wed, 23 Oct 2013 19:12:02 +0000 (UTC) From: Will Andrews <will@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r257011 - in projects/vps: contrib/llvm/tools/clang/lib/Headers lib/libfetch sys/cam/scsi sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/usb/wlan usr.bin/fetch usr.sbin/watchdogd Message-ID: <201310231912.r9NJC2I4008512@svn.freebsd.org>
index | next in thread | raw e-mail
Author: will Date: Wed Oct 23 19:12:02 2013 New Revision: 257011 URL: http://svnweb.freebsd.org/changeset/base/257011 Log: Sync with svn.7he.at/vps/trunk r203. Merge changes 253795:253808 from svn.freebsd.org/base/head/. to . No merge conflicts. r203 | klaus | 2013-08-01 01:09:07 -0600 (Thu, 01 Aug 2013) | 3 lines Update from FreeBSD r253795 to r253808. Submitted by: Klaus P. Ohrhallinger <k@7he.at> Modified: projects/vps/contrib/llvm/tools/clang/lib/Headers/cpuid.h projects/vps/lib/libfetch/fetch.3 projects/vps/lib/libfetch/http.c projects/vps/sys/cam/scsi/scsi_da.c projects/vps/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c projects/vps/sys/dev/usb/wlan/if_rsu.c projects/vps/usr.bin/fetch/fetch.1 projects/vps/usr.sbin/watchdogd/watchdogd.c Directory Properties: projects/vps/ (props changed) projects/vps/contrib/llvm/ (props changed) projects/vps/contrib/llvm/tools/clang/ (props changed) projects/vps/sys/ (props changed) projects/vps/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/vps/contrib/llvm/tools/clang/lib/Headers/cpuid.h ============================================================================== --- projects/vps/contrib/llvm/tools/clang/lib/Headers/cpuid.h Wed Oct 23 19:06:53 2013 (r257010) +++ projects/vps/contrib/llvm/tools/clang/lib/Headers/cpuid.h Wed Oct 23 19:12:02 2013 (r257011) @@ -25,10 +25,132 @@ #error this header is for x86 only #endif +/* Features in %ecx for level 1 */ +#define bit_SSE3 0x00000001 +#define bit_PCLMULQDQ 0x00000002 +#define bit_DTES64 0x00000004 +#define bit_MONITOR 0x00000008 +#define bit_DSCPL 0x00000010 +#define bit_VMX 0x00000020 +#define bit_SMX 0x00000040 +#define bit_EIST 0x00000080 +#define bit_TM2 0x00000100 +#define bit_SSSE3 0x00000200 +#define bit_CNXTID 0x00000400 +#define bit_FMA 0x00001000 +#define bit_CMPXCHG16B 0x00002000 +#define bit_xTPR 0x00004000 +#define bit_PDCM 0x00008000 +#define bit_PCID 0x00020000 +#define bit_DCA 0x00040000 +#define bit_SSE41 0x00080000 +#define bit_SSE42 0x00100000 +#define bit_x2APIC 0x00200000 +#define bit_MOVBE 0x00400000 +#define bit_POPCNT 0x00800000 +#define bit_TSCDeadline 0x01000000 +#define bit_AESNI 0x02000000 +#define bit_XSAVE 0x04000000 +#define bit_OSXSAVE 0x08000000 +#define bit_AVX 0x10000000 +#define bit_RDRAND 0x40000000 + +/* Features in %edx for level 1 */ +#define bit_FPU 0x00000001 +#define bit_VME 0x00000002 +#define bit_DE 0x00000004 +#define bit_PSE 0x00000008 +#define bit_TSC 0x00000010 +#define bit_MSR 0x00000020 +#define bit_PAE 0x00000040 +#define bit_MCE 0x00000080 +#define bit_CX8 0x00000100 +#define bit_APIC 0x00000200 +#define bit_SEP 0x00000800 +#define bit_MTRR 0x00001000 +#define bit_PGE 0x00002000 +#define bit_MCA 0x00004000 +#define bit_CMOV 0x00008000 +#define bit_PAT 0x00010000 +#define bit_PSE36 0x00020000 +#define bit_PSN 0x00040000 +#define bit_CLFSH 0x00080000 +#define bit_DS 0x00200000 +#define bit_ACPI 0x00400000 +#define bit_MMX 0x00800000 +#define bit_FXSR 0x01000000 +#define bit_SSE 0x02000000 +#define bit_SSE2 0x04000000 +#define bit_SS 0x08000000 +#define bit_HTT 0x10000000 +#define bit_TM 0x20000000 +#define bit_PBE 0x80000000 + +/* Features in %ebx for level 7 sub-leaf 0 */ +#define bit_FSGSBASE 0x00000001 +#define bit_SMEP 0x00000080 +#define bit_ENH_MOVSB 0x00000200 + +/* PIC on i386 uses %ebx, so preserve it. */ +#if __i386__ +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ + __asm(" pushl %%ebx\n" \ + " cpuid\n" \ + " mov %%ebx,%1\n" \ + " popl %%ebx" \ + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level)) + +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ + __asm(" pushl %%ebx\n" \ + " cpuid\n" \ + " mov %%ebx,%1\n" \ + " popl %%ebx" \ + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level), "2"(__count)) +#else +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level)) + +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level), "2"(__count)) +#endif + static __inline int __get_cpuid (unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) { - __asm("cpuid" : "=a"(*__eax), "=b" (*__ebx), "=c"(*__ecx), "=d"(*__edx) - : "0"(__level)); + __cpuid(__level, *__eax, *__ebx, *__ecx, *__edx); return 1; } + +static __inline int __get_cpuid_max (unsigned int __level, unsigned int *__sig) +{ + unsigned int __eax, __ebx, __ecx, __edx; +#if __i386__ + int __cpuid_supported; + + __asm(" pushfl\n" + " popl %%eax\n" + " movl %%eax,%%ecx\n" + " xorl $0x00200000,%%eax\n" + " pushl %%eax\n" + " popfl\n" + " pushfl\n" + " popl %%eax\n" + " movl $0,%0\n" + " cmpl %%eax,%%ecx\n" + " je 1f\n" + " movl $1,%0\n" + "1:" + : "=r" (__cpuid_supported) : : "eax", "ecx"); + if (!__cpuid_supported) + return 0; +#endif + + __cpuid(__level, __eax, __ebx, __ecx, __edx); + if (__sig) + *__sig = __ebx; + return __eax; +} Modified: projects/vps/lib/libfetch/fetch.3 ============================================================================== --- projects/vps/lib/libfetch/fetch.3 Wed Oct 23 19:06:53 2013 (r257010) +++ projects/vps/lib/libfetch/fetch.3 Wed Oct 23 19:12:02 2013 (r257011) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 1998-2011 Dag-Erling Smørgrav +.\" Copyright (c) 1998-2013 Dag-Erling Smørgrav .\" Copyright (c) 2013 Michael Gmelin <freebsd@grem.de> .\" All rights reserved. .\" @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 25, 2013 +.Dd July 30, 2013 .Dt FETCH 3 .Os .Sh NAME @@ -571,6 +571,15 @@ variable is set. Same as .Ev FTP_PROXY , for compatibility. +.It Ev HTTP_ACCEPT +Specifies the value of the +.Va Accept +header for HTTP requests. +If empty, no +.Va Accept +header is sent. +The default is +.Dq */* . .It Ev HTTP_AUTH Specifies HTTP authorization parameters as a colon-separated list of items. Modified: projects/vps/lib/libfetch/http.c ============================================================================== --- projects/vps/lib/libfetch/http.c Wed Oct 23 19:06:53 2013 (r257010) +++ projects/vps/lib/libfetch/http.c Wed Oct 23 19:12:02 2013 (r257011) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2011 Dag-Erling Smørgrav + * Copyright (c) 2000-2013 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1664,6 +1664,12 @@ http_request(struct url *URL, const char } /* other headers */ + if ((p = getenv("HTTP_ACCEPT")) != NULL) { + if (*p != '\0') + http_cmd(conn, "Accept: %s", p); + } else { + http_cmd(conn, "Accept: */*"); + } if ((p = getenv("HTTP_REFERER")) != NULL && *p != '\0') { if (strcasecmp(p, "auto") == 0) http_cmd(conn, "Referer: %s://%s%s", Modified: projects/vps/sys/cam/scsi/scsi_da.c ============================================================================== --- projects/vps/sys/cam/scsi/scsi_da.c Wed Oct 23 19:06:53 2013 (r257010) +++ projects/vps/sys/cam/scsi/scsi_da.c Wed Oct 23 19:12:02 2013 (r257011) @@ -98,7 +98,8 @@ typedef enum { DA_Q_NO_SYNC_CACHE = 0x01, DA_Q_NO_6_BYTE = 0x02, DA_Q_NO_PREVENT = 0x04, - DA_Q_4K = 0x08 + DA_Q_4K = 0x08, + DA_Q_NO_RC16 = 0x10 } da_quirks; #define DA_Q_BIT_STRING \ @@ -106,7 +107,8 @@ typedef enum { "\001NO_SYNC_CACHE" \ "\002NO_6_BYTE" \ "\003NO_PREVENT" \ - "\0044K" + "\0044K" \ + "\005NO_RC16" typedef enum { DA_CCB_PROBE_RC = 0x01, @@ -680,6 +682,11 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_REMOVABLE, "Kingston", "DataTraveler G3", "1.00"}, /*quirks*/ DA_Q_NO_PREVENT }, + { + /* At least several Transcent USB sticks lie on RC16. */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "JetFlash", "Transcend*", + "*"}, /*quirks*/ DA_Q_NO_RC16 + }, /* ATA/SATA devices over SAS/USB/... */ { /* Hitachi Advanced Format (4k) drives */ @@ -2075,7 +2082,8 @@ daregister(struct cam_periph *periph, vo softc->minimum_cmd_size = 16; /* Predict whether device may support READ CAPACITY(16). */ - if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3) { + if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 && + (softc->quirks & DA_Q_NO_RC16) == 0) { softc->flags |= DA_FLAG_CAN_RC16; softc->state = DA_STATE_PROBE_RC16; } Modified: projects/vps/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- projects/vps/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 23 19:06:53 2013 (r257010) +++ projects/vps/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 23 19:12:02 2013 (r257011) @@ -5495,10 +5495,10 @@ zfs_ioctl_init(void) zfs_secpolicy_read, B_FALSE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_ERROR_LOG, zfs_ioc_error_log, - zfs_secpolicy_inject, B_FALSE, POOL_CHECK_SUSPENDED); + zfs_secpolicy_inject, B_FALSE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_DSOBJ_TO_DSNAME, zfs_ioc_dsobj_to_dsname, - zfs_secpolicy_diff, B_FALSE, POOL_CHECK_SUSPENDED); + zfs_secpolicy_diff, B_FALSE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_POOL_GET_HISTORY, zfs_ioc_pool_get_history, zfs_secpolicy_config, B_FALSE, POOL_CHECK_SUSPENDED); @@ -5507,7 +5507,7 @@ zfs_ioctl_init(void) zfs_secpolicy_config, B_TRUE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_CLEAR, zfs_ioc_clear, - zfs_secpolicy_config, B_TRUE, POOL_CHECK_SUSPENDED); + zfs_secpolicy_config, B_TRUE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_POOL_REOPEN, zfs_ioc_pool_reopen, zfs_secpolicy_config, B_TRUE, POOL_CHECK_SUSPENDED); Modified: projects/vps/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- projects/vps/sys/dev/usb/wlan/if_rsu.c Wed Oct 23 19:06:53 2013 (r257010) +++ projects/vps/sys/dev/usb/wlan/if_rsu.c Wed Oct 23 19:12:02 2013 (r257011) @@ -2077,7 +2077,7 @@ rsu_power_off(struct rsu_softc *sc) } static int -rsu_fw_loadsection(struct rsu_softc *sc, uint8_t *buf, int len) +rsu_fw_loadsection(struct rsu_softc *sc, const uint8_t *buf, int len) { struct rsu_data *data; struct r92s_tx_desc *txd; @@ -2111,9 +2111,9 @@ rsu_fw_loadsection(struct rsu_softc *sc, static int rsu_load_firmware(struct rsu_softc *sc) { - struct r92s_fw_hdr *hdr; + const struct r92s_fw_hdr *hdr; struct r92s_fw_priv *dmem; - uint8_t *imem, *emem; + const uint8_t *imem, *emem; int imemsz, ememsz; const struct firmware *fw; size_t size; @@ -2136,7 +2136,7 @@ rsu_load_firmware(struct rsu_softc *sc) error = EINVAL; goto fail; } - hdr = (struct r92s_fw_hdr *)fw->data; + hdr = (const struct r92s_fw_hdr *)fw->data; if (hdr->signature != htole16(0x8712) && hdr->signature != htole16(0x8192)) { device_printf(sc->sc_dev, @@ -2163,7 +2163,7 @@ rsu_load_firmware(struct rsu_softc *sc) error = EINVAL; goto fail; } - imem = (uint8_t *)&hdr[1]; + imem = (const uint8_t *)&hdr[1]; emem = imem + imemsz; /* Load IMEM section. */ @@ -2238,7 +2238,7 @@ rsu_load_firmware(struct rsu_softc *sc) } /* Update DMEM section before loading. */ - dmem = &hdr->priv; + dmem = __DECONST(struct r92s_fw_priv *, &hdr->priv); memset(dmem, 0, sizeof(*dmem)); dmem->hci_sel = R92S_HCI_SEL_USB | R92S_HCI_SEL_8172; dmem->nendpoints = sc->npipes; Modified: projects/vps/usr.bin/fetch/fetch.1 ============================================================================== --- projects/vps/usr.bin/fetch/fetch.1 Wed Oct 23 19:06:53 2013 (r257010) +++ projects/vps/usr.bin/fetch/fetch.1 Wed Oct 23 19:12:02 2013 (r257011) @@ -1,5 +1,6 @@ .\"- -.\" Copyright (c) 2000-2011 Dag-Erling Smørgrav +.\" Copyright (c) 2000-2013 Dag-Erling Smørgrav +.\" Copyright (c) 2013 Michael Gmelin <freebsd@grem.de> .\" All rights reserved. .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used .\" by permission. @@ -29,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2011 +.Dd July 30, 2013 .Dt FETCH 1 .Os .Sh NAME @@ -339,6 +340,7 @@ for a description of additional environm .Ev FTP_PASSWORD , .Ev FTP_PROXY , .Ev ftp_proxy , +.Ev HTTP_ACCEPT , .Ev HTTP_AUTH , .Ev HTTP_PROXY , .Ev http_proxy , Modified: projects/vps/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- projects/vps/usr.sbin/watchdogd/watchdogd.c Wed Oct 23 19:06:53 2013 (r257010) +++ projects/vps/usr.sbin/watchdogd/watchdogd.c Wed Oct 23 19:12:02 2013 (r257011) @@ -774,7 +774,7 @@ parseargs(int argc, char *argv[]) struct timespec ts; pow2ns_to_ts(timeout, &ts); - if (pretimeout >= ts.tv_sec) { + if (pretimeout >= (uintmax_t)ts.tv_sec) { errx(EX_USAGE, "pretimeout (%d) >= timeout (%d -> %ld)\n" "see manual section TIMEOUT RESOLUTION",help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310231912.r9NJC2I4008512>
