aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fdc/fdc_pccard.c
Commit message (Collapse)AuthorAgeFilesLines
* Tag pccard drivers with gone in 13.Warner Losh2020-08-201-2/+3
| | | | | | | | | MFC After: 3 days Reviewed by: emaste, brooks, adrian (on twitter) Differential Revision: https://reviews.freebsd.org/D26095 Notes: svn path=/head/; revision=364430
* Regularize my copyright noticeWarner Losh2019-12-041-2/+1
| | | | | | | | | | | | o Remove All Rights Reserved from my notices o imp@FreeBSD.org everywhere o regularize punctiation, eliminate date ranges o Make sure that it's clear that I don't claim All Rights reserved by listing All Rights Reserved on same line as other copyright holders (but not me). Other such holders are also listed last where it's clear. Notes: svn path=/head/; revision=355394
* Need to NULL terminate this list. It worked before by accidental dataWarner Losh2017-12-221-0/+1
| | | | | | | in the module following it that terminated the search. Notes: svn path=/head/; revision=327085
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Adjust the fdc worker thread startup to work when APs are started earlier.John Baldwin2016-04-211-1/+3
| | | | | | | | | | | | | | | | | | | - Enable the commented out locking in fd_probe(). The worker thread should not be running yet (even after these changes), but better to be safe than sorry. - Defer starting the worker thread until after the child drives have been probed. The worker thread startup is moved into a fdc_start_worker() thread that the various front ends call at the end of attach. As a side effect this fixes a few edge cases that weren't shutting down the worker thread if attach encountered a late failure. - When executing the initial reset requested by attach in the worker thread, use DELAY() instead of a tsleep() if cold is set. Tested by: Howard Su <howard0su@gmail.com> Sponsored by: Netflix Notes: svn path=/head/; revision=298426
* Replace several bus_alloc_resource() calls using default arguments with ↵Justin Hibbits2016-02-191-2/+1
| | | | | | | | | | | | bus_alloc_resource_any() Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306 Notes: svn path=/head/; revision=295790
* Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO buildingWarner Losh2015-12-111-0/+1
| | | | | | | | | | | | block. Use it in all the PNP drivers to export either the current PNP table. For uart, create a custom table and export it using MODULE_PNP_INFO since it's the only one that matches on function number. Differential Review: https://reviews.freebsd.org/D3461 Notes: svn path=/head/; revision=292079
* Remove duplicate header includesKevin Lo2011-06-281-2/+0
| | | | Notes: svn path=/head/; revision=223624
* Eliminate an unused variable reported by coverityWarner Losh2008-11-231-4/+2
| | | | | | | Submitted by: Ganbold Notes: svn path=/head/; revision=185235
* Eliminate unused argument in PCMCIA_CARD macro.Warner Losh2005-06-241-1/+1
| | | | | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite) Notes: svn path=/head/; revision=147580
* MFp4: overhaul of resource allocationWarner Losh2005-01-191-14/+16
| | | | | | | | | | | | | | | | | | | | Rather than have a twisty maze of special case allocations, move instead to a data driven allocation. This should be the most robust way to cope with the resource problems that the multiplicity of ways of encoding 5 registers that have the misfortune of not being a power of 2 nor contiguous. Also, make it less impossible that pccard will work. I've not been able to get my libretto floppy working, but it now fails later than before. phk and I had similar ideas on this during the 5.3 release cycle, but it wasn't until recently that I could test more than one allocation scenario. MFC After: 1 month (5.4 if possible, 5.5 if not) Notes: svn path=/head/; revision=140469
* Use the standard FreeBSD licenseWarner Losh2005-01-111-7/+5
| | | | Notes: svn path=/head/; revision=140040
* Checkpoint the fdc resource changes:Warner Losh2004-09-141-4/+10
| | | | | | | | | | | | | | | o Allow for up to 3 resource I/O ranges to be given for the floppy controller, rather than just two that are allowed for now. o Make sure that we can work with either a base address of 0x3f0 or 0x3f2. o Create new inline functions to access the YE DATA's unique BDCR register. o Update pccard attachment to add the fd device. o Do some minor style(9) polishing. # I'm guessing that the fdc pccard attachment broke some time ago, since # there are a number of issues with it still. Notes: svn path=/head/; revision=135212
* Rewrite of the floppy driver to make it MPsafe & GEOM friendly:Poul-Henning Kamp2004-08-201-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Centralize the fdctl_wr() function by adding the offset in the resource to the softc structure. Bugfix: Read the drive-change signal from the correct place: same place as the ctl register. Remove the cdevsw{} related code and implement a GEOM class. Ditch the state-engine and park a thread on each controller to service the queue. Make the interrupt FAST & MPSAFE since it is just a simple wakeup(9) call. Rely on a per controller mutex to protect the bioqueues. Grab GEOMs topology lock when we have to and Giant when ISADMA needs it. Since all access to the hardware is isolated in the per controller thread, the rest of the driver is lock & Giant free. Create a per-drive queue where requests are parked while the motor spins up. When the motor is running the requests are purged to the per controller queue. This allows requests to other drives to be serviced during spin-up. Only setup the motor-off timeout when we finish the last request on the queue and cancel it when a new request arrives. This fixes the bug in the old code where the motor turned off while we were still retrying a request. Make the "drive-change" work reliably. Probe the drive on first opens. Probe with a recal and a seek to cyl=1 to reset the drive change line and check again to see if we have a media. When we see the media disappear we destroy the geom provider, create a new one, and flag that autodetection should happen next time we see a media (unless a specific format is configured). Add sysctl tunables for a lot of drive related parameters. If you spend a lot of time waiting for floppies you can grab the i82078 pdf from Intels web-page and try tuning these. Add sysctl debug.fdc.debugflags which will enable various kinds of debugging printfs. Add central definitions of our well known floppy formats. Simplify datastructures for autoselection of format and call the code at the right times. Bugfix: Remove at least one piece of code which would have made 2.88M floppies not work. Use implied seeks on enhanced controllers. Use multisector transfers on all controllers. Increase ISADMA bounce buffers accordingly. Fall back to single sector when retrying. Reset retry count on every successful transaction. Sort functions in a more sensible order and generally tidy up a fair bit here and there. Assorted related fixes and adjustments in userland utilities. WORKAROUNDS: Do allow r/w opens of r/o media but refuse actual write operations. This is necessary until the p4::phk_bufwork branch gets integrated (This problem relates to remounting not reopening devices, see sys/*/*/${fs}_vfsops.c for details). Keep PC98's private copy of the old floppy driver compiling and presumably working (see below). TODO (planned) Move probing of drives until after interrupts/timeouts work (like for ATA/SCSI drives). TODO (unplanned) This driver should be made to work on PC98 as well. Test on YE-DATA PCMCIA floppy drive. Fix 2.88M media. This is a MT5 candidate (depends on the bioq_takefirst() addition). Notes: svn path=/head/; revision=134081
* Clean up resources properly if attach fails. Always reset ISA drives onNate Lawson2004-07-151-2/+12
| | | | | | | probe. Notes: svn path=/head/; revision=132216
* Add a comment separator.Nate Lawson2004-07-141-1/+1
| | | | Notes: svn path=/head/; revision=132166
* Fix the pccard attachment to have a chance of working.Warner Losh2004-07-141-21/+49
| | | | | | | Move the resource allocation into the bus front ends. Notes: svn path=/head/; revision=132137
* Don't depend on implicit include of machine/bus.h in sys/rman.h, but insteadWarner Losh2004-07-131-0/+2
| | | | | | | explicitly include it. Notes: svn path=/head/; revision=132080
* Remove unnecessary softc bzero calls.Nate Lawson2004-07-121-1/+0
| | | | Notes: svn path=/head/; revision=132050
* Update in preparation for adding the ACPI attachment.Nate Lawson2004-07-121-12/+5
| | | | | | | | | | | | | | | | | * Add an fdtype ivar. This will be the equivalent of fd->type. * Move enabling the FIFO to the end of attach. * Unify reset code into fdc_initial_reset(). * Add fdc_write_ivar(). * Update isa and pccard attachments accordingly. * Set the flags unconditionally in probe since they may be overridden by other probe routines. Both before and now, we're depending on probe being called a final time on the winning driver so the flags we get are the ones we intended. * Use the bus accessor macros instead of defining our own. * Remove duplicate assigns of fd->type. Notes: svn path=/head/; revision=132048
* Until I'm ready to commit the better pccard probe/attach routines, effectivelyWarner Losh2004-07-111-0/+2
| | | | | | | comment them out. Notes: svn path=/head/; revision=131983
* Break out the isa and pccard front ends from fdc. This is the firstWarner Losh2004-07-071-0/+114
step in making this driver more attachment neutral. Others plan on adding acpi front ends. Still need to cleanup the MI part of the driver because it isn't as bus independent as it could be. Notes: svn path=/head/; revision=131767