Lines Matching refs:SCp
24 static inline int copy_SCp_to_sg(struct scatterlist *sg, struct scsi_pointer *SCp, int max) in copy_SCp_to_sg() argument
26 int bufs = SCp->buffers_residual; in copy_SCp_to_sg()
33 sg_set_buf(sg, SCp->ptr, SCp->this_residual); in copy_SCp_to_sg()
39 for_each_sg(sg_next(SCp->buffer), src_sg, bufs, i) in copy_SCp_to_sg()
47 static inline int next_SCp(struct scsi_pointer *SCp) in next_SCp() argument
49 int ret = SCp->buffers_residual; in next_SCp()
51 SCp->buffer = sg_next(SCp->buffer); in next_SCp()
52 SCp->buffers_residual--; in next_SCp()
53 SCp->ptr = sg_virt(SCp->buffer); in next_SCp()
54 SCp->this_residual = SCp->buffer->length; in next_SCp()
56 SCp->ptr = NULL; in next_SCp()
57 SCp->this_residual = 0; in next_SCp()
62 static inline unsigned char get_next_SCp_byte(struct scsi_pointer *SCp) in get_next_SCp_byte() argument
64 char c = *SCp->ptr; in get_next_SCp_byte()
66 SCp->ptr += 1; in get_next_SCp_byte()
67 SCp->this_residual -= 1; in get_next_SCp_byte()
72 static inline void put_next_SCp_byte(struct scsi_pointer *SCp, unsigned char c) in put_next_SCp_byte() argument
74 *SCp->ptr = c; in put_next_SCp_byte()
75 SCp->ptr += 1; in put_next_SCp_byte()
76 SCp->this_residual -= 1; in put_next_SCp_byte()
81 memset(&SCpnt->SCp, 0, sizeof(struct scsi_pointer)); in init_SCp()
86 SCpnt->SCp.buffer = scsi_sglist(SCpnt); in init_SCp()
87 SCpnt->SCp.buffers_residual = scsi_sg_count(SCpnt) - 1; in init_SCp()
88 SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer); in init_SCp()
89 SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; in init_SCp()
90 SCpnt->SCp.phase = scsi_bufflen(SCpnt); in init_SCp()
114 SCpnt->SCp.phase = in init_SCp()
121 SCpnt->SCp.ptr = NULL; in init_SCp()
122 SCpnt->SCp.this_residual = 0; in init_SCp()
123 SCpnt->SCp.phase = 0; in init_SCp()