• Home
  • Raw
  • Download

Lines Matching refs:STbp

1548 	struct st_buffer *STbp = STp->buffer;  in setup_buffering()  local
1557 i = sgl_map_user_pages(STbp, STbp->use_sg, (unsigned long)buf, in setup_buffering()
1560 STbp->do_dio = i; in setup_buffering()
1561 STbp->buffer_bytes = 0; /* can be used as transfer counter */ in setup_buffering()
1564 STbp->do_dio = 0; /* fall back to buffering with any error */ in setup_buffering()
1565 STbp->sg_segs = STbp->do_dio; in setup_buffering()
1567 if (STbp->do_dio) { in setup_buffering()
1569 STp->nbr_pages += STbp->do_dio; in setup_buffering()
1573 STbp->do_dio = 0; in setup_buffering()
1576 if (!STbp->do_dio) { in setup_buffering()
1584 if (is_read && STp->sili && !STbp->cleared) in setup_buffering()
1585 clear_buffer(STbp); in setup_buffering()
1588 if (bufsize > STbp->buffer_size && in setup_buffering()
1589 !enlarge_buffer(STbp, bufsize, STp->restr_dma)) { in setup_buffering()
1597 STbp->buffer_blocks = bufsize / STp->block_size; in setup_buffering()
1608 struct st_buffer *STbp; in release_buffering() local
1610 STbp = STp->buffer; in release_buffering()
1611 if (STbp->do_dio) { in release_buffering()
1612 sgl_unmap_user_pages(STbp, STbp->do_dio, is_read); in release_buffering()
1613 STbp->do_dio = 0; in release_buffering()
1614 STbp->sg_segs = 0; in release_buffering()
1634 struct st_buffer *STbp; in st_write() local
1682 STbp = STp->buffer; in st_write()
1704 !STbp->do_dio && in st_write()
1726 if (STbp->do_dio) { in st_write()
1733 do_count = STbp->buffer_blocks * STp->block_size - in st_write()
1734 STbp->buffer_bytes; in st_write()
1739 i = append_to_buffer(b_point, STbp, do_count); in st_write()
1748 async_write = STp->block_size == 0 && !STbp->do_dio && in st_write()
1753 STbp->buffer_bytes < STbp->buffer_size) { in st_write()
1764 if (!STbp->do_dio) in st_write()
1765 blks = STbp->buffer_bytes; in st_write()
1779 retval = STbp->syscall_result; in st_write()
1782 if (async_write && !STbp->syscall_result) { in st_write()
1783 STbp->writing = transfer; in st_write()
1784 STp->dirty = !(STbp->writing == in st_write()
1785 STbp->buffer_bytes); in st_write()
1791 if (STbp->syscall_result != 0) { in st_write()
1857 retval = STbp->syscall_result; in st_write()
1869 STbp->buffer_bytes = 0; in st_write()
1908 struct st_buffer *STbp; in read_tape() local
1918 STbp = STp->buffer; in read_tape()
1928 if (!STbp->do_dio && bytes > (STp->buffer)->buffer_size) in read_tape()
1951 return STbp->syscall_result; in read_tape()
1953 STbp->read_pointer = 0; in read_tape()
1957 if (STbp->syscall_result) { in read_tape()
1996 STbp->buffer_bytes = 0; in read_tape()
1999 STbp->buffer_bytes = bytes - transfer; in read_tape()
2013 STbp->buffer_bytes = (blks - transfer) * in read_tape()
2019 STbp->buffer_bytes); in read_tape()
2031 STbp->buffer_bytes = 0; in read_tape()
2033 STbp->buffer_bytes = in read_tape()
2037 STbp->buffer_bytes); in read_tape()
2044 STbp->buffer_bytes = bytes - transfer; in read_tape()
2046 STbp->buffer_bytes = in read_tape()
2051 STbp->buffer_bytes); in read_tape()
2068 if (STbp->buffer_bytes < 0) /* Caused by bogus sense data */ in read_tape()
2069 STbp->buffer_bytes = 0; in read_tape()
2073 retval = STbp->syscall_result; in read_tape()
2079 STbp->buffer_bytes = bytes; in read_tape()
2081 STbp->buffer_bytes -= STp->buffer->cmdstat.residual; in read_tape()
2088 STps->drv_block += STbp->buffer_bytes / STp->block_size; in read_tape()
2106 struct st_buffer *STbp = STp->buffer; in st_read() local
2135 STps->eof, STbp->buffer_bytes); in st_read()
2141 do_dio = STbp->do_dio; in st_read()
2143 if (STbp->buffer_bytes == 0 && in st_read()
2173 if (STbp->buffer_bytes == 0) { in st_read()
2182 if (STbp->buffer_bytes > 0) { in st_read()
2187 STps->eof, STbp->buffer_bytes, in st_read()
2190 transfer = STbp->buffer_bytes < count - total ? in st_read()
2191 STbp->buffer_bytes : count - total; in st_read()
2193 i = from_buffer(STbp, buf, transfer); in st_read()
2234 STbp->buffer_bytes = 0; in st_read()
4917 static int sgl_map_user_pages(struct st_buffer *STbp, in sgl_map_user_pages() argument
4926 struct rq_map_data *mdata = &STbp->map_data; in sgl_map_user_pages()
4961 STbp->mapped_pages = pages; in sgl_map_user_pages()
4975 static int sgl_unmap_user_pages(struct st_buffer *STbp, in sgl_unmap_user_pages() argument
4979 unpin_user_pages_dirty_lock(STbp->mapped_pages, nr_pages, dirtied); in sgl_unmap_user_pages()
4981 kfree(STbp->mapped_pages); in sgl_unmap_user_pages()
4982 STbp->mapped_pages = NULL; in sgl_unmap_user_pages()