PERFORCE change 37630 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri Sep 5 16:38:04 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=37630
Change 37630 by marcel at marcel_nfs on 2003/09/05 16:37:29
IFC @37627
Affected files ...
.. //depot/projects/uart/amd64/conf/GENERIC#2 integrate
.. //depot/projects/uart/amd64/include/ucontext.h#2 integrate
.. //depot/projects/uart/boot/i386/pxeldr/Makefile#2 integrate
.. //depot/projects/uart/boot/i386/pxeldr/pxeldr.s#2 integrate
.. //depot/projects/uart/cam/scsi/scsi_cd.c#3 integrate
.. //depot/projects/uart/cam/scsi/scsi_da.c#8 integrate
.. //depot/projects/uart/cam/scsi/scsi_target.c#2 integrate
.. //depot/projects/uart/dev/acpica/acpi.c#8 integrate
.. //depot/projects/uart/dev/adlink/adlink.c#4 integrate
.. //depot/projects/uart/dev/ata/atapi-cd.c#5 integrate
.. //depot/projects/uart/dev/ata/atapi-cd.h#3 integrate
.. //depot/projects/uart/dev/ath/if_ath.c#9 integrate
.. //depot/projects/uart/dev/ath/if_athioctl.h#3 integrate
.. //depot/projects/uart/dev/ath/if_athvar.h#5 integrate
.. //depot/projects/uart/dev/awi/awi_wep.c#3 integrate
.. //depot/projects/uart/dev/fxp/if_fxp.c#11 integrate
.. //depot/projects/uart/dev/fxp/if_fxpvar.h#2 integrate
.. //depot/projects/uart/dev/pccard/pccard.c#5 integrate
.. //depot/projects/uart/dev/pci/pci.c#9 integrate
.. //depot/projects/uart/dev/pci/pcireg.h#5 integrate
.. //depot/projects/uart/dev/sound/pci/ich.c#8 integrate
.. //depot/projects/uart/dev/usb/ohci_pci.c#4 integrate
.. //depot/projects/uart/dev/wi/if_wi.c#8 integrate
.. //depot/projects/uart/dev/wi/if_wi_pccard.c#9 integrate
.. //depot/projects/uart/dev/wi/if_wi_pci.c#6 integrate
.. //depot/projects/uart/dev/wi/if_wireg.h#2 integrate
.. //depot/projects/uart/dev/wi/if_wivar.h#3 integrate
.. //depot/projects/uart/geom/geom_dev.c#6 integrate
.. //depot/projects/uart/i386/i386/elan-mmcr.c#3 integrate
.. //depot/projects/uart/i386/isa/isa.h#2 integrate
.. //depot/projects/uart/i386/isa/isa_compat.c#2 integrate
.. //depot/projects/uart/i386/isa/isa_device.h#2 integrate
.. //depot/projects/uart/ia64/ia64/exception.S#5 integrate
.. //depot/projects/uart/ia64/ia64/genassym.c#3 integrate
.. //depot/projects/uart/ia64/ia64/interrupt.c#5 integrate
.. //depot/projects/uart/ia64/include/md_var.h#3 integrate
.. //depot/projects/uart/isa/fd.c#3 integrate
.. //depot/projects/uart/isa/isareg.h#2 integrate
.. //depot/projects/uart/kern/kern_tc.c#7 integrate
.. //depot/projects/uart/kern/subr_bus.c#2 integrate
.. //depot/projects/uart/kern/subr_msgbuf.c#2 integrate
.. //depot/projects/uart/kern/subr_taskqueue.c#2 integrate
.. //depot/projects/uart/kern/subr_trap.c#4 integrate
.. //depot/projects/uart/net/bpf.c#4 integrate
.. //depot/projects/uart/net/if_vlan.c#4 integrate
.. //depot/projects/uart/net80211/ieee80211_radiotap.h#1 branch
.. //depot/projects/uart/netinet/ip_divert.c#2 integrate
.. //depot/projects/uart/netinet/ip_input.c#3 integrate
.. //depot/projects/uart/netinet/udp_usrreq.c#4 integrate
.. //depot/projects/uart/nfsclient/bootp_subr.c#4 integrate
.. //depot/projects/uart/nfsclient/nfs_vnops.c#4 integrate
.. //depot/projects/uart/pci/if_rl.c#12 integrate
.. //depot/projects/uart/pci/if_rlreg.h#5 integrate
.. //depot/projects/uart/pci/if_sis.c#8 integrate
.. //depot/projects/uart/pci/if_sisreg.h#3 integrate
.. //depot/projects/uart/sparc64/pci/psycho.c#5 integrate
.. //depot/projects/uart/sparc64/pci/psychoreg.h#2 integrate
.. //depot/projects/uart/sys/interrupt.h#2 integrate
.. //depot/projects/uart/sys/ioctl_bt848.h#1 branch
.. //depot/projects/uart/sys/ioctl_meteor.h#1 branch
.. //depot/projects/uart/sys/taskqueue.h#2 integrate
.. //depot/projects/uart/ufs/ffs/ffs_softdep.c#4 integrate
Differences ...
==== //depot/projects/uart/amd64/conf/GENERIC#2 (text+ko) ====
@@ -16,7 +16,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.390 2003/06/27 23:11:22 peter Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.391 2003/09/03 01:24:47 obrien Exp $
machine amd64
cpu HAMMER
@@ -76,6 +76,7 @@
# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
+device ataraid # ATA RAID drives
device atapicd # ATAPI CDROM drives
device atapifd # ATAPI floppy drives
device atapist # ATAPI tape drives
==== //depot/projects/uart/amd64/include/ucontext.h#2 (text+ko) ====
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.13 2003/05/12 18:33:19 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.14 2003/09/05 20:47:27 peter Exp $
*/
#ifndef _MACHINE_UCONTEXT_H_
@@ -70,11 +70,11 @@
#define _MC_FPOWNED_FPU 0x20001 /* FP state came from FPU */
#define _MC_FPOWNED_PCB 0x20002 /* FP state came from PCB */
long mc_ownedfp;
- long mc_spare1[1]; /* align next field to 16 bytes */
+ long mc_spare1[1]; /* align mc_fpstate to 16 bytes */
/*
* See <machine/npx.h> for the internals of mc_fpstate[].
*/
- long mc_fpstate[128] __aligned(16);
+ long mc_fpstate[64] __aligned(16);
long mc_spare2[8];
} mcontext_t;
==== //depot/projects/uart/boot/i386/pxeldr/Makefile#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/pxeldr/Makefile,v 1.8 2002/09/17 01:48:56 peter Exp $
+# $FreeBSD: src/sys/boot/i386/pxeldr/Makefile,v 1.9 2003/09/03 08:12:20 phk Exp $
MAINTAINER=jhb at FreeBSD.org
@@ -17,6 +17,11 @@
M4FLAGS+= -DPROBE_KEYBOARD
.endif
+.if defined(BOOT_PXELDR_ALWAYS_SERIAL)
+M4FLAGS+= -DALWAYS_SERIAL
+.endif
+
+
.if exists(${.OBJDIR}/../loader)
LOADERBIN= ${.OBJDIR}/../loader/loader.bin
.else
==== //depot/projects/uart/boot/i386/pxeldr/pxeldr.s#2 (text+ko) ====
@@ -13,7 +13,7 @@
# purpose.
#
-# $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.s,v 1.8 2001/08/09 20:47:58 mp Exp $
+# $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.s,v 1.9 2003/09/03 08:12:20 phk Exp $
#
# This simple program is a preloader for the normal boot3 loader. It is simply
@@ -110,6 +110,11 @@
orb $KARGS_FLAGS_PXE, 0x8(%bx) # kargs->bootflags |=
# KARGS_FLAGS_PXE
popl 0xc(%bx) # kargs->pxeinfo = *PXENV+
+ifdef(`ALWAYS_SERIAL',`
+#
+# set the RBX_SERIAL bit in the howto byte.
+ orl $RB_SERIAL, (%bx) # enable serial console
+')
ifdef(`PROBE_KEYBOARD',`
#
# Look at the BIOS data area to see if we have an enhanced keyboard. If not,
==== //depot/projects/uart/cam/scsi/scsi_cd.c#3 (text+ko) ====
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.80 2003/07/28 06:15:58 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.82 2003/09/05 10:40:15 phk Exp $");
#include "opt_cd.h"
@@ -62,6 +62,7 @@
#include <sys/dvdio.h>
#include <sys/devicestat.h>
#include <sys/sysctl.h>
+#include <sys/taskqueue.h>
#include <cam/cam.h>
#include <cam/cam_ccb.h>
@@ -151,9 +152,12 @@
int bufs_left;
struct cam_periph *periph;
dev_t dev;
+#ifndef BURN_BRIDGES
eventhandler_tag clonetag;
+#endif
int minimum_command_size;
int outstanding_cmds;
+ struct task sysctl_task;
struct sysctl_ctx_list sysctl_ctx;
struct sysctl_oid *sysctl_tree;
STAILQ_HEAD(, cd_mode_params) mode_queue;
@@ -339,6 +343,7 @@
static STAILQ_HEAD(changerlist, cdchanger) changerq;
+#ifndef BURN_BRIDGES
static void
cdclone(void *arg, char *name, int namelen, dev_t *dev)
{
@@ -358,6 +363,7 @@
*dev = softc->dev;
return;
}
+#endif
static void
cdinit(void)
@@ -529,7 +535,9 @@
}
devstat_remove_entry(softc->device_stats);
destroy_dev(softc->dev);
+#ifndef BURN_BRIDGES
EVENTHANDLER_DEREGISTER(dev_clone, softc->clonetag);
+#endif
free(softc, M_DEVBUF);
splx(s);
}
@@ -598,6 +606,43 @@
}
}
+static void
+cdsysctlinit(void *context, int pending)
+{
+ struct cam_periph *periph;
+ struct cd_softc *softc;
+ char tmpstr[80], tmpstr2[80];
+
+ periph = (struct cam_periph *)context;
+ softc = (struct cd_softc *)periph->softc;
+
+ snprintf(tmpstr, sizeof(tmpstr), "CAM CD unit %d", periph->unit_number);
+ snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number);
+
+ mtx_lock(&Giant);
+
+ sysctl_ctx_init(&softc->sysctl_ctx);
+ softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
+ SYSCTL_STATIC_CHILDREN(_kern_cam_cd), OID_AUTO,
+ tmpstr2, CTLFLAG_RD, 0, tmpstr);
+
+ if (softc->sysctl_tree == NULL) {
+ printf("cdsysctlinit: unable to allocate sysctl tree\n");
+ return;
+ }
+
+ /*
+ * Now register the sysctl handler, so the user can the value on
+ * the fly.
+ */
+ SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),
+ OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW,
+ &softc->minimum_command_size, 0, cdcmdsizesysctl, "I",
+ "Minimum CDB size");
+
+ mtx_unlock(&Giant);
+}
+
/*
* We have a handler function for this so we can check the values when the
* user sets them, instead of every time we look at them.
@@ -642,7 +687,7 @@
struct ccb_setasync csa;
struct ccb_pathinq cpi;
struct ccb_getdev *cgd;
- char tmpstr[80], tmpstr2[80];
+ char tmpstr[80];
caddr_t match;
cgd = (struct ccb_getdev *)arg;
@@ -696,17 +741,7 @@
if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE))
softc->quirks |= CD_Q_10_BYTE_ONLY;
- snprintf(tmpstr, sizeof(tmpstr), "CAM CD unit %d", periph->unit_number);
- snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number);
- sysctl_ctx_init(&softc->sysctl_ctx);
- softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
- SYSCTL_STATIC_CHILDREN(_kern_cam_cd), OID_AUTO,
- tmpstr2, CTLFLAG_RD, 0, tmpstr);
- if (softc->sysctl_tree == NULL) {
- printf("cdregister: unable to allocate sysctl tree\n");
- free(softc, M_DEVBUF);
- return (CAM_REQ_CMP_ERR);
- }
+ TASK_INIT(&softc->sysctl_task, 0, cdsysctlinit, periph);
/* The default is 6 byte commands, unless quirked otherwise */
if (softc->quirks & CD_Q_10_BYTE_ONLY)
@@ -728,15 +763,6 @@
softc->minimum_command_size = 10;
/*
- * Now register the sysctl handler, so the user can the value on
- * the fly.
- */
- SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),
- OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW,
- &softc->minimum_command_size, 0, cdcmdsizesysctl, "I",
- "Minimum CDB size");
-
- /*
* We need to register the statistics structure for this device,
* but we don't have the blocksize yet for it. So, we register
* the structure and indicate that we don't have the blocksize
@@ -756,8 +782,10 @@
softc->dev = make_dev(&cd_cdevsw, periph->unit_number,
UID_ROOT, GID_OPERATOR, 0640, "cd%d", periph->unit_number);
softc->dev->si_drv1 = periph;
+#ifndef BURN_BRIDGES
softc->clonetag =
EVENTHANDLER_REGISTER(dev_clone, cdclone, softc, 1000);
+#endif
/*
* Add an async callback so that we get
@@ -1847,6 +1875,11 @@
xpt_announce_periph(periph, announce_buf);
if (softc->flags & CD_FLAG_CHANGER)
cdchangerschedule(softc);
+ /*
+ * Create our sysctl variables, now that we know
+ * we have successfully attached.
+ */
+ taskqueue_enqueue(taskqueue_thread,&softc->sysctl_task);
}
softc->state = CD_STATE_NORMAL;
/*
==== //depot/projects/uart/cam/scsi/scsi_da.c#8 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.156 2003/08/25 18:48:45 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.159 2003/09/04 01:01:20 njl Exp $");
#ifdef _KERNEL
#include "opt_da.h"
@@ -41,6 +41,7 @@
#include <sys/kernel.h>
#include <sys/bio.h>
#include <sys/sysctl.h>
+#include <sys/taskqueue.h>
#endif /* _KERNEL */
#include <sys/devicestat.h>
@@ -133,6 +134,7 @@
struct disk_params params;
struct disk disk;
union ccb saved_ccb;
+ struct task sysctl_task;
struct sysctl_ctx_list sysctl_ctx;
struct sysctl_oid *sysctl_tree;
};
@@ -325,14 +327,6 @@
{T_DIRECT, SIP_MEDIA_REMOVABLE, "NO BRAND", "PEN DRIVE", "*"},
/*quirks*/ DA_Q_NO_SYNC_CACHE
},
- {
- /*
- * FujiFilm Camera
- */
- {T_DIRECT, SIP_MEDIA_REMOVABLE, "FUJIFILMUSB-DRIVEUNIT",
- "USB-DRIVEUNIT", "*"},
- /*quirks*/ DA_Q_NO_SYNC_CACHE
- },
{
/*
* Minolta Dimage E203
@@ -388,6 +382,7 @@
static periph_init_t dainit;
static void daasync(void *callback_arg, u_int32_t code,
struct cam_path *path, void *arg);
+static void dasysctlinit(void *context, int pending);
static int dacmdsizesysctl(SYSCTL_HANDLER_ARGS);
static periph_ctor_t daregister;
static periph_dtor_t dacleanup;
@@ -915,6 +910,41 @@
}
}
+static void
+dasysctlinit(void *context, int pending)
+{
+ struct cam_periph *periph;
+ struct da_softc *softc;
+ char tmpstr[80], tmpstr2[80];
+
+ periph = (struct cam_periph *)context;
+ softc = (struct da_softc *)periph->softc;
+
+ snprintf(tmpstr, sizeof(tmpstr), "CAM DA unit %d", periph->unit_number);
+ snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number);
+
+ mtx_lock(&Giant);
+ sysctl_ctx_init(&softc->sysctl_ctx);
+ softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
+ SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2,
+ CTLFLAG_RD, 0, tmpstr);
+ if (softc->sysctl_tree == NULL) {
+ printf("dasysctlinit: unable to allocate sysctl tree\n");
+ return;
+ }
+
+ /*
+ * Now register the sysctl handler, so the user can the value on
+ * the fly.
+ */
+ SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),
+ OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW,
+ &softc->minimum_cmd_size, 0, dacmdsizesysctl, "I",
+ "Minimum CDB size");
+
+ mtx_unlock(&Giant);
+}
+
static int
dacmdsizesysctl(SYSCTL_HANDLER_ARGS)
{
@@ -955,7 +985,7 @@
struct ccb_setasync csa;
struct ccb_pathinq cpi;
struct ccb_getdev *cgd;
- char tmpstr[80], tmpstr2[80];
+ char tmpstr[80];
caddr_t match;
cgd = (struct ccb_getdev *)arg;
@@ -1008,17 +1038,7 @@
if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE))
softc->quirks |= DA_Q_NO_6_BYTE;
- snprintf(tmpstr, sizeof(tmpstr), "CAM DA unit %d", periph->unit_number);
- snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number);
- sysctl_ctx_init(&softc->sysctl_ctx);
- softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
- SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2,
- CTLFLAG_RD, 0, tmpstr);
- if (softc->sysctl_tree == NULL) {
- printf("daregister: unable to allocate sysctl tree\n");
- free(softc, M_DEVBUF);
- return (CAM_REQ_CMP_ERR);
- }
+ TASK_INIT(&softc->sysctl_task, 0, dasysctlinit, periph);
/*
* RBC devices don't have to support READ(6), only READ(10).
@@ -1050,15 +1070,6 @@
softc->minimum_cmd_size = 16;
/*
- * Now register the sysctl handler, so the user can the value on
- * the fly.
- */
- SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),
- OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW,
- &softc->minimum_cmd_size, 0, dacmdsizesysctl, "I",
- "Minimum CDB size");
-
- /*
* Block our timeout handler while we
* add this softc to the dev list.
*/
@@ -1539,8 +1550,14 @@
}
}
free(csio->data_ptr, M_TEMP);
- if (announce_buf[0] != '\0')
+ if (announce_buf[0] != '\0') {
xpt_announce_periph(periph, announce_buf);
+ /*
+ * Create our sysctl variables, now that we know
+ * we have successfully attached.
+ */
+ taskqueue_enqueue(taskqueue_thread,&softc->sysctl_task);
+ }
softc->state = DA_STATE_NORMAL;
/*
* Since our peripheral may be invalidated by an error
==== //depot/projects/uart/cam/scsi/scsi_target.c#2 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.54 2003/06/10 18:14:05 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.56 2003/09/04 16:30:03 njl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -809,6 +809,7 @@
/* If we're no longer enabled, throw away CCB */
if ((softc->state & TARG_STATE_LUN_ENABLED) == 0) {
targfreeccb(softc, done_ccb);
+ TARG_UNLOCK(softc);
return;
}
/* abort_all_pending() waits for pending queue to be empty */
@@ -822,6 +823,7 @@
case XPT_CONT_TARGET_IO:
TAILQ_INSERT_TAIL(&softc->user_ccb_queue, &done_ccb->ccb_h,
periph_links.tqe);
+ TARG_UNLOCK(softc);
notify_user(softc);
break;
default:
@@ -829,7 +831,6 @@
done_ccb->ccb_h.func_code);
/* NOTREACHED */
}
- TARG_UNLOCK(softc);
}
/* Return CCBs to the user from the user queue and abort queue */
@@ -1095,8 +1096,19 @@
/* If we aborted anything from the work queue, wakeup user. */
if (!TAILQ_EMPTY(&softc->user_ccb_queue)
- || !TAILQ_EMPTY(&softc->abort_queue))
+ || !TAILQ_EMPTY(&softc->abort_queue)) {
+ /*
+ * XXX KNOTE calls back into targreadfilt, causing a
+ * lock recursion. So unlock around calls to it although
+ * this may open up a race allowing a user to submit
+ * another CCB after we have aborted all pending ones
+ * A better approach is to mark the softc as dying
+ * under lock and check for this in targstart().
+ */
+ TARG_UNLOCK(softc);
notify_user(softc);
+ TARG_LOCK(softc);
+ }
}
/* Notify the user that data is ready */
==== //depot/projects/uart/dev/acpica/acpi.c#8 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.97 2003/08/29 04:02:19 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.98 2003/09/04 15:55:41 njl Exp $
*/
#include "opt_acpi.h"
@@ -1232,8 +1232,8 @@
status = AcpiEvaluateObject(handle, path, NULL, &buf);
if (ACPI_SUCCESS(status))
status = acpi_ConvertBufferToInteger(&buf, number);
+ AcpiOsFree(buf.Pointer);
}
- AcpiOsFree(buf.Pointer);
}
return (status);
}
==== //depot/projects/uart/dev/adlink/adlink.c#4 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.4 2003/08/24 17:48:01 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.5 2003/09/05 11:05:41 phk Exp $");
#ifdef _KERNEL
#include <sys/param.h>
@@ -274,7 +274,7 @@
/* Sample CH0 only */
bus_space_write_4(sc->t1, sc->h1, 0x00, 1);
- /* Divide clock by ten */
+ /* Divide clock by four */
bus_space_write_4(sc->t1, sc->h1, 0x04, 4);
/* Software trigger mode: software */
==== //depot/projects/uart/dev/ata/atapi-cd.c#5 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.141 2003/09/02 15:53:01 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.142 2003/09/05 10:40:16 phk Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -242,7 +242,9 @@
free(entry, M_ACD);
}
destroy_dev(cdp->dev);
+#ifndef BURN_BRIDGES
EVENTHANDLER_DEREGISTER(dev_clone, cdp->clone_evh);
+#endif
devstat_remove_entry(cdp->stats);
ata_prtdev(atadev, "WARNING - removed from configuration\n");
ata_free_name(atadev);
@@ -273,6 +275,7 @@
return cdp;
}
+#ifndef BURN_BRIDGES
static void
acd_clone(void *arg, char *name, int namelen, dev_t *dev)
{
@@ -289,6 +292,7 @@
if (unit == cdp->lun)
*dev = makedev(acd_cdevsw.d_maj, cdp->lun);
}
+#endif
static void
acd_make_dev(struct acd_softc *cdp)
@@ -300,7 +304,9 @@
dev->si_drv1 = cdp;
cdp->dev = dev;
cdp->device->flags |= ATA_D_MEDIA_CHANGED;
+#ifndef BURN_BRIDGES
cdp->clone_evh = EVENTHANDLER_REGISTER(dev_clone, acd_clone, cdp, 1000);
+#endif
acd_set_ioparm(cdp);
}
==== //depot/projects/uart/dev/ata/atapi-cd.h#3 (text+ko) ====
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/ata/atapi-cd.h,v 1.36 2003/08/24 09:22:26 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/atapi-cd.h,v 1.37 2003/09/05 11:08:55 phk Exp $
*/
/* CDROM Table Of Contents */
@@ -322,5 +322,7 @@
int block_size; /* blocksize currently used */
struct devstat *stats; /* devstat entry */
dev_t dev; /* device place holders */
+#ifndef BURN_BRIDGES
eventhandler_tag clone_evh;
+#endif
};
==== //depot/projects/uart/dev/ath/if_ath.c#9 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.13 2003/09/01 03:12:19 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.14 2003/09/05 22:22:49 sam Exp $");
/*
* Driver for the Atheros Wireless LAN controller.
@@ -298,6 +298,21 @@
/* complete initialization */
ieee80211_media_init(ifp, ath_media_change, ieee80211_media_status);
+ bpfattach2(ifp, DLT_IEEE802_11_RADIO,
+ sizeof(struct ieee80211_frame) + sizeof(sc->sc_tx_th),
+ &sc->sc_drvbpf);
+ /*
+ * Initialize constant fields.
+ *
+ * NB: the channel is setup each time we transition to the
+ * RUN state to avoid filling it in for each frame.
+ */
+ sc->sc_tx_th.wt_ihdr.it_len = sizeof(sc->sc_tx_th);
+ sc->sc_tx_th.wt_ihdr.it_present = ATH_TX_RADIOTAP_PRESENT;
+
+ sc->sc_rx_th.wr_ihdr.it_len = sizeof(sc->sc_rx_th);
+ sc->sc_rx_th.wr_ihdr.it_present = ATH_RX_RADIOTAP_PRESENT;
+
if_printf(ifp, "802.11 address: %s\n", ether_sprintf(ic->ic_myaddr));
return 0;
@@ -317,6 +332,7 @@
mtx_lock(&sc->sc_mtx);
ath_stop(ifp);
+ bpfdetach(ifp);
ath_desc_free(sc);
ath_hal_detach(sc->sc_ah);
ieee80211_ifdetach(ifp);
@@ -732,6 +748,23 @@
if (ic->ic_rawbpf)
bpf_mtap(ic->ic_rawbpf, m);
+ if (sc->sc_drvbpf) {
+ struct mbuf *mb;
+
+ MGETHDR(mb, M_DONTWAIT, m->m_type);
+ if (mb != NULL) {
+ sc->sc_tx_th.wt_rate =
+ ni->ni_rates.rs_rates[ni->ni_txrate];
+
+ mb->m_next = m;
+ mb->m_data = (caddr_t)&sc->sc_tx_th;
+ mb->m_len = sizeof(sc->sc_tx_th);
+ mb->m_pkthdr.len += mb->m_len;
+ bpf_mtap(sc->sc_drvbpf, mb);
+ m_free(mb);
+ }
+ }
+
/*
* TODO:
* The duration field of 802.11 header should be filled.
@@ -739,12 +772,6 @@
* doesn't know the detail of parameters such as IFS
* for now..
*/
-
- if (IFF_DUMPPKTS(ifp))
- ieee80211_dump_pkt(mtod(m, u_int8_t *), m->m_len,
- ni->ni_rates.rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL,
- -1);
-
if (ath_tx_start(sc, ni, bf, m)) {
bad:
mtx_lock(&sc->sc_txbuflock);
@@ -1526,11 +1553,29 @@
bf->bf_m = NULL;
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = m->m_len = len;
- if (IFF_DUMPPKTS(ifp)) {
- ieee80211_dump_pkt(mtod(m, u_int8_t *), len,
- sc->sc_hwmap[ds->ds_rxstat.rs_rate] &
- IEEE80211_RATE_VAL,
- ds->ds_rxstat.rs_rssi);
+
+ if (sc->sc_drvbpf) {
+ struct mbuf *mb;
+
+ /* XXX pre-allocate space when setting up recv's */
+ MGETHDR(mb, M_DONTWAIT, m->m_type);
+ if (mb != NULL) {
+ sc->sc_rx_th.wr_rate =
+ sc->sc_hwmap[ds->ds_rxstat.rs_rate];
+ sc->sc_rx_th.wr_antsignal =
+ ds->ds_rxstat.rs_rssi;
+ sc->sc_rx_th.wr_antenna =
+ ds->ds_rxstat.rs_antenna;
+ /* XXX TSF */
+
+ (void) m_dup_pkthdr(mb, m, M_DONTWAIT);
+ mb->m_next = m;
+ mb->m_data = (caddr_t)&sc->sc_rx_th;
+ mb->m_len = sizeof(sc->sc_rx_th);
+ mb->m_pkthdr.len += mb->m_len;
+ bpf_mtap(sc->sc_drvbpf, mb);
+ m_free(mb);
+ }
}
m_adj(m, -IEEE80211_CRC_LEN);
@@ -2128,6 +2173,14 @@
}
/*
+ * Update BPF state.
+ */
+ sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
+ htole16(chan->ic_freq);
+ sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
+ htole16(chan->ic_flags);
+
+ /*
* Change channels and update the h/w rate map
* if we're switching; e.g. 11a to 11b/g.
*/
==== //depot/projects/uart/dev/ath/if_athioctl.h#3 (text+ko) ====
@@ -33,7 +33,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*
- * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.2 2003/08/19 21:35:08 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.3 2003/09/05 22:22:49 sam Exp $
*/
/*
@@ -91,4 +91,39 @@
#define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)
+/*
+ * Radio capture format.
+ */
+#define ATH_RX_RADIOTAP_PRESENT ( \
+ (1 << IEEE80211_RADIOTAP_FLAGS) | \
+ (1 << IEEE80211_RADIOTAP_RATE) | \
+ (1 << IEEE80211_RADIOTAP_CHANNEL) | \
+ (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) | \
+ (1 << IEEE80211_RADIOTAP_ANTENNA) | \
+ 0)
+
+struct ath_rx_radiotap_header {
+ struct ieee80211_radiotap_header wr_ihdr;
+ u_int8_t wr_flags; /* XXX for padding */
+ u_int8_t wr_rate;
+ u_int16_t wr_chan_freq;
+ u_int16_t wr_chan_flags;
+ u_int8_t wr_antsignal;
+ u_int8_t wr_antenna;
+};
+
+#define ATH_TX_RADIOTAP_PRESENT ( \
+ (1 << IEEE80211_RADIOTAP_FLAGS) | \
+ (1 << IEEE80211_RADIOTAP_RATE) | \
+ (1 << IEEE80211_RADIOTAP_CHANNEL) | \
+ 0)
+
+struct ath_tx_radiotap_header {
+ struct ieee80211_radiotap_header wt_ihdr;
+ u_int8_t wt_flags; /* XXX for padding */
+ u_int8_t wt_rate;
+ u_int16_t wt_chan_freq;
+ u_int16_t wt_chan_flags;
+};
+
#endif /* _DEV_ATH_ATHIOCTL_H */
==== //depot/projects/uart/dev/ath/if_athvar.h#5 (text+ko) ====
@@ -33,7 +33,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*
- * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.5 2003/08/19 22:17:04 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.6 2003/09/05 22:22:49 sam Exp $
*/
/*
@@ -45,6 +45,7 @@
#include <sys/taskqueue.h>
#include <contrib/dev/ath/ah.h>
+#include <net80211/ieee80211_radiotap.h>
#include <dev/ath/if_athioctl.h>
#define ATH_TIMEOUT 1000
@@ -100,6 +101,16 @@
u_int8_t sc_hwmap[32]; /* h/w rate ix to IEEE table */
HAL_INT sc_imask; /* interrupt mask copy */
+ struct bpf_if *sc_drvbpf;
+ union {
+ struct ath_tx_radiotap_header th;
+ u_int8_t pad[64];
+ } u_tx_rt;
+ union {
+ struct ath_rx_radiotap_header th;
+ u_int8_t pad[64];
+ } u_rx_rt;
+
struct ath_desc *sc_desc; /* TX/RX descriptors */
bus_dma_segment_t sc_dseg;
bus_dmamap_t sc_ddmamap; /* DMA map for descriptors */
@@ -132,6 +143,8 @@
struct callout sc_scan_ch; /* callout handle for scan */
struct ath_stats sc_stats; /* interface statistics */
};
+#define sc_tx_th u_tx_rt.th
+#define sc_rx_th u_rx_rt.th
int ath_attach(u_int16_t, struct ath_softc *);
int ath_detach(struct ath_softc *);
==== //depot/projects/uart/dev/awi/awi_wep.c#3 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/awi/awi_wep.c,v 1.14 2003/08/24 17:48:06 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/awi/awi_wep.c,v 1.15 2003/09/05 11:09:26 phk Exp $");
/*
* WEP support framework for the awi driver.
@@ -240,7 +240,7 @@
int ctxlen;
awi_crc_init(); /* XXX: not belongs here */
- if (algo < 0 || algo > sizeof(awi_wep_algo)/sizeof(awi_wep_algo[0]))
+ if (algo < 0 || algo >= sizeof(awi_wep_algo)/sizeof(awi_wep_algo[0]))
return EINVAL;
awa = &awi_wep_algo[algo];
if (awa->awa_name == NULL)
==== //depot/projects/uart/dev/fxp/if_fxp.c#11 (text+ko) ====
@@ -28,14 +28,14 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.193 2003/09/02 17:30:35 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.194 2003/09/05 22:37:31 sam Exp $");
/*
* Intel EtherExpress Pro/100B PCI Fast Ethernet driver
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.193 2003/09/02 17:30:35 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.194 2003/09/05 22:37:31 sam Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -412,7 +412,7 @@
int s, ipcbxmit_disable;
sc->dev = dev;
- callout_handle_init(&sc->stat_ch);
+ callout_init(&sc->stat_ch, CALLOUT_MPSAFE);
sysctl_ctx_init(&sc->sysctl_ctx);
mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
MTX_DEF);
@@ -1883,7 +1883,7 @@
/*
* Schedule another timeout one second from now.
*/
- sc->stat_ch = timeout(fxp_tick, sc, hz);
+ callout_reset(&sc->stat_ch, hz, fxp_tick, sc);
FXP_UNLOCK(sc);
splx(s);
}
@@ -1908,7 +1908,7 @@
/*
* Cancel stats updater.
*/
- untimeout(fxp_tick, sc, sc->stat_ch);
+ callout_stop(&sc->stat_ch);
/*
* Issue software reset, which also unloads the microcode.
@@ -2239,7 +2239,7 @@
/*
* Start stats updater.
*/
- sc->stat_ch = timeout(fxp_tick, sc, hz);
+ callout_reset(&sc->stat_ch, hz, fxp_tick, sc);
splx(s);
}
==== //depot/projects/uart/dev/fxp/if_fxpvar.h#2 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/fxp/if_fxpvar.h,v 1.27 2003/04/30 01:54:38 imp Exp $
+ * $FreeBSD: src/sys/dev/fxp/if_fxpvar.h,v 1.28 2003/09/05 22:37:31 sam Exp $
*/
/*
@@ -174,7 +174,7 @@
struct fxp_stats *fxp_stats; /* Pointer to interface stats */
u_int32_t stats_addr; /* DMA address of the stats structure */
int rx_idle_secs; /* # of seconds RX has been idle */
- struct callout_handle stat_ch; /* Handle for canceling our stat timeout */
+ struct callout stat_ch; /* stat callout */
struct fxp_cb_mcs *mcsp; /* Pointer to mcast setup descriptor */
u_int32_t mcs_addr; /* DMA address of the multicast cmd */
struct ifmedia sc_media; /* media information */
==== //depot/projects/uart/dev/pccard/pccard.c#5 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pccard/pccard.c,v 1.83 2003/08/25 18:20:03 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pccard/pccard.c,v 1.84 2003/09/05 03:08:08 imp Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -284,14 +284,16 @@
struct pccard_softc *sc = PCCARD_SOFTC(dev);
struct pccard_function *pf;
struct pccard_config_entry *cfe;
+ int state;
/*
* We are running on either the PCCARD socket's event thread
* or in user context detaching a device by user request.
*/
STAILQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list