svn commit: r269621 - head/sys/boot/common
Author: marcel Date: Wed Aug 6 00:36:04 2014 New Revision: 269621 URL: http://svnweb.freebsd.org/changeset/base/269621 Log: Optionally include the install command as found on Juniper products like EX and SRX. The install command uses pkgfs to extract a kernel, zero or more modules and a root file system from the specified package and boots the kernel. The name of the kernel, the list of modules and the name of the root file system can be specified by putting a file called "metatags in the package. The package to use is given by an URL. The schemes supported are tftp and file. For the file scheme, the disk is currently hardcoded but that should really look for the package on all devices and partititions. Obtained from:Juniper Networks, Inc. Added: head/sys/boot/common/install.c (contents, props changed) Modified: head/sys/boot/common/Makefile.inc Modified: head/sys/boot/common/Makefile.inc == --- head/sys/boot/common/Makefile.inc Wed Aug 6 00:35:48 2014 (r269620) +++ head/sys/boot/common/Makefile.inc Wed Aug 6 00:36:04 2014 (r269621) @@ -72,4 +72,9 @@ MAN+= ../forth/version.4th.8 CFLAGS+= -DBOOT_PROMPT_123 .endif +.if defined(LOADER_INSTALL_SUPPORT) +SRCS+= install.c +CFLAGS+=-I${.CURDIR}/../../../../lib/libstand +.endif + MAN+= loader.8 Added: head/sys/boot/common/install.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/common/install.c Wed Aug 6 00:36:04 2014 (r269621) @@ -0,0 +1,339 @@ +/*- + * Copyright (c) 2008-2014, Juniper Networks, Inc. + * 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 ``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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "bootstrap.h" + +extern struct in_addr rootip; +extern struct in_addr servip; + +extern int pkgfs_init(const char *, struct fs_ops *); +extern void pkgfs_cleanup(void); + +COMMAND_SET(install, "install", "install software package", command_install); + +static char *inst_kernel; +static char **inst_modules; +static char *inst_rootfs; + +static int +setpath(char **what, char *val) +{ + char *path; + size_t len; + int rel; + + len = strlen(val) + 1; + rel = (val[0] != '/') ? 1 : 0; + path = malloc(len + rel); + if (path == NULL) + return (ENOMEM); + path[0] = '/'; + strcpy(path + rel, val); + + *what = path; + return (0); +} + +static int +setmultipath(char ***what, char *val) +{ + char *s, *v; + int count, error, idx; + + count = 0; + v = val; + do { + count++; + s = strchr(v, ','); + v = (s == NULL) ? NULL : s + 1; + } while (v != NULL); + + *what = calloc(count + 1, sizeof(char *)); + if (*what == NULL) + return (ENOMEM); + + for (idx = 0; idx < count; idx++) { + s = strchr(val, ','); + if (s != NULL) + *s++ = '\0'; + error = setpath(*what + idx, val); + if (error) + return (error); + val = s; + } + + return (0); +} + +static int +read_metatags(int fd) +{ + char buf[1024]; + char *p, *tag, *val; + ssize_t fsize; + int error; + + fsize = read(fd, buf, sizeof(buf)); + if (fsize == -1) + return (errno); + + /* +* Assume that if we read a whole buffer worth of data, we +* haven't read the
svn commit: r269619 - stable/10/sys/sys
Author: emaste Date: Wed Aug 6 00:35:32 2014 New Revision: 269619 URL: http://svnweb.freebsd.org/changeset/base/269619 Log: MFC r269282: Correct typo in comment PR: 192231 Modified: stable/10/sys/sys/procdesc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/procdesc.h == --- stable/10/sys/sys/procdesc.hWed Aug 6 00:06:25 2014 (r269618) +++ stable/10/sys/sys/procdesc.hWed Aug 6 00:35:32 2014 (r269619) @@ -47,7 +47,7 @@ * Locking key: * (c) - Constant after initial setup. * (p) - Protected by the process descriptor mutex. - * (r) - Atomic eference count. + * (r) - Atomic reference count. * (s) - Protected by selinfo. * (t) - Protected by the proctree_lock */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269620 - in head/sys: dev/fb dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb powerpc/ps3 sys
Author: nwhitehorn Date: Wed Aug 6 00:35:48 2014 New Revision: 269620 URL: http://svnweb.freebsd.org/changeset/base/269620 Log: Retire various intertwined bits of fbd(4) and vt_fb, in particular the pixel modification indirection. No actual drivers use it and those that might (e.g. creatorfb) use custom implementations of vd_bitbltchr(). Modified: head/sys/dev/fb/fbd.c head/sys/dev/vt/hw/efifb/efifb.c head/sys/dev/vt/hw/fb/vt_early_fb.c head/sys/dev/vt/hw/fb/vt_fb.c head/sys/dev/vt/hw/fb/vt_fb.h head/sys/dev/vt/hw/ofwfb/ofwfb.c head/sys/powerpc/ps3/ps3_syscons.c head/sys/sys/fbio.h Modified: head/sys/dev/fb/fbd.c == --- head/sys/dev/fb/fbd.c Wed Aug 6 00:35:32 2014(r269619) +++ head/sys/dev/fb/fbd.c Wed Aug 6 00:35:48 2014(r269620) @@ -165,6 +165,10 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o struct fb_info *info; info = dev->si_drv1; + + if ((info->fb_flags & FB_FLAG_NOMMAP) || info->fb_pbase == 0) + return (ENODEV); + if (offset < info->fb_size) { *paddr = info->fb_pbase + offset; return (0); @@ -172,103 +176,6 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o return (EINVAL); } - -static void -vt_fb_mem_wr1(struct fb_info *sc, uint32_t o, uint8_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint8_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_wr2(struct fb_info *sc, uint32_t o, uint16_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint16_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_wr4(struct fb_info *sc, uint32_t o, uint32_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint32_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, -uint32_t size) -{ - - memmove((void *)(sc->fb_vbase + offset_to), (void *)(sc->fb_vbase + - offset_from), size); -} - -static void -vt_fb_indir_wr1(struct fb_info *sc, uint32_t o, uint8_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 1); -} - -static void -vt_fb_indir_wr2(struct fb_info *sc, uint32_t o, uint16_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 2); -} - -static void -vt_fb_indir_wr4(struct fb_info *sc, uint32_t o, uint32_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 4); -} - -static void -vt_fb_indir_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, -uint32_t size) -{ - - sc->copy(sc->fb_priv, offset_to, offset_from, size); -} - -int -fb_probe(struct fb_info *info) -{ - - if (info->fb_size == 0) - return (ENXIO); - - if (info->fb_write != NULL) { - if (info->fb_read == NULL) { - return (EINVAL); - } - info->fb_flags |= FB_FLAG_NOMMAP; - info->wr1 = &vt_fb_indir_wr1; - info->wr2 = &vt_fb_indir_wr2; - info->wr4 = &vt_fb_indir_wr4; - info->copy = &vt_fb_indir_copy; - } else if (info->fb_vbase != 0) { - if (info->fb_pbase == 0) { - info->fb_flags |= FB_FLAG_NOMMAP; - } - info->wr1 = &vt_fb_mem_wr1; - info->wr2 = &vt_fb_mem_wr2; - info->wr4 = &vt_fb_mem_wr4; - info->copy = &vt_fb_mem_copy; - } else - return (ENXIO); - - return (0); -} - - static int fb_init(struct fb_list_entry *entry, int unit) { @@ -329,10 +236,6 @@ fbd_register(struct fb_info* info) return (0); } - err = fb_probe(info); - if (err) - return (err); - entry = malloc(sizeof(struct fb_list_entry), M_DEVBUF, M_WAITOK|M_ZERO); entry->fb_info = info; @@ -342,8 +245,10 @@ fbd_register(struct fb_info* info) if (err) return (err); - if (first) - vt_fb_attach(info); + if (first) { + if (vt_fb_attach(info) == CN_DEAD) + return (ENXIO); + } return (0); } Modified: head/sys/dev/vt/hw/efifb/efifb.c == --- head/sys/dev/vt/hw/efifb/efifb.cWed Aug 6 00:35:32 2014 (r269619) +++ head/sys/dev/vt/hw/efifb/efifb.cWed Aug 6 00:35:48 2014 (r269620) @@ -154,12 +154,8 @@ vt_efifb_init(struct vt_device *vd) info->fb_width = MIN(info->fb_width, VT_FB_DEFAULT_WIDTH); info->fb_height = MIN(info->fb_height, VT_FB_DEFAULT_HEIGHT); - fb_probe(info);
svn commit: r269618 - head/sys/boot/common
Author: marcel Date: Wed Aug 6 00:06:25 2014 New Revision: 269618 URL: http://svnweb.freebsd.org/changeset/base/269618 Log: Rename command_unload() to unload() and re-implement command_unload() in terms of unload() This allows unloading all files by the loader itself. Obtained from:Juniper Networks, Inc. Modified: head/sys/boot/common/bootstrap.h head/sys/boot/common/module.c Modified: head/sys/boot/common/bootstrap.h == --- head/sys/boot/common/bootstrap.hTue Aug 5 23:58:49 2014 (r269617) +++ head/sys/boot/common/bootstrap.hWed Aug 6 00:06:25 2014 (r269618) @@ -229,6 +229,7 @@ extern struct preloaded_file*preloaded_ intmod_load(char *name, struct mod_depend *verinfo, int argc, char *argv[]); intmod_loadkld(const char *name, int argc, char *argv[]); +void unload(void); struct preloaded_file *file_alloc(void); struct preloaded_file *file_findfile(char *name, char *type); Modified: head/sys/boot/common/module.c == --- head/sys/boot/common/module.c Tue Aug 5 23:58:49 2014 (r269617) +++ head/sys/boot/common/module.c Wed Aug 6 00:06:25 2014 (r269618) @@ -192,13 +192,11 @@ command_load_geli(int argc, char *argv[] return(file_loadraw(argv[2], typestr) ? CMD_OK : CMD_ERROR); } -COMMAND_SET(unload, "unload", "unload all modules", command_unload); - -static int -command_unload(int argc, char *argv[]) +void +unload(void) { -struct preloaded_file *fp; - +struct preloaded_file *fp; + while (preloaded_files != NULL) { fp = preloaded_files; preloaded_files = preloaded_files->f_next; @@ -206,6 +204,14 @@ command_unload(int argc, char *argv[]) } loadaddr = 0; unsetenv("kernelname"); +} + +COMMAND_SET(unload, "unload", "unload all modules", command_unload); + +static int +command_unload(int argc, char *argv[]) +{ +unload(); return(CMD_OK); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269617 - head/sys/dev/hptmv
Author: jhb Date: Tue Aug 5 23:58:49 2014 New Revision: 269617 URL: http://svnweb.freebsd.org/changeset/base/269617 Log: Various fixes to hptmv(4): - Replace the global driver lock with a per-instance device lock. - Use the per-instance device lock instead of Giant for the CAM sim lock. - Add global locks to protect the adapter list and DPC queues. - Use wakeup() and mtx_sleep() to wait for certain events like the controller going idle rather than polling via timeouts passed to tsleep(). - Use callout(9) instead of timeout(9). - Mark the interrupt handler MPSAFE. - Remove compat shims for FreeBSD versions older than 8.0. Reviewed by: Steve Chang Modified: head/sys/dev/hptmv/entry.c head/sys/dev/hptmv/global.h head/sys/dev/hptmv/hptproc.c head/sys/dev/hptmv/ioctl.c head/sys/dev/hptmv/mv.c head/sys/dev/hptmv/osbsd.h Modified: head/sys/dev/hptmv/entry.c == --- head/sys/dev/hptmv/entry.c Tue Aug 5 23:55:23 2014(r269616) +++ head/sys/dev/hptmv/entry.c Tue Aug 5 23:58:49 2014(r269617) @@ -40,20 +40,12 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version >= 50) #include #include -#endif +#include -#if (__FreeBSD_version >= 50) #include #include -#else -#include -#include -#include -#include -#endif #ifndef __KERNEL__ #define __KERNEL__ @@ -119,6 +111,7 @@ static void HPTLIBAPI fOsCommandDone(_VB static void ccb_done(union ccb *ccb); static void hpt_queue_ccb(union ccb **ccb_Q, union ccb *ccb); static void hpt_free_ccb(union ccb **ccb_Q, union ccb *ccb); +static void hpt_intr_locked(IAL_ADAPTER_T *pAdapter); static voidhptmv_free_edma_queues(IAL_ADAPTER_T *pAdapter); static voidhptmv_free_channel(IAL_ADAPTER_T *pAdapter, MV_U8 channelNum); static voidhandleEdmaError(_VBUS_ARG PCommand pCmd); @@ -143,6 +136,8 @@ static MV_BOOLEAN hptmv_event_notify(MV_ #define ccb_ccb_ptr spriv_ptr0 #define ccb_adapter ccb_h.spriv_ptr1 +static struct sx hptmv_list_lock; +SX_SYSINIT(hptmv_list_lock, &hptmv_list_lock, "hptmv list"); IAL_ADAPTER_T *gIal_Adapter = 0; IAL_ADAPTER_T *pCurAdapter = 0; static MV_SATA_CHANNEL gMvSataChannels[MAX_VBUS][MV_SATA_CHANNELS_NUM]; @@ -159,48 +154,11 @@ UCHAR DPC_Request_Nums = 0; static ST_HPT_DPC DpcQueue[MAX_DPC]; static int DpcQueue_First=0; static int DpcQueue_Last = 0; +static struct mtx DpcQueue_Lock; +MTX_SYSINIT(hpmtv_dpc_lock, &DpcQueue_Lock, "hptmv dpc", MTX_DEF); char DRIVER_VERSION[] = "v1.16"; -#if (__FreeBSD_version >= 50) -static struct mtx driver_lock; -intrmask_t lock_driver() -{ - - intrmask_t spl = 0; - mtx_lock(&driver_lock); - return spl; -} -void unlock_driver(intrmask_t spl) -{ - mtx_unlock(&driver_lock); -} -#else -static int driver_locked = 0; -intrmask_t lock_driver() -{ - intrmask_t spl = splcam(); -loop: - while (driver_locked) - tsleep(&driver_locked, PRIBIO, "hptlck", hz); - atomic_add_int(&driver_locked, 1); - if (driver_locked>1) { - atomic_subtract_int(&driver_locked, 1); - goto loop; - } - return spl; -} - -void unlock_driver(intrmask_t spl) -{ - atomic_subtract_int(&driver_locked, 1); - if (driver_locked==0) { - wakeup(&driver_locked); - } - splx(spl); -} -#endif - /*** * Name: hptmv_free_channel * @@ -790,7 +748,8 @@ hptmv_handle_event(void * data, int flag IAL_ADAPTER_T *pAdapter = (IAL_ADAPTER_T *)data; MV_SATA_ADAPTER *pMvSataAdapter = &pAdapter->mvSataAdapter; MV_U8 channelIndex; - + + mtx_assert(&pAdapter->lock, MA_OWNED); /* mvOsSemTake(&pMvSataAdapter->semaphore); */ for (channelIndex = 0; channelIndex < MV_SATA_CHANNELS_NUM; channelIndex++) { @@ -898,7 +857,7 @@ hptmv_event_notify(MV_SATA_ADAPTER *pMvS KdPrint(("RR18xx [%d,%d]: device connected event received\n", pMvSataAdapter->adapterId, channel)); /* Delete previous timers (if multiple drives connected in the same time */ - pAdapter->event_timer_connect = timeout(hptmv_handle_event_connect, pAdapter, 10*hz); + callout_reset(&pAdapter->event_timer_connect, 10 * hz, hptmv_handle_event_connect, pAdapter); } else if (param1 == EVENT_DISCONNECT) { @@ -907,7 +866,7 @@ hptmv_event_notify(MV_SATA_ADAPTER *pMvS pMvSataAdapter->adapterId, channel)); device_change(pAdapter, channel, FALSE);
svn commit: r269616 - head/sys/boot/common
Author: marcel Date: Tue Aug 5 23:55:23 2014 New Revision: 269616 URL: http://svnweb.freebsd.org/changeset/base/269616 Log: In command_lsmod() prevent overrunning lbuf due to long path names. Call pager_output() separately for the module name. Obtained from:Juniper Networks, Inc. Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c == --- head/sys/boot/common/module.c Tue Aug 5 23:47:26 2014 (r269615) +++ head/sys/boot/common/module.c Tue Aug 5 23:55:23 2014 (r269616) @@ -237,8 +237,10 @@ command_lsmod(int argc, char *argv[]) pager_open(); for (fp = preloaded_files; fp; fp = fp->f_next) { - sprintf(lbuf, " %p: %s (%s, 0x%lx)\n", - (void *) fp->f_addr, fp->f_name, fp->f_type, (long) fp->f_size); + sprintf(lbuf, " %p: ", (void *) fp->f_addr); + pager_output(lbuf); + pager_output(fp->f_name); + sprintf(lbuf, " (%s, 0x%lx)\n", fp->f_type, (long)fp->f_size); pager_output(lbuf); if (fp->f_args != NULL) { pager_output("args: "); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269615 - head/sys/dev/hptrr
Author: jhb Date: Tue Aug 5 23:47:26 2014 New Revision: 269615 URL: http://svnweb.freebsd.org/changeset/base/269615 Log: Various fixes to hptrr(4): - Use the existing vbus locks instead of Giant for the CAM sim lock. - Use callout(9) instead of timeout(9). - Mark the interrupt handler MPSAFE. - Don't attempt to pass data in the softc from probe() to attach(). - Remove compat shims for FreeBSD versions older than 8.0. Reviewed by: Steve Chang Modified: head/sys/dev/hptrr/hptrr_os_bsd.c head/sys/dev/hptrr/hptrr_osm_bsd.c head/sys/dev/hptrr/os_bsd.h Modified: head/sys/dev/hptrr/hptrr_os_bsd.c == --- head/sys/dev/hptrr/hptrr_os_bsd.c Tue Aug 5 23:41:40 2014 (r269614) +++ head/sys/dev/hptrr/hptrr_os_bsd.c Tue Aug 5 23:47:26 2014 (r269615) @@ -220,9 +220,9 @@ void os_request_timer(void * osext, HPT PVBUS_EXT vbus_ext = osext; HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS); - - untimeout(os_timer_for_ldm, vbus_ext, vbus_ext->timer); - vbus_ext->timer = timeout(os_timer_for_ldm, vbus_ext, interval * hz / 100); + + callout_reset(&vbus_ext->timer, interval * hz / 100, + os_timer_for_ldm, vbus_ext); } HPT_TIME os_query_time(void) Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c == --- head/sys/dev/hptrr/hptrr_osm_bsd.c Tue Aug 5 23:41:40 2014 (r269614) +++ head/sys/dev/hptrr/hptrr_osm_bsd.c Tue Aug 5 23:47:26 2014 (r269615) @@ -39,32 +39,38 @@ __FBSDID("$FreeBSD$"); static int attach_generic = 0; TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic); -static int hpt_probe(device_t dev) +static HIM *hpt_match(device_t dev) { PCI_ID pci_id; - HIM *him; int i; - PHBA hba; + HIM *him; /* Some of supported chips are used not only by HPT. */ if (pci_get_vendor(dev) != 0x1103 && !attach_generic) - return (ENXIO); + return (NULL); for (him = him_list; him; him = him->next) { for (i=0; him->get_supported_device_id(i, &pci_id); i++) { if ((pci_get_vendor(dev) == pci_id.vid) && (pci_get_device(dev) == pci_id.did)){ - KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", - pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) - )); - device_set_desc(dev, him->name); - hba = (PHBA)device_get_softc(dev); - memset(hba, 0, sizeof(HBA)); - hba->ext_type = EXT_TYPE_HBA; - hba->ldm_adapter.him = him; - return (BUS_PROBE_DEFAULT); + return (him); } } } + return (NULL); +} + +static int hpt_probe(device_t dev) +{ + HIM *him; + + him = hpt_match(dev); + if (him != NULL) { + KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) + )); + device_set_desc(dev, him->name); + return (BUS_PROBE_DEFAULT); + } return (ENXIO); } @@ -72,17 +78,19 @@ static int hpt_probe(device_t dev) static int hpt_attach(device_t dev) { PHBA hba = (PHBA)device_get_softc(dev); - HIM *him = hba->ldm_adapter.him; + HIM *him; PCI_ID pci_id; HPT_UINT size; PVBUS vbus; PVBUS_EXT vbus_ext; KdPrint(("hpt_attach(%d/%d/%d)", pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev))); - -#if __FreeBSD_version >=44 + + him = hpt_match(dev); + hba->ext_type = EXT_TYPE_HBA; + hba->ldm_adapter.him = him; + pci_enable_busmaster(dev); -#endif pci_id.vid = pci_get_vendor(dev); pci_id.did = pci_get_device(dev); @@ -90,8 +98,6 @@ static int hpt_attach(device_t dev) size = him->get_adapter_size(&pci_id); hba->ldm_adapter.him_handle = malloc(size, M_DEVBUF, M_WAITOK); - if (!hba->ldm_adapter.him_handle) - return ENXIO; hba->pcidev = dev; hba->pciaddr.tree = 0; @@ -101,7 +107,7 @@ static int hpt_attach(device_t dev) if (!him->create_adapter(&pci_id, hba->pciaddr, hba->ldm_adapter.him_handle, hba)) { free(hba->ldm_adapter.him_handle, M_DEVBUF); - return -1; + return ENXIO; } os_printk("adapter at PCI %d:%d:%d, IRQ %d", @@ -109,12 +115,8 @@ static int hpt_attach(device_t dev) if (!ldm_register_adapter
svn commit: r269614 - head/sys/boot/common
Author: marcel Date: Tue Aug 5 23:41:40 2014 New Revision: 269614 URL: http://svnweb.freebsd.org/changeset/base/269614 Log: In file_loadraw() print the name of the file as well as its size so that we know what file is being loaded and how big the file is once complete. This has ELF modules and disk images emit the same output. Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c == --- head/sys/boot/common/module.c Tue Aug 5 23:39:35 2014 (r269613) +++ head/sys/boot/common/module.c Tue Aug 5 23:41:40 2014 (r269614) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bootstrap.h" @@ -387,6 +388,8 @@ file_loadraw(char *name, char *type) if (archsw.arch_loadaddr != NULL) loadaddr = archsw.arch_loadaddr(LOAD_RAW, name, loadaddr); +printf("%s ", name); + laddr = loadaddr; for (;;) { /* read in 4k chunks; size is not really important */ @@ -401,7 +404,9 @@ file_loadraw(char *name, char *type) } laddr += got; } - + +printf("size=%#jx\n", (uintmax_t)(laddr - loadaddr)); + /* Looks OK so far; create & populate control structure */ fp = file_alloc(); fp->f_name = strdup(name); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269613 - head/sys/dev/hptnr
Author: jhb Date: Tue Aug 5 23:39:35 2014 New Revision: 269613 URL: http://svnweb.freebsd.org/changeset/base/269613 Log: Various fixes to hptnr(4): - Use the existing vbus locks instead of Giant for the CAM sim lock. - Use callout(9) instead of timeout(9). - Mark the interrupt handler MPSAFE. - Don't attempt to pass data in the softc from probe() to attach(). - Remove compat shims for FreeBSD versions older than 8.0. Reviewed by: Steve Chang Modified: head/sys/dev/hptnr/hptnr_os_bsd.c head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptnr/os_bsd.h Modified: head/sys/dev/hptnr/hptnr_os_bsd.c == --- head/sys/dev/hptnr/hptnr_os_bsd.c Tue Aug 5 23:35:19 2014 (r269612) +++ head/sys/dev/hptnr/hptnr_os_bsd.c Tue Aug 5 23:39:35 2014 (r269613) @@ -86,25 +86,10 @@ BUS_ADDRESS get_dmapool_phy_addr(void *o return (BUS_ADDRESS)vtophys(dmapool_virt_addr); } -#if __FreeBSD_version < 500043 -HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) -{ - HPT_U32 v; - pcicfgregs pciref; - - pciref.bus = bus; - pciref.slot = dev; - pciref.func = func; - - v = pci_cfgread(&pciref, reg, 4); - return v; -}/* PCI space access */ -#else HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) { return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4);; }/* PCI space access */ -#endif void *os_map_pci_bar( void *osext, @@ -249,9 +234,9 @@ void os_request_timer(void * osext, HPT PVBUS_EXT vbus_ext = osext; HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS); - - untimeout(os_timer_for_ldm, vbus_ext, vbus_ext->timer); - vbus_ext->timer = timeout(os_timer_for_ldm, vbus_ext, interval * hz / 100); + + callout_reset(&vbus_ext->timer, interval * hz / 100, + os_timer_for_ldm, vbus_ext); } HPT_TIME os_query_time(void) Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c == --- head/sys/dev/hptnr/hptnr_osm_bsd.c Tue Aug 5 23:35:19 2014 (r269612) +++ head/sys/dev/hptnr/hptnr_osm_bsd.c Tue Aug 5 23:39:35 2014 (r269613) @@ -31,12 +31,11 @@ #include #include -static int hpt_probe(device_t dev) +static HIM *hpt_match(device_t dev) { PCI_ID pci_id; HIM *him; int i; - PHBA hba; for (him = him_list; him; him = him->next) { for (i=0; him->get_supported_device_id(i, &pci_id); i++) { @@ -44,36 +43,46 @@ static int hpt_probe(device_t dev) him->get_controller_count(&pci_id,0,0); if ((pci_get_vendor(dev) == pci_id.vid) && (pci_get_device(dev) == pci_id.did)){ - KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", - pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) - )); - device_set_desc(dev, him->name); - hba = (PHBA)device_get_softc(dev); - memset(hba, 0, sizeof(HBA)); - hba->ext_type = EXT_TYPE_HBA; - hba->ldm_adapter.him = him; - return 0; + return (him); } } } + return (NULL); +} + +static int hpt_probe(device_t dev) +{ + HIM *him; + + him = hpt_match(dev); + if (him != NULL) { + KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) + )); + device_set_desc(dev, him->name); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int hpt_attach(device_t dev) { PHBA hba = (PHBA)device_get_softc(dev); - HIM *him = hba->ldm_adapter.him; + HIM *him; PCI_ID pci_id; HPT_UINT size; PVBUS vbus; PVBUS_EXT vbus_ext; KdPrint(("hpt_attach(%d/%d/%d)", pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev))); - -#if __FreeBSD_version >=44 + + him = hpt_match(dev); + hba->ext_type = EXT_TYPE_HBA; + hba->ldm_adapter.him = him; + pci_enable_busmaster(dev); -#endif pci_id.vid = pci_get_vendor(dev); pci_id.did = pci_get_device(dev); @@ -82,8 +91,6 @@ static int hpt_attach(device_t dev) size = him->get_adapter_size(&pci_id); hba->ldm_adapter.him_handle = malloc(size, M_DEVBUF, M_WAITOK); - if (!hba->ldm_adapter.him_handle) - return ENXIO; hba->pcidev = dev; hba->pciaddr.tr
svn commit: r269612 - head/sys/dev/hptiop
Author: jhb Date: Tue Aug 5 23:35:19 2014 New Revision: 269612 URL: http://svnweb.freebsd.org/changeset/base/269612 Log: Various fixes to hptiop(4): - Use callout(9) instead of timeout(9). - Use the existing hba lock as the CAM sim lock instead of Giant. - Mark interrupt handler MPSAFE. - Reorder detach and destroy the hba lock in detach. Reviewed by: Steve Chang Modified: head/sys/dev/hptiop/hptiop.c head/sys/dev/hptiop/hptiop.h Modified: head/sys/dev/hptiop/hptiop.c == --- head/sys/dev/hptiop/hptiop.cTue Aug 5 23:32:53 2014 (r269611) +++ head/sys/dev/hptiop/hptiop.cTue Aug 5 23:35:19 2014 (r269612) @@ -643,7 +643,7 @@ static void hptiop_request_callback_mvfr ccb = (union ccb *)srb->ccb; - untimeout(hptiop_reset_adapter, hba, srb->timeout_ch); + callout_stop(&srb->timeout); if (ccb->ccb_h.flags & CAM_CDB_POINTER) cdb = ccb->csio.cdb_io.cdb_ptr; @@ -2013,12 +2013,13 @@ static int hptiop_attach(device_t dev) } hba->sim = cam_sim_alloc(hptiop_action, hptiop_poll, driver_name, - hba, unit, &Giant, hba->max_requests - 1, 1, devq); + hba, unit, &hba->lock, hba->max_requests - 1, 1, devq); if (!hba->sim) { device_printf(dev, "cam_sim_alloc failed\n"); cam_simq_free(devq); goto srb_dmamap_unload; } + hptiop_lock_adapter(hba); if (xpt_bus_register(hba->sim, dev, 0) != CAM_SUCCESS) { device_printf(dev, "xpt_bus_register failed\n"); @@ -2031,6 +2032,7 @@ static int hptiop_attach(device_t dev) device_printf(dev, "xpt_create_path failed\n"); goto deregister_xpt_bus; } + hptiop_unlock_adapter(hba); bzero(&set_config, sizeof(set_config)); set_config.iop_id = unit; @@ -2056,7 +2058,7 @@ static int hptiop_attach(device_t dev) goto free_hba_path; } - if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM, + if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM | INTR_MPSAFE, NULL, hptiop_pci_intr, hba, &hba->irq_handle)) { device_printf(dev, "allocate intr function failed!\n"); @@ -2086,6 +2088,7 @@ teartown_irq_resource: free_irq_resource: bus_release_resource(dev, SYS_RES_IRQ, 0, hba->irq_res); + hptiop_lock_adapter(hba); free_hba_path: xpt_free_path(hba->path); @@ -2094,6 +2097,7 @@ deregister_xpt_bus: free_cam_sim: cam_sim_free(hba->sim, /*free devq*/ TRUE); + hptiop_unlock_adapter(hba); srb_dmamap_unload: if (hba->uncached_ptr) @@ -2145,9 +2149,10 @@ static int hptiop_detach(device_t dev) if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_STOP_BACKGROUND_TASK, 6)) goto out; + hptiop_unlock_adapter(hba); hptiop_release_resource(hba); - error = 0; + return (0); out: hptiop_unlock_adapter(hba); return error; @@ -2182,7 +2187,10 @@ static void hptiop_pci_intr(void *arg) static void hptiop_poll(struct cam_sim *sim) { - hptiop_pci_intr(cam_sim_softc(sim)); + struct hpt_iop_hba *hba; + + hba = cam_sim_softc(sim); + hba->ops->iop_intr(hba); } static void hptiop_async(void * callback_arg, u_int32_t code, @@ -2289,21 +2297,20 @@ static void hptiop_action(struct cam_sim switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: - hptiop_lock_adapter(hba); if (ccb->ccb_h.target_lun != 0 || ccb->ccb_h.target_id >= hba->max_devices || (ccb->ccb_h.flags & CAM_CDB_PHYS)) { ccb->ccb_h.status = CAM_TID_INVALID; xpt_done(ccb); - goto scsi_done; + return; } if ((srb = hptiop_get_srb(hba)) == NULL) { device_printf(hba->pcidev, "srb allocated failed"); ccb->ccb_h.status = CAM_REQ_CMP_ERR; xpt_done(ccb); - goto scsi_done; + return; } srb->ccb = ccb; @@ -2322,19 +2329,15 @@ static void hptiop_action(struct cam_sim ccb->ccb_h.status = CAM_REQ_CMP_ERR; hptiop_free_srb(hba, srb); xpt_done(ccb); - goto scsi_done; + return; } -scsi_done: - hptiop_unlock_adapter(hba); return; case XPT_RESET_BUS: device_printf(hba->pcidev, "reset adapter"); - hptiop_lock_ad
svn commit: r269611 - head/sys/dev/hpt27xx
Author: jhb Date: Tue Aug 5 23:32:53 2014 New Revision: 269611 URL: http://svnweb.freebsd.org/changeset/base/269611 Log: Remove compat shims for FreeBSD versions older than 8.0. Reviewed by: Steve Chang Modified: head/sys/dev/hpt27xx/hpt27xx_os_bsd.c head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c head/sys/dev/hpt27xx/os_bsd.h Modified: head/sys/dev/hpt27xx/hpt27xx_os_bsd.c == --- head/sys/dev/hpt27xx/hpt27xx_os_bsd.c Tue Aug 5 23:16:31 2014 (r269610) +++ head/sys/dev/hpt27xx/hpt27xx_os_bsd.c Tue Aug 5 23:32:53 2014 (r269611) @@ -78,57 +78,9 @@ void os_pci_writel (void *osext, HPT_U8 pci_write_config(((PHBA)osext)->pcidev, offset, value, 4); } -#if __FreeBSD_version < 500043 /* PCI space access */ HPT_U8 pcicfg_read_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) { - HPT_U8 v; - pcicfgregs pciref; - - pciref.bus = bus; - pciref.slot = dev; - pciref.func = func; - - v = pci_cfgread(&pciref, reg, 1); - return v; -} -HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) -{ - HPT_U32 v; - pcicfgregs pciref; - - pciref.bus = bus; - pciref.slot = dev; - pciref.func = func; - - v = pci_cfgread(&pciref, reg, 4); - return v; -} -void pcicfg_write_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U8 v) -{ - pcicfgregs pciref; - - pciref.hose = -1; - pciref.bus = bus; - pciref.slot = dev; - pciref.func = func; - - pci_cfgwrite(&pciref, reg, v, 1); -} -void pcicfg_write_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U32 v) -{ - pcicfgregs pciref; - - pciref.hose = -1; - pciref.bus = bus; - pciref.slot = dev; - pciref.func = func; - - pci_cfgwrite(&pciref, reg, v, 4); -}/* PCI space access */ -#else -HPT_U8 pcicfg_read_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) -{ return (HPT_U8)pci_cfgregread(bus, dev, func, reg, 1); } HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) @@ -143,7 +95,6 @@ void pcicfg_write_dword(HPT_U8 bus, HPT_ { pci_cfgregwrite(bus, dev, func, reg, v, 4); }/* PCI space access */ -#endif void *os_map_pci_bar( void *osext, Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c == --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Aug 5 23:16:31 2014 (r269610) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Aug 5 23:32:53 2014 (r269611) @@ -80,9 +80,7 @@ static int hpt_attach(device_t dev) him = hpt_match(dev); hba->ext_type = EXT_TYPE_HBA; hba->ldm_adapter.him = him; -#if __FreeBSD_version >=44 pci_enable_busmaster(dev); -#endif pci_id.vid = pci_get_vendor(dev); pci_id.did = pci_get_device(dev); @@ -788,12 +786,10 @@ static void hpt_action(struct cam_sim *s strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); -#if (__FreeBSD_version >= 80) cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; -#endif cpi->ccb_h.status = CAM_REQ_CMP; break; } @@ -969,19 +965,7 @@ static struct cdevsw hpt_cdevsw = { .d_close = hpt_close, .d_ioctl = hpt_ioctl, .d_name = driver_name, -#if __FreeBSD_version>=503000 .d_version =D_VERSION, -#endif -#if (__FreeBSD_version>=503000 && __FreeBSD_version<600034) - .d_flags = D_NEEDGIANT, -#endif -#if __FreeBSD_version<600034 -#if __FreeBSD_version>501000 - .d_maj =MAJOR_AUTO, -#else - .d_maj = HPT_DEV_MAJOR, -#endif -#endif }; static struct intr_config_hook hpt_ich; @@ -1018,9 +1002,7 @@ static void hpt_final_init(void *dummy) /* initializing hardware */ ldm_for_each_vbus(vbus, vbus_ext) { /* make timer available here */ -#if (__FreeBSD_version >= 50) mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF); -#endif callout_init_mtx(&vbus_ext->timer, &vbus_ext->lock, 0); if (hpt_init_vbus(vbus_ext)) { os_printk("fail to initialize hardware"); @@ -1043,10 +1025,8 @@ static void hpt_final_init(void *dummy) os_max_sg_descriptors, /* nsegments */ 0x1,/* maxsegsize */ BUS_DMA_WAITOK, /* flags */ -#if __FreeBSD_version>502000 busdma_lock_mutex, /* lockfunc */ &vbu
Re: svn commit: r269610 - in vendor/resolver: 9.5.0 9.5.0/include 9.5.0/include/arpa 9.5.0/lib/libc/include 9.5.0/lib/libc/include/isc 9.5.0/lib/libc/inet 9.5.0/lib/libc/isc 9.5.0/lib/libc/nameser 9.5
On 08/05/14 18:16, Pedro F. Giffuni wrote: Author: pfg Date: Tue Aug 5 23:16:31 2014 New Revision: 269610 URL: http://svnweb.freebsd.org/changeset/base/269610 Log: Bring final version of libbind: From http://www.isc.org/downloads/libbind/ The libbind functions have been separated from the BIND suite as of BIND 9.6.0. Originally from older versions of BIND, they have been continually maintained and improved but not installed by default with BIND 9. This standard resolver library contains the same historical functions and headers included with many Unix operating systems. In fact, most implementations are based on the same original code. At present, NetBSD maintains libbind code, now known as "netresolv". For the record: I am not updating this in the base but having this particular version to the vendor area is important as a reference and to note that in the future we should update this package from NetBSD. Pedro. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269610 - in vendor/resolver: 9.5.0 9.5.0/include 9.5.0/include/arpa 9.5.0/lib/libc/include 9.5.0/lib/libc/include/isc 9.5.0/lib/libc/inet 9.5.0/lib/libc/isc 9.5.0/lib/libc/nameser 9.5....
Author: pfg Date: Tue Aug 5 23:16:31 2014 New Revision: 269610 URL: http://svnweb.freebsd.org/changeset/base/269610 Log: Bring final version of libbind: From http://www.isc.org/downloads/libbind/ The libbind functions have been separated from the BIND suite as of BIND 9.6.0. Originally from older versions of BIND, they have been continually maintained and improved but not installed by default with BIND 9. This standard resolver library contains the same historical functions and headers included with many Unix operating systems. In fact, most implementations are based on the same original code. At present, NetBSD maintains libbind code, now known as "netresolv". Added: vendor/resolver/9.5.0/ - copied from r269608, vendor/resolver/dist/ vendor/resolver/9.5.0/include/hesiod.h (contents, props changed) vendor/resolver/9.5.0/include/netgroup.h (contents, props changed) vendor/resolver/9.5.0/lib/libc/include/fd_setsize.h (contents, props changed) vendor/resolver/9.5.0/lib/libc/include/isc/assertions.h (contents, props changed) vendor/resolver/9.5.0/lib/libc/include/isc/dst.h (contents, props changed) vendor/resolver/9.5.0/lib/libc/include/isc/heap.h (contents, props changed) vendor/resolver/9.5.0/lib/libc/include/isc/memcluster.h (contents, props changed) vendor/resolver/9.5.0/lib/libc/isc/assertions.c (contents, props changed) vendor/resolver/9.5.0/lib/libc/isc/assertions.mdoc vendor/resolver/9.5.0/lib/libc/resolv/res_mkupdate.h (contents, props changed) vendor/resolver/9.5.0/lib/libc/resolv/res_sendsigned.c (contents, props changed) vendor/resolver/dist/include/hesiod.h (contents, props changed) vendor/resolver/dist/include/netgroup.h (contents, props changed) vendor/resolver/dist/lib/libc/include/fd_setsize.h (contents, props changed) vendor/resolver/dist/lib/libc/include/isc/assertions.h (contents, props changed) vendor/resolver/dist/lib/libc/include/isc/dst.h (contents, props changed) vendor/resolver/dist/lib/libc/include/isc/heap.h (contents, props changed) vendor/resolver/dist/lib/libc/include/isc/memcluster.h (contents, props changed) vendor/resolver/dist/lib/libc/isc/assertions.c (contents, props changed) vendor/resolver/dist/lib/libc/isc/assertions.mdoc vendor/resolver/dist/lib/libc/resolv/res_mkupdate.h (contents, props changed) vendor/resolver/dist/lib/libc/resolv/res_sendsigned.c (contents, props changed) Modified: vendor/resolver/9.5.0/include/arpa/inet.h vendor/resolver/9.5.0/include/arpa/nameser.h vendor/resolver/9.5.0/include/arpa/nameser_compat.h vendor/resolver/9.5.0/include/res_update.h vendor/resolver/9.5.0/include/resolv.h vendor/resolver/9.5.0/lib/libc/include/isc/eventlib.h vendor/resolver/9.5.0/lib/libc/include/isc/list.h vendor/resolver/9.5.0/lib/libc/inet/inet_addr.c vendor/resolver/9.5.0/lib/libc/inet/inet_cidr_ntop.c vendor/resolver/9.5.0/lib/libc/inet/inet_cidr_pton.c vendor/resolver/9.5.0/lib/libc/inet/inet_net_ntop.c vendor/resolver/9.5.0/lib/libc/inet/inet_net_pton.c vendor/resolver/9.5.0/lib/libc/inet/inet_neta.c vendor/resolver/9.5.0/lib/libc/inet/inet_ntoa.c vendor/resolver/9.5.0/lib/libc/inet/inet_ntop.c vendor/resolver/9.5.0/lib/libc/inet/inet_pton.c vendor/resolver/9.5.0/lib/libc/inet/nsap_addr.c vendor/resolver/9.5.0/lib/libc/isc/ev_streams.c vendor/resolver/9.5.0/lib/libc/isc/ev_timers.c vendor/resolver/9.5.0/lib/libc/isc/eventlib_p.h vendor/resolver/9.5.0/lib/libc/nameser/ns_name.c vendor/resolver/9.5.0/lib/libc/nameser/ns_netint.c vendor/resolver/9.5.0/lib/libc/nameser/ns_parse.c vendor/resolver/9.5.0/lib/libc/nameser/ns_print.c vendor/resolver/9.5.0/lib/libc/nameser/ns_samedomain.c vendor/resolver/9.5.0/lib/libc/nameser/ns_ttl.c vendor/resolver/9.5.0/lib/libc/resolv/herror.c vendor/resolver/9.5.0/lib/libc/resolv/res_comp.c vendor/resolver/9.5.0/lib/libc/resolv/res_data.c vendor/resolver/9.5.0/lib/libc/resolv/res_debug.c vendor/resolver/9.5.0/lib/libc/resolv/res_findzonecut.c vendor/resolver/9.5.0/lib/libc/resolv/res_init.c vendor/resolver/9.5.0/lib/libc/resolv/res_mkquery.c vendor/resolver/9.5.0/lib/libc/resolv/res_mkupdate.c vendor/resolver/9.5.0/lib/libc/resolv/res_query.c vendor/resolver/9.5.0/lib/libc/resolv/res_send.c vendor/resolver/9.5.0/lib/libc/resolv/res_update.c vendor/resolver/dist/include/arpa/inet.h vendor/resolver/dist/include/arpa/nameser.h vendor/resolver/dist/include/arpa/nameser_compat.h vendor/resolver/dist/include/res_update.h vendor/resolver/dist/include/resolv.h vendor/resolver/dist/lib/libc/include/isc/eventlib.h vendor/resolver/dist/lib/libc/include/isc/list.h vendor/resolver/dist/lib/libc/inet/inet_addr.c vendor/resolver/dist/lib/libc/inet/inet_cidr_ntop.c vendor/resolver/dist/lib/libc/inet/inet_cidr_pton.c vendor/resolver/dist/lib/libc/inet/inet_net_ntop.c vendor/resolver/dist/lib/libc/inet/inet_net_pton.c vendor/r
svn commit: r269609 - head/sys/gnu/dts/include/dt-bindings/clock
Author: ian Date: Tue Aug 5 22:38:49 2014 New Revision: 269609 URL: http://svnweb.freebsd.org/changeset/base/269609 Log: Revert r269528; this was not the right way to bring these changes in. Deleted: head/sys/gnu/dts/include/dt-bindings/clock/imx6sx-clock.h Modified: head/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h Modified: head/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h == --- head/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h Tue Aug 5 19:43:44 2014(r269608) +++ head/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h Tue Aug 5 22:38:49 2014(r269609) @@ -145,7 +145,6 @@ #define IMX6SL_CLK_USDHC4 132 #define IMX6SL_CLK_PLL4_AUDIO_DIV 133 #define IMX6SL_CLK_SPBA134 -#define IMX6SL_CLK_ENET135 -#define IMX6SL_CLK_END 136 +#define IMX6SL_CLK_END 135 #endif /* __DT_BINDINGS_CLOCK_IMX6SL_H */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r269603 - in head: etc/mtree lib/libnv lib/libnv/tests tools/regression/lib/libnv
On Aug 5, 2014, at 11:41 AM, Garrett Cooper wrote: > Author: ngie > Date: Tue Aug 5 18:41:27 2014 > New Revision: 269603 > URL: http://svnweb.freebsd.org/changeset/base/269603 > > Log: > Integrate lib/libnv into the build/kyua > > Rename all of the TAP test applications from to _test > to match the convention described in the TestSuite wiki page > > Phabric: D538 > Approved by: jmmv (mentor) > Sponsored by: EMC / Isilon Storage Division I forgot to mention… MFC after: 2 weeks signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r269608 - head/sys/dev/usb
Author: gjb Date: Tue Aug 5 19:43:44 2014 New Revision: 269608 URL: http://svnweb.freebsd.org/changeset/base/269608 Log: Add device ID for the Chicony USB 2.0 HD UVC Webcam found on the Asus X550LA. Reviewed by: sbruno Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Aug 5 19:10:53 2014(r269607) +++ head/sys/dev/usb/usbdevsTue Aug 5 19:43:44 2014(r269608) @@ -1379,6 +1379,7 @@ product CHIC CYPRESS 0x0003 Cypress USB product CHICONY KB8933 0x0001 KB-8933 keyboard product CHICONY KU0325 0x0116 KU-0325 keyboard product CHICONY CNF71290xb071 Notebook Web Camera +product CHICONY HDUVCCAM 0xb40a HD UVC WebCam productCHICONY RTL8188CUS_10xaff7 RTL8188CUS productCHICONY RTL8188CUS_20xaff8 RTL8188CUS productCHICONY RTL8188CUS_30xaff9 RTL8188CUS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269607 - head/sys/arm/freescale/imx
Author: ian Date: Tue Aug 5 19:10:53 2014 New Revision: 269607 URL: http://svnweb.freebsd.org/changeset/base/269607 Log: Cache the imx6 SoC type in a static var so that it only has to be figured out by sniffing hardware registers once. Modified: head/sys/arm/freescale/imx/imx6_machdep.c Modified: head/sys/arm/freescale/imx/imx6_machdep.c == --- head/sys/arm/freescale/imx/imx6_machdep.c Tue Aug 5 19:06:45 2014 (r269606) +++ head/sys/arm/freescale/imx/imx6_machdep.c Tue Aug 5 19:10:53 2014 (r269607) @@ -146,12 +146,16 @@ u_int imx_soc_type() { uint32_t digprog, hwsoc; uint32_t *pcr; + static u_int soctype; const vm_offset_t SCU_CONFIG_PHYSADDR = 0x00a4; #defineHWSOC_MX6SL 0x60 #defineHWSOC_MX6DL 0x61 #defineHWSOC_MX6SOLO 0x62 #defineHWSOC_MX6Q 0x63 + if (soctype != 0) + return (soctype); + digprog = imx6_anatop_read_4(IMX6_ANALOG_DIGPROG_SL); hwsoc = (digprog >> IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT) & IMX6_ANALOG_DIGPROG_SOCTYPE_MASK; @@ -175,20 +179,25 @@ u_int imx_soc_type() switch (hwsoc) { case HWSOC_MX6SL: - return (IMXSOC_6SL); + soctype = IMXSOC_6SL; + break; case HWSOC_MX6SOLO: - return (IMXSOC_6S); + soctype = IMXSOC_6S; + break; case HWSOC_MX6DL: - return (IMXSOC_6DL); + soctype = IMXSOC_6DL; + break; case HWSOC_MX6Q : - return (IMXSOC_6Q); + soctype = IMXSOC_6Q; + break; default: printf("imx_soc_type: Don't understand hwsoc 0x%02x, " "digprog 0x%08x; assuming IMXSOC_6Q\n", hwsoc, digprog); + soctype = IMXSOC_6Q; break; } - return (IMXSOC_6Q); + return (soctype); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269606 - in head/sys: arm/arm conf
Author: ian Date: Tue Aug 5 19:06:45 2014 New Revision: 269606 URL: http://svnweb.freebsd.org/changeset/base/269606 Log: Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass device attachment on arm platforms. If this is defined, nexus attaches early in BUS_PASS_BUS, and other busses and devices attach later, in the pass number they are set up for. Without it defined, nexus attaches in BUS_PASS_DEFAULT and thus so does everything else, which is status quo. Arm platforms which use FDT data to enumerate devices have been relying on devices being attached in the exact order they're listed in the dts source file. That's one of things currently preventing us from using vendor-supplied fdt data (because then we don't control the order of the devices in the data). Multi-pass attachment can go a long way towards solving that problem by ensuring things like clock and interrupt drivers are attached before the more mundane devices that need them. The long-term goal is to have all arm fdt-based platforms using multipass. This option is a bridge to that, letting us enable it selectively as platforms are converted and tested (the alternative being to just throw a big switch and try to fight fires as they're reported). Modified: head/sys/arm/arm/nexus.c head/sys/conf/options.arm Modified: head/sys/arm/arm/nexus.c == --- head/sys/arm/arm/nexus.cTue Aug 5 18:51:51 2014(r269605) +++ head/sys/arm/arm/nexus.cTue Aug 5 19:06:45 2014(r269606) @@ -125,7 +125,12 @@ static driver_t nexus_driver = { nexus_methods, 1 /* no softc */ }; +#ifdef ARM_DEVICE_MULTIPASS +EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0, +BUS_PASS_BUS + BUS_PASS_ORDER_EARLY); +#else DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +#endif static int nexus_probe(device_t dev) Modified: head/sys/conf/options.arm == --- head/sys/conf/options.arm Tue Aug 5 18:51:51 2014(r269605) +++ head/sys/conf/options.arm Tue Aug 5 19:06:45 2014(r269606) @@ -1,6 +1,7 @@ #$FreeBSD$ ARM9_CACHE_WRITE_THROUGH opt_global.h ARM_CACHE_LOCK_ENABLE opt_global.h +ARM_DEVICE_MULTIPASS opt_global.h ARM_KERN_DIRECTMAP opt_vm.h ARM_L2_PIPTopt_global.h ARM_MANY_BOARD opt_global.h ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269605 - head/sys/arm/arm
Author: ian Date: Tue Aug 5 18:51:51 2014 New Revision: 269605 URL: http://svnweb.freebsd.org/changeset/base/269605 Log: Attach arm generic interrupt and timer drivers in the middle of BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively. Modified: head/sys/arm/arm/generic_timer.c head/sys/arm/arm/gic.c head/sys/arm/arm/mpcore_timer.c head/sys/arm/arm/pl190.c Modified: head/sys/arm/arm/generic_timer.c == --- head/sys/arm/arm/generic_timer.cTue Aug 5 18:48:12 2014 (r269604) +++ head/sys/arm/arm/generic_timer.cTue Aug 5 18:51:51 2014 (r269605) @@ -343,7 +343,8 @@ static driver_t arm_tmr_driver = { static devclass_t arm_tmr_devclass; -DRIVER_MODULE(timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0); +EARLY_DRIVER_MODULE(timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0, +BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); void DELAY(int usec) Modified: head/sys/arm/arm/gic.c == --- head/sys/arm/arm/gic.c Tue Aug 5 18:48:12 2014(r269604) +++ head/sys/arm/arm/gic.c Tue Aug 5 18:51:51 2014(r269605) @@ -264,7 +264,8 @@ static driver_t arm_gic_driver = { static devclass_t arm_gic_devclass; -DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0); +EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0, +BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); static void gic_post_filter(void *arg) Modified: head/sys/arm/arm/mpcore_timer.c == --- head/sys/arm/arm/mpcore_timer.c Tue Aug 5 18:48:12 2014 (r269604) +++ head/sys/arm/arm/mpcore_timer.c Tue Aug 5 18:51:51 2014 (r269605) @@ -382,7 +382,8 @@ static driver_t arm_tmr_driver = { static devclass_t arm_tmr_devclass; -DRIVER_MODULE(mp_tmr, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0); +EARLY_DRIVER_MODULE(mp_tmr, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0, +BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); /* * Handle a change in clock frequency. The mpcore timer runs at half the CPU Modified: head/sys/arm/arm/pl190.c == --- head/sys/arm/arm/pl190.cTue Aug 5 18:48:12 2014(r269604) +++ head/sys/arm/arm/pl190.cTue Aug 5 18:51:51 2014(r269605) @@ -152,7 +152,8 @@ static driver_t pl190_intc_driver = { static devclass_t pl190_intc_devclass; -DRIVER_MODULE(intc, simplebus, pl190_intc_driver, pl190_intc_devclass, 0, 0); +EARLY_DRIVER_MODULE(intc, simplebus, pl190_intc_driver, pl190_intc_devclass, +0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); int arm_get_next_irq(int last_irq) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269604 - head/sys/dev/usb/controller
Author: hselasky Date: Tue Aug 5 18:48:12 2014 New Revision: 269604 URL: http://svnweb.freebsd.org/changeset/base/269604 Log: - Implement fast interrupt handler to save CPU usage. - Cleanup some register reads and writes to use existing register access macros. - Ensure code which only applies to the control endpoint is not run for other endpoints in the data transfer path. MFC after:3 days Modified: head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/at91dci.h head/sys/dev/usb/controller/at91dci_atmelarm.c head/sys/dev/usb/controller/at91dci_fdt.c Modified: head/sys/dev/usb/controller/at91dci.c == --- head/sys/dev/usb/controller/at91dci.c Tue Aug 5 18:41:27 2014 (r269603) +++ head/sys/dev/usb/controller/at91dci.c Tue Aug 5 18:48:12 2014 (r269604) @@ -91,6 +91,9 @@ #defineAT9100_DCI_PC2SC(pc) \ AT9100_DCI_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) +#defineAT9100_DCI_THREAD_IRQ \ + (AT91_UDP_INT_BUS | AT91_UDP_INT_END_BR | AT91_UDP_INT_RXRSM | AT91_UDP_INT_RXSUSP) + #ifdef USB_DEBUG static int at91dcidebug = 0; @@ -296,17 +299,15 @@ at91dci_set_address(struct at91dci_softc } static uint8_t -at91dci_setup_rx(struct at91dci_td *td) +at91dci_setup_rx(struct at91dci_softc *sc, struct at91dci_td *td) { - struct at91dci_softc *sc; struct usb_device_request req; uint32_t csr; uint32_t temp; uint16_t count; /* read out FIFO status */ - csr = bus_space_read_4(td->io_tag, td->io_hdl, - td->status_reg); + csr = AT91_UDP_READ_4(sc, td->status_reg); DPRINTFN(5, "csr=0x%08x rem=%u\n", csr, td->remainder); @@ -338,7 +339,7 @@ at91dci_setup_rx(struct at91dci_td *td) goto not_complete; } /* receive data */ - bus_space_read_multi_1(td->io_tag, td->io_hdl, + bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, td->fifo_reg, (void *)&req, sizeof(req)); /* copy data into real buffer */ @@ -347,9 +348,6 @@ at91dci_setup_rx(struct at91dci_td *td) td->offset = sizeof(req); td->remainder = 0; - /* get pointer to softc */ - sc = AT9100_DCI_PC2SC(td->pc); - /* sneak peek the set address */ if ((req.bmRequestType == UT_WRITE_DEVICE) && (req.bRequest == UR_SET_ADDRESS)) { @@ -367,8 +365,7 @@ at91dci_setup_rx(struct at91dci_td *td) /* write the direction of the control transfer */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); return (0); /* complete */ not_complete: @@ -383,15 +380,13 @@ not_complete: if (temp) { DPRINTFN(5, "clearing 0x%08x\n", temp); AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); } return (1); /* not complete */ - } static uint8_t -at91dci_data_rx(struct at91dci_td *td) +at91dci_data_rx(struct at91dci_softc *sc, struct at91dci_td *td) { struct usb_page_search buf_res; uint32_t csr; @@ -406,8 +401,7 @@ at91dci_data_rx(struct at91dci_td *td) /* check if any of the FIFO banks have data */ repeat: /* read out FIFO status */ - csr = bus_space_read_4(td->io_tag, td->io_hdl, - td->status_reg); + csr = AT91_UDP_READ_4(sc, td->status_reg); DPRINTFN(5, "csr=0x%08x rem=%u\n", csr, td->remainder); @@ -436,8 +430,7 @@ repeat: if (temp) { /* write command */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); } return (1); /* not complete */ } @@ -470,7 +463,7 @@ repeat: buf_res.length = count; } /* receive data */ - bus_space_read_multi_1(td->io_tag, td->io_hdl, + bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, td->fifo_reg, buf_res.buffer, buf_res.length); /* update counters */ @@ -495,8 +488,7 @@ repeat: /* write command */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); /* * NOTE: We may have to delay a little bit before @@ -518,7 +510,7 @@ repeat: } static uint8_t -at91dci_data_tx(struct at91dci_td *td) +at91dci_data_tx(struct at91dci_softc *sc, struct
svn commit: r269603 - in head: etc/mtree lib/libnv lib/libnv/tests tools/regression/lib/libnv
Author: ngie Date: Tue Aug 5 18:41:27 2014 New Revision: 269603 URL: http://svnweb.freebsd.org/changeset/base/269603 Log: Integrate lib/libnv into the build/kyua Rename all of the TAP test applications from to _test to match the convention described in the TestSuite wiki page Phabric: D538 Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division Added: head/lib/libnv/tests/ head/lib/libnv/tests/Makefile (contents, props changed) head/lib/libnv/tests/nvlist_add_test.c - copied unchanged from r269562, head/tools/regression/lib/libnv/nvlist_add.c head/lib/libnv/tests/nvlist_exists_test.c - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_exists.c head/lib/libnv/tests/nvlist_free_test.c - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_free.c head/lib/libnv/tests/nvlist_get_test.c - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_get.c head/lib/libnv/tests/nvlist_move_test.c - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_move.c head/lib/libnv/tests/nvlist_send_recv_test.c - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_send_recv.c Deleted: head/tools/regression/lib/libnv/ Modified: head/etc/mtree/BSD.tests.dist head/lib/libnv/Makefile Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Tue Aug 5 18:35:34 2014 (r269602) +++ head/etc/mtree/BSD.tests.dist Tue Aug 5 18:41:27 2014 (r269603) @@ -87,6 +87,8 @@ .. libmp .. +libnv +.. .. libexec atf Modified: head/lib/libnv/Makefile == --- head/lib/libnv/Makefile Tue Aug 5 18:35:34 2014(r269602) +++ head/lib/libnv/Makefile Tue Aug 5 18:41:27 2014(r269603) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= nv SHLIBDIR?= /lib SHLIB_MAJOR= 0 @@ -158,4 +160,8 @@ MLINKS+=nv.3 nvlist_existsv.3 \ WARNS?=6 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/lib/libnv/tests/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnv/tests/Makefile Tue Aug 5 18:41:27 2014 (r269603) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/lib/libnv + +TAP_TESTS_C+= nvlist_add_test +TAP_TESTS_C+= nvlist_exists_test +TAP_TESTS_C+= nvlist_free_test +TAP_TESTS_C+= nvlist_get_test +TAP_TESTS_C+= nvlist_move_test +TAP_TESTS_C+= nvlist_send_recv_test + +DPADD+=${LIBNV} +LDADD+=-lnv + +WARNS?=6 + +.include Copied: head/lib/libnv/tests/nvlist_add_test.c (from r269562, head/tools/regression/lib/libnv/nvlist_add.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnv/tests/nvlist_add_test.c Tue Aug 5 18:41:27 2014 (r269603, copy of r269562, head/tools/regression/lib/libnv/nvlist_add.c) @@ -0,0 +1,196 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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$ + */ + +#include +#include +#include + +#include + +static int ntest = 1; + +#defineCHECK(expr) do {
svn commit: r269602 - head/sys/dev/usb/gadget
Author: hselasky Date: Tue Aug 5 18:35:34 2014 New Revision: 269602 URL: http://svnweb.freebsd.org/changeset/base/269602 Log: Add handler for read-back of USB audio volume levels. Modified: head/sys/dev/usb/gadget/g_audio.c Modified: head/sys/dev/usb/gadget/g_audio.c == --- head/sys/dev/usb/gadget/g_audio.c Tue Aug 5 18:19:51 2014 (r269601) +++ head/sys/dev/usb/gadget/g_audio.c Tue Aug 5 18:35:34 2014 (r269602) @@ -587,6 +587,16 @@ g_audio_handle_request(device_t dev, *plen = 0; } return (0); + } else if ((req->bmRequestType == UT_READ_CLASS_INTERFACE) && + (req->bRequest == 0x81 /* get value */ )) { + + if (offset == 0) { + *plen = sizeof(sc->sc_volume_setting); + *pptr = &sc->sc_volume_setting; + } else { + *plen = 0; + } + return (0); } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && (req->bRequest == 0x01 /* set value */ )) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269601 - in head/sys: conf dev/fb
Author: nwhitehorn Date: Tue Aug 5 18:19:51 2014 New Revision: 269601 URL: http://svnweb.freebsd.org/changeset/base/269601 Log: Add a simple unaccelerated vt(4) framebuffer driver for Sun framebuffers handled by creator(4) (Sun Creator 3D, Elite 3D, etc.). This provides vt(4) consoles on all devices currently supported by syscons on sparc64. The driver should also be easily adaptable to support newer Sun framebuffers such as the XVR-500 and higher. Many thanks to dumbbell@ (Jean-Sebastien Pedron) for testing this remotely during development. Added: head/sys/dev/fb/creator_vt.c (contents, props changed) Modified: head/sys/conf/files.sparc64 Modified: head/sys/conf/files.sparc64 == --- head/sys/conf/files.sparc64 Tue Aug 5 18:09:39 2014(r269600) +++ head/sys/conf/files.sparc64 Tue Aug 5 18:19:51 2014(r269601) @@ -35,6 +35,7 @@ dev/atkbdc/psm.c optionalpsm atkbdc dev/auxio/auxio.c optionalauxio sbus | auxio ebus dev/esp/esp_sbus.c optionalesp sbus dev/fb/creator.c optionalcreator sc +dev/fb/creator_vt.coptionalcreator vt dev/fb/fb.coptionalsc dev/fb/gallant12x22.c optionalsc dev/fb/machfb.coptionalmachfb sc Added: head/sys/dev/fb/creator_vt.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fb/creator_vt.cTue Aug 5 18:19:51 2014 (r269601) @@ -0,0 +1,220 @@ +/*- + * Copyright (c) 2014 Nathan Whitehorn + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include "creatorreg.h" + +static vd_probe_t creatorfb_probe; +static vd_init_t creatorfb_init; +static vd_blank_t creatorfb_blank; +static vd_bitbltchr_t creatorfb_bitbltchr; + +static const struct vt_driver vt_creatorfb_driver = { + .vd_name= "creatorfb", + .vd_probe = creatorfb_probe, + .vd_init= creatorfb_init, + .vd_blank = creatorfb_blank, + .vd_bitbltchr = creatorfb_bitbltchr, + .vd_maskbitbltchr = creatorfb_bitbltchr, + .vd_fb_ioctl= vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, + .vd_priority= VD_PRIORITY_SPECIFIC +}; + +struct creatorfb_softc { + struct fb_info fb; + struct bus_space_tag memt[1]; + bus_space_handle_t memh; +}; + +static struct creatorfb_softc creatorfb_conssoftc; +VT_DRIVER_DECLARE(vt_creatorfb, vt_creatorfb_driver); + +static int +creatorfb_probe(struct vt_device *vd) +{ + phandle_t chosen, node; + ihandle_t stdout; + char type[64], name[64]; + + chosen = OF_finddevice("/chosen"); + OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); + node = OF_instance_to_package(stdout); + if (node == -1) { + /* +* The "/chosen/stdout" does not exist try +* using "screen" directly. +*/ + node = OF_finddevice("screen"); + } + OF_getprop(node, "device_type", type, sizeof(type)); + if (strcmp(type, "display") != 0) + return (CN_DEAD); + + OF_getprop(node, "name", name, sizeof(name)); + if (strcmp(name, "SUNW,ffb") != 0 && strcmp(name, "SUNW,afb") != 0) + return (CN_DEAD); + + /* Looks OK... */ +
svn commit: r269600 - head/libexec/rtld-elf/tests/libpythagoras
Author: ngie Date: Tue Aug 5 18:09:39 2014 New Revision: 269600 URL: http://svnweb.freebsd.org/changeset/base/269600 Log: Similar to r269506, fix LIBDIR to not duplicate TESTSDIR Phabric: D536 Reviewed by: jmmv Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division Modified: head/libexec/rtld-elf/tests/libpythagoras/Makefile Modified: head/libexec/rtld-elf/tests/libpythagoras/Makefile == --- head/libexec/rtld-elf/tests/libpythagoras/Makefile Tue Aug 5 18:05:31 2014(r269599) +++ head/libexec/rtld-elf/tests/libpythagoras/Makefile Tue Aug 5 18:09:39 2014(r269600) @@ -5,8 +5,8 @@ LIB= pythagoras SHLIB_MAJOR= 0 -LIBDIR=${TESTSBASE}${TESTSDIR}/libexec/rtld-elf -SHLIBDIR= ${TESTSBASE}${TESTSDIR}/libexec/rtld-elf +LIBDIR=${TESTSBASE}/libexec/rtld-elf +SHLIBDIR= ${TESTSBASE}/libexec/rtld-elf SRCS= pythagoras.c ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269599 - head/libexec/rtld-elf/tests
Author: ngie Date: Tue Aug 5 18:05:31 2014 New Revision: 269599 URL: http://svnweb.freebsd.org/changeset/base/269599 Log: Remove unnecessary .PATH directive All of the sources for the tests are contained in the current working directory and the subdirectories Phabric: D537 Reviewed by: jmmv Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division Modified: head/libexec/rtld-elf/tests/Makefile Modified: head/libexec/rtld-elf/tests/Makefile == --- head/libexec/rtld-elf/tests/MakefileTue Aug 5 17:39:58 2014 (r269598) +++ head/libexec/rtld-elf/tests/MakefileTue Aug 5 18:05:31 2014 (r269599) @@ -5,8 +5,6 @@ TESTSDIR= ${TESTSBASE}/libexec/rtld-elf SUBDIR+= libpythagoras target -.PATH: ${.CURDIR:H:H:H:H}/tests - ATF_TESTS_C= ld_library_pathfds .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269598 - in head/sys/arm: arm include
Author: ian Date: Tue Aug 5 17:39:58 2014 New Revision: 269598 URL: http://svnweb.freebsd.org/changeset/base/269598 Log: Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU. Because that's earlier than interrupts are available, set up deferred configuration of interrupts (which are used only for debugging). Modified: head/sys/arm/arm/pl310.c head/sys/arm/include/pl310.h Modified: head/sys/arm/arm/pl310.c == --- head/sys/arm/arm/pl310.cTue Aug 5 17:32:47 2014(r269597) +++ head/sys/arm/arm/pl310.cTue Aug 5 17:39:58 2014(r269598) @@ -378,6 +378,44 @@ pl310_set_way_sizes(struct pl310_softc * g_l2cache_size = g_way_size * g_ways_assoc; } +/* + * Setup interrupt handling. This is done only if the cache controller is + * disabled, for debugging. We set counters so when a cache event happens we'll + * get interrupted and be warned that something is wrong, because no cache + * events should happen if we're disabled. + */ +static void +pl310_config_intr(void *arg) +{ + struct pl310_softc * sc; + + sc = arg; + + /* activate the interrupt */ + bus_setup_intr(sc->sc_dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + pl310_filter, NULL, sc, &sc->sc_irq_h); + + /* Cache Line Eviction for Counter 0 */ + pl310_write4(sc, PL310_EVENT_COUNTER0_CONF, + EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_CO); + /* Data Read Request for Counter 1 */ + pl310_write4(sc, PL310_EVENT_COUNTER1_CONF, + EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_DRREQ); + + /* Enable and clear pending interrupts */ + pl310_write4(sc, PL310_INTR_CLEAR, INTR_MASK_ECNTR); + pl310_write4(sc, PL310_INTR_MASK, INTR_MASK_ALL); + + /* Enable counters and reset C0 and C1 */ + pl310_write4(sc, PL310_EVENT_COUNTER_CTRL, + EVENT_COUNTER_CTRL_ENABLED | + EVENT_COUNTER_CTRL_C0_RESET | + EVENT_COUNTER_CTRL_C1_RESET); + + config_intrhook_disestablish(sc->sc_ich); + free(sc->sc_ich, M_DEVBUF); +} + static int pl310_probe(device_t dev) { @@ -416,10 +454,6 @@ pl310_attach(device_t dev) pl310_softc = sc; mtx_init(&sc->sc_mtx, "pl310lock", NULL, MTX_SPIN); - /* activate the interrupt */ - bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, - pl310_filter, NULL, sc, &sc->sc_irq_h); - cache_id = pl310_read4(sc, PL310_CACHE_ID); sc->sc_rtl_revision = (cache_id >> CACHE_ID_RELEASE_SHIFT) & CACHE_ID_RELEASE_MASK; @@ -466,28 +500,14 @@ pl310_attach(device_t dev) if (bootverbose) pl310_print_config(sc); } else { - /* -* Set counters so when cache event happens we'll get interrupt -* and be warned that something is off. -*/ - - /* Cache Line Eviction for Counter 0 */ - pl310_write4(sc, PL310_EVENT_COUNTER0_CONF, - EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_CO); - /* Data Read Request for Counter 1 */ - pl310_write4(sc, PL310_EVENT_COUNTER1_CONF, - EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_DRREQ); - - /* Enable and clear pending interrupts */ - pl310_write4(sc, PL310_INTR_CLEAR, INTR_MASK_ECNTR); - pl310_write4(sc, PL310_INTR_MASK, INTR_MASK_ALL); - - /* Enable counters and reset C0 and C1 */ - pl310_write4(sc, PL310_EVENT_COUNTER_CTRL, - EVENT_COUNTER_CTRL_ENABLED | - EVENT_COUNTER_CTRL_C0_RESET | - EVENT_COUNTER_CTRL_C1_RESET); - + malloc(sizeof(*sc->sc_ich), M_DEVBUF, M_WAITOK); + sc->sc_ich->ich_func = pl310_config_intr; + sc->sc_ich->ich_arg = sc; + if (config_intrhook_establish(sc->sc_ich) != 0) { + device_printf(dev, + "config_intrhook_establish failed\n"); + return(ENXIO); + } device_printf(dev, "L2 Cache disabled\n"); } @@ -514,4 +534,6 @@ static driver_t pl310_driver = { }; static devclass_t pl310_devclass; -DRIVER_MODULE(pl310, simplebus, pl310_driver, pl310_devclass, 0, 0); +EARLY_DRIVER_MODULE(pl310, simplebus, pl310_driver, pl310_devclass, 0, 0, +BUS_PASS_CPU + BUS_PASS_ORDER_MIDDLE); + Modified: head/sys/arm/include/pl310.h == --- head/sys/arm/include/pl310.hTue Aug 5 17:32:47 2014 (r269597) +++ head/sys/arm/include/pl310.hTue Aug 5 17:39:58 2014 (r269598) @@ -137,6 +137,8 @@ #definePOWER_CTRL_ENABLE_GATING(1 << 0) #define
svn commit: r269597 - in head/sys/dev: fdt ofw
Author: ian Date: Tue Aug 5 17:32:47 2014 New Revision: 269597 URL: http://svnweb.freebsd.org/changeset/base/269597 Log: Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that a platform can attach some other bus first if necessary. Modified: head/sys/dev/fdt/simplebus.c head/sys/dev/ofw/ofwbus.c Modified: head/sys/dev/fdt/simplebus.c == --- head/sys/dev/fdt/simplebus.cTue Aug 5 17:22:48 2014 (r269596) +++ head/sys/dev/fdt/simplebus.cTue Aug 5 17:32:47 2014 (r269597) @@ -124,7 +124,7 @@ static devclass_t simplebus_devclass; EARLY_DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass, 0, 0, BUS_PASS_BUS); EARLY_DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, -0, 0, BUS_PASS_BUS); +0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); static int simplebus_probe(device_t dev) Modified: head/sys/dev/ofw/ofwbus.c == --- head/sys/dev/ofw/ofwbus.c Tue Aug 5 17:22:48 2014(r269596) +++ head/sys/dev/ofw/ofwbus.c Tue Aug 5 17:32:47 2014(r269597) @@ -137,7 +137,7 @@ static driver_t ofwbus_driver = { }; static devclass_t ofwbus_devclass; EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0, -BUS_PASS_BUS); +BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(ofwbus, 1); static const char *const ofwbus_excl_name[] = { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269596 - head/sys/sys
Author: ian Date: Tue Aug 5 17:22:48 2014 New Revision: 269596 URL: http://svnweb.freebsd.org/changeset/base/269596 Log: Define names that drivers can use to adjust their position relative to other drivers within a BUS_PASS. Reviewed by: imp Modified: head/sys/sys/bus.h Modified: head/sys/sys/bus.h == --- head/sys/sys/bus.h Tue Aug 5 16:44:27 2014(r269595) +++ head/sys/sys/bus.h Tue Aug 5 17:22:48 2014(r269596) @@ -568,6 +568,12 @@ void bus_data_generation_update(void); #defineBUS_PASS_SCHEDULER 60 /* Start scheduler. */ #defineBUS_PASS_DEFAULT__INT_MAX /* Everything else. */ +#defineBUS_PASS_ORDER_FIRST0 +#defineBUS_PASS_ORDER_EARLY2 +#defineBUS_PASS_ORDER_MIDDLE 5 +#defineBUS_PASS_ORDER_LATE 7 +#defineBUS_PASS_ORDER_LAST 9 + extern int bus_current_pass; void bus_set_pass(int pass); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269595 - stable/8/sys/x86/x86
Author: marius Date: Tue Aug 5 16:44:27 2014 New Revision: 269595 URL: http://svnweb.freebsd.org/changeset/base/269595 Log: MFC: r260457 The changes in r233781 (MFCed to stable/8 in r235517) attempted to make logging during a machine check exception more readable. In practice they prevented all logging during a machine check exception on at least some systems. Specifically, when an uncorrected ECC error is detected in a DIMM on a Nehalem/Westmere class machine, all CPUs receive a machine check exception, but only CPUs on the same package as the memory controller for the erroring DIMM log an error. The CPUs on the other package would complete the scan of their machine check banks and panic before the first set of CPUs could log an error. The end result was a clearer display during the panic (no interleaved messages), but a crashdump without any useful info about the error that occurred. To handle this case, make all CPUs spin in the machine check handler once they have completed their scan of their machine check banks until at least one machine check error is logged. I tried using a DELAY() instead so that the CPUs would not potentially hang forever, but that was not reliable in testing. While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic. Only clear it if the machine check handler does not panic and returns to the interrupted thread. MFC: r263113 Correct type for malloc(). Submitted by: "Conrad Meyer" MFC: r269052, r269239, r269242 Intel desktop Haswell CPUs may report benign corrected parity errors (see HSD131 erratum in [1]) at a considerable rate. So filter these (default), unless logging is enabled. Unfortunately, there really is no better way to reasonably implement suppressing these errors than to just skipping them in mca_log(). Given that they are reported for bank 0, they'd need to be masked in MSR_MC0_CTL. However, P6 family processors require that register to be set to either all 0s or all 1s, disabling way more than the one error in question when using all 0s there. Alternatively, it could be masked for the corresponding CMCI, but that still wouldn't keep the periodic scanner from detecting these spurious errors. Apart from that, register contents of MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel Architectures Developer's Manual nor in the Haswell datasheets. Note that while HSD131 actually is only about C0-stepping as of revision 014 of the Intel desktop 4th generation processor family specification update, these corrected errors also have been observed with D0-stepping aka "Haswell Refresh". 1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf Reviewed by: jhb Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/8/sys/x86/x86/mca.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/x86/ (props changed) Modified: stable/8/sys/x86/x86/mca.c == --- stable/8/sys/x86/x86/mca.c Tue Aug 5 16:31:03 2014(r269594) +++ stable/8/sys/x86/x86/mca.c Tue Aug 5 16:44:27 2014(r269595) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); -static int mca_count; /* Number of records stored. */ +static volatile int mca_count; /* Number of records stored. */ static int mca_banks; /* Number of per-CPU register banks. */ SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); @@ -99,6 +100,11 @@ TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10 SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, "Administrative toggle for logging of level one TLB parity (L1TP) errors"); +static int intel6h_HSD131; +TUNABLE_INT("hw.mca.intel6h_hsd131", &intel6h_HSD131); +SYSCTL_INT(_hw_mca, OID_AUTO, intel6h_HSD131, CTLFLAG_RDTUN, &intel6h_HSD131, 0, +"Administrative toggle for logging of spurious corrected errors"); + int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); @@ -242,12 +248,34 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } +static int __nonnull(1) +mca_mute(const struct mca_record *rec) +{ + + /* +* Skip spurious corrected parity errors generated by desktop Haswell +* (see HSD131 erratum) unless reporting is enabled. +* Note that these errors also have been observed with D0-stepping, +* while the revision 014 desktop Haswell specification update only +* talks about C0-stepping. +
svn commit: r269594 - in head/sys/dev: fdt ofw
Author: ian Date: Tue Aug 5 16:31:03 2014 New Revision: 269594 URL: http://svnweb.freebsd.org/changeset/base/269594 Log: Set ofwbus and simplebus to attach during BUS_PASS_BUS. Modified: head/sys/dev/fdt/simplebus.c head/sys/dev/ofw/ofwbus.c Modified: head/sys/dev/fdt/simplebus.c == --- head/sys/dev/fdt/simplebus.cTue Aug 5 16:30:13 2014 (r269593) +++ head/sys/dev/fdt/simplebus.cTue Aug 5 16:31:03 2014 (r269594) @@ -121,8 +121,10 @@ static driver_t simplebus_driver = { sizeof(struct simplebus_softc) }; static devclass_t simplebus_devclass; -DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass, 0, 0); -DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0, 0); +EARLY_DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass, +0, 0, BUS_PASS_BUS); +EARLY_DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, +0, 0, BUS_PASS_BUS); static int simplebus_probe(device_t dev) Modified: head/sys/dev/ofw/ofwbus.c == --- head/sys/dev/ofw/ofwbus.c Tue Aug 5 16:30:13 2014(r269593) +++ head/sys/dev/ofw/ofwbus.c Tue Aug 5 16:31:03 2014(r269594) @@ -136,7 +136,8 @@ static driver_t ofwbus_driver = { sizeof(struct ofwbus_softc) }; static devclass_t ofwbus_devclass; -DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0); +EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0, +BUS_PASS_BUS); MODULE_VERSION(ofwbus, 1); static const char *const ofwbus_excl_name[] = { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269593 - stable/9/sys/x86/x86
Author: marius Date: Tue Aug 5 16:30:13 2014 New Revision: 269593 URL: http://svnweb.freebsd.org/changeset/base/269593 Log: MFC: r260457 The changes in r233781 (MFCed to stable/9 in r235515) attempted to make logging during a machine check exception more readable. In practice they prevented all logging during a machine check exception on at least some systems. Specifically, when an uncorrected ECC error is detected in a DIMM on a Nehalem/Westmere class machine, all CPUs receive a machine check exception, but only CPUs on the same package as the memory controller for the erroring DIMM log an error. The CPUs on the other package would complete the scan of their machine check banks and panic before the first set of CPUs could log an error. The end result was a clearer display during the panic (no interleaved messages), but a crashdump without any useful info about the error that occurred. To handle this case, make all CPUs spin in the machine check handler once they have completed their scan of their machine check banks until at least one machine check error is logged. I tried using a DELAY() instead so that the CPUs would not potentially hang forever, but that was not reliable in testing. While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic. Only clear it if the machine check handler does not panic and returns to the interrupted thread. MFC: r263113 Correct type for malloc(). Submitted by: "Conrad Meyer" MFC: r269052, r269239, r269242 Intel desktop Haswell CPUs may report benign corrected parity errors (see HSD131 erratum in [1]) at a considerable rate. So filter these (default), unless logging is enabled. Unfortunately, there really is no better way to reasonably implement suppressing these errors than to just skipping them in mca_log(). Given that they are reported for bank 0, they'd need to be masked in MSR_MC0_CTL. However, P6 family processors require that register to be set to either all 0s or all 1s, disabling way more than the one error in question when using all 0s there. Alternatively, it could be masked for the corresponding CMCI, but that still wouldn't keep the periodic scanner from detecting these spurious errors. Apart from that, register contents of MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel Architectures Developer's Manual nor in the Haswell datasheets. Note that while HSD131 actually is only about C0-stepping as of revision 014 of the Intel desktop 4th generation processor family specification update, these corrected errors also have been observed with D0-stepping aka "Haswell Refresh". 1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf Reviewed by: jhb Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sys/x86/x86/mca.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/x86/x86/mca.c == --- stable/9/sys/x86/x86/mca.c Tue Aug 5 16:04:22 2014(r269592) +++ stable/9/sys/x86/x86/mca.c Tue Aug 5 16:30:13 2014(r269593) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); -static int mca_count; /* Number of records stored. */ +static volatile int mca_count; /* Number of records stored. */ static int mca_banks; /* Number of per-CPU register banks. */ static SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, @@ -100,6 +101,11 @@ TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10 SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, "Administrative toggle for logging of level one TLB parity (L1TP) errors"); +static int intel6h_HSD131; +TUNABLE_INT("hw.mca.intel6h_hsd131", &intel6h_HSD131); +SYSCTL_INT(_hw_mca, OID_AUTO, intel6h_HSD131, CTLFLAG_RDTUN, &intel6h_HSD131, 0, +"Administrative toggle for logging of spurious corrected errors"); + int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); @@ -243,12 +249,34 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } +static int __nonnull(1) +mca_mute(const struct mca_record *rec) +{ + + /* +* Skip spurious corrected parity errors generated by desktop Haswell +* (see HSD131 erratum) unless reporting is enabled. +* Note that these errors also have been observed with D0-stepping, +* while the revision 014 desktop Haswell specification update only +* talks about C0-stepping. +*/ + if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL
svn commit: r269592 - stable/10/sys/x86/x86
Author: marius Date: Tue Aug 5 16:04:22 2014 New Revision: 269592 URL: http://svnweb.freebsd.org/changeset/base/269592 Log: MFC: r260457 The changes in r233781 attempted to make logging during a machine check exception more readable. In practice they prevented all logging during a machine check exception on at least some systems. Specifically, when an uncorrected ECC error is detected in a DIMM on a Nehalem/Westmere class machine, all CPUs receive a machine check exception, but only CPUs on the same package as the memory controller for the erroring DIMM log an error. The CPUs on the other package would complete the scan of their machine check banks and panic before the first set of CPUs could log an error. The end result was a clearer display during the panic (no interleaved messages), but a crashdump without any useful info about the error that occurred. To handle this case, make all CPUs spin in the machine check handler once they have completed their scan of their machine check banks until at least one machine check error is logged. I tried using a DELAY() instead so that the CPUs would not potentially hang forever, but that was not reliable in testing. While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic. Only clear it if the machine check handler does not panic and returns to the interrupted thread. MFC: r263113 Correct type for malloc(). Submitted by: "Conrad Meyer" MFC: r269052, r269239, r269242 Intel desktop Haswell CPUs may report benign corrected parity errors (see HSD131 erratum in [1]) at a considerable rate. So filter these (default), unless logging is enabled. Unfortunately, there really is no better way to reasonably implement suppressing these errors than to just skipping them in mca_log(). Given that they are reported for bank 0, they'd need to be masked in MSR_MC0_CTL. However, P6 family processors require that register to be set to either all 0s or all 1s, disabling way more than the one error in question when using all 0s there. Alternatively, it could be masked for the corresponding CMCI, but that still wouldn't keep the periodic scanner from detecting these spurious errors. Apart from that, register contents of MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel Architectures Developer's Manual nor in the Haswell datasheets. Note that while HSD131 actually is only about C0-stepping as of revision 014 of the Intel desktop 4th generation processor family specification update, these corrected errors also have been observed with D0-stepping aka "Haswell Refresh". 1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf Reviewed by: jhb Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sys/x86/x86/mca.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/mca.c == --- stable/10/sys/x86/x86/mca.c Tue Aug 5 15:17:57 2014(r269591) +++ stable/10/sys/x86/x86/mca.c Tue Aug 5 16:04:22 2014(r269592) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); -static int mca_count; /* Number of records stored. */ +static volatile int mca_count; /* Number of records stored. */ static int mca_banks; /* Number of per-CPU register banks. */ static SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, @@ -100,6 +101,11 @@ TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10 SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, "Administrative toggle for logging of level one TLB parity (L1TP) errors"); +static int intel6h_HSD131; +TUNABLE_INT("hw.mca.intel6h_hsd131", &intel6h_HSD131); +SYSCTL_INT(_hw_mca, OID_AUTO, intel6h_HSD131, CTLFLAG_RDTUN, &intel6h_HSD131, 0, +"Administrative toggle for logging of spurious corrected errors"); + int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); @@ -243,12 +249,34 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } +static int __nonnull(1) +mca_mute(const struct mca_record *rec) +{ + + /* +* Skip spurious corrected parity errors generated by desktop Haswell +* (see HSD131 erratum) unless reporting is enabled. +* Note that these errors also have been observed with D0-stepping, +* while the revision 014 desktop Haswell specification update only +* talks about C0-stepping. +*/ + if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && + rec->mr_cpu_id =
svn commit: r269587 - head/sys/cam/ctl
Author: mav Date: Tue Aug 5 15:01:30 2014 New Revision: 269587 URL: http://svnweb.freebsd.org/changeset/base/269587 Log: Reimplement WRITE USING TOKEN with Block Zero token using WRITE SAME. On my ZVOL of SSDs that increases speed of zero writing in that way from 1 to 2.5GB/s by reducing CPU overhead. MFC after:2 weeks Modified: head/sys/cam/ctl/ctl_tpc.c head/sys/cam/ctl/ctl_util.c head/sys/cam/ctl/ctl_util.h Modified: head/sys/cam/ctl/ctl_tpc.c == --- head/sys/cam/ctl/ctl_tpc.c Tue Aug 5 13:36:26 2014(r269586) +++ head/sys/cam/ctl/ctl_tpc.c Tue Aug 5 15:01:30 2014(r269587) @@ -828,11 +828,10 @@ complete: /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); - } else { - list->cursectors += list->segsectors; - list->curbytes += list->segbytes; - return (CTL_RETVAL_COMPLETE); } + list->cursectors += list->segsectors; + list->curbytes += list->segbytes; + return (CTL_RETVAL_COMPLETE); } TAILQ_INIT(&list->allio); @@ -1141,14 +1140,6 @@ complete: return (CTL_RETVAL_COMPLETE); dstblock = list->lun->be_lun->blocksize; - /* Special case: no token == Block device zero ROD token */ - if (list->token == NULL) { - srcblock = 1; - srclba = 0; - numbytes = INT64_MAX; - goto dstp; - } - /* Check where we are on source ranges list. */ srcblock = list->token->blocksize; if (tpc_skip_ranges(list->token->range, list->token->nrange, @@ -1163,7 +1154,6 @@ complete: srclba = scsi_8btou64(list->token->range[srange].lba) + soffset; numbytes = srcblock * omin(TPC_MAX_IOCHUNK_SIZE / srcblock, (scsi_4btoul(list->token->range[srange].length) - soffset)); -dstp: dstlba = scsi_8btou64(list->range[drange].lba) + doffset; numbytes = omin(numbytes, dstblock * omin(TPC_MAX_IOCHUNK_SIZE / dstblock, @@ -1190,10 +1180,6 @@ dstp: while (donebytes < numbytes) { roundbytes = MIN(numbytes - donebytes, TPC_MAX_IO_SIZE); - if (list->token == NULL) { - tior = NULL; - goto dstw; - } tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tior->run); tior->list = list; @@ -1217,7 +1203,6 @@ dstp: tior->lun = list->token->lun; tior->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tior; -dstw: tiow = malloc(sizeof(*tiow), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tiow->run); tiow->list = list; @@ -1241,14 +1226,9 @@ dstw: tiow->lun = list->lun->lun; tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; - if (tior) { - TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); - TAILQ_INSERT_TAIL(prun, tior, rlinks); - prun = &tior->run; - } else { - TAILQ_INSERT_TAIL(prun, tiow, rlinks); - prun = &tiow->run; - } + TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); + TAILQ_INSERT_TAIL(prun, tior, rlinks); + prun = &tior->run; donebytes += roundbytes; } @@ -1262,6 +1242,89 @@ dstw: return (CTL_RETVAL_QUEUED); } +static int +tpc_process_zero_wut(struct tpc_list *list) +{ + struct tpc_io *tio, *tiow; + struct runl run, *prun; + int r; + uint32_t dstblock, len; + + if (list->stage > 0) { +complete: + /* Cleanup after previous rounds. */ + while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { + TAILQ_REMOVE(&list->allio, tio, links); + ctl_free_io(tio->io); + free(tio, M_CTL); + } + free(list->buf, M_CTL); + if (list->abort) { + ctl_set_task_aborted(list->ctsio); + return (CTL_RETVAL_ERROR); + } else if (list->error) { + ctl_set_sense(list->ctsio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_COPY_ABORTED, + /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + return (CTL_RETVAL_ERROR); + } + list->cursectors += list->segsectors; + list->curbytes += list->segbytes; + return (CTL_RETVAL_COMPLETE); + } + + dstblock = list->lun->b
Re: svn commit: r269540 - in head/sys: conf modules/an modules/arcnet modules/cam modules/carp modules/cxgb/cxgb modules/cxgb/iw_cxgb modules/cxgb/tom modules/cxgbe/if_cxgbe modules/cxgbe/iw_cxgbe mod
On Aug 5, 2014, at 4:52 AM, Bjoern A. Zeeb wrote: > > On 05 Aug 2014, at 10:31 , Bjoern A. Zeeb wrote: > >> >> On 04 Aug 2014, at 22:37 , Warner Losh wrote: >> >>> Author: imp >>> Date: Mon Aug 4 22:37:02 2014 >>> New Revision: 269540 >>> URL: http://svnweb.freebsd.org/changeset/base/269540 >>> >>> Log: >>> Move most of the 15 variations on generating opt_inet.h and >>> opt_inet6.h into kmod.mk by forcing almost everybody to eat the same >>> dogfood. While at it, consolidate the opt_bpf.h and opt_mroute.h >>> targets here too. >>> >>> Modified: >>> head/sys/conf/kern.opts.mk >>> head/sys/conf/kmod.mk >>> head/sys/modules/an/Makefile >>> head/sys/modules/arcnet/Makefile >>> head/sys/modules/cam/Makefile >>> head/sys/modules/carp/Makefile >>> head/sys/modules/cxgb/cxgb/Makefile >>> head/sys/modules/cxgb/iw_cxgb/Makefile >>> head/sys/modules/cxgb/tom/Makefile >>> head/sys/modules/cxgbe/if_cxgbe/Makefile >>> head/sys/modules/cxgbe/iw_cxgbe/Makefile >>> head/sys/modules/cxgbe/tom/Makefile >>> head/sys/modules/dummynet/Makefile >>> head/sys/modules/em/Makefile >>> head/sys/modules/en/Makefile >>> head/sys/modules/fatm/Makefile >>> head/sys/modules/firewire/fwip/Makefile >>> head/sys/modules/hatm/Makefile >>> head/sys/modules/i40e/Makefile (contents, props changed) >>> head/sys/modules/if_bridge/Makefile >>> head/sys/modules/if_disc/Makefile >>> head/sys/modules/if_faith/Makefile >>> head/sys/modules/if_gif/Makefile >>> head/sys/modules/if_gre/Makefile >>> head/sys/modules/if_lagg/Makefile >>> head/sys/modules/if_stf/Makefile >>> head/sys/modules/if_tap/Makefile >>> head/sys/modules/if_tun/Makefile >>> head/sys/modules/igb/Makefile >>> head/sys/modules/ip6_mroute_mod/Makefile >>> head/sys/modules/ip_mroute_mod/Makefile >>> head/sys/modules/ipdivert/Makefile >>> head/sys/modules/ipfilter/Makefile >>> head/sys/modules/ipfw/Makefile >>> head/sys/modules/ipoib/Makefile >>> head/sys/modules/ixgbe/Makefile >>> head/sys/modules/krpc/Makefile >>> head/sys/modules/linux/Makefile >>> head/sys/modules/lmc/Makefile >>> head/sys/modules/mlx4/Makefile >>> head/sys/modules/mlx4ib/Makefile >>> head/sys/modules/mlxen/Makefile >>> head/sys/modules/mthca/Makefile >>> head/sys/modules/netgraph/gif/Makefile >>> head/sys/modules/netgraph/iface/Makefile >>> head/sys/modules/netgraph/ipfw/Makefile >>> head/sys/modules/netgraph/netflow/Makefile >>> head/sys/modules/nfscl/Makefile >>> head/sys/modules/nfsclient/Makefile >>> head/sys/modules/nfslockd/Makefile >>> head/sys/modules/nfsserver/Makefile >>> head/sys/modules/patm/Makefile >>> head/sys/modules/pf/Makefile >>> head/sys/modules/pflog/Makefile >>> head/sys/modules/pfsync/Makefile >>> head/sys/modules/smbfs/Makefile >>> head/sys/modules/snc/Makefile >>> head/sys/modules/sppp/Makefile >>> head/sys/modules/trm/Makefile >>> head/sys/modules/virtio/network/Makefile >>> head/sys/modules/vmware/vmxnet3/Makefile >>> head/sys/modules/wlan/Makefile >>> head/sys/modules/wlan_acl/Makefile >>> head/sys/modules/wlan_amrr/Makefile >>> head/sys/modules/wlan_ccmp/Makefile >>> head/sys/modules/wlan_rssadapt/Makefile >>> head/sys/modules/wlan_tkip/Makefile >>> head/sys/modules/wlan_wep/Makefile >>> head/sys/modules/wlan_xauth/Makefile >> >> This broke a couple of kernel builds during universe: >> >> mips AP91 kernel failed, check _.mips.AP91 for details >> mips AP93 kernel failed, check _.mips.AP93 for details >> mips AR724X_BASE kernel failed, check _.mips.AR724X_BASE for details >> mips ENH200 kernel failed, check _.mips.ENH200 for details >> mips DIR-825B1 kernel failed, check _.mips.DIR-825B1 for details >> mips PB92 kernel failed, check _.mips.PB92 for details >> mips PICOSTATION_M2HP kernel failed, check _.mips.PICOSTATION_M2HP for >> details >> mips WZR-300HP kernel failed, check _.mips.WZR-300HP for details >> arm EFIKA_MX kernel failed, check _.arm.EFIKA_MX for details >> >> >> They all seem to not define INET6 and AP91 errors look like this; all seem >> to barf in the if_gif module built. Please investigate and unbreak. >> Would be really nice if these commits were tested to build and still give >> the same results upfront. I am mostly worried about the latter actually. > > I should have fixed the build in r269581. The other concern remains. Thanks Bjoern… I had a different, working change that I ran through Universe earlier in my development process. I reworked it though as part of teasing different changes apart of a larger change set, though, and the error crept in there. That’s my bad. Thanks for fixing it. Warner signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r269586 - head/sys/dev/usb/controller
Author: hselasky Date: Tue Aug 5 13:36:26 2014 New Revision: 269586 URL: http://svnweb.freebsd.org/changeset/base/269586 Log: - Ensure code which only applies to the control endpoint is not run for other endpoints in the data transfer path. - Ensure all bits of the "EPCON" register is written during initialisation. MFC after:3 days Modified: head/sys/dev/usb/controller/uss820dci.c Modified: head/sys/dev/usb/controller/uss820dci.c == --- head/sys/dev/usb/controller/uss820dci.c Tue Aug 5 13:01:21 2014 (r269585) +++ head/sys/dev/usb/controller/uss820dci.c Tue Aug 5 13:36:26 2014 (r269586) @@ -400,7 +400,7 @@ repeat: if (rx_stat & (USS820_RXSTAT_RXSETUP | USS820_RXSTAT_RXSOVW | USS820_RXSTAT_EDOVW)) { - if (td->remainder == 0) { + if (td->remainder == 0 && td->ep_index == 0) { /* * We are actually complete and have * received the next SETUP @@ -515,21 +515,24 @@ repeat: /* read out TX FIFO flags */ tx_flag = USS820_READ_1(sc, USS820_TXFLG); - /* read out RX FIFO status last */ - rx_stat = USS820_READ_1(sc, USS820_RXSTAT); + DPRINTFN(5, "tx_flag=0x%02x rem=%u\n", tx_flag, td->remainder); - DPRINTFN(5, "rx_stat=0x%02x tx_flag=0x%02x rem=%u\n", - rx_stat, tx_flag, td->remainder); + if (td->ep_index == 0) { + /* read out RX FIFO status last */ + rx_stat = USS820_READ_1(sc, USS820_RXSTAT); - if (rx_stat & (USS820_RXSTAT_RXSETUP | - USS820_RXSTAT_RXSOVW | - USS820_RXSTAT_EDOVW)) { - /* -* The current transfer was aborted -* by the USB Host -*/ - td->error = 1; - return (0); /* complete */ + DPRINTFN(5, "rx_stat=0x%02x\n", rx_stat); + + if (rx_stat & (USS820_RXSTAT_RXSETUP | + USS820_RXSTAT_RXSOVW | + USS820_RXSTAT_EDOVW)) { + /* +* The current transfer was aborted by the USB +* Host: +*/ + td->error = 1; + return (0); /* complete */ + } } if (tx_flag & (USS820_TXFLG_TXOVF | USS820_TXFLG_TXURF)) { @@ -611,20 +614,21 @@ uss820dci_data_tx_sync(struct uss820dci_ /* read out TX FIFO flag */ tx_flag = USS820_READ_1(sc, USS820_TXFLG); - /* read out RX FIFO status last */ - rx_stat = USS820_READ_1(sc, USS820_RXSTAT); - - DPRINTFN(5, "rx_stat=0x%02x rem=%u\n", rx_stat, td->remainder); - - if (rx_stat & (USS820_RXSTAT_RXSETUP | - USS820_RXSTAT_RXSOVW | - USS820_RXSTAT_EDOVW)) { - DPRINTFN(5, "faking complete\n"); - /* Race condition */ - return (0); /* complete */ + if (td->ep_index == 0) { + /* read out RX FIFO status last */ + rx_stat = USS820_READ_1(sc, USS820_RXSTAT); + + DPRINTFN(5, "rx_stat=0x%02x rem=%u\n", rx_stat, td->remainder); + + if (rx_stat & (USS820_RXSTAT_RXSETUP | + USS820_RXSTAT_RXSOVW | + USS820_RXSTAT_EDOVW)) { + DPRINTFN(5, "faking complete\n"); + /* Race condition */ + return (0); /* complete */ + } } - DPRINTFN(5, "tx_flag=0x%02x rem=%u\n", - tx_flag, td->remainder); + DPRINTFN(5, "tx_flag=0x%02x rem=%u\n", tx_flag, td->remainder); if (tx_flag & (USS820_TXFLG_TXOVF | USS820_TXFLG_TXURF)) { @@ -635,7 +639,7 @@ uss820dci_data_tx_sync(struct uss820dci_ USS820_TXFLG_TXFIF1)) { return (1); /* not complete */ } - if (sc->sc_dv_addr != 0xFF) { + if (td->ep_index == 0 && sc->sc_dv_addr != 0xFF) { /* write function address */ uss820dci_set_address(sc, sc->sc_dv_addr); } @@ -1528,7 +1532,7 @@ uss820dci_init(struct uss820dci_softc *s temp = USS820_EPCON_RXEPEN | USS820_EPCON_TXEPEN; } - uss820dci_update_shared_1(sc, USS820_EPCON, 0xFF, temp); + uss820dci_update_shared_1(sc, USS820_EPCON, 0, temp); } USB_BUS_UNLOCK(&sc->sc_bus); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r269490 - stable/10/sys/kern
On Sun, 3 Aug 2014, Peter Wemm wrote: > Author: peter > Date: Sun Aug 3 22:59:47 2014 > New Revision: 269490 > URL: http://svnweb.freebsd.org/changeset/base/269490 > > Log: > Insta-MFC r269489: partial revert of r262867 which was MFC'ed as r263820. > Don't ignore sndbuf/rcvbuf limits for SOCK_DGRAM sockets. This appears > to be an edit error or patch fuzz mismatch. It looks like the original commit was also merged to stable/9 as r263823, though with an incorrect commit message. It made it into 9.3-RELEASE, I I would say that this is an EN candidate. Gavin > Modified: > stable/10/sys/kern/uipc_usrreq.c > > Modified: stable/10/sys/kern/uipc_usrreq.c > == > --- stable/10/sys/kern/uipc_usrreq.c Sun Aug 3 22:37:21 2014 > (r269489) > +++ stable/10/sys/kern/uipc_usrreq.c Sun Aug 3 22:59:47 2014 > (r269490) > @@ -897,7 +897,7 @@ uipc_send(struct socket *so, int flags, > from = &sun_noname; > so2 = unp2->unp_socket; > SOCKBUF_LOCK(&so2->so_rcv); > - if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, from, m, > + if (sbappendaddr_locked(&so2->so_rcv, from, m, > control)) { > sorwakeup_locked(so2); > m = NULL; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269585 - in head: sbin/ipf sys/contrib/ipfilter/netinet
Author: cy Date: Tue Aug 5 13:01:21 2014 New Revision: 269585 URL: http://svnweb.freebsd.org/changeset/base/269585 Log: Honour WITH and WITHOUT_INET6_SUPPORT. Approved by: glebius (mentor) MFC after:3 days Modified: head/sbin/ipf/Makefile.inc head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sbin/ipf/Makefile.inc == --- head/sbin/ipf/Makefile.inc Tue Aug 5 12:08:50 2014(r269584) +++ head/sbin/ipf/Makefile.inc Tue Aug 5 13:01:21 2014(r269585) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + WARNS?=2 NO_WFORMAT= NO_WARRAY_BOUNDS= @@ -10,6 +12,12 @@ CFLAGS+= -I${.CURDIR}/../../../sys CFLAGS+= -I${.CURDIR}/../../../sys/contrib/ipfilter CFLAGS+= -DSTATETOP -D__UIO_EXPOSE +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DUSE_INET6 +.else +CFLAGS+= -DNOINET6 +.endif + LIBIPF=${.OBJDIR}/../libipf/libipf.a DPADD+=${LIBIPF} ${LIBKVM} LDADD+=${LIBIPF} -lkvm Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h == --- head/sys/contrib/ipfilter/netinet/ip_compat.h Tue Aug 5 12:08:50 2014(r269584) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Tue Aug 5 13:01:21 2014(r269585) @@ -118,6 +118,10 @@ struct ether_addr { # if defined(INET6) && !defined(USE_INET6) # define USE_INET6 # endif +# else +# if !defined(USE_INET6) && !defined(NOINET6) +# define USE_INET6 +# endif # endif # if defined(_KERNEL) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269584 - in head/sys/dev/usb: . net
Author: n_hibma Date: Tue Aug 5 12:08:50 2014 New Revision: 269584 URL: http://svnweb.freebsd.org/changeset/base/269584 Log: Add support for Huawei E3272 modems which are supported by the CDC ethernet class. Note: This is untested as I do not have a device like this. That is reflected in the MFC timeout. PR: 192345 Submitted by: rozhuk.im gmail.com MFC after:4 weeks Modified: head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/net/if_cdce.c == --- head/sys/dev/usb/net/if_cdce.c Tue Aug 5 12:04:40 2014 (r269583) +++ head/sys/dev/usb/net/if_cdce.c Tue Aug 5 12:08:50 2014 (r269584) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #defineUSB_DEBUG_VAR cdce_debug #include #include +#include #include "usb_if.h" #include @@ -251,8 +252,11 @@ static driver_t cdce_driver = { }; static devclass_t cdce_devclass; +static eventhandler_tag cdce_etag; -DRIVER_MODULE(cdce, uhub, cdce_driver, cdce_devclass, NULL, 0); +static int cdce_driver_loaded(struct module *, int, void *); + +DRIVER_MODULE(cdce, uhub, cdce_driver, cdce_devclass, cdce_driver_loaded, 0); MODULE_VERSION(cdce, 1); MODULE_DEPEND(cdce, uether, 1, 1, 1); MODULE_DEPEND(cdce, usb, 1, 1, 1); @@ -267,6 +271,10 @@ static const struct usb_ether_methods cd .ue_setpromisc = cdce_setpromisc, }; +static const STRUCT_USB_HOST_ID cdce_switch_devs[] = { + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3272_INIT, MSC_EJECT_HUAWEI2)}, +}; + static const STRUCT_USB_HOST_ID cdce_host_devs[] = { {USB_VPI(USB_VENDOR_ACERLABS, USB_PRODUCT_ACERLABS_M5632, CDCE_FLAG_NO_UNION)}, {USB_VPI(USB_VENDOR_AMBIT, USB_PRODUCT_AMBIT_NTL_250, CDCE_FLAG_NO_UNION)}, @@ -281,6 +289,16 @@ static const STRUCT_USB_HOST_ID cdce_hos {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, + + {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x16), + USB_DRIVER_INFO(0)}, + {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x46), + USB_DRIVER_INFO(0)}, + {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x76), + USB_DRIVER_INFO(0)}, }; static const STRUCT_USB_DUAL_ID cdce_dual_devs[] = { @@ -474,6 +492,48 @@ cdce_ncm_init(struct cdce_softc *sc) } #endif +static void +cdce_test_autoinst(void *arg, struct usb_device *udev, +struct usb_attach_arg *uaa) +{ + struct usb_interface *iface; + struct usb_interface_descriptor *id; + + if (uaa->dev_state != UAA_DEV_READY) + return; + + iface = usbd_get_iface(udev, 0); + if (iface == NULL) + return; + id = iface->idesc; + if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + return; + if (usbd_lookup_id_by_uaa(cdce_switch_devs, sizeof(cdce_switch_devs), uaa)) + return; /* no device match */ + + if (usb_msc_eject(udev, 0, USB_GET_DRIVER_INFO(uaa)) == 0) { + /* success, mark the udev as disappearing */ + uaa->dev_state = UAA_DEV_EJECTING; + } +} + +static int +cdce_driver_loaded(struct module *mod, int what, void *arg) +{ + switch (what) { + case MOD_LOAD: + /* register our autoinstall handler */ + cdce_etag = EVENTHANDLER_REGISTER(usb_dev_configured, + cdce_test_autoinst, NULL, EVENTHANDLER_PRI_ANY); + return (0); + case MOD_UNLOAD: + EVENTHANDLER_DEREGISTER(usb_dev_configured, cdce_etag); + return (0); + default: + return (EOPNOTSUPP); + } +} + static int cdce_probe(device_t dev) { Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Aug 5 12:04:40 2014(r269583) +++ head/sys/dev/usb/usbdevsTue Aug 5 12:08:50 2014(r269584) @@ -2342,9 +2342,11 @@ product HUAWEI E392 0x1505 LTE modem product HUAWEI E3131 0x1506 3G modem product HUAWEI K3765_INIT 0x1520 K3765 Initial product HUAWEI K4505_INIT 0x1521 K4505 Initial +product HUAWEI E3272_INIT 0x155b LTE modem initial product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E1730x1c05 3G modem product HUAWEI E173_INIT 0x1c0b 3G modem initial +product HUAWEI E3272
svn commit: r269583 - head/sbin/mount_nfs
Author: bz Date: Tue Aug 5 12:04:40 2014 New Revision: 269583 URL: http://svnweb.freebsd.org/changeset/base/269583 Log: Provide -o vers= support for mount_nfs. Our mount_nfs does use -o nfsv<2|3|4> or -2 or -3 to specify the version. OSX (these days), Solaris, and Linux use -o vers=<2,3,4>. With the upcoming autofs support we can make a lot of (entrerprisy) setups getting mount options from LDAP just work by providing -o vers= compatibility. PR: 192379 Reviewed by: wblock, bjk (man page), rmacklem, emaste MFC after:3 days Sponsored by: DARPA,AFRL Modified: head/sbin/mount_nfs/mount_nfs.8 head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.8 == --- head/sbin/mount_nfs/mount_nfs.8 Tue Aug 5 11:50:16 2014 (r269582) +++ head/sbin/mount_nfs/mount_nfs.8 Tue Aug 5 12:04:40 2014 (r269583) @@ -28,7 +28,7 @@ .\"@(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd December 7, 2013 +.Dd August 5, 2014 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -371,6 +371,14 @@ tune the timeout interval.) .It Cm udp Use UDP transport. +.It Cm vers Ns = Ns Aq Ar vers_number +Use the specified version number for NFS requests. +See the +.Cm nfsv2 , +.Cm nfsv3 , +and +.Cm nfsv4 +options for details. .It Cm wcommitsize Ns = Ns Aq Ar value Set the maximum pending write commit size to the specified value. This determines the maximum amount of pending write data that the NFS @@ -466,6 +474,26 @@ Same as Same as .Fl o Cm retrans Ns = Ns Aq Ar value .El +.Pp +The following +.Fl o +named options are equivalent to other +.Fl o +named options and are supported for compatibility with other +operating systems (e.g., Linux, Solaris, and OSX) to ease usage of +.Xr autofs 5 +support. +.Bl -tag -width indent +.It Fl o Cm vers Ns = Ns 2 +Same as +.Fl o Cm nfsv2 +.It Fl o Cm vers Ns = Ns 3 +Same as +.Fl o Cm nfsv3 +.It Fl o Cm vers Ns = Ns 4 +Same as +.Fl o Cm nfsv4 +.El .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , Modified: head/sbin/mount_nfs/mount_nfs.c == --- head/sbin/mount_nfs/mount_nfs.c Tue Aug 5 11:50:16 2014 (r269582) +++ head/sbin/mount_nfs/mount_nfs.c Tue Aug 5 12:04:40 2014 (r269583) @@ -310,6 +310,32 @@ main(int argc, char *argv[]) if (*p || num <= 0) errx(1, "illegal maxgroups value -- %s", val); //set_rpc_maxgrouplist(num); + } else if (strcmp(opt, "vers") == 0) { + num = strtol(val, &p, 10); + if (*p || num <= 0) + errx(1, "illegal vers value -- " + "%s", val); + switch (num) { + case 2: + mountmode = V2; + break; + case 3: + mountmode = V3; + build_iovec(&iov, &iovlen, + "nfsv3", NULL, 0); + break; + case 4: + mountmode = V4; + fstype = "nfs"; + nfsproto = IPPROTO_TCP; + if (portspec == NULL) + portspec = "2049"; + break; + default: + errx(1, "illegal nfs version " + "value -- %s", val); + } + pass_flag_to_nmount=0; } if (pass_flag_to_nmount) build_iovec(&iov, &iovlen, opt, val, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269582 - head/sys/dev/usb/serial
Author: n_hibma Date: Tue Aug 5 11:50:16 2014 New Revision: 269582 URL: http://svnweb.freebsd.org/changeset/base/269582 Log: don't OR integer error values together as this does not make sense. Instead bail on the first failed command. Modified: head/sys/dev/usb/serial/u3g.c Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Tue Aug 5 10:48:53 2014 (r269581) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 11:50:16 2014 (r269582) @@ -754,7 +754,8 @@ u3g_test_autoinst(void *arg, struct usb_ break; case U3GINIT_ZTESTOR: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); - error |= usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); + if (error == 0) + error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); break; case U3GINIT_CMOTECH: error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r269540 - in head/sys: conf modules/an modules/arcnet modules/cam modules/carp modules/cxgb/cxgb modules/cxgb/iw_cxgb modules/cxgb/tom modules/cxgbe/if_cxgbe modules/cxgbe/iw_cxgbe mod
On 05 Aug 2014, at 10:31 , Bjoern A. Zeeb wrote: > > On 04 Aug 2014, at 22:37 , Warner Losh wrote: > >> Author: imp >> Date: Mon Aug 4 22:37:02 2014 >> New Revision: 269540 >> URL: http://svnweb.freebsd.org/changeset/base/269540 >> >> Log: >> Move most of the 15 variations on generating opt_inet.h and >> opt_inet6.h into kmod.mk by forcing almost everybody to eat the same >> dogfood. While at it, consolidate the opt_bpf.h and opt_mroute.h >> targets here too. >> >> Modified: >> head/sys/conf/kern.opts.mk >> head/sys/conf/kmod.mk >> head/sys/modules/an/Makefile >> head/sys/modules/arcnet/Makefile >> head/sys/modules/cam/Makefile >> head/sys/modules/carp/Makefile >> head/sys/modules/cxgb/cxgb/Makefile >> head/sys/modules/cxgb/iw_cxgb/Makefile >> head/sys/modules/cxgb/tom/Makefile >> head/sys/modules/cxgbe/if_cxgbe/Makefile >> head/sys/modules/cxgbe/iw_cxgbe/Makefile >> head/sys/modules/cxgbe/tom/Makefile >> head/sys/modules/dummynet/Makefile >> head/sys/modules/em/Makefile >> head/sys/modules/en/Makefile >> head/sys/modules/fatm/Makefile >> head/sys/modules/firewire/fwip/Makefile >> head/sys/modules/hatm/Makefile >> head/sys/modules/i40e/Makefile (contents, props changed) >> head/sys/modules/if_bridge/Makefile >> head/sys/modules/if_disc/Makefile >> head/sys/modules/if_faith/Makefile >> head/sys/modules/if_gif/Makefile >> head/sys/modules/if_gre/Makefile >> head/sys/modules/if_lagg/Makefile >> head/sys/modules/if_stf/Makefile >> head/sys/modules/if_tap/Makefile >> head/sys/modules/if_tun/Makefile >> head/sys/modules/igb/Makefile >> head/sys/modules/ip6_mroute_mod/Makefile >> head/sys/modules/ip_mroute_mod/Makefile >> head/sys/modules/ipdivert/Makefile >> head/sys/modules/ipfilter/Makefile >> head/sys/modules/ipfw/Makefile >> head/sys/modules/ipoib/Makefile >> head/sys/modules/ixgbe/Makefile >> head/sys/modules/krpc/Makefile >> head/sys/modules/linux/Makefile >> head/sys/modules/lmc/Makefile >> head/sys/modules/mlx4/Makefile >> head/sys/modules/mlx4ib/Makefile >> head/sys/modules/mlxen/Makefile >> head/sys/modules/mthca/Makefile >> head/sys/modules/netgraph/gif/Makefile >> head/sys/modules/netgraph/iface/Makefile >> head/sys/modules/netgraph/ipfw/Makefile >> head/sys/modules/netgraph/netflow/Makefile >> head/sys/modules/nfscl/Makefile >> head/sys/modules/nfsclient/Makefile >> head/sys/modules/nfslockd/Makefile >> head/sys/modules/nfsserver/Makefile >> head/sys/modules/patm/Makefile >> head/sys/modules/pf/Makefile >> head/sys/modules/pflog/Makefile >> head/sys/modules/pfsync/Makefile >> head/sys/modules/smbfs/Makefile >> head/sys/modules/snc/Makefile >> head/sys/modules/sppp/Makefile >> head/sys/modules/trm/Makefile >> head/sys/modules/virtio/network/Makefile >> head/sys/modules/vmware/vmxnet3/Makefile >> head/sys/modules/wlan/Makefile >> head/sys/modules/wlan_acl/Makefile >> head/sys/modules/wlan_amrr/Makefile >> head/sys/modules/wlan_ccmp/Makefile >> head/sys/modules/wlan_rssadapt/Makefile >> head/sys/modules/wlan_tkip/Makefile >> head/sys/modules/wlan_wep/Makefile >> head/sys/modules/wlan_xauth/Makefile > > This broke a couple of kernel builds during universe: > > mips AP91 kernel failed, check _.mips.AP91 for details > mips AP93 kernel failed, check _.mips.AP93 for details > mips AR724X_BASE kernel failed, check _.mips.AR724X_BASE for details > mips ENH200 kernel failed, check _.mips.ENH200 for details > mips DIR-825B1 kernel failed, check _.mips.DIR-825B1 for details > mips PB92 kernel failed, check _.mips.PB92 for details > mips PICOSTATION_M2HP kernel failed, check _.mips.PICOSTATION_M2HP for details > mips WZR-300HP kernel failed, check _.mips.WZR-300HP for details > arm EFIKA_MX kernel failed, check _.arm.EFIKA_MX for details > > > They all seem to not define INET6 and AP91 errors look like this; all seem > to barf in the if_gif module built. Please investigate and unbreak. Would > be really nice if these commits were tested to build and still give the same > results upfront. I am mostly worried about the latter actually. I should have fixed the build in r269581. The other concern remains. > -- Kernel build for AP91 started on Tue Aug 5 07:06:20 UTC 2014 > -- > ===> AP91 > -- stage 1: configuring the kernel > -- > Kernel build directory is > /storage/head/obj//mips.mips/scratch/tmp/bz/head.svn/sys/AP91 > Don't forget to do ``make cleandepend && make depend'' > -- stage 2.1: cleaning up the object tree > -- > bmake: "/scratch/tmp/bz/head.svn/sys/modules/if_gif/Makefile" line 11: > warning: Couldn't read shell's output for "cat > /storage/head/obj/mips.mips/scratch/tmp/bz/head.svn/sys/AP91/opt_inet6.h"
svn commit: r269581 - head/sys/modules/if_gif
Author: bz Date: Tue Aug 5 10:48:53 2014 New Revision: 269581 URL: http://svnweb.freebsd.org/changeset/base/269581 Log: Revert the logic change from r269540. If the opt_inet6.h file is empty we set MK_INET6_SUPPORT to no, not if we do define INET6. This way we do not try to build IPv6 parts in if the kernel doesn't support them. This unbreaks several kernel configurations building modules but no INET6. Modified: head/sys/modules/if_gif/Makefile Modified: head/sys/modules/if_gif/Makefile == --- head/sys/modules/if_gif/MakefileTue Aug 5 10:29:01 2014 (r269580) +++ head/sys/modules/if_gif/MakefileTue Aug 5 10:48:53 2014 (r269581) @@ -9,7 +9,7 @@ SRCS= if_gif.c in_gif.c opt_inet.h opt_i .if defined(KERNBUILDDIR) OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h -.if !empty(OPT_INET6) +.if empty(OPT_INET6) MK_INET6_SUPPORT=no .endif .endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r269540 - in head/sys: conf modules/an modules/arcnet modules/cam modules/carp modules/cxgb/cxgb modules/cxgb/iw_cxgb modules/cxgb/tom modules/cxgbe/if_cxgbe modules/cxgbe/iw_cxgbe mod
On 04 Aug 2014, at 22:37 , Warner Losh wrote: > Author: imp > Date: Mon Aug 4 22:37:02 2014 > New Revision: 269540 > URL: http://svnweb.freebsd.org/changeset/base/269540 > > Log: > Move most of the 15 variations on generating opt_inet.h and > opt_inet6.h into kmod.mk by forcing almost everybody to eat the same > dogfood. While at it, consolidate the opt_bpf.h and opt_mroute.h > targets here too. > > Modified: > head/sys/conf/kern.opts.mk > head/sys/conf/kmod.mk > head/sys/modules/an/Makefile > head/sys/modules/arcnet/Makefile > head/sys/modules/cam/Makefile > head/sys/modules/carp/Makefile > head/sys/modules/cxgb/cxgb/Makefile > head/sys/modules/cxgb/iw_cxgb/Makefile > head/sys/modules/cxgb/tom/Makefile > head/sys/modules/cxgbe/if_cxgbe/Makefile > head/sys/modules/cxgbe/iw_cxgbe/Makefile > head/sys/modules/cxgbe/tom/Makefile > head/sys/modules/dummynet/Makefile > head/sys/modules/em/Makefile > head/sys/modules/en/Makefile > head/sys/modules/fatm/Makefile > head/sys/modules/firewire/fwip/Makefile > head/sys/modules/hatm/Makefile > head/sys/modules/i40e/Makefile (contents, props changed) > head/sys/modules/if_bridge/Makefile > head/sys/modules/if_disc/Makefile > head/sys/modules/if_faith/Makefile > head/sys/modules/if_gif/Makefile > head/sys/modules/if_gre/Makefile > head/sys/modules/if_lagg/Makefile > head/sys/modules/if_stf/Makefile > head/sys/modules/if_tap/Makefile > head/sys/modules/if_tun/Makefile > head/sys/modules/igb/Makefile > head/sys/modules/ip6_mroute_mod/Makefile > head/sys/modules/ip_mroute_mod/Makefile > head/sys/modules/ipdivert/Makefile > head/sys/modules/ipfilter/Makefile > head/sys/modules/ipfw/Makefile > head/sys/modules/ipoib/Makefile > head/sys/modules/ixgbe/Makefile > head/sys/modules/krpc/Makefile > head/sys/modules/linux/Makefile > head/sys/modules/lmc/Makefile > head/sys/modules/mlx4/Makefile > head/sys/modules/mlx4ib/Makefile > head/sys/modules/mlxen/Makefile > head/sys/modules/mthca/Makefile > head/sys/modules/netgraph/gif/Makefile > head/sys/modules/netgraph/iface/Makefile > head/sys/modules/netgraph/ipfw/Makefile > head/sys/modules/netgraph/netflow/Makefile > head/sys/modules/nfscl/Makefile > head/sys/modules/nfsclient/Makefile > head/sys/modules/nfslockd/Makefile > head/sys/modules/nfsserver/Makefile > head/sys/modules/patm/Makefile > head/sys/modules/pf/Makefile > head/sys/modules/pflog/Makefile > head/sys/modules/pfsync/Makefile > head/sys/modules/smbfs/Makefile > head/sys/modules/snc/Makefile > head/sys/modules/sppp/Makefile > head/sys/modules/trm/Makefile > head/sys/modules/virtio/network/Makefile > head/sys/modules/vmware/vmxnet3/Makefile > head/sys/modules/wlan/Makefile > head/sys/modules/wlan_acl/Makefile > head/sys/modules/wlan_amrr/Makefile > head/sys/modules/wlan_ccmp/Makefile > head/sys/modules/wlan_rssadapt/Makefile > head/sys/modules/wlan_tkip/Makefile > head/sys/modules/wlan_wep/Makefile > head/sys/modules/wlan_xauth/Makefile This broke a couple of kernel builds during universe: mips AP91 kernel failed, check _.mips.AP91 for details mips AP93 kernel failed, check _.mips.AP93 for details mips AR724X_BASE kernel failed, check _.mips.AR724X_BASE for details mips ENH200 kernel failed, check _.mips.ENH200 for details mips DIR-825B1 kernel failed, check _.mips.DIR-825B1 for details mips PB92 kernel failed, check _.mips.PB92 for details mips PICOSTATION_M2HP kernel failed, check _.mips.PICOSTATION_M2HP for details mips WZR-300HP kernel failed, check _.mips.WZR-300HP for details arm EFIKA_MX kernel failed, check _.arm.EFIKA_MX for details They all seem to not define INET6 and AP91 errors look like this; all seem to barf in the if_gif module built. Please investigate and unbreak. Would be really nice if these commits were tested to build and still give the same results upfront. I am mostly worried about the latter actually. -- >>> Kernel build for AP91 started on Tue Aug 5 07:06:20 UTC 2014 -- ===> AP91 -- >>> stage 1: configuring the kernel -- Kernel build directory is /storage/head/obj//mips.mips/scratch/tmp/bz/head.svn/sys/AP91 Don't forget to do ``make cleandepend && make depend'' -- >>> stage 2.1: cleaning up the object tree -- bmake: "/scratch/tmp/bz/head.svn/sys/modules/if_gif/Makefile" line 11: warning: Couldn't read shell's output for "cat /storage/head/obj/mips.mips/scratch/tmp/bz/head.svn/sys/AP91/opt_inet6.h" -- >>> stage 2.2: rebuilding the object tree -- bmake: "/scratch/tmp/bz/head.svn/
svn commit: r269580 - head/sys/vm
Author: royger Date: Tue Aug 5 10:29:01 2014 New Revision: 269580 URL: http://svnweb.freebsd.org/changeset/base/269580 Log: vm_phys: improve robustness of fictitious ranges With the current implementation of managed fictitious ranges when also using VM_PHYSSEG_DENSE, a user could try to register a fictitious range that starts inside of vm_page_array, but then overrruns it (because the end of the fictitious range is greater than vm_page_array_size + first_page). This would result in PHYS_TO_VM_PAGE returning unallocated pages from past the end of vm_page_array. The same could happen if a user tried to register a segment that starts outside of vm_page_array but ends inside of it. In order to fix this, allow vm_phys_fictitious_{reg/unreg}_range to use a set of pages from vm_page_array, and allocate the rest. Sponsored by: Citrix Systems R&D Reviewed by: kib, alc vm/vm_phys.c: - Allow registering/unregistering fictitious ranges that overrun vm_page_array. Modified: head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_phys.c == --- head/sys/vm/vm_phys.c Tue Aug 5 10:08:59 2014(r269579) +++ head/sys/vm/vm_phys.c Tue Aug 5 10:29:01 2014(r269580) @@ -591,36 +591,91 @@ vm_phys_fictitious_to_vm_page(vm_paddr_t return (m); } +static inline void +vm_phys_fictitious_init_range(vm_page_t range, vm_paddr_t start, +long page_count, vm_memattr_t memattr) +{ + long i; + + for (i = 0; i < page_count; i++) { + vm_page_initfake(&range[i], start + PAGE_SIZE * i, memattr); + range[i].oflags &= ~VPO_UNMANAGED; + range[i].busy_lock = VPB_UNBUSIED; + } +} + int vm_phys_fictitious_reg_range(vm_paddr_t start, vm_paddr_t end, vm_memattr_t memattr) { struct vm_phys_fictitious_seg *seg; vm_page_t fp; - long i, page_count; + long page_count; #ifdef VM_PHYSSEG_DENSE - long pi; + long pi, pe; + long dpage_count; #endif + KASSERT(start < end, + ("Start of segment isn't less than end (start: %jx end: %jx)", + (uintmax_t)start, (uintmax_t)end)); + page_count = (end - start) / PAGE_SIZE; #ifdef VM_PHYSSEG_DENSE pi = atop(start); - if (pi >= first_page && pi < vm_page_array_size + first_page) { - if (atop(end) >= vm_page_array_size + first_page) - return (EINVAL); + pe = atop(end); + if (pi >= first_page && (pi - first_page) < vm_page_array_size) { fp = &vm_page_array[pi - first_page]; - } else + if ((pe - first_page) > vm_page_array_size) { + /* +* We have a segment that starts inside +* of vm_page_array, but ends outside of it. +* +* Use vm_page_array pages for those that are +* inside of the vm_page_array range, and +* allocate the remaining ones. +*/ + dpage_count = vm_page_array_size - (pi - first_page); + vm_phys_fictitious_init_range(fp, start, dpage_count, + memattr); + page_count -= dpage_count; + start += ptoa(dpage_count); + goto alloc; + } + /* +* We can allocate the full range from vm_page_array, +* so there's no need to register the range in the tree. +*/ + vm_phys_fictitious_init_range(fp, start, page_count, memattr); + return (0); + } else if (pe > first_page && (pe - first_page) < vm_page_array_size) { + /* +* We have a segment that ends inside of vm_page_array, +* but starts outside of it. +*/ + fp = &vm_page_array[0]; + dpage_count = pe - first_page; + vm_phys_fictitious_init_range(fp, ptoa(first_page), dpage_count, + memattr); + end -= ptoa(dpage_count); + page_count -= dpage_count; + goto alloc; + } else if (pi < first_page && pe > (first_page + vm_page_array_size)) { + /* +* Trying to register a fictitious range that expands before +* and after vm_page_array. +*/ + return (EINVAL); + } else { +alloc: #endif - { fp = malloc(page_count * sizeof(struct vm_page), M_FICT_PAGES, M_WAITOK | M_ZERO); +#ifdef VM_PHYSSEG_DENSE } - for (i = 0; i < page_count; i++) { - vm_page_initfake(&fp[i], start + PAGE_SIZE * i, memattr); - fp[i].oflags &= ~VPO_UNMANAGED; -
svn commit: r269578 - head/sys/dev/usb
Author: n_hibma Date: Tue Aug 5 09:59:16 2014 New Revision: 269578 URL: http://svnweb.freebsd.org/changeset/base/269578 Log: Return USB_ERR_INVAL if the eject method is not known. PR: 145319 Submitted by: rozhuk.im gmail.com Modified: head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_msctest.c == --- head/sys/dev/usb/usb_msctest.c Tue Aug 5 09:44:10 2014 (r269577) +++ head/sys/dev/usb/usb_msctest.c Tue Aug 5 09:59:16 2014 (r269578) @@ -859,9 +859,10 @@ usb_msc_eject(struct usb_device *udev, u break; default: DPRINTF("Unknown eject method (%d)\n", method); - err = 0; - break; + bbb_detach(sc); + return (USB_ERR_INVAL); } + DPRINTF("Eject CD command status: %s\n", usbd_errstr(err)); bbb_detach(sc); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269577 - in head/sys: amd64/include arm/arm arm/include conf i386/i386 i386/include kern mips/include mips/mips powerpc/include powerpc/powerpc sparc64/include sparc64/sparc64 sys
Author: glebius Date: Tue Aug 5 09:44:10 2014 New Revision: 269577 URL: http://svnweb.freebsd.org/changeset/base/269577 Log: Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c The MD allocators were very common, however there were some minor differencies. These differencies were all consolidated in the MI allocator, under ifdefs. The defines from machine/vmparam.h turn on features required for a particular machine. For details look in the comment in sys/sf_buf.h. As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have machine/sf_buf.h, which is usually quite small. Tested by:glebius (i386), tuexen (arm32), kevlo (arm32) Reviewed by: kib Sponsored by: Netflix Sponsored by: Nginx, Inc. Added: head/sys/kern/subr_sfbuf.c (contents, props changed) Deleted: head/sys/powerpc/include/sf_buf.h head/sys/sparc64/include/sf_buf.h Modified: head/sys/amd64/include/sf_buf.h head/sys/arm/arm/vm_machdep.c head/sys/arm/include/sf_buf.h head/sys/arm/include/vmparam.h head/sys/conf/files.arm head/sys/conf/files.i386 head/sys/conf/files.mips head/sys/conf/files.pc98 head/sys/conf/files.powerpc head/sys/conf/files.sparc64 head/sys/i386/i386/vm_machdep.c head/sys/i386/include/sf_buf.h head/sys/i386/include/vmparam.h head/sys/mips/include/sf_buf.h head/sys/mips/include/vmparam.h head/sys/mips/mips/vm_machdep.c head/sys/powerpc/include/vmparam.h head/sys/powerpc/powerpc/vm_machdep.c head/sys/sparc64/include/vmparam.h head/sys/sparc64/sparc64/vm_machdep.c head/sys/sys/sf_buf.h Modified: head/sys/amd64/include/sf_buf.h == --- head/sys/amd64/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) +++ head/sys/amd64/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) @@ -29,42 +29,23 @@ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ -#include -#include -#include - /* * On this machine, the only purpose for which sf_buf is used is to implement * an opaque pointer required by the machine-independent parts of the kernel. * That pointer references the vm_page that is "mapped" by the sf_buf. The * actual mapping is provided by the direct virtual-to-physical mapping. */ -struct sf_buf; - -static inline struct sf_buf * -sf_buf_alloc(struct vm_page *m, int pri) -{ - - return ((struct sf_buf *)m); -} - -static inline void -sf_buf_free(struct sf_buf *sf) -{ -} - -static __inline vm_offset_t +static inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { return (PHYS_TO_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); } -static __inline vm_page_t +static inline vm_page_t sf_buf_page(struct sf_buf *sf) { return ((vm_page_t)sf); } - #endif /* !_MACHINE_SF_BUF_H_ */ Modified: head/sys/arm/arm/vm_machdep.c == --- head/sys/arm/arm/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) +++ head/sys/arm/arm/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -83,42 +82,6 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct switchframe) == 24); CTASSERT(sizeof(struct trapframe) == 80); -#ifndef NSFBUFS -#define NSFBUFS(512 + maxusers * 16) -#endif - -static int nsfbufs; -static int nsfbufspeak; -static int nsfbufsused; - -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, -"Maximum number of sendfile(2) sf_bufs available"); -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, -"Number of sendfile(2) sf_bufs at peak usage"); -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, -"Number of sendfile(2) sf_bufs in use"); - -static void sf_buf_init(void *arg); -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); - -LIST_HEAD(sf_head, sf_buf); - -/* - * A hash table of active sendfile(2) buffers - */ -static struct sf_head *sf_buf_active; -static u_long sf_buf_hashmask; - -#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) - -static TAILQ_HEAD(, sf_buf) sf_buf_freelist; -static u_intsf_buf_alloc_want; - -/* - * A lock used to synchronize access to the hash table and free list - */ -static struct mtx sf_buf_lock; - /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -184,106 +147,6 @@ cpu_thread_swapout(struct thread *td) { } -/* - * Detatch mapped page and release resources back to the system. - */ -void -sf_buf_free(struct sf_buf *sf) -{ - -mtx_lock(&sf_buf_lock); -sf->ref_count--; -if (sf->ref_count == 0) { -TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); -nsfbufsused--; -pmap_kremove(sf->kva); -
svn commit: r269576 - in head/sys/dev/usb: . quirk serial
Author: n_hibma Date: Tue Aug 5 09:35:25 2014 New Revision: 269576 URL: http://svnweb.freebsd.org/changeset/base/269576 Log: Add a second Huawei SCSI eject command as USB mode switch config files sometimes use one or the other. Maybe newer Huawei modems switched. Add a quirk for it as well. PR: 145319 Submitted by: rozhuk.im gmail.com Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/quirk/usb_quirk.h head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/usb_msctest.h Modified: head/sys/dev/usb/quirk/usb_quirk.c == --- head/sys/dev/usb/quirk/usb_quirk.c Tue Aug 5 08:48:24 2014 (r269575) +++ head/sys/dev/usb/quirk/usb_quirk.c Tue Aug 5 09:35:25 2014 (r269576) @@ -562,6 +562,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_MSC_EJECT_WAIT] = "UQ_MSC_EJECT_WAIT", [UQ_MSC_EJECT_SAEL_M460]= "UQ_MSC_EJECT_SAEL_M460", [UQ_MSC_EJECT_HUAWEISCSI] = "UQ_MSC_EJECT_HUAWEISCSI", + [UQ_MSC_EJECT_HUAWEISCSI2] = "UQ_MSC_EJECT_HUAWEISCSI2", [UQ_MSC_EJECT_TCT] = "UQ_MSC_EJECT_TCT", [UQ_BAD_MIDI] = "UQ_BAD_MIDI", [UQ_AU_VENDOR_CLASS]= "UQ_AU_VENDOR_CLASS", Modified: head/sys/dev/usb/quirk/usb_quirk.h == --- head/sys/dev/usb/quirk/usb_quirk.h Tue Aug 5 08:48:24 2014 (r269575) +++ head/sys/dev/usb/quirk/usb_quirk.h Tue Aug 5 09:35:25 2014 (r269576) @@ -102,6 +102,7 @@ enum { UQ_MSC_EJECT_WAIT, /* wait for the device to eject */ UQ_MSC_EJECT_SAEL_M460, /* ejects after Sael USB commands */ UQ_MSC_EJECT_HUAWEISCSI,/* ejects after Huawei SCSI command */ + UQ_MSC_EJECT_HUAWEISCSI2, /* ejects after Huawei SCSI 2 command */ UQ_MSC_EJECT_TCT, /* ejects after TCT SCSI command */ UQ_BAD_MIDI,/* device claims MIDI class, but isn't */ Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:48:24 2014 (r269575) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 09:35:25 2014 (r269576) @@ -86,7 +86,8 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #defineU3GINIT_WAIT7 /* Device reappears after a delay */ #defineU3GINIT_SAEL_M460 8 /* Requires vendor init */ #defineU3GINIT_HUAWEISCSI 9 /* Requires Huawei SCSI init command */ -#defineU3GINIT_TCT 10 /* Requires TCT Mobile init command */ +#defineU3GINIT_HUAWEISCSI2 10 /* Requires Huawei SCSI init command (2) */ +#defineU3GINIT_TCT 11 /* Requires TCT Mobile init command */ enum { U3G_BULK_WR, @@ -720,6 +721,8 @@ u3g_test_autoinst(void *arg, struct usb_ method = U3GINIT_WAIT; else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI)) method = U3GINIT_HUAWEISCSI; + else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI2)) + method = U3GINIT_HUAWEISCSI2; else if (usb_test_quirk(uaa, UQ_MSC_EJECT_TCT)) method = U3GINIT_TCT; else if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa) == 0) @@ -740,6 +743,9 @@ u3g_test_autoinst(void *arg, struct usb_ case U3GINIT_HUAWEISCSI: error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI); break; + case U3GINIT_HUAWEISCSI2: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI2); + break; case U3GINIT_SCSIEJECT: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); break; Modified: head/sys/dev/usb/usb_msctest.c == --- head/sys/dev/usb/usb_msctest.c Tue Aug 5 08:48:24 2014 (r269575) +++ head/sys/dev/usb/usb_msctest.c Tue Aug 5 09:35:25 2014 (r269576) @@ -103,6 +103,9 @@ static uint8_t scsi_cmotech_eject[] = static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_huawei_eject2[] = { 0x11, 0x06, 0x20, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_tct_eject[] = { 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 }; static uint8_t scsi_sync_cache[] = { 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
svn commit: r269575 - head/sys/dev/usb
Author: n_hibma Date: Tue Aug 5 08:48:24 2014 New Revision: 269575 URL: http://svnweb.freebsd.org/changeset/base/269575 Log: Reset the error value in the softc before starting a BBB transfer. PR: 145319 Submitted by: rozhuk.im gmail.com MFC after:3 days Modified: head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_msctest.c == --- head/sys/dev/usb/usb_msctest.c Tue Aug 5 08:30:38 2014 (r269574) +++ head/sys/dev/usb/usb_msctest.c Tue Aug 5 08:48:24 2014 (r269575) @@ -485,6 +485,7 @@ bbb_command_start(struct bbb_transfer *s sc->data_rem = data_len; sc->data_timeout = (data_timeout + USB_MS_HZ); sc->actlen = 0; + sc->error = 0; sc->cmd_len = cmd_len; memset(&sc->cbw->CBWCDB, 0, sizeof(sc->cbw->CBWCDB)); memcpy(&sc->cbw->CBWCDB, cmd_ptr, cmd_len); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269574 - stable/10/sys/cam/ctl
Author: mav Date: Tue Aug 5 08:30:38 2014 New Revision: 269574 URL: http://svnweb.freebsd.org/changeset/base/269574 Log: MFC r269444, r269450: Plug EXTENDED COPY request data memory leak. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c == --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:30:07 2014 (r269573) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:30:38 2014 (r269574) @@ -942,6 +942,8 @@ tpc_process(struct tpc_list *list) done: //printf("ZZZ done\n"); + free(list->params, M_CTL); + list->params = NULL; mtx_lock(&lun->lun_lock); if ((list->flags & EC_LIST_ID_USAGE_MASK) == EC_LIST_ID_USAGE_NONE) { TAILQ_REMOVE(&lun->tpc_lists, list, links); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269571 - in head/sys/dev/usb: . serial
Author: n_hibma Date: Tue Aug 5 08:29:16 2014 New Revision: 269571 URL: http://svnweb.freebsd.org/changeset/base/269571 Log: Add ID for Novatel MC990D to u3g. PR: 145319 Submitted by: rozhuk.im gmail.com MFC after:3 days Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:28:29 2014 (r269570) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:29:16 2014 (r269571) @@ -336,6 +336,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(NOVATEL, MC547, 0), U3G_DEV(NOVATEL, MC679, 0), U3G_DEV(NOVATEL, MC950D, 0), + U3G_DEV(NOVATEL, MC990D, 0), U3G_DEV(NOVATEL, MIFI2200, U3GINIT_SCSIEJECT), U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT), U3G_DEV(NOVATEL, U720, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Aug 5 08:28:29 2014(r269570) +++ head/sys/dev/usb/usbdevsTue Aug 5 08:29:16 2014(r269571) @@ -3231,6 +3231,7 @@ product NOVATEL EU740 0x2410 Expedite E product NOVATEL EU870D 0x2420 Expedite EU870D product NOVATEL U727 0x4100 Merlin U727 CDMA product NOVATEL MC950D 0x4400 Novatel MC950D HSUPA +product NOVATEL MC990D 0x7001 Novatel MC990D product NOVATEL ZEROCD 0x5010 Novatel ZeroCD product NOVATEL MIFI2200V 0x5020 Novatel MiFi 2200 CDMA Virgin Mobile product NOVATEL ZEROCD20x5030 Novatel ZeroCD ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269572 - stable/10/sys/cam/ctl
Author: mav Date: Tue Aug 5 08:29:24 2014 New Revision: 269572 URL: http://svnweb.freebsd.org/changeset/base/269572 Log: MFC r269442: Fix some bugs in RECEIVE COPY STATUS data. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c == --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:29:16 2014 (r269571) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:29:24 2014 (r269572) @@ -481,7 +481,8 @@ ctl_receive_copy_failure_details(struct data = (struct scsi_receive_copy_failure_details_data *)ctsio->kern_data_ptr; if (list_copy.completed && (list_copy.error || list_copy.abort)) { - scsi_ulto4b(sizeof(*data) - 4, data->available_data); + scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len, + data->available_data); data->copy_command_status = RCS_CCS_ERROR; } else scsi_ulto4b(0, data->available_data); @@ -553,7 +554,8 @@ ctl_receive_copy_status_lid4(struct ctl_ ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; - scsi_ulto4b(sizeof(*data) - 4, data->available_data); + scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len, + data->available_data); data->response_to_service_action = list_copy.service_action; if (list_copy.completed) { if (list_copy.error) @@ -566,14 +568,10 @@ ctl_receive_copy_status_lid4(struct ctl_ data->copy_command_status = RCS_CCS_INPROG_FG; scsi_ulto2b(list_copy.curops, data->operation_counter); scsi_ulto4b(UINT32_MAX, data->estimated_status_update_delay); - if (list_copy.curbytes <= UINT32_MAX) { - data->transfer_count_units = RCS_TC_BYTES; - scsi_ulto4b(list_copy.curbytes, data->transfer_count); - } else { - data->transfer_count_units = RCS_TC_MBYTES; - scsi_ulto4b(list_copy.curbytes >> 20, data->transfer_count); - } + data->transfer_count_units = RCS_TC_BYTES; + scsi_u64to8b(list_copy.curbytes, data->transfer_count); scsi_ulto2b(list_copy.curseg, data->segments_processed); + data->length_of_the_sense_data_field = list_copy.sense_len; data->sense_data_length = list_copy.sense_len; memcpy(data->sense_data, &list_copy.sense_data, list_copy.sense_len); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269570 - stable/10/sys/cam/ctl
Author: mav Date: Tue Aug 5 08:28:29 2014 New Revision: 269570 URL: http://svnweb.freebsd.org/changeset/base/269570 Log: MFC r269441: Add missing comparisons to make list IDs in EXTENDED COPY per-initiator, as they should be. Wrap it into a function to not duplicate the code. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c == --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:24:41 2014 (r269569) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:28:29 2014 (r269570) @@ -327,6 +327,21 @@ ctl_receive_copy_operating_parameters(st return (retval); } +static struct tpc_list * +tpc_find_list(struct ctl_lun *lun, uint32_t list_id, uint32_t init_idx) +{ + struct tpc_list *list; + + mtx_assert(&lun->lun_lock, MA_OWNED); + TAILQ_FOREACH(list, &lun->tpc_lists, links) { + if ((list->flags & EC_LIST_ID_USAGE_MASK) != +EC_LIST_ID_USAGE_NONE && list->list_id == list_id && + list->init_idx == init_idx) + break; + } + return (list); +} + int ctl_receive_copy_status_lid1(struct ctl_scsiio *ctsio) { @@ -348,11 +363,8 @@ ctl_receive_copy_status_lid1(struct ctl_ list_id = cdb->list_identifier; mtx_lock(&lun->lun_lock); - TAILQ_FOREACH(list, &lun->tpc_lists, links) { - if ((list->flags & EC_LIST_ID_USAGE_MASK) != -EC_LIST_ID_USAGE_NONE && list->list_id == list_id) - break; - } + list = tpc_find_list(lun, list_id, + ctl_get_resindex(&ctsio->io_hdr.nexus)); if (list == NULL) { mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, @@ -433,12 +445,9 @@ ctl_receive_copy_failure_details(struct list_id = cdb->list_identifier; mtx_lock(&lun->lun_lock); - TAILQ_FOREACH(list, &lun->tpc_lists, links) { - if (list->completed && (list->flags & EC_LIST_ID_USAGE_MASK) != -EC_LIST_ID_USAGE_NONE && list->list_id == list_id) - break; - } - if (list == NULL) { + list = tpc_find_list(lun, list_id, + ctl_get_resindex(&ctsio->io_hdr.nexus)); + if (list == NULL || !list->completed) { mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, /*field*/ 2, /*bit_valid*/ 0, @@ -507,11 +516,8 @@ ctl_receive_copy_status_lid4(struct ctl_ list_id = scsi_4btoul(cdb->list_identifier); mtx_lock(&lun->lun_lock); - TAILQ_FOREACH(list, &lun->tpc_lists, links) { - if ((list->flags & EC_LIST_ID_USAGE_MASK) != -EC_LIST_ID_USAGE_NONE && list->list_id == list_id) - break; - } + list = tpc_find_list(lun, list_id, + ctl_get_resindex(&ctsio->io_hdr.nexus)); if (list == NULL) { mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, @@ -596,11 +602,8 @@ ctl_copy_operation_abort(struct ctl_scsi list_id = scsi_4btoul(cdb->list_identifier); mtx_lock(&lun->lun_lock); - TAILQ_FOREACH(list, &lun->tpc_lists, links) { - if ((list->flags & EC_LIST_ID_USAGE_MASK) != -EC_LIST_ID_USAGE_NONE && list->list_id == list_id) - break; - } + list = tpc_find_list(lun, list_id, + ctl_get_resindex(&ctsio->io_hdr.nexus)); if (list == NULL) { mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, @@ -1210,12 +1213,7 @@ ctl_extended_copy_lid1(struct ctl_scsiio list->lun = lun; mtx_lock(&lun->lun_lock); if ((list->flags & EC_LIST_ID_USAGE_MASK) != EC_LIST_ID_USAGE_NONE) { - TAILQ_FOREACH(tlist, &lun->tpc_lists, links) { - if ((tlist->flags & EC_LIST_ID_USAGE_MASK) != -EC_LIST_ID_USAGE_NONE && - tlist->list_id == list->list_id) - break; - } + tlist = tpc_find_list(lun, list->list_id, list->init_idx); if (tlist != NULL && !tlist->completed) { mtx_unlock(&lun->lun_lock); free(list, M_CTL); @@ -1338,12 +1336,7 @@ ctl_extended_copy_lid4(struct ctl_scsiio list->lun = lun; mtx_lock(&lun->lun_lock); if ((list->flags & EC_LIST_ID_USAGE_MASK) != EC_LIST_ID_USAGE_NONE) { - TAILQ_FOREACH(tlist, &lun->tpc_lists, links) { - if ((tlist->flags & EC_LIST_ID_USAGE_MASK) != -EC_LIST_ID_USAGE_NONE && -
svn commit: r269569 - in head/sys/dev/usb: controller serial wlan
Author: n_hibma Date: Tue Aug 5 08:24:41 2014 New Revision: 269569 URL: http://svnweb.freebsd.org/changeset/base/269569 Log: Remove unused defines. Fix some device_printf's that were missing '\n' at the end or had speling errors. PR: 145319 Submitted by: rozhuk.im gmail.com Modified: head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/wlan/if_upgt.c Modified: head/sys/dev/usb/controller/ehci.c == --- head/sys/dev/usb/controller/ehci.c Tue Aug 5 08:00:01 2014 (r269568) +++ head/sys/dev/usb/controller/ehci.c Tue Aug 5 08:24:41 2014 (r269569) @@ -210,7 +210,7 @@ ehci_reset(ehci_softc_t *sc) return (0); } } - device_printf(sc->sc_bus.bdev, "Reset timeout\n"); + device_printf(sc->sc_bus.bdev, "reset timeout\n"); return (USB_ERR_IOERROR); } @@ -285,7 +285,7 @@ ehci_init_sub(struct ehci_softc *sc) } } if (hcr) { - device_printf(sc->sc_bus.bdev, "Run timeout\n"); + device_printf(sc->sc_bus.bdev, "run timeout\n"); return (USB_ERR_IOERROR); } return (USB_ERR_NORMAL_COMPLETION); Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:00:01 2014 (r269568) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 08:24:41 2014 (r269569) @@ -76,15 +76,6 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #defineU3G_CONFIG_INDEX0 #defineU3G_BSIZE 2048 -#defineU3GSP_GPRS 0 -#defineU3GSP_EDGE 1 -#defineU3GSP_CDMA 2 -#defineU3GSP_UMTS 3 -#defineU3GSP_HSDPA 4 -#defineU3GSP_HSUPA 5 -#defineU3GSP_HSPA 6 -#defineU3GSP_MAX 7 - /* Eject methods; See also usb_quirks.h:UQ_MSC_EJECT_* */ #defineU3GINIT_HUAWEI 1 /* Requires Huawei init command */ #defineU3GINIT_SIERRA 2 /* Requires Sierra init command */ @@ -890,7 +881,7 @@ u3g_attach(device_t dev) sc->sc_iface[nports] = id->bInterfaceNumber; if (bootverbose && sc->sc_xfer[nports][U3G_INTR]) { - device_printf(dev, "port %d supports modem control", + device_printf(dev, "port %d supports modem control\n", nports); } Modified: head/sys/dev/usb/serial/uftdi.c == --- head/sys/dev/usb/serial/uftdi.c Tue Aug 5 08:00:01 2014 (r269568) +++ head/sys/dev/usb/serial/uftdi.c Tue Aug 5 08:24:41 2014 (r269569) @@ -1034,7 +1034,7 @@ uftdi_devtype_setup(struct uftdi_softc * } else { sc->sc_devtype = DEVT_232R; device_printf(sc->sc_dev, "Warning: unknown FTDI " - "device type, bcdDevice=0x%04x, assuming 232R", + "device type, bcdDevice=0x%04x, assuming 232R\n", uaa->info.bcdDevice); } sc->sc_ucom.sc_portno = 0; Modified: head/sys/dev/usb/wlan/if_upgt.c == --- head/sys/dev/usb/wlan/if_upgt.c Tue Aug 5 08:00:01 2014 (r269568) +++ head/sys/dev/usb/wlan/if_upgt.c Tue Aug 5 08:24:41 2014 (r269569) @@ -428,7 +428,7 @@ upgt_get_stats(struct upgt_softc *sc) data_cmd = upgt_getbuf(sc); if (data_cmd == NULL) { - device_printf(sc->sc_dev, "%s: out of buffer.\n", __func__); + device_printf(sc->sc_dev, "%s: out of buffers.\n", __func__); return; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r269567 - in head/sys: boot/usb conf dev/usb dev/usb/template modules/usb/template
Author: hselasky Date: Tue Aug 5 07:03:16 2014 New Revision: 269567 URL: http://svnweb.freebsd.org/changeset/base/269567 Log: Add new USB phone descriptor template for USB device side mode. MFC after:3 days Added: head/sys/dev/usb/template/usb_template_phone.c (contents, props changed) Modified: head/sys/boot/usb/usbcore.mk head/sys/conf/files head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/template/usb_template.h head/sys/dev/usb/usb_ioctl.h head/sys/modules/usb/template/Makefile Modified: head/sys/boot/usb/usbcore.mk == --- head/sys/boot/usb/usbcore.mkTue Aug 5 06:38:21 2014 (r269566) +++ head/sys/boot/usb/usbcore.mkTue Aug 5 07:03:16 2014 (r269567) @@ -141,6 +141,7 @@ KSRCS+= usb_template_modem.c KSRCS+=usb_template_mouse.c KSRCS+=usb_template_kbd.c KSRCS+=usb_template_audio.c +KSRCS+=usb_template_phone.c # # USB mass storage support Modified: head/sys/conf/files == --- head/sys/conf/files Tue Aug 5 06:38:21 2014(r269566) +++ head/sys/conf/files Tue Aug 5 07:03:16 2014(r269567) @@ -2514,6 +2514,7 @@ dev/usb/template/usb_template_modem.c op dev/usb/template/usb_template_mouse.c optional usb_template dev/usb/template/usb_template_msc.coptional usb_template dev/usb/template/usb_template_mtp.coptional usb_template +dev/usb/template/usb_template_phone.c optional usb_template # # USB END # Modified: head/sys/dev/usb/template/usb_template.c == --- head/sys/dev/usb/template/usb_template.cTue Aug 5 06:38:21 2014 (r269566) +++ head/sys/dev/usb/template/usb_template.cTue Aug 5 07:03:16 2014 (r269567) @@ -135,7 +135,7 @@ usb_make_raw_desc(struct usb_temp_setup /* check if we have got a CDC union descriptor */ - if ((raw[0] >= sizeof(struct usb_cdc_union_descriptor)) && + if ((raw[0] == sizeof(struct usb_cdc_union_descriptor)) && (raw[1] == UDESC_CS_INTERFACE) && (raw[2] == UDESCSUB_CDC_UNION)) { struct usb_cdc_union_descriptor *ud = (void *)dst; @@ -150,7 +150,7 @@ usb_make_raw_desc(struct usb_temp_setup /* check if we have got an interface association descriptor */ - if ((raw[0] >= sizeof(struct usb_interface_assoc_descriptor)) && + if ((raw[0] == sizeof(struct usb_interface_assoc_descriptor)) && (raw[1] == UDESC_IFACE_ASSOC)) { struct usb_interface_assoc_descriptor *iad = (void *)dst; @@ -162,7 +162,7 @@ usb_make_raw_desc(struct usb_temp_setup /* check if we have got a call management descriptor */ - if ((raw[0] >= sizeof(struct usb_cdc_cm_descriptor)) && + if ((raw[0] == sizeof(struct usb_cdc_cm_descriptor)) && (raw[1] == UDESC_CS_INTERFACE) && (raw[2] == UDESCSUB_CDC_CM)) { struct usb_cdc_cm_descriptor *ccd = (void *)dst; @@ -1368,6 +1368,9 @@ usb_temp_setup_by_index(struct usb_devic case USB_TEMP_MOUSE: err = usb_temp_setup(udev, &usb_template_mouse); break; + case USB_TEMP_PHONE: + err = usb_temp_setup(udev, &usb_template_phone); + break; default: return (USB_ERR_INVAL); } Modified: head/sys/dev/usb/template/usb_template.h == --- head/sys/dev/usb/template/usb_template.hTue Aug 5 06:38:21 2014 (r269566) +++ head/sys/dev/usb/template/usb_template.hTue Aug 5 07:03:16 2014 (r269567) @@ -105,6 +105,7 @@ extern const struct usb_temp_device_desc extern const struct usb_temp_device_desc usb_template_mouse; extern const struct usb_temp_device_desc usb_template_msc; extern const struct usb_temp_device_desc usb_template_mtp; +extern const struct usb_temp_device_desc usb_template_phone; usb_error_tusb_temp_setup(struct usb_device *, const struct usb_temp_device_desc *); Added: head/sys/dev/usb/template/usb_template_phone.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/template/usb_template_phone.c Tue Aug 5 07:03:16 2014(r269567) @@ -0,0 +1,419 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2014 Hans Petter Selasky. All rights reserved. + * + * Redistribution and use in source and binary forms,