Lines Matching refs:scmd
2360 struct udcd_cmd *scmd = (struct udcd_cmd *)bp->b_forw;
2365 if ((scmd->udcd_flags & UDCD_SILENT) && !(DEBUGGING)) {
2368 if (scmd->udcd_flags & UDCD_DIAGNOSE)
2371 if (scmd->udcd_flags & UDCD_NOINTR)
2384 makecommand(pkt, 0, scmd->udcd_cmd->cmd,
2385 scmd->udcd_cmd->sector_num.lba_num,
2386 scmd->udcd_cmd->address_mode,
2387 scmd->udcd_cmd->size,
2388 scmd->udcd_cmd->direction, scmd->udcd_cmd->features);
2391 if (scmd->udcd_timeout == 0)
2394 tval = scmd->udcd_timeout;
3049 struct udcd_cmd *scmd;
3227 scmd = (struct udcd_cmd *)data;
3228 scmd->udcd_cmd = &dcdcmd;
3236 scmd->udcd_cmd->cmd = ATA_READ_DMA;
3238 scmd->udcd_cmd->cmd = ATA_READ;
3239 scmd->udcd_cmd->address_mode = ADD_LBA_MODE;
3240 scmd->udcd_cmd->direction = DATA_READ;
3241 scmd->udcd_flags |= UDCD_READ|UDCD_SILENT;
3245 scmd->udcd_cmd->cmd = ATA_WRITE_DMA;
3247 scmd->udcd_cmd->cmd = ATA_WRITE;
3248 scmd->udcd_cmd->direction = DATA_WRITE;
3249 scmd->udcd_flags |= UDCD_WRITE|UDCD_SILENT;
3255 scmd->udcd_cmd->address_mode = ADD_LBA_MODE;
3256 scmd->udcd_cmd->features = 0;
3257 scmd->udcd_cmd->size = rwcmd32.buflen;
3258 scmd->udcd_cmd->sector_num.lba_num = rwcmd32.blkaddr;
3259 scmd->udcd_bufaddr = (caddr_t)(uintptr_t)rwcmd32.bufaddr;
3260 scmd->udcd_buflen = rwcmd32.buflen;
3261 scmd->udcd_timeout = (ushort_t)dcd_io_time;
3262 scmd->udcd_resid = 0ULL;
3263 scmd->udcd_status = 0;
3264 scmd->udcd_error_reg = 0;
3265 scmd->udcd_status_reg = 0;
3269 i = dcdioctl_cmd(dev, scmd, UIO_SYSSPACE, UIO_USERSPACE);
3272 * After return convert the status from scmd to
3275 (void) dcd_translate(&(rwcmd32.status), scmd);
3276 rwcmd32.status.resid = scmd->udcd_resid;
3339 scmd = (struct udcd_cmd *)data;
3352 udcd_cmd32toudcd_cmd(ucmd32, scmd);
3355 if (ddi_copyin((caddr_t)arg, scmd, sizeof (*scmd),
3362 if (ddi_copyin((caddr_t)arg, (caddr_t)scmd,
3363 sizeof (*scmd), flag)) {
3368 scmd->udcd_flags &= ~UDCD_NOINTR;
3371 i = dcdioctl_cmd(dev, scmd, uioseg, uioseg);
3379 udcd_cmdtoudcd_cmd32(scmd, ucmd32);
3387 if (ddi_copyout(scmd, (caddr_t)arg, sizeof (*scmd),
3395 if (ddi_copyout((caddr_t)scmd, (caddr_t)arg,
3396 sizeof (*scmd), flag)) {
3612 struct udcd_cmd *scmd;
3635 scmd = in;
3639 if (scmd->udcd_buflen <= 0) {
3640 if (scmd->udcd_flags & (UDCD_READ | UDCD_WRITE)) {
3643 scmd->udcd_buflen = 0;
3653 if (ddi_copyin((void *)scmd->udcd_cmd, cdb, sizeof (struct dcd_cmd),
3658 scmd = (struct udcd_cmd *)kmem_alloc(sizeof (*scmd), KM_SLEEP);
3659 bcopy((caddr_t)in, (caddr_t)scmd, sizeof (*scmd));
3660 scmd->udcd_cmd = (struct dcd_cmd *)cdb;
3661 rw = (scmd->udcd_flags & UDCD_READ) ? B_READ: B_WRITE;
3671 kmem_free(scmd->udcd_cmd, sizeof (struct dcd_cmd));
3672 kmem_free((caddr_t)scmd, sizeof (*scmd));
3688 "dcdioctl_cmd : buflen %x\n", scmd->udcd_buflen);
3690 if (scmd->udcd_buflen) {
3698 aiov.iov_base = scmd->udcd_bufaddr;
3699 aiov.iov_len = scmd->udcd_buflen;
3703 uio->uio_resid = scmd->udcd_buflen;
3710 bp->b_forw = (struct buf *)scmd;
3717 bp->b_forw = (struct buf *)scmd;
3743 kmem_free(scmd->udcd_cmd, sizeof (struct dcd_cmd));
3744 kmem_free((caddr_t)scmd, sizeof (*scmd));