summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-tape.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Properly change the block_size on different CD media, and use thatsos2002-07-271-2/+2
| | | | | | to calculate the max amount of data in one IO request. Correct the max size on atapi floppies/tapes as well.
* Fix the max transfer size for ATAPI devices. The spec says tosos2002-07-261-2/+2
| | | | | | transfer at most 65534 bytes, thats 126 times DEV_BSIZE not 252 :( Pointed out by: Ian Dowse <iedowse@maths.tcd.ie>
* Make the ATA driver compile & work on the sparc64 platform.sos2002-04-051-0/+1
| | | | | | | Initial work & code by tmm. Lots of changes and rearrangements by yours truely to make busdma be a little less a PITA (but I still dont like it).
* Misc little cleanups.sos2002-03-261-3/+3
|
* Add new support for locking an ATA channel and use that throughoutsos2002-03-111-1/+1
| | | | | | the ATA/ATAPI driver. This solves the concurrency problem with the new GEOM code, and also cuts a good deal of the patch size in the upcoming MFC.
* Minor cosmetic changes to minimise diffs for MFC.sos2002-03-071-1/+0
|
* Added undocumented options AAC_DEBUG, ACD_DEBUG, ACPI_MAX_THREADS,bde2002-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | ACPI_NO_SEMAPHORES, ASR_MEASURE_PERFORMANCE, AST_DEBUG, ATAPI_DEBUG, ATA_DEBUG, BKTR_ALLOC_PAGES, BROOKTREE_ALLOC_PAGES, CAPABILITIES, COMPAT_SUNOS, CV_DEBUG, MAXFILES, METEOR_TEST_VIDEO, NDEVFSINO, NDEVFSOVERFLOW, NETGRAPH_BRIDGE, NETSMB, NETSMBCRYPTO, PFIL_HOOKS, SIMOS, SMBFS, VESA_DEBUG, VGA_DEBUG. Start using #! to comment out negative options and ## to comment out broken options. atapi-all.c: Fixed rotted bits that were hiding under ATAPI_DEBUG. atapi-cd.c: #include "opt_ata.h" so that ACD_DEBUG is actually visible. ata/atapi-tape.c #include "opt_ata.h" so that AST_DEBUG is actually visible.
* Major update of the ATA RAID code, part 1:sos2002-02-041-66/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overhaul of the attach/detach code and structures, there were some nasty bugs in the old implementation. This made it possible to collapse the ATA/ATAPI device control structures into one generic structure. A note here, the kernel is NOT ready for detach of active devices, it fails all over in random places, but for inactive devices it works. However for ATA RAID this works, since the RAID abstration layer insulates the buggy^H^H^H^H^H^Hfragile device subsystem from the physical disks. Proberly detect the RAID's from the BIOS, and mark critical RAID1 arrays as such, but continue if there is enough of the mirror left to do so. Properly fail arrays on a live system. For RAID0 that means return EIO, and for RAID1 it means continue on the still working part of the mirror if possible, else return EIO. If the state changes, log this to the console. Allow for Promise & Highpoint controllers/arrays to coexist on the same machine. It is not possible to distribute arrays over different makes of controllers though. If Promise SuperSwap enclosures are used, signal disk state on the status LED on the front. Misc fixes that I had lying around for various minor bugs. Sponsored by: Advanis Inc.
* Don't call cdevsw_add().phk2001-11-041-6/+0
|
* Overhaul to minimize stack usage, in some places >2K was usedsos2001-09-201-4/+2
| | | | on the stack *blush*...
* KSE Milestone 2julian2001-09-121-3/+3
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Finally commit some of the minor things I've collected over the last month(s):sos2001-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | Add tagged queueing support for new IBM drives. Add support for Yet Another Promise ATA 100 chip. Flush disk cache on close. Dont flush the disk cache on BIO_ORDERED anymore. Cleanup the tests for DMA on ATAPI devices. Allow to share ALL irq's even the std irg 14 & 15. Fix calculation bug in end of media code on CD's. Add REZERO on opening a CDR/CDRW. Cleanup ataioctl a bit.
* Actually biofinish(struct bio *, struct devstat *, int error) is more generalphk2001-05-061-14/+5
| | | | | | than the bioerror(). Most of this patch is generated by scripts.
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Set the device names as early as possible.sos2001-03-211-3/+7
|
* Cosmetic changes.sos2001-03-191-6/+6
|
* Provide the interface to atacontrol and associated logic.sos2001-03-151-26/+34
| | | | | | | | | see atacontrol(8) for more. Also the ATA_ENABLE_ATAPI_DMA, ATA_ENABLE_WC and ATA_ENABLE_TAGS options are gone, use the tuneables listed in ata.4 instead from the loader (this makes it possible to switch off DMA before the driver has to touch the devices on broken hardware).
* Refine the detach/attach code.sos2001-03-141-4/+17
| | | | | | | | | | Proberly fail outstanding bio requests on devices that are detached. This makes it possible to change between disk/cdrom/dvd/whathaveyou in a notebook, just by suspending it, changing the device in the bay (or what you model calls it), unsuspend and the ATA driver will figure out what disappeared and properly fail those, and attach any new devices found.
* Cosmetic change to the probe printf'ssos2001-03-061-1/+1
|
* Introduce busspace instead of the good old in/out instructions.sos2001-02-061-4/+4
| | | | Not pretty but it works (I hope)...
* Add session argument to *close_disk, allowing to set session type on fixate.sos2001-01-101-1/+1
| | | | | | Add support for different blank/erase types. Update headers.
* Use M_ZERO flag on malloc when approbiate.sos2000-12-261-2/+1
|
* Staticize some malloc M_ instances.phk2000-12-081-1/+1
|
* Better handling of immediate commands, mainly to solve timeoutssos2000-11-121-1/+2
| | | | in the atapi-tape code...
* Add support for tagged queuing on ATA drives. There is only support forsos2000-09-191-48/+47
| | | | | | | | | | | | | | | | | | IBM's DPTA and DTLA series of drives (no other disk vendors are known to support this) on non-Promise controllers (promise controllers lockup when given the tagged queuing specific commands). It gives especially master/slave comboes about 5% better performance. Add support for the Promise ATA100 OEM chip (pdc20265) Add support for the Cyrix 5530 Change the way status is read from the drives, use the alternate status reg when possible. Better support for DEVFS, the acdXtY devices are now created when needed. Lots of little cleanups.
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-051-1/+1
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Complete the bio/buf divorce for all code below devfs::strategyphk2000-04-151-27/+27
| | | | | | | | | | Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-021-3/+3
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Make ATAPI CD changer devices work, hopefully better than before.sos2000-03-211-1/+1
|
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-201-4/+4
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Remove the old DSC code, it doesn't work anymore.sos2000-03-181-9/+3
|
* Cleanup sweep.sos2000-03-131-13/+13
|
* Enable disksort the right way both on ATA disks and ATAPI devices.sos2000-03-131-7/+4
|
* Cosmetics..sos2000-03-101-2/+2
|
* Fix the CD driver so that the last blocks can be read even ifsos2000-03-051-5/+5
| | | | | | a blocksize != 2k is used. Update the timeout code to try fallback to PIO if problems arise in DMA mode.
* Update the ata driver to take more advantage of newbus, thissos2000-02-181-11/+26
| | | | | | | | | | | | | | | | was needed to make attach/detach of devices work, which is needed for the PCCARD support. (PCCARD support is still not working though, more to come on that) Support the CMD646 chip which is used on many alphas, sadly only in WDMA2 mode, as the silicon is broken beyond belief for UDMA modes. Lots of cosmetic fixes here and there. Sorry for the size of this megapatchfromhell but it was not possible otherwise... newbus patches based on work from: dfr (Doug Rabson)
* Probe cosmetics.sos2000-02-081-1/+1
|
* Do refcounting of open devices (more) correctly.sos2000-02-071-4/+3
| | | | count_dev funtion by phk.
* fix support for shared IRQ's.sos2000-02-041-1/+1
| | | | | | | | | | fix support for multiple HPT & Promise controllers. support mixed 33/66 devices on the Promise 66 controllers. fix the refcount stuff in the atapi drivers. misc cleanups.
* Get the MEDIA_CHANGED status right here too.sos2000-01-281-2/+4
|
* Retry a bit more agressively on the atapi identify.sos2000-01-251-1/+1
| | | | | | | | | | | | Try to support older systems reporting irq0 for the first channels. Support sharing of the std interrupts (says peter :) ) Dont use READ_CD on normal data reads (2048 bytes), too many old drives doesn't support this command even if the std says "shall" :(, but still use READ_CD on all other blocksizes. Add the geometry to the ad probe, its still usefull.
* General cleanup.sos2000-01-241-53/+69
| | | | | | | | | | | | | | | | | | | Dont be so verbose in the probe, only ONE line printed now, to get more info boot verbose. Centralise most printf's in ata-all & ata-dma to use the ata_printf function, it saves alot of codelines. Repeat the identify command if drive fails the first. Protect the timeout functions with splbio. Dont update the transfer details before we are sure the transfer succeded, this way they are proberly retried on errors. Move the handling of next_writeable to userland. Use the READ_CD command to read CD's. That enables us to read _anything_ via the normal read/write interface. This kindof obsoletes the READAUDIO ioctl, but we keep that for now.
* Rearrange the probecode, so that 80pin cables can be identifiedsos2000-01-181-10/+7
| | | | | | | correctly on both master and slave. Smash together the ata_params & atapi_params structures as they are more or less equal anyways. Get rid of the last SYSINIT's in here.
* Add support for VIA 82C596 controllersos2000-01-031-1/+1
| | | | | | | | Better shared irq handeling for Promise & HPT366 controllers Setup prober PIO mode timings on Promise & HPT366 controllers Update Copyright headers to be Y2K compliant :)
* Yet another cleanup of the VIA code, this time it should worksos1999-12-211-11/+0
| | | | | | | | | | | | | | | on all combinations (I hope)... Add DMA support for the AMD 756 chip (K7 chipset) this is actually the same as the VIA 82C686 chip (the ATA part that is). Treat the intel MX chipset PIIX as a PIIX4 Allow UDMA on all disks that say they can handle it. Cleanup probe printf's a bit Remove alot of the old #ifdef DEBUG crap.
* Have another go at the VIA support, this time use the PCI ID form thesos1999-12-141-0/+1
| | | | | | | | main component in the southbridge chip to determine which VIA chip we are dealing with. Try to enable DMA on generic controllers that say they has the capability, instead of relying on the BIOS to have set it up.
* Add DMA support for the SiS 5591 and old PIIX chipsets.sos1999-12-131-0/+2
| | | | | | | | | | | | | | | | | | | | | Add a missing DELAY(1) in ata_wait. Change the info from ad_version, so the ATA version from the disk can be used to quantify the DAM modes valid for this drive, ie be more selective with turning DMA on on older disks that should not support it.. Fix the probe for BIOS enabled DMA in the generic case, master/slave was reversed in the test. Check the return for ata_command in all cases, and print warnings if it fails. Call ata_dmainit with all dmamodes off when falling back to PIO mode, that should take care of both the Promise & HPT366 controllers not being able to handle the fallback... Cleanup the printf's in the drivers, use the prober device name (if possible) instead of ataN-master/slave.
* Change the devstat priorities to the std values now in devicestats.hsos1999-12-081-1/+1
|
* Add DMA support for the VIA 82C586 & 82C686 chips, also rearrangesos1999-11-241-1/+1
| | | | | | | | to fall back to slower speeds if the faster ones fails to probe. Log and retry request on UDMA CRC errors. Fix a couple of warnings.
* Make the atapi device return sensible errno's back to userland.sos1999-11-101-3/+5
| | | | Dont panic if a nonexistant device is opened.
OpenPOWER on IntegriCloud