]> Gentwo Git Trees - linux/.git/commit
s390/tape: Introduce idal buffer array
authorJan Höppner <hoeppner@linux.ibm.com>
Thu, 16 Oct 2025 07:47:17 +0000 (09:47 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 21 Oct 2025 08:25:55 +0000 (10:25 +0200)
commit574817d6c0866e80e8f09b8537476685631fc992
tree72ce198e9842a71a43f4fa0c9b2dabd6353dd770
parenta5e2ca22c18bcda97c7fc99d216ffd742405fb2f
s390/tape: Introduce idal buffer array

The tape device driver uses a single idal_buffer for I/O. While the
buffer itself can be arbitrary big, the limit for data transfer for a
single Channel-Command Word is at 65535 bytes (64K-1) since the count
field specifying the amount of data designated by the CCW is a 16-bit
unsigned value.

Provide functionality that allocates an array of multiple IDAL buffer
with the limitation mentioned above in mind.
A call to idal_buffer_array_alloc() allocates an array with a certain
amount of IDAL buffers which is determined based on the total size of
@size. Each individual buffer is limited to a size of CCW_MAX_BYTE_COUNT
(65535 bytes).

Add helper functions that determine the size (# of elements) and the
total data size covered by the array as well.

Current users of the single IDAL buffer are adapted to use the new
functions with one buffer to allocate.

The single IDAL buffer is removed from the tape_char_data struct.

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/cio.h
arch/s390/include/asm/idals.h
drivers/s390/char/tape.h
drivers/s390/char/tape_char.c
drivers/s390/char/tape_core.c
drivers/s390/char/tape_std.c