• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/scsi/

Lines Matching defs:ccb

318 	struct st_ccb ccb[MU_MAX_REQUEST];
396 struct req_msg *req, struct st_ccb *ccb)
405 cmd = ccb->cmd;
419 ccb->sg_count = n_elem;
438 ccb->sg_count = 1;
506 static void stex_controller_info(struct st_hba *hba, struct st_ccb *ccb)
512 stex_internal_copy(ccb->cmd, p, &count, ccb->sg_count, ST_FROM_CMD);
530 stex_internal_copy(ccb->cmd, p, &count, ccb->sg_count, ST_TO_CMD);
540 hba->ccb[tag].req = req;
669 hba->ccb[tag].cmd = cmd;
670 hba->ccb[tag].sense_bufflen = SCSI_SENSE_BUFFERSIZE;
671 hba->ccb[tag].sense_buffer = cmd->sense_buffer;
672 hba->ccb[tag].req_type = 0;
675 stex_map_sg(hba, req, &hba->ccb[tag]);
693 static void stex_scsi_done(struct st_ccb *ccb)
695 struct scsi_cmnd *cmd = ccb->cmd;
698 if (ccb->srb_status == SRB_STATUS_SUCCESS || ccb->srb_status == 0) {
699 result = ccb->scsi_status;
700 switch (ccb->scsi_status) {
715 else if (ccb->srb_status & SRB_SEE_SENSE)
717 else switch (ccb->srb_status) {
735 static void stex_copy_data(struct st_ccb *ccb,
740 if (ccb->sense_buffer != NULL)
741 memcpy(ccb->sense_buffer, resp->variable,
742 min(variable, ccb->sense_bufflen));
746 if (ccb->cmd == NULL)
748 stex_internal_copy(ccb->cmd,
749 resp->variable, &count, ccb->sg_count, ST_TO_CMD);
753 struct st_ccb *ccb, struct status_msg *resp)
757 if (ccb->cmd->cmnd[0] == MGT_CMD &&
759 ccb->cmd->request_bufflen =
768 if (ccb->cmd->cmnd[0] == INQUIRY &&
773 stex_internal_copy(ccb->cmd, hba->copy_buffer,
774 &count, ccb->sg_count, ST_FROM_CMD);
777 ccb->srb_status = SRB_STATUS_SELECTION_TIMEOUT;
779 ccb->srb_status = SRB_STATUS_SUCCESS;
787 struct st_ccb *ccb;
826 ccb = &hba->ccb[tag];
827 if (hba->wait_ccb == ccb)
829 if (unlikely(ccb->req == NULL)) {
844 stex_copy_data(ccb, resp, size);
847 ccb->srb_status = resp->srb_status;
848 ccb->scsi_status = resp->scsi_status;
850 if (likely(ccb->cmd != NULL)) {
852 stex_ys_commands(hba, ccb, resp);
854 if (unlikely(ccb->cmd->cmnd[0] == PASSTHRU_CMD &&
855 ccb->cmd->cmnd[1] == PASSTHRU_GET_ADAPTER))
856 stex_controller_info(hba, ccb);
858 stex_unmap_sg(hba, ccb->cmd);
859 stex_scsi_done(ccb);
861 } else if (ccb->req_type & PASSTHRU_REQ_TYPE) {
863 if (ccb->req_type & PASSTHRU_REQ_NO_WAKEUP) {
864 ccb->req_type = 0;
867 ccb->req_type = 0;
1003 if (tag < host->can_queue && hba->ccb[tag].cmd == cmd)
1004 hba->wait_ccb = &hba->ccb[tag];
1007 if (hba->ccb[tag].cmd == cmd) {
1008 hba->wait_ccb = &hba->ccb[tag];
1333 hba->ccb[tag].cmd = NULL;
1334 hba->ccb[tag].sg_count = 0;
1335 hba->ccb[tag].sense_bufflen = 0;
1336 hba->ccb[tag].sense_buffer = NULL;
1337 hba->ccb[tag].req_type |= PASSTHRU_REQ_TYPE;
1343 while (hba->ccb[tag].req_type & PASSTHRU_REQ_TYPE) {