diff options
| -rw-r--r-- | drivers/s390/block/dasd_eckd.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index e1bb930124dd..108332b44d98 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
| @@ -139,6 +139,10 @@ dasd_eckd_set_online(struct ccw_device *cdev) | |||
| 139 | static const int sizes_trk0[] = { 28, 148, 84 }; | 139 | static const int sizes_trk0[] = { 28, 148, 84 }; |
| 140 | #define LABEL_SIZE 140 | 140 | #define LABEL_SIZE 140 |
| 141 | 141 | ||
| 142 | /* head and record addresses of count_area read in analysis ccw */ | ||
| 143 | static const int count_area_head[] = { 0, 0, 0, 0, 2 }; | ||
| 144 | static const int count_area_rec[] = { 1, 2, 3, 4, 1 }; | ||
| 145 | |||
| 142 | static inline unsigned int | 146 | static inline unsigned int |
| 143 | round_up_multiple(unsigned int no, unsigned int mult) | 147 | round_up_multiple(unsigned int no, unsigned int mult) |
| 144 | { | 148 | { |
| @@ -1939,7 +1943,10 @@ static int dasd_eckd_end_analysis(struct dasd_block *block) | |||
| 1939 | count_area = NULL; | 1943 | count_area = NULL; |
| 1940 | for (i = 0; i < 3; i++) { | 1944 | for (i = 0; i < 3; i++) { |
| 1941 | if (private->count_area[i].kl != 4 || | 1945 | if (private->count_area[i].kl != 4 || |
| 1942 | private->count_area[i].dl != dasd_eckd_cdl_reclen(i) - 4) { | 1946 | private->count_area[i].dl != dasd_eckd_cdl_reclen(i) - 4 || |
| 1947 | private->count_area[i].cyl != 0 || | ||
| 1948 | private->count_area[i].head != count_area_head[i] || | ||
| 1949 | private->count_area[i].record != count_area_rec[i]) { | ||
| 1943 | private->uses_cdl = 0; | 1950 | private->uses_cdl = 0; |
| 1944 | break; | 1951 | break; |
| 1945 | } | 1952 | } |
| @@ -1951,7 +1958,10 @@ static int dasd_eckd_end_analysis(struct dasd_block *block) | |||
| 1951 | for (i = 0; i < 5; i++) { | 1958 | for (i = 0; i < 5; i++) { |
| 1952 | if ((private->count_area[i].kl != 0) || | 1959 | if ((private->count_area[i].kl != 0) || |
| 1953 | (private->count_area[i].dl != | 1960 | (private->count_area[i].dl != |
| 1954 | private->count_area[0].dl)) | 1961 | private->count_area[0].dl) || |
| 1962 | private->count_area[i].cyl != 0 || | ||
| 1963 | private->count_area[i].head != count_area_head[i] || | ||
| 1964 | private->count_area[i].record != count_area_rec[i]) | ||
| 1955 | break; | 1965 | break; |
| 1956 | } | 1966 | } |
| 1957 | if (i == 5) | 1967 | if (i == 5) |
