diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2011-10-30 10:16:57 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-10-30 10:16:44 -0400 |
commit | 5915a873fcb1cea5260940be519f2cdf898f7be3 (patch) | |
tree | ca7ce2f06e46f74ed771d93ed97ce55b113dadb3 /drivers/s390/block/dasd_eckd.c | |
parent | 214b8ffc205bcf2ca5b04b3903be13a9257c3fbd (diff) |
[S390] dasd: re-initialize read_conf buffer for retries
The buffer for read configuration data has to be initialized with an
EBCDIC string to show support for extended UIDs to z/VM.
If this read configuration data CQR needs to be retried, the buffer
may have changed in between. So re-initialize the buffer to get a
correct extended UID under z/VM.
Signed-off-by: Stefan Haberland <stefan.haberland@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.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 0e9c4dcf1452..cb1bbc2947e3 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -844,6 +844,30 @@ static void dasd_eckd_fill_rcd_cqr(struct dasd_device *device, | |||
844 | set_bit(DASD_CQR_VERIFY_PATH, &cqr->flags); | 844 | set_bit(DASD_CQR_VERIFY_PATH, &cqr->flags); |
845 | } | 845 | } |
846 | 846 | ||
847 | /* | ||
848 | * Wakeup helper for read_conf | ||
849 | * if the cqr is not done and needs some error recovery | ||
850 | * the buffer has to be re-initialized with the EBCDIC "V1.0" | ||
851 | * to show support for virtual device SNEQ | ||
852 | */ | ||
853 | static void read_conf_cb(struct dasd_ccw_req *cqr, void *data) | ||
854 | { | ||
855 | struct ccw1 *ccw; | ||
856 | __u8 *rcd_buffer; | ||
857 | |||
858 | if (cqr->status != DASD_CQR_DONE) { | ||
859 | ccw = cqr->cpaddr; | ||
860 | rcd_buffer = (__u8 *)((addr_t) ccw->cda); | ||
861 | memset(rcd_buffer, 0, sizeof(*rcd_buffer)); | ||
862 | |||
863 | rcd_buffer[0] = 0xE5; | ||
864 | rcd_buffer[1] = 0xF1; | ||
865 | rcd_buffer[2] = 0x4B; | ||
866 | rcd_buffer[3] = 0xF0; | ||
867 | } | ||
868 | dasd_wakeup_cb(cqr, data); | ||
869 | } | ||
870 | |||
847 | static int dasd_eckd_read_conf_immediately(struct dasd_device *device, | 871 | static int dasd_eckd_read_conf_immediately(struct dasd_device *device, |
848 | struct dasd_ccw_req *cqr, | 872 | struct dasd_ccw_req *cqr, |
849 | __u8 *rcd_buffer, | 873 | __u8 *rcd_buffer, |
@@ -863,6 +887,7 @@ static int dasd_eckd_read_conf_immediately(struct dasd_device *device, | |||
863 | clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags); | 887 | clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags); |
864 | set_bit(DASD_CQR_ALLOW_SLOCK, &cqr->flags); | 888 | set_bit(DASD_CQR_ALLOW_SLOCK, &cqr->flags); |
865 | cqr->retries = 5; | 889 | cqr->retries = 5; |
890 | cqr->callback = read_conf_cb; | ||
866 | rc = dasd_sleep_on_immediatly(cqr); | 891 | rc = dasd_sleep_on_immediatly(cqr); |
867 | return rc; | 892 | return rc; |
868 | } | 893 | } |
@@ -900,6 +925,7 @@ static int dasd_eckd_read_conf_lpm(struct dasd_device *device, | |||
900 | goto out_error; | 925 | goto out_error; |
901 | } | 926 | } |
902 | dasd_eckd_fill_rcd_cqr(device, cqr, rcd_buf, lpm); | 927 | dasd_eckd_fill_rcd_cqr(device, cqr, rcd_buf, lpm); |
928 | cqr->callback = read_conf_cb; | ||
903 | ret = dasd_sleep_on(cqr); | 929 | ret = dasd_sleep_on(cqr); |
904 | /* | 930 | /* |
905 | * on success we update the user input parms | 931 | * on success we update the user input parms |