summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa/fd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-3/+3
| | | | after discussions with beck deraadt kettenis.
* Fix a few format string bugs with -DDEBUGsf2014-06-151-2/+2
|
* Attempt to approximate what should happen on a suspend/resume cycle.deraadt2013-12-281-1/+12
| | | | | | | | If the driver was doing some IO, we remove the timeouts, and force the fdc state machine into IOTIMEDOUT state with the final timeout count before a clean retry. In theory upon resume it should freak out quietly, and try the operation again. Noone has stepped forward to test this yet.
* remove the #define b_cylinder b_resid from bufs. i hated thedlg2013-11-211-12/+17
| | | | | | | | | | | | | | | | | | | overloading of that thing. the only hardware that seems to care about cylinders in our tree are floppy drives, and the drivers for those calculate their own cylinders from logical block addresses and ignore whatever the rest of the kernel thought b_cylinders should be. most of this diff is moving the floppy drivers to using b_resid as a resid and using that as part of the calculation for real cylinder values. the rest of the diff is getting rid of the useless assignments to b_cylinder that dont get used by anything (now that disksort is gone). ok miod@
* Sprinkle (long long) casts where %lld is being used to print daddr_tkrw2013-11-011-4/+5
| | | | | | variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@
* move fd(4) from directly using disksort to using bufqs.dlg2013-11-011-15/+18
| | | | tested by me and rapha@
* final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt2013-06-111-4/+4
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others
* Enforce ca_activate tree-walks over the entire heirarchy for all events,deraadt2013-05-301-7/+17
| | | | | | cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
* Convert to ANSI.matthew2011-07-041-72/+22
| | | | ok md5
* Drop kernel support for the useless DIOCWLABEL ioctl and prune a lotmatthew2011-06-051-7/+1
| | | | | | | | | of silly flag twiddling code in various disk drivers. ok deraadt@, miod@ N.B., users will need a -current disklabel(8) to be able to write new disklabels to disk now.
* Do not #include <sys/dkstat.h> if you don't need anything from it.miod2010-11-181-2/+1
| | | | ok krw@ deraadt@
* Introduce a DKF_NOLABELREAD flag, which is used by a device to preventjsing2010-09-231-1/+2
| | | | | | automatic reading of disklabel on attach. ok deraadt@ miod@ krw@
* All users of physio(9) now pass NULL as the buf pointer argument, somatthew2010-09-221-3/+3
| | | | | | | no point in keeping it around. "i like this" thib@ (a while back); ok krw@ and oga@; reminder to update the man page and tweaks jmc@
* Store a struct device pointer within struct disk and populate this whenjsing2010-09-081-2/+2
| | | | | | | disk_attach() is called by the device driver. We will be building on this shortly. ok deraadt@ krw@
* Garbage collect struct dkdriver.matthew2010-08-281-4/+1
| | | | ok miod@; "please go ahead" jsing@
* dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisdlg2010-05-181-1/+2
| | | | | | | | | | | gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
* Recycle unused disklabel fields in order to create a disklabel uniquejsing2010-04-231-3/+1
| | | | | | | identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
* Add DIOCSDINFO support to the three fd drivers. No change to existingkrw2009-09-121-7/+9
| | | | behaviour.
* Don't pass uninitialized stack memory to setdisklabel() as the 'old'krw2009-09-061-4/+5
| | | | | | | | label. Use the existing label, since we now check and reuse some values in it. And that's what all other drivers do. Bonus: we don't need that label on the stack anymore. ok deraadt@
* - fix format strings for values that are daddr64_tjasper2009-08-241-3/+3
| | | | ok otto@, agreed by deraadt@
* - remove double \n in panic stringjasper2009-08-241-2/+2
|
* - turn a printf(), which predated a panic()-function that could take printf-like arguments,jasper2009-08-231-5/+2
| | | | | | into panic() and remove call to Debugger() hint and ok deraadt@
* Replace the error strings that were being passed around with much simplerderaadt2009-08-131-9/+4
| | | | | | | | | errnos. Note that the error strings are being ignored, since we long ago decided to not spam the console, and there is no other nice way to use the errors (without changing the ioctls to pass it back) The errno is now useful, since we can pass b_error from failing IO up, and the drive can decide how to use that ok miod
* timeout_add -> timeout_add_msecblambert2009-08-051-4/+4
| | | | ok krw@
* Fix some minor format string problems found in a maze of false positivesderaadt2009-06-021-2/+2
| | | | | provided by Parfait ok oga
* Second pass of simple timeout_add -> timeout_add_sec conversionsblambert2008-10-151-5/+5
| | | | | | | This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
* Bring biomem diff back into the tree after the nfs_bio.c fix went in.deraadt2008-06-121-2/+2
| | | | ok thib beck art
* back out biomem diff since it is not right yet. Doing very largederaadt2008-06-111-2/+2
| | | | | | | | file copies to nfsv2 causes the system to eventually peg the console. On the console ^T indicates that the load is increasing rapidly, ddb indicates many calls to getbuf, there is some very slow nfs traffic making none (or extremely slow) progress. Eventually some machines seize up entirely.
* Fix buffer cache pending read statistics by ensuring we can identifybeck2008-06-101-2/+2
| | | | | | | | biowait() reads that do *not* come from the buffer cache - we use the B_RAW flag to identify these at art's suggestion - since it makes sense and the flag was not being used. this just flags all these buffers with B_RAW - biodone already ignores returned buffers marked B_RAW. ok art@
* Add support for DIOCRLDINFO, DIOCGPDINFO, DIOCGPART to the fdkrw2008-03-221-3/+20
| | | | | | driver(s). Adapted from sd driver. ok marco@
* Fix typo/pasto in commented out debug printf(). sc_dv -> sc_dev.krw2008-03-211-2/+2
|
* Bring isa/fd.c into line with sparc/sparc64 fd code and prepare allkrw2008-03-201-34/+80
| | | | | | for the addition of missing disklabel related ioctl's. ok deraadt@
* More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' wherekrw2007-10-011-3/+2
| | | | obvious.
* b_cylinder does not need to be set on the callpath down into drivers.deraadt2007-06-201-7/+4
| | | | cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
* all drivers should spoof version 1 labelsderaadt2007-06-081-1/+2
|
* now that all partition size/offsets are potentially 64-bit, change thederaadt2007-06-061-4/+4
| | | | | | | type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
* use six new macros to access & store the 48-bit disklabel fields relatedderaadt2007-06-051-2/+2
| | | | | to size. tested on almost all machines, double checked by miod and krw next comes the type handling surrounding these values
* Don't initialize d_partitions[RAW_DISK] just before callingkrw2007-06-011-6/+1
| | | | | | readdisklabel(), since all readdisklabel()'s do that already. ok deraadt@
* 2nd one found: If you really wish to make a function __inline (which willderaadt2007-05-081-3/+3
| | | | | | be called once), please also make it static so that the compiler does not generate a 2nd one to export to outside callers! that is a stupid waste of space.
* Even floppies should use DISKLABELDEV() on the dev_t parameter tokrw2007-04-271-3/+4
| | | | | | readdisklabel/writedisklabel. ok deraadt@ weingart@ conceptual ok drahn@
* Don't print the error strings returned by readdisklabel(). If youkrw2007-02-151-2/+2
| | | | | | | | | need the debug info uncomment the printf's you need. Crude but effective way to suppress 'no disklabel' errors that pop up at the most innconvenient times to frighten users. More elegant method, DPRINTF-like constructs or something, later. "Yay!" marco@ ok deraadt@
* Consistently spell FALLTHROUGH to appease lint.jsg2007-02-141-3/+3
| | | | ok kettenis@ cloder@ tom@ henning@
* 'tranfer' -> 'transfer' in comments.krw2006-12-211-3/+3
|
* Kernel stack can be swapped. This means that stuff that's on the stackmiod2006-11-291-3/+1
| | | | | | | | | | should never be referenced outside the context of the process to which this stack belongs unless we do the PHOLD/PRELE dance. Loads of code doesn't follow the rules here. Instead of trying to track down all offenders and fix this hairy situation, it makes much more sense to not swap kernel stacks. From art@, tested by many some time ago.
* Zap D_REMOVABLE flag from disklabel. If you didn't already know thatkrw2006-09-261-2/+1
| | | | | | | | floppies and cd's were removable, displaying that fact in disklabel output was unlikely to help. And the display in disklabel was the only use of D_REMOVABLE in the tree. ok marco@
* RAW_PART p_size on floppies and mcd's should be in sectors.krw2006-08-131-3/+2
| | | | | | | | | Only 'Japanese 1.2MB' floppies have sectors that are not 512 bytes, according to isa/fd.c's fd_types[]. SCSI/ATAPI cd's already use sectors, and mcd cd's should be no different. So there should be no functional change.
* Define and use FD_BSIZE, similar to FD_BSIZE from sparc and sparc64krw2006-08-131-9/+7
| | | | | | | fd. Eliminate unused variable and FDC_BSIZE which was only used to set value of the unused variable. No change to object file.
* Nuke dk_establish(), no longer used.miod2006-03-151-2/+1
|