summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-fd.c
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the PC98 platform to the ATA driver.sos2002-12-031-0/+4
| | | | | | | | | | | | | | | | This mostly consists of functionality to serialize accesses to the two ATA channels (which can also be used to "fix" certain PCI based controllers). Add support for Acard controllers. Enable the ATA driver in PC98 GENERIC, and add device hints. Update man page with latest support. The PC98 core team has kindly provided me with a PC98 machine that made this all possible, thanks to all that contributed to that effort, without that this would probably newer have been possible.. Approved by: re@
* (This commit touches about 15 disk device drivers in a very consistentphk2002-09-201-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.) If struct disklabel is the messenger: kill the messenger. Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead. Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels. Once that is clear, <sys/disk.h> which is included in the drivers no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in, the few places that needs them, have gotten explicit #includes for them. The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it. This concludes (modulus any mistakes) the series of disklabel related commits. I belive it all amounts to a NOP for all the rest of you :-) Sponsored by: DARPA & NAI Labs.
* OK, dont rely on the upper layers handling iosize_max correctly,sos2002-07-281-7/+2
| | | | | | instead rely on ATAPI devices ability to do the work instead. MFC material.
* Properly change the block_size on different CD media, and use thatsos2002-07-271-1/+1
| | | | | | 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-1/+1
| | | | | | transfer at most 65534 bytes, thats 126 times DEV_BSIZE not 252 :( Pointed out by: Ian Dowse <iedowse@maths.tcd.ie>
* Fix the transfer size calculation.sos2002-07-221-1/+1
|
* Use si_iosize_max to tell the upper layers not to use moresos2002-06-191-43/+18
| | | | | than 32K chunks on ZIP drives instead of deblocking it in the driver.
* Fixed printf format errors which apparently crept in while -Wformat wasbde2002-05-251-1/+1
| | | | disabled for gcc-3.
* 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.
* Major update of the ATA RAID code, part 1:sos2002-02-041-51/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Overhaul to minimize stack usage, in some places >2K was usedsos2001-09-201-20/+12
| | | | 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
* Make the disk mini-layer check for and handle zero-length transfersphk2001-05-061-7/+0
| | | | instead of the underlying drivers.
* Actually biofinish(struct bio *, struct devstat *, int error) is more generalphk2001-05-061-11/+4
| | | | | | 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/+4
|
* Provide the interface to atacontrol and associated logic.sos2001-03-151-28/+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).
* Add support for the IOMEGA Clik!sos2001-03-141-0/+16
| | | | | | IOMEGA deserves a medal for making the most nonstandard ATAPI devices, if they are ignorant or just not smart enough I don't know, but somebody should help them out of their misery...
* Refine the detach/attach code.sos2001-03-141-20/+36
| | | | | | | | | | 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
|
* 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-6/+2
| | | | in the atapi-tape code...
* Remove unneeded includessos2000-09-201-1/+0
| | | | Pointed out by: phk
* Add support for tagged queuing on ATA drives. There is only support forsos2000-09-191-25/+26
| | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | (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-2/+2
|
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | | 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.
* Cleanup sweep.sos2000-03-131-5/+5
|
* Enable disksort the right way both on ATA disks and ATAPI devices.sos2000-03-131-8/+5
|
* Cosmetics..sos2000-03-101-2/+2
|
* Fix the CD driver so that the last blocks can be read even ifsos2000-03-051-4/+4
| | | | | | 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-10/+22
| | | | | | | | | | | | | | | | 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)
* The bde script has a bug, I used a patch from it verbatim, bad idea....sos2000-02-081-2/+2
| | | | Fixed...
* Do refcounting of open devices (more) correctly.sos2000-02-071-5/+5
| | | | count_dev funtion by phk.
* fix support for shared IRQ's.sos2000-02-041-6/+8
| | | | | | | | | | 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.
* cosmetic changes only.sos2000-01-291-2/+4
|
* Use atapi_test_ready not atapi_wait_ready, I need more sleep :(sos2000-01-281-1/+1
|
* Get the MEDIA_CHANGED status right.sos2000-01-281-1/+2
|
* Fix the atapi-fd.c (afd device) so that fx MSDOS formatted ZIPsos2000-01-281-3/+4
| | | | | | | | disks can be mounted. Use b_pblkno instead of b_blkno Found by: phk Protect (proberly) against setting modes on nonexisting devices.
* 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-22/+35
| | | | | | | | | | | | | | | | | | | 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-9/+6
| | | | | | | 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.
* Guard against transfers of zero length given to *strategy.sos2000-01-071-1/+8
|
* 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 :)
OpenPOWER on IntegriCloud