summaryrefslogtreecommitdiff
path: root/sys/dev/ata/ata_wdc.c
AgeCommit message (Collapse)Author
2004-06-02Add quirks field to the wdc softc and implement the first one:Alexander Yurchenko
WDC_QUIRK_NOSHORTDMA which disables DMA for the one-sector transfers. Use this quirk for the Geode SC1100 IDE to fix hanging during fdisk reported in PR 3729. Thanks to Alexandre Belloni <abelloni@nerim.net> for testing. ok costa@
2004-01-23Use %b to display status register, this will make bug reports moreAlexander Yurchenko
informative. Also convert WDCS_BITS string to caps.
2004-01-15ansi and some spaces; no f/cAlexander Yurchenko
2003-10-17Merge an old fix from NetBSD:Alexander Yurchenko
- 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.
2003-10-16Allow setting of wdcdebug*_mask variables via preprocessor defines.Alexander Yurchenko
This makes creating debug kernels be much more easy.
2003-09-28kill trailing spaces, no functional changesAlexander Yurchenko
2003-07-23Old Promise ATA controllers need some additional operationsAlexander Yurchenko
during DMA transfers to work correctly with LBA48 drives. Based on diff from Takeshi Nakayama <tn@catvmics.ne.jp> for NetBSD with some corrections from FreeBSD ATA driver.
2003-02-21Fix Manuel Bouyer's copyright, from NetBSDAlexander Yurchenko
ok deraadt@
2003-02-13Don't force all ATAPI devices to PIO mode 3, there areAlexander Yurchenko
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@
2003-01-10splio->splbio in commentAlexander Yurchenko
2002-12-19Protect WDCDEBUG_PRINT macro with do {} while (0)Alexander Yurchenko
ok costa@
2002-10-12Remove more '\n's from panic() statements. Both trailing and leading.Kenneth R Westerback
Diff generated by Chris Kuethe.
2002-05-03LBA48 support.Grigoriy Orlov
Adopted from NetBSD by Alexander Yurchenko <grange@openbsd.ru>. costa@ ok.
2002-03-16Use wdc_setdriveConstantine Sapuntzakis
2002-03-14First round of __P removal in sysTodd C. Miller
2001-11-28Add tag line. Thanks to David KrauseConstantine Sapuntzakis
2001-07-31On DMA timeouts, stop busmaster PCIIDE and reset channel. Avoid readingConstantine Sapuntzakis
device registers as this may cause lock-ups on some chipsets Clean-up in atapiscsi. Get rid of claim_irq. Instead, atapiscsi always returns -1 (maybe) from the interrupt handler.
2001-07-21Undo last fix to ata_wdc.c. Don't deregister timeout in generic codeConstantine Sapuntzakis
2001-07-21Don't hang on missing interruptsConstantine Sapuntzakis
2001-03-25Missing irqack, cleanup DMA error handlingConstantine Sapuntzakis
2001-03-25Minor mods to DMA interface - get rid of unnecessary args. Allow DMA ↵Constantine Sapuntzakis
functions to return status flags. Note: Changing code to have DMA interface indicate when I/O is done (a la NetBSD) was considered. It was rejected due to questionable backward compatability with ISA DMA and MAC obio DMA Added irqack from NetBSD (though this feature should really be in the PCI interrupt handlers) Use pool
2000-06-30Convert some parts to new timeouts.Artur Grabowski
2000-04-10Added support for wd detach (merge from NetBSD). Support forConstantine Sapuntzakis
SCSI/ATAPI detach is not here yet. Minor cleanup of wdc. Downgrade to UDMA mode 1 before going further. Want to stay in UDMA modes because they're more error-resilient due to a CRC. Got rid of some of the ridiculous amount of softc sharing going on. Hopefully, this will make the life of whoever goes in and fixes the ref-counting to be correct easier.
1999-11-17New interface to ATA registers that goes through the lower-level deviceConstantine Sapuntzakis
driver (pciide, wdc, etc.) Remove #define WDCDEBUG from top of files More fixes to ATAPISCSI logic: Not all devices transition correctly between phases. Devices are supposed to keep BSY high until they've set the registers to the next sensible state. Some devices drop BSY and leave the registers in an old or nonsense state. Our polling code is extremely sensitive to this (though an early itnerrupt could also observe this). So, if the device is in an unexpected state, the new polling code waits for a while in the hope that it enters a better state. This seems to fix many of the problems reported. Also, there was a horrible bug which would cause sense to fail on a ATAPI command that sent data to the drive
1999-11-05use wdc_input_bytes and wdc_output_bytesConstantine Sapuntzakis
1999-10-27bugfixes from netbsd ata_wdc.c, ok csapuntz@Chris Cappuccio
from bouyer: - Add some debug printf (WDCPROBE) in _wdcreset_wait(), I've needed these 2 times in the past - Set up timeout per xfer instead of per interrupt. This helps with PIO transfer (we would call timeout()/untimout() several times for a transfer). - If we missed an interrupt for a PIO transfer, reset and restart it immedialy, don't try to recover and continue. If we missed an interrupt we may have lost a read/write cycle on the IDE bus. If this happens 1) we corrupt data and 2) we enter an interrupt loop at the end of the xfer, as the drive has some more data to read/write, but the host thinks the xfer is done. This last change fix the (or at last some of the) 'lookup after lost interrupt' some peoples have been experiencing.
1999-07-18Import of NetBSD ATA/IDE stuff.Constantine Sapuntzakis
Introduction of home-grown To enable this stuff in your configuration, look at the NEWATA conf file and go through dev/isa/files.isa dev/pci/files.pci conf/files arch/i386/conf/files.i386 and follow the instructions on commenting/uncommenting stuff