Date: Sun, 28 Oct 2012 20:14:21 +0000 (UTC) From: Andre Oppermann <andre@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242269 - in user/andre/tcp_workqueue/sys: amd64/conf arm/conf arm/ti cam cam/ctl cam/scsi conf dev/ata dev/ata/chipsets dev/ath dev/filemon dev/sound/usb ia64/ia64 ia64/include kern mi... Message-ID: <201210282014.q9SKELRD090817@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andre Date: Sun Oct 28 20:14:21 2012 New Revision: 242269 URL: http://svn.freebsd.org/changeset/base/242269 Log: Integrate from HEAD @242267. Modified: user/andre/tcp_workqueue/sys/amd64/conf/GENERIC user/andre/tcp_workqueue/sys/arm/conf/PANDABOARD user/andre/tcp_workqueue/sys/arm/ti/ti_machdep.c user/andre/tcp_workqueue/sys/cam/cam.h user/andre/tcp_workqueue/sys/cam/cam_xpt.c user/andre/tcp_workqueue/sys/cam/ctl/ctl_frontend_cam_sim.c user/andre/tcp_workqueue/sys/cam/ctl/scsi_ctl.c user/andre/tcp_workqueue/sys/cam/scsi/scsi_da.c user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc.c user/andre/tcp_workqueue/sys/cam/scsi/scsi_pass.c user/andre/tcp_workqueue/sys/conf/files user/andre/tcp_workqueue/sys/conf/files.mips user/andre/tcp_workqueue/sys/dev/ata/ata-all.c user/andre/tcp_workqueue/sys/dev/ata/ata-all.h user/andre/tcp_workqueue/sys/dev/ata/ata-lowlevel.c user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-ahci.c user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-siliconimage.c user/andre/tcp_workqueue/sys/dev/ath/if_ath.c user/andre/tcp_workqueue/sys/dev/filemon/filemon.c user/andre/tcp_workqueue/sys/dev/sound/usb/uaudio.c user/andre/tcp_workqueue/sys/ia64/ia64/pmap.c user/andre/tcp_workqueue/sys/ia64/include/pmap.h user/andre/tcp_workqueue/sys/kern/kern_umtx.c user/andre/tcp_workqueue/sys/kern/uipc_mbuf.c user/andre/tcp_workqueue/sys/mips/cavium/octeon_ebt3000_cf.c user/andre/tcp_workqueue/sys/mips/mips/pmap.c user/andre/tcp_workqueue/sys/modules/Makefile user/andre/tcp_workqueue/sys/modules/drm/r128/Makefile user/andre/tcp_workqueue/sys/modules/drm/radeon/Makefile user/andre/tcp_workqueue/sys/modules/drm/via/Makefile user/andre/tcp_workqueue/sys/net/if_bridge.c user/andre/tcp_workqueue/sys/net80211/ieee80211_freebsd.c user/andre/tcp_workqueue/sys/net80211/ieee80211_ht.c user/andre/tcp_workqueue/sys/netinet/ip_fastfwd.c user/andre/tcp_workqueue/sys/netinet/ip_mroute.c user/andre/tcp_workqueue/sys/netinet/ip_output.c user/andre/tcp_workqueue/sys/netinet/ip_var.h user/andre/tcp_workqueue/sys/netinet/tcp_input.c user/andre/tcp_workqueue/sys/netinet/tcp_timer.c user/andre/tcp_workqueue/sys/netpfil/pf/pf.c user/andre/tcp_workqueue/sys/sys/buf.h user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c user/andre/tcp_workqueue/sys/vm/uma.h user/andre/tcp_workqueue/sys/vm/uma_core.c user/andre/tcp_workqueue/sys/vm/uma_int.h user/andre/tcp_workqueue/sys/vm/vm_glue.c user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c Directory Properties: user/andre/tcp_workqueue/sys/ (props changed) user/andre/tcp_workqueue/sys/conf/ (props changed) Modified: user/andre/tcp_workqueue/sys/amd64/conf/GENERIC ============================================================================== --- user/andre/tcp_workqueue/sys/amd64/conf/GENERIC Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/amd64/conf/GENERIC Sun Oct 28 20:14:21 2012 (r242269) @@ -71,6 +71,10 @@ options KDTRACE_HOOKS # Kernel DTrace options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options IPSEC +device crypto +device enc + # Debugging support. Always need this: options KDB # Enable kernel debugger support. # For minimum debugger support (stable branch) use: Modified: user/andre/tcp_workqueue/sys/arm/conf/PANDABOARD ============================================================================== --- user/andre/tcp_workqueue/sys/arm/conf/PANDABOARD Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/arm/conf/PANDABOARD Sun Oct 28 20:14:21 2012 (r242269) @@ -54,7 +54,7 @@ options NFS_ROOT #NFS usable as /, req #options BOOTP_NFSROOT #options BOOTP_COMPAT #options BOOTP -options BOOTP_NFSV3 +#options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ue0 options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem Modified: user/andre/tcp_workqueue/sys/arm/ti/ti_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/ti/ti_machdep.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/arm/ti/ti_machdep.c Sun Oct 28 20:14:21 2012 (r242269) @@ -494,7 +494,7 @@ initarm(struct arm_boot_params *abp) env = getenv("kernelname"); if (env != NULL) - strlcpy(kernelname, env, sizeof(kernelname); + strlcpy(kernelname, env, sizeof(kernelname)); if (err_devmap != 0) printf("WARNING: could not fully configure devmap, error=%d\n", Modified: user/andre/tcp_workqueue/sys/cam/cam.h ============================================================================== --- user/andre/tcp_workqueue/sys/cam/cam.h Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/cam/cam.h Sun Oct 28 20:14:21 2012 (r242269) @@ -83,6 +83,7 @@ typedef struct { #define CAM_PRIORITY_NORMAL ((CAM_RL_NORMAL << 8) + 0x80) #define CAM_PRIORITY_NONE (u_int32_t)-1 #define CAM_PRIORITY_TO_RL(x) ((x) >> 8) +#define CAM_RL_TO_PRIORITY(x) ((x) << 8) u_int32_t generation; int index; #define CAM_UNQUEUED_INDEX -1 Modified: user/andre/tcp_workqueue/sys/cam/cam_xpt.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/cam_xpt.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/cam/cam_xpt.c Sun Oct 28 20:14:21 2012 (r242269) @@ -2468,9 +2468,6 @@ xpt_action(union ccb *start_ccb) CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action\n")); start_ccb->ccb_h.status = CAM_REQ_INPROG; - /* Compatibility for RL-unaware code. */ - if (CAM_PRIORITY_TO_RL(start_ccb->ccb_h.pinfo.priority) == 0) - start_ccb->ccb_h.pinfo.priority += CAM_PRIORITY_NORMAL - 1; (*(start_ccb->ccb_h.path->bus->xport->action))(start_ccb); } Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/ctl_frontend_cam_sim.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/cam/ctl/ctl_frontend_cam_sim.c Sun Oct 28 20:14:21 2012 (r242269) @@ -240,7 +240,7 @@ cfcs_init(void) goto bailout; } - xpt_setup_ccb(&csa.ccb_h, softc->path, /*priority*/ 5); + xpt_setup_ccb(&csa.ccb_h, softc->path, CAM_PRIORITY_NONE); csa.ccb_h.func_code = XPT_SASYNC_CB; csa.event_enable = AC_LOST_DEVICE; csa.callback = cfcs_async; Modified: user/andre/tcp_workqueue/sys/cam/ctl/scsi_ctl.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/scsi_ctl.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/cam/ctl/scsi_ctl.c Sun Oct 28 20:14:21 2012 (r242269) @@ -334,7 +334,7 @@ ctlfeasync(void *callback_arg, uint32_t return; } xpt_setup_ccb(&ccb->ccb_h, cpi->ccb_h.path, - /*priority*/ 1); + CAM_PRIORITY_NONE); sim = xpt_path_sim(cpi->ccb_h.path); @@ -571,7 +571,7 @@ ctlferegister(struct cam_periph *periph, callout_init_mtx(&softc->dma_callout, sim->mtx, /*flags*/ 0); periph->softc = softc; - xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, /*priority*/ 1); + xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); en_lun_ccb.ccb_h.func_code = XPT_EN_LUN; en_lun_ccb.cel.grp6_len = 0; en_lun_ccb.cel.grp7_len = 0; @@ -668,7 +668,7 @@ ctlfeoninvalidate(struct cam_periph *per softc = (struct ctlfe_lun_softc *)periph->softc; - xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, /*priority*/ 1); + xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); en_lun_ccb.ccb_h.func_code = XPT_EN_LUN; en_lun_ccb.cel.grp6_len = 0; en_lun_ccb.cel.grp7_len = 0; @@ -1694,7 +1694,7 @@ ctlfe_onoffline(void *arg, int online) return; } ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP, M_WAITOK | M_ZERO); - xpt_setup_ccb(&ccb->ccb_h, path, /*priority*/ 1); + xpt_setup_ccb(&ccb->ccb_h, path, CAM_PRIORITY_NONE); sim = xpt_path_sim(path); Modified: user/andre/tcp_workqueue/sys/cam/scsi/scsi_da.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/scsi/scsi_da.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/cam/scsi/scsi_da.c Sun Oct 28 20:14:21 2012 (r242269) @@ -1510,7 +1510,7 @@ dasysctlinit(void *context, int pending) * Add some addressing info. */ memset(&cts, 0, sizeof (cts)); - xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1); + xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; cam_periph_lock(periph); Modified: user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc.c Sun Oct 28 20:14:21 2012 (r242269) @@ -559,7 +559,7 @@ enc_runcmd(struct enc_softc *enc, char * cdbl = IOCDBLEN; } - ccb = cam_periph_getccb(enc->periph, 1); + ccb = cam_periph_getccb(enc->periph, CAM_PRIORITY_NORMAL); if (enc->enc_type == ENC_SEMB_SES || enc->enc_type == ENC_SEMB_SAFT) { tdlen = min(dlen, 1020); tdlen = (tdlen + 3) & ~3; Modified: user/andre/tcp_workqueue/sys/cam/scsi/scsi_pass.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/scsi/scsi_pass.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/cam/scsi/scsi_pass.c Sun Oct 28 20:14:21 2012 (r242269) @@ -521,6 +521,7 @@ passioctl(struct cdev *dev, u_long cmd, struct cam_periph *periph; struct pass_softc *softc; int error; + uint32_t priority; periph = (struct cam_periph *)dev->si_drv1; if (periph == NULL) @@ -553,6 +554,11 @@ passioctl(struct cdev *dev, u_long cmd, break; } + /* Compatibility for RL/priority-unaware code. */ + priority = inccb->ccb_h.pinfo.priority; + if (priority < CAM_RL_TO_PRIORITY(CAM_RL_NORMAL)) + priority += CAM_RL_TO_PRIORITY(CAM_RL_NORMAL); + /* * Non-immediate CCBs need a CCB from the per-device pool * of CCBs, which is scheduled by the transport layer. @@ -561,15 +567,14 @@ passioctl(struct cdev *dev, u_long cmd, */ if ((inccb->ccb_h.func_code & XPT_FC_QUEUED) && ((inccb->ccb_h.func_code & XPT_FC_USER_CCB) == 0)) { - ccb = cam_periph_getccb(periph, - inccb->ccb_h.pinfo.priority); + ccb = cam_periph_getccb(periph, priority); ccb_malloced = 0; } else { ccb = xpt_alloc_ccb_nowait(); if (ccb != NULL) xpt_setup_ccb(&ccb->ccb_h, periph->path, - inccb->ccb_h.pinfo.priority); + priority); ccb_malloced = 1; } Modified: user/andre/tcp_workqueue/sys/conf/files ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/conf/files Sun Oct 28 20:14:21 2012 (r242269) @@ -1940,8 +1940,11 @@ dev/si/si3_t225.c optional si dev/si/si_eisa.c optional si eisa dev/si/si_isa.c optional si isa dev/si/si_pci.c optional si pci +dev/siba/siba.c optional siba dev/siba/siba_bwn.c optional siba_bwn pci -dev/siba/siba_core.c optional siba_bwn pci +dev/siba/siba_cc.c optional siba +dev/siba/siba_core.c optional siba | siba_bwn pci +dev/siba/siba_pcib.c optional siba pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci dev/sk/if_sk.c optional sk pci Modified: user/andre/tcp_workqueue/sys/conf/files.mips ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files.mips Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/conf/files.mips Sun Oct 28 20:14:21 2012 (r242269) @@ -33,7 +33,7 @@ mips/mips/pm_machdep.c standard mips/mips/pmap.c standard mips/mips/ptrace_machdep.c standard mips/mips/sc_machdep.c standard -mips/mips/stack_machdep.c standard +mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard mips/mips/swtch.S standard mips/mips/sys_machdep.c standard @@ -76,9 +76,9 @@ dev/fdt/fdt_mips.c optional fdt crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec -# AP common nvram interface +# AP common nvram interface MIPS specific, but maybe should be more generic dev/nvram2env/nvram2env.c optional nvram2env -# hwpmc goo +# hwpmc support dev/hwpmc/hwpmc_mips.c optional hwpmc dev/hwpmc/hwpmc_mips24k.c optional hwpmc Modified: user/andre/tcp_workqueue/sys/dev/ata/ata-all.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ata/ata-all.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/dev/ata/ata-all.c Sun Oct 28 20:14:21 2012 (r242269) @@ -1492,6 +1492,8 @@ ata_cam_begin_transaction(device_t dev, request->u.ata.lba |= ((uint64_t)ccb->ataio.cmd.lba_high << 16) | ((uint64_t)ccb->ataio.cmd.lba_mid << 8) | (uint64_t)ccb->ataio.cmd.lba_low; + if (ccb->ataio.cmd.flags & CAM_ATAIO_NEEDRESULT) + request->flags |= ATA_R_NEEDRESULT; if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE && ccb->ataio.cmd.flags & CAM_ATAIO_DMA) request->flags |= ATA_R_DMA; Modified: user/andre/tcp_workqueue/sys/dev/ata/ata-all.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ata/ata-all.h Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/dev/ata/ata-all.h Sun Oct 28 20:14:21 2012 (r242269) @@ -397,6 +397,7 @@ struct ata_request { #define ATA_R_REQUEUE 0x00000400 #define ATA_R_THREAD 0x00000800 #define ATA_R_DIRECT 0x00001000 +#define ATA_R_NEEDRESULT 0x00002000 #define ATA_R_ATAPI16 0x00010000 #define ATA_R_ATAPI_INTR 0x00020000 Modified: user/andre/tcp_workqueue/sys/dev/ata/ata-lowlevel.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ata/ata-lowlevel.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/dev/ata/ata-lowlevel.c Sun Oct 28 20:14:21 2012 (r242269) @@ -116,6 +116,7 @@ ata_begin_transaction(struct ata_request } while (request->status & ATA_S_BUSY && timeout--); if (request->status & ATA_S_ERROR) request->error = ATA_IDX_INB(ch, ATA_ERROR); + ch->hw.tf_read(request); goto begin_finished; } @@ -253,8 +254,9 @@ ata_end_transaction(struct ata_request * if (request->flags & ATA_R_TIMEOUT) goto end_finished; - /* on control commands read back registers to the request struct */ - if (request->flags & ATA_R_CONTROL) { + /* Read back registers to the request struct. */ + if ((request->status & ATA_S_ERROR) || + (request->flags & (ATA_R_CONTROL | ATA_R_NEEDRESULT))) { ch->hw.tf_read(request); } @@ -332,6 +334,12 @@ ata_end_transaction(struct ata_request * else if (!(request->flags & ATA_R_TIMEOUT)) request->donecount = request->bytecount; + /* Read back registers to the request struct. */ + if ((request->status & ATA_S_ERROR) || + (request->flags & (ATA_R_CONTROL | ATA_R_NEEDRESULT))) { + ch->hw.tf_read(request); + } + /* release SG list etc */ ch->dma.unload(request); Modified: user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-ahci.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-ahci.c Sun Oct 28 20:14:21 2012 (r242269) @@ -555,8 +555,10 @@ ata_ahci_end_transaction(struct ata_requ if (request->status & ATA_S_ERROR) request->error = tf_data >> 8; - /* on control commands read back registers to the request struct */ - if (request->flags & ATA_R_CONTROL) { + /* Read back registers to the request struct. */ + if ((request->flags & ATA_R_ATAPI) == 0 && + ((request->status & ATA_S_ERROR) || + (request->flags & (ATA_R_CONTROL | ATA_R_NEEDRESULT)))) { u_int8_t *fis = ch->dma.work + ATA_AHCI_FB_OFFSET + 0x40; request->u.ata.count = fis[12] | ((u_int16_t)fis[13] << 8); Modified: user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-siliconimage.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/dev/ata/chipsets/ata-siliconimage.c Sun Oct 28 20:14:21 2012 (r242269) @@ -658,8 +658,10 @@ ata_siiprb_end_transaction(struct ata_re } } - /* on control commands read back registers to the request struct */ - if (request->flags & ATA_R_CONTROL) { + /* Read back registers to the request struct. */ + if ((request->flags & ATA_R_ATAPI) == 0 && + ((request->status & ATA_S_ERROR) || + (request->flags & (ATA_R_CONTROL | ATA_R_NEEDRESULT)))) { request->u.ata.count = prb->fis[12] | ((u_int16_t)prb->fis[13] << 8); request->u.ata.lba = prb->fis[4] | ((u_int64_t)prb->fis[5] << 8) | ((u_int64_t)prb->fis[6] << 16); Modified: user/andre/tcp_workqueue/sys/dev/ath/if_ath.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ath/if_ath.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/dev/ath/if_ath.c Sun Oct 28 20:14:21 2012 (r242269) @@ -281,6 +281,7 @@ ath_attach(u_int16_t devid, struct ath_s DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid); + CURVNET_SET(vnet0); ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); if (ifp == NULL) { device_printf(sc->sc_dev, "can not if_alloc()\n"); @@ -292,6 +293,7 @@ ath_attach(u_int16_t devid, struct ath_s /* set these up early for if_printf use */ if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); + CURVNET_RESTORE(); ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh, sc->sc_eepromdata, &status); @@ -887,8 +889,11 @@ bad2: bad: if (ah) ath_hal_detach(ah); - if (ifp != NULL) + if (ifp != NULL) { + CURVNET_SET(ifp->if_vnet); if_free(ifp); + CURVNET_RESTORE(); + } sc->sc_invalid = 1; return error; } @@ -930,7 +935,10 @@ ath_detach(struct ath_softc *sc) ath_rxdma_teardown(sc); ath_tx_cleanup(sc); ath_hal_detach(sc->sc_ah); /* NB: sets chip in full sleep */ + + CURVNET_SET(ifp->if_vnet); if_free(ifp); + CURVNET_RESTORE(); return 0; } Modified: user/andre/tcp_workqueue/sys/dev/filemon/filemon.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/filemon/filemon.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/dev/filemon/filemon.c Sun Oct 28 20:14:21 2012 (r242269) @@ -136,6 +136,12 @@ filemon_dtr(void *data) } } +#if __FreeBSD_version < 900041 +#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3)) +#else +#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3)) +#endif + static int filemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag __unused, struct thread *td) @@ -148,11 +154,6 @@ filemon_ioctl(struct cdev *dev, u_long c switch (cmd) { /* Set the output file descriptor. */ case FILEMON_SET_FD: -#if __FreeBSD_version < 900041 -#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3)) -#else -#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3)) -#endif if ((error = FGET_WRITE(td, *(int *)data, &filemon->fp)) == 0) /* Write the file header. */ filemon_comment(filemon); @@ -160,7 +161,7 @@ filemon_ioctl(struct cdev *dev, u_long c /* Set the monitored process ID. */ case FILEMON_SET_PID: - filemon->pid = *((pid_t *) data); + filemon->pid = *((pid_t *)data); break; default: Modified: user/andre/tcp_workqueue/sys/dev/sound/usb/uaudio.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/sound/usb/uaudio.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/dev/sound/usb/uaudio.c Sun Oct 28 20:14:21 2012 (r242269) @@ -176,7 +176,7 @@ struct uaudio_chan { struct mtx *pcm_mtx; /* lock protecting this structure */ struct uaudio_softc *priv_sc; struct pcm_channel *pcm_ch; - struct usb_xfer *xfer[UAUDIO_NCHANBUFS]; + struct usb_xfer *xfer[UAUDIO_NCHANBUFS + 1]; union uaudio_asf1d p_asf1d; union uaudio_sed p_sed; const usb_endpoint_descriptor_audio_t *p_ed1; @@ -206,6 +206,12 @@ struct uaudio_chan { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; + + uint8_t last_sync_time; + uint8_t last_sync_state; +#define UAUDIO_SYNC_NONE 0 +#define UAUDIO_SYNC_MORE 1 +#define UAUDIO_SYNC_LESS 2 }; #define UMIDI_CABLES_MAX 16 /* units */ @@ -386,7 +392,9 @@ static device_attach_t uaudio_attach; static device_detach_t uaudio_detach; static usb_callback_t uaudio_chan_play_callback; +static usb_callback_t uaudio_chan_play_sync_callback; static usb_callback_t uaudio_chan_record_callback; +static usb_callback_t uaudio_chan_record_sync_callback; static usb_callback_t uaudio_mixer_write_cfg_callback; static usb_callback_t umidi_bulk_read_callback; static usb_callback_t umidi_bulk_write_callback; @@ -482,7 +490,7 @@ static void uaudio_chan_dump_ep_desc( #endif static const struct usb_config - uaudio_cfg_record[UAUDIO_NCHANBUFS] = { + uaudio_cfg_record[UAUDIO_NCHANBUFS + 1] = { [0] = { .type = UE_ISOCHRONOUS, .endpoint = UE_ADDR_ANY, @@ -502,10 +510,20 @@ static const struct usb_config .flags = {.short_xfer_ok = 1,}, .callback = &uaudio_chan_record_callback, }, + + [2] = { + .type = UE_ISOCHRONOUS, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = 1, + .flags = {.no_pipe_ok = 1,.short_xfer_ok = 1,}, + .callback = &uaudio_chan_record_sync_callback, + }, }; static const struct usb_config - uaudio_cfg_play[UAUDIO_NCHANBUFS] = { + uaudio_cfg_play[UAUDIO_NCHANBUFS + 1] = { [0] = { .type = UE_ISOCHRONOUS, .endpoint = UE_ADDR_ANY, @@ -525,6 +543,16 @@ static const struct usb_config .flags = {.short_xfer_ok = 1,}, .callback = &uaudio_chan_play_callback, }, + + [2] = { + .type = UE_ISOCHRONOUS, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = 1, + .flags = {.no_pipe_ok = 1,.short_xfer_ok = 1,}, + .callback = &uaudio_chan_play_sync_callback, + }, }; static const struct usb_config @@ -845,9 +873,9 @@ uaudio_detach(device_t dev) * any. */ if (sc->sc_play_chan.valid) - usbd_transfer_unsetup(sc->sc_play_chan.xfer, UAUDIO_NCHANBUFS); + usbd_transfer_unsetup(sc->sc_play_chan.xfer, UAUDIO_NCHANBUFS + 1); if (sc->sc_rec_chan.valid) - usbd_transfer_unsetup(sc->sc_rec_chan.xfer, UAUDIO_NCHANBUFS); + usbd_transfer_unsetup(sc->sc_rec_chan.xfer, UAUDIO_NCHANBUFS + 1); if (bus_generic_detach(dev) != 0) { DPRINTF("detach failed!\n"); @@ -1396,10 +1424,96 @@ done: } static void +uaudio_chan_play_sync_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct uaudio_chan *ch = usbd_xfer_softc(xfer); + struct usb_page_cache *pc; + uint8_t buf[4]; + uint64_t temp; + int len; + int actlen; + int nframes; + + usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + + DPRINTFN(6, "transferred %d bytes\n", actlen); + + if (nframes == 0) + break; + len = usbd_xfer_frame_len(xfer, 0); + if (len == 0) + break; + if (len > sizeof(buf)) + len = sizeof(buf); + + memset(buf, 0, sizeof(buf)); + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_out(pc, 0, buf, len); + + temp = UGETDW(buf); + + DPRINTF("Value = 0x%08x\n", (int)temp); + + /* auto-detect SYNC format */ + + if (len == 4) + temp &= 0x0fffffff; + + /* check for no data */ + + if (temp == 0) + break; + + /* correctly scale value */ + + temp = (temp * 125ULL) - 64; + + /* auto adjust */ + + while (temp < (ch->sample_rate - (ch->sample_rate / 4))) + temp *= 2; + + while (temp > (ch->sample_rate + (ch->sample_rate / 2))) + temp /= 2; + + /* bias */ + + temp += (ch->sample_rate + 1999) / 2000; + + /* compare */ + + DPRINTF("Comparing %d < %d\n", + (int)temp, (int)ch->sample_rate); + + if (temp == ch->sample_rate) + ch->last_sync_state = UAUDIO_SYNC_NONE; + else if (temp > ch->sample_rate) + ch->last_sync_state = UAUDIO_SYNC_MORE; + else + ch->last_sync_state = UAUDIO_SYNC_LESS; + break; + + case USB_ST_SETUP: + usbd_xfer_set_frames(xfer, 1); + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_framelen(xfer)); + usbd_transfer_submit(xfer); + break; + + default: /* Error */ + break; + } +} + +static void uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; + uint32_t mfl; uint32_t total; uint32_t blockcount; uint32_t n; @@ -1423,12 +1537,18 @@ tr_transferred: } chn_intr(ch->pcm_ch); + /* start SYNC transfer, if any */ + if ((ch->last_sync_time++ & 7) == 0) + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + case USB_ST_SETUP: - if (ch->bytes_per_frame[1] > usbd_xfer_max_framelen(xfer)) { + mfl = usbd_xfer_max_framelen(xfer); + + if (ch->bytes_per_frame[1] > mfl) { DPRINTF("bytes per transfer, %d, " "exceeds maximum, %d!\n", ch->bytes_per_frame[1], - usbd_xfer_max_framelen(xfer)); + mfl); break; } @@ -1442,15 +1562,37 @@ tr_transferred: /* setup frame lengths */ for (n = 0; n != blockcount; n++) { + uint32_t frame_len; + ch->sample_curr += ch->sample_rem; if (ch->sample_curr >= ch->frames_per_second) { ch->sample_curr -= ch->frames_per_second; - usbd_xfer_set_frame_len(xfer, n, ch->bytes_per_frame[1]); - total += ch->bytes_per_frame[1]; + frame_len = ch->bytes_per_frame[1]; } else { - usbd_xfer_set_frame_len(xfer, n, ch->bytes_per_frame[0]); - total += ch->bytes_per_frame[0]; + frame_len = ch->bytes_per_frame[0]; + } + + if (n == (blockcount - 1)) { + switch (ch->last_sync_state) { + case UAUDIO_SYNC_MORE: + DPRINTFN(6, "sending one sample more\n"); + if ((frame_len + ch->sample_size) <= mfl) + frame_len += ch->sample_size; + ch->last_sync_state = UAUDIO_SYNC_NONE; + break; + case UAUDIO_SYNC_LESS: + DPRINTFN(6, "sending one sample less\n"); + if (frame_len >= ch->sample_size) + frame_len -= ch->sample_size; + ch->last_sync_state = UAUDIO_SYNC_NONE; + break; + default: + break; + } } + + usbd_xfer_set_frame_len(xfer, n, frame_len); + total += frame_len; } DPRINTFN(6, "transfer %d bytes\n", total); @@ -1487,6 +1629,12 @@ tr_transferred: } static void +uaudio_chan_record_sync_callback(struct usb_xfer *xfer, usb_error_t error) +{ + /* TODO */ +} + +static void uaudio_chan_record_callback(struct usb_xfer *xfer, usb_error_t error) { struct uaudio_chan *ch = usbd_xfer_softc(xfer); @@ -1697,7 +1845,7 @@ uaudio_chan_init(struct uaudio_softc *sc } } if (usbd_transfer_setup(sc->sc_udev, &iface_index, ch->xfer, - ch->usb_cfg, UAUDIO_NCHANBUFS, ch, ch->pcm_mtx)) { + ch->usb_cfg, UAUDIO_NCHANBUFS + 1, ch, ch->pcm_mtx)) { DPRINTF("could not allocate USB transfers!\n"); goto error; } @@ -1767,7 +1915,7 @@ uaudio_chan_free(struct uaudio_chan *ch) free(ch->buf, M_DEVBUF); ch->buf = NULL; } - usbd_transfer_unsetup(ch->xfer, UAUDIO_NCHANBUFS); + usbd_transfer_unsetup(ch->xfer, UAUDIO_NCHANBUFS + 1); ch->valid = 0; @@ -1868,12 +2016,8 @@ uaudio_chan_start(struct uaudio_chan *ch #if (UAUDIO_NCHANBUFS != 2) #error "please update code" #endif - if (ch->xfer[0]) { - usbd_transfer_start(ch->xfer[0]); - } - if (ch->xfer[1]) { - usbd_transfer_start(ch->xfer[1]); - } + usbd_transfer_start(ch->xfer[0]); + usbd_transfer_start(ch->xfer[1]); return (0); } Modified: user/andre/tcp_workqueue/sys/ia64/ia64/pmap.c ============================================================================== --- user/andre/tcp_workqueue/sys/ia64/ia64/pmap.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/ia64/ia64/pmap.c Sun Oct 28 20:14:21 2012 (r242269) @@ -140,6 +140,29 @@ extern uint64_t ia64_gateway_page[]; #define pmap_set_wired(lpte) (lpte)->pte |= PTE_WIRED /* + * Individual PV entries are stored in per-pmap chunks. This saves + * space by eliminating the need to record the pmap within every PV + * entry. + */ +#if PAGE_SIZE == 8192 +#define _NPCM 6 +#define _NPCPV 337 +#define _NPCS 2 +#elif PAGE_SIZE == 16384 +#define _NPCM 11 +#define _NPCPV 677 +#define _NPCS 1 +#endif +struct pv_chunk { + pmap_t pc_pmap; + TAILQ_ENTRY(pv_chunk) pc_list; + u_long pc_map[_NPCM]; /* bitmap; 1 = free */ + TAILQ_ENTRY(pv_chunk) pc_lru; + u_long pc_spare[_NPCS]; + struct pv_entry pc_pventry[_NPCPV]; +}; + +/* * The VHPT bucket head structure. */ struct ia64_bucket { @@ -693,8 +716,6 @@ pmap_growkernel(vm_offset_t addr) ***************************************************/ CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); -CTASSERT(_NPCM == 6); -CTASSERT(_NPCPV == 337); static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) @@ -705,13 +726,23 @@ pv_to_chunk(pv_entry_t pv) #define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap) -#define PC_FREE0_4 0xfffffffffffffffful -#define PC_FREE5 0x000000000001fffful +#define PC_FREE_FULL 0xfffffffffffffffful +#define PC_FREE_PARTIAL \ + ((1UL << (_NPCPV - sizeof(u_long) * 8 * (_NPCM - 1))) - 1) +#if PAGE_SIZE == 8192 static const u_long pc_freemask[_NPCM] = { - PC_FREE0_4, PC_FREE0_4, PC_FREE0_4, - PC_FREE0_4, PC_FREE0_4, PC_FREE5 + PC_FREE_FULL, PC_FREE_FULL, PC_FREE_FULL, + PC_FREE_FULL, PC_FREE_FULL, PC_FREE_PARTIAL }; +#elif PAGE_SIZE == 16384 +static const u_long pc_freemask[_NPCM] = { + PC_FREE_FULL, PC_FREE_FULL, PC_FREE_FULL, + PC_FREE_FULL, PC_FREE_FULL, PC_FREE_FULL, + PC_FREE_FULL, PC_FREE_FULL, PC_FREE_FULL, + PC_FREE_FULL, PC_FREE_PARTIAL +}; +#endif static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); Modified: user/andre/tcp_workqueue/sys/ia64/include/pmap.h ============================================================================== --- user/andre/tcp_workqueue/sys/ia64/include/pmap.h Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/ia64/include/pmap.h Sun Oct 28 20:14:21 2012 (r242269) @@ -105,21 +105,6 @@ typedef struct pv_entry { TAILQ_ENTRY(pv_entry) pv_list; } *pv_entry_t; -/* - * pv_entries are allocated in chunks per-process. This avoids the - * need to track per-pmap assignments. - */ -#define _NPCM 6 -#define _NPCPV 337 -struct pv_chunk { - pmap_t pc_pmap; - TAILQ_ENTRY(pv_chunk) pc_list; - u_long pc_map[_NPCM]; /* bitmap; 1 = free */ - TAILQ_ENTRY(pv_chunk) pc_lru; - u_long pc_spare[2]; - struct pv_entry pc_pventry[_NPCPV]; -}; - #ifdef _KERNEL extern vm_paddr_t phys_avail[]; Modified: user/andre/tcp_workqueue/sys/kern/kern_umtx.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_umtx.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/kern/kern_umtx.c Sun Oct 28 20:14:21 2012 (r242269) @@ -3291,8 +3291,8 @@ freebsd32_umtx_unlock(struct thread *td, } struct timespec32 { - uint32_t tv_sec; - uint32_t tv_nsec; + int32_t tv_sec; + int32_t tv_nsec; }; struct umtx_time32 { Modified: user/andre/tcp_workqueue/sys/kern/uipc_mbuf.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_mbuf.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/kern/uipc_mbuf.c Sun Oct 28 20:14:21 2012 (r242269) @@ -1584,7 +1584,7 @@ again: n = m->m_next; if (n == NULL) break; - if (!M_WRITABLE(m) && + if (M_WRITABLE(m) && n->m_len < M_TRAILINGSPACE(m)) { bcopy(mtod(n, void *), mtod(m, char *) + m->m_len, n->m_len); Modified: user/andre/tcp_workqueue/sys/mips/cavium/octeon_ebt3000_cf.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/cavium/octeon_ebt3000_cf.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/mips/cavium/octeon_ebt3000_cf.c Sun Oct 28 20:14:21 2012 (r242269) @@ -280,6 +280,7 @@ static void cf_outb_8(int port, uint8_t if (bus_type == CF_8) { volatile uint8_t *task_file = (volatile uint8_t *)base_addr; task_file[port] = val; + return; } /* Modified: user/andre/tcp_workqueue/sys/mips/mips/pmap.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/mips/pmap.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/mips/mips/pmap.c Sun Oct 28 20:14:21 2012 (r242269) @@ -1440,7 +1440,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) *pte = PTE_G; else *pte = 0; - pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(TLBLO_PTE_TO_PA(oldpte)); if (pte_test(&oldpte, PTE_D)) vm_page_dirty(m); Modified: user/andre/tcp_workqueue/sys/modules/Makefile ============================================================================== --- user/andre/tcp_workqueue/sys/modules/Makefile Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/modules/Makefile Sun Oct 28 20:14:21 2012 (r242269) @@ -783,6 +783,7 @@ _cardbus= cardbus _cbb= cbb _cfi= cfi _cpufreq= cpufreq +_drm= drm _exca= exca _nvram= powermac_nvram _pccard= pccard Modified: user/andre/tcp_workqueue/sys/modules/drm/r128/Makefile ============================================================================== --- user/andre/tcp_workqueue/sys/modules/drm/r128/Makefile Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/modules/drm/r128/Makefile Sun Oct 28 20:14:21 2012 (r242269) @@ -7,6 +7,6 @@ SRCS +=device_if.h bus_if.h pci_if.h opt .include <bsd.kmod.mk> -CWARNFLAGS.r128_cce.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} -CWARNFLAGS.r128_state.c= ${NO_WUNUSED_VALUE} +CWARNFLAGS.r128_cce.c= -Wno-unused ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.r128_state.c= -Wno-unused CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: user/andre/tcp_workqueue/sys/modules/drm/radeon/Makefile ============================================================================== --- user/andre/tcp_workqueue/sys/modules/drm/radeon/Makefile Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/modules/drm/radeon/Makefile Sun Oct 28 20:14:21 2012 (r242269) @@ -8,6 +8,6 @@ SRCS +=device_if.h bus_if.h pci_if.h opt .include <bsd.kmod.mk> -CWARNFLAGS.r600_cp.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} -CWARNFLAGS.radeon_cp.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.r600_cp.c= -Wno-unused ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.radeon_cp.c= -Wno-unused ${NO_WCONSTANT_CONVERSION} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: user/andre/tcp_workqueue/sys/modules/drm/via/Makefile ============================================================================== --- user/andre/tcp_workqueue/sys/modules/drm/via/Makefile Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/modules/drm/via/Makefile Sun Oct 28 20:14:21 2012 (r242269) @@ -10,7 +10,8 @@ SRCS += device_if.h bus_if.h pci_if.h op DRM_DEBUG_OPT= "\#define DRM_DEBUG 1" .endif -.if !defined(DRM_NOLINUX) +.if !defined(DRM_NOLINUX) && \ + (${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64") DRM_LINUX_OPT= "\#define DRM_LINUX 1" .endif @@ -21,6 +22,6 @@ opt_drm.h: .include <bsd.kmod.mk> -CWARNFLAGS.via_dma.c= ${NO_WUNUSED_VALUE} -CWARNFLAGS.via_dmablit.c= ${NO_WUNUSED_VALUE} +CWARNFLAGS.via_dma.c= -Wno-unused-value +CWARNFLAGS.via_dmablit.c= -Wno-unused-value CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: user/andre/tcp_workqueue/sys/net/if_bridge.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/if_bridge.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/net/if_bridge.c Sun Oct 28 20:14:21 2012 (r242269) @@ -3379,8 +3379,8 @@ bridge_fragment(struct ifnet *ifp, struc goto out; ip = mtod(m, struct ip *); - error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist, - CSUM_DELAY_IP); + m->m_pkthdr.csum_flags |= CSUM_IP; + error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist); if (error) goto out; Modified: user/andre/tcp_workqueue/sys/net80211/ieee80211_freebsd.c ============================================================================== --- user/andre/tcp_workqueue/sys/net80211/ieee80211_freebsd.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/net80211/ieee80211_freebsd.c Sun Oct 28 20:14:21 2012 (r242269) @@ -65,9 +65,10 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, C static MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state"); +#if __FreeBSD_version >= 1000020 static const char wlanname[] = "wlan"; - static struct if_clone *wlan_cloner; +#endif /* * Allocate/free com structure in conjunction with ifnet; @@ -133,10 +134,19 @@ wlan_clone_create(struct if_clone *ifc, if_printf(ifp, "TDMA not supported\n"); return EOPNOTSUPP; } +#if __FreeBSD_version >= 1000020 vap = ic->ic_vap_create(ic, wlanname, unit, cp.icp_opmode, cp.icp_flags, cp.icp_bssid, cp.icp_flags & IEEE80211_CLONE_MACADDR ? cp.icp_macaddr : (const uint8_t *)IF_LLADDR(ifp)); +#else + vap = ic->ic_vap_create(ic, ifc->ifc_name, unit, + cp.icp_opmode, cp.icp_flags, cp.icp_bssid, + cp.icp_flags & IEEE80211_CLONE_MACADDR ? + cp.icp_macaddr : (const uint8_t *)IF_LLADDR(ifp)); + +#endif + return (vap == NULL ? EIO : 0); } @@ -149,11 +159,19 @@ wlan_clone_destroy(struct ifnet *ifp) ic->ic_vap_delete(vap); } +#if __FreeBSD_version < 1000020 +IFC_SIMPLE_DECLARE(wlan, 0); +#endif + void ieee80211_vap_destroy(struct ieee80211vap *vap) { CURVNET_SET(vap->iv_ifp->if_vnet); +#if __FreeBSD_version >= 1000020 if_clone_destroyif(wlan_cloner, vap->iv_ifp); +#else + if_clone_destroyif(&wlan_cloner, vap->iv_ifp); +#endif CURVNET_RESTORE(); } @@ -811,13 +829,21 @@ wlan_modevent(module_t mod, int type, vo EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); return ENOMEM; } +#if __FreeBSD_version >= 1000020 wlan_cloner = if_clone_simple(wlanname, wlan_clone_create, wlan_clone_destroy, 0); +#else + if_clone_attach(&wlan_cloner); +#endif if_register_com_alloc(IFT_IEEE80211, wlan_alloc, wlan_free); return 0; case MOD_UNLOAD: if_deregister_com_alloc(IFT_IEEE80211); +#if __FreeBSD_version >= 1000020 if_clone_detach(wlan_cloner); +#else + if_clone_detach(&wlan_cloner); +#endif EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); EVENTHANDLER_DEREGISTER(iflladdr_event, wlan_ifllevent); return 0; @@ -826,7 +852,11 @@ wlan_modevent(module_t mod, int type, vo } static moduledata_t wlan_mod = { +#if __FreeBSD_version >= 1000020 wlanname, +#else + "wlan", +#endif wlan_modevent, 0 }; Modified: user/andre/tcp_workqueue/sys/net80211/ieee80211_ht.c ============================================================================== --- user/andre/tcp_workqueue/sys/net80211/ieee80211_ht.c Sun Oct 28 20:03:57 2012 (r242268) +++ user/andre/tcp_workqueue/sys/net80211/ieee80211_ht.c Sun Oct 28 20:14:21 2012 (r242269) @@ -1025,12 +1025,21 @@ ieee80211_ht_node_init(struct ieee80211_ struct ieee80211_tx_ampdu *tap; int tid; + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, + ni, + "%s: called", + __func__); + if (ni->ni_flags & IEEE80211_NODE_HT) { /* * Clean AMPDU state on re-associate. This handles the case * where a station leaves w/o notifying us and then returns * before node is reaped for inactivity. */ + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, + ni, + "%s: calling cleanup", + __func__); ieee80211_ht_node_cleanup(ni); } for (tid = 0; tid < WME_NUM_TID; tid++) { @@ -1052,6 +1061,11 @@ ieee80211_ht_node_cleanup(struct ieee802 struct ieee80211com *ic = ni->ni_ic; int i; + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, + ni, + "%s: called", + __func__); + KASSERT(ni->ni_flags & IEEE80211_NODE_HT, ("not an HT node")); /* XXX optimize this */ @@ -1684,6 +1698,11 @@ ampdu_tx_stop(struct ieee80211_tx_ampdu struct ieee80211_node *ni = tap->txa_ni; struct ieee80211com *ic = ni->ni_ic; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210282014.q9SKELRD090817>