summaryrefslogtreecommitdiffstats
path: root/sys/arch/sparc64/dev/fd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fdc(4/sparc64): timeout_add(9) -> timeout_add_msec(9)cheloha2020-02-201-2/+2
| | | | Copy a change from dev/isa/fd.c to sparc64's floppy driver.
* Move away from K&R style function definitions. clang is rather picky aboutclaudio2018-12-271-105/+38
| | | | | them especially if char and short arguments are used. OK otto@ deraadt@
* Don't pull in <sys/file.h> just to get fcntl.hguenther2017-12-301-2/+2
| | | | ok deraadt@ krw@
* Also pass the blk offset to disk_unbusy(), so that it can pass it toderaadt2017-05-041-5/+5
| | | | | | the random subsystem as entropy. This value is pretty much unknown, and anyways our entropy input ring does not saturate from knowns. ok mikeb djm
* Rename Debugger() into db_enter().mpi2017-04-301-2/+2
| | | | | | | Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
* remove splsoftfd and splausoftdlg2016-06-071-2/+1
| | | | | | theyre unused. ok kettenis@
* 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.
* Remove bogus semicolon.brad2014-04-281-2/+2
| | | | | | | | Pointed out by LLVM. fd.c:1378:29: error: if statement has empty body [-Werror,-Wempty-body] ok miod@
* remove the #define b_cylinder b_resid from bufs. i hated thedlg2013-11-211-15/+16
| | | | | | | | | | | | | | | | | | | 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@
* replace bare use of disksort with a bufq, modelled on the sys/dev/isa/fd.cdlg2013-11-021-15/+17
| | | | | | change. ok miod@
* Sprinkle (long long) casts where %lld is being used to print daddr_tkrw2013-11-011-6/+6
| | | | | | variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@
* (daddr_t) -> (u_int64_t) when multiplying ncylinders * secpercyl tokrw2013-10-201-2/+2
| | | | | get disk size, since DL_SETDSIZE() takes disk sector values, not 512-byte block values.
* final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt2013-06-111-6/+6
| | | | | 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-6/+18
| | | | | | 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
* Fix gap value when formatting 1.44MB 3"1/2 floppy disks; from NetBSDmiod2013-01-011-2/+2
|
* 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.
* 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@
* fix fallout from the removal of dkio.h from ioctl.hdlg2010-05-191-1/+2
|
* 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-6/+7
| | | | behaviour.
* 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-07-241-5/+5
| | | | ok kettenis@
* Second pass of simple timeout_add -> timeout_add_sec conversionsblambert2008-10-151-6/+6
| | | | | | | This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* 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-1/+19
| | | | | | driver(s). Adapted from sd driver. ok marco@
* Bring isa/fd.c into line with sparc/sparc64 fd code and prepare allkrw2008-03-201-9/+6
| | | | | | 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-8/+4
| | | | cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
* bzero the right thingderaadt2007-06-141-2/+2
|
* all drivers should spoof version 1 labelsderaadt2007-06-081-1/+2
|
* an XXsize() function that got skippedderaadt2007-06-061-2/+2
|
* now that all partition size/offsets are potentially 64-bit, change thederaadt2007-06-061-13/+18
| | | | | | | 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@
* avoid bypassing sys/queue.h in many places in the kernel.pyr2007-05-281-2/+2
| | | | | | | | many assumptions were made about the way the various list types are implemented. lots of suggestions and help from otto and miod. ok otto@
* Even floppies should use DISKLABELDEV() on the dev_t parameter tokrw2007-04-271-3/+3
| | | | | | 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@
* 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@
* Nuke dk_establish(), no longer used.miod2006-03-151-4/+1
|
* b_cylin -> b_cylinder; no functional change.miod2006-01-221-11/+9
|
* I'm Positive these are Type-O.miod2005-08-011-2/+2
|
* Increase timeout in fdcresult(), this allows fdformat(8) to work now.miod2005-03-171-9/+9
| | | | ok deraadt@
* Do not drop the user in ddb in DIAGNOSTIC checks unless option FD_DEBUG.miod2005-03-121-2/+2
|