STbp 1547 drivers/scsi/st.c struct st_buffer *STbp = STp->buffer; STbp 1556 drivers/scsi/st.c i = sgl_map_user_pages(STbp, STbp->use_sg, (unsigned long)buf, STbp 1559 drivers/scsi/st.c STbp->do_dio = i; STbp 1560 drivers/scsi/st.c STbp->buffer_bytes = 0; /* can be used as transfer counter */ STbp 1563 drivers/scsi/st.c STbp->do_dio = 0; /* fall back to buffering with any error */ STbp 1564 drivers/scsi/st.c STbp->sg_segs = STbp->do_dio; STbp 1566 drivers/scsi/st.c if (STbp->do_dio) { STbp 1568 drivers/scsi/st.c STp->nbr_pages += STbp->do_dio; STbp 1572 drivers/scsi/st.c STbp->do_dio = 0; STbp 1575 drivers/scsi/st.c if (!STbp->do_dio) { STbp 1583 drivers/scsi/st.c if (is_read && STp->sili && !STbp->cleared) STbp 1584 drivers/scsi/st.c clear_buffer(STbp); STbp 1587 drivers/scsi/st.c if (bufsize > STbp->buffer_size && STbp 1588 drivers/scsi/st.c !enlarge_buffer(STbp, bufsize, STp->restr_dma)) { STbp 1596 drivers/scsi/st.c STbp->buffer_blocks = bufsize / STp->block_size; STbp 1607 drivers/scsi/st.c struct st_buffer *STbp; STbp 1609 drivers/scsi/st.c STbp = STp->buffer; STbp 1610 drivers/scsi/st.c if (STbp->do_dio) { STbp 1611 drivers/scsi/st.c sgl_unmap_user_pages(STbp, STbp->do_dio, is_read); STbp 1612 drivers/scsi/st.c STbp->do_dio = 0; STbp 1613 drivers/scsi/st.c STbp->sg_segs = 0; STbp 1633 drivers/scsi/st.c struct st_buffer *STbp; STbp 1681 drivers/scsi/st.c STbp = STp->buffer; STbp 1703 drivers/scsi/st.c !STbp->do_dio && STbp 1725 drivers/scsi/st.c if (STbp->do_dio) { STbp 1732 drivers/scsi/st.c do_count = STbp->buffer_blocks * STp->block_size - STbp 1733 drivers/scsi/st.c STbp->buffer_bytes; STbp 1738 drivers/scsi/st.c i = append_to_buffer(b_point, STbp, do_count); STbp 1747 drivers/scsi/st.c async_write = STp->block_size == 0 && !STbp->do_dio && STbp 1752 drivers/scsi/st.c STbp->buffer_bytes < STbp->buffer_size) { STbp 1763 drivers/scsi/st.c if (!STbp->do_dio) STbp 1764 drivers/scsi/st.c blks = STbp->buffer_bytes; STbp 1778 drivers/scsi/st.c retval = STbp->syscall_result; STbp 1781 drivers/scsi/st.c if (async_write && !STbp->syscall_result) { STbp 1782 drivers/scsi/st.c STbp->writing = transfer; STbp 1783 drivers/scsi/st.c STp->dirty = !(STbp->writing == STbp 1784 drivers/scsi/st.c STbp->buffer_bytes); STbp 1790 drivers/scsi/st.c if (STbp->syscall_result != 0) { STbp 1856 drivers/scsi/st.c retval = STbp->syscall_result; STbp 1868 drivers/scsi/st.c STbp->buffer_bytes = 0; STbp 1907 drivers/scsi/st.c struct st_buffer *STbp; STbp 1917 drivers/scsi/st.c STbp = STp->buffer; STbp 1927 drivers/scsi/st.c if (!STbp->do_dio && bytes > (STp->buffer)->buffer_size) STbp 1950 drivers/scsi/st.c return STbp->syscall_result; STbp 1952 drivers/scsi/st.c STbp->read_pointer = 0; STbp 1956 drivers/scsi/st.c if (STbp->syscall_result) { STbp 1995 drivers/scsi/st.c STbp->buffer_bytes = 0; STbp 1998 drivers/scsi/st.c STbp->buffer_bytes = bytes - transfer; STbp 2012 drivers/scsi/st.c STbp->buffer_bytes = (blks - transfer) * STbp 2018 drivers/scsi/st.c STbp->buffer_bytes); STbp 2030 drivers/scsi/st.c STbp->buffer_bytes = 0; STbp 2032 drivers/scsi/st.c STbp->buffer_bytes = STbp 2036 drivers/scsi/st.c STbp->buffer_bytes); STbp 2043 drivers/scsi/st.c STbp->buffer_bytes = bytes - transfer; STbp 2045 drivers/scsi/st.c STbp->buffer_bytes = STbp 2050 drivers/scsi/st.c STbp->buffer_bytes); STbp 2067 drivers/scsi/st.c if (STbp->buffer_bytes < 0) /* Caused by bogus sense data */ STbp 2068 drivers/scsi/st.c STbp->buffer_bytes = 0; STbp 2072 drivers/scsi/st.c retval = STbp->syscall_result; STbp 2078 drivers/scsi/st.c STbp->buffer_bytes = bytes; STbp 2080 drivers/scsi/st.c STbp->buffer_bytes -= STp->buffer->cmdstat.residual; STbp 2087 drivers/scsi/st.c STps->drv_block += STbp->buffer_bytes / STp->block_size; STbp 2105 drivers/scsi/st.c struct st_buffer *STbp = STp->buffer; STbp 2134 drivers/scsi/st.c STps->eof, STbp->buffer_bytes); STbp 2140 drivers/scsi/st.c do_dio = STbp->do_dio; STbp 2142 drivers/scsi/st.c if (STbp->buffer_bytes == 0 && STbp 2172 drivers/scsi/st.c if (STbp->buffer_bytes == 0) { STbp 2181 drivers/scsi/st.c if (STbp->buffer_bytes > 0) { STbp 2186 drivers/scsi/st.c STps->eof, STbp->buffer_bytes, STbp 2189 drivers/scsi/st.c transfer = STbp->buffer_bytes < count - total ? STbp 2190 drivers/scsi/st.c STbp->buffer_bytes : count - total; STbp 2192 drivers/scsi/st.c i = from_buffer(STbp, buf, transfer); STbp 2233 drivers/scsi/st.c STbp->buffer_bytes = 0; STbp 4897 drivers/scsi/st.c static int sgl_map_user_pages(struct st_buffer *STbp, STbp 4906 drivers/scsi/st.c struct rq_map_data *mdata = &STbp->map_data; STbp 4941 drivers/scsi/st.c STbp->mapped_pages = pages; STbp 4956 drivers/scsi/st.c static int sgl_unmap_user_pages(struct st_buffer *STbp, STbp 4962 drivers/scsi/st.c struct page *page = STbp->mapped_pages[i]; STbp 4971 drivers/scsi/st.c kfree(STbp->mapped_pages); STbp 4972 drivers/scsi/st.c STbp->mapped_pages = NULL;