]> git.baikalelectronics.ru Git - kernel.git/commit
st: Fix MTMKPART to work with newer drives
authorKai Makisara <Kai.Makisara@kolumbus.fi>
Tue, 9 Feb 2016 19:56:55 +0000 (21:56 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commit92e5186941d651d5a4bb412484c568fe194e14c4
tree9fca83ced56fbea6c1a6c618150e540c785e0e43
parent214cd06dcc611f94a9c6d8aa89bb879f6e233ecc
st: Fix MTMKPART to work with newer drives

Change the MTMKPART operation of the MTIOCTOP ioctl so that it works
also with current drives (LTO-5/6, etc.). Send a separate FORMAT MEDIUM
command if the partition mode page indicates that this is required. Use
LOAD to position the tape at the beginning of tape.

The operation is extended so that if the argument is negative, its
absolute value specifies the size of partition 0, which is the
physically first partition of the tape.

Signed-off-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Tested-by: Shane M Seymour <shane.seymour@hpe.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Tested-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Documentation/scsi/st.txt
drivers/scsi/st.c