PERFORCE change 127225 for review
Marko Zec
zec at FreeBSD.org
Fri Oct 5 05:27:35 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=127225
Change 127225 by zec at zec_tpx32 on 2007/10/05 12:27:00
IFC @ 127220
Affected files ...
.. //depot/projects/vimage/src/sys/amd64/amd64/legacy.c#3 integrate
.. //depot/projects/vimage/src/sys/amd64/conf/GENERIC#9 integrate
.. //depot/projects/vimage/src/sys/amd64/include/legacyvar.h#2 integrate
.. //depot/projects/vimage/src/sys/amd64/pci/pci_bus.c#5 integrate
.. //depot/projects/vimage/src/sys/arm/arm/locore.S#3 integrate
.. //depot/projects/vimage/src/sys/arm/conf/AVILA#4 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/i80321/i80321_pci.c#4 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/i8134x/i81342_pci.c#2 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/ixp425/files.ixp425#3 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/ixp425/ixp425_npe.c#4 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/ixp425/ixp425_npevar.h#3 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/ixp425/ixp425_pci.c#4 integrate
.. //depot/projects/vimage/src/sys/boot/common/module.c#2 integrate
.. //depot/projects/vimage/src/sys/boot/forth/loader.conf#7 integrate
.. //depot/projects/vimage/src/sys/conf/NOTES#17 integrate
.. //depot/projects/vimage/src/sys/contrib/dev/npe/IxNpeMicrocode.dat.uu#1 branch
.. //depot/projects/vimage/src/sys/contrib/dev/npe/LICENSE#1 branch
.. //depot/projects/vimage/src/sys/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/acpica/acpi_pci.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/acpica/acpi_pcib_acpi.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/ata/ata-all.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/ata/ata-chipset.c#8 integrate
.. //depot/projects/vimage/src/sys/dev/ata/ata-pci.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/bge/if_bge.c#8 integrate
.. //depot/projects/vimage/src/sys/dev/cardbus/cardbus.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/gem/if_gem.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/gem/if_gem_pci.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/gem/if_gemreg.h#3 integrate
.. //depot/projects/vimage/src/sys/dev/gem/if_gemvar.h#5 integrate
.. //depot/projects/vimage/src/sys/dev/pccbb/pccbb.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/pccbb/pccbb_pci.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/pccbb/pccbbvar.h#4 integrate
.. //depot/projects/vimage/src/sys/dev/pci/pci.c#10 integrate
.. //depot/projects/vimage/src/sys/dev/pci/pci_pci.c#6 integrate
.. //depot/projects/vimage/src/sys/dev/pci/pci_private.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/pci/pci_user.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/pci/pcib_private.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/pci/pcivar.h#5 integrate
.. //depot/projects/vimage/src/sys/dev/usb/if_axe.c#8 integrate
.. //depot/projects/vimage/src/sys/dev/usb/if_axereg.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usbdevs#12 integrate
.. //depot/projects/vimage/src/sys/dev/usb/uscanner.c#4 integrate
.. //depot/projects/vimage/src/sys/fs/tmpfs/tmpfs_vfsops.c#6 integrate
.. //depot/projects/vimage/src/sys/geom/geom_event.c#2 integrate
.. //depot/projects/vimage/src/sys/i386/conf/GENERIC#11 integrate
.. //depot/projects/vimage/src/sys/i386/i386/legacy.c#3 integrate
.. //depot/projects/vimage/src/sys/i386/include/legacyvar.h#2 integrate
.. //depot/projects/vimage/src/sys/i386/pci/pci_bus.c#5 integrate
.. //depot/projects/vimage/src/sys/ia64/conf/GENERIC#5 integrate
.. //depot/projects/vimage/src/sys/kern/kern_sx.c#8 integrate
.. //depot/projects/vimage/src/sys/kern/sched_ule.c#13 integrate
.. //depot/projects/vimage/src/sys/kern/vfs_bio.c#8 integrate
.. //depot/projects/vimage/src/sys/modules/Makefile#12 integrate
.. //depot/projects/vimage/src/sys/netinet/ip_fw2.c#26 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_asconf.c#15 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_constants.h#17 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_indata.c#19 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_input.c#20 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_output.c#19 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_output.h#10 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_pcb.c#19 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_timer.c#15 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_usrreq.c#20 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_var.h#13 integrate
.. //depot/projects/vimage/src/sys/netinet/sctputil.c#20 integrate
.. //depot/projects/vimage/src/sys/nfsclient/nfs_bio.c#6 integrate
.. //depot/projects/vimage/src/sys/nfsclient/nfs_nfsiod.c#2 integrate
.. //depot/projects/vimage/src/sys/pc98/conf/GENERIC#6 integrate
.. //depot/projects/vimage/src/sys/powerpc/conf/GENERIC#5 integrate
.. //depot/projects/vimage/src/sys/powerpc/conf/NOTES#4 integrate
.. //depot/projects/vimage/src/sys/powerpc/powermac/grackle.c#2 integrate
.. //depot/projects/vimage/src/sys/powerpc/powermac/uninorth.c#3 integrate
.. //depot/projects/vimage/src/sys/sparc64/conf/GENERIC#5 integrate
.. //depot/projects/vimage/src/sys/sparc64/pci/apb.c#2 integrate
.. //depot/projects/vimage/src/sys/sparc64/pci/ofw_pcibus.c#4 integrate
.. //depot/projects/vimage/src/sys/sparc64/pci/psycho.c#8 integrate
.. //depot/projects/vimage/src/sys/sun4v/conf/GENERIC#6 integrate
.. //depot/projects/vimage/src/sys/sun4v/sun4v/hv_pci.c#3 integrate
.. //depot/projects/vimage/src/sys/sys/param.h#11 integrate
.. //depot/projects/vimage/src/sys/sys/pciio.h#2 integrate
.. //depot/projects/vimage/src/sys/vm/vm_object.c#8 integrate
.. //depot/projects/vimage/src/sys/vm/vm_page.c#10 integrate
.. //depot/projects/vimage/src/sys/vm/vm_page.h#7 integrate
Differences ...
==== //depot/projects/vimage/src/sys/amd64/amd64/legacy.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/legacy.c,v 1.60 2007/03/20 20:21:44 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/legacy.c,v 1.61 2007/09/30 11:05:13 marius Exp $");
/*
* This code implements a system driver for legacy systems that do not
@@ -207,6 +207,9 @@
struct legacy_device *atdev = DEVTOAT(child);
switch (which) {
+ case LEGACY_IVAR_PCIDOMAIN:
+ *result = 0;
+ break;
case LEGACY_IVAR_PCIBUS:
*result = atdev->lg_pcibus;
break;
@@ -223,6 +226,8 @@
struct legacy_device *atdev = DEVTOAT(child);
switch (which) {
+ case LEGACY_IVAR_PCIDOMAIN:
+ return EINVAL;
case LEGACY_IVAR_PCIBUS:
atdev->lg_pcibus = value;
break;
==== //depot/projects/vimage/src/sys/amd64/conf/GENERIC#9 (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.483 2007/07/01 21:47:45 njl Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.484 2007/09/26 20:05:06 brueffer Exp $
cpu HAMMER
ident GENERIC
@@ -30,7 +30,7 @@
options PREEMPTION # Enable kernel thread preemption
options INET # InterNETworking
options INET6 # IPv6 communications protocols
-options SCTP # Stream Transmission Control Protocol
+options SCTP # Stream Control Transmission Protocol
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
==== //depot/projects/vimage/src/sys/amd64/include/legacyvar.h#2 (text+ko) ====
@@ -23,19 +23,21 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/legacyvar.h,v 1.7 2005/09/18 01:42:43 imp Exp $
+ * $FreeBSD: src/sys/amd64/include/legacyvar.h,v 1.8 2007/09/30 11:05:13 marius Exp $
*/
#ifndef _MACHINE_LEGACYVAR_H_
#define _MACHINE_LEGACYVAR_H_
enum legacy_device_ivars {
+ LEGACY_IVAR_PCIDOMAIN,
LEGACY_IVAR_PCIBUS
};
#define LEGACY_ACCESSOR(var, ivar, type) \
__BUS_ACCESSOR(legacy, var, LEGACY, ivar, type)
+LEGACY_ACCESSOR(pcidomain, PCIDOMAIN, uint32_t)
LEGACY_ACCESSOR(pcibus, PCIBUS, uint32_t)
#undef LEGACY_ACCESSOR
==== //depot/projects/vimage/src/sys/amd64/pci/pci_bus.c#5 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.121 2007/05/02 17:50:34 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.122 2007/09/30 11:05:13 marius Exp $");
#include "opt_cpu.h"
@@ -276,6 +276,9 @@
{
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ *result = 0;
+ return 0;
case PCIB_IVAR_BUS:
*result = legacy_get_pcibus(dev);
return 0;
@@ -289,6 +292,8 @@
{
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ return EINVAL;
case PCIB_IVAR_BUS:
legacy_set_pcibus(dev, value);
return 0;
==== //depot/projects/vimage/src/sys/arm/arm/locore.S#3 (text+ko) ====
@@ -37,7 +37,7 @@
#include <machine/asm.h>
#include <machine/armreg.h>
#include <machine/pte.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.16 2007/02/26 02:03:48 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.17 2007/09/27 20:52:17 cognet Exp $");
/* What size should this really be ? It is only used by initarm() */
#define INIT_ARM_STACK_SIZE 2048
@@ -134,7 +134,7 @@
adds r1, r1, #-1
bhi 2b
3:
- ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */
+ ldmia r4!, {r1,r2,r3} /* # of sections, VA, PA|attr */
cmp r1, #0
adrne r5, 2b
bicne r5, r5, #0xff000000
==== //depot/projects/vimage/src/sys/arm/conf/AVILA#4 (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/arm/conf/AVILA,v 1.4 2007/05/24 16:27:48 sam Exp $
+# $FreeBSD: src/sys/arm/conf/AVILA,v 1.6 2007/09/27 22:39:49 cognet Exp $
machine arm
ident AVILA
@@ -104,8 +104,8 @@
device avila_ata # Gateworks CF/IDE support
device npe # Network Processing Engine
-device npe_fw # NPE firmware
-device firmware # firmware support for npe_fw
+device npe_fw
+device firmware
device qmgr # Q Manager (required by npe)
device miibus # NB: required by npe
device ether
==== //depot/projects/vimage/src/sys/arm/xscale/i80321/i80321_pci.c#4 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.11 2007/07/27 14:53:42 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.12 2007/09/30 11:05:13 marius Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -250,8 +250,10 @@
{
struct i80321_pci_softc *sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ *result = 0;
+ return (0);
case PCIB_IVAR_BUS:
-
*result = sc->sc_busno;
return (0);
@@ -265,6 +267,8 @@
struct i80321_pci_softc * sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ return (EINVAL);
case PCIB_IVAR_BUS:
sc->sc_busno = result;
return (0);
==== //depot/projects/vimage/src/sys/arm/xscale/i8134x/i81342_pci.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i8134x/i81342_pci.c,v 1.1 2007/07/27 14:50:57 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i8134x/i81342_pci.c,v 1.2 2007/09/30 11:05:14 marius Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -481,8 +481,10 @@
{
struct i81342_pci_softc *sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ *result = 0;
+ return (0);
case PCIB_IVAR_BUS:
-
*result = sc->sc_busno;
return (0);
@@ -496,6 +498,8 @@
struct i81342_pci_softc * sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ return (EINVAL);
case PCIB_IVAR_BUS:
sc->sc_busno = result;
return (0);
==== //depot/projects/vimage/src/sys/arm/xscale/ixp425/files.ixp425#3 (text+ko) ====
@@ -1,4 +1,4 @@
-#$FreeBSD: src/sys/arm/xscale/ixp425/files.ixp425,v 1.2 2006/12/07 00:49:33 sam Exp $
+#$FreeBSD: src/sys/arm/xscale/ixp425/files.ixp425,v 1.4 2007/09/27 22:39:49 cognet Exp $
arm/arm/cpufunc_asm_xscale.S standard
arm/arm/irq_dispatch.S standard
arm/xscale/ixp425/ixp425.c standard
@@ -16,12 +16,7 @@
arm/xscale/ixp425/ixp425_a4x_io.S optional uart
dev/uart/uart_dev_ns8250.c optional uart
#
-# NPE-based Ethernet support (requires qmgr also). Note the
-# firmware images must be downloaded from the Intel web site.
-# The URL seems to change frequently; try this as a starting
-# place:
-#
-# http://www.intel.com/design/network/products/npfamily/download_ixp400.htm
+# NPE-based Ethernet support (requires qmgr also).
#
arm/xscale/ixp425/if_npe.c optional npe
arm/xscale/ixp425/ixp425_npe.c optional npe
@@ -41,7 +36,7 @@
clean "IxNpeMicrocode.fwo"
IxNpeMicrocode.dat optional npe_fw \
dependency ".PHONY" \
- compile-with "if [ -e $S/arm/xscale/ixp425/IxNpeMicrocode.dat ]; then ln -sf $S/arm/xscale/ixp425/IxNpeMicrocode.dat .; else echo 'WARNING, no IxNpeMicrocode.dat file; you must obtain this from the Intel web site'; false; fi" \
+ compile-with "uudecode < $S/contrib/dev/npe/IxNpeMicrocode.dat.uu" \
no-obj no-implicit-rule \
clean "IxNpeMicrocode.dat"
#
==== //depot/projects/vimage/src/sys/arm/xscale/ixp425/ixp425_npe.c#4 (text+ko) ====
@@ -57,7 +57,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_npe.c,v 1.6 2007/05/24 16:31:22 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_npe.c,v 1.8 2007/09/27 22:39:49 cognet Exp $");
/*
* Intel XScale Network Processing Engine (NPE) support.
==== //depot/projects/vimage/src/sys/arm/xscale/ixp425/ixp425_npevar.h#3 (text+ko) ====
@@ -21,7 +21,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/arm/xscale/ixp425/ixp425_npevar.h,v 1.2 2007/05/24 16:31:22 sam Exp $
+ * $FreeBSD: src/sys/arm/xscale/ixp425/ixp425_npevar.h,v 1.4 2007/09/27 22:39:49 cognet Exp $
*/
#ifndef _IXP425_NPEVAR_H_
==== //depot/projects/vimage/src/sys/arm/xscale/ixp425/ixp425_pci.c#4 (text+ko) ====
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_pci.c,v 1.4 2007/03/06 10:58:22 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_pci.c,v 1.5 2007/09/30 11:05:14 marius Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -229,6 +229,9 @@
sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ *result = 0;
+ return (0);
case PCIB_IVAR_BUS:
*result = sc->sc_bus;
return (0);
@@ -244,6 +247,8 @@
sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ return (EINVAL);
case PCIB_IVAR_BUS:
sc->sc_bus = value;
return (0);
==== //depot/projects/vimage/src/sys/boot/common/module.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/common/module.c,v 1.26 2006/01/12 13:18:49 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/common/module.c,v 1.27 2007/10/04 18:29:52 obrien Exp $");
/*
* file/module function dispatcher, support, etc.
@@ -75,6 +75,7 @@
static char *kld_ext_list[] = {
".ko",
"",
+ ".debug",
NULL
};
==== //depot/projects/vimage/src/sys/boot/forth/loader.conf#7 (text+ko) ====
@@ -6,7 +6,7 @@
#
# All arguments must be in double quotes.
#
-# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.121 2007/06/25 05:06:55 rafan Exp $
+# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.122 2007/09/26 08:38:25 ru Exp $
##############################################################
### Basic configuration options ############################
@@ -44,7 +44,8 @@
#autoboot_delay="10" # Delay in seconds before autobooting,
# set to -1 if you don't want user to be
# allowed to interrupt autoboot process and
- # escape to the loader prompt
+ # escape to the loader prompt, set to
+ # "NO" to disable autobooting
#beastie_disable="NO" # Turn the beastie boot menu on and off
#loader_logo="fbsdbw" # Desired logo: fbsdbw, beastiebw, beastie, none
#comconsole_speed="9600" # Set the current serial console speed
==== //depot/projects/vimage/src/sys/conf/NOTES#17 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1453 2007/09/23 07:34:22 pjd Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1454 2007/09/26 21:14:17 marius Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -1766,6 +1766,7 @@
# fpa: Support for the Digital DEFPA PCI FDDI. `device fddi' is also needed.
# fxp: Intel EtherExpress Pro/100B
# (hint of prefer_iomap can be done to prefer I/O instead of Mem mapping)
+# gem: Apple GMAC/Sun ERI/Sun GEM
# hme: Sun HME (Happy Meal Ethernet)
# le: AMD Am7900 LANCE and Am79C9xx PCnet
# lge: Support for PCI gigabit ethernet adapters based on the Level 1
@@ -1880,6 +1881,7 @@
device dc # DEC/Intel 21143 and various workalikes
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
hint.fxp.0.prefer_iomap="0"
+device gem # Apple GMAC/Sun ERI/Sun GEM
device hme # Sun HME (Happy Meal Ethernet)
device lge # Level 1 LXT1001 gigabit Ethernet
device my # Myson Fast Ethernet (MTD80X, MTD89X)
==== //depot/projects/vimage/src/sys/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c#2 (text+ko) ====
@@ -209,6 +209,8 @@
winner = dmu_buf_set_user(db, zap, &zap->zap_m.zap_phys, zap_evict);
if (winner != NULL) {
+ rw_exit(&zap->zap_rwlock);
+ rw_destroy(&zap->zap_rwlock);
if (!zap->zap_ismicro)
mutex_destroy(&zap->zap_f.zap_num_entries_mtx);
kmem_free(zap, sizeof (zap_t));
==== //depot/projects/vimage/src/sys/dev/acpica/acpi_pci.c#2 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci.c,v 1.30 2006/05/11 22:13:20 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci.c,v 1.31 2007/09/30 11:05:14 marius Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -275,17 +275,19 @@
static int
acpi_pci_attach(device_t dev)
{
- int busno;
+ int busno, domain;
/*
* Since there can be multiple independantly numbered PCI
* busses on systems with multiple PCI domains, we can't use
* the unit number to decide which bus we are probing. We ask
- * the parent pcib what our bus number is.
+ * the parent pcib what our domain and bus numbers are.
*/
+ domain = pcib_get_domain(dev);
busno = pcib_get_bus(dev);
if (bootverbose)
- device_printf(dev, "physical bus=%d\n", busno);
+ device_printf(dev, "domain=%d, physical bus=%d\n",
+ domain, busno);
/*
* First, PCI devices are added as in the normal PCI bus driver.
@@ -297,7 +299,7 @@
* pci_add_children() doesn't find. We currently just ignore
* these devices.
*/
- pci_add_children(dev, busno, sizeof(struct acpi_pci_devinfo));
+ pci_add_children(dev, domain, busno, sizeof(struct acpi_pci_devinfo));
AcpiWalkNamespace(ACPI_TYPE_DEVICE, acpi_get_handle(dev), 1,
acpi_pci_save_handle, dev, NULL);
==== //depot/projects/vimage/src/sys/dev/acpica/acpi_pcib_acpi.c#5 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.54 2007/05/02 17:50:35 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.55 2007/09/30 11:05:14 marius Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -259,6 +259,9 @@
struct acpi_hpcib_softc *sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ *result = 0;
+ return (0);
case PCIB_IVAR_BUS:
*result = sc->ap_bus;
return (0);
@@ -278,6 +281,8 @@
struct acpi_hpcib_softc *sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ return (EINVAL);
case PCIB_IVAR_BUS:
sc->ap_bus = value;
return (0);
==== //depot/projects/vimage/src/sys/dev/ata/ata-all.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.279 2007/02/23 16:25:08 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.280 2007/10/04 19:17:15 sos Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -738,7 +738,7 @@
atadev->flags &= ~ATA_D_48BIT_ACTIVE;
- if ((request->u.ata.lba >= ATA_MAX_28BIT_LBA ||
+ if (((request->u.ata.lba + request->u.ata.count) >= ATA_MAX_28BIT_LBA ||
request->u.ata.count > 256) &&
atadev->param.support.command2 & ATA_SUPPORT_ADDRESS48) {
==== //depot/projects/vimage/src/sys/dev/ata/ata-chipset.c#8 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.199 2007/09/10 19:16:39 simon Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.201 2007/10/04 19:17:15 sos Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -1216,6 +1216,7 @@
{ ATA_AMD766, 0x00, AMDNVIDIA, AMDCABLE|AMDBUG, ATA_UDMA5, "766" },
{ ATA_AMD768, 0x00, AMDNVIDIA, AMDCABLE, ATA_UDMA5, "768" },
{ ATA_AMD8111, 0x00, AMDNVIDIA, AMDCABLE, ATA_UDMA6, "8111" },
+ { ATA_AMD5536, 0x00, AMDNVIDIA, 0x00, ATA_UDMA5, "CS5536" },
{ 0, 0, 0, 0, 0, 0}};
char buffer[64];
@@ -5095,6 +5096,7 @@
{ ATA_VIA8235, 0x00, VIA133, 0x00, ATA_UDMA6, "8235" },
{ ATA_VIA8237, 0x00, VIA133, 0x00, ATA_UDMA6, "8237" },
{ ATA_VIA8237A, 0x00, VIA133, 0x00, ATA_UDMA6, "8237A" },
+ { ATA_VIA8237S, 0x00, VIA133, 0x00, ATA_UDMA6, "8237S" },
{ ATA_VIA8251, 0x00, VIA133, 0x00, ATA_UDMA6, "8251" },
{ 0, 0, 0, 0, 0, 0 }};
static struct ata_chip_id new_ids[] =
@@ -5102,6 +5104,7 @@
{ ATA_VIA6420, 0x00, 7, 0x00, ATA_SA150, "6420" },
{ ATA_VIA6421, 0x00, 6, VIABAR, ATA_SA150, "6421" },
{ ATA_VIA8237A, 0x00, 7, 0x00, ATA_SA150, "8237A" },
+ { ATA_VIA8237S, 0x00, 7, 0x00, ATA_SA150, "8237S" },
{ ATA_VIA8251, 0x00, 0, VIAAHCI, ATA_SA300, "8251" },
{ 0, 0, 0, 0, 0, 0 }};
char buffer[64];
==== //depot/projects/vimage/src/sys/dev/ata/ata-pci.h#6 (text+ko) ====
@@ -23,7 +23,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-pci.h,v 1.78 2007/09/10 19:16:39 simon Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.80 2007/10/04 19:17:16 sos Exp $
*/
/* structure holding chipset config info */
@@ -86,6 +86,7 @@
#define ATA_AMD766 0x74111022
#define ATA_AMD768 0x74411022
#define ATA_AMD8111 0x74691022
+#define ATA_AMD5536 0x209a1022
#define ATA_ACER_LABS_ID 0x10b9
#define ATA_ALI_1533 0x153310b9
@@ -357,6 +358,7 @@
#define ATA_VIA8235 0x31771106
#define ATA_VIA8237 0x32271106
#define ATA_VIA8237A 0x05911106
+#define ATA_VIA8237S 0x53371106
#define ATA_VIA8251 0x33491106
#define ATA_VIA8361 0x31121106
#define ATA_VIA8363 0x03051106
==== //depot/projects/vimage/src/sys/dev/bge/if_bge.c#8 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.197 2007/06/04 18:25:03 dwmalone Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.198 2007/09/30 11:05:14 marius Exp $");
/*
* Broadcom BCM570x family gigabit ethernet driver for FreeBSD.
@@ -2181,13 +2181,14 @@
bge_has_multiple_ports(struct bge_softc *sc)
{
device_t dev = sc->bge_dev;
- u_int b, s, f, fscan;
+ u_int b, d, f, fscan, s;
+ d = pci_get_domain(dev);
b = pci_get_bus(dev);
s = pci_get_slot(dev);
f = pci_get_function(dev);
for (fscan = 0; fscan <= PCI_FUNCMAX; fscan++)
- if (fscan != f && pci_find_bsf(b, s, fscan) != NULL)
+ if (fscan != f && pci_find_dbsf(d, b, s, fscan) != NULL)
return (1);
return (0);
}
==== //depot/projects/vimage/src/sys/dev/cardbus/cardbus.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus.c,v 1.65 2007/05/16 23:40:08 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus.c,v 1.66 2007/09/30 11:05:14 marius Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -162,12 +162,13 @@
{
device_t brdev = device_get_parent(cbdev);
device_t child;
+ int bus, domain, slot, func;
int cardattached = 0;
- int bus, slot, func;
int cardbusfunchigh = 0;
cardbus_detach_card(cbdev); /* detach existing cards */
POWER_ENABLE_SOCKET(brdev, cbdev);
+ domain = pcib_get_domain(cbdev);
bus = pcib_get_bus(cbdev);
slot = 0;
/* For each function, set it up and try to attach a driver to it */
@@ -175,7 +176,7 @@
struct cardbus_devinfo *dinfo;
dinfo = (struct cardbus_devinfo *)
- pci_read_device(brdev, bus, slot, func,
+ pci_read_device(brdev, domain, bus, slot, func,
sizeof(struct cardbus_devinfo));
if (dinfo == NULL)
continue;
==== //depot/projects/vimage/src/sys/dev/gem/if_gem.c#5 (text+ko) ====
@@ -28,10 +28,10 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.43 2007/06/16 23:27:59 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.44 2007/09/26 21:14:17 marius Exp $");
/*
- * Driver for Sun GEM ethernet controllers.
+ * Driver for Apple GMAC, Sun ERI and Sun GEM Ethernet controllers
*/
#if 0
@@ -80,7 +80,11 @@
#include <dev/gem/if_gemreg.h>
#include <dev/gem/if_gemvar.h>
+CTASSERT(powerof2(GEM_NRXDESC) && GEM_NRXDESC >= 32 && GEM_NRXDESC <= 8192);
+CTASSERT(powerof2(GEM_NTXDESC) && GEM_NTXDESC >= 32 && GEM_NTXDESC <= 8192);
+
#define TRIES 10000
+
/*
* The GEM hardware support basic TCP/UDP checksum offloading. However,
* the hardware doesn't compensate the checksum for UDP datagram which
@@ -102,14 +106,16 @@
static void gem_init(void *);
static void gem_init_locked(struct gem_softc *);
static void gem_init_regs(struct gem_softc *);
-static int gem_ringsize(int sz);
+static u_int gem_ringsize(u_int);
static int gem_meminit(struct gem_softc *);
static struct mbuf *gem_defrag(struct mbuf *, int, int);
static int gem_load_txmbuf(struct gem_softc *, struct mbuf **);
static void gem_mifinit(struct gem_softc *);
static int gem_bitwait(struct gem_softc *, bus_addr_t, u_int32_t,
u_int32_t);
+static void gem_reset(struct gem_softc *);
static int gem_reset_rx(struct gem_softc *);
+static void gem_reset_rxdma(struct gem_softc *sc);
static int gem_reset_tx(struct gem_softc *);
static int gem_disable_rx(struct gem_softc *);
static int gem_disable_tx(struct gem_softc *);
@@ -124,9 +130,6 @@
static void gem_rint_timeout(void *);
#endif
static void gem_tint(struct gem_softc *);
-#ifdef notyet
-static void gem_power(int, void *);
-#endif
devclass_t gem_devclass;
DRIVER_MODULE(miibus, gem, miibus_driver, miibus_devclass, 0, 0);
@@ -149,7 +152,6 @@
struct gem_softc *sc;
{
struct ifnet *ifp;
- struct mii_softc *child;
int i, error;
u_int32_t v;
@@ -164,10 +166,7 @@
/* Make sure the chip is stopped. */
ifp->if_softc = sc;
- GEM_LOCK(sc);
- gem_stop(ifp, 0);
gem_reset(sc);
- GEM_UNLOCK(sc);
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
@@ -257,11 +256,73 @@
sc->sc_rxsoft[i].rxs_mbuf = NULL;
}
+ /* Bad things will happen when touching this register on ERI. */
+ if (sc->sc_variant != GEM_SUN_ERI)
+ bus_write_4(sc->sc_res[0], GEM_MII_DATAPATH_MODE,
+ GEM_MII_DATAPATH_MII);
+
gem_mifinit(sc);
- if ((error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus, gem_mediachange,
- gem_mediastatus)) != 0) {
- device_printf(sc->sc_dev, "phy probe failed: %d\n", error);
+ /*
+ * Look for an external PHY.
+ */
+ error = ENXIO;
+ v = bus_read_4(sc->sc_res[0], GEM_MIF_CONFIG);
+ if ((v & GEM_MIF_CONFIG_MDI1) != 0) {
+ v |= GEM_MIF_CONFIG_PHY_SEL;
+ bus_write_4(sc->sc_res[0], GEM_MIF_CONFIG, v);
+ switch (sc->sc_variant) {
+ case GEM_SUN_ERI:
+ sc->sc_phyad = GEM_PHYAD_EXTERNAL;
+ break;
+ default:
+ sc->sc_phyad = -1;
+ break;
+ }
+ error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus,
+ gem_mediachange, gem_mediastatus);
+ }
+
+ /*
+ * Fall back on an internal PHY if no external PHY was found.
+ */
+ if (error != 0 && (v & GEM_MIF_CONFIG_MDI0) != 0) {
+ v &= ~GEM_MIF_CONFIG_PHY_SEL;
+ bus_write_4(sc->sc_res[0], GEM_MIF_CONFIG, v);
+ switch (sc->sc_variant) {
+ case GEM_SUN_ERI:
+ case GEM_APPLE_K2_GMAC:
+ sc->sc_phyad = GEM_PHYAD_INTERNAL;
+ break;
+ case GEM_APPLE_GMAC:
+ sc->sc_phyad = GEM_PHYAD_EXTERNAL;
+ break;
+ default:
+ sc->sc_phyad = -1;
+ break;
+ }
+ error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus,
+ gem_mediachange, gem_mediastatus);
+ }
+
+ /*
+ * Try the external PCS SERDES if we didn't find any PHYs.
+ */
+ if (error != 0 && sc->sc_variant == GEM_SUN_GEM) {
+ bus_write_4(sc->sc_res[0], GEM_MII_DATAPATH_MODE,
+ GEM_MII_DATAPATH_SERDES);
+ bus_write_4(sc->sc_res[0], GEM_MII_SLINK_CONTROL,
+ GEM_MII_SLINK_LOOPBACK | GEM_MII_SLINK_EN_SYNC_D);
+ bus_write_4(sc->sc_res[0], GEM_MII_CONFIG,
+ GEM_MII_CONFIG_ENABLE);
+ sc->sc_flags |= GEM_SERDES;
+ sc->sc_phyad = GEM_PHYAD_EXTERNAL;
+ error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus,
+ gem_mediachange, gem_mediastatus);
+ }
+
+ if (error != 0) {
+ device_printf(sc->sc_dev, "PHY probe failed: %d\n", error);
goto fail_rxd;
}
sc->sc_mii = device_get_softc(sc->sc_miibus);
@@ -293,64 +354,10 @@
IFQ_SET_MAXLEN(&ifp->if_snd, GEM_TXQUEUELEN);
ifp->if_snd.ifq_drv_maxlen = GEM_TXQUEUELEN;
IFQ_SET_READY(&ifp->if_snd);
- /*
- * Walk along the list of attached MII devices and
- * establish an `MII instance' to `phy number'
- * mapping. We'll use this mapping in media change
- * requests to determine which phy to use to program
- * the MIF configuration register.
- */
- for (child = LIST_FIRST(&sc->sc_mii->mii_phys); child != NULL;
- child = LIST_NEXT(child, mii_list)) {
- /*
- * Note: we support just two PHYs: the built-in
- * internal device and an external on the MII
- * connector.
- */
- if (child->mii_phy > 1 || child->mii_inst > 1) {
- device_printf(sc->sc_dev, "cannot accomodate "
- "MII device %s at phy %d, instance %d\n",
- device_get_name(child->mii_dev),
- child->mii_phy, child->mii_inst);
- continue;
- }
- sc->sc_phys[child->mii_inst] = child->mii_phy;
- }
-
- /*
- * Now select and activate the PHY we will use.
- *
- * The order of preference is External (MDI1),
- * Internal (MDI0), Serial Link (no MII).
- */
- if (sc->sc_phys[1]) {
-#ifdef GEM_DEBUG
- printf("using external phy\n");
-#endif
- sc->sc_mif_config |= GEM_MIF_CONFIG_PHY_SEL;
- } else {
-#ifdef GEM_DEBUG
- printf("using internal phy\n");
-#endif
- sc->sc_mif_config &= ~GEM_MIF_CONFIG_PHY_SEL;
- }
- bus_write_4(sc->sc_res[0], GEM_MIF_CONFIG,
- sc->sc_mif_config);
/* Attach the interface. */
ether_ifattach(ifp, sc->sc_enaddr);
-#ifdef notyet
- /*
- * Add a suspend hook to make sure we come back up after a
- * resume.
- */
- sc->sc_powerhook = powerhook_establish(gem_power, sc);
- if (sc->sc_powerhook == NULL)
- device_printf(sc->sc_dev, "WARNING: unable to establish power "
- "hook\n");
-#endif
-
/*
* Tell the upper layer(s) we support long frames/checksum offloads.
*/
@@ -455,7 +462,7 @@
* On resume all registers have to be initialized again like
* after power-on.
*/
- sc->sc_inited = 0;
+ sc->sc_flags &= ~GEM_INITED;
if (ifp->if_flags & IFF_UP)
gem_init_locked(sc);
GEM_UNLOCK(sc);
@@ -580,7 +587,7 @@
return;
if (nsegs != 1) {
/* can't happen... */
- panic("gem_cddma_callback: bad control buffer segment count");
+ panic("%s: bad control buffer segment count", __func__);
}
sc->sc_cddma = segs[0].ds_addr;
}
@@ -638,7 +645,7 @@
return (0);
}
-void
+static void
gem_reset(sc)
struct gem_softc *sc;
{
@@ -651,11 +658,11 @@
/* Do a full reset */
bus_write_4(sc->sc_res[0], GEM_RESET, GEM_RESET_RX | GEM_RESET_TX);
+ bus_barrier(sc->sc_res[0], GEM_RESET, 4, BUS_SPACE_BARRIER_WRITE);
if (!gem_bitwait(sc, GEM_RESET, GEM_RESET_RX | GEM_RESET_TX, 0))
device_printf(sc->sc_dev, "cannot reset device\n");
}
-
/*
* gem_rxdrain:
*
@@ -698,7 +705,7 @@
callout_stop(&sc->sc_tick_ch);
#ifdef GEM_RINT_TIMEOUT
callout_stop(&sc->sc_rx_ch);
-#endif
+#endif
/* XXX - Should we reset these instead? */
gem_disable_tx(sc);
@@ -728,13 +735,14 @@
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+ sc->sc_flags &= ~GEM_LINK;
sc->sc_wdog_timer = 0;
}
/*
* Reset the receiver
*/
-int
+static int
gem_reset_rx(sc)
struct gem_softc *sc;
{
@@ -745,24 +753,63 @@
*/
gem_disable_rx(sc);
bus_write_4(sc->sc_res[0], GEM_RX_CONFIG, 0);
- /* Wait till it finishes */
- if (!gem_bitwait(sc, GEM_RX_CONFIG, 1, 0))
- device_printf(sc->sc_dev, "cannot disable read dma\n");
+ bus_barrier(sc->sc_res[0], GEM_RX_CONFIG, 4, BUS_SPACE_BARRIER_WRITE);
+ if (!gem_bitwait(sc, GEM_RX_CONFIG, GEM_RX_CONFIG_RXDMA_EN, 0))
+ device_printf(sc->sc_dev, "cannot disable RX DMA\n");
- /* Wait 5ms extra. */
- DELAY(5000);
-
/* Finally, reset the ERX */
bus_write_4(sc->sc_res[0], GEM_RESET, GEM_RESET_RX);
- /* Wait till it finishes */
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list