Commit graph

56943 commits

Author SHA1 Message Date
Pyun YongHyeon e65bed95af Add bge(4) support for big-endian architectures(part 2/2).
- removed unused funtion bge_handle_events().
 - removed bus_dmamap_destroy(9) calls for DMA maps created by
   bus_dmamem_alloc(9). This should fix panics seen on sparc64
   in device detach.
 - added check for parent DMA tag creation.
 - switched to use __NO_STRICT_ALIGNMENT as bge(4) supports all
   architectures.
 - added missing bus_dmamap_sync(9) in bge_txeof().
 - added missing bus_dmamap_sync(9) in bge_encap().
 - corrected memory synchronization operation on status block.
   As the driver just read status block that was DMAed by NIC it
   should use BUS_DMASYNC_POSTREAD. Likewise the driver does not
   need to write status block back, so remove unnecessary
   bus_dmamap_sync(9) calls in bge_intr().
 - corrected memory synchronization operation on RX return ring.
   The driver only read the block so remove unnecessary
   bus_dmamap_sync(9) in bge_rxeof().
 - force bus_dmamap_sync(9) for only modified descriptors. Blindly
   synching all desciptor rings would reduce performance.
 - call bus_dmamap_sync(9) for DMA maps that were modified in bge_rxeof().

Reviewed by:	jkim(initial version)
Tested by:	glebius(i386), jkim(amd64 initial version)
2005-12-22 01:44:27 +00:00
Andrew Thompson 73ff045c57 Add RFC 3378 EtherIP support. This change makes it possible to add gif
interfaces to bridges, which will then send and receive IP protocol 97 packets.
Packets are Ethernet frames with an EtherIP header prepended.

Obtained from:	NetBSD
MFC after:	2 weeks
2005-12-21 21:29:45 +00:00
Alan Cox 373d1a3f8c Maintain the vnode lock throughout elfN_load_file() rather than releasing
it and reacquiring it in vrele().  Consequently, there is no reason to
increase the reference count on the vm object caching the file's pages.
Reviewed by: tegge

Eliminate unused parameters to elfN_load_file().
2005-12-21 18:58:40 +00:00
Ruslan Ermilov 4d5f30e06e Drivers for AMD-8111 and NVIDIA nForce2/3/4 SMBus 2.0 controllers. 2005-12-21 15:49:51 +00:00
John Baldwin 87f34c405b Use ETHER_ADDR_LEN rather than hardcoding 6. 2005-12-21 15:15:43 +00:00
Olivier Houchard 3ff539810b Ooops, I removed the wrong bits.
This unbreak boot from a VA which is different from the PA.
2005-12-21 15:02:31 +00:00
Olivier Houchard e279681cb5 Remove #undef DDB I shouldn't have committed. 2005-12-21 15:01:49 +00:00
Ruslan Ermilov f5fd56117e Add missing MODULE_DEPEND() so that ppbus.ko and these .ko's can be
loaded dynamically.
2005-12-21 10:54:47 +00:00
Andrew Thompson 1e4200620a As of r1.21 all broadcast packets are reprocessed by ether_input as arriving on
the bridge, this caused these packets to show up twice via bpf. Do not process
them twice with BPF_TAP.

MFC after:	3 days
2005-12-21 09:39:59 +00:00
Yoshihiro Takahashi 6fa7cb4445 MFi386: revisions 1.34 and 1.36. 2005-12-21 06:10:42 +00:00
Yoshihiro Takahashi 8b891b8d17 MFi386: revision 1.8. 2005-12-21 06:09:47 +00:00
Yoshihiro Takahashi 2d908c8204 MFi386: revision 1.46. 2005-12-21 06:09:09 +00:00
Sam Leffler 52b321acb3 add LINT build
Discussed with:	grehan
MFC after:	1 week
2005-12-21 02:51:41 +00:00
Maxim Sobolev e4f5866fd5 For the cases when loading bzip2-compressed kernels enabled use last
3MB of physical memory for heap instead of range between 1MB and 4MB.
This makes this feature working with PAE and amd64 kernels, which are
loaded at 2MB. Teach i386_copyin() to avoid using range allocated by
heap in such case, so that it won't trash heap in the low memory
conditions.

This should make loading bzip2-compressed kernels/modules/mfs images
generally useable, so that re@ team is welcome to evaluate merits
of using this feature in the installation CDs.

Valuable suggestions by:	jhb
2005-12-21 02:17:58 +00:00
Sam Leffler af72fe981b don't assume char is signed
MFC after:	1 week
2005-12-21 00:19:08 +00:00
Sam Leffler 1528156d71 bandaid assumption that char is signed
MFC after:	1 week
2005-12-21 00:09:11 +00:00
Alan Cox ff6f03c7cd Eliminate an unneeded (vm_prot_t) parameter from two functions. Eliminate
unnecessary uses of a local variable.

Reviewed by: tegge
2005-12-20 23:42:18 +00:00
Pav Lucistnik 612477f7ac - Fix type in previous commit; unbreak build
Approved by:	ssouhlal
Pointy hat to:	pav
2005-12-20 23:07:38 +00:00
Warner Losh b0493a9984 Move device 'cs' into i386/pc98 specific NOTES. It is broken on ppc
because it uses i386 specific calls.  Maybe it could be added to
amd64, but I'm not so sure it would work there so I've not added it
there.
2005-12-20 23:00:11 +00:00
John Baldwin 33181681c7 - Use PCIR_BAR() macro for the BAR for the aperture.
- Axe macros used for walking PCI capabilities list.  We now ask the PCI
  bus to find caps for us rather than doing it in the drm and agp drivers.
2005-12-20 22:45:24 +00:00
John Baldwin e9aa66d283 - Bump FreeBSD version for the hostb(4) and vgapci(4) drivers as well as
the addition of pci_find_extcap().
- Change the drm drivers to attach to vgapci.  This is #ifdef'd so the
  code can be shared across branches.
- Use pci_find_extcap() to look for AGP and PCIE capabilities in drm.
- GC all the drmsub stuff for i810/i830/i915.  The agp and drm devices are
  now both children of vgapci.
2005-12-20 22:44:36 +00:00
John Baldwin a1ee13ef19 Attach to the vgapci device rather than pci. 2005-12-20 22:42:16 +00:00
John Baldwin 8e8e46ccfc Add a vgapci(4) stub device driver for VGA PCI devices. This device serves
as a bus so that other drivers such as drm(4), acpi_video(4), and agp(4)
can attach to it thus allowing multiple drivers for the same device.  It
also removes the need for the drmsub hack for the i8[13]0/i915 drm and agp
drivers.
2005-12-20 22:41:33 +00:00
John Baldwin 2aacedb237 Add a vgapci(4) stub device driver for VGA PCI devices. This device serves
as a bus so that other drivers such as drm(4), acpi_video(4), and agp(4)
can attach to it thus allowing multiple drivers for the same device.  It
also removes the need for the drmsub hack for the i8[13]0/i915 drm and agp
drivers.
2005-12-20 22:35:39 +00:00
Paul Saab efbbe8fa79 Remove GIANT from device random.
Submitted by:	ups
2005-12-20 21:41:52 +00:00
John Baldwin c626f1fe9a Change the various AGP drivers that attach to the Host-PCI bridge device to
attach to the hostb driver instead.  This means that agp can now be loaded
at runtime (in theory at least).  Also, the drivers no longer have to
explicity call device_verbose() to cancel out any earlier calls to
device_quiet() by the hostb(4) driver (this shows a limitation in new-bus,
drivers really shouldn't be doing device_quiet() until they know they are
going to drive that device, i.e. in attach).
2005-12-20 21:12:26 +00:00
John Baldwin 5b2119223e Move the hostb driver out of the i386 and amd64 PCI code (where it was
duplicated anyways) and into a single MI driver.  Extend the driver a bit
to implement the bus and PCI kobj interfaces such that other drivers can
attach to it and transparently act as if their parent device is the PCI
bus (for the most part).
2005-12-20 21:09:45 +00:00
Ruslan Ermilov 9a77af905e Create "smb" device when "smbus" device is attached, so that it's
possible to load/unload smb.ko and smbus-implementing driver in
any order, and get expected results.
2005-12-20 21:06:57 +00:00
John Baldwin c8d81a41f4 Change the agp_find_device() to return the first agp device that has been
attached to a driver rather than always returning agp0.
2005-12-20 21:06:43 +00:00
Olivier Houchard b861e5bd43 Rather than appending it at the end of the kernel build process, give the
ELF trampoline build its own target, "trampoline".
It makes it possible to construct a bootable gzipped kernel without having
to build in the same process.
2005-12-20 20:57:20 +00:00
John Baldwin 5bcf484019 Don't map the AGP aperture into contiguous KVA. The various graphics
drivers already map sections into KVA as needed anyway.  Note that this
will probably break the nvidia driver, but I will coordinate to get that
fixed.

MFC after:	2 weeks
2005-12-20 20:05:21 +00:00
John Baldwin 4c2546c1a9 Destroy the /dev device before destroying the mutex or releasing resources
rather than afterwards.

MFC after:	1 week
2005-12-20 20:03:16 +00:00
John Baldwin 04d6a912e4 Use pci_find_extcap() to search for AGP capabilities (PCIY_AGP). 2005-12-20 19:58:28 +00:00
John Baldwin 4f9795b9fe Add a new method PCI_FIND_EXTCAP() to the pci bus interface that is used
to search for a specific extended capability.  If the specified capability
is found for the given device, then the function returns success and
optionally returns the offset of that capability.  If the capability is
not found, the function returns an error.
2005-12-20 19:57:47 +00:00
Pav Lucistnik f651aa2d2f - Ignore incorrect CSW signatures on my PURE PocketDab 2000 player
Approved by:	ssouhlal
MFC after:	1 week
2005-12-20 16:21:17 +00:00
Ruslan Ermilov d01c2eedae Stop creating duplicate "smb" devices when unloading/loading smb.ko,
using the protection mechanisms described in device_add_child(9).
2005-12-20 14:26:47 +00:00
Tor Egge b898bb1be3 Don't access fs->first_object after dropping reference to it.
The result could be a missed or extra giant unlock.

Reviewed by:	alc
2005-12-20 12:27:59 +00:00
Xin LI 92e0a4a2a4 Use consistent indent character as other IPPROTO_* lines did. 2005-12-20 09:38:03 +00:00
George V. Neville-Neil 496f9fc522 Add protocol number for SCTP.
Submitted by:	Randall Stewart rrs at cisco.com
MFC after:	1 week
2005-12-20 09:24:04 +00:00
Maxim Sobolev 90ec8e27c3 Unbreak pc98 after my last changes to i386. 2005-12-20 08:54:30 +00:00
Olivier Houchard 796baad9e6 - Disable the instruction cache very early, until it's time to enable it again.
- Revamp the code that jumps from physical to virtual address.
2005-12-20 01:29:17 +00:00
Olivier Houchard fe516e3c17 Make the elf trampoline disable the MMU, and link it at physical address,
to avoid bad surprises.
2005-12-20 01:28:17 +00:00
Pawel Jakub Dawidek c505fe7a0f Reduce Giant scope a bit, as fdrop() is believed to be MPSAFE.
The purpose of this change is consistency (not performance improvement:)),
as it was hard to tell if fdrop() is MPSAFE or not when I saw it sometimes
under the Giant and sometimes without it.

Glanced at by:	ssouhlal, kan
2005-12-20 00:49:59 +00:00
Pawel Jakub Dawidek ade9b797a0 vfs_mount_alloc() always returns 0, but what we really want is newly
allocated 'struct mount *' pointer, so simplify code a bit and return
the pointer directly.

Reviewed by:	ssouhlal
2005-12-20 00:43:51 +00:00
Max Laier 602d8f4030 Move PFSTATE_EXPIRING from sync_flags to a new local_flags. sync_flags has
special handling when zero.  This caused no PFSYNC_ACT_DEL message and thus
disfunction of pfflowd and state synchronisation in general.

Discovered by:	thompsa
Good catch by:	thompsa
MFC after:	7 days
2005-12-20 00:33:33 +00:00
Marcel Moolenaar f56d8bf106 o Add the GNU symbol versioning section constants (SHT_GNU_verdef,
SHT_GNU_verneed, SHT_GNU_versym),
o  Fix the definition of DT_HIOS -- it was short an 'f'...
2005-12-19 20:20:36 +00:00
Pawel Jakub Dawidek 003ba8a000 Use 'td' instead of 'curthread'. 2005-12-19 16:27:13 +00:00
Maxim Sobolev f668cd5df7 If LOADER_BZIP2_SUPPORT is defined allocate heap in the 1MB-4MB range to
provide enough room for decompression (up to 2.5MB is necessary). This
should be safe to do since we load i386 kernels after 8MB mark now, so
that 16MB is the minimum amount of RAM necessary to even boot FreeBSD.

This makes bzip2-support  practically useable.
2005-12-19 09:26:42 +00:00
Maxim Sobolev 915dad0e92 Long-long time ago, when the trees were large and memory expensive amount of
memory directly available to loader(8) and friends was limited to 640K on i386.
Those times have passed long time ago and now loader(8) can directly access
up to 4GB of RAM at least theoretically. At the same time, there are several
places where it's assumed that malloc() will only allocate memory within
first megabyte.

Remove that assumption by allocating appropriate bounce buffers for BIOS
calls on stack where necessary.

This allows using memory above first megabyte for heap if necessary.
2005-12-19 09:00:11 +00:00
David Xu a1d4fe69d2 Fix a bug in slice calculation code, current code uses hz but
sched_clock() is called by state clock.

Submitted by: taku at tackymt dot homeip dot net
2005-12-19 08:26:09 +00:00
Pawel Jakub Dawidek b91df0e29e MFp4: Typo fix (without it the XML GEOM tree wasn't consistent).
Reported by:	Eric Anderson <anderson@centtech.com>
2005-12-19 06:05:40 +00:00
Pawel Jakub Dawidek 1236085a67 Style nit. 2005-12-19 03:43:48 +00:00
Pawel Jakub Dawidek ef5d77f464 Allow to use TransFlash drive, which can be found in Motorola E398 Mobile Phone.
PR:		usb/89889
Submitted by:	Wojciech A. Koszek <dunstan@freebsd.czest.pl>
MFC after:	1 week
2005-12-19 03:27:28 +00:00
Pawel Jakub Dawidek a94d0a9d19 - Document another spare flag (0x00000010).
- Add a 'XXX' comment about MNT_ACLS and MNT_BYFSID flags collision and
  explain why it is harmless.
- Add a colon after 'XXX' for consistency.
2005-12-19 03:02:54 +00:00
Marcel Moolenaar f94b154580 Bump __FreeBSD_version to 700009 because:
1. The ELF-64 typedefs are now standardized, so that the libelf port
   (devel/libelf) does not need to compensate for not having the
   Elf64_Xword and Elf64_Sxword types.
2. ELF Symbol versioning support has been added. This also affects
   the libelf port (though configure should detect this correctly).
2005-12-19 00:13:11 +00:00
Florent Thoumie 949565fb05 - Add ProductID for the iPod Nano.
Reported by:	Nathan Kay <mcnate@numenor.net>
Approved by:	ssouhlal
MFC after:	3 days
2005-12-18 22:25:43 +00:00
Gleb Smirnoff 14bbd30f2e Since BGE_MBX_TX_HOST_PROD0_LO register is write-only to software,
we can cache its value in the softc. Eliminates one PCI register
write per call to bge_start().

A 1.8% speedup for UDP_RR test on my old box.

Obtained from:	NetBSD(jonathan) via delphij
2005-12-18 20:26:12 +00:00
Alexander Kabaev 0eb88f2029 Implement ELF symbol versioning using GNU semantics. This code aims
to be compatible with symbol versioning support as implemented by
GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning
and LSB 3.0.

Implement dlvsym() function to allow lookups for a specific version of
a given symbol.
2005-12-18 19:43:33 +00:00
Gleb Smirnoff 3939390679 Add a knob to suppress logging of attempts to modify
permanent ARP entries.

Submitted by:	Andrew Alcheyev <buddy telenet.ru>
2005-12-18 19:11:56 +00:00
Gleb Smirnoff d147662cd3 - Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in
case if memory allocation failed.
- Remove fourth argument from VLAN_INPUT_TAG(), that was used
  incorrectly in almost all drivers. Indicate failure with
  mbuf value of NULL.

In collaboration with:	yongari, ru, sam
2005-12-18 18:24:27 +00:00
Nate Lawson bd6b217753 Remove the KTR for hardclock completely. It seems to not be useful.
Requested by:	jhb
2005-12-18 18:11:55 +00:00
Nate Lawson 1335c4df32 Restore KTR_CRITICAL but conditionally compile it in as KTR_SCHED.
Requested by:	scottl, jhb
2005-12-18 18:10:57 +00:00
Ariff Abdullah 1e558b7ecb Precision for AFMT_x24_yE and AFMT_x32_yE should be 24 and 32, respectively.
Submitted by:	Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>
2005-12-18 16:50:06 +00:00
Yoshihiro Takahashi b8a8ce140f Merged from sys/dev/sio/sio.c revision 1.463. 2005-12-18 11:16:31 +00:00
Marcel Moolenaar 757686b115 Make our ELF64 type definitions match standards. In particular this
means:
o  Remove Elf64_Quarter,
o  Redefine Elf64_Half to be 16-bit,
o  Redefine Elf64_Word to be 32-bit,
o  Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o  Use Elf_Size in MI code to abstract the difference between
   Elf32_Word and Elf64_Word.
o  Add Elf_Ssize as the signed counterpart of Elf_Size.

MFC after: 2 weeks
2005-12-18 04:52:37 +00:00
Marcel Moolenaar f4f1e650cf Get in sync with current ELF definitions. In particular this means:
o  Remove the unused and non-standard SHT_NUM, PT_COUNT and DT_COUNT.
o  Add the STV_DEFAULT, STV_INTERNAL, STV_HIDDEN and STV_PROTECTED
   symbol visibility constants.
o  Add the ELF32_ST_VISIBILITY and ELF64_ST_VISIBILITY macros to
   get the symbol visibility from the st_other field.
o  Add the ELFOSABI_AIX, ELFOSABI_OPENVMS and ELFOSABI_NSK constants.
o  Add the ET_LOOS, ET_HIOS, ET_LOPROC and ET_HIPROC constants.
o  Further flesh out the list of machine types. Note that EM_ALPHA
   remains non-standard. The standard value for EM_ALPHA is given
   by EM_ALPHA_STD (which is a non-standard name :-)
o  Add the SHN_LOOS, SHN_HIOS and SHN_XINDEX constants.
o  Add the SHT_INIT_ARRAY, SHT_FINI_ARRAY, SHT_PREINIT_ARRAY, SHT_GROUP
   and SHT_SYMTAB_SHNDX constants.
o  Add the SHF_MERGE, SHF_STRINGS, SHF_INFO_LINK, SHF_LINK_ORDER,
   SHF_OS_NONCONFORMING, SHF_GROUP and SHF_MASKOS constants.
o  Add the PF_MASKOS and PF_MASKPROC constants.
o  Add the STB_LOOS andf STB_HIOS constants.
o  Add the STT_COMMON, STT_LOOS and STT_HIOS constants.

MFC after: 1 week
2005-12-18 00:09:12 +00:00
Marcel Moolenaar e3247118ea Fix the ELF64_R_TYPE and ELF64_R_INFO macros. The symbol type is an
32-bit entity. Also, don't cast the resulting symbol type value to
a datatype smaller than the st_info field type as a quick way to
mask off the upper bits as it may cause inconsistent behaviour when
the macro is used (without explicit casting) on varargs functions.

MFC after: 1 week
2005-12-17 23:48:07 +00:00
Alan Cox 044bbbb523 Correct a long-standing problem in elfN_map_insert(): In order to copy a
page to user space, the user space mapping must allow write access.

In collaboration with: tegge@
MFC after: 3 weeks
2005-12-17 19:40:47 +00:00
Andrew Thompson 9d5e4aa8b1 Use M_ZERO for the bridge_iflist to ensure there are no unexpected suprises. 2005-12-17 10:12:20 +00:00
Andrew Thompson 6b74382014 Minor whitespace cleanup. 2005-12-17 10:03:48 +00:00
David E. O'Brien 6acb2659e2 trim trailing ^I 2005-12-17 07:09:17 +00:00
Andrew Thompson e0a87e8acd Change from a callback in if_ethersubr to using EVENTHANDLER in order to detach
span ports when they disappear. The span port does not have a pointer to the
softc so revert r1.31 and bring back the softc linked-list.

MFC after:	2 weeks
2005-12-17 06:33:51 +00:00
Nate Lawson 8615fd8696 Clean up unused or poorly utilized KTR values. Remove KTR_FS, KTR_KGDB,
and KTR_IO as they were never used.  Remove KTR_CLK since it was only
used for hardclock firing and use KTR_INTR there instead.  Remove
KTR_CRITICAL since it was only used for crit enter/exit and use
KTR_CONTENTION instead.
2005-12-17 03:57:10 +00:00
Ruslan Ermilov aa4f8911d7 Backout pseudo nForce2/3/4 support. These devices (as well as
AMD-8111 SMBus 2.0 controller) are all SMBus 2.0 controllers,
and need another implementation of SMBus access methods, while
this driver supports AMD-756 SMBus 1.0 controller and clones,
including AMD-8111 SMBus 1.0 controller.

Tested by:	Vladimir Timofeev (0x006410de),
		mezz (0x008410de),
		ru (0x00d410de)

All of us got the same(!) nonsense when running ``mbmon -S'',
repeated every four rows.
2005-12-16 22:58:51 +00:00
John Baldwin 5c8b444153 - Use uintfptr_t rather than int for the kernel profiling index (though it
really should be a fptrdiff_t if we had that) in profclock().
- Don't try to profile kernel pc's that are >= the kernel lowpc to avoid
  underflows when computing a profiling index.
- Use the PC_TO_I() macro to compute the kernel profiling index rather than
  doing it inline.

Discussed with:	bde
2005-12-16 22:11:52 +00:00
John Baldwin cb49fcd145 Change the addupc_*() functions to use the uintfptr_t type for pc rather
than uintptr_t as that is technically more correct.
2005-12-16 22:08:32 +00:00
John Baldwin 8088aac4c4 GC some unused frame types.
Approved by:	grehan
2005-12-16 22:07:41 +00:00
Alan Cox 584716b08a Style: The second argument to vm_map_find() should be NULL instead of 0. 2005-12-16 19:14:25 +00:00
Alan Cox da61b9a69e Use sf_buf_alloc() instead of vm_map_find() on exec_map to create the
ephemeral mappings that are used as the source for three copy
operations from kernel space to user space.  There are two reasons for
making this change: (1) Under heavy load exec_map can fill up causing
vm_map_find() to fail.  When it fails, the nascent process is aborted
(SIGABRT).  Whereas, this reimplementation using sf_buf_alloc()
sleeps.  (2) Although it is possible to sleep on vm_map_find()'s
failure until address space becomes available (see kmem_alloc_wait()),
using sf_buf_alloc() is faster.  Furthermore, the reimplementation
uses a CPU private mapping, avoiding a TLB shootdown on
multiprocessors.

Problem uncovered by: kris@
Reviewed by: tegge@
MFC after: 3 weeks
2005-12-16 18:34:14 +00:00
Xin LI 6ba9ec2d09 In pipe_write(): when uiomove() fails, do not spin on it forever.
Submitted by:	Kostik Belousov <kostikbel at gmail.com> on -current@
Message-ID:	<20051216151016.GE84442@deviant.zoral.local>
MFC After:	3 weeks
2005-12-16 18:32:39 +00:00
Bill Paul a807264e92 In ndis_rxeof_eth(), avoid acquiring the NDIS miniport block spinlock for
serialized miniports when updating the packet list.

This fixes a deadlock that can occur with the Ralink RT2500 driver
when using wpa_supplicant.
2005-12-16 17:21:28 +00:00
Ruslan Ermilov 1a40739a00 Fix PCI ID of the AMD-8111 System Management controller so it matches
SMBus 1.0 and not SMBus 2.0.

AMD-8111 hub (datasheet is publically available) implements both SMBus
2.0 (a separate PCI device) and SMBus 1.0 (a subfunction of the System
Management Controller device with the base I/O address is accessible
through the CSR 0x58).  This driver only supports AMD-756 SMBus 1.0
compatible devices.

With the patched sysutils/xmbmon port (to also fix PCI ID and to enable
smb(4) support), I now get:

pciconf:
none0@pci0:7:2: class=0x0c0500 card=0x746a1022 chip=0x746a1022 rev=0x02 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'AMD-8111 SMBus 2.0 Controller'
    class    = serial bus
    subclass = SMBus
amdpm0@pci0:7:3:        class=0x068000 card=0x746b1022 chip=0x746b1022 rev=0x05 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'AMD-8111 ACPI System Management Controller'
    class    = bridge

dmesg:
amdpm0: <AMD 756/766/768/8111 Power Management Controller> port 0x10e0-0x10ff at device 7.3 on pci0
smbus0: <System Management Bus> on amdpm0

# mbmon -A -d
Summary of Detection:
 * SMB monitor(s)[ioctl:AMD8111]:
  ** Winbond Chip W83627HF/THF/THF-A found at slave address: 0x50.
  ** Analog Dev. Chip ADM1027 found at slave address: 0x5C.
 * ISA monitor(s):
  ** Winbond Chip W83627HF/THF/THF-A found.

I think the confusion comes from the fact that nobody really tried
SMBus with xmbmon :-), since sysutils/xmbmon port doesn't come with
SMBus support enabled, neither in FreeBSD 4, nor in later versions,
so mbmon(1) was just showing the values from the Winbond sensors
accessible through the ISA I/O method (mbmon -I), for me anyway.

On my test machine, the amdpm(4) didn't even attach due to I/O port
allocation failure (who knows what the hell it read from CSR 0x58
of the SMBus 2.0 device :-), which isn't in the CSR space).

I've also checked that lm_sensors.org uses correct PCI ID for SMBus
1.0 of AMD-8111:

i2c-amd756.c:   {PCI_VENDOR_ID_AMD, 0x746B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD8111 },

This driver is analogous to our amdpm.c which supports SMBus 1.0
AMD-756 and compatible devices, including SMBus 1.0 on AMD-8111.

i2c-amd8111.c:  { 0x1022, 0x746a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },

This driver is analogous to nForce-2/3/4, i2c-nforce2.c, which
supports SMBus 2.0, and which our amdpm.c does NOT support
(SMBus 2.0 uses a different, ACPI-unified, API to talk to SMBus).
At least I know for sure it doesn't work with my nForce3.  :-)

(The xmbmon port will be fixed to correct the PCI ID too and to
enable the smb(4) support.)
2005-12-16 15:03:16 +00:00
Ed Maste bd2b686fe8 Add descriptions for sysctl -d.
Approved by:	glebius
Silence from:	rwatson (mentor)
2005-12-16 15:01:44 +00:00
David Xu 03f70aec67 Replace selwakeuppri with selwakeup, let scheduler figure out
appropriate thread priority.
2005-12-16 15:01:16 +00:00
Gleb Smirnoff 6e02dbdfa3 Cleanup __FreeBSD_version. 2005-12-16 13:10:32 +00:00
Pyun YongHyeon e3829d1f54 Add jumbo frame support for architectures with strict alignment.
Reviewed by:	glebius
2005-12-16 08:29:43 +00:00
Søren Schmidt 121b478372 Cleanup the strings for printing chipset names, saves quite some space.
Add a couble new nVidia chips now we are here.
2005-12-16 08:12:13 +00:00
Paul Saab 2514c5bfdd It seems ciss should ignore overrun and underrun on a SCSI INQUIRY
command.  This fixes some weird booting issues on newer versions
of the firmware on the MSA20.

Reported by:	Philippe Pegon <Philippe dot Pegon at crc dot u-strasbg dot fr>
2005-12-16 06:50:55 +00:00
Scott Long 7f512e8f29 Make this compile on 64bit systems. It likely isn't correct, but that can
be sorted out later.
2005-12-16 06:11:22 +00:00
Scott Long 0717619c5c Don peril sensitive sunglasses and jack up the MAX_BPAGES limit to 8192
on amd64.  If you're going to stuff >4GB into your box, reserving 32MB for
bonce pages amounts to a rounding error in the overall scheme of things.
2005-12-16 05:57:18 +00:00
John Baldwin 74a96f4337 Use uintmax_t and %j to print bus dma segment members rather than casting
to long long and using %ll.
2005-12-15 22:12:27 +00:00
John Baldwin 636a309adb Use %t (ptrdiff_t modifier) to print a couple of pointer differences rather
than casting them to int.
2005-12-15 21:57:32 +00:00
Andrew Thompson 7536320f62 It is not safe to use m_copypacket() here as the returned mbuf is readonly,
change to m_dup and keep the alignment on the layer3 header.

MFC after:	1 week
2005-12-15 19:34:39 +00:00
John Baldwin 410d857972 Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1)
which existed to cleanup the linux_osname mutex.  Now that MTX_SYSINIT()
has grown a SYSUNINIT to destroy mutexes on unload, the extra destroy here
was redundant and resulted in panics in debug kernels.

MFC after:	1 week
Reported by:	Goran Gajic ggajic at afrodita dot rcub dot bg dot ac dot yu
2005-12-15 16:30:41 +00:00
Søren Schmidt 5608e472c1 Add support for writing VIA metadata.
Null out the metadata on disks when array is deleted.
2005-12-15 13:30:23 +00:00
Gleb Smirnoff 7e27542a4a o Rewrite bge_encap() to use bus_dmamap_load_mbuf_sg(9), inlining the
callback function bge_dma_map_tx_desc() into the bge_encap() itself.
o If busdma returns EFBIG, try to m_defrag() the packet.

Reviewed by:	yongari
2005-12-15 09:45:53 +00:00
Pyun YongHyeon e907febf6a Add bge(4) support for big-endian architectures(part 1/2).
- Give up endianess support and switch to native-endian format for
   accessing hardware structures. In fact embedded processor for
   BCM57xx is big-endian architure(MIPS) and it requires native-endian
   format for NIC structures.The NIC performs necessary byte/word
   swapping depending on programmed endian type.
 - With above changes all htole16/htole32 calls were gone.
 - Remove bge_vhandle member in softc and changed to use explicit
   register access. This may add additional performance penalty
   that than that of previous memory access. But most of the access
   is performed on initialization phase(e.g. RCB setup), it would be
   negligible.

Due to incorrect use of bus_dma(9) in bge(4) it still panics sparc64
system in device detach path. The issue would be fixed in next patch.

Reviewed by:	jkim (initial version)
Silence from:	ps
Tested by:	glebius
Obtained from:	NetBSD via OpenBSD
2005-12-15 05:48:49 +00:00
Ed Maste 63e6f39011 When using m_dup(9) to copy more than MHLEN bytes of data, don't create an
mbuf chain that starts with a cluster containing just MHLEN bytes.  This
happened because m_dup called m_get or m_getcl depending on the amount of
data to copy, but then always set the size available in the first mbuf to
MHLEN.

Submitted by:	Matt Koivisto <mkoivisto at sandvine dot com>
Approved by:	jmg
Silence from:	rwatson (mentor)
2005-12-14 23:34:26 +00:00
Maxime Henrion e59898ff36 Fix a bunch of SYSCTL_INT() that should have been SYSCTL_ULONG() to
match the type of the variable they are exporting.

Spotted by:	Thomas Hurst <tom@hur.st>
MFC after:	3 days
2005-12-14 22:27:48 +00:00
John Baldwin 05ee80c796 Fix stale comment. 2005-12-14 21:47:02 +00:00