summaryrefslogtreecommitdiffstats
path: root/sys/scsi/worm.c
Commit message (Collapse)AuthorAgeFilesLines
* Obsoleted by CAM.gibbs1998-09-151-1811/+0
|
* Fixed printf format errors.bde1998-08-181-4/+4
|
* There is no such thing any more as "struct bdevsw".julian1998-07-041-7/+23
| | | | | | | | | | | | | | | | | | 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.
* Added used include of "ioconf.h" - don't depend on pollution inbde1998-06-171-1/+3
| | | | | <sys/conf.h>. I'm fixing isa interrupt handler configuration and this is just a quick fix to keep SCSI configuration unharmed.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-3/+3
| | | | | | | | | | 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.
* Attempt to fix BOUNCE_BUFFERS. I cannot test these drivers, but theypeter1998-04-161-1/+24
| | | | | seem to compile OK with the bounce buffer mods. I have only visually checked for missing bounce buffer support, I could have missed some.
* Support compiling with `gcc -ansi'.bde1998-04-151-2/+2
|
* Add an ioctl to retrieve the next writable address.jmz1998-03-311-19/+98
| | | | | | Defer the WRITE SESSION command until the first write command, so that it works like the prepare track command, allowing the device to be closed after the command.
* Staticize.eivind1998-02-091-2/+2
|
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-1/+2
| | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
* Fix some breakage that prevented the Plasmon burners from being usedjoerg1997-12-261-67/+66
| | | | | | | | | | | | | | | | | | under -current. The actual preparation of the next track will now be deferred until just before the first write operation. Otherwise, opening the device with write intent will cause the execution of commands that are illegal in `limited command set mode' (i.e., after the write channel has been opened). While i was at it, cleaned up the worm_open() function a bit. Removed the volume overflow pre-check in worm_strategy(). It was time-consuming, and rather useless in many cases anyway (with the size being reported for just the entire volume only), so we can as well let the actual SCSI command fail instead, where it'll properly be reported as EIO. Partially submitted by & discussed with: jmz
* Protect against a null pointer dereferencation in the case of anjoerg1997-12-201-1/+12
| | | | | | | unknown drive. Such a drive will be configured by worm(4) nevertheless (albeit with a warning), but cannot be opened except of the SCSI control device (so scsi(8) or cdrecord will continue to work).
* In all such uses of struct buf: 's/b_un.b_addr/b_data/g'phk1997-12-021-2/+2
|
* Use a MODE SELECT command to reset the block size, instead of calling thejmz1997-10-271-13/+33
| | | | prepare_track() function, which caused fixation problems with some drives.
* Convert to use the new bufq* functions for dealing with buffergibbs1997-09-211-5/+5
| | | | queues.
* Removed unused #includes.bde1997-09-021-3/+1
|
* My previous commit was incomplete because it ignored the READ case.jmz1997-08-011-1/+2
| | | | | Now set explicitly the block size to 2048 when the device is opened for reading.
* Ignore the block size returned by scsi_read_capacity(): this value isjmz1997-07-261-2/+3
| | | | | rarely correct and the block size is already specified in the prepare_track() functions.
* Don't depend on gcc's feature of permitting labels that aren't followedbde1997-07-011-2/+2
| | | | by a statement.
* Add 2 new ioctls: WORMIOCREADSESSIONINFO and WORMIOCWRITESESSION.jmz1997-06-021-5/+145
| | | | | | These commands are required for the "Disk-At-Once" write process: WORMIOCREADSESSIONINFO returns the length of the lead-in and lead-out areas and WORMIOCWRITESESSION is used to send the table of contents of the disk.
* The correct way to combine 2 4bit values into a 8bit one is (a<<4) | b, notjmz1997-05-281-7/+7
| | | | | (a<<8) || b. The conical hat please!
* A few improvements to the worm driver.jmz1997-05-191-187/+318
| | | | | | | | | | | | | | | | | | | | | | | | | - remove all calls to scsi_stop_unit(). Some drives refuse commands when stopped. This will fix the 'device not configured' message which was cleared after opening/closing the tray. - Never set the logical block address in the scsi_cmd struct when writing. The computation was bogus for block sizes not a multiple of DEV_BSIZE. (the bug is still there in the READ case) - reset the block size to the 2048 bytes in finalize_track() track to avoid an error when mounting a disk after an audio write. - remove the WORMIOCQUIRKSELECT ioctl. Quirks are now recorded at probe time (see scsiconf.c) - change and expand the argument to the WORMIOCPREPTRACK ioctl. It now possible to select more track options (copy bits, ISRC codes, track type, track number) - add an error handler to catch false errors (warnings in fact) and record the error type. - add an ioctl call (WORMIOERROR) to get more information on the nature of the error when a command or a write failed. - add an ioctl call (WORMIOCFINISHTRACK) to finalize a track without closing the device (closing the device still finalize the track if the command was not performed) Approved by: joerg
* Add the D_DISK flag to the cdevsw structs of various CD-ROM drivers.joerg1997-05-101-2/+2
|
* Duplicate the TOC handling ioctls from the cd(4) driver. Duplicatingjoerg1997-05-051-2/+182
| | | | | | | | the work is silly, and all this will be a moot point with Justin's CAM driver, and there are still many ioctls missing -- but i need these right now. It's silly to need to move the CD-R back to the other drive in order to determine the session start info when burning multi- session CD-Rs.
* Implement dkstats for worm devices so they show up in iostat et al.jkh1997-04-041-1/+22
| | | | | | | | I got tired of not seeing my worm stats show up during a burn. :) [Joerg, I just stapled in 1MB/sec for a bogus xfer rate and left seek = 1, as suggested - I'm not going to dynamically calculate the xfer rate from a known device spectable, OK? :-)] Reviewed by: joerg
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Removed nested #includes of <scsi/scsi_debug.h> and <scsi/scsi_driver.h>bde1997-03-231-1/+3
| | | | from <scsi/scsiconf.h> and fixed everything that depended on them.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* After so many people have been bugging me :), finally implementjoerg1997-02-061-52/+80
| | | | | | | | | | | | | | | | | read-mode access to CD-ROM media in the worm(4) driver. No whistles and bells yet, like all the CDIO* commands, but at least a start. In order to do this, i had to slightly rearrange the semantics of an open(2) on the worm driver: now, opening it with O_NONBLOCK set means no actual IO operations will be intended but only ioctls are to be processed. This mode is used by wormcontrol(8) to prepare a track and/or session. I have only been able to test this on a 2.2-GAMMA system by now, and only the !DEVFS part is tested yet. Also, i have only done a dummy burn so far, but wouldn't expect many surprises else. Report bugs to me ASAP, if there's reasonable demand and i hear no objections, i might consider merging it into the 2.2 branch as well.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Updates and bugfixes to the worm driver:joerg1996-11-061-12/+15
| | | | | | | | | | | | | . also detect the Phlips CDD2000; it's software-compatible with the HP part Submitted by: cau@cc.gatech.edu (Carlos Ugarte) . correct the blocksize handling for CD-DA tracks, and fix multitrack handling Submitted by: nsayer@quack.kfu.com (Nick Sayer) 2.2 candidates!
* Various cleanups for remanents of devconf.phk1996-09-081-5/+1
|
* Turn SCSIDEBUG into a new-style option.joerg1996-07-141-1/+2
|
* Using devfs_add_devswf() instead of devfs_add_devsw()scrappy1996-03-281-9/+5
| | | | Reviewed by: julian@freebsd.org
* u_int8 -> u_int8_tjkh1996-03-101-6/+6
|
* Cleanse the SCSI subsystem of its internally defined typesgibbs1996-03-101-16/+16
| | | | | u_int32, u_int16, u_int8, int32, int16, int8. Use the system defined *_t types instead.
* Add the HP4020i CD-R as a known device.joerg1996-02-021-2/+246
| | | | | | Reorder the CD-R entries in knowndevs[]. Submitted by: fred@jjarray.umd.edu (Fred Cawthorne)
* Remove redundant declaration for worminit(). Dunno why my config(8)joerg1996-01-291-2/+1
| | | | didn't generate it, but it's supposed to.
* Make worm.c compile with -Wall -Werror again.joerg1996-01-281-7/+7
| | | | | | . remove some unused variables . declare worminit() right this time, it's actually extern (?) . use wormminphys(), now that it's already there (hope i've got this right)
* Minor but fatal spelling error when merging my code into -current.joerg1996-01-281-3/+5
| | | | | | Also declared worminit() to avoid a compiler warning. Seems that the other SCSI drivers don't declare XXinit() yet, so perhaps we'd also create a typedef for these func's.
* The Great Merge.joerg1996-01-271-43/+550
| | | | | | | | | | The worm driver is alpha-usable! I've stuffed everything that is needed into the kernel driver, including the logic to select between different vendor's quirks. Disclaimer: this has by now _only_ been tested on a heavily tweaked 2.0.5R system. I've done my best to retrofit it into -current, but i don't have a chance yet to test it in a -current environment.
* Fold in my latest changes to the worm driver.joerg1996-01-201-6/+17
| | | | | | | | | | | | This makes it sorta usable, just for my ``proof-of-concept'' Perl script i've been posting to freebsd-scsi. The driver will be overhauled further, this is just to provide Jordan with a base to perform testing of his own with his HP burner. Use entirely at your own risk, expect a bunch of misburnt CD-R's when using it already in this very green stage. Note that by now the driver will only work when the CD-R has already been in the drive at boot time.
* Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme.wollman1996-01-051-1/+3
|
* Introduce a wormunit() so the control device will work.joerg1996-01-021-2/+7
|
* Another mega commit to staticize things.phk1995-12-141-3/+2
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-2/+2
|
* Pass 3 of the great devsw changesjulian1995-12-081-33/+35
| | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
* fix a couple of stuffups in the worm driver and in other associated scsi filesjulian1995-12-051-17/+5
|
* If you're going to mechanically replicate something in 50 filesjulian1995-11-291-2/+2
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-11-291-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | That's EVERY SINGLE driver that has an entry in conf.c.. my next trick will be to define cdevsw[] and bdevsw[] as empty arrays and remove all those DAMNED defines as well.. Each of these drivers has a SYSINIT linker set entry that comes in very early.. and asks teh driver to add it's own entry to the two devsw[] tables. some slight reworking of the commits from yesterday (added the SYSINIT stuff and some usually wrong but token DEVFS entries to all these devices. BTW does anyone know where the 'ata' entries in conf.c actually reside? seems we don't actually have a 'ataopen() etc... If you want to add a new device in conf.c please make sure I know so I can keep it up to date too.. as before, this is all dependent on #if defined(JREMOD) (and #ifdef DEVFS in parts)
OpenPOWER on IntegriCloud