From owner-p4-projects@FreeBSD.ORG Fri Oct 23 09:05:24 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4DEE4106568D; Fri, 23 Oct 2009 09:05:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 111281065670 for ; Fri, 23 Oct 2009 09:05:24 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F14288FC15 for ; Fri, 23 Oct 2009 09:05:23 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n9N95NWg077502 for ; Fri, 23 Oct 2009 09:05:23 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n9N95NjH077500 for perforce@freebsd.org; Fri, 23 Oct 2009 09:05:23 GMT (envelope-from mav@freebsd.org) Date: Fri, 23 Oct 2009 09:05:23 GMT Message-Id: <200910230905.n9N95NjH077500@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 169705 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2009 09:05:24 -0000 http://p4web.freebsd.org/chv.cgi?CH=169705 Change 169705 by mav@mav_mavbook on 2009/10/23 09:05:07 IFC Affected files ... .. //depot/projects/scottl-camlock/src/lib/libusb/libusb20_ugen20.c#4 integrate .. //depot/projects/scottl-camlock/src/share/man/man4/atapicam.4#3 integrate .. //depot/projects/scottl-camlock/src/share/man/man4/mac_mls.4#2 integrate .. //depot/projects/scottl-camlock/src/share/man/man4/umass.4#3 integrate .. //depot/projects/scottl-camlock/src/share/mk/bsd.sys.mk#4 integrate .. //depot/projects/scottl-camlock/src/share/zoneinfo/Makefile#4 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#31 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#41 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam.h#8 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_periph.c#36 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_queue.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_queue.h#4 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#107 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_all.c#11 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_cd.c#28 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_ch.c#19 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#47 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pt.c#15 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_sa.c#21 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_targ_bh.c#13 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_target.c#20 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_xpt.c#18 integrate .. //depot/projects/scottl-camlock/src/sys/dev/mwl/if_mwl_pci.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/usb/input/ums.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/kern/subr_bus.c#35 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_hwmp.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/aim/mmu_oea64.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/aim/mp_cpudep.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/aim/platform_chrp.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/booke/mp_cpudep.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/include/pcpu.h#8 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/include/smp.h#5 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/include/spr.h#8 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/powerpc/cpu.c#10 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/powerpc/mp_machdep.c#10 integrate .. //depot/projects/scottl-camlock/src/sys/tools/makeobjops.awk#5 integrate Differences ... ==== //depot/projects/scottl-camlock/src/lib/libusb/libusb20_ugen20.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/lib/libusb/libusb20_ugen20.c,v 1.4 2009/06/23 02:19:59 thompsa Exp $ */ +/* $FreeBSD: src/lib/libusb/libusb20_ugen20.c,v 1.5 2009/10/22 21:01:41 thompsa Exp $ */ /*- * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * @@ -800,7 +800,11 @@ if (xfer->flags & LIBUSB20_TRANSFER_DO_CLEAR_STALL) { fsep->flags |= USB_FS_FLAG_CLEAR_STALL; } - fsep->timeout = xfer->timeout; + /* NOTE: The "fsep->timeout" variable is 16-bit. */ + if (xfer->timeout > 65535) + fsep->timeout = 65535; + else + fsep->timeout = xfer->timeout; temp.ep_index = xfer->trIndex; ==== //depot/projects/scottl-camlock/src/share/man/man4/atapicam.4#3 (text+ko) ==== @@ -25,16 +25,31 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/atapicam.4,v 1.6 2008/11/03 22:43:37 imp Exp $ +.\" $FreeBSD: src/share/man/man4/atapicam.4,v 1.7 2009/10/22 11:35:12 brueffer Exp $ .\" -.Dd October 23, 2002 +.Dd October 22, 2009 .Dt ATAPICAM 4 .Os .Sh NAME .Nm atapicam .Nd CAM XPT (transport) module for ATAPI devices .Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device scbus" +.Cd "device cam" +.Cd "device ata" .Cd "device atapicam" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +atapicam_load="YES" +.Ed .Sh DESCRIPTION The ATAPI/CAM module allows ATAPI devices (CD-ROM, CD-RW, DVD drives, floppy drives such as Iomega Zip, tape drives) to be accessed through ==== //depot/projects/scottl-camlock/src/share/man/man4/mac_mls.4#2 (text+ko) ==== @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/mac_mls.4,v 1.19 2005/01/12 10:14:42 ru Exp $ +.\" $FreeBSD: src/share/man/man4/mac_mls.4,v 1.20 2009/10/22 08:38:27 pjd Exp $ .\" .Dd December 1, 2002 .Os @@ -212,7 +212,6 @@ .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , -.Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , .Xr mac_portacl 4 , ==== //depot/projects/scottl-camlock/src/share/man/man4/umass.4#3 (text+ko) ==== @@ -25,9 +25,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/umass.4,v 1.45 2008/10/13 20:43:08 n_hibma Exp $ +.\" $FreeBSD: src/share/man/man4/umass.4,v 1.46 2009/10/22 11:35:12 brueffer Exp $ .\" -.Dd November 22, 2006 +.Dd October 22, 2009 .Dt UMASS 4 .Os .Sh NAME @@ -38,6 +38,9 @@ place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device scbus" +.Cd "device cam" +.Cd "device usb" .Cd "device umass" .Ed .Pp ==== //depot/projects/scottl-camlock/src/share/mk/bsd.sys.mk#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/mk/bsd.sys.mk,v 1.49 2009/10/21 17:07:46 rdivacky Exp $ +# $FreeBSD: src/share/mk/bsd.sys.mk,v 1.50 2009/10/22 11:45:35 ru Exp $ # # This file contains common settings used for building FreeBSD # sources. @@ -11,7 +11,7 @@ # the default is gnu99 for now CSTD ?= gnu99 -.if !defined(NO_WARNS) || ${CC} != "icc" +.if ${CC} != "icc" . if ${CSTD} == "k&r" CFLAGS += -traditional . elif ${CSTD} == "c89" || ${CSTD} == "c90" @@ -23,6 +23,8 @@ . else CFLAGS += -std=${CSTD} . endif +.endif +.if !defined(NO_WARNS) && ${CC} != "icc" # -pedantic is problematic because it also imposes namespace restrictions #CFLAGS += -pedantic . if defined(WARNS) ==== //depot/projects/scottl-camlock/src/share/zoneinfo/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/zoneinfo/Makefile,v 1.25 2009/10/21 20:59:12 edwin Exp $ +# $FreeBSD: src/share/zoneinfo/Makefile,v 1.26 2009/10/22 20:59:51 edwin Exp $ # # HOW TO UPDATE THE ZONEINFO DATA @@ -55,11 +55,11 @@ ${.CURDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ afterinstall: - @# - @# If the file /var/db/zoneinfo exists, and it is owned by root:wheel, - @# and the contents of it exists in /usr/share/zoneinfo, then reinstall - @# it. - @# +# +# If the file /var/db/zoneinfo exists, and it is owned by root:wheel, +# and the contents of it exists in /usr/share/zoneinfo, then reinstall +# it. +# @if [ -f ${DESTDIR}/var/db/zoneinfo -a -O ${DESTDIR}/var/db/zoneinfo \ -a -G ${DESTDIR}/var/db/zoneinfo ]; then \ zf=$$(cat ${DESTDIR}/var/db/zoneinfo); \ ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#31 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.6 2009/10/21 14:20:55 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.7 2009/10/23 08:27:55 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#41 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.7 2009/10/21 15:27:48 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.8 2009/10/23 08:27:55 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/cam.h#8 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/cam.h,v 1.13 2009/07/10 08:18:08 scottl Exp $ + * $FreeBSD: src/sys/cam/cam.h,v 1.14 2009/10/23 08:27:55 mav Exp $ */ #ifndef _CAM_CAM_H ==== //depot/projects/scottl-camlock/src/sys/cam/cam_periph.c#36 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.81 2009/09/22 22:23:52 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.82 2009/10/23 08:27:55 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/cam_queue.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_queue.c,v 1.9 2005/07/01 15:21:29 avatar Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_queue.c,v 1.10 2009/10/22 21:07:32 mav Exp $"); #include #include @@ -289,7 +289,7 @@ cam_ccbq_free(struct cam_ccbq *ccbq) { if (ccbq) { - camq_fini(&ccbq->queue); + cam_ccbq_fini(ccbq); free(ccbq, M_CAMCCBQ); } } @@ -338,6 +338,13 @@ return (0); } +void +cam_ccbq_fini(struct cam_ccbq *ccbq) +{ + + camq_fini(&ccbq->queue); +} + /* * Heap routines for manipulating CAM queues. */ ==== //depot/projects/scottl-camlock/src/sys/cam/cam_queue.h#4 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/cam_queue.h,v 1.9 2005/01/05 22:34:34 imp Exp $ + * $FreeBSD: src/sys/cam/cam_queue.h,v 1.11 2009/10/22 21:07:32 mav Exp $ */ #ifndef _CAM_CAM_QUEUE_H ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#107 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.225 2009/10/21 15:57:16 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.227 2009/10/23 08:27:55 mav Exp $"); #include #include @@ -4455,7 +4455,7 @@ devq = bus->sim->devq; cam_devq_resize(devq, devq->alloc_queue.array_size - 1); camq_fini(&device->drvq); - camq_fini(&device->ccbq.queue); + cam_ccbq_fini(&device->ccbq); free(device, M_CAMXPT); xpt_release_target(bus, target); } ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_all.c#11 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.55 2009/07/10 08:18:08 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.56 2009/10/23 08:27:55 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_cd.c#28 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.110 2009/09/08 16:09:28 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.111 2009/10/23 08:27:55 mav Exp $"); #include "opt_cd.h" ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_ch.c#19 (text+ko) ==== @@ -68,7 +68,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.48 2009/07/10 08:18:08 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.49 2009/10/23 08:27:55 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#47 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.238 2009/09/04 09:40:59 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.240 2009/10/23 08:27:55 mav Exp $"); #include @@ -813,14 +813,6 @@ cam_periph_lock(periph); -#if 0 - /* - * check it's not too big a transfer for our adapter - */ - scsi_minphys(bp,&sd_switch); -#endif - - /* * If the device has been made invalid, error out */ if ((softc->flags & DA_FLAG_PACK_INVALID)) { @@ -1687,7 +1679,7 @@ xpt_setup_ccb(&cgd.ccb_h, done_ccb->ccb_h.path, - priority); + CAM_PRIORITY_NORMAL); cgd.ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)&cgd); ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pt.c#15 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.49 2009/07/10 08:18:08 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.50 2009/10/23 08:27:55 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_sa.c#21 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.117 2009/07/10 08:18:08 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.118 2009/10/23 08:27:55 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_targ_bh.c#13 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.25 2007/05/16 16:54:23 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.26 2009/10/23 08:27:55 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_target.c#20 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.80 2009/09/19 20:25:54 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.81 2009/10/23 08:27:55 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_xpt.c#18 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_xpt.c,v 1.3 2009/07/14 18:44:17 emaste Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_xpt.c,v 1.4 2009/10/23 08:27:55 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/dev/mwl/if_mwl_pci.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/dev/mwl/if_mwl_pci.c,v 1.1 2009/06/01 18:07:01 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mwl/if_mwl_pci.c,v 1.2 2009/10/22 12:48:17 rpaulo Exp $"); #endif /* @@ -204,7 +204,7 @@ BUS_SPACE_MAXADDR, /* maxsize */ MWL_TXDESC, /* nsegments */ BUS_SPACE_MAXADDR, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ + 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ &sc->sc_dmat)) { ==== //depot/projects/scottl-camlock/src/sys/dev/usb/input/ums.c#8 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/input/ums.c,v 1.16 2009/07/30 00:13:09 alfred Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/input/ums.c,v 1.17 2009/10/22 20:54:01 thompsa Exp $"); /* * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf @@ -63,6 +63,7 @@ #include #include #include +#include #include #include @@ -161,7 +162,9 @@ static usb_fifo_close_t ums_close; static usb_fifo_ioctl_t ums_ioctl; -static void ums_put_queue(struct ums_softc *sc, int32_t dx, int32_t dy, int32_t dz, int32_t dt, int32_t buttons); +static void ums_put_queue(struct ums_softc *, int32_t, int32_t, + int32_t, int32_t, int32_t); +static int ums_sysctl_handler_parseinfo(SYSCTL_HANDLER_ARGS); static struct usb_fifo_methods ums_fifo_methods = { .f_open = &ums_open, @@ -643,6 +646,12 @@ if (err) { goto detach; } + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD, + sc, 0, ums_sysctl_handler_parseinfo, + "", "Dump UMS report parsing information"); + return (0); detach: @@ -916,6 +925,67 @@ return (error); } +static int +ums_sysctl_handler_parseinfo(SYSCTL_HANDLER_ARGS) +{ + struct ums_softc *sc = arg1; + struct ums_info *info; + struct sbuf *sb; + int i, j, err; + + sb = sbuf_new_auto(); + for (i = 0; i < UMS_INFO_MAX; i++) { + info = &sc->sc_info[i]; + + /* Don't emit empty info */ + if ((info->sc_flags & + (UMS_FLAG_X_AXIS | UMS_FLAG_Y_AXIS | UMS_FLAG_Z_AXIS | + UMS_FLAG_T_AXIS | UMS_FLAG_W_AXIS)) == 0 && + info->sc_buttons == 0) + continue; + + sbuf_printf(sb, "i%d:", i + 1); + if (info->sc_flags & UMS_FLAG_X_AXIS) + sbuf_printf(sb, " X:r%d, p%d, s%d;", + (int)info->sc_iid_x, + (int)info->sc_loc_x.pos, + (int)info->sc_loc_x.size); + if (info->sc_flags & UMS_FLAG_Y_AXIS) + sbuf_printf(sb, " Y:r%d, p%d, s%d;", + (int)info->sc_iid_y, + (int)info->sc_loc_y.pos, + (int)info->sc_loc_y.size); + if (info->sc_flags & UMS_FLAG_Z_AXIS) + sbuf_printf(sb, " Z:r%d, p%d, s%d;", + (int)info->sc_iid_z, + (int)info->sc_loc_z.pos, + (int)info->sc_loc_z.size); + if (info->sc_flags & UMS_FLAG_T_AXIS) + sbuf_printf(sb, " T:r%d, p%d, s%d;", + (int)info->sc_iid_t, + (int)info->sc_loc_t.pos, + (int)info->sc_loc_t.size); + if (info->sc_flags & UMS_FLAG_W_AXIS) + sbuf_printf(sb, " W:r%d, p%d, s%d;", + (int)info->sc_iid_w, + (int)info->sc_loc_w.pos, + (int)info->sc_loc_w.size); + + for (j = 0; j < info->sc_buttons; j++) { + sbuf_printf(sb, " B%d:r%d, p%d, s%d;", j + 1, + (int)info->sc_iid_btn[j], + (int)info->sc_loc_btn[j].pos, + (int)info->sc_loc_btn[j].size); + } + sbuf_printf(sb, "\n"); + } + sbuf_finish(sb); + err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + sbuf_delete(sb); + + return (err); +} + static devclass_t ums_devclass; static device_method_t ums_methods[] = { ==== //depot/projects/scottl-camlock/src/sys/kern/subr_bus.c#35 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.232 2009/10/15 14:54:35 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.233 2009/10/22 14:53:44 jhb Exp $"); #include "opt_bus.h" @@ -1049,9 +1049,10 @@ * @param driver the driver to register */ static int -devclass_add_driver(devclass_t dc, driver_t *driver, int pass) +devclass_add_driver(devclass_t dc, driver_t *driver, int pass, devclass_t *dcp) { driverlink_t dl; + const char *parentname; PDEBUG(("%s", DRIVERNAME(driver))); @@ -1072,9 +1073,17 @@ kobj_class_compile((kobj_class_t) driver); /* - * Make sure the devclass which the driver is implementing exists. + * If the driver has any base classes, make the + * devclass inherit from the devclass of the driver's + * first base class. This will allow the system to + * search for drivers in both devclasses for children + * of a device using this driver. */ - devclass_find_internal(driver->name, NULL, TRUE); + if (driver->baseclasses) + parentname = driver->baseclasses[0]->name; + else + parentname = NULL; + *dcp = devclass_find_internal(driver->name, parentname, TRUE); dl->driver = driver; TAILQ_INSERT_TAIL(&dc->drivers, dl, link); @@ -4157,27 +4166,8 @@ driver = dmd->dmd_driver; PDEBUG(("Loading module: driver %s on bus %s (pass %d)", DRIVERNAME(driver), dmd->dmd_busname, pass)); - error = devclass_add_driver(bus_devclass, driver, pass); - if (error) - break; - - /* - * If the driver has any base classes, make the - * devclass inherit from the devclass of the driver's - * first base class. This will allow the system to - * search for drivers in both devclasses for children - * of a device using this driver. - */ - if (driver->baseclasses) { - const char *parentname; - parentname = driver->baseclasses[0]->name; - *dmd->dmd_devclass = - devclass_find_internal(driver->name, - parentname, TRUE); - } else { - *dmd->dmd_devclass = - devclass_find_internal(driver->name, NULL, TRUE); - } + error = devclass_add_driver(bus_devclass, driver, pass, + dmd->dmd_devclass); break; case MOD_UNLOAD: ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_hwmp.c#6 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_hwmp.c,v 1.8 2009/10/19 23:11:43 rpaulo Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_hwmp.c,v 1.9 2009/10/22 17:30:22 rpaulo Exp $"); #endif /* @@ -653,6 +653,7 @@ IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, vap->iv_bss, "%s", "send broadcast RANN"); + rann.rann_flags = 0; if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL) rann.rann_flags |= IEEE80211_MESHRANN_FLAGS_PR; rann.rann_hopcount = 0; ==== //depot/projects/scottl-camlock/src/sys/powerpc/aim/mmu_oea64.c#6 (text+ko) ==== @@ -91,7 +91,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/powerpc/aim/mmu_oea64.c,v 1.5 2009/10/21 18:38:02 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/aim/mmu_oea64.c,v 1.6 2009/10/23 03:17:02 nwhitehorn Exp $"); /* * Manages physical address maps. @@ -182,35 +182,28 @@ * Just to add to the fun, exceptions must be off as well * so that we can't trap in 64-bit mode. What a pain. */ +struct mtx tlbie_mutex; static __inline void TLBIE(pmap_t pmap, vm_offset_t va) { + uint64_t vpn; + register_t vpn_hi, vpn_lo; register_t msr; register_t scratch; - uint64_t vpn; - register_t vpn_hi, vpn_lo; - -#if 1 - /* - * CPU documentation says that tlbie takes the VPN, not the - * VA. I think the code below does this correctly. We will see. - */ - vpn = (uint64_t)(va & ADDR_PIDX); if (pmap != NULL) vpn |= (va_to_vsid(pmap,va) << 28); -#else - vpn = va; -#endif vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn; + mtx_lock_spin(&tlbie_mutex); __asm __volatile("\ mfmsr %0; \ clrldi %1,%0,49; \ - insrdi %1,1,1,0; \ + mtmsr %1; \ + insrdi %1,%5,1,0; \ mtmsrd %1; \ ptesync; \ \ @@ -222,7 +215,8 @@ eieio; \ tlbsync; \ ptesync;" - : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32)); + : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1)); + mtx_unlock_spin(&tlbie_mutex); } #define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr & ~PSL_DR); isync() @@ -352,7 +346,7 @@ * PVO calls. */ static int moea64_pvo_enter(pmap_t, uma_zone_t, struct pvo_head *, - vm_offset_t, vm_offset_t, uint64_t, int, int); + vm_offset_t, vm_offset_t, uint64_t, int); static void moea64_pvo_remove(struct pvo_entry *, int); static struct pvo_entry *moea64_pvo_find_va(pmap_t, vm_offset_t, int *); static struct lpte *moea64_pvo_to_pte(const struct pvo_entry *, int); @@ -825,6 +819,11 @@ MTX_RECURSE); /* + * Initialize the TLBIE lock. TLBIE can only be executed by one CPU. + */ + mtx_init(&tlbie_mutex, "tlbie mutex", NULL, MTX_SPIN); + + /* * Initialise the unmanaged pvo pool. */ moea64_bpvo_pool = (struct pvo_entry *)moea64_bootstrap_alloc( @@ -1254,7 +1253,7 @@ pvo_flags |= PVO_FAKE; error = moea64_pvo_enter(pmap, zone, pvo_head, va, VM_PAGE_TO_PHYS(m), - pte_lo, pvo_flags, 0); + pte_lo, pvo_flags); if (pmap == kernel_pmap) TLBIE(pmap, va); @@ -1427,16 +1426,15 @@ if (pvo_allocator_start >= pvo_allocator_end) panic("Ran out of PVO allocator buffer space!"); - /* Now call pvo_enter in recursive mode */ moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, - PVO_WIRED | PVO_BOOTSTRAP, 1); + PVO_WIRED | PVO_BOOTSTRAP); TLBIE(kernel_pmap, va); - + if (needed_lock) PMAP_UNLOCK(kernel_pmap); - + if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) bzero((void *)va, PAGE_SIZE); @@ -1579,7 +1577,7 @@ PMAP_LOCK(kernel_pmap); error = moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, &moea64_pvo_kunmanaged, va, pa, pte_lo, - PVO_WIRED | VM_PROT_EXECUTE, 0); + PVO_WIRED | VM_PROT_EXECUTE); TLBIE(kernel_pmap, va); @@ -1968,14 +1966,29 @@ tlbia(void) { vm_offset_t i; + register_t msr, scratch; - for (i = 0; i < 0xFF000; i += 0x00001000) - TLBIE(NULL,i); + for (i = 0; i < 0xFF000; i += 0x00001000) { + __asm __volatile("\ + mfmsr %0; \ + mr %1, %0; \ + insrdi %1,%3,1,0; \ + mtmsrd %1; \ + ptesync; \ + \ + tlbiel %2; \ + \ + mtmsrd %0; \ + eieio; \ + tlbsync; \ + ptesync;" + : "=r"(msr), "=r"(scratch) : "r"(i), "r"(1)); + } } static int moea64_pvo_enter(pmap_t pm, uma_zone_t zone, struct pvo_head *pvo_head, - vm_offset_t va, vm_offset_t pa, uint64_t pte_lo, int flags, int recurse) + vm_offset_t va, vm_offset_t pa, uint64_t pte_lo, int flags) { struct pvo_entry *pvo; uint64_t vsid; @@ -2011,16 +2024,14 @@ * Remove any existing mapping for this page. Reuse the pvo entry if * there is a mapping. */ - if (!recurse) - LOCK_TABLE(); + LOCK_TABLE(); LIST_FOREACH(pvo, &moea64_pvo_table[ptegidx], pvo_olink) { if (pvo->pvo_pmap == pm && PVO_VADDR(pvo) == va) { if ((pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) == pa && (pvo->pvo_pte.lpte.pte_lo & LPTE_PP) == (pte_lo & LPTE_PP)) { - if (!recurse) - UNLOCK_TABLE(); + UNLOCK_TABLE(); return (0); } moea64_pvo_remove(pvo, -1); @@ -2041,12 +2052,19 @@ moea64_bpvo_pool_index++; bootstrap = 1; } else { + /* + * Note: drop the table around the UMA allocation in + * case the UMA allocator needs to manipulate the page + * table. The mapping we are working with is already + * protected by the PMAP lock. + */ + UNLOCK_TABLE(); pvo = uma_zalloc(zone, M_NOWAIT); + LOCK_TABLE(); } if (pvo == NULL) { - if (!recurse) - UNLOCK_TABLE(); + UNLOCK_TABLE(); return (ENOMEM); } @@ -2093,8 +2111,7 @@ moea64_pte_overflow++; } - if (!recurse) - UNLOCK_TABLE(); + UNLOCK_TABLE(); return (first ? ENOENT : 0); } ==== //depot/projects/scottl-camlock/src/sys/powerpc/aim/mp_cpudep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/powerpc/aim/mp_cpudep.c,v 1.6 2009/05/14 00:34:26 nwhitehorn Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/aim/mp_cpudep.c,v 1.7 2009/10/23 03:17:02 nwhitehorn Exp $"); #include #include @@ -48,14 +48,34 @@ #include #include -extern void *rstcode; -extern register_t l2cr_config; -extern register_t l3cr_config; +void *ap_pcpu; + +static register_t bsp_state[8]; + +static void cpudep_save_config(void *dummy); +SYSINIT(cpu_save_config, SI_SUB_CPU, SI_ORDER_ANY, cpudep_save_config, NULL); + +uintptr_t +cpudep_ap_bootstrap(void) +{ + register_t msr, sp; + + msr = PSL_KERNSET & ~PSL_EE; + mtmsr(msr); + isync(); + + __asm __volatile("mtsprg 0, %0" :: "r"(ap_pcpu)); + powerpc_sync(); + + pcpup->pc_curthread = pcpup->pc_idlethread; + pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb; + sp = pcpup->pc_curpcb->pcb_sp; -void *ap_pcpu; + return (sp); +} static register_t -l2_enable(void) +mpc745x_l2_enable(register_t l2cr_config) { register_t ccr; @@ -77,7 +97,7 @@ } static register_t -l3_enable(void) +mpc745x_l3_enable(register_t l3cr_config) { register_t ccr; @@ -109,7 +129,7 @@ } static register_t -l1d_enable(void) +mpc745x_l1d_enable(void) { register_t hid; @@ -127,7 +147,7 @@ } static register_t -l1i_enable(void) +mpc745x_l1i_enable(void) { register_t hid; @@ -144,43 +164,110 @@ return (hid); } -uint32_t -cpudep_ap_bootstrap(void) +static void +cpudep_save_config(void *dummy) { - uint32_t hid, msr, reg, sp; + uint16_t vers; + + vers = mfpvr() >> 16; + + switch(vers) { + case IBM970: + case IBM970FX: + case IBM970MP: + __asm __volatile ("mfspr %0,%2; mr %1,%0; srdi %0,%0,32" + : "=r" (bsp_state[0]),"=r" (bsp_state[1]) : "K" (SPR_HID0)); + __asm __volatile ("mfspr %0,%2; mr %1,%0; srdi %0,%0,32" + : "=r" (bsp_state[2]),"=r" (bsp_state[3]) : "K" (SPR_HID1)); + __asm __volatile ("mfspr %0,%2; mr %1,%0; srdi %0,%0,32" + : "=r" (bsp_state[4]),"=r" (bsp_state[5]) : "K" (SPR_HID4)); + __asm __volatile ("mfspr %0,%2; mr %1,%0; srdi %0,%0,32" + : "=r" (bsp_state[6]),"=r" (bsp_state[7]) : "K" (SPR_HID5)); + + break; + case MPC7450: + case MPC7455: + case MPC7457: + /* Only MPC745x CPUs have an L3 cache. */ + bsp_state[3] = mfspr(SPR_L3CR); + + /* Fallthrough */ + case MPC7400: + case MPC7410: + case MPC7447A: >>> TRUNCATED FOR MAIL (1000 lines) <<<