Lines Matching refs:pthru
521 mega_passthru *pthru; in mega_build_cmd() local
692 pthru = scb->pthru; in mega_build_cmd()
696 memset(pthru, 0, sizeof(mega_passthru)); in mega_build_cmd()
698 pthru->timeout = 0; in mega_build_cmd()
699 pthru->ars = 1; in mega_build_cmd()
700 pthru->reqsenselen = 14; in mega_build_cmd()
701 pthru->islogical = 1; in mega_build_cmd()
702 pthru->logdrv = ldrv_num; in mega_build_cmd()
703 pthru->cdblen = cmd->cmd_len; in mega_build_cmd()
704 memcpy(pthru->cdb, cmd->cmnd, cmd->cmd_len); in mega_build_cmd()
715 pthru->numsgelements = mega_build_sglist(adapter, scb, in mega_build_cmd()
716 &pthru->dataxferaddr, &pthru->dataxferlen); in mega_build_cmd()
918 pthru = mega_prepare_passthru(adapter, scb, cmd, in mega_build_cmd()
952 mega_passthru *pthru; in mega_prepare_passthru() local
954 pthru = scb->pthru; in mega_prepare_passthru()
955 memset(pthru, 0, sizeof (mega_passthru)); in mega_prepare_passthru()
958 pthru->timeout = 2; in mega_prepare_passthru()
960 pthru->ars = 1; in mega_prepare_passthru()
961 pthru->reqsenselen = 14; in mega_prepare_passthru()
962 pthru->islogical = 0; in mega_prepare_passthru()
964 pthru->channel = (adapter->flag & BOARD_40LD) ? 0 : channel; in mega_prepare_passthru()
966 pthru->target = (adapter->flag & BOARD_40LD) ? in mega_prepare_passthru()
969 pthru->cdblen = cmd->cmd_len; in mega_prepare_passthru()
970 pthru->logdrv = cmd->device->lun; in mega_prepare_passthru()
972 memcpy(pthru->cdb, cmd->cmnd, cmd->cmd_len); in mega_prepare_passthru()
993 pthru->numsgelements = mega_build_sglist(adapter, scb, in mega_prepare_passthru()
994 &pthru->dataxferaddr, &pthru->dataxferlen); in mega_prepare_passthru()
997 return pthru; in mega_prepare_passthru()
1417 mega_passthru *pthru = NULL; in mega_cmd_done() local
1501 pthru = scb->pthru; in mega_cmd_done()
1579 memcpy(cmd->sense_buffer, pthru->reqsensearea, in mega_cmd_done()
1825 if( scb->pthru ) { in mega_free_sgl()
1827 scb->pthru, scb->pthru_dma_addr); in mega_free_sgl()
1829 scb->pthru = NULL; in mega_free_sgl()
2884 scb->pthru = NULL; in mega_init_scb()
2906 scb->pthru = pci_alloc_consistent(adapter->dev, in mega_init_scb()
2910 if( !scb->pthru ) { in mega_init_scb()
2984 mega_passthru *pthru; /* copy user passthru here */ in megadev_ioctl() local
3160 pthru = pci_alloc_consistent(pdev, in megadev_ioctl()
3164 if( pthru == NULL ) { in megadev_ioctl()
3177 if( copy_from_user(pthru, upthru, in megadev_ioctl()
3181 sizeof(mega_passthru), pthru, in megadev_ioctl()
3192 if( pthru->dataxferlen ) { in megadev_ioctl()
3194 pthru->dataxferlen, in megadev_ioctl()
3200 pthru, in megadev_ioctl()
3212 uxferaddr = pthru->dataxferaddr; in megadev_ioctl()
3213 pthru->dataxferaddr = data_dma_hndl; in megadev_ioctl()
3220 if( pthru->dataxferlen && (uioc.flags & UIOC_WR) ) { in megadev_ioctl()
3225 pthru->dataxferlen) ) { in megadev_ioctl()
3239 mega_internal_command(adapter, &mc, pthru); in megadev_ioctl()
3249 if( pthru->dataxferlen && (uioc.flags & UIOC_RD) ) { in megadev_ioctl()
3251 pthru->dataxferlen) ) { in megadev_ioctl()
3261 pthru->reqsensearea, 14)) in megadev_ioctl()
3265 if( pthru->dataxferlen ) { in megadev_ioctl()
3267 pthru->dataxferlen, data, in megadev_ioctl()
3272 pthru, pthru_dma_hndl); in megadev_ioctl()
3827 if (scb->pthru->logdrv < 0x80 ) in mega_del_logdrv()
3828 scb->pthru->logdrv += 0x80; in mega_del_logdrv()
4007 mega_passthru *pthru; in mega_internal_dev_inquiry() local
4020 pthru = pci_alloc_consistent(pdev, sizeof(mega_passthru), in mega_internal_dev_inquiry()
4023 if( pthru == NULL ) { in mega_internal_dev_inquiry()
4028 pthru->timeout = 2; in mega_internal_dev_inquiry()
4029 pthru->ars = 1; in mega_internal_dev_inquiry()
4030 pthru->reqsenselen = 14; in mega_internal_dev_inquiry()
4031 pthru->islogical = 0; in mega_internal_dev_inquiry()
4033 pthru->channel = (adapter->flag & BOARD_40LD) ? 0 : ch; in mega_internal_dev_inquiry()
4035 pthru->target = (adapter->flag & BOARD_40LD) ? (ch << 4)|tgt : tgt; in mega_internal_dev_inquiry()
4037 pthru->cdblen = 6; in mega_internal_dev_inquiry()
4039 pthru->cdb[0] = INQUIRY; in mega_internal_dev_inquiry()
4040 pthru->cdb[1] = 0; in mega_internal_dev_inquiry()
4041 pthru->cdb[2] = 0; in mega_internal_dev_inquiry()
4042 pthru->cdb[3] = 0; in mega_internal_dev_inquiry()
4043 pthru->cdb[4] = 255; in mega_internal_dev_inquiry()
4044 pthru->cdb[5] = 0; in mega_internal_dev_inquiry()
4047 pthru->dataxferaddr = (u32)buf_dma_handle; in mega_internal_dev_inquiry()
4048 pthru->dataxferlen = 256; in mega_internal_dev_inquiry()
4055 rval = mega_internal_command(adapter, &mc, pthru); in mega_internal_dev_inquiry()
4057 pci_free_consistent(pdev, sizeof(mega_passthru), pthru, in mega_internal_dev_inquiry()
4079 mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) in mega_internal_command() argument
4104 scb->pthru = pthru; in mega_internal_command()