aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_eckd.c
diff options
context:
space:
mode:
authorStefan Weinhuber <wein@de.ibm.com>2011-04-20 04:15:35 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-04-20 04:15:44 -0400
commitc7a29e56f0a3526b71e9694b403b8e2cbe9c31e5 (patch)
tree5ff321fdec6bdaff9e1d58a38df2fdef2c28324b /drivers/s390/block/dasd_eckd.c
parente35c76cd47c244eaa7a74adaabde4d0a1cadb907 (diff)
[S390] dasd: check sense type in device change handler
When evaluating sense data in dasd_eckd_check_for_device_change, we must always check for the type of sense data in byte 27, bit 0, to make sure that the rest of the sense data is interpreted correctly. Signed-off-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r--drivers/s390/block/dasd_eckd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index db8005d9f2fd..3ebdf5f92f8f 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -2037,7 +2037,7 @@ static void dasd_eckd_check_for_device_change(struct dasd_device *device,
2037 return; 2037 return;
2038 2038
2039 /* summary unit check */ 2039 /* summary unit check */
2040 if ((sense[7] == 0x0D) && 2040 if ((sense[27] & DASD_SENSE_BIT_0) && (sense[7] == 0x0D) &&
2041 (scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK)) { 2041 (scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK)) {
2042 dasd_alias_handle_summary_unit_check(device, irb); 2042 dasd_alias_handle_summary_unit_check(device, irb);
2043 return; 2043 return;
@@ -2053,7 +2053,8 @@ static void dasd_eckd_check_for_device_change(struct dasd_device *device,
2053 /* loss of device reservation is handled via base devices only 2053 /* loss of device reservation is handled via base devices only
2054 * as alias devices may be used with several bases 2054 * as alias devices may be used with several bases
2055 */ 2055 */
2056 if (device->block && (sense[7] == 0x3F) && 2056 if (device->block && (sense[27] & DASD_SENSE_BIT_0) &&
2057 (sense[7] == 0x3F) &&
2057 (scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK) && 2058 (scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK) &&
2058 test_bit(DASD_FLAG_IS_RESERVED, &device->flags)) { 2059 test_bit(DASD_FLAG_IS_RESERVED, &device->flags)) {
2059 if (device->features & DASD_FEATURE_FAILONSLCK) 2060 if (device->features & DASD_FEATURE_FAILONSLCK)