Lines Matching refs:scb
156 struct wd719x_scb *scb; in wd719x_destroy() local
166 list_for_each_entry(scb, &wd->active_scbs, list) in wd719x_destroy()
167 pci_free_consistent(wd->pdev, sizeof(struct wd719x_scb), scb, in wd719x_destroy()
168 scb->phys); in wd719x_destroy()
169 list_for_each_entry(scb, &wd->free_scbs, list) in wd719x_destroy()
170 pci_free_consistent(wd->pdev, sizeof(struct wd719x_scb), scb, in wd719x_destroy()
171 scb->phys); in wd719x_destroy()
188 struct wd719x_scb *scb = (struct wd719x_scb *) cmd->host_scribble; in wd719x_finish_cmd() local
190 if (scb) { in wd719x_finish_cmd()
191 list_move(&scb->list, &wd->free_scbs); in wd719x_finish_cmd()
205 struct wd719x_scb *scb; in wd719x_queuecommand() local
213 scb = list_first_entry_or_null(&wd->free_scbs, struct wd719x_scb, list); in wd719x_queuecommand()
214 if (scb) { in wd719x_queuecommand()
215 list_del(&scb->list); in wd719x_queuecommand()
216 phys = scb->phys; in wd719x_queuecommand()
219 scb = pci_alloc_consistent(wd->pdev, sizeof(struct wd719x_scb), in wd719x_queuecommand()
222 if (!scb) { in wd719x_queuecommand()
229 memset(scb, 0, sizeof(struct wd719x_scb)); in wd719x_queuecommand()
230 list_add(&scb->list, &wd->active_scbs); in wd719x_queuecommand()
232 scb->phys = phys; in wd719x_queuecommand()
233 scb->cmd = cmd; in wd719x_queuecommand()
234 cmd->host_scribble = (char *) scb; in wd719x_queuecommand()
236 scb->CDB_tag = 0; /* Tagged queueing not supported yet */ in wd719x_queuecommand()
237 scb->devid = cmd->device->id; in wd719x_queuecommand()
238 scb->lun = cmd->device->lun; in wd719x_queuecommand()
241 memcpy(scb->CDB, cmd->cmnd, cmd->cmd_len); in wd719x_queuecommand()
244 scb->sense_buf_length = SCSI_SENSE_BUFFERSIZE; in wd719x_queuecommand()
247 scb->sense_buf = cpu_to_le32(cmd->SCp.dma_handle); in wd719x_queuecommand()
250 scb->SCB_options |= WD719X_SCB_FLAGS_AUTO_REQUEST_SENSE; in wd719x_queuecommand()
254 scb->SCB_options |= WD719X_SCB_FLAGS_CHECK_DIRECTION in wd719x_queuecommand()
257 scb->SCB_options |= WD719X_SCB_FLAGS_CHECK_DIRECTION; in wd719x_queuecommand()
271 scb->data_length = cpu_to_le32(count_sg * in wd719x_queuecommand()
273 scb->data_p = cpu_to_le32(scb->phys + in wd719x_queuecommand()
277 scb->sg_list[i].ptr = cpu_to_le32(sg_dma_address(sg)); in wd719x_queuecommand()
278 scb->sg_list[i].length = cpu_to_le32(sg_dma_len(sg)); in wd719x_queuecommand()
280 scb->SCB_options |= WD719X_SCB_FLAGS_DO_SCATTER_GATHER; in wd719x_queuecommand()
282 scb->data_length = 0; in wd719x_queuecommand()
283 scb->data_p = 0; in wd719x_queuecommand()
293 wd719x_writel(wd, WD719X_AMR_SCB_IN, scb->phys); in wd719x_queuecommand()
467 struct wd719x_scb *scb = (struct wd719x_scb *)cmd->host_scribble; in wd719x_abort() local
476 cmd->device->lun, cmd->tag, scb->phys, 0); in wd719x_abort()
516 struct wd719x_scb *scb, *tmp; in wd719x_host_reset() local
529 list_for_each_entry_safe(scb, tmp, &wd->active_scbs, list) { in wd719x_host_reset()
530 struct scsi_cmnd *tmp_cmd = scb->cmd; in wd719x_host_reset()
556 struct wd719x_scb *scb) in wd719x_interrupt_SCB() argument
625 scb->cmd->device->id); in wd719x_interrupt_SCB()
646 cmd = scb->cmd; in wd719x_interrupt_SCB()
680 struct wd719x_scb *scb; in wd719x_interrupt() local
681 list_for_each_entry(scb, &wd->active_scbs, list) in wd719x_interrupt()
682 if (SCB_out == scb->phys) in wd719x_interrupt()
684 if (SCB_out == scb->phys) in wd719x_interrupt()
685 wd719x_interrupt_SCB(wd, regs, scb); in wd719x_interrupt()