Commit Graph

7662 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
767f578267 Correct module name of my previous commit. 2002-07-15 11:22:37 +00:00
Max Khon
937033e904 fix driver name in DRIVER_MODULE
MFC after:	3 days
2002-07-15 05:05:50 +00:00
Alan Cox
613f5495ed o Lock page queue accesses by vm_page_wire(). 2002-07-14 20:40:32 +00:00
Thomas Moestl
9f6388ba93 Miscellaneous fixes:
- always reinitialize the rx descriptors, even if the mbuf is kept.
  This should fix the hangs on ifconfig that were observed
- on an rx overflow, reinitialize the descriptor so that the interface
  will not hang
- correct some bus_dmamap_sync() calls
- correct some debug messages
- some minor nits
2002-07-14 12:09:48 +00:00
Alan Cox
1f54526952 o Complete the locking of page queue accesses by vm_page_unwire().
o Assert that the page queues lock is held in vm_page_unwire().
 o Make vm_page_lock_queues() and vm_page_unlock_queues() visible
   to kernel loadable modules.
2002-07-13 20:55:21 +00:00
Hajimu UMEMOTO
ad85ae6de1 When usb is kld, ucom and uplcom were failed to load because of
usbd_abort_pipe undefined.
2002-07-13 10:41:35 +00:00
Matt Jacob
dbf6d71cba Remove a couple of debugging lines. 2002-07-11 03:27:30 +00:00
Matt Jacob
73030e03ce 'Support' for ISP SBus cards.
This code does not imply that SBus cards work yet. They hang for me.
But I can't netboot the latest snapshot on my ultra1e, and things
hang at bus_setup_intr time.

Since I'm offline for a while, I thought I'd toss this in in case somebody
else who has a bit better luck wants to fart around with it. Please try
and wait until I get back to check things in.
2002-07-11 03:25:04 +00:00
Matt Jacob
74496412c4 Add SBus firmware (compiled in only for sparc systems). 2002-07-11 01:55:15 +00:00
Maxim Sobolev
8c6d67ef99 Add PCI ID and configuration hint for Netmos Nm9845 PCI 6-ports serial
card.

Submitted by:	Oleg Antoshin <oleh@at2000.kiev.ua>
MFC after:	3 days
2002-07-10 17:26:11 +00:00
Benno Rice
336cca9e5f Incorporate changes made to the NetBSD version of this driver.
- Remove some obsolete code (NetBSD gem.c r1.12)
- Clean up how the local MAC address is programmed (NetBSD gem.c r1.13)
- Make the driver work on PowerMacs with gigabit interfaces
  (NetBSD gem.c r1.14 and r1.15, gemreg.h r1.3 and r1.4, gemvar.h r1.6 and 1.7)
- Suppress RX_MAC interrutps regarding the FRAME_COUNT register.
  (NetBSD gem.c r1.16 and r1.17)
- Fix receiver lockups. (NetBSD gem.c r1.18, gemvar.h r1.8)
- Distinguish between Apple and Sun variants (NetBSD if_gem_pci.c r1.9)

Reviewed by:	tmm
Obtained from:	NetBSD
2002-07-10 10:24:23 +00:00
Dima Dorfman
ce907d4246 Add a VT_LOCKSWITCH ioctl that disallows vty switching. Something
like this can be emulated by VT_SETMODEing to VT_PROCESS and never
releasing the vty, but this has a number of problems, most notably
that a process must stay resident for the lock to be in effect.

Reviewed by:	roam, sheldonh
2002-07-10 03:29:38 +00:00
Josef Karthauser
04b401aa8a It's not "usio" anymore, it's "ucom".
Submitted by:	nsayer
2002-07-10 01:42:25 +00:00
Josef Karthauser
f411925536 Improve detach operation.
Submitted by:	akiyama
2002-07-10 00:52:16 +00:00
Josef Karthauser
d365977464 Include the bmaj entry in the cdevsw for versions of FreeBSD that need it. 2002-07-10 00:46:44 +00:00
Josef Karthauser
c2dc904947 Regen. 2002-07-10 00:43:50 +00:00
Josef Karthauser
92e19cc17e Add another ucom device (ELECOM UC-SGT).
Submitted by:	akiyama
2002-07-10 00:43:10 +00:00
Mitsuru IWASAKI
98479b041b Resolve conflicts arising from the ACPI CA 20020611 import. 2002-07-09 17:54:02 +00:00
Josef Karthauser
455a6759e8 Regen for SMC 2206USB/ETH EZ Connect adapter. 2002-07-09 16:46:31 +00:00
Josef Karthauser
7109e2c4df MFNetBSD: Add support for the SMC 2206USB/ETH EZ Connect adapter (Pegasus II) 2002-07-09 16:45:03 +00:00
Josef Karthauser
7db8d4d987 Delay the creation of the ugenX device node until we're certain
that the attach succeeded.  (Fixes a potential panic for devices
that fail to attach properly and are subsquently unplugged and then
plugged back in again.)
2002-07-09 01:01:25 +00:00
Matt Jacob
f1df0f59e9 Add 2002 to copyright.
Oops; I forgot for previous delta... If we're and FC or ULTRA2 or better
card, we can have a 1024 element request queue instead of 256.

MFC after:	1 week
2002-07-08 17:48:39 +00:00
Matt Jacob
fdeb9f2f66 Add get/set param ioctl support.
Remove sim queue freezes for resource shortages. I've had too many
strange race conditions where I freeze on a resource shortage but
never get unfrozen.

Consolidate the remaining sim queue freeze condition (for loopdown)
into an inline with debug messages that allows us to track problems
at ISP_LOGDEBUG0 level easier. Change a bunch of debug messages about
loop down/up conditions to ISP_LOGDEBUG0 level.

Remove dead isp_relsim code.

Change some internal flag stuff for efficiency.

Complain vociferously if we try and use our FC scratch area while it's
busy being used already (I mean, if we don't have solaris' ability
to sleep as an interrupt thread which would allow us to just use
a p/v semaphore, at least *say* when you've just borked yourself).

Add infrastructure to allow overrides of hard loopid && initiator
id from boot variables.

Fix the usual quota of silly bugs:

 + 'ktmature' needs to be per-instance. Argh.
 + When entering isp_watchdog, set intsok to zero, preserving
   old value to restore later. It's not nice to try and sleep
   from splsoftclock.
 + Fix tick overflow buglet in checking timeout value.

MFC after:	1 week
2002-07-08 17:42:47 +00:00
Matt Jacob
f00939f92f Add get/set param ioctls.
MFC after:	1 week
2002-07-08 17:34:56 +00:00
Matt Jacob
ed753e824b Add override so that we can force set our hard loopdid.
MFC after:	1 week
2002-07-08 17:34:32 +00:00
Matt Jacob
af2d254da9 Remove the 'bogus registrant' hack for fabric searches. It really
turns out that there's something of a hole in our new fabric name
server stuff.  We ask the name server for entities that have
registered as a specific type.  That type is FC-SCSI. If the entity
hasn't performed a REGISTER FC4 TYPES, the fabric nameserver won't
return it.

This brings this driver to a bit of a fork in the road as to what
the right thing to do is. For servicing the needs of accessing
FC-SCSI devices, this method is fine, and to be preferred. It is
extremely unlikely we're interested in fabric devices that *don't*
register correctly. If I ever get around to adding an FC-IP stack,
then asking for devices that have registers as FC-IP types is also
the right thing to do.

So- asking the fabric nameserver for a specific type is fine, *as
long as you are only interested in specific types*. If, on the other
hand, you want to create (as for management tool support) a picture
of everything on the fabric, this is *not* so fine. There are a
large class of FC-SCSI *initiators* who *don't* correctly register,
so we never will *see* them.

Is this a problem? Yes, but only a little one. If we want to do such
management tool support, we should probably run a *different* fabric
nameserver query algorithm. Better yet, we should talk to the management
nameserver in Brocade switches instead of the standard FC-GS-2 fabric
nameserver (which can be unwieldy).

Other changes: if we've overrrides marked, don't set some default
values from reading NVRAM. This allows us to override things like
EXEC throttle without having to ignore NVRAM entirely.

MFC after:	1 week
2002-07-08 17:33:37 +00:00
Robert Drehmel
0a17f47b92 Reenable the m3 interrupts in m3_pci_resume() and do not
enable them in m3_pci_attach().
2002-07-08 11:41:53 +00:00
Alfred Perlstein
9bee881145 Cleanup after my de-__P (remove leading whitespace before prototype args).
Add newlines after function return types in function declarations.

Approved by: wpaul (a long time ago)
2002-07-06 16:34:32 +00:00
Alfred Perlstein
eaabec5530 Cleanup after my de-__P (remove leading whitespace before prototype args).
Add newlines after function return types in function declarations.

Approved by: wpaul (a long time ago)
2002-07-06 15:59:57 +00:00
Mitsuru IWASAKI
c169fc477d Fix wrong use of ACPI_NO_UNIT_LIMIT which is for as_maxunits, not as_units. 2002-07-06 13:59:59 +00:00
Benno Rice
2e2ec02fd6 regenerate 2002-07-05 11:07:42 +00:00
Benno Rice
d82bc4fba8 Add a driver for the Broadcom BCM52xx "mini-theta" PHY. This includes the
internal PHY on the 3COM 3C905B and 3C905C parts, however I've rigged it so
that xlphy (aka exphy) takes precedence for the time being.

If people try this with their xl cards and decide that it's a better choice,
we can switch this later.

This is the PHY used in various iMacs and possibly other GMAC-equipped
Macintoshes with 10/100 PHYs (the ones with 10/100/1000 appear to use brgphy).

Obtained from:	NetBSD
2002-07-05 11:07:24 +00:00
Benno Rice
daec3648eb Use 3C905C instead of 3c905Cphy as the identifier for the Broadcom PHY used
in the 3C905C.  This is mainly cosmetic.

I'm doing this mainly so we share the same identifier as NetBSD.
2002-07-05 11:02:17 +00:00
John Polstra
5ddc57942f Disable hardware checksum offloading of IP fragments in the bge
driver.  I tried a few obvious experiments, but was unable to make
the 3c996B-T generate correct UDP checksums for transmitted fragmented
packets.  I'm not so sure the device is even capable of it.

This fixes NFS over UDP.

MFC after:	1 day
2002-07-04 23:19:20 +00:00
Takanori Watanabe
4ec593593a Make interrupt driven EC transaction optional. 2002-07-02 03:38:07 +00:00
Warner Losh
f83c4a42ea IF_HANDOFF is no longer in -stable 2002-06-30 22:39:25 +00:00
Luigi Rizzo
41aa0ba271 Fix if_timer logic so that there is always a timeout pending if there
are packets queued for transmission.

This driver is strange -- it never sets IFF_OACTIVE, so all
transmissions always cause a call to fxp_start. However, if the
link gets stuck, there was nothing to reset it, so there was still
a possibility of lockups.

MFC after: 3 days
2002-06-30 22:28:00 +00:00
Luigi Rizzo
bcb9ef4fe6 Fix if_timer logic to make sure that there is always a timeout
pending if there are packets queued for transmission.

MFC after: 3 days
2002-06-30 22:05:46 +00:00
Mitsuru IWASAKI
74fc979a09 Resolve conflicts arising from the ACPI CA 20020404 import. 2002-06-30 17:53:12 +00:00
Alfred Perlstein
7c41487d14 catch up with mextfree callback change when TI_PRIVATE_JUMBOS is defined.
Pointed out by: kdm
2002-06-29 11:26:05 +00:00
Peter Wemm
160554fbf4 Remove a couple of __P() stragglers. 2002-06-29 02:32:34 +00:00
Mike Silbersack
f32932bc1b Add another Intel chipset (i82562).
PR:		39974
Submitted by:	Morten Aaboe Jensen <morten@codemonkey.dk>
MFC after:	1 day
2002-06-29 01:56:14 +00:00
Alfred Perlstein
69a3693f3e catch up with mextadd callback taking a void argument instead of a caddr_t. 2002-06-29 01:49:22 +00:00
Alfred Perlstein
914596ab53 catch up with ext_free prototype change. 2002-06-29 01:36:59 +00:00
Scott Long
63393eea99 Fix a botched flag clear operation. Rumor has it that this also fixes
the funky-volume-settings-on-startup problem.

Reviewed by:	the channel that shall not be named
MFC after:	7 days
2002-06-28 06:11:26 +00:00
Scott Long
f4df40b218 Delay the AC97 calibration until after the system clock has been
calibrated.  This fixes the problem where playback and recording do
not run at the correct speed.  It probably also eliminates the
need for the hacks/workarounds/sysctl's that were previously
devised to deal with this, but I will leave that for a different
time.

Reviewed by:	orion
2002-06-27 22:36:01 +00:00
Kenneth D. Merry
98cb733c67 At long last, commit the zero copy sockets code.
MAKEDEV:	Add MAKEDEV glue for the ti(4) device nodes.

ti.4:		Update the ti(4) man page to include information on the
		TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS kernel options,
		and also include information about the new character
		device interface and the associated ioctls.

man9/Makefile:	Add jumbo.9 and zero_copy.9 man pages and associated
		links.

jumbo.9:	New man page describing the jumbo buffer allocator
		interface and operation.

zero_copy.9:	New man page describing the general characteristics of
		the zero copy send and receive code, and what an
		application author should do to take advantage of the
		zero copy functionality.

NOTES:		Add entries for ZERO_COPY_SOCKETS, TI_PRIVATE_JUMBOS,
		TI_JUMBO_HDRSPLIT, MSIZE, and MCLSHIFT.

conf/files:	Add uipc_jumbo.c and uipc_cow.c.

conf/options:	Add the 5 options mentioned above.

kern_subr.c:	Receive side zero copy implementation.  This takes
		"disposable" pages attached to an mbuf, gives them to
		a user process, and then recycles the user's page.
		This is only active when ZERO_COPY_SOCKETS is turned on
		and the kern.ipc.zero_copy.receive sysctl variable is
		set to 1.

uipc_cow.c:	Send side zero copy functions.  Takes a page written
		by the user and maps it copy on write and assigns it
		kernel virtual address space.  Removes copy on write
		mapping once the buffer has been freed by the network
		stack.

uipc_jumbo.c:	Jumbo disposable page allocator code.  This allocates
		(optionally) disposable pages for network drivers that
		want to give the user the option of doing zero copy
		receive.

uipc_socket.c:	Add kern.ipc.zero_copy.{send,receive} sysctls that are
		enabled if ZERO_COPY_SOCKETS is turned on.

		Add zero copy send support to sosend() -- pages get
		mapped into the kernel instead of getting copied if
		they meet size and alignment restrictions.

uipc_syscalls.c:Un-staticize some of the sf* functions so that they
		can be used elsewhere.  (uipc_cow.c)

if_media.c:	In the SIOCGIFMEDIA ioctl in ifmedia_ioctl(), avoid
		calling malloc() with M_WAITOK.  Return an error if
		the M_NOWAIT malloc fails.

		The ti(4) driver and the wi(4) driver, at least, call
		this with a mutex held.  This causes witness warnings
		for 'ifconfig -a' with a wi(4) or ti(4) board in the
		system.  (I've only verified for ti(4)).

ip_output.c:	Fragment large datagrams so that each segment contains
		a multiple of PAGE_SIZE amount of data plus headers.
		This allows the receiver to potentially do page
		flipping on receives.

if_ti.c:	Add zero copy receive support to the ti(4) driver.  If
		TI_PRIVATE_JUMBOS is not defined, it now uses the
		jumbo(9) buffer allocator for jumbo receive buffers.

		Add a new character device interface for the ti(4)
		driver for the new debugging interface.  This allows
		(a patched version of) gdb to talk to the Tigon board
		and debug the firmware.  There are also a few additional
		debugging ioctls available through this interface.

		Add header splitting support to the ti(4) driver.

		Tweak some of the default interrupt coalescing
		parameters to more useful defaults.

		Add hooks for supporting transmit flow control, but
		leave it turned off with a comment describing why it
		is turned off.

if_tireg.h:	Change the firmware rev to 12.4.11, since we're really
		at 12.4.11 plus fixes from 12.4.13.

		Add defines needed for debugging.

		Remove the ti_stats structure, it is now defined in
		sys/tiio.h.

ti_fw.h:	12.4.11 firmware.

ti_fw2.h:	12.4.11 firmware, plus selected fixes from 12.4.13,
		and my header splitting patches.  Revision 12.4.13
		doesn't handle 10/100 negotiation properly.  (This
		firmware is the same as what was in the tree previously,
		with the addition of header splitting support.)

sys/jumbo.h:	Jumbo buffer allocator interface.

sys/mbuf.h:	Add a new external mbuf type, EXT_DISPOSABLE, to
		indicate that the payload buffer can be thrown away /
		flipped to a userland process.

socketvar.h:	Add prototype for socow_setup.

tiio.h:		ioctl interface to the character portion of the ti(4)
		driver, plus associated structure/type definitions.

uio.h:		Change prototype for uiomoveco() so that we'll know
		whether the source page is disposable.

ufs_readwrite.c:Update for new prototype of uiomoveco().

vm_fault.c:	In vm_fault(), check to see whether we need to do a page
		based copy on write fault.

vm_object.c:	Add a new function, vm_object_allocate_wait().  This
		does the same thing that vm_object allocate does, except
		that it gives the caller the opportunity to specify whether
		it should wait on the uma_zalloc() of the object structre.

		This allows vm objects to be allocated while holding a
		mutex.  (Without generating WITNESS warnings.)

		vm_object_allocate() is implemented as a call to
		vm_object_allocate_wait() with the malloc flag set to
		M_WAITOK.

vm_object.h:	Add prototype for vm_object_allocate_wait().

vm_page.c:	Add page-based copy on write setup, clear and fault
		routines.

vm_page.h:	Add page based COW function prototypes and variable in
		the vm_page structure.

Many thanks to Drew Gallatin, who wrote the zero copy send and receive
code, and to all the other folks who have tested and reviewed this code
over the years.
2002-06-26 03:37:47 +00:00
Mark Peek
44081f9b35 Add missing splx().
MFC after:	3 days
2002-06-24 22:28:42 +00:00
John Polstra
e255b776bc Work around what appears to be a chip bug in the BCM5701 that shows
up when operating in PCI-X mode.  For some received packets there is
data corruption in the first few bytes in that case.  Aligning the
packet buffer eliminates the corruption.  With this fix, the code
that offsets the packet buffer up by 2 bytes to align the payload is
disabled for BCM5701s operating in PCI-X mode.  On the i386, which
permits unaligned accesses, the payload is left unaligned.  On other
platforms, the packet is copied after reception to force alignment
of the payload.  Obviously, this work-around reduces performance in
those cases (BCM5701 plus PCI-X) where it is in effect.

MFC after:	3 days
2002-06-24 22:04:15 +00:00
Robert Drehmel
9ce4f54341 Enable mixer interrupts after the mixer is initialized,
otherwise we might get interrupts and are unable to
handle them properly, which results in a page fault.

PR:		kern/39549
Submitted by:	Gil Kloepfer <gil@arlut.utexas.edu>
2002-06-24 15:28:47 +00:00