android_kernel_samsung_a7y1.../drivers
Xiang Chen 4d9b06a327 scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI
commit 465f4edaecc6c37f81349233e84d46246bcac11a upstream.

If an attached disk with protection information enabled is reformatted
to Type 0 the revalidation code does not clear the original protection
type and subsequent accesses will keep setting RDPROTECT/WRPROTECT.

Set the protection type to 0 if the disk reports PROT_EN=0 in READ
CAPACITY(16).

[mkp: commit desc]

Fixes: fe542396da73 ("[SCSI] sd: Ensure we correctly disable devices with unknown protection type")
Link: https://lore.kernel.org/r/1578532344-101668-1-git-send-email-chenxiang66@hisilicon.com
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 13:36:56 +02:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
battery
battery_v2
bcma
block
bluetooth Bluetooth: btusb: fix PM leak in error case of setup 2020-04-07 13:24:51 +02:00
bts
bus
ccic
cdrom cdrom: respect device capabilities during opening action 2020-04-07 13:23:35 +02:00
char
clk
clocksource
connector
cpufreq
cpuidle
crypto
dca
devfreq PM / devfreq: Don't fail devfreq_dev_release if not in list 2020-04-07 13:24:09 +02:00
dio
dma
dma-buf
edac
eisa
extcon
fingerprint
firewire net: add annotations on hh->hh_len lockless accesses 2020-04-07 13:25:04 +02:00
firmware
five
fmc
fpga
gator
gpio gpio: Fix error message on out-of-range GPIO in lookup table 2020-04-07 13:36:46 +02:00
gps
gpu drm/i915/gen9: Clear residual context state on context switch 2020-04-07 13:33:10 +02:00
gud
hid HID: hidraw, uhid: Always report EPOLLOUT 2020-04-07 13:36:12 +02:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
ide
idle
iio
infiniband RDMA/srpt: Report the SCSI residual to the initiator 2020-04-07 13:36:52 +02:00
input Input: add safety guards to input_set_keycode() 2020-04-07 13:32:32 +02:00
iommu iommu: Remove device link to group on failure 2020-04-07 13:36:44 +02:00
ipack
irqchip
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md md: raid1: check rdev before reference in raid1_sync_request func 2020-04-07 13:24:22 +02:00
media media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap 2020-04-07 13:36:20 +02:00
memory
memstick
message
mfd
misc scsi: enclosure: Fix stale device oops with hot replug 2020-04-07 13:36:54 +02:00
mmc mmc: sdhci: Update the tuning failed messages to pr_debug level 2020-04-07 13:24:04 +02:00
motor
mtd
muic
net wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle 2020-04-07 13:36:34 +02:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: rn5t618: fix module aliases 2020-04-07 13:28:56 +02:00
remoteproc
reset
rpmsg
rtc rtc: mt6397: fix alarm register overwrite 2020-04-07 13:36:42 +02:00
s390
sbus
scsi scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI 2020-04-07 13:36:56 +02:00
security/samsung/icdrv
sensorhub
sensors
sfi
sh
sn
soc
spi
spmi
ssb
staging staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21 2020-04-07 13:32:50 +02:00
switch
target scsi: target: iscsi: Wait for all commands to finish before freeing a session 2020-04-07 13:23:29 +02:00
tc
tee
thermal
thunderbolt
trace
tty tty: always relink the port 2020-04-07 13:32:54 +02:00
uh
uio
usb USB: Fix: Don't skip endpoint descriptors with maxpacket=0 2020-04-07 13:33:04 +02:00
uwb
vfio
vhost
video
virt
virtio
vision
vlynq
vme
w1
watchdog
xen xen: let alloc_xenballooned_pages() fail if not enough memory free 2020-04-07 13:36:30 +02:00
zorro
Kconfig
Makefile