summaryrefslogtreecommitdiff
path: root/sys/dev/ofw/ofdisk.c
AgeCommit message (Collapse)Author
2020-01-26Fix __HAVE_OLD_DISKLABEL bits so they at least compile.thorpej
2019-03-27Add a disk ioctl DIOCRMWEDGES to remove all wedges of a given diskmartin
(if not busy).
2017-03-25Virtio block devices may have a "scsi" device_type instead of "block",martin
so accept both.
2015-04-26Use C99-style initializers for struct dkdriver.mlelstv
2014-12-31make more drivers use disk_ioctl, and add a dev parameter to it so thatchristos
we can merge the "easy" disklabel ioctls to it. Ultimately all this will go do dk_ioctl once all the drivers have been converted.
2014-12-31Centralize wedge ioctls in disk_ioctl.christos
2014-11-09support DIOCMWEDGES ioctlmlelstv
2014-07-25Add d_discard to all struct cdevsw instances I could find.dholland
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25Add d_discard to all struct bdevsw instances I could find.dholland
I've set them all to nodiscard. Some of them (wd, dk, vnd, ld, raidframe, maybe cgd) should be implemented for real.
2014-03-16Change (mostly mechanically) every cdevsw/bdevsw I can find to usedholland
designated initializers. I have not built every extant kernel so I have probably broken at least one build; however I've also found and fixed some wrong cdevsw/bdevsw entries so even if so I think we come out ahead.
2011-07-26convert to device_t, cfdata_t and CFATTACH_DECL_NEW.mrg
2009-05-12struct device * -> device_t, no functional changes intended.cegger
2009-05-12struct cfdata * -> cfdata_t, no functional changes intended.cegger
2008-06-12use device_lookup_private to get softccegger
2008-04-08use aprint_*_dev and device_xnamecegger
2007-10-17Correct the order of the arguments to disk_init().he
2007-10-08Merge disk init changes from the vmlocking branch. These seperate init /ad
destroy of 'struct disk' from attach / detach.
2007-07-29It's not a good idea for device drivers to modify b_flags, as they don'tad
need to understand the locking around that field. Instead of setting B_ERROR, set b_error instead. b_error is 'owned' by whoever completes the I/O request.
2007-07-21Replace some uses of lockmgr().ad
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2007-01-29Remove more duplicate headers.hubertf
Patch by Slava Semushin <slava.semushin@gmail.com> Again, this was tested by comparing obj files from a pristine and a patched source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs, src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers were detected in 'objdump -d' output.
2006-03-29Use device_private().thorpej
2005-12-11merge ktrace-lwp.christos
2005-06-09Now that OF_read and OF_write have different signatures, we need tohe
cast one of them before assigning to a common function pointer. Yes, this breaks strict type checking, but is needed to compile with -Wcast-qual turned on.
2005-02-27nuke trailing whitespaceperry
2004-09-25Add support for wedges to the OpenFirmware disk driver.thorpej
2004-04-23use safer string manipulation functionitojun
2003-05-10Change bounds_check_with_label() to take a pointer to the disk structure,thorpej
rather than the label itself. This paves the way for some future changes.
2003-05-02Change return type of readdisklabel() to const char *dsl
I hope I've found all the correct places!
2002-11-01implement separate read/write disk statistics:mrg
- disk_unbusy() gets a new parameter to tell the IO direction. - struct disk_sysctl gets 4 new members for read/write bytes/transfers. when processing hw.diskstats, add the read&write bytes/transfers for the old combined stats to attempt to keep backwards compatibility. unfortunately, due to multiple bugs, this will cause new kernels and old vmstat/iostat/systat programs to fail. however, the next time this is change it will not fail again. this is just the kernel portion.
2002-10-23merge kqueue branch into -currentjdolecek
kqueue provides a stateful and efficient event notification framework currently supported events include socket, file, directory, fifo, pipe, tty and device changes, and monitoring of processes and signals kqueue is supported by all writable filesystems in NetBSD tree (with exception of Coda) and all device drivers supporting poll(2) based on work done by Jonathan Lemon for FreeBSD initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-02Add trailing ; to CFATTACH_DECL.thorpej
2002-09-30Use CFATTACH_DECL().thorpej
2002-09-27Declare all cfattach structures const.thorpej
2002-09-18fix error checking in ofdisk_open().chs
remove all vesitages of dk_establish().
2002-09-06Merge the gehenna-devsw branch into the trunk.gehenna
This merge changes the device switch tables from static array to dynamically generated by config(8). - All device switches is defined as a constant structure in device drivers. - The new grammer ``device-major'' is introduced to ``files''. device-major <prefix> char <num> [block <num>] [<rules>] - All device major numbers must be listed up in port dependent majors.<arch> by using this grammer. - Added the new naming convention. The name of the device switch must be <prefix>_[bc]devsw for auto-generation of device switch tables. - The backward compatibility of loading block/character device switch by LKM framework is broken. This is necessary to convert from block/character device major to device name in runtime and vice versa. - The restriction to assign device major by LKM is completely removed. We don't need to reserve LKM entries for dynamic loading of device switch. - In compile time, device major numbers list is packed into the kernel and the LKM framework will refer it to assign device major number dynamically.
2001-11-13add RCSIDslukem
2001-08-26Make compile with -Wmissing-prototype -Wstrict-prototypesmatt
2001-08-25Make this compile with -Wmissing-prototypes by adding appropriatematt
cdev_decl, bdev_decl, cons_decl
2001-01-08Return error in the case of using ODIOCGDINFO or ODIOCGDEFLABEL whenfvdl
the number of partitions is > OLDMAXPARTITIONS. This is better than silently truncating the label (don't want to silently throw away partitions when using an old disklabel binary on a label with > 8 partitions). From Enami Tsugutomo.
2001-01-07Adapt all disk devices in MI directories to handle ODIOC* callsfvdl
for ports that have bumped MAXPARTITIONS (and thus define __HAVE_OLD_DISKLABEL).
2000-05-16Nuke dk_establish() from orbit except from those ports which still usethorpej
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those platforms should be changed to use device_register(). In the mean time, those ports defined __BROKEN_DK_ESTABLISH.
1998-03-21-Wall (one real bug, even!)cgd
1998-02-24Minor style change.mycroft
1998-02-24Several things:mycroft
Clean up the name space here a bit. Add a `busname' element to struct ofprobe (now struct ofbus_attach_args), and check against it. Nuke `ofroot'. Rename the `openfirm' attribute to `ofbus'.
1998-01-12Update for config changes.thorpej
1997-10-08Oops, fix a couple of typos.thorpej
1997-10-08Implement DIOCGDEFLABEL.thorpej
1997-07-23Fix an oversight and a typo.thorpej
1997-06-24Three changes to ofdsize():thorpej
- If the partition is already open, skip the open/close step. (Sync with other disk drivers.) - foosize()'s return value is in DEV_BSIZE units; adjust the size obtained from the disklabel accordingly. - Pass correct arguments to ofdopen() and ofdclose().