scsi: ignore a failure to synchronize cache due to lack of authorization
PATCH 1/1 scsi: ignore a failure to synchronize cache due to lack of authorization
I've got a report about a UAS drive enclosure reporting back
Sense: Logical unit access not authorized
if the drive it holds is password protected. While the drive is obviously unusable in that state as a mass storage device, it still exists as a sd device and when the system is asked to perform a suspend of the drive, it will be sent a SYNCHRONIZE CACHE. If that fails due to password protection, the error must be ignored.
--- drivers/scsi/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/sd.c +2 -1
@@ -1655,7 +1655,8 @@ static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr)/* we need to evaluate the error return */ if (scsi_sense_valid (sshdr) && (sshdr->asc ==0x3a ||/* medium not present */ - sshdr->asc ==0x20 ))/* invalid command */ + sshdr->asc ==0x20 ||/* invalid command */ + (sshdr->asc ==0x74 && sshdr->ascq ==0x71 )))/* drive is password locked */ /* this is no error here */ return 0 ;
Signature · 1 line
2.16.4
PATCH 1/1 Revert "gpss: core: no waiters left behind on deregister"
This reverts commit f95aec18e46af9d7fb6f312020824d536dd720dd.
--- drivers/gnss/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gnss/core.c +1 -1
@@ -303,7 +303,7 @@ void gnss_deregister_device(struct gnss_device *gdev)down_write (&gdev->rwsem); gdev->disconnected = true;if (gdev->count) { -wake_up_interruptible_all (&gdev->read_queue); +wake_up_interruptible (&gdev->read_queue); gdev->ops->close (gdev); }up_write (&gdev->rwsem);
Signature · 1 line
2.16.4
Re: [PATCH] Revert "gpss: core: no waiters left behind on deregister"
Am Dienstag, den 03.09.2019, 12:18 +0200 schrieb Oliver Neukum:
Quoted 1 line
This reverts commit
f95aec18e46af9d7fb6f312020824d536dd720dd.
Please ignore this.
Regards
Oliver
Martin K. Petersen
AppliedOliver,
Quoted 8 lines
I've got a report about a UAS drive enclosure reporting back Sense:
Logical unit access not authorized if the drive it holds is password protected. While the drive is obviously unusable in that state as a mass storage device, it still exists as a sd device and when the system is asked to perform a suspend of the drive, it will be sent a SYNCHRONIZE CACHE. If that fails due to password protection, the error must be ignored. ---drivers/scsi/sd.c| 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to 5.4/scsi-fixes, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering