Lines Matching refs:pthru
523 mega_passthru *pthru; in mega_build_cmd() local
694 pthru = scb->pthru; in mega_build_cmd()
698 memset(pthru, 0, sizeof(mega_passthru)); in mega_build_cmd()
700 pthru->timeout = 0; in mega_build_cmd()
701 pthru->ars = 1; in mega_build_cmd()
702 pthru->reqsenselen = 14; in mega_build_cmd()
703 pthru->islogical = 1; in mega_build_cmd()
704 pthru->logdrv = ldrv_num; in mega_build_cmd()
705 pthru->cdblen = cmd->cmd_len; in mega_build_cmd()
706 memcpy(pthru->cdb, cmd->cmnd, cmd->cmd_len); in mega_build_cmd()
717 pthru->numsgelements = mega_build_sglist(adapter, scb, in mega_build_cmd()
718 &pthru->dataxferaddr, &pthru->dataxferlen); in mega_build_cmd()
920 pthru = mega_prepare_passthru(adapter, scb, cmd, in mega_build_cmd()
954 mega_passthru *pthru; in mega_prepare_passthru() local
956 pthru = scb->pthru; in mega_prepare_passthru()
957 memset(pthru, 0, sizeof (mega_passthru)); in mega_prepare_passthru()
960 pthru->timeout = 2; in mega_prepare_passthru()
962 pthru->ars = 1; in mega_prepare_passthru()
963 pthru->reqsenselen = 14; in mega_prepare_passthru()
964 pthru->islogical = 0; in mega_prepare_passthru()
966 pthru->channel = (adapter->flag & BOARD_40LD) ? 0 : channel; in mega_prepare_passthru()
968 pthru->target = (adapter->flag & BOARD_40LD) ? in mega_prepare_passthru()
971 pthru->cdblen = cmd->cmd_len; in mega_prepare_passthru()
972 pthru->logdrv = cmd->device->lun; in mega_prepare_passthru()
974 memcpy(pthru->cdb, cmd->cmnd, cmd->cmd_len); in mega_prepare_passthru()
995 pthru->numsgelements = mega_build_sglist(adapter, scb, in mega_prepare_passthru()
996 &pthru->dataxferaddr, &pthru->dataxferlen); in mega_prepare_passthru()
999 return pthru; in mega_prepare_passthru()
1419 mega_passthru *pthru = NULL; in mega_cmd_done() local
1503 pthru = scb->pthru; in mega_cmd_done()
1581 memcpy(cmd->sense_buffer, pthru->reqsensearea, in mega_cmd_done()
1814 if( scb->pthru ) { in mega_free_sgl()
1816 sizeof(mega_passthru), scb->pthru, in mega_free_sgl()
1819 scb->pthru = NULL; in mega_free_sgl()
2868 scb->pthru = NULL; in mega_init_scb()
2890 scb->pthru = dma_alloc_coherent(&adapter->dev->dev, in mega_init_scb()
2894 if( !scb->pthru ) { in mega_init_scb()
2967 mega_passthru *pthru; /* copy user passthru here */ in megadev_ioctl() local
3142 pthru = dma_alloc_coherent(&pdev->dev, in megadev_ioctl()
3146 if( pthru == NULL ) { in megadev_ioctl()
3159 if( copy_from_user(pthru, upthru, in megadev_ioctl()
3164 pthru, pthru_dma_hndl); in megadev_ioctl()
3174 if( pthru->dataxferlen ) { in megadev_ioctl()
3176 pthru->dataxferlen, in megadev_ioctl()
3183 pthru, in megadev_ioctl()
3195 uxferaddr = pthru->dataxferaddr; in megadev_ioctl()
3196 pthru->dataxferaddr = data_dma_hndl; in megadev_ioctl()
3203 if( pthru->dataxferlen && (uioc.flags & UIOC_WR) ) { in megadev_ioctl()
3208 pthru->dataxferlen) ) { in megadev_ioctl()
3222 mega_internal_command(adapter, &mc, pthru); in megadev_ioctl()
3232 if( pthru->dataxferlen && (uioc.flags & UIOC_RD) ) { in megadev_ioctl()
3234 pthru->dataxferlen) ) { in megadev_ioctl()
3244 pthru->reqsensearea, 14)) in megadev_ioctl()
3248 if( pthru->dataxferlen ) { in megadev_ioctl()
3250 pthru->dataxferlen, data, in megadev_ioctl()
3255 pthru, pthru_dma_hndl); in megadev_ioctl()
3799 if (scb->pthru->logdrv < 0x80 ) in mega_del_logdrv()
3800 scb->pthru->logdrv += 0x80; in mega_del_logdrv()
3976 mega_passthru *pthru; in mega_internal_dev_inquiry() local
3989 pthru = dma_alloc_coherent(&pdev->dev, sizeof(mega_passthru), in mega_internal_dev_inquiry()
3992 if( pthru == NULL ) { in mega_internal_dev_inquiry()
3997 pthru->timeout = 2; in mega_internal_dev_inquiry()
3998 pthru->ars = 1; in mega_internal_dev_inquiry()
3999 pthru->reqsenselen = 14; in mega_internal_dev_inquiry()
4000 pthru->islogical = 0; in mega_internal_dev_inquiry()
4002 pthru->channel = (adapter->flag & BOARD_40LD) ? 0 : ch; in mega_internal_dev_inquiry()
4004 pthru->target = (adapter->flag & BOARD_40LD) ? (ch << 4)|tgt : tgt; in mega_internal_dev_inquiry()
4006 pthru->cdblen = 6; in mega_internal_dev_inquiry()
4008 pthru->cdb[0] = INQUIRY; in mega_internal_dev_inquiry()
4009 pthru->cdb[1] = 0; in mega_internal_dev_inquiry()
4010 pthru->cdb[2] = 0; in mega_internal_dev_inquiry()
4011 pthru->cdb[3] = 0; in mega_internal_dev_inquiry()
4012 pthru->cdb[4] = 255; in mega_internal_dev_inquiry()
4013 pthru->cdb[5] = 0; in mega_internal_dev_inquiry()
4016 pthru->dataxferaddr = (u32)buf_dma_handle; in mega_internal_dev_inquiry()
4017 pthru->dataxferlen = 256; in mega_internal_dev_inquiry()
4024 rval = mega_internal_command(adapter, &mc, pthru); in mega_internal_dev_inquiry()
4026 dma_free_coherent(&pdev->dev, sizeof(mega_passthru), pthru, in mega_internal_dev_inquiry()
4048 mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) in mega_internal_command() argument
4073 scb->pthru = pthru; in mega_internal_command()