summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi
Commit message (Collapse)AuthorAgeFilesLines
* Change error message make sense and add a missingmjacob1999-12-301-1/+4
| | | | | | periph_release on a failed open so that the periph dtor for it will get called when we deallocate the instance from targioctl.
* Restore this driver to a working state. The control device hasmjacob1999-12-291-7/+6
| | | | | | | | | | | to be created at init time. The unit devices are created at ctor when new instances are created and bound and destroyed when that instance is closed. As such, there is just s single static control dev_t for this driver (the per-unit dev_t's are still in the softc). When we have decommissionable periph drivers, a destroy_device on the control device will have to called.
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-294-20/+20
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Add FAST-80 timing to the scsi syncrates table.obrien1999-12-161-0/+1
| | | | Submitted by: Gerard Roudier <groudier@club-internet.fr>
* Quirk all Pioneer changers as changers up front, instead of waiting for theken1999-12-111-7/+1
| | | | | | | | | | | | second LUN to show up. mjacob's change (which is correct) in rev 1.21 of cam_periph.c to elminiate infinite retries of the SCSI busy status bit seems to have broken probing of Pioneer changers that aren't already quirked. The right way to fix this is probably to change things around so we can guarantee 100% sequential probing of LUN-based changers even if they aren't quirked. This should fix things for now, though.
* Revamp the devstat priority system. All disks now have the same priority.ken1999-12-082-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
* Recognize the Pioneer CD-ROM DRM-6324X as a changer.ken1999-12-071-1/+7
| | | | | PR: kern/15198 Submitted by: Don Lewis <truckman@FreeBSD.org>
* Add back in a prefatory TUR when the tape is *not* mounted. This seemsmjacob1999-12-041-0/+5
| | | | to help with some older tape drives.
* Correct some botched timeout defines. Allocate only 8KB for the test readmjacob1999-12-031-97/+74
| | | | | | in samount. Make things a lot quieter in samount (and other places). Fix ridiculous and not so ridiculous bugs in compression related code in both sagetparams and sasetparams.
* Don't clear the SA_FLAG_TAPE_LOCKED prior to callingmjacob1999-11-211-13/+16
| | | | | | | | | | | | | | | saprevent when we're doing an OFFLINE ioctl- saprevent won't unlock the door, which then causes the unload to fail on some units. If we've already unloaded the tape, don't try and rewind and unload in saclose. This is a slightly riskier change because we're now going to depend on SA_FLAG_TAPE_MOUNTED to say whether we've really unloaded the tape. This involved changing the setting in sadone for tape errors to SA_FLAG_TAPE_FROZEN (which is more accurate anyway-if you get an EIO you've probably lost tape position anyway) where it used to just clear the mounted flag.
* Add make_dev functions. Tested with only one changer (sigh- all my othersmjacob1999-11-211-3/+7
| | | | | are broken). Submitted by: ken@freebsd.org
* Fix a couple of boo-boos in the last delta.mjacob1999-11-171-13/+15
|
* Fix for 11815 (at mount time do a throwaway read of the front of themjacob1999-11-171-131/+321
| | | | | | | tape to force the drive to do a media access so it knows what media may be inserted). Also Ken's make_dev patches- relatively untested.
* Convert the xpt, pass, pt and target drivers to use the newken1999-11-173-17/+26
| | | | make_dev()/destroy_dev() interface.
* useracc() the prequel:phk1999-10-291-1/+0
| | | | | | | | | | | Merge the contents (less some trivial bordering the silly comments) of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>. This puts the #defines for the vm_inherit_t and vm_prot_t types next to their typedefs. This paves the road for the commit to follow shortly: change useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE} as argument.
* Mark path for deallocation only *after* you've successfully allocated it.mjacob1999-10-271-2/+3
|
* Another 1FM@EOD quirk (from mike@sentex.net for a Seagate STT20000),mjacob1999-10-021-11/+9
| | | | | | and add a config option that allows one to default to 1FM@EOD for tapes otherwise unquirked or unknown as to which to prefer. Note that tcopy will be broken for these tapes until tcopy is fixed.
* Introduce the disk mini-layer and devstat_end_transaction_buf() in cam/scsi.phk1999-10-015-220/+85
| | | | Somewhat reviewed by: ken
* Ooops- forgot to commit this.mjacob1999-09-281-1/+5
| | | | | PR: 14009 Submitted by: jreynold@primenet.com
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-257-35/+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
* Remove unneeded disk-related includes.phk1999-09-122-5/+0
|
* Don't register a block major for tapes.phk1999-09-081-2/+1
| | | | Reviewed by: mjacob
* We don't need to pass the diskname argument all over the diskslice/labelphk1999-08-282-4/+4
| | | | code, we can find the name from any convenient dev_t
* $Id$ -> $FreeBSD$peter1999-08-2815-15/+15
|
* Cast pointers to uintptr_t instead of casting them to u_long. Don'tbde1999-08-241-4/+5
| | | | depend on gcc's feature of casting lvalues. Cosmetic.
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-5/+1
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Use devtoname() to print dev_t's instead of casting them to long or u_longbde1999-08-231-2/+2
| | | | for misprinting in %lx format.
* Implement a new generic mechanism for attaching handler functions tomsmith1999-08-211-7/+8
| | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
* Fix short timeout problems with the pt(4) driver:ken1999-08-201-3/+66
| | | | | | | | | | | | | - increase the default timeout from 10 seconds to 60 seconds - add a new kernel option, SCSI_PT_DEFAULT_TIMEOUT, that lets users specify the default timeout for the pt driver to use - add two new ioctls, one to get the timeout for a given pt device, the other to set the timeout for a given pt device. The idea is that userland applications using the device can set the timeout to suit their purposes. The ioctls are defined in a new header file, sys/ptio.h PR: 10266 Reviewed by: gibbs, joerg
* Welcome devtoname(), to most likely be used when printing informationbillf1999-08-171-2/+2
| | | | | | | | | | about a dev_t. printf("%x", dev) now becomes printf("%s", devtoname(dev)) because printing actual information about the device is much more useful then printing a pointer to an address that would never help the developer debug. Submitted by: phk, bde
* Checkpoint work on handling error conditions.gibbs1999-08-162-73/+514
| | | | | | | | | | | | | | | | Handle errors reported through immediate notify ccbs. This includes bus resets, BDR messages, and abort messages. Properly setup CA conditions for errors such as uncorectable parity in data phases, reselection failure, and IDE message received. Add a mechanism for stalling the queue of transactions to a particular initiator while a CA is in progress. Since we don't yet support tagged I/O, this is largely just for show right now. Properly bzero our softc at init time (oops). Add more documentation on what all of the queues in our softc do.
* Move initialization of announce_buf up to makemjacob1999-08-151-2/+3
| | | | sure it is initialized in all cases.
* Spring cleaning around strategy and disklabels/slices:phk1999-08-142-23/+7
| | | | | | | | | | | | | | 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.
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-2/+2
| | | | may not compile, I can't test it.
* Fix my complete botch. I hope. Tested this timemjacob1999-07-071-5/+5
|
* suggestions from bde to clean up last checkin slightymjacob1999-07-061-4/+4
|
* Make the change similar to that suggested by Nick Hibma to avoid divide bymjacob1999-07-031-3/+4
| | | | | | | zero traps. I actually can't believe that this compiler is *sooooo* stupid that it did a divide when there was 1024L*1024L instead of a right shift by 20. When we get quad type modifiers in kernel printf we can change to this too (to avoid overflow on > terabyte disk sizes).
* A minor tweak to shut up gcc (on the Alpha) for two (false) warnings.peter1999-07-031-2/+5
| | | | | How it can think that something that is initialized at declaration can be used while uninitialized is beyond me.
* Quirk Tandberg 4100 like Tandberg 4200.mjacob1999-06-241-1/+5
| | | | | | PR: 11675 Reviewed by: msmith@FreeBSD.ORG Submitted by: blank@uni-trier.de
* Simplify cdevsw registration.phk1999-05-317-25/+14
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-307-152/+146
| | | | | | | | | | | | | 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.
* Add TDC 3800 to quirk list for fixed mode device.mjacob1999-05-251-1/+5
| | | | | PR:11866 Submitted by: Helge Oldach hmo@sep.hamburg.com
* Add a default async handler funstion to cam_periph.c to remove duplicatedgibbs1999-05-228-55/+46
| | | | | | | | | code in all initiator type peripheral drivers. scsi_target.c: Release ATIO structures that wind up in the 'unkown command queue' for consumption by our userland counterpart, back to the controller when the exception for that command is cleared.
* Add a SA_FLAG_COMP_SUPP flag (to quirk compression asmjacob1999-05-111-454/+573
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SUPPORTED). Add a SA_FLAG_TAPE_FROZEN for (see below). Add a queue_count field to softc. Add HP T20* Travan-5 like tape device as a FIXED/512 type device. Works for me. Add TANDBERG SLR5 as a variable SA_QUIRK_1FM device. Change VIPER 2525 to 1024 byte blocksize. It's possible other drives should change too, but see below.. Change argument to sagetparams to be pointer to a sa_comp_t union- this can be either a DATA COMPRESSION or a DEVICE CONFIGURATION page. In general compression now tries to use the DATA COMPRESSION page and if that fails tries the DEVICE CONFIGURATION page. Change close routine to not rewind tape if there's a failure in either writing filemarks or in backing over one of two filemarks for a 2FM at EOT tape- instead mark the tape as 'frozen' and print a message saying that either an OFFLINE or REWIND or an MTEOM command is needed to clear this state (all bring certainty back to tape position). Fix sastrategy to not allow I/O to a frozen tape. Add MTIOCGETEOTMODEL/MTIOCSETEOTMODEL ioctls that get and set the EOT model for a tape drive (you can now dynamically change whether it's a 2 FM @ EOT or 1FM at EOT tape device). This ought to give folks something to handle the QIC drives we don't know about. Correctly propagate record of compression algorithm back. Clear FROZEN flag for EOM, REWIND and OFFLINE (and RETENSION and ERASE) cases. Fix an egregious bug in sadone that had left the device queue frozen for deferred (for fixed mode case) errors. Add comment in samount about how useless the test unit ready is for invalidating a mount (this has to be fixed later). Fix residual calculation (per Eivind) in saerror so that negative values for tape records being too large for the supplied buffer get caught. Do some other saerrro cleanup. Per Ken && Justin, add my name to copyright comment.
* Make clear that the DATA COMPRESSION page is a SCSI-3 entity- not a SCSI-2mjacob1999-05-111-3/+38
| | | | | | | | | entity. Add the Device Configuration page data structure- this structure should be used if you fail to fetch the DATA COMPRESSION page. Make a union type of a mode header, a device configuration page and the data compression page. Add a couple of QIC density defines (QIC 2G/QIC 4GB).
* Add a facility in the CAM error handling code to retry selection timeouts.ken1999-05-097-40/+58
| | | | | | | | | | | | | | | | | If the client requests that the error recovery code retry a selection timeout, it will be retried after half a second. The delay is to give the device time to recover. For most of these drivers, I only added selection timeout retries where they were also retrying unit attention type errors. The sa(4) driver calls saerror() in a number of places, but most of them don't request retrying unit attentions. Also, bump the default minimum CD changer timeout from 2 to 5 seconds and the maximum timeout from 10 to 15 seconds. Some Pioneer changers seem to have trouble with the shorter timeout. Reviewed by: gibbs
* Introduce two functions: physread() and physwrite() and use these directlyphk1999-05-076-86/+17
| | | | | | in *devsw[] rather than the 46 local copies of the same functions. (grog will do the same for vinum when he has time)
* Add a number of interrelated CAM feature enhancements and bug fixes.ken1999-05-064-34/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: These changes will require recompilation of any userland applications, like cdrecord, xmcd, etc., that use the CAM passthrough interface. A make world is recommended. camcontrol.[c8]: - We now support two new commands, "tags" and "negotiate". - The tags commands allows users to view the number of tagged openings for a device as well as a number of other related parameters, and it allows users to set tagged openings for a device. - The negotiate command allows users to enable and disable disconnection and tagged queueing, set sync rates, offsets and bus width. Note that not all of those features are available for all controllers. Only the adv, ahc, and ncr drivers fully support all of the features at this point. Some cards do not allow the setting of sync rates, offsets and the like, and some of the drivers don't have any facilities to do so. Some drivers, like the adw driver, only support enabling or disabling sync negotiation, but do not support setting sync rates. - new description in the camcontrol man page of how to format a disk - cleanup of the camcontrol inquiry command - add support in the 'devlist' command for skipping unconfigured devices if -v was not specified on the command line. - make use of the new base_transfer_speed in the path inquiry CCB. - fix CCB bzero cases cam_xpt.c, cam_sim.[ch], cam_ccb.h: - new flags on many CCB function codes to designate whether they're non-immediate, use a user-supplied CCB, and can only be passed from userland programs via the xpt device. Use these flags in the transport layer and pass driver to categorize CCBs. - new flag in the transport layer device matching code for device nodes that indicates whether a device is unconfigured - bump the CAM version from 0x10 to 0x11 - Change the CAM ioctls to use the version as their group code, so we can force users to recompile code even when the CCB size doesn't change. - add + fill in a new value in the path inquiry CCB, base_transfer_speed. Remove a corresponding field from the cam_sim structure, and add code to every SIM to set this field to the proper value. - Fix the set transfer settings code in the transport layer. scsi_cd.c: - make some variables volatile instead of just casting them in various places - fix a race condition in the changer code - attach unless we get a "logical unit not supported" error. This should fix all of the cases where people have devices that return weird errors when they don't have media in the drive. scsi_da.c: - attach unless we get a "logical unit not supported" error scsi_pass.c: - for immediate CCBs, just malloc a CCB to send the user request in. This gets rid of the 'held' count problem in camcontrol tags. scsi_pass.h: - change the CAM ioctls to use the CAM version as their group code. adv driver: - Allow changing the sync rate and offset separately. adw driver - Allow changing the sync rate and offset separately. aha driver: - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs. ahc driver: - Allow setting offset and sync rate separately bt driver: - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs. NCR driver: - Fix the ultra/ultra 2 negotiation bug - allow setting both the sync rate and offset separately Other HBA drivers: - Put code in to set the base_transfer_speed field for XPT_GET_TRAN_SETTINGS CCBs. Reviewed by: gibbs, mjacob (isp), imp (aha)
* Don't touch a path after we've free'd it.gibbs1999-05-041-4/+5
|
* Use macros for accessing the head of the heap so that codegibbs1999-04-191-2/+2
| | | | is isolated from implementation details of the heap.
OpenPOWER on IntegriCloud