Commit Graph

7496 Commits

Author SHA1 Message Date
Josef Karthauser
fbc2dfc441 MFNetBSD:
revision 1.102
    date: 2001/04/01 15:00:29;  author: augustss;  state: Exp;  lines: +3 -1
    Add two missing splx() (inside DIAGNOSTIC).  From OpenBSD.
2002-04-07 10:02:45 +00:00
Josef Karthauser
16b08d2552 MFNetBSD:
revision 1.142
	date: 2001/10/25 02:08:13;  author: augustss;  lines: +14 -16
	Change reset sequence to get status change bits set right on startup.
2002-04-07 09:57:23 +00:00
Josef Karthauser
4792bfc8f6 MFNetBSD:
revision 1.141
	date: 2001/10/24 21:04:04;  author: augustss;  Exp;  lines: +20 -4
	Some more paranoia tests when entering the interrupt routine.
2002-04-07 09:52:49 +00:00
Søren Schmidt
a12b615d49 Add yet another ATA133 Promise chip. 2002-04-07 07:53:34 +00:00
Josef Karthauser
db3c6cb423 Iron out some obvious differences between NetBSD's and own version of
this file.
2002-04-06 22:06:16 +00:00
Josef Karthauser
8d3dd017ad Define away 'Static' when compiling with USB_DEBUG defined, to make it
easier to debug.
2002-04-06 21:46:47 +00:00
Josef Karthauser
6a69a08a22 Use the UE_GET_XFERTYPE macro. 2002-04-06 21:28:57 +00:00
Josef Karthauser
dc2aa84c92 Remove some old unused cruft. 2002-04-06 21:03:49 +00:00
Josef Karthauser
2ce84795da Another step in merging our if_aue driver with NetBSD's. 2002-04-06 20:50:21 +00:00
Josef Karthauser
396a51fb2f Rename csr_{read,write}_* to cue_csr_{read,write}_*. 2002-04-06 20:24:25 +00:00
Josef Karthauser
47c61eef1b Rename foo_gone to foo_dying, in keeping with the rest of the usb code. 2002-04-06 20:17:13 +00:00
Josef Karthauser
3d9e00aa02 Replace device_t with device_ptr_t. 2002-04-06 19:55:52 +00:00
Josef Karthauser
fc5290cfa4 Regenerate. 2002-04-06 19:35:00 +00:00
Josef Karthauser
4ad5d253df Remove a erroneous entry for HP 5400C.
Spotted by:	phk
2002-04-06 15:00:41 +00:00
Poul-Henning Kamp
86383b37c0 Fix a typo in the definition of HP1220C and add a quick entry for
broken bidir mode for at as well.
2002-04-06 13:28:02 +00:00
Josef Karthauser
28543fc9c6 Regenerate. 2002-04-06 13:07:05 +00:00
Josef Karthauser
46d8539f1c Add some more printer devices:
DeskJet 1220C		from phk
  Scanjet 5400C		from NetBSD
  Inkjet P-2000U	from NetBSD
2002-04-06 13:06:07 +00:00
Josef Karthauser
1ea26b29b6 Synchronise with NetBSD for order and formatting; no functional changes. 2002-04-06 13:01:39 +00:00
Josef Karthauser
9ad42ab594 Add a new vendor: MINOLTA, and some products by them.
Partially submitted by:	asmodai
2002-04-06 12:27:23 +00:00
Prafulla Deuskar
076c4c2633 Added support for 82540EM based cards.
Cosmetic changes to make code more unix-like.

MFC after:	1 week
2002-04-06 00:36:53 +00:00
Scott Long
fee435e8ac Add support for the Dell 2650
Submitted by:	andrew_bachler@dell.com
2002-04-05 20:00:29 +00:00
Søren Schmidt
32dbed0488 Unlock the channel again if an ata_reinit() fails. 2002-04-05 18:37:04 +00:00
Alfred Perlstein
ae4f6a8242 remove blanktime sysctl, this can't be done as easily as it looks.
Requested by: jhb
2002-04-05 18:17:49 +00:00
Søren Schmidt
268f0ea9a3 Change option ATA_ENABLE_BUSMASTER into ifdef __sparc64__ 2002-04-05 18:05:17 +00:00
Søren Schmidt
ede0f136df Cleanups. 2002-04-05 18:04:05 +00:00
Søren Schmidt
111ab6f7ed Dont allow to detach twice. 2002-04-05 18:02:33 +00:00
Alfred Perlstein
de4dc9595e Add some functionality via sysctl to syscons.
hw.syscons.saver.keybonly: used to specify that only input is to
interrupt the screensaver.  This allows one to run a chatty console
app but still have the screen blank out until a key is pressed.
There should probably also be an ioctl for this, we'll do that later.

hw.syscons.saver.blanktime: exports the screensaver timeout via sysctl.

Submitted by: Olivier Houchard <doginou@cognet.ci0.org>
2002-04-05 17:53:25 +00:00
Poul-Henning Kamp
e9ad04e4e6 Make LINT compile again. 2002-04-05 17:45:47 +00:00
Warner Losh
c385d0928b catch up to 1.31 2002-04-05 16:25:34 +00:00
Warner Losh
0d1049364f Add 3crwe77a 2002-04-05 16:25:03 +00:00
Søren Schmidt
22c60e8d8c Add forgotten ATA_UNLOCK_CH when getting status from non-existing
enclosure.
2002-04-05 15:58:45 +00:00
Søren Schmidt
7800211b08 Make the ATA driver compile & work on the sparc64 platform.
Initial work & code by tmm.

Lots of changes and rearrangements by yours truely to make busdma
be a little less a PITA (but I still dont like it).
2002-04-05 13:13:56 +00:00
Matt Jacob
f35c4ba63a Send 32 bytes out for fc4_types... Interestingly enough the Solaris/Sparc
version worked fine, but Linux/Sparc && FreeBSD/Sparc choked.

MFC after:	1 week
2002-04-05 01:40:05 +00:00
Warner Losh
8838e07eeb The 3Com 3CRWE62092A (the XJack antenna product) does not have a host
interface that is compatible with the LUCENT or HERMES firmware.
Instead, it is like the various No Wires Necessary products that were
produced a while ago and then sold to intersil.  It will require a
different driver altogether.  Remove it from the list of supported
cards.

The 3CRWE777A apperas to be a re-badged SMC 2602W card, so the driver
appears to support it.  Add it to the list.

Thanks to Todd Miller for loaning me the card during tonight's FRUUG
meeting for testing against CU's wireless infrastructure.
2002-04-05 01:31:30 +00:00
Matt Jacob
029f13c671 Fix bus dma segment count to be based off of MAXPHYS, not BUS_SPACE_MAXSIZE.
Grumble. I've seen better documented architectures out of Redmond.

Redo fabric evaluation to not use GET ALL NEXT (GA_NXT). Switches seem
to be trying to wriggle out of supporting this well. Instead, use
GID_FT to get a list of Port IDs and then use GPN_ID/GNN_ID to find the
port and node wwn. This should make working on fabrics a bit cleaner and
more stable.

This also caused some cleanup of SNS subcommand canonicalization so that
we can actually check for FS_ACC and FS_RJT, and if we get an FS_RJT,
print out the reason and explanation codes.

We'll keep the old GA_NXT method around if people want to uncomment a
controlling definition in ispvar.h.

This also had us clean up ISPASYNC_FABRICDEV to use a local lportdb argument
and to have the caller explicitly say that a device is at the end of the
fabric list.

MFC after:	1 week
2002-04-04 23:46:01 +00:00
Thomas Moestl
635435f4f6 Add a driver back end for the Mostek MK48T02, MK48T08 and MK48T59
time-of-day clocks, ported from NetBSD. The front-ends are expected
to be at least partly machine-dependent; the sparc64 EBus and SBus
ones will be commited to MD directories for now (in a subsequent commit).
2002-04-04 23:44:42 +00:00
Warner Losh
15ffbeb81d MFNetBSD:
1.60: Add range checking, but put it higher up in the food
	chain than NetBSD (this should be fixed there as well).

Obtained From: NetBSD
2002-04-04 22:22:31 +00:00
Warner Losh
dfdbc0533d MFNetBSD:
wi.c 1.64: Table driven IDs (ichiro)
	1.59: Don't use magic numbers (ichiro)
Also, added Sony, Lucent Embedded Ids and fix minor bugs for lucent
cards (and submit those changes back to ichiro-san)

Obtained from: NetBSD
2002-04-04 21:40:37 +00:00
John Baldwin
6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
John Baldwin
489c22ebb8 Add lock type arguments to callers of snd_mtxcreate(). 2002-04-04 20:56:47 +00:00
John Baldwin
2c69ba8741 Change snd_mtxcreate() to accept a lock type as an extra argument that is
passed to mtx_init().
2002-04-04 20:54:27 +00:00
Warner Losh
276bdee1b5 o Reduce the gratuitous differences with NetBSD.
o OpenBSD's wiconfig tells me that a value of '2' is for sony wireless
  cards, 1 is for lucent (which we already knew) and '5' is for embedded
  lucent cards.
o Move some RID definitions to if_wavelan_ieee.h and use NetBSD names
  more often.

# more work is still needed in this area.
2002-04-04 06:28:16 +00:00
Bill Paul
a1d52896af Try to sort out the correct way to generate async link state change
interrupts. This is a bit harder than it needs to be because there's
more than one way to generate link attentions, at least one of which
does not work on the BCM5700, but does on the 5701.

For the 5701, we can safely use the 'link changed' bit in the status
block, and we enable link change attentions in the mac event register.
For the 5700, we have to use MII interrupts, which require checking
the MAC status register rather than the status block. This requires
doing an extra register access on each interrupt which I'd prefer to
avoid, but them's the breaks. Testing with both a 3c996-T and 3c996B-T
shows that we do in fact detect the link going up and down properly
on cable insertions/disconnections.

Also, avoid twiddling the autopoll enable bit in the MI mode register
when doing a PHY read. I think this coupled with the other changes
will stop the interrupt storms Paul Saab has been harassing me about.
Manually setting the link to 100baseTX full duplex seems to work ok
for me. (I'm typing over the 3c996B-T right now.)

Lastly, teach the driver how to recognize a 3c996B-SX by checking
the hardware config word in the EEPROM in order to detect the media.
We attach 5701 fiber cards correctly now, but I haven't verified that
they send/receive packets yet since I don't have a second fiber
interface at home. (I know that fiber 5700 cards work, so I'm
keeping my fingers crossed.)
2002-04-04 06:01:31 +00:00
Julian Elischer
167aa83312 Add the driver for "myson" ethernet cards.
This driver was written by Myson and is made available
by their courtesy.
The 5.x version is not fully tested (I will be testing) but
the 4.x version has been tested by many.
I will commit it soon.
Myson have their own chip design based on the DEC 214xx family but
with several differences. Myson sells this chip to several
EOMs in teh Chinese area so there may be many noname brand cards
that respond to this driver. Myson will be supplying a list
of some of these.
2002-04-04 05:22:13 +00:00
Warner Losh
c677a10e48 It would appear, from preliminary indications, that No Wires Necessary
cards aren't compatible with either Lucent or Intersil firmware.
2002-04-03 20:39:07 +00:00
Warner Losh
a19c104dd2 Four fixes from NetBSD:
1) Properly detect the Symbol based cards (The 3Com Airconnect and their
   ilk) and only reset them *ONCE* ever.  This appears to make them work,
   but more testing is needed.  The tests that would wedge up my machine
   completely now appear to work, but I have not real access points
   handy.
2) Report both the Station firmware and the Primary firmware on Prism
   based cards.  On Lucent based cards, only report the station firmware
   since that's all it supports.  On symbol cards, report the symbol
   specific firmware name as its station firmware.
3) Better Prism 2.5 and 3 family names.  We really need to go table
   driven for this.
4) Workaround for bugs in Intersil's firmware is only needed for at most
   0.8.2 and earlier, since 0.8.3 and later appear to work.

Obtained from: NetBSD
2002-04-03 19:44:17 +00:00
Matt Jacob
1923f73990 Redo stuff for sparc64- primarily fix bus dma implementation. The endian
stuff was right, but the busdma stuff was massively not right.

Didn't really test on ia64 or i386- don't have the former h/w and my
FreeBSD-current disk is unwell right now. Hope that this is okay.

MFC after:	1 week
2002-04-02 23:36:14 +00:00
Scott Long
671eafe203 Add support for the PERC3/Di found in the Dell 1650
Submitted by:	mp
2002-04-02 21:49:26 +00:00
Joerg Wunsch
84954bb898 When reading a UFS-style label from a floppy, don't attempt to use a
"raw partition" of any kind since the floppy driver doesn't support
UFS-style partitions at all.

Reported by:	"Crist J. Clark" <crist.clark@attbi.com>
Reviewed by:	bde
MFC after:	3 days
2002-04-02 18:29:43 +00:00
Søren Schmidt
3eb933c093 Correct the Northbridge test on the new ATA133 VIA's
Misc cosmetics now I'm there.
2002-04-02 16:45:06 +00:00
Josef Karthauser
86cf1335d5 Back the last commit out. The network drivers need reworking first. :( 2002-04-02 14:54:52 +00:00
Josef Karthauser
920153807b MFNetBSD: usbdi.c (1.80), usbdi.h (1.51)
date: 2001/04/13 11:19:58;  author: augustss;
    Finally get rid of the UGLY and EVIL hack for avoiding tsleep().
2002-04-02 14:28:18 +00:00
Josef Karthauser
5b33e5c6be MFNetBSD:
revision 1.89
    date: 2001/11/10 17:10:42;  author: augustss;  state: Exp;  lines: +2 -1
    Abort any xfers on the control pipe before closing it on detach.
2002-04-02 14:16:06 +00:00
Josef Karthauser
54d369e6e5 MFNetBSD: usb_port.h (1.45 partial), usb_subr.c (1.88)
date: 2001/11/10 16:53:32;  author: augustss;
    Small portability improvement.
2002-04-02 14:14:14 +00:00
Josef Karthauser
e92dc1d513 MFNetBSD: usb_subr.c (1.87), usbdi.h (1.53)
date: 2001/08/15 00:04:59;  author: augustss;
    Add a little infrastructure so that individual drivers can easily check
    if thee was a vendor+product locator match.
2002-04-02 14:08:43 +00:00
Søren Schmidt
3348c0092c Add get-status to the ATA RAID subsystem. 2002-04-02 13:48:17 +00:00
Josef Karthauser
246a3f534a Reduce differences between NetBSD's version and ours.
(Should be all white space related, but there's the removal of the
odd 'register' directive also).
2002-04-02 13:26:40 +00:00
Josef Karthauser
c8d05bc5f5 Use ANSI prototypes and declarations. 2002-04-02 11:54:28 +00:00
Poul-Henning Kamp
408ab1b875 Retire the bogus ioctl DIOCGPART in toto.
Once again we can notice that badly thought out hacks ferment and infect
far more code than initially expected.

Sponsored by:	DARPA and NAI Labs.
2002-04-02 11:52:13 +00:00
Josef Karthauser
4e6e5105b0 Use ANSI prototypes and declarations.
Rename csr_{write|read}_* to aue_csr_* in keeping with NetBSD.
2002-04-02 11:42:57 +00:00
Poul-Henning Kamp
13c0a6f45e Stop using the bogus DIOCGPART ioctl, use DIOCGSECTORSIZE and
DIOCGMEDIASIZE instead.

The partition type check has been XXX'ed out since we cannot expect
that a BSD disklabel with a type field be available on all platforms.
2002-04-02 11:40:45 +00:00
Poul-Henning Kamp
ffee6e99f6 One less user of the bogus DIOCGPART ioctl. 2002-04-02 11:17:37 +00:00
Josef Karthauser
548db09f32 MFNetBSD:
revision 1.50
    date: 2001/04/12 01:18:24;  author: thorpej;  state: Exp;  lines: +6 -2
    Only if __HAVE_GENERIC_SOFT_INTERRUPTS is then splusb == splsoftnet
    (because we register the interrupt with IPL_SOFTNET).  However, if
    we're using a callout, then splusb == splsoftclock (because the
    callouts happen from the softclock interrupt).

    Note that splsoftnet blocks softclock interrupts, but this is
    meant to better describe what's going on.
2002-04-02 10:53:42 +00:00
Josef Karthauser
e373532341 MFNetBSD: (partial merge, as part was already there).
revision 1.56
    date: 2001/11/13 07:55:30;  author: augustss;  state: Exp;  lines: +4 -4
    Add some #endif comments.
2002-04-02 10:48:58 +00:00
Josef Karthauser
44e0c682e0 MFNetBSD:
revision 1.54
    date: 2001/11/09 14:59:11;  author: augustss;  state: Exp;  lines: +2 -1
    Add a debug message.
2002-04-02 10:47:01 +00:00
Josef Karthauser
09f681d7b7 MFNetBSD: usb.c (1.53), usbdi.h (1.49)
date: 2001/01/23 17:04:30;  author: augustss;
    Ad function to remove a usb task.
2002-04-02 09:58:16 +00:00
Josef Karthauser
7e9590a260 MFNetBSD:
revision 1.52
    date: 2001/01/21 19:00:29;  author: augustss;  state: Exp;  lines: +5 -0
    Ad a comment.
2002-04-02 09:51:10 +00:00
Josef Karthauser
e469fe6e0a MFNetBSD: uhub.c (1.49), usb.c (1.51), usbdi.h (1.48), usbdivar.h (1.63)
date: 2001/01/21 19:00:06;  author: augustss;
    Change the operation of the USB event thread.  Before it only
    performed USB device discovery, now it can also perform (short)
    tasks for device drivers that need a process context, but don't
    have one.  This is not pretty, but better than using busy-wait
    in an interrupt context.
2002-04-02 09:49:36 +00:00
Warner Losh
990fa6b68a More newcard devices:
Netgear FA-410TXC
	Netgear FA-411
	Lantech Fastnet TX
	Linksys pcm100
Hide the total wildcard device for SVEC too :-(

Obtained from: NetBSD/OpenBSD
2002-04-02 05:52:52 +00:00
Warner Losh
6e9e29ea41 Add some devices from OpenBSD/NetBSD:
o 3Com 3crwe62092a
o Addtron awp100
o No Wires Necessary WLAN 550 and 1148
o Proxim RANGELANDS 8340

and reorder linksys to be in proper sort order.

Obtained from: OpenBSD (mostly)
2002-04-02 05:49:09 +00:00
Warner Losh
e17179bd8c Regen for 1.30 pccarddevs 2002-04-02 05:47:08 +00:00
Warner Losh
3b7f54aabe Actually merge proxim rangelands and addtron awp-100 2002-04-02 05:46:10 +00:00
Warner Losh
09d7bb7a18 regen to 1.29 pccarddevs 2002-04-02 05:39:40 +00:00
Warner Losh
cd5b41423a Merge from both NetBSD and OpenBSD's pcmciadevs:
NetBSD:
	1.163; martin; ELSA MicroLink mc all
	1.162; is; typo
	1.161; is; typo
	1.160; is; Add Lantech Fastnet/TX
OpenBSD:
	1.85; millert; proxim rangelan-ds
	1.84; provos; linksys wpc11
	1.83; mickey; now wires needed wlan
	1.82; mickey; socket low power wlan from netbsd [*]
	1.81; mickey; ericsson wlan
	1.80; fgsch; add openbsd tag back (not needed)
	1.79; fgsch; Netgear FA411
	1.78; mickey; simple spectrum25 from netbsd [*]
	1.77; mickey; emtac wavelan from netbsd [*]
	1.76; mickey; buffalo wavelans from netbsd [*]
	1.75; jakob; 3com wilress lan pccard
	1.74; mickey; linksys2 instant wireless
	1.73; mickey; oops (add closing quote)
	1.72; mickey; pcm100
[*] (already in freebsd)

Obtained from: NetBSD, OpenBSD
2002-04-02 05:39:07 +00:00
Warner Losh
f585cabf8e Make this compile again after the recent NetBSD merge 2002-04-02 03:39:33 +00:00
Warner Losh
dbab04ca39 First cut at breaking out the bus attachment from the bus independent
part of the driver.  Also, move the softc and some other stuff to
if_wivar.h from if_wireg.h to make future merging activities easier.
2002-04-02 02:38:35 +00:00
Josef Karthauser
8cc91a531e MFNetBSD:
revision 1.140
    date: 2001/10/24 20:20:03;  author: augustss;  state: Exp;  lines: +9 -5
    More debug.
2002-04-01 22:03:37 +00:00
Josef Karthauser
96668eef93 MFNetBSD:
revision 1.138
    date: 2001/10/02 17:59:38;  author: pooka;  state: Exp;  lines: +6 -6
    move DIAGNOSTIC-printf up one block to make it reachable
    noted by Christophe Kalt in private email
2002-04-01 21:56:42 +00:00
Josef Karthauser
657544fc48 MFNetBSD:
revision 1.136
    date: 2001/07/11 14:11:00;  author: augustss;  state: Exp;  lines: +5 -5
    Rearrange register dump when the controller is dying.  Fixes PR 13430.
2002-04-01 21:52:45 +00:00
Josef Karthauser
dd355d5455 MFNetBSD:
revision 1.135
    date: 2001/04/01 14:59:52;  author: augustss;  state: Exp;  lines: +2 -4
    Avoid a potential null pointer dereference.  From OpenBSD.
2002-04-01 21:43:53 +00:00
Josef Karthauser
cf78a5199e MFNetBSD:
revision 1.134
    date: 2001/03/25 22:52:21;  author: augustss;  state: Exp;  lines: +4 -1
    Try to make resume work on more machines.
2002-04-01 21:42:43 +00:00
Josef Karthauser
8be36692c3 MFNetBSD: ohci.c (1.99), uhci.c (1.133), usb.c (1.49), usb_port.h
(1.39), usbdi.c (1.79), usbdi.h (1.47), usbdivar.h (1.62)

    date: 2001/01/21 02:39:52;  author: augustss;
    Add code to use soft interrupt to handle USB interrupt processing.
    Don't enable the code since it doesn't work with the kludgy Ethernet
    drivers.
2002-04-01 21:34:01 +00:00
John Baldwin
44731cab3b Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
Josef Karthauser
a4a49508b4 MFNetBSD:
revision 1.132
    date: 2001/01/20 23:36:02;  author: augustss;  state: Exp;  lines: +6 -7
    Change some splusb() to splhardusb().
2002-04-01 21:18:50 +00:00
Josef Karthauser
a011c2e7a8 MFNetBSD: Update many URLs. 2002-04-01 21:13:22 +00:00
Josef Karthauser
9aee8efbeb MFNetBSD:
revision 1.40
    date: 2000/10/10 12:37:01;  author: augustss;  state: Exp;  lines: +4 -3
    Don't free unallocated pointer in detach (can happen if detach happens
    before attach has finished).
2002-04-01 20:32:50 +00:00
Josef Karthauser
236c85a379 MFNetBSD:
revision 1.60
    date: 2000/12/28 10:40:36;  author: augustss;  state: Exp;  lines: +2 -1
    #define for USB_2_0
2002-04-01 20:26:38 +00:00
Josef Karthauser
33ad8c22ff MFNetBSD:
revision 1.58
    date: 2000/06/24 04:12:53;  author: thorpej;  state: Exp;  lines: +5 -2
    Kill SPLUSBCHECK -- it's not portable, and quite annoying on some
    platforms which otherwise function just fine.
2002-04-01 20:23:50 +00:00
Josef Karthauser
493a192aa3 MFNetBSD:
revision 1.130
    date: 2000/12/18 15:55:30;  author: tsutsui;  state: Exp;  lines: +2 -2
    Add missed le32toh() in uhci_device_isoc_abort().
2002-04-01 20:18:21 +00:00
Josef Karthauser
ce2613651f MFNetBSD:
revision 1.129
    date: 2000/12/16 16:09:24;  author: augustss;  state: Exp;  lines: +4 -3
    Don't repeat 'host controller halted' message.  From OpenBSD.
2002-04-01 20:14:23 +00:00
Josef Karthauser
5b78cc48f6 MFNetBSD:
revision 1.127
    date: 2000/11/22 05:50:59;  author: soren;  state: Exp;  lines: +5 -5
    In uhci_intr(), only warn about power state confusion if the
    interrupt was actually for us.
2002-04-01 20:04:00 +00:00
Josef Karthauser
3974e26c89 MFNetBSD: ohci.c rev 1.94, uhci.c rev 1.126
date: 2000/11/10 14:11:49;  author: augustss;
    Update frlengths after a isoc transfer.
    Suggested by Yuri <yuri@tsoft.com>
2002-04-01 20:01:41 +00:00
Josef Karthauser
273b8b7d6f MFNetBSD: ohci.c rev 1.92, uhci.c rev 1.122 (part)
date: 2000/08/08 19:51:46;  author: tv;  state: Exp;  lines: +24 -13
    %b -> bitmask_snprintf()

    Because this code is shared, add a macro for bitmask_snprintf()
    that should expand to the equivalent snprintf() on non-NetBSD
    systems. This is only used in ?HCI_DEBUG cases anyway.
2002-04-01 19:42:51 +00:00
Josef Karthauser
b74ee36d30 MFNetBSD:
revision 1.86
    date: 2001/05/16 04:50:11;  author: lukem;  state: Exp;  lines: +1 -2
    delint: remove unnecessary assignment to same objection (hidden
    in #define)
2002-04-01 19:26:36 +00:00
Josef Karthauser
a4c63369dd constify 2002-04-01 19:22:04 +00:00
Josef Karthauser
174ea84839 Use ANSI prototypes and declarations.
Update $NetBSD$ idents to better reflect reality.
2002-04-01 19:01:09 +00:00
Warner Losh
8fcb428045 More diff reduction patches 2002-04-01 18:52:53 +00:00
Josef Karthauser
8271e9b194 Update $NetBSD$ idents to better reflect reality. 2002-04-01 18:31:16 +00:00
Warner Losh
922e111715 Merge a little from NetBSD. This changes reduces the diffs between the
two a little, but more commits like this will follow.
2002-04-01 18:28:20 +00:00
Warner Losh
282607088a Fix type from last commit 2002-04-01 18:26:32 +00:00
Josef Karthauser
b47a67cb20 Merge from NetBSD:
revision 1.81
    date: 2000/10/24 15:01:26;  author: augustss;  lines: +36 -10
    Add a hack to try and figure out if the TI UTUSB41 hub is bus
    powered despite claiming to be self powered (it's important to
    know so that the power budget can be met).
2002-04-01 18:22:31 +00:00
Warner Losh
c92b317966 Add more ID's from the PRISM family. from wi.c 1.61 and wireg.h 1.26 by
ichiro@netbsd.org

Obtained from: NetBSD
2002-04-01 18:07:05 +00:00
Josef Karthauser
8d6c171c25 Merge from NetBSD: revision 1.72
Part of this got merged in a previous commit, but not all.

    revision 1.72
    date: 2000/04/14 14:13:56;  author: augustss;  state: Exp;  lines: +34 -27
    Make attach of ugen work as it should so product&vendor locators
    can be used.
2002-04-01 18:03:00 +00:00
Josef Karthauser
84aa7f035a Update $NetBSD$ idents to reflect reality. 2002-04-01 17:54:07 +00:00
Josef Karthauser
cf39046c9d Merge from NetBSD: Removed unnecessary variable declaration. 2002-04-01 17:49:12 +00:00
Josef Karthauser
44b382cbc0 Synchronise with the NetBSD version of this header file for formatting. 2002-04-01 17:43:28 +00:00
Josef Karthauser
d262a59fb2 Merge from NetBSD: usbdi.c rev 1.77, usbdi.h rev 1.44
date: 2000/09/23 21:02:04;  author: augustss;
    Add a way to do control transfers on other pipes than the default pipe.
2002-04-01 17:30:24 +00:00
Josef Karthauser
b588f0eca0 Use ANSI prototypes and declarations. 2002-04-01 17:24:49 +00:00
Josef Karthauser
7b51deb455 Merge from NetBSD: Make it compile with USB_DEBUG. 2002-04-01 17:05:55 +00:00
Josef Karthauser
167145ddc0 Merge from NetBSD:
usb.c rev 1.43, usb_port.h rev 1.26, usb_subr.c rev 1.71

Some OpenBSD portability fixes.
2002-04-01 16:53:29 +00:00
Josef Karthauser
0f657c164b Merge from NetBSD:
usb.c 1.40:
    revision 1.40
    date: 2000/03/14 23:13:12;  author: augustss;  state: Exp;  lines: +4 -1
    Make sure the USB event thread discovers all devices first time
    it call usb_discover().  It should now be possible to have the
    root NFS mounted over a USB Ethernet Adapter.
2002-04-01 16:29:24 +00:00
Josef Karthauser
c0fdce4463 Merge from NetBSD:
usb_port.h (1.33), usbdi_util.c (1.32), usbdi_util.h (1.22):

    ----------------------------
    date: 2000/06/01 14:37:51;  author: augustss;
    Improve some portability items.
    ----------------------------
2002-04-01 16:09:43 +00:00
Josef Karthauser
85b64f4cea Tidy up the formatting so that it's in the style of NetBSD's copy of
this file.
2002-04-01 15:37:00 +00:00
Josef Karthauser
dd78396c46 Use ANSI prototypes and declarations. 2002-04-01 15:01:29 +00:00
Josef Karthauser
981149d059 Merge from NetBSD:
----------------------------
    revision 1.26
    date: 1999/11/28 22:49:53;  author: augustss;  state: Exp;  lines: +12 -8
    More USB_DEBUG and DIAGNOSTIC output.
    ----------------------------
2002-04-01 13:50:42 +00:00
Josef Karthauser
21034e3fc8 Merge from NetBSD:
----------------------------
    revision 1.73
    date: 2000/05/31 16:14:42;  author: augustss;  state: Exp;  lines: +19 -6
    Be more careful when setting the alternate interface so we don't
    end up with nothing set at all if it fails.
    ----------------------------
2002-04-01 13:43:02 +00:00
Josef Karthauser
04b496f565 Merge from NetBSD:
----------------------------
	revision 1.117
	date: 2000/05/30 09:26:06;  author: augustss;  lines: +7 -1
	As a safety, check that the controller is not suspended when we get
	an interrupt.
	----------------------------
2002-04-01 13:36:09 +00:00
John Hay
a4c6b91603 Add an entry for "PCCOM dual port RS232/422/485".
Submitted by:	Daniel O'Connor <doconnor@gsoft.com.au>
MFC after:	1 week
2002-04-01 13:33:43 +00:00
Josef Karthauser
55b7d12d51 Merge from NetBSD:
----------------------------
	revision 1.90
	date: 2000/05/08 18:28:46;  author: thorpej;  lines: +8 -3
	Quiet some uninitialized variable warnings that do in fact
	look legitimate.
	----------------------------
2002-04-01 13:28:49 +00:00
Josef Karthauser
3b53380927 Add a clarifying comment (from NetBSD).
Update the $NetBSD$ ident to reflect reality.
2002-04-01 13:26:27 +00:00
Josef Karthauser
a5450efd66 Merge from NetBSD:
ohci.c (1.85), ohcireg.h (1.17):

	----------------------------
	date: 2000/04/01 09:27:35;  author: augustss;
	Add a delay before reading the number of ports from the controller to
	avoid getting 0 from it.
	----------------------------
2002-04-01 13:21:43 +00:00
Josef Karthauser
6688a3fdbe Merge from NetBSD:
ohci.c (1.83), ohcireg.h (1.16), ohcivar.h (1.21)

	===================================================================
	date: 2000/03/29 01:46:26;  author: augustss;
	A first stab at support for isochronous transfers.
	===================================================================
2002-04-01 13:18:11 +00:00
Alfred Perlstein
5da99a94e8 Remove erronious destroy_dev. Not sure what the author's intent was here
but this makes the driver not panic my -current box.

Approved by: scottl
2002-04-01 06:09:17 +00:00
Poul-Henning Kamp
81661c94b6 Here follows the new kernel dumping infrastructure.
Caveats:

The new savecore program is not complete in the sense that it emulates
enough of the old savecores features to do the job, but implements none
of the options yet.

I would appreciate if a userland hacker could help me out getting savecore
to do what we want it to do from a users point of view, compression,
email-notification, space reservation etc etc.  (send me email if
you are interested).

Currently, savecore will scan all devices marked as "swap" or "dump" in
/etc/fstab _or_ any devices specified on the command-line.

All architectures but i386 lack an implementation of dumpsys(), but
looking at the i386 version it should be trivial for anybody familiar
with the platform(s) to provide this function.

Documentation is quite sparse at this time, more to come.

Details:

ATA and SCSI drivers should work as the dump formatting code has been
removed.  The IDA, TWE and AAC have not yet been converted.

Dumpon now opens the device and uses ioctl(DIOCGKERNELDUMP) to set
the device as dumpdev.  To implement the "off" argument, /dev/null
is used as the device.

Savecore will fail if handed any options since they are not (yet)
implemented.  All devices marked "dump" or "swap" in /etc/fstab
will be scanned and dumps found will be saved to diskfiles
named from the MD5 hash of the header record.  The header record
is dumped in readable format in the .info file.  The kernel
is not saved.  Only complete dumps will be saved.

All maintainer rights for this code are disclaimed: feel free to
improve and extend.

Sponsored by:   DARPA, NAI Labs
2002-03-31 22:37:00 +00:00
Poul-Henning Kamp
67cd130e59 The AAC, TWE and IDA diskdrivers cannot dump until I and msmith
have ripped all the i386 specific formatting code from their
dump routines.  Due to the potential for trashing disks, I did
not want to do this "blind".
2002-03-31 22:29:52 +00:00
Josef Karthauser
d1c9105874 Regen. 2002-03-31 21:38:38 +00:00
Josef Karthauser
b730bb6d61 Add more usb adapters, from NetBSD. 2002-03-31 21:38:05 +00:00
Søren Schmidt
db9df6ae8f ATA100 is allowed on the HPT chips rev >= 3 2002-03-31 13:33:55 +00:00
Bruce Evans
8fdb202d85 Support more than 32 sio unit numbers. The maximum unit number is now
(65536 * 32 - 1), but MAKEDEV only supports up to (32 * 32 -1).  Device
names use the unit number in base 32 for all "digits".

This required fixing an old bug in MAKEDEV:ttyminor().  Its arg was the
global $unit instead of $1.

Reminded by:	Valentin K. Ponomarenko <valka@krog.ukrtel.net>
MFC-after:	1 week
2002-03-31 09:15:43 +00:00
Bruce Evans
e968c4ef3c Hacks for measuring interrupt latency. Interrupt latency can be
measured accurately for periodic interrupts provided the interrupts
don't need to be serviced very quickly to keep their period almost
constant.  sio output interrupts have this property (interrupt service
can be delayed for up to 1 character time without the period changing).

This is non-optional and undocumented so that it can be added and
removed easily.  It has no significant effect unless it is enabled by
hacking on a variable using a debugger.  Hardclock and statclock interrupts
would work even better for this, at least on i386's, provided their
interrupt handlers are fast (as they are in -current but not in -stable
or in my version of -current).
2002-03-31 06:49:38 +00:00
Søren Schmidt
60378464bb Remove debug output in last commit. 2002-03-30 16:51:47 +00:00
Søren Schmidt
4486f609fc Add support for getting status (fan, temp, 5V and 12V levels) from
Promise Superswap enclosures.

Sponsored by: Advanis
2002-03-30 16:36:41 +00:00
Søren Schmidt
7e2437190c Use the raid lun not the magic when writing Promise config. 2002-03-30 11:15:46 +00:00
Poul-Henning Kamp
572a089e74 Remove bogus vinumdump(), if you can't dump, say so with nodump(). 2002-03-29 21:14:34 +00:00
Poul-Henning Kamp
6ede0acccc Remove bogus ccddump() function in favour of the standard nodump. 2002-03-29 21:12:11 +00:00
Matthew N. Dodd
0e93a9b535 - Merge the pdq driver (if_fpa and if_fea) from NetBSD.
Among other things this gets us ifmedia support.
- Update fddi_ifattach() to take an additional argument.
2002-03-29 11:22:22 +00:00
Warner Losh
4e4b1656c2 Improve support of MFC cards (Multi-function cards). This commit
allows us to properly parse cards with attribute memory based CIS that
before wouldn't parse correctly, sometimes with a panic.  This allows
me to get my 3C562 modem/ethernet card to fail to attach due to
problems in the ep and sio drivers rather than due to problems in the
CIS parsing code :-).

We weren't setting the address to jump to for the function entries.
This caused us to only work when the addional entries were after the
first ones.  On the 3C562/3C563 card this was not the case.

We were also mapping Attribute memory when common memory was asked for
in the target of the LONGLINK_{A,C} or LONGLINK_MFC.

My IBM Home And Away Modem/LAN card still fails for reasons unknown.
2002-03-29 08:05:39 +00:00
Warner Losh
4f453a6c89 Identify PRISM 2.5 with ISL37300P
Obtained from: OpenBSD
2002-03-29 00:32:32 +00:00
Warner Losh
8cf3aa5fce Integrate the air-tools 0.2 from dachb0den labs.
o This moves the common.h file into if_wavelan_ieee.h

Submitted by: h1kari@dachb0den.com
2002-03-29 00:26:23 +00:00
Josef Karthauser
990e9fea48 Use usb_lookup instead of rolling our own.
Suggested by:	Lennart Augustsson <lennart@augustsson.net>
2002-03-28 12:22:58 +00:00
Josef Karthauser
fed2df0509 Remove some surplus whites. 2002-03-28 12:06:29 +00:00
Søren Schmidt
5847590d42 Fix a braino, only update LED's when a device is present. 2002-03-28 11:48:36 +00:00
Murray Stokely
07bd43d600 Add an entry for Decision Computer Inc, PCCOM 4-port serial cards.
PR:		kern/36302
Submitted by:	Thomas Zenker <thz@Lennartz-electronic.de>
MFC after:	1 week
2002-03-28 11:17:20 +00:00
Søren Schmidt
5f3950daa4 OK, the old HighPoint BIOS's are braindead, they have
a really warped way of things. Anyway deal with it,
and luckily the newer HighPoint BIOS's doesn't mind..

No brownies to HighPoint for that...
2002-03-27 22:05:38 +00:00
Søren Schmidt
fe4f5b97e0 Fix support for multi CD changers, it was as broken as my old NEC :)
MFC: ASAP

:
2002-03-27 19:47:52 +00:00
Josef Karthauser
c465d35466 Move some includes around to make it more *BSD compliant.
Suggested by:	Lennart Augustsson <augustss@netbsd.org>
2002-03-27 13:32:42 +00:00
Murray Stokely
93c30e2e4d Fix spelling and grammar bogons in a comment.
PR:		kern/30540
Submitted by:	Tony Finch <dot@dotat.at>
MFC after:	3 days
2002-03-27 13:16:11 +00:00
Søren Schmidt
85db7089ec Add support for creating/deleting ATA RAID's.
This completes the ATA RAID support, since all functions to manipulate
the RAID are accessible from FreeBSD, the BIOS on the ATA RAID cards
are only nessesary for booting.

I decided to allow for creation of ATA RAID's on any ATA controller, but
please keep in mind the restrictions on that. Due to the BIOS not
knowing what to do you can only boot from a RAID1 or the first disk
in a SPAN, if its not located on a "real" ATA RAID controller like
the Promise or Highpoint controllers.

Sponsored by: Advanis
2002-03-27 10:58:59 +00:00
Poul-Henning Kamp
d306122d60 Push BIO_FORMAT into a local hack inside the floppy drivers where
it belongs.
2002-03-26 19:16:37 +00:00
John Baldwin
c145dd8340 Use suser() instead of checking cr_uid against 0 directly. 2002-03-26 18:01:38 +00:00
Søren Schmidt
d42c4a3ba6 Misc little cleanups. 2002-03-26 09:31:22 +00:00
Nicolas Souchu
ea4122d2bf Fix bktr and pcf compilation with LINT 2002-03-25 21:22:35 +00:00
Mike Barcroft
08f8120ab2 Include <machine/limits.h> for definition of ULONG_MAX. Remove a
duplicate include.
2002-03-25 09:23:41 +00:00
Mike Barcroft
e48fdcb37b Include <machine/limits.h> for definition of ULONG_MAX. 2002-03-25 09:21:45 +00:00
Brooks Davis
c86556de7f Remote newly unused variable to unbreak LINT.
Pointy hat to:	amorita
2002-03-25 02:55:34 +00:00
Søren Schmidt
38009ef247 Add AMD 768 support. 2002-03-24 12:44:23 +00:00
Poul-Henning Kamp
116caf7cf7 Hide the ACPI counter probing printf behind bootverbose.
The conclusion is that this method really can tell the perfect from the
less than perfect ACPI counters.

It is in fact probably a bit more discriminative than that, but we
will rather condemn some otherwise perfect counters to the slightly
slower "-safe" version, than certify a counter as perfect which
will let us down later.

Many thanks to all the people who sent email reports!
2002-03-24 11:33:52 +00:00
Thomas Moestl
0d80b9bd88 In some cases, RX descriptors that are signalled to have been completed
by the hardware are still marked as owned. Handle this by installing a
timeout handler to collect this descriptor to avoid having received
packets remain unhandled until the next one arrives.
2002-03-23 19:43:15 +00:00
Thomas Moestl
7ee69ef245 Assorted fixes:
- remove some useless code from the status change handler that was intended
  to enable the the MII drivers for external phys; this is already done
  during interface initialization, and the deleted code made some
  assumptions about phy addresses that do not seem to hold true on newer
  cards. This should get at least one of the two hmes of newer Netra t1
  machines working.
- correct the interrupt resource allocation
- bump the number of RX descriptors, lower values cause promblems on some
  machines
2002-03-23 19:37:11 +00:00
Bruce Evans
ea1499bf8f Fixed some style bugs in the removal of __P(()). The main ones were
not removing tabs before "__P((", and not outdenting continuation lines
to preserve non-KNF lining up of code with parentheses.  Switch to KNF
formatting and/or rewrap the whole prototype in some cases.
2002-03-23 16:01:49 +00:00
Nicolas Souchu
c17d43407f Major rework of the iicbus/smbus framework:
- VIA chipset SMBus controllers added
	- alpm driver updated
	- Support for dynamic modules added
	- bktr FreeBSD smbus updated but not tested
	- cleanup
2002-03-23 15:49:15 +00:00
Nicolas Souchu
ddd22fb7fb Restore the original copyright 2002-03-23 15:36:13 +00:00
Akio Morita
81b60c7395 Add new graphical screen saver (dragon_saver).
Add support for NEC PC-9821 PEGC screen (fire/logo/rain/warp_saver).
2002-03-23 12:36:19 +00:00
Bruce Evans
359052dbcc Fixed some style bugs in the removal of __P(()). The main ones were
not removing tabs before "__P((", and not outdenting continuation lines
to preserve non-KNF lining up of code with parentheses.  Switch to KNF
formatting and/or rewrap the whole prototype in some cases.
2002-03-23 12:13:34 +00:00
Bill Paul
98b28ee5b4 Teach the bge driver about the BCM5701 (specifically, the 3Com
3c996B-T, with the 5701 rev B5 ASIC). One thing that confuses me
still is that the 'link state change' bit in the status block seems
to change state an awful lot. I have a workaround for this in place
now, but it needs more investigation. For the moment though, this
is enough to get the driver to work with this card.
2002-03-22 06:45:40 +00:00
Bill Paul
6577eb9103 regenerate 2002-03-22 06:39:13 +00:00
Bill Paul
15f962ed42 Teach the brgphy driver about the BCM5701's internal copper PHY. 2002-03-22 06:38:52 +00:00
Matt Jacob
371777b161 Limit fabric search to a default 256 entries. This will all go away
soon because it's just getting harder and harder to find switches
that correctly implement the GET ALL NEXT subcommands for the SNS
protocol.

Latch up result out pointer and set a busy flag when we're looking
at the response queue. This allows for a cleaner way to make sure
we don't get multiple CPUs trying to read the same response queue
entries.

Change how isp_handle_other_response returns values (clarity).

Make PORT UNAVAILABLE the same as PORT LOGOUT (force a LIP).

Do some formatting changes.

MFC after:	0 days
2002-03-21 21:10:16 +00:00
Mike Smith
0a702a9b3a Fix error introduced in the 20020217 update, where GetPossibleResources
was spammed with GetCurrentResources.

Submitted by:	Munehiro Matsuda <haro@h4.dion.ne.jp>
2002-03-21 02:02:31 +00:00
John Baldwin
565f27f116 Add PCI ID for the SeaLevel Ultra 530.PCI single port card.
Sponsored by:	The Weather Channel
2002-03-20 19:38:26 +00:00
Warner Losh
c38b6719e5 No need to conditionalize on pci being in the kernel for this 2002-03-20 19:13:13 +00:00
David E. O'Brien
06989891ed Fix warnings on 64-bit hosts. 2002-03-20 18:04:11 +00:00
Jeff Roberson
421e6a659e Remove unused include. 2002-03-20 09:55:07 +00:00
Alfred Perlstein
15fe306743 Remove __P. 2002-03-20 08:56:31 +00:00
Alfred Perlstein
89c9a48352 Remove __P. 2002-03-20 07:51:46 +00:00
Alfred Perlstein
e57574233a Remove __P. 2002-03-20 06:48:11 +00:00
Alfred Perlstein
14e10f9952 Remove __P. 2002-03-20 05:14:42 +00:00
Alfred Perlstein
e51a25f850 Remove __P. 2002-03-20 02:08:01 +00:00
Peter Wemm
1a8f253b64 Cast pointers to uintptr_t rather than u_int32_t. This doesn't work too
well on machines with 64 bit pointers.
2002-03-19 23:28:35 +00:00
Peter Wemm
0d87e7d007 Fix some gcc-3.1+ warnings:
warning: deprecated use of label at end of compound statement
umass.c:2626:46: multi-line string literals are deprecated
2002-03-19 23:20:21 +00:00
Josef Karthauser
2d4ac0e834 Sync the uhci_dump_foo routines with NetBSD, and remove an errant additional
uhci_dump_ii function that landed there, probably during a recent merge.

Spotted by:	alfred
2002-03-19 22:14:08 +00:00
Alfred Perlstein
67b362072d add missing semicolon. 2002-03-19 21:44:49 +00:00
Alfred Perlstein
be1673823f Fix bio->bio_blkno format warning. 2002-03-19 20:12:08 +00:00
Peter Wemm
bcb6ef7c82 Add some break's after default: in the end of switch statements to
keep gcc-3.1+ happy:
ata-all.c:410: warning: deprecated use of label at end of compound statement
ata-all.c:587: warning: deprecated use of label at end of compound statement
ata-raid.c:99: warning: deprecated use of label at end of compound statement
ata-raid.c:151: warning: deprecated use of label at end of compound statement
2002-03-19 12:14:14 +00:00
Peter Wemm
30171114b3 Fix a gcc-3.1+ warning.
warning: deprecated use of label at end of compound statement

ie: you cannot do this anymore:
switch(foo) {
....

default:
}
2002-03-19 11:02:06 +00:00
Peter Wemm
9a8fa41c6f Regen; post SMC id's and also pick up a previously forgotten regen(?). 2002-03-19 10:55:39 +00:00
Peter Wemm
58b0048916 Add another SMC device ID and the hub ID that it went with. 2002-03-19 10:54:40 +00:00
Peter Wemm
5f4a0f788b Add the ia64 bus space tag for the IO ports (!).
Add a #else and #error so that this doesn't go unnoticed again.
2002-03-19 10:53:33 +00:00
Jeff Roberson
1274438838 Initialize variables before use. This was needed to pass -Werror.
Reviewed by:	jake
2002-03-19 05:14:23 +00:00
Bruce Evans
1ab0b5f920 The previous commit missed fixing 2 old printf format errors and
introduced a format printf error.
2002-03-19 04:07:29 +00:00
Andrew Gallatin
54ed0c3221 Fix printf warning caused by recent changes in bio_pblkno's type. 2002-03-19 01:45:04 +00:00
Bruce Evans
07e929da1c Fixed printf format errors in previous commit. %llu is no more suitable
than %u for printing signed 64-bit types.  It fails on different machines,
and has the wrong signdness.

Fixed old printf format error on the same line.  %u is not suitable for
printing 32-bit types on all machines.

"Fixed" format printf error in previous commit.  This file is not
formatted in KNF.  Partially restore bug for bug compatibility: indent
the printf args too much, but don't format them for 160-column terminals.
2002-03-18 23:38:16 +00:00
Bruce Evans
1b7fb13116 Fixed printf format errors in previous commit. %llu is no more suitable
than %u for printing signed 64-bit types.  It fails on different machines,
and has the wrong signdness.

Fixed old printf format error on the same line.  %u is not suitable for
printing 32-bit types on all machines.
2002-03-18 23:24:00 +00:00
Warner Losh
8321855307 Formats that print the block number need to be changed from %u to
%llu due to recent changes in bio_pblkno's type.
2002-03-18 20:50:04 +00:00
Josef Karthauser
916e6e02e5 Add a USB comm driver.
Ported from NetBSD by:	akiyama
2002-03-18 18:23:42 +00:00
Søren Schmidt
a86fb2a588 Cleanup the chipset setup a bit.
Add some (for all I know unneeded) setup code for the rosb4.
2002-03-18 13:56:44 +00:00
Søren Schmidt
2c66127540 Add support for the ServerWorks CSB5 chips 2002-03-18 12:13:13 +00:00
Warner Losh
fb33cfa8f5 Regen for 1.28 of pccarddevs 2002-03-17 05:06:37 +00:00
Warner Losh
a5a492981c Add support for the home Wireless Network airway wireless pcmcia card.
I cannot find where I got these patches, but I think it was from the
bsd-nomads mailing list.  Please contact me if you posted them there.
2002-03-17 05:05:42 +00:00
Bruce Evans
eabfc7877d Work around a PLX9050 bug that causes system lockup in certain systems,
depending on the MMIO addresses allocated to the board.

PR:		30965, 20845 (maybe)
Submitted by:	Daniela Squassoni <daniela@cyclades.com>
Tested by:	Arjan Knepper <arjan@jak.nl>
		Scott Klement <klemscot@klements.com>
2002-03-17 04:10:38 +00:00
Maxim Sobolev
95bd81d145 Extend CONS_GETINFO ioctl to provide information about size of the currently
displayed font.

MFC after:	2 weeks
2002-03-16 23:31:15 +00:00
Warner Losh
048d9f99d1 o Rework the identify routine a little, merging it with NetBSD's wi.
o Add exerpimental support for identifying lucent cards.  All of mine
  come back with ID of 1, but NetBSD committed code for 5.  So accept
  both.
o rename wi_prism2_ver to wi_firmware_ver so that we could, if necessary,
  do special things for lucent cards too.
o Bring in a small part of the changes from airtools: The wi_cmd function
  now takes two additional arguments.  I didn't bring in their ioctls yet.
o eliminate the use of LE16TOH, and remove its define.
o Print the firmware as if there were 100 versions instead of 10.  This means
  that 6.1 and 6.10 aren't confusing to people.  We now print 6.01 in the
  former case.

# A good junior hacker project would be to merge the NetBSD, FreeBSD, and
# OpenBSD drivers into one source base.
2002-03-16 22:59:15 +00:00
Søren Schmidt
4e887e1915 Add more functionality to the CDIOCREADSUBCHANNEL ioctl.
PR: 26644
2002-03-16 15:56:54 +00:00
Søren Schmidt
698d5a2c84 Fix 64bit arch problems. 2002-03-16 15:55:20 +00:00
Søren Schmidt
e1a86e393c Remove useless splXXX set. 2002-03-16 15:54:41 +00:00
Josef Karthauser
3ede2e88ea Merge from NetBSD:
ohcivar.h (1.22), uhcivar.h (1.29):
	============================================================
	date: 2000/04/25 09:20:55;  author: augustss;
	Move the size of the mapped bus_space region into the bus
	independent softc.
	============================================================

ohci.c (1.88), uhci.c (1.112):
	============================================================
	date: 2000/04/25 14:28:13;  author: augustss;
	Insert (very conservative!) bus_space_barrier() calls at
	all register accesses.
	The bus_space(9) man page says you've gotta have them...
	============================================================
2002-03-16 12:44:21 +00:00
Josef Karthauser
cdd493aa00 Bump some $NetBSD$ idents for patches that have already been previously
ported.
2002-03-16 12:24:00 +00:00
Josef Karthauser
5a11d73afa Huge merge from NetBSD:
usbdi.c (1.61):
	===================================================================
	revision 1.61
	date: 2000/01/31 20:13:07;  author: augustss;  lines: +20 -4
	Change the way the HC done method is invoked a little.
	===================================================================

usbdi.c (1.65):
	===================================================================
	revision 1.65
	date: 2000/03/08 15:34:10;  author: augustss;  lines: +4 -2
	Get the status right when a polled transfer times out.
	===================================================================

ohci.c (1.79), uhci.c (1.89), uhcivar.h (1.24), usb_port.h (1.22),
usbdivar.h (1.48):
	===================================================================
	date: 2000/03/23 07:01:46;  author: thorpej;
	New callout mechanism with two major improvements over the old
	timeout()/untimeout() API:
	- Clients supply callout handle storage, thus eliminating problems of
	  resource allocation.
	- Insertion and removal of callouts is constant time, important as
	  this facility is used quite a lot in the kernel.

	The old timeout()/untimeout() API has been removed from the kernel.
	===================================================================

uhci.c (1.80), usbdi.c (1.66):
	===================================================================
	date: 2000/03/23 18:59:10;  author: thorpej;
	Shake out some bugs from the callout changes.
	===================================================================

ohci.c (1.80), uhci.c (1.91), uhcivar.h (1.25), usb_port.h (1.23),
usbdi.c (1.67), usbdivar.h (1.49):
	===================================================================
	date: 2000/03/24 22:03:30;  author: augustss;
	Some cleanup and renaming of the callouts used in USB drivers.
	===================================================================

uhci.c (1.92), uhcivar.h (1.26):
	===================================================================
	date: 2000/03/24 22:57:58;  author: augustss;
	Two major changes:

	  Make each xfer have its own intr_info.  This is necessary if we want
	  to queue multiple xfers on an endpoint.  This should get rid of the
	  (mostly harmless) DIAGNOSTICs about intr_infos (not) being done.

	  Change (again!) how xfers are aborted.  Aborting a TD is a nightmare
	  on the braindead UHCI controller.  (Unless you stop the HC, thereby
	  losing isoc traffic.)  Hopefully I got it right this time.
	===================================================================

usbdivar.h (1.50):
	===================================================================
	revision 1.50
	date: 2000/03/25 00:10:19;  author: augustss;  lines: +4 -2
	GC an unsued field and add some DIAGNOSTIC in xfer.
	===================================================================

ums.c: Use the callout functions instead of the timeout ones.

uhci.c (1.93):
	===================================================================
	revision 1.93
	date: 2000/03/25 00:11:21;  author: augustss;
	lines: +26 -1
	Add more DIAGNOSTIC when aborting isoc.
	===================================================================

uhci.c (1.94), usbdivar.h (1.51):
	===================================================================
	date: 2000/03/25 07:13:05;  author: augustss;
	More DIAGNOSTIC.
	Initialize a callout handle I forgot.
	===================================================================

uhci.c (1.95):
	===================================================================
	revision 1.95
	date: 2000/03/25 07:23:12;  author: augustss;
	Exp;  lines: +24 -7
	Improve uhci_dump_ii().
	===================================================================

ohci.c (1.81), uhci.c (1.96), uhcivar.h (1.27), usb_subr.c (1.68),
usbdi.c (1.68), usbdivar.h (1.52):
	===================================================================
	date: 2000/03/25 18:02:33;  author: augustss;
	Rename and move around callout handles to make it more sane.
	Add some DIAGNOSTIC.
	Fix buglet in isoc abort on UHCI.
	===================================================================

uhci.c (1.98):
	===================================================================
	revision 1.98
	date: 2000/03/27 07:39:48;  author: augustss;  lines: +12 -4
	Make it compile without DIAGNOSTIC.
	===================================================================

uhci.c (1.99):
	===================================================================
	revision 1.99
	date: 2000/03/27 08:01:09;  author: augustss;  lines: +1 -5
	Remove some debug nonsense.
	===================================================================

uhci.c (1.100):
	===================================================================
	revision 1.100
	date: 2000/03/27 09:41:36;  author: augustss;  lines: +13 -3
	Don't mess with QH in bulk abort for the moment.
	===================================================================

uhci.c (1.102):
	===================================================================
	revision 1.102
	date: 2000/03/27 22:42:57;  author: augustss;  lines: +66 -26
	Be a little more careful when aborting.
	Preallocate some TDs for large buffers.
	===================================================================

uhci.c (1.103):
	===================================================================
	date: 2000/03/28 09:47:10;  author: augustss;  lines: +11 -1
	Another patch for xfer abort...
	XXX The current xfer queueing and aborting semantics should really
	XXX be changed.  It cannot be implemented in a sane way on UHCI.
	XXX One day when I have lots of time I'll redesign it...
	===================================================================

uhci.c (1.104): Correct a debug message.
uhci.c (1.105): Be more defensive in a DIAGNOSTIC test.

uhci.c (1.106):
	===================================================================
	revision 1.106
	date: 2000/03/29 01:49:13;  author: augustss;  lines: +14 -309
	*SIGH*  Revert back to the old method of aborting xfers.
	I had tested the new stuff for two months now, but as soon as I commited
	it the problems started to appear.  Murphy, no doubt...
	===================================================================

usb_subr.c (1.70), usbdi.c (1.71), usbdivar.h (1.53):
	===================================================================
	revision 1.70
	date: 2000/03/29 01:45:20;  author: augustss;  lines: +2 -1
	Do not accept new xfers for queuing while a pipe is aborting.
	===================================================================
2002-03-16 12:06:01 +00:00
Warner Losh
e181db22a4 Add device ID for Xircom modem. Also add work around from gwk@sgi.com
to put the device into 8 bit mode a second time.  This appears to have
no ill effects on other devices, and appears to be necessary for the
xircom modem.

Submitted by: gwk@sgi.com, many others that found his patch in the archives.
2002-03-16 04:26:46 +00:00
Luoqi Chen
6774c4e510 Support for LG GM82C700, an AIC6360 clone. 2002-03-15 21:30:41 +00:00
Kirk McKusick
0d2af52141 Introduce the new 64-bit size disk block, daddr64_t. Change
the bio and buffer structures to have daddr64_t bio_pblkno,
b_blkno, and b_lblkno fields which allows access to disks
larger than a Terabyte in size. This change also requires
that the VOP_BMAP vnode operation accept and return daddr64_t
blocks. This delta should not affect system operation in
any way. It merely sets up the necessary interfaces to allow
the development of disk drivers that work with these larger
disk block addresses. It also allows for the development of
UFS2 which will use 64-bit block addresses.
2002-03-15 18:49:47 +00:00
Søren Schmidt
7bdca10c47 Update to the RAID1 rebuild code.
Run rebuild as a background process.

Sponsored by: Advanis
2002-03-15 15:39:54 +00:00
Warner Losh
21677473c6 Revert most of the recent PCI merge. This has proven to be too
unstable for the coming DP1 release.  Instead, I'll develop that on
the IMP_CB_MERGE branch until it is more stable.
2002-03-15 06:41:01 +00:00
Søren Schmidt
733c2fbdd3 Unbreak the probing of some CDROM drives. 2002-03-14 21:35:55 +00:00
Doug Ambrisko
4359c3e645 Only allow super user to perform the Linux compatible ioctls since some
of the things they do, shouldn't be done by normal users.

MFC after:	2 days
2002-03-14 20:56:41 +00:00
Alfred Perlstein
85f190e4d1 Fixes to make select/poll mpsafe.
Problem:
  selwakeup required calling pfind which would cause lock order
  reversals with the allproc_lock and the per-process filedesc lock.
Solution:
  Instead of recording the pid of the select()'ing process into the
  selinfo structure, actually record a pointer to the thread.  To
  avoid dereferencing a bad address all the selinfo structures that
  are in use by a thread are kept in a list hung off the thread
  (protected by sellock).  When a selwakeup occurs the selinfo is
  removed from that threads list, it is also removed on the way out
  of select or poll where the thread will traverse its list removing
  all the selinfos from its own list.

Problem:
  Previously the PROC_LOCK was used to provide the mutual exclusion
  needed to ensure proper locking, this couldn't work because there
  was a single condvar used for select and poll and condvars can
  only be used with a single mutex.
Solution:
  Introduce a global mutex 'sellock' which is used to provide mutual
  exclusion when recording events to wait on as well as performing
  notification when an event occurs.

Interesting note:
  schedlock is required to manipulate the per-thread TDF_SELECT
  flag, however if given its own field it would not need schedlock,
  also because TDF_SELECT is only manipulated under sellock one
  doesn't actually use schedlock for syncronization, only to protect
  against corruption.

Proc locks are no longer used in select/poll.

Portions contributed by: davidc
2002-03-14 01:32:30 +00:00
Warner Losh
20fe00734b Add 5th parameter to pci_read_device specifying the size of the object
to create.
2002-03-13 16:32:11 +00:00
Warner Losh
86d1f89423 Cleanup the recent cardbus cleanups. This fixes some of the panics
that I introduced with -v.  However, other problems still remain (including
the loss of interrupts).
2002-03-13 05:38:19 +00:00
Doug Rabson
c19da1c7af Only i386 has wbinvd(). 2002-03-12 09:45:17 +00:00
Peter Wemm
8b79649b5b Do not concatenate __func__ with strings, because it is not a string.
Later gcc's blow up on this.
2002-03-12 00:15:06 +00:00
Peter Wemm
4d3523e298 Do not do string concatenation with __func__ (which is not a string) 2002-03-12 00:12:59 +00:00
Peter Wemm
75a3a26d2a Recent acpica imports have changed the lengths from UINT32 to ACPI_SIZE,
which is 64 bit on ia64.  Fix it.
2002-03-12 00:10:40 +00:00
Brooks Davis
d174b27395 Add support for 3Com Airconnect PCI cards.
MFC after:	3 days
2002-03-11 23:29:59 +00:00
Søren Schmidt
fe86c44885 Add new support for locking an ATA channel and use that throughout
the ATA/ATAPI driver. This solves the concurrency problem with
the new GEOM code, and also cuts a good deal of the patch size
in the upcoming MFC.
2002-03-11 21:04:32 +00:00
Warner Losh
a2df0b493e On FreeBSD make usb_proc_t the same as d_thred_t always. 2002-03-11 16:38:53 +00:00
Josef Karthauser
be036866cf Be more specific about when block major numbers disappeared from
the cdev switch.
2002-03-11 16:22:15 +00:00
David E. O'Brien
77d49b3cf4 Due to changes in the handling of the #line directive by GCC(cpp) 3.1,
we must now explicitly list the source directory with -I.
2002-03-11 06:45:31 +00:00
Dima Dorfman
cdd530ca19 Make the diagnostics printfs less ugly. 2002-03-11 03:48:32 +00:00
Thomas Moestl
49921f1e25 Use the pci_enable_* functions instead of manually fiddling with the
command register.

Pointed out by:	msmith
2002-03-11 02:37:19 +00:00
Søren Schmidt
835d29c0cd Silence a warning when compile without atapi devices. 2002-03-10 21:03:04 +00:00
Seigo Tanimura
01d901fff3 Do not call a synthesizer with a sequencer lock held. 2002-03-10 16:56:38 +00:00
Takanori Watanabe
03b8237df8 Add SONY VAIO psm controller ISA-PnP ID. 2002-03-10 12:22:17 +00:00
Luigi Rizzo
7c1e1cf188 Fix one genuine bug and a potential one:
-#if defined(__FreeBSD__) && __FreeBSD_version__ >= 500023
  +#if defined(__FreeBSD__) && __FreeBSD_version >= 500023

is a genuine bug -- __FreeBSD_version__ does not exist.
The other one:

  -#if (__FreeBSD__ < 5)
  +#if (__FreeBSD_version < 500000)

pops out when you cross-compile the code:

  __FreeBSD__			is a compiler predefine,
  __FreeBSD_version		is defined in <sys/param.h> .

Given that in this case (and all others in sys/dev/usb and sys/i4b)
the goal is to adapt to a different kernel interface, and not to
a compiler feature, I believe the correct form is the second one
(in the best case the two are synonyms so the change does not break
anything anyways).
2002-03-10 08:29:53 +00:00
Thomas Moestl
e64a9d374a Set the busmaster enable bit in the PCI command register, as the firmware
of sparc64 machines will not do this for us if the interface is not used
for booting over the network.
2002-03-09 21:52:31 +00:00
Thomas Moestl
47792f8bb9 Fix some bugs in the handling of the case of not enough tx descriptors
being free to send a packet.
2002-03-09 21:50:25 +00:00
Søren Schmidt
fefe430118 Even more Highpoint RAID support.
Fix the 80pin cable detection system.
2002-03-08 21:36:49 +00:00
John Hay
db78e578e3 Remove the #if __FreeBSD_version glue now that the puc driver is part of
-stable.
2002-03-08 17:41:22 +00:00
Yoshihiro Takahashi
959168ab57 Add pc98 support. 2002-03-08 12:41:32 +00:00
Søren Schmidt
84409b36ca Support newer Highpoint BIOS's extended config. 2002-03-08 11:33:52 +00:00
Søren Schmidt
b8ad1eb270 cosmetics 2002-03-08 11:31:37 +00:00
Søren Schmidt
c1d33c30e9 Oops I mixed up the patch for -current & -stable, sorry .... 2002-03-07 19:20:23 +00:00
Matt Jacob
70e9673917 Disable RIO (reduced interrupt operation) for 2200 boards- it seemed like
it worked- but I ran into a case with a 2204 where commands were being lost
right and left. Best be safe.

For target mode, or things called if we call isp_handle_other response- note
that we might have dropped locks by changing the output pointer so we bail
from the loop. It's the responsibility of the entity dropping the lock to
make sure that we let the f/w know we've read thus far into the response
queue (else we begin processing the same entries again- blech!).

MFC after:	1 day
2002-03-07 17:32:45 +00:00
Søren Schmidt
216cc529d5 Minor cosmetic changes to minimise diffs for MFC. 2002-03-07 16:34:19 +00:00
Søren Schmidt
5ba86f4c8a Fix a couble of bugs in the rebuild code, return errors properly. 2002-03-07 16:32:21 +00:00
Mike Smith
3f1166f04c Update for the 6.9 firmware family (6xxx controllers), as well as for
the upcoming 7.4 family (7xxx controllers).

 - improved error reporting and handling
 - more diagnostic output
 - add extra command packet definitions
 - merge sources again with -stable
2002-03-07 09:55:41 +00:00
Warner Losh
a268f9dbeb Don't use __FBSDID yet. Looks like most (all?) of the rest of the kernel
doesn't do that.
2002-03-07 08:12:40 +00:00
Warner Losh
b3889b6815 Implement hw.cardbus.debug and hw.cardbus.cis_debug to help debug some
of the cardbus problems that people may start seeing.
2002-03-07 08:10:42 +00:00
Warner Losh
7cdb5c5ec4 Make hw.pccard.debug and hw.pccard.cis_debug tunable/sysctl. Setting to 1
will enable more verbose debugging output from the pccard system.
2002-03-07 08:03:53 +00:00
Warner Losh
a3133b5897 Two style(9) fixes:
- return(foo);	(note parens)
- use __FBSDID()
2002-03-07 00:11:42 +00:00
Warner Losh
8e635fb764 Check for NULL on resource allocation. For the moment, punt, but we should
be smarter about a) cleanup and b) fallback.
2002-03-07 00:05:26 +00:00
John Hay
b72c70af4c Add the "Avlab Technology, PCI IO 2S" card.
Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
2002-03-06 17:37:27 +00:00
Ruslan Ermilov
97b6284457 Fixed compilation warnings. 2002-03-06 08:55:34 +00:00
Bruce Evans
d4621eac57 Fixed a printf format error again. Rev.127 was clobbered in rev.1.128
by removing parentheses.  The main bug is in gcc: on machines with
64-bit longs and 64-bit long longs,

    (unsigned long long)rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE))

has type plain unsigned long instead of the correctly promoted type
unsigned long long, so it can not be printfed using %llu format.  Even
1ULL / 1L is mispromoted.  Anyway, casting the correct operand
automatically avoids the problem.  We do not want to to pessimize the
division; we just want to convert to a common maximal type for printing.
2002-03-06 06:33:33 +00:00
Warner Losh
f1bdbc6674 Add roaming and microwave oven support. Some minor formatting nits.
Some buggy firmware workarounds.  Fix some endian bugs.

These reduce the diffs from NetBSD, but NetBSD does have more changes since
my last manual merge.
2002-03-05 16:18:14 +00:00
Warner Losh
a90b09d20a Remove __P to reduce diffs with NetBSD and my private tree. 2002-03-05 16:12:41 +00:00
Warner Losh
0e4c175bb9 Merge a little from NetBSD. 2002-03-05 16:06:54 +00:00
Søren Schmidt
11de413756 Misc little cleanups:
Link if only ATAPI device in kernel config
Remove unused #includes
Rearrange a bit in ata-raid to make diff against -stable smaller
Enable wc as default again, dunne how this happend...
2002-03-05 09:24:19 +00:00
Mitsuru IWASAKI
899ccf541a Add generalized power profile code.
This makes other power-management system (APM for now) to be able to
generate power profile change events (ie. AC-line status changes), and
other kernel components, not only the ACPI components, can be notified
the events.

 - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c
 - call power_profile_set_state() also from APM driver when AC-line
   status changes
 - add call-back function for Crusoe LongRun controlling on power
   profile changes for a example
2002-03-04 18:46:13 +00:00
Alfred Perlstein
63c6b757ab Support for USB fm radio.
Submitted by: David Yeske <dyeske@yahoo.com>
2002-03-04 03:51:21 +00:00
Warner Losh
dc4ec1188e Add a bunch of cards from NetBSD and maybe other places.
Ericsson Wireless Lan
Simple Tech Spectrum 24 Alt
Socket LP WLAN CF
Symbol LA4100
2002-03-04 02:59:20 +00:00
Orion Hodson
38c81beede Suspend and resume related patches from Toshikazu Ichinoseki <t.ichinoseki@nifty.com>.
PR's: kern/35484, kern/35230.
2002-03-04 00:36:04 +00:00
Mark Murray
4a7cdfd7b9 Provide infrastructure for harvesting SWI entropy. 2002-03-03 20:09:42 +00:00
Mark Murray
e119960112 Massive lint-inspired cleanup.
Remove unneeded includes.
Deal with unused function arguments.
Resolve a boatload of signed/unsigned imcompatabilities.
Etc.
2002-03-03 19:44:22 +00:00
Søren Schmidt
0f0e725b18 Forgot this litte patch, scale the individual disk size from the
arrays total size depending on width of the array.
2002-03-03 16:36:19 +00:00
Søren Schmidt
6f87be981b Major update of the ATA RAID code, part 3:
Add code to properly detach/attach disks that are part of a RAID.

Mark a disk that is attached on an ATA channel belonging to a
RAID as a spare disk that can be used for rebuilding failed RAID1's.

Add support for rebuilding failed RAID1's.

Several fixes to the detach/attach code.

For replacing a disk in a failed RAID1 do the following:

Find the controller channel# of the failed disk.

Exec 'atacontrol detach <channel#>' to free the disk from the system.

Replace the failed disk with a new one of at least the same size.
If your have your disks in drawers/enclosures this can be done with
the system still running.

Exec 'atacontrol attach <channel#>' to add the disk to the system and
mark it as a valid spare for rebuild.

Exec 'atacontrol rebuild <array#>'

The system will rebuild the array on the fly, the array can still
be used during this, although with slower performance.

Please let me know of any problems with this!

Sponsored by: Advanis Inc.

MFC after: 2 weeks
2002-03-03 15:36:21 +00:00
Takanori Watanabe
54f737c3a6 Add two IrDA controller ID: IBM TP240(Probably NSC compatible), and SMC IrCC
controller.
2002-03-03 13:26:59 +00:00
Bruce Evans
b980740327 Fixed a printf format error. 2002-03-02 10:54:33 +00:00
Brooks Davis
16555f3a03 Make 128-bit WEP (aka 104-bit WEP) work with Prism based cards.
Submitted by:	Thomas Skibo <skibo@pacbell.net>
MFC after:	3 days
2002-03-02 00:06:23 +00:00
Orion Hodson
b3aeda3f1f Add support for VT8233. 2002-03-01 20:30:13 +00:00
Peter Wemm
e51c24920f Fix debug printf formats 2002-02-28 00:06:59 +00:00
Peter Wemm
d62e201b7b Fix some unused warnings. One function is only used if
TWE_SHUTDOWN_NOTIFICATION is defined, the other two are never used.
2002-02-27 23:59:35 +00:00
Peter Wemm
98d0a7f844 Fix warnings (comment out unused tables that are taking space in the
kernel)
2002-02-27 23:57:18 +00:00
Peter Wemm
e542f1d7b7 Fix warnings 2002-02-27 23:53:02 +00:00
Peter Wemm
f7afd87572 Fix warnings. The driver would be more useful with a DRIVER_MODULE()
entry so that it actually can do something.
2002-02-27 23:47:45 +00:00
Peter Wemm
10d3660bd2 Repair some warnings. These are accessing idle portions of shared memory
buffers.
2002-02-27 23:43:19 +00:00
Warner Losh
e84e28dee1 Remove support for FreeBSD 2.x from this driver. 2002-02-27 23:34:02 +00:00
Peter Wemm
cd23fe0f58 Fix warning (passing wrong arg to arp_ifinit())
Submitted by:	LINT, -Werror
2002-02-27 23:28:57 +00:00
Julian Elischer
ca9d2dbac9 Add a comment explaining a code change.. 2002-02-27 19:24:55 +00:00
John Baldwin
a854ed9893 Simple p_ucred -> td_ucred changes to start using the per-thread ucred
reference.
2002-02-27 18:32:23 +00:00
Thomas Moestl
42c1b001f7 Add a driver for the Sun GEM (Gigabit) and ERI (100 Mb/s) PCI ethernet
adaptors, ported from NetBSD.
2002-02-27 17:41:06 +00:00
Thomas Moestl
52381bfae4 Add a driver for the Sun HME PCI/SBus ethernet adaptor, which is onboard
in most machines of the Sun Ultra series. This is a port of the NetBSD
driver which I enhanced to make use of the gather functionality and the
configurable RX buffer offset to avoid copying all received/sent packet
(instead, packets will be directly DMAd from mbuf chains and into mbuf
clusters now).
2002-02-27 17:35:48 +00:00
Thomas Moestl
90ce56c287 Add the following functions/macros to support byte order conversions and
device drivers for bus system with other endinesses than the CPU (using
interfaces compatible to NetBSD):

- bwap16() and bswap32(). These have optimized implementations on some
  architectures; for those that don't, there exist generic implementations.
- macros to convert from a certain byte order to host byte order and vice
  versa, using a naming scheme like le16toh(), htole16().
  These are implemented using the bswap functions.
- stream bus space access functions, which do not perform a byte order
  conversion (while the normal access functions would if the bus endianess
  differs from the CPU endianess).

htons(), htonl(), ntohs() and ntohl() are implemented using the new
functions above for kernel usage. None of the above interfaces is currently
exported to user land.

Make use of the new functions in a few places where local implementations
of the same functionality existed.

Reviewed by:	mike, bde
Tested on alpha by:	mike
2002-02-27 17:16:18 +00:00
Julian Elischer
13b33111fe Fix warnings that have become fatal
1/ conditionalise (#if 0) function that is not used.
 Unused code left in place for netBSD compatibility.
2/ Recode loop to convince gcc that it does initialise a variable
 (use do-while instead of for() so gcc knows that we always go through
 at least once.  Feel free to check my logic.
2002-02-27 09:16:00 +00:00
Warner Losh
7ba175ac23 Use the pci.c code wherever possible, rather than copying all the pci
code into cardbus and s/pci/cardbus.  This exposes a few pci_*
functions that are now static.

This work is similar to work Justin posted to the mobile list about a
year or two ago, which I have neglected since then.

This is a subset of his current work with the multiple inheritance
newbus architecutre.  When completed, that will eliminate the need for
pci/pci_private.h.

Similar work is needed for the cardbus_cis and pccard_cis code as well.
2002-02-27 05:09:14 +00:00
Julian Elischer
3ffc8ab1ac Remove errors in LINT (now that they are fatal) 2002-02-27 02:21:43 +00:00
Daniel O'Callaghan
3c3c45471c Remove problematic PHY_WRITE so that autoneg to 10 Mbps
actually works.

Submitted by: Dennis <TD790@aol.com>
Reviewed by:	Bill Paul <wpaul@freebsd.org>
MFC after:	7 days
2002-02-27 02:11:34 +00:00
Brooks Davis
240b1323c3 Set ifp->if_name to "awi" instead of device_get_name(dev) to avoid
casting away a const qualifier so the awi driver compiles.
2002-02-26 20:09:19 +00:00
Brooks Davis
521393ea56 Add a missing field to the end of array marker in the pci_ids array.
Submitted by:	sumikawa
2002-02-26 17:35:21 +00:00
Bruce Evans
fbd7573929 Initialize a variable bogusly to avoid a gcc bug that causes a spurious
warning.
2002-02-26 17:04:29 +00:00
Josef Karthauser
dae0af0c83 Revert part of the last commit. A couple of defines were removed
by NetBSD because they don't use them (they've no usbd), but we do.
2002-02-26 10:00:32 +00:00
Doug Ambrisko
c9977aaadf In ad-hoc mode, the "associate" bit is valid to check to see if it is
part of an ad-hoc network.  This means another station needs to be
around so they can both associate.

MFC after:	1 week
2002-02-26 05:43:05 +00:00
Warner Losh
476f923056 Until I can figure out how to live without the volatile qualifier on
comdefaultrate, comment out the support for machdep.conspeed for now.
2002-02-26 03:46:14 +00:00
Warner Losh
375b025257 Remove an unused variable. 2002-02-26 03:37:35 +00:00
Warner Losh
1efefb2d4d Fix warnings introduced in the PCI_ALLOW_UNSUPPORTED_IO_RANGE case. 2002-02-26 03:31:35 +00:00
Warner Losh
47f9536259 If we're going to ifdef out the only reference to asr_drvinit, then
go ahead and ifdef out the function too.
2002-02-26 03:22:44 +00:00
Warner Losh
96fc5a062e Add an experimental tunable: machdep.conspeed.
# I'm not sure where to document this.
2002-02-26 03:13:30 +00:00
Alfred Perlstein
6f65a2bd46 in ulpt_reset() req.bmRequestType was unitialized, fix it. 2002-02-26 01:19:56 +00:00
Josef Karthauser
648b06a6ed Merge from NetBSD:
usb.h (rev 1.61):

    date: 2002/01/01 14:23:37;  author: augustss;
    Add a missing subclass definition.

usb.h (rev 1.63) and usb_port.h (rev 1.52):

    date: 2002/02/25 00:46:37;  author: augustss;
    Some portability improvement.
    Add define for usb.h version.
2002-02-26 01:15:08 +00:00
Poul-Henning Kamp
cb877d0050 Add a new test_counter() function which tries to determine the width of
the inter-value histogram for 2000 samples.  If the width is 3 or less
for 10 consequtive samples, we trust the counter to be good, otherwise
we use the *_safe() method.

This method may be too strict, but the worst which can happen is that
we take the performance hit of the *_safe() method when we should not.

Make the *_safe() method more discriminating by mandating that the three
samples do not span more than 15 ticks on the counter.

Disable the PCI-ident based probing as a means to recognize good
counters.

Inspiration from:	dillon and msmith
2002-02-25 09:51:17 +00:00
Mike Smith
5da19f398a The thermal thread needs to take Giant before it does anything with the
interpreter.

Submitted by:	Magnus B{ckstr|m <b@etek.chalmers.se>
2002-02-25 02:21:22 +00:00