Commit Graph

1691 Commits

Author SHA1 Message Date
jdolecek 592dfdc76b Prepare for MCA attachment:
* split off sharable stuff to dev/ic/ate_subr.[ch], move ate(4) device
  definition to conf/files
* cosmetic: attach with ate_isa
2001-03-31 00:26:53 +00:00
martin 5171d409a5 First step to cleanup the hardware driver <-> upper layers interface.
This now provides slightly more functionality than the FreeBSD layer1-newbus
interface. It was meant to be a simple change to one header and a few
c files, but the change rippled all through various stuff.

To prevent a change to the kernel<->userland interface right now the kernel
is now lying about card types to userland (but who cares). This will be fixed
when the userland interface changes, after layer 3 <-> layer 4 has been
fixed.

Functional changes:

Provide a clean interface for hardware drivers to attach to the upper
layers. This will need another small change in the B-channel handling
when a similar change to the layer 3 <-> layer 4 interface happens.

Avoid passing indices into global arrays of pointers around, instead pass
the pointers itself. Don't code hardware driver types by predefined magic
numbers (think LKM). Prepare for detachable drivers (think pcmcia).

While there remove some sets of function pointers always pointing to the
same function (meant to be the configurable set of D channel protocol
handlers). It is unlikely another supported D-channel protocol will fit into
that (maximal layer interface) abstraction. When we get support for another
protocol, we will need to come up with a workable interface. Besides, the
old implementation was, uhm, strange.
2001-03-24 12:40:29 +00:00
briggs 70f969e600 if_wereg.h is no longer here. 2001-03-23 23:14:32 +00:00
jdolecek c3ba22cf5f Forgot this one:
if_we.c was split and ISA-specific part is now in if_we_isa.c,
we(4) device is defined in conf/files.
2001-03-23 19:41:34 +00:00
jdolecek 6d79f8ce1e Split we(4) driver to bus independant and ISA-specific parts, in preparation
for MCA attachment.
2001-03-23 17:34:41 +00:00
is b1e3063f0b Move tx chain result handling into iystart(). This way, ww normally only
need an interupt when the hardware hits tx chain end. We switch on one
int per packet sent when we fill up and go into OACTIVE mode.
Measured total interupt savings on large NFS writes: 20%.
2001-03-23 13:15:27 +00:00
is fe9376e508 Oops. We _do_ need to receive broadcasts. At least as long as we want ARP. 2001-03-22 14:30:47 +00:00
leo 395516e7aa Some minor, atari only, changes to make this work on the Milan:
- Adjust for the driver to be configured as fdisa
  - Add a for the atari correct fd_types array
  - Work around the fact that the atari has no machine/conf.h
2001-03-16 21:33:33 +00:00
is a4dce1a3f4 Don't need to use the hash filter for a single individual address; make
sure concurrent receive processing is disabled.
2001-03-16 13:43:31 +00:00
is 929c6ab654 Don't abort chain processing on error. 2001-03-16 13:02:51 +00:00
is 89adf47818 Full documentation helps. Among other bugs, remove off-by-one-error when
initializing tx upper limit register.
2001-03-16 12:01:30 +00:00
is 4925cee33b It's one more if the max. coll. bit is set. 2001-03-15 13:27:31 +00:00
is 56ae0825ba Thats collisions, not errors! 2001-03-15 13:23:23 +00:00
takemura a38c751d80 Add configration flag 0x02 to set WDC_CAPABILITY_SINGLE_DRIVE. 2001-03-11 05:10:58 +00:00
jdolecek 9d66d7180b add 'why' argument to the channel attention hook function; this argument
is similar to the one passed to hwreset hook function
2001-03-10 20:04:30 +00:00
thorpej 3062ec75d6 pckbc_isa.c should only be compiled when pckbc at isa is configured. 2001-03-02 22:53:20 +00:00
lukem 3aeb5f2f29 whitespace police 2001-02-24 01:59:46 +00:00
minoura 8353ca15cc Reset the mixer when resume from suspend.
This is required on some laptops with a buggy APM BIOS.
Code from Inoue Yoshinari <pf5y-inue@asahi-net.or.jp>.
2001-02-22 15:23:31 +00:00
jdolecek 522f569810 make some more constant arrays 'const' 2001-02-21 21:39:52 +00:00
martin f0d6660cf4 Filename cleanup: remove i4b_ prefixes outside sys/netisdn, last round.
Renamed in sys/dev/ic:
i4b_hscx.c -> hscx.c
i4b_hscx.h -> hscx.h
i4b_ipac.h -> ipac.h
i4b_isac.c -> isac.c
i4b_isac.h -> isac.h
i4b_isic.c -> isic.c
i4b_isicbchan.c -> isic_bchan.c
i4b_isicl1.c -> isic_l1.c
i4b_isicl1.h -> isic_l1.h
i4b_isicl1fsm.c -> isic_l1fsm.c
2001-02-20 22:24:31 +00:00
martin 933440dc9c Filename cleanup police (per discussion with Soren S. Jorvang):
remove all (legacy) "i4b_" prefixes outside of sys/netisdn.
Prefix all card specific driver support files with the basename
of the driver bus attachement file.

Renamed here:
i4b_isic_isa.c -> isic_isa.c
i4b_avm_a1.c -> isic_isa_avm_a1.c
i4b_daic_isa.c -> daic_isa.c
i4b_itk_ix1.c -> isic_isa_itk_ix1.c
i4b_tel_s08.c -> isic_isa_tel_s08.c
i4b_tel_s016.c -> isic_isa_tel_s016.c
i4b_tel_s0163.c -> isic_isa_tel_s0163.c
i4b_usr_sti.c -> isic_isa_usr_sti.c
2001-02-18 13:54:32 +00:00
martin 48501b8e83 Rename isa_isic.c to i4b_isic_isa.c and isadaic.c to i4b_daic_isa.c
to improve naming consistency.
2001-02-17 15:38:09 +00:00
thorpej 043e519d55 Adjust the way that media is initialized on DP8390-compatible
chips.  The dp8390_softc now has media_init and media_fini
function pointers that do the work.
2001-02-12 18:49:03 +00:00
briggs 180bf3d3ac Clean up a couple of printf-format warnings. 2001-02-12 15:49:19 +00:00
taca 044bcb0bd2 Insert missing '#' for cpp(1). This should close PR/12167. 2001-02-10 12:16:34 +00:00
hpeyerl f11510dd0a add missing Weasel command. 2001-01-23 17:18:23 +00:00
bjh21 fe3273fbb4 Patch from PR kern/8001, submitted by Rafal Boni.
This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards.  This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.

This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver.  I've tested it (briefly) with 'ei' on arm26
as well.  In theory, drivers other than 'ix' should follow precisely the
same code paths as before.
2001-01-22 22:28:43 +00:00
thorpej c38c39fc9b Only need to pass a cy_softc * to cy_attach(). 2001-01-20 02:26:39 +00:00
thorpej a0f7017e2e Clean up the PCI attachment a bit, and adjust the other pieces
to suit.
2001-01-20 02:15:01 +00:00
jdolecek 34c8ae80da constify 2001-01-18 20:28:15 +00:00
martin ac6176f581 Fix some oversights from fixing option names. 2001-01-09 00:46:01 +00:00
fvdl d040bd5908 Return error in the case of using ODIOCGDINFO or ODIOCGDEFLABEL when
the number of partitions is > OLDMAXPARTITIONS. This is better
than silently truncating the label (don't want to silently throw
away partitions when using an old disklabel binary on a label with
> 8 partitions). From Enami Tsugutomo.
2001-01-08 02:03:45 +00:00
fvdl e2d1c1f926 Adapt all disk devices in MI directories to handle ODIOC* calls
for ports that have bumped MAXPARTITIONS (and thus define
__HAVE_OLD_DISKLABEL).
2001-01-07 18:09:01 +00:00
nathanw 46b2a2fcd4 Do ess_config_addr() in the ofisa front end, rather than in the match
routine. Prevents problems with non-SCR ess chips, as described in
PR 11630.
2001-01-06 22:50:00 +00:00
martin 242656c78a Enable the imported ISDN4BSD based ISDN subsystem.
This is the kernel part (userland to follow soon) of the latest (and
very probably last) release (version 0.96) of ISDN4BSD. ISDN4BSD has a
homepage at http://www.freebsd-support.de/i4b/.

It gives the user various ways to use the isdn connection: raw data (via
the i4brbch "raw b-channel" device), ppp (via the isp "isdn PPP" device),
voice/answering machine (the i4btel "telephone" device) and ip over isdn
(the ipr device, "IP over raw ISDN").

Supported are a bunch of common and older cards, more to be added soon
after some cleanup. Currently only the european E-DSS1 variant of the
ISDN D channel protocol is supported.
2001-01-05 13:09:15 +00:00
martin c3cb638bca Initial import of ISDN4BSD release 0.96 2001-01-05 12:49:52 +00:00
mycroft a6fe4b78f2 Um, we need rnd.h so that cs_softc is defined properly. Overrunning structures
is bad.
NOTE: #IFDEF IN SOFTC DEFINITIONS IS BAD.
2000-12-26 09:42:21 +00:00
thorpej e3d7d246bb Fix a debugging clause missed when fixing full-duplex support.
Noted by Wolfgang Rupprecht.
2000-12-20 21:06:41 +00:00
mycroft 045091aa8f Add a big comment in the previous section of code... 2000-12-19 06:23:26 +00:00
mycroft 463d0e577e Back out previous change.
I removed this once before a long time ago, because it's wrong and breaks
PCMCIA on some machines.  It also doesn't fix the Multia problems.
2000-12-19 06:04:02 +00:00
mjl aaad4d0284 Add quirk for Avance Logic ALS100+, which doesn't like it's irq/drq
being set in pnp mode.
2000-12-19 01:09:15 +00:00
thorpej 57a13edc11 Use separate interrupt handlers for play and record the chip has
support for it and we're configured for separate play and record
DRQs.  This makes full-duplex audio work on the Windows Sound System
(found in many Alpha systems).

Submitted by Juergen Weiss <weiss@uni-mainz.de> in kern/11178.
2000-12-18 21:31:32 +00:00
thorpej 7cc029e16c Use IST_LEVEL as appropriate. Fixes PCMCIA interrupt problems
on the DEC Multia.  From Juergen Weiss <weiss@Uni-Mainz.DE>.
2000-12-18 21:17:44 +00:00
bouyer 179157be03 Fix a reversed test.
Partial fix for kern/11726: now the kernel find the drives, but panics
after a device has been mounted.
2000-12-17 19:35:23 +00:00
jmc 2967c3fac3 In fdcattach() reset the controller before moving on as some probes (ala pnpbios) may not have reset during match 2000-12-17 07:37:31 +00:00
thorpej 08afcfb9bd ALTQ'ify. 2000-12-14 06:59:01 +00:00
matt 632d2ad2ee Don't use __hpcmips__, but hpcmips 2000-12-09 20:35:31 +00:00
matt 3f127261f3 Un __P'ed. 2000-12-06 18:57:37 +00:00
matt 1aa6c9fb10 Add prep support. change all __foo__ to foo. We don't __foo__ in the kernel 2000-11-27 21:51:02 +00:00
takemura 3c9d9276dc Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
2000-11-26 11:08:57 +00:00
jdolecek c27af44fc0 Add an attachment for MOXA 168P isa multiport card. This code was
written by Christoph Badura.
This was reported to work by user of this code. It's not tested
by me, but it's probably more useful in tree anyway.
2000-11-20 19:24:39 +00:00
thorpej b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
thorpej 275539f03c NBPG -> PAGE_SIZE 2000-11-14 18:21:00 +00:00
thorpej fce3c3a6a8 pcweasel carries the sysmon_wdog attribute. 2000-11-05 04:07:30 +00:00
thorpej 95b9ab0ebc Add a device driver for the Middle Digital, Inc. PC-Weasel serial
console board.  This glues into the `pcdisplay' driver and provides
support for the watchdog timer function on the PC-Weasel.
2000-11-04 18:47:20 +00:00
thorpej 7575e3d5e9 Update comment regarding watchdog timer toggle. 2000-11-04 18:44:28 +00:00
thorpej 1da5a95dc5 Oops, wdt_msec is a short, not a char. 2000-10-17 00:34:41 +00:00
thorpej 4b0c3e182c Fix a typo in an constant name that is currently unused. 2000-10-16 23:03:45 +00:00
thorpej a5e3251d5f Register definitions for the Middle Digital, Inc. PC-Weasel
serial console board.
2000-10-16 22:59:24 +00:00
simonb 5d4fa9b0ce Revert rev 1.31 of bha.c (and associtated changes in the headers and
config glue files).

Fixes PR kern/9841.  Tested by Tracy J. Di Marco White with a bt948
and 6 disks.
2000-10-03 14:07:36 +00:00
thorpej 7ca3fb9ef0 Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
tsutsui f4ef578da7 6 -> ETHER_ADDR_LEN 2000-09-28 10:29:42 +00:00
itohy 572e9e2f80 Move ym_mixer_set_port() (if used) during attach AFTER initialization of
power ctl stuff, or it makes unwanted changes to the CODEC settings.
2000-09-04 00:57:17 +00:00
nathanw 5127aa189d In fdioctl(), allocate fd_formb dynamically when needed, rather than on
the stack, and remove the no-longer-necessary PHOLD()/PRELE() calls
in fdformat().

(This eliminates 1/3 of the instances of PHOLD()/PRELE() in the kernel code.)

XXX We still have too many mostly-redundant floppy drivers.
2000-08-24 20:04:28 +00:00
thorpej f80d70f19a Just add the mmap argument to vga_common_attach(), don't bother
with vga_extended_attach().
2000-08-14 20:14:50 +00:00
thorpej 8cb7deb85b Add support for the DEC DE422 Ethernet, which is a DEPCA
attached to the EISA bus.  This board is commonly found
on Alpha Jensen systems.
2000-08-11 02:27:07 +00:00
tv 389bf995b5 %b -> bitmask_snprintf() 2000-08-09 01:56:33 +00:00
briggs e6dde2bd42 Add MII support to smc91cxx driver. This is supported for the 91c100
and 91c100FD (FEAST) controllers.  Existing controllers should continue
to work as they have.  Added the card's memory to the probe message.
2000-07-30 21:34:47 +00:00
bouyer a7d2293ea4 My 16 port boca seems to fail to update the interrupt bit in it's interrupt
register for a port under high load. The effect is that the port is wedged
waiting for an interrupt that will never come.
Add a callout-based watchdog which periodically (hz/10) scan trough the ports
for missed interrupts.
Problem also noted by Chris Jones, and this fix also helped him.
2000-07-27 20:08:47 +00:00
is 8be010f00d - Big endianness cleanup:
a) use stream methods when transferring data via the MEMPORT into/out of
the chips buffer memory
b) use htole16/le16toh when interpreting 16bit values in the chips memory

Both where NOPs on i386 machines, which is why this worked before on the
test machine(s), but would break when on a big-endian machine.
2000-07-21 13:54:38 +00:00
is d8205b6db1 Do a dummy read after writing through the memory access pipeline, to flush
it, before starting the command to install the multicast list.
(We did it right for writing data packets, but failed here.)
Without this, the last multicast address installed won't be made active.
2000-07-14 10:50:50 +00:00
soren c675def443 Update comment. 2000-07-12 23:14:09 +00:00
thorpej d28fe378bc Use device_lookup(). 2000-07-06 02:02:48 +00:00
augustss 8f0fb77674 MAke sure bass&treble start in their mid position. 2000-07-04 10:02:45 +00:00
ad e211fdee79 Use my proper name in copyrights. 2000-06-30 13:36:47 +00:00
mrg 7e81221f5a remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 16:27:51 +00:00
mrg 4c698e84f6 <vm/vm_param.h> -> <uvm/uvm_param.h> 2000-06-26 14:58:58 +00:00
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
thorpej f82e306928 Add a clearing-house pseudo-device for system monitoring devices
such as the LM78 and VT82C686A (and eventually ACPI).  Multiple
sensor devices can be hooked registered with `sysmon', and eventually
sysmon will also handle hardware (and software) watchdog timers.

Convert the `lm' and `viaenv' drivers to the new interface.
2000-06-24 00:37:19 +00:00
is a4c83bd5bf s/sc->sc_ethercom.ec_if./ifp->/ where appropriate and formerly forgotten,
for better readability.
2000-06-23 14:07:03 +00:00
is 139e08bead Only "complain" about successful multicast setup if IFF_DEBUG was set. 2000-06-23 13:54:50 +00:00
cgd 625dbd8f87 in allegedly-MI code, if we're gonna use '#pragma pack(N)', #pragma pack()
should be used to reset the packing.  (#pragma pack(4) was used here
before.  "wrong!")
2000-06-08 18:22:15 +00:00
soren 10e30038a9 Fix braino in previous, pointed out by Jaromir. 2000-06-06 18:42:47 +00:00
soren 63649c5744 Make the frontend print a newline. 2000-06-06 16:27:49 +00:00
tsutsui 8c4d1bf1f9 Adapt MI ncr53c9x changes. 2000-06-05 15:08:00 +00:00
cgd cffb580806 Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
2000-06-04 19:14:14 +00:00
jhawk 1e59d99d28 For all network drivers that call ether_ifattach(), and also
have _detach() functions:
  Ensure that softc keeps state about whether the attach succeeded,
  and make the detach function return immediately if the attach did
  not complete.
2000-05-29 17:37:12 +00:00
thorpej 649ff32f2b Rather than using a magic constant, use `com_scratch' as the offset
in UART space to the interrupt CSR.
2000-05-20 18:25:41 +00:00
thorpej e7d81a3225 Fix a tyop, pointed out by Bill Studenmund. 2000-05-15 23:56:49 +00:00
jdolecek 2185bcc386 MI part of MicroChannel Architecture bus support
This work is based on code written by Scott D. Telford, the IBM
Token Ring card attachment was written by Gregory McGarry.

XXX this is still very experimental and development version; use at your
XXX own risk
2000-05-11 15:42:00 +00:00
jhawk e02d0e3597 Back out rev 1.7 of i82365_isa.c; 0x300-0x3ff, or even 0x330-0x3ff
is not a reasonable place to allocate 12-bit pcmcia iospace.
It seems to cause conflicts on a large number of modern laptops,
necesitating hand-patching of the kernel (mostly due to
video devices in the upper range of that space).

This will presumably cause problems on the NEC Versa 6030X,
however that appears to be a vastly less common case than
the laptops that are inconvenienced by the current state.

12-bit iospace now uses 0x400-0xfff.
2000-05-09 17:59:39 +00:00
mycroft 319d44bfb1 Adjust asm patterns for newer versions of GCC. 2000-05-03 21:20:07 +00:00
thorpej 712326ecbd Traditionally, the floppy controller was configured at 0x3f0 for 8 ports,
but the registers actually begin at 0x3f2, and this is what PNPBIOS reports
for the floppy controller resources.  Adjust the register offsets and the
mapping of them for the ISA front-end to compensate, so that the PNPBIOS
attachment of the floppy controller actually works.
2000-05-02 03:33:45 +00:00
thorpej 5e915fcab9 Nuke some dead code. 2000-05-02 03:32:09 +00:00
augustss 2365a92cb5 Add Creative Music System driver. From Gregory McGarry <g.mcgarry@ieee.org> 2000-05-01 22:48:33 +00:00
jdolecek 520f9dc581 pasfind(): avoid silly bug - if bus_space_map() of SB I/O space failed,
we used bad label and tried to bus_space_unmap() invalid memory
	region

Fixes port-i386/9992 by Jarkko Teppo <jate@uwasa.fi>.
2000-04-28 08:51:42 +00:00
thorpej 0cde36f780 Carve off the ISA configuration bits from the floppy driver. Driver is
still ISA-specific, but we can attach ISA instances with different
configuration mechanisms now.
2000-04-23 16:47:45 +00:00
explorer d592132506 the status register is _always_ at 0x420 -- grr. How should I put this in the config file rather than hard-coded? 2000-04-21 20:13:41 +00:00
explorer 1118b3ee75 Add driver for Addonics FlexPort 8S (and probably 4S, but not tested) 2000-04-21 17:48:30 +00:00
thorpej 4044b5a41c Use separate callouts for motor-on and motor-off. Fixes a condition
where the floppy driver would wedge because a motor-on timeout would
be cancelled by another I/O operation cancelling a motor-off timeout.

From enami tsugutomo <enami@sm.sony.co.jp>.
2000-04-07 16:58:53 +00:00