aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fdc
Commit message (Collapse)AuthorAgeFilesLines
* MFC: fdc.c, rev. 1.306Pyun YongHyeon2005-03-011-2/+5
| | | | | | | | | | Add missing va_end() in fdc_cmd. 0 -> NULL in arguments of fdc_sense_int(). Reminded by: joerg Notes: svn path=/stable/5/; revision=142885
* MFC:Poul-Henning Kamp2005-02-281-1/+7
| | | | | | | Add the missing fflag argument to geom-class ioctl methods. Notes: svn path=/stable/5/; revision=142792
* MFC: /*- and my license changes for sys/[a-d]*Warner Losh2005-01-303-24/+18
| | | | Notes: svn path=/stable/5/; revision=141016
* MFC: Remove a duplicate code.Yoshihiro Takahashi2004-11-101-1/+0
| | | | Notes: svn path=/stable/5/; revision=137521
* MFC: Remove hacks to set device flags now that they're no longer neededNate Lawson2004-11-071-3/+0
| | | | | | | and clean up some printfs for npx. Notes: svn path=/stable/5/; revision=137357
* MFC:Warner Losh2004-10-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | revision 1.16 date: 2004/10/05 07:18:11; author: imp; state: Exp; lines: +4 -4 Yet another case of resources: + * 9: 0x3f0-0x3f3,0x3f4-0x3f5,0x3f7 This requires only one change to support. Rather than keying on the size of the resource being 2, instead key off the end & 7 being 3. This covers the same cases that the size of 2 would catch, but also covers the new above case. In addition, I think it is clearer to use the end in preference to the size and start for case #8 as well. Turns two tests into one, and catches no other cases. Make minor commentary changes to deal with new case #9. # This change is specifically minimal to allow easy MFC. A more # extensive change will go into current once I've had a chance to test # it on a lot of hardware... Approved by: re@ (kensmith) Forgotten by: imp@ Notes: svn path=/stable/5/; revision=137023
* MFC of 1.296:Peter Edwards2004-10-101-0/+1
| | | | | | | | | | | Fix off-by-one error in fd_native_types that results in a panic on boot for machines with 2.88M floppies. Reviewed by: phk Approved by: re (scottl@) Notes: svn path=/stable/5/; revision=136361
* MFC: Fix the fdc_acpi attach function to only fall back to enumeratingJohn Baldwin2004-09-301-5/+9
| | | | | | | | | | drives via hints if the _FDE enumeration fails but earlier steps all succeeded. Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135987
* MFC: Merge case 8 into the resource allocation from 1.15:Warner Losh2004-09-291-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >>revision 1.15 >>date: 2004/09/20 06:12:19; author: imp; state: Exp; lines: +14 -4 >>das@ has a ACPI bios that lists 0x3f0-0x3f1, 0x3f2-0x3f3, 0x3f4-0x3f5 >>and 0x3f7. fdc_isa_alloc_resource() didn't work right in this case >>(it accessed FDOUT correctly due to an overflow of the first resource. >>It accesed FDSTS and FDDATA incorrectly via the second resource (which >>wound up accessing FDOUT and the tape register at 0x3f3) and badly for >>the CTL register (at location 0x3f4). This is a minimal fix that just >>'eats' the first one if it covers two locations and has an offset of >>0. This confusion lead the floppy driver to think there'd been a disk >>change, which uncovered a deadlock in the floppy/geom code which lead >>to a panic. These changes fix that by fixing the underlying resource >>problem, but doesn't address the potential deadlock issue that might >>still be there. >> >>This is a minimal fix so it can more safely be merged into 5 w/o risk >>for known working configurations (hence the use of the ugly goto, >>which reduces case 8 to case 6 w/o affecting cases 1-7). A more >>invasive fix that will handle more ACPI resource list diversity is in >>the pipeline that should kill these issues once and for all, while >>staying within the resources that we allocate. >> >>Tested/Reported by: das >>Reviewed by: njl >>MFC before: re->next_release_name(5.3-BETA5); If you get floppy hangs on boot, please try after this patch and let me know if they are solved. Approved by: re@ (scottl) Notes: svn path=/stable/5/; revision=135921
* MFC: Use floppy drive unit number, not floppy controller unit numberPoul-Henning Kamp2004-09-251-1/+1
| | | | | | | | | for creating /dev entries. Approved by: re::scottl Notes: svn path=/stable/5/; revision=135794
* MFC: Merge in phk's new floppy driver.Warner Losh2004-09-186-2116/+1544
| | | | | | | Approved by: re@ Notes: svn path=/stable/5/; revision=135415
* MFC rev 1.4, 1.5: Fix _FDE and _FDI probing.Nate Lawson2004-09-031-11/+35
| | | | | | | Approved by: re (scottl) Notes: svn path=/stable/5/; revision=134712
* MFC rev 1.11: Remove too-strict register offset check.Nate Lawson2004-08-231-4/+0
| | | | | | | Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=134192
* Remove confused comment.Poul-Henning Kamp2004-08-141-4/+0
| | | | Notes: svn path=/head/; revision=133727
* Fix ACPI floppy enumeration for three types of divergent behavior.Nate Lawson2004-07-281-40/+90
| | | | | | | | | | | | | | | | | | | | * Some systems have _FDE and child floppy devices, but no _FDI. This seems to be compatible with the standard. Don't error out if there is no _FDI. Instead, continue on to the next device. The normal fd probe will take care of this device. * Some systems have _FDE but no child devices in AML. For these, add a second pass that compares the results of _FDE to the presence of devices. If not present, add the missing device. * Some BIOS authors didn't read the spec. They use tape drive values for all fdc(4) devices. Since this isn't grossly incompatible with the required boolean value, use them. They also define the _FDE items as a package instead of buffer. Regenerate the buffer from the package if it is present. Tested by: tjr, marcel Notes: svn path=/head/; revision=132810
* Correct typo.Yoshihiro Takahashi2004-07-171-1/+1
| | | | Notes: svn path=/head/; revision=132285
* Remove duplicate include.Yoshihiro Takahashi2004-07-171-1/+0
| | | | Notes: svn path=/head/; revision=132284
* Be consistant with probeWarner Losh2004-07-161-2/+1
| | | | Notes: svn path=/head/; revision=132271
* Clean up resources properly if attach fails. Always reset ISA drives onNate Lawson2004-07-152-15/+31
| | | | | | | probe. Notes: svn path=/head/; revision=132216
* Re-work for fdc_acpi. Expose fdc_add_child() and move the staticNate Lawson2004-07-152-27/+36
| | | | | | | | | | | | hints-based probe to fdc_hints_probe(). Also: * Fix some resource leaks when attach fails. * Remove the FDC_ATTACHED flag. It was supposed to prevent multiple unloads but this is not necessary. Notes: svn path=/head/; revision=132215
* Add an ACPI floppy drive attachment that probes via the _FDE and _FDINate Lawson2004-07-151-0/+260
| | | | | | | | | | methods. It also now handles ordinary floppy drive probing for drives attached to ACPI. Reviewed by: imp Notes: svn path=/head/; revision=132214
* Add a comment separator.Nate Lawson2004-07-141-1/+1
| | | | Notes: svn path=/head/; revision=132166
* Remove fdc_alloc_resources, which should have happened in last commit.Warner Losh2004-07-142-143/+2
| | | | Notes: svn path=/head/; revision=132139
* Fix the pccard attachment to have a chance of working.Warner Losh2004-07-142-32/+214
| | | | | | | Move the resource allocation into the bus front ends. Notes: svn path=/head/; revision=132137
* Set fdc_dev in attachWarner Losh2004-07-131-0/+1
| | | | Notes: svn path=/head/; revision=132081
* Don't depend on implicit include of machine/bus.h in sys/rman.h, but insteadWarner Losh2004-07-133-0/+5
| | | | | | | explicitly include it. Notes: svn path=/head/; revision=132080
* Remove unnecessary softc bzero calls.Nate Lawson2004-07-122-2/+0
| | | | Notes: svn path=/head/; revision=132050
* Update in preparation for adding the ACPI attachment.Nate Lawson2004-07-124-68/+94
| | | | | | | | | | | | | | | | | * 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-074-304/+405
| | | | | | | | | | | 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
* Allocate the DMA channel shareable and only aquire it while thePoul-Henning Kamp2004-07-051-15/+18
| | | | | | | | | device is open. This allows certain old and rather special dual floppy controllers to work on both channels, as long as you only have one open at a time. Notes: svn path=/head/; revision=131648
* Mark our interrupt shareable and don't insist on DMA. This gets us closerPoul-Henning Kamp2004-07-041-4/+4
| | | | | | | to working with a secondary floppy controller on a PC. Notes: svn path=/head/; revision=131599
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-8/+8
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Use rman_get_start in preference to reaching into the rman structure.Warner Losh2004-05-271-1/+1
| | | | Notes: svn path=/head/; revision=129787
* Update to reflect new location in the tree. This has been repo copiedWarner Losh2004-05-171-1/+1
| | | | | | | | from sys/isa/fd.c in preparation for specialization of attachments for different busses. Notes: svn path=/head/; revision=129316
* Fixed breakage of the formatting operation in rev.1.266. The wrongBruce Evans2004-04-251-2/+9
| | | | | | | | | clause of an if-else statement was removed. Reviewed by: no response from maintainer in 12 days Notes: svn path=/head/; revision=128632
* Remove advertising clause from University of California Regent'sWarner Losh2004-04-072-8/+0
| | | | | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson Notes: svn path=/head/; revision=128019
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-9/+7
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Remove unused FDNUMTOUNIT() macroPoul-Henning Kamp2004-02-291-2/+0
| | | | Notes: svn path=/head/; revision=126400
* Make mode setting with fdcontrol(8) stick.Poul-Henning Kamp2004-02-251-182/+61
| | | | | | | Recognize when configured for "auto". Notes: svn path=/head/; revision=126232
* Device megapatch 4/6:Poul-Henning Kamp2004-02-211-1/+2
| | | | | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
* Device megapatch 1/6:Poul-Henning Kamp2004-02-211-2/+0
| | | | | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
* Workaround some ACPI BIOSen which break the IO port into multipleNate Lawson2004-02-151-1/+35
| | | | | | | | | | | | | | | | resources. (Note that the correct range is 0x3f7,0x3f0-0x3f5.) Such devices will be detected as follows: fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0 To do this, we find the minimum and maximum start addresses for the resources and use them as the base for the IO and control ports. Help from: jhb Notes: svn path=/head/; revision=125851
* Look at the equipment list for amd64 as well as i386 for autodetectingPeter Wemm2003-10-231-2/+2
| | | | | | | floppy drives in the absence of hints. Notes: svn path=/head/; revision=121403
* Eliminate use bio_blkno.Poul-Henning Kamp2003-10-181-16/+10
| | | | Notes: svn path=/head/; revision=121215
* Pick up softc from dev_t rathern than through newbus gymnastics.Poul-Henning Kamp2003-09-171-11/+12
| | | | Notes: svn path=/head/; revision=120154
* Since it is static these days, there is no reason to uppercase thePoul-Henning Kamp2003-09-171-4/+4
| | | | | | | first letter of fdopen() to avoid nameclashing with other stuff. Notes: svn path=/head/; revision=120153
* Disable the use of cloning use in floppy and CD drivers.Poul-Henning Kamp2003-09-111-6/+6
| | | | | | | | | | | | | This commit puts the relevant code snippets under #ifdef GONE_IN_5 (rather than #ifndef BURN_BRIDGES) thereby disabling the code now. The code wil be entirely removed before 5.2 unless we find reasons why this would be a bad idea. Approach suggested by: imp Notes: svn path=/head/; revision=119994
* Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES.Poul-Henning Kamp2003-09-051-3/+19
| | | | | | | | | | | | | | For the floppy driver, use fdcontrol to manipulate density selection. For the CD drivers, the 'a' and 'c' suffix is without actual effect and any applications insisting on it can be satisfied with a symlink: ln -s /dev/cd0 /dev/cd0a Ongoing discussion may result in these pieces of code being removed before the 5-stable branch as opposed to after. Notes: svn path=/head/; revision=119761
* - Use the new resource_disabled() helper function to see if devices areJohn Baldwin2003-07-021-3/+2
| | | | | | | | | | | | | | | disabled. - Change the apm driver to match the acpi driver's behavior by checking to see if the device is disabled in the identify routine instead of in the probe routine. This way if the device is disabled it is never created. Note that a few places (ips(4), Alpha SMP) used "disable" instead of "disabled" for their hint names, and these hints must be changed to "disabled". If this is a big problem, resource_disabled() can always be changed to honor both names. Notes: svn path=/head/; revision=117167