summaryrefslogtreecommitdiff
path: root/sys/dev/isa
AgeCommit message (Collapse)Author
2004-01-03More wdc_channel structure member namespace cleanup:thorpej
- channel -> ch_channel - wdc -> ch_wdc
2004-01-03Rename "struct channel_softc" to "struct wdc_channel".thorpej
2004-01-01Rename:thorpej
- 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.
2003-12-04netbsd.org -> NetBSD.orgkeihan
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-04NetBSD.ORG -> NetBSD.orgkeihan
Now all "NetBSD.ORG" are gone from src/sys.
2003-11-27There are some cards that map the ATA control and IDE DMA registersfvdl
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-21Code enabled by option AUDIO_DEBUG exhibited undefined behavior andgson
caused compiler warnings with gcc 3.3.2.
2003-11-07Replace home-grown locks with lockmgr().mycroft
2003-10-30Remove some assigned-to but otherwise unused variables.simonb
2003-10-29Recode the probe slightly to remove a bogus initializer.mycroft
Also, don't do the rest of the probe work if the product ID mismatches, since we'll return 0 anyway.
2003-10-27uninitialized variables.chs
2003-10-25Fix uninitialized variable warningschristos
2003-10-08Make the ATA mid-layer appears as atabus, as proposed inbouyer
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-03Ready the kernel side of i4b for primary rate interface support bypooka
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-09-29constify a littlejdolecek
2003-09-27Fix a non-fatal race condition.mycroft
2003-09-25Hide the use of config_interrupts() in one place.mycroft
2003-09-25Modify the fdcattach() interface again, splitting it into two parts, so thatmycroft
DRQ allocation is done earlier.
2003-09-25Do fd probing after interrupts are enabled, and use tsleep() for delays.mycroft
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-23Small changes -- if your controller clears DRV_BUSY when recalibrate completes,mycroft
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-23Fix more probe delay and/or failure problems:mycroft
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-21Since we can't detect ghost drives in the wdc back-end, resurectbouyer
WDC_CAPABILITY_SINGLE_DRIVE.
2003-09-191) Use config_interrupts() to attach IDE and ATAPI drives. This eliminatesmycroft
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-05Several changes to eliminate bogus controllers and sockets from being found:mycroft
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-02If the frontend passes in sc->irq=0, set PCIC_INTR_ENABLE. Also, don't clearmycroft
that bit all over the bloody place
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-04avoid the pruned type gcc-3.x warning.christos
2003-07-14add missing __KERNEL_RCSID()lukem
2003-07-08function prototype must not have variable nameitojun
2003-06-29Back out the lwp/ktrace changes. They contained a lot of colateral damage,fvdl
and need to be examined and discussed more.
2003-06-28Pass lwp pointers throughtout the kernel, as required, so that the lwpid candarrenr
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-12nuke unnecessary #include <sys/dkstat.h>drochner
2003-06-02Driver for GPIB controllers boards based on the uPD7210 GPIB controller,gmcgarry
including boards made by Captial Equipment Corp.
2003-05-14create, not craete.wiz
2003-05-10Change bounds_check_with_label() to take a pointer to the disk structure,thorpej
rather than the label itself. This paves the way for some future changes.
2003-05-09A few ISA sound drivers like to share dma channels, and hence deferredfvdl
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-05Move definition of ISA_DMA_BOUNCE_THRESHOLD to dev/isa/isareg.h.fvdl
2003-05-03DMA, not dma nor Dma.wiz
2003-04-20PR/6362: der Mouse: /dev/speaker octave-tracking goes out of rangechristos
2003-04-06Respect the law: Use A-law and mu-law as spellings as far as easily possible.wiz
Inspired by Igor Sobrado in PR 19680.
2003-04-03avoid stupid printfs during probechristos
2003-04-03avoid stupid printfs during probe when debugging is on.christos
2003-03-22No reason to malloc channel_queue, put it in the softc instead. Clean upmatt
a few other things while here.
2003-03-03The DMA support here never worked, so yank it out.mycroft
2003-02-26Make this work as fdisa again on the Atari/Milan.leo
2003-02-25Add missing splbio() protecting of bufpool access. Add a clarifyingthorpej
comment to <sys/buf.h> reminding everyone of the need for splbio().
2003-02-25Add a new BUF_INIT() macro which initializes b_dep and b_interlock, andthorpej
use it. This fixes a few places where either b_dep or b_interlock were not properly initialized.
2003-02-23Remove assigned-to but not used variable.simonb
2003-02-05Remove unused variable.pk
2003-02-05Make the buffer cache code MP-safe.pk