Commit graph

8988 commits

Author SHA1 Message Date
Matthew N. Dodd 0e91b7d532 - Clean up function calling conventions.
- Be consistent about what we call our softc.
- Minor formatting.
- Add some register definitions gleaned from NetBSD/Linux.
2003-03-28 06:27:08 +00:00
Matthew N. Dodd c591e5ebee Multicast support, gleaned from NetBSD's if_iy driver.
Submitted by:	 Craig Boston <craig@xfoil.gank.org>
2003-03-28 02:15:01 +00:00
Matthew N. Dodd aa5d693129 - Rely on ether_ifattach() to initialize part of our struct ifnet
rather than doing it ourself.
- Set ifq_maxlen.
- Include the size of the ethernet header when we allocate
  our mbuf chain in ieget().
2003-03-27 20:38:00 +00:00
Søren Schmidt c7f547fde8 Biofinish the request if we cannot malloc in ad_start. 2003-03-27 10:48:21 +00:00
Poul-Henning Kamp 83e13864c3 Allocate the toplevel indir with M_WAITOK to avoid complicating things
needlessly.

Detected by:	rwatsons EvilMalloc(9)
2003-03-27 10:14:36 +00:00
Matthew N. Dodd 618095ccef Catch up with recent events. 2003-03-27 07:37:02 +00:00
Matthew N. Dodd 7736233b36 Add missing COMPAT_ISA_DRIVER().
Oops.
2003-03-27 05:40:40 +00:00
Scott Long a6d35632f5 Begin support for 64-bit address support and workarounds for newer cards:
- Add data structuress for doing 64-bit scatter/gather
	- Move busdma tag creations around so that only the parent is
	  created in aac_pci.c.
	- Retrieve the capabilities word from the firmware before setting
	  up command structures and tags. This allows the driver to decide
	  whether to do 64-bit commands, and if work-arounds are needed for
	  systems with >2GB of RAM.
	- Only enable the SCSI passthrough if it's enabled in the capabilities
	  word in the firmware.

This should fix problems with the 2120S and 2200S cards in systems with more
than 2GB of RAM.  Full 64-bit support is forthcoming.

MFC-After:	1 week
2003-03-26 17:50:11 +00:00
Orion Hodson abe88fc972 Re-work ac97 initialization to match cold reset described in AC97r.23
and be prepared to wait much longer for codec to become ready.

Credit to Hugo D. Valentim <hvalentim@gmx.net> for reporting the
problem, providing useful pointers, and repeated diff testing.
2003-03-26 06:11:36 +00:00
Orion Hodson 8f832fd0ba For the VIA8233A use multi-sgd register set for primary playback
channel and disable DXS3.  Several users have reported DXS3 as playing
at half speed on the 8233A revision of the chipset.  This implicitly
means no SPDIF for VIA8233A users.
2003-03-26 05:51:13 +00:00
Orion Hodson 78a248c1db Add defines for low power and second codec ready. 2003-03-26 05:35:38 +00:00
Scott Long 43dac090dc aic79xx.reg:
Correct default precompensation value for RevA hardware.
2003-03-25 22:16:27 +00:00
Nate Lawson f8ee56571c Add code to implement two new USB quirk types: NO_INQUIRY and NO_INQUIRY_EVPD
The former fakes a valid response to an inquiry command.  (I am completely
blown away that there are devices which hang upon receiving inquiry).  The
latter returns "invalid request" to any inquiry commands with EVPD set.
NO_INQUIRY implies NO_INQUIRY_EVPD but not vice versa.  Both quirks have been
tested separately on my USB key although it didn't require either of them.

While I'm here, fix wildcarding so that any/all of vendor, product, revision
can be wildcarded.

Idea from:	Linux
MFC after:	2 weeks
2003-03-25 16:21:09 +00:00
Matt Jacob 3aa9119309 Add an explanatory comment about what operational modes in xfwopt are. 2003-03-25 07:02:45 +00:00
Jake Burkholder 07515f29ce Fix 2 vm_offset_t -> vm_paddr_t missed in previous commit.
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-25 01:47:29 +00:00
Jake Burkholder 227f9a1c58 - Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
  with PAE.
- Use this to represent physical addresses in the MI vm system and in the
  i386 pmap code.  This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
  detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by:	DARPA, Network Associates Laboratories
Discussed with:	re, phk (cdevsw change)
2003-03-25 00:07:06 +00:00
Matthew N. Dodd 257427efe3 Retire sys/pc98/pc98/spkr.c 2003-03-24 21:01:54 +00:00
Poul-Henning Kamp 5d445dcb4e Change g_class initialization to sparse format. 2003-03-24 19:46:26 +00:00
Matthew N. Dodd b7b5ae3edb Use repo-copied files in sys/i386/bios. 2003-03-24 19:14:46 +00:00
John Baldwin c2fae87169 Don't call sysbeep() in sc_bell() if either duration or pitch is zero.
Otherwise sysbeep() makes an annoying clicking sound on some systems.
'kbdcontrol -b off' just sets the duration and pitch to zero, it doesn't
set the QUIET_BELL flag.

Tested by:	SorAlx <soralx@cydem.zp.ua>
PR:		misc/41772
MFC after:	1 week
2003-03-24 15:56:00 +00:00
Hidetoshi Shimokawa f34e847dce - The payload of Write Request Quad must be network byte order. 2003-03-24 04:11:21 +00:00
Hidetoshi Shimokawa 73aa55ba0a - The payload of Write Request Quad and Read Response Quad must be
network byte order.
- Set ATRetries register after each bus reset because the value is 'undef'
	in OHCI spec.
2003-03-24 04:06:21 +00:00
Hidetoshi Shimokawa a84fda13bb Safe PCI configuration.
- Clear PCIM_CMD_MWRICEN:
	some chips seem to have problem with write invalidate.
	clearing this bit fixes SBP timeout problem.

Tested by: Michael Reifenberger <Michael.Reifenberger@Plaut.de>

- Set PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN
- Moderate value for latency timer.
2003-03-24 03:47:36 +00:00
Warner Losh fb9e391927 MFP4 27224 and 27225:
Change 27224 by imp@imp_hammer on 2003/03/22 00:16:22
	Put what I think are the correct TX RATE translation tables
	in place for LUCENT firmware.  This is based on the 4.x driver.
	Maybe it should be table driven?

	ifconfig wi0 media DS/11Mbps still fails, but it fails before
	we even get to the txrate stuff, so other things are wrong.

Change 27225 by imp@imp_hammer on 2003/03/22 00:45:11
	Default ic_fixed_rate to -1.  This is the same thing as autoselect.
	There really should be a #define for this...
2003-03-22 15:39:38 +00:00
Maxime Henrion 0a50de79cb - Add a new ioctl to get the maximum number of ATA channels.
- Use it in atacontrol(8) when listing ATA devices instead of
  stopping at the first ENXIO received.

This makes atacontrol list work on my sparc64 where the two ATA
channels I have are numbered 2 and 3.

Reviewed by:	sos
2003-03-22 12:18:20 +00:00
Ruslan Ermilov 7f18da65a4 Added missing dependency on rc4.
Reviewed by:	imp
2003-03-21 22:02:58 +00:00
Prafulla Deuskar 55cbc7f8bd Added support for 82541 and 82547 based adapters.
- These have Intel gigabit PHY
 - 82547 uses CSA interface

MFC after:	1 week
2003-03-21 21:47:31 +00:00
Matthew N. Dodd 868d8b6286 - Use if_broadcastaddr from struct ifnet rather than relying on
extern 'etherbroadcastaddr'.
- Make 'etherbroadcastaddr' static.

Reviewed by:	 imp
2003-03-21 17:53:16 +00:00
John Baldwin 31566c96f4 Use td->td_ucred instead of td->td_proc->p_ucred. 2003-03-20 21:17:40 +00:00
Orion Hodson 600f6cbaa2 Distinguish between register sets that depend on ac97 caps (wr0, wr1,
msgd) and those that don't (dxs0-3) when reporting format caps.
2003-03-20 20:07:18 +00:00
Orion Hodson 9963235abc Correct vendor id for ALC101. 2003-03-20 18:17:39 +00:00
Hidetoshi Shimokawa 58089a20d1 Clear channel and tag bits before set them.
This should fix the problem that if_fwe doesn't work after DV receiving.
2003-03-19 07:04:11 +00:00
Maxim Sobolev 2d95f7d4a9 Brucify.
Requested and reviewed by:	bde
MFC after:	2 weeks
2003-03-18 21:26:28 +00:00
Poul-Henning Kamp b4b138c27f Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
Warner Losh 0e630ee24b o Lucent cards don't seem to like multiple buffers for tx. Use only
one tx buffer for these cards.  The old driver only used one.  We use
  1 for symbol, and 3 for prism cards.
o Don't do the maximum loops thing in the ISR.  In fact, revert to the
  old interrupt handler.  Lucent cards don't seem to work too well if
  you don't disable/enable interrupts from the card in the ISR.

Between these two changes, Lucent cards suck less.  They work in
autoselect mode only.  And seem to get 1Mbps or 2Mbps only.  Setting a
specific media speed doesn't work, and I've had a few issues even with
these patches.  They turn a former brick into a nearly useful card.

These patches work on the prism 2 and 2.5 PC Card cards that I have.
I've not tested this on PCI cards.  I suspect, but couldn't find
proof, that they were the reason that the ISR was changed so radically
from its FreeBSD roots in NetBSD.  We might need to have a variant ISR
if so.
2003-03-18 04:22:42 +00:00
Warner Losh 572ab50c54 Move symbol reset detection code back into wi_reset. This is a more
reliable way to detect if the symbol cards have been reset or not.
This makes symbol cards work better.

Submitted by: deischen
2003-03-18 02:54:39 +00:00
Warner Losh 08d49adb7f Add DLINK DWL650H
From NetBSD by way of deischen
2003-03-18 02:47:53 +00:00
Warner Losh 7a073cc3e0 Add SMC 2602W pci card, from a post to mobile@ 2003-03-18 02:45:29 +00:00
Warner Losh b43a533ddb Use %jd and a cast to intmax_t instead of a cast to long.
Minor style nit while I'm here.
2003-03-18 02:40:40 +00:00
Warner Losh ec72163b64 Tag longling_addr as maybe using a bad type, I'm not sure. 2003-03-18 02:38:33 +00:00
Warner Losh 1831679c41 Regenerate for 1.45 2003-03-18 02:37:25 +00:00
Warner Losh 2a72cb5210 Add DLINK DWL650H
From NetBSD by way of deichen
2003-03-18 02:36:54 +00:00
Warner Losh fabc845e37 Remove bogus KASSERT. The 802.11 layer and the resume from suspend
code both seem to call wi_start (directly or via the if_start pointer)
without checking to see if OACTIVE is 0.  In addition, I think that
with the use of 3 transmit buffers this routine can be called with
OACTIVE set, but I might be mistaken about that (and it doesn't
matter).

Reviewed by: sam
Noticed by: imp, alfred, ambrisko
2003-03-17 13:19:28 +00:00
Poul-Henning Kamp 8595de4aec Fix a malloc() with no legal modeflag. 2003-03-17 07:26:25 +00:00
Søren Schmidt 92737d1739 Fix the cable detection and properly find the host bridge on
older SiS chips.
2003-03-16 16:26:51 +00:00
Matthew N. Dodd fae930213c Catch up with bpf_mtap() changes. 2003-03-16 00:30:02 +00:00
Matthew N. Dodd 2d6bcb381e Catch up with recent infrastructure changes. 2003-03-16 00:24:18 +00:00
Maxim Sobolev 71fbba351a Remove duplicate line introduced in the previous commit.
Submitted by:	bde
MFC after:	2 weeks
2003-03-15 18:49:41 +00:00
Maxim Sobolev 084254f807 - Add minimal support for TI16754 4xUART chip into sio(4) driver and remove
now unnecessary hack from the previous commit;
- Add support for Interrupt Latch Register (ILR) into puc(4). So far only
  ILRs compatible with specifications from Digi International are supported.
  Support for other types of ILRs could be easily added later;
- Correct clock frequency for IC Book Labs Dreadnought x16 Lite board;
- Enable ILR detection/usage for IC Book Labs Dreadnought x16 boards.

Sponsored by:   IC Book Labs
MFC after:      2 weeks
2003-03-15 16:25:40 +00:00
Takanori Watanabe 869c12cbb4 Add module dependency. This makes udbp.ko to be loaded. 2003-03-15 13:03:30 +00:00