/***************************************************************************** Function name : inia100_queue Description : Queue a command and setup interrupts for a free bus. Input : pHCB - Pointer to host adapter structure Output : None. Return : pSRB - Pointer to SCSI request block. *****************************************************************************/ static int inia100_queue(struct scsi_cmnd * SCpnt, void (*done) (struct scsi_cmnd *)) { register ORC_SCB *pSCB; ORC_HCS *pHCB; /* Point to Host adapter control block */ pHCB = (ORC_HCS *) SCpnt->device->host->hostdata; SCpnt->scsi_done = done; /* Get free SCSI control block */ if ((pSCB = orc_alloc_scb(pHCB)) == NULL) { inia100AppendSRBToQueue(pHCB, SCpnt); /* Buffer this request */ /* printk("inia100_entry: can't allocate SCB\n"); */ return (0); } inia100BuildSCB(pHCB, pSCB, SCpnt); orc_exec_scb(pHCB, pSCB); /* Start execute SCB */ return (0); }
/***************************************************************************** Function name : inia100_queue Description : Queue a command and setup interrupts for a free bus. Input : pHCB - Pointer to host adapter structure Output : None. Return : pSRB - Pointer to SCSI request block. *****************************************************************************/ int inia100_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) { register ORC_SCB *pSCB; ORC_HCS *pHCB; /* Point to Host adapter control block */ if (SCpnt->lun > 16) { SCpnt->result = (DID_TIME_OUT << 16); done(SCpnt); /* Notify system DONE */ return (0); } pHCB = (ORC_HCS *) SCpnt->host->base; SCpnt->scsi_done = done; /* Get free SCSI control block */ if ((pSCB = orc_alloc_scb(pHCB)) == NULL) { inia100AppendSRBToQueue(pHCB, SCpnt); /* Buffer this request */ /* printk("inia100_entry: can't allocate SCB\n"); */ return (0); } inia100BuildSCB(pHCB, pSCB, SCpnt); orc_exec_scb(pHCB, pSCB); /* Start execute SCB */ return (0); }