summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/wdc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a callback drv_probe() to allow underlying ata controller drivergrange2004-10-171-5/+9
| | | | | to probe for drives in its own way. It's a no-op for now but will be needed for native sata support.
* Move declaration of default _vtbl members (wdc_default_*) togrange2004-10-171-12/+1
| | | | wdcvar.h.
* Better debug printfs: missing \n and show xfer flags ingrange2004-09-151-4/+4
| | | | wdc_exec_xfer().
* wdc logs fixes from costa@:grange2004-02-191-57/+81
| | | | | | | | | | | 1) wdc_get_log is at splbio() to prevent interrupt handlers from updating the log 2) work hard to ensure that wdc_tail and wdc_head are between 0 and wdc_log_cap, even if wdc_log or wdc_get_log is run concurrently against itself. With this patch, running concurrent wdc_log's may corrupt the log, but it should not cause any panics. 3) Make sure the buffer always starts on a record boundary. Otherwise said, wdc_tail should always be on a record boundary.
* Use %b to display status register, this will make bug reports moregrange2004-01-231-10/+13
| | | | informative. Also convert WDCS_BITS string to caps.
* Pass gcc -Wsign-compare; ok grange@millert2003-12-161-10/+10
|
* Sync with NetBSD probe code: deal with non-pullups ide bus whengrange2003-11-191-10/+15
| | | | | | | | testing status register and a better comments on probe logic. Tested on i386, sparc64 and macppc by me, jmc@, matthieu@, sturm@ and drahn@. ok costa@
* Various cleanups, knf, better debug messages.grange2003-11-171-13/+18
|
* Don't wait for DRQ after issuing IDENTIFY command; instead check for DRQgrange2003-11-171-6/+8
| | | | | | | | | asserted after BSY is cleared in data read codepath. Solves delays in probe. The first version of this diff was done by costa@ a long time ago but had some issues. This one is a partial sync with NetBSD. ok costa@
* One byte can't hold a value > 255.grange2003-11-131-8/+3
| | | | Spotted by Mr. GCC3.
* Back wdc reset change, now in more careful variant.grange2003-11-051-9/+15
| | | | Tested on matthieu's U5.
* Back all the changes except the wdc reset part, this will come later.grange2003-10-311-7/+25
| | | | Tested on matthieu's U5.
* Revert to 1.70 for now which is the last working version on my u5.matthieu2003-10-291-39/+15
| | | | ok deraadt@
* Skip ATA modes detection for SATA drives, it's useless and somegrange2003-10-271-3/+19
| | | | | | | | | | SATA drives really don't like it. Add a delay between drive reset and issuing IDENTIFY command, some drives need it (from NetBSD). This fixes problems with SATA drives reported by Jonathon Fletcher <jonathon.fletcher@pobox.com>. He also provided access to the test machine.
* Print error registers values in debug message after reset too.grange2003-10-261-5/+7
|
* Device reset improvements:grange2003-10-261-9/+15
| | | | | | | | | | | - put the reset protocol itself in the separate function __wdcdo_reset() so we don't need anymore to keep in sync two reset code paths; - change the reset protocol to something like FreeBSD and NetBSD do, this fixes slave ATA drive detect with weird ATAPI master (reported by fgsch@); Discussed with costa@. Tested by me, fgsch@, millert@, canacar@.
* typos from Tom Cosgrove;jmc2003-10-211-5/+5
| | | | | | | | Tom: I did not commit a couple of your changes. i did not include some punctuation fixes (full stops, etc.) mnemorable -> mnemonic: i decided memorable was probably better instrunctions -> instruction: i kept the plural
* typo; netbsdgrange2003-10-201-2/+2
|
* KNFgrange2003-10-191-51/+55
|
* Merge an old fix from NetBSD:grange2003-10-171-1/+41
| | | | | | | | | | - do not stop/unload current DMA operation if an IRQ was not detected by DMA engine unless the force flag was given, fixes DMA problems in shared IRQ setups; - ack interrupt before entering DMA codepath Tested by many. Work by niklas@ but he doesn't want to commit it for some reason.
* Cleanup a bit, more pretty debug messages.grange2003-10-161-3/+3
|
* Allow setting of wdcdebug*_mask variables via preprocessor defines.grange2003-10-161-2/+5
| | | | This makes creating debug kernels be much more easy.
* Kill two static function declarations.grange2003-10-161-5/+5
|
* kill trailing spaces, no functional changesgrange2003-09-281-17/+17
|
* trailing spacesgrange2003-07-061-57/+57
|
* Restore the original wdcdebug_mask instead of clearing DEBUG_PROBE whenhenric2003-06-251-20/+17
| | | | | | done with it. This makes "wdcprobe()" consistent with "wdcattach()". ok grange@
* Fix Manuel Bouyer's copyright, from NetBSDgrange2003-02-211-2/+2
| | | | ok deraadt@
* Don't force all ATAPI devices to PIO mode 3, there aregrange2003-02-131-3/+39
| | | | | | | | | | devices which only support PIO mode 2 or less. Use atap_oldpiotiming to obtain supported mode for such devices. Also use SET FEATURES only for PIO mode > 2. Work by Alec Skelly <alec@dtkco.com> with my little help. ok costa@
* Define atagettrace_t type and use it instead of struct atagettrace.grange2002-12-221-2/+2
| | | | ok costa@
* No more magic wdc events types, give them names.grange2002-12-221-2/+2
| | | | ok costa@
* Protect WDCDEBUG_PRINT macro with do {} while (0)grange2002-12-191-2/+5
| | | | ok costa@
* Always use queue(3) macros.grange2002-12-121-7/+7
| | | | ok chris@ gluk@
* minor formatting.art2002-10-161-2/+2
|
* Remove trailing '\n's from panic messages.krw2002-10-091-3/+3
| | | | | | Started by a commit to siop from provos@netbsd.org. ok miod@ millert@
* Fix PIO write state machine. This has been totally broken since 2.5, but sincecsapuntz2002-07-021-7/+30
| | | | | | | this code path is only executed for IOCTLs, and all of our IOCTLs only read from the device, nobody noticed. Thanks to grange and gluk for finding this one.
* protect biodone with splbio (this is the first time the splbio isart2002-05-241-1/+6
| | | | not really needed, just added to satisfy the assert).
* Replace a home-grown splassert-like thing with the real stuff.art2002-05-241-13/+2
|
* LBA48 support.gluk2002-05-031-1/+38
| | | | | | Adopted from NetBSD by Alexander Yurchenko <grange@openbsd.ru>. costa@ ok.
* The new code logs the control signals on the IDE bus. You can extract the logcsapuntz2002-03-161-11/+173
| | | | | using atactl <device> dump. The log will help us support more devices. Send logs to csapuntz@
* First round of __P removal in sysmillert2002-03-141-26/+26
|
* Pool deals fairly well with physical memory shortage, but it doesn't dealart2002-01-231-2/+2
| | | | | | | | | | | | | | | | | | well (not at all) with shortages of the vm_map where the pages are mapped (usually kmem_map). Try to deal with it: - group all information the backend allocator for a pool in a separate struct. The pool will only have a pointer to that struct. - change the pool_init API to reflect that. - link all pools allocating from the same allocator on a linked list. - Since an allocator is responsible to wait for physical memory it will only fail (waitok) when it runs out of its backing vm_map, carefully drain pools using the same allocator so that va space is freed. (see comments in code for caveats and details). - change pool_reclaim to return if it actually succeeded to free some memory, use that information to make draining easier and more efficient. - get rid of PR_URGENT, noone uses it.
* Don't try UDMA modes if they aren't supported by the controllerjason2002-01-121-1/+5
| | | | even if the flags enable it. chris@ ok
* pass the proc* down the ioctl chain to controller; mjacob@ csapuntz@ okmickey2002-01-071-2/+3
|
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+2
| | | | (Look ma, I might have broken the tree)
* initialize the channel timeout earlier.art2001-08-231-2/+3
|
* Go down only one Ultra DMA mode at a time. Thanks to Matt Evans forcsapuntz2001-07-311-5/+6
| | | | | | suggesting this fix. Update atapiscsi Ultra DMA downgrade logic.
* Yet another probe fix. Switch to the right drive before looking at registerscsapuntz2001-07-271-3/+22
|
* Undo last fix to ata_wdc.c. Don't deregister timeout in generic codecsapuntz2001-07-211-2/+1
|
* Fix slave ATAPI device detect broken by last patchcsapuntz2001-07-191-7/+13
|
* Rework of probe code. Try better to deal with floating buses. Dependingcsapuntz2001-07-121-66/+49
| | | | | | | | | | | on the value floating on the bus, we would occasionally skip the register writability tests. Whoops... Move fix for a flash device that doesn't wake up until a command is sent Try to supress spurious interrupts. However, if one does happen, acknowledge it anyway by reading status. This prevents the interrupt condition from persisting.