Lines Matching defs:tmp
766 struct scsi_ctrl_blk *tmp, *prev;
772 prev = tmp = host->first_pending;
773 while (tmp != NULL) {
774 if (scb == tmp) { /* Unlink this SCB */
775 if (tmp == host->first_pending) {
776 if ((host->first_pending = tmp->next) == NULL)
779 prev->next = tmp->next;
780 if (tmp == host->last_pending)
783 tmp->next = NULL;
786 prev = tmp;
787 tmp = tmp->next;
815 struct scsi_ctrl_blk *tmp;
818 if ((tmp = host->first_busy) != NULL) {
819 if ((host->first_busy = tmp->next) == NULL)
821 tmp->next = NULL;
822 if (tmp->tagmsg)
823 host->act_tags[tmp->target]--;
825 host->targets[tmp->target].flags &= ~TCF_BUSY;
828 printk("Pop busy SCB %p; ", tmp);
830 return tmp;
836 struct scsi_ctrl_blk *tmp, *prev;
842 prev = tmp = host->first_busy;
843 while (tmp != NULL) {
844 if (scb == tmp) { /* Unlink this SCB */
845 if (tmp == host->first_busy) {
846 if ((host->first_busy = tmp->next) == NULL)
849 prev->next = tmp->next;
850 if (tmp == host->last_busy)
853 tmp->next = NULL;
854 if (tmp->tagmsg)
855 host->act_tags[tmp->target]--;
857 host->targets[tmp->target].flags &= ~TCF_BUSY;
860 prev = tmp;
861 tmp = tmp->next;
868 struct scsi_ctrl_blk *tmp;
872 tmp = host->first_busy;
873 while (tmp != NULL) {
874 scbp_tarlun = (tmp->lun << 8) | (tmp->target);
878 tmp = tmp->next;
881 printk("find busy SCB %p; ", tmp);
883 return tmp;
905 struct scsi_ctrl_blk *tmp;
907 if ((tmp = host->first_done) != NULL) {
908 if ((host->first_done = tmp->next) == NULL)
910 tmp->next = NULL;
913 printk("find done SCB %p; ",tmp);
915 return tmp;
921 struct scsi_ctrl_blk *tmp, *prev;
937 prev = tmp = host->first_pending; /* Check Pend queue */
938 while (tmp != NULL) {
940 if (tmp->srb == srbp) {
941 if (tmp == host->active) {
944 } else if (tmp == host->first_pending) {
945 if ((host->first_pending = tmp->next) == NULL)
948 prev->next = tmp->next;
949 if (tmp == host->last_pending)
952 tmp->hastat = HOST_ABORTED;
953 tmp->flags |= SCF_DONE;
954 if (tmp->flags & SCF_POST)
955 (*tmp->post) ((u8 *) host, (u8 *) tmp);
959 prev = tmp;
960 tmp = tmp->next;
963 prev = tmp = host->first_busy; /* Check Busy queue */
964 while (tmp != NULL) {
965 if (tmp->srb == srbp) {
966 if (tmp == host->active) {
969 } else if (tmp->tagmsg == 0) {
973 host->act_tags[tmp->target]--;
974 if (tmp == host->first_busy) {
975 if ((host->first_busy = tmp->next) == NULL)
978 prev->next = tmp->next;
979 if (tmp == host->last_busy)
982 tmp->next = NULL;
985 tmp->hastat = HOST_ABORTED;
986 tmp->flags |= SCF_DONE;
987 if (tmp->flags & SCF_POST)
988 (*tmp->post) ((u8 *) host, (u8 *) tmp);
993 prev = tmp;
994 tmp = tmp->next;
2358 struct scsi_ctrl_blk *tmp, *prev;
2373 prev = tmp = host->first_busy; /* Check Busy queue */
2374 while (tmp != NULL) {
2375 if (tmp->target == tar) {
2377 if (tmp == host->first_busy) {
2378 if ((host->first_busy = tmp->next) == NULL)
2381 prev->next = tmp->next;
2382 if (tmp == host->last_busy)
2385 tmp->hastat = HOST_ABORTED;
2386 initio_append_done_scb(host, tmp);
2390 prev = tmp;
2392 tmp = tmp->next;
2810 struct scsi_ctrl_blk *scb, *tmp, *prev = NULL /* silence gcc */;
2871 for (i = 0, tmp = scb; i < num_scb; i++, tmp++) {
2872 tmp->tagid = i;
2874 prev->next = tmp;
2875 prev = tmp;
2878 host->scb_end = tmp;