Commit Graph

3867 Commits

Author SHA1 Message Date
thorpej
f6aaf54d60 Some controllers must have certain bits always be set in the IDEDMA_CMD
register for proper operation.  Add a prototype field in the pciide_channel
for this register and use it as necessary when writing the IDEDMA_CMD
register.
2003-12-19 19:09:20 +00:00
christos
778502d669 More unsigned long casts to make this work on ppc. Fix formatting of debug
statements to 0x when there are hex numbers printed.
2003-12-19 19:00:00 +00:00
christos
0ad7f14d46 PR/23802: KIYOHARA Takashi: Bad printf format with CBB_DEBUG. While I am
there, make all printfs consistent 0x%lx and (unsigned long) cast.
2003-12-19 18:16:43 +00:00
thorpej
f94de27bbd Const poison the channel name. 2003-12-19 05:55:12 +00:00
thorpej
deed3938a2 Move the PCIIDE_OPTIONS_* constants into pciidevar.h 2003-12-19 05:16:57 +00:00
thorpej
07ba04af94 Regen: Add product ID for the Silicon Image 3114 SATALink. 2003-12-19 03:43:07 +00:00
thorpej
d6decc84cb Add product ID for the Silicon Image 3114 SATALink. 2003-12-19 03:41:21 +00:00
thorpej
df5956af24 Use a register map to find the offsets of various per-channel
registers in the BA5 space.
2003-12-19 03:33:52 +00:00
thorpej
376fccb2a5 Add BA5 space tag/handles for Silicon Image SATALink. 2003-12-17 21:08:29 +00:00
tls
0c041019a4 Add support for some more Marvell-based adapters to the sk driver:
D-Link DGE-530T
	Linksys EG1032v2
	Linksys EG1064v2

The Linux driver treats all of these the same.  Tested with a DGE-530T;
it works, though performance on at least one of my systems is atrocious.

Fix setting of ethernet capabilities into interface capabilites word in
attach routine.

Manual page: note that jumbo support doesn't work and checksum support
doesn't exist.
2003-12-17 09:17:07 +00:00
dyoung
59eb8ab913 Synchronize with FreeBSD:
* add constants to enums

 * HAL update: stops panics, fixes ad hoc-mode beacons, some API
   changes

 * get and use mac/phy/rf front-end revision codes

 * add a custom ath(4) ic_node_getrssi callback which does RSSI
   averaging

 * do not immediately scan, but re-associate after missing beacons.

 * bug fix: don't if_init after detach.

 * HAL diagnostics ioctl, SIOCGATHDIAG

 * send DS parameters element in beacons

 * const-ify some pointers

 * consolidate rx-filter settings into ath_calcrxfilter

 * abstract FreeBSD `ticks', NetBSD `hardclock_ticks' with ATH_TICKS()

 * misc. other changes
2003-12-16 06:48:08 +00:00
jmc
43bf89bfc6 Fixes from PR#23177. Various lint/logic fixes:
Fix some non-initialized variables
close the output files when done
Redo the printing for RCS strings so they don't expand in the awk script too
Do proper tests for variables existance before accessing

Verified output from all scripts is identical to original versions
2003-12-15 07:32:20 +00:00
thorpej
1534ca51d1 Remove the notice that was in cmdide.c before SATALink support was split
out.  All of the code in this file was written by me.
2003-12-15 00:37:38 +00:00
thorpej
7fca07b0d8 Use the SControl and SStatus registers to query the SATA PHY for
device detection.
2003-12-15 00:36:23 +00:00
dyoung
ea63a1a6cd PR 23428: support National Datacomm Corporation NCP130A2 board.
Thanks T. M. Pederson for sending the patches.
2003-12-14 10:04:33 +00:00
tsutsui
4bad747a15 Regen: added ATI Radeon 9200SE. 2003-12-14 04:58:15 +00:00
tsutsui
adedc23811 Add ATI Radeon 9200SE. 2003-12-14 04:57:16 +00:00
jonathan
c4e9405150 Do 5704-specific setup of DMA control register for all 5704 variants,
including chips that matched only the asic-revision  fallback table.

When dong DMA setup for 5703 and 5704, use the new BGE_ASICREV() macro
to extract the ASIC revision.
2003-12-14 03:08:12 +00:00
thorpej
2f2ca9e66b Split the Intel i31244 SATA controller ("Artisea") driver out of piixide
into its own driver (artsata).
2003-12-14 01:32:01 +00:00
thorpej
a5f1f3523b Liberally apply "static", and wrap a line. 2003-12-14 00:17:05 +00:00
thorpej
98f7d12017 Split out the Silicon Image SATALink support into its own driver,
"satalink".
2003-12-13 23:13:40 +00:00
briggs
3c06a40b83 Power up the card without OE enabled to avoid letting SanDisks enter
True IDE mode.  Hinted at by Charles Hannum a while back.  This lets
my PCI-Cardbus adapter read SanDisk CF cards much more reliably.

Also bring in a few defines from FreeBSD for some more TI registers and such.
2003-12-10 02:55:48 +00:00
briggs
500fd35ba0 Use aprint_*() 2003-12-09 19:51:39 +00:00
ad
ee5a33f5aa Match Promise controllers. 2003-12-09 19:43:53 +00:00
ad
e4cbd13089 Regen. 2003-12-09 18:58:49 +00:00
ad
237307078f Add second ID for Intel i960 RM. 2003-12-09 18:58:16 +00:00
pooka
34f5b5e378 The highest 16 bits of chipid identify the ASIC, so print only them. 2003-12-09 15:19:33 +00:00
pooka
3c0925818d Match 5703 ASIC A3.
Also, when printing the ASIC ID, print the revision in hex in all
cases to avoid extra confusion if only the "superclass" of the ASIC
is recognized.
2003-12-08 17:09:39 +00:00
pooka
a17096b1a3 regen for broadcom 5703a3 2003-12-08 17:05:27 +00:00
pooka
9747421fda Broadcom 5703 A3 2003-12-08 17:00:48 +00:00
scw
0695d77aa5 Regen 2003-12-08 11:07:27 +00:00
scw
5379b99913 Add an entry for Intersil's Prism-54 (ISL3890) WLAN mini-PCI card. 2003-12-08 11:06:36 +00:00
dyoung
609617af90 Enable RSSI-based rate-adaptation for wi(4). This enables wi(4)-based
APs to run at "full speed" where before they ran at just 1 or 2Mb/s.
The AP will adapt the data rate for each client based on packet
losses and the received signal strength.

I have also enabled rate adaptation for STA mode and for IBSS mode,
but the hardware gives us less control over the data rate in those
modes.
2003-12-07 05:44:49 +00:00
bouyer
464de24c0e Clone artisea_chip_map() for use by the ICH5 SATA controllers.
The 31244 is really different from the ICH5, and one day the map function
could be incompatibles. Suggested by thorpej@
2003-12-06 22:40:03 +00:00
jdolecek
d9c37aa325 regen:
add NetMos NM9805 and NM9815
2003-12-06 11:20:55 +00:00
jdolecek
89d301d92d add NetMos NM9805 and NM9815 2003-12-06 11:19:17 +00:00
jdolecek
d8065a9e15 add entry for another NetMos card - NetMos NM9815 Dual 1284 Printer port 2003-12-06 11:18:08 +00:00
itohy
315a88c214 Back out the following commit and apply the real fix.
A variable was actually used in a wrong way.

> revision 1.20
> date: 2003/10/25 21:31:43;  author: christos;  state: Exp;  lines: +3 -3
> Fix uninitialized variable warnings.
2003-12-06 09:32:22 +00:00
bouyer
b42d959140 Add support for the Intel 82801ER Serial ATA/Raid Controller.
From Simas Mockevicius on current-users@.
2003-12-05 23:12:41 +00:00
cube
d8aa4bc899 Remove bitbang code that was taken from FreeBSD to support recent SiS
chipsets and use mii_bitbang interface instead.  Reflect sip dependency in
the config file.

Support for SiS96x needs broader testing.
2003-12-05 22:34:44 +00:00
grant
0a49c48fe4 remove some extraneous \'s to shut up warning from gawk. 2003-12-05 04:33:27 +00:00
grant
a586448d86 regen 2003-12-05 04:28:47 +00:00
grant
efde88a60f add Adaptec AAR-1210SA Serial ATA RAID controller. 2003-12-05 04:28:04 +00:00
keihan
b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
thorpej
c0ddd8220b Bump the Tx DMA segment count to 40. Apparently, it's common to have
DMA segment counts in this ballpark when using jumbo frames (so says
the "ti" driver).
2003-12-04 06:57:37 +00:00
thorpej
ca75be9eb7 When performing command pass-through for management tools, don't poll
for CCB completion.  Instead, sleep, and use a CCB callback to wake the
sleeper.
2003-12-04 05:46:47 +00:00
cube
a00292cf94 o Add support for accessing the PHY through MDIO for recent SiS chips
o Add support for the recent SiS96x chipsets that have a new revision.
  That includes a new bit of code to access the EEPROM, since it is
  shared with the ieee1394 controller on those chipsets.

Mostly taken from FreeBSD (rev. 1.62 and 1.64 of sys/pci/if_sip.c).  I
tried to make the code look less ugly, but couldn't invent documentation.

Fix PR #23481.  Thanks to Stephane ENGEL <sengel AT melshake DOT com> for
the report and the cheerful testing.
2003-12-03 21:58:49 +00:00
briggs
a4f6bad750 Configure PCI-Cardbus bridges, too.
Patch from KIYOHARA Takashi on current-users.
2003-12-02 16:31:06 +00:00
bouyer
0041177a45 Use a different interrupt routine for the CSB6. The CSB6 doens't
assert IDEDMA_CTL_INTR for non-DMA commands.
It would be nice to have a way to know if the interrupt was for us or not at
this point, but for now let wdcintr() deal with it.
Problem reported and patch tested by Martti Kuparinen.
2003-12-02 12:20:06 +00:00
chs
669d2bb92c add support for HPT302 and HPT371. simplify timing selection.
adapted from OpenBSD.  tested on an HPT302, review by bouyer@.
2003-11-28 20:08:29 +00:00
chs
3bf428ce23 regen 2003-11-28 20:05:14 +00:00
chs
9bff23d0a5 add Tandem ServerNet II and various HPT IDE controllers. 2003-11-28 20:04:16 +00:00
cube
c5529ef807 Add support for the 3com OfficeConnect 10/100B card, which has an ADMtek
AN985 controller, handled by tlp(4).

From Mike M. Volokhov <mishka AT terabyte DOT com DOT ua> in
current-users.
2003-11-28 06:03:09 +00:00
cube
5146829d44 Regen. 2003-11-28 06:00:16 +00:00
cube
5c88862075 Add 3c910 OfficeConnect 10/100B Ethernet. 2003-11-28 05:59:41 +00:00
fvdl
6242a54566 There are some cards that map the ATA control and IDE DMA registers
in a different fashion. Individually, they have the same functionality,
but their layout is different. An example of such a chipset is
the Promise 203xx.

To be able to deal with this, transform the cmd and dma bus_space handles
into an array of handles, each seperately created with bus_space_subregion.
The code generated by using the extra indirection shouldn't change much,
since the extra indirection is negated by having the offset calculation
already done in bus_space_subregion. E.g.

	bus_space_write_4(tag, handle, offset, value)

becomes

	bus_space_write_4(tag, handles[offset], 0, value)

Reviewed by Manuel Bouyer. Tested on wdc_isa, wdc_pcmcia, viaide, piixide (i386)
and on cmdide (sparc64).
2003-11-27 23:02:40 +00:00
matt
0c6481e8c4 Regen. 2003-11-26 18:47:16 +00:00
matt
b0e13d0fdc Add pcHDTV HD-2000 HDTV video capture card. 2003-11-26 18:44:16 +00:00
tsutsui
1508a7290a Call bus_space_{read,write}_1() directly to access ncr53c9x common registers. 2003-11-23 04:34:26 +00:00
fvdl
370056a0f6 Use the redefined Promise product ids. 2003-11-22 20:57:18 +00:00
fvdl
e7fcb7da4d Regenerate after rearranging the Promise ids. 2003-11-22 20:56:53 +00:00
fvdl
ac92051a0b Clean up the Promise IDE controller defines. 2003-11-22 20:54:01 +00:00
itohy
1b7b873248 - Correctly handle bit 24 of miscellaneous control register, which has
different meanings for read and write.
  This fixes 48kHz playback to SPDIF.
- Fix the problem where the SPDIF output voltage setting (0.5V, 5V)
  was swapped.  The default value is changed from 0.5V to 5V, which
  correctly selects 5V (so the default physical behavior is unchanged).

Should fix PRs kern/16047 and kern/16817
(but not tested since I don't have other SPDIF hardware to test with).
Approved by tshiozak.
2003-11-22 16:48:14 +00:00
kent
f9ae2a22c1 For ICH4/ICH5, use native BARs instead of compatible BARs.
The patch was provided by Lars Heidieker.
2003-11-22 08:49:41 +00:00
thorpej
f6c3c3450e Add a missing i82541 ID to the table. 2003-11-22 08:32:12 +00:00
briggs
3a312a4033 Use aprint_* instead of printf. 2003-11-18 21:40:13 +00:00
tsutsui
da9776152f Misc cleanup:
- tweak some attach messages
- establish interrupt after all dma resouces are successfully allocated
- wrap an assertion with #ifdef DIAGNOSTIC
- assume NCRCFG2_FE bit is always enabled
- call bus_dmamap_sync for mdldmap at POSTWRITE for consistency
- pass proper dmamapsize for mdldmap
2003-11-16 18:31:45 +00:00
dyoung
23d8f48692 Add data-link type DLT_IEEE802_11_RADIO to wi and atw. DLT_IEEE802_11_RADIO
lets you monitor radio stats like received signal strength, which
diversity antenna was used, channel/frequency, modulation, and data
rate.
2003-11-16 09:02:42 +00:00
jonathan
3638f1686a Support symmetric crypto ops, including AES, on hifn 7955 and 7956.
Not tested on 795[56],  but compiles and matches FreeBSD-tested diffs.

Suggested by Sam Leffler <sam@errno.com>, as imported into FreeBSD by Sam.
Submitted to FreeBSD by Rajesh Vaidyanath <RVaidyanath@hifn.com>.
2003-11-16 00:22:09 +00:00
bouyer
5741c101e5 Clear interrupts at end of attach, in case there is one pending.
Avoid "bogus intr" messages when interrupts are enabled later.
Patch tested by myself and Chuck Silvers.
2003-11-15 16:40:46 +00:00
jmcneill
1708376e44 Don't set VR_EECSR_LOAD before reading the MAC address on the VT6102 either. 2003-11-14 22:33:29 +00:00
scw
c86e508708 On Rhine III, don't set VR_EECSR_LOAD before reading the MAC address.
This reloads the entire EEPROM, not just the MAC address, which can
cause problems for the host PCI bus under certain circumstances. The
chip already loads the EEPROM at powerup/reset anyway.

XXX: This probably applies to the other Rhine variants too, but I don't
have a data sheet to confirm this behaviour.
2003-11-13 22:29:09 +00:00
chs
e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
fvdl
9d4e217e09 From FreeBSD:
* erratum: disable the nocrc RX bit, as it may cause problems on the 570{1-4}.
  adjust the length of the incoming packet accordingly to trim it.
* the 5704 has a smaller MBUF_POOL, so set a smaller value

Local change:
* Pass the autoneg force flag to mii_attach. Some PHYs need to be kicked
  out of their falsely autoneged 10baseT state with this.
2003-11-11 22:28:58 +00:00
thorpej
9a0c12a504 Correct the size passed to a malloc() call when performing command
passthrough for userland management tools.
2003-11-10 15:35:39 +00:00
wiz
ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
enami
063c7653e3 Sync with sys/dev/pci/pcidevs change (ProductID 0x0213 was renamed
to CSB6_RAID from CSB6_IDE).  And exclude the device of RAID subclass
(i.e., match IDE subclass only).
2003-11-07 10:44:42 +00:00
thorpej
32ddb3f486 Fix brain'o in PCIX speed detection. kern/23375 (John R. Shannon). 2003-11-07 06:03:52 +00:00
mycroft
2ef56c13e8 Force the codec into a known state before trying to determine its speed. 2003-11-06 07:13:33 +00:00
fvdl
aad37eaff6 Apparently, Dell PERC 4/Di controllers can have two memory BARs, with the
second one empty. The previous revision made it pick the empty one.
Reinstate the BAR size check.
2003-11-05 16:03:27 +00:00
thorpej
73fea8467b Enable i82541 and i82547 chips - it works well enough to get broader
testing.  Update the TODO list.
2003-11-04 19:09:39 +00:00
mycroft
94d9caaae4 Re-add ServerWorks IDE support, as "rccide". Note: this is untested, as I no
longer have a ServerWorks-based motherboard.
2003-11-04 16:57:57 +00:00
cube
78677ac649 Regen. 2003-11-03 15:58:48 +00:00
cube
bda71e9e81 Add some IDs for the EPIA-M 10000 motherboard. 2003-11-03 15:57:46 +00:00
ichiro
8b115395c7 Fix uninitialized variable warnings 2003-11-03 03:05:25 +00:00
wiz
218b6186ff deferred, not deffered. Inspired by Tom Cosgrove. 2003-11-02 10:50:40 +00:00
wiz
d88f7b1d62 boundary, not boundry. Inspired by Tom Cosgrove. 2003-11-02 10:31:06 +00:00
kent
26aa3703e4 auich_calibrate():
- make the buffer longer to improve the precision of measurement
 - round off the result to the nearest multiple of 1000.
2003-10-31 08:15:53 +00:00
nisimura
51cdfee682 Added stpcide(4) driver for STMicroelectronics STPC IDE controllers. 2003-10-31 06:49:58 +00:00
kent
d96125aa86 For ICH4/ICH5, set IOSE flag to make them compatible to old ICHs. 2003-10-30 19:33:51 +00:00
kent
c88bf03d33 For ICH4/ICH5, set IOSE flag to make them compatible to old ICHs. 2003-10-30 19:30:26 +00:00
hannken
c0818405f1 Complete last commit: Remove assigned-to but otherwise unused variable. 2003-10-30 10:02:16 +00:00
briggs
3c59c821ae Make sure we can transmit larger packets correctly.
Don't initialize extra fields of the ifp.
Use strcpy() instead of bcopy() for copying the device name.
Handle if_timer a bit better.
2003-10-30 04:11:36 +00:00
simonb
b6abb6ab1d Remove some assigned-to but otherwise unused variables. 2003-10-30 01:58:17 +00:00
mycroft
6e4d40343c Don't bother with one of the loops if the data to move is too narrow. 2003-10-29 04:43:18 +00:00
mycroft
75061b28a8 Calculate lastx and lastleft outside the loops... 2003-10-29 04:40:17 +00:00
mycroft
cb4f7a1d86 Bogus initializers suck. 2003-10-29 03:46:10 +00:00
mycroft
5ef2e1b264 Fix the real cause of the uninitialized warning -- we were looking for the VLAN
tag in the wrong place!
2003-10-29 03:31:22 +00:00
mycroft
035a25dd52 Simplify a little. 2003-10-29 02:33:51 +00:00
mycroft
1f63a53cea Rework to remove bogus initializers. Also fixes a potential problem with
amr_teardown() unmapping too much.
2003-10-29 02:27:32 +00:00
mycroft
e4bad7fff5 Rework slightly to remove bogus initializer. 2003-10-29 01:54:24 +00:00
mycroft
39c696c2e6 Remove unnecessary code. 2003-10-28 23:56:00 +00:00
mycroft
c976b0b592 Eliminate bogus initializer (the code was technically wrong). 2003-10-28 22:56:19 +00:00
pooka
f18fbee457 fix uninitialized uses caught by gcc 2003-10-28 17:01:19 +00:00
thorpej
db71356cd1 - Change callout_setfunc() to require that the callout handle is already
initialized.  Update the txp(4) to compensate.
- Statically initialize the TCP timer callout handles in the tcpcb
  template.  We still use callout_setfunc(), but that call is now much
  less expensive.  Add a comment that the compiler is likely to unroll
  the loop (so don't sweat that it's there).
2003-10-27 16:52:01 +00:00
chs
3b6d3c710c uninitialized variables 2003-10-27 07:07:34 +00:00
fvdl
e645b8b032 Add definitions for 8139C+ and 8169 chips. Not used yet. From FreeBSD. 2003-10-25 23:48:45 +00:00
christos
b132a6334c Fix uninitialized variable warnings. 2003-10-25 21:31:43 +00:00
christos
9350ac9046 return not break. 2003-10-25 21:31:20 +00:00
christos
5945f04b69 Fix completely bogus printf that used uninitialized variables. 2003-10-25 21:30:47 +00:00
christos
125ccd91b1 Fix uninitialized variable warnings 2003-10-25 18:29:12 +00:00
chs
7d1b5d21fd regen 2003-10-25 16:22:25 +00:00
chs
897a586840 add some misc cards I've got. 2003-10-25 16:21:31 +00:00
chs
0e9360f160 NULL -> 0 2003-10-25 16:15:07 +00:00
tsutsui
6c2bb73613 Add support for Acard ATP865/A Ultra100 IDE Controllers. From Tsubai Masanari. 2003-10-24 15:50:02 +00:00
tsutsui
723afbe9db Remove trailing whitespace. 2003-10-24 15:47:49 +00:00
kent
cc9f31d5b2 auich_reset_codec:
wait for readiness of one of all codecs.
2003-10-24 04:06:44 +00:00
mycroft
a480189bf8 Remove IDE_PCI_CLASS_OVERRIDE -- it wasn't actually used anywhere. In lieu of
it, add a class/subclass check to drivers that do not (appear) to have a unique
ID for the IDE controller.  This includes aceride, cypide and optiide.
2003-10-24 00:24:15 +00:00
fvdl
d85a7f8656 Need the NOCRC bit, or my 5704B5 will start acting up. 2003-10-23 20:36:36 +00:00
bouyer
e0f02bb281 If we found a compat channel disabled, unmap the registers. There may be
an ISA IDE adapter at the same address.
2003-10-23 19:29:35 +00:00
fvdl
4df6c69646 * match more cards (from FreeBSD)
* don't set the NOCRC bit in the mode control register, it can cause
  problems on some chips (from the broadcom errata via FreeBSD)
* implement a fallback quirktable that is searched only using the
  major asic revision, so that the driver has a shot at supporting
  newer versions properly without modification
* rename asicrev -> chipid, like the FreeBSD driver
2003-10-23 17:41:59 +00:00
kent
5286b24afb Change the short names of nForce:
nForce-MCP -> nForce
 nForce-MCP-T -> nForce2
 nForce-MCP-T -> nForce3

Use snprintf() and strlcpy() instead of sprintf() and strcpy().
2003-10-23 17:14:54 +00:00
kent
3afd3b3671 - remove unused code
- print diagnostic messages if the primary codec does not get ready in
auich_reset_codec().
2003-10-23 17:05:26 +00:00
fvdl
142de57c80 Regen. 2003-10-23 16:02:09 +00:00
fvdl
ef2ab367bd Add a few more broadcom 57xx ids. From FreeBSD. 2003-10-23 15:54:13 +00:00
fvdl
b4c1912d80 * match the nForce3 controller
* search the whole current PCI bus for the VIA bridge, can't rely on
  it to be function 0 of the same device
2003-10-23 14:27:09 +00:00
ragge
c4690aa593 Set snd queue size to max(WM_IFQUEUELEN, IFQ_MAXLEN), instead of hard to
WM_IFQUEUELEN.
2003-10-23 12:53:02 +00:00
kent
27d4af4355 No need to check the codec ready flag in read_codec() and write_codec().
According to the ICH datasheets, the flag is unchanged unless resetting
the codec.

The flag is useless after enabling bus mastering.  This behavior is common
to all ICH chips.  The quirk handling code is removed.
2003-10-23 05:25:29 +00:00
briggs
193b74f006 Regenerate for ENE Cardbus product IDs. 2003-10-23 00:47:45 +00:00
briggs
cdb1c2e5bf Add some ENE Cardbus bridges from FreeBSD. 2003-10-23 00:46:56 +00:00
briggs
3448998b43 Try to deal better with card removal during the card enabling process. 2003-10-23 00:04:03 +00:00
manu
8beb6e32ae Patch from http://mail-index.netbsd.org/current-users/2003/09/04/0018.html
to fix problems with a sound card
2003-10-22 15:57:33 +00:00
thorpej
0f781c4abb Add support for the SPI EEPROM found on the newer i82541 and i82547
chips.  Add the i82541 and i82547 product IDs to the table, #if 0'd
out, for now (there are still more changes to come for these new chips
to work properly).
2003-10-22 15:50:39 +00:00
fvdl
91371415b1 Match the Promise FastTrak 378. 2003-10-22 11:32:40 +00:00
fvdl
ba07312903 Match the nForce3 AC-97 chip. 2003-10-22 11:32:12 +00:00
fvdl
653fb67506 Regen. 2003-10-22 11:31:18 +00:00
fvdl
5b7cf69d6e Add:
* an id for the Promise FastTrak 378
	* several ids for NVidia nForce3 devices
2003-10-22 11:30: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
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
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
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
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
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
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
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
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
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
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
itojun
5f3342505f $NetBSD$ 2003-10-15 23:24:36 +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
simonb
20178cc3db Fix obvious typos in a call to pci_mapreg_map(). 2003-10-15 06:32:35 +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
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
ad
1e3b781fed Make this work with the newer 'Quartz' controllers. 2003-10-13 20:35:53 +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
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
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
tsutsui
0a43b29b75 - Update technical manual's URL.
- Remove __P().
- Remove trailing whitespace.
2003-10-12 04:12:23 +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
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
7bff47db67 Set some termination defaults correctly. Test register access like
in the original FreeBSD driver.
2003-10-10 12:58:38 +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
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
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
dyoung
c3139592cc Initial import of ath(4) from FreeBSD. 2003-10-07 05:27:17 +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
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
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
martin
1483742f8a Fix typo (DP83020 -> DP83820) from HITOSHI Osada in PR kern/23023. 2003-09-30 21:21:34 +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
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
wiz
37ac1db454 available, not avaliable. From miod@openbsd. 2003-09-29 09:50:21 +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
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
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
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
matt
4c294aa149 Add DELL Perc 4/di (from Freebsd). 2003-09-26 16:31:08 +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
mycroft
eefae40298 Hide the use of config_interrupts() in one place. 2003-09-25 19:29:48 +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
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
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
f9d629fb93 Fix more probe delay and/or failure problems:
1) Don't wait for DRQ on an IDENTIFY command -- if it's not set when we see
   BSY clear, abort the command and ignore the drive.  (Do this by testing
   for DRQ in the read/write cases in __wdccommand_intr().)
2) Don't wait for DRQ to deassert when we finish an IDENTIFY (or any other
   non-block command that reads data) -- we don't do this for block I/O, and
   empirically it doesn't clear on my CF cards at all, causing a pointless 1s
   delay.
3) Add comments to some of the delay()s, and add missing ones in wdcreset()
   and the WDCC_RECAL in the so-called "pre-ATA" probe.
4) Slightly simplify the reset sequence -- we were doing an extra I/O.
5) Modify the register writability test to make sure that registers are not
   overlapped -- this can happen in some weird cases with a missing device 1.
6) Check the error register value after the reset -- if it's not 01h or 81h,
   as appropriate (see ATA spec), punt.
Tested with a number of ATA-only, ATAPI-only, mixed ATA-ATAPI, CF, and IDE
disk configurations.

Also remove the SINGLE_DRIVE nonsense again.
2003-09-23 09:19:22 +00:00
mycroft
07da406c30 GC a structure element. 2003-09-23 09:11:43 +00:00
thorpej
ddfcdc4f1f Add support for dynamically attaching and detaching RAID array units. 2003-09-22 18:31:10 +00:00
thorpej
2f8976d430 Add TWEIO_{ADD,DEL}_UNIT ioctls (used by 3ware management tools). From
FreeBSD.
2003-09-22 01:44:57 +00:00
thorpej
b2b05806b3 Add a few additional control bits and opcodes. From FreeBSD. 2003-09-22 01:28:25 +00:00
thorpej
0448a55234 Improve AEN handling:
- Make AENs use the generic code table stuff.
- Add a few more AEN codes (from FreeBSD).
- Correct the context of a few AEN codes (some were listed as
  "unit context" when they're really "port context").
- Add a queue of AENs that management tools in userspace can poll
  (from FreeBSD).
2003-09-22 01:13:02 +00:00
thorpej
4431e5d2ea Fetch info about the drives during attach, and inject that info
into the msgbuf using aprint_verbose().
2003-09-21 19:46:44 +00:00
thorpej
a721d80bc9 Report the status of the logical drive (normal, degraded, etc.) at
attach time.
2003-09-21 19:33:10 +00:00
thorpej
21809f0c30 Expose the "param get" functions. 2003-09-21 19:27:27 +00:00
thorpej
291d256789 - Record more information about the array unit, including array
type and stripe depth.
- Report array type and stripe depth when attaching the logical drive.
2003-09-21 19:20:18 +00:00
thorpej
4cf2e784e2 Add some helper routines to fetch 1, 2, and 4 byte parameter values.
Modeled after code in FreeBSD.
2003-09-21 19:01:05 +00:00
thorpej
6c5904f215 Add some additional code -> description tables, and add a generic
routine to translate code -> description.  AENs will be converted
to this mechanism in a future commit.

Partially from FreeBSD.
2003-09-21 18:35:31 +00:00
nisimura
1e9ce6571c Regen. 2003-09-21 14:27:40 +00:00
nisimura
cfb11c4317 Redo, again. 2003-09-21 14:23:21 +00:00
nisimura
7fef26674d Redo the previous fix. 2003-09-21 14:12:09 +00:00
bouyer
0ca58f3790 Ops, remove a line that escaped out of my local tree. 2003-09-21 11:30:43 +00:00
bouyer
9f91a8476e The return value from pciide_mapregs_* are ignored; make them return void.
Re-add support for HPT366 in compat mode.
2003-09-21 11:20:37 +00:00
bouyer
c6beeca692 Since we can't detect ghost drives in the wdc back-end, resurect
WDC_CAPABILITY_SINGLE_DRIVE.
2003-09-21 11:14:00 +00:00
nisimura
e17ee1fa3b Regen to fix the company name. 2003-09-21 07:59:04 +00:00