Commit Graph

7672 Commits

Author SHA1 Message Date
Matthew N. Dodd
14eaf06493 Recognize Adaptec ANA-5910/30/40[A] boards.
Read the MAC address from Adaptec boards correctly.

Bits borrowed from sys/pci/if_en_pci.c.
2002-06-07 05:23:01 +00:00
Matthew N. Dodd
33b04e2fcb Move some code around.
Minor whitespace changes.
2002-06-07 01:55:42 +00:00
Justin T. Gibbs
cdd49e97b4 Hook up the ahd driver. 2002-06-06 16:35:58 +00:00
Justin T. Gibbs
c19a298149 Remove one more multi-line string literal. 2002-06-06 16:07:18 +00:00
Alfred Perlstein
f5bd5dceda Make sc_saver_keyb_only (sceen saver interrupted by keyboard input only)
the default.
2002-06-06 06:02:17 +00:00
Justin T. Gibbs
9b2af00eda Silence GCC warnings about multi-line strings.
Sync Perforce IDs.
2002-06-05 22:51:54 +00:00
Justin T. Gibbs
eda578ae9f Add some PCI-X register definitions.
PCIM_CMD_SERREN -> PCIM_CMD_SERRESPEN to be consistent with
the PERR definition.
2002-06-05 22:25:51 +00:00
Justin T. Gibbs
17d2475554 Enter the ahd driver which supports the Adaptec AIC7902 Ultra320, PCI-X
SCSI Controller chip.
2002-06-05 19:52:45 +00:00
Doug Ambrisko
e94c058ad1 Add device id. for fxp chip on Intel D845EPT2L boards. This seems to
make the onboard NIC work.

Sponsored by:	Vernier Networks
MFC after:	1 day
2002-06-05 18:34:08 +00:00
Thomas Moestl
c883a66af1 Don't treat statistics counter wrap-overs as errors. 2002-06-05 15:21:44 +00:00
Prafulla Deuskar
a7fabc2b60 Added support for 82545EM and 82546EB based adapters.
Added Vlan support.

MFC after:	1 week
2002-06-03 22:30:51 +00:00
Ian Dowse
5c97ca54e5 Use a per-device worker thread to avoid blocking in mdstrategy()
until the I/O completes. This fixes some easily reproducable deadlocks
that occur when using md(4) with GEOM.

Reviewed by:	phk
2002-06-03 22:09:04 +00:00
Matthew N. Dodd
b20d4649f9 Quick and dirty convert to newbus. (Eventually 'eni.c' should go away.)
Module loads and unloads properly.

Thanks to Richard Hodges <rh@matriplex.com> for donating the hardware
to allow me to work on this driver.
2002-06-03 09:16:52 +00:00
Jens Schweikhardt
21dc7d4f57 Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by:	des
MFC after:	3 weeks
2002-06-02 20:05:59 +00:00
Alfred Perlstein
47f654d3a0 Fix warnings.
There's no need to use concatination when you have 'something.macro_arg'.
Comment out comment following #endif.
2002-06-01 18:50:35 +00:00
Alfred Perlstein
e27f378e33 Fix a couple of places where preprocessor concatination was misused and
something wound up grafted to a comma.
2002-06-01 16:21:26 +00:00
Alfred Perlstein
78b226dc81 Silence warning.
When casting a "const void *" to a "struct foo **" you want to actually
cast it to "struct foo * const *" not simply "const struct foo **".
2002-06-01 16:20:27 +00:00
Ruslan Ermilov
960a771286 Quick, low impact band-aide to unbreak the build. Added && 0 so we
ifdef out what appears to be a bogus call to softintr using data
elements that aren't in the softc.

Forgotten by:	imp
2002-06-01 08:29:12 +00:00
Alfred Perlstein
058dc44ca0 Should have been part of recent commit:
Fix GCC warnings caused by initializing a zero length array. In the process,
  simply things a bit by getting rid of 'struct ng_parse_struct_info' which
  was useless because it only contained one field.
But now I'm unbreaking compilation by adjusting these files to the recent
netgraph change.
2002-06-01 07:18:32 +00:00
Alfred Perlstein
fa900b3699 Call destroy_dev in detach routine to cleanup properly otherwise we
panic because of a repeat make_dev if/when the device is reattached
to the system.

Remove an "#if __FreeBSD__" in code that's nested under a "#if __NetBSD__"
(*sigh*)

Reported by: Seth Hettich <sjh@whiskey.ucf.ics.uci.edu>
Tested by: Seth Hettich <sjh@whiskey.ucf.ics.uci.edu>
2002-06-01 06:23:47 +00:00
Warner Losh
d508dd347c Use PCI_INTERRUPT_VALI in stead of hard coded 255 2002-06-01 05:48:58 +00:00
Warner Losh
3c2d2c7cea More style(9) nits 2002-06-01 05:44:45 +00:00
Warner Losh
f60115a36c Define a PCI_INVALID_IRQ to augment PCI_INTERRUPT_VALID 2002-06-01 05:40:33 +00:00
Warner Losh
c9579f73e0 Make this file mostly conform to style(9).
Approved by: msmith in principle before walkabout
2002-06-01 03:41:02 +00:00
Warner Losh
cbcfdbcfe6 Quick, low impact band-aide to unbreak the build. Added && 0 so we
ifdef out what appears to be a bogus call to softintr using data
elements that aren't in the softc.
2002-05-31 23:39:04 +00:00
Eric Anholt
4956c7034c Warnings cleanup for gcc3. Also __FUNCTION__ -> __func__
Approved by:	des
2002-05-31 23:19:50 +00:00
Warner Losh
6f20d5e68f Use __FreeBSD_version to test what things to use 2002-05-31 03:27:34 +00:00
Takanori Watanabe
6e8f09ca61 Fix build breakage on my pccard related commit. 2002-05-31 01:08:49 +00:00
Julian Elischer
a86d27ac85 Add missing unlock
Submitted by: dirkx@covalent.net
2002-05-30 23:41:51 +00:00
Takanori Watanabe
80f1001813 Make oldcard and newcard kernel module work. 2002-05-30 17:38:00 +00:00
Alfred Perlstein
99b9331a4f Check for defined(__i386__) instead of just defined(i386) since the compiler
will be updated to only define(__i386__) for ANSI cleanliness.
2002-05-30 07:32:58 +00:00
Alfred Perlstein
8e5e1ed874 Check for defined(__i386__) instead of just defined(i386) since the compiler
will be updated to only define(__i386__) for ANSI cleanliness.
2002-05-30 07:13:40 +00:00
Poul-Henning Kamp
f4258597dc Add one copy of crc32() and crc32_tab[] in libkern, and remove it two other
places.

Comment out crc32 related definitions in zlib.h, we don't seem to have the
corresponding code in our kernel.
2002-05-29 20:24:09 +00:00
Josef Karthauser
43c6b63e82 NetBSD have adopted our usage of the DMAADDR macro:
date: 2002/05/28 12:42:39;  author: augustss;
    Change DMAADDR macro slightly.

Update the $NetBSD$ tags to reflect this and make slight changes to
usb_mem.h so that we're in sync with each other.
2002-05-28 20:51:43 +00:00
Søren Schmidt
d9d34030a4 Use %02d in track numbers, so that 1 is 01, much easier for scripts 2002-05-28 17:39:17 +00:00
Josef Karthauser
ca3971124e Regen. 2002-05-27 00:01:21 +00:00
Josef Karthauser
b826a68b7f Add a couple of new aue ethernet adapters from NetBSD:
ELECOM LDUSBLTX
	IODATA USBETTXS
2002-05-27 00:00:48 +00:00
Josef Karthauser
12d2a2a729 Use aue_lookup for looking up devices. 2002-05-26 23:54:37 +00:00
Josef Karthauser
5908b50130 Correct the usage of DMAADDR in a piece of '#if 0'd code. (The compiler
didn't pick it up.)
2002-05-26 22:13:09 +00:00
Josef Karthauser
cc12206976 MFNetBSD:
revision 1.124
    date: 2002/05/26 03:10:02;  author: minoura;  state: Exp;  lines: +3 -3
    Clear done_head in the HCCA *before* acknoledging the interrupt.
    Driver lost some completed transfers under heavy loads.
2002-05-26 22:11:34 +00:00
Josef Karthauser
883d14d6c6 MFNetBSD: ohci.c (1.124), uhci.c (1.159), usbdi.c (1.100)
date: 2002/05/19 06:24:31;  author: augustss;  state: Exp;
    Update dma memory access API a little.

NetBSD have adopted our way of using the KERNADDR macro.  Update
the revision tags to show that we're in sync, and remove the casts
that they did in their adaptation.
2002-05-26 22:00:06 +00:00
Poul-Henning Kamp
fcf867e9f7 Mis-edit in last commit. 2002-05-26 09:57:59 +00:00
Poul-Henning Kamp
fde2a2e414 Be a bit smarter about rewriting data so we don't loose too much performance.
Sponsored by: DARPA & NAI Labs.
2002-05-26 09:38:51 +00:00
Poul-Henning Kamp
f43b2bac72 Use an umazone per unit for allocating the sectors for malloc backing.
Clean up things properly when we unconfigure malloc backed units.

Sponsored by:	DARPA & NAI Labs.
2002-05-26 06:48:55 +00:00
Poul-Henning Kamp
c6517568df Give the "malloc" backing of md(4) an adaptive multilevel index tree to
remove the need for a contiguous array with pointers to all the sectors.

Try to make failure to malloc(9) memory a non-hang situation.

Eventually this will allow us to test the 64bit cleanness of the disk
I/O patch, but more work is outstanding here and elsewhere.

Sponsored by:	DARPA & NAI Labs.
2002-05-25 20:44:20 +00:00
Bruce Evans
e788f79698 Fixed printf format errors which apparently crept in while -Wformat was
disabled for gcc-3.
2002-05-25 11:18:03 +00:00
Bruce Evans
ae4c33defa "Fixed" printf format errors (64-bit daddr_t casualties; should use %jx
instead of %llx when %j is available).

Changed nearby output formats from %x to %#x so that it is obvious that the
numbers are in hex (vinum mostly uses 0x%x elsewhere).

Didn't fix nearby format printf errors (long lines).
2002-05-25 11:12:30 +00:00
Bruce Evans
ff8cc2eb35 Fixed printf format errors. Most of them are 64-bit daddr_t casualties.
Printing daddr_t's using %d format was always an error, but gcc's
warning about it was ignored for supported 64-bit arches and not printed
for supported 32-bit arches.  Hundreds if not thousands thousands of
previously "fixed" daddr_t printings are now broken on 32-bit machines
by casting daddr_t's to longs.  daddr_t's should be printed using %jd
format, but this fix uses %lld since %j is not implemented in the
kernel yet.

Fixed some nearby format printf errors (style bugs).
2002-05-25 11:05:07 +00:00
Thomas Moestl
9bb711b95d Fully reset a gem on some error conditions; otherwise it would hang in
about 1 of 10 cases.

Proposed and tested by:	phk
2002-05-24 12:47:41 +00:00
Peter Wemm
daefef7cae Fix warnings due to macro varargs. 2002-05-24 06:32:18 +00:00
Peter Wemm
885fbc97c1 Fix new compiler unhappiness. 2002-05-24 06:01:07 +00:00
Peter Wemm
7d05a38314 Fix deprecated use of label at end of compound statement 2002-05-24 05:58:13 +00:00
Peter Wemm
70148712be Constify a debug function arg that we pass __func__ to in order to pacify
gcc-3.1's 'const char *__func__;'
2002-05-24 05:57:47 +00:00
Peter Wemm
9c580bea80 Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanly
again.
2002-05-24 05:21:36 +00:00
Søren Schmidt
949e9d36aa Dont panic if only one disk on a channel can do tagged queueing.
MFC:	asap
2002-05-23 08:17:16 +00:00
Josef Karthauser
4de1678702 Fix a panic by allocating the iface structure locally in the attach
function instead of in usb_probe_and_attach.
2002-05-23 00:36:14 +00:00
Josef Karthauser
0f19b0d03a Reflect some changes in the NetBSD code path, and sligh adjustments to ours.
(Non-functional changes).
2002-05-23 00:26:06 +00:00
Josef Karthauser
a257364105 Sync with NetBSD. (Non functional changes). 2002-05-22 23:01:13 +00:00
Josef Karthauser
1acba7451d Fix a bug: Use USBD_DEFAULT_INTERVAL instead of USBD_DEFAULT_TIMEOUT
in a call to usbd_open_pipe_ival.
2002-05-22 22:58:38 +00:00
Warner Losh
3029e334b7 Use correct inactivity timeout of 2 minutes rather than 24 seconds due to
bogons introduced at some point.

Submitted by: thomas skibo
2002-05-20 19:33:49 +00:00
Maxim Sobolev
a88c5d84d1 Regen after changing Device ID string for DaisyTech devices.
MFC after:	1 week
2002-05-20 12:02:54 +00:00
Maxim Sobolev
b42df94a61 Change Device ID string for DaisyTech devices.
Submitted by:	Olexander Kunytsa <kunia@istc.kiev.ua>
MFC after:	1 week
2002-05-20 12:01:58 +00:00
Robert Watson
6be2f8829a Off-by-128 error in the cuam* device node numbers. 2002-05-20 05:12:56 +00:00
Robert Watson
12f2edc7d5 Bump the rc driver a little bit closer to the 21st century: use
make_dev() to create device nodes for each of the serial port channels
(ttym%d and cuam%d respectively, as borrowed from MAKEDEV).  This allows
the rc driver to work in 5.0.  I've tested it with only one card, but
will try sticking in a second card tomorrow and see what happens.
2002-05-20 05:04:41 +00:00
Mitsuru IWASAKI
494ae5601d Terminate ACPI subsystem on reboot.
Some machines stuck on reboot if ACPI sleep/wakeup was executed.
2002-05-19 15:12:40 +00:00
Peter Wemm
9cfd8eb371 Try and solve some cases of labels at end of compound statements that gcc
now objects to (as it should, it is not legal C).
2002-05-19 06:31:56 +00:00
Peter Wemm
b4a052380f Brutally deal with __func__ being 'const char *' on gcc-3.1. 2002-05-19 06:16:47 +00:00
Eric Melville
096a727e41 Separate "seperate" from kernel source. 2002-05-16 22:43:20 +00:00
Tom Rhodes
d394511de3 More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
Warner Losh
5b6a60ea0a Use splnet() when we need to block timeouts rather than splimp() since
the former blocks software interrupts, while the latter blocks
hardware interrupts.

Avoid one place where I'm at splnet across a call to copyout.  Leave
one in place to give bde something to complain about :-).  Actaully,
I'll fix it in a subsequent commit.

Reviewed by: bde
spl conical hat to: imp
2002-05-16 06:32:37 +00:00
Mike Silbersack
000c679b3c Enhance the use of the watchdog timer in this driver so that it will
allow recovery from transmission lockups which occur in the middle
of the descriptor list, rather than just at the beginning.

For some unknown reason, Rhine II chips have a tendency to stop
transmitting while under heavy load, possibly due to collisions.
Whether this behavior is due to a hardware bug or a driver glitch
is unknown as of now.

In either case, this change allows the driver to gracefully recover
from such situations.

Special thanks go to The Anarcat <anarcat@anarcat.dyndns.org>, who
bugged me into looking at this and to
Dominic Marks <dominic_marks@btinternet.com>, who performed a great
deal of testing to help characterize this problem.

MFC after:	3 days
2002-05-15 17:05:28 +00:00
Brian Somers
2f371b0268 Remove an extraneous )
Not approved by: maintainer

I'm guessing that this is trivial enough to sidestep approval.
2002-05-15 12:25:11 +00:00
David E. O'Brien
d93389d676 `unexpand -a' should be run _before_ sed 's/^#define /#define^I/g'. 2002-05-14 21:59:10 +00:00
David E. O'Brien
5d340b7ec1 Tighten up the defined()'s. 2002-05-14 21:54:56 +00:00
Joerg Wunsch
a2642c4d67 After some comments from bde, rewrite the loops to avoid turning the
previously used "micro-optimization" (count-down loop) into a
pessimization.  Now the loops are written in the more natural count-up
form.

Also, while being there, i made the logic in out_fdc() similar to the
logic in in_fdc().  The old implementation was a bit bogus anyway
since it first tested the DIO bit and only afterwards the RQM bit.
However, according to the description of the i82077, the DIO bit is
only guaranteed to be valid once the RQM bit is set.  Thus, the old
implementatoin would have had the chance to misbehave on a controller
that is implemented in accordance with the i82077 description (but is
not bug-for-bug compatible).

MFC after:	3 days
2002-05-14 21:28:45 +00:00
David E. O'Brien
d600c96632 Tweak the include dirs w/o incurring extra warnings 2002-05-14 01:18:51 +00:00
David E. O'Brien
014585d125 unexpand -a everything 2002-05-14 01:09:03 +00:00
David E. O'Brien
ddd36f9fac First pass of style(9) for #define's. 2002-05-14 00:53:08 +00:00
Warner Losh
e9f49c9c96 BDE and I have had a chance to hash this out:
o Use splnet() instead of splclock().
o Use splnet() instead of splimp().

Reviewed by: bde
2002-05-13 21:17:33 +00:00
Bruce Evans
5d81c9882f Don't include <stddef.h> "For offsetof". This is not even wrong in
-current, since offsetof() is defined a header under /sys so that
system sources don't need to have this wrong include.

This bug was only detected because my version of <stddef.h> has some
spelling fixes (s/field/member/g) and gcc is now sensitive to the spelling
of arg names in macros as required by standards (ISO C90 6.8.3...).
2002-05-13 14:11:33 +00:00
Joerg Wunsch
8a0ba81859 style(9) changes before further editing that region:
. add unnecessary parenthesis around return values
. put body of an "if" statement onto a line of its own
2002-05-13 10:28:20 +00:00
Poul-Henning Kamp
77068a7fe2 Retire the bogus uses of the disklabel field d_sbsize and begin to
initialize it to zero so we don't have to have everbody and their
aunt including FFS specific header files.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:49:41 +00:00
Joerg Wunsch
5613959d84 Hide the fd autoselection messages behind the bootverbose case so they
stop bothering people on their consoles.
2002-05-12 17:17:46 +00:00
Joerg Wunsch
cb38bb6c36 Increase the PIO timeout to approximately the value it used to have
before rev 1.229 (~ 100 ms).  According to bde, some (old) broken
hardware could require it.  In order to make timing more accurate than
what could be achieved with a loop around DELAY(1), increase loop
timing after the initial ~ 1 ms.

Also, move the declaration of FDSTS_TIMEOUT out from fdreg.h into fd.c
where it actually belongs to.

MFC after:	2 days
2002-05-12 15:24:21 +00:00
Scott Long
c52bf372f5 Update the PCI table as per Dell's fickleness.
MFC after:	3 days
2002-05-12 04:30:28 +00:00
Dima Dorfman
b90faaf350 sysctl -w -> sysctl 2002-05-11 06:06:11 +00:00
Joerg Wunsch
d0900d6bc0 Change the PIO loops from a hard counter into a loop that calls DELAY()
in each cycle, with a tunable max cycle count defined in fdreg.h.

This is said to fix the problem on some Compaq hardware (and perhaps
on other machines using the Natsemi PC87317 chip) where the fdc(4)
driver failed to operate at all.

PR:		kern/21397
Submitted by:	Jung-uk Kim <jkim@niksun.com>
MFC after:	3 days
2002-05-10 17:56:39 +00:00
David E. O'Brien
39bd77be52 Use only bits w/in /sys if at all possible. 2002-05-10 01:53:16 +00:00
Josef Karthauser
f737c3ae0a MFNetBSD: Bring in the most recent NetBSD and OpenBSD parts. 2002-05-09 21:55:47 +00:00
John Baldwin
3c600cfb6c Fix acpi_avoid() to call freeenv() on the original char * returned from
getenv().

Reported by:	joe
Tested by:	joe
2002-05-09 21:13:37 +00:00
Peter Wemm
7cca309311 Use usb_callout_init() instead of directly calling callout_init() with
NetBSD's expected arguments.  This unbreaks the kernel compile.

Pointy hat to: joe
2002-05-09 21:08:34 +00:00
David E. O'Brien
6feff71aaf Directives may not be used inside a macro argument, so don't. 2002-05-09 18:01:19 +00:00
Josef Karthauser
4722fea82e MFNetBSD:
revision 1.43
    date: 2001/04/12 01:39:04;  author: thorpej;  state: Exp;  lines: +2 -2
    Switch to USB_USE_SOFTINTR.  The callout hack does indeed work
    fine for systems without generic soft interrupts, even if it is
    a little sub-optimal.  Consider it a penalty for ports not
    implementing a kernel API.

    Addresses kern/11957.  The PR has been open for 4 months, and
    I have work blocked on the continued existence of splimp() in
    the networking code.

The NetBSD patch only switches it on for NetBSD, but I've also
switched it on for FreeBSD in this commit.
2002-05-09 12:49:25 +00:00
John Baldwin
492da65ed7 Detect and attach to the ICH3 SMBus controller.
PR:		i386/36972
Submitted by:	Colin Perkins <csp@isi.edu>
Requested by:	Larry Rosenman <ler@lerctr.org>
MFC After:	7 days
2002-05-08 00:51:54 +00:00
Warner Losh
d87fc9ac63 Try to use spls more correctly 2002-05-07 18:09:19 +00:00
Bruce Evans
833863ff77 Include <sys/lockmgr.h> for definitions of deprecated locking interfaces --
don't depend on namespace pollution in other headers.
2002-05-06 23:34:13 +00:00
Alfred Perlstein
e649887b1e Make funsetown() take a 'struct sigio **' so that the locking can
be done internally.

Ensure that no one can fsetown() to a dying process/pgrp.  We need
to check the process for P_WEXIT to see if it's exiting.  Process
groups are already safe because there is no such thing as a pgrp
zombie, therefore the proctree lock completely protects the pgrp
from having sigio structures associated with it after it runs
funsetownlst.

Add sigio lock to witness list under proctree and allproc, but over
proc and pgrp.

Seigo Tanimura helped with this.
2002-05-06 19:31:28 +00:00
Josef Karthauser
567f4af63d MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),
usbdi.h (1.60)
	  (and local changes compatibility changes to ufm.c and urio.c)

    date: 2002/02/11 15:11:49;  author: augustss;
    Give usbd_do_request_flags() an extra argument for the timeout.
2002-05-06 18:23:36 +00:00
Mitsuru IWASAKI
e8388e1466 Add suspend/resume code mostly merged from fxp/rl driver.
This is temporary hack, better and generalized solution probably
should be implemented at lower layer(MII or PCI?).
Tested by:	shoko.araki@soliton.co.jp
MFC after:	1 week
2002-05-06 10:55:42 +00:00
David Malone
a37231dc3f Add another Askey ISA modem ID.
PR:		35813
Submitted by:	Chris Knight <chris@aims.com.au>
2002-05-06 09:02:55 +00:00
Orion Hodson
7dace039d8 No longer attempt to power off the ACLINK during suspend - luigi
reports this causes his ich machine to hang.
2002-05-05 15:37:09 +00:00
Maxime Henrion
614be65181 When a program launched on the local console exits, the shell will
call read() to get the next command, and scread() disables the
screensaver.  We don't want this behaviour in the sc_saver_keybonly
case.

Submitted by:	Olivier Houchard <doginou@ci0.org>
2002-05-04 15:42:38 +00:00
Poul-Henning Kamp
d9fc2b816e Do not call nge_tick() if we get an PHY interrupt, nge_tick() calls
mii_tick() which should only be called once per second.

Our current MII/PHY state-engine is not able to deal with PHY
interrupts as far as I can tell, and most net drivers don't seem
to use the link/status change call-back mechanism.  It seems that
MII/PHY was orphaned before it grew up.
2002-05-04 11:15:33 +00:00
Poul-Henning Kamp
37c0fba7c4 Increase gigE negotiation timeout to 17 seconds.
10 seconds is not enough to negotiate a gigE link with a cisco switch which
holds carrier off for several seconds between tries.
2002-05-04 11:08:49 +00:00
Poul-Henning Kamp
fd94424c78 Clean up mii/phy drivers: Remove the MIIF_DOINGAUTO which doesn't really
do anything at the end of the day except bloat the drivers which has
copy&pasted it.
2002-05-04 11:00:30 +00:00
Poul-Henning Kamp
9589c2561c Fix a memory-leak when configuring a vnode backed md(4) device fails.
Submitted by:	Martin Faxér <gmh003532@brfmasthugget.se>
MFC after:	4 weeks
2002-05-03 17:55:10 +00:00
Poul-Henning Kamp
9ebe64ca1b Don't grab the lock until somewhat later in attach to avoid a lock
reversal.
2002-05-03 08:44:53 +00:00
Seigo Tanimura
5cbc7077cb The first argument of pgsigio() is now struct sigio **. 2002-05-03 07:45:26 +00:00
Scott Long
39ee03c316 bzero out the sync command buffer when sending commands. This was causing
problems when enumerating multiple arrays.

This is an MFC candidate.
2002-05-03 00:07:50 +00:00
Josef Karthauser
38c162edb3 MFNetBSD:
revision 1.94
    date: 2001/12/30 20:26:59;  author: augustss;  state: Exp;  lines: +5 -2
    Make sure we don't have any pending softintrs when entering polling mode.
    Thanks to Darrin for finding and fixing this problem when using USB
    keyboards in DDB.
2002-05-02 22:47:37 +00:00
Prafulla Deuskar
29c4c8ed2b Make em driver compilable on IA64/alpha.
Submitted by:	peter
MFC after:	3 days
2002-05-02 22:21:01 +00:00
Julian Elischer
8ac00c2767 Add missing UNLOCKs
Submitted by: dirkx@covalent.net
2002-05-02 15:58:04 +00:00
Matt Jacob
f77e6d9569 If we get a DATA UNDERRUN error from QLogic FC cards, but the RQCS_RU bit
is not set in the scsi completion status, or if the residual is clearly
nonsense, then this was a command that suffered the loss of one or more
FC frames in the middle of the exchange.

Set HBA_BOTCH and hope it will get retried. It's the only thing we can do.

MFC after:	1 day
2002-05-01 21:58:36 +00:00
Semen Ustimenko
08279b9cfe Add an epic_stats_update() function (called once per second). Even though
we don't collect any stats in it, we mii_tick() in it! This fix the bug
when autonegotiating fullduplex modes.

Also, pause activity before setting TXCON in epic_miibus_statchg(). Though
i've never seen problmes from not doing that, the documentation says we
need to do it.

MFC after:	1 week
2002-05-01 19:23:04 +00:00
Semen Ustimenko
4592db4635 MII_TICK handlers need not restart aneg on these PHYs, they behave pretty
well as is, so - just fetch current status upon MII_TICK.

Also do IFM_INST verification at the top of *_service() then doing it
separately for every case in switch.

acphy: do not read MII_ACPHY_DIAG twice, there is nothing latching.
qsphy: always fetch actual link status from MII_QSPHY_PCTL.

MFC after:	1 week
2002-05-01 19:15:54 +00:00
Peter Wemm
49d8998589 Add "CFLAGS+= -I${MAKESRCPATH}" when running under the kernel build,
otherwise #include "aicasm.h" etc do not work with gcc-3 and later.
2002-05-01 06:50:59 +00:00
David E. O'Brien
90a78bd0ba makeobjops.awk is stricter on syntax than the perl version. 2002-05-01 03:52:40 +00:00
David E. O'Brien
82303b6b14 Remove the trailing ^M's. makeobjops.awk does not like them. 2002-05-01 03:07:40 +00:00
Scott Long
1089f082aa Fix a bug where the aacp device would only talk to bus 0 on the
controller.
2002-04-30 22:50:26 +00:00
Poul-Henning Kamp
2266fe776e Don't export timecounter structures under debug. with sysctl, they
contain no truly interesting data anymore.
2002-04-30 19:34:31 +00:00
Julian Elischer
d4f567ee57 Need more includes. 2002-04-30 16:43:51 +00:00
Julian Elischer
f269532cd0 Add the extra argument to mtx_init() 2002-04-30 15:50:09 +00:00
Warner Losh
883ee9463e skibo tells me that that I didn't apply all of his last patch, and
sent me a replacement patch that fixes the problem.  The challenge
buffer was not large enough by a factor of 4 (due to my changing the
size from 128 to 32, but not u_int8_t to u_int32_t).

MFC after: 1 day
Submitted by: skibo@pacbell.net
2002-04-30 03:46:27 +00:00
Paul Saab
d4aa427fd1 - Set the maximum number of device transactions to what the driver
is limiting it to, not what the device says it can handle.
- cl_status is an integer. cl_lstatus is a pointer.
- Add some debugging code to dump some things the driver knows about
  the adapter.
- Tell CAM that the adapter can handle more commands when a command
  completes.  This fixes the problem were the SIM would freeze once
  the driver hit the maximum number of transactions for the device.
- Change the vendor string to COMPAQ.
- Turn of Synchronize Cache for now.  It locks the controller up.

Approved by:	msmith
Obtained from:	Yahoo!
2002-04-29 21:46:09 +00:00
Warner Losh
0f98688eb0 We don't need the card_if.h here. It breaks the building of kernels
with wi but without pccard.  Also remove an RCS id that I don't think
we need.
2002-04-29 21:11:02 +00:00
Warner Losh
1456297748 splsoftnet is spelled splimp in FreeBSD rather than splnet. splimp is
used to protect the rest of the driver.  This is a no-op commit to current,
but is needed for the MFC.

MFC after: 1 day
2002-04-29 19:04:29 +00:00
Eric Anholt
b1ade6ab46 More diff reduction: Shuffle around some header code as was done in
drmcommand-0-0-1-branch of DRI CVS, more return code cleanup, and remove some
gratuitous ifdefs.

Approved by:	des
2002-04-29 18:18:42 +00:00
Josef Karthauser
8a7a68b108 Some non-functional changes to make the differences between NetBSD's
and our version clear to see.
2002-04-29 16:23:14 +00:00
Maxim Sobolev
f4b27e80b3 Regen after rev.1.89 of usbdevs. 2002-04-29 15:02:30 +00:00
Maxim Sobolev
daa77b45ce Change Device ID string for DaisyTech devices to be more sensible.
PR:		37197
Submitted by:	Olexander Kunytsa <kunia@istc.kiev.ua>
2002-04-29 15:01:35 +00:00
Poul-Henning Kamp
875525d517 Introduce NetBSD's mii_phy_match() API and use it in the nsgphy to
get a description printed.
2002-04-29 14:09:10 +00:00
Poul-Henning Kamp
e5fbad8bca Convert exphy and ukphy over to the new code.
exphy is done flying blind, ukphy is tested on one card.
2002-04-29 13:35:31 +00:00
Poul-Henning Kamp
279fe8d156 Make one generic mii_phy_detach() to replace 19 slightly different ones.
Rename mii_phy_auto_stop() mii_phy_down().

Introduce mii_down(), use it from nge.  Do not indirect it to 19 identical
case's in 19 switchstatements like NetBSD did.
2002-04-29 13:07:38 +00:00
Poul-Henning Kamp
78c8c3db4b Move a lot closer to NetBSDs MII support for GigE.
Move fxp and nge drivers over to use the new stuff.
2002-04-29 11:57:30 +00:00
Warner Losh
d76b2f9d54 Spell hw.cbb.start_memory the same in the HINT as well as the sysctl.
Noted by: bde
2002-04-29 07:41:58 +00:00
Warner Losh
9ce2d50cf2 Make sysctl RW 2002-04-29 07:37:09 +00:00
Poul-Henning Kamp
b7dee1db97 Moving closer to being able to use NetBSD's generic mii_set_media()
function.
2002-04-29 07:18:26 +00:00
Warner Losh
8ad896e0ad Untimeout before calling timeout. I think that I have caught all the cases
where we were scheduling a timeout multiple times, but am not positive.
2002-04-29 06:55:46 +00:00
Poul-Henning Kamp
a295ccc9f0 Edging ever closer to NetBSD... 2002-04-29 06:48:20 +00:00
Poul-Henning Kamp
45521525a7 Move us yet closer to IFM_* definitions in NetBSD. 2002-04-29 05:32:44 +00:00
Eric Anholt
c9d942be3a Diff reduction to my experimental code: clean up return code handling.
Approved by:	des
2002-04-29 00:25:10 +00:00
Cameron Grant
21ed9908a2 add a missing \n to an unregister failure message 2002-04-28 22:59:45 +00:00
Cameron Grant
9dbee70d4a recognise ct5880-e
Submitted by:	SONODA Yoshihide <yshd@na.rim.or.jp>
2002-04-28 22:38:23 +00:00
Poul-Henning Kamp
b418ad5c2e Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/ 2002-04-28 20:34:20 +00:00
Poul-Henning Kamp
07dd938303 Don't pass three args when one will do just fine, and even prevent
mistakes like the one brgphy.c (now corrected).
2002-04-28 19:25:07 +00:00
Poul-Henning Kamp
83549c664b Improve an API by about 4 lines per driver. 2002-04-28 19:01:32 +00:00
Poul-Henning Kamp
3aae18bde8 Use generic MII #defines instead of private ones when the registers
are IEEE defined.

Object file comes out the same.
2002-04-28 18:47:29 +00:00
Poul-Henning Kamp
1aad4b2a52 Merge in rev 1.9 from NetBSD. 2002-04-28 18:43:30 +00:00
Eric Anholt
67a2a28fe4 Hook the DRM up to the build and add it to NOTES.
Approved by:	des
2002-04-28 04:58:40 +00:00
Warner Losh
9218b6a376 Alphabetize descriptions and remove the "PCI" from the desciptions.
Suggested by: brooks
2002-04-28 02:04:28 +00:00