Commit Graph

7643 Commits

Author SHA1 Message Date
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
Maxime Henrion
6569d6f3ec Yet another warning fix for 64 bits platforms.
Reviewed by:	phk
2002-06-24 12:07:02 +00:00
Warner Losh
be5359fb85 On REASREQ packets, handled them earlier in processing the association
request.  We need to eat the MAC address of the packet before we go
looking at the SSID and such.  Doing do is sufficient to make Cisco
cards assocaite with prism II cards.

The submitter says that Linux does the same thing.

Submitted by: jhay
2002-06-24 07:50:41 +00:00
Andrew R. Reiter
9561b109ae - Remove DMA_* macros as only one, DMA_GET_ADDR, was used.
- Convert DMA_GET_ADDR() calls to vtophys() calls in order to finish
  removing the DMA_* macros.
2002-06-24 05:03:44 +00:00
Warner Losh
586fdde4bc Add kernel printf bits for WI_SUPPRATES and HOSTAP_FLAGS 2002-06-24 04:42:46 +00:00
Warner Losh
890565f00b Add RID to get the DBM adjustment factor 2002-06-24 04:41:34 +00:00
Andrew R. Reiter
c3f9fb1a24 - Remove the definition for SCHED_ATM
- Change SCHED_ATM statements into schednetisr() calls.
2002-06-24 04:10:12 +00:00
Nick Hibma
befd9c61ce set siocnunit to the correct value. This fixes the freeze on boot for
alphas.

Submitted by:		 Bernd Walter <ticso@cicely5.cicely.de>
2002-06-23 18:57:53 +00:00
Nick Hibma
8fbfe5e927 Make this compile on Alpha. 2002-06-22 16:33:29 +00:00
Warner Losh
d5ca4da61e Add better mediaopt support for ibss and friends.
Now the driver is closer to matching the wi man page.

Submitted by: jhay (who obtained it from OpenBSD).
2002-06-19 17:37:34 +00:00
Søren Schmidt
9153cecd64 Use si_iosize_max to tell the upper layers not to use more
than 32K chunks on ZIP drives instead of deblocking it in
the driver.
2002-06-19 12:41:05 +00:00
Søren Schmidt
098d258d05 Add yet another (older) Promise chip 2002-06-19 12:26:20 +00:00
Prafulla Deuskar
bc4df5df23 Removed unneeded files.
if_em_fxhw.[c,h] and if_em_phy.[c,h]
have been merged into one [c,h] file.

MFC after:	3 days
2002-06-18 22:51:26 +00:00
Nick Hibma
d8dbc77c56 Make the speed used by gdb over serial settable in the kernel configuration.
This facilitates the use in circumstances where you are using a serial
console as well. GDB doesn't support anything higher than 9600 baud (19k2
if you are lucky), but the console does.
2002-06-18 21:30:37 +00:00
David E. O'Brien
a27ffb412a Add support for Comtrol RocketPort 550 PCi models: 4 RJ45, 4 Quadcable,
8 RJ11, 8 Octacable, and 8 (used with RocketPort I/F box).

Note:	untested due to lack of hardware
2002-06-18 03:05:10 +00:00
David E. O'Brien
2569e3871c Support the Comtrol RocketPort 550 PCi 16 (used with RocketPort I/F box).
Sponsored by:	Feral Software
2002-06-18 02:39:12 +00:00
David E. O'Brien
b22bb3c911 ebus sio(4) attachment.
Submitted by:	tmm
2002-06-18 01:19:31 +00:00
Nick Hibma
d8880ad0bd Avoid reprobing on loading a driver. This does not work as the ivars set
during the previous probe are stale.

What really should be done is route the probe through
device_probe_and_attach bit this is one of those ICBBATIASS (I can't be
bothered as there is a simpler solution). The user can easily replug the
device after kldloading a new device driver.
2002-06-17 20:57:54 +00:00
Nick Hibma
3a6a5935a8 Set the ivars _after_ checking that the bdev was correctly created instead
of before.
2002-06-17 20:52:26 +00:00
Nick Hibma
1a283dd436 clean up some KASSERTS. 2002-06-17 20:44:37 +00:00