svn commit: r286821 - head/sys/powerpc/powerpc
Author: jhibbits Date: Sun Aug 16 01:08:59 2015 New Revision: 286821 URL: https://svnweb.freebsd.org/changeset/base/286821 Log: SRR1 and DSISR aren't pointers, print them as integers. Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c == --- head/sys/powerpc/powerpc/trap.c Sun Aug 16 00:39:44 2015 (r286820) +++ head/sys/powerpc/powerpc/trap.c Sun Aug 16 01:08:59 2015 (r286821) @@ -413,8 +413,8 @@ printtrap(u_int vector, struct trapframe case EXC_DTMISS: printf( virtual address = 0x% PRIxPTR \n, frame-dar); #ifdef AIM - printf( dsisr = 0x% PRIxPTR \n, - frame-cpu.aim.dsisr); + printf( dsisr = 0x%lx\n, + (u_long)frame-cpu.aim.dsisr); #endif break; case EXC_ISE: @@ -438,7 +438,7 @@ printtrap(u_int vector, struct trapframe frame-cpu.booke.esr); #endif printf( srr0= 0x% PRIxPTR \n, frame-srr0); - printf( srr1= 0x% PRIxPTR \n, frame-srr1); + printf( srr1= 0x%lx\n, (u_long)frame-srr1); printf( lr = 0x% PRIxPTR \n, frame-lr); printf( curthread = %p\n, curthread); if (curthread != NULL) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286820 - stable/9/lib/libgeom
Author: mav Date: Sun Aug 16 00:39:44 2015 New Revision: 286820 URL: https://svnweb.freebsd.org/changeset/base/286820 Log: MFC r286719: Revert part of r280687, reporting 1 (true) for empty value. For example, it made gpart partitions without label report 1 as label. Modified: stable/9/lib/libgeom/geom_xml2tree.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libgeom/ (props changed) Modified: stable/9/lib/libgeom/geom_xml2tree.c == --- stable/9/lib/libgeom/geom_xml2tree.cSun Aug 16 00:37:47 2015 (r286819) +++ stable/9/lib/libgeom/geom_xml2tree.cSun Aug 16 00:39:44 2015 (r286820) @@ -286,7 +286,7 @@ EndElement(void *userData, const char *n element, name); return; } - gc-lg_val = p ? p : strdup(1); + gc-lg_val = p; LIST_INSERT_HEAD(c, gc, lg_config); return; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286819 - stable/10/lib/libgeom
Author: mav Date: Sun Aug 16 00:37:47 2015 New Revision: 286819 URL: https://svnweb.freebsd.org/changeset/base/286819 Log: MFC r286719: Revert part of r280687, reporting 1 (true) for empty value. For example, it made gpart partitions without label report 1 as label. Modified: stable/10/lib/libgeom/geom_xml2tree.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgeom/geom_xml2tree.c == --- stable/10/lib/libgeom/geom_xml2tree.c Sun Aug 16 00:36:48 2015 (r286818) +++ stable/10/lib/libgeom/geom_xml2tree.c Sun Aug 16 00:37:47 2015 (r286819) @@ -286,7 +286,7 @@ EndElement(void *userData, const char *n element, name); return; } - gc-lg_val = p ? p : strdup(1); + gc-lg_val = p; LIST_INSERT_HEAD(c, gc, lg_config); return; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286814 - head/sys/dev/ata
Author: mav Date: Sat Aug 15 21:46:02 2015 New Revision: 286814 URL: https://svnweb.freebsd.org/changeset/base/286814 Log: Remove UMA allocation of ATA requests. After CAM replaced old ATA stack, this driver processes no more then one request at a time per channel. Using UMA after that is overkill, so replace it with simple preallocation of one request per channel. MFC after:2 weeks Modified: head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h Modified: head/sys/dev/ata/ata-all.c == --- head/sys/dev/ata/ata-all.c Sat Aug 15 19:58:00 2015(r286813) +++ head/sys/dev/ata/ata-all.c Sat Aug 15 21:46:02 2015(r286814) @@ -75,7 +75,6 @@ static void ata_uninit(void); MALLOC_DEFINE(M_ATA, ata_generic, ATA driver generic layer); int (*ata_raid_ioctl_func)(u_long cmd, caddr_t data) = NULL; devclass_t ata_devclass; -uma_zone_t ata_request_zone; int ata_dma_check_80pin = 1; /* sysctl vars */ @@ -650,12 +649,7 @@ ata_cam_begin_transaction(device_t dev, struct ata_channel *ch = device_get_softc(dev); struct ata_request *request; - if (!(request = ata_alloc_request())) { - device_printf(dev, FAILURE - out of memory in start\n); - ccb-ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); - return; - } + request = ch-request; bzero(request, sizeof(*request)); /* setup request */ @@ -794,7 +788,6 @@ ata_cam_process_sense(device_t dev, stru ccb-ccb_h.status |= CAM_AUTOSENSE_FAIL; } - ata_free_request(request); xpt_done(ccb); /* Do error recovery if needed. */ if (fatalerr) @@ -865,10 +858,8 @@ ata_cam_end_transaction(device_t dev, st if ((ccb-ccb_h.status CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR (ccb-ccb_h.flags CAM_DIS_AUTOSENSE) == 0) ata_cam_request_sense(dev, request); - else { - ata_free_request(request); + else xpt_done(ccb); - } /* Do error recovery if needed. */ if (fatalerr) ata_reinit(dev); @@ -1148,18 +1139,3 @@ static moduledata_t ata_moduledata = { DECLARE_MODULE(ata, ata_moduledata, SI_SUB_CONFIGURE, SI_ORDER_SECOND); MODULE_VERSION(ata, 1); MODULE_DEPEND(ata, cam, 1, 1, 1); - -static void -ata_init(void) -{ -ata_request_zone = uma_zcreate(ata_request, sizeof(struct ata_request), - NULL, NULL, NULL, NULL, 0, 0); -} -SYSINIT(ata_register, SI_SUB_DRIVERS, SI_ORDER_SECOND, ata_init, NULL); - -static void -ata_uninit(void) -{ -uma_zdestroy(ata_request_zone); -} -SYSUNINIT(ata_unregister, SI_SUB_DRIVERS, SI_ORDER_SECOND, ata_uninit, NULL); Modified: head/sys/dev/ata/ata-all.h == --- head/sys/dev/ata/ata-all.h Sat Aug 15 19:58:00 2015(r286813) +++ head/sys/dev/ata/ata-all.h Sat Aug 15 21:46:02 2015(r286814) @@ -450,6 +450,7 @@ struct ata_channel { struct ata_cam_device curr[16]; /* Current settings */ int requestsense; /* CCB waiting for SENSE. */ struct callout poll_callout; /* Periodic status poll. */ + struct ata_request request; }; /* disk bay/enclosure related */ @@ -507,14 +508,6 @@ int ata_sata_getrev(device_t dev, int ta int ata_request2fis_h2d(struct ata_request *request, u_int8_t *fis); void ata_pm_identify(device_t dev); -/* macros for alloc/free of struct ata_request */ -extern uma_zone_t ata_request_zone; -#define ata_alloc_request() uma_zalloc(ata_request_zone, M_NOWAIT | M_ZERO) -#define ata_free_request(request) { \ - if (!(request-flags ATA_R_DANGER2)) \ - uma_zfree(ata_request_zone, request); \ - } - MALLOC_DECLARE(M_ATA); /* misc newbus defines */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286815 - head/sys/boot/uboot/fdt
Author: gonzo Date: Sat Aug 15 21:47:07 2015 New Revision: 286815 URL: https://svnweb.freebsd.org/changeset/base/286815 Log: Make dtb file configurable via loader(8) variable. ubldr already checks fdt_file and fdtfile U-Boot variables. Add one more check for fdt_file loader(8) variable. loader(8) variable takes precedence over u-boot env one Modified: head/sys/boot/uboot/fdt/uboot_fdt.c Modified: head/sys/boot/uboot/fdt/uboot_fdt.c == --- head/sys/boot/uboot/fdt/uboot_fdt.c Sat Aug 15 21:46:02 2015 (r286814) +++ head/sys/boot/uboot/fdt/uboot_fdt.c Sat Aug 15 21:47:07 2015 (r286815) @@ -69,10 +69,11 @@ fdt_platform_load_dtb(void) } /* -* If the U-boot environment contains a variable giving the name of a -* file, use it if we can load and validate it. +* Try to get FDT filename first from loader env and then from u-boot env */ - s = ub_env_get(fdtfile); + s = getenv(fdt_file); + if (s == NULL) + s = ub_env_get(fdtfile); if (s == NULL) s = ub_env_get(fdt_file); if (s != NULL *s != '\0') { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r286814 - head/sys/dev/ata
On 15 Aug 2015, at 21:46 , Alexander Motin m...@freebsd.org wrote: Author: mav Date: Sat Aug 15 21:46:02 2015 New Revision: 286814 URL: https://svnweb.freebsd.org/changeset/base/286814 Log: Remove UMA allocation of ATA requests. After CAM replaced old ATA stack, this driver processes no more then one request at a time per channel. Using UMA after that is overkill, so replace it with simple preallocation of one request per channel. MFC after: 2 weeks Modified: head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h /scratch/tmp/bz/head.svn/sys/modules/ata/atacore/../../../dev/ata/ata-all.c:67: warning: 'ata_init' declared 'static' but never defined /scratch/tmp/bz/head.svn/sys/modules/ata/atacore/../../../dev/ata/ata-all.c:72: warning: ‘ata_uninit' declared 'static' but never defined ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286817 - stable/10/sys/cam/ctl
Author: mav Date: Sun Aug 16 00:35:48 2015 New Revision: 286817 URL: https://svnweb.freebsd.org/changeset/base/286817 Log: MFC r286514: Remove verbose CTL messages. Reporting SCSI errors to console is often useless, pollutes logs and may affect performance. For debugging there is kern.cam.ctl.debug sysctl Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c == --- stable/10/sys/cam/ctl/ctl.c Sat Aug 15 22:55:32 2015(r286816) +++ stable/10/sys/cam/ctl/ctl.c Sun Aug 16 00:35:48 2015(r286817) @@ -1183,8 +1183,6 @@ ctl_init(void) ctl_pool_free(other_pool); return (error); } - if (bootverbose) - printf(ctl: CAM Target Layer loaded\n); /* * Initialize the ioctl front end. @@ -1267,9 +1265,6 @@ ctl_shutdown(void) free(control_softc, M_DEVBUF); control_softc = NULL; - - if (bootverbose) - printf(ctl: CAM Target Layer unloaded\n); } static int @@ -13635,7 +13630,7 @@ ctl_process_done(union ctl_io *io) case CTL_IO_SCSI: break; case CTL_IO_TASK: - if (bootverbose || (ctl_debug CTL_DEBUG_INFO)) + if (ctl_debug CTL_DEBUG_INFO) ctl_io_error_print(io, NULL); if (io-io_hdr.flags CTL_FLAG_FROM_OTHER_SC) ctl_free_io(io); @@ -13742,27 +13737,10 @@ bailout: /* * If enabled, print command error status. -* We don't print UAs unless debugging was enabled explicitly. */ - do { - if ((io-io_hdr.status CTL_STATUS_MASK) == CTL_SUCCESS) - break; - if (!bootverbose (ctl_debug CTL_DEBUG_INFO) == 0) - break; - if ((ctl_debug CTL_DEBUG_INFO) == 0 - ((io-io_hdr.status CTL_STATUS_MASK) == CTL_SCSI_ERROR) -(io-scsiio.scsi_status == SCSI_STATUS_CHECK_COND)) { - int error_code, sense_key, asc, ascq; - - scsi_extract_sense_len(io-scsiio.sense_data, - io-scsiio.sense_len, error_code, sense_key, - asc, ascq, /*show_errors*/ 0); - if (sense_key == SSD_KEY_UNIT_ATTENTION) - break; - } - + if ((io-io_hdr.status CTL_STATUS_MASK) != CTL_SUCCESS + (ctl_debug CTL_DEBUG_INFO) != 0) ctl_io_error_print(io, NULL); - } while (0); /* * Tell the FETD or the other shelf controller we're done with this ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286818 - stable/10/share/man/man4
Author: mav Date: Sun Aug 16 00:36:48 2015 New Revision: 286818 URL: https://svnweb.freebsd.org/changeset/base/286818 Log: MFC r286516: Document kern.cam.ctl.debug sysctl. Modified: stable/10/share/man/man4/ctl.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ctl.4 == --- stable/10/share/man/man4/ctl.4 Sun Aug 16 00:35:48 2015 (r286817) +++ stable/10/share/man/man4/ctl.4 Sun Aug 16 00:36:48 2015 (r286818) @@ -23,7 +23,7 @@ .\ SUCH DAMAGE. .\ .\ $FreeBSD$ -.Dd July 11, 2015 +.Dd August 9, 2015 .Dt CTL 4 .Os .Sh NAME @@ -91,6 +91,17 @@ variables and .Xr loader 8 tunables: .Bl -tag -width indent +.It Va kern.cam.ctl.debug +Bit mask of enabled CTL log levels: +.Bl -tag -offset indent -compact +.It 1 +log commands with errors; +.It 2 +log all commands; +.It 4 +log received data for commands except READ/WRITE. +.El +Defaults to 0. .It Va kern.cam.ctl.iscsi.debug Verbosity level for log messages from the kernel part of iSCSI target. Set to 0 to disable logging or 1 to warn about potential problems. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286816 - head/sys/dev/ata
Author: mav Date: Sat Aug 15 22:55:32 2015 New Revision: 286816 URL: https://svnweb.freebsd.org/changeset/base/286816 Log: Small addition to r286814. Submitted by: bz MFC after:2 weeks Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c == --- head/sys/dev/ata/ata-all.c Sat Aug 15 21:47:07 2015(r286815) +++ head/sys/dev/ata/ata-all.c Sat Aug 15 22:55:32 2015(r286816) @@ -64,12 +64,10 @@ static void ata_cam_end_transaction(devi static void ata_cam_request_sense(device_t dev, struct ata_request *request); static int ata_check_ids(device_t dev, union ccb *ccb); static void ata_conn_event(void *context, int dummy); -static void ata_init(void); static void ata_interrupt_locked(void *data); static int ata_module_event_handler(module_t mod, int what, void *arg); static void ata_periodic_poll(void *data); static int ata_str2mode(const char *str); -static void ata_uninit(void); /* global vars */ MALLOC_DEFINE(M_ATA, ata_generic, ATA driver generic layer); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286797 - head/sys/teken/demo
Author: ed Date: Sat Aug 15 08:29:13 2015 New Revision: 286797 URL: https://svnweb.freebsd.org/changeset/base/286797 Log: Add missing 'static' keyword to keep build at WARNS=6 happy. MFC after:1 month Modified: head/sys/teken/demo/teken_demo.c Modified: head/sys/teken/demo/teken_demo.c == --- head/sys/teken/demo/teken_demo.cSat Aug 15 06:34:49 2015 (r286796) +++ head/sys/teken/demo/teken_demo.cSat Aug 15 08:29:13 2015 (r286797) @@ -72,7 +72,7 @@ struct pixel { #define NCOLS 80 #define NROWS 24 -struct pixel buffer[NCOLS][NROWS]; +static struct pixel buffer[NCOLS][NROWS]; static int ptfd; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286801 - stable/10/usr.sbin/ctld
Author: mav Date: Sat Aug 15 11:08:30 2015 New Revision: 286801 URL: https://svnweb.freebsd.org/changeset/base/286801 Log: MFC r286456: Remove some code duplication. Modified: stable/10/usr.sbin/ctld/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/login.c == --- stable/10/usr.sbin/ctld/login.c Sat Aug 15 11:05:44 2015 (r286800) +++ stable/10/usr.sbin/ctld/login.c Sat Aug 15 11:08:30 2015 (r286801) @@ -59,6 +59,7 @@ login_set_nsg(struct pdu *response, int bhslr-bhslr_flags = 0xFC; bhslr-bhslr_flags |= nsg; + bhslr-bhslr_flags |= BHSLR_FLAGS_TRANSIT; } static int @@ -339,15 +340,12 @@ login_send_chap_success(struct pdu *requ { struct pdu *response; struct keys *request_keys, *response_keys; - struct iscsi_bhs_login_response *bhslr2; struct rchap *rchap; const char *chap_i, *chap_c; char *chap_r; int error; response = login_new_response(request); - bhslr2 = (struct iscsi_bhs_login_response *)response-pdu_bhs; - bhslr2-bhslr_flags |= BHSLR_FLAGS_TRANSIT; login_set_nsg(response, BHSLR_STAGE_OPERATIONAL_NEGOTIATION); /* @@ -705,7 +703,6 @@ login_negotiate(struct connection *conn, response = login_new_response(request); bhslr2 = (struct iscsi_bhs_login_response *)response-pdu_bhs; - bhslr2-bhslr_flags |= BHSLR_FLAGS_TRANSIT; bhslr2-bhslr_tsih = htons(0xbadd); login_set_csg(response, BHSLR_STAGE_OPERATIONAL_NEGOTIATION); login_set_nsg(response, BHSLR_STAGE_FULL_FEATURE_PHASE); @@ -745,7 +742,6 @@ login(struct connection *conn) { struct pdu *request, *response; struct iscsi_bhs_login_request *bhslr; - struct iscsi_bhs_login_response *bhslr2; struct keys *request_keys, *response_keys; struct auth_group *ag; struct portal_group *pg; @@ -906,8 +902,6 @@ login(struct connection *conn) transitioning anyway); response = login_new_response(request); - bhslr2 = (struct iscsi_bhs_login_response *)response-pdu_bhs; - bhslr2-bhslr_flags |= BHSLR_FLAGS_TRANSIT; login_set_nsg(response, BHSLR_STAGE_OPERATIONAL_NEGOTIATION); response_keys = keys_new(); /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286798 - head/sys/teken
Author: ed Date: Sat Aug 15 08:42:33 2015 New Revision: 286798 URL: https://svnweb.freebsd.org/changeset/base/286798 Log: Stop parsing digits if the value already exceeds USHRT_MAX. There is no need for us to support parsing values that are larger than the maximum terminal window size. In this case that would be the maximum of unsigned short. The problem with parsing larger values is that they can cause integer overflows when adjusting the cursor position, leading to all sorts of failing assertions. PR: 202326 Reported by: kcwu csie org MFC after:1 month Modified: head/sys/teken/teken.c Modified: head/sys/teken/teken.c == --- head/sys/teken/teken.c Sat Aug 15 08:29:13 2015(r286797) +++ head/sys/teken/teken.c Sat Aug 15 08:42:33 2015(r286798) @@ -29,12 +29,14 @@ #include sys/cdefs.h #if defined(__FreeBSD__) defined(_KERNEL) #include sys/param.h +#include sys/limits.h #include sys/lock.h #include sys/systm.h #defineteken_assert(x) MPASS(x) #else /* !(__FreeBSD__ _KERNEL) */ #include sys/types.h #include assert.h +#include limits.h #include stdint.h #include stdio.h #include string.h @@ -405,18 +407,21 @@ teken_state_numbers(teken_t *t, teken_ch teken_assert(t-t_curnum T_NUMSIZE); if (c = '0' c = '9') { - /* -* Don't do math with the default value of 1 when a -* custom number is inserted. -*/ if (t-t_stateflags TS_FIRSTDIGIT) { + /* First digit. */ t-t_stateflags = ~TS_FIRSTDIGIT; - t-t_nums[t-t_curnum] = 0; - } else { - t-t_nums[t-t_curnum] *= 10; + t-t_nums[t-t_curnum] = c - '0'; + } else if (t-t_nums[t-t_curnum] USHRT_MAX) { + /* +* Screen positions are stored as unsigned +* shorts. There is no need to continue parsing +* input once the value exceeds USHRT_MAX. It +* would only allow for integer overflows when +* performing arithmetic on the cursor position. +*/ + t-t_nums[t-t_curnum] = + t-t_nums[t-t_curnum] * 10 + c - '0'; } - - t-t_nums[t-t_curnum] += c - '0'; return (1); } else if (c == ';') { if (t-t_stateflags TS_FIRSTDIGIT) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286799 - head/sys/dev/usb
Author: hselasky Date: Sat Aug 15 09:00:36 2015 New Revision: 286799 URL: https://svnweb.freebsd.org/changeset/base/286799 Log: Fix race in USB PF which can happen if we stop tracing exactly when the kernel is tapping an USB transfer. This leads to a NULL pointer access. The solution is to only trace while the USB bus lock is locked. MFC after:2 weeks Modified: head/sys/dev/usb/usb_pf.c head/sys/dev/usb/usb_transfer.c Modified: head/sys/dev/usb/usb_pf.c == --- head/sys/dev/usb/usb_pf.c Sat Aug 15 08:42:33 2015(r286798) +++ head/sys/dev/usb/usb_pf.c Sat Aug 15 09:00:36 2015(r286799) @@ -221,7 +221,13 @@ usbpf_clone_destroy(struct if_clone *ifc ubus = ifp-if_softc; unit = ifp-if_dunit; + /* +* Lock USB before clearing the ifp pointer, to avoid +* clearing the pointer in the middle of a TAP operation: +*/ + USB_BUS_LOCK(ubus); ubus-ifp = NULL; + USB_BUS_UNLOCK(ubus); bpfdetach(ifp); if_detach(ifp); if_free(ifp); Modified: head/sys/dev/usb/usb_transfer.c == --- head/sys/dev/usb/usb_transfer.c Sat Aug 15 08:42:33 2015 (r286798) +++ head/sys/dev/usb/usb_transfer.c Sat Aug 15 09:00:36 2015 (r286799) @@ -2398,8 +2398,11 @@ usbd_callback_wrapper(struct usb_xfer_qu } #if USB_HAVE_PF - if (xfer-usb_state != USB_ST_SETUP) + if (xfer-usb_state != USB_ST_SETUP) { + USB_BUS_LOCK(info-bus); usbpf_xfertap(xfer, USBPF_XFERTAP_DONE); + USB_BUS_UNLOCK(info-bus); + } #endif /* call processing routine */ (xfer-callback) (xfer, xfer-error); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286800 - stable/10/sys/cam/ata
Author: mav Date: Sat Aug 15 11:05:44 2015 New Revision: 286800 URL: https://svnweb.freebsd.org/changeset/base/286800 Log: MFC r286447: Don't panic if disk lost TRIM support due to switching to PIO mode. Modified: stable/10/sys/cam/ata/ata_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_da.c == --- stable/10/sys/cam/ata/ata_da.c Sat Aug 15 09:00:36 2015 (r286799) +++ stable/10/sys/cam/ata/ata_da.c Sat Aug 15 11:05:44 2015 (r286800) @@ -760,10 +760,6 @@ adastrategy(struct bio *bp) * Place it in the queue of disk activities for this disk */ if (bp-bio_cmd == BIO_DELETE) { - KASSERT((softc-flags ADA_FLAG_CAN_TRIM) || - ((softc-flags ADA_FLAG_CAN_CFA) -!(softc-flags ADA_FLAG_CAN_48BIT)), - (BIO_DELETE but no supported TRIM method.)); bioq_disksort(softc-trim_queue, bp); } else { if (ADA_SIO) @@ -1537,7 +1533,14 @@ adastart(struct cam_periph *periph, unio !(softc-flags ADA_FLAG_CAN_48BIT)) { ada_cfaerase(softc, bp, ataio); } else { - panic(adastart: BIO_DELETE without method, not possible.); + /* This can happen if DMA was disabled. */ + bioq_remove(softc-trim_queue, bp); + bp-bio_error = EOPNOTSUPP; + bp-bio_flags |= BIO_ERROR; + biodone(bp); + xpt_release_ccb(start_ccb); + adaschedule(periph); + return; } softc-trim_running = 1; start_ccb-ccb_h.ccb_state = ADA_CCB_TRIM; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286796 - in head: lib/libnv/tests share/man/man9 sys/cddl/compat/opensolaris/sys sys/contrib/libnv sys/sys
Author: oshogbo Date: Sat Aug 15 06:34:49 2015 New Revision: 286796 URL: https://svnweb.freebsd.org/changeset/base/286796 Log: Add support for the arrays in nvlist library. - Add nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist, descriptor} functions. - Add support for (un)packing arrays. - Add the nvl_array_next field to the nvlist structure. If an array is added by the nvlist_{move,add}_nvlist_array function this field will contains next element in the array. - Add the nitems field to the nvpair and nvpair_header structure. This field contains number of elements in the array. - Add special flag (NV_FLAG_IN_ARRAY) which is set if nvlist is a part of an array. - Add special type (NV_TYPE_NVLIST_ARRAY_NEXT).This type is used only on packing/unpacking. - Add new API for traversing arrays (nvlist_get_array_next). - Add the nvlist_get_pararr function which combines the nvlist_get_array_next and nvlist_get_parent functions. If nvlist is in the array it will return next element from array. If nvlist is last element in array or it isn't in array it will return his container (parent). This function should simplify traveling over nvlist. - Add tests for new features. - Add documentation for new functions. - Add my copyright. - Regenerate the sys/cddl/compat/opensolaris/sys/nvpair.h file. PR: 191083 Reviewed by: allanjude (doc) Approved by: pjd (mentor) Added: head/lib/libnv/tests/nv_array_tests.cc (contents, props changed) Modified: head/lib/libnv/tests/Makefile head/share/man/man9/nv.9 head/sys/cddl/compat/opensolaris/sys/nvpair.h head/sys/contrib/libnv/nv_impl.h head/sys/contrib/libnv/nvlist.c head/sys/contrib/libnv/nvlist_impl.h head/sys/contrib/libnv/nvpair.c head/sys/contrib/libnv/nvpair_impl.h head/sys/sys/nv.h Modified: head/lib/libnv/tests/Makefile == --- head/lib/libnv/tests/Makefile Sat Aug 15 00:42:33 2015 (r286795) +++ head/lib/libnv/tests/Makefile Sat Aug 15 06:34:49 2015 (r286796) @@ -4,6 +4,7 @@ TESTSDIR= ${TESTSBASE}/lib/libnv ATF_TESTS_CXX= \ dnv_tests \ + nv_array_tests \ nv_tests \ TAP_TESTS_C+= nvlist_add_test Added: head/lib/libnv/tests/nv_array_tests.cc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnv/tests/nv_array_tests.cc Sat Aug 15 06:34:49 2015 (r286796) @@ -0,0 +1,1191 @@ +/*- + * Copyright (c) 2015 Mariusz Zaborski osho...@freebsd.org + * 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 sys/cdefs.h +__FBSDID($FreeBSD$); + +#include sys/nv.h +#include sys/types.h +#include sys/socket.h + +#include atf-c++.hpp + +#include cstdio +#include errno.h +#include fcntl.h +#include limits +#include set +#include sstream +#include string + +#define fd_is_valid(fd) (fcntl((fd), F_GETFL) != -1 || errno != EBADF) + +ATF_TEST_CASE_WITHOUT_HEAD(nvlist_bool_array__basic); +ATF_TEST_CASE_BODY(nvlist_bool_array__basic) +{ + bool testbool[16]; + const bool *const_result; + bool *result; + nvlist_t *nvl; + size_t nitems; + unsigned int i; + const char *key; + + key = nvl/bool; + nvl = nvlist_create(0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_empty(nvl)); + ATF_REQUIRE(!nvlist_exists_string_array(nvl, key)); + + for (i = 0; i 16; i++) + testbool[i] = (i % 2 == 0); + + nvlist_add_bool_array(nvl, key, testbool, 16); +
svn commit: r286810 - in stable/10: sbin/ifconfig sys/dev/ixgbe sys/net sys/sys
Author: melifaro Date: Sat Aug 15 17:52:55 2015 New Revision: 286810 URL: https://svnweb.freebsd.org/changeset/base/286810 Log: MFC r270064,r270068,r270069,r270115,r270129,r270287,r270822,r271014, r271524,r273541,r282967,r283009,r283364. Add support for reading i2c SFP/SFP+ data from NIC driver and presenting most interesting fields via ifconfig -v. This version supports Intel ixgbe driver only. Tested on: Cisco,Intel,Mellanox,ModuleTech,Molex transceivers * Add new net/sff8436.h containing constants used to access QSFP+ data via i2c inteface. These constants has been taken from SFF-8436 QSFP+ 10 Gbs 4X PLUGGABLE TRANSCEIVER standard rev 4.8. * Add support for printing QSFP+ information from 40G NICs such as Chelsio T5. Example: cxl1: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=ec07bbRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,. ether 00:07:43:28:ad:08 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL media: Ethernet 40Gbase-LR4 full-duplex status: active plugged: QSFP+ 40GBASE-LR4 (MPO Parallel Optic) vendor: OEM PN: OP-QSFP-40G-LR4 SN: 20140318001 DATE: 2014-03-18 module temperature: 64.06 C voltage: 3.26 Volts lane 1: RX: 0.47 mW (-3.21 dBm) TX: 2.78 mW (4.46 dBm) lane 2: RX: 0.20 mW (-6.94 dBm) TX: 2.80 mW (4.47 dBm) lane 3: RX: 0.18 mW (-7.38 dBm) TX: 2.79 mW (4.47 dBm) lane 4: RX: 0.90 mW (-0.45 dBm) TX: 2.80 mW (4.48 dBm) Tested on: Chelsio T5 Tested on: Mellanox/Huawei passive/active cables/transceivers. Sponsored by: Yandex LLC Added: stable/10/sbin/ifconfig/sfp.c - copied, changed from r270064, head/sbin/ifconfig/sfp.c stable/10/sys/net/sff8436.h - copied, changed from r270287, head/sys/net/sff8436.h Modified: stable/10/sbin/ifconfig/Makefile stable/10/sbin/ifconfig/ifconfig.c stable/10/sbin/ifconfig/ifconfig.h stable/10/sys/dev/ixgbe/if_ix.c stable/10/sys/dev/ixgbe/ixgbe.h stable/10/sys/net/if.h stable/10/sys/net/sff8472.h stable/10/sys/sys/sockio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/Makefile == --- stable/10/sbin/ifconfig/MakefileSat Aug 15 16:13:28 2015 (r286809) +++ stable/10/sbin/ifconfig/MakefileSat Aug 15 17:52:55 2015 (r286810) @@ -35,6 +35,10 @@ SRCS+= ifvxlan.c # VXLAN support SRCS+= ifgre.c # GRE keys etc SRCS+= ifgif.c # GIF reversed header workaround +SRCS+= sfp.c # SFP/SFP+ information +DPADD+=${LIBM} +LDADD+=-lm + SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support DPADD+=${LIBBSDXML} ${LIBSBUF} LDADD+=-lbsdxml -lsbuf Modified: stable/10/sbin/ifconfig/ifconfig.c == --- stable/10/sbin/ifconfig/ifconfig.c Sat Aug 15 16:13:28 2015 (r286809) +++ stable/10/sbin/ifconfig/ifconfig.c Sat Aug 15 17:52:55 2015 (r286810) @@ -1025,6 +1025,9 @@ status(const struct afswtch *afp, const if (ioctl(s, SIOCGIFSTATUS, ifs) == 0) printf(%s, ifs.ascii); + if (verbose 0) + sfp_status(s, ifr, verbose); + close(s); return; } Modified: stable/10/sbin/ifconfig/ifconfig.h == --- stable/10/sbin/ifconfig/ifconfig.h Sat Aug 15 16:13:28 2015 (r286809) +++ stable/10/sbin/ifconfig/ifconfig.h Sat Aug 15 17:52:55 2015 (r286810) @@ -144,6 +144,8 @@ voidifmaybeload(const char *name); typedef void clone_callback_func(int, struct ifreq *); void clone_setdefcallback(const char *, clone_callback_func *); +void sfp_status(int s, struct ifreq *ifr, int verbose); + /* * XXX expose this so modules that neeed to know of any pending * operations on ifmedia can avoid cmd line ordering confusion. Copied and modified: stable/10/sbin/ifconfig/sfp.c (from r270064, head/sbin/ifconfig/sfp.c) == --- head/sbin/ifconfig/sfp.cSat Aug 16 19:13:52 2014(r270064, copy source) +++ stable/10/sbin/ifconfig/sfp.c Sat Aug 15 17:52:55 2015 (r286810) @@ -34,10 +34,13 @@ static const char rcsid[] = #include sys/socket.h #include net/if.h +#include net/sff8436.h +#include net/sff8472.h #include math.h #include err.h #include errno.h +#include fcntl.h #include stdio.h #include stdlib.h #include string.h @@ -45,41 +48,19 @@ static const char rcsid[] = #include ifconfig.h -/* 2wire addresses */ -#defineSFP_ADDR_MSA0xA0/* Identification data */ -#defineSFP_ADDR_DDM0xA2/* digital monitoring interface
svn commit: r286811 - head/sys/cam/ctl
Author: mav Date: Sat Aug 15 18:22:16 2015 New Revision: 286811 URL: https://svnweb.freebsd.org/changeset/base/286811 Log: Polish sizes processing. Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c == --- head/sys/cam/ctl/ctl_backend_block.cSat Aug 15 17:52:55 2015 (r286810) +++ head/sys/cam/ctl/ctl_backend_block.cSat Aug 15 18:22:16 2015 (r286811) @@ -169,7 +169,6 @@ struct ctl_be_block_lun { uint64_t size_blocks; uint64_t size_bytes; uint32_t blocksize; - int blocksize_shift; uint16_t pblockexp; uint16_t pblockoff; uint16_t ublockexp; @@ -772,7 +771,7 @@ ctl_be_block_gls_file(struct ctl_be_bloc DPRINTF(entered\n); - off = roff = ((off_t)lbalen-lba) be_lun-blocksize_shift; + off = roff = ((off_t)lbalen-lba) * be_lun-blocksize; vn_lock(be_lun-vn, LK_SHARED | LK_RETRY); error = VOP_IOCTL(be_lun-vn, FIOSEEKHOLE, off, 0, curthread-td_ucred, curthread); @@ -790,10 +789,9 @@ ctl_be_block_gls_file(struct ctl_be_bloc } VOP_UNLOCK(be_lun-vn, 0); - off = be_lun-blocksize_shift; data = (struct scsi_get_lba_status_data *)io-scsiio.kern_data_ptr; scsi_u64to8b(lbalen-lba, data-descr[0].addr); - scsi_ulto4b(MIN(UINT32_MAX, off - lbalen-lba), + scsi_ulto4b(MIN(UINT32_MAX, off / be_lun-blocksize - lbalen-lba), data-descr[0].length); data-descr[0].status = status; @@ -815,14 +813,14 @@ ctl_be_block_getattr_file(struct ctl_be_ if (strcmp(attrname, blocksused) == 0) { error = VOP_GETATTR(be_lun-vn, vattr, curthread-td_ucred); if (error == 0) - val = vattr.va_bytes be_lun-blocksize_shift; + val = vattr.va_bytes / be_lun-blocksize; } if (strcmp(attrname, blocksavail) == 0 (be_lun-vn-v_iflag VI_DOOMED) == 0) { error = VFS_STATFS(be_lun-vn-v_mount, statfs); if (error == 0) - val = (statfs.f_bavail * statfs.f_bsize) - be_lun-blocksize_shift; + val = statfs.f_bavail * statfs.f_bsize / + be_lun-blocksize; } VOP_UNLOCK(be_lun-vn, 0); return (val); @@ -933,7 +931,7 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc DPRINTF(entered\n); - off = roff = ((off_t)lbalen-lba) be_lun-blocksize_shift; + off = roff = ((off_t)lbalen-lba) * be_lun-blocksize; error = (*dev_data-csw-d_ioctl)(dev_data-cdev, FIOSEEKHOLE, (caddr_t)off, FREAD, curthread); if (error == 0 off roff) @@ -949,10 +947,9 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc } } - off = be_lun-blocksize_shift; data = (struct scsi_get_lba_status_data *)io-scsiio.kern_data_ptr; scsi_u64to8b(lbalen-lba, data-descr[0].addr); - scsi_ulto4b(MIN(UINT32_MAX, off - lbalen-lba), + scsi_ulto4b(MIN(UINT32_MAX, off / be_lun-blocksize - lbalen-lba), data-descr[0].length); data-descr[0].status = status; @@ -1865,7 +1862,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdevsw*devsw; char *value; int error, atomic, maxio, unmap; - off_t ps, pss, po, pos, us, uss, uo, uos; + off_t ps, pss, po, pos, us, uss, uo, uos, tmp; params = be_lun-params; @@ -1908,8 +1905,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc return (ENODEV); } - error = devsw-d_ioctl(dev, DIOCGSECTORSIZE, - (caddr_t)be_lun-blocksize, FREAD, + error = devsw-d_ioctl(dev, DIOCGSECTORSIZE, (caddr_t)tmp, FREAD, curthread); if (error) { snprintf(req-error_str, sizeof(req-error_str), @@ -1924,15 +1920,9 @@ ctl_be_block_open_dev(struct ctl_be_bloc * the user is asking for is an even multiple of the underlying * device's blocksize. */ - if ((params-blocksize_bytes != 0) - (params-blocksize_bytes be_lun-blocksize)) { - uint32_t bs_multiple, tmp_blocksize; - - bs_multiple = params-blocksize_bytes / be_lun-blocksize; - - tmp_blocksize = bs_multiple * be_lun-blocksize; - - if (tmp_blocksize == params-blocksize_bytes) { + if ((params-blocksize_bytes != 0) + (params-blocksize_bytes = tmp)) { + if (params-blocksize_bytes % tmp == 0) { be_lun-blocksize = params-blocksize_bytes; } else { snprintf(req-error_str, sizeof(req-error_str), @@ -1943,17 +1933,16 @@
svn commit: r286812 - head/lib/libusb
Author: antoine Date: Sat Aug 15 19:00:38 2015 New Revision: 286812 URL: https://svnweb.freebsd.org/changeset/base/286812 Log: bsd.lib.mk has to be included after MLINKS assignment Modified: head/lib/libusb/Makefile Modified: head/lib/libusb/Makefile == --- head/lib/libusb/MakefileSat Aug 15 18:22:16 2015(r286811) +++ head/lib/libusb/MakefileSat Aug 15 19:00:38 2015(r286812) @@ -70,8 +70,6 @@ CFLAGS+= -DUSB_GLOBAL_INCLUDE_FILE=\${L CFLAGS+= -I ../../sys .endif -.include bsd.lib.mk - # LibUSB v1.0 MLINKS += libusb.3 libusb_init.3 MLINKS += libusb.3 libusb_exit.3 @@ -259,3 +257,5 @@ MLINKS += libusb20.3 libusb20_me_decode. MLINKS += libusb20.3 libusb20_desc_foreach.3 MLINKS += libusb20.3 libusb20_strerror.3 MLINKS += libusb20.3 libusb20_error_name.3 + +.include bsd.lib.mk ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286802 - head/sys/dev/usb/controller
Author: hselasky Date: Sat Aug 15 12:06:15 2015 New Revision: 286802 URL: https://svnweb.freebsd.org/changeset/base/286802 Log: Fixes for HIGH speed ISOCHRONOUS traffic. HS ISOCHRONOUS traffic at intervals less than 250us was not handled properly. Add support for high-bandwidth ISOCHRONOUS packets. USB webcams, USB audio and USB DVB devices are expected to work better. High-bandwidth INTERRUPT endpoints is not yet supported. MFC after:2 weeks Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h Modified: head/sys/dev/usb/controller/dwc_otg.c == --- head/sys/dev/usb/controller/dwc_otg.c Sat Aug 15 11:08:30 2015 (r286801) +++ head/sys/dev/usb/controller/dwc_otg.c Sat Aug 15 12:06:15 2015 (r286802) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /*- * Copyright (c) 2015 Daisuke Aoyama. All rights reserved. - * Copyright (c) 2012 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2012-2015 Hans Petter Selasky. All rights reserved. * Copyright (c) 2010-2011 Aleksandr Rybalko. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -597,14 +597,18 @@ dwc_otg_clear_hcint(struct dwc_otg_softc } static uint8_t -dwc_otg_host_check_fifo_empty(struct dwc_otg_softc *sc, struct dwc_otg_td *td) +dwc_otg_host_check_tx_fifo_empty(struct dwc_otg_softc *sc, struct dwc_otg_td *td) { uint32_t temp; temp = DWC_OTG_READ_4(sc, DOTG_GINTSTS); - if (td-ep_type == UE_INTERRUPT || - td-ep_type == UE_ISOCHRONOUS) { + if (td-ep_type == UE_ISOCHRONOUS) { + /* +* NOTE: USB INTERRUPT transactions are executed like +* USB CONTROL transactions! See the setup standard +* chain function for more information. +*/ if (!(temp GINTSTS_PTXFEMP)) { DPRINTF(Periodic TX FIFO is not empty\n); if (!(sc-sc_irq_mask GINTMSK_PTXFEMPMSK)) { @@ -631,8 +635,10 @@ dwc_otg_host_channel_alloc(struct dwc_ot struct dwc_otg_td *td, uint8_t is_out) { uint8_t x; + uint8_t y; + uint8_t z; - if (td-channel DWC_OTG_MAX_CHANNELS) + if (td-channel[0] DWC_OTG_MAX_CHANNELS) return (0); /* already allocated */ /* check if device is suspended */ @@ -641,20 +647,42 @@ dwc_otg_host_channel_alloc(struct dwc_ot /* compute needed TX FIFO size */ if (is_out != 0) { - if (dwc_otg_host_check_fifo_empty(sc, td) != 0) + if (dwc_otg_host_check_tx_fifo_empty(sc, td) != 0) return (1); /* busy - cannot transfer data */ } - - for (x = 0; x != sc-sc_host_ch_max; x++) { + z = td-max_packet_count; + for (x = y = 0; x != sc-sc_host_ch_max; x++) { /* check if channel is allocated */ if (sc-sc_chan_state[x].allocated != 0) continue; /* check if channel is still enabled */ if (sc-sc_chan_state[x].wait_halted != 0) continue; + /* store channel number */ + td-channel[y++] = x; + /* check if we got all channels */ + if (y == z) + break; + } + if (y != z) { + /* reset channel variable */ + td-channel[0] = DWC_OTG_MAX_CHANNELS; + td-channel[1] = DWC_OTG_MAX_CHANNELS; + td-channel[2] = DWC_OTG_MAX_CHANNELS; + /* wait a bit */ + dwc_otg_enable_sof_irq(sc); + return (1); /* busy - not enough channels */ + } + + for (y = 0; y != z; y++) { + x = td-channel[y]; + /* set allocated */ sc-sc_chan_state[x].allocated = 1; + /* set wait halted */ + sc-sc_chan_state[x].wait_halted = 1; + /* clear interrupts */ dwc_otg_clear_hcint(sc, x); @@ -663,29 +691,22 @@ dwc_otg_host_channel_alloc(struct dwc_ot /* set active channel */ sc-sc_active_rx_ep |= (1 x); - - /* set channel */ - td-channel = x; - - return (0); /* allocated */ } - /* wait a bit */ - dwc_otg_enable_sof_irq(sc); - return (1); /* busy */ + return (0); /* allocated */ } static void -dwc_otg_host_channel_free(struct dwc_otg_softc *sc, struct dwc_otg_td *td) +dwc_otg_host_channel_free_sub(struct dwc_otg_softc *sc, struct dwc_otg_td *td, uint8_t index) { uint32_t hcchar; uint8_t x; - if (td-channel = DWC_OTG_MAX_CHANNELS) + if (td-channel[index] = DWC_OTG_MAX_CHANNELS) return; /* already freed */
svn commit: r286805 - head/share/misc
Author: bapt Date: Sat Aug 15 12:55:06 2015 New Revision: 286805 URL: https://svnweb.freebsd.org/changeset/base/286805 Log: Update to use the latest version of the PCI IDs Repository. MFC after:1 week Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors == --- head/share/misc/pci_vendors Sat Aug 15 12:44:34 2015(r286804) +++ head/share/misc/pci_vendors Sat Aug 15 12:55:06 2015(r286805) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2012.10.24 -# Date:2012-10-24 03:15:01 +# Version: 2015.07.31 +# Date:2015-07-31 03:15:02 # # Maintained by Martin Mares m...@ucw.cz and other volunteers from the # PCI ID Project at http://pci-ids.ucw.cz/. @@ -23,44 +23,23 @@ # device device_name -- single tab # subvendor subdevice subsystem_name -- two tabs - Gammagraphx, Inc. (or missing ID) -0010 Allied Telesis, Inc +0010 Allied Telesis, Inc (Wrong ID) # This is a relabelled RTL-8139 8139 AT-2500TX V3 Ethernet -001a Ascend Communications, Inc. 001c PEAK-System Technik GmbH 0001 PCAN-PCI CAN-Bus controller 001c 0004 2 Channel CAN Bus SJC1000 001c 0005 2 Channel CAN Bus SJC1000 (Optically Isolated) -0033 Paradyne corp. 003d Lockheed Martin-Marietta Corp # Real TJN ID is e159, but they got it wrong several times --mj 0059 Tiger Jet Network Inc. (Wrong ID) 0070 Hauppauge computer works Inc. - 0003 WinTV PVR-250 - 0009 WinTV PVR-150 - 0801 WinTV PVR-150 - 0807 WinTV PVR-150 - 4000 WinTV PVR-350 - 4001 WinTV PVR-250 (v1) - 4009 WinTV PVR-250 - 4800 WinTV PVR-350 - 4801 WinTV PVR-250 MCE - 4803 WinTV PVR-250 - 7444 WinTV HVR-1600 7801 WinTV HVR-1800 MCE - 8003 WinTV PVR-150 - 8801 WinTV PVR-150 - c108 WinTV-HVR-4400-HD model 1278 - c801 WinTV PVR-150 - e807 WinTV PVR-500 MCE (1st tuner) - e817 WinTV PVR-500 MCE (2nd tuner) 0071 Nebula Electronics Ltd. 0095 Silicon Image, Inc. (Wrong ID) 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter 00a7 Teles AG (Wrong ID) -00f5 BFG Technologies, Inc. 0100 Ncipher Corp Ltd 0123 General Dynamics # 018a is not LevelOne but there is a board misprogrammed @@ -70,72 +49,28 @@ 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] 0270 Hauppauge computer works Inc. (Wrong ID) -0291 Davicom Semiconductor, Inc. - 8212 DM9102A(DM9102AE, SM9102AF) Ethernet 100/10 MBit(Rev 40) # SpeedStream is Efficient Networks, Inc, a Siemens Company 02ac SpeedStream 1012 1012 PCMCIA 10/100 Ethernet Card [RTL81xx] -02e0 XFX Pine Group Inc 0303 Hewlett-Packard Company (Wrong ID) -0308 ZyXEL Communications Corporation +0308 ZyXEL Communications Corporation (Wrong ID) 0315 SK-Electronics Co., Ltd. -0357 TTTech AG +0357 TTTech Computertechnik AG (Wrong ID) 000a TTP-Monitoring Card V2.0 -036f Trigem Computer Inc. -0403 Future Technology Devices International Ltd 0432 SCM Microsystems, Inc. 0001 Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet] -0482 Kyocera -# vendor code used for (at a minimum) RSA cards -04b3 IBM Corp. - 4001 Remote System Administration device [RSA2] -050d Belkin -05a9 OmniVision - 8519 OV519 series -05e3 CyberDoor - 0701 CBD516 -066f SigmaTel - 3410 SMTP3410 - 3500 SMTP3500 0675 Dynalink 1700 IS64PH ISDN Adapter 1702 IS64PH ISDN Adapter 1703 ISDN Adapter (PCI Bus, DV, W) 1704 ISDN Adapter (PCI Bus, D, C) -069d Hughes Network Systems (HNS) 0721 Sapphire, Inc. 0777 Ubiquiti Networks, Inc. -# Atheros, 6th Generation, AR5414, 802.11a, 5GHz - 3005 XtremeRange5 0795 Wired Inc. 6663 Butane II (MPEG2 encoder board) MediaPress (MPEG2 encoder board) -07ca AVerMedia Technologies Inc. -# Expresscard DVB-T tuner sold by Fujitsu for notebooks - 534a Slim mobile Express DVB-T (Fujitsu) - a301 AVerTV 301 - b808 AVerTV DVB-T Volar (USB 2.0) -07d0 ITT Geospatial Systems 07d1 D-Link System Inc -07e2 ELMEG Communication Systems GmbH -0842 NPG, Personal Grand Technology -# Nee Gemplus International, SA -08e6 Gemalto NV -08ff AuthenTec - afe4 [Anchor] AF-S2 FingerLoc Sensor Module 0925 VIA Technologies, Inc. (Wrong ID) - 1234 VT82C686/A/B USB Controller -093a PixArt Imaging Inc. - 010e Innovage Mini Digital Camera - 010f SDC-300 Webcam - 020f Digital Photo Viewer - 2468 CIF Single Chip - 2600 PAC7311 - 2603 Philips Webcam SPC500NC - 2608 Maxell MaxCam RotaWeb - 2620 C3 Tech Mod. 153 -09c1 Arris -
svn commit: r286804 - vendor/pciids/pciids-20150815
Author: bapt Date: Sat Aug 15 12:44:34 2015 New Revision: 286804 URL: https://svnweb.freebsd.org/changeset/base/286804 Log: Tag import of pciids 20150815 Added: vendor/pciids/pciids-20150815/ - copied from r286801, vendor/pciids/dist/ Replaced: vendor/pciids/pciids-20150815/pci.ids - copied unchanged from r286803, vendor/pciids/dist/pci.ids Copied: vendor/pciids/pciids-20150815/pci.ids (from r286803, vendor/pciids/dist/pci.ids) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pciids/pciids-20150815/pci.ids Sat Aug 15 12:44:34 2015 (r286804, copy of r286803, vendor/pciids/dist/pci.ids) @@ -0,0 +1,27314 @@ +# +# List of PCI ID's +# +# Version: 2015.07.31 +# Date:2015-07-31 03:15:02 +# +# Maintained by Martin Mares m...@ucw.cz and other volunteers from the +# PCI ID Project at http://pci-ids.ucw.cz/. +# +# New data are always welcome, especially if they are accurate. If you have +# anything to contribute, please follow the instructions at the web site. +# +# This file can be distributed under either the GNU General Public License +# (version 2 or higher) or the 3-clause BSD License. +# + +# Vendors, devices and subsystems. Please keep sorted. + +# Syntax: +# vendor vendor_name +# device device_name -- single tab +# subvendor subdevice subsystem_name -- two tabs + +0010 Allied Telesis, Inc (Wrong ID) +# This is a relabelled RTL-8139 + 8139 AT-2500TX V3 Ethernet +001c PEAK-System Technik GmbH + 0001 PCAN-PCI CAN-Bus controller + 001c 0004 2 Channel CAN Bus SJC1000 + 001c 0005 2 Channel CAN Bus SJC1000 (Optically Isolated) +003d Lockheed Martin-Marietta Corp +# Real TJN ID is e159, but they got it wrong several times --mj +0059 Tiger Jet Network Inc. (Wrong ID) +0070 Hauppauge computer works Inc. + 7801 WinTV HVR-1800 MCE +0071 Nebula Electronics Ltd. +0095 Silicon Image, Inc. (Wrong ID) + 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD +# Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter +00a7 Teles AG (Wrong ID) +0100 Ncipher Corp Ltd +0123 General Dynamics +# 018a is not LevelOne but there is a board misprogrammed +018a LevelOne + 0106 FPC-0106TX misprogrammed [RTL81xx] +# 021b is not Compaq but there is a board misprogrammed +021b Compaq Computer Corporation + 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] +0270 Hauppauge computer works Inc. (Wrong ID) +# SpeedStream is Efficient Networks, Inc, a Siemens Company +02ac SpeedStream + 1012 1012 PCMCIA 10/100 Ethernet Card [RTL81xx] +0303 Hewlett-Packard Company (Wrong ID) +0308 ZyXEL Communications Corporation (Wrong ID) +0315 SK-Electronics Co., Ltd. +0357 TTTech Computertechnik AG (Wrong ID) + 000a TTP-Monitoring Card V2.0 +0432 SCM Microsystems, Inc. + 0001 Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet] +0675 Dynalink + 1700 IS64PH ISDN Adapter + 1702 IS64PH ISDN Adapter + 1703 ISDN Adapter (PCI Bus, DV, W) + 1704 ISDN Adapter (PCI Bus, D, C) +0721 Sapphire, Inc. +0777 Ubiquiti Networks, Inc. +0795 Wired Inc. + 6663 Butane II (MPEG2 encoder board) + MediaPress (MPEG2 encoder board) +07d1 D-Link System Inc +0925 VIA Technologies, Inc. (Wrong ID) +0a89 BREA Technologies Inc +0b0b Rhino Equipment Corp. + 0105 Rhino R1T1 + 0205 Rhino R4FXO + 0206 RCB4FXO 4-channel FXO analog telphony card + 0305 Rhino R4T1 + 0405 Rhino R8FXX + 0406 RCB8FXX 8-channel modular analog telphony card + 0505 Rhino R24FXX + 0506 RCB24FXS 24-Channel FXS analog telphony card + 0605 Rhino R2T1 + 0705 Rhino R24FXS + 0706 RCB24FXO 24-Channel FXO analog telphony card + 0905 R1T3 Single T3 Digital Telephony Card + 0906 RCB24FXX 24-channel modular analog telphony card + 0a06 RCB672FXX 672-channel modular analog telphony card +0e11 Compaq Computer Corporation + 0001 PCI to EISA Bridge + 0002 PCI to ISA Bridge + 0046 Smart Array 64xx + 0e11 4091 Smart Array 6i + 0e11 409a Smart Array 641 + 0e11 409b Smart Array 642 + 0e11 409c Smart Array 6400 + 0e11 409d Smart Array 6400 EM + 0049 NC7132 Gigabit Upgrade Module + 004a NC6136 Gigabit Server Adapter + 005a Remote Insight II board - Lights-Out + 007c NC7770 1000BaseTX + 007d NC6770 1000BaseTX + 0085 NC7780 1000BaseTX + 00b1 Remote Insight II board - PCI device + 00bb NC7760 + 00ca NC7771 + 00cb NC7781 + 00cf NC7772 + 00d0 NC7782 + 00d1 NC7783 + 00e3 NC7761 + 0508 Netelligent 4/16 Token Ring + 1000 Triflex/Pentium
svn commit: r286803 - vendor/pciids/dist
Author: bapt Date: Sat Aug 15 12:43:39 2015 New Revision: 286803 URL: https://svnweb.freebsd.org/changeset/base/286803 Log: Update PCIIDS database Modified: vendor/pciids/dist/pci.ids Modified: vendor/pciids/dist/pci.ids == --- vendor/pciids/dist/pci.ids Sat Aug 15 12:06:15 2015(r286802) +++ vendor/pciids/dist/pci.ids Sat Aug 15 12:43:39 2015(r286803) @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2012.10.24 -# Date:2012-10-24 03:15:01 +# Version: 2015.07.31 +# Date:2015-07-31 03:15:02 # # Maintained by Martin Mares m...@ucw.cz and other volunteers from the # PCI ID Project at http://pci-ids.ucw.cz/. @@ -21,44 +21,23 @@ # device device_name -- single tab # subvendor subdevice subsystem_name -- two tabs - Gammagraphx, Inc. (or missing ID) -0010 Allied Telesis, Inc +0010 Allied Telesis, Inc (Wrong ID) # This is a relabelled RTL-8139 8139 AT-2500TX V3 Ethernet -001a Ascend Communications, Inc. 001c PEAK-System Technik GmbH 0001 PCAN-PCI CAN-Bus controller 001c 0004 2 Channel CAN Bus SJC1000 001c 0005 2 Channel CAN Bus SJC1000 (Optically Isolated) -0033 Paradyne corp. 003d Lockheed Martin-Marietta Corp # Real TJN ID is e159, but they got it wrong several times --mj 0059 Tiger Jet Network Inc. (Wrong ID) 0070 Hauppauge computer works Inc. - 0003 WinTV PVR-250 - 0009 WinTV PVR-150 - 0801 WinTV PVR-150 - 0807 WinTV PVR-150 - 4000 WinTV PVR-350 - 4001 WinTV PVR-250 (v1) - 4009 WinTV PVR-250 - 4800 WinTV PVR-350 - 4801 WinTV PVR-250 MCE - 4803 WinTV PVR-250 - 7444 WinTV HVR-1600 7801 WinTV HVR-1800 MCE - 8003 WinTV PVR-150 - 8801 WinTV PVR-150 - c108 WinTV-HVR-4400-HD model 1278 - c801 WinTV PVR-150 - e807 WinTV PVR-500 MCE (1st tuner) - e817 WinTV PVR-500 MCE (2nd tuner) 0071 Nebula Electronics Ltd. 0095 Silicon Image, Inc. (Wrong ID) 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter 00a7 Teles AG (Wrong ID) -00f5 BFG Technologies, Inc. 0100 Ncipher Corp Ltd 0123 General Dynamics # 018a is not LevelOne but there is a board misprogrammed @@ -68,72 +47,28 @@ 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] 0270 Hauppauge computer works Inc. (Wrong ID) -0291 Davicom Semiconductor, Inc. - 8212 DM9102A(DM9102AE, SM9102AF) Ethernet 100/10 MBit(Rev 40) # SpeedStream is Efficient Networks, Inc, a Siemens Company 02ac SpeedStream 1012 1012 PCMCIA 10/100 Ethernet Card [RTL81xx] -02e0 XFX Pine Group Inc 0303 Hewlett-Packard Company (Wrong ID) -0308 ZyXEL Communications Corporation +0308 ZyXEL Communications Corporation (Wrong ID) 0315 SK-Electronics Co., Ltd. -0357 TTTech AG +0357 TTTech Computertechnik AG (Wrong ID) 000a TTP-Monitoring Card V2.0 -036f Trigem Computer Inc. -0403 Future Technology Devices International Ltd 0432 SCM Microsystems, Inc. 0001 Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet] -0482 Kyocera -# vendor code used for (at a minimum) RSA cards -04b3 IBM Corp. - 4001 Remote System Administration device [RSA2] -050d Belkin -05a9 OmniVision - 8519 OV519 series -05e3 CyberDoor - 0701 CBD516 -066f SigmaTel - 3410 SMTP3410 - 3500 SMTP3500 0675 Dynalink 1700 IS64PH ISDN Adapter 1702 IS64PH ISDN Adapter 1703 ISDN Adapter (PCI Bus, DV, W) 1704 ISDN Adapter (PCI Bus, D, C) -069d Hughes Network Systems (HNS) 0721 Sapphire, Inc. 0777 Ubiquiti Networks, Inc. -# Atheros, 6th Generation, AR5414, 802.11a, 5GHz - 3005 XtremeRange5 0795 Wired Inc. 6663 Butane II (MPEG2 encoder board) MediaPress (MPEG2 encoder board) -07ca AVerMedia Technologies Inc. -# Expresscard DVB-T tuner sold by Fujitsu for notebooks - 534a Slim mobile Express DVB-T (Fujitsu) - a301 AVerTV 301 - b808 AVerTV DVB-T Volar (USB 2.0) -07d0 ITT Geospatial Systems 07d1 D-Link System Inc -07e2 ELMEG Communication Systems GmbH -0842 NPG, Personal Grand Technology -# Nee Gemplus International, SA -08e6 Gemalto NV -08ff AuthenTec - afe4 [Anchor] AF-S2 FingerLoc Sensor Module 0925 VIA Technologies, Inc. (Wrong ID) - 1234 VT82C686/A/B USB Controller -093a PixArt Imaging Inc. - 010e Innovage Mini Digital Camera - 010f SDC-300 Webcam - 020f Digital Photo Viewer - 2468 CIF Single Chip - 2600 PAC7311 - 2603 Philips Webcam SPC500NC - 2608 Maxell MaxCam RotaWeb - 2620 C3 Tech Mod. 153 -09c1 Arris - 0704 CM 200E Cable Modem 0a89 BREA Technologies Inc 0b0b
svn commit: r286806 - in head: sys/cam/ctl sys/conf sys/modules/ctl usr.bin/ctlstat usr.sbin/ctladm usr.sbin/ctld
Author: mav Date: Sat Aug 15 13:34:38 2015 New Revision: 286806 URL: https://svnweb.freebsd.org/changeset/base/286806 Log: Drop internal CTL frontend. Its idea was to be a simple initiator and execute several commands from kernel level, but FreeBSD never had consumer for that functionality, while its implementation polluted many unrelated places.. Deleted: head/sys/cam/ctl/ctl_frontend_internal.c head/sys/cam/ctl/ctl_frontend_internal.h Modified: head/sys/cam/ctl/README.ctl.txt head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/cam/ctl/ctl_cmd_table.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_frontend.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_ioctl.h head/sys/cam/ctl/ctl_private.h head/sys/cam/ctl/ctl_tpc.c head/sys/cam/ctl/ctl_tpc_local.c head/sys/conf/files head/sys/modules/ctl/Makefile head/usr.bin/ctlstat/ctlstat.c head/usr.sbin/ctladm/ctladm.8 head/usr.sbin/ctladm/ctladm.c head/usr.sbin/ctld/kernel.c Modified: head/sys/cam/ctl/README.ctl.txt == --- head/sys/cam/ctl/README.ctl.txt Sat Aug 15 12:55:06 2015 (r286805) +++ head/sys/cam/ctl/README.ctl.txt Sat Aug 15 13:34:38 2015 (r286806) @@ -366,16 +366,6 @@ This is a CTL frontend port that is also frontend allows for using CTL without any target-capable hardware. So any LUNs you create in CTL are visible via this port. - -ctl_frontend_internal.c -ctl_frontend_internal.h: - -This is a frontend port written for Copan to do some system-specific tasks -that required sending commands into CTL from inside the kernel. This isn't -entirely relevant to FreeBSD in general, but can perhaps be repurposed or -removed later. - ctl_ha.h: Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Sat Aug 15 12:55:06 2015(r286805) +++ head/sys/cam/ctl/ctl.c Sat Aug 15 13:34:38 2015(r286806) @@ -72,7 +72,6 @@ __FBSDID($FreeBSD$); #include cam/ctl/ctl_io.h #include cam/ctl/ctl.h #include cam/ctl/ctl_frontend.h -#include cam/ctl/ctl_frontend_internal.h #include cam/ctl/ctl_util.h #include cam/ctl/ctl_backend.h #include cam/ctl/ctl_ioctl.h @@ -392,9 +391,6 @@ static int ctl_serialize_other_sc_cmd(st static int ctl_ioctl_submit_wait(union ctl_io *io); static void ctl_ioctl_datamove(union ctl_io *io); static void ctl_ioctl_done(union ctl_io *io); -static void ctl_ioctl_hard_startstop_callback(void *arg, - struct cfi_metatask *metatask); -static void ctl_ioctl_bbrread_callback(void *arg,struct cfi_metatask *metatask); static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries); @@ -2093,38 +2089,6 @@ ctl_ioctl_done(union ctl_io *io) mtx_unlock(params-ioctl_mtx); } -static void -ctl_ioctl_hard_startstop_callback(void *arg, struct cfi_metatask *metatask) -{ - struct ctl_fe_ioctl_startstop_info *sd_info; - - sd_info = (struct ctl_fe_ioctl_startstop_info *)arg; - - sd_info-hs_info.status = metatask-status; - sd_info-hs_info.total_luns = metatask-taskinfo.startstop.total_luns; - sd_info-hs_info.luns_complete = - metatask-taskinfo.startstop.luns_complete; - sd_info-hs_info.luns_failed = metatask-taskinfo.startstop.luns_failed; - - cv_broadcast(sd_info-sem); -} - -static void -ctl_ioctl_bbrread_callback(void *arg, struct cfi_metatask *metatask) -{ - struct ctl_fe_ioctl_bbrread_info *fe_bbr_info; - - fe_bbr_info = (struct ctl_fe_ioctl_bbrread_info *)arg; - - mtx_lock(fe_bbr_info-lock); - fe_bbr_info-bbr_info-status = metatask-status; - fe_bbr_info-bbr_info-bbr_status = metatask-taskinfo.bbrread.status; - fe_bbr_info-wakeup_done = 1; - mtx_unlock(fe_bbr_info-lock); - - cv_broadcast(fe_bbr_info-sem); -} - /* * Returns 0 for success, errno for failure. */ @@ -2724,103 +2688,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } - case CTL_HARD_START: - case CTL_HARD_STOP: { - struct ctl_fe_ioctl_startstop_info ss_info; - struct cfi_metatask *metatask; - struct mtx hs_mtx; - - mtx_init(hs_mtx, HS Mutex, NULL, MTX_DEF); - - cv_init(ss_info.sem, hard start/stop cv ); - - metatask = cfi_alloc_metatask(/*can_wait*/ 1); - if (metatask == NULL) { - retval = ENOMEM; - mtx_destroy(hs_mtx); - break; - } - - if
Re: svn commit: r286787 - head/sys/x86/x86
El 14/08/15 a les 22.08, Jason A. Harmening ha escrit: Author: jah Date: Fri Aug 14 20:08:16 2015 New Revision: 286787 URL: https://svnweb.freebsd.org/changeset/base/286787 Log: Use pmap_quick_enter_page() to handle bouncing of unmapped buffers in the x86 busdma_bounce implementation. Also treat user buffers as unmapped. This allows two things: 1. Sync'ing bounced maps in non-sleepable contexts. The physcopy* calls previously used could sleep on sf_buf operations in some cases. 2. Sync'ing user buffers outside the context of the owning process AFAICT this will break the Xen port. physcopy* uses uiomove_fromphys that on the amd64 port is able to deal with pages outside of the DMAP. OTOH pmap_quick_enter_page is not able to deal with pages outside of the DMAP, and will simply panic. Roger. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r286787 - head/sys/x86/x86
On 08/15/15 08:05, Roger Pau Monné wrote: El 14/08/15 a les 22.08, Jason A. Harmening ha escrit: Author: jah Date: Fri Aug 14 20:08:16 2015 New Revision: 286787 URL: https://svnweb.freebsd.org/changeset/base/286787 Log: Use pmap_quick_enter_page() to handle bouncing of unmapped buffers in the x86 busdma_bounce implementation. Also treat user buffers as unmapped. This allows two things: 1. Sync'ing bounced maps in non-sleepable contexts. The physcopy* calls previously used could sleep on sf_buf operations in some cases. 2. Sync'ing user buffers outside the context of the owning process AFAICT this will break the Xen port. physcopy* uses uiomove_fromphys that on the amd64 port is able to deal with pages outside of the DMAP. OTOH pmap_quick_enter_page is not able to deal with pages outside of the DMAP, and will simply panic. Roger. Is it actually possible for those non-dom0 pages to be used for I/O that passes through busdma? If it is, then it would be easy to make pmap_quick_enter_page() handle them by adding a pcpu pageframe similar to what we do for i386. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286807 - in head/sys: cam/ctl conf modules/ctl
Author: mav Date: Sat Aug 15 15:42:21 2015 New Revision: 286807 URL: https://svnweb.freebsd.org/changeset/base/286807 Log: Move ioctl CAM frontend into separate file. It has nothing to share with too huge ctl.c other then device descriptor, but even that may be counted as design error that may be fixed later. At some point we may even want to have several ioctl ports. Added: head/sys/cam/ctl/ctl_frontend_ioctl.c (contents, props changed) Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_private.h head/sys/conf/files head/sys/modules/ctl/Makefile Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Sat Aug 15 13:34:38 2015(r286806) +++ head/sys/cam/ctl/ctl.c Sat Aug 15 15:42:21 2015(r286807) @@ -382,15 +382,7 @@ static int ctl_init(void); void ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td); -static void ctl_ioctl_online(void *arg); -static void ctl_ioctl_offline(void *arg); -static int ctl_ioctl_lun_enable(void *arg, int lun_id); -static int ctl_ioctl_lun_disable(void *arg, int lun_id); -static int ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio); static int ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio); -static int ctl_ioctl_submit_wait(union ctl_io *io); -static void ctl_ioctl_datamove(union ctl_io *io); -static void ctl_ioctl_done(union ctl_io *io); static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries); @@ -525,11 +517,6 @@ static moduledata_t ctl_moduledata = { DECLARE_MODULE(ctl, ctl_moduledata, SI_SUB_CONFIGURE, SI_ORDER_THIRD); MODULE_VERSION(ctl, 1); -static struct ctl_frontend ioctl_frontend = -{ - .name = ioctl, -}; - #ifdef notyet static void ctl_isc_handler_finish_xfer(struct ctl_softc *ctl_softc, @@ -1060,7 +1047,6 @@ ctl_init(void) { struct ctl_softc *softc; void *other_pool; - struct ctl_port *port; int i, error, retval; //int isc_retval; @@ -1185,32 +1171,6 @@ ctl_init(void) return (error); } - /* -* Initialize the ioctl front end. -*/ - ctl_frontend_register(ioctl_frontend); - port = softc-ioctl_info.port; - port-frontend = ioctl_frontend; - sprintf(softc-ioctl_info.port_name, ioctl); - port-port_type = CTL_PORT_IOCTL; - port-num_requested_ctl_io = 100; - port-port_name = softc-ioctl_info.port_name; - port-port_online = ctl_ioctl_online; - port-port_offline = ctl_ioctl_offline; - port-onoff_arg = softc-ioctl_info; - port-lun_enable = ctl_ioctl_lun_enable; - port-lun_disable = ctl_ioctl_lun_disable; - port-targ_lun_arg = softc-ioctl_info; - port-fe_datamove = ctl_ioctl_datamove; - port-fe_done = ctl_ioctl_done; - port-max_targets = 15; - port-max_target_id = 15; - - if (ctl_port_register(softc-ioctl_info.port) != 0) { - printf(ctl: ioctl front end registration failed, will - continue anyway\n); - } - SYSCTL_ADD_PROC(softc-sysctl_ctx,SYSCTL_CHILDREN(softc-sysctl_tree), OID_AUTO, ha_state, CTLTYPE_INT | CTLFLAG_RWTUN, softc, 0, ctl_ha_state_sysctl, I, HA state for this head); @@ -1234,9 +1194,6 @@ ctl_shutdown(void) softc = (struct ctl_softc *)control_softc; - if (ctl_port_deregister(softc-ioctl_info.port) != 0) - printf(ctl: ioctl front end deregistration failed\n); - mtx_lock(softc-ctl_lock); /* @@ -1249,8 +1206,6 @@ ctl_shutdown(void) mtx_unlock(softc-ctl_lock); - ctl_frontend_deregister(ioctl_frontend); - #if 0 ctl_shutdown_thread(softc-work_thread); mtx_destroy(softc-queue_lock); @@ -1422,26 +1377,6 @@ ctl_port_list(struct ctl_port_entry *ent return (retval); } -static void -ctl_ioctl_online(void *arg) -{ - struct ctl_ioctl_info *ioctl_info; - - ioctl_info = (struct ctl_ioctl_info *)arg; - - ioctl_info-flags |= CTL_IOCTL_FLAG_ENABLED; -} - -static void -ctl_ioctl_offline(void *arg) -{ - struct ctl_ioctl_info *ioctl_info; - - ioctl_info = (struct ctl_ioctl_info *)arg; - - ioctl_info-flags = ~CTL_IOCTL_FLAG_ENABLED; -} - /* * Remove an initiator by port number and initiator ID. * Returns 0 for success, -1 for failure. @@ -1637,181 +1572,6 @@ ctl_create_iid(struct ctl_port *port, in } } -static int -ctl_ioctl_lun_enable(void *arg, int lun_id) -{ - return (0); -} - -static int -ctl_ioctl_lun_disable(void *arg, int lun_id) -{ - return (0); -} - -/* - * Data movement routine for the CTL ioctl frontend port. - */
svn commit: r286808 - head/sys/dev/vt
Author: marcel Date: Sat Aug 15 15:44:09 2015 New Revision: 286808 URL: https://svnweb.freebsd.org/changeset/base/286808 Log: Improve the VT initialization message: have it say what the resolution is. For text mode this is the number of columns by the number of rows. Include the name of the driver in a much less prominent way. Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c == --- head/sys/dev/vt/vt_core.c Sat Aug 15 15:42:21 2015(r286807) +++ head/sys/dev/vt/vt_core.c Sat Aug 15 15:44:09 2015(r286808) @@ -264,8 +264,9 @@ vt_update_static(void *dummy) if (!vty_enabled(VTY_VT)) return; if (main_vd-vd_driver != NULL) - printf(VT: running with driver \%s\.\n, - main_vd-vd_driver-vd_name); + printf(VT(%s): %s %ux%u\n, main_vd-vd_driver-vd_name, + (main_vd-vd_flags VDF_TEXTMODE) ? text : resolution, + main_vd-vd_width, main_vd-vd_height); else printf(VT: init without driver.\n); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286809 - head/sys/dev/vt/hw/efifb
Author: marcel Date: Sat Aug 15 16:13:28 2015 New Revision: 286809 URL: https://svnweb.freebsd.org/changeset/base/286809 Log: Improve support for Macs that have a stride not equal to the horizonal resolution (width). In those cases fb_bpp ended up completely wrong -- as in 6 bytes per pixel or something like that. Since we already have a way to calculate fb_depth given the masks and fb_bpp is effectively the same as fb_depth, all we need to do is make sure fb_bpp is rounded to the next multiple of the number of bits in a byte -- we assume we can divide by the number of bits in a byte throughout vt(4). While here: - simplify how we calculate fb_depth. - use fb_bpp instead of fb_depth to calculate fb_stride; we know we can divide fb_bpp. - don't limit fb_width and fb_height by VT_FB_DEFAULT_WIDTH and VT_FB_DEFAULT_HEIGHT (resp.). Those constants have not relation to the size of the frame buffer. This at least fixes lower-resolution Macs. We're talking 1280x1024 or so. There still is a problem with 27 Macs, which typically have a horizontal resolution over 2K. PR: 193745 (partial) Ok'd by: emaste@ Modified: head/sys/dev/vt/hw/efifb/efifb.c Modified: head/sys/dev/vt/hw/efifb/efifb.c == --- head/sys/dev/vt/hw/efifb/efifb.cSat Aug 15 15:44:09 2015 (r286808) +++ head/sys/dev/vt/hw/efifb/efifb.cSat Aug 15 16:13:28 2015 (r286809) @@ -96,7 +96,6 @@ vt_efifb_probe(struct vt_device *vd) static int vt_efifb_init(struct vt_device *vd) { - int depth, d; struct fb_info *info; struct efi_fb *efifb; caddr_t kmdp; @@ -116,16 +115,13 @@ vt_efifb_init(struct vt_device *vd) info-fb_height = efifb-fb_height; info-fb_width = efifb-fb_width; - depth = fls(efifb-fb_mask_red); - d = fls(efifb-fb_mask_green); - depth = d depth ? d : depth; - d = fls(efifb-fb_mask_blue); - depth = d depth ? d : depth; - d = fls(efifb-fb_mask_reserved); - depth = d depth ? d : depth; - info-fb_depth = depth; + info-fb_depth = fls(efifb-fb_mask_red | efifb-fb_mask_green | + efifb-fb_mask_blue | efifb-fb_mask_reserved); + /* Round to a multiple of the bits in a byte. */ + info-fb_bpp = (info-fb_depth + NBBY - 1) ~(NBBY - 1); - info-fb_stride = efifb-fb_stride * (depth / 8); + /* Stride in bytes, not pixels */ + info-fb_stride = efifb-fb_stride * (info-fb_bpp / NBBY); vt_generate_cons_palette(info-fb_cmap, COLOR_FORMAT_RGB, efifb-fb_mask_red, ffs(efifb-fb_mask_red) - 1, @@ -137,16 +133,6 @@ vt_efifb_init(struct vt_device *vd) info-fb_vbase = (intptr_t)pmap_mapdev_attr(info-fb_pbase, info-fb_size, VM_MEMATTR_WRITE_COMBINING); - /* Get pixel storage size. */ - info-fb_bpp = info-fb_stride / info-fb_width * 8; - - /* -* Early FB driver work with static window buffer, so reduce to minimal -* size, buffer or screen. -*/ - info-fb_width = MIN(info-fb_width, VT_FB_DEFAULT_WIDTH); - info-fb_height = MIN(info-fb_height, VT_FB_DEFAULT_HEIGHT); - vt_fb_init(vd); return (CN_INTERNAL); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r286813 - stable/10/bin/sh
Author: jilles Date: Sat Aug 15 19:58:00 2015 New Revision: 286813 URL: https://svnweb.freebsd.org/changeset/base/286813 Log: MFC r284779: sh: Fix some arithmetic undefined behaviour. Fix shifts of possibly negative numbers found with ubsan and avoid signed integer overflow when hashing an extremely long command name. Modified: stable/10/bin/sh/alias.c stable/10/bin/sh/exec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/alias.c == --- stable/10/bin/sh/alias.cSat Aug 15 19:00:38 2015(r286812) +++ stable/10/bin/sh/alias.cSat Aug 15 19:58:00 2015(r286813) @@ -248,7 +248,7 @@ hashalias(const char *p) { unsigned int hashval; - hashval = *p 4; + hashval = (unsigned char)*p 4; while (*p) hashval+= *p++; return atab[hashval % ATABSIZE]; Modified: stable/10/bin/sh/exec.c == --- stable/10/bin/sh/exec.c Sat Aug 15 19:00:38 2015(r286812) +++ stable/10/bin/sh/exec.c Sat Aug 15 19:58:00 2015(r286813) @@ -524,17 +524,16 @@ static struct tblentry **lastcmdentry; static struct tblentry * cmdlookup(const char *name, int add) { - int hashval; + unsigned int hashval; const char *p; struct tblentry *cmdp; struct tblentry **pp; size_t len; p = name; - hashval = *p 4; + hashval = (unsigned char)*p 4; while (*p) hashval += *p++; - hashval = 0x7FFF; pp = cmdtable[hashval % CMDTABLESIZE]; for (cmdp = *pp ; cmdp ; cmdp = cmdp-next) { if (equal(cmdp-cmdname, name)) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org