commit 03a0e87f70e806c0f94471eb451cc7a46d6eb762 Author: Greg Kroah-Hartman Date: Fri Jan 12 20:56:38 2024 +0100 Linux 5.10.207 Link: https://lore.kernel.org/r/20240111094700.222742213@linuxfoundation.org Tested-by: Pavel Machek (CIP) Tested-by: Florian Fainelli Tested-by: Slade Watkins Tested-by: Linux Kernel Functional Testing Tested-by: Jon Hunter Signed-off-by: Greg Kroah-Hartman commit a7fd5c7ba4b95be7c83a6e6805b8eb4e111d9ae7 Author: Alexander Atanasov Date: Fri Dec 15 14:10:08 2023 +0200 scsi: core: Always send batch on reset or error handling command commit 066c5b46b6eaf2f13f80c19500dbb3b84baabb33 upstream. In commit 8930a6c20791 ("scsi: core: add support for request batching") the block layer bd->last flag was mapped to SCMD_LAST and used as an indicator to send the batch for the drivers that implement this feature. However, the error handling code was not updated accordingly. scsi_send_eh_cmnd() is used to send error handling commands and request sense. The problem is that request sense comes as a single command that gets into the batch queue and times out. As a result the device goes offline after several failed resets. This was observed on virtio_scsi during a device resize operation. [ 496.316946] sd 0:0:4:0: [sdd] tag#117 scsi_eh_0: requesting sense [ 506.786356] sd 0:0:4:0: [sdd] tag#117 scsi_send_eh_cmnd timeleft: 0 [ 506.787981] sd 0:0:4:0: [sdd] tag#117 abort To fix this always set SCMD_LAST flag in scsi_send_eh_cmnd() and scsi_reset_ioctl(). Fixes: 8930a6c20791 ("scsi: core: add support for request batching") Cc: Signed-off-by: Alexander Atanasov Link: https://lore.kernel.org/r/20231215121008.2881653-1-alexander.atanasov@virtuozzo.com Reviewed-by: Ming Lei Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman commit e30419672e3acc039389236d0f4e77a08b217710 Author: Greg Kroah-Hartman Date: Thu Jan 11 10:35:04 2024 +0100 Revert "scsi: core: Add scsi_prot_ref_tag() helper" This reverts commit 294d66c35a4e019a9dfe889fe382adce1cc3773e which is commit 7ba46799d34695534666a3f71a2be10ea85ece6c upstream. As reported, a lot of scsi changes were made just to resolve a 2 line patch, so let's revert them all and then manually fix up the 2 line fixup so that things are simpler and potential abi changes are not an issue. Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz Reported-by: Pavel Machek Cc: "Martin K. Petersen" Cc: Bart Van Assche Cc: Benjamin Block Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit f60f60e1deca9729c596b2bca9f1e1bf47bf8a0e Author: Greg Kroah-Hartman Date: Thu Jan 11 10:35:02 2024 +0100 Revert "scsi: core: Introduce scsi_get_sector()" This reverts commit f230e6d4249b9ccdcb571077023cecabf91ecbb1 which is commit f0f214fe8cd32224267ebea93817b8c32074623d upstream. As reported, a lot of scsi changes were made just to resolve a 2 line patch, so let's revert them all and then manually fix up the 2 line fixup so that things are simpler and potential abi changes are not an issue. Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz Reported-by: Pavel Machek Cc: "Martin K. Petersen" Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Benjamin Block Cc: Bart Van Assche Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit a5edb407029321066c0ebbc2fd3d91acdd644d1e Author: Greg Kroah-Hartman Date: Thu Jan 11 10:35:01 2024 +0100 Revert "scsi: core: Make scsi_get_lba() return the LBA" This reverts commit d054858a9c9e4406099e61fe00c93516f9b4c169 which is commit d2c945f01d233085fedc9e3cf7ec180eaa2b7a85 upstream. As reported, a lot of scsi changes were made just to resolve a 2 line patch, so let's revert them all and then manually fix up the 2 line fixup so that things are simpler and potential abi changes are not an issue. Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz Reported-by: Pavel Machek Cc: "Martin K. Petersen" Cc: Bart Van Assche Cc: Benjamin Block Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit 2129297760278dc48649b9d50b4b646b36b5ff6d Author: Greg Kroah-Hartman Date: Thu Jan 11 10:35:00 2024 +0100 Revert "scsi: core: Use scsi_cmd_to_rq() instead of scsi_cmnd.request" This reverts commit df83ca8e986d0285974dfa510973191547dcd173 which is commit aa8e25e5006aac52c943c84e9056ab488630ee19 upstream. As reported, a lot of scsi changes were made just to resolve a 2 line patch, so let's revert them all and then manually fix up the 2 line fixup so that things are simpler and potential abi changes are not an issue. Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz Reported-by: Pavel Machek Cc: "Martin K. Petersen" Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Cc: Bart Van Assche Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit cea19678bf55f8d087bf617478f249208432156c Author: Greg Kroah-Hartman Date: Thu Jan 11 10:34:58 2024 +0100 Revert "scsi: core: Use a structure member to track the SCSI command submitter" This reverts commit f2d30198c0530b8da155697d8723e19ac72c15fe which is commit bf23e619039d360d503b7282d030daf2277a5d47 upstream. As reported, a lot of scsi changes were made just to resolve a 2 line patch, so let's revert them all and then manually fix up the 2 line fixup so that things are simpler and potential abi changes are not an issue. Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz Reported-by: Pavel Machek Cc: "Martin K. Petersen" Cc: Hannes Reinecke Cc: Ming Lei Cc: Christoph Hellwig Cc: Benjamin Block Cc: Bean Huo Cc: Bart Van Assche Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit 6963d049a422693bfeffe0112183481a0a0ea328 Author: Greg Kroah-Hartman Date: Thu Jan 11 10:32:13 2024 +0100 Revert "scsi: core: Always send batch on reset or error handling command" This reverts commit 9db5239d7533c841dcd7a36700f829f6ee96a76d which is commit 066c5b46b6eaf2f13f80c19500dbb3b84baabb33 upstream. As reported, a lot of scsi changes were made just to resolve a 2 line patch, so let's revert them all and then manually fix up the 2 line fixup so that things are simpler and potential abi changes are not an issue. Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz Reported-by: Pavel Machek Cc: "Martin K. Petersen" Cc: Ming Lei Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman