Lines Matching refs:cmnd

1661         if (ha->cmd_tab[i].cmnd == UNUSED_CMND) {  in gdth_get_cmd_index()
1662 ha->cmd_tab[i].cmnd = ha->pccb->RequestBuffer; in gdth_get_cmd_index()
1765 if (ha->cmd_tab[j].cmnd != UNUSED_CMND) in gdth_release_event()
2458 if (nscp->done != gdth_scsi_done || nscp->cmnd[0] != 0xff) { in gdth_next()
2461 if (nscp->cmnd[0] == TEST_UNIT_READY) { in gdth_next()
2493 if (b == ha->virt_bus && nscp->cmnd[0] != INQUIRY && in gdth_next()
2494 nscp->cmnd[0] != READ_CAPACITY && nscp->cmnd[0] != MODE_SENSE && in gdth_next()
2527 } else if (nscp->done == gdth_scsi_done && nscp->cmnd[0] == 0xff) { in gdth_next()
2539 nscp->cmnd[0], b, t, l)); in gdth_next()
2552 switch (nscp->cmnd[0]) { in gdth_next()
2563 TRACE(("cache cmd %x/%x/%x/%x/%x/%x\n",nscp->cmnd[0], in gdth_next()
2564 nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3], in gdth_next()
2565 nscp->cmnd[4],nscp->cmnd[5])); in gdth_next()
2566 if (ha->hdr[t].media_changed && nscp->cmnd[0] != INQUIRY) { in gdth_next()
2569 nscp->cmnd[0], t)); in gdth_next()
2596 TRACE(("cache cmd %x/%x/%x/%x/%x/%x\n",nscp->cmnd[0], in gdth_next()
2597 nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3], in gdth_next()
2598 nscp->cmnd[4],nscp->cmnd[5])); in gdth_next()
2599 if ( (nscp->cmnd[4]&1) && !(ha->hdr[t].devtype&1) ) { in gdth_next()
2614 nscp->cmnd[3] = (ha->hdr[t].devtype&1) ? 1:0; in gdth_next()
2616 nscp->cmnd[4],nscp->cmnd[3])); in gdth_next()
2624 TRACE2(("cache cmd %s\n",nscp->cmnd[0] == RESERVE ? in gdth_next()
2641 nscp->cmnd[0], t)); in gdth_next()
2662 TRACE2(("cache cmd %x/%x/%x/%x/%x/%x unknown\n",nscp->cmnd[0], in gdth_next()
2663 nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3], in gdth_next()
2664 nscp->cmnd[4],nscp->cmnd[5])); in gdth_next()
2666 hanum, nscp->cmnd[0]); in gdth_next()
2781 scp->cmnd[0],t)); in gdth_internal_cache_cmd()
2786 switch (scp->cmnd[0]) { in gdth_internal_cache_cmd()
2846 if ((scp->cmnd[1] & 0x1f) == SAI_READ_CAPACITY_16 && in gdth_internal_cache_cmd()
2861 TRACE2(("Internal cache cmd 0x%x unknown\n",scp->cmnd[0])); in gdth_internal_cache_cmd()
2890 scp->cmnd[0],scp->cmd_len,hdrive)); in gdth_fill_cache_cmd()
2915 else if (scp->cmnd[0] == RESERVE) in gdth_fill_cache_cmd()
2917 else if (scp->cmnd[0] == RELEASE) in gdth_fill_cache_cmd()
2919 else if (scp->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { in gdth_fill_cache_cmd()
2920 if (scp->cmnd[4] & 1) /* prevent ? */ in gdth_fill_cache_cmd()
2922 else if (scp->cmnd[3] & 1) /* removable drive ? */ in gdth_fill_cache_cmd()
2926 } else if (scp->cmnd[0] == WRITE_6 || scp->cmnd[0] == WRITE_10 || in gdth_fill_cache_cmd()
2927 scp->cmnd[0] == WRITE_12 in gdth_fill_cache_cmd()
2929 || scp->cmnd[0] == WRITE_16 in gdth_fill_cache_cmd()
2956 memcpy(&no, &scp->cmnd[2], sizeof(ulong64)); in gdth_fill_cache_cmd()
2958 memcpy(&cnt, &scp->cmnd[10], sizeof(ulong32)); in gdth_fill_cache_cmd()
2961 memcpy(&no, &scp->cmnd[2], sizeof(ulong32)); in gdth_fill_cache_cmd()
2963 memcpy(&cnt, &scp->cmnd[7], sizeof(ushort)); in gdth_fill_cache_cmd()
2966 memcpy(&no, &scp->cmnd[0], sizeof(ulong32)); in gdth_fill_cache_cmd()
2968 blockcnt= scp->cmnd[4]==0 ? 0x100 : scp->cmnd[4]; in gdth_fill_cache_cmd()
3100 ha->cmd_tab[cmd_index-2].cmnd = UNUSED_CMND; in gdth_fill_cache_cmd()
3134 scp->cmnd[0],b,t,l)); in gdth_fill_raw_cmd()
3197 gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; in gdth_fill_raw_cmd()
3198 memcpy(cmdp->u.raw64.cmd,scp->cmnd,16); in gdth_fill_raw_cmd()
3213 gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; in gdth_fill_raw_cmd()
3214 memcpy(cmdp->u.raw.cmd,scp->cmnd,12); in gdth_fill_raw_cmd()
3335 ha->cmd_tab[cmd_index-2].cmnd = UNUSED_CMND; in gdth_fill_raw_cmd()
3401 ha->cmd_tab[cmd_index-2].cmnd = UNUSED_CMND; in gdth_special_cmd()
3758 scp = ha->cmd_tab[IStatus-2].cmnd; in gdth_interrupt()
3760 ha->cmd_tab[IStatus-2].cmnd = UNUSED_CMND; in gdth_interrupt()
3985 if (scp->cmnd[0] == RESERVE) { in gdth_sync_event()
3987 } else if (scp->cmnd[0] == RELEASE) { in gdth_sync_event()
4348 if (ha->cmd_tab[i].cmnd != UNUSED_CMND) in gdth_timeout()
4580 ha->cmd_tab[i].cmnd = UNUSED_CMND; in GDTH_INITFUNC()
4730 ha->cmd_tab[i].cmnd = UNUSED_CMND; in GDTH_INITFUNC()
4880 ha->cmd_tab[i].cmnd = UNUSED_CMND; in GDTH_INITFUNC()
5136 Scsi_Cmnd *cmnd; in gdth_eh_bus_reset() local
5152 cmnd = ha->cmd_tab[i].cmnd; in gdth_eh_bus_reset()
5154 if (!SPECIAL_SCP(cmnd) && cmnd->device->channel == b) in gdth_eh_bus_reset()
5156 if (!SPECIAL_SCP(cmnd) && cmnd->channel == b) in gdth_eh_bus_reset()
5158 ha->cmd_tab[i].cmnd = UNUSED_CMND; in gdth_eh_bus_reset()
5246 TRACE(("gdth_queuecommand() cmd 0x%x\n", scp->cmnd[0])); in gdth_queuecommand()
5365 static int ioc_resetdrv(unsigned long arg, char *cmnd) in ioc_resetdrv() argument
5400 gdth_do_req(srp, &cmd, cmnd, 30); in ioc_resetdrv()
5409 gdth_do_cmd(scp, &cmd, cmnd, 30); in ioc_resetdrv()
5418 gdth_do_cmd(&scp, &cmd, cmnd, 30); in ioc_resetdrv()
5426 static int ioc_general(unsigned long arg, char *cmnd) in ioc_general() argument
5537 gdth_do_req(srp, &gen.command, cmnd, gen.timeout); in ioc_general()
5547 gdth_do_cmd(scp, &gen.command, cmnd, gen.timeout); in ioc_general()
5557 gdth_do_cmd(&scp, &gen.command, cmnd, gen.timeout); in ioc_general()
5576 static int ioc_hdrlist(unsigned long arg, char *cmnd) in ioc_hdrlist() argument
5635 gdth_do_req(srp, &cmd, cmnd, 30); in ioc_hdrlist()
5639 gdth_do_cmd(scp, &cmd, cmnd, 30); in ioc_hdrlist()
5643 gdth_do_cmd(&scp, &cmd, cmnd, 30); in ioc_hdrlist()
5660 static int ioc_rescan(unsigned long arg, char *cmnd) in ioc_rescan() argument
5715 gdth_do_req(srp, &cmd, cmnd, 30); in ioc_rescan()
5719 gdth_do_cmd(scp, &cmd, cmnd, 30); in ioc_rescan()
5723 gdth_do_cmd(&scp, &cmd, cmnd, 30); in ioc_rescan()
5741 gdth_do_req(srp, &cmd, cmnd, 30); in ioc_rescan()
5745 gdth_do_cmd(scp, &cmd, cmnd, 30); in ioc_rescan()
5749 gdth_do_cmd(&scp, &cmd, cmnd, 30); in ioc_rescan()
5785 gdth_do_req(srp, &cmd, cmnd, 30); in ioc_rescan()
5789 gdth_do_cmd(scp, &cmd, cmnd, 30); in ioc_rescan()
5793 gdth_do_cmd(&scp, &cmd, cmnd, 30); in ioc_rescan()
5808 gdth_do_req(srp, &cmd, cmnd, 30); in ioc_rescan()
5812 gdth_do_cmd(scp, &cmd, cmnd, 30); in ioc_rescan()
5816 gdth_do_cmd(&scp, &cmd, cmnd, 30); in ioc_rescan()
5833 gdth_do_req(srp, &cmd, cmnd, 30); in ioc_rescan()
5837 gdth_do_cmd(scp, &cmd, cmnd, 30); in ioc_rescan()
5841 gdth_do_cmd(&scp, &cmd, cmnd, 30); in ioc_rescan()
5872 char cmnd[MAX_COMMAND_SIZE]; in gdth_ioctl() local
5874 memset(cmnd, 0xff, 12); in gdth_ioctl()
5939 return ioc_general(arg, cmnd); in gdth_ioctl()
5981 return ioc_rescan(arg, cmnd); in gdth_ioctl()
5984 return ioc_hdrlist(arg, cmnd); in gdth_ioctl()
6034 return ioc_resetdrv(arg, cmnd); in gdth_ioctl()
6059 char cmnd[MAX_COMMAND_SIZE]; in gdth_flush() local
6060 memset(cmnd, 0xff, MAX_COMMAND_SIZE); in gdth_flush()
6103 gdth_do_req(srp, &gdtcmd, cmnd, 30); in gdth_flush()
6105 gdth_do_cmd(scp, &gdtcmd, cmnd, 30); in gdth_flush()
6107 gdth_do_cmd(&scp, &gdtcmd, cmnd, 30); in gdth_flush()
6136 char cmnd[MAX_COMMAND_SIZE]; in gdth_halt() local
6149 memset(cmnd, 0xff, MAX_COMMAND_SIZE); in gdth_halt()
6163 gdth_do_req(srp, &gdtcmd, cmnd, 10); in gdth_halt()
6175 gdth_do_cmd(scp, &gdtcmd, cmnd, 10); in gdth_halt()
6184 gdth_do_cmd(&scp, &gdtcmd, cmnd, 10); in gdth_halt()