Commit Graph

10290 Commits

Author SHA1 Message Date
Bruce Evans
3a6a55a60b Use the correct speed in the delay for the transmission of a character
in the loopback test in the probe.  The delay was too short for consoles
at speeds lower than about 3200 bps.  This shouldn't have caused many
problems, since such low speeds are rare and the probe is forced to
succeed for consoles.
2003-09-26 11:36:09 +00:00
Poul-Henning Kamp
2f06c3e7f2 Initialize the cn_name instead of the cn_dev 2003-09-26 10:55:07 +00:00
Poul-Henning Kamp
4866f95d76 Change fb_attach() and fb_detach() to take a integer unit number rather
than a dev_t.

All of the dev_t's passed were bogusly created with makedev()
2003-09-26 10:41:44 +00:00
Poul-Henning Kamp
ff2cf8a51d Eliminate bogus use of makedev(): rather than synthesize the dev_t, use
our already cached copy.
2003-09-26 09:05:57 +00:00
Poul-Henning Kamp
c5c8f9652b Adhere to the new console API:
Initialize cn_name
   Use cn_unit for internal housekeeping.
   Forget about cn_dev.
2003-09-26 07:29:34 +00:00
Nate Lawson
656b9dd5c3 Consistently print attach messages. 2003-09-26 05:24:55 +00:00
Marcel Moolenaar
875f70dba4 Revert the introduction of iobase in struct uart_bas. Both the SAB82532
and the Z8530 drivers used the I/O address as a quick and dirty way to
determine which channel they operated on, but formalizing this by
introducing iobase is not a solution. How for example would a driver
know which channel it controls for a multi-channel UART that only has a
single I/O range?

Instead, add an explicit field, called chan, to struct uart_bas that
holds the channel within a device, or 0 otherwise. The chan field is
initialized both by the system device probing (i.e. a system console)
or it is passed down to uart_bus_probe() by any of the bus front-ends.
As such, it impacts all platforms and bus drivers and makes it a rather
large commit.

Remove the use of iobase in uart_cpu_eqres() for pc98. It is expected
that platforms have the capability to compare tag and handle pairs for
equality; as to determine whether two pairs access the same device or
not. The use of iobase for pc98 makes it impossible to formalize this
and turn it into a real newbus function later. This commit reverts
uart_cpu_eqres() for pc98 to an unimplemented function. It has to be
reimplemented using only the tag and handle fields in struct uart_bas.

Rewrite the SAB82532 and Z8530 drivers to use the chan field in struct
uart_bas. Remove the IS_CHANNEL_A and IS_CHANNEL_B macros. We don't
need to abstract anything anymore.

Discussed with: nyan
Tested on: i386, ia64, sparc64
2003-09-26 05:14:56 +00:00
Marcel Moolenaar
153bbe3e6a Make the port number available to the sub-device with PUC_IVAR_PORT. 2003-09-26 04:44:55 +00:00
Nate Lawson
297835bcd5 Sort debugging levels and update the man page to match reality. Also
update man page to reflect iasl(8) import.
2003-09-26 04:32:40 +00:00
Scott Long
ba079c0d9f aic79xx_pci.c:
aic7xxx_pci.c:
	When performing our register test, be careful
	to avoid resetting the chip when pausing the
	controller.  The test reads the HCNTRL register
	and then writes it back with the PAUSE bit
	explicitly set.  If the last write to the controller
	before our probe is to reset it, the CHIPRST
	bit will still be set, so we must mask it off
	before the PAUSE operation.  On some chip versions,
	we cannot access registers for a few 100us after
	a reset, so this inadvertant reset was causing PCI
	errors to occur on the read to check for paused
	status.

Submitted by:	gibbs
2003-09-25 23:36:41 +00:00
Hidetoshi Shimokawa
aed9eb791a Phy register map. 2003-09-25 09:27:05 +00:00
Warner Losh
26824d8c47 CARDMEM is the offset of the address ON THE CARD (eg which page).
Instead, use EXCA_MEMREG_WIN_SHIFT which is the amount we shift the
bus address by to write into upper memory (eg above 24MB).  Use the
latter in this case.
2003-09-24 22:13:25 +00:00
Thomas Quinot
3fbbaabe4a Enable DMA for ATAPI/CAM input/output operations.
Reviewed by:	scottl
2003-09-24 18:40:10 +00:00
John Birrell
4e7b8fcec4 Add VidzMedia MonsterTV (MPEG video/TV capture box). 2003-09-24 02:02:41 +00:00
Paul Saab
473851ba04 By not setting No_CRC in the Mode Control Register, we must also
reduce the size of the packet by 4 bytes to remove the ethernet crc.

Submitted by:	jdp
2003-09-23 19:54:32 +00:00
Yoshihiro Takahashi
312ebe0323 Don't return to search another ports even if bus_space_map() fails. 2003-09-23 13:03:22 +00:00
Yoshihiro Takahashi
b8759afc2b Initialize iobase, bsh and bst. 2003-09-23 09:55:21 +00:00
Yoshihiro Takahashi
82df4f3134 Compare base address instead of bus_handle. 2003-09-23 09:49:37 +00:00
Yoshihiro Takahashi
c423dba334 - Keep the base address in struct uart_bas for sab82532 and z8530 modules.
- Remove buggy uart_cpu_busaddr() function.
2003-09-23 09:25:38 +00:00
Yoshihiro Takahashi
34c875bc30 Remove unneeded includes. 2003-09-23 09:20:03 +00:00
Yoshihiro Takahashi
81a11def25 Use bus_space_map() to initialize a bus_handle. 2003-09-23 08:38:49 +00:00
Paul Saab
e446dc8601 From the Broadcom Eratta:
Setting the No_CRC bit Can Cause Data Write Errors on BCM5701/03/04
The resolution is to not set the No_CRC bit in the Mode Control Register.
2003-09-23 00:37:07 +00:00
Sam Leffler
266f0707bb add locking
Reviewed by:	Prafulla Deuskar <pdeuskar@FreeBSD.ORG>
Sponsored by:	FreeBSD Foundation
2003-09-23 00:18:25 +00:00
Thomas Moestl
a65aa77700 Fix inverted BURN_BRIDGES and GONE_IN_5 #ifdefs. 2003-09-22 17:58:40 +00:00
Warner Losh
2e6a21aa7f Sony PEGA-WL110 Wireless LAN
Obtained from: NetBSD (onoe-san)
2003-09-22 05:33:22 +00:00
Warner Losh
f1bbdf43f2 sync to 1.72 2003-09-22 05:27:33 +00:00
Warner Losh
4091833eb6 Merge from NetBSD:
1.186: onoe; Sony's PEGA-WL110 CF WLAN (which strangely has fujitsu's
   vendor id)
1.185: ichiro; Quatech Inc, PCMCIA Enhanced Parallel Port Card

Also:
o update $NetBSD$
o minor tweaks to FUJITSU.  We've tried to keep the CIS only entries seprate
  from vendor id/product id.
2003-09-22 05:27:03 +00:00
Nate Lawson
0588717032 Add an off_t cast to prevent overflow on media size. This should
fix issues with geometry not matching drive size.

Submitted by:	Clive Lin <clive@tongi.org>
2003-09-22 04:59:07 +00:00
Nate Lawson
a6a1d01594 Fix the ACPI_DEBUG case.
Reported by:	Larry Rosenman <ler@lerctr.org>
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2003-09-22 04:50:29 +00:00
Poul-Henning Kamp
fb4d4b60b3 Make the clone handler BURN_BRIDGES but the actual 'a' and 'c' partition
check GONE_IN_5:  We need the clone handler for root filesystem case.

Once under GEOM, we can remove the clone handler as GEOM provides one.
2003-09-21 18:57:12 +00:00
Poul-Henning Kamp
d2f243d06a Make this compile. 2003-09-21 18:54:52 +00:00
Thomas Quinot
505d8ea4f1 (atapi_cb): Reorganize error handling circuitry.
Fix to the messages output under CAM_DEBUG_CCB: the summary sense
 information (error bits and sense key) is in the error field, not
 in the result field, of struct ata_request. No other functional change.
2003-09-21 16:49:53 +00:00
Thomas Quinot
1a2ede86a0 (atapi_cb): Disable autosense for now as it causes a missed ATA interrupt.
Minor reformatting.
2003-09-21 08:53:05 +00:00
Nate Lawson
be8dca590c Add support for fixed event buttons defined in the DSDT (HID "ACPI_FSB"
and "ACPI_FPB").

Pointed out by:		Linux
2003-09-21 02:49:59 +00:00
Bill Paul
edd033746c Remove the dual-address cycle stuff. DAC is used to allow a bus master
device to access 64-bit addresses from a 32-bit PCI bus. While the
RealTek manual says you can set this bit and the chip will perform
DAC only if you give it a DMA address with any of the upper 32
bits set, this appears not to be the case. If I turn on the DAC
bit, the chip sets the 'system error' bit in the status register
when I to do a DMA on my Athlon test box with 32-bit PCI bus (VIA
chipset) even though I only have 128MB of physical memory, and thus
can never give the chip a 64-bit address.

Obviously, I can't just set it and forget it, so until I figure
out the right rule for when it's safe/necessary to enable it, keep
it turned off.
2003-09-20 21:18:27 +00:00
Stefan Eßer
cf3153c9c9 Add vendor Samsung and device Samsung ML-6060. 2003-09-20 20:01:08 +00:00
Warner Losh
1bbd0d4010 EXPsys PCMCIA Ethernet Combo
Submitted by: Ludwig Pummer
2003-09-20 18:03:07 +00:00
Warner Losh
37c3193030 update to 1.71 2003-09-20 18:01:51 +00:00
Warner Losh
734b8bcbac EXPsys PCMCIA Ethernet Combo
Submitted by: Ludwig Pummer
2003-09-20 17:54:30 +00:00
Warner Losh
89aea6d530 Remove unused #defines. 2003-09-20 17:46:39 +00:00
Wilko Bulte
95ad0a1f28 Add missing file, it is sorely needed to make if_sk.c compile again. 2003-09-20 15:49:22 +00:00
Wilko Bulte
59ce78fef1 Add support for SK-9521 V2.0 and 3COM 3C940.
Tested at 100Mbit only, using Asus P4P800 onboard 3C940.
The -stable version of this patch I have in use for ~2 weeks now, and works
just fine for me.

Based on: Nathan L. Binkert's patch for OpenBSD
Patch submitted by and thanks to: Jung-uk Kim <jkim@niksun.com>
MFC after: 2 weeks
2003-09-20 10:53:08 +00:00
Søren Schmidt
bcf5e4d6b1 Dont reject a master device if it said slave failed. 2003-09-20 08:38:33 +00:00
Gary Jennejohn
eb3c983360 In umass_bbb_get_max_lun() move maxlun to before the DPRINTF so that
the actual number of LUNs is printed.
2003-09-20 08:18:16 +00:00
Warner Losh
45a3024ec7 New Proxim Harmony OEM card.
Submitted by: Jeremy Bingham
2003-09-20 05:27:18 +00:00
Warner Losh
7558e6858e sync to 1.70 2003-09-20 05:24:50 +00:00
Warner Losh
ea1349a34b OEM version of Proxim Harmony card
Submitted by: Jeremy Bingham
2003-09-20 05:23:50 +00:00
John Birrell
5ec40b82ff Add HP 4400C, Belkin F5U208 VideoBusII 2003-09-19 22:42:51 +00:00
Joerg Wunsch
0ec6e98386 Add an entry for the VScom (Titan?) PCI-800L 8-port serial multiport
card.

Thanks to bde for his help in configuring the undocumented bars in
this driver...

MFC after:	1 month
2003-09-19 19:55:08 +00:00
Thomas Quinot
6ff17a79aa (atapi_action): avoid memory leak in a marginal invalid ccb case.
(free_hcb): defend against calling TAILQ_REMOVE on an hcb that was
 not inserted on pending_hcbs.
2003-09-19 16:25:44 +00:00
Søren Schmidt
4cb5b1f936 Always check the sensekey field on ATAPI returns
Add INQUIRY to cmd2str.
2003-09-19 12:46:12 +00:00
Bill Paul
6110675fd6 Remove jumbo buffer #defines that I ended up not needing. 2003-09-19 02:35:03 +00:00
Bill Paul
7cae6651cf In re_diag(), there's no need for us to call re_start() ourselves:
IF_HANDOFF() does it for us behind the scenes. Remove the extra call
to re_start() otherwise we try to transmit twice.

In re_encap(), fix the code that guards against consuming too many
descriptors in the TX ring so that it actually works. With the
new 8169S chip, I was able to hit a corner case that drained the
free descriptor count all the way to 0. This is not supposed to
be possible.
2003-09-18 18:32:15 +00:00
Søren Schmidt
015aa7376b Cosmetics 2003-09-18 16:44:54 +00:00
Søren Schmidt
228800a5a7 Be a bit more restrictive in the probe so we dont hang around
on empty channels in most cases.
2003-09-18 16:43:08 +00:00
David E. O'Brien
d69e50be45 Support the Hawking Technology's UF100 Pegasus II 10/100 USB Ethernet. 2003-09-18 15:41:07 +00:00
Søren Schmidt
52725a453f Properly handle error code returns from the lower levels ATAPI code. 2003-09-18 09:22:14 +00:00
Bruce Evans
ca77329ecc Fixed most of the remaining style bugs in rev.1.194. Mainly better
wording in comments.
2003-09-18 07:46:40 +00:00
Nate Lawson
6c0e8467af Add necessary newlines. 2003-09-18 05:12:45 +00:00
Nate Lawson
a0e5a00957 Shorten the message announcing fixed power/sleep buttons. 2003-09-18 05:01:03 +00:00
Bruce Evans
aca282e269 Miscellaneous minor style fixes (mainly for unsorting of the flags access
macros).
2003-09-17 17:26:00 +00:00
Bruce Evans
42d3393791 Fixed bitrot in the probe in revs.1.127, 1.165 and 1.169. The
COM_NOFIFO() and COM_ESP cases are supposed to be a subsets of the
plain 16550A case, but 16650-related changes made the former fall into
the latter and then both fall into general code for printing the tx
fifo size.  This mainly caused hard to parse boot messages like:
"sio0: type 16550A fifo disabled lookalike with 1 bytes FIFO".
COM_NOFIFO() on an ESP port gave a larger mess whose extent is not
clear.

Fixed some nearby style bugs.
2003-09-17 16:44:02 +00:00
Bruce Evans
cd3aaf0e7c Cleaned up initialization of hardware flow control for 16650As. Use
defined values instead of hard-coded values.  Don't repeat the register
access part of the code 4 times times or triple-space statements.  This
fixes half of the style bugs in rev.1.172.

Hardware flow control of 16650As is still officially unsupported.  I
was mistaken about it being broken.  It is broken in 16650s but is
fixed in 16650As except for the maximum trigger level (which is no
longer used).  Testing of the 16650's broken hardware flow control
watermarks by programming them on 16950s showed that their effects are
not too bad if the fifo size and trigger level are reasonably large
(16 is much better than 8).
2003-09-17 14:05:16 +00:00
Mitsuru IWASAKI
526b5e659d Add pci_resume() to reestablish interrupt routing after
suspend/resume.
Especially after hibernation, interrupt routing went back to initial
status on some machines.
2003-09-17 08:32:44 +00:00
Poul-Henning Kamp
a2f19df9cc Pick up softc from dev_t rathern than through newbus gymnastics. 2003-09-17 07:40:00 +00:00
Poul-Henning Kamp
f967c4f96e Since it is static these days, there is no reason to uppercase the
first letter of fdopen() to avoid nameclashing with other stuff.
2003-09-17 07:21:20 +00:00
Marcel Moolenaar
44ed791b92 In uart_intr() loop until all interrupts have been handled. Previously
an UART interface could get stuck when a new interrupt condition
arose while servicing a previous interrupt. Since an interrupt was
already pending, no new interrupt would be triggered.

Avoid infinite recursion by flushing the Rx FIFO and marking an
overrun condition when we could not move the data from the Rx
FIFO to the receive buffer in toto. Failure to flush the Rx FIFO
would leave the Rx ready condition pending.

Note that the SAB 82532 already did this due to the nature of the
chip.
2003-09-17 03:11:32 +00:00
Eric Anholt
f704d34677 Fix a typo in r1.8: The GTLB enable/flush bit is 1<<7, not 1<<8.
PR:		kern/56297
Submitted by:	Dan Angelescu <mrhsaacdoh@yahoo.com>
2003-09-17 02:58:17 +00:00
Marcel Moolenaar
06287620b4 Add locking to the hardware drivers. I intended to figure out more
precisely where locking would be needed before adding it, but it
seems uart(4) draws slightly too much attention to have it without
locking for too long.
The lock added is a spinlock that protects access to the underlying
hardware. As a first and obvious stab at this, each method of the
hardware interface grabs the lock. Roughly speaking this serializes
the methods. Exceptions are the probe, attach and detach methods.
2003-09-17 01:41:21 +00:00
Bruce Evans
6ab09ca79b Fixed world breakage in previous commit. Somehow the wrong include was
removed in the world although the correct one was removed in the universe.
2003-09-17 01:09:10 +00:00
Scott Long
7753acd255 Correctly wrap the producer queue index when dequeuing commands. This wasn't
a problem for command responses since we rarely ever filled the queue.
However, adapter-initiated commands have a much smaller queue and could
tickle this bug.  It's possible that this might fix the recently reported
problems with the aac-2120s, though I haven't been able to reproduce the
problem locally.

MFC-After: 1 day
2003-09-16 16:07:15 +00:00
Søren Schmidt
855deec44c When ignoring interrupts (due to no running request set) then try
to grap the channel so we can read status (and clear an evt pending
interrupt).
2003-09-16 15:21:37 +00:00
Søren Schmidt
853c84ddf6 Rearrange the probe a bit first try ATAPI signatures then ATA. 2003-09-16 15:16:36 +00:00
Søren Schmidt
77de5988d6 Properly cast longs to off_t so we dont loose precision. 2003-09-16 14:41:44 +00:00
Bruce Evans
efcfe95173 Added definitions of most of the interesting 16950 register numbers
and some of their bits (i.e., fifo trigger levels, frequency multipliers
and divisors, and bits to select the registers for these).  This
attempts to completely describe the 16950's complicated register selects
for 16950-specific registers only.
2003-09-16 14:21:17 +00:00
Bruce Evans
fec27f507c Added definitions for some 16650 features (mostly misfeatures). This
completes defining the 16650 register numbers but not all of their bits.
2003-09-16 14:08:54 +00:00
Bruce Evans
2b843bc94b Fixed a minor error in the description of the EFR and a major error in
the description of the data latch registers (they were described as
readonly).

Added some better and worse aliases for standard registers, mostly taken
from the 16950 data sheet.  Define deprecated aliases in terms of the
preferred one.

Don't define com_efr in terms of com_fifo.  It is unrelated (in a
different bank).
2003-09-16 13:52:01 +00:00
Bruce Evans
74814b322a Sorted register numbers together with the correspoding register bits.
Merged comments to match (put them at the right of the #defines instead
of duplicating them).

Sorted the resulting sections on UART type and register bank.  Added a
comment for each bank.
2003-09-16 11:54:29 +00:00
Bruce Evans
4b60a21e0c Don't include another driver's private reg.h file (sioreg.h). Including
ns16550.h is now sufficient.
2003-09-16 11:04:22 +00:00
Bruce Evans
86fe87393a Moved the definitions of the bits in the ns*50 registers from sioreg.h
to ns16550.h.  The organization of these files was sort of backwards.
The bits in the registers have no driver or bus dependencies but they
but the offsets of the registers in bus space are very bus-dependent.
However, it does no harm to keep the definitions of the register offsets
in ns16550.h provided they are thought of as internal ns*50 offsets.
2003-09-16 08:08:08 +00:00
Martin Blapp
129eaf7996 Don't read the MAC address from a copy of the EEPROM in the softc
that has been recorded earlier and overwrite it again later by
reading it directly from the EEPROM again.

Read the MAC address from the PAR0/PAR1 registers instead, which
are autoloaded on reboot.

Tested on AN985, AN983B. According to the datasheets, it should
also work for the AL981 (I don't have such a chip on a card at home)

PR:             52988
Submitted by:   Andrew Gordon <arg-bsd@arg.me.uk>
MFC after:      2 weeks
2003-09-16 05:01:27 +00:00
Sam Leffler
de5af70460 Maintain a history of data associated with received frames and use this to
calculate smoothed signal quality data for each node.

o add a 16-deep history buffer to each driver-private node storage that
  holds rssi and antenna info for received frames
o override the default per-node "get rssi" method to return an average
  rssi value based on samples collected over the last second
o enable beacon reception so even idle systems maintain a running history
  of signal quality

This data may also be useful for improving the rate control algorithm.
Based on work by Tom Marshall <tommy@home.tig-grr.com> for MADWIFI.
2003-09-15 22:34:46 +00:00
Nate Lawson
c87cfaedf2 Bump the EC timeout from 50 to 100 ms. I believe the underlying issue is
global lock contention as symptoms only appear under heavy load (i.e. the
nightly periodic run).
2003-09-15 21:20:55 +00:00
Nate Lawson
feec6a7a90 Correctly reset ich[3-5] sound cards on resume. This fixes audio playback
after suspend/resume for me.

PR:
Submitted by:	iwasaki
Reviewed by:	orion
Approved by:	cg
Obtained from:
MFC after:
2003-09-15 21:16:47 +00:00
Sam Leffler
ecddff40a0 o do not filter received frames based on type or length; pass 'em all up
to the 802.11 layer if they are at least IEEE80211_MIN_LEN
o mask off interrupt status bits that we don't care about so we don't do
  the wrong thing; this fixes a problem where the beacon miss interrupt status
  bit is delivered together with other status bits when operating in monitor
  mode (we would post a beacon miss swi and then do the wrong thing)
2003-09-15 19:41:54 +00:00
Bruce Evans
7c24ca50f8 Quick fix for a pessimization in rev.1.194. An extra i/o instruction
was added to the fast path to support the COM_IIR_RXRDYBUG() case even
when that case is not configured.  This increased the relative overhead
of sio input by almost 25% in the worst case and by 2-3% in the usual
case (usually only about 0.2% absolute per port at 115200 bps).  The
quick fix is to significantly pessimize only the COM_IIR_RXRDYBUG()
case.
2003-09-15 13:49:18 +00:00
Mark Murray
56c5b842f0 Add a module dependancy. Now CAM will autoload when you load this.
OK'ed by:	mdodd
2003-09-15 06:41:33 +00:00
Nate Lawson
2d610c4638 Only enable S4BIOS by default if the FACS says it is available. The
user can override this with a sysctl.

Be sure to return the acpi_SetSleepState return value to userland.
2003-09-15 06:29:31 +00:00
Marcel Moolenaar
39e7b60930 Remove inclusion of <sys/timepps.h>. It's included in "uart_bus.h"
to avoid having to include it in almost all other source files.
2003-09-15 04:49:22 +00:00
Takanori Watanabe
45b3a50925 Remove useless #ifdef PC98.
Submitted by: nyan
2003-09-15 03:12:27 +00:00
Sam Leffler
3065b96e25 must also check for 5Ghz channels when marking short preamble capability in
the beacon frames

Reminded by:	Stephane Laroche <stephane.laroche@colubris.com>
2003-09-14 22:53:41 +00:00
Sam Leffler
f6aa038bbe o mark the device capable of short preamble (meaningless for the 5210 but
safe since the 802.11 layer does the right thing for 11a operation)
o select short preamble operation based on the negotiated capabilities; not
  just the local state/capability
o fillin the duration field in the 802.11 header as appropriate
o remove detection of 11g support; no longer needed

Obtained from:	MADWIFI (with modifications)
2003-09-14 22:39:19 +00:00
Scott Long
ec40a9f9d0 Teach the PCI code to parse MSI extended capabilities. Re-arrange the
pcicfg struct a bit to hold extcap structures instead of structure members.
2003-09-14 19:30:00 +00:00
Nate Lawson
5f7e1e2f82 Print notify values as hex. 2003-09-14 17:47:44 +00:00
Takanori Watanabe
a9f6e997b5 Add uart pccard bus attachment,based on sio_pccard.c .
Wrote at: Hakone.
Powered by: Warner Losh's scotch whisky.
Tested by: nork
2003-09-14 16:21:06 +00:00
Scott Long
3c358d0ca0 Expand the extended capabilities list and add definitions for MSI. 2003-09-14 14:42:26 +00:00
Scott Long
cadbc399ea Remove most of the magic constants from the extcap parsing code. 2003-09-14 06:23:19 +00:00
Bill Paul
c2c6548b3a Teach the re(4) driver about the CFG2 register, which tells us whether
we're on a 32-bit/64-bit bus or not. Use this to decide if we should
set the PCI dual-address cycle enable bit in the C+ command register.
(Enabling DAC on a 32-bit bus seems to do bad things.)

Also, initialize the C+ command register early in the re_init() routine.
The documentation says this register should be configured first.
2003-09-13 23:51:35 +00:00
Nate Lawson
64fdad2352 Add the -i flag to acpiconf(8) to retrieve battery information.
Rename a few structure elements.
2003-09-13 20:13:01 +00:00
Marcel Moolenaar
84c7b427f5 Add support for automatic hardware flow control for 16[679]50 UARTs.
We simply use the detected FIFO size to determine whether we have
a post 16550 UART or not. The support lacks proper serialization of
hardware access for now.
2003-09-13 06:25:04 +00:00
Matt Jacob
4b39f27d17 NetBSD'er with time on their hands (dma->DMA) 2003-09-13 01:59:14 +00:00
Matt Jacob
799cbab17e Bland synchronization of common source with no effect on FreeBSD whatsomever. 2003-09-13 01:58:51 +00:00
Matt Jacob
2f9e7606fe Some ridiculous target mode botches- like having the wrong definitions
for messages. Some spelling fixes. Some target mode structure cleanups
to reflect reality.
2003-09-13 01:58:26 +00:00
Matt Jacob
5c1596a04a Some canonicalization function cleanups based upon some target mode
structure cleanups.
2003-09-13 01:57:31 +00:00
Matt Jacob
4578084aa3 No time like the present to turn back on SMP locking. 2003-09-13 01:56:45 +00:00
Matt Jacob
fd6eb9f769 Report correct active vs. nvram node/port WWNs in an ioctl. 2003-09-13 01:56:24 +00:00
Matt Jacob
28f0575cf1 On reset, make sure that we have some parameters set correctly. This
fixes a longstanding issue WRT resetting the chip after startup- it
would fail if we were connected as an F-port to a switch. If we
were connected as an F-port, we got assigned a hard loop ID of 255,
which is really a bogus loop id. Then when we turned around to
reset ourselves, the firmware would reject the ICB_INIT request
because the loop id was bogus. *sputter*

Minor fixlet from somebody in NetBSD with too much time on their
hands (dma -> DMA).
2003-09-13 01:55:44 +00:00
Thomas Moestl
09c06ee91f When determining the device class to use for the serial console, check
the "compatible" property too in the ns8250 case. This gets the serial
console to work on Blade 100s, where the device name is just "serial".

Reviewed by:	marcel
2003-09-12 20:13:23 +00:00
Paul Saab
faf13262a4 Delay most of the adapter initilization until after interrupts are
enabled.

Tested by:	Richard Puga <puga@mauibuilt.com>
2003-09-11 23:30:28 +00:00
Marcel Moolenaar
8194412b89 Add support for using uart(4) for pulse capturing for the Pulse Per
Second (PPS) timing interface. The support is non-optional and by
default uses the DCD line signal as the pulse input. A compile-time
option (UART_PPS_ON_CTS) can be used to have uart(4) use the CTS line
signal.

Include <sys/timepps.h> in uart_bus.h to avoid having to add the
inclusion of that header in all source files.

Reviewed by: phk
2003-09-11 23:06:42 +00:00
Poul-Henning Kamp
0c7721e8f9 Disable the use of cloning use in floppy and CD drivers.
This commit puts the relevant code snippets under #ifdef GONE_IN_5
(rather than #ifndef BURN_BRIDGES) thereby disabling the code now.

The code wil be entirely removed before 5.2 unless we find reasons
why this would be a bad idea.

Approach suggested by:	imp
2003-09-11 19:27:24 +00:00
Thomas Quinot
cc9ed6619f (atapi_action, case XPT_PATH_INQ): Handle properly the case of
CAM_TARGET_WILDCARD (target_id_t is an unsigned integer type).
Fixes boot-time crash on Alpha.

Reviewed by:	roberto
Approved by:	re (murray)
MFC after:	1 week
2003-09-11 17:34:47 +00:00
Søren Schmidt
fe78f9d47c Add support of the DIOCGSECTORSIZE & DIOCGMEDIASIZE ioctl's
so that newfs works on dvd-rw/dvd-ram again..
2003-09-11 15:59:16 +00:00
Bill Paul
d5a5045921 Clean up dead code. 2003-09-11 08:28:38 +00:00
Bill Paul
804af9a1af Toggle the interface on and off before starting the diag test. This
seems to be necessary for the 8139C+ under certain circumstances, and
doesn't appear to hurt the other chips. (In the failure case, the
packet would be sent through the TX DMA ring but not get echoed
back. I suspect this has something to do with the link state changing
unexpectedly.)
2003-09-11 07:54:16 +00:00
Bill Paul
abc8ff44d3 - For the 8169 chips, read the station address by forcing an EEPROM
autoload and then copying the contends of the station address
  registers. For some reason, reading the EEPROM on the 8169S doesn't
  work right. This gets around the problem, and allows us to read
  the station address correctly on the 8169S.

- Insert a delay after initiating packet transmition in re_diag() to
  allow lots of time for the frame to echo back to the host, and wait
  for both the 'RX complete' and 'timeout expired' bits in the ISR
  register to be set.

- Deal more intelligently with the fact that the frame length
  field in the RX descriptor is a different width on the 8139C+
  than it is on the 8169/8169S/8110S

- For the 8169, you have to set bit 17 in the TX config register
  to enter digital loopback mode, but for the 8139C+, you have to
  set both bits 17 and 18. Take this into account so that re_diag()
  works properly for both types of chips.
2003-09-11 06:56:46 +00:00
Warner Losh
3e49a687ff Minor commentary cleanup, since I didn't understand the comments that
I wrote.
2003-09-11 04:22:28 +00:00
Warner Losh
04ea3df7d9 Fix compile on pc98. Maybe this is correct. 2003-09-11 04:14:26 +00:00
Bill Paul
9bac70b851 Add a PHY driver to support the built-in gigE PHY in the 8169S/8110S
ethernet chips. This driver is pretty simple, however it contains
special DSP initialization code which is needed in order to get
the chip to negotiate a gigE link. (This special initialization
may not be needed in subsequent chip revs.) Also:

- Fix typo in if_rlreg.h (RL_GMEDIASTAT_1000MPS -> RL_GMEDIASTAT_1000MBPS)

- Deal with shared interrupts in re_intr(): if interface isn't up,
  return.

- Fix another bug in re_gmii_writereg() (properly apply data field mask)

- Allow PHY driver to read the RL_GMEDIASTAT register via the
  re_gmii_readreg() register (this is register needed to determine
  real time link/media status).
2003-09-11 03:53:46 +00:00
Nate Lawson
5c5967082f Add a system notify handler in addition to the device notify handler.
At least some Toshiba notebooks use a Notify of 0 or 1 for this.

PR:
Submitted by:	Hiroyuki Aizu <aizu@navi.org>
2003-09-11 03:17:33 +00:00
Marcel Moolenaar
24752c4291 Extend the ACPI resource handling to make use of the BUS_CONFIG_INTR()
method. This is necessary on ia64 where it's known that serial interfaces
described in the ACPI namespace may not have the well-known IRQs assigned
to them. This confuses us in thinking they are PCI based interrupts and
wrongly program the APIC.
2003-09-10 22:06:41 +00:00
Bill Paul
4ee1666125 Fix bug in re_gmii_writewreg(): we don't need to be screening out certain
PHY addresses here. (The chip will only let you talk to one PHY anyway.)
2003-09-10 15:14:46 +00:00
Søren Schmidt
2194b6a479 Try a bit harder to probe disks that doesn't quite set BUSY right. 2003-09-10 09:57:16 +00:00
Bill Paul
69a6b7fb50 Update hardware revision table. 0x04000000 appears to be the revision
for the 8169S, according to my sample board. The RealTek Linux driver
mentions 0x00800000. I'm assigning this to the 8110S until I get
more info on it. (The (preliminary) RealTek docs only say that 8169S/8110S
chips will have some combination of those two bits set, but doesn't say
exactly what bit combination goes with which chip variant.)
2003-09-10 07:21:43 +00:00
John Baldwin
42a12b2bd8 Move the definitions for ACPI MADT table entries not present in the ACPICA
distribution to a MI header so it can be shared with other architectures.
2003-09-10 06:32:27 +00:00
Marcel Moolenaar
c21e0da2f8 If we failed to size the Rx FIFO, assume the worst. This however
is not a size of 1. Since we already know there is a FIFO, we can
safely assume that it is at least 16 bytes. Note that all this is
mostly academic anyway. We don't use the size of the Rx FIFO
currently. If we add support for hardware flow control, we only
care about Rx FIFO sizes larger than 16.
2003-09-10 05:01:08 +00:00
Bill Paul
af8512b863 Remove unnecessary #include of brgphyreg.h, left over from when Stuart used
the bge(4) driver as a template.
2003-09-09 18:21:17 +00:00
Bill Paul
b9f78d2b4a Add a device driver for the Broadcom BCM4401 ethernet controller,
written by Stuart Walsh and Duncan Barclay (with some kibbitzing by
me). I'm checking it in on Stuart's behalf.

The BCM4401 is built into several x86 laptop and desktop systems. For the
moment, I have only enabled it in the x86 kernel config because although
it's a PCI device, I haven't heard of any standalone NICs that use it. If
somebody knows of one, we can easily add it to the other arches.

This driver uses register/structure data gleaned from the Linux
driver released by Broadcom, but does not contain any of the code
from the Linux driver itself. It uses busdma.
2003-09-09 18:17:23 +00:00
Scott Long
5b80c0d74d Use PCIR_BAR() instead of a magic offset. 2003-09-09 06:44:58 +00:00
Nate Lawson
9817561470 Disallow attempts to suspend to S0. It was only enabled for testing.
Print a more informative message if a sleep state is not supported by BIOS.
Add comments.
2003-09-09 04:09:25 +00:00
Eric Anholt
6608b729ea Merge from DRI CVS. Includes newly ported SiS 300/305/540/630/730 driver and
updates to allow system memory to be used for textures on PCI Radeons.

Sponsored by:	LinuxFund
2003-09-09 00:24:31 +00:00
Paul Saab
88ff7f004e Quiet down boot verbose and allow commands to be submitted to a target
which does not have a volume attached.  This will stop cam from retrying
a bunch of time at boot for devices which do not exsist.
2003-09-08 16:45:33 +00:00
Søren Schmidt
a127b17621 Add another ID for the SiI3112a SATA chip as used on the Adaptec 1210SA.
RAID support is still in the works, so for now just normal ATA ops.

Sponsored by:	Matt Douhan(www.fruitsalad.org)
2003-09-08 13:55:05 +00:00
Søren Schmidt
df63f1d988 Limit the size of the rebuild requests to be within safety. 2003-09-08 13:36:26 +00:00
Søren Schmidt
4514dcad32 #ifdef out the vague ATA disk detection code causing fake ATA disks
to be found on some systems.
Hopefully this doesn't loose any real ATA disks...
2003-09-08 08:36:46 +00:00
Søren Schmidt
08c26854a3 Handle shared channels better.
Try to avoid the spurios interrupts better.
2003-09-08 08:32:25 +00:00
Søren Schmidt
9855ae3844 Update the PIO mode gathering code.
Reported by: bde
2003-09-08 08:30:43 +00:00
Søren Schmidt
6e9e1e9753 Dont re-arm the timeout twice on a timeout error.
The problem with the first timeout still exsists though, but not
it doesn't enter a groundbound spin loop :)

Found by:	Aaron Smith <aaron@mutex.org>
2003-09-08 06:28:50 +00:00
Bill Paul
a94100fa9b Take the support for the 8139C+/8169/8169S/8110S chips out of the
rl(4) driver and put it in a new re(4) driver. The re(4) driver shares
the if_rlreg.h file with rl(4) but is a separate module. (Ultimately
I may change this. For now, it's convenient.)

rl(4) has been modified so that it will never attach to an 8139C+
chip, leaving it to re(4) instead. Only re(4) has the PCI IDs to
match the 8169/8169S/8110S gigE chips. if_re.c contains the same
basic code that was originally bolted onto if_rl.c, with the
following updates:

- Added support for jumbo frames. Currently, there seems to be
  a limit of approximately 6200 bytes for jumbo frames on transmit.
  (This was determined via experimentation.) The 8169S/8110S chips
  apparently are limited to 7.5K frames on transmit. This may require
  some more work, though the framework to handle jumbo frames on RX
  is in place: the re_rxeof() routine will gather up frames than span
  multiple 2K clusters into a single mbuf list.

- Fixed bug in re_txeof(): if we reap some of the TX buffers,
  but there are still some pending, re-arm the timer before exiting
  re_txeof() so that another timeout interrupt will be generated, just
  in case re_start() doesn't do it for us.

- Handle the 'link state changed' interrupt

- Fix a detach bug. If re(4) is loaded as a module, and you do
  tcpdump -i re0, then you do 'kldunload if_re,' the system will
  panic after a few seconds. This happens because ether_ifdetach()
  ends up calling the BPF detach code, which notices the interface
  is in promiscuous mode and tries to switch promisc mode off while
  detaching the BPF listner. This ultimately results in a call
  to re_ioctl() (due to SIOCSIFFLAGS), which in turn calls re_init()
  to handle the IFF_PROMISC flag change. Unfortunately, calling re_init()
  here turns the chip back on and restarts the 1-second timeout loop
  that drives re_tick(). By the time the timeout fires, if_re.ko
  has been unloaded, which results in a call to invalid code and
  blows up the system.

  To fix this, I cleared the IFF_UP flag before calling ether_ifdetach(),
  which stops the ioctl routine from trying to reset the chip.

- Modified comments in re_rxeof() relating to the difference in
  RX descriptor status bit layout between the 8139C+ and the gigE
  chips. The layout is different because the frame length field
  was expanded from 12 bits to 13, and they got rid of one of the
  status bits to make room.

- Add diagnostic code (re_diag()) to test for the case where a user
  has installed a broken 32-bit 8169 PCI NIC in a 64-bit slot. Some
  NICs have the REQ64# and ACK64# lines connected even though the
  board is 32-bit only (in this case, they should be pulled high).
  This fools the chip into doing 64-bit DMA transfers even though
  there is no 64-bit data path. To detect this, re_diag() puts the
  chip into digital loopback mode and sets the receiver to promiscuous
  mode, then initiates a single 64-byte packet transmission. The
  frame is echoed back to the host, and if the frame contents are
  intact, we know DMA is working correctly, otherwise we complain
  loudly on the console and abort the device attach. (At the moment,
  I don't know of any way to work around the problem other than
  physically modifying the board, so until/unless I can think of a
  software workaround, this will have do to.)

- Created re(4) man page

- Modified rlphy.c to allow re(4) to attach as well as rl(4).

Note that this code works for the sample 8169/Marvell 88E1000 NIC
that I have, but probably won't work for the 8169S/8110S chips.
RealTek has sent me some sample NICs, but they haven't arrived yet.
I will probably need to add an rlgphy driver to handle the on-board
PHY in the 8169S/8110S (it needs special DSP initialization).
2003-09-08 02:11:25 +00:00
Marcel Moolenaar
5cc705512d Remove the assumption that a bus_space_handle_t is an I/O address
from the SAB82532 and the Z8530 hardware drivers by introducing
uart_cpu_busaddr(). The assumption is not true on pc98 where
bus_space_handle_t is a pointer to a structure.
The uart_cpu_busaddr() function will return the bus address
corresponding the tag and handle given to it by the BAS.

WARNING: the intend of the function is STRICTLY to allow hardware
drivers to determine which logical channel they control and is NOT
to be used for actual I/O. It is therefore EXPLICITLY allowed that
uart_cpu_busaddr() returns only the lower 8 bits of the address
and garbage in all other bits. No mistakes...
2003-09-07 21:51:03 +00:00
Cameron Grant
3f22597838 update my email address. 2003-09-07 16:28:03 +00:00
Warner Losh
af1af2d2cc Better stab at MD code for pc98. The 8251 stuff is a total lie
(ns8250 copied and s/ns8250/i8251/g), but there for linkage purposes.
Real code to follow, once I get past some boot issues on my pc98 boxes
with recent current.
2003-09-07 04:59:15 +00:00
Marcel Moolenaar
27d5dc189c The uart(4) driver is an universal driver for various UART hardware.
It improves on sio(4) in the following areas:
o  Fully newbusified to allow for memory mapped I/O. This is a must
   for ia64 and sparc64,
o  Machine dependent code to take full advantage of machine and firm-
   ware specific ways to define serial consoles and/or debug ports.
o  Hardware abstraction layer to allow the driver to be used with
   various UARTs, such as the well-known ns8250 family of UARTs, the
   Siemens sab82532 or the Zilog Z8530. This is especially important
   for pc98 and sparc64 where it's common to have different UARTs,
o  The notion of system devices to unkludge low-level consoles and
   remote gdb ports and provides the mechanics necessary to support
   the keyboard on sparc64 (which is UART based).
o  The notion of a kernel interface so that a UART can be tied to
   something other than the well-known TTY interface. This is needed
   on sparc64 to present the user with a device and ioctl handling
   suitable for a keyboard, but also allows us to cleanly hide an
   UART when used as a debug port.

Following is a list of features and bugs/flaws specific to the ns8250
family of UARTs as compared to their support in sio(4):
o  The uart(4) driver determines the FIFO size and automaticly takes
   advantages of larger FIFOs and/or additional features. Note that
   since I don't have sufficient access to 16[679]5x UARTs, hardware
   flow control has not been enabled. This is almost trivial to do,
   provided one can test. The downside of this is that broken UARTs
   are more likely to not work correctly with uart(4). The need for
   tunables or knobs may be large enough to warrant their creation.
o  The uart(4) driver does not share the same bumpy history as sio(4)
   and will therefore not provide the necessary hooks, tweaks, quirks
   or work-arounds to deal with once common hardware. To that extend,
   uart(4) supports a subset of the UARTs that sio(4) supports. The
   question before us is whether the subset is sufficient for current
   hardware.
o  There is no support for multiport UARTs in uart(4). The decision
   behind this is that uart(4) deals with one EIA RS232-C interface.
   Packaging of multiple interfaces in a single chip or on a single
   expansion board is beyond the scope of uart(4) and is now mostly
   left for puc(4) to deal with. Lack of hardware made it impossible
   to actually implement such a dependency other than is present for
   the dual channel SAB82532 and Z8350 SCCs.

The current list of missing features is:
o  No configuration capabilities. A set of tunables and sysctls is
   being worked out. There are likely not going to be any or much
   compile-time knobs. Such configuration does not fit well with
   current hardware.
o  No support for the PPS API. This is partly dependent on the
   ability to configure uart(4) and partly dependent on having
   sufficient information to implement it properly.

As usual, the manpage is present but lacks the attention the
software has gotten.
2003-09-06 23:13:47 +00:00
Marcel Moolenaar
dc7d0dea12 Enhance puc(4) to support uart(4). This includes:
o  Introduce PUC_PORT_TYPE_UART so that we can attach to uart(4),
o  Introduce port sub-types (eg PUC_PORT_UART_NS8250, PUC_PORT_UART_Z8530)
   to handle different hardware and determine resource sizes.
o  Introduce two new IVARs: PUC_IVAR_SUBTYPE and PUC_IVAR_REGSHFT. Both
   are used by uart(4) to get sufficient information to talk to the HW.
o  Introduce PUC_FLAGS_ALTRES to tell puc(4) to try memory mapped I/O
   if I/O port space cannot be allocated, or vice versa.
o  Have ports of type PUC_PORT_TYPE_COM attach to uart(1) if attaching
   to sio(4) fails (due to not having the sio driver).
o  Put struct puc_device_description in struct puc_softc instead of
   having a pointer to a device description in the softc. This allows
   us to create device descriptions on the fly without having to use
   malloc() or otherwise have them staticly defined.
o  Move puc_find_description() from puc.c to puc_pci.c as it's specific
   to PCI.
o  Add EBUS and SBUS frontends for use on sparc64. Note that the P in
   puc stands for PCI, so we kinda mess things up here. It's too soon
   to worry about it though. We'll know what to do about it in time.

NOTE: This commit changes the behaviour of puc(4) to not quieten the
device probe and attach for child devices. The uart(4) driver provides
additional device description that is valuable to have.
2003-09-06 21:48:50 +00:00
Doug Rabson
ef0040ab3b No need for a separate nfpm driver now - amdpm handles both. 2003-09-06 13:58:06 +00:00
Sam Leffler
45276e4aa4 change timeout to be MPSAFE
Sponsored by:	FreeBSD Foundation
2003-09-05 22:37:31 +00:00
Sam Leffler
8df91fc8bc o add experimental radiotap capture format
o add netbsd logic to convert rssi to device-independent values

Obtained from:	NetBSD (rssi conversion code)
2003-09-05 22:29:30 +00:00
Sam Leffler
73454c7385 Add support for the experimental radiotap capture format. With this
we no longer need the debugging code to dump packets.
2003-09-05 22:22:49 +00:00
Poul-Henning Kamp
9aad651f23 Fix off-by-one error in array bounds check. 2003-09-05 11:09:26 +00:00
Poul-Henning Kamp
bc7c831fc7 Forgotten in previous commit to atapi-cd.c: Add #ifndef BURN_BRIDGES
around cloning routines.
2003-09-05 11:08:55 +00:00
Poul-Henning Kamp
4740a0e7f2 Be less confusing in a comment. 2003-09-05 11:05:41 +00:00
Poul-Henning Kamp
7837155fa2 Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES.
For the floppy driver, use fdcontrol to manipulate density selection.

For the CD drivers, the 'a' and 'c' suffix is without actual effect and
any applications insisting on it can be satisfied with a symlink:
	ln -s /dev/cd0 /dev/cd0a

Ongoing discussion may result in these pieces of code being removed before
the 5-stable branch as opposed to after.
2003-09-05 10:40:16 +00:00
Warner Losh
a48c0be85d Whacked out CIS configurations can cause us to not have any child. When
such a card is ejected, we'd panic.  Instead, just ignore it.

I should also add a sanity check in the FUNCID code as well, but this
isn't wrong since the check is cheap and happens infrequently.
2003-09-05 03:08:08 +00:00
Nate Lawson
f97739da4d Don't free the buffer if it wasn't actually allocated. 2003-09-04 15:55:41 +00:00
John Baldwin
b66752c4a1 Bring back PCIR_HEADERTYPE as an alias for PCIR_HDRTYPE under BURN_BRIDGES
for backwards compat.  The old name will be gone in 6.0, but will be
around in 5.x.  This will help unbreak 3rd party code, e.g. the nvidia
DRM module.
2003-09-03 17:48:22 +00:00
John Baldwin
ab551d918c Replace another instance of PCIR_MAPS with PCIR_BAR(x).
Reminded by:	dfr
2003-09-03 15:24:31 +00:00
David E. O'Brien
0204ca844f Recognize the OHCI USB device on Opteron-based nForce3 motherboards
(such as the Asus SK8N).
2003-09-03 07:40:17 +00:00
David E. O'Brien
bbee264035 Recognize the sound chip on the Opteron-based nForce3 motherboards
(such as the Asus SK8N).
2003-09-03 07:38:21 +00:00
David E. O'Brien
debffe8383 Support the nForce3 chip found on Opteron motherboards:
atapci0: <nVidia nForce3 UDMA133 controller>

Approved by:	sos
2003-09-02 21:02:46 +00:00
Marcel Moolenaar
11a91bffe5 Preparatory commit to allow prototypes in ofw_machdep.h to contain
both newbus types and OFW types. This involves either including
<machine/bus.h> or <dev/ofw/openfirm.h>.

Reviewed by: jake, jmg, tmm
2003-09-02 20:24:42 +00:00
Marcel Moolenaar
e43e17a2e6 Move the inclusion of <machine/ofw_machdep.h> after the inclusion of
<dev/ofw/openfirm.h> to allow the former to contain prototypes that
use types defined in the latter.

Reviewed by: mjacob@
2003-09-02 19:52:31 +00:00
John Baldwin
e27951b29c Use PCIR_BAR(x) instead of PCIR_MAPS.
Glanced over by:	imp, gibbs
Tested by:		i386 LINT
2003-09-02 17:30:40 +00:00
John Baldwin
56802c46e2 - Deprecate PCIR_MAPS under BURN_BRIDGES (meaning it will be gone in 6.0)
and replace it with the more intuitive name PCIR_BARS.
- Add a PCIR_BAR(x) macro that returns the config space register offset of
  the 32-bit BAR x.

MFC after:	3 days
2003-09-02 17:11:27 +00:00
Søren Schmidt
b57e5e1898 cosmetics 2003-09-02 15:53:01 +00:00
Søren Schmidt
dce3b7cc71 Adjust the max transfer size used. 2003-09-02 13:26:02 +00:00
Scott Long
1b4404f9ab Prepare for locking mlx(4) by cleaning up the use of busdma. No real
functional changes should result from this.
2003-09-02 08:30:31 +00:00
Scott Long
8778f63db2 Commands submitted through the management interface won't have scatter/
gather lists.  Stop ignoring them and instead call the callback directly.
This unbreaks the management interface.
2003-09-01 20:44:18 +00:00
Doug Rabson
d37a68d05a Don't try to enable io or memory access for non-standard resource
addresses. This stops resource allocations for e.g. amdpm failing - this
has its own special ways of enabling access.
2003-09-01 15:01:49 +00:00
Søren Schmidt
7c78880561 Rearrange the probe code yet again. 2003-09-01 11:13:21 +00:00
Bernd Walter
c4bc00e509 Try a port reset if initial contact to a device failed.
tested by:	Lee Damon <nomad@castle.org>
2003-09-01 07:47:42 +00:00
Sam Leffler
f07a6d989f Explicitly enable probe request frame reception when not in station mode;
this is needed for the 5212 which a separate filter bit for these frames.

Submitted by:   Stephane Laroche <stephane.laroche@colubris.com>
2003-09-01 03:12:19 +00:00
John-Mark Gurney
c5b3755306 eliminate casts from the DMAADDR macro. This depends upon bus_addr_t being
a type that you can do arithmetic with.  This eliminates many warnings when
compiling with PAE.

Various by:	scottl
2003-09-01 01:07:24 +00:00
Scott Long
0bcbebd6df If ~ chars were pennies, I'd be pennyless. This should fix all of the
'command not in queue' panics.  Also fix a nearby style problem.
2003-09-01 00:20:29 +00:00
Nate Lawson
5fd86f39d0 Update the comment to indicate ICH5 support 2003-08-31 19:23:00 +00:00
Nate Lawson
58f946c5f5 Add support for the 82801EB (ICH5) SMBus controller.
PR:		kern/55485
Submitted by:	Shin-ichi Yoshimoto <yosimoto@waishi.jp>
MFC after:	1 day
2003-08-31 01:28:02 +00:00
Mark Murray
024351e027 Style fixes of the whitespace variety. Fix long lines and tabs. 2003-08-30 08:10:58 +00:00
Hidetoshi Shimokawa
16acf1a3f1 Fix byte order of multi-byte scsi_status information. 2003-08-29 13:36:17 +00:00
Warner Losh
d029ead3cb When we went to the set_flags interface for the memory resource, we
switched from PCCARD_MEM_FOO to PCCARD_A_MEM_FOO, yet we didn't change
exca in all the right places.  Do so now.  Also use PCCARD_WIDTH_AUTO
rather than the magic cookie 0.
2003-08-29 05:27:36 +00:00
Nate Lawson
ad1fdf57d2 Use the ACPICA AcpiEnterSleepStateS4bios instead of rolling our own. This
change also disables interrupts around non-S4 suspends whereas before we
did not do this.  Our version of AcpiEnterSleepStateS4bios was almost
identical to the ACPICA version.
2003-08-29 04:02:19 +00:00
Orion Hodson
99e082c84d Add Creative SB AudioPCI CT4730 rev A.
Submitted by:	David Xu <davidxu@FreeBSD.org>
PR:		kern/54810
2003-08-29 03:27:26 +00:00
Orion Hodson
6f0182bd0c Add Creative EV1938.
Submitted by:	David Xu <davidxu@FreeBSD.org>
PR:		kern/54810
2003-08-29 03:24:08 +00:00
Warner Losh
f8ba3dc6cb Remove unneeded field after CIS changes. 2003-08-29 00:25:50 +00:00
John Baldwin
729d7ffbcf - Rename PCIx_HEADERTYPE* to PCIx_HDRTYPE* so the constants aren't so long.
- Add a new PCIM_HDRTYPE constant for the field in PCIR_HDRTYPE that holds
  the header type.
- Replace several magic numbers with appropriate constants for the header
  type register and a couple of PCI_FUNCMAX.
- Merge to amd64 the fix to the i386 bridge code to skip devices with
  unknown header types.

Requested by:	imp (1, 2)
2003-08-28 21:22:25 +00:00
John Baldwin
86889ca086 Add constants for capability IDs and header types.
Submitted by:	Samy Al Bahra <samy@kerneled.com>
2003-08-28 20:59:31 +00:00
David E. O'Brien
d4aeb0ed01 Add sound support for the AMD64 8111 chip.
PR:		kern/55932
Submitted by:	Mark Kettenis <kettenis@chello.nl>
2003-08-28 19:21:21 +00:00
Nate Lawson
be2b179704 Style and whitespace changes. Also, make the ivar functions non-inline
since inlining failed due to the size of BUS_*
2003-08-28 16:06:30 +00:00
Søren Schmidt
d7e9ef77f8 Be more carefull on nulling the ATAPI magic for fake slave.
Skip polling devices that keeps returning 0xff early (ie no HW there).
2003-08-28 09:15:05 +00:00
Søren Schmidt
07844fe49c Make sure to call start when retrying. 2003-08-28 08:22:53 +00:00
Warner Losh
39c50d587a A number of minor fixes to the mapping of memory. This should help
reading the CIS on some cards.  However, not all just yet.  This makes
at least some of the xircom cards that weren't working to work.  It
doesn't make my home and away card work, however.

o Don't get the card offset wrong.  This is the biggest hassle for
  reading the CIS.  The old code was just so wrong I can't believe that
  it worked at all.
o Don't set the bit that allows/forces 16-bit memory access to the
  memory.  It is hard coded with 0x80.
o Don't need to slow down memory access with wait-states.  OLDCARD didn't
  need them and it doesn't hurt anything.
o remove bogus grousying in comment.
2003-08-28 05:01:11 +00:00
Thomas Quinot
c8fb1af26c Add missing braces. Fixes boot-time kernel panic with ATAng and ATAPI/CAM.
Reviewed by:	roberto
2003-08-28 03:56:04 +00:00
Nate Lawson
b5b965a529 Remove a duplicate comment.
Pointed out by:	bde
2003-08-28 03:54:49 +00:00
Warner Losh
289dc689c6 Fix location of $FreeBSD$ from last commit. 2003-08-27 23:30:01 +00:00
Prafulla Deuskar
3a47a99d78 Add support for new devices.
Bug Fixes:
	- Allow users to use LAA
	- Remember promiscuous mode settings while bridging
	- Allow gratuitous arp's to be sent

PR:		52966/54488
MFC after:	1 week
2003-08-27 21:52:37 +00:00
Søren Schmidt
61f07fc6ca Return the translated result code from ATA/ATAPI commands. 2003-08-27 15:27:56 +00:00
Søren Schmidt
1d68703f6a Hopefully Fix problem with probing some ATAPI devices, while still
trying to avoid the "fake slave" problem.
2003-08-27 11:21:30 +00:00
Martin Blapp
4a80e74bf3 All davicom cards seem to need DC_TX_ALIGN. 2003-08-27 08:13:34 +00:00
Jacques Vidrine
1855be730c Revision 1.126 broke the interface of the bktr driver's
METEORSSIGNAL ioctl.  Applications use this ioctl with the value
METEOR_SIG_MODE_MASK (0xFFFF0000, -65536) to reset signal delivery,
but revision 1.126 caused the driver to return EINVAL in this case.
Interestingly, the same METEORSSIGNAL ioctl in the meteor driver uses
0 to reset signal delivery.

This commit allows METEOR_SIG_MODE_MASK as a synonym for 0 in the
bktr driver, and restructures the code a bit so that it is otherwise
identical between the bktr and meteor drivers.
2003-08-26 16:57:24 +00:00
Nate Lawson
6e433dcdea Use the db_alt_break() state machine instead of rolling our own. This
brings sio(4) in-line with zs(4) et al.
2003-08-26 05:37:48 +00:00
Josef Karthauser
3af4b6b4d7 Implement the last commit properly. 2003-08-25 22:10:52 +00:00
Josef Karthauser
219b479f9f Fix the cdevsw compatibility for -stable. 2003-08-25 22:01:06 +00:00