PERFORCE change 87299 for review
Robert Watson
rwatson at FreeBSD.org
Sun Nov 27 01:39:26 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=87299
Change 87299 by rwatson at rwatson_zoo on 2005/11/27 01:39:02
Integrate netsmp.
Affected files ...
.. //depot/projects/netsmp/src/sys/amd64/amd64/busdma_machdep.c#2 integrate
.. //depot/projects/netsmp/src/sys/conf/Makefile.arm#5 integrate
.. //depot/projects/netsmp/src/sys/conf/files#13 integrate
.. //depot/projects/netsmp/src/sys/conf/files.alpha#2 integrate
.. //depot/projects/netsmp/src/sys/conf/files.i386#7 integrate
.. //depot/projects/netsmp/src/sys/conf/files.pc98#4 integrate
.. //depot/projects/netsmp/src/sys/dev/acpica/acpi_cmbat.c#5 integrate
.. //depot/projects/netsmp/src/sys/dev/amr/amr.c#5 integrate
.. //depot/projects/netsmp/src/sys/dev/ata/ata-all.c#8 integrate
.. //depot/projects/netsmp/src/sys/dev/ata/ata-all.h#5 integrate
.. //depot/projects/netsmp/src/sys/dev/em/if_em.c#10 integrate
.. //depot/projects/netsmp/src/sys/dev/firewire/firewire.c#2 integrate
.. //depot/projects/netsmp/src/sys/dev/sound/pcm/ac97.c#6 integrate
.. //depot/projects/netsmp/src/sys/dev/sound/pcm/feeder_fmt.c#5 integrate
.. //depot/projects/netsmp/src/sys/dev/usb/if_ural.c#9 integrate
.. //depot/projects/netsmp/src/sys/dev/usb/if_uralreg.h#2 integrate
.. //depot/projects/netsmp/src/sys/dev/usb/umass.c#2 integrate
.. //depot/projects/netsmp/src/sys/geom/geom_kern.c#2 integrate
.. //depot/projects/netsmp/src/sys/geom/vinum/geom_vinum.c#4 integrate
.. //depot/projects/netsmp/src/sys/geom/vinum/geom_vinum_drive.c#5 integrate
.. //depot/projects/netsmp/src/sys/i386/i386/busdma_machdep.c#2 integrate
.. //depot/projects/netsmp/src/sys/kern/init_sysent.c#4 integrate
.. //depot/projects/netsmp/src/sys/kern/kern_time.c#5 integrate
.. //depot/projects/netsmp/src/sys/kern/syscalls.c#4 integrate
.. //depot/projects/netsmp/src/sys/kern/syscalls.master#4 integrate
.. //depot/projects/netsmp/src/sys/kern/uipc_mqueue.c#1 branch
.. //depot/projects/netsmp/src/sys/modules/Makefile#8 integrate
.. //depot/projects/netsmp/src/sys/modules/geom/geom_vinum/Makefile#4 integrate
.. //depot/projects/netsmp/src/sys/modules/mqueue/Makefile#1 branch
.. //depot/projects/netsmp/src/sys/net/if_clone.c#4 integrate
.. //depot/projects/netsmp/src/sys/netinet/libalias/libalias.3#2 integrate
.. //depot/projects/netsmp/src/sys/sys/_types.h#2 integrate
.. //depot/projects/netsmp/src/sys/sys/file.h#2 integrate
.. //depot/projects/netsmp/src/sys/sys/mqueue.h#1 branch
.. //depot/projects/netsmp/src/sys/sys/syscall.h#4 integrate
.. //depot/projects/netsmp/src/sys/sys/syscall.mk#4 integrate
.. //depot/projects/netsmp/src/sys/sys/sysproto.h#4 integrate
.. //depot/projects/netsmp/src/sys/sys/time.h#3 integrate
.. //depot/projects/netsmp/src/sys/sys/types.h#3 integrate
.. //depot/projects/netsmp/src/sys/ufs/ffs/ffs_vfsops.c#7 integrate
.. //depot/projects/netsmp/src/tools/regression/mqueue/Makefile#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest1/Makefile#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest1/mqtest1.c#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest2/Makefile#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest2/mqtest2.c#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest3/Makefile#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest3/mqtest3.c#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest4/Makefile#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest4/mqtest4.c#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest5/Makefile#1 branch
.. //depot/projects/netsmp/src/tools/regression/mqueue/mqtest5/mqtest5.c#1 branch
Differences ...
==== //depot/projects/netsmp/src/sys/amd64/amd64/busdma_machdep.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.70 2005/03/12 07:05:59 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.71 2005/11/24 15:28:32 le Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -978,7 +978,7 @@
SYSCTL_ADD_INT(busdma_sysctl_tree(bz),
SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO,
"total_bpages", CTLFLAG_RD, &bz->total_bpages, 0,
- "Totoal bounce pages");
+ "Total bounce pages");
SYSCTL_ADD_INT(busdma_sysctl_tree(bz),
SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO,
"free_bpages", CTLFLAG_RD, &bz->free_bpages, 0,
==== //depot/projects/netsmp/src/sys/conf/Makefile.arm#5 (text+ko) ====
@@ -1,7 +1,7 @@
# Makefile.arm -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $FreeBSD: src/sys/conf/Makefile.arm,v 1.18 2005/11/24 02:25:49 cognet Exp $
+# $FreeBSD: src/sys/conf/Makefile.arm,v 1.19 2005/11/25 03:30:45 cognet Exp $
#
# Makefile for FreeBSD
#
@@ -48,7 +48,7 @@
DDB_ENABLED!= grep DDB opt_ddb.h || true
-SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.static \
+SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader \
-warn-common -export-dynamic -dynamic-linker /red/herring -o \
${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL +=; cat ldscript.$M| \
@@ -74,7 +74,7 @@
.endif
-CLEANFILES += ldscript.$M ldscript.$M.static ${KERNEL_KO}.bin \
+CLEANFILES += ldscript.$M ldscript.$M.noheader ${KERNEL_KO}.bin \
${KERNEL_KO}.tramp ${KERNEL_KO}.tramp.bin
%BEFORE_DEPEND
==== //depot/projects/netsmp/src/sys/conf/files#13 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1066 2005/11/22 17:12:48 marius Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1068 2005/11/26 12:42:35 davidxu Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -10,12 +10,12 @@
no-obj no-implicit-rule before-depend \
clean "acpi_quirks.h"
aicasm optional ahc \
- dependency "$S/dev/aic7xxx/aicasm/*.[chyl]" \
+ dependency "$S/dev/aic7xxx/aicasm/*.[chyl]" \
compile-with "CC=${CC} ${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=$S/dev/aic7xxx/aicasm" \
no-obj no-implicit-rule \
clean "aicasm* y.tab.h"
aicasm optional ahd \
- dependency "$S/dev/aic7xxx/aicasm/*.[chyl]" \
+ dependency "$S/dev/aic7xxx/aicasm/*.[chyl]" \
compile-with "CC=${CC} ${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=$S/dev/aic7xxx/aicasm" \
no-obj no-implicit-rule \
clean "aicasm* y.tab.h"
@@ -488,10 +488,10 @@
dev/ata/atapi-cd.c optional atapicd
dev/ata/atapi-fd.c optional atapifd
dev/ata/atapi-tape.c optional atapist
-dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr
-dev/ath/ath_rate/onoe/onoe.c optional ath_rate_onoe \
+dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr
+dev/ath/ath_rate/onoe/onoe.c optional ath_rate_onoe \
compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd"
-dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \
+dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \
compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd"
dev/ath/if_ath.c optional ath \
compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd"
@@ -829,7 +829,7 @@
dev/rp/rp_pci.c optional rp pci
dev/sab/sab.c optional sab ebus
dev/safe/safe.c optional safe
-dev/sbsh/if_sbsh.c optional sbsh
+dev/sbsh/if_sbsh.c optional sbsh
dev/scd/scd.c optional scd isa
dev/scd/scd_isa.c optional scd isa
dev/si/si.c optional si
@@ -872,7 +872,7 @@
dev/sound/pci/es137x.c optional snd_es137x pci
dev/sound/pci/fm801.c optional snd_fm801 pci
dev/sound/pci/ich.c optional snd_ich pci
-dev/sound/pci/maestro.c optional snd_maestro pci
+dev/sound/pci/maestro.c optional snd_maestro pci
dev/sound/pci/maestro3.c optional snd_maestro3 pci \
warning "kernel contains GPL contaminated maestro3 headers"
dev/sound/pci/neomagic.c optional snd_neomagic pci
@@ -1363,6 +1363,7 @@
kern/uipc_domain.c standard
kern/uipc_mbuf.c standard
kern/uipc_mbuf2.c standard
+kern/uipc_mqueue.c optional p1003_1b_mqueue
kern/uipc_proto.c standard
kern/uipc_sem.c optional p1003_1b_semaphores
kern/uipc_socket.c standard
@@ -1526,19 +1527,19 @@
netatm/spans/spans_subr.c optional atm_spans atm_core
netatm/spans/spans_util.c optional atm_spans atm_core
spans_xdr.h optional atm_spans atm_core \
- before-depend \
- dependency "$S/netatm/spans/spans_xdr.x" \
- compile-with "rpcgen -h -C $S/netatm/spans/spans_xdr.x | grep -v rpc/rpc.h > spans_xdr.h" \
- clean "spans_xdr.h" \
- no-obj no-implicit-rule
+ before-depend \
+ dependency "$S/netatm/spans/spans_xdr.x" \
+ compile-with "rpcgen -h -C $S/netatm/spans/spans_xdr.x | grep -v rpc/rpc.h > spans_xdr.h" \
+ clean "spans_xdr.h" \
+ no-obj no-implicit-rule
spans_xdr.c optional atm_spans atm_core \
- before-depend \
- dependency "$S/netatm/spans/spans_xdr.x" \
- compile-with "rpcgen -c -C $S/netatm/spans/spans_xdr.x | grep -v rpc/rpc.h > spans_xdr.c" \
- clean "spans_xdr.c" \
- no-obj no-implicit-rule local
+ before-depend \
+ dependency "$S/netatm/spans/spans_xdr.x" \
+ compile-with "rpcgen -c -C $S/netatm/spans/spans_xdr.x | grep -v rpc/rpc.h > spans_xdr.c" \
+ clean "spans_xdr.c" \
+ no-obj no-implicit-rule local
spans_xdr.o optional atm_spans atm_core \
- dependency "$S/netatm/spans/spans_xdr.x" \
+ dependency "$S/netatm/spans/spans_xdr.x" \
compile-with "${NORMAL_C}" \
no-implicit-rule local
netatm/uni/q2110_sigaa.c optional atm_uni atm_core
==== //depot/projects/netsmp/src/sys/conf/files.alpha#2 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.alpha,v 1.121 2005/06/14 04:16:10 marcel Exp $
+# $FreeBSD: src/sys/conf/files.alpha,v 1.122 2005/11/26 08:50:20 ru Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -47,7 +47,6 @@
alpha/alpha/db_interface.c optional ddb
alpha/alpha/db_trace.c optional ddb
alpha/alpha/dec_1000a.c optional dec_1000a
-alpha/alpha/dec_1000a.c optional dec_1000a
alpha/alpha/dec_2100_a50.c optional dec_2100_a50
alpha/alpha/dec_2100_a500.c optional dec_2100_a500
alpha/alpha/dec_axppci_33.c optional dec_axppci_33
==== //depot/projects/netsmp/src/sys/conf/files.i386#7 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.i386,v 1.545 2005/11/21 20:11:39 ru Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.546 2005/11/26 08:50:20 ru Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -133,8 +133,6 @@
compile-with "${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \
no-implicit-rule
crypto/des/arch/i386/des_enc.S optional crypto
-crypto/des/des_ecb.c optional crypto
-crypto/des/des_setkey.c optional crypto
crypto/via/padlock.c optional padlock
dev/advansys/adv_isa.c optional adv isa
dev/aic/aic_isa.c optional aic isa
==== //depot/projects/netsmp/src/sys/conf/files.pc98#4 (text+ko) ====
@@ -3,7 +3,7 @@
#
# modified for PC-9801/PC-9821
#
-# $FreeBSD: src/sys/conf/files.pc98,v 1.329 2005/11/11 09:57:30 ru Exp $
+# $FreeBSD: src/sys/conf/files.pc98,v 1.330 2005/11/26 08:50:20 ru Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -89,8 +89,6 @@
compile-with "${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \
no-implicit-rule
crypto/des/arch/i386/des_enc.S optional crypto
-crypto/des/des_ecb.c optional crypto
-crypto/des/des_setkey.c optional crypto
dev/aic/aic_cbus.c optional aic isa
dev/ar/if_ar.c optional ar
dev/ar/if_ar_pci.c optional ar pci
==== //depot/projects/netsmp/src/sys/dev/acpica/acpi_cmbat.c#5 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.42 2005/11/23 00:57:51 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.43 2005/11/26 07:36:53 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -80,6 +80,7 @@
static int acpi_cmbat_info_expired(struct timespec *lastupdated);
static void acpi_cmbat_info_updated(struct timespec *lastupdated);
static void acpi_cmbat_get_bst(void *arg);
+static void acpi_cmbat_get_bif_task(void *arg);
static void acpi_cmbat_get_bif(void *arg);
static int acpi_cmbat_bst(device_t dev, struct acpi_bst *bstp);
static int acpi_cmbat_bif(device_t dev, struct acpi_bif *bifp);
@@ -193,7 +194,7 @@
* Queue a callback to get the current battery info from thread
* context. It's not safe to block in a notify handler.
*/
- AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_cmbat_get_bif, dev);
+ AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_cmbat_get_bif_task, dev);
break;
}
@@ -288,6 +289,16 @@
AcpiOsFree(bst_buffer.Pointer);
}
+/* XXX There should be a cleaner way to do this locking. */
+static void
+acpi_cmbat_get_bif_task(void *arg)
+{
+
+ ACPI_SERIAL_BEGIN(cmbat);
+ acpi_cmbat_get_bif(arg);
+ ACPI_SERIAL_END(cmbat);
+}
+
static void
acpi_cmbat_get_bif(void *arg)
{
==== //depot/projects/netsmp/src/sys/dev/amr/amr.c#5 (text+ko) ====
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.69 2005/11/06 15:13:41 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.70 2005/11/26 07:30:09 scottl Exp $");
/*
* Driver for the AMI MegaRaid family of controllers.
@@ -85,6 +85,13 @@
#define AMR_DEFINE_TABLES
#include <dev/amr/amr_tables.h>
+/*
+ * The CAM interface appears to be completely broken. Disable it.
+ */
+#ifndef AMR_ENABLE_CAM
+#define AMR_ENABLE_CAM 0
+#endif
+
static d_open_t amr_open;
static d_close_t amr_close;
static d_ioctl_t amr_ioctl;
@@ -225,12 +232,14 @@
debug(2, "controller query complete");
+#if AMR_ENABLE_CAM != 0
/*
* Attach our 'real' SCSI channels to CAM.
*/
if (amr_cam_attach(sc))
return(ENXIO);
debug(2, "CAM attach done");
+#endif
/*
* Create the control device.
@@ -327,8 +336,10 @@
{
struct amr_command_cluster *acc;
+#if AMR_ENABLE_CAM != 0
/* detach from CAM */
amr_cam_detach(sc);
+#endif
/* cancel status timeout */
untimeout(amr_periodic, sc, sc->amr_timeout);
@@ -855,9 +866,11 @@
if (ac == NULL)
(void)amr_bio_command(sc, &ac);
+#if AMR_ENABLE_CAM != 0
/* if that failed, build a command from a ccb */
if (ac == NULL)
(void)amr_cam_command(sc, &ac);
+#endif
/* if we don't have anything to do, give up */
if (ac == NULL)
==== //depot/projects/netsmp/src/sys/dev/ata/ata-all.c#8 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.259 2005/10/31 15:41:18 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.260 2005/11/25 09:00:56 sos Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -68,6 +68,7 @@
static void ata_interrupt(void *);
static void ata_boot_attach(void);
static device_t ata_add_child(device_t, struct ata_device *, int);
+static int ata_getparam(struct ata_device *, int);
static void bswap(int8_t *, int);
static void btrim(int8_t *, int);
static void bpack(int8_t *, int8_t *, int);
@@ -511,6 +512,7 @@
return error;
case IOCATAGPARM:
+ ata_getparam(atadev, 0);
bcopy(&atadev->param, params, sizeof(struct ata_params));
return 0;
@@ -572,9 +574,9 @@
}
static int
-ata_getparam(device_t parent, struct ata_device *atadev)
+ata_getparam(struct ata_device *atadev, int init)
{
- struct ata_channel *ch = device_get_softc(parent);
+ struct ata_channel *ch = device_get_softc(device_get_parent(atadev->dev));
struct ata_request *request;
u_int8_t command = 0;
int error = ENOMEM, retries = 2;
@@ -631,8 +633,7 @@
bpack(atacap->revision, atacap->revision, sizeof(atacap->revision));
btrim(atacap->serial, sizeof(atacap->serial));
bpack(atacap->serial, atacap->serial, sizeof(atacap->serial));
- sprintf(buffer, "%.40s/%.8s", atacap->model, atacap->revision);
- device_set_desc_copy(atadev->dev, buffer);
+
if (bootverbose)
printf("ata%d-%s: pio=%s wdma=%s udma=%s cable=%s wire\n",
ch->unit, atadev->unit == ATA_MASTER ? "master":"slave",
@@ -641,18 +642,22 @@
ata_mode2str(ata_umode(atacap)),
(atacap->hwres & ATA_CABLE_ID) ? "80":"40");
- if (atadev->param.config & ATA_PROTO_ATAPI) {
- if (atapi_dma && ch->dma &&
- (atadev->param.config & ATA_DRQ_MASK) != ATA_DRQ_INTR &&
- ata_umode(&atadev->param) >= ATA_UDMA2)
- atadev->mode = ATA_DMA_MAX;
+ if (init) {
+ sprintf(buffer, "%.40s/%.8s", atacap->model, atacap->revision);
+ device_set_desc_copy(atadev->dev, buffer);
+ if (atadev->param.config & ATA_PROTO_ATAPI) {
+ if (atapi_dma && ch->dma &&
+ (atadev->param.config & ATA_DRQ_MASK) != ATA_DRQ_INTR &&
+ ata_umode(&atadev->param) >= ATA_UDMA2)
+ atadev->mode = ATA_DMA_MAX;
+ }
+ else {
+ if (ata_dma && ch->dma &&
+ (ata_umode(&atadev->param) > 0 ||
+ ata_wmode(&atadev->param) > 0))
+ atadev->mode = ATA_DMA_MAX;
+ }
}
- else {
- if (ata_dma && ch->dma &&
- (ata_umode(&atadev->param) > 0 ||
- ata_wmode(&atadev->param) > 0))
- atadev->mode = ATA_DMA_MAX;
- }
}
else {
if (!error)
@@ -704,11 +709,11 @@
slave = NULL;
}
- if (slave && ata_getparam(dev, slave)) {
+ if (slave && ata_getparam(slave, 1)) {
device_delete_child(dev, slave_child);
free(slave, M_ATA);
}
- if (master && ata_getparam(dev, master)) {
+ if (master && ata_getparam(master, 1)) {
device_delete_child(dev, master_child);
free(master, M_ATA);
}
@@ -808,6 +813,12 @@
case ATA_FLUSHCACHE:
request->u.ata.command = ATA_FLUSHCACHE48;
break;
+ case ATA_READ_NATIVE_MAX_ADDDRESS:
+ request->u.ata.command = ATA_READ_NATIVE_MAX_ADDDRESS48;
+ break;
+ case ATA_SET_MAX_ADDRESS:
+ request->u.ata.command = ATA_SET_MAX_ADDRESS48;
+ break;
default:
return;
}
==== //depot/projects/netsmp/src/sys/dev/ata/ata-all.h#5 (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/ata-all.h,v 1.106 2005/10/06 15:44:07 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.107 2005/11/25 09:00:56 sos Exp $
*/
/* ATA register defines */
@@ -298,7 +298,7 @@
#define ATA_INTR_FLAGS (INTR_MPSAFE|INTR_TYPE_BIO|INTR_ENTROPY)
#define ATA_OP_CONTINUES 0
#define ATA_OP_FINISHED 1
-#define ATA_MAX_28BIT_LBA 268435455
+#define ATA_MAX_28BIT_LBA 268435455UL
/* ATAPI request sense structure */
struct atapi_sense {
==== //depot/projects/netsmp/src/sys/dev/em/if_em.c#10 (text+ko) ====
@@ -31,7 +31,7 @@
***************************************************************************/
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.89 2005/11/24 01:44:48 glebius Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.90 2005/11/24 15:13:47 cognet Exp $*/
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
@@ -1219,6 +1219,7 @@
u_int32_t txd_upper;
u_int32_t txd_lower, txd_used = 0, txd_saved = 0;
int i, j, error = 0;
+ bus_dmamap_t map;
struct mbuf *m_head;
@@ -1253,6 +1254,7 @@
tx_buffer = &adapter->tx_buffer_area[adapter->next_avail_tx_desc];
error = bus_dmamap_load_mbuf_sg(adapter->txtag, tx_buffer->map, m_head,
segs, &nsegs, BUS_DMA_NOWAIT);
+ map = tx_buffer->map;
if (error != 0) {
adapter->no_tx_dma_setup++;
return (error);
@@ -1383,7 +1385,7 @@
}
tx_buffer->m_head = m_head;
- bus_dmamap_sync(adapter->txtag, tx_buffer->map, BUS_DMASYNC_PREWRITE);
+ bus_dmamap_sync(adapter->txtag, map, BUS_DMASYNC_PREWRITE);
/*
* Last Descriptor of Packet needs End Of Packet (EOP)
==== //depot/projects/netsmp/src/sys/dev/firewire/firewire.c#2 (text+ko) ====
@@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.80 2005/01/06 01:42:41 imp Exp $
+ * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.81 2005/11/25 14:29:24 simokawa Exp $
*
*/
@@ -1324,6 +1324,7 @@
uint32_t addr;
struct fw_xfer *xfer;
struct fw_pkt *fp;
+ union fw_self_id *fwsid;
if(fc->status != FWBUSEXPLORE)
return;
@@ -1336,7 +1337,8 @@
/* check link */
/* XXX we need to check phy_id first */
- if (!fw_find_self_id(fc, fc->ongonode)->p0.link_active) {
+ fwsid = fw_find_self_id(fc, fc->ongonode);
+ if (!fwsid || !fwsid->p0.link_active) {
if (firewire_debug)
printf("node%d: link down\n", fc->ongonode);
fc->ongonode++;
==== //depot/projects/netsmp/src/sys/dev/sound/pcm/ac97.c#6 (text+ko) ====
@@ -30,7 +30,7 @@
#include "mixer_if.h"
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/ac97.c,v 1.57 2005/11/14 18:19:33 ariff Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/ac97.c,v 1.58 2005/11/26 03:51:25 ariff Exp $");
MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec");
@@ -148,6 +148,7 @@
{ 0x414c4710, 0x0f, 0, "ALC200", 0 },
{ 0x414c4740, 0x0f, 0, "ALC202", 0 },
{ 0x414c4720, 0x0f, 0, "ALC650", 0 },
+ { 0x414c4752, 0x0f, 0, "ALC250", 0 },
{ 0x414c4760, 0x0f, 0, "ALC655", 0 },
{ 0x414c4780, 0x0f, 0, "ALC658", 0 },
{ 0x414c4790, 0x0f, 0, "ALC850", 0 },
==== //depot/projects/netsmp/src/sys/dev/sound/pcm/feeder_fmt.c#5 (text+ko) ====
@@ -39,7 +39,7 @@
#include <dev/sound/pcm/sound.h>
#include "feeder_if.h"
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/feeder_fmt.c,v 1.17 2005/11/14 18:37:59 ariff Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/feeder_fmt.c,v 1.18 2005/11/26 03:54:17 ariff Exp $");
MALLOC_DEFINE(M_FMTFEEDER, "fmtfeed", "pcm format feeder");
@@ -629,6 +629,93 @@
{0, 0}
};
FEEDER_DECLARE(feeder_monotostereo16, 0, NULL);
+
+static int
+feed_monotostereo24(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b,
+ uint32_t count, void *source)
+{
+ int i, j, k = FEEDER_FEED(f->source, c, b, count >> 1, source);
+ uint8_t l, m, n;
+
+ if (k < 3) {
+ FMT_TRACE("%s: Not enough data (Got: %d bytes)\n",
+ __func__, k);
+ return 0;
+ }
+ FMT_TEST(k % 3, "%s: Bytes not 24bit aligned.\n", __func__);
+ FMT_ALIGNBYTE(k -= k % 3);
+ i = k;
+ j = k << 1;
+ while (i > 0) {
+ l = b[--i];
+ m = b[--i];
+ n = b[--i];
+ b[--j] = l;
+ b[--j] = m;
+ b[--j] = n;
+ b[--j] = l;
+ b[--j] = m;
+ b[--j] = n;
+ }
+ return k << 1;
+}
+static struct pcm_feederdesc feeder_monotostereo24_desc[] = {
+ {FEEDER_FMT, AFMT_U24_LE, AFMT_U24_LE|AFMT_STEREO, 0},
+ {FEEDER_FMT, AFMT_S24_LE, AFMT_S24_LE|AFMT_STEREO, 0},
+ {FEEDER_FMT, AFMT_U24_BE, AFMT_U24_BE|AFMT_STEREO, 0},
+ {FEEDER_FMT, AFMT_S24_BE, AFMT_S24_BE|AFMT_STEREO, 0},
+ {0, 0, 0, 0},
+};
+static kobj_method_t feeder_monotostereo24_methods[] = {
+ KOBJMETHOD(feeder_feed, feed_monotostereo24),
+ {0, 0}
+};
+FEEDER_DECLARE(feeder_monotostereo24, 0, NULL);
+
+static int
+feed_monotostereo32(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b,
+ uint32_t count, void *source)
+{
+ int i, j, k = FEEDER_FEED(f->source, c, b, count >> 1, source);
+ uint8_t l, m, n, o;
+
+ if (k < 4) {
+ FMT_TRACE("%s: Not enough data (Got: %d bytes)\n",
+ __func__, k);
+ return 0;
+ }
+ FMT_TEST(k & 3, "%s: Bytes not 32bit aligned.\n", __func__);
+ FMT_ALIGNBYTE(k &= ~3);
+ i = k;
+ j = k << 1;
+ while (i > 0) {
+ l = b[--i];
+ m = b[--i];
+ n = b[--i];
+ o = b[--i];
+ b[--j] = l;
+ b[--j] = m;
+ b[--j] = n;
+ b[--j] = o;
+ b[--j] = l;
+ b[--j] = m;
+ b[--j] = n;
+ b[--j] = o;
+ }
+ return k << 1;
+}
+static struct pcm_feederdesc feeder_monotostereo32_desc[] = {
+ {FEEDER_FMT, AFMT_U32_LE, AFMT_U32_LE|AFMT_STEREO, 0},
+ {FEEDER_FMT, AFMT_S32_LE, AFMT_S32_LE|AFMT_STEREO, 0},
+ {FEEDER_FMT, AFMT_U32_BE, AFMT_U32_BE|AFMT_STEREO, 0},
+ {FEEDER_FMT, AFMT_S32_BE, AFMT_S32_BE|AFMT_STEREO, 0},
+ {0, 0, 0, 0},
+};
+static kobj_method_t feeder_monotostereo32_methods[] = {
+ KOBJMETHOD(feeder_feed, feed_monotostereo32),
+ {0, 0}
+};
+FEEDER_DECLARE(feeder_monotostereo32, 0, NULL);
/*
* Channel conversion (mono -> stereo) end
*/
@@ -712,6 +799,89 @@
{0, 0}
};
FEEDER_DECLARE(feeder_stereotomono16, 0, NULL);
+
+static int
+feed_stereotomono24(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b,
+ uint32_t count, void *source)
+{
+ int i, j, k;
+ uint8_t *src = (uint8_t *)f->data;
+
+ k = count << 1;
+ k = FEEDER_FEED(f->source, c, src, min(k, FEEDBUF24SZ), source);
+ if (k < 6) {
+ FMT_TRACE("%s: Not enough data (Got: %d bytes)\n",
+ __func__, k);
+ return 0;
+ }
+ FMT_TEST(k % 6, "%s: Bytes not 24bit (stereo) aligned.\n", __func__);
+ FMT_ALIGNBYTE(k -= k % 6);
+ i = k >> 1;
+ j = i;
+ while (i > 0) {
+ k -= 3;
+ b[--i] = src[--k];
+ b[--i] = src[--k];
+ b[--i] = src[--k];
+ }
+ return j;
+}
+static struct pcm_feederdesc feeder_stereotomono24_desc[] = {
+ {FEEDER_FMT, AFMT_U24_LE|AFMT_STEREO, AFMT_U24_LE, 0},
+ {FEEDER_FMT, AFMT_S24_LE|AFMT_STEREO, AFMT_S24_LE, 0},
+ {FEEDER_FMT, AFMT_U24_BE|AFMT_STEREO, AFMT_U24_BE, 0},
+ {FEEDER_FMT, AFMT_S24_BE|AFMT_STEREO, AFMT_S24_BE, 0},
+ {0, 0, 0, 0},
+};
+static kobj_method_t feeder_stereotomono24_methods[] = {
+ KOBJMETHOD(feeder_init, feed_common_init),
+ KOBJMETHOD(feeder_free, feed_common_free),
+ KOBJMETHOD(feeder_feed, feed_stereotomono24),
+ {0, 0}
+};
+FEEDER_DECLARE(feeder_stereotomono24, 0, NULL);
+
+static int
+feed_stereotomono32(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b,
+ uint32_t count, void *source)
+{
+ int i, j, k;
+ uint8_t *src = (uint8_t *)f->data;
+
+ k = count << 1;
+ k = FEEDER_FEED(f->source, c, src, min(k, FEEDBUFSZ), source);
+ if (k < 8) {
+ FMT_TRACE("%s: Not enough data (Got: %d bytes)\n",
+ __func__, k);
+ return 0;
+ }
+ FMT_TEST(k & 7, "%s: Bytes not 32bit (stereo) aligned.\n", __func__);
+ FMT_ALIGNBYTE(k &= ~7);
+ i = k >> 1;
+ j = i;
+ while (i > 0) {
+ k -= 4;
+ b[--i] = src[--k];
+ b[--i] = src[--k];
+ b[--i] = src[--k];
+ b[--i] = src[--k];
+ }
+ return j;
+}
+static struct pcm_feederdesc feeder_stereotomono32_desc[] = {
+ {FEEDER_FMT, AFMT_U32_LE|AFMT_STEREO, AFMT_U32_LE, 0},
+ {FEEDER_FMT, AFMT_S32_LE|AFMT_STEREO, AFMT_S32_LE, 0},
+ {FEEDER_FMT, AFMT_U32_BE|AFMT_STEREO, AFMT_U32_BE, 0},
+ {FEEDER_FMT, AFMT_S32_BE|AFMT_STEREO, AFMT_S32_BE, 0},
+ {0, 0, 0, 0},
+};
+static kobj_method_t feeder_stereotomono32_methods[] = {
+ KOBJMETHOD(feeder_init, feed_common_init),
+ KOBJMETHOD(feeder_free, feed_common_free),
+ KOBJMETHOD(feeder_feed, feed_stereotomono32),
+ {0, 0}
+};
+FEEDER_DECLARE(feeder_stereotomono32, 0, NULL);
/*
* Channel conversion (stereo -> mono) end
*/
==== //depot/projects/netsmp/src/sys/dev/usb/if_ural.c#9 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.22 2005/11/23 17:32:57 damien Exp $ */
+/* $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.26 2005/11/25 21:15:07 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.22 2005/11/23 17:32:57 damien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.26 2005/11/25 21:15:07 damien Exp $");
/*-
* Ralink Technology RT2500USB chipset driver
@@ -453,9 +453,13 @@
ic->ic_state = IEEE80211_S_INIT;
/* set device capabilities */
- ic->ic_caps = IEEE80211_C_MONITOR | IEEE80211_C_IBSS |
- IEEE80211_C_HOSTAP | IEEE80211_C_SHPREAMBLE | IEEE80211_C_SHSLOT |
- IEEE80211_C_PMGT | IEEE80211_C_TXPMGT | IEEE80211_C_WPA;
+ ic->ic_caps =
+ IEEE80211_C_IBSS | /* IBSS mode supported */
+ IEEE80211_C_MONITOR | /* monitor mode supported */
+ IEEE80211_C_HOSTAP | /* HostAp mode supported */
+ IEEE80211_C_TXPMGT | /* tx power management */
+ IEEE80211_C_SHPREAMBLE | /* short preamble supported */
+ IEEE80211_C_WPA; /* 802.11i */
if (sc->rf_rev == RAL_RF_5222) {
/* set supported .11a rates */
@@ -527,6 +531,11 @@
callout_stop(&sc->scan_ch);
callout_stop(&sc->amrr_ch);
+ if (sc->amrr_xfer != NULL) {
+ usbd_free_xfer(sc->amrr_xfer);
+ sc->amrr_xfer = NULL;
+ }
+
if (sc->sc_rx_pipeh != NULL) {
usbd_abort_pipe(sc->sc_rx_pipeh);
usbd_close_pipe(sc->sc_rx_pipeh);
@@ -685,7 +694,7 @@
return error;
}
- if ((ifp->if_flags & IFF_UP) &&
+ if ((ifp->if_flags & IFF_UP) &&
(ifp->if_drv_flags & IFF_DRV_RUNNING))
ural_init(sc);
@@ -876,7 +885,7 @@
usbd_get_xfer_status(xfer, NULL, NULL, &len, NULL);
- if (len < RAL_RX_DESC_SIZE) {
+ if (len < RAL_RX_DESC_SIZE + IEEE80211_MIN_LEN) {
printf("%s: xfer too short %d\n", USBDEVNAME(sc->sc_dev), len);
ifp->if_ierrors++;
goto skip;
@@ -909,7 +918,19 @@
/* finalize mbuf */
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = m->m_len = (le32toh(desc->flags) >> 16) & 0xfff;
- m->m_flags |= M_HASFCS; /* hardware appends FCS */
+ m->m_flags |= M_HASFCS; /* h/w leaves FCS */
+
+ if (sc->sc_drvbpf != NULL) {
+ struct ural_rx_radiotap_header *tap = &sc->sc_rxtap;
+
+ tap->wr_flags = 0;
+ tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
+ tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
+ tap->wr_antenna = sc->rx_ant;
+ tap->wr_antsignal = desc->rssi;
+
+ bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m);
+ }
wh = mtod(m, struct ieee80211_frame *);
ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
@@ -984,7 +1005,6 @@
else
txtime += 144 + 48;
}
-
return txtime;
}
@@ -1036,27 +1056,22 @@
*/
desc->plcp_service = 4;
- len += 4; /* account for FCS */
+ len += IEEE80211_CRC_LEN;
if (RAL_RATE_IS_OFDM(rate)) {
- /*
- * PLCP length field (LENGTH).
- * From IEEE Std 802.11a-1999, pp. 14.
- */
+ /* IEEE Std 802.11a-1999, pp. 14 */
plcp_length = len & 0xfff;
- desc->plcp_length = htole16((plcp_length >> 6) << 8 |
- (plcp_length & 0x3f));
+ desc->plcp_length_hi = plcp_length >> 6;
+ desc->plcp_length_lo = plcp_length & 0x3f;
} else {
- /*
- * Long PLCP LENGTH field.
- * From IEEE Std 802.11b-1999, pp. 16.
- */
+ /* IEEE Std 802.11b-1999, pp. 16 */
plcp_length = (16 * len + rate - 1) / rate;
if (rate == 22) {
remainder = (16 * len) % 22;
if (remainder != 0 && remainder < 7)
desc->plcp_service |= RAL_PLCP_LENGEXT;
}
- desc->plcp_length = htole16(plcp_length);
+ desc->plcp_length_hi = plcp_length >> 8;
+ desc->plcp_length_lo = plcp_length & 0xff;
}
desc->plcp_signal = ural_plcp_signal(rate);
@@ -1138,18 +1153,6 @@
rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 4;
- if (sc->sc_drvbpf != NULL) {
- struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
-
- tap->wt_flags = 0;
- tap->wt_rate = rate;
- tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
- tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
- tap->wt_antenna = sc->tx_ant;
-
- bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0);
- }
-
data->m = m0;
data->ni = ni;
@@ -1169,12 +1172,31 @@
flags |= RAL_TX_TIMESTAMP;
}
+ if (sc->sc_drvbpf != NULL) {
+ struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
+
+ tap->wt_flags = 0;
+ tap->wt_rate = rate;
+ tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
+ tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
+ tap->wt_antenna = sc->tx_ant;
+
+ bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0);
+ }
+
m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE);
ural_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate);
- /* xfer length needs to be a multiple of two! */
+ /* align end on a 2-bytes boundary */
xferlen = (RAL_TX_DESC_SIZE + m0->m_pkthdr.len + 1) & ~1;
+ /*
+ * No space left in the last URB to store the extra 2 bytes, force
+ * sending of another URB.
+ */
+ if ((xferlen % 64) == 0)
+ xferlen += 2;
+
DPRINTFN(10, ("sending mgt frame len=%u rate=%u xfer len=%u\n",
m0->m_pkthdr.len, rate, xferlen));
@@ -1224,18 +1246,6 @@
wh = mtod(m0, struct ieee80211_frame *);
}
- if (sc->sc_drvbpf != NULL) {
- struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
-
- tap->wt_flags = 0;
- tap->wt_rate = rate;
- tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
- tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
- tap->wt_antenna = sc->tx_ant;
-
- bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0);
- }
-
data = &sc->tx_data[0];
desc = (struct ural_tx_desc *)data->buf;
@@ -1251,12 +1261,31 @@
*(uint16_t *)wh->i_dur = htole16(dur);
}
+ if (sc->sc_drvbpf != NULL) {
+ struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
+
+ tap->wt_flags = 0;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list