Commit Graph

16091 Commits

Author SHA1 Message Date
fvdl
5b7cf69d6e Add:
* an id for the Promise FastTrak 378
	* several ids for NVidia nForce3 devices
2003-10-22 11:30:52 +00:00
mjl
e959b27d7f Typo in comment. From OpenBSD. 2003-10-22 09:04:39 +00:00
mjl
088da88a56 Typos in comments. From OpenBSD. 2003-10-22 09:02:49 +00:00
agc
df214f1879 Don't use NULL when an integer is needed. 2003-10-22 08:58:38 +00:00
briggs
1e810e3178 Since we enable the pcmcia function on attach, disable it on the detach. 2003-10-22 07:48:25 +00:00
briggs
40823fb6bb Maintain reference count properly for nested enables/disables. 2003-10-22 07:46:48 +00:00
augustss
6d60d8ab89 Re-add the quirks that force certain In-System Design adapters to appear
as (non-standard) ATA over BBB adapters.  Without these quirks they are
not regocnized by the umass driver.
2003-10-22 05:38:16 +00:00
mycroft
98fb62de25 Add a code that appeared in a PR recently. 2003-10-22 00:35:41 +00:00
christos
55222ec4a6 Regen 2003-10-22 00:18:32 +00:00
christos
c1ce37728d Remove backslash for new gawk 2003-10-22 00:17:39 +00:00
christos
ddccf85c50 support for NE2000_TYPE_AX88790 from
Yong-Jhen Hong yongjhen at alqualonde dot org
2003-10-22 00:12:36 +00:00
tsutsui
680fc37c3b Remove declarations of constab[] and *cn_tab. They are in <dev/cons.h>. 2003-10-21 17:03:52 +00:00
thorpej
3e560e2b48 Add a TODO list item. 2003-10-21 16:52:08 +00:00
thorpej
c50f2ac573 - Move the i82540EM (LOM) along with the other i82540 product IDs.
- Match the i82545GM (1000BASE-T and 1000BASE-X) and i82546GB
  (1000BASE-T and 1000BASE-X) product IDs.
2003-10-21 16:51:17 +00:00
thorpej
a866babe44 If we're on PCI-X, look up the PCI-X capability. Verify that the
max memory read byte count in the command register is <= the max designed
memory read byte count in the status register.  If not, reset it to the
status register's value.  This is necessary because some BIOSes configure
the wrong value, and the wrong value confused some versions of the PCI-X
capable chips.
2003-10-21 16:41:51 +00:00
thorpej
fa32a2cf94 - Since we access PCI config space as 32-bit words, redefine the PCI-X
command register bits offset and shifted appropriatly (PCI-X command
  makes up the upper 16 bits of the register that holds the PCI-X cap ID
  and next-cap-pointer).
- Define shift counts for max memory read byte count in the command
  and status registers.
2003-10-21 16:22:48 +00:00
tsutsui
281b9dfec6 vaddr_t is not pointer, so don't compare it against NULL. 2003-10-21 16:17:18 +00:00
simonb
45cf1137ea Remove break after return. 2003-10-21 06:22:46 +00:00
simonb
7feb1a91fa Remove return after panic(). 2003-10-21 06:22:16 +00:00
thorpej
abc7f80ca5 - Map I/O space on chips that support it. While it is not used for
normal operation, it is required to implement a bug work-around on
  some chips.
- When issuing a reset on the i82544, i82540, i82545, i82546,
  and i82541, use I/O space, if available, to work around a problem
  with the memory write cycle (problem only occurs when issuing
  a reset).
2003-10-21 05:45:11 +00:00
thorpej
f44ddf324f Fix a typo. 2003-10-21 05:07:10 +00:00
thorpej
0143773bbc Add some additional register definitions needed for newer chips:
- Control register shadow
- SPI EEPROM stuff
2003-10-21 04:39:32 +00:00
thorpej
2cadb9ce85 Record characteristics of the bus connection at attach time. 2003-10-21 04:35:01 +00:00
fvdl
ce7e811d1d And the wise man said: An u_int32_t is not a pointer, my young apprentice,
so thou shalt not compare it to NULL.
2003-10-21 03:24:25 +00:00
fvdl
c9aca9f010 Don't pass NULL as an integer value. 2003-10-21 03:22:25 +00:00
fvdl
5e8b006a17 Add missing field initializer. 2003-10-21 01:12:42 +00:00
yamt
65995a9aa2 don't swap powerhook and shutdownhook. 2003-10-21 01:00:57 +00:00
fvdl
5f1e7fa5f8 Correct NULL abuse. 2003-10-21 00:57:47 +00:00
uwe
62c7814709 Add missing NetBSD/hpcsh devices. 2003-10-21 00:33:12 +00:00
fvdl
86c363960e Correct NULL abuse. 2003-10-21 00:25:59 +00:00
fvdl
2a11316bc0 Correct NULL abuse. 2003-10-21 00:22:04 +00:00
thorpej
e2d086d69d - Do better error checking on EEPROM access.
- Let the EEPROM wire-protocol handler perform the loop.
2003-10-20 22:52:19 +00:00
thorpej
12c5273afa Move all the code that handles the MicroWire EEPROM protocol into
a separate function.
2003-10-20 16:28:23 +00:00
briggs
1ce6ced119 As suggested by Jason Thorpe, rename m41t to m41trtc. 2003-10-20 16:24:10 +00:00
thorpej
fedb07bc8d Fix a typo in the "failed to acquire eeprom" case. 2003-10-20 15:34:25 +00:00
thorpej
0ebc93fe43 Move the code that reads a series of bits from the EEPROM into a
separate function.
2003-10-20 15:33:48 +00:00
thorpej
17aaa92402 Make all of the functions in this file static. 2003-10-20 06:00:26 +00:00
thorpej
10926a6056 Factor out the code that sends bits to the EEPROM into a separate function. 2003-10-20 05:56:17 +00:00
thorpej
f5fc41219d Move the code that handle the EEPROM handshake into separate functions. 2003-10-20 05:40:03 +00:00
dyoung
ab4a574ce1 Don't take the 802.11 header off of a frame until after we've given
it to the driver's BPF tap.
2003-10-19 22:00:54 +00:00
bouyer
0ca33bf011 Better late than never, add the chip-specific PCI ide controllers. 2003-10-19 15:41:23 +00:00
ragge
9cbcd57e32 Add lcspx. 2003-10-19 15:04:08 +00:00
tsutsui
8d36037f37 Utilize bus_dma(9) functions more efficiently.
pcscp(4) is the first device driver I wrote about five years ago,
but I still have to learn about bus_dma(9) implementation...
2003-10-19 10:25:42 +00:00
scw
175f717bf5 Be more careful about validating the user-specified geometry, otherwise
it's too easy to specify a geometry which will cause a divide by zero
elsewhere in the disklabel code.
2003-10-19 07:41:19 +00:00
matt
3642aa4ccc Add PCN_NO_PROM flag. (read the macaddr from the chip assuming the "BIOS"
has properly written it).  From John Gordon.
2003-10-19 03:32:25 +00:00
simonb
9833c17169 Remove some unreachable code with the comment "To shut up compiler"
that neither gcc 2.95.3 or 3.3.1 complains about if that bit of code
is missing...
2003-10-19 01:49:03 +00:00
simonb
59fb31d7cc Remove unreachable break after return and goto statements. 2003-10-19 01:44:48 +00:00
cdi
492c11116f Revert previous change as it breaks the build on a number of ports. 2003-10-18 21:26:22 +00:00
matt
3109d133ea Regen. 2003-10-18 18:53:09 +00:00
matt
0d7c37b872 Add Philips SAA7146AH 2003-10-18 18:51:29 +00:00
enami
e7533e9811 Don't limit xfer size to SBP2_MAXPHYS. Its not transfer size limit
but just a threshold how to describe transfer.
2003-10-18 12:47:28 +00:00
enami
145fb5989c Factor out common code. 2003-10-18 12:40:09 +00:00
enami
3072a86cf0 Whitespace nits. 2003-10-18 12:31:37 +00:00
ragge
895d584f93 Add cnmagic support to the DZ driver. Pmax should also use cnmagic instead
of it's homwgrown tests.
2003-10-18 12:10:53 +00:00
manu
15af059557 On some machines, the keyboard is not enabled after a reset, rendering the
console useless. Fix that by explicitely enabling the keyboard when it is
attached.
2003-10-18 09:19:04 +00:00
tsutsui
fd5c63296f Fix some attach messages for new ahc(4). 2003-10-18 07:44:51 +00:00
wiz
810d184699 Fix typo in comment. 2003-10-18 07:41:26 +00:00
simonb
78c2103e34 Remove assigned-to but otherwise unused variables.
Remove unreachable break after return statements.
2003-10-18 04:50:35 +00:00
lukem
6ba1832265 regen for more ServerWorks devices 2003-10-18 01:33:16 +00:00
lukem
f1b836d0c9 Remove http://members.hyperlink.net.au/~chart/pci.htm link; it doesn't
exist anymore.

Add some more ServerWorks devices
2003-10-18 01:32:30 +00:00
thorpej
b0bced8029 Store the number of EEPROM address bits in the softc. 2003-10-17 21:12:48 +00:00
thorpej
2d858d3912 Add internal representation for i82545 rev 3, i82546 rev3, i82541,
i82541 rev 2, i82547, and i82547 rev 2.
2003-10-17 20:57:32 +00:00
thorpej
e3ca7c2c73 Make the "align tweak" factor per-interface (since the MTU is per-interface). 2003-10-17 20:41:21 +00:00
cdi
61da4642b8 Introduce null console. This pseudo device acts as a normal console with the
exception that it discards any output, and is useful for booting the kernel
on headless boxes.
2003-10-17 20:27:38 +00:00
cdi
2b3e81f067 Introduce null console. This pseudo device acts as a normal console with the
exception that it discards any output, and is useful for booting the kernel
on headless boxes.
2003-10-17 18:16:42 +00:00
tsutsui
f7772c7c77 - No need to set VR_TXCTL_TLINK in vr_start() because all TX buffers have
only single segment.
- No need to set VR_CMD_TX_ON in vr_start().
- Initialize BCR0 and BCR1 registers.
- Change RX DMA threshold 128bytes.

Mostly from FreeBSD via OpenBSD.
2003-10-17 17:42:35 +00:00
mycroft
568ccf202d Add a comment explaining the INQUIRE behavior. 2003-10-17 16:44:48 +00:00
tsutsui
631fad8686 Misc cosmetics. 2003-10-17 16:39:09 +00:00
tsutsui
0a3ddecb47 Use common PCI macro/functions for PWRMGMT. 2003-10-17 16:00:43 +00:00
lukem
0b441623fe Add user flag CCDF_NOLABEL to prevent the on-disk label from being read
during CCDIOCSET.
Use this when creating a new ccd to ignore any existing disklabel
which is probably wrong.
2003-10-17 05:16:15 +00:00
dyoung
5dca575ce1 ieee80211_newstate() wants for ic->ic_state to equal the previous
state, so do not update ic->ic_state in wi_newstate() before calling
ieee80211_newstate(). Instead, update ic->ic_state when we do not
let ieee80211_newstate() run.
2003-10-17 03:58:23 +00:00
mycroft
e879d3a728 PQUIRK_NOSENSE is dead here. Remove the code supporting it. 2003-10-17 00:20:28 +00:00
mycroft
f8a10571e5 Remove the Fuji quirk from here, too. 2003-10-17 00:19:46 +00:00
mycroft
3fd37812f4 The Yano quirk was intended to do FORCE_SHORT_INQUIRY. Not that that's gone,
we shouldn't need this any more, so nuke it.
2003-10-17 00:12:58 +00:00
mycroft
ecb8d5d482 Set the REQUEST SENSE command length to 12 for ATAPI, too. (UFI and ATAPI are
really the same...)

Fixes problems with Sony Vaio memory stick slots, which advertise themselves as
"ATAPI over CBI".

Remove the quirk for Fuji cameras, since this is almost certainly the same bug.
2003-10-16 23:39:40 +00:00
mycroft
055625357d Whoops, set cmd_length correctly for the 36-byte INQUIRE. 2003-10-16 22:46:07 +00:00
mycroft
19ef8301a7 Switch back to UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO in a few cases. Not that
it really matters, but UMATCH_VENDOR_PRODUCT effectively overrides the class
code, and that is not supposed to be part of the "quirk".
2003-10-16 20:01:06 +00:00
mycroft
f8c8ef3b63 Document the Olympus, ScanLogic and Sony "quirks" better. Also, the ScanLogic
correctly reports itself as SCSI -- it is *not* UFI.
2003-10-16 19:54:01 +00:00
mycroft
0f1275cee2 Do a 36-byte SCSI 2 inquiry first, and iff that returns an additional length
>32 do a 74-byte inquiry.  Fixes problems with devices that barf on longer
inquiries.  (Linux uses 36 bytes almost everywhere, as a data point.)
2003-10-16 17:34:43 +00:00
dyoung
d531221c67 Prepare for wi rate adaptation. Add wi_write_txrate, which only
writes a hardware register when the data rate selection actually
changes. Add wi_cfg_txrate, which writes the data rate selection
regardless.

Name some fields in the wi Tx buffer which we will use for rate
adaptation.

Name the Prism "Alternate Retry Count" RID, WI_RID_ALT_RETRY_COUNT.
2003-10-16 10:57:35 +00:00
dyoung
50daf0a217 The upper & lower bounds on wi RSSI are completely bogus, AFAICT. 2003-10-16 10:38:07 +00:00
dyoung
7c0b454d52 Cosmetic change: shorten 6 lines to 2. 2003-10-16 10:04:14 +00:00
dyoung
1ff3c191c9 Fix WEP transmission, too. From FreeBSD/Sam Leffler. 2003-10-16 09:31:08 +00:00
dyoung
bcde77e394 ath(4) failed to detect when the number of DMA segments exceeded
the number of descriptors, because of a disparity between the
bus_dmamap_load_mbuf implementation in FreeBSD and NetBSD. Now I
cover up the difference using ath_dmamap_load_mbuf.

Thanks Enami Tsugutomo for diagnosing this.
2003-10-16 09:13:30 +00:00
wiz
68f5a56945 regen 2003-10-16 08:05:54 +00:00
wiz
7127923ca9 According to Linux USB Ids list, 0b7a belongs to zeevo, inc. 2003-10-16 08:05:42 +00:00
ichiro
581dfca276 add {shutdownhook,powerhook}disestablish() 2003-10-16 07:55:18 +00:00
pk
f845a339ac Enable VLAN encapsulation. 2003-10-16 07:20:54 +00:00
mycroft
d7b6d72e8c Deal with the damn DiskOnKey devices. See the comment for an explanation. 2003-10-16 00:36:46 +00:00
itojun
5f3342505f $NetBSD$ 2003-10-15 23:24:36 +00:00
itojun
a4a1466cb5 add $NetBSD$ 2003-10-15 23:23:39 +00:00
enami
73473f6883 Return 0 on SIOC{ADD,DEL}MULTI. 2003-10-15 22:41:22 +00:00
itojun
d587f445de s/printf/DPRINTF/ for ath_rate_ctl() 2003-10-15 22:19:31 +00:00
itojun
ea0e5abff9 translate pci device ID until HAL gets updated. suggested by sam leffler 2003-10-15 20:33:30 +00:00
itojun
5f3b1ef5ad regen 2003-10-15 20:31:52 +00:00
itojun
809ac79214 add Atheros product IDs from athhal_devid.h 2003-10-15 20:31:38 +00:00
bouyer
70b50b0608 Make sure chp->atabus is initialised, and wakeup the right address when
shutting down the kernel thread.
2003-10-15 20:29:26 +00:00
bouyer
ea6912c52d - don't ignore last bit when checking for floating bus value on slave
device; some ATAPI devices as master will report 0x7f in all registers
  for slave before reset
- For the same reason, remove the er1 check.
Makes slave device with a "strange" ATAPI master probe again.
Problem reported and fix tested by Gary Duzan on current-users.
2003-10-15 20:26:33 +00:00
bouyer
3d6919754d Clear chp->ch_drive[i].drive_flags if we didn't find a driver for the
drive.
2003-10-15 19:54:30 +00:00
dyoung
e86c830f2a Fix WEP reception. 2003-10-15 11:40:07 +00:00
hannken
a3a898ff0f Add the gating of system calls that cause modifications to the underlying
file system.
The function vfs_write_suspend stops all new write operations to a file
system, allows any file system modifying system calls already in progress
to complete, then sync's the file system to disk and returns. The
function vfs_write_resume allows the suspended write operations to
complete.

From FreeBSD with slight modifications.

Approved by: Frank van der Linden <fvdl@netbsd.org>
2003-10-15 11:28:59 +00:00
rjs
9f105a9400 Regen. 2003-10-15 11:11:55 +00:00
rjs
41929af1e0 Add more IDs. 2003-10-15 11:10:45 +00:00
tron
d8c9e38848 Fix build error caused by last change. 2003-10-15 08:28:29 +00:00
simonb
662c7128cd Re-order a little so that there's no unreachable code in this block. 2003-10-15 07:18:17 +00:00
simonb
9606d846fa Don't check an uninitialsed error variable before printing an error
message.
2003-10-15 06:43:36 +00:00
simonb
20178cc3db Fix obvious typos in a call to pci_mapreg_map(). 2003-10-15 06:32:35 +00:00
enami
8823a8da9a Port multicast handling to NetBSD. Addresses PR23151. 2003-10-15 03:04:03 +00:00
briggs
f2f02bc9da Make sure descriptors get bus_dmamap_sync()ed.
Restructure a little to make this a little easier.
Also try to avoid allocating things at reset time.
2003-10-15 02:18:52 +00:00
grog
b95a3b2e71 Change definitions to compile correctly without VINUMDEBUG flag.
Reported by:  hubertf

Remove $FreeBSD$ ID string.
2003-10-15 01:31:39 +00:00
dyoung
f2a9708c75 Do not index arrays using enum constants, since enums can be
re-ordered and extended. Instead, use a switch-statement or a
key->value table with appropriate bounds-checking.
2003-10-14 23:13:44 +00:00
ichiro
f4f7b1ae5c add support ath on cardbus
- implement power management
2003-10-14 17:47:03 +00:00
ichiro
6fc4a5549a regen 2003-10-14 17:44:09 +00:00
ichiro
5e3d3508b6 add ATHEROS AR5001 WirelessLAN 802.11a/b/g CardBus 2003-10-14 17:43:55 +00:00
wiz
09d05922dc Fix mixer wraparound. Closes PR 16652.
Patch from Sergey Svishchev. mycroft says "looks ok".
2003-10-14 13:12:19 +00:00
martti
fd34f3d937 Added another Dell PERC 4/Di 2003-10-14 11:33:36 +00:00
martti
a027ea5f33 Regen: Dell PERC 4/Di 2003-10-14 11:32:19 +00:00
martti
f4ae717ace Added another Dell Perc 4/DI 2003-10-14 11:30:36 +00:00
augustss
359109cff2 Regen. 2003-10-13 22:34:32 +00:00
augustss
6c07c4466a Another Logitech camera. 2003-10-13 22:34:10 +00:00
ad
1e3b781fed Make this work with the newer 'Quartz' controllers. 2003-10-13 20:35:53 +00:00
augustss
32ee02b1f9 Regen. 2003-10-13 17:16:55 +00:00
augustss
c88ef72c1d Add some IOMEGA products. 2003-10-13 17:15:03 +00:00
dyoung
031c2c9baa Why don't I make up my mind? No need to left-shift the country
codes when I right-shift the country-code register! Fixes a bug
reported by Dan Carosone: regulatory domain "ETSI" registered as
domain "Spain/Other", so he could only tune channels 10 and 11.
2003-10-13 16:35:49 +00:00
dyoung
2295b27590 Install athioctl.h, defining ioctls for Atheros 802.11a/b/g radios. 2003-10-13 08:29:48 +00:00
dyoung
372fd2b92a Adapt atw(4) to the new 802.11 layer.
Simplify atw_start, atw_newstate.

Synchronize access to atw_start by bracketing the call to
ieee80211_next_scan in atw_next_scan with splnet()/splx().
2003-10-13 08:22:19 +00:00
dyoung
e31cc884ed Adapt awi(4) to the new 802.11 layer. 2003-10-13 08:10:48 +00:00
dyoung
ef743c64b6 Switch wi(4) to the new 802.11 layer. 2003-10-13 08:07:21 +00:00
dyoung
2459b02669 Switch an(4) to using the header files in the new 802.11 layer. 2003-10-13 06:45:32 +00:00
dyoung
5dbbaac41d Switch to the new 802.11 layer. 2003-10-13 06:43:22 +00:00
dyoung
a71225fe22 NetBSD/FreeBSD compatibility changes NetBSD, especially
locking, mbuf
2003-10-13 05:34:30 +00:00
dyoung
ae577fc6ea Miscellaneous changes for NetBSD compatibility. 2003-10-13 05:23:07 +00:00
dyoung
b495f27bbd A compatibility layer to smooth differences between NetBSD and
FreeBSD for ath(4).

XXX    Nobody with FreeBSD has signed off on this, so it may change
XXX    or go away entirely.
2003-10-13 05:16:20 +00:00
dyoung
839bd8fd2a Files belonging to the ath(4) PCI front-end.
We can only attach an ath(4) on architectures where we have a HAL
(which is only x86, for now) so I list the files belonging to the
PCI front-end separately from the other PCI files.
2003-10-13 05:10:00 +00:00
dyoung
dd46f240f9 ath(4) PCI front-end for NetBSD, heavily modified from FreeBSD's.
Substantially influenced by the patch from Bruce J.A. Nourish.
2003-10-13 04:36:29 +00:00
dyoung
f9d6bac599 dev/scsipi/atapi_disk.h is no more, and umass_scsipi.c compiles
fine w/o it.
2003-10-13 01:47:55 +00:00
enami
3dbf40b29d KNF the previous commit. 2003-10-13 00:05:36 +00:00
enami
b3931d341e Rest of PR23128, so that ehci.c compiles again. 2003-10-13 00:05:10 +00:00
bouyer
c298ea9fc9 Remove block that has been pasted twice. Pointed out by Alexander Yurchenko. 2003-10-12 19:28:50 +00:00
mycroft
ba41e2e19b Fix problems with ehci on controllers that support 64-bit addressing. From
Cliff Wright, PR 23128.  Thanks!
2003-10-12 18:04:28 +00:00
bouyer
ac8278da8c Remove this file; ATAPI_READ_FORMAT_CAPACITIES is the same as
READ_FORMAT_CAPACITIES; atapi_flex_geometry_page should probably be the same as
scsi_disk's page_flex_geometry.
2003-10-12 17:57:13 +00:00
tsutsui
0a43b29b75 - Update technical manual's URL.
- Remove __P().
- Remove trailing whitespace.
2003-10-12 04:12:23 +00:00
thorpej
6fc3c06df3 Revert previous change. 2003-10-12 03:21:56 +00:00
thorpej
36e9866d7b Cosmetic changes:
- Use static to unexport symbols that don't need to be exported.
- ANSI'ify.
- Some whitespace nits.
2003-10-11 17:40:15 +00:00
wiz
d231b1cffc regen (Acer BT-500 Bluetooth USB Adapter). 2003-10-11 12:13:00 +00:00
wiz
5da5ca0dde Add IDs for Acer BT-500 Bluetooth USB Adapter. 2003-10-11 12:11:13 +00:00
toshii
6bd45c6229 Fix a done list handling bug which exhibits under high shared interrupt
rate and bus traffic.  As the interrupt register is read after checking
hcca_done_head, there was a small chance of dropping a done list.
Ignore OHCI_WDH interrupt bit if hcca_done_head is zero so that OHCI_WDH
is processed later.
2003-10-11 03:04:26 +00:00
jdolecek
f3e4bcccdc move MI majors config file from sys/dev/majors to sys/conf/majors 2003-10-10 21:26:38 +00:00
agc
7c96060a24 Correct a spelling mistake twice.
XXX This file should be in src/sys/conf.
2003-10-10 21:05:32 +00:00
matt
2f05a561da Remove a quirk I added for a Hitachi drive. 2003-10-10 18:04:46 +00:00
fvdl
56534a0352 Add a missing chip reset in attach. Makes things work for an on-board
7902B on a SuperMicro board.
2003-10-10 15:20:30 +00:00
thorpej
ece7894356 Regen: Add several more Intel Gig-E product IDs. 2003-10-10 15:20:17 +00:00
thorpej
88dde45df2 Add several more Intel Gig-E product IDs. 2003-10-10 15:19:01 +00:00
fvdl
7a26a8b8f5 Don't zap the lower 16 bits of the command/status register when clear
error bits.
2003-10-10 15:15:44 +00:00
briggs
85edb66218 Properly clear any latched errors before re-enabling SERR/PERR for PCI-X
in ahd_reset().
2003-10-10 15:02:08 +00:00
fvdl
7bff47db67 Set some termination defaults correctly. Test register access like
in the original FreeBSD driver.
2003-10-10 12:58:38 +00:00
grog
17709f5057 Include Vinum. 2003-10-10 06:13:02 +00:00
thorpej
c490cdc5be Warn if a sync period requiring DT was negotiated on a peripheral not
capable of DT.
2003-10-10 05:58:56 +00:00
thorpej
15bb1be91b Fix some errors in device mapping and errata work-arounds, and generally
clean up mapping code.
2003-10-10 05:57:26 +00:00
grog
d88f6bbaeb Initial import of Vinum kernel module.
Ported by:  Ramsubramanyam <Ramsubramanyam@infosys.com>,
	    Atul Kabra <Atul_Kabra@infosys.com>,
	    Maneesh Jhinger <maneesh_jhinger@infosys.com>

Reviewed by:  lukem
2003-10-10 03:07:27 +00:00
bouyer
0ea3fa883e Remove the check for WAIT+POLL+READ case in __wdccommand_start(),
this case is already handled in __wdccommand_intr().
Pointed out by Charles M. Hannum.
2003-10-09 18:40:19 +00:00
fvdl
4c16901a4e Don't treat a 66-100Mhz PCI-X bus as plain PCI. From yamt (the code was
already like this in the FreeBSD driver).
2003-10-09 14:26:54 +00:00
jonathan
b85e76da79 Regen from pcidevs rev 1.581 with Hifn 7954/5 and 7956. 2003-10-08 21:17:27 +00:00
jonathan
ceefe38507 Add Hifn 7954/7955 and 7956. Put adjacent to the very similar hifn 7951.
From Rajesh Vaidyanath <RVaidyanath@hifn.com>, as submitted to FreeBSD.
2003-10-08 21:15:33 +00:00
bouyer
7719e83c8b Following Matt Thomas's request, rename ata attribute to ata_hl, and
wdc_base to ata. We can now have
atabus* at ata?
in kernel config files.
2003-10-08 20:57:59 +00:00
pk
ded7383371 In isp_fc_worker() reduce the timeout value used to poll for the link
status from 10 seconds to 250 milli seconds for the second and subsequent
attempts to determine the link status. This prevents unnecessary long
stalls after the device attach routines have completed.

Tested on a dual port QLogic 3212.  Approved by mjacob@feral.com.
2003-10-08 19:51:01 +00:00
fvdl
61834e8959 Cap the transfer size at MAXPHYS, the driver won't get bigger requests
than that. Allocating 16M per SCB is silly (as pointed out by
Frederick Bruckman).
2003-10-08 17:38:31 +00:00
bouyer
9d02ccdbdf Split pciide in per-chip family driver, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0007.html
We now have:
acardide*       at pci? dev ? function ?        # Acard IDE controllers
aceride*        at pci? dev ? function ?        # Acer Lab IDE controllers
cmdide*         at pci? dev ? function ?        # CMD tech IDE controllers
cypide*         at pci? dev ? function ?        # Cypress IDE controllers
hptide*         at pci? dev ? function ?        # Triones/HighPoint IDE controllers
optiide*        at pci? dev ? function ?        # Opti IDE controllers
piixide*        at pci? dev ? function ?        # Intel IDE controllers
pdcide*         at pci? dev ? function ?        # Promise IDE controllers
siside*         at pci? dev ? function ?        # SiS IDE controllers
slide*          at pci? dev ? function ?        # Symphony Labs IDE controllers
viaide*         at pci? dev ? function ?        # VIA/AMD/Nvidia IDE controllers
pciide*         at pci? dev ? function ? flags 0x0000   # GENERIC pciide driver

serverworks driver not commited yet; there are still copyright issues about
it.
2003-10-08 11:51:59 +00:00
bouyer
99d6009c2a Make the ATA mid-layer appears as atabus, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0006.html
This adds a device (atabus) between IDE controllers and wd or atapibus, to
have each ATA channel show up in the device tree. Later there will be atabus
devices in /dev, so that we can do IOCTL on them.
Each atabus has its own kernel thread, to handle operations that needs polling,
e.g. reset and others.

Device probing on each bus it defered to the atabus thread creation.
This allows to do the reset and basic device probes in parallel, which reduce
boot time on systems with several pciide controllers.
2003-10-08 10:58:12 +00:00
mycroft
32856df936 We really don't need to do 2 resets in wdc_channel_attach() -- the one done
by wdcprobe() is enough.
2003-10-08 08:47:58 +00:00
fvdl
f4f3bc1663 OR in ahc->sc_dmaflags when passed to bus_dmamap_create() in ahc_alloc_scbs(),
in order to pass _ISADMA_32BIT if needed. Should fix SCB allocation
failure for 2842 VL cards.
2003-10-07 19:11:13 +00:00
martin
9e16642238 Adapt to recent PRI changes. 2003-10-07 19:02:36 +00:00
dyoung
c3139592cc Initial import of ath(4) from FreeBSD. 2003-10-07 05:27:17 +00:00
bouyer
3e1a342dd1 Revert to polling for ata_get_params() in wdc_channel_attach().
When probing a nonexistent slave, we may timeout waiting for an interrupt.
In __wdccommand_start(), for polled data in commands, abort quickly if
status still read 0 after 400ns (for a nonexistant slave, the
command will either be aborted, or the status register will report 0; for
a real device we should have BSY, DRQ or ERR).
Thanks to Alexander Yurchenko for reporting the problem and testing the
fix.
2003-10-06 21:51:31 +00:00
shige
cd5706bccd Add xrtc device for XICOR X1226 RTC. 2003-10-06 18:02:54 +00:00
shige
a6e367af69 Add XICOR X1226 RTC driver. 2003-10-06 18:02:02 +00:00
bouyer
7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
tsutsui
9869f97b24 Increase number of transmit/receive buffers from 10 to 32 to avoid
RX buffer overrun.
2003-10-05 14:57:14 +00:00
tsutsui
d008eb86c9 Pass proper dma mapsize of TX/RX mbufs to bus_dmamap_sync().
Now tl(4) works on sgimips.
2003-10-05 14:50:09 +00:00
tsutsui
cf2571bd30 Oops, more white space nit. 2003-10-05 14:44:55 +00:00
tsutsui
e7b57317b8 TAB/space nits. 2003-10-05 14:42:45 +00:00
jdolecek
e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
dyoung
865b1e786b For memory-mapped access, get the endianness right on big-endian
hosts.  This makes awi work marginally better (although it's still
broken) on my Powerbook.
2003-10-04 22:04:36 +00:00
augustss
1c24ba42ab Several changes:
* Implement read for ulpt.
 * If the device is not opened for reading, occasionally drain any
   data the printer might have (but don't hammer the printer with reads).
 * Lower the buffer size to one page.
The driver seems to work with more printers now.
2003-10-04 21:19:50 +00:00
tsutsui
b8ecd4c7a4 Regen from tcdevs rev 1.18:
>- Move PMAGB-BA and PMAG-JA (which I have) out of "may be incorrect" entries.
>- Put driver name "tfb" for PMAG-JA (which will appear in future pmax-wscons).
2003-10-04 16:17:16 +00:00
tsutsui
6865a39a35 - Move PMAGB-BA and PMAG-JA (which I have) out of "may be incorrect" entries.
- Put driver name "tfb" for PMAG-JA (which will appear in future pmax-wscons).
2003-10-04 16:15:00 +00:00
pooka
dae7af8b24 Ready the kernel side of i4b for primary rate interface support by
removing assumptions that there are only two B channels and by
adding support for a varying number of channels.

Due to this, rename previously used isdn identified "bri" to "isdnif",
which better describes the current situation.
2003-10-03 16:38:44 +00:00
dsl
23069255ce Make 'minor(dev) == 1' a device that isn't affected by TIOCCONS.
For /dev/constty so that you can grab kernel messages when logged in
on the 'console'.
2003-10-03 13:15:52 +00:00
augustss
99ebb5ba5a Add more printers that report bidir mode, but can't handle it. From Linux. 2003-10-02 19:10:37 +00:00
augustss
301ab7ace1 Regen. 2003-10-02 19:09:53 +00:00
augustss
e45171e5c1 Add more printers (from Linux). 2003-10-02 19:09:28 +00:00
augustss
7838ca0944 Regen. 2003-10-02 18:34:35 +00:00
augustss
3d6bbf42ca Add HP Deskjet 6127. 2003-10-02 18:34:12 +00:00
christos
7e494b3ce8 Add a Quirk for my Appro, where it does not find all its busses in ACPI 2003-10-02 16:05:33 +00:00
mycroft
aeeaf47b01 Cleanup:
* auich_calibrate() assumes that the AC97 part is in its reset state.  To
  ensure this, call audio_attach_mi() after auich_calibrate().
* Explicitly support 12000Hz and 24000Hz.  (Why is there a discrete list at
  all?)
* Fix an obvious recording bug -- we were acking the wrong interrupt.
* Ensure that we don't get an interrupt during the AC97 speed probe by clearing
  the "interrupt on completion" bit in the DMA setup.
2003-10-02 07:41:53 +00:00
mycroft
fc3c7930e6 A bit of cleanup:
* Separate the code to set the default parameters into a new function,
  audio_set_defaults().  Make it use audiosetinfo(), which properly initializes
  the block size and whatnot.  Use this in both audioattach() and the
  /dev/audio case of audio_open().
* Do not force a reinitialization when /dev/sound is opened.
* Do all of the block size sanity checks in auto_init_ringbuffer(), not in
  both audio_calc_blksize() and audiosetinfo().
* Fix a bug in audiosetinfo() that caused the block size to not be recalculated
  immediately if we set it to 0.
* For AUDIO_GET[IO]OFFS, modify the deltablks calculation so that it gives us
  the number of block boundaries crossed.
2003-10-02 07:15:20 +00:00
fvdl
7baac02537 Reenable negotiation by default for discovery commands, until I figure out
what the issue is.
2003-10-01 18:01:06 +00:00
itojun
c6eceb7a58 avoid out-of-bounds memory access (array size out of sync). found by
openbsd 'bound' attribute.
2003-10-01 08:07:39 +00:00
martin
1483742f8a Fix typo (DP83020 -> DP83820) from HITOSHI Osada in PR kern/23023. 2003-09-30 21:21:34 +00:00
briggs
701f5ff4ba Make sure that we don't blow away the enables in ahd_reset() on PCI-X. 2003-09-30 12:34:16 +00:00
tron
9340e9d695 Fix build problem caused by integration of new I2C framework. 2003-09-30 09:35:15 +00:00
thorpej
2652188cc4 New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc.  Primarily written by Steve Woodford,
with some modification by me.
2003-09-30 00:35:30 +00:00
grant
d2b2b89242 typo in comment 2003-09-29 23:31:04 +00:00
augustss
1aa1d2f8e2 The umass attach can fail in many ways. Print a message about why it
failed instead of just being silent about it.
2003-09-29 20:04:25 +00:00
scw
5b05921978 Copy our pci_chipset_tag_t into wi_pci_softc instead of a pointer
to pci_attach_args. The latter is allocated on the stack during auto-
configuration and so will not be valid after that time.

It's amazing how the old code worked for so long. I guess pci_attach_args
is allocated deep in pid#0's kernel stack on most platforms.
2003-09-29 14:10:35 +00:00
augustss
95b435b7b3 Update URLs. From PR 23004. 2003-09-29 11:54:26 +00:00
wiz
37ac1db454 available, not avaliable. From miod@openbsd. 2003-09-29 09:50:21 +00:00
jdolecek
c82b56d651 constify a little 2003-09-29 03:22:58 +00:00
mrg
0aad2d6101 - convert to new aprint*() autoconfig print mechanism
- clean up some magic numbers
- make 1.6 friendly
2003-09-29 01:53:02 +00:00
cube
e57b040603 Change the way of setting a port value so that a change too small to
fit in the number of bits used for the port still does something.

This fixes PR pkg/18741 for ac97-based hardware. Other audio drivers
might need a similar fix.
2003-09-28 22:24:09 +00:00
kent
1bea39944d codec id for AD1985 2003-09-28 15:39:09 +00:00
kent
0eb86c3701 Support for 4ch/6ch audio playback. 2003-09-28 13:37:19 +00:00
jdolecek
6c6463370e add entry for Lava Quattro-PCI (4 port serial)
contributed in PR kern/22977 by Heison Chak
2003-09-28 07:22:01 +00:00
jdolecek
330360f6a6 regen: ROLAND MIDI devices and Piengineering Xkeys entry 2003-09-28 07:15:47 +00:00
jdolecek
eb3ff4c555 add usbdevs entries and umidi quirks for Roland USB MIDI devices
contributed in PR kern/18096 by Clemens Ladisch
2003-09-28 07:14:56 +00:00
jdolecek
b2122d6d98 add Piengineering Xkeys 58 entry, from kern/20838 2003-09-28 06:55:57 +00:00
mrg
52b4a4af1d from Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>:
- if_bcereg.h should only have register definitions, so declarations
  of softc structure etc. should be in if_bce.c.
- The types of DMA descriptors should be u_int32_t, not unsigned long.
- netinet headers are not required here.
- Values passed via bce_tx_ring should also be byte-swapped.
- byte-swapping is not needed for bus_space access.

from me:
- KNF
- mark all magic numbers with /* MAGIC */ so they can be identified at
  some point.  there are 33 in total though many appear to be the same
  value, or related (eg, the 6 emac points.)

leaves these issues:
- RX pre-packet headers need to be byte-swapped or not?
- PAGE_SIZE bytes are allocated for both TX and RX DMA ring descriptors,
  but they should be 1024 (== sizeof(struct bce_dma_slot) * N[TR]XDESC).
- the mcast filter.
2003-09-28 01:03:07 +00:00
tsutsui
2fe24b8c7f Use strlcpy() rather than strncpy() + `\0' termination. 2003-09-27 17:42:11 +00:00
mycroft
c82b47f9bc Fix a non-fatal race condition. 2003-09-27 15:56:03 +00:00
mrg
871eae696e add new driver for broadcom BCM4401 chipset (as seen on recent dell
laptops) written by Cliff Wright <cliff@snipe444.org> and tested by
yours truly.

XXX: missing mcast filter support.

thanks cliff!
2003-09-27 13:13:28 +00:00
tls
d0ffab287c Remove NOSETTLE flag from channel in FibreChannel case. It makes sense that
it should be there, but in practice, on some systems an ugly race condition
rears its head: SCSI commands are issued before the FC thread ever runs, and
fail from then on forever.  Yuck.
2003-09-27 03:43:08 +00:00
wiz
db579612f4 Definition, not defintion. From miod@openbsd. 2003-09-26 22:25:21 +00:00
tsutsui
b299c2186f Remove casts and use %x in printf for tc_offset_t,
which is int32_t on both alpha and pmax.
2003-09-26 17:17:47 +00:00
matt
4c294aa149 Add DELL Perc 4/di (from Freebsd). 2003-09-26 16:31:08 +00:00
simonb
5c54e29374 Cast through (void *) to appease gcc3. 2003-09-26 16:02:24 +00:00
mycroft
c7d415bac1 Fix off-by-one problem in array size. 2003-09-26 16:00:12 +00:00
matt
d685af4b25 Regen. 2003-09-26 07:47:14 +00:00
matt
90bc204d53 Add Dell Perc 4/DI 2003-09-26 07:45:15 +00:00
thorpej
a398d77171 Confirmed; don't need to query stripe size on TwinStor. 2003-09-26 03:11:41 +00:00
thorpej
abcd16ecc6 Fix up the TWEIO_COMMAND code to actually work. The 3ware management API
library can now communicate with the card.
2003-09-25 22:26:40 +00:00
christos
7da4d27c12 imake this compile again. 2003-09-25 21:55:49 +00:00
mycroft
eefae40298 Hide the use of config_interrupts() in one place. 2003-09-25 19:29:48 +00:00
mycroft
864b96269c Modify the fdcattach() interface again, splitting it into two parts, so that
DRQ allocation is done earlier.
2003-09-25 19:06:19 +00:00
thorpej
1e3cfaaadc Install twereg.h and tweio.h 2003-09-25 18:05:53 +00:00
thorpej
70b9bb88c1 - Protect against multiple inclusion.
- Pull in <dev/pci/twereg.h> ourselves, as well.
2003-09-25 18:05:40 +00:00
joda
709b6b0e89 regen 2003-09-25 16:49:03 +00:00
joda
074d64615d more nvidia devices 2003-09-25 16:47:54 +00:00
pooka
2ef487b6bc autoconf goop for iavc 2003-09-25 15:58:14 +00:00
pooka
a99f02d0ee Add a driver for the CAPI-compliant AVM B1/T1 cards.
The driver backend is capable of supporting also ISA cards (no DMA)
and primary rate (PRI) cards in addition to the basic rate ones,
but I don't any to test on right now, so we don't support those
currently.

This code was originally written by Juha-Matti Liukkonen <jml@cubical.fi>
of Cubical Solutions Ltd. for FreeBSD, and was ported to NetBSD by
myself for the same company.
2003-09-25 15:53:26 +00:00
bouyer
703c60f5c6 Don't print modes we are using if we don't know which modes are really used. 2003-09-25 09:38:09 +00:00
thorpej
4fa7c2c48b - Fix a bug I introduced in a previous commit (oops).
- Add the twe_drivecommand ioctl structure.
2003-09-25 01:35:25 +00:00
mycroft
3d7395ab71 Update for new attach method. 2003-09-25 01:12:43 +00:00
mycroft
516d857707 Do fd probing after interrupts are enabled, and use tsleep() for delays.
Also try to accept a recalibrate interrupt to terminate the delay -- but that
doesn't seem to work reliably, so do a 2s timeout as well.
2003-09-25 01:05:06 +00:00
thorpej
544359b9a2 - Make CCB allocation slightly more efficient by changing how the
CCB is returned to the caller.
- Make code paths that can use twe_ccb_alloc_wait() use it, and assert
  that a CCB is always returned from that function.
- Assert that a CCB is always returned when allocating the reserved CCB
  for an AEN fetch.
2003-09-23 23:50:04 +00:00
thorpej
765ddabe83 Add a comment clarifying why we clear TWEF_AEN in twe_reset() now. 2003-09-23 23:10:53 +00:00
thorpej
1cad401c12 Separate the AEN fetching path into its own special path that uses the
reserved CCB.  This means that all remaining callers of twe_param_get*()
are called from a valid thread context, and thus have no need to use a
reserved CCB.  This will allow for further cleanup in a future commit.
2003-09-23 23:08:54 +00:00
mycroft
ab223e99bc Allow a device to reject CLEAR_FEATURE ENDPOINT_STALL (with a STALL) -- the
assumption being that the device will never use a STALL of a non-control pipe,
I guess.
2003-09-23 21:44:42 +00:00
mycroft
df8e298ddb Small changes -- if your controller clears DRV_BUSY when recalibrate completes,
you get lucky and the probe is faster.  A more complete fix will require making
the probe use interrupts, since there is no reliable way to poll.
2003-09-23 21:36:07 +00:00
martin
d505bdda83 Fix rx buffer size bitmask, do not explicitly set burst length and use 1536
bytes buffers, so this driver can finally cope with full size ethernet
packets. From Peter Bex.
2003-09-23 19:37:39 +00:00
bouyer
5a2aac1c7c Fix a typo that prevented pre-ata drives from working since 1999. 2003-09-23 16:27:10 +00:00