Lines Matching refs:SCpnt

571 #define SCDATA(SCpnt)		((struct aha152x_scdata *) (SCpnt)->host_scribble)  argument
572 #define SCNEXT(SCpnt) SCDATA(SCpnt)->next argument
573 #define SCSEM(SCpnt) SCDATA(SCpnt)->done argument
927 static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, in aha152x_internal_queue() argument
930 struct aha152x_cmd_priv *acp = aha152x_priv(SCpnt); in aha152x_internal_queue()
931 struct Scsi_Host *shpnt = SCpnt->device->host; in aha152x_internal_queue()
940 if (!SCpnt->host_scribble || SCSEM(SCpnt) || SCNEXT(SCpnt)) { in aha152x_internal_queue()
941 scmd_printk(KERN_ERR, SCpnt, "cannot reuse command\n"); in aha152x_internal_queue()
945 SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC); in aha152x_internal_queue()
946 if(!SCpnt->host_scribble) { in aha152x_internal_queue()
947 scmd_printk(KERN_ERR, SCpnt, "allocation failed\n"); in aha152x_internal_queue()
952 SCNEXT(SCpnt) = NULL; in aha152x_internal_queue()
953 SCSEM(SCpnt) = complete; in aha152x_internal_queue()
961 if ((phase & resetting) || !scsi_sglist(SCpnt)) { in aha152x_internal_queue()
964 scsi_set_resid(SCpnt, 0); in aha152x_internal_queue()
967 scsi_set_resid(SCpnt, scsi_bufflen(SCpnt)); in aha152x_internal_queue()
968 acp->buffer = scsi_sglist(SCpnt); in aha152x_internal_queue()
984 append_SC(&ISSUE_SC, SCpnt); in aha152x_internal_queue()
998 static int aha152x_queue_lck(struct scsi_cmnd *SCpnt) in aha152x_queue_lck() argument
1000 return aha152x_internal_queue(SCpnt, NULL, 0); in aha152x_queue_lck()
1009 static void reset_done(struct scsi_cmnd *SCpnt) in DEF_SCSI_QCMD()
1011 if(SCSEM(SCpnt)) { in DEF_SCSI_QCMD()
1012 complete(SCSEM(SCpnt)); in DEF_SCSI_QCMD()
1018 static void aha152x_scsi_done(struct scsi_cmnd *SCpnt) in aha152x_scsi_done() argument
1020 if (aha152x_priv(SCpnt)->phase & resetting) in aha152x_scsi_done()
1021 reset_done(SCpnt); in aha152x_scsi_done()
1023 scsi_done(SCpnt); in aha152x_scsi_done()
1030 static int aha152x_abort(struct scsi_cmnd *SCpnt) in aha152x_abort() argument
1032 struct Scsi_Host *shpnt = SCpnt->device->host; in aha152x_abort()
1038 ptr=remove_SC(&ISSUE_SC, SCpnt); in aha152x_abort()
1046 kfree(SCpnt->host_scribble); in aha152x_abort()
1047 SCpnt->host_scribble=NULL; in aha152x_abort()
1061 scmd_printk(KERN_ERR, SCpnt, in aha152x_abort()
1071 static int aha152x_device_reset(struct scsi_cmnd * SCpnt) in aha152x_device_reset() argument
1073 struct Scsi_Host *shpnt = SCpnt->device->host; in aha152x_device_reset()
1076 unsigned char old_cmd_len = SCpnt->cmd_len; in aha152x_device_reset()
1080 if(CURRENT_SC==SCpnt) { in aha152x_device_reset()
1081 scmd_printk(KERN_ERR, SCpnt, "cannot reset current device\n"); in aha152x_device_reset()
1086 issued = remove_SC(&ISSUE_SC, SCpnt) == NULL; in aha152x_device_reset()
1087 disconnected = issued && remove_SC(&DISCONNECTED_SC, SCpnt); in aha152x_device_reset()
1090 SCpnt->cmd_len = 0; in aha152x_device_reset()
1092 aha152x_internal_queue(SCpnt, &done, resetting); in aha152x_device_reset()
1098 remove_SC(&ISSUE_SC, SCpnt); in aha152x_device_reset()
1102 SCpnt->cmd_len = old_cmd_len; in aha152x_device_reset()
1106 if (aha152x_priv(SCpnt)->phase & resetted) { in aha152x_device_reset()
1110 kfree(SCpnt->host_scribble); in aha152x_device_reset()
1111 SCpnt->host_scribble=NULL; in aha152x_device_reset()
1117 append_SC(&ISSUE_SC, SCpnt); in aha152x_device_reset()
1119 append_SC(&DISCONNECTED_SC, SCpnt); in aha152x_device_reset()
1191 static int aha152x_bus_reset(struct scsi_cmnd *SCpnt) in aha152x_bus_reset() argument
1193 return aha152x_bus_reset_host(SCpnt->device->host); in aha152x_bus_reset()