* [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization
@ 2019-09-03 10:18 Oliver Neukum
2019-09-03 10:18 ` [PATCH] Revert "gpss: core: no waiters left behind on deregister" Oliver Neukum
2019-10-01 3:36 ` [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization Martin K. Petersen
0 siblings, 2 replies; 4+ messages in thread
From: Oliver Neukum @ 2019-09-03 10:18 UTC (permalink / raw)
To: martin.petersen, jejb, linux-scsi, usb-storage, stern; +Cc: Oliver Neukum
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(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 149d406aacc9..2d77f32e13d5 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -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;
--
2.16.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] Revert "gpss: core: no waiters left behind on deregister"
2019-09-03 10:18 [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization Oliver Neukum
@ 2019-09-03 10:18 ` Oliver Neukum
2019-09-03 10:25 ` Oliver Neukum
2019-10-01 3:36 ` [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization Martin K. Petersen
1 sibling, 1 reply; 4+ messages in thread
From: Oliver Neukum @ 2019-09-03 10:18 UTC (permalink / raw)
To: martin.petersen, jejb, linux-scsi, usb-storage, stern; +Cc: Oliver Neukum
This reverts commit f95aec18e46af9d7fb6f312020824d536dd720dd.
---
drivers/gnss/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
index 0d13bd2cefd5..e6f94501cb28 100644
--- a/drivers/gnss/core.c
+++ b/drivers/gnss/core.c
@@ -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);
--
2.16.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "gpss: core: no waiters left behind on deregister"
2019-09-03 10:18 ` [PATCH] Revert "gpss: core: no waiters left behind on deregister" Oliver Neukum
@ 2019-09-03 10:25 ` Oliver Neukum
0 siblings, 0 replies; 4+ messages in thread
From: Oliver Neukum @ 2019-09-03 10:25 UTC (permalink / raw)
To: martin.petersen, jejb, linux-scsi, usb-storage, stern
Am Dienstag, den 03.09.2019, 12:18 +0200 schrieb Oliver Neukum:
> This reverts commit f95aec18e46af9d7fb6f312020824d536dd720dd.
Please ignore this.
Regards
Oliver
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization
2019-09-03 10:18 [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization Oliver Neukum
2019-09-03 10:18 ` [PATCH] Revert "gpss: core: no waiters left behind on deregister" Oliver Neukum
@ 2019-10-01 3:36 ` Martin K. Petersen
1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2019-10-01 3:36 UTC (permalink / raw)
To: Oliver Neukum; +Cc: martin.petersen, jejb, linux-scsi, usb-storage, stern
Oliver,
> 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!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-01 3:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03 10:18 [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization Oliver Neukum
2019-09-03 10:18 ` [PATCH] Revert "gpss: core: no waiters left behind on deregister" Oliver Neukum
2019-09-03 10:25 ` Oliver Neukum
2019-10-01 3:36 ` [PATCH] scsi: ignore a failure to synchronize cache due to lack of authorization Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).