• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/ieee1394/

Lines Matching refs:cmd

509 	struct sbp2_command_info *cmd;
514 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
515 if (!cmd)
518 cmd->command_orb_dma =
519 dma_map_single(dmadev, &cmd->command_orb,
522 if (dma_mapping_error(dmadev, cmd->command_orb_dma))
525 cmd->sge_dma =
526 dma_map_single(dmadev, &cmd->scatter_gather_element,
527 sizeof(cmd->scatter_gather_element),
529 if (dma_mapping_error(dmadev, cmd->sge_dma))
532 INIT_LIST_HEAD(&cmd->list);
533 list_add_tail(&cmd->list, &lu->cmd_orb_completed);
538 dma_unmap_single(dmadev, cmd->command_orb_dma,
541 kfree(cmd);
550 struct sbp2_command_info *cmd;
556 cmd = list_entry(lh, struct sbp2_command_info, list);
558 cmd->command_orb_dma,
561 dma_unmap_single(host->device.parent, cmd->sge_dma,
562 sizeof(cmd->scatter_gather_element),
564 kfree(cmd);
577 struct sbp2_command_info *cmd;
582 list_for_each_entry(cmd, &lu->cmd_orb_inuse, list)
583 if (cmd->command_orb_dma == orb) {
586 return cmd;
600 struct sbp2_command_info *cmd;
603 list_for_each_entry(cmd, &lu->cmd_orb_inuse, list)
604 if (cmd->Current_SCpnt == SCpnt)
605 return cmd;
615 struct sbp2_command_info *cmd = NULL;
622 cmd = list_entry(lh, struct sbp2_command_info, list);
623 cmd->Current_done = Current_done;
624 cmd->Current_SCpnt = Current_SCpnt;
625 list_add_tail(&cmd->list, &lu->cmd_orb_inuse);
629 return cmd;
637 struct sbp2_command_info *cmd)
639 if (scsi_sg_count(cmd->Current_SCpnt))
641 scsi_sglist(cmd->Current_SCpnt),
642 scsi_sg_count(cmd->Current_SCpnt),
643 cmd->Current_SCpnt->sc_data_direction);
644 list_move_tail(&cmd->list, &lu->cmd_orb_completed);
1478 struct sbp2_command_info *cmd,
1500 pt = &cmd->scatter_gather_element[0];
1502 dma_sync_single_for_cpu(dmadev, cmd->sge_dma,
1503 sizeof(cmd->scatter_gather_element),
1513 orb->data_descriptor_lo = cmd->sge_dma;
1515 dma_sync_single_for_device(dmadev, cmd->sge_dma,
1516 sizeof(cmd->scatter_gather_element),
1523 struct sbp2_command_info *cmd,
1527 struct sbp2_command_orb *orb = &cmd->command_orb;
1533 dma_sync_single_for_cpu(dmadev, cmd->command_orb_dma,
1567 ret = sbp2_prep_command_orb_sg(orb, lu->hi, cmd,
1577 dma_sync_single_for_device(dmadev, cmd->command_orb_dma,
1583 struct sbp2_command_info *cmd)
1604 data[1] = cmd->command_orb_dma;
1618 last_orb->next_ORB_lo = cpu_to_be32(cmd->command_orb_dma);
1630 lu->last_orb = &cmd->command_orb;
1631 lu->last_orb_dma = cmd->command_orb_dma;
1654 struct sbp2_command_info *cmd;
1656 cmd = sbp2util_allocate_command_orb(lu, SCpnt, done);
1657 if (!cmd)
1660 if (sbp2_create_command_orb(lu, cmd, SCpnt))
1663 sbp2_link_orb_command(lu, cmd);
1703 struct sbp2_command_info *cmd;
1747 cmd = NULL;
1749 cmd = sbp2util_find_command_for_orb(lu, sb->ORB_offset_lo);
1750 if (cmd) {
1752 SCpnt = cmd->Current_SCpnt;
1754 sbp2util_mark_command_completed(lu, cmd);
1802 cmd->Current_done);
1864 struct sbp2_command_info *cmd;
1870 cmd = list_entry(lh, struct sbp2_command_info, list);
1871 sbp2util_mark_command_completed(lu, cmd);
1872 if (cmd->Current_SCpnt) {
1873 cmd->Current_SCpnt->result = status << 16;
1874 cmd->Current_done(cmd->Current_SCpnt);
1994 struct sbp2_command_info *cmd;
2005 cmd = sbp2util_find_command_for_SCpnt(lu, SCpnt);
2006 if (cmd) {
2007 sbp2util_mark_command_completed(lu, cmd);
2008 if (cmd->Current_SCpnt) {
2009 cmd->Current_SCpnt->result = DID_ABORT << 16;
2010 cmd->Current_done(cmd->Current_SCpnt);