Lines Matching refs:usg

637 			struct user_sgmap* usg;  in aac_send_raw_srb()  local
638 usg = kmalloc(actual_fibsize - sizeof(struct aac_srb) in aac_send_raw_srb()
640 if (!usg) { in aac_send_raw_srb()
645 memcpy (usg, upsg, actual_fibsize - sizeof(struct aac_srb) in aac_send_raw_srb()
649 for (i = 0; i < usg->count; i++) { in aac_send_raw_srb()
652 if (usg->sg[i].count > in aac_send_raw_srb()
657 kfree(usg); in aac_send_raw_srb()
662 p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA); in aac_send_raw_srb()
665 usg->sg[i].count,i,usg->count)); in aac_send_raw_srb()
666 kfree(usg); in aac_send_raw_srb()
670 sg_user[i] = (void __user *)(uintptr_t)usg->sg[i].addr; in aac_send_raw_srb()
676 kfree (usg); in aac_send_raw_srb()
682 addr = pci_map_single(dev->pdev, p, usg->sg[i].count, data_dir); in aac_send_raw_srb()
686 byte_count += usg->sg[i].count; in aac_send_raw_srb()
687 psg->sg[i].count = cpu_to_le32(usg->sg[i].count); in aac_send_raw_srb()
689 kfree (usg); in aac_send_raw_srb()
702 struct user_sgmap64* usg = (struct user_sgmap64 *)upsg; in aac_send_raw_srb() local
706 if (usg->sg[i].count > in aac_send_raw_srb()
715 p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA); in aac_send_raw_srb()
718 usg->sg[i].count,i,usg->count)); in aac_send_raw_srb()
722 addr = (u64)usg->sg[i].addr[0]; in aac_send_raw_srb()
723 addr += ((u64)usg->sg[i].addr[1]) << 32; in aac_send_raw_srb()
729 if(copy_from_user(p,sg_user[i],usg->sg[i].count)){ in aac_send_raw_srb()
735 addr = pci_map_single(dev->pdev, p, usg->sg[i].count, data_dir); in aac_send_raw_srb()
738 byte_count += usg->sg[i].count; in aac_send_raw_srb()
739 psg->sg[i].count = cpu_to_le32(usg->sg[i].count); in aac_send_raw_srb()