scsi: sd: Use separate buf for START_STOP in sd_spinup_disk()
authorMike Christie <michael.christie@oracle.com>
Tue, 23 Jan 2024 00:22:05 +0000 (18:22 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 30 Jan 2024 02:20:53 +0000 (21:20 -0500)
commit1008f5776fe5c398e1202c93b835943b04de3ec6
tree4d9b6e1ed8e17ae893a8262969ad37aa4f67bf65
parent987d7d3db0b9b5428c4888ed375cca290667a597
scsi: sd: Use separate buf for START_STOP in sd_spinup_disk()

We currently reuse the cmd buffer for the TUR and START_STOP commands
which requires us to reset the buffer when retrying. This has us use
separate buffers for the 2 commands so we can make them const and I think
it makes it easier to handle for retries but does not add too much extra to
the stack use.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20240123002220.129141-5-michael.christie@oracle.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c