summaryrefslogtreecommitdiff
path: root/sys/dev/ccd
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/4.8.0_cvscvs2svn2003-04-031-1/+1
| | | | | | | 'RELENG_4_8_0_RELEASE'. This commit was manufactured to restore the state of the 4.8-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
* MFC: Fix some signed/unsigned integer confusion, and add bounds checking ofKris Kennaway2001-09-111-0/+3
| | | | | | | | | arguments to some functions. Approved by: jkh Notes: svn path=/stable/4/; revision=83330
* Remove #if NCCD > 0 - it's guaranteed to be true by config if ccd.c isPeter Wemm2000-01-291-2/+0
| | | | | | | being compiled. (NCCD is used elsewhere though :-( ) Notes: svn path=/head/; revision=56825
* Cleanup some remaining bdev fluff.Poul-Henning Kamp2000-01-161-35/+6
| | | | Notes: svn path=/head/; revision=56098
* Give vn_isdisk() a second argument where it can return a suitable errno.Poul-Henning Kamp2000-01-101-3/+1
| | | | | | | Suggested by: bde Notes: svn path=/head/; revision=55756
* Remove unused variableEivind Eklund1999-12-211-1/+0
| | | | Notes: svn path=/head/; revision=54934
* Introduce NDFREE (and remove VOP_ABORTOP)Eivind Eklund1999-12-151-6/+13
| | | | Notes: svn path=/head/; revision=54655
* Revamp the devstat priority system. All disks now have the same priority.Kenneth D. Merry1999-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | The same goes for CD drivers and tape drivers. In systems with mixed IDE and SCSI, devices in the same priority class will be sorted in attach order. Also, the 'CCD' priority is now the 'ARRAY' priority, and a number of drivers have been modified to use that priority. This includes the necessary changes to all drivers, except the ATA drivers. Soren will modify those separately. This does not include and does not require any change in the devstat version number, since no known userland applications use the priority enumerations. Reviewed by: msmith, sos, phk, jlemon, mjacob, bde Notes: svn path=/head/; revision=54279
* Convert various pieces of code to use vn_isdisk() rather than checkingPoul-Henning Kamp1999-11-221-12/+1
| | | | | | | | | | | for vp->v_type == VBLK. In ccd: we don't need to call VOP_GETATTR to find the type of a vnode. Reviewed by: sos Notes: svn path=/head/; revision=53577
* Remove the devsw magic from DEV_MODULE()Poul-Henning Kamp1999-11-071-1/+2
| | | | Notes: svn path=/head/; revision=52965
* Removal of sys/device.hNick Hibma1999-10-051-1/+0
| | | | | | | | | | | | | | | | - Move intrhook stuff into kernel.h - Remove all occurrences of #device <device.h> - Add kernel.h were necessary (nowhere) - delete device.h This file contained the structures for cfdata (old style config) and is no longer used. It was included by most drivers. It confuses the remote debugger as the definition of 'struct device' in device.h is found before the one in bus_private.h. Notes: svn path=/head/; revision=51957
* Correct typo in comment. putccdbuf() releases a buffer, it doesn't allocate ↵Greg Lehey1999-09-271-1/+1
| | | | | | | one. Notes: svn path=/head/; revision=51714
* Buffer locking code failed to use BUF_KERNPROC and BUF_UNLOCK andMatthew Dillon1999-09-271-1/+34
| | | | | | | | | | | | BUF_LOCKFREE a buffer prior to physically freeing it. While these bugs did not cause a crash, they might in the future. Added eof handling for unlabeled partitions. Submitted by: Tor.Egge@fast.no Notes: svn path=/head/; revision=51701
* Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp1999-09-251-5/+0
| | | | | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags Notes: svn path=/head/; revision=51658
* Cleanup CCD quite a bit, including adding clarifying comments.Matthew Dillon1999-09-231-147/+357
| | | | | | | | | | | | | | | | | | Enhance MIRROR code. Add a few more sanity checks and implement a zone-based disk selector to make use of both disks when reading. Also implement a read fail-over. If a read error occurs on one disk, the I/O is retried on the other. NOTE: CCD's mirroring support cannot deal with write errors properly in regards to recovery, meaning that 'old' data under a write error may be read non-deterministically if you reboot after a write error, and CCD certainly cannot deal with a disk changeout. And it still can't. Use vinum if you are really serious about mirroring. CCD basically just implements a poor-man's mirror. Notes: svn path=/head/; revision=51601
* Fix ccdiodone code. The code was using cbp->cb_buf.b_bcount toMatthew Dillon1999-09-231-1/+10
| | | | | | | | | sum the total amount of I/O issued to determine when all the I/O has completed. This fails when the EOF boundry occurs in the middle of an I/O. Using cbp->cb_buf.b_bufsize works better. Notes: svn path=/head/; revision=51600
* Fix bug in pseudo-geometry calculation code that assumed a sector sizeMatthew Dillon1999-09-231-1/+1
| | | | | | | smaller then 1024 bytes. Notes: svn path=/head/; revision=51580
* Use devstat_end_transaction_buf() rather than Use devstat_end_transaction()Poul-Henning Kamp1999-09-181-8/+1
| | | | Notes: svn path=/head/; revision=51376
* Changes to centralise the default blocksize behaviour.Julian Elischer1999-09-091-4/+0
| | | | | | | | | More likely to follow. Submitted by: phk@freebsd.org Notes: svn path=/head/; revision=51111
* Revert a bunch of contraversial changes by PHK. AfterJulian Elischer1999-09-031-0/+1
| | | | | | | | | | | | | a quick think and discussion among various people some form of some of these changes will probably be recommitted. The reversion requested was requested by dg while discussions proceed. PHK has indicated that he can live with this, and it has been agreed that some form of some of these changes may return shortly after further discussion. Notes: svn path=/head/; revision=50830
* Make bdev userland access work like cdev userland access unlessPoul-Henning Kamp1999-08-301-1/+0
| | | | | | | | | | | | | the highly non-recommended option ALLOW_BDEV_ACCESS is used. (bdev access is evil because you don't get write errors reported.) Kill si_bsize_best before it kills Matt :-) Use the specfs routines rather having cloned copies in devfs. Notes: svn path=/head/; revision=50623
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Initialize the dev->si_bsize fields.Poul-Henning Kamp1999-08-261-1/+5
| | | | | | | | Submitted by: tegge Reviewed by: phk Notes: svn path=/head/; revision=50403
* Spring cleaning around strategy and disklabels/slices:Poul-Henning Kamp1999-08-141-4/+4
| | | | | | | | | | | | | | | | | Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout. please see comment in sys/conf.h about the flag argument. Remove strategy argument from all the diskslice/label/bad144 implementations, it should be found from the dev_t. Remove bogus and unused strategy1 routines. Remove open/close arguments from dssize(). Pick them up from dev_t. Remove unused and unfinished setgeom support from diskslice/label/bad144 code. Notes: svn path=/head/; revision=49771
* Use the vn_todev() function, rather than VOP_GETATTRPoul-Henning Kamp1999-07-181-20/+2
| | | | Notes: svn path=/head/; revision=48885
* Fix 2nd arg to udev2dev() call in ccd.cPoul-Henning Kamp1999-07-171-2/+2
| | | | Notes: svn path=/head/; revision=48865
* Initialize and hold locks for ccd generated bufs..Peter Wemm1999-06-271-3/+6
| | | | | | | Obtained from: Matt Dillon <dillon@backplane.com> Notes: svn path=/head/; revision=48268
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-05-301-6/+21
| | | | | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors. Notes: svn path=/head/; revision=47625
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledPoul-Henning Kamp1999-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl). Notes: svn path=/head/; revision=47028
* Continue where Julian left off in July 1998:Poul-Henning Kamp1999-05-071-2/+2
| | | | | | | | | | | | | | | | | Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.) Notes: svn path=/head/; revision=46635
* Introduce two functions: physread() and physwrite() and use these directlyPoul-Henning Kamp1999-05-071-16/+2
| | | | | | | | | in *devsw[] rather than the 46 local copies of the same functions. (grog will do the same for vinum when he has time) Notes: svn path=/head/; revision=46625
* Don't use <sys/disk.h>Poul-Henning Kamp1999-05-061-34/+27
| | | | Notes: svn path=/head/; revision=46576
* Fixed variable overflow problem.David Greenman1999-03-111-5/+5
| | | | | | | Obtained from: NetBSD via Mark J. Taylor <mtaylor@cybernet.com> Notes: svn path=/head/; revision=44671
* Don't forget to remove devstat entries when takingMatt Jacob1999-03-101-1/+6
| | | | | | | down the CCD device. Notes: svn path=/head/; revision=44617
* Set the devstat priority for ccd devices to DEVSTAT_PRIORITY_CCDKenneth D. Merry1999-02-181-2/+2
| | | | | | | instead of DEVSTAT_PRIORITY_OTHER. Notes: svn path=/head/; revision=44126
* Add a prioritization field to the devstat_add_entry() call so thatKenneth D. Merry1999-02-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | peripheral drivers can determine where in the devstat(9) list they are inserted. This requires recompilation of libdevstat, systat, vmstat, rpc.rstatd, and any ports that depend on the devstat code, since the size of the devstat structure has changed. The devstat version number has been incremented as well to reflect the change. This sorts devices in the devstat list in "more interesting" to "less interesting" order. So, for instance, da devices are now more important than floppy drives, and so will appear before floppy drives in the default output from systat, iostat, vmstat, etc. The order of devices is, for now, kept in a central table in devicestat.h. If individual drivers were able to make a meaningful decision on what priority they should be at attach time, we could consider splitting the priority information out into the various drivers. For now, though, they have no way of knowing that, so it's easier to put them in an easy to find table. Also, move the checkversion() call in vmstat(8) to a more logical place. Thanks to Bruce and David O'Brien for suggestions, for reviewing this, and for putting up with the long time it has taken me to commit it. Bruce did object somewhat to the central priority table (he would rather the priorities be distributed in each driver), so his objection is duly noted here. Reviewed by: bde, obrien Notes: svn path=/head/; revision=43819
* Fix warnings preparing for -Wall -Wcast-qualMatthew Dillon1999-01-271-17/+17
| | | | | | | | Also disable one usb module in LINT due to fatal compilation errors, temporary. Notes: svn path=/head/; revision=43295
* Convert ccd to a proper module vs. something started by PSEUDO_SET().Peter Wemm1999-01-221-14/+30
| | | | Notes: svn path=/head/; revision=43076
* Update system to new device statistics code.Justin T. Gibbs1998-09-151-48/+18
| | | | | | | | Submitted by: "Kenneth D. Merry" <ken@plutotech.com> mike@smith.net.au (Mike Smith) Notes: svn path=/head/; revision=39228
* Make struct buf->b_offset reflect the real byte offset which gotSøren Schmidt1998-08-191-1/+2
| | | | | | | | in via the uio struct. This enables device drivers to use != DEV_BSIZE blocking on devices with wierd sector/block sizes (ie CDROM's). Notes: svn path=/head/; revision=38438
* There is no such thing any more as "struct bdevsw".Julian Elischer1998-07-041-8/+22
| | | | | | | | | | | | | | | | | | | | | There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind. Notes: svn path=/head/; revision=37389
* VOP_STRATEGY grows an (struct vnode *) argumentJulian Elischer1998-07-041-3/+3
| | | | | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org> Notes: svn path=/head/; revision=37384
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-2/+2
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Slightly more correct initialisation of the new buf struct for soft-updates.Julian Elischer1998-03-091-1/+3
| | | | | | | | Submitted by: Chris Csanady <ccsanady@friley585.res.iastate.edu> Suggested by: Kirk McKusick Notes: svn path=/head/; revision=34437
* Properly bzero() structures after they're returned from getccdbuf().Jordan K. Hubbard1998-02-221-1/+3
| | | | | | | Submitted by: Chris Csanady <ccsanady@friley585.res.iastate.edu> Notes: svn path=/head/; revision=33740
* Revert part of my previous patch - I don't see the *need*Jordan K. Hubbard1998-02-151-3/+1
| | | | | | | to call splbio() from within an interrupt handler here. :-) Notes: svn path=/head/; revision=33365
* missing spl() call and off by one error in the handling of the partitions.Jordan K. Hubbard1998-02-151-2/+3
| | | | | | | | Submitted by: Chris Csanady <ccsanady@friley585.res.iastate.edu> Obtained from: OpenBSD Notes: svn path=/head/; revision=33363
* Remove unused devfs include. (Julian or Satoshi might want to add properEivind Eklund1998-01-311-4/+1
| | | | | | | | DEVFS support here; just including the header file doesn't do any good, and would make this depend on opt_devfs.h) Notes: svn path=/head/; revision=32921
* There is no ccdread() nor ccdwrite().Poul-Henning Kamp1997-11-181-3/+1
| | | | Notes: svn path=/head/; revision=31270
* Statizice.Poul-Henning Kamp1997-10-241-21/+24
| | | | Notes: svn path=/head/; revision=30688