summaryrefslogtreecommitdiffstats
path: root/sys/scsi/sd.c
Commit message (Collapse)AuthorAgeFilesLines
* Changed cncheckc() interface so that it is 8-bit clean - return -1bde1996-09-141-3/+3
| | | | instead of 0 if there is no input.
* Remove devconf, it never grew up to be of any use.phk1996-09-061-24/+1
|
* Second phase of merge, get rid of more machine-independent-dependencies.asami1996-09-031-1/+4
| | | | | | Get rid of pc98/pc98/pc98_device.h. Submitted by: The FreeBSD(98) Development Team
* The sd and od drivers didn't check for negative block numbers (like wd.cpeter1996-08-021-3/+3
| | | | | | | | does) before calling dscheck(). dscheck() doesn't appreciate this and calls Debugger() and returns without setting bp->b_error. This can happen when there is a casting error and offsets > 2G are converted to negative off_t's in the disk tools. (dumpfs used to do this).
* Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.phk1996-07-231-12/+3
| | | | | | | | | Saves about 280 butes of source per driver, 56 bytes in object size and another 56 bytes moves from data to bss. No functional change intended nor expected. GENERIC should be about one k smaller now :-)
* The Great PC98 Merge.asami1996-06-141-2/+41
| | | | | | | | All new code is "#ifdef PC98"ed so this should make no difference to PC/AT (and its clones) users. Ok'd by: core Submitted by: FreeBSD(98) development team
* Don't fiddle page tables by hand, use pmap_enter.phk1996-05-021-4/+4
| | | | (copied from wd.c)
* removed:phk1996-05-021-2/+2
| | | | | | | | | CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei() ptei() kvtopte() ptetov() ispt() ptetoav() &c &c new: NPDEPG Major macro cleanup.
* Fixed group of disk devices (was wheel or games, now operator).bde1996-03-271-8/+15
| | | | | | | | | | | Added scsi control devices. Converted almost everything that I changed to use devfs_add_devswf() and verbose id macros. st.c: Renamed enrst* to erst* since that's what the current name is (enrst seems to be an old name).
* Cleanse the SCSI subsystem of its internally defined typesgibbs1996-03-101-23/+23
| | | | | u_int32, u_int16, u_int8, int32, int16, int8. Use the system defined *_t types instead.
* Add more options into the conf/options and i386/conf/options.i386 filespeter1996-03-021-1/+2
| | | | | | and the #include hooks so that 'make depend' is more useful. This covers most of the options I regularly use (but not all) and some other easy ones.
* First attempt at creating devfs entries for sliced devices. Doesn'tbde1996-01-271-9/+10
| | | | | | | | | | | | | | | | | | | | quite work yet, so the heart of it is disabled. Added bdev and cdev args to dsopen(). drivers: Fixed device names, links, minor numbers and modes. wd.c: Started actually supporting devfs. diskslice.h: Added devfs tokens to structs (currently 576 of them per disk! :-(). subr_diskslice.c: Create devfs entries in dsopen() and (unsuccessfully) attempt to make them go away at the right times. DEVFS is #undefed at the start so that this shouldn't cause problems.
* Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme.wollman1996-01-051-1/+3
|
* Declared functions as static in their definitions as well as in theirbde1995-12-141-11/+10
| | | | prototypes.
* Undo a change that should not have been committed with the 1Tb enhancements.dyson1995-12-111-2/+1
|
* Changes to support 1Tb filesizes. Pages are now named by andyson1995-12-111-1/+6
| | | | (object,index) pair instead of (object,offset) pair.
* Restored used variable `name[32]' (used by DEVFS).bde1995-12-101-2/+9
| | | | Completed function declarations and/or added prototypes.
* scsi_tape.h had some old cruft that looked like missing typedefs orphk1995-12-091-3/+2
| | | | something. Cleanup some lint in sd.c and st.c.
* Julian forgot to make the *devsw structures static.phk1995-12-081-3/+3
|
* Pass 3 of the great devsw changesjulian1995-12-081-41/+45
| | | | | | | | | | | | | | | | | | | | | | | 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.. :)
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+3
|
* 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-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | 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)
* Mega commit for sysctl.phk1995-11-201-5/+3
| | | | | | Convert the remaining sysctl stuff to the new way of doing things. the devconf stuff is the reason for the large number of files. Cleaned up some compiler warnings while I were there.
* Trim #includes to those that are necessary; other cosmetic changes.dg1995-11-201-15/+10
|
* First set of changes to eliminate the ad-hoc device buffer queues,dyson1995-11-191-11/+9
| | | | | | 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.
* Initialize the 3 remaining elements of the scsi_cmd struct rather thandg1995-11-061-2/+2
| | | | bzeroing the whole thing in sdstart().
* Make a lot of things static.phk1995-10-211-12/+12
|
* Ack!julian1995-10-121-8/+13
| | | | | | | | | | | | | sometime around 1.51, the check for minphys dissappeared out of transfers for disks.. we weren't hecking that the adapter could handle a transfer of the size we were requesting.. Peter!? :) this explains the rash of failures I've seen reported recently with "too many DMA segments" on raw devices (added one for st as well)
* Set bp->b_actf=NULL for paranoia sake.dg1995-08-071-1/+2
|
* Remove trailing whitespace.rgrimes1995-05-301-19/+19
|
* sdsize() didn't open a device often enough. This caused swap partitions onbde1995-05-081-17/+4
| | | | slices other than the first slice looked at to be unavailable for swapping.
* Moved unit definitions out of scsiconf.h;dufault1995-05-031-2/+2
| | | | | | Added CONTROL device that only does user-ioctl and nothing else; Added protection so user-ioctl requires write access; Clean up scsiconf.h a little. It needs more work.
* Change dsioctl() interface to allow DIOCSYNCSLICEINFO to update the caller'sbde1995-04-301-3/+3
| | | | slice pointer and to print the device name in error messages.
* Submitted by: achedufault1995-04-291-2/+1
| | | | Fix extra newline during SCSI_VERBOSE.
* Set SCSI_NOSLEEP only when we really need to. This requires an additionalgibbs1995-04-231-5/+5
| | | | | | | | 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
* Added "scsi target" device that can act as a target for scsi transfersdufault1995-04-141-23/+19
| | | | | | | | from an initiator Added Julian's support for residuals. Added Julian's fixes to the tape driver Made compile cleanly with -Wall Reduce boot up output
* sdattach: print out cyl/hd/sec info in the same format as wd driver doesache1995-04-101-4/+5
| | | | as default case, very helpful in many cases.
* Support disk slices. This involves mainly replacing inline code withbde1995-03-231-279/+116
| | | | | | | | | | | | | | | | | | | | | | function calls. Broken tracking of open partitions gets fixed as a side effect. Races in sdopen() and sdioctl() become more numerous than before. Close the device in sdsize(). Media removal could not have worked right when unused swap devices were held open. There may now be a problem with used swap devices not being held open. Fix ancient operator precedence bug in sddump(). It may have been possible to attempt dumping to unloaded media. Remove NetBSD ifdefs. We're too different now, and the NetBSD driver was already too different for them to be relevant. Remove support for soft write protection. There are no ioctls to set it, and this driver never set it either. It was used in the wd driver to disable writing to unlabelled disk, but we want to support writing to foreign partitions on unlabeled disks. Clean up some formatting and restore some old-style function headers.
* cd.c: Julian's CD audio cleanupdufault1995-03-211-22/+14
| | | | | | | | | | sd.c: Julian's removal of subdriver requests st.c, scsi_tape.h: Julian's suport of compressed tape drives Note: compressed tape drives are still not working fully. scsiconf.h, scsi_base.c, scsi_driver.c: address problems in probes and error console logs
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-9/+8
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* 1. Add text for ASC/ASCQdufault1995-03-151-2/+5
| | | | | 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.
* Remove some of my old debugging junk that somehow slipped in under my nose.dg1995-03-061-9/+1
|
* 1. Change driver signatures to full signature for slice support.dufault1995-03-041-13/+19
| | | | | 2. Add "pt" (processor type) driver. 3. Add "worm" (Write Once) driver for Jordan.
* Reviewed by: gibbs@freefall.cdrom.com julian@freefall.cdrom.comdufault1995-03-011-189/+104
| | | | | | | 1. Support for fixed device configuration 2. Hoisted common code to scsi_driver 3. SCSI busses dynamically allocated at boot 4. Reorg'd for LKMs
* Split byte packing functions into signed and unsigned versions.dufault1995-01-311-4/+4
| | | | Left most current invocations as signed, though that could be wrong.
* Reviewed by: gibbs@estienne.CS.Berkeley.EDUdufault1995-01-081-17/+72
| | | | | | | Reenabled "SCIOCOMAND" ioctl. Restructured so low level drivers can easily request retries. Added preliminary fixed SCSI devices (should be revisited before 2.1) Added "ssc" device that can have its' (HBA, ID, LUN) set via ioctl.
* Really fix the "byte" count stat. `wd's are actually blocks of 32 16-bitbde1994-12-241-2/+2
| | | | words in dkstat-speak. `ms's are seconds in dkstat-speak...
* Revert last patch - it's wrong.dg1994-12-231-2/+2
|
* Fixed byte count stat.dg1994-12-231-2/+2
| | | | Submitted by: John Dyson
OpenPOWER on IntegriCloud