Commit Graph

1856 Commits

Author SHA1 Message Date
wiz 8989ce5fa0 Fix typo in comment; from Sergey Svishchev. 2004-05-11 22:45:09 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
drochner ef369e0ed6 remove license clauses 3 and 4 from my cpoyright notices 2004-03-24 17:26:53 +00:00
bjh21 dff5222d3a Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it.  This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111.  The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers.  To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned.  Thy just use rather more function pointers than before.  Tested
on i386 and (with a new host driver) acorn32.  Compiled on several other
affected architectures.
2004-03-13 17:31:33 +00:00
wiz 85746c6759 Spell interrupt with two rs. From Peter Postma. 2004-02-24 15:16:04 +00:00
wiz f5b32c1e69 RealTek -> Realtek. 2004-02-13 10:00:54 +00:00
jdolecek 5ecaa7ecee add dependency on isadma for atppc attachments
add atppc_isadma.c for atppc@isapnp and atppc@ofisa, too
2004-01-31 13:59:20 +00:00
jdolecek ccbfffb38b copyright notice as in netbsd-ppbus 1.4 (this files is based
on atppc_isa_subr.h which has this copyright notice in v1.4)
2004-01-28 19:37:30 +00:00
drochner d1506371f5 -unmap port range after probe, so that the attach function has
a chance to map it again
-minor cleanup
2004-01-28 13:51:16 +00:00
jdolecek 907186d1bb reorganize the ISA DMA setup/use code so that it could be shared
with ACPI and PNPBIOS attachments; move it to new atppc_isadma.[ch]
and g/c previous atppc_isa_subr.[ch]

move attppc_isa_softc struct definition to atppc_isa.c, and reorganize
the attachment somewhat for better readability; also g/c detach support code
2004-01-25 11:35:46 +00:00
bjh21 1c34707a4c Remove dollar signs from foreign RCSIDs per doc/3RDPARTY.
Add __KERNEL_RCSID() to .c files.
2004-01-25 00:28:01 +00:00
bjh21 f782033436 Add RCSID comments. 2004-01-21 00:33:37 +00:00
jdolecek b5b875ef06 cleanup old lpt(4) attachment, and glue ppbus in so that they can coexist:
* lpt device is defined in MI place (dev/ppbus/files.ppbus), dev/ic/lpt.c
  is included there too; dev/ic/lpt.c is not included if ppbus is
  configured or if there is alternative platform lpt (like for pc532)
* g/c MD lpt definitions and custom puc/upc attachments,
  glue moved to conf/files and dev/pci/files.pci respectively; remove
  device lpt definition from dev/isa/files.isa
* add ppbus parport attribute, atppc device attachments, adjust plip and lpt
  glue
2004-01-20 19:58:01 +00:00
jdolecek e23cd1a78a Import Gary Thorpe's netbsd-ppbus 1.3. This is NetBSD port
of FreeBSD Parallel Port Bus framework. Work in progress.
2004-01-19 23:22:23 +00:00
thorpej a963286f8d More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
2004-01-03 22:56:52 +00:00
thorpej 5bd80d8373 Rename "struct channel_softc" to "struct wdc_channel". 2004-01-03 01:50:52 +00:00
thorpej 527c829fa0 Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers.  Clean up the member names of these structures while at it.
2004-01-01 17:18:53 +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
keihan 8476e6755a NetBSD.ORG -> NetBSD.org
Now all "NetBSD.ORG" are gone from src/sys.
2003-12-04 12:42:54 +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
gson 19871d69f2 Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.
2003-11-21 03:08:37 +00:00
mycroft 552d27479a Replace home-grown locks with lockmgr(). 2003-11-07 04:10:56 +00:00
simonb b6abb6ab1d Remove some assigned-to but otherwise unused variables. 2003-10-30 01:58:17 +00:00
mycroft 9e80bdd1f0 Recode the probe slightly to remove a bogus initializer.
Also, don't do the rest of the probe work if the product ID mismatches, since
we'll return 0 anyway.
2003-10-29 01:10:12 +00:00
chs b3a3d69b22 uninitialized variables. 2003-10-27 07:14:25 +00:00
christos 8bfd5e3292 Fix uninitialized variable warnings 2003-10-25 18:34:14 +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
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
jdolecek c82b56d651 constify a little 2003-09-29 03:22:58 +00:00
mycroft c82b47f9bc Fix a non-fatal race condition. 2003-09-27 15:56:03 +00:00
mycroft eefae40298 Hide the use of config_interrupts() in one place. 2003-09-25 19:29:48 +00:00
mycroft 864b96269c Modify the fdcattach() interface again, splitting it into two parts, so that
DRQ allocation is done earlier.
2003-09-25 19:06:19 +00:00
mycroft 516d857707 Do fd probing after interrupts are enabled, and use tsleep() for delays.
Also try to accept a recalibrate interrupt to terminate the delay -- but that
doesn't seem to work reliably, so do a 2s timeout as well.
2003-09-25 01:05:06 +00:00
mycroft df8e298ddb Small changes -- if your controller clears DRV_BUSY when recalibrate completes,
you get lucky and the probe is faster.  A more complete fix will require making
the probe use interrupts, since there is no reliable way to poll.
2003-09-23 21:36:07 +00:00
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
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
mycroft d40837608f 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
   (it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
   *_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
   drives more quickly.
2003-09-19 21:35:56 +00:00
mycroft a9e1f75ec7 Several changes to eliminate bogus controllers and sockets from being found:
PCIC_VENDOR_NONE: New.
PCIC_VENDOR_CIRRUS_*: Collapse the 2 chips into one vendor ID.

pcic_ident_ok(): Check the ID revision field -- if it's 0, punt.

pcic_vendor(): Check the ID revision field -- if it's 0, or the ID register
is all-1s, assume there is no chip present.  (Previously this would return
"Unknown controller" -- which, AFAICT, *never* resulted in a working device.)
Do the Cirrus check only after verifying that we got the Intel ID.

pcic_attach(): Use a priori knowledge of the Cirrus chips to determine the
number of sockets rather than trying (unsuccessfully) to probe.  Also, just
blast all of PCIC_INTR -- we do this in pcic_deactivate_card() anyway.
2003-09-05 01:02:51 +00:00
mycroft 55ff1b2294 If the frontend passes in sc->irq=0, set PCIC_INTR_ENABLE. Also, don't clear
that bit all over the bloody place
2003-09-02 22:44:08 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
christos be02f6d68d avoid the pruned type gcc-3.x warning. 2003-08-04 00:26:09 +00:00
lukem 365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
itojun 7f6ed16ef4 function prototype must not have variable name 2003-07-08 10:06:28 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
drochner 0256604827 nuke unnecessary #include <sys/dkstat.h> 2003-06-12 14:44:36 +00:00
gmcgarry 9d6ae676dd Driver for GPIB controllers boards based on the uPD7210 GPIB controller,
including boards made by Captial Equipment Corp.
2003-06-02 03:57:15 +00:00
wiz 41ebad8a42 create, not craete. 2003-05-14 12:43:26 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
fvdl d88cf589cb A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.
2003-05-09 23:51:25 +00:00