summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* Release bus entries in the EDT when a path is released.gibbs1999-04-231-4/+14
| | | | | Null out path entries when the path is released to catch bugs. Free our configuration hook when we're done with it.
* Stage 1 of a cleanup of the i386 interrupt registration mechanism.peter1999-04-211-3/+1
| | | | | | | Interrupts under the new scheme are managed by the i386 nexus with the awareness of the resource manager. There is further room for optimizing the interfaces still. All the users of register_intr()/intr_create() should be gone, with the exception of pcic and i386/isa/clock.c.
* Use macros for accessing the head of the heap so that codegibbs1999-04-191-2/+2
| | | | is isolated from implementation details of the heap.
* cam_periph.c:gibbs1999-04-194-48/+67
| | | | | | | | | | | | | | | | | Move handling of CAM_AUTOSENSE_FAIL into block dealing with all other scsi status errors. cam_queue.c: cam_queue.h: Fix 'off by one' heap bug in a more efficient manner. Since heap algorithms like to deal with indexes started from 1, offset our heap array pointer at allocation time to make this so for a C environment. This makes the implementation of the algorithm a bit more efficient. cam_xpt.c: Use macros for accessing the head of the heap so that code is isolated from implementation details of the heap.
* Make WangTek 51000 a fixed block device.mjacob1999-04-181-1/+5
| | | | | PR: kern/11194 Obtained from:naddy@mips.rhein-neckar.de
* Well folks, this is it - The second stage of the removal for build supportpeter1999-04-171-2/+2
| | | | for LKM's..
* Remove camq_regen(). We already perform modular comparisonsgibbs1999-04-071-12/+4
| | | | | for generation counts, so no further steps to deal with generation count wrap are required.
* Remove camq_regen(). We already perform modular comparisonsgibbs1999-04-074-72/+39
| | | | | | | for generation counts, so no further steps to deal with generation count wrap are required. Fix an off by one problem in the camq heap code.
* Use PHOLD/PRELE rather than P_PHYSIO.peter1999-04-061-5/+5
|
* Disable tagged queueing for the IBM DCAS drives. These drives have poorken1999-03-141-1/+30
| | | | | | | | | | | | | | | write performance when tagged queueing is enabled. Although the PR was submitted for the 4 gig version of this drive, the assumption is that the 2 gig version has the same problem. Therefore tagged queueing is disabled for both. Also, update the comment for the Western Digital Enterprise drives to note that the best performance for those drives is achieved when tagged queueing is disabled and write caching is enabled. PR: kern/10398 Submitted by: Hideaki Okada <hokada@isl.melco.co.jp>
* People who wanted the "tagged opening" message can boot -v. The restjkh1999-03-111-2/+2
| | | | | of us, who appear to have complained incessantly about this message since it appeared, can now stop.
* The 4 gig version of the Seagate Medalist Pro seems to have the sameken1999-03-071-5/+21
| | | | | | | | | | | trouble with tagged queueing as the 6.5 gig version. So, I've added a quirk entry for it to limit it to two outstanding transactions at a time, just like the 6.5G version. While I'm at it, add a quirk for the 9G version of the drive, since it most likely has the same problem. Submitted by: Jeremy Lea <reg@shale.csir.co.za>
* Implement the control device for the "targ" target mode processor targetgibbs1999-03-052-81/+256
| | | | | | | | | | | emulator so that instances can be dynamically added and removed from the system. Properly reference count peripheral instances so they are cleaned up when destroyed by the control device. Set a timeout for test unit ready commands. Before it was uninitialized and could cause us to drop off the bus when no real timeout had occurred.
* Silence errors.gibbs1999-03-051-4/+11
| | | | | Reduce the number of accept target I/O entries we allow to better exercise the resource shortage handling code in controller drivers.
* Silence complaints about synchronize cache requests that fail with illegalgibbs1999-03-051-5/+33
| | | | request.
* xpt_done has no reason to take a volatile ccb *.gibbs1999-03-051-2/+2
|
* Protect access to the EDT with splcam() to protect against corruptiongibbs1999-03-051-35/+96
| | | | | | | | | | | | | | | | | | caused by temporary EDT allocations performed by controller drivers in their interrupt routiens. Reference count bus entries in the EDT in preparation for support for dynamic controller arrival and departure. Have children of the EDT hold references to their parents. Correct routing of the XPT_IMMED_NOTIFY ccb type for use in target mode applications. Fix a few cases where the generation count for EDT data members was not being updated when a modification occurred. splcam() problem Noticed by: Tor Egge <tegge@FreeBSD.org>
* Add constants and macros for dealing with XPT opcode group types.gibbs1999-03-051-1/+9
|
* +Match against T4000* for HP QIC quirks (not T4000S* where it doesn't thenmjacob1999-03-011-14/+28
| | | | | | | | | | catch a T4000s) + Set *some* kind of error at EOM if we're in fixed mode and have pending errs. Do not clear the ERR_PENDING bit if more buffers are queued. + Release the start_ccb in this case also, else we hang forever on rewinding. + Any kind of error for load to BOT in samount should then cause an attempt to use REWIND to come back to BOT. Do the initial load command quietly. + In samount, if we succeed, set the relative position markers.
* Add a quirk entry for the Seagate Medalist Pro 6 gig drive. It seems thisken1999-02-261-4/+16
| | | | | | | | | | | drive has very poor write performance (1.4MB/sec vs. 12MB/sec) with anything more than two oustanding transactions. So, this limits the number of tagged commands to two for that drive. Thanks to Paul van der Zwan for doing a whole lot of testing to confirm this. Reported by: Paul van der Zwan <paulz@trantor.xs4all.nl>
* Fix sync rate and transfer rate printouts in xpt_announce_periph().ken1999-02-181-6/+18
| | | | | | | | | | | Sync rates like 4.032MHz were getting printed as 4.32MHz. Also, add a quirk entry for the 18G Quantum Atlas III. Like most other recent Quantum drives, it bogusly reports queue full. Thanks to Andre Albsmeier <andre.albsmeier@mchp.siemens.de> for the Atlas III inquiry information. Reviewed by: gibbs
* Completely set information in the transaction description before performinggibbs1999-02-111-4/+4
| | | | a selwakeup for it. Cosmetic.
* Add a prioritization field to the devstat_add_entry() call so thatken1999-02-106-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* quiet the alpha compilermjacob1999-02-051-3/+3
|
* Extend unit numbers to a full 10 bits (split into sectionsmjacob1999-02-051-72/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the minor). Establish and use a control mode open. Control mode opens may open the device without locking, but are prohibited from all but some ioctls. MTIOCGET always works. MTIOCERRSTAT works, but the clearing of latched error status is contingent upon whether another application has the device open, in which case an interruptible perip acquire is done. MTSETBSIZ, MTSETDNSTY and MTCOMP also require a periph aquire. Relative fileno and blkno are tracked. Note that just about any error will make these undefined, and if you space to EOD or use hardware block positioning, these are also lost until the next UNLOAD or REWIND. Driver state is also tracked and recorded in the unit softc to be passed back in mt_dsreg for a MTIOCGET call. Thanks to Dan Strick for suggesting this. Reintroduce 2 filemarks at EOD for all but QIC devices. I really think it's wrong, but there is a lot of 3rd party software that depends upon this (not the least of which is tcopy). Introduce a SA_QUIRK_1FM to ensure that some devices can be marked as only being able to do 1 FM at EOD. At samount time force a load to BOT if we aren't mounted. If the LOAD command fails, use the REWIND command (e.g., for the IBM 3590 which for some gawdawful reason doesn't support the LOAD (to BOT) command). Also at samount time, if you don't know fixed or variable, try to *set* to one of the known fixed (or variable, for special case) density codes. We only have to do this once per boot, so it's not that painful. This is another way to try and figure out the wierd QIC devices without having to quirk everything in the universe. A substantial amount of cleanup as to what operations can and what operations cannot be retried. Don't retry space operations if they fail- it'll just lead to lossage. Not yet done is invalidating mounts correctly after errors. ENOTIME.
* add QIC 525,320,1320,3080 codesmjacob1999-02-051-1/+4
|
* Fix warnings preparing for -Wall -Wcast-qualdillon1999-01-272-4/+4
| | | | | Also disable one usb module in LINT due to fatal compilation errors, temporary.
* This is a rather large commit that encompasses the new swapper,dillon1999-01-211-3/+3
| | | | | | | | | | changes to the VM system to support the new swapper, VM bug fixes, several VM optimizations, and some additional revamping of the VM code. The specific bug fixes will be documented with additional forced commits. This commit is somewhat rough in regards to code cleanup issues. Reviewed by: "John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com>
* put it back the way it wasmjacob1999-01-201-9/+2
|
* temporary fix so alpha stays working while configure code is fixedmjacob1999-01-201-2/+9
|
* By popular demand, back out the CONNER CFP* quirk entry, and return it token1999-01-201-2/+2
| | | | | | | its original form. (Originally, it only applied to the CFP 2107.) Hopefully we can come to some conclusion about which Conner drives are broken for tagged queueing.
* The Samsung WN34324U is broken for tagged queueing.ken1999-01-191-2/+13
| | | | | PR: kern/9535 Submitted by: NAKAJI Hiroyuki <nakaji@zeisei.dpri.kyoto-u.ac.jp>
* Generalize the quirk entry for the Conner CFP* drives. It did just coverken1999-01-191-4/+24
| | | | | | | | | | | | | | | | the CFP2107, but it appears (not surprisingly) that the 1 gig and 4 gig versions of that drive have the same problem with tagged queueing. Also, fix the problem reported in PR kern/9482. The XPT_DEV_MATCH case in xptioctl() wasn't putting a proper path in the CCB before it called xpt_action(). When CAMDEBUG is defined, and CAM_DEBUG_TRACE debugging is turned on, the CAM_DEBUG statement at the beginning of xpt_action would end up deferencing a NULL path pointer. That of course caused a panic. My solution is to just stick the xpt peripheral's path in the CCB. PR: kern/9482 Reviewed by: gibbs
* Call the xpt_init() hook during at the start of the configure() processpeter1999-01-191-5/+7
| | | | | via SYSINIT(). This gets a little closer to making cam useable as a module.
* Sascha Blank <blank@uni-trier.de> convinced me I was anmjacob1999-01-161-20/+22
| | | | | | | | | | idiot about testing SA_QUIRK_2FM in samount. Fixed. Removed the NORRLS quirk (to save quirk space) and left the behaviour of being quiet about failed reserve/release (failed due Illegal Request) the same. Added a SF_QUIET_IR for prevent/allow for the same purposes.
* More bandaids. One important one from Sascha Blankmjacob1999-01-161-164/+92
| | | | | | | | | | | | | (<blank@fox.uni-trier.de>) about quirks being set as arithmetic values, not as bitfields. Add HP, Kennedy and M4 1/2" reel quirk entries. Do a lot of gratuitous source changing. Audit all functions that build ccbs for the tape driver and decide whether each one can be retried or not. Still to do is some more state management post errors.
* Replace includes of <sys/kernel.h> with includes ofjdp1999-01-141-2/+2
| | | | | <sys/linker_set.h> in those files that use only the linker set definitions.
* Add support for wildcard device entries in the EDT. The target modegibbs1999-01-141-94/+42
| | | | | | | | | | | | | | | 'Black Hole' device uses this feature to schedule itself against any target or lun attached to a controller that receives an unwanted request from an initiator instead of having an instance per potential target/lun request. Use the wildcard entries to simplify wildcard async callback storage. Don't announce devices twice to peripheral drivers. The devices will be announced as soon as the AC_PATH_REGISTERED event is registered by the peripheral driver, so no manaul push of this event is required. Reviewed by: Kenneth Merry <ken@FreeBSD.org>
* The target mode 'Black Hole' device. This peripheral driver provides inquirygibbs1999-01-141-0/+715
| | | | | | | | data and sense information for target mode devices for which no other peripheral driver is attached. This simplifies the task of dealing with luns that are not otherwise enabled for target mode if the controller does not have firmware that automatically deals with this case (e.g. the aic7xxx driver).
* Properly handle transfers that only consume partial buffers.gibbs1999-01-141-6/+10
|
* Make dsopen() and dsioctl() use cdstrategy1 instead of cdstrategy.eivind1999-01-121-3/+3
| | | | | This silence the warnings and makes it more obvious where the bugs have to be fixed.
* Clean up and fix quirk table (was missing necessary wildcards) and add a couplemjacob1999-01-121-34/+61
| | | | | | | | | | | | | | | | | | | | | from the old driver. Change format of quirk table to have a preferred block size for devices that need to be QUIRK_FIXED- this is loaded into the last_media_blocksize tag at saregister time and will be used in the first samount case. Change sasetparams to take a sense_flags argument so that probe time testing can be quieter (e.g. with SF_NO_PRINT). Fix a couple of silly bugs in the fixed/variable determination in samount- one was where there was a check against 'guessing' AND the density code being default density- *SMACK* - you're only guessing if you find the media code to be *other* than default density. Second bug was a test against current blocksize being zero- should be a test against whether current blocksize is not equal to the last blocksize if you had wanted to be fixed (suppose you came up in fixed, but not the preferred size?). And if you don't know what the fixed size should be, select 512 as the starting point, not BLKDEV_IOSIZE (reality wins). Finally, in doing the test set to variable mode, make sasetparams non-chatty.
* Make HP T4000S quirk to FIXED modemjacob1999-01-111-1/+5
|
* Add 'static' to the declaration, too.eivind1999-01-111-2/+2
|
* Like the problems just fixed in scsi_da.c, make suremjacob1999-01-071-6/+17
| | | | | | | to release the probe ccb before taking down the periph. Also, don't do cdscheduling if you're not going to attach the device after all. Reviewed by: ken@freebsd.org
* A better fix to avoid race conditions between failed probesmjacob1999-01-071-6/+15
| | | | | and peripheral removal. Obtained from:gibbs@freebsd.org
* The Quantum Atlas III evidently has an identical problem to the Atlas II.ken1999-01-071-1/+22
| | | | | | | | | | | It keeps returning queue full until we have reduced the number of tagged openings to the minimum. So, put in a quirk entry with the same work-around. This quirk entry is only for the 9G Atlas III, once someone comes up with inquiry information for the 18G version of that drive, we can quirk it as well. Submitted by: "Johan Granlund" <johan@granlund.nu>
* The Conner CFP2107 is a fixed-media drive, not removable media. This fixesken1999-01-051-2/+10
| | | | | | | | | | | | | the quirk that disables tagged queueing for those drives. Also, silence a warning by disabling xpt_for_all_targets() and xpt_for_all_periphs(). These two functions are not currently used, but they should not be removed. They're part of a set of functions that provide a way to execute a function for every {bus,target,device,periph} in the system. If anyone needs to use either function in the future, they can be un-#ifdefed.
* Add a quirk that disables SYNCHRONIZE CACHEmjacob1999-01-051-1/+10
| | | | | PR: 8882 Obtained from: Hellmuth Michaelis hm@kts.org
* Temporary workaround (bandaid) for case where you have READmjacob1999-01-031-3/+5
| | | | | | | | CAPACITY fail for a non-removable media device. There's a race condition where the device entry is removed and then xpt_release_ccb is called which attempts to give back the ccb to a device that's now gone. In this bandaid release the ccb early and then remember to not call xpt_release_ccb later.
OpenPOWER on IntegriCloud