summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev/vs.c
AgeCommit message (Collapse)Author
2008-01-05For each channel, tell if it is single-ended or differential if we can knowMiod Vallat
this. Might help before someone sets his disks on fire. Especially with boards where not all channels are of the same type.
2008-01-03Enable wide transfers in the IOPB on wide busses, and get the IOPB passthroughMiod Vallat
SCSI commands length correct (it's a length in 16 bit words, not in 8 bit bytes).
2008-01-01Match on Cougar boards, and try to drive them like Jaguars on steroids. OnMiod Vallat
wide Cougars, use one command queue per target and disable lun support, so that we do not overflow the board's memory; and since we are behaving as a Jaguar, do not do tagged queuing or synchronous transfer negotiation. Tested on two MVME328XT-2 (4220 and second revision artwork 4220) narrow Cougar-I (but wide external connectors), but probes fail with select timeout so far; I could not get various Motorola BUG to probe devices on these boards either, so we're even (and maybe both my boards are toast, but I won't bet money on this).
2008-01-01A potpourri of bugfixes:Miod Vallat
- switch back to a fixed queue number allocation, but keep the rotating command queue entries. Force openings to 1 because of this. - make sure to mark the queue as ready before invoking scsi_done(), which could trigger a request for the same target. - allocate a command queue and an IOPB at the same time, instead of using two routines and ugly queue pointer arithmetic. This makes the daughterboard work, as long as the first scsi chain is not empty.
2007-10-06Oops. Forgot to do FREE -> free when I did MALLOC -> malloc.Kenneth R Westerback
2007-10-03MALLOC+bzero -> malloc+M_ZERO.Kenneth R Westerback
In ip_esp.c all allocated memory is now zero'd in the "malloc(sizeof(*tc) + alen ..." case. The +alen memory was not initialized by the bzero() call. Noticed by chl@. "Looks good" art@ "seems ok" chl@
2006-12-01Unbreak.Miod Vallat
2006-11-28give scsi controllers a real attach args to fill in when attaching scsibus.David Gwynne
ok miod@ marco@ deraadt@
2006-05-08Replace gazillions of badvaddr() or badwordaddr() calls with badaddr() calls.Miod Vallat
With a few prototype declarations shuffling, this finally allows <machine/locore.h> to die.
2006-03-15Nuke dk_establish(), no longer used.Miod Vallat
2005-12-27Remove the 1:1 association between SCSI targets and work queues, but use aMiod Vallat
cyclic search of the first unused work queue.
2005-12-27Fail existing command upon bus reset.Miod Vallat
2005-12-27Better initialize local variables before they are used, even if the compilerMiod Vallat
did not notice.
2005-12-27Keep an array of command blocks (formerly M328_CMD), one per queue - sinceMiod Vallat
we can't send more commands simultaneously - instead of using MALLOC/FREE for every scsi command we send.
2005-12-03The first thing done when XXX_scsi_cmd() returns TRY_AGAIN_LATER isKenneth R Westerback
to set xs->error to XS_BUSY. So it is pointless and misleading to set xs->error to XS_TIMEOUT, XS_DRIVER_STUFFUP or XS_BUSY just before returning TRY_AGAIN_LATER. No functional change. ok miod@
2005-04-27Allow userland to cause the data cache to be flushed for any arbitrary addressMiod Vallat
range in the current process, using trap #451. This is necessary for proper gcc trampolines operation, and, later, ld.so...
2005-04-27Always include <uvm/uvm_extern.h> before <machine/cmmu.h>.Miod Vallat
2004-09-06Jumbo pack of fixes:Miod Vallat
- do not leak memory when polling; - bring LUN support back - Motorola documentation says LUNs are not supported, but it's a SysV/m88k limitation, not a hardware one. - honour request timeout while polling (instead of using a fixed value) - do not program the scsi command length if the hardware knows it from the scsi command group (as advised in the manual) - various minor fixes, especially better error recovery. tested by nick@ and I; ok deraadt@.
2004-07-30Move evcount structures inside struct intrhand, this makes more sense andMiod Vallat
gives us more counters in the process. Also clean up intrhand structures and usage, especially move them to SLISTs.
2004-07-20Forgot to put this chunk in.Miod Vallat
2004-07-20Let the boot device detection code handle secondary SCSI buses.Miod Vallat
2004-07-20Work in progress to support daughterboards. The driver now will attach aMiod Vallat
second scsi bus if a SCSI daughterboard is present, and is supposed to know about this and send scsi commands to the appropriate bus. Unfortunately probing the second bus does not report any device at the moment (though you can boot off it), but I can't see the issue at the moment. Thanks to tdeval@ for lending a few boards equipped with daughterboards for testing.
2004-07-20Use sc_print_addr for error messages.Miod Vallat
2004-07-19Recognize the daughter board type, if any - but it is not supported yet.Miod Vallat
2004-07-19After a work queue has been aborted and the abort has been acknowledged,Miod Vallat
do not keep setting the A.A. bit in further queue control operations, as advised by the manual.
2004-07-19When we want to thaw all work queues we care about, do it correctly.Miod Vallat
2004-07-19Direct REQUEST_SENSE commands to the correct target, instead of alwaysMiod Vallat
target zero. This makes targets other than zero working now... Spotted by nick@
2004-07-18TyposMiod Vallat
2004-07-02Switch mvme88k to evcount, but keep maintaining intrcnt[] too for now.Miod Vallat
2004-06-10Fix a logic error in sglist creation.Miod Vallat
2004-05-23Nuke kvtop(), preserving a private copy in mvme88k vs(4) for now.Miod Vallat
2004-05-22Reset the board during probe. As a result, we can now honor the SCSIMiod Vallat
controller ID jumpers, instead of reprogramming the board to 7 every time.
2004-05-22Convert to bus_space; but it still uses kvtop()...Miod Vallat
2004-05-21More cleaning, better registers programming, better error messages.Miod Vallat
2004-05-20More "can't help but clean things while reading".Miod Vallat
2004-05-20General cleanup before attempting to move towards bus_space and bus_dma.Miod Vallat
Also fix an arithmetic bug which caused almost no harm by luck.
2004-05-09Eliminate verbosity parameter to scsi_print_sense and the associatedKenneth R Westerback
chunk of code. It was never executed unless you were debugging a mvmex8k 'vs' device. ok miod@ (mvmex8k bits) marco@ deraadt@
2004-04-30Fix logic botch resulting in a too optimistic openings value.Miod Vallat
2004-04-24Do not ignore vs_poll() return value.Miod Vallat
2004-04-24Preliminary switch to an mvme88k bus_space world. Not all drivers have beenMiod Vallat
converted yet, and they rely upon some linear mappings provided by bus_space. In order to not impact performance, almost all the bus_space accesses go through macros and inline functions. This currently restricts us to D16 and D32 access modes, which are selected at compilation time. Since there are no plans to support D8 vme devices in the future, this is acceptable for now. This makes the "len" locator for vme devices go away, and allows to simplify some code which was using the pcctwo device, and will now directly access hardware which is known to exist, rather than wait until the device is attached. While there, try to enforce more interrupt vector number checks, since these changes pointed out that dart(4) had been working correctly so far by sheer luck only.
2004-04-16When a VMEBus device needs to use two interrupt vectors, be nice and let itMiod Vallat
actually use two distinct vectors, rather than twice the same. Because of this, print vector last in vmeprint() so that dmesg remains pretty in the multi-vector case.
2004-01-29typos; jjy2+@pitt.eduTheo de Raadt
2004-01-20In some situations, the MVME328S can be so hung that our current reset codeMiod Vallat
fails. Unfortunately, in this case, do_vspoll() would invoke the reset function ad nauseum. Allow the flow to exit this infernal loop, attach() will correctly fail. This is temporary band-aid until a stronger reset sequence is found.
2004-01-14Do not fill more than the first three fields of cfdriver structures unlessMiod Vallat
necessary. No functional change.
2004-01-14Nuke SDEV_NOLUNS, SDEV_FORCELUNS, and PQUIRK_FORCELUNS quirks. AlsoKenneth R Westerback
moreluns field in scsi_link structure. Instead, treat an INQUIRY result that duplicates the INQUIRY result of LUN 0 as proof the LUN does not exist. Compensate for lack of SDEV_NOLUNS where necessary by setting sc_link->luns to 1, which has the same effect. From Marco Peereboom. Don't issue Test Unit Ready command before INQUIRY command - not necessary and potentially harmful to devices with ADEV_NOTUR quirk since quirks have not been set yet. From mycroft@NetBSD ok deraadt@, mvme* changes by miod@.
2004-01-02Better openings value computation.Miod Vallat
For now, the result is the same as the hard-coded constant it used to be, due to a pessimistic NUM_IOPB value. This will change.
2003-12-26Merge the attachment part and the real work part of the SCSI drivers inMiod Vallat
one file per driver.
2003-12-25Provide common D16 vmespace block access functions, instead of vs and vx eachMiod Vallat
rolling their own. Use them more cleverly in vx, in order to get the driver to at least attach and frob chips. Not tested besides multiuser boot (hence ttyflags -a), and checking cu(1) connects. More testing to come once I remember where I have hidden the 332XT transition module...
2003-11-07adress -> address, and a few more; all from Jonathon Gray;Jason McIntyre
(mvme68k/mvme88k) vs.c and (vax) if_le.c ok miod@ isakmpd ones ok ho@
2003-11-03spelling fixes (in the comments)David Krause