]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: sd: Remember that READ CAPACITY(16) succeeded
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 14 Mar 2018 16:15:56 +0000 (12:15 -0400)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:55:11 +0000 (19:55 -0600)
commit4c917fe46bdc24f88b5361f06e55a367cccb5000
tree8c960e770c70ed103e05e2d6ee9bfe9a270aeb52
parent7230109c3f8dee02ba52ad811bde890736a47ef8
scsi: sd: Remember that READ CAPACITY(16) succeeded

BugLink: https://bugs.launchpad.net/bugs/1836654
[ Upstream commit 597d74005ba85e87c256cd732128ebf7faf54247 ]

The USB storage glue sets the try_rc_10_first flag in an attempt to
avoid wedging poorly implemented legacy USB devices.

If the device capacity is too large to be expressed in the provided
response buffer field of READ CAPACITY(10), a well-behaved device will
set the reported capacity to 0xFFFFFFFF. We will then attempt to issue a
READ CAPACITY(16) to obtain the real capacity.

Since this part of the discovery logic is not covered by the first_scan
flag, a warning will be printed a couple of times times per revalidate
attempt if we upgrade from READ CAPACITY(10) to READ CAPACITY(16).

Remember that we have successfully issued READ CAPACITY(16) so we can
take the fast path on subsequent revalidate attempts.

Reported-by: Menion <menion@gmail.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/sd.c