Commit graph

10175 commits

Author SHA1 Message Date
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