summaryrefslogtreecommitdiff
path: root/sys/dev/atapiscsi
AgeCommit message (Collapse)Author
2002-05-21Move enum definitions to global scope. Local scope is meaningless, andMarc Espie
interferes with C99's anonymous stuff. ok millert@
2002-05-10Dump the actual command to be sentConstantine Sapuntzakis
2002-05-08Drives can go busy after IDENTIFY. Make sure drive is not busy before issuingConstantine Sapuntzakis
SET PIO mode. Heh, this might have been the cause of all those old PIO mode aborts.
2002-03-16Log extra info for ATAPI devicesConstantine Sapuntzakis
2002-03-14First round of __P removal in sysTodd C. Miller
2002-02-01duplicate includeArtur Grabowski
Noted by Jacob Meuser <jakemsr@jakemsr.com>
2002-01-07pass the proc* down the ioctl chain to controller; mjacob@ csapuntz@ okMichael Shalayeff
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-08-25Change scsi_[free|get]_xs to use pool(9); art@ krw@ miod@ ok.Federico G. Schwindt
2001-08-18typo from 1.50; biorn@chips.chalmers.seTheo de Raadt
2001-07-31Go down only one Ultra DMA mode at a time. Thanks to Matt Evans forConstantine Sapuntzakis
suggesting this fix. Update atapiscsi Ultra DMA downgrade logic.
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-10Wait 1 second after soft reset.Constantine Sapuntzakis
Add back IDENTIFY after soft reset. Fix ch_flags -> ch_status in a couple places
2001-07-03obvious typo in condition; csapuntz@ okNiklas Hallqvist
2001-07-02Compile with WDCDEBUG.Hakan Olsson
2001-06-25Undo premature commitConstantine Sapuntzakis
2001-06-25Whoops, there's nothing at sc_link[1] any moreConstantine Sapuntzakis
2001-06-25Fix excessive resets and device probes by storing IDENTIFY results in theConstantine Sapuntzakis
drvp structure
2001-05-27Cleanup of definesConstantine Sapuntzakis
Fix around the logic in the reset code to be more tolerant of weird devices. Pause a long time after reset to allow device to reboot itself
2001-04-17Turn off DMA on REQUEST SENSEConstantine Sapuntzakis
2001-04-17dma_status variable check is only valid for DMA transfers.Constantine 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
2001-03-15Fix races between timeouts and interrupts.Constantine Sapuntzakis
Cleanup atapiscsi driver a bit by moving fields out of xfer.
2001-03-05Convert to new timeout API. costa@ ok.Hakan Olsson
2001-01-30Ignore PIOMODE(0x4) errorsConstantine Sapuntzakis
2001-01-29Fix bug where timeouts triggered too early, caused panic on ATAPI tapes.Niklas Hallqvist
Removed hardcoded WDCDEBUG definitions.
2000-12-19A DMA transfer of 4 bytes was failing to complete correctlyConstantine Sapuntzakis
on a combination of VIA South Bridge and old Toshiba drive. DMA transfers of 4 bytes work for my old Mitsumi FX600 drive. Assume Toshiba drive is in error. Avoid situation by only invoking DMA transfers on transfers over 100 bytes. Thanks to Tim Howe for the hardware for testing
2000-11-16Fix timeout computation; ok csapuntz@Niklas Hallqvist
2000-10-29undo this; adds files, unacceptable at this point in releaseTheo de Raadt
2000-10-28Reduce footprint of ATA driver by only having PROBE debug messages compiledConstantine Sapuntzakis
in by default.
2000-08-11DMA transfers should transition to completed state directly tooConstantine Sapuntzakis
2000-08-09Death to acd_stub.c. No longer neededConstantine Sapuntzakis
2000-08-09Unnecessary headerConstantine Sapuntzakis
2000-08-09Fixes for the BCD 48SB CD-ROM C2.4, which seems to like to dropConstantine Sapuntzakis
both DRQ and BSY. The driver has been adjusted to ignore invalid/unexpected phases while traversing the state machine. This may break drives that do no set ireason correctly.
2000-07-20Fix to ATA detect. Some devices seem to be comatose after resetConstantine Sapuntzakis
(return 0x00 status persistently). Send them identify to wake them up. Flag value 0x10000 will enable probe messages for a channel/controller. When UKC supports setting flags, this will be useful debugging failing IDE detects without kernel recompiles.
2000-06-30Convert to new timeout API.Artur Grabowski
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.
2000-01-12For reasons beyond my comprehension, touching the sdh register too muchConstantine Sapuntzakis
during probe causes the devices pain. So, I don't do that any more. :-) Also, try ATAPI_IDENTIFY_DEVICE a couple times. Seems to help with an old NEC drive.
1999-12-19Improve timeout handling in poll machineConstantine Sapuntzakis
Fix for some non-ATAPI-4 compliant drives
1999-12-14Various fixes:Constantine Sapuntzakis
Use ticks not time. Ticks is monotonically increasing. Fix error output in wdc_atapi_ctrl ATAPI errors -> SCSI errors conversion now works better Other minor cleanup
1999-12-11Cleanup.Constantine Sapuntzakis
Better timeout logic
1999-12-11ATAPI Tape drive support. Should be considered experimental.Constantine Sapuntzakis
Major restructuring of the code path that sends ATAPI packet commands. One set of functions works in polling, process, and interrupt contexts.
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-02re-enable IDENTIFY, reset delay each timeTheo de Raadt
1999-10-29NetBSD take note:Constantine Sapuntzakis
Use xfer->c_bcount and not sc_xfer->datalen when passing our buffer limit to the device. In the case of SENSE, we were sending 0 as our buffer limit, potentially confusing some devices. Cap the bytes/interrupt at 65534, which prevents odd size transfers. Odd size transfers, while not inherently evil, are kind of weird through a 16-bit wide interface.
1999-10-29Added diagnostic: "length 0 transfer in data phase"Constantine Sapuntzakis
Changed SCSI XS_TIMEOUT error to SCSI XS_RESET error to better reflect that we had to reset the bus Don't downgrade DMA modes if the transfer that failed wasn't using DMA
1999-10-29Introduce wdc_output_bytes and wdc_input_bytes to remove replicated PIO logicTheo de Raadt
Fix wdc_select_drive to no longer wait for free channel (not strictly correct but we couldn't handle a non-free channel anyway) Major changes to the ATAPI interrupt logic to reduce reliance on the drive setting the bits correctly. Deal with situation that we get length = 0 back from the drive on transfer (instead of potentially looping forever). Timeout in drive setup should not cause the drive to downgrade modes.
1999-10-09wdc layer work:Constantine Sapuntzakis
Separate wdc_probe_caps into wdc_probe_caps and wdc_print_caps for more flexibility in printing capability information. Get rid of wdc_final_attach. Include name of device (e.g. cd0), if possible, on errors. atapiscsi layer work: Put a pointer to the SCSI device into ata_drive_datas' drv_softc field Simplify, simplify, simplify. Got rid of a bunch of fields in atapiscsi_softc Delay printing capabilities until we know the real device name (e.g. st0)