summaryrefslogtreecommitdiffstats
path: root/sys/scsi/worm.c
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* First set of changes to eliminate the ad-hoc device buffer queues,dyson1995-11-191-12/+10
| | | | | | replacing them with TAILQ's as appropriate. The SCSI code is the first to be changed -- until the changes are complete, both b_act and b_actf will be in the buf structure. b_actf will eventually be removed.
* Make a lot of things static.phk1995-10-211-13/+13
|
* Some bug fixes for the worm driver:joerg1995-10-091-9/+13
| | | | | | | | | | | | | | | o don't use polled mode after the device probe phase o don't biodone() a NULL buffer pointer o increase the timeout for scsi_read_capacity(); WORMs are slooow o make WORMMs known to scsiconf at all This brings the driver in a state where it at least doesn't immediately panic, nor hangs the controller any more. Unfortunately, at least the YAMAHA CDR100 i've been testing with answered my write attempts with an "Incorrect command sequence" response. Perhaps other CD burners might work however. Reviewed by: dufault
* Remove trailing whitespace.rgrimes1995-05-301-9/+9
|
* Change defintion of unit to minor(dev). Sorry for notdufault1995-05-031-4/+2
| | | | having this in my local build. Thanks to gpalmer.
* Try to make this work again. Peter's last changes left it like :gpalmer1995-05-031-4/+4
| | | | | | | | loading kernel worm.o: Undefined symbol `_STUNIT' referenced from text segment I copied the STUNIT definition from the old scsiconf.c into this file to work around this problem.
* Set SCSI_NOSLEEP only when we really need to. This requires an additionalgibbs1995-04-231-7/+7
| | | | | | | | flags parameter to all xxstart routines so that the correct information can be passed down into the device specific routines. This is needed to ensure that ccb/scb allocation routines don't hang. Submitted by: John Dyson
* Declare wakeup() non-implicitly and don't bogusly cast its arg.bde1995-04-231-2/+3
|
* 1. Add text for ASC/ASCQdufault1995-03-151-3/+3
| | | | | 2. Clean up probe messages. This is how I propose it looks for 2.1 so if you don't like it you have my e-mail address.
* 1. Change driver signatures to full signature for slice support.dufault1995-03-041-0/+360
2. Add "pt" (processor type) driver. 3. Add "worm" (Write Once) driver for Jordan.
OpenPOWER on IntegriCloud