summaryrefslogtreecommitdiffstats
path: root/sys/dev/flash.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Also pass the blk offset to disk_unbusy(), so that it can pass it toderaadt2017-05-041-2/+2
| | | | | | 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
* Remove last two 'uses' of d_subtype in tree. No point in settingkrw2015-08-121-2/+1
| | | | | | | | it to 0 immediately after a bzero() of the entire label. Nor in swapping endianness since nobody looks at it. Don't touch the actual field in disklabel. Yet. ok deraadt@ as part of larger diff that needs splitting up.
* Format string fixes and removal of -Wno-format for arm kernels.miod2014-05-081-2/+2
|
* replace disksort with bufqs.dlg2013-11-111-11/+7
| | | | | i havent had any tests, so if there's any fallout ill deal with it when people hit it. i wont feel guilty about it at all though.
* Don't add sectors to blocks. Use DL_SECTOBLK() to change DL_GETPOFFSET()krw2013-10-291-2/+5
| | | | | | sector value to 512-byte-blocks before adding to b_blkno. gcc tested on zaurus by matthieu@.
* (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-5/+5
| | | | | 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-8/+1
| | | | | | 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
* Eliminate redundant buf validation checks in xxstrategy() methods nowmatthew2011-07-061-18/+10
| | | | | | | | | | | | that they're implemented consistently in bounds_check_with_label(). Also, per krw's request, change bounds_check_with_label() to return 0 if the checks succeed, and change the drivers to test == -1 instead of <= 0. (Man page update to follow; intentionally omitting arch/vax/mba/hp.c from this commit because it doesn't even build currently and miod@ promises to kill it soon.) ok krw@
* Use disk_lock_nointr() in the xxclose() routines so that they cannotderaadt2011-06-191-6/+2
| | | | | be interrupted. ok matthew
* Use disk_lock/disk_unlock directly and in the same way in these drivers,deraadt2011-06-191-10/+8
| | | | | | rather than using various wrappings. Convert vnd to using the sc_dk rwlock instead of using one of its own. ok matthew
* Get rid of the wlabel argument to bounds_check_with_label(). It'smatthew2011-06-031-2/+2
| | | | | | | | | never done anything in OpenBSD and just clutters disk drivers with silly flag handling. More cleanup to follow. ok deraadt@, millert@; no objections krw@
* - missing semicolon from r@undefined.chjasper2010-09-241-2/+2
|
* Add DIOCGPDINFO to drivers that were lacking it. Where therekrw2010-09-221-1/+6
| | | | | | | | | | | | is no easily available physical information outside of the stored disklabel just make it a synonym for DIOCGDINFO. Commit on the theory it is unlikely to harm, and fallout can be addressed in the mass re-compile that will follow j2k10. Should allow auto-allocation of disks to work with all devices. ok deraadt@
* 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@
* Recycle unused disklabel fields in order to create a disklabel uniquejsing2010-04-231-4/+1
| | | | | | | identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
* Get rid of devact enum, substitute it with an int and coresponding defines.pirofti2009-10-131-2/+2
| | | | | | This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
* Fix after readdisklabel() change.kili2009-08-181-9/+10
| | | | | Looks fine to miod@, who also reminded me to not forget to call flashunlock(sc).
* Revert bufq's. this is inline with the major midlayer reverts thatthib2009-06-171-4/+6
| | | | | | have been going on. this appears to bring us back to stable state. lots of testing by oga and ariane and my self.
* remove variable left behind by thibderaadt2009-06-041-2/+2
|
* add a flexible buffer queue (bufq) api, based on the never usedthib2009-06-031-5/+3
| | | | | | | | | one by tedu@. It doesn't do anything smart yet, it just uses plain old disksort. we also keep the old method of queueing bufs since some miods have crazy MD drivers that need some love. ok beck@, art@ tested by many on many archs.
* Don't bypass partition bounds check for RAW_PART. We now guarantee thatkrw2008-06-151-3/+2
| | | | | | | | | | | RAW_PART will always be 0 -> disksize, so the bounds check will always pass for i/o's to valid addresses. Now the i/o will be properly truncated if it goes past the end of the device. This prevents various adverse impacts of issuing i/o's for data past the end of the device. Repeatedly requested by todd@. ok weingart@ deraadt@
* b_cylinder does not need to be set on the callpath down into drivers.deraadt2007-06-201-12/+7
| | | | 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
|
* in OpenBSD as all old BSD unix, RAW_PART always starts at 0, so noderaadt2007-06-071-7/+3
| | | | need for special case code; ok krw
* 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-3/+3
| | | | | 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-7/+1
| | | | | | readdisklabel(), since all readdisklabel()'s do that already. ok deraadt@
* Don't print the error strings returned by readdisklabel(). If youkrw2007-02-151-3/+4
| | | | | | | | | 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@
* Initial NAND flash support for Zaurus, not enabled yet; prodded by many.uwe2006-11-251-0/+1099