#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
7c146c0c |
| 07-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
fd/fdc: Remove unused devclass arguments to DRIVER_MODULE.
|
Revision tags: release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0 |
|
#
f86e6000 |
| 04-Dec-2019 |
Warner Losh <imp@FreeBSD.org> |
Regularize my copyright notice
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 clai
Regularize my copyright notice
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.
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
54b4b13c |
| 24-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r326936 through r327149.
|
#
5fe4723c |
| 23-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Create a new ISA_PNP_INFO macro. Use this macro every where we have ISA PNP card support (replace by hand version in if_ed). Move module declarations to the end of some files. Fix PCCARD_PNP_INFO to
Create a new ISA_PNP_INFO macro. Use this macro every where we have ISA PNP card support (replace by hand version in if_ed). Move module declarations to the end of some files. Fix PCCARD_PNP_INFO to use nitems(). Remove some stale comments about pc98, turns out the comment was simply wrong.
show more ...
|
#
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: further adoption of SPDX licensing ID tags.
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
sys/dev: further adoption of SPDX licensing ID tags.
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.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0 |
|
#
fed2c48a |
| 21-Apr-2016 |
John Baldwin <jhb@FreeBSD.org> |
Adjust the fdc worker thread startup to work when APs are started earlier.
- Enable the commented out locking in fd_probe(). The worker thread should not be running yet (even after these changes)
Adjust the fdc worker thread startup to work when APs are started earlier.
- 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
show more ...
|
Revision tags: release/10.3.0 |
|
#
82aa34e6 |
| 04-Mar-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r296007 through r296368.
|
#
52259a98 |
| 02-Mar-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
c47476d7 |
| 27-Feb-2016 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API.
Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370
show more ...
|
Revision tags: release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0 |
|
#
356eadcd |
| 15-Mar-2005 |
Warner Losh <imp@FreeBSD.org> |
If we fail a sanity check for the resources just allocated, make sure that we free that resource. All the other resources are freed in their own routine, but since we haven't saved a pointer to this
If we fail a sanity check for the resources just allocated, make sure that we free that resource. All the other resources are freed in their own routine, but since we haven't saved a pointer to this one, it is leaked. This is the failure case that lead to the sio ports that weren't working, I think.
show more ...
|
#
d90aafb5 |
| 14-Mar-2005 |
Warner Losh <imp@FreeBSD.org> |
Only allocate 1 port for non-zero rids. Either we'll get the proper length form the enumeration mechanism, or we're dealing with the FDCTL register, which is only 1 port long.
|
#
530a6924 |
| 10-Mar-2005 |
Warner Losh <imp@FreeBSD.org> |
Fix a couple of problems with the probe code when used with pnpbios resources. When allocating 6 ports for a 4 port range isa code returns an error. I'm not sure yet why this is the case, but suspe
Fix a couple of problems with the probe code when used with pnpbios resources. When allocating 6 ports for a 4 port range isa code returns an error. I'm not sure yet why this is the case, but suspect it is just a non-regularity in how the resource allocation code works which should be corrected. Use 1 as the ports size in this case. However, in the hints case, we have to specify the length, so use 6 in that case. I believe that this is also acpi friendly.
Also, complain when we can't allocate FDOUT register space. Right now we silently fail when we can't. This failure is referred to above.
When there's no resource for FDCTL, go ahead and allocate one by hand. Many PNPBIOS tables don't list this resource, and our hints mechanism also doesn't cover that range. If we can't allocate it, whine, but fake up something. Before, we were always bogusly faking it and no one noticed the sham (save the original author who has now fixed his private shame).
show more ...
|
Revision tags: release/4.11.0_cvs, release/4.11.0 |
|
#
787a196b |
| 20-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
Mask off the upper bits of the resource before using it as an index into a small array. Also, re-save the dev in attach to avoid depending on side effects of the probe.
Weird stuff Reported by: jef
Mask off the upper bits of the resource before using it as an index into a small array. Also, re-save the dev in attach to avoid depending on side effects of the probe.
Weird stuff Reported by: jeffr
show more ...
|
#
973bfe6c |
| 19-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
MFp4: overhaul of resource allocation
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 resou
MFp4: overhaul of resource allocation
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)
show more ...
|
#
ac673f9a |
| 11-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
Use the standard FreeBSD license
|
Revision tags: release/5.3.0_cvs, release/5.3.0 |
|
#
534e7194 |
| 05-Oct-2004 |
Warner Losh <imp@FreeBSD.org> |
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 en
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...
show more ...
|
#
083ba097 |
| 20-Sep-2004 |
Warner Losh <imp@FreeBSD.org> |
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
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);
show more ...
|
#
27df52f9 |
| 17-Sep-2004 |
Warner Losh <imp@FreeBSD.org> |
The long dead hand of the past has pushed forward useless bits in this driver. Trim its fingernails by removing some useless bits before fixing the 'thread not terminated on detach' problem.
o dmac
The long dead hand of the past has pushed forward useless bits in this driver. Trim its fingernails by removing some useless bits before fixing the 'thread not terminated on detach' problem.
o dmacnt is no longer used now that we allocate at attach time. Remove it from struct fdc_data. o ISPNP was only ever set, but never tested. It used to be used for the allocation routines to change how it allocated resources. Since that's no longer necessary, retire the flag. o ISPCMICA was only ever tested, but never set. GC it. This removes a special case in determining the drive type. The drive type is now set in fdc_pcmcia.c, so the hack isn't needed anymore. Sadly, this isn't tested with a Y-E Data pcmcia floppy drive because there are a number of other issues that preclude it from working. o Fix ifdef for reading from the rtc. I'm of the opinion that this ifdef should be moved into fdc_isa.c, but not today as ideally there'd be other fixes to the probing of children. So now we just read it on i386 ! pc98 (there's no #define for MACHINE_ARCH, just MACHINE, hence this slightly inelegant kludge) and amd64. The PC98 exclusion likely isn't meaningful since pc98 uses a different driver, but will be when merging of the pc98 floppy code into this driver is complete (this is the other reason I think this block of code belongs outside fdc.c).
All of these changes are safe to MT5.
show more ...
|
#
b4046cd7 |
| 14-Sep-2004 |
Warner Losh <imp@FreeBSD.org> |
Checkpoint the fdc resource changes:
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
Checkpoint the fdc resource changes:
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.
show more ...
|
#
389bdd09 |
| 31-Aug-2004 |
Warner Losh <imp@FreeBSD.org> |
When ISA_PNP_PROBE is called, it will return 0 when it finds a device, ENOENT when there's no PNP ID for this device node, or ENXIO when there is one, but it doesn't match.
In the nonPNP case (as mo
When ISA_PNP_PROBE is called, it will return 0 when it finds a device, ENOENT when there's no PNP ID for this device node, or ENXIO when there is one, but it doesn't match.
In the nonPNP case (as most Alpha systems appear to be), we were treating the error return as an error, when it should be have ignored it. Version 1.9 properly ignored it, but the attach re-write of 1.10 introduced this logic error.
Pointy Hat to: phk (for breaking it then asking me to fix it :-) Sponsored by: The Voices in Bill Paul's Head, LLC
show more ...
|
#
75007232 |
| 20-Aug-2004 |
Nate Lawson <njl@FreeBSD.org> |
Remove a check that is too strict. With BIOSen that specify an IO/ctl port of 0x3f2-0x3f5,0x3f7 the ports are not 7 bytes apart. This should fix floppy probing on such systems. (We handle the case
Remove a check that is too strict. With BIOSen that specify an IO/ctl port of 0x3f2-0x3f5,0x3f7 the ports are not 7 bytes apart. This should fix floppy probing on such systems. (We handle the case of adjusting for a start of 0x3f2 -> 0x3f0 separately, although that code should still be checked if there are still floppy problems for others.)
Tested by: Sarunas Vancevicius <vsarunas_at_eircom.net> MFC after: 3 days
show more ...
|
#
1b67be7b |
| 20-Aug-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Rewrite of the floppy driver to make it MPsafe & GEOM friendly:
Centralize the fdctl_wr() function by adding the offset in the resource to the softc structure.
Bugfix: Read the drive-change sign
Rewrite of the floppy driver to make it MPsafe & GEOM friendly:
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).
show more ...
|