[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SCSI calls

Hi there --

I'm trying to write some code (actually, credit where it's due, I'm 
trying to help Eleni right some code) that's communicating to the 
SCSI port.  Unfortunately a) it's not completely working and b)
it tends to hang up the entire Mac (except the mouse) afterwards.
She is using #_scsiwrite ... is there any reason that the Mac should
hang on that command?

To be fair, we are also writing the thing on the other end of the
SCSI, and we aren't sure that it's signalling back the right thing.
For example, Inside Mac says that the target should acknowledge
that it's been selected, but doesn't say HOW it should acknowledge...
we are just raising BSY.  

Here is the MCL code that's hanging -- if anyone wants to volunteer
to look at the assembly on the other side, I'd be happy to send that
too.  Thanks --



(defun scsitest ()
  (setf test1 (make-record :test))
  (do ((x 0 (+ x 1)))
      ((= x 100))
    (rset test1 (:test.mem x) x))
  (scsiinit fepid)
  (rlet ((tib1 :tib
               :instr1 (rlet ((inst1 :SCSIInstr                   
                                     :scOpcode #$scInc
                                     :scParam1 (%ptr-to-int test1)
                                     :scParam2 2)))
               :instr2 (rlet ((inst2 :SCSIInstr
                                     :scOpcode #$scLoop
                                     :scParam1 -10
                                     :scParam2 6)))
               :instr3 (rlet ((inst3 :SCSIInstr
                                     :scOpcode #$scStop)))))
    (#_scsiwrite tib1))
  (rlet ((stat1 :stat
                :int1 1))
    (rlet ((message1 :message
                     :int1 1))
      (#_scsicomplete stat1 message1 40)))