Commit Graph

72678 Commits

Author SHA1 Message Date
thorpej
9cc521a148 Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
2004-08-20 06:39:37 +00:00
simonb
2fe6a47d97 Add dependancies on assym.h for some assembly files so that
"make -j <bignum>" works without having to do a "make depend" first.
2004-08-20 05:34:47 +00:00
enami
9e4955fd5e Fix compilation error introduced by prevoius commit. 2004-08-20 00:37:07 +00:00
thorpej
2926431abf Use ANSI function decls and "static". 2004-08-19 23:30:09 +00:00
thorpej
1600c8b8cd - Add and use a CHAN_TO_WDC() macro to get the wdc_softc from an
ata_channel.
- Add and use a CHAN_TO_WDC_REGS() macro to get the wdc_regs from an
  ata_channel.
- Add and use a CHAN_TO_PCIIDE() macro to get the pciide_softc from an
  ata_channel.
- Add and use a CHAN_TO_PCHAN() macro to get the pciide_channel from an
  ata_channel.  (This one just hides a cast, and is really just for
  consistency with the others.)
2004-08-19 23:25:35 +00:00
christos
0f7d471853 Factor out the hand-crafting of mbufs from the interface files. Reviewed by
gimpy. XXX: I could have used bpf_mtap2 on some of the new functions, but I
chose not to, because I just wanted to do what amounts to a code move.
2004-08-19 20:58:23 +00:00
christos
396c380971 - ansify
- remove unnecessary casts
- change caddr_t to void *
- no functional change.
2004-08-19 18:33:24 +00:00
thorpej
65193a3b71 Protect against multiple inclusion. 2004-08-19 17:56:57 +00:00
chs
80c0e76172 implement pmap_pvo_reclaim(), which steals an existing non-wired pvo entry
for reuse, and use this in pmap_pvo_enter() when we can't allocate a new one.
2004-08-19 15:31:57 +00:00
drochner
6860e77f9d include <sys/device> explicitely, found by Havard Eidnes 2004-08-19 15:12:36 +00:00
drochner
f2e99ab844 support rescan / manual detach
This code needs cleanup, at least a reasonable linked list
implementation (fixed a bug in detach_card() in the process which
left a dangling pointer around).
Also removed a questionable and undocumented use of the parent's
device unit number as locator value.
(As with the pcmcia code: someone please review wrt powerup/down etc.)
2004-08-19 14:50:52 +00:00
christos
43f6a1ad3b PR/26210: Matthew Mondor: Since revision 1.14 when net-2 was merged,
the code to do receive packet accounting has been disabled for no apparent
reason. Re-enable it.
2004-08-19 12:48:42 +00:00
junyoung
3d45791c36 Rename bootparams to boot_params for consistency. 2004-08-19 10:34:36 +00:00
yamt
bee0b74932 remove a "proc botch" debug printf. ok'ed by Jonathan Stone. 2004-08-18 23:44:47 +00:00
dyoung
c9108ddfc8 Hubert Feyrer points out that hw.ath.countrycode really ought to
be writeable.  Make hw.ath.outdoor writeable while I am here.
2004-08-18 21:59:39 +00:00
tsutsui
efa3e6b66b Remove bogus TABs. (from OpenBSD) 2004-08-18 14:47:25 +00:00
drochner
de8db0c004 also provide an example how a pci driver LKM looks
(This is just a dummy driver which doesn't touch the hardware.)
2004-08-18 14:06:13 +00:00
drochner
b1a9bed356 add an LKM for "wi at pcmcia" as an example for the new MOD_DRV LKM type 2004-08-18 13:12:07 +00:00
drochner
4157766364 add a "drvctl" pseudo-device as userland interface to the autoconf
rescan() and detach() functions
2004-08-18 12:19:29 +00:00
drochner
890158d024 Allow to rescan and detach by user request, using the new autoconf
functions.
For later rescans (eg after a driver LKM was loaded) to make sense,
don't consider it an error if no driver was attached on the initial
bus scan.
Someone who understands the enable/disable/powerup/down stuff please
review this.
2004-08-18 12:01:13 +00:00
drochner
a758a2aba6 allow to detach child devices and (optional selectively) bus rescans,
using the new autoconf functions
2004-08-18 11:54:47 +00:00
drochner
6ea832578d Use the new autoconf functions to rescan busses and detach devices
on user request.
This duplicates the functionality provided by a private ioctl
interface (accessible through scsictl(8)), but in a more generic way.
2004-08-18 11:50:59 +00:00
drochner
c67a72f6ff make PCI devices attachable/detachable (as far as the particular drivers
allow), and allow to rescan a bus selectively (ie only the device/
function I'm looking at)
2004-08-17 23:20:10 +00:00
drochner
d95b59fae8 add a new "DRV" LKM type, and some glue code to make it use the new
autoconf capabilities
2004-08-17 22:38:50 +00:00
drochner
08538dce1b Add some extensions to the autoconf framework to better support
loadable drivers and user controlled attach/detach of devices.
An outline was given in
http://mail-index.NetBSD.org/tech-kern/2004/08/11/0000.html
To cite the relevant parts:
-Add a "child detached" and a "rescan" method (both optional)
 to the device driver. (This is added to the "cfattach" for now
 because this is under the driver writer's control. Logically
 it belongs more to the "cfdriver", but this is automatically
 generated now.)
 The "child detached" is called by the autoconf framework
 during config_detach(), after the child's ca_detach()
 function was called but before the device data structure
 is freed.
 The "rescan" is called explicitely, either after a driver LKM
 was loaded, or on user request (see the "control device" below).
-Add a field to the device instance where the "locators" (in
 terms of the autoconf framework), which describe the actual
 location of the device relatively to the parent bus, can be
 stored. This can be used by the "child detached" function
 for easier bookkeeping (no need to lookup by device instance
 pointer). (An idea for the future is to use this for generation
 of optimized kernel config files - like DEC's "doconfig".)
-Pass the locators tuple describing a device's location to
 various autoconf functions to support the previous. And since
 locators do only make sense in relation to an "interface
 attribute", pass this as well.
-Add helper functions to add/remove supplemental "cfdata"
 arrays. Needed for driver LKMs.

There is some code duplication which will hopefully resolved
when all "submatch"-style functions are changed to accept the
locator argument.
Some more cleanup can take place when config(8) issues more
information about locators, in particular the length and default
values. To be done later.
2004-08-17 22:13:18 +00:00
briggs
4634c8ef35 Get correct cache information for earlier VIA C3 models.
Mostly from PR kern/26689 submitted by Michael van Elst.
2004-08-17 15:27:46 +00:00
scw
ad271535d4 In _bus_dmamap_load_buffer(), honour the maximum segment size specified
when the DMA map was created.

The previous behaviour honoured the maximum segment size only when
coalescing adjacent segments.
2004-08-17 08:35:43 +00:00
itojun
682ddb0274 initialize max_keylen for ip_encap.c earlier 2004-08-17 07:05:34 +00:00
rumble
d15d05328d Add some infrastructure to support HPC-based ethernet adapters
(E++):
 o The static configuration table now identifies by HPC offset.
 o Added sq(4) entries for IP12, IP20, and IP24.
 o Accomodated HPC revision forcing based on kernel config flags.
2004-08-17 00:57:42 +00:00
rumble
38bbaabc37 Add defines for the four possible HPC GIO bus addresses. 2004-08-17 00:48:08 +00:00
rumble
d023bcf042 Implement several changes that get my E++ (HPC1.5 GIO ethernet
adapter) to work on IP24:
 o Force HPC and GIO slot endianness.
 o Allow slots one and two to be masters and configure for
   realtime mode.

Also, while we're here move IP22 invariants into the IP22 case.

I suspect that IP20 will work as well since it exhibited the same
broken DMA that IP24 did before I flipped the master bit.
2004-08-17 00:44:39 +00:00
enami
31c5dbae84 Dereference ch_wdc after filled. 2004-08-16 22:11:13 +00:00
mrg
2db238d57d fix a wrong variable name in a debug message. 2004-08-16 16:43:29 +00:00
mycroft
5111abd827 Simplify some manipulation of PCIC_INTR.
Further attempt to mitigate "bad Vcc" errors.
2004-08-16 15:46:37 +00:00
mycroft
f0b8d692af Some tweaks, per the PC Card spec:
* Assert RESET before powering off a socket.
* Turn on the output enable bit earlier so the interface actually drives CEn
  and RESET.
* Tighten up the power-on timing a bit.
* Mention the specific timing values named in the spec.

For pccbb, be careful to always power off before zeroing PWRCTL.
2004-08-16 15:40:35 +00:00
mycroft
4ff9d12ea9 Do not attempt to fiddle with the power-control bits in PWRCTL; just read them
back after touching the PCI registers.

This shouldn't be necessary, but somehow the controller detects the need for
VPP2=12V and automatically applies it, and gives us a "bad Vcc" error if we
turn it off accidentally.
2004-08-16 14:48:56 +00:00
mycroft
48de8a7bff wdc_init_shadow_regs() must now be called after ch_wdc is filled in, or we get
a null pointer dereference.
2004-08-16 14:47:31 +00:00
mycroft
2070a0c580 Make sure to set IMNT_DTYPE here... 2004-08-16 12:49:55 +00:00
aymeric
7813bbed46 add fake bus_space_read_region_stream_4() and bus_space_write_region_stream_4()
macros to cope with the recent wdc_pcmcia changes
2004-08-16 10:23:43 +00:00
aymeric
990d2462b0 add a missing break in the EXC_MCHK|EXC_USER case in trap() 2004-08-16 10:16:16 +00:00
aymeric
e2de6e57a9 fix typo in comment 2004-08-16 10:12:40 +00:00
aymeric
9ed8629c70 . use ${SYSDIR} instead of relative paths so that tags links in subdirs work
. fix the links: target to work with objdirs
2004-08-16 10:10:46 +00:00
aymeric
66c464814b add a noop settype() method to the pcmcia_chip_functions to cope with the
recent changes in the PCMCIA code.
This is only compile-tested, but should work because we only support IO cards
on the A1200 for now.
2004-08-16 10:07:52 +00:00
dsl
523a1fe90e Define CONSADDR for pcio.c (continuing the same hack use for the other
parameters).
2004-08-15 22:10:50 +00:00
dsl
c1eeebc3dd Allow the com port base address to be specified by the user (via installboot)
rather than taking the value from the bios.
Should allow the system to use a serial console that is also a 'bios serial
console' and isn't in the bios serial port table.
Probably fixes (with a few other changes) PR port-i386/9236
2004-08-15 22:04:45 +00:00
mycroft
84b11bd3be Another piece of FFS_EI flotsam. 2004-08-15 21:53:03 +00:00
mycroft
0d7e3746eb Repair some FFS_EI code for ufsmount changes. 2004-08-15 21:34:14 +00:00
dsl
654308a5be Add a field to hold the io address of an i386 serial console.
Allows a tty that isn't known to the bios to be used.
Extend the keymap to 64 chars - I don't think 16 was enough to be useful.
2004-08-15 21:02:28 +00:00
mycroft
a6f02be621 And the reason we had to call pccbb_power() twice in the enable routine is...
we were writing to PCIC_PWRCTL in between and causing the socket to power off.
D'oh.
2004-08-15 20:19:14 +00:00
atatat
fe2724d030 Remove redundant instantiation of esp_net_deflev sysctl node. Not
sure how this happened, but it didn't harm anything either way.

Addresses PR kern/26672.
2004-08-15 19:10:26 +00:00