Commit Graph

12297 Commits

Author SHA1 Message Date
mtm
6b252d3637 Locking cleanups to remove the need for a recursive mutex
o Instead of locking and unlocking all over the place, use
	  lock assertions to make certain that the bfe lock is held
	  where necessary.
	o Create locked and unlocked versions of bfe_init and bfe_start. These
	  functions can be called from outside the module and by functions
	  within the bfe module. The calls from outside the module don't
	  hold the bfe lock so the unlocked versions called by these functions
	  simple obtain the bfe lock and call the locked version.

- Fix a typo (scp) in the locking macros that only worked because in all the
  instances in which it was called the softc pointer happened to be named 'sc'.

- Mark the interrupt MPSAFE

Tested by: matusita, Dario Freni <saturnero@gufi.org>
Silence from: -net, wpaul
2004-10-23 08:33:10 +00:00
phk
976462622a Properly handle failure to allocate isadma bounce buffer 2004-10-22 19:01:10 +00:00
simokawa
d731e713ca Respect _BOOT flag. 2004-10-22 15:39:39 +00:00
simokawa
251f5975d3 Check _BOOT flag. 2004-10-22 15:03:22 +00:00
scottl
eb9e7f47d6 Add support for the 21610SA 16-channel SATA card. Thanks to Adaptec for
providing hardware for testing.
2004-10-21 19:14:32 +00:00
jhb
9f51695cbf Fix a typo so that this compiles again. 2004-10-20 16:22:00 +00:00
sos
1837c14755 Do not retry on requests that has lost thier device during reinit.
Should fix hangs on IBM's etc with the fake slave problem.

MFC:
	asap
2004-10-20 10:11:05 +00:00
imp
d6fa16e5b9 Rumor has it that ACCTON EN2216 is also an ne2000 compatible. Make it so. 2004-10-20 04:54:50 +00:00
mux
043596afd3 Add missing bus_dmamap_sync() calls. If you are using an architecture
with a weak memory model or x86 + PAE (or more specifically, your
driver is using bounce pages) and you have had problems with em(4),
this may fix it.  At least this is needed to have em(4) work properly
on FreeBSD/arm.

Original version by:	cognet
Reviewed by:		tackerman
Tested by:		cognet
2004-10-19 23:31:44 +00:00
gibbs
06094f1554 aic7xxx.h:
Add constants for SPI protocol delays that are needed for
	target mode.

aic7xxx.c:
	Correct a target mode issue that caused an occassional
	spurious REQ to be seen on the bus when performing manual
	message processing (e.g. transfer rate negotiation).

	Enforce phase change bus settle rules with explicit
	delays when performing manual message processing in
	target mode.  The sequencer already did this for
	"fast-path", target mode message processing.
2004-10-19 20:48:06 +00:00
sos
480318fb03 Idle the channel earlier in reinit().
Cosmetic change to suspend, dont call tsleep an extra time at exit.
2004-10-19 20:13:38 +00:00
sos
214bd9b162 Cosmetics 2004-10-19 20:11:23 +00:00
bms
78aa67cb84 Really really fix typo this time. 2004-10-19 20:02:07 +00:00
bms
08c2661597 Fix typo sc -> dev. 2004-10-19 16:47:53 +00:00
bms
8112f95a8c Detach the Rhine completely on shutdown, rather than merely stopping it
as the original logic did. This fixes a race with vr_intr() which was
masked on UP systems and manifested on SMP systems.

PR:		kern/62889
MFC after:	1 day
2004-10-19 15:30:47 +00:00
le
f14caa383f Return the unit number of a channel instead of a hardcoded '1' from
the ATA pccard locking function.  This makes pccard devices like
Compact Flash cards work again.

PR:             kern/72805
Submitted by:   James E. Flemer <jflemer@alum.rpi.edu>
MFC in:         2 days
2004-10-19 10:29:00 +00:00
scottl
76f96ced4b Use and alignment of 1 instead of ETHER_ALIGN for rx and tx buffers and jumbo
frames.  BGE hardware with the rx alignment bug will still be handled by the
calls to m_adj() that already exist.  m_adj() is probably better suited for
this task anyways.  Just as with if_em, this saves a malloc + several locks
per packet and prevents unneeded data copying within busdma.
2004-10-19 02:42:49 +00:00
scottl
57d3e400ee Use an alignment of 1 instead of PAGE_SIZE for the rx and tx buffer tags.
Since the e1000 DMA engines hava no constraints on the alignment of buffer
transfers, there is no reason to tell busdma that there is.  This save a
minimum of 1 malloc call per packet, which translates to eliminating 4 locks.
It also means that buffers are not needlessly bounced when transfered.  The
end result is a 38% improvement in pps in a 4 way bridging environment.

Obtained from: Sandvine, Inc.
2004-10-19 02:39:27 +00:00
jmg
ab5364e451 fix (for me) the problems where if_de gets really slow after time
(usually taking 20 seconds to transmit a packet).. no longer fall back
to only transmitting one packet (instead of the entire queue) after we
have processed the entire send queue...  I have no idea why we didn't
start seeing this problem ~6 years ago when this code was introduced...
2004-10-18 23:06:12 +00:00
phk
dafa1caf81 Add new function ttyinitmode() which sets our systemwide default
modes on a tty structure.

Both the ".init" and the current settings are initialized allowing
the function to be used both at attach and open time.

The function takes an argument to decide if echoing should be enabled.
Echoing should not be enabled for regular physical serial ports
unless they are consoles, in which case they should be configured
by ttyconsolemode() instead.

Use the new function throughout.
2004-10-18 21:51:27 +00:00
le
102ee8c334 Drop the NDIS lock before returning from ndis_start().
PR:             i386/72795
Submitted by:   Frank Mayhar <frank@exit.com>
MFC in:         3 days
2004-10-18 21:33:56 +00:00
rwatson
7b853afb00 Annotate that get_cyclecount() can be expensive on some platforms,
which juxtaposes nicely with the comment just above on how the
harvest function must be cheap.
2004-10-18 19:29:13 +00:00
glebius
7a507d9524 Use cluster if data >= MINCLSIZE.
Reviewed by:	mdodd
Approved by:	julian (mentor)
MFC after:	1 month
2004-10-17 21:44:11 +00:00
le
5c9ce88de1 Add support for the Vodafone Mobile Connect 3G datacard. 2004-10-16 21:27:28 +00:00
gibbs
3f3b293e16 Skip probe attempts for ISA PnP devices.
Pointed out by: imp
2004-10-15 23:39:52 +00:00
njl
552da4a9e9 Re-add an acpi attachment for the legacy probe that was inadvertently
removed.
2004-10-15 05:13:25 +00:00
njl
01775978b7 Remove unused variable. Pointy hat candidate. 2004-10-15 04:54:16 +00:00
sam
96cc112091 add missing ';' that didn't show up with INVARIANTS enabled 2004-10-15 03:54:56 +00:00
yongari
20da9f17e3 Plug possible memory leak in sound DMA buffer handling. It also
changes return code to ENOMEM in case of allocation failure.

Approved by:	jake (mentor), scottl (co-mentor)
Reviewed by:	truckman, matk
2004-10-15 03:50:04 +00:00
kan
00b5d02fd0 Use a taskqueue rather than an swi to handle deferred notifications.
Obtained from:	same change for umct(4) driver.
2004-10-15 03:44:56 +00:00
sam
daa06a78b6 Move session state from on-card memory to host memory so we no longer are
constrained to a small number of sessions by the small on-card memories found
in newer devices.  This is really a stopgap solution as having session state
in main memory incurs a (small but noticeable) performance penalty. The better
solution is to manage session state so that it's cached on chip.

Obtained from:	openbsd
2004-10-15 00:36:07 +00:00
njl
48e4157e91 Remove local hacks to set flags now that the device probe does this for us.
Tested on every device except sio_pci and the pc98 fd.c.  Perhaps something
similar should be done for the "disabled" hints also.

MFC after:	2 weeks
2004-10-14 22:21:59 +00:00
phk
7706490f31 Remove unused ttys field.
Spotted by:	Peter Jeremy <PeterJeremy@optushome.com.au>
2004-10-14 18:37:59 +00:00
phk
735fb5416e Fix echo in console mode. 2004-10-14 08:58:28 +00:00
green
b72634a4d8 Fix a spelling error in a panic string. 2004-10-14 03:05:39 +00:00
simokawa
4255df54a6 Fix warnings on non-i386 arch.
Submitted by: keramida
2004-10-14 00:21:32 +00:00
sos
b9ce738620 Refine locking so it covers the "running" variable as well.
Adjust comments etc to fit the new locking system.
2004-10-13 15:16:35 +00:00
le
4f70db40fc Add device IDs for Intel ICH6.
PR:             kern/72492
Submitted by:   Florian Le Goff <madflo@beertech.org>
2004-10-13 14:51:42 +00:00
phk
47c2584ada Use generic tty code instead of local copy. 2004-10-13 09:27:18 +00:00
phk
55f592519e Use generic tty code instead of local stuff.
NB:  device names are now consistent:  {cua,tty}d$(port)[.lock,.init]
2004-10-13 08:27:20 +00:00
njl
0749ec30a6 Print before the footer, not after. 2004-10-13 07:29:29 +00:00
njl
bb55da4e20 If flags are present, print them like ISA does.
MFC after:	1 day
2004-10-13 07:27:21 +00:00
phk
e35c2bf38e First half of tty code rework: unifdef -D__FreeBSD_Version=600000
The changes in the next commit would make the code totally unreadable
if the #ifdef'ing were maintained.

It might make a lot of sense to split if_cx.c in a netgraph related
and in a tty related file but I will not attempt that without hardware.
2004-10-13 07:02:56 +00:00
yongari
f8db072728 Limit DMA address space to 1GB since the trident audio cards can't
handle DMA addresses located above 1GB. The LBA(loop begin address)
register which holds DMA base address is 32bits register. But the
MSB 2bits are used for other purposes. This effectivly limits the
DMA address space up to 1GB.

Approved by:	jake (mentor)
Reviewed by:	truckman, matk
2004-10-13 06:04:01 +00:00
yongari
5cef8d8d29 Audio drivers failed to detect failure condition and attempted to
assign DMA address to the wrong address. It can cause system lockup
or other mysterious errors. Since most sound cards requires low DMA
address(BUS_SPACE_MAXADDR_24BIT) sndbuf_alloc() would fail when the
audio driver is loaded after long running of operations.

Approved by:	jake (mentor)
Reviewed by:	truckman, matk
2004-10-13 05:45:16 +00:00
simokawa
bc246db21d - Split dcons core code and OS dependent code.
- Implement dcons_ischar() and dcons_load_buffer().
- If loader passed a dcons buffer address, keep using it.
	(We still need a patch to cheat memory management system.)
2004-10-13 05:38:42 +00:00
green
d57c0d7415 Permit fcntl(F_SETFL) to work on a ugen(4) device by not returning failure
for FIOASYNC.
2004-10-13 04:13:05 +00:00
green
051e32299e Back out rev.1.91 which implemented bulk read transfers in ugen(4) as
asynchronous.  I realize that this means the custom application will
not work as written, but it is not okay to break most users of ugen(4).

The major problem is that a bulk read transfer is not an interrupt
saying that X bytes are available -- it is a request to be able to
receive up to X bytes, with T timeout, and S short-transfer-okayness.

The timeout is a software mechanism that ugen(4) provides and cannot
be implemented using asynchronous reads -- the timeout must start at
the time a read is done.

The status of up to how many bytes can be received in this transfer
and whether a short transfer returns data or error is also encoded
at least in ohci(4)'s requests to the controller.  Trying to detect
the "maximum width" results in using a single buffer of far too
small when an application requests a large read.

Even if you combat this by replacing all buffers again with the
maximal sized read buffer (1kb) that ugen(4) would allow you to
use before, you don't get the right semantics -- you have to
throw data away or make all the timeouts invalid or make the
short-transfer settings invalid.

There is no way to do this right without extending the ugen(4) API
much further -- it breaks the USB camera interfaces used because
they need a chain of many maximal-width transfers, for example, and
it makes cross-platform support for all the BSDs gratuitously hard.

Instead of trying to do select(2) on a bulk read pipe -- which has
neither the information on desired transfer length nor ability to
implement timeout -- an application can simply use a kernel thread
and pipe to turn that endpoint into something poll-able.

It is unfortunate that bulk endpoints cannot provide the same semantics
that interrupt and isochronous endpoints can, but it is possible to just
use ioctl(USB_GET_ENDPOINT_DESC) to find out when different semantics
must be used without preventing the normal users of the ugen(4) device
from working.
2004-10-13 04:12:20 +00:00
phk
58d12d13bf Use generic tty code instead of local copies.
New devicename is ttyz{port}

No callout devices created.

Isn't this driver superseeded by uart(4) anyway ?
2004-10-12 22:33:19 +00:00
njl
d9fca60108 Attach the device description for ISA devices on the ACPI bus.
MFC after:	1 day
2004-10-12 21:33:08 +00:00