Commit Graph

1941 Commits

Author SHA1 Message Date
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
kleink bbb601497d Fix further printf format warnings for DEBUG, in the wake of daddr_t
having changed.
2003-01-25 23:18:46 +00:00
tron 5067836b9e Use PRId64 instead of hard coding "%lld" to fix build problems under
LP64 ports.
2003-01-25 18:12:31 +00:00
tron 63dda858c6 Fix printf() format strings problems caused by "daddr_t" change. 2003-01-25 12:50:38 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
bouyer 93ac594a91 Add a #error message asking to fix frame padding (this driver doesn't
compile anyway).
2003-01-15 22:38:59 +00:00
bouyer bcae687139 Zero out the NIC memory when padding packet to ETHER_MIN_LEN-ETHER_CRC_LEN
sc->write_mbuf now return len of buffer, including padding.
Tested with a PCI ne2000.
2003-01-15 22:20:03 +00:00
bouyer ba7f2ad41b Zero out the NIC memory when padding packet to ETHER_MIN_LEN-ETHER_CRC_LEN 2003-01-15 22:00:43 +00:00
jmcneill 5df8dc3180 Support for 'plug and play' of floppy drives, to be used soon by the
ACPI fdc attachment. Reviewed by fvdl.
2003-01-08 23:51:11 +00:00
wiz 7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
thorpej 703e7687a9 Use aprint_normal() in cfprint routines. 2003-01-01 00:16:46 +00:00
thorpej 72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
thorpej f09fc7f074 Don't include <i386/isa/icu.h> 2002-12-10 05:05:11 +00:00
ad 59773dea2e Implement the DPT EATA ioctl() interface. 2002-12-07 19:48:30 +00:00
tsutsui 9604e7689d More cleanup of MI mb86960 driver:
- Add support for byte system bus mode. Based on patch in kern/17193 by
  Christian Groessler, with some improvements by me.
- Rename sc_flags in mb86960_softc to sc_stat, rename "type" to sc_flags
  to specify controller quirks and remove enum mb86960_type.
- Pass controller type via new sc_flags in mb86960_softc rather than
  via an mb86960_attach() arg.
- Handle unaligned mbufs properly in mb86960_write_mbufs(). (from ne2000.c)
- Fix a signed/unsigned comparision warning.
- Add definitions of status bits in the RX packed header.
- Change types of some members in mb86960_softc.
2002-11-30 14:15:10 +00:00
christos 514f7047e4 si_ -> sel_ 2002-11-26 18:49:40 +00:00
chs 4153f58dfe move initialization of iobase to before we first use it. 2002-11-17 22:49:56 +00:00
ad 5a728ace12 Changes for SMBus/I2C:
- Move lm_readreg/lm_writereg into the front-ends. Add/use function pointers
  in the softc.
- Add a bank select function pointer to the softc and provide a generic
  version. WinBond chips accessed over serial bus present three addresses,
  two of which are used to access bank 1/2 registers.
- Mark TSENS2/3 sensor data as invalid if the the corresponding bank select
  fails.
2002-11-15 14:55:41 +00:00
kristerw e3355c4796 Removed unused structure. 2002-11-02 10:47:49 +00:00
perry c290830eb1 changed asm()s to __asm()s.
XXX Now, could someone please explain to me why in the love of Bob a
file containing inline x86 assembler is in sys/dev/isa/????
This should be moved, fixed, or nuked from space.
2002-11-02 02:10:56 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
drochner d17faedcd0 -fix script botch from CFATTACH_DECL introduction
-while here, spotted probe error: we shouldn't try other locations if the
 base address is nailed down per locator
2002-10-22 16:18:26 +00:00
martin a5e0b21547 Make it compile again (the softc struct is named inconsistently,
so Jasons script did break this, but thats a bigger fish to fry than I'm
willing to handle now.)
2002-10-20 10:50:01 +00:00
fvdl 6dc742c240 Don't include <i386/isa/icu.h> 2002-10-11 19:14:06 +00:00
tsutsui 071330b986 Slightly modify attach messages. 2002-10-05 17:52:31 +00:00
tsutsui 200406b07a Overhaul of fmv(4) driver:
- Split if_fmv.c into MI/MD part and add ISA-PnP attachment for FMV-183.
  (XXX FMV-184 is not tested. It would require extra media-select functions..)
- Fix probe functions of fmv_isa so that FMV-181A/182A will also match.
  Fixes port-i386/9476.
2002-10-05 15:16:10 +00:00
tsutsui 510762487a Allied-Telesyn AT-1700xT and Allied-Telesis RE200x are actually identical,
so show both names in attachment. (From FreeBSD's if_fe_isa.c)
2002-10-04 21:19:34 +00:00
tsutsui fdedb8dbd6 - Merge dev/ic/ate_subr.c into dev/ic/mb86960.c since it only has EEPROM
read function which can also be used for other MB86965 based boards.
- Rewrite EEPROM read function as per 93C06 EEPROM datasheet.
- Misc cleanup.
2002-10-04 15:22:27 +00:00
soren fc9a318a07 Avoid noise on kbd-less machines. 2002-10-04 03:40:29 +00:00
itojun 30f6bff0ac copyright clarification, from openbsd 2002-10-02 06:51:59 +00:00
thorpej 60530be43c Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion.  (Grumble.)
2002-10-02 03:10:45 +00:00
thorpej 66db35f9ab Use CFATTACH_DECL(). 2002-10-02 02:14:45 +00:00
thorpej 0dac35b547 Use CFATTACH_DECL(). 2002-10-02 02:00:07 +00:00
tsutsui c90eeb8f06 Call mb86960_attach() with MB86960_TYPE_86965 since
all FMV-18x have MB86964 or MB86965A, not MB86960,
2002-09-29 17:15:59 +00:00
tsutsui a5638d54a0 Remove unused code in #if NetBSD <= 199712 part. 2002-09-28 18:55:19 +00:00
tsutsui a05eb615fe Rename if_fereg.h -> if_fmvreg.h since now it has only
FMV-18x specific definitions.
2002-09-28 18:43:08 +00:00
tsutsui 065fc336c2 Move AT1700/RE2000 EEPROM definitions from isa/if_fereg.h to ic/ate_subr.h.
XXX Maybe all stuff in ate_subr.* should be merged into ic/mb86960*.[ch].
2002-09-28 18:19:08 +00:00
tsutsui d73bf82699 Remove unused FE_VERSION and FE_REG_VERSION. 2002-09-28 17:22:49 +00:00
tsutsui 43367243b6 Remove unused code in #if NetBSD <= 199712 part. 2002-09-28 17:18:28 +00:00
tsutsui a531ef1f17 Remove MBH10302 register definitions, which is also defined
in dev/ic/mb86960reg.h.
2002-09-28 17:09:20 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
thorpej b00903c834 Fix signed/unsigned comparison warnings from gcc 3.3. 2002-09-11 07:22:19 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
augustss 2f5aeb92d3 Use a different way to recognize tea5759 chips. From OpenBSD. 2002-09-03 18:53:40 +00:00
isaki dd0e0396bc Add driver for ScanLogic SL811HS/T USB Host Controller.
XXX It's experimental code yet.

For x68k: USB part of Nereid USB/Ethernet/memory board
For ISA:  ISA USB Host board from Morphy planning
2002-08-11 13:17:52 +00:00
hannken f8908aa291 Convert to new device buffer queue interface. 2002-07-24 19:34:57 +00:00
drochner db2036e03e adda driver to read the temerature sensors on a NSC PC87366 Super IO chip
(the chip provides voltage / fan rpm control too, but we don't care yet)
2002-07-17 21:10:29 +00:00
junyoung b9f82fe6d3 ANSIfy. 2002-07-09 06:55:09 +00:00
junyoung 64a231036c Remove __P. 2002-07-07 07:05:40 +00:00
junyoung 472e54071a Rename vc_ccol and vc_crow in struct pcdisplayscreen to cursorcol
and cursorrow, respectively, to be consistent with other members
in the structure.
2002-07-07 06:36:32 +00:00
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
rafal 4a563f551c Allow this work work without a DRQ for PCNet parts mapped into ISA space
but which are connected to a local bus and do their own bus-mastering.
This has to be turned on via `flags 1' on the nele? device specification.
Gets one of my boxes working again with -current again.
2002-06-29 05:30:44 +00:00
rafal fc0c4eac18 Pass bus_space_map() an address then a size, rather than size twice, so this
has a hope of working.
2002-06-29 05:20:15 +00:00
drochner 9b3975fd12 clean up font handling:
-treat the builtin font like any other font at runtime
-for that, copy it to malloc()'d memory during attach()
-in early console initialization, if we have to consider a broken card
 (VGA_CONSOLE_ATI_BROKEN_FONTSEL), copy the builtin font to another
 location in font ram; the attach() code will do the rest
put the "quirk" code into effect again
2002-06-28 22:24:11 +00:00
junyoung 754342aeb8 - Work around a hardware bug that loaded fonts don't work, which is
found on many (all?) of PCI-based ATI graphics cards. It is fully optional
  and can be enabled by adding `options VGA_CONSOLE_ATI_BROKEN_FONTSEL'
  to config file.
- Temporarily remove `quirk' mechanism. Similar code already exists
  in pci_quirks.c.
2002-06-27 06:26:51 +00:00
simonb 8c2c311f56 Add evbmips to the list of platforms supported by this driver. 2002-06-26 09:47:08 +00:00
simonb be77ae0cf5 Whitespace KNF. 2002-06-26 09:38:37 +00:00
drochner f9d6718ab9 allow to overwrite the builtin VGA font if necessary,
make the number of available font slots variable,
set up a "quirk" mechanism to tell the generic vga code about crippled
VGA adapters which ignore the "fontsel" TS register,
initiate the quirk table with an ATI chip which happened to be on a board
I tested with.
Afaik quite a number of ATI chips suffers from the "loaded fonts don't
work" problem - these should be added.
Bad side effect of my change: The builtin font will be kicked out
always if a VGA_CONSOLE_SCREENTYPE is specified which needs a loaded
font. In early console initialization, we don't know much about the
graphics card, so we have to assume the worst (ie ATI:-).
2002-06-25 21:07:42 +00:00
augustss 1c66d18529 Make it possible to override the way register access is done.
This is needed for some really screwball attachments of the CS8900.
2002-05-21 02:47:04 +00:00
augustss 7f7ab48604 Rename the audio "bus" attribute audiobus to avoid confusion with audio
device.
2002-04-22 09:41:19 +00:00
gmcgarry 68388660cf Set ndrq to zero if no drq is specified. 2002-04-19 05:27:04 +00:00
martin e4998611e9 Fix copyright notice. 2002-04-14 12:24:26 +00:00
martin 0cdadad2cd Defer initialization of the ISAC chip until we enable interrupts - it gets
into a strange failure mode if we do it with disabled interrupt. When
(re-)enabling interrupts reset transmitter and receiver and clear any
pending state.
2002-04-13 10:28:36 +00:00
martin f12d3f51e7 Remove some redundant tries to disable interupts. We already avoided enabling
them.
Fix a stupid typo when enabling/disabling interrupts: we clear pending
interrupts when enabling, not disbling isac interrupts.
2002-04-10 23:51:06 +00:00
bouyer e5727031fb Implement mstohz() as discussed on tech-kern, and use it in SCSI drivers
to convert xs->timeout to callout() parameter.
2002-04-05 18:27:45 +00:00
martin e5c92d53f8 Be a nice citizen, enable interrupts only when we are ready to talk
to the ISDN (i.e. when userland has /dev/isdn open).
2002-03-30 19:13:44 +00:00
martin 8a2d9422bd Fix confusion about the return value from the internal MI probe routine.
Make the ISA probe actually (silently) fail if no card is found.

XXX - need to aquire the SBUS variant of this card some day or have
Jaromir find an MCA one.
2002-03-25 09:08:09 +00:00
martin ef6a5a4c4c Minor nit in the attach message: don't print empty io or iomem. 2002-03-24 23:04:27 +00:00
martin 0bc69b6498 Now that we have all the pieces of the puzzle available start to unriddle
and move them in their proper places.

Move the BRI registry from layer 2 (duh!) to layer 4, so active cards
(which don't have layer 3 or layer 2 in their driver). Remove all remaining
hard coded controller and driver types. Remove any arbitrary hard coded
limits, at least those that show up in the internal API.

This fixes PR 15950.
2002-03-24 20:35:43 +00:00
martin 9cea4a0ab0 Bring the daic driver into the new ISDN world order.
Enable active card support in the ISDN subsystem. (Had been disabled since
it couldn't be tested before.)
2002-03-22 09:54:15 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
itohy d5f39a2d9c Add explicit support of OPL3-SA2 (YMF711).
Not well tested....
2002-03-10 13:57:10 +00:00
jdolecek 6cfc5b796f use TAILQ_FIRST()/TAILQ_NEXT()/TAILQ_EMPTY macros rather than dereferencing
appropriate structure members
2002-03-10 08:55:40 +00:00
itohy 1990961dc9 Fix ADPCM playback/recording. 2002-03-06 07:12:02 +00:00
itojun ac36f7cb2c bring in latest ALTQ from kjc. ALTQify some of the drivers. 2002-03-05 04:12:57 +00:00
itohy 4283f00882 1. Change equalizer (treble, bass) to be ``flat'' if the values set at
the center position (128), so as to be compatible with other drivers.
    The equalizer is enhancement only, and the values < 128 don't take
    any effect.

    Yeah, this causes spec change....
    For equalization.treble and equalization.bass, the relation between
    old and new value is

	new_value = (old_value / 2) + 128.

    (Note this does not apply to equalization.surround.)

 2. Support ++ and -- of mixerctl(1) for stepping volume variables.

 3. Fix problem where the chip is not powered up
    when the mic input is unmuted.
2002-02-26 14:57:36 +00:00
jdolecek f32b3f4f89 Reduce the massive code duplication regarding joy(4). Split it into
MI and MD parts, and make ISA/ISAPNP/PCI joy(4) attachments MI.
2002-02-02 18:37:38 +00:00
sommerfeld c127a007e8 really fix it this time. 2002-01-28 03:47:14 +00:00
sommerfeld 3c99883ed4 Finish conversion to new-style isa config machinery (#ifdef DEBUG code was
left unconverted)
2002-01-28 03:45:25 +00:00
tsutsui b87a051ec8 Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:17:05 +00:00
jdolecek 1511af3e96 Resurrect the 'sc->sc_sbdsp.sc_dev.dv_cfdata = match' in pasprobe(),
it's needed for sbdsp.c:sbdsp_probe().
2002-01-11 17:45:10 +00:00
jdolecek 3c9a8d7d19 Fix fallout from previous - the 'sc->sc_dev.dv_cfdata = match' needs
to be retained, it's referenced in sbdsp.c:sbdsp_probe().
2002-01-11 17:33:01 +00:00
christos b5d5702d16 Deal with lossage caused by recent isa changes [/briq potr] 2002-01-08 17:20:44 +00:00
thorpej 3835413bc1 Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
  resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
  isa_attach_args.  If either of these members are non-NULL,
  direct configuration of the bus is being performed.  Add an
  ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
  direct configuration is not being performed and the probe fucntion
  is returning success.
* Adapt device drivers -- currently, all driver probe routines return
  "no match" if ISA_DIRECT_CONFIG() evaluates to true.
2002-01-07 21:46:56 +00:00
drochner db154a4d20 "attach radio at radio":
using one word as both attribute and device doesn't work well,
radio.c is pulled in even with no such device in the configuration,
and the kernel doesn't link due to missing "radio_cd".
So call the attribute "radiodev" to avoid confusion.
2002-01-07 17:44:42 +00:00
augustss 5777b5c311 Increase max sampling rate on SB16. It seems almost all models supports it. 2002-01-06 20:24:12 +00:00
augustss d083e37f0b Add \n in attach messages. 2002-01-03 18:13:19 +00:00
augustss c41bbdcea2 Change the probe code. You cannot unmap bus space and then use it. 2002-01-02 12:42:23 +00:00
augustss d7f7000641 Add missing newline. 2002-01-02 04:10:02 +00:00
augustss 1c06f6a40f Add support for radio cards. Written by Maxim Tsyplakov and Vladimir Popov
for OpenBSD, from where it was imported.
2002-01-01 21:51:38 +00:00
thorpej 6ca57419d1 Labels must be followed by statements. 2001-12-31 22:07:58 +00:00
thorpej 2270cd2cb5 Add a case for x86_64. 2001-12-29 21:13:46 +00:00
thorpej e53aabcecc Rename weasel.c to weasel_isa.c in preparation for supporting the
PCI version of the Weasel.
2001-12-16 22:35:31 +00:00
thorpej cf64f893c8 Try again: weasel -> weasel_isa 2001-12-16 22:33:35 +00:00
thorpej 87e8f0c761 Oops, revert previous; it included some other changes there weren't
meant to be checked in.
2001-12-16 22:32:07 +00:00
thorpej b45e326520 weasel -> weasel_isa 2001-12-16 22:30:26 +00:00
rafal 23e1fa1306 Fix PR 13465 by Krister Walfridsson: memory initialization used uninitialized
variable to start off the write pattern (how ironic! 8-).
2001-12-06 13:18:22 +00:00
lukem ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
fredette f0002ba642 Added macros for the bits in the SYSBUS byte, and macros
for the i82596 PORT access interface, from the documentation
for that chip.  These help clarify writes to the SYSBUS
part of the SCP, and PORT usage by i82596-aware drivers.
2001-11-26 23:30:59 +00:00
yamt adbdd3e6f6 add $NetBSD$ and copyright notice and rcsid. 2001-11-26 19:55:38 +00:00
yamt dbaca00330 move dev/isa/cs89x0{.c,{var,reg}.h} into dev/ic
and split isadma parts into /dev/isa/cs89x0isa*.
2001-11-26 19:17:05 +00:00
yamt 7af704bf48 - add power management code.
- use ether_ioctl instead of its own code.
  (make ifconfig down works properly.)
2001-11-26 11:14:50 +00:00
yamt ce170de115 - add (partial?) i/o mode support.
- add partial cs8920 support.
- add detach code.
- add a quirk for EtherJet PCMCIA with cardbus bridge.
(above "partial" means "engough to support EtherJet PCMCIA")
2001-11-24 20:18:55 +00:00
wiz 1f1e26bd6d Presence looks better with a 'c' instead of an 's'. 2001-11-21 19:01:31 +00:00
lukem 0fa231134c - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
2001-11-20 14:34:18 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem 3f7d8d47b6 add RCSID 2001-11-13 08:01:09 +00:00
itohy c0f59fbbeb AD1845 on my AlphaStation 255 doesn't match the AD1845 doc.
Try to detect AD1845 (unfortunately this is not always correct)
and work around the problems.
2001-11-04 08:08:25 +00:00
augustss 1339e88a86 Add a new optional method, dev_ioctl, to the audio hardware driver interface.
It is called when an unrecognized ioctl() is performed on a device,
thus allowing ioctl()s that frob the hardware driver (like loading
microcode).
2001-10-03 00:04:47 +00:00
martin 2c433e9757 Fix a very stupid pasto - the card has two B channels, so better not
query the HSCX chip version of the third one.
2001-09-30 11:50:05 +00:00
augustss d09eea2ace Add a missing command. 2001-09-29 19:08:49 +00:00
thorpej a7eb08e847 "cms" is not needs-flag 2001-09-26 21:49:09 +00:00
thorpej 55d06660bb "aria" does not needs-flag 2001-09-26 21:40:07 +00:00
thorpej 1eb0dacf81 IRQUNK -> ISACF_IRQ_DEFAULT 2001-09-26 01:30:58 +00:00
thorpej b9fffe1967 Allow bus front-end to provide both ioctl and mmap entry points,
and also the wsdisplay type.

Based on changes from Simon Burge <simonb@wasabisystems.com>.
2001-09-14 01:10:11 +00:00
tsutsui a234112f80 Make 3C509[B] in ISA mode probed correctly on big endian machines. 2001-09-02 06:46:57 +00:00
jdolecek 000f85917b Since ~all pckbc_poll_data1() callers had the appropriate pckbc
tag handy and we are going to need more of it in pckbc_poll_data1() soon,
change pckbc_poll_data1() to accept it as first arg. iot, ioh_d, ioh_c are
no longer passed separately. Use fabricated pckbc tag for calls from
arch/arc/jazz/pckbc_jazzio.c and dev/isa/pckbc_isa.c.
2001-07-23 21:03:19 +00:00
jdolecek f2b42af4c6 dev/isa/if_ate.c depends upon 'ate_isa', not just 'ate' 2001-07-21 16:08:17 +00:00
thorpej 44e529fecc Use BUS_DMA_READ and BUS_DMA_WRITE in some obvious places. 2001-07-19 16:36:14 +00:00
thorpej 600cfcb30a bcopy -> memcpy 2001-07-18 20:52:47 +00:00
thorpej 42a4d5b520 bcmp -> memcmp 2001-07-18 20:42:54 +00:00
thorpej ce623a36cc bzero -> memset 2001-07-18 20:39:53 +00:00
wiz cc0b68092e Correct various misspellings of 'transfer' and inflected forms. 2001-07-08 18:06:42 +00:00
thorpej 3d98de578f Remove unnecessary include files. From Onno van der Linden. 2001-07-08 17:55:50 +00:00
gmcgarry a48df4b355 Garbage-collect unneeded rnd.h include. 2001-07-01 01:50:05 +00:00
wiz 3f9984fc90 `existent', not `existant' 2001-06-19 13:42:07 +00:00
fvdl dd270d4a3f ifdef NISAPNP -> if NISAPNP > 0 2001-06-19 12:45:23 +00:00
wiz c03a48d64f withough -> without 2001-06-13 10:45:57 +00:00
wiz 0a600be867 receive, not recieve 2001-06-12 15:17:10 +00:00
wiz 0a3b1c29a1 transceiver, not transciever. 2001-06-11 01:19:53 +00:00
briggs 7a3a78cfa3 Compile on sandpoint. 2001-06-07 16:48:09 +00:00
leo 72510eee6d Make the WDC_{ATA|ATAPI}_NOSTREAM flags settable through configuration
options. Needed on the Atari Milan.
2001-06-07 06:33:48 +00:00
mrg c13e3a6693 use _KERNEL_OPT 2001-05-30 11:40:35 +00:00
thorpej 47745a094d Add support for the Algorithmics ISA floppy controller. 2001-05-27 18:16:21 +00:00
tsutsui 3d863329cc space/TAB cosmetics 2001-05-19 12:04:07 +00:00
lukem 09ba301f07 delint: () protect some macro args 2001-05-15 15:00:04 +00:00
lukem 9bef152bd7 delint: need ; between case label and } 2001-05-15 14:57:49 +00:00
ross e3f2f91bfb Split pci and eisa/isa attachment calls, plus misc cleanup. 2001-05-03 20:34:54 +00:00
hpeyerl dcd7e604ed Make weasel watchdog timer work reliably with help from <thorpej@zembu.com>
Remaining issues to deal with:
	- recognize when watchdog timer is deactivated on the Weasel.
	- deactivate weasel watchdog timer if we pop into ddb.
2001-05-03 17:55:47 +00:00
thorpej 596cc0bc10 Cast the config block buffer to (u_int8_t *) when reading it
from ISA memory space.
2001-04-26 17:58:28 +00:00
thorpej e5422a382f Explictly include <machine/pio.h> (since this driver uses
i386 pio instructions -- XXX BROKEN).
2001-04-26 17:57:47 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
thorpej 4747025b48 ctype-like functions are now in libkern. 2001-04-18 15:40:58 +00:00
jdolecek 745ab257dc Put back all header files defining ioctls 2001-04-11 19:07:36 +00:00
jdolecek 372e5956ef Only install headers which are actually used by our userland. This
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.

I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
2001-04-11 07:42:31 +00:00
jdolecek 6f8f19b16e fix typo in comment 2001-03-31 00:30:22 +00:00
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