* [GIT PULL] SCSI fixes for 5.5-rc6
@ 2020-01-14 16:15 James Bottomley
2020-01-14 18:25 ` pr-tracker-bot
0 siblings, 1 reply; 2+ messages in thread
From: James Bottomley @ 2020-01-14 16:15 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-scsi, linux-kernel
Two simple fixes in the upper drivers (so both fairly core), one in
enclosures, which fixes replugging a device into an enclosure slot and
one in the disk driver which fixes revalidating a drive with protection
information (PI) to make it a non-PI drive ... previously we were still
remembering the old PI state. Both fixed issues are quite rare in the
field.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
James Bottomley (1):
scsi: enclosure: Fix stale device oops with hot replug
Xiang Chen (1):
scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI
And the diffstat:
drivers/misc/enclosure.c | 3 +--
drivers/scsi/sd.c | 4 +++-
2 files changed, 4 insertions(+), 3 deletions(-)
With full diff below.
James
---
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index 6d27ccfe0680..3c2d405bc79b 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -406,10 +406,9 @@ int enclosure_remove_device(struct enclosure_device *edev, struct device *dev)
cdev = &edev->component[i];
if (cdev->dev == dev) {
enclosure_remove_links(cdev);
- device_del(&cdev->cdev);
put_device(dev);
cdev->dev = NULL;
- return device_add(&cdev->cdev);
+ return 0;
}
}
return -ENODEV;
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index cea625906440..65ce10c7989c 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2211,8 +2211,10 @@ static int sd_read_protection_type(struct scsi_disk *sdkp, unsigned char *buffer
u8 type;
int ret = 0;
- if (scsi_device_protection(sdp) == 0 || (buffer[12] & 1) == 0)
+ if (scsi_device_protection(sdp) == 0 || (buffer[12] & 1) == 0) {
+ sdkp->protection_type = 0;
return ret;
+ }
type = ((buffer[12] >> 1) & 7) + 1; /* P_TYPE 0 = Type 1 */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [GIT PULL] SCSI fixes for 5.5-rc6
2020-01-14 16:15 [GIT PULL] SCSI fixes for 5.5-rc6 James Bottomley
@ 2020-01-14 18:25 ` pr-tracker-bot
0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2020-01-14 18:25 UTC (permalink / raw)
To: James Bottomley; +Cc: Andrew Morton, Linus Torvalds, linux-scsi, linux-kernel
The pull request you sent on Tue, 14 Jan 2020 08:15:51 -0800:
> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/c21ed4d9a636500e66642221d3880c3f9569964f
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-14 18:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 16:15 [GIT PULL] SCSI fixes for 5.5-rc6 James Bottomley
2020-01-14 18:25 ` pr-tracker-bot
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).