diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2009-03-26 10:23:49 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 10:24:05 -0400 |
commit | fc19f381b3828aa4f8a3417dbefc3418ec6bbe10 (patch) | |
tree | 521d7537e5929de141ba4b616ccc2ab191d4b9fe /drivers/s390/block | |
parent | f3eb5384cf0325c02e306b1d81e70f81a03d7432 (diff) |
[S390] dasd: message cleanup
Moved some Messages into s390 debug feature and changed remaining
messages to use the dev_xxx and pr_xxx macros.
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')
-rw-r--r-- | drivers/s390/block/dasd.c | 176 | ||||
-rw-r--r-- | drivers/s390/block/dasd_3990_erp.c | 730 | ||||
-rw-r--r-- | drivers/s390/block/dasd_alias.c | 10 | ||||
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 38 | ||||
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 66 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 196 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eer.c | 6 | ||||
-rw-r--r-- | drivers/s390/block/dasd_erp.c | 21 | ||||
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 77 | ||||
-rw-r--r-- | drivers/s390/block/dasd_genhd.c | 7 | ||||
-rw-r--r-- | drivers/s390/block/dasd_int.h | 6 | ||||
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 27 | ||||
-rw-r--r-- | drivers/s390/block/dasd_proc.c | 20 |
13 files changed, 743 insertions, 637 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 00f7d24b337a..2fd64e5a9ab2 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -9,6 +9,9 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define KMSG_COMPONENT "dasd" | ||
13 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
14 | |||
12 | #include <linux/kmod.h> | 15 | #include <linux/kmod.h> |
13 | #include <linux/init.h> | 16 | #include <linux/init.h> |
14 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
@@ -222,7 +225,7 @@ static int dasd_state_known_to_basic(struct dasd_device *device) | |||
222 | return rc; | 225 | return rc; |
223 | } | 226 | } |
224 | /* register 'device' debug area, used for all DBF_DEV_XXX calls */ | 227 | /* register 'device' debug area, used for all DBF_DEV_XXX calls */ |
225 | device->debug_area = debug_register(dev_name(&device->cdev->dev), 1, 1, | 228 | device->debug_area = debug_register(dev_name(&device->cdev->dev), 4, 1, |
226 | 8 * sizeof(long)); | 229 | 8 * sizeof(long)); |
227 | debug_register_view(device->debug_area, &debug_sprintf_view); | 230 | debug_register_view(device->debug_area, &debug_sprintf_view); |
228 | debug_set_level(device->debug_area, DBF_WARNING); | 231 | debug_set_level(device->debug_area, DBF_WARNING); |
@@ -763,7 +766,7 @@ static inline int dasd_check_cqr(struct dasd_ccw_req *cqr) | |||
763 | return -EINVAL; | 766 | return -EINVAL; |
764 | device = cqr->startdev; | 767 | device = cqr->startdev; |
765 | if (strncmp((char *) &cqr->magic, device->discipline->ebcname, 4)) { | 768 | if (strncmp((char *) &cqr->magic, device->discipline->ebcname, 4)) { |
766 | DEV_MESSAGE(KERN_WARNING, device, | 769 | DBF_DEV_EVENT(DBF_WARNING, device, |
767 | " dasd_ccw_req 0x%08x magic doesn't match" | 770 | " dasd_ccw_req 0x%08x magic doesn't match" |
768 | " discipline 0x%08x", | 771 | " discipline 0x%08x", |
769 | cqr->magic, | 772 | cqr->magic, |
@@ -783,6 +786,7 @@ int dasd_term_IO(struct dasd_ccw_req *cqr) | |||
783 | { | 786 | { |
784 | struct dasd_device *device; | 787 | struct dasd_device *device; |
785 | int retries, rc; | 788 | int retries, rc; |
789 | char errorstring[ERRORLENGTH]; | ||
786 | 790 | ||
787 | /* Check the cqr */ | 791 | /* Check the cqr */ |
788 | rc = dasd_check_cqr(cqr); | 792 | rc = dasd_check_cqr(cqr); |
@@ -816,10 +820,10 @@ int dasd_term_IO(struct dasd_ccw_req *cqr) | |||
816 | "device busy, retry later"); | 820 | "device busy, retry later"); |
817 | break; | 821 | break; |
818 | default: | 822 | default: |
819 | DEV_MESSAGE(KERN_ERR, device, | 823 | /* internal error 10 - unknown rc*/ |
820 | "line %d unknown RC=%d, please " | 824 | snprintf(errorstring, ERRORLENGTH, "10 %d", rc); |
821 | "report to linux390@de.ibm.com", | 825 | dev_err(&device->cdev->dev, "An error occurred in the " |
822 | __LINE__, rc); | 826 | "DASD device driver, reason=%s\n", errorstring); |
823 | BUG(); | 827 | BUG(); |
824 | break; | 828 | break; |
825 | } | 829 | } |
@@ -837,6 +841,7 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) | |||
837 | { | 841 | { |
838 | struct dasd_device *device; | 842 | struct dasd_device *device; |
839 | int rc; | 843 | int rc; |
844 | char errorstring[ERRORLENGTH]; | ||
840 | 845 | ||
841 | /* Check the cqr */ | 846 | /* Check the cqr */ |
842 | rc = dasd_check_cqr(cqr); | 847 | rc = dasd_check_cqr(cqr); |
@@ -844,9 +849,10 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) | |||
844 | return rc; | 849 | return rc; |
845 | device = (struct dasd_device *) cqr->startdev; | 850 | device = (struct dasd_device *) cqr->startdev; |
846 | if (cqr->retries < 0) { | 851 | if (cqr->retries < 0) { |
847 | DEV_MESSAGE(KERN_DEBUG, device, | 852 | /* internal error 14 - start_IO run out of retries */ |
848 | "start_IO: request %p (%02x/%i) - no retry left.", | 853 | sprintf(errorstring, "14 %p", cqr); |
849 | cqr, cqr->status, cqr->retries); | 854 | dev_err(&device->cdev->dev, "An error occurred in the DASD " |
855 | "device driver, reason=%s\n", errorstring); | ||
850 | cqr->status = DASD_CQR_ERROR; | 856 | cqr->status = DASD_CQR_ERROR; |
851 | return -EIO; | 857 | return -EIO; |
852 | } | 858 | } |
@@ -868,11 +874,11 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) | |||
868 | cqr); | 874 | cqr); |
869 | break; | 875 | break; |
870 | case -EBUSY: | 876 | case -EBUSY: |
871 | DBF_DEV_EVENT(DBF_ERR, device, "%s", | 877 | DBF_DEV_EVENT(DBF_DEBUG, device, "%s", |
872 | "start_IO: device busy, retry later"); | 878 | "start_IO: device busy, retry later"); |
873 | break; | 879 | break; |
874 | case -ETIMEDOUT: | 880 | case -ETIMEDOUT: |
875 | DBF_DEV_EVENT(DBF_ERR, device, "%s", | 881 | DBF_DEV_EVENT(DBF_DEBUG, device, "%s", |
876 | "start_IO: request timeout, retry later"); | 882 | "start_IO: request timeout, retry later"); |
877 | break; | 883 | break; |
878 | case -EACCES: | 884 | case -EACCES: |
@@ -882,7 +888,7 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) | |||
882 | * Do a retry with all available pathes. | 888 | * Do a retry with all available pathes. |
883 | */ | 889 | */ |
884 | cqr->lpm = LPM_ANYPATH; | 890 | cqr->lpm = LPM_ANYPATH; |
885 | DBF_DEV_EVENT(DBF_ERR, device, "%s", | 891 | DBF_DEV_EVENT(DBF_DEBUG, device, "%s", |
886 | "start_IO: selected pathes gone," | 892 | "start_IO: selected pathes gone," |
887 | " retry on all pathes"); | 893 | " retry on all pathes"); |
888 | break; | 894 | break; |
@@ -891,13 +897,15 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) | |||
891 | "start_IO: -ENODEV device gone, retry"); | 897 | "start_IO: -ENODEV device gone, retry"); |
892 | break; | 898 | break; |
893 | case -EIO: | 899 | case -EIO: |
894 | DBF_DEV_EVENT(DBF_ERR, device, "%s", | 900 | DBF_DEV_EVENT(DBF_DEBUG, device, "%s", |
895 | "start_IO: -EIO device gone, retry"); | 901 | "start_IO: -EIO device gone, retry"); |
896 | break; | 902 | break; |
897 | default: | 903 | default: |
898 | DEV_MESSAGE(KERN_ERR, device, | 904 | /* internal error 11 - unknown rc */ |
899 | "line %d unknown RC=%d, please report" | 905 | snprintf(errorstring, ERRORLENGTH, "11 %d", rc); |
900 | " to linux390@de.ibm.com", __LINE__, rc); | 906 | dev_err(&device->cdev->dev, |
907 | "An error occurred in the DASD device driver, " | ||
908 | "reason=%s\n", errorstring); | ||
901 | BUG(); | 909 | BUG(); |
902 | break; | 910 | break; |
903 | } | 911 | } |
@@ -954,7 +962,7 @@ static void dasd_handle_killed_request(struct ccw_device *cdev, | |||
954 | return; | 962 | return; |
955 | cqr = (struct dasd_ccw_req *) intparm; | 963 | cqr = (struct dasd_ccw_req *) intparm; |
956 | if (cqr->status != DASD_CQR_IN_IO) { | 964 | if (cqr->status != DASD_CQR_IN_IO) { |
957 | MESSAGE(KERN_DEBUG, | 965 | DBF_EVENT(DBF_DEBUG, |
958 | "invalid status in handle_killed_request: " | 966 | "invalid status in handle_killed_request: " |
959 | "bus_id %s, status %02x", | 967 | "bus_id %s, status %02x", |
960 | dev_name(&cdev->dev), cqr->status); | 968 | dev_name(&cdev->dev), cqr->status); |
@@ -965,8 +973,8 @@ static void dasd_handle_killed_request(struct ccw_device *cdev, | |||
965 | if (device == NULL || | 973 | if (device == NULL || |
966 | device != dasd_device_from_cdev_locked(cdev) || | 974 | device != dasd_device_from_cdev_locked(cdev) || |
967 | strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) { | 975 | strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) { |
968 | MESSAGE(KERN_DEBUG, "invalid device in request: bus_id %s", | 976 | DBF_DEV_EVENT(DBF_DEBUG, device, "invalid device in request: " |
969 | dev_name(&cdev->dev)); | 977 | "bus_id %s", dev_name(&cdev->dev)); |
970 | return; | 978 | return; |
971 | } | 979 | } |
972 | 980 | ||
@@ -1005,11 +1013,11 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1005 | case -EIO: | 1013 | case -EIO: |
1006 | break; | 1014 | break; |
1007 | case -ETIMEDOUT: | 1015 | case -ETIMEDOUT: |
1008 | printk(KERN_WARNING"%s(%s): request timed out\n", | 1016 | DBF_EVENT(DBF_WARNING, "%s(%s): request timed out\n", |
1009 | __func__, dev_name(&cdev->dev)); | 1017 | __func__, dev_name(&cdev->dev)); |
1010 | break; | 1018 | break; |
1011 | default: | 1019 | default: |
1012 | printk(KERN_WARNING"%s(%s): unknown error %ld\n", | 1020 | DBF_EVENT(DBF_WARNING, "%s(%s): unknown error %ld\n", |
1013 | __func__, dev_name(&cdev->dev), PTR_ERR(irb)); | 1021 | __func__, dev_name(&cdev->dev), PTR_ERR(irb)); |
1014 | } | 1022 | } |
1015 | dasd_handle_killed_request(cdev, intparm); | 1023 | dasd_handle_killed_request(cdev, intparm); |
@@ -1018,10 +1026,6 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1018 | 1026 | ||
1019 | now = get_clock(); | 1027 | now = get_clock(); |
1020 | 1028 | ||
1021 | DBF_EVENT(DBF_ERR, "Interrupt: bus_id %s CS/DS %04x ip %08x", | ||
1022 | dev_name(&cdev->dev), ((irb->scsw.cmd.cstat << 8) | | ||
1023 | irb->scsw.cmd.dstat), (unsigned int) intparm); | ||
1024 | |||
1025 | /* check for unsolicited interrupts */ | 1029 | /* check for unsolicited interrupts */ |
1026 | cqr = (struct dasd_ccw_req *) intparm; | 1030 | cqr = (struct dasd_ccw_req *) intparm; |
1027 | if (!cqr || ((scsw_cc(&irb->scsw) == 1) && | 1031 | if (!cqr || ((scsw_cc(&irb->scsw) == 1) && |
@@ -1042,8 +1046,8 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1042 | device = (struct dasd_device *) cqr->startdev; | 1046 | device = (struct dasd_device *) cqr->startdev; |
1043 | if (!device || | 1047 | if (!device || |
1044 | strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) { | 1048 | strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) { |
1045 | MESSAGE(KERN_DEBUG, "invalid device in request: bus_id %s", | 1049 | DBF_DEV_EVENT(DBF_DEBUG, device, "invalid device in request: " |
1046 | dev_name(&cdev->dev)); | 1050 | "bus_id %s", dev_name(&cdev->dev)); |
1047 | return; | 1051 | return; |
1048 | } | 1052 | } |
1049 | 1053 | ||
@@ -1059,13 +1063,11 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1059 | 1063 | ||
1060 | /* check status - the request might have been killed by dyn detach */ | 1064 | /* check status - the request might have been killed by dyn detach */ |
1061 | if (cqr->status != DASD_CQR_IN_IO) { | 1065 | if (cqr->status != DASD_CQR_IN_IO) { |
1062 | MESSAGE(KERN_DEBUG, | 1066 | DBF_DEV_EVENT(DBF_DEBUG, device, "invalid status: bus_id %s, " |
1063 | "invalid status: bus_id %s, status %02x", | 1067 | "status %02x", dev_name(&cdev->dev), cqr->status); |
1064 | dev_name(&cdev->dev), cqr->status); | ||
1065 | return; | 1068 | return; |
1066 | } | 1069 | } |
1067 | DBF_DEV_EVENT(DBF_DEBUG, device, "Int: CS/DS 0x%04x for cqr %p", | 1070 | |
1068 | ((irb->scsw.cmd.cstat << 8) | irb->scsw.cmd.dstat), cqr); | ||
1069 | next = NULL; | 1071 | next = NULL; |
1070 | expires = 0; | 1072 | expires = 0; |
1071 | if (scsw_dstat(&irb->scsw) == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) && | 1073 | if (scsw_dstat(&irb->scsw) == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) && |
@@ -1080,18 +1082,23 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1080 | } | 1082 | } |
1081 | } else { /* error */ | 1083 | } else { /* error */ |
1082 | memcpy(&cqr->irb, irb, sizeof(struct irb)); | 1084 | memcpy(&cqr->irb, irb, sizeof(struct irb)); |
1085 | /* log sense for every failed I/O to s390 debugfeature */ | ||
1086 | dasd_log_sense_dbf(cqr, irb); | ||
1083 | if (device->features & DASD_FEATURE_ERPLOG) { | 1087 | if (device->features & DASD_FEATURE_ERPLOG) { |
1084 | dasd_log_sense(cqr, irb); | 1088 | dasd_log_sense(cqr, irb); |
1085 | } | 1089 | } |
1090 | |||
1086 | /* | 1091 | /* |
1087 | * If we don't want complex ERP for this request, then just | 1092 | * If we don't want complex ERP for this request, then just |
1088 | * reset this and retry it in the fastpath | 1093 | * reset this and retry it in the fastpath |
1089 | */ | 1094 | */ |
1090 | if (!test_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags) && | 1095 | if (!test_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags) && |
1091 | cqr->retries > 0) { | 1096 | cqr->retries > 0) { |
1092 | DEV_MESSAGE(KERN_DEBUG, device, | 1097 | if (cqr->lpm == LPM_ANYPATH) |
1093 | "default ERP in fastpath (%i retries left)", | 1098 | DBF_DEV_EVENT(DBF_DEBUG, device, |
1094 | cqr->retries); | 1099 | "default ERP in fastpath " |
1100 | "(%i retries left)", | ||
1101 | cqr->retries); | ||
1095 | cqr->lpm = LPM_ANYPATH; | 1102 | cqr->lpm = LPM_ANYPATH; |
1096 | cqr->status = DASD_CQR_QUEUED; | 1103 | cqr->status = DASD_CQR_QUEUED; |
1097 | next = cqr; | 1104 | next = cqr; |
@@ -1102,10 +1109,6 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1102 | (!device->stopped)) { | 1109 | (!device->stopped)) { |
1103 | if (device->discipline->start_IO(next) == 0) | 1110 | if (device->discipline->start_IO(next) == 0) |
1104 | expires = next->expires; | 1111 | expires = next->expires; |
1105 | else | ||
1106 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | ||
1107 | "Interrupt fastpath " | ||
1108 | "failed!"); | ||
1109 | } | 1112 | } |
1110 | if (expires != 0) | 1113 | if (expires != 0) |
1111 | dasd_device_set_timer(device, expires); | 1114 | dasd_device_set_timer(device, expires); |
@@ -1178,6 +1181,7 @@ static void __dasd_device_process_final_queue(struct dasd_device *device, | |||
1178 | struct dasd_block *block; | 1181 | struct dasd_block *block; |
1179 | void (*callback)(struct dasd_ccw_req *, void *data); | 1182 | void (*callback)(struct dasd_ccw_req *, void *data); |
1180 | void *callback_data; | 1183 | void *callback_data; |
1184 | char errorstring[ERRORLENGTH]; | ||
1181 | 1185 | ||
1182 | list_for_each_safe(l, n, final_queue) { | 1186 | list_for_each_safe(l, n, final_queue) { |
1183 | cqr = list_entry(l, struct dasd_ccw_req, devlist); | 1187 | cqr = list_entry(l, struct dasd_ccw_req, devlist); |
@@ -1198,10 +1202,11 @@ static void __dasd_device_process_final_queue(struct dasd_device *device, | |||
1198 | cqr->status = DASD_CQR_TERMINATED; | 1202 | cqr->status = DASD_CQR_TERMINATED; |
1199 | break; | 1203 | break; |
1200 | default: | 1204 | default: |
1201 | DEV_MESSAGE(KERN_ERR, device, | 1205 | /* internal error 12 - wrong cqr status*/ |
1202 | "wrong cqr status in __dasd_process_final_queue " | 1206 | snprintf(errorstring, ERRORLENGTH, "12 %p %x02", cqr, cqr->status); |
1203 | "for cqr %p, status %x", | 1207 | dev_err(&device->cdev->dev, |
1204 | cqr, cqr->status); | 1208 | "An error occurred in the DASD device driver, " |
1209 | "reason=%s\n", errorstring); | ||
1205 | BUG(); | 1210 | BUG(); |
1206 | } | 1211 | } |
1207 | if (cqr->callback != NULL) | 1212 | if (cqr->callback != NULL) |
@@ -1226,18 +1231,17 @@ static void __dasd_device_check_expire(struct dasd_device *device) | |||
1226 | (time_after_eq(jiffies, cqr->expires + cqr->starttime))) { | 1231 | (time_after_eq(jiffies, cqr->expires + cqr->starttime))) { |
1227 | if (device->discipline->term_IO(cqr) != 0) { | 1232 | if (device->discipline->term_IO(cqr) != 0) { |
1228 | /* Hmpf, try again in 5 sec */ | 1233 | /* Hmpf, try again in 5 sec */ |
1229 | DEV_MESSAGE(KERN_ERR, device, | 1234 | dev_err(&device->cdev->dev, |
1230 | "internal error - timeout (%is) expired " | 1235 | "cqr %p timed out (%is) but cannot be " |
1231 | "for cqr %p, termination failed, " | 1236 | "ended, retrying in 5 s\n", |
1232 | "retrying in 5s", | 1237 | cqr, (cqr->expires/HZ)); |
1233 | (cqr->expires/HZ), cqr); | ||
1234 | cqr->expires += 5*HZ; | 1238 | cqr->expires += 5*HZ; |
1235 | dasd_device_set_timer(device, 5*HZ); | 1239 | dasd_device_set_timer(device, 5*HZ); |
1236 | } else { | 1240 | } else { |
1237 | DEV_MESSAGE(KERN_ERR, device, | 1241 | dev_err(&device->cdev->dev, |
1238 | "internal error - timeout (%is) expired " | 1242 | "cqr %p timed out (%is), %i retries " |
1239 | "for cqr %p (%i retries left)", | 1243 | "remaining\n", cqr, (cqr->expires/HZ), |
1240 | (cqr->expires/HZ), cqr, cqr->retries); | 1244 | cqr->retries); |
1241 | } | 1245 | } |
1242 | } | 1246 | } |
1243 | } | 1247 | } |
@@ -1299,10 +1303,9 @@ int dasd_flush_device_queue(struct dasd_device *device) | |||
1299 | rc = device->discipline->term_IO(cqr); | 1303 | rc = device->discipline->term_IO(cqr); |
1300 | if (rc) { | 1304 | if (rc) { |
1301 | /* unable to terminate requeust */ | 1305 | /* unable to terminate requeust */ |
1302 | DEV_MESSAGE(KERN_ERR, device, | 1306 | dev_err(&device->cdev->dev, |
1303 | "dasd flush ccw_queue is unable " | 1307 | "Flushing the DASD request queue " |
1304 | " to terminate request %p", | 1308 | "failed for request %p\n", cqr); |
1305 | cqr); | ||
1306 | /* stop flush processing */ | 1309 | /* stop flush processing */ |
1307 | goto finished; | 1310 | goto finished; |
1308 | } | 1311 | } |
@@ -1546,10 +1549,9 @@ int dasd_cancel_req(struct dasd_ccw_req *cqr) | |||
1546 | /* request in IO - terminate IO and release again */ | 1549 | /* request in IO - terminate IO and release again */ |
1547 | rc = device->discipline->term_IO(cqr); | 1550 | rc = device->discipline->term_IO(cqr); |
1548 | if (rc) { | 1551 | if (rc) { |
1549 | DEV_MESSAGE(KERN_ERR, device, | 1552 | dev_err(&device->cdev->dev, |
1550 | "dasd_cancel_req is unable " | 1553 | "Cancelling request %p failed with rc=%d\n", |
1551 | " to terminate request %p, rc = %d", | 1554 | cqr, rc); |
1552 | cqr, rc); | ||
1553 | } else { | 1555 | } else { |
1554 | cqr->stopclk = get_clock(); | 1556 | cqr->stopclk = get_clock(); |
1555 | rc = 1; | 1557 | rc = 1; |
@@ -1626,7 +1628,7 @@ static inline void __dasd_block_process_erp(struct dasd_block *block, | |||
1626 | if (cqr->status == DASD_CQR_DONE) | 1628 | if (cqr->status == DASD_CQR_DONE) |
1627 | DBF_DEV_EVENT(DBF_NOTICE, device, "%s", "ERP successful"); | 1629 | DBF_DEV_EVENT(DBF_NOTICE, device, "%s", "ERP successful"); |
1628 | else | 1630 | else |
1629 | DEV_MESSAGE(KERN_ERR, device, "%s", "ERP unsuccessful"); | 1631 | dev_err(&device->cdev->dev, "ERP failed for the DASD\n"); |
1630 | erp_fn = device->discipline->erp_postaction(cqr); | 1632 | erp_fn = device->discipline->erp_postaction(cqr); |
1631 | erp_fn(cqr); | 1633 | erp_fn(cqr); |
1632 | } | 1634 | } |
@@ -2055,8 +2057,9 @@ static int dasd_open(struct block_device *bdev, fmode_t mode) | |||
2055 | } | 2057 | } |
2056 | 2058 | ||
2057 | if (dasd_probeonly) { | 2059 | if (dasd_probeonly) { |
2058 | DEV_MESSAGE(KERN_INFO, base, "%s", | 2060 | dev_info(&base->cdev->dev, |
2059 | "No access to device due to probeonly mode"); | 2061 | "Accessing the DASD failed because it is in " |
2062 | "probeonly mode\n"); | ||
2060 | rc = -EPERM; | 2063 | rc = -EPERM; |
2061 | goto out; | 2064 | goto out; |
2062 | } | 2065 | } |
@@ -2156,14 +2159,14 @@ int dasd_generic_probe(struct ccw_device *cdev, | |||
2156 | 2159 | ||
2157 | ret = ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); | 2160 | ret = ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); |
2158 | if (ret) { | 2161 | if (ret) { |
2159 | printk(KERN_WARNING | 2162 | DBF_EVENT(DBF_WARNING, |
2160 | "dasd_generic_probe: could not set ccw-device options " | 2163 | "dasd_generic_probe: could not set ccw-device options " |
2161 | "for %s\n", dev_name(&cdev->dev)); | 2164 | "for %s\n", dev_name(&cdev->dev)); |
2162 | return ret; | 2165 | return ret; |
2163 | } | 2166 | } |
2164 | ret = dasd_add_sysfs_files(cdev); | 2167 | ret = dasd_add_sysfs_files(cdev); |
2165 | if (ret) { | 2168 | if (ret) { |
2166 | printk(KERN_WARNING | 2169 | DBF_EVENT(DBF_WARNING, |
2167 | "dasd_generic_probe: could not add sysfs entries " | 2170 | "dasd_generic_probe: could not add sysfs entries " |
2168 | "for %s\n", dev_name(&cdev->dev)); | 2171 | "for %s\n", dev_name(&cdev->dev)); |
2169 | return ret; | 2172 | return ret; |
@@ -2179,9 +2182,7 @@ int dasd_generic_probe(struct ccw_device *cdev, | |||
2179 | (dasd_autodetect && dasd_busid_known(dev_name(&cdev->dev)) != 0)) | 2182 | (dasd_autodetect && dasd_busid_known(dev_name(&cdev->dev)) != 0)) |
2180 | ret = ccw_device_set_online(cdev); | 2183 | ret = ccw_device_set_online(cdev); |
2181 | if (ret) | 2184 | if (ret) |
2182 | printk(KERN_WARNING | 2185 | pr_warning("%s: Setting the DASD online failed with rc=%d\n", |
2183 | "dasd_generic_probe: could not initially " | ||
2184 | "online ccw-device %s; return code: %d\n", | ||
2185 | dev_name(&cdev->dev), ret); | 2186 | dev_name(&cdev->dev), ret); |
2186 | return 0; | 2187 | return 0; |
2187 | } | 2188 | } |
@@ -2245,10 +2246,9 @@ int dasd_generic_set_online(struct ccw_device *cdev, | |||
2245 | discipline = base_discipline; | 2246 | discipline = base_discipline; |
2246 | if (device->features & DASD_FEATURE_USEDIAG) { | 2247 | if (device->features & DASD_FEATURE_USEDIAG) { |
2247 | if (!dasd_diag_discipline_pointer) { | 2248 | if (!dasd_diag_discipline_pointer) { |
2248 | printk (KERN_WARNING | 2249 | pr_warning("%s Setting the DASD online failed because " |
2249 | "dasd_generic couldn't online device %s " | 2250 | "of missing DIAG discipline\n", |
2250 | "- discipline DIAG not available\n", | 2251 | dev_name(&cdev->dev)); |
2251 | dev_name(&cdev->dev)); | ||
2252 | dasd_delete_device(device); | 2252 | dasd_delete_device(device); |
2253 | return -ENODEV; | 2253 | return -ENODEV; |
2254 | } | 2254 | } |
@@ -2269,10 +2269,9 @@ int dasd_generic_set_online(struct ccw_device *cdev, | |||
2269 | /* check_device will allocate block device if necessary */ | 2269 | /* check_device will allocate block device if necessary */ |
2270 | rc = discipline->check_device(device); | 2270 | rc = discipline->check_device(device); |
2271 | if (rc) { | 2271 | if (rc) { |
2272 | printk (KERN_WARNING | 2272 | pr_warning("%s Setting the DASD online with discipline %s " |
2273 | "dasd_generic couldn't online device %s " | 2273 | "failed with rc=%i\n", |
2274 | "with discipline %s rc=%i\n", | 2274 | dev_name(&cdev->dev), discipline->name, rc); |
2275 | dev_name(&cdev->dev), discipline->name, rc); | ||
2276 | module_put(discipline->owner); | 2275 | module_put(discipline->owner); |
2277 | module_put(base_discipline->owner); | 2276 | module_put(base_discipline->owner); |
2278 | dasd_delete_device(device); | 2277 | dasd_delete_device(device); |
@@ -2281,9 +2280,8 @@ int dasd_generic_set_online(struct ccw_device *cdev, | |||
2281 | 2280 | ||
2282 | dasd_set_target_state(device, DASD_STATE_ONLINE); | 2281 | dasd_set_target_state(device, DASD_STATE_ONLINE); |
2283 | if (device->state <= DASD_STATE_KNOWN) { | 2282 | if (device->state <= DASD_STATE_KNOWN) { |
2284 | printk (KERN_WARNING | 2283 | pr_warning("%s Setting the DASD online failed because of a " |
2285 | "dasd_generic discipline not found for %s\n", | 2284 | "missing discipline\n", dev_name(&cdev->dev)); |
2286 | dev_name(&cdev->dev)); | ||
2287 | rc = -ENODEV; | 2285 | rc = -ENODEV; |
2288 | dasd_set_target_state(device, DASD_STATE_NEW); | 2286 | dasd_set_target_state(device, DASD_STATE_NEW); |
2289 | if (device->block) | 2287 | if (device->block) |
@@ -2327,13 +2325,13 @@ int dasd_generic_set_offline(struct ccw_device *cdev) | |||
2327 | open_count = atomic_read(&device->block->open_count); | 2325 | open_count = atomic_read(&device->block->open_count); |
2328 | if (open_count > max_count) { | 2326 | if (open_count > max_count) { |
2329 | if (open_count > 0) | 2327 | if (open_count > 0) |
2330 | printk(KERN_WARNING "Can't offline dasd " | 2328 | pr_warning("%s: The DASD cannot be set offline " |
2331 | "device with open count = %i.\n", | 2329 | "with open count %i\n", |
2332 | open_count); | 2330 | dev_name(&cdev->dev), open_count); |
2333 | else | 2331 | else |
2334 | printk(KERN_WARNING "%s", | 2332 | pr_warning("%s: The DASD cannot be set offline " |
2335 | "Can't offline dasd device due " | 2333 | "while it is in use\n", |
2336 | "to internal use\n"); | 2334 | dev_name(&cdev->dev)); |
2337 | clear_bit(DASD_FLAG_OFFLINE, &device->flags); | 2335 | clear_bit(DASD_FLAG_OFFLINE, &device->flags); |
2338 | dasd_put_device(device); | 2336 | dasd_put_device(device); |
2339 | return -EBUSY; | 2337 | return -EBUSY; |
@@ -2406,8 +2404,10 @@ static struct dasd_ccw_req *dasd_generic_build_rdc(struct dasd_device *device, | |||
2406 | cqr = dasd_smalloc_request(magic, 1 /* RDC */, rdc_buffer_size, device); | 2404 | cqr = dasd_smalloc_request(magic, 1 /* RDC */, rdc_buffer_size, device); |
2407 | 2405 | ||
2408 | if (IS_ERR(cqr)) { | 2406 | if (IS_ERR(cqr)) { |
2409 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 2407 | /* internal error 13 - Allocating the RDC request failed*/ |
2410 | "Could not allocate RDC request"); | 2408 | dev_err(&device->cdev->dev, |
2409 | "An error occurred in the DASD device driver, " | ||
2410 | "reason=%s\n", "13"); | ||
2411 | return cqr; | 2411 | return cqr; |
2412 | } | 2412 | } |
2413 | 2413 | ||
@@ -2519,7 +2519,7 @@ static int __init dasd_init(void) | |||
2519 | 2519 | ||
2520 | return 0; | 2520 | return 0; |
2521 | failed: | 2521 | failed: |
2522 | MESSAGE(KERN_INFO, "%s", "initialization not performed due to errors"); | 2522 | pr_info("The DASD device driver could not be initialized\n"); |
2523 | dasd_exit(); | 2523 | dasd_exit(); |
2524 | return rc; | 2524 | return rc; |
2525 | } | 2525 | } |
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index 4cee45916144..27991b692056 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define KMSG_COMPONENT "dasd" | ||
11 | |||
10 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
11 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
12 | #include <asm/idals.h> | 14 | #include <asm/idals.h> |
@@ -75,7 +77,7 @@ dasd_3990_erp_block_queue(struct dasd_ccw_req * erp, int expires) | |||
75 | struct dasd_device *device = erp->startdev; | 77 | struct dasd_device *device = erp->startdev; |
76 | unsigned long flags; | 78 | unsigned long flags; |
77 | 79 | ||
78 | DEV_MESSAGE(KERN_INFO, device, | 80 | DBF_DEV_EVENT(DBF_INFO, device, |
79 | "blocking request queue for %is", expires/HZ); | 81 | "blocking request queue for %is", expires/HZ); |
80 | 82 | ||
81 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); | 83 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); |
@@ -114,9 +116,9 @@ dasd_3990_erp_int_req(struct dasd_ccw_req * erp) | |||
114 | } else { | 116 | } else { |
115 | 117 | ||
116 | /* issue a message and wait for 'device ready' interrupt */ | 118 | /* issue a message and wait for 'device ready' interrupt */ |
117 | DEV_MESSAGE(KERN_ERR, device, "%s", | 119 | dev_err(&device->cdev->dev, |
118 | "is offline or not installed - " | 120 | "is offline or not installed - " |
119 | "INTERVENTION REQUIRED!!"); | 121 | "INTERVENTION REQUIRED!!\n"); |
120 | 122 | ||
121 | dasd_3990_erp_block_queue(erp, 60*HZ); | 123 | dasd_3990_erp_block_queue(erp, 60*HZ); |
122 | } | 124 | } |
@@ -158,7 +160,7 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp) | |||
158 | 160 | ||
159 | if ((erp->lpm & opm) != 0x00) { | 161 | if ((erp->lpm & opm) != 0x00) { |
160 | 162 | ||
161 | DEV_MESSAGE(KERN_DEBUG, device, | 163 | DBF_DEV_EVENT(DBF_WARNING, device, |
162 | "try alternate lpm=%x (lpum=%x / opm=%x)", | 164 | "try alternate lpm=%x (lpum=%x / opm=%x)", |
163 | erp->lpm, erp->irb.esw.esw0.sublog.lpum, opm); | 165 | erp->lpm, erp->irb.esw.esw0.sublog.lpum, opm); |
164 | 166 | ||
@@ -166,10 +168,9 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp) | |||
166 | erp->status = DASD_CQR_FILLED; | 168 | erp->status = DASD_CQR_FILLED; |
167 | erp->retries = 10; | 169 | erp->retries = 10; |
168 | } else { | 170 | } else { |
169 | DEV_MESSAGE(KERN_ERR, device, | 171 | dev_err(&device->cdev->dev, |
170 | "No alternate channel path left (lpum=%x / " | 172 | "The DASD cannot be reached on any path (lpum=%x" |
171 | "opm=%x) -> permanent error", | 173 | "/opm=%x)\n", erp->irb.esw.esw0.sublog.lpum, opm); |
172 | erp->irb.esw.esw0.sublog.lpum, opm); | ||
173 | 174 | ||
174 | /* post request with permanent error */ | 175 | /* post request with permanent error */ |
175 | erp->status = DASD_CQR_FAILED; | 176 | erp->status = DASD_CQR_FAILED; |
@@ -204,8 +205,8 @@ dasd_3990_erp_DCTL(struct dasd_ccw_req * erp, char modifier) | |||
204 | sizeof(struct DCTL_data), | 205 | sizeof(struct DCTL_data), |
205 | device); | 206 | device); |
206 | if (IS_ERR(dctl_cqr)) { | 207 | if (IS_ERR(dctl_cqr)) { |
207 | DEV_MESSAGE(KERN_ERR, device, "%s", | 208 | dev_err(&device->cdev->dev, |
208 | "Unable to allocate DCTL-CQR"); | 209 | "Unable to allocate DCTL-CQR\n"); |
209 | erp->status = DASD_CQR_FAILED; | 210 | erp->status = DASD_CQR_FAILED; |
210 | return erp; | 211 | return erp; |
211 | } | 212 | } |
@@ -294,7 +295,7 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) | |||
294 | /* interrupt (this enables easier enqueing of the cqr) */ | 295 | /* interrupt (this enables easier enqueing of the cqr) */ |
295 | if (erp->function != dasd_3990_erp_action_4) { | 296 | if (erp->function != dasd_3990_erp_action_4) { |
296 | 297 | ||
297 | DEV_MESSAGE(KERN_INFO, device, "%s", | 298 | DBF_DEV_EVENT(DBF_INFO, device, "%s", |
298 | "dasd_3990_erp_action_4: first time retry"); | 299 | "dasd_3990_erp_action_4: first time retry"); |
299 | 300 | ||
300 | erp->retries = 256; | 301 | erp->retries = 256; |
@@ -303,7 +304,7 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) | |||
303 | } else { | 304 | } else { |
304 | if (sense && (sense[25] == 0x1D)) { /* state change pending */ | 305 | if (sense && (sense[25] == 0x1D)) { /* state change pending */ |
305 | 306 | ||
306 | DEV_MESSAGE(KERN_INFO, device, | 307 | DBF_DEV_EVENT(DBF_INFO, device, |
307 | "waiting for state change pending " | 308 | "waiting for state change pending " |
308 | "interrupt, %d retries left", | 309 | "interrupt, %d retries left", |
309 | erp->retries); | 310 | erp->retries); |
@@ -311,15 +312,14 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) | |||
311 | dasd_3990_erp_block_queue(erp, 30*HZ); | 312 | dasd_3990_erp_block_queue(erp, 30*HZ); |
312 | 313 | ||
313 | } else if (sense && (sense[25] == 0x1E)) { /* busy */ | 314 | } else if (sense && (sense[25] == 0x1E)) { /* busy */ |
314 | DEV_MESSAGE(KERN_INFO, device, | 315 | DBF_DEV_EVENT(DBF_INFO, device, |
315 | "busy - redriving request later, " | 316 | "busy - redriving request later, " |
316 | "%d retries left", | 317 | "%d retries left", |
317 | erp->retries); | 318 | erp->retries); |
318 | dasd_3990_erp_block_queue(erp, HZ); | 319 | dasd_3990_erp_block_queue(erp, HZ); |
319 | } else { | 320 | } else { |
320 | |||
321 | /* no state change pending - retry */ | 321 | /* no state change pending - retry */ |
322 | DEV_MESSAGE (KERN_INFO, device, | 322 | DBF_DEV_EVENT(DBF_INFO, device, |
323 | "redriving request immediately, " | 323 | "redriving request immediately, " |
324 | "%d retries left", | 324 | "%d retries left", |
325 | erp->retries); | 325 | erp->retries); |
@@ -384,6 +384,7 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense) | |||
384 | struct dasd_device *device = erp->startdev; | 384 | struct dasd_device *device = erp->startdev; |
385 | char msg_format = (sense[7] & 0xF0); | 385 | char msg_format = (sense[7] & 0xF0); |
386 | char msg_no = (sense[7] & 0x0F); | 386 | char msg_no = (sense[7] & 0x0F); |
387 | char errorstring[ERRORLENGTH]; | ||
387 | 388 | ||
388 | switch (msg_format) { | 389 | switch (msg_format) { |
389 | case 0x00: /* Format 0 - Program or System Checks */ | 390 | case 0x00: /* Format 0 - Program or System Checks */ |
@@ -394,95 +395,97 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense) | |||
394 | case 0x00: /* No Message */ | 395 | case 0x00: /* No Message */ |
395 | break; | 396 | break; |
396 | case 0x01: | 397 | case 0x01: |
397 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 398 | dev_warn(&device->cdev->dev, |
398 | "FORMAT 0 - Invalid Command"); | 399 | "FORMAT 0 - Invalid Command\n"); |
399 | break; | 400 | break; |
400 | case 0x02: | 401 | case 0x02: |
401 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 402 | dev_warn(&device->cdev->dev, |
402 | "FORMAT 0 - Invalid Command " | 403 | "FORMAT 0 - Invalid Command " |
403 | "Sequence"); | 404 | "Sequence\n"); |
404 | break; | 405 | break; |
405 | case 0x03: | 406 | case 0x03: |
406 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 407 | dev_warn(&device->cdev->dev, |
407 | "FORMAT 0 - CCW Count less than " | 408 | "FORMAT 0 - CCW Count less than " |
408 | "required"); | 409 | "required\n"); |
409 | break; | 410 | break; |
410 | case 0x04: | 411 | case 0x04: |
411 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 412 | dev_warn(&device->cdev->dev, |
412 | "FORMAT 0 - Invalid Parameter"); | 413 | "FORMAT 0 - Invalid Parameter\n"); |
413 | break; | 414 | break; |
414 | case 0x05: | 415 | case 0x05: |
415 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 416 | dev_warn(&device->cdev->dev, |
416 | "FORMAT 0 - Diagnostic of Sepecial" | 417 | "FORMAT 0 - Diagnostic of Special" |
417 | " Command Violates File Mask"); | 418 | " Command Violates File Mask\n"); |
418 | break; | 419 | break; |
419 | case 0x07: | 420 | case 0x07: |
420 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 421 | dev_warn(&device->cdev->dev, |
421 | "FORMAT 0 - Channel Returned with " | 422 | "FORMAT 0 - Channel Returned with " |
422 | "Incorrect retry CCW"); | 423 | "Incorrect retry CCW\n"); |
423 | break; | 424 | break; |
424 | case 0x08: | 425 | case 0x08: |
425 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 426 | dev_warn(&device->cdev->dev, |
426 | "FORMAT 0 - Reset Notification"); | 427 | "FORMAT 0 - Reset Notification\n"); |
427 | break; | 428 | break; |
428 | case 0x09: | 429 | case 0x09: |
429 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 430 | dev_warn(&device->cdev->dev, |
430 | "FORMAT 0 - Storage Path Restart"); | 431 | "FORMAT 0 - Storage Path Restart\n"); |
431 | break; | 432 | break; |
432 | case 0x0A: | 433 | case 0x0A: |
433 | DEV_MESSAGE(KERN_WARNING, device, | 434 | dev_warn(&device->cdev->dev, |
434 | "FORMAT 0 - Channel requested " | 435 | "FORMAT 0 - Channel requested " |
435 | "... %02x", sense[8]); | 436 | "... %02x\n", sense[8]); |
436 | break; | 437 | break; |
437 | case 0x0B: | 438 | case 0x0B: |
438 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 439 | dev_warn(&device->cdev->dev, |
439 | "FORMAT 0 - Invalid Defective/" | 440 | "FORMAT 0 - Invalid Defective/" |
440 | "Alternate Track Pointer"); | 441 | "Alternate Track Pointer\n"); |
441 | break; | 442 | break; |
442 | case 0x0C: | 443 | case 0x0C: |
443 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 444 | dev_warn(&device->cdev->dev, |
444 | "FORMAT 0 - DPS Installation " | 445 | "FORMAT 0 - DPS Installation " |
445 | "Check"); | 446 | "Check\n"); |
446 | break; | 447 | break; |
447 | case 0x0E: | 448 | case 0x0E: |
448 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 449 | dev_warn(&device->cdev->dev, |
449 | "FORMAT 0 - Command Invalid on " | 450 | "FORMAT 0 - Command Invalid on " |
450 | "Secondary Address"); | 451 | "Secondary Address\n"); |
451 | break; | 452 | break; |
452 | case 0x0F: | 453 | case 0x0F: |
453 | DEV_MESSAGE(KERN_WARNING, device, | 454 | dev_warn(&device->cdev->dev, |
454 | "FORMAT 0 - Status Not As " | 455 | "FORMAT 0 - Status Not As " |
455 | "Required: reason %02x", sense[8]); | 456 | "Required: reason %02x\n", |
457 | sense[8]); | ||
456 | break; | 458 | break; |
457 | default: | 459 | default: |
458 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 460 | dev_warn(&device->cdev->dev, |
459 | "FORMAT 0 - Reseved"); | 461 | "FORMAT 0 - Reserved\n"); |
460 | } | 462 | } |
461 | } else { | 463 | } else { |
462 | switch (msg_no) { | 464 | switch (msg_no) { |
463 | case 0x00: /* No Message */ | 465 | case 0x00: /* No Message */ |
464 | break; | 466 | break; |
465 | case 0x01: | 467 | case 0x01: |
466 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 468 | dev_warn(&device->cdev->dev, |
467 | "FORMAT 0 - Device Error Source"); | 469 | "FORMAT 0 - Device Error " |
470 | "Source\n"); | ||
468 | break; | 471 | break; |
469 | case 0x02: | 472 | case 0x02: |
470 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 473 | dev_warn(&device->cdev->dev, |
471 | "FORMAT 0 - Reserved"); | 474 | "FORMAT 0 - Reserved\n"); |
472 | break; | 475 | break; |
473 | case 0x03: | 476 | case 0x03: |
474 | DEV_MESSAGE(KERN_WARNING, device, | 477 | dev_warn(&device->cdev->dev, |
475 | "FORMAT 0 - Device Fenced - " | 478 | "FORMAT 0 - Device Fenced - " |
476 | "device = %02x", sense[4]); | 479 | "device = %02x\n", sense[4]); |
477 | break; | 480 | break; |
478 | case 0x04: | 481 | case 0x04: |
479 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 482 | dev_warn(&device->cdev->dev, |
480 | "FORMAT 0 - Data Pinned for " | 483 | "FORMAT 0 - Data Pinned for " |
481 | "Device"); | 484 | "Device\n"); |
482 | break; | 485 | break; |
483 | default: | 486 | default: |
484 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 487 | dev_warn(&device->cdev->dev, |
485 | "FORMAT 0 - Reserved"); | 488 | "FORMAT 0 - Reserved\n"); |
486 | } | 489 | } |
487 | } | 490 | } |
488 | break; | 491 | break; |
@@ -492,348 +495,352 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense) | |||
492 | case 0x00: /* No Message */ | 495 | case 0x00: /* No Message */ |
493 | break; | 496 | break; |
494 | case 0x01: | 497 | case 0x01: |
495 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 498 | dev_warn(&device->cdev->dev, |
496 | "FORMAT 1 - Device Status 1 not as " | 499 | "FORMAT 1 - Device Status 1 not as " |
497 | "expected"); | 500 | "expected\n"); |
498 | break; | 501 | break; |
499 | case 0x03: | 502 | case 0x03: |
500 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 503 | dev_warn(&device->cdev->dev, |
501 | "FORMAT 1 - Index missing"); | 504 | "FORMAT 1 - Index missing\n"); |
502 | break; | 505 | break; |
503 | case 0x04: | 506 | case 0x04: |
504 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 507 | dev_warn(&device->cdev->dev, |
505 | "FORMAT 1 - Interruption cannot be reset"); | 508 | "FORMAT 1 - Interruption cannot be " |
509 | "reset\n"); | ||
506 | break; | 510 | break; |
507 | case 0x05: | 511 | case 0x05: |
508 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 512 | dev_warn(&device->cdev->dev, |
509 | "FORMAT 1 - Device did not respond to " | 513 | "FORMAT 1 - Device did not respond to " |
510 | "selection"); | 514 | "selection\n"); |
511 | break; | 515 | break; |
512 | case 0x06: | 516 | case 0x06: |
513 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 517 | dev_warn(&device->cdev->dev, |
514 | "FORMAT 1 - Device check-2 error or Set " | 518 | "FORMAT 1 - Device check-2 error or Set " |
515 | "Sector is not complete"); | 519 | "Sector is not complete\n"); |
516 | break; | 520 | break; |
517 | case 0x07: | 521 | case 0x07: |
518 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 522 | dev_warn(&device->cdev->dev, |
519 | "FORMAT 1 - Head address does not " | 523 | "FORMAT 1 - Head address does not " |
520 | "compare"); | 524 | "compare\n"); |
521 | break; | 525 | break; |
522 | case 0x08: | 526 | case 0x08: |
523 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 527 | dev_warn(&device->cdev->dev, |
524 | "FORMAT 1 - Device status 1 not valid"); | 528 | "FORMAT 1 - Device status 1 not valid\n"); |
525 | break; | 529 | break; |
526 | case 0x09: | 530 | case 0x09: |
527 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 531 | dev_warn(&device->cdev->dev, |
528 | "FORMAT 1 - Device not ready"); | 532 | "FORMAT 1 - Device not ready\n"); |
529 | break; | 533 | break; |
530 | case 0x0A: | 534 | case 0x0A: |
531 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 535 | dev_warn(&device->cdev->dev, |
532 | "FORMAT 1 - Track physical address did " | 536 | "FORMAT 1 - Track physical address did " |
533 | "not compare"); | 537 | "not compare\n"); |
534 | break; | 538 | break; |
535 | case 0x0B: | 539 | case 0x0B: |
536 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 540 | dev_warn(&device->cdev->dev, |
537 | "FORMAT 1 - Missing device address bit"); | 541 | "FORMAT 1 - Missing device address bit\n"); |
538 | break; | 542 | break; |
539 | case 0x0C: | 543 | case 0x0C: |
540 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 544 | dev_warn(&device->cdev->dev, |
541 | "FORMAT 1 - Drive motor switch is off"); | 545 | "FORMAT 1 - Drive motor switch is off\n"); |
542 | break; | 546 | break; |
543 | case 0x0D: | 547 | case 0x0D: |
544 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 548 | dev_warn(&device->cdev->dev, |
545 | "FORMAT 1 - Seek incomplete"); | 549 | "FORMAT 1 - Seek incomplete\n"); |
546 | break; | 550 | break; |
547 | case 0x0E: | 551 | case 0x0E: |
548 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 552 | dev_warn(&device->cdev->dev, |
549 | "FORMAT 1 - Cylinder address did not " | 553 | "FORMAT 1 - Cylinder address did not " |
550 | "compare"); | 554 | "compare\n"); |
551 | break; | 555 | break; |
552 | case 0x0F: | 556 | case 0x0F: |
553 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 557 | dev_warn(&device->cdev->dev, |
554 | "FORMAT 1 - Offset active cannot be " | 558 | "FORMAT 1 - Offset active cannot be " |
555 | "reset"); | 559 | "reset\n"); |
556 | break; | 560 | break; |
557 | default: | 561 | default: |
558 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 562 | dev_warn(&device->cdev->dev, |
559 | "FORMAT 1 - Reserved"); | 563 | "FORMAT 1 - Reserved\n"); |
560 | } | 564 | } |
561 | break; | 565 | break; |
562 | 566 | ||
563 | case 0x20: /* Format 2 - 3990 Equipment Checks */ | 567 | case 0x20: /* Format 2 - 3990 Equipment Checks */ |
564 | switch (msg_no) { | 568 | switch (msg_no) { |
565 | case 0x08: | 569 | case 0x08: |
566 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 570 | dev_warn(&device->cdev->dev, |
567 | "FORMAT 2 - 3990 check-2 error"); | 571 | "FORMAT 2 - 3990 check-2 error\n"); |
568 | break; | 572 | break; |
569 | case 0x0E: | 573 | case 0x0E: |
570 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 574 | dev_warn(&device->cdev->dev, |
571 | "FORMAT 2 - Support facility errors"); | 575 | "FORMAT 2 - Support facility errors\n"); |
572 | break; | 576 | break; |
573 | case 0x0F: | 577 | case 0x0F: |
574 | DEV_MESSAGE(KERN_WARNING, device, | 578 | dev_warn(&device->cdev->dev, |
575 | "FORMAT 2 - Microcode detected error %02x", | 579 | "FORMAT 2 - Microcode detected error " |
576 | sense[8]); | 580 | "%02x\n", |
581 | sense[8]); | ||
577 | break; | 582 | break; |
578 | default: | 583 | default: |
579 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 584 | dev_warn(&device->cdev->dev, |
580 | "FORMAT 2 - Reserved"); | 585 | "FORMAT 2 - Reserved\n"); |
581 | } | 586 | } |
582 | break; | 587 | break; |
583 | 588 | ||
584 | case 0x30: /* Format 3 - 3990 Control Checks */ | 589 | case 0x30: /* Format 3 - 3990 Control Checks */ |
585 | switch (msg_no) { | 590 | switch (msg_no) { |
586 | case 0x0F: | 591 | case 0x0F: |
587 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 592 | dev_warn(&device->cdev->dev, |
588 | "FORMAT 3 - Allegiance terminated"); | 593 | "FORMAT 3 - Allegiance terminated\n"); |
589 | break; | 594 | break; |
590 | default: | 595 | default: |
591 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 596 | dev_warn(&device->cdev->dev, |
592 | "FORMAT 3 - Reserved"); | 597 | "FORMAT 3 - Reserved\n"); |
593 | } | 598 | } |
594 | break; | 599 | break; |
595 | 600 | ||
596 | case 0x40: /* Format 4 - Data Checks */ | 601 | case 0x40: /* Format 4 - Data Checks */ |
597 | switch (msg_no) { | 602 | switch (msg_no) { |
598 | case 0x00: | 603 | case 0x00: |
599 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 604 | dev_warn(&device->cdev->dev, |
600 | "FORMAT 4 - Home address area error"); | 605 | "FORMAT 4 - Home address area error\n"); |
601 | break; | 606 | break; |
602 | case 0x01: | 607 | case 0x01: |
603 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 608 | dev_warn(&device->cdev->dev, |
604 | "FORMAT 4 - Count area error"); | 609 | "FORMAT 4 - Count area error\n"); |
605 | break; | 610 | break; |
606 | case 0x02: | 611 | case 0x02: |
607 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 612 | dev_warn(&device->cdev->dev, |
608 | "FORMAT 4 - Key area error"); | 613 | "FORMAT 4 - Key area error\n"); |
609 | break; | 614 | break; |
610 | case 0x03: | 615 | case 0x03: |
611 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 616 | dev_warn(&device->cdev->dev, |
612 | "FORMAT 4 - Data area error"); | 617 | "FORMAT 4 - Data area error\n"); |
613 | break; | 618 | break; |
614 | case 0x04: | 619 | case 0x04: |
615 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 620 | dev_warn(&device->cdev->dev, |
616 | "FORMAT 4 - No sync byte in home address " | 621 | "FORMAT 4 - No sync byte in home address " |
617 | "area"); | 622 | "area\n"); |
618 | break; | 623 | break; |
619 | case 0x05: | 624 | case 0x05: |
620 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 625 | dev_warn(&device->cdev->dev, |
621 | "FORMAT 4 - No sync byte in count address " | 626 | "FORMAT 4 - No sync byte in count address " |
622 | "area"); | 627 | "area\n"); |
623 | break; | 628 | break; |
624 | case 0x06: | 629 | case 0x06: |
625 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 630 | dev_warn(&device->cdev->dev, |
626 | "FORMAT 4 - No sync byte in key area"); | 631 | "FORMAT 4 - No sync byte in key area\n"); |
627 | break; | 632 | break; |
628 | case 0x07: | 633 | case 0x07: |
629 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 634 | dev_warn(&device->cdev->dev, |
630 | "FORMAT 4 - No sync byte in data area"); | 635 | "FORMAT 4 - No sync byte in data area\n"); |
631 | break; | 636 | break; |
632 | case 0x08: | 637 | case 0x08: |
633 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 638 | dev_warn(&device->cdev->dev, |
634 | "FORMAT 4 - Home address area error; " | 639 | "FORMAT 4 - Home address area error; " |
635 | "offset active"); | 640 | "offset active\n"); |
636 | break; | 641 | break; |
637 | case 0x09: | 642 | case 0x09: |
638 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 643 | dev_warn(&device->cdev->dev, |
639 | "FORMAT 4 - Count area error; offset " | 644 | "FORMAT 4 - Count area error; offset " |
640 | "active"); | 645 | "active\n"); |
641 | break; | 646 | break; |
642 | case 0x0A: | 647 | case 0x0A: |
643 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 648 | dev_warn(&device->cdev->dev, |
644 | "FORMAT 4 - Key area error; offset " | 649 | "FORMAT 4 - Key area error; offset " |
645 | "active"); | 650 | "active\n"); |
646 | break; | 651 | break; |
647 | case 0x0B: | 652 | case 0x0B: |
648 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 653 | dev_warn(&device->cdev->dev, |
649 | "FORMAT 4 - Data area error; " | 654 | "FORMAT 4 - Data area error; " |
650 | "offset active"); | 655 | "offset active\n"); |
651 | break; | 656 | break; |
652 | case 0x0C: | 657 | case 0x0C: |
653 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 658 | dev_warn(&device->cdev->dev, |
654 | "FORMAT 4 - No sync byte in home " | 659 | "FORMAT 4 - No sync byte in home " |
655 | "address area; offset active"); | 660 | "address area; offset active\n"); |
656 | break; | 661 | break; |
657 | case 0x0D: | 662 | case 0x0D: |
658 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 663 | dev_warn(&device->cdev->dev, |
659 | "FORMAT 4 - No syn byte in count " | 664 | "FORMAT 4 - No syn byte in count " |
660 | "address area; offset active"); | 665 | "address area; offset active\n"); |
661 | break; | 666 | break; |
662 | case 0x0E: | 667 | case 0x0E: |
663 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 668 | dev_warn(&device->cdev->dev, |
664 | "FORMAT 4 - No sync byte in key area; " | 669 | "FORMAT 4 - No sync byte in key area; " |
665 | "offset active"); | 670 | "offset active\n"); |
666 | break; | 671 | break; |
667 | case 0x0F: | 672 | case 0x0F: |
668 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 673 | dev_warn(&device->cdev->dev, |
669 | "FORMAT 4 - No syn byte in data area; " | 674 | "FORMAT 4 - No syn byte in data area; " |
670 | "offset active"); | 675 | "offset active\n"); |
671 | break; | 676 | break; |
672 | default: | 677 | default: |
673 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 678 | dev_warn(&device->cdev->dev, |
674 | "FORMAT 4 - Reserved"); | 679 | "FORMAT 4 - Reserved\n"); |
675 | } | 680 | } |
676 | break; | 681 | break; |
677 | 682 | ||
678 | case 0x50: /* Format 5 - Data Check with displacement information */ | 683 | case 0x50: /* Format 5 - Data Check with displacement information */ |
679 | switch (msg_no) { | 684 | switch (msg_no) { |
680 | case 0x00: | 685 | case 0x00: |
681 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 686 | dev_warn(&device->cdev->dev, |
682 | "FORMAT 5 - Data Check in the " | 687 | "FORMAT 5 - Data Check in the " |
683 | "home address area"); | 688 | "home address area\n"); |
684 | break; | 689 | break; |
685 | case 0x01: | 690 | case 0x01: |
686 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 691 | dev_warn(&device->cdev->dev, |
687 | "FORMAT 5 - Data Check in the count area"); | 692 | "FORMAT 5 - Data Check in the count " |
693 | "area\n"); | ||
688 | break; | 694 | break; |
689 | case 0x02: | 695 | case 0x02: |
690 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 696 | dev_warn(&device->cdev->dev, |
691 | "FORMAT 5 - Data Check in the key area"); | 697 | "FORMAT 5 - Data Check in the key area\n"); |
692 | break; | 698 | break; |
693 | case 0x03: | 699 | case 0x03: |
694 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 700 | dev_warn(&device->cdev->dev, |
695 | "FORMAT 5 - Data Check in the data area"); | 701 | "FORMAT 5 - Data Check in the data " |
702 | "area\n"); | ||
696 | break; | 703 | break; |
697 | case 0x08: | 704 | case 0x08: |
698 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 705 | dev_warn(&device->cdev->dev, |
699 | "FORMAT 5 - Data Check in the " | 706 | "FORMAT 5 - Data Check in the " |
700 | "home address area; offset active"); | 707 | "home address area; offset active\n"); |
701 | break; | 708 | break; |
702 | case 0x09: | 709 | case 0x09: |
703 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 710 | dev_warn(&device->cdev->dev, |
704 | "FORMAT 5 - Data Check in the count area; " | 711 | "FORMAT 5 - Data Check in the count area; " |
705 | "offset active"); | 712 | "offset active\n"); |
706 | break; | 713 | break; |
707 | case 0x0A: | 714 | case 0x0A: |
708 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 715 | dev_warn(&device->cdev->dev, |
709 | "FORMAT 5 - Data Check in the key area; " | 716 | "FORMAT 5 - Data Check in the key area; " |
710 | "offset active"); | 717 | "offset active\n"); |
711 | break; | 718 | break; |
712 | case 0x0B: | 719 | case 0x0B: |
713 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 720 | dev_warn(&device->cdev->dev, |
714 | "FORMAT 5 - Data Check in the data area; " | 721 | "FORMAT 5 - Data Check in the data area; " |
715 | "offset active"); | 722 | "offset active\n"); |
716 | break; | 723 | break; |
717 | default: | 724 | default: |
718 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 725 | dev_warn(&device->cdev->dev, |
719 | "FORMAT 5 - Reserved"); | 726 | "FORMAT 5 - Reserved\n"); |
720 | } | 727 | } |
721 | break; | 728 | break; |
722 | 729 | ||
723 | case 0x60: /* Format 6 - Usage Statistics/Overrun Errors */ | 730 | case 0x60: /* Format 6 - Usage Statistics/Overrun Errors */ |
724 | switch (msg_no) { | 731 | switch (msg_no) { |
725 | case 0x00: | 732 | case 0x00: |
726 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 733 | dev_warn(&device->cdev->dev, |
727 | "FORMAT 6 - Overrun on channel A"); | 734 | "FORMAT 6 - Overrun on channel A\n"); |
728 | break; | 735 | break; |
729 | case 0x01: | 736 | case 0x01: |
730 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 737 | dev_warn(&device->cdev->dev, |
731 | "FORMAT 6 - Overrun on channel B"); | 738 | "FORMAT 6 - Overrun on channel B\n"); |
732 | break; | 739 | break; |
733 | case 0x02: | 740 | case 0x02: |
734 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 741 | dev_warn(&device->cdev->dev, |
735 | "FORMAT 6 - Overrun on channel C"); | 742 | "FORMAT 6 - Overrun on channel C\n"); |
736 | break; | 743 | break; |
737 | case 0x03: | 744 | case 0x03: |
738 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 745 | dev_warn(&device->cdev->dev, |
739 | "FORMAT 6 - Overrun on channel D"); | 746 | "FORMAT 6 - Overrun on channel D\n"); |
740 | break; | 747 | break; |
741 | case 0x04: | 748 | case 0x04: |
742 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 749 | dev_warn(&device->cdev->dev, |
743 | "FORMAT 6 - Overrun on channel E"); | 750 | "FORMAT 6 - Overrun on channel E\n"); |
744 | break; | 751 | break; |
745 | case 0x05: | 752 | case 0x05: |
746 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 753 | dev_warn(&device->cdev->dev, |
747 | "FORMAT 6 - Overrun on channel F"); | 754 | "FORMAT 6 - Overrun on channel F\n"); |
748 | break; | 755 | break; |
749 | case 0x06: | 756 | case 0x06: |
750 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 757 | dev_warn(&device->cdev->dev, |
751 | "FORMAT 6 - Overrun on channel G"); | 758 | "FORMAT 6 - Overrun on channel G\n"); |
752 | break; | 759 | break; |
753 | case 0x07: | 760 | case 0x07: |
754 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 761 | dev_warn(&device->cdev->dev, |
755 | "FORMAT 6 - Overrun on channel H"); | 762 | "FORMAT 6 - Overrun on channel H\n"); |
756 | break; | 763 | break; |
757 | default: | 764 | default: |
758 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 765 | dev_warn(&device->cdev->dev, |
759 | "FORMAT 6 - Reserved"); | 766 | "FORMAT 6 - Reserved\n"); |
760 | } | 767 | } |
761 | break; | 768 | break; |
762 | 769 | ||
763 | case 0x70: /* Format 7 - Device Connection Control Checks */ | 770 | case 0x70: /* Format 7 - Device Connection Control Checks */ |
764 | switch (msg_no) { | 771 | switch (msg_no) { |
765 | case 0x00: | 772 | case 0x00: |
766 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 773 | dev_warn(&device->cdev->dev, |
767 | "FORMAT 7 - RCC initiated by a connection " | 774 | "FORMAT 7 - RCC initiated by a connection " |
768 | "check alert"); | 775 | "check alert\n"); |
769 | break; | 776 | break; |
770 | case 0x01: | 777 | case 0x01: |
771 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 778 | dev_warn(&device->cdev->dev, |
772 | "FORMAT 7 - RCC 1 sequence not " | 779 | "FORMAT 7 - RCC 1 sequence not " |
773 | "successful"); | 780 | "successful\n"); |
774 | break; | 781 | break; |
775 | case 0x02: | 782 | case 0x02: |
776 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 783 | dev_warn(&device->cdev->dev, |
777 | "FORMAT 7 - RCC 1 and RCC 2 sequences not " | 784 | "FORMAT 7 - RCC 1 and RCC 2 sequences not " |
778 | "successful"); | 785 | "successful\n"); |
779 | break; | 786 | break; |
780 | case 0x03: | 787 | case 0x03: |
781 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 788 | dev_warn(&device->cdev->dev, |
782 | "FORMAT 7 - Invalid tag-in during " | 789 | "FORMAT 7 - Invalid tag-in during " |
783 | "selection sequence"); | 790 | "selection sequence\n"); |
784 | break; | 791 | break; |
785 | case 0x04: | 792 | case 0x04: |
786 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 793 | dev_warn(&device->cdev->dev, |
787 | "FORMAT 7 - extra RCC required"); | 794 | "FORMAT 7 - extra RCC required\n"); |
788 | break; | 795 | break; |
789 | case 0x05: | 796 | case 0x05: |
790 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 797 | dev_warn(&device->cdev->dev, |
791 | "FORMAT 7 - Invalid DCC selection " | 798 | "FORMAT 7 - Invalid DCC selection " |
792 | "response or timeout"); | 799 | "response or timeout\n"); |
793 | break; | 800 | break; |
794 | case 0x06: | 801 | case 0x06: |
795 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 802 | dev_warn(&device->cdev->dev, |
796 | "FORMAT 7 - Missing end operation; device " | 803 | "FORMAT 7 - Missing end operation; device " |
797 | "transfer complete"); | 804 | "transfer complete\n"); |
798 | break; | 805 | break; |
799 | case 0x07: | 806 | case 0x07: |
800 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 807 | dev_warn(&device->cdev->dev, |
801 | "FORMAT 7 - Missing end operation; device " | 808 | "FORMAT 7 - Missing end operation; device " |
802 | "transfer incomplete"); | 809 | "transfer incomplete\n"); |
803 | break; | 810 | break; |
804 | case 0x08: | 811 | case 0x08: |
805 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 812 | dev_warn(&device->cdev->dev, |
806 | "FORMAT 7 - Invalid tag-in for an " | 813 | "FORMAT 7 - Invalid tag-in for an " |
807 | "immediate command sequence"); | 814 | "immediate command sequence\n"); |
808 | break; | 815 | break; |
809 | case 0x09: | 816 | case 0x09: |
810 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 817 | dev_warn(&device->cdev->dev, |
811 | "FORMAT 7 - Invalid tag-in for an " | 818 | "FORMAT 7 - Invalid tag-in for an " |
812 | "extended command sequence"); | 819 | "extended command sequence\n"); |
813 | break; | 820 | break; |
814 | case 0x0A: | 821 | case 0x0A: |
815 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 822 | dev_warn(&device->cdev->dev, |
816 | "FORMAT 7 - 3990 microcode time out when " | 823 | "FORMAT 7 - 3990 microcode time out when " |
817 | "stopping selection"); | 824 | "stopping selection\n"); |
818 | break; | 825 | break; |
819 | case 0x0B: | 826 | case 0x0B: |
820 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 827 | dev_warn(&device->cdev->dev, |
821 | "FORMAT 7 - No response to selection " | 828 | "FORMAT 7 - No response to selection " |
822 | "after a poll interruption"); | 829 | "after a poll interruption\n"); |
823 | break; | 830 | break; |
824 | case 0x0C: | 831 | case 0x0C: |
825 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 832 | dev_warn(&device->cdev->dev, |
826 | "FORMAT 7 - Permanent path error (DASD " | 833 | "FORMAT 7 - Permanent path error (DASD " |
827 | "controller not available)"); | 834 | "controller not available)\n"); |
828 | break; | 835 | break; |
829 | case 0x0D: | 836 | case 0x0D: |
830 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 837 | dev_warn(&device->cdev->dev, |
831 | "FORMAT 7 - DASD controller not available" | 838 | "FORMAT 7 - DASD controller not available" |
832 | " on disconnected command chain"); | 839 | " on disconnected command chain\n"); |
833 | break; | 840 | break; |
834 | default: | 841 | default: |
835 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 842 | dev_warn(&device->cdev->dev, |
836 | "FORMAT 7 - Reserved"); | 843 | "FORMAT 7 - Reserved\n"); |
837 | } | 844 | } |
838 | break; | 845 | break; |
839 | 846 | ||
@@ -841,52 +848,52 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense) | |||
841 | switch (msg_no) { | 848 | switch (msg_no) { |
842 | case 0x00: /* No Message */ | 849 | case 0x00: /* No Message */ |
843 | case 0x01: | 850 | case 0x01: |
844 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 851 | dev_warn(&device->cdev->dev, |
845 | "FORMAT 8 - Error correction code " | 852 | "FORMAT 8 - Error correction code " |
846 | "hardware fault"); | 853 | "hardware fault\n"); |
847 | break; | 854 | break; |
848 | case 0x03: | 855 | case 0x03: |
849 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 856 | dev_warn(&device->cdev->dev, |
850 | "FORMAT 8 - Unexpected end operation " | 857 | "FORMAT 8 - Unexpected end operation " |
851 | "response code"); | 858 | "response code\n"); |
852 | break; | 859 | break; |
853 | case 0x04: | 860 | case 0x04: |
854 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 861 | dev_warn(&device->cdev->dev, |
855 | "FORMAT 8 - End operation with transfer " | 862 | "FORMAT 8 - End operation with transfer " |
856 | "count not zero"); | 863 | "count not zero\n"); |
857 | break; | 864 | break; |
858 | case 0x05: | 865 | case 0x05: |
859 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 866 | dev_warn(&device->cdev->dev, |
860 | "FORMAT 8 - End operation with transfer " | 867 | "FORMAT 8 - End operation with transfer " |
861 | "count zero"); | 868 | "count zero\n"); |
862 | break; | 869 | break; |
863 | case 0x06: | 870 | case 0x06: |
864 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 871 | dev_warn(&device->cdev->dev, |
865 | "FORMAT 8 - DPS checks after a system " | 872 | "FORMAT 8 - DPS checks after a system " |
866 | "reset or selective reset"); | 873 | "reset or selective reset\n"); |
867 | break; | 874 | break; |
868 | case 0x07: | 875 | case 0x07: |
869 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 876 | dev_warn(&device->cdev->dev, |
870 | "FORMAT 8 - DPS cannot be filled"); | 877 | "FORMAT 8 - DPS cannot be filled\n"); |
871 | break; | 878 | break; |
872 | case 0x08: | 879 | case 0x08: |
873 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 880 | dev_warn(&device->cdev->dev, |
874 | "FORMAT 8 - Short busy time-out during " | 881 | "FORMAT 8 - Short busy time-out during " |
875 | "device selection"); | 882 | "device selection\n"); |
876 | break; | 883 | break; |
877 | case 0x09: | 884 | case 0x09: |
878 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 885 | dev_warn(&device->cdev->dev, |
879 | "FORMAT 8 - DASD controller failed to " | 886 | "FORMAT 8 - DASD controller failed to " |
880 | "set or reset the long busy latch"); | 887 | "set or reset the long busy latch\n"); |
881 | break; | 888 | break; |
882 | case 0x0A: | 889 | case 0x0A: |
883 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 890 | dev_warn(&device->cdev->dev, |
884 | "FORMAT 8 - No interruption from device " | 891 | "FORMAT 8 - No interruption from device " |
885 | "during a command chain"); | 892 | "during a command chain\n"); |
886 | break; | 893 | break; |
887 | default: | 894 | default: |
888 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 895 | dev_warn(&device->cdev->dev, |
889 | "FORMAT 8 - Reserved"); | 896 | "FORMAT 8 - Reserved\n"); |
890 | } | 897 | } |
891 | break; | 898 | break; |
892 | 899 | ||
@@ -895,97 +902,100 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense) | |||
895 | case 0x00: | 902 | case 0x00: |
896 | break; /* No Message */ | 903 | break; /* No Message */ |
897 | case 0x06: | 904 | case 0x06: |
898 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 905 | dev_warn(&device->cdev->dev, |
899 | "FORMAT 9 - Device check-2 error"); | 906 | "FORMAT 9 - Device check-2 error\n"); |
900 | break; | 907 | break; |
901 | case 0x07: | 908 | case 0x07: |
902 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 909 | dev_warn(&device->cdev->dev, |
903 | "FORMAT 9 - Head address did not compare"); | 910 | "FORMAT 9 - Head address did not " |
911 | "compare\n"); | ||
904 | break; | 912 | break; |
905 | case 0x0A: | 913 | case 0x0A: |
906 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 914 | dev_warn(&device->cdev->dev, |
907 | "FORMAT 9 - Track physical address did " | 915 | "FORMAT 9 - Track physical address did " |
908 | "not compare while oriented"); | 916 | "not compare while oriented\n"); |
909 | break; | 917 | break; |
910 | case 0x0E: | 918 | case 0x0E: |
911 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 919 | dev_warn(&device->cdev->dev, |
912 | "FORMAT 9 - Cylinder address did not " | 920 | "FORMAT 9 - Cylinder address did not " |
913 | "compare"); | 921 | "compare\n"); |
914 | break; | 922 | break; |
915 | default: | 923 | default: |
916 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 924 | dev_warn(&device->cdev->dev, |
917 | "FORMAT 9 - Reserved"); | 925 | "FORMAT 9 - Reserved\n"); |
918 | } | 926 | } |
919 | break; | 927 | break; |
920 | 928 | ||
921 | case 0xF0: /* Format F - Cache Storage Checks */ | 929 | case 0xF0: /* Format F - Cache Storage Checks */ |
922 | switch (msg_no) { | 930 | switch (msg_no) { |
923 | case 0x00: | 931 | case 0x00: |
924 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 932 | dev_warn(&device->cdev->dev, |
925 | "FORMAT F - Operation Terminated"); | 933 | "FORMAT F - Operation Terminated\n"); |
926 | break; | 934 | break; |
927 | case 0x01: | 935 | case 0x01: |
928 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 936 | dev_warn(&device->cdev->dev, |
929 | "FORMAT F - Subsystem Processing Error"); | 937 | "FORMAT F - Subsystem Processing Error\n"); |
930 | break; | 938 | break; |
931 | case 0x02: | 939 | case 0x02: |
932 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 940 | dev_warn(&device->cdev->dev, |
933 | "FORMAT F - Cache or nonvolatile storage " | 941 | "FORMAT F - Cache or nonvolatile storage " |
934 | "equipment failure"); | 942 | "equipment failure\n"); |
935 | break; | 943 | break; |
936 | case 0x04: | 944 | case 0x04: |
937 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 945 | dev_warn(&device->cdev->dev, |
938 | "FORMAT F - Caching terminated"); | 946 | "FORMAT F - Caching terminated\n"); |
939 | break; | 947 | break; |
940 | case 0x06: | 948 | case 0x06: |
941 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 949 | dev_warn(&device->cdev->dev, |
942 | "FORMAT F - Cache fast write access not " | 950 | "FORMAT F - Cache fast write access not " |
943 | "authorized"); | 951 | "authorized\n"); |
944 | break; | 952 | break; |
945 | case 0x07: | 953 | case 0x07: |
946 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 954 | dev_warn(&device->cdev->dev, |
947 | "FORMAT F - Track format incorrect"); | 955 | "FORMAT F - Track format incorrect\n"); |
948 | break; | 956 | break; |
949 | case 0x09: | 957 | case 0x09: |
950 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 958 | dev_warn(&device->cdev->dev, |
951 | "FORMAT F - Caching reinitiated"); | 959 | "FORMAT F - Caching reinitiated\n"); |
952 | break; | 960 | break; |
953 | case 0x0A: | 961 | case 0x0A: |
954 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 962 | dev_warn(&device->cdev->dev, |
955 | "FORMAT F - Nonvolatile storage " | 963 | "FORMAT F - Nonvolatile storage " |
956 | "terminated"); | 964 | "terminated\n"); |
957 | break; | 965 | break; |
958 | case 0x0B: | 966 | case 0x0B: |
959 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 967 | dev_warn(&device->cdev->dev, |
960 | "FORMAT F - Volume is suspended duplex"); | 968 | "FORMAT F - Volume is suspended duplex\n"); |
961 | /* call extended error reporting (EER) */ | 969 | /* call extended error reporting (EER) */ |
962 | dasd_eer_write(device, erp->refers, | 970 | dasd_eer_write(device, erp->refers, |
963 | DASD_EER_PPRCSUSPEND); | 971 | DASD_EER_PPRCSUSPEND); |
964 | break; | 972 | break; |
965 | case 0x0C: | 973 | case 0x0C: |
966 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 974 | dev_warn(&device->cdev->dev, |
967 | "FORMAT F - Subsystem status connot be " | 975 | "FORMAT F - Subsystem status cannot be " |
968 | "determined"); | 976 | "determined\n"); |
969 | break; | 977 | break; |
970 | case 0x0D: | 978 | case 0x0D: |
971 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 979 | dev_warn(&device->cdev->dev, |
972 | "FORMAT F - Caching status reset to " | 980 | "FORMAT F - Caching status reset to " |
973 | "default"); | 981 | "default\n"); |
974 | break; | 982 | break; |
975 | case 0x0E: | 983 | case 0x0E: |
976 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 984 | dev_warn(&device->cdev->dev, |
977 | "FORMAT F - DASD Fast Write inhibited"); | 985 | "FORMAT F - DASD Fast Write inhibited\n"); |
978 | break; | 986 | break; |
979 | default: | 987 | default: |
980 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 988 | dev_warn(&device->cdev->dev, |
981 | "FORMAT D - Reserved"); | 989 | "FORMAT D - Reserved\n"); |
982 | } | 990 | } |
983 | break; | 991 | break; |
984 | 992 | ||
985 | default: /* unknown message format - should not happen */ | 993 | default: /* unknown message format - should not happen |
986 | DEV_MESSAGE (KERN_WARNING, device, | 994 | internal error 03 - unknown message format */ |
987 | "unknown message format %02x", | 995 | snprintf(errorstring, ERRORLENGTH, "03 %x02", msg_format); |
988 | msg_format); | 996 | dev_err(&device->cdev->dev, |
997 | "An error occurred in the DASD device driver, " | ||
998 | "reason=%s\n", errorstring); | ||
989 | break; | 999 | break; |
990 | } /* end switch message format */ | 1000 | } /* end switch message format */ |
991 | 1001 | ||
@@ -1015,7 +1025,7 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense) | |||
1015 | /* env data present (ACTION 10 - retry should work) */ | 1025 | /* env data present (ACTION 10 - retry should work) */ |
1016 | if (sense[2] & SNS2_ENV_DATA_PRESENT) { | 1026 | if (sense[2] & SNS2_ENV_DATA_PRESENT) { |
1017 | 1027 | ||
1018 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1028 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1019 | "Command Reject - environmental data present"); | 1029 | "Command Reject - environmental data present"); |
1020 | 1030 | ||
1021 | dasd_3990_handle_env_data(erp, sense); | 1031 | dasd_3990_handle_env_data(erp, sense); |
@@ -1023,9 +1033,10 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense) | |||
1023 | erp->retries = 5; | 1033 | erp->retries = 5; |
1024 | 1034 | ||
1025 | } else { | 1035 | } else { |
1026 | /* fatal error - set status to FAILED */ | 1036 | /* fatal error - set status to FAILED |
1027 | DEV_MESSAGE(KERN_ERR, device, "%s", | 1037 | internal error 09 - Command Reject */ |
1028 | "Command Reject - Fatal error"); | 1038 | dev_err(&device->cdev->dev, "An error occurred in the DASD " |
1039 | "device driver, reason=%s\n", "09"); | ||
1029 | 1040 | ||
1030 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); | 1041 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); |
1031 | } | 1042 | } |
@@ -1061,7 +1072,7 @@ dasd_3990_erp_bus_out(struct dasd_ccw_req * erp) | |||
1061 | } else { | 1072 | } else { |
1062 | 1073 | ||
1063 | /* issue a message and wait for 'device ready' interrupt */ | 1074 | /* issue a message and wait for 'device ready' interrupt */ |
1064 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1075 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1065 | "bus out parity error or BOPC requested by " | 1076 | "bus out parity error or BOPC requested by " |
1066 | "channel"); | 1077 | "channel"); |
1067 | 1078 | ||
@@ -1093,21 +1104,19 @@ dasd_3990_erp_equip_check(struct dasd_ccw_req * erp, char *sense) | |||
1093 | erp->function = dasd_3990_erp_equip_check; | 1104 | erp->function = dasd_3990_erp_equip_check; |
1094 | 1105 | ||
1095 | if (sense[1] & SNS1_WRITE_INHIBITED) { | 1106 | if (sense[1] & SNS1_WRITE_INHIBITED) { |
1107 | dev_info(&device->cdev->dev, | ||
1108 | "Write inhibited path encountered\n"); | ||
1096 | 1109 | ||
1097 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1110 | /* vary path offline |
1098 | "Write inhibited path encountered"); | 1111 | internal error 04 - Path should be varied off-line.*/ |
1099 | 1112 | dev_err(&device->cdev->dev, "An error occurred in the DASD " | |
1100 | /* vary path offline */ | 1113 | "device driver, reason=%s\n", "04"); |
1101 | DEV_MESSAGE(KERN_ERR, device, "%s", | ||
1102 | "Path should be varied off-line. " | ||
1103 | "This is not implemented yet \n - please report " | ||
1104 | "to linux390@de.ibm.com"); | ||
1105 | 1114 | ||
1106 | erp = dasd_3990_erp_action_1(erp); | 1115 | erp = dasd_3990_erp_action_1(erp); |
1107 | 1116 | ||
1108 | } else if (sense[2] & SNS2_ENV_DATA_PRESENT) { | 1117 | } else if (sense[2] & SNS2_ENV_DATA_PRESENT) { |
1109 | 1118 | ||
1110 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1119 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1111 | "Equipment Check - " "environmental data present"); | 1120 | "Equipment Check - " "environmental data present"); |
1112 | 1121 | ||
1113 | dasd_3990_handle_env_data(erp, sense); | 1122 | dasd_3990_handle_env_data(erp, sense); |
@@ -1116,7 +1125,7 @@ dasd_3990_erp_equip_check(struct dasd_ccw_req * erp, char *sense) | |||
1116 | 1125 | ||
1117 | } else if (sense[1] & SNS1_PERM_ERR) { | 1126 | } else if (sense[1] & SNS1_PERM_ERR) { |
1118 | 1127 | ||
1119 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1128 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1120 | "Equipment Check - retry exhausted or " | 1129 | "Equipment Check - retry exhausted or " |
1121 | "undesirable"); | 1130 | "undesirable"); |
1122 | 1131 | ||
@@ -1125,7 +1134,7 @@ dasd_3990_erp_equip_check(struct dasd_ccw_req * erp, char *sense) | |||
1125 | } else { | 1134 | } else { |
1126 | /* all other equipment checks - Action 5 */ | 1135 | /* all other equipment checks - Action 5 */ |
1127 | /* rest is done when retries == 0 */ | 1136 | /* rest is done when retries == 0 */ |
1128 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1137 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1129 | "Equipment check or processing error"); | 1138 | "Equipment check or processing error"); |
1130 | 1139 | ||
1131 | erp = dasd_3990_erp_action_5(erp); | 1140 | erp = dasd_3990_erp_action_5(erp); |
@@ -1156,9 +1165,9 @@ dasd_3990_erp_data_check(struct dasd_ccw_req * erp, char *sense) | |||
1156 | if (sense[2] & SNS2_CORRECTABLE) { /* correctable data check */ | 1165 | if (sense[2] & SNS2_CORRECTABLE) { /* correctable data check */ |
1157 | 1166 | ||
1158 | /* issue message that the data has been corrected */ | 1167 | /* issue message that the data has been corrected */ |
1159 | DEV_MESSAGE(KERN_EMERG, device, "%s", | 1168 | dev_emerg(&device->cdev->dev, |
1160 | "Data recovered during retry with PCI " | 1169 | "Data recovered during retry with PCI " |
1161 | "fetch mode active"); | 1170 | "fetch mode active\n"); |
1162 | 1171 | ||
1163 | /* not possible to handle this situation in Linux */ | 1172 | /* not possible to handle this situation in Linux */ |
1164 | panic("No way to inform application about the possibly " | 1173 | panic("No way to inform application about the possibly " |
@@ -1166,7 +1175,7 @@ dasd_3990_erp_data_check(struct dasd_ccw_req * erp, char *sense) | |||
1166 | 1175 | ||
1167 | } else if (sense[2] & SNS2_ENV_DATA_PRESENT) { | 1176 | } else if (sense[2] & SNS2_ENV_DATA_PRESENT) { |
1168 | 1177 | ||
1169 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1178 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1170 | "Uncorrectable data check recovered secondary " | 1179 | "Uncorrectable data check recovered secondary " |
1171 | "addr of duplex pair"); | 1180 | "addr of duplex pair"); |
1172 | 1181 | ||
@@ -1174,7 +1183,7 @@ dasd_3990_erp_data_check(struct dasd_ccw_req * erp, char *sense) | |||
1174 | 1183 | ||
1175 | } else if (sense[1] & SNS1_PERM_ERR) { | 1184 | } else if (sense[1] & SNS1_PERM_ERR) { |
1176 | 1185 | ||
1177 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1186 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1178 | "Uncorrectable data check with internal " | 1187 | "Uncorrectable data check with internal " |
1179 | "retry exhausted"); | 1188 | "retry exhausted"); |
1180 | 1189 | ||
@@ -1182,7 +1191,7 @@ dasd_3990_erp_data_check(struct dasd_ccw_req * erp, char *sense) | |||
1182 | 1191 | ||
1183 | } else { | 1192 | } else { |
1184 | /* all other data checks */ | 1193 | /* all other data checks */ |
1185 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1194 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1186 | "Uncorrectable data check with retry count " | 1195 | "Uncorrectable data check with retry count " |
1187 | "exhausted..."); | 1196 | "exhausted..."); |
1188 | 1197 | ||
@@ -1212,7 +1221,7 @@ dasd_3990_erp_overrun(struct dasd_ccw_req * erp, char *sense) | |||
1212 | 1221 | ||
1213 | erp->function = dasd_3990_erp_overrun; | 1222 | erp->function = dasd_3990_erp_overrun; |
1214 | 1223 | ||
1215 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1224 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1216 | "Overrun - service overrun or overrun" | 1225 | "Overrun - service overrun or overrun" |
1217 | " error requested by channel"); | 1226 | " error requested by channel"); |
1218 | 1227 | ||
@@ -1243,7 +1252,7 @@ dasd_3990_erp_inv_format(struct dasd_ccw_req * erp, char *sense) | |||
1243 | 1252 | ||
1244 | if (sense[2] & SNS2_ENV_DATA_PRESENT) { | 1253 | if (sense[2] & SNS2_ENV_DATA_PRESENT) { |
1245 | 1254 | ||
1246 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1255 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1247 | "Track format error when destaging or " | 1256 | "Track format error when destaging or " |
1248 | "staging data"); | 1257 | "staging data"); |
1249 | 1258 | ||
@@ -1252,8 +1261,10 @@ dasd_3990_erp_inv_format(struct dasd_ccw_req * erp, char *sense) | |||
1252 | erp = dasd_3990_erp_action_4(erp, sense); | 1261 | erp = dasd_3990_erp_action_4(erp, sense); |
1253 | 1262 | ||
1254 | } else { | 1263 | } else { |
1255 | DEV_MESSAGE(KERN_ERR, device, "%s", | 1264 | /* internal error 06 - The track format is not valid*/ |
1256 | "Invalid Track Format - Fatal error"); | 1265 | dev_err(&device->cdev->dev, |
1266 | "An error occurred in the DASD device driver, " | ||
1267 | "reason=%s\n", "06"); | ||
1257 | 1268 | ||
1258 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); | 1269 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); |
1259 | } | 1270 | } |
@@ -1279,8 +1290,8 @@ dasd_3990_erp_EOC(struct dasd_ccw_req * default_erp, char *sense) | |||
1279 | 1290 | ||
1280 | struct dasd_device *device = default_erp->startdev; | 1291 | struct dasd_device *device = default_erp->startdev; |
1281 | 1292 | ||
1282 | DEV_MESSAGE(KERN_ERR, device, "%s", | 1293 | dev_err(&device->cdev->dev, |
1283 | "End-of-Cylinder - must never happen"); | 1294 | "The cylinder data for accessing the DASD is inconsistent\n"); |
1284 | 1295 | ||
1285 | /* implement action 7 - BUG */ | 1296 | /* implement action 7 - BUG */ |
1286 | return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); | 1297 | return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); |
@@ -1306,7 +1317,7 @@ dasd_3990_erp_env_data(struct dasd_ccw_req * erp, char *sense) | |||
1306 | 1317 | ||
1307 | erp->function = dasd_3990_erp_env_data; | 1318 | erp->function = dasd_3990_erp_env_data; |
1308 | 1319 | ||
1309 | DEV_MESSAGE(KERN_DEBUG, device, "%s", "Environmental data present"); | 1320 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", "Environmental data present"); |
1310 | 1321 | ||
1311 | dasd_3990_handle_env_data(erp, sense); | 1322 | dasd_3990_handle_env_data(erp, sense); |
1312 | 1323 | ||
@@ -1339,8 +1350,8 @@ dasd_3990_erp_no_rec(struct dasd_ccw_req * default_erp, char *sense) | |||
1339 | 1350 | ||
1340 | struct dasd_device *device = default_erp->startdev; | 1351 | struct dasd_device *device = default_erp->startdev; |
1341 | 1352 | ||
1342 | DEV_MESSAGE(KERN_ERR, device, "%s", | 1353 | dev_err(&device->cdev->dev, |
1343 | "No Record Found - Fatal error "); | 1354 | "The specified record was not found\n"); |
1344 | 1355 | ||
1345 | return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); | 1356 | return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); |
1346 | 1357 | ||
@@ -1365,7 +1376,8 @@ dasd_3990_erp_file_prot(struct dasd_ccw_req * erp) | |||
1365 | 1376 | ||
1366 | struct dasd_device *device = erp->startdev; | 1377 | struct dasd_device *device = erp->startdev; |
1367 | 1378 | ||
1368 | DEV_MESSAGE(KERN_ERR, device, "%s", "File Protected"); | 1379 | dev_err(&device->cdev->dev, "Accessing the DASD failed because of " |
1380 | "a hardware error\n"); | ||
1369 | 1381 | ||
1370 | return dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); | 1382 | return dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); |
1371 | 1383 | ||
@@ -1394,7 +1406,7 @@ static struct dasd_ccw_req *dasd_3990_erp_inspect_alias( | |||
1394 | if (cqr->block && | 1406 | if (cqr->block && |
1395 | (cqr->block->base != cqr->startdev)) { | 1407 | (cqr->block->base != cqr->startdev)) { |
1396 | if (cqr->startdev->features & DASD_FEATURE_ERPLOG) { | 1408 | if (cqr->startdev->features & DASD_FEATURE_ERPLOG) { |
1397 | DEV_MESSAGE(KERN_ERR, cqr->startdev, | 1409 | DBF_DEV_EVENT(DBF_ERR, cqr->startdev, |
1398 | "ERP on alias device for request %p," | 1410 | "ERP on alias device for request %p," |
1399 | " recover on base device %s", cqr, | 1411 | " recover on base device %s", cqr, |
1400 | dev_name(&cqr->block->base->cdev->dev)); | 1412 | dev_name(&cqr->block->base->cdev->dev)); |
@@ -1511,7 +1523,7 @@ dasd_3990_erp_action_10_32(struct dasd_ccw_req * erp, char *sense) | |||
1511 | erp->retries = 256; | 1523 | erp->retries = 256; |
1512 | erp->function = dasd_3990_erp_action_10_32; | 1524 | erp->function = dasd_3990_erp_action_10_32; |
1513 | 1525 | ||
1514 | DEV_MESSAGE(KERN_DEBUG, device, "%s", "Perform logging requested"); | 1526 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", "Perform logging requested"); |
1515 | 1527 | ||
1516 | return erp; | 1528 | return erp; |
1517 | 1529 | ||
@@ -1549,7 +1561,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) | |||
1549 | char *LO_data; /* LO_eckd_data_t */ | 1561 | char *LO_data; /* LO_eckd_data_t */ |
1550 | struct ccw1 *ccw, *oldccw; | 1562 | struct ccw1 *ccw, *oldccw; |
1551 | 1563 | ||
1552 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1564 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1553 | "Write not finished because of unexpected condition"); | 1565 | "Write not finished because of unexpected condition"); |
1554 | 1566 | ||
1555 | default_erp->function = dasd_3990_erp_action_1B_32; | 1567 | default_erp->function = dasd_3990_erp_action_1B_32; |
@@ -1570,8 +1582,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) | |||
1570 | 1582 | ||
1571 | /* for imprecise ending just do default erp */ | 1583 | /* for imprecise ending just do default erp */ |
1572 | if (sense[1] & 0x01) { | 1584 | if (sense[1] & 0x01) { |
1573 | 1585 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", | |
1574 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | ||
1575 | "Imprecise ending is set - just retry"); | 1586 | "Imprecise ending is set - just retry"); |
1576 | 1587 | ||
1577 | return default_erp; | 1588 | return default_erp; |
@@ -1582,8 +1593,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) | |||
1582 | cpa = default_erp->refers->irb.scsw.cmd.cpa; | 1593 | cpa = default_erp->refers->irb.scsw.cmd.cpa; |
1583 | 1594 | ||
1584 | if (cpa == 0) { | 1595 | if (cpa == 0) { |
1585 | 1596 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", | |
1586 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | ||
1587 | "Unable to determine address of the CCW " | 1597 | "Unable to determine address of the CCW " |
1588 | "to be restarted"); | 1598 | "to be restarted"); |
1589 | 1599 | ||
@@ -1597,7 +1607,9 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) | |||
1597 | sizeof(struct LO_eckd_data), device); | 1607 | sizeof(struct LO_eckd_data), device); |
1598 | 1608 | ||
1599 | if (IS_ERR(erp)) { | 1609 | if (IS_ERR(erp)) { |
1600 | DEV_MESSAGE(KERN_ERR, device, "%s", "Unable to allocate ERP"); | 1610 | /* internal error 01 - Unable to allocate ERP */ |
1611 | dev_err(&device->cdev->dev, "An error occurred in the DASD " | ||
1612 | "device driver, reason=%s\n", "01"); | ||
1601 | return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); | 1613 | return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); |
1602 | } | 1614 | } |
1603 | 1615 | ||
@@ -1615,10 +1627,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) | |||
1615 | LO_data = erp->data + sizeof(struct DE_eckd_data); | 1627 | LO_data = erp->data + sizeof(struct DE_eckd_data); |
1616 | 1628 | ||
1617 | if ((sense[3] == 0x01) && (LO_data[1] & 0x01)) { | 1629 | if ((sense[3] == 0x01) && (LO_data[1] & 0x01)) { |
1618 | 1630 | /* should not */ | |
1619 | DEV_MESSAGE(KERN_ERR, device, "%s", | ||
1620 | "BUG - this should not happen"); | ||
1621 | |||
1622 | return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); | 1631 | return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); |
1623 | } | 1632 | } |
1624 | 1633 | ||
@@ -1708,7 +1717,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) | |||
1708 | char *LO_data; /* struct LO_eckd_data */ | 1717 | char *LO_data; /* struct LO_eckd_data */ |
1709 | struct ccw1 *ccw; | 1718 | struct ccw1 *ccw; |
1710 | 1719 | ||
1711 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1720 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1712 | "Write not finished because of unexpected condition" | 1721 | "Write not finished because of unexpected condition" |
1713 | " - follow on"); | 1722 | " - follow on"); |
1714 | 1723 | ||
@@ -1728,8 +1737,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) | |||
1728 | 1737 | ||
1729 | /* for imprecise ending just do default erp */ | 1738 | /* for imprecise ending just do default erp */ |
1730 | if (sense[1] & 0x01) { | 1739 | if (sense[1] & 0x01) { |
1731 | 1740 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", | |
1732 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | ||
1733 | "Imprecise ending is set - just retry"); | 1741 | "Imprecise ending is set - just retry"); |
1734 | 1742 | ||
1735 | previous_erp->status = DASD_CQR_FILLED; | 1743 | previous_erp->status = DASD_CQR_FILLED; |
@@ -1742,10 +1750,10 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) | |||
1742 | cpa = previous_erp->irb.scsw.cmd.cpa; | 1750 | cpa = previous_erp->irb.scsw.cmd.cpa; |
1743 | 1751 | ||
1744 | if (cpa == 0) { | 1752 | if (cpa == 0) { |
1745 | 1753 | /* internal error 02 - | |
1746 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1754 | Unable to determine address of the CCW to be restarted */ |
1747 | "Unable to determine address of the CCW " | 1755 | dev_err(&device->cdev->dev, "An error occurred in the DASD " |
1748 | "to be restarted"); | 1756 | "device driver, reason=%s\n", "02"); |
1749 | 1757 | ||
1750 | previous_erp->status = DASD_CQR_FAILED; | 1758 | previous_erp->status = DASD_CQR_FAILED; |
1751 | 1759 | ||
@@ -1758,10 +1766,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) | |||
1758 | LO_data = erp->data + sizeof(struct DE_eckd_data); | 1766 | LO_data = erp->data + sizeof(struct DE_eckd_data); |
1759 | 1767 | ||
1760 | if ((sense[3] == 0x01) && (LO_data[1] & 0x01)) { | 1768 | if ((sense[3] == 0x01) && (LO_data[1] & 0x01)) { |
1761 | 1769 | /* should not happen */ | |
1762 | DEV_MESSAGE(KERN_ERR, device, "%s", | ||
1763 | "BUG - this should not happen"); | ||
1764 | |||
1765 | previous_erp->status = DASD_CQR_FAILED; | 1770 | previous_erp->status = DASD_CQR_FAILED; |
1766 | 1771 | ||
1767 | return previous_erp; | 1772 | return previous_erp; |
@@ -1949,14 +1954,13 @@ dasd_3990_erp_compound_config(struct dasd_ccw_req * erp, char *sense) | |||
1949 | 1954 | ||
1950 | if ((sense[25] & DASD_SENSE_BIT_1) && (sense[26] & DASD_SENSE_BIT_2)) { | 1955 | if ((sense[25] & DASD_SENSE_BIT_1) && (sense[26] & DASD_SENSE_BIT_2)) { |
1951 | 1956 | ||
1952 | /* set to suspended duplex state then restart */ | 1957 | /* set to suspended duplex state then restart |
1958 | internal error 05 - Set device to suspended duplex state | ||
1959 | should be done */ | ||
1953 | struct dasd_device *device = erp->startdev; | 1960 | struct dasd_device *device = erp->startdev; |
1954 | 1961 | dev_err(&device->cdev->dev, | |
1955 | DEV_MESSAGE(KERN_ERR, device, "%s", | 1962 | "An error occurred in the DASD device driver, " |
1956 | "Set device to suspended duplex state should be " | 1963 | "reason=%s\n", "05"); |
1957 | "done!\n" | ||
1958 | "This is not implemented yet (for compound ERP)" | ||
1959 | " - please report to linux390@de.ibm.com"); | ||
1960 | 1964 | ||
1961 | } | 1965 | } |
1962 | 1966 | ||
@@ -2026,15 +2030,14 @@ dasd_3990_erp_handle_sim(struct dasd_device *device, char *sense) | |||
2026 | { | 2030 | { |
2027 | /* print message according to log or message to operator mode */ | 2031 | /* print message according to log or message to operator mode */ |
2028 | if ((sense[24] & DASD_SIM_MSG_TO_OP) || (sense[1] & 0x10)) { | 2032 | if ((sense[24] & DASD_SIM_MSG_TO_OP) || (sense[1] & 0x10)) { |
2029 | |||
2030 | /* print SIM SRC from RefCode */ | 2033 | /* print SIM SRC from RefCode */ |
2031 | DEV_MESSAGE(KERN_ERR, device, "SIM - SRC: " | 2034 | dev_err(&device->cdev->dev, "SIM - SRC: " |
2032 | "%02x%02x%02x%02x", sense[22], | 2035 | "%02x%02x%02x%02x\n", sense[22], |
2033 | sense[23], sense[11], sense[12]); | 2036 | sense[23], sense[11], sense[12]); |
2034 | } else if (sense[24] & DASD_SIM_LOG) { | 2037 | } else if (sense[24] & DASD_SIM_LOG) { |
2035 | /* print SIM SRC Refcode */ | 2038 | /* print SIM SRC Refcode */ |
2036 | DEV_MESSAGE(KERN_WARNING, device, "SIM - SRC: " | 2039 | dev_warn(&device->cdev->dev, "log SIM - SRC: " |
2037 | "%02x%02x%02x%02x", sense[22], | 2040 | "%02x%02x%02x%02x\n", sense[22], |
2038 | sense[23], sense[11], sense[12]); | 2041 | sense[23], sense[11], sense[12]); |
2039 | } | 2042 | } |
2040 | } | 2043 | } |
@@ -2077,14 +2080,14 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2077 | switch (sense[25]) { | 2080 | switch (sense[25]) { |
2078 | 2081 | ||
2079 | case 0x00: /* success - use default ERP for retries */ | 2082 | case 0x00: /* success - use default ERP for retries */ |
2080 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 2083 | DBF_DEV_EVENT(DBF_DEBUG, device, "%s", |
2081 | "ERP called for successful request" | 2084 | "ERP called for successful request" |
2082 | " - just retry"); | 2085 | " - just retry"); |
2083 | break; | 2086 | break; |
2084 | 2087 | ||
2085 | case 0x01: /* fatal error */ | 2088 | case 0x01: /* fatal error */ |
2086 | DEV_MESSAGE(KERN_ERR, device, "%s", | 2089 | dev_err(&device->cdev->dev, |
2087 | "Retry not recommended - Fatal error"); | 2090 | "ERP failed for the DASD\n"); |
2088 | 2091 | ||
2089 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); | 2092 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); |
2090 | break; | 2093 | break; |
@@ -2094,13 +2097,10 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2094 | erp = dasd_3990_erp_int_req(erp); | 2097 | erp = dasd_3990_erp_int_req(erp); |
2095 | break; | 2098 | break; |
2096 | 2099 | ||
2097 | case 0x0F: /* length mismatch during update write command */ | 2100 | case 0x0F: /* length mismatch during update write command |
2098 | DEV_MESSAGE(KERN_ERR, device, "%s", | 2101 | internal error 08 - update write command error*/ |
2099 | "update write command error - should not " | 2102 | dev_err(&device->cdev->dev, "An error occurred in the " |
2100 | "happen;\n" | 2103 | "DASD device driver, reason=%s\n", "08"); |
2101 | "Please send this message together with " | ||
2102 | "the above sense data to linux390@de." | ||
2103 | "ibm.com"); | ||
2104 | 2104 | ||
2105 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); | 2105 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); |
2106 | break; | 2106 | break; |
@@ -2109,13 +2109,12 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2109 | erp = dasd_3990_erp_action_10_32(erp, sense); | 2109 | erp = dasd_3990_erp_action_10_32(erp, sense); |
2110 | break; | 2110 | break; |
2111 | 2111 | ||
2112 | case 0x15: /* next track outside defined extend */ | 2112 | case 0x15: /* next track outside defined extend |
2113 | DEV_MESSAGE(KERN_ERR, device, "%s", | 2113 | internal error 07 - The next track is not |
2114 | "next track outside defined extend - " | 2114 | within the defined storage extent */ |
2115 | "should not happen;\n" | 2115 | dev_err(&device->cdev->dev, |
2116 | "Please send this message together with " | 2116 | "An error occurred in the DASD device driver, " |
2117 | "the above sense data to linux390@de." | 2117 | "reason=%s\n", "07"); |
2118 | "ibm.com"); | ||
2119 | 2118 | ||
2120 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); | 2119 | erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); |
2121 | break; | 2120 | break; |
@@ -2126,9 +2125,9 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2126 | break; | 2125 | break; |
2127 | 2126 | ||
2128 | case 0x1C: /* invalid data */ | 2127 | case 0x1C: /* invalid data */ |
2129 | DEV_MESSAGE(KERN_EMERG, device, "%s", | 2128 | dev_emerg(&device->cdev->dev, |
2130 | "Data recovered during retry with PCI " | 2129 | "Data recovered during retry with PCI " |
2131 | "fetch mode active"); | 2130 | "fetch mode active\n"); |
2132 | 2131 | ||
2133 | /* not possible to handle this situation in Linux */ | 2132 | /* not possible to handle this situation in Linux */ |
2134 | panic | 2133 | panic |
@@ -2137,7 +2136,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2137 | break; | 2136 | break; |
2138 | 2137 | ||
2139 | case 0x1D: /* state-change pending */ | 2138 | case 0x1D: /* state-change pending */ |
2140 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 2139 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2141 | "A State change pending condition exists " | 2140 | "A State change pending condition exists " |
2142 | "for the subsystem or device"); | 2141 | "for the subsystem or device"); |
2143 | 2142 | ||
@@ -2145,7 +2144,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2145 | break; | 2144 | break; |
2146 | 2145 | ||
2147 | case 0x1E: /* busy */ | 2146 | case 0x1E: /* busy */ |
2148 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 2147 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2149 | "Busy condition exists " | 2148 | "Busy condition exists " |
2150 | "for the subsystem or device"); | 2149 | "for the subsystem or device"); |
2151 | erp = dasd_3990_erp_action_4(erp, sense); | 2150 | erp = dasd_3990_erp_action_4(erp, sense); |
@@ -2187,7 +2186,7 @@ dasd_3990_erp_control_check(struct dasd_ccw_req *erp) | |||
2187 | 2186 | ||
2188 | if (scsw_cstat(&erp->refers->irb.scsw) & (SCHN_STAT_INTF_CTRL_CHK | 2187 | if (scsw_cstat(&erp->refers->irb.scsw) & (SCHN_STAT_INTF_CTRL_CHK |
2189 | | SCHN_STAT_CHN_CTRL_CHK)) { | 2188 | | SCHN_STAT_CHN_CTRL_CHK)) { |
2190 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 2189 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2191 | "channel or interface control check"); | 2190 | "channel or interface control check"); |
2192 | erp = dasd_3990_erp_action_4(erp, NULL); | 2191 | erp = dasd_3990_erp_action_4(erp, NULL); |
2193 | } | 2192 | } |
@@ -2282,12 +2281,12 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) | |||
2282 | cplength, datasize, device); | 2281 | cplength, datasize, device); |
2283 | if (IS_ERR(erp)) { | 2282 | if (IS_ERR(erp)) { |
2284 | if (cqr->retries <= 0) { | 2283 | if (cqr->retries <= 0) { |
2285 | DEV_MESSAGE(KERN_ERR, device, "%s", | 2284 | DBF_DEV_EVENT(DBF_ERR, device, "%s", |
2286 | "Unable to allocate ERP request"); | 2285 | "Unable to allocate ERP request"); |
2287 | cqr->status = DASD_CQR_FAILED; | 2286 | cqr->status = DASD_CQR_FAILED; |
2288 | cqr->stopclk = get_clock (); | 2287 | cqr->stopclk = get_clock (); |
2289 | } else { | 2288 | } else { |
2290 | DEV_MESSAGE (KERN_ERR, device, | 2289 | DBF_DEV_EVENT(DBF_ERR, device, |
2291 | "Unable to allocate ERP request " | 2290 | "Unable to allocate ERP request " |
2292 | "(%i retries left)", | 2291 | "(%i retries left)", |
2293 | cqr->retries); | 2292 | cqr->retries); |
@@ -2516,7 +2515,7 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp) | |||
2516 | break; | 2515 | break; |
2517 | } | 2516 | } |
2518 | default: | 2517 | default: |
2519 | DEV_MESSAGE(KERN_DEBUG, device, | 2518 | DBF_DEV_EVENT(DBF_WARNING, device, |
2520 | "invalid subcommand modifier 0x%x " | 2519 | "invalid subcommand modifier 0x%x " |
2521 | "for Diagnostic Control Command", | 2520 | "for Diagnostic Control Command", |
2522 | sense[25]); | 2521 | sense[25]); |
@@ -2533,11 +2532,12 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp) | |||
2533 | erp = dasd_3990_erp_compound(erp, sense); | 2532 | erp = dasd_3990_erp_compound(erp, sense); |
2534 | 2533 | ||
2535 | } else { | 2534 | } else { |
2536 | /* No retry left and no additional special handling */ | 2535 | /* |
2537 | /*necessary */ | 2536 | * No retry left and no additional special handling |
2538 | DEV_MESSAGE(KERN_ERR, device, | 2537 | * necessary |
2539 | "no retries left for erp %p - " | 2538 | */ |
2540 | "set status to FAILED", erp); | 2539 | dev_err(&device->cdev->dev, |
2540 | "ERP %p has run out of retries and failed\n", erp); | ||
2541 | 2541 | ||
2542 | erp->status = DASD_CQR_FAILED; | 2542 | erp->status = DASD_CQR_FAILED; |
2543 | } | 2543 | } |
@@ -2612,7 +2612,7 @@ dasd_3990_erp_handle_match_erp(struct dasd_ccw_req *erp_head, | |||
2612 | 2612 | ||
2613 | } else { | 2613 | } else { |
2614 | /* simple retry */ | 2614 | /* simple retry */ |
2615 | DEV_MESSAGE(KERN_DEBUG, device, | 2615 | DBF_DEV_EVENT(DBF_DEBUG, device, |
2616 | "%i retries left for erp %p", | 2616 | "%i retries left for erp %p", |
2617 | erp->retries, erp); | 2617 | erp->retries, erp); |
2618 | 2618 | ||
@@ -2656,13 +2656,13 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) | |||
2656 | 2656 | ||
2657 | if (device->features & DASD_FEATURE_ERPLOG) { | 2657 | if (device->features & DASD_FEATURE_ERPLOG) { |
2658 | /* print current erp_chain */ | 2658 | /* print current erp_chain */ |
2659 | DEV_MESSAGE(KERN_ERR, device, "%s", | 2659 | dev_err(&device->cdev->dev, |
2660 | "ERP chain at BEGINNING of ERP-ACTION"); | 2660 | "ERP chain at BEGINNING of ERP-ACTION\n"); |
2661 | for (temp_erp = cqr; | 2661 | for (temp_erp = cqr; |
2662 | temp_erp != NULL; temp_erp = temp_erp->refers) { | 2662 | temp_erp != NULL; temp_erp = temp_erp->refers) { |
2663 | 2663 | ||
2664 | DEV_MESSAGE(KERN_ERR, device, | 2664 | dev_err(&device->cdev->dev, |
2665 | " erp %p (%02x) refers to %p", | 2665 | "ERP %p (%02x) refers to %p\n", |
2666 | temp_erp, temp_erp->status, | 2666 | temp_erp, temp_erp->status, |
2667 | temp_erp->refers); | 2667 | temp_erp->refers); |
2668 | } | 2668 | } |
@@ -2673,7 +2673,7 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) | |||
2673 | (scsw_dstat(&cqr->irb.scsw) == | 2673 | (scsw_dstat(&cqr->irb.scsw) == |
2674 | (DEV_STAT_CHN_END | DEV_STAT_DEV_END))) { | 2674 | (DEV_STAT_CHN_END | DEV_STAT_DEV_END))) { |
2675 | 2675 | ||
2676 | DEV_MESSAGE(KERN_DEBUG, device, | 2676 | DBF_DEV_EVENT(DBF_DEBUG, device, |
2677 | "ERP called for successful request %p" | 2677 | "ERP called for successful request %p" |
2678 | " - NO ERP necessary", cqr); | 2678 | " - NO ERP necessary", cqr); |
2679 | 2679 | ||
@@ -2695,13 +2695,13 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) | |||
2695 | 2695 | ||
2696 | if (device->features & DASD_FEATURE_ERPLOG) { | 2696 | if (device->features & DASD_FEATURE_ERPLOG) { |
2697 | /* print current erp_chain */ | 2697 | /* print current erp_chain */ |
2698 | DEV_MESSAGE(KERN_ERR, device, "%s", | 2698 | dev_err(&device->cdev->dev, |
2699 | "ERP chain at END of ERP-ACTION"); | 2699 | "ERP chain at END of ERP-ACTION\n"); |
2700 | for (temp_erp = erp; | 2700 | for (temp_erp = erp; |
2701 | temp_erp != NULL; temp_erp = temp_erp->refers) { | 2701 | temp_erp != NULL; temp_erp = temp_erp->refers) { |
2702 | 2702 | ||
2703 | DEV_MESSAGE(KERN_ERR, device, | 2703 | dev_err(&device->cdev->dev, |
2704 | " erp %p (%02x) refers to %p", | 2704 | "ERP %p (%02x) refers to %p\n", |
2705 | temp_erp, temp_erp->status, | 2705 | temp_erp, temp_erp->status, |
2706 | temp_erp->refers); | 2706 | temp_erp->refers); |
2707 | } | 2707 | } |
@@ -2714,6 +2714,8 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) | |||
2714 | list_add_tail(&erp->blocklist, &cqr->blocklist); | 2714 | list_add_tail(&erp->blocklist, &cqr->blocklist); |
2715 | } | 2715 | } |
2716 | 2716 | ||
2717 | |||
2718 | |||
2717 | return erp; | 2719 | return erp; |
2718 | 2720 | ||
2719 | } /* end dasd_3990_erp_action */ | 2721 | } /* end dasd_3990_erp_action */ |
diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c index 219bee7bd77c..5b7bbc87593b 100644 --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c | |||
@@ -5,6 +5,8 @@ | |||
5 | * Author(s): Stefan Weinhuber <wein@de.ibm.com> | 5 | * Author(s): Stefan Weinhuber <wein@de.ibm.com> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #define KMSG_COMPONENT "dasd" | ||
9 | |||
8 | #include <linux/list.h> | 10 | #include <linux/list.h> |
9 | #include <asm/ebcdic.h> | 11 | #include <asm/ebcdic.h> |
10 | #include "dasd_int.h" | 12 | #include "dasd_int.h" |
@@ -503,7 +505,7 @@ static void lcu_update_work(struct work_struct *work) | |||
503 | */ | 505 | */ |
504 | spin_lock_irqsave(&lcu->lock, flags); | 506 | spin_lock_irqsave(&lcu->lock, flags); |
505 | if (rc || (lcu->flags & NEED_UAC_UPDATE)) { | 507 | if (rc || (lcu->flags & NEED_UAC_UPDATE)) { |
506 | DEV_MESSAGE(KERN_WARNING, device, "could not update" | 508 | DBF_DEV_EVENT(DBF_WARNING, device, "could not update" |
507 | " alias data in lcu (rc = %d), retry later", rc); | 509 | " alias data in lcu (rc = %d), retry later", rc); |
508 | schedule_delayed_work(&lcu->ruac_data.dwork, 30*HZ); | 510 | schedule_delayed_work(&lcu->ruac_data.dwork, 30*HZ); |
509 | } else { | 511 | } else { |
@@ -875,7 +877,7 @@ void dasd_alias_handle_summary_unit_check(struct dasd_device *device, | |||
875 | 877 | ||
876 | lcu = private->lcu; | 878 | lcu = private->lcu; |
877 | if (!lcu) { | 879 | if (!lcu) { |
878 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 880 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
879 | "device not ready to handle summary" | 881 | "device not ready to handle summary" |
880 | " unit check (no lcu structure)"); | 882 | " unit check (no lcu structure)"); |
881 | return; | 883 | return; |
@@ -888,7 +890,7 @@ void dasd_alias_handle_summary_unit_check(struct dasd_device *device, | |||
888 | * the next interrupt on a different device | 890 | * the next interrupt on a different device |
889 | */ | 891 | */ |
890 | if (list_empty(&device->alias_list)) { | 892 | if (list_empty(&device->alias_list)) { |
891 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 893 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
892 | "device is in offline processing," | 894 | "device is in offline processing," |
893 | " don't do summary unit check handling"); | 895 | " don't do summary unit check handling"); |
894 | spin_unlock(&lcu->lock); | 896 | spin_unlock(&lcu->lock); |
@@ -896,7 +898,7 @@ void dasd_alias_handle_summary_unit_check(struct dasd_device *device, | |||
896 | } | 898 | } |
897 | if (lcu->suc_data.device) { | 899 | if (lcu->suc_data.device) { |
898 | /* already scheduled or running */ | 900 | /* already scheduled or running */ |
899 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 901 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
900 | "previous instance of summary unit check worker" | 902 | "previous instance of summary unit check worker" |
901 | " still pending"); | 903 | " still pending"); |
902 | spin_unlock(&lcu->lock); | 904 | spin_unlock(&lcu->lock); |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index da231a787cee..e77666c8e6c0 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -13,6 +13,8 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define KMSG_COMPONENT "dasd" | ||
17 | |||
16 | #include <linux/ctype.h> | 18 | #include <linux/ctype.h> |
17 | #include <linux/init.h> | 19 | #include <linux/init.h> |
18 | #include <linux/module.h> | 20 | #include <linux/module.h> |
@@ -127,6 +129,7 @@ __setup ("dasd=", dasd_call_setup); | |||
127 | * Read a device busid/devno from a string. | 129 | * Read a device busid/devno from a string. |
128 | */ | 130 | */ |
129 | static int | 131 | static int |
132 | |||
130 | dasd_busid(char **str, int *id0, int *id1, int *devno) | 133 | dasd_busid(char **str, int *id0, int *id1, int *devno) |
131 | { | 134 | { |
132 | int val, old_style; | 135 | int val, old_style; |
@@ -134,8 +137,7 @@ dasd_busid(char **str, int *id0, int *id1, int *devno) | |||
134 | /* Interpret ipldev busid */ | 137 | /* Interpret ipldev busid */ |
135 | if (strncmp(DASD_IPLDEV, *str, strlen(DASD_IPLDEV)) == 0) { | 138 | if (strncmp(DASD_IPLDEV, *str, strlen(DASD_IPLDEV)) == 0) { |
136 | if (ipl_info.type != IPL_TYPE_CCW) { | 139 | if (ipl_info.type != IPL_TYPE_CCW) { |
137 | MESSAGE(KERN_ERR, "%s", "ipl device is not a ccw " | 140 | pr_err("The IPL device is not a CCW device\n"); |
138 | "device"); | ||
139 | return -EINVAL; | 141 | return -EINVAL; |
140 | } | 142 | } |
141 | *id0 = 0; | 143 | *id0 = 0; |
@@ -211,9 +213,8 @@ dasd_feature_list(char *str, char **endp) | |||
211 | else if (len == 8 && !strncmp(str, "failfast", 8)) | 213 | else if (len == 8 && !strncmp(str, "failfast", 8)) |
212 | features |= DASD_FEATURE_FAILFAST; | 214 | features |= DASD_FEATURE_FAILFAST; |
213 | else { | 215 | else { |
214 | MESSAGE(KERN_WARNING, | 216 | pr_warning("%*s is not a supported device option\n", |
215 | "unsupported feature: %*s, " | 217 | len, str); |
216 | "ignoring setting", len, str); | ||
217 | rc = -EINVAL; | 218 | rc = -EINVAL; |
218 | } | 219 | } |
219 | str += len; | 220 | str += len; |
@@ -222,8 +223,8 @@ dasd_feature_list(char *str, char **endp) | |||
222 | str++; | 223 | str++; |
223 | } | 224 | } |
224 | if (*str != ')') { | 225 | if (*str != ')') { |
225 | MESSAGE(KERN_WARNING, "%s", | 226 | pr_warning("A closing parenthesis ')' is missing in the " |
226 | "missing ')' in dasd parameter string\n"); | 227 | "dasd= parameter\n"); |
227 | rc = -EINVAL; | 228 | rc = -EINVAL; |
228 | } else | 229 | } else |
229 | str++; | 230 | str++; |
@@ -255,28 +256,27 @@ dasd_parse_keyword( char *parsestring ) { | |||
255 | } | 256 | } |
256 | if (strncmp("autodetect", parsestring, length) == 0) { | 257 | if (strncmp("autodetect", parsestring, length) == 0) { |
257 | dasd_autodetect = 1; | 258 | dasd_autodetect = 1; |
258 | MESSAGE (KERN_INFO, "%s", | 259 | pr_info("The autodetection mode has been activated\n"); |
259 | "turning to autodetection mode"); | ||
260 | return residual_str; | 260 | return residual_str; |
261 | } | 261 | } |
262 | if (strncmp("probeonly", parsestring, length) == 0) { | 262 | if (strncmp("probeonly", parsestring, length) == 0) { |
263 | dasd_probeonly = 1; | 263 | dasd_probeonly = 1; |
264 | MESSAGE(KERN_INFO, "%s", | 264 | pr_info("The probeonly mode has been activated\n"); |
265 | "turning to probeonly mode"); | ||
266 | return residual_str; | 265 | return residual_str; |
267 | } | 266 | } |
268 | if (strncmp("nopav", parsestring, length) == 0) { | 267 | if (strncmp("nopav", parsestring, length) == 0) { |
269 | if (MACHINE_IS_VM) | 268 | if (MACHINE_IS_VM) |
270 | MESSAGE(KERN_INFO, "%s", "'nopav' not supported on VM"); | 269 | pr_info("'nopav' is not supported on z/VM\n"); |
271 | else { | 270 | else { |
272 | dasd_nopav = 1; | 271 | dasd_nopav = 1; |
273 | MESSAGE(KERN_INFO, "%s", "disable PAV mode"); | 272 | pr_info("PAV support has be deactivated\n"); |
274 | } | 273 | } |
275 | return residual_str; | 274 | return residual_str; |
276 | } | 275 | } |
277 | if (strncmp("nofcx", parsestring, length) == 0) { | 276 | if (strncmp("nofcx", parsestring, length) == 0) { |
278 | dasd_nofcx = 1; | 277 | dasd_nofcx = 1; |
279 | MESSAGE(KERN_INFO, "%s", "disable High Performance Ficon"); | 278 | pr_info("High Performance FICON support has been " |
279 | "deactivated\n"); | ||
280 | return residual_str; | 280 | return residual_str; |
281 | } | 281 | } |
282 | if (strncmp("fixedbuffers", parsestring, length) == 0) { | 282 | if (strncmp("fixedbuffers", parsestring, length) == 0) { |
@@ -287,10 +287,10 @@ dasd_parse_keyword( char *parsestring ) { | |||
287 | PAGE_SIZE, SLAB_CACHE_DMA, | 287 | PAGE_SIZE, SLAB_CACHE_DMA, |
288 | NULL); | 288 | NULL); |
289 | if (!dasd_page_cache) | 289 | if (!dasd_page_cache) |
290 | MESSAGE(KERN_WARNING, "%s", "Failed to create slab, " | 290 | DBF_EVENT(DBF_WARNING, "%s", "Failed to create slab, " |
291 | "fixed buffer mode disabled."); | 291 | "fixed buffer mode disabled."); |
292 | else | 292 | else |
293 | MESSAGE (KERN_INFO, "%s", | 293 | DBF_EVENT(DBF_INFO, "%s", |
294 | "turning on fixed buffer mode"); | 294 | "turning on fixed buffer mode"); |
295 | return residual_str; | 295 | return residual_str; |
296 | } | 296 | } |
@@ -328,7 +328,7 @@ dasd_parse_range( char *parsestring ) { | |||
328 | (from_id0 != to_id0 || from_id1 != to_id1 || from > to)) | 328 | (from_id0 != to_id0 || from_id1 != to_id1 || from > to)) |
329 | rc = -EINVAL; | 329 | rc = -EINVAL; |
330 | if (rc) { | 330 | if (rc) { |
331 | MESSAGE(KERN_ERR, "Invalid device range %s", parsestring); | 331 | pr_err("%s is not a valid device range\n", parsestring); |
332 | return ERR_PTR(rc); | 332 | return ERR_PTR(rc); |
333 | } | 333 | } |
334 | features = dasd_feature_list(str, &str); | 334 | features = dasd_feature_list(str, &str); |
@@ -347,8 +347,8 @@ dasd_parse_range( char *parsestring ) { | |||
347 | return str + 1; | 347 | return str + 1; |
348 | if (*str == '\0') | 348 | if (*str == '\0') |
349 | return str; | 349 | return str; |
350 | MESSAGE(KERN_WARNING, | 350 | pr_warning("The dasd= parameter value %s has an invalid ending\n", |
351 | "junk at end of dasd parameter string: %s\n", str); | 351 | str); |
352 | return ERR_PTR(-EINVAL); | 352 | return ERR_PTR(-EINVAL); |
353 | } | 353 | } |
354 | 354 | ||
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index ef2a56952054..b9a7f7733446 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define KMSG_COMPONENT "dasd" | ||
12 | |||
11 | #include <linux/stddef.h> | 13 | #include <linux/stddef.h> |
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
@@ -144,8 +146,8 @@ dasd_diag_erp(struct dasd_device *device) | |||
144 | mdsk_term_io(device); | 146 | mdsk_term_io(device); |
145 | rc = mdsk_init_io(device, device->block->bp_block, 0, NULL); | 147 | rc = mdsk_init_io(device, device->block->bp_block, 0, NULL); |
146 | if (rc) | 148 | if (rc) |
147 | DEV_MESSAGE(KERN_WARNING, device, "DIAG ERP unsuccessful, " | 149 | dev_warn(&device->cdev->dev, "DIAG ERP failed with " |
148 | "rc=%d", rc); | 150 | "rc=%d\n", rc); |
149 | } | 151 | } |
150 | 152 | ||
151 | /* Start a given request at the device. Return zero on success, non-zero | 153 | /* Start a given request at the device. Return zero on success, non-zero |
@@ -160,7 +162,7 @@ dasd_start_diag(struct dasd_ccw_req * cqr) | |||
160 | 162 | ||
161 | device = cqr->startdev; | 163 | device = cqr->startdev; |
162 | if (cqr->retries < 0) { | 164 | if (cqr->retries < 0) { |
163 | DEV_MESSAGE(KERN_WARNING, device, "DIAG start_IO: request %p " | 165 | DBF_DEV_EVENT(DBF_ERR, device, "DIAG start_IO: request %p " |
164 | "- no retry left)", cqr); | 166 | "- no retry left)", cqr); |
165 | cqr->status = DASD_CQR_ERROR; | 167 | cqr->status = DASD_CQR_ERROR; |
166 | return -EIO; | 168 | return -EIO; |
@@ -195,7 +197,7 @@ dasd_start_diag(struct dasd_ccw_req * cqr) | |||
195 | break; | 197 | break; |
196 | default: /* Error condition */ | 198 | default: /* Error condition */ |
197 | cqr->status = DASD_CQR_QUEUED; | 199 | cqr->status = DASD_CQR_QUEUED; |
198 | DEV_MESSAGE(KERN_WARNING, device, "dia250 returned rc=%d", rc); | 200 | DBF_DEV_EVENT(DBF_WARNING, device, "dia250 returned rc=%d", rc); |
199 | dasd_diag_erp(device); | 201 | dasd_diag_erp(device); |
200 | rc = -EIO; | 202 | rc = -EIO; |
201 | break; | 203 | break; |
@@ -243,13 +245,14 @@ dasd_ext_handler(__u16 code) | |||
243 | return; | 245 | return; |
244 | } | 246 | } |
245 | if (!ip) { /* no intparm: unsolicited interrupt */ | 247 | if (!ip) { /* no intparm: unsolicited interrupt */ |
246 | MESSAGE(KERN_DEBUG, "%s", "caught unsolicited interrupt"); | 248 | DBF_EVENT(DBF_NOTICE, "%s", "caught unsolicited " |
249 | "interrupt"); | ||
247 | return; | 250 | return; |
248 | } | 251 | } |
249 | cqr = (struct dasd_ccw_req *) ip; | 252 | cqr = (struct dasd_ccw_req *) ip; |
250 | device = (struct dasd_device *) cqr->startdev; | 253 | device = (struct dasd_device *) cqr->startdev; |
251 | if (strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) { | 254 | if (strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) { |
252 | DEV_MESSAGE(KERN_WARNING, device, | 255 | DBF_DEV_EVENT(DBF_WARNING, device, |
253 | " magic number of dasd_ccw_req 0x%08X doesn't" | 256 | " magic number of dasd_ccw_req 0x%08X doesn't" |
254 | " match discipline 0x%08X", | 257 | " match discipline 0x%08X", |
255 | cqr->magic, *(int *) (&device->discipline->name)); | 258 | cqr->magic, *(int *) (&device->discipline->name)); |
@@ -281,15 +284,11 @@ dasd_ext_handler(__u16 code) | |||
281 | rc = dasd_start_diag(next); | 284 | rc = dasd_start_diag(next); |
282 | if (rc == 0) | 285 | if (rc == 0) |
283 | expires = next->expires; | 286 | expires = next->expires; |
284 | else if (rc != -EACCES) | ||
285 | DEV_MESSAGE(KERN_WARNING, device, "%s", | ||
286 | "Interrupt fastpath " | ||
287 | "failed!"); | ||
288 | } | 287 | } |
289 | } | 288 | } |
290 | } else { | 289 | } else { |
291 | cqr->status = DASD_CQR_QUEUED; | 290 | cqr->status = DASD_CQR_QUEUED; |
292 | DEV_MESSAGE(KERN_WARNING, device, "interrupt status for " | 291 | DBF_DEV_EVENT(DBF_DEBUG, device, "interrupt status for " |
293 | "request %p was %d (%d retries left)", cqr, status, | 292 | "request %p was %d (%d retries left)", cqr, status, |
294 | cqr->retries); | 293 | cqr->retries); |
295 | dasd_diag_erp(device); | 294 | dasd_diag_erp(device); |
@@ -322,8 +321,9 @@ dasd_diag_check_device(struct dasd_device *device) | |||
322 | if (private == NULL) { | 321 | if (private == NULL) { |
323 | private = kzalloc(sizeof(struct dasd_diag_private),GFP_KERNEL); | 322 | private = kzalloc(sizeof(struct dasd_diag_private),GFP_KERNEL); |
324 | if (private == NULL) { | 323 | if (private == NULL) { |
325 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 324 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
326 | "memory allocation failed for private data"); | 325 | "Allocating memory for private DASD data " |
326 | "failed\n"); | ||
327 | return -ENOMEM; | 327 | return -ENOMEM; |
328 | } | 328 | } |
329 | ccw_device_get_id(device->cdev, &private->dev_id); | 329 | ccw_device_get_id(device->cdev, &private->dev_id); |
@@ -331,7 +331,7 @@ dasd_diag_check_device(struct dasd_device *device) | |||
331 | } | 331 | } |
332 | block = dasd_alloc_block(); | 332 | block = dasd_alloc_block(); |
333 | if (IS_ERR(block)) { | 333 | if (IS_ERR(block)) { |
334 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 334 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
335 | "could not allocate dasd block structure"); | 335 | "could not allocate dasd block structure"); |
336 | device->private = NULL; | 336 | device->private = NULL; |
337 | kfree(private); | 337 | kfree(private); |
@@ -347,7 +347,7 @@ dasd_diag_check_device(struct dasd_device *device) | |||
347 | 347 | ||
348 | rc = diag210((struct diag210 *) rdc_data); | 348 | rc = diag210((struct diag210 *) rdc_data); |
349 | if (rc) { | 349 | if (rc) { |
350 | DEV_MESSAGE(KERN_WARNING, device, "failed to retrieve device " | 350 | DBF_DEV_EVENT(DBF_WARNING, device, "failed to retrieve device " |
351 | "information (rc=%d)", rc); | 351 | "information (rc=%d)", rc); |
352 | rc = -EOPNOTSUPP; | 352 | rc = -EOPNOTSUPP; |
353 | goto out; | 353 | goto out; |
@@ -362,8 +362,8 @@ dasd_diag_check_device(struct dasd_device *device) | |||
362 | private->pt_block = 2; | 362 | private->pt_block = 2; |
363 | break; | 363 | break; |
364 | default: | 364 | default: |
365 | DEV_MESSAGE(KERN_WARNING, device, "unsupported device class " | 365 | dev_warn(&device->cdev->dev, "Device type %d is not supported " |
366 | "(class=%d)", private->rdc_data.vdev_class); | 366 | "in DIAG mode\n", private->rdc_data.vdev_class); |
367 | rc = -EOPNOTSUPP; | 367 | rc = -EOPNOTSUPP; |
368 | goto out; | 368 | goto out; |
369 | } | 369 | } |
@@ -380,7 +380,7 @@ dasd_diag_check_device(struct dasd_device *device) | |||
380 | /* figure out blocksize of device */ | 380 | /* figure out blocksize of device */ |
381 | label = (struct vtoc_cms_label *) get_zeroed_page(GFP_KERNEL); | 381 | label = (struct vtoc_cms_label *) get_zeroed_page(GFP_KERNEL); |
382 | if (label == NULL) { | 382 | if (label == NULL) { |
383 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 383 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
384 | "No memory to allocate initialization request"); | 384 | "No memory to allocate initialization request"); |
385 | rc = -ENOMEM; | 385 | rc = -ENOMEM; |
386 | goto out; | 386 | goto out; |
@@ -404,8 +404,8 @@ dasd_diag_check_device(struct dasd_device *device) | |||
404 | private->iob.flaga = DASD_DIAG_FLAGA_DEFAULT; | 404 | private->iob.flaga = DASD_DIAG_FLAGA_DEFAULT; |
405 | rc = dia250(&private->iob, RW_BIO); | 405 | rc = dia250(&private->iob, RW_BIO); |
406 | if (rc == 3) { | 406 | if (rc == 3) { |
407 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 407 | dev_warn(&device->cdev->dev, |
408 | "DIAG call failed"); | 408 | "A 64-bit DIAG call failed\n"); |
409 | rc = -EOPNOTSUPP; | 409 | rc = -EOPNOTSUPP; |
410 | goto out_label; | 410 | goto out_label; |
411 | } | 411 | } |
@@ -414,8 +414,8 @@ dasd_diag_check_device(struct dasd_device *device) | |||
414 | break; | 414 | break; |
415 | } | 415 | } |
416 | if (bsize > PAGE_SIZE) { | 416 | if (bsize > PAGE_SIZE) { |
417 | DEV_MESSAGE(KERN_WARNING, device, "device access failed " | 417 | dev_warn(&device->cdev->dev, "Accessing the DASD failed because" |
418 | "(rc=%d)", rc); | 418 | " of an incorrect format (rc=%d)\n", rc); |
419 | rc = -EIO; | 419 | rc = -EIO; |
420 | goto out_label; | 420 | goto out_label; |
421 | } | 421 | } |
@@ -433,15 +433,15 @@ dasd_diag_check_device(struct dasd_device *device) | |||
433 | block->s2b_shift++; | 433 | block->s2b_shift++; |
434 | rc = mdsk_init_io(device, block->bp_block, 0, NULL); | 434 | rc = mdsk_init_io(device, block->bp_block, 0, NULL); |
435 | if (rc) { | 435 | if (rc) { |
436 | DEV_MESSAGE(KERN_WARNING, device, "DIAG initialization " | 436 | dev_warn(&device->cdev->dev, "DIAG initialization " |
437 | "failed (rc=%d)", rc); | 437 | "failed with rc=%d\n", rc); |
438 | rc = -EIO; | 438 | rc = -EIO; |
439 | } else { | 439 | } else { |
440 | DEV_MESSAGE(KERN_INFO, device, | 440 | dev_info(&device->cdev->dev, |
441 | "(%ld B/blk): %ldkB", | 441 | "New DASD with %ld byte/block, total size %ld KB\n", |
442 | (unsigned long) block->bp_block, | 442 | (unsigned long) block->bp_block, |
443 | (unsigned long) (block->blocks << | 443 | (unsigned long) (block->blocks << |
444 | block->s2b_shift) >> 1); | 444 | block->s2b_shift) >> 1); |
445 | } | 445 | } |
446 | out_label: | 446 | out_label: |
447 | free_page((long) label); | 447 | free_page((long) label); |
@@ -595,7 +595,7 @@ static void | |||
595 | dasd_diag_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | 595 | dasd_diag_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, |
596 | struct irb *stat) | 596 | struct irb *stat) |
597 | { | 597 | { |
598 | DEV_MESSAGE(KERN_ERR, device, "%s", | 598 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
599 | "dump sense not available for DIAG data"); | 599 | "dump sense not available for DIAG data"); |
600 | } | 600 | } |
601 | 601 | ||
@@ -621,10 +621,8 @@ static int __init | |||
621 | dasd_diag_init(void) | 621 | dasd_diag_init(void) |
622 | { | 622 | { |
623 | if (!MACHINE_IS_VM) { | 623 | if (!MACHINE_IS_VM) { |
624 | MESSAGE_LOG(KERN_INFO, | 624 | pr_info("Discipline %s cannot be used without z/VM\n", |
625 | "Machine is not VM: %s " | 625 | dasd_diag_discipline.name); |
626 | "discipline not initializing", | ||
627 | dasd_diag_discipline.name); | ||
628 | return -ENODEV; | 626 | return -ENODEV; |
629 | } | 627 | } |
630 | ASCEBC(dasd_diag_discipline.ebcname, 4); | 628 | ASCEBC(dasd_diag_discipline.ebcname, 4); |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 1e4c89b8b304..21254793c604 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define KMSG_COMPONENT "dasd" | ||
15 | |||
14 | #include <linux/stddef.h> | 16 | #include <linux/stddef.h> |
15 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
16 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
@@ -87,7 +89,7 @@ dasd_eckd_probe (struct ccw_device *cdev) | |||
87 | /* set ECKD specific ccw-device options */ | 89 | /* set ECKD specific ccw-device options */ |
88 | ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE); | 90 | ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE); |
89 | if (ret) { | 91 | if (ret) { |
90 | printk(KERN_WARNING | 92 | DBF_EVENT(DBF_WARNING, |
91 | "dasd_eckd_probe: could not set ccw-device options " | 93 | "dasd_eckd_probe: could not set ccw-device options " |
92 | "for %s\n", dev_name(&cdev->dev)); | 94 | "for %s\n", dev_name(&cdev->dev)); |
93 | return ret; | 95 | return ret; |
@@ -248,8 +250,8 @@ define_extent(struct ccw1 *ccw, struct DE_eckd_data *data, unsigned int trk, | |||
248 | rc = check_XRC (ccw, data, device); | 250 | rc = check_XRC (ccw, data, device); |
249 | break; | 251 | break; |
250 | default: | 252 | default: |
251 | DBF_DEV_EVENT(DBF_ERR, device, | 253 | dev_err(&device->cdev->dev, |
252 | "PFX LRE unknown opcode 0x%x", cmd); | 254 | "0x%x is not a known command\n", cmd); |
253 | break; | 255 | break; |
254 | } | 256 | } |
255 | 257 | ||
@@ -647,7 +649,8 @@ locate_record(struct ccw1 *ccw, struct LO_eckd_data *data, unsigned int trk, | |||
647 | data->operation.operation = 0x0b; | 649 | data->operation.operation = 0x0b; |
648 | break; | 650 | break; |
649 | default: | 651 | default: |
650 | DEV_MESSAGE(KERN_ERR, device, "unknown opcode 0x%x", cmd); | 652 | DBF_DEV_EVENT(DBF_ERR, device, "unknown locate record " |
653 | "opcode 0x%x", cmd); | ||
651 | } | 654 | } |
652 | set_ch_t(&data->seek_addr, | 655 | set_ch_t(&data->seek_addr, |
653 | trk / private->rdc_data.trk_per_cyl, | 656 | trk / private->rdc_data.trk_per_cyl, |
@@ -742,8 +745,8 @@ static struct dasd_ccw_req *dasd_eckd_build_rcd_lpm(struct dasd_device *device, | |||
742 | cqr = dasd_smalloc_request("ECKD", 1 /* RCD */, ciw->count, device); | 745 | cqr = dasd_smalloc_request("ECKD", 1 /* RCD */, ciw->count, device); |
743 | 746 | ||
744 | if (IS_ERR(cqr)) { | 747 | if (IS_ERR(cqr)) { |
745 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 748 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
746 | "Could not allocate RCD request"); | 749 | "Could not allocate RCD request"); |
747 | return cqr; | 750 | return cqr; |
748 | } | 751 | } |
749 | 752 | ||
@@ -893,14 +896,16 @@ static int dasd_eckd_read_conf(struct dasd_device *device) | |||
893 | rc = dasd_eckd_read_conf_lpm(device, &conf_data, | 896 | rc = dasd_eckd_read_conf_lpm(device, &conf_data, |
894 | &conf_len, lpm); | 897 | &conf_len, lpm); |
895 | if (rc && rc != -EOPNOTSUPP) { /* -EOPNOTSUPP is ok */ | 898 | if (rc && rc != -EOPNOTSUPP) { /* -EOPNOTSUPP is ok */ |
896 | MESSAGE(KERN_WARNING, | 899 | DBF_EVENT(DBF_WARNING, |
897 | "Read configuration data returned " | 900 | "Read configuration data returned " |
898 | "error %d", rc); | 901 | "error %d for device: %s", rc, |
902 | dev_name(&device->cdev->dev)); | ||
899 | return rc; | 903 | return rc; |
900 | } | 904 | } |
901 | if (conf_data == NULL) { | 905 | if (conf_data == NULL) { |
902 | MESSAGE(KERN_WARNING, "%s", "No configuration " | 906 | DBF_EVENT(DBF_WARNING, "No configuration " |
903 | "data retrieved"); | 907 | "data retrieved for device: %s", |
908 | dev_name(&device->cdev->dev)); | ||
904 | continue; /* no error */ | 909 | continue; /* no error */ |
905 | } | 910 | } |
906 | /* save first valid configuration data */ | 911 | /* save first valid configuration data */ |
@@ -947,8 +952,9 @@ static int dasd_eckd_read_features(struct dasd_device *device) | |||
947 | sizeof(struct dasd_rssd_features)), | 952 | sizeof(struct dasd_rssd_features)), |
948 | device); | 953 | device); |
949 | if (IS_ERR(cqr)) { | 954 | if (IS_ERR(cqr)) { |
950 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 955 | DBF_EVENT(DBF_WARNING, "Could not allocate initialization " |
951 | "Could not allocate initialization request"); | 956 | "request for device: %s", |
957 | dev_name(&device->cdev->dev)); | ||
952 | return PTR_ERR(cqr); | 958 | return PTR_ERR(cqr); |
953 | } | 959 | } |
954 | cqr->startdev = device; | 960 | cqr->startdev = device; |
@@ -1009,7 +1015,7 @@ static struct dasd_ccw_req *dasd_eckd_build_psf_ssc(struct dasd_device *device, | |||
1009 | device); | 1015 | device); |
1010 | 1016 | ||
1011 | if (IS_ERR(cqr)) { | 1017 | if (IS_ERR(cqr)) { |
1012 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 1018 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
1013 | "Could not allocate PSF-SSC request"); | 1019 | "Could not allocate PSF-SSC request"); |
1014 | return cqr; | 1020 | return cqr; |
1015 | } | 1021 | } |
@@ -1074,10 +1080,10 @@ static int dasd_eckd_validate_server(struct dasd_device *device) | |||
1074 | /* may be requested feature is not available on server, | 1080 | /* may be requested feature is not available on server, |
1075 | * therefore just report error and go ahead */ | 1081 | * therefore just report error and go ahead */ |
1076 | private = (struct dasd_eckd_private *) device->private; | 1082 | private = (struct dasd_eckd_private *) device->private; |
1077 | DEV_MESSAGE(KERN_INFO, device, | 1083 | DBF_EVENT(DBF_WARNING, "PSF-SSC on storage subsystem %s.%s.%04x " |
1078 | "PSF-SSC on storage subsystem %s.%s.%04x returned rc=%d", | 1084 | "returned rc=%d for device: %s", |
1079 | private->uid.vendor, private->uid.serial, | 1085 | private->uid.vendor, private->uid.serial, |
1080 | private->uid.ssid, rc); | 1086 | private->uid.ssid, rc, dev_name(&device->cdev->dev)); |
1081 | /* RE-Read Configuration Data */ | 1087 | /* RE-Read Configuration Data */ |
1082 | return dasd_eckd_read_conf(device); | 1088 | return dasd_eckd_read_conf(device); |
1083 | } | 1089 | } |
@@ -1099,9 +1105,9 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
1099 | private = kzalloc(sizeof(struct dasd_eckd_private), | 1105 | private = kzalloc(sizeof(struct dasd_eckd_private), |
1100 | GFP_KERNEL | GFP_DMA); | 1106 | GFP_KERNEL | GFP_DMA); |
1101 | if (private == NULL) { | 1107 | if (private == NULL) { |
1102 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 1108 | dev_warn(&device->cdev->dev, |
1103 | "memory allocation failed for private " | 1109 | "Allocating memory for private DASD data " |
1104 | "data"); | 1110 | "failed\n"); |
1105 | return -ENOMEM; | 1111 | return -ENOMEM; |
1106 | } | 1112 | } |
1107 | device->private = (void *) private; | 1113 | device->private = (void *) private; |
@@ -1126,8 +1132,9 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
1126 | if (private->uid.type == UA_BASE_DEVICE) { | 1132 | if (private->uid.type == UA_BASE_DEVICE) { |
1127 | block = dasd_alloc_block(); | 1133 | block = dasd_alloc_block(); |
1128 | if (IS_ERR(block)) { | 1134 | if (IS_ERR(block)) { |
1129 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 1135 | DBF_EVENT(DBF_WARNING, "could not allocate dasd " |
1130 | "could not allocate dasd block structure"); | 1136 | "block structure for device: %s", |
1137 | dev_name(&device->cdev->dev)); | ||
1131 | rc = PTR_ERR(block); | 1138 | rc = PTR_ERR(block); |
1132 | goto out_err1; | 1139 | goto out_err1; |
1133 | } | 1140 | } |
@@ -1158,9 +1165,9 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
1158 | memset(rdc_data, 0, sizeof(rdc_data)); | 1165 | memset(rdc_data, 0, sizeof(rdc_data)); |
1159 | rc = dasd_generic_read_dev_chars(device, "ECKD", &rdc_data, 64); | 1166 | rc = dasd_generic_read_dev_chars(device, "ECKD", &rdc_data, 64); |
1160 | if (rc) { | 1167 | if (rc) { |
1161 | DEV_MESSAGE(KERN_WARNING, device, | 1168 | DBF_EVENT(DBF_WARNING, |
1162 | "Read device characteristics returned " | 1169 | "Read device characteristics failed, rc=%d for " |
1163 | "rc=%d", rc); | 1170 | "device: %s", rc, dev_name(&device->cdev->dev)); |
1164 | goto out_err3; | 1171 | goto out_err3; |
1165 | } | 1172 | } |
1166 | /* find the vaild cylinder size */ | 1173 | /* find the vaild cylinder size */ |
@@ -1170,15 +1177,15 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
1170 | else | 1177 | else |
1171 | private->real_cyl = private->rdc_data.no_cyl; | 1178 | private->real_cyl = private->rdc_data.no_cyl; |
1172 | 1179 | ||
1173 | DEV_MESSAGE(KERN_INFO, device, | 1180 | dev_info(&device->cdev->dev, "New DASD %04X/%02X (CU %04X/%02X) " |
1174 | "%04X/%02X(CU:%04X/%02X) Cyl:%d Head:%d Sec:%d", | 1181 | "with %d cylinders, %d heads, %d sectors\n", |
1175 | private->rdc_data.dev_type, | 1182 | private->rdc_data.dev_type, |
1176 | private->rdc_data.dev_model, | 1183 | private->rdc_data.dev_model, |
1177 | private->rdc_data.cu_type, | 1184 | private->rdc_data.cu_type, |
1178 | private->rdc_data.cu_model.model, | 1185 | private->rdc_data.cu_model.model, |
1179 | private->real_cyl, | 1186 | private->real_cyl, |
1180 | private->rdc_data.trk_per_cyl, | 1187 | private->rdc_data.trk_per_cyl, |
1181 | private->rdc_data.sec_per_trk); | 1188 | private->rdc_data.sec_per_trk); |
1182 | return 0; | 1189 | return 0; |
1183 | 1190 | ||
1184 | out_err3: | 1191 | out_err3: |
@@ -1319,8 +1326,8 @@ dasd_eckd_end_analysis(struct dasd_block *block) | |||
1319 | status = private->init_cqr_status; | 1326 | status = private->init_cqr_status; |
1320 | private->init_cqr_status = -1; | 1327 | private->init_cqr_status = -1; |
1321 | if (status != DASD_CQR_DONE) { | 1328 | if (status != DASD_CQR_DONE) { |
1322 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 1329 | dev_warn(&device->cdev->dev, |
1323 | "volume analysis returned unformatted disk"); | 1330 | "The DASD is not formatted\n"); |
1324 | return -EMEDIUMTYPE; | 1331 | return -EMEDIUMTYPE; |
1325 | } | 1332 | } |
1326 | 1333 | ||
@@ -1348,8 +1355,8 @@ dasd_eckd_end_analysis(struct dasd_block *block) | |||
1348 | count_area = &private->count_area[0]; | 1355 | count_area = &private->count_area[0]; |
1349 | } else { | 1356 | } else { |
1350 | if (private->count_area[3].record == 1) | 1357 | if (private->count_area[3].record == 1) |
1351 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 1358 | dev_warn(&device->cdev->dev, |
1352 | "Trk 0: no records after VTOC!"); | 1359 | "Track 0 has no records following the VTOC\n"); |
1353 | } | 1360 | } |
1354 | if (count_area != NULL && count_area->kl == 0) { | 1361 | if (count_area != NULL && count_area->kl == 0) { |
1355 | /* we found notthing violating our disk layout */ | 1362 | /* we found notthing violating our disk layout */ |
@@ -1357,8 +1364,8 @@ dasd_eckd_end_analysis(struct dasd_block *block) | |||
1357 | block->bp_block = count_area->dl; | 1364 | block->bp_block = count_area->dl; |
1358 | } | 1365 | } |
1359 | if (block->bp_block == 0) { | 1366 | if (block->bp_block == 0) { |
1360 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 1367 | dev_warn(&device->cdev->dev, |
1361 | "Volume has incompatible disk layout"); | 1368 | "The disk layout of the DASD is not supported\n"); |
1362 | return -EMEDIUMTYPE; | 1369 | return -EMEDIUMTYPE; |
1363 | } | 1370 | } |
1364 | block->s2b_shift = 0; /* bits to shift 512 to get a block */ | 1371 | block->s2b_shift = 0; /* bits to shift 512 to get a block */ |
@@ -1370,15 +1377,15 @@ dasd_eckd_end_analysis(struct dasd_block *block) | |||
1370 | private->rdc_data.trk_per_cyl * | 1377 | private->rdc_data.trk_per_cyl * |
1371 | blk_per_trk); | 1378 | blk_per_trk); |
1372 | 1379 | ||
1373 | DEV_MESSAGE(KERN_INFO, device, | 1380 | dev_info(&device->cdev->dev, |
1374 | "(%dkB blks): %dkB at %dkB/trk %s", | 1381 | "DASD with %d KB/block, %d KB total size, %d KB/track, " |
1375 | (block->bp_block >> 10), | 1382 | "%s\n", (block->bp_block >> 10), |
1376 | ((private->real_cyl * | 1383 | ((private->real_cyl * |
1377 | private->rdc_data.trk_per_cyl * | 1384 | private->rdc_data.trk_per_cyl * |
1378 | blk_per_trk * (block->bp_block >> 9)) >> 1), | 1385 | blk_per_trk * (block->bp_block >> 9)) >> 1), |
1379 | ((blk_per_trk * block->bp_block) >> 10), | 1386 | ((blk_per_trk * block->bp_block) >> 10), |
1380 | private->uses_cdl ? | 1387 | private->uses_cdl ? |
1381 | "compatible disk layout" : "linux disk layout"); | 1388 | "compatible disk layout" : "linux disk layout"); |
1382 | 1389 | ||
1383 | return 0; | 1390 | return 0; |
1384 | } | 1391 | } |
@@ -1444,19 +1451,19 @@ dasd_eckd_format_device(struct dasd_device * device, | |||
1444 | /* Sanity checks. */ | 1451 | /* Sanity checks. */ |
1445 | if (fdata->start_unit >= | 1452 | if (fdata->start_unit >= |
1446 | (private->real_cyl * private->rdc_data.trk_per_cyl)) { | 1453 | (private->real_cyl * private->rdc_data.trk_per_cyl)) { |
1447 | DEV_MESSAGE(KERN_INFO, device, "Track no %u too big!", | 1454 | dev_warn(&device->cdev->dev, "Start track number %d used in " |
1448 | fdata->start_unit); | 1455 | "formatting is too big\n", fdata->start_unit); |
1449 | return ERR_PTR(-EINVAL); | 1456 | return ERR_PTR(-EINVAL); |
1450 | } | 1457 | } |
1451 | if (fdata->start_unit > fdata->stop_unit) { | 1458 | if (fdata->start_unit > fdata->stop_unit) { |
1452 | DEV_MESSAGE(KERN_INFO, device, "Track %u reached! ending.", | 1459 | dev_warn(&device->cdev->dev, "Start track %d used in " |
1453 | fdata->start_unit); | 1460 | "formatting exceeds end track\n", fdata->start_unit); |
1454 | return ERR_PTR(-EINVAL); | 1461 | return ERR_PTR(-EINVAL); |
1455 | } | 1462 | } |
1456 | if (dasd_check_blocksize(fdata->blksize) != 0) { | 1463 | if (dasd_check_blocksize(fdata->blksize) != 0) { |
1457 | DEV_MESSAGE(KERN_WARNING, device, | 1464 | dev_warn(&device->cdev->dev, |
1458 | "Invalid blocksize %u...terminating!", | 1465 | "The DASD cannot be formatted with block size %d\n", |
1459 | fdata->blksize); | 1466 | fdata->blksize); |
1460 | return ERR_PTR(-EINVAL); | 1467 | return ERR_PTR(-EINVAL); |
1461 | } | 1468 | } |
1462 | 1469 | ||
@@ -1500,8 +1507,8 @@ dasd_eckd_format_device(struct dasd_device * device, | |||
1500 | sizeof(struct eckd_count); | 1507 | sizeof(struct eckd_count); |
1501 | break; | 1508 | break; |
1502 | default: | 1509 | default: |
1503 | DEV_MESSAGE(KERN_WARNING, device, "Invalid flags 0x%x.", | 1510 | dev_warn(&device->cdev->dev, "An I/O control call used " |
1504 | fdata->intensity); | 1511 | "incorrect flags 0x%x\n", fdata->intensity); |
1505 | return ERR_PTR(-EINVAL); | 1512 | return ERR_PTR(-EINVAL); |
1506 | } | 1513 | } |
1507 | /* Allocate the format ccw request. */ | 1514 | /* Allocate the format ccw request. */ |
@@ -1696,13 +1703,14 @@ static void dasd_eckd_handle_unsolicited_interrupt(struct dasd_device *device, | |||
1696 | 1703 | ||
1697 | if (!sense) { | 1704 | if (!sense) { |
1698 | /* just report other unsolicited interrupts */ | 1705 | /* just report other unsolicited interrupts */ |
1699 | DEV_MESSAGE(KERN_ERR, device, "%s", | 1706 | DBF_DEV_EVENT(DBF_ERR, device, "%s", |
1700 | "unsolicited interrupt received"); | 1707 | "unsolicited interrupt received"); |
1701 | } else { | 1708 | } else { |
1702 | DEV_MESSAGE(KERN_ERR, device, "%s", | 1709 | DBF_DEV_EVENT(DBF_ERR, device, "%s", |
1703 | "unsolicited interrupt received " | 1710 | "unsolicited interrupt received " |
1704 | "(sense available)"); | 1711 | "(sense available)"); |
1705 | device->discipline->dump_sense(device, NULL, irb); | 1712 | device->discipline->dump_sense_dbf(device, NULL, irb, |
1713 | "unsolicited"); | ||
1706 | } | 1714 | } |
1707 | 1715 | ||
1708 | dasd_schedule_device_bh(device); | 1716 | dasd_schedule_device_bh(device); |
@@ -2553,7 +2561,7 @@ dasd_eckd_release(struct dasd_device *device) | |||
2553 | cqr = dasd_smalloc_request(dasd_eckd_discipline.name, | 2561 | cqr = dasd_smalloc_request(dasd_eckd_discipline.name, |
2554 | 1, 32, device); | 2562 | 1, 32, device); |
2555 | if (IS_ERR(cqr)) { | 2563 | if (IS_ERR(cqr)) { |
2556 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 2564 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2557 | "Could not allocate initialization request"); | 2565 | "Could not allocate initialization request"); |
2558 | return PTR_ERR(cqr); | 2566 | return PTR_ERR(cqr); |
2559 | } | 2567 | } |
@@ -2596,7 +2604,7 @@ dasd_eckd_reserve(struct dasd_device *device) | |||
2596 | cqr = dasd_smalloc_request(dasd_eckd_discipline.name, | 2604 | cqr = dasd_smalloc_request(dasd_eckd_discipline.name, |
2597 | 1, 32, device); | 2605 | 1, 32, device); |
2598 | if (IS_ERR(cqr)) { | 2606 | if (IS_ERR(cqr)) { |
2599 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 2607 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2600 | "Could not allocate initialization request"); | 2608 | "Could not allocate initialization request"); |
2601 | return PTR_ERR(cqr); | 2609 | return PTR_ERR(cqr); |
2602 | } | 2610 | } |
@@ -2638,7 +2646,7 @@ dasd_eckd_steal_lock(struct dasd_device *device) | |||
2638 | cqr = dasd_smalloc_request(dasd_eckd_discipline.name, | 2646 | cqr = dasd_smalloc_request(dasd_eckd_discipline.name, |
2639 | 1, 32, device); | 2647 | 1, 32, device); |
2640 | if (IS_ERR(cqr)) { | 2648 | if (IS_ERR(cqr)) { |
2641 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 2649 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2642 | "Could not allocate initialization request"); | 2650 | "Could not allocate initialization request"); |
2643 | return PTR_ERR(cqr); | 2651 | return PTR_ERR(cqr); |
2644 | } | 2652 | } |
@@ -2680,7 +2688,7 @@ dasd_eckd_performance(struct dasd_device *device, void __user *argp) | |||
2680 | sizeof(struct dasd_rssd_perf_stats_t)), | 2688 | sizeof(struct dasd_rssd_perf_stats_t)), |
2681 | device); | 2689 | device); |
2682 | if (IS_ERR(cqr)) { | 2690 | if (IS_ERR(cqr)) { |
2683 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 2691 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2684 | "Could not allocate initialization request"); | 2692 | "Could not allocate initialization request"); |
2685 | return PTR_ERR(cqr); | 2693 | return PTR_ERR(cqr); |
2686 | } | 2694 | } |
@@ -2770,9 +2778,9 @@ dasd_eckd_set_attrib(struct dasd_device *device, void __user *argp) | |||
2770 | return -EFAULT; | 2778 | return -EFAULT; |
2771 | private->attrib = attrib; | 2779 | private->attrib = attrib; |
2772 | 2780 | ||
2773 | DEV_MESSAGE(KERN_INFO, device, | 2781 | dev_info(&device->cdev->dev, |
2774 | "cache operation mode set to %x (%i cylinder prestage)", | 2782 | "The DASD cache mode was set to %x (%i cylinder prestage)\n", |
2775 | private->attrib.operation, private->attrib.nr_cyl); | 2783 | private->attrib.operation, private->attrib.nr_cyl); |
2776 | return 0; | 2784 | return 0; |
2777 | } | 2785 | } |
2778 | 2786 | ||
@@ -2823,7 +2831,7 @@ static int dasd_symm_io(struct dasd_device *device, void __user *argp) | |||
2823 | /* setup CCWs for PSF + RSSD */ | 2831 | /* setup CCWs for PSF + RSSD */ |
2824 | cqr = dasd_smalloc_request("ECKD", 2 , 0, device); | 2832 | cqr = dasd_smalloc_request("ECKD", 2 , 0, device); |
2825 | if (IS_ERR(cqr)) { | 2833 | if (IS_ERR(cqr)) { |
2826 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 2834 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2827 | "Could not allocate initialization request"); | 2835 | "Could not allocate initialization request"); |
2828 | rc = PTR_ERR(cqr); | 2836 | rc = PTR_ERR(cqr); |
2829 | goto out_free; | 2837 | goto out_free; |
@@ -2932,6 +2940,49 @@ dasd_eckd_dump_ccw_range(struct ccw1 *from, struct ccw1 *to, char *page) | |||
2932 | return len; | 2940 | return len; |
2933 | } | 2941 | } |
2934 | 2942 | ||
2943 | static void | ||
2944 | dasd_eckd_dump_sense_dbf(struct dasd_device *device, struct dasd_ccw_req *req, | ||
2945 | struct irb *irb, char *reason) | ||
2946 | { | ||
2947 | u64 *sense; | ||
2948 | int sl; | ||
2949 | struct tsb *tsb; | ||
2950 | |||
2951 | sense = NULL; | ||
2952 | tsb = NULL; | ||
2953 | if (req && scsw_is_tm(&req->irb.scsw)) { | ||
2954 | if (irb->scsw.tm.tcw) | ||
2955 | tsb = tcw_get_tsb( | ||
2956 | (struct tcw *)(unsigned long)irb->scsw.tm.tcw); | ||
2957 | if (tsb && (irb->scsw.tm.fcxs == 0x01)) { | ||
2958 | switch (tsb->flags & 0x07) { | ||
2959 | case 1: /* tsa_iostat */ | ||
2960 | sense = (u64 *)tsb->tsa.iostat.sense; | ||
2961 | break; | ||
2962 | case 2: /* ts_ddpc */ | ||
2963 | sense = (u64 *)tsb->tsa.ddpc.sense; | ||
2964 | break; | ||
2965 | case 3: /* tsa_intrg */ | ||
2966 | break; | ||
2967 | } | ||
2968 | } | ||
2969 | } else { | ||
2970 | if (irb->esw.esw0.erw.cons) | ||
2971 | sense = (u64 *)irb->ecw; | ||
2972 | } | ||
2973 | if (sense) { | ||
2974 | for (sl = 0; sl < 4; sl++) { | ||
2975 | DBF_DEV_EVENT(DBF_EMERG, device, | ||
2976 | "%s: %016llx %016llx %016llx %016llx", | ||
2977 | reason, sense[0], sense[1], sense[2], | ||
2978 | sense[3]); | ||
2979 | } | ||
2980 | } else { | ||
2981 | DBF_DEV_EVENT(DBF_EMERG, device, "%s", | ||
2982 | "SORRY - NO VALID SENSE AVAILABLE\n"); | ||
2983 | } | ||
2984 | } | ||
2985 | |||
2935 | /* | 2986 | /* |
2936 | * Print sense data and related channel program. | 2987 | * Print sense data and related channel program. |
2937 | * Parts are printed because printk buffer is only 1024 bytes. | 2988 | * Parts are printed because printk buffer is only 1024 bytes. |
@@ -2945,8 +2996,8 @@ static void dasd_eckd_dump_sense_ccw(struct dasd_device *device, | |||
2945 | 2996 | ||
2946 | page = (char *) get_zeroed_page(GFP_ATOMIC); | 2997 | page = (char *) get_zeroed_page(GFP_ATOMIC); |
2947 | if (page == NULL) { | 2998 | if (page == NULL) { |
2948 | DEV_MESSAGE(KERN_ERR, device, " %s", | 2999 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
2949 | "No memory to dump sense data"); | 3000 | "No memory to dump sense data\n"); |
2950 | return; | 3001 | return; |
2951 | } | 3002 | } |
2952 | /* dump the sense data */ | 3003 | /* dump the sense data */ |
@@ -3047,7 +3098,7 @@ static void dasd_eckd_dump_sense_tcw(struct dasd_device *device, | |||
3047 | 3098 | ||
3048 | page = (char *) get_zeroed_page(GFP_ATOMIC); | 3099 | page = (char *) get_zeroed_page(GFP_ATOMIC); |
3049 | if (page == NULL) { | 3100 | if (page == NULL) { |
3050 | DEV_MESSAGE(KERN_ERR, device, " %s", | 3101 | DBF_DEV_EVENT(DBF_WARNING, device, " %s", |
3051 | "No memory to dump sense data"); | 3102 | "No memory to dump sense data"); |
3052 | return; | 3103 | return; |
3053 | } | 3104 | } |
@@ -3206,6 +3257,7 @@ static struct dasd_discipline dasd_eckd_discipline = { | |||
3206 | .build_cp = dasd_eckd_build_alias_cp, | 3257 | .build_cp = dasd_eckd_build_alias_cp, |
3207 | .free_cp = dasd_eckd_free_alias_cp, | 3258 | .free_cp = dasd_eckd_free_alias_cp, |
3208 | .dump_sense = dasd_eckd_dump_sense, | 3259 | .dump_sense = dasd_eckd_dump_sense, |
3260 | .dump_sense_dbf = dasd_eckd_dump_sense_dbf, | ||
3209 | .fill_info = dasd_eckd_fill_info, | 3261 | .fill_info = dasd_eckd_fill_info, |
3210 | .ioctl = dasd_eckd_ioctl, | 3262 | .ioctl = dasd_eckd_ioctl, |
3211 | }; | 3263 | }; |
diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c index 9ce4209552ae..c24c8c30380d 100644 --- a/drivers/s390/block/dasd_eer.c +++ b/drivers/s390/block/dasd_eer.c | |||
@@ -6,6 +6,8 @@ | |||
6 | * Author(s): Stefan Weinhuber <wein@de.ibm.com> | 6 | * Author(s): Stefan Weinhuber <wein@de.ibm.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #define KMSG_COMPONENT "dasd" | ||
10 | |||
9 | #include <linux/init.h> | 11 | #include <linux/init.h> |
10 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
11 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
@@ -539,7 +541,7 @@ static int dasd_eer_open(struct inode *inp, struct file *filp) | |||
539 | if (eerb->buffer_page_count < 1 || | 541 | if (eerb->buffer_page_count < 1 || |
540 | eerb->buffer_page_count > INT_MAX / PAGE_SIZE) { | 542 | eerb->buffer_page_count > INT_MAX / PAGE_SIZE) { |
541 | kfree(eerb); | 543 | kfree(eerb); |
542 | MESSAGE(KERN_WARNING, "can't open device since module " | 544 | DBF_EVENT(DBF_WARNING, "can't open device since module " |
543 | "parameter eer_pages is smaller than 1 or" | 545 | "parameter eer_pages is smaller than 1 or" |
544 | " bigger than %d", (int)(INT_MAX / PAGE_SIZE)); | 546 | " bigger than %d", (int)(INT_MAX / PAGE_SIZE)); |
545 | unlock_kernel(); | 547 | unlock_kernel(); |
@@ -692,7 +694,7 @@ int __init dasd_eer_init(void) | |||
692 | if (rc) { | 694 | if (rc) { |
693 | kfree(dasd_eer_dev); | 695 | kfree(dasd_eer_dev); |
694 | dasd_eer_dev = NULL; | 696 | dasd_eer_dev = NULL; |
695 | MESSAGE(KERN_ERR, "%s", "dasd_eer_init could not " | 697 | DBF_EVENT(DBF_ERR, "%s", "dasd_eer_init could not " |
696 | "register misc device"); | 698 | "register misc device"); |
697 | return rc; | 699 | return rc; |
698 | } | 700 | } |
diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c index 8f10000851a3..d970ce2814be 100644 --- a/drivers/s390/block/dasd_erp.c +++ b/drivers/s390/block/dasd_erp.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define KMSG_COMPONENT "dasd" | ||
13 | |||
12 | #include <linux/ctype.h> | 14 | #include <linux/ctype.h> |
13 | #include <linux/init.h> | 15 | #include <linux/init.h> |
14 | 16 | ||
@@ -91,14 +93,14 @@ dasd_default_erp_action(struct dasd_ccw_req *cqr) | |||
91 | 93 | ||
92 | /* just retry - there is nothing to save ... I got no sense data.... */ | 94 | /* just retry - there is nothing to save ... I got no sense data.... */ |
93 | if (cqr->retries > 0) { | 95 | if (cqr->retries > 0) { |
94 | DEV_MESSAGE (KERN_DEBUG, device, | 96 | DBF_DEV_EVENT(DBF_DEBUG, device, |
95 | "default ERP called (%i retries left)", | 97 | "default ERP called (%i retries left)", |
96 | cqr->retries); | 98 | cqr->retries); |
97 | cqr->lpm = LPM_ANYPATH; | 99 | cqr->lpm = LPM_ANYPATH; |
98 | cqr->status = DASD_CQR_FILLED; | 100 | cqr->status = DASD_CQR_FILLED; |
99 | } else { | 101 | } else { |
100 | DEV_MESSAGE (KERN_WARNING, device, "%s", | 102 | dev_err(&device->cdev->dev, |
101 | "default ERP called (NO retry left)"); | 103 | "default ERP has run out of retries and failed\n"); |
102 | cqr->status = DASD_CQR_FAILED; | 104 | cqr->status = DASD_CQR_FAILED; |
103 | cqr->stopclk = get_clock(); | 105 | cqr->stopclk = get_clock(); |
104 | } | 106 | } |
@@ -162,8 +164,21 @@ dasd_log_sense(struct dasd_ccw_req *cqr, struct irb *irb) | |||
162 | device->discipline->dump_sense(device, cqr, irb); | 164 | device->discipline->dump_sense(device, cqr, irb); |
163 | } | 165 | } |
164 | 166 | ||
167 | void | ||
168 | dasd_log_sense_dbf(struct dasd_ccw_req *cqr, struct irb *irb) | ||
169 | { | ||
170 | struct dasd_device *device; | ||
171 | |||
172 | device = cqr->startdev; | ||
173 | /* dump sense data to s390 debugfeature*/ | ||
174 | if (device->discipline && device->discipline->dump_sense_dbf) | ||
175 | device->discipline->dump_sense_dbf(device, cqr, irb, "log"); | ||
176 | } | ||
177 | EXPORT_SYMBOL(dasd_log_sense_dbf); | ||
178 | |||
165 | EXPORT_SYMBOL(dasd_default_erp_action); | 179 | EXPORT_SYMBOL(dasd_default_erp_action); |
166 | EXPORT_SYMBOL(dasd_default_erp_postaction); | 180 | EXPORT_SYMBOL(dasd_default_erp_postaction); |
167 | EXPORT_SYMBOL(dasd_alloc_erp_request); | 181 | EXPORT_SYMBOL(dasd_alloc_erp_request); |
168 | EXPORT_SYMBOL(dasd_free_erp_request); | 182 | EXPORT_SYMBOL(dasd_free_erp_request); |
169 | EXPORT_SYMBOL(dasd_log_sense); | 183 | EXPORT_SYMBOL(dasd_log_sense); |
184 | |||
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index f1d176021694..a3eb6fd14673 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -6,6 +6,8 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #define KMSG_COMPONENT "dasd" | ||
10 | |||
9 | #include <linux/stddef.h> | 11 | #include <linux/stddef.h> |
10 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
11 | #include <asm/debug.h> | 13 | #include <asm/debug.h> |
@@ -128,17 +130,18 @@ dasd_fba_check_characteristics(struct dasd_device *device) | |||
128 | private = kzalloc(sizeof(struct dasd_fba_private), | 130 | private = kzalloc(sizeof(struct dasd_fba_private), |
129 | GFP_KERNEL | GFP_DMA); | 131 | GFP_KERNEL | GFP_DMA); |
130 | if (private == NULL) { | 132 | if (private == NULL) { |
131 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 133 | dev_warn(&device->cdev->dev, |
132 | "memory allocation failed for private " | 134 | "Allocating memory for private DASD " |
133 | "data"); | 135 | "data failed\n"); |
134 | return -ENOMEM; | 136 | return -ENOMEM; |
135 | } | 137 | } |
136 | device->private = (void *) private; | 138 | device->private = (void *) private; |
137 | } | 139 | } |
138 | block = dasd_alloc_block(); | 140 | block = dasd_alloc_block(); |
139 | if (IS_ERR(block)) { | 141 | if (IS_ERR(block)) { |
140 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 142 | DBF_EVENT(DBF_WARNING, "could not allocate dasd block " |
141 | "could not allocate dasd block structure"); | 143 | "structure for device: %s", |
144 | dev_name(&device->cdev->dev)); | ||
142 | device->private = NULL; | 145 | device->private = NULL; |
143 | kfree(private); | 146 | kfree(private); |
144 | return PTR_ERR(block); | 147 | return PTR_ERR(block); |
@@ -150,9 +153,9 @@ dasd_fba_check_characteristics(struct dasd_device *device) | |||
150 | rdc_data = (void *) &(private->rdc_data); | 153 | rdc_data = (void *) &(private->rdc_data); |
151 | rc = dasd_generic_read_dev_chars(device, "FBA ", &rdc_data, 32); | 154 | rc = dasd_generic_read_dev_chars(device, "FBA ", &rdc_data, 32); |
152 | if (rc) { | 155 | if (rc) { |
153 | DEV_MESSAGE(KERN_WARNING, device, | 156 | DBF_EVENT(DBF_WARNING, "Read device characteristics returned " |
154 | "Read device characteristics returned error %d", | 157 | "error %d for device: %s", |
155 | rc); | 158 | rc, dev_name(&device->cdev->dev)); |
156 | device->block = NULL; | 159 | device->block = NULL; |
157 | dasd_free_block(block); | 160 | dasd_free_block(block); |
158 | device->private = NULL; | 161 | device->private = NULL; |
@@ -160,15 +163,16 @@ dasd_fba_check_characteristics(struct dasd_device *device) | |||
160 | return rc; | 163 | return rc; |
161 | } | 164 | } |
162 | 165 | ||
163 | DEV_MESSAGE(KERN_INFO, device, | 166 | dev_info(&device->cdev->dev, |
164 | "%04X/%02X(CU:%04X/%02X) %dMB at(%d B/blk)", | 167 | "New FBA DASD %04X/%02X (CU %04X/%02X) with %d MB " |
165 | cdev->id.dev_type, | 168 | "and %d B/blk\n", |
166 | cdev->id.dev_model, | 169 | cdev->id.dev_type, |
167 | cdev->id.cu_type, | 170 | cdev->id.dev_model, |
168 | cdev->id.cu_model, | 171 | cdev->id.cu_type, |
169 | ((private->rdc_data.blk_bdsa * | 172 | cdev->id.cu_model, |
170 | (private->rdc_data.blk_size >> 9)) >> 11), | 173 | ((private->rdc_data.blk_bdsa * |
171 | private->rdc_data.blk_size); | 174 | (private->rdc_data.blk_size >> 9)) >> 11), |
175 | private->rdc_data.blk_size); | ||
172 | return 0; | 176 | return 0; |
173 | } | 177 | } |
174 | 178 | ||
@@ -180,7 +184,7 @@ static int dasd_fba_do_analysis(struct dasd_block *block) | |||
180 | private = (struct dasd_fba_private *) block->base->private; | 184 | private = (struct dasd_fba_private *) block->base->private; |
181 | rc = dasd_check_blocksize(private->rdc_data.blk_size); | 185 | rc = dasd_check_blocksize(private->rdc_data.blk_size); |
182 | if (rc) { | 186 | if (rc) { |
183 | DEV_MESSAGE(KERN_INFO, block->base, "unknown blocksize %d", | 187 | DBF_DEV_EVENT(DBF_WARNING, block->base, "unknown blocksize %d", |
184 | private->rdc_data.blk_size); | 188 | private->rdc_data.blk_size); |
185 | return rc; | 189 | return rc; |
186 | } | 190 | } |
@@ -215,7 +219,7 @@ dasd_fba_erp_postaction(struct dasd_ccw_req * cqr) | |||
215 | if (cqr->function == dasd_default_erp_action) | 219 | if (cqr->function == dasd_default_erp_action) |
216 | return dasd_default_erp_postaction; | 220 | return dasd_default_erp_postaction; |
217 | 221 | ||
218 | DEV_MESSAGE(KERN_WARNING, cqr->startdev, "unknown ERP action %p", | 222 | DBF_DEV_EVENT(DBF_WARNING, cqr->startdev, "unknown ERP action %p", |
219 | cqr->function); | 223 | cqr->function); |
220 | return NULL; | 224 | return NULL; |
221 | } | 225 | } |
@@ -233,9 +237,9 @@ static void dasd_fba_handle_unsolicited_interrupt(struct dasd_device *device, | |||
233 | } | 237 | } |
234 | 238 | ||
235 | /* check for unsolicited interrupts */ | 239 | /* check for unsolicited interrupts */ |
236 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 240 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
237 | "unsolicited interrupt received"); | 241 | "unsolicited interrupt received"); |
238 | device->discipline->dump_sense(device, NULL, irb); | 242 | device->discipline->dump_sense_dbf(device, NULL, irb, "unsolicited"); |
239 | dasd_schedule_device_bh(device); | 243 | dasd_schedule_device_bh(device); |
240 | return; | 244 | return; |
241 | }; | 245 | }; |
@@ -437,6 +441,25 @@ dasd_fba_fill_info(struct dasd_device * device, | |||
437 | } | 441 | } |
438 | 442 | ||
439 | static void | 443 | static void |
444 | dasd_fba_dump_sense_dbf(struct dasd_device *device, struct dasd_ccw_req *req, | ||
445 | struct irb *irb, char *reason) | ||
446 | { | ||
447 | int sl; | ||
448 | if (irb->esw.esw0.erw.cons) { | ||
449 | for (sl = 0; sl < 4; sl++) { | ||
450 | DBF_DEV_EVENT(DBF_EMERG, device, | ||
451 | "%s: %08x %08x %08x %08x", | ||
452 | reason, irb->ecw[8 * 0], irb->ecw[8 * 1], | ||
453 | irb->ecw[8 * 2], irb->ecw[8 * 3]); | ||
454 | } | ||
455 | } else { | ||
456 | DBF_DEV_EVENT(DBF_EMERG, device, "%s", | ||
457 | "SORRY - NO VALID SENSE AVAILABLE\n"); | ||
458 | } | ||
459 | } | ||
460 | |||
461 | |||
462 | static void | ||
440 | dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | 463 | dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, |
441 | struct irb *irb) | 464 | struct irb *irb) |
442 | { | 465 | { |
@@ -446,7 +469,7 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
446 | 469 | ||
447 | page = (char *) get_zeroed_page(GFP_ATOMIC); | 470 | page = (char *) get_zeroed_page(GFP_ATOMIC); |
448 | if (page == NULL) { | 471 | if (page == NULL) { |
449 | DEV_MESSAGE(KERN_ERR, device, " %s", | 472 | DBF_DEV_EVENT(DBF_WARNING, device, "%s", |
450 | "No memory to dump sense data"); | 473 | "No memory to dump sense data"); |
451 | return; | 474 | return; |
452 | } | 475 | } |
@@ -476,8 +499,7 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
476 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 499 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER |
477 | " SORRY - NO VALID SENSE AVAILABLE\n"); | 500 | " SORRY - NO VALID SENSE AVAILABLE\n"); |
478 | } | 501 | } |
479 | MESSAGE_LOG(KERN_ERR, "%s", | 502 | printk(KERN_ERR "%s", page); |
480 | page + sizeof(KERN_ERR PRINTK_HEADER)); | ||
481 | 503 | ||
482 | /* dump the Channel Program */ | 504 | /* dump the Channel Program */ |
483 | /* print first CCWs (maximum 8) */ | 505 | /* print first CCWs (maximum 8) */ |
@@ -498,8 +520,7 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
498 | len += sprintf(page + len, "\n"); | 520 | len += sprintf(page + len, "\n"); |
499 | act++; | 521 | act++; |
500 | } | 522 | } |
501 | MESSAGE_LOG(KERN_ERR, "%s", | 523 | printk(KERN_ERR "%s", page); |
502 | page + sizeof(KERN_ERR PRINTK_HEADER)); | ||
503 | 524 | ||
504 | 525 | ||
505 | /* print failing CCW area */ | 526 | /* print failing CCW area */ |
@@ -540,8 +561,7 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
540 | act++; | 561 | act++; |
541 | } | 562 | } |
542 | if (len > 0) | 563 | if (len > 0) |
543 | MESSAGE_LOG(KERN_ERR, "%s", | 564 | printk(KERN_ERR "%s", page); |
544 | page + sizeof(KERN_ERR PRINTK_HEADER)); | ||
545 | free_page((unsigned long) page); | 565 | free_page((unsigned long) page); |
546 | } | 566 | } |
547 | 567 | ||
@@ -576,6 +596,7 @@ static struct dasd_discipline dasd_fba_discipline = { | |||
576 | .build_cp = dasd_fba_build_cp, | 596 | .build_cp = dasd_fba_build_cp, |
577 | .free_cp = dasd_fba_free_cp, | 597 | .free_cp = dasd_fba_free_cp, |
578 | .dump_sense = dasd_fba_dump_sense, | 598 | .dump_sense = dasd_fba_dump_sense, |
599 | .dump_sense_dbf = dasd_fba_dump_sense_dbf, | ||
579 | .fill_info = dasd_fba_fill_info, | 600 | .fill_info = dasd_fba_fill_info, |
580 | }; | 601 | }; |
581 | 602 | ||
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index e99d566b69cc..d3198303b93c 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define KMSG_COMPONENT "dasd" | ||
15 | |||
14 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
15 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
16 | #include <linux/blkpg.h> | 18 | #include <linux/blkpg.h> |
@@ -163,9 +165,8 @@ int dasd_gendisk_init(void) | |||
163 | /* Register to static dasd major 94 */ | 165 | /* Register to static dasd major 94 */ |
164 | rc = register_blkdev(DASD_MAJOR, "dasd"); | 166 | rc = register_blkdev(DASD_MAJOR, "dasd"); |
165 | if (rc != 0) { | 167 | if (rc != 0) { |
166 | MESSAGE(KERN_WARNING, | 168 | pr_warning("Registering the device driver with major number " |
167 | "Couldn't register successfully to " | 169 | "%d failed\n", DASD_MAJOR); |
168 | "major no %d", DASD_MAJOR); | ||
169 | return rc; | 170 | return rc; |
170 | } | 171 | } |
171 | return 0; | 172 | return 0; |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 7b314c1d471e..c1e487f774c6 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -112,6 +112,9 @@ do { \ | |||
112 | d_data); \ | 112 | d_data); \ |
113 | } while(0) | 113 | } while(0) |
114 | 114 | ||
115 | /* limit size for an errorstring */ | ||
116 | #define ERRORLENGTH 30 | ||
117 | |||
115 | /* definition of dbf debug levels */ | 118 | /* definition of dbf debug levels */ |
116 | #define DBF_EMERG 0 /* system is unusable */ | 119 | #define DBF_EMERG 0 /* system is unusable */ |
117 | #define DBF_ALERT 1 /* action must be taken immediately */ | 120 | #define DBF_ALERT 1 /* action must be taken immediately */ |
@@ -281,6 +284,8 @@ struct dasd_discipline { | |||
281 | dasd_erp_fn_t(*erp_postaction) (struct dasd_ccw_req *); | 284 | dasd_erp_fn_t(*erp_postaction) (struct dasd_ccw_req *); |
282 | void (*dump_sense) (struct dasd_device *, struct dasd_ccw_req *, | 285 | void (*dump_sense) (struct dasd_device *, struct dasd_ccw_req *, |
283 | struct irb *); | 286 | struct irb *); |
287 | void (*dump_sense_dbf) (struct dasd_device *, struct dasd_ccw_req *, | ||
288 | struct irb *, char *); | ||
284 | 289 | ||
285 | void (*handle_unsolicited_interrupt) (struct dasd_device *, | 290 | void (*handle_unsolicited_interrupt) (struct dasd_device *, |
286 | struct irb *); | 291 | struct irb *); |
@@ -626,6 +631,7 @@ struct dasd_ccw_req *dasd_alloc_erp_request(char *, int, int, | |||
626 | struct dasd_device *); | 631 | struct dasd_device *); |
627 | void dasd_free_erp_request(struct dasd_ccw_req *, struct dasd_device *); | 632 | void dasd_free_erp_request(struct dasd_ccw_req *, struct dasd_device *); |
628 | void dasd_log_sense(struct dasd_ccw_req *, struct irb *); | 633 | void dasd_log_sense(struct dasd_ccw_req *, struct irb *); |
634 | void dasd_log_sense_dbf(struct dasd_ccw_req *cqr, struct irb *irb); | ||
629 | 635 | ||
630 | /* externals in dasd_3990_erp.c */ | 636 | /* externals in dasd_3990_erp.c */ |
631 | struct dasd_ccw_req *dasd_3990_erp_action(struct dasd_ccw_req *); | 637 | struct dasd_ccw_req *dasd_3990_erp_action(struct dasd_ccw_req *); |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index a3bbdb807bad..4ce3f72ee1c1 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -9,6 +9,9 @@ | |||
9 | * | 9 | * |
10 | * i/o controls for the dasd driver. | 10 | * i/o controls for the dasd driver. |
11 | */ | 11 | */ |
12 | |||
13 | #define KMSG_COMPONENT "dasd" | ||
14 | |||
12 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
13 | #include <linux/major.h> | 16 | #include <linux/major.h> |
14 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
@@ -94,7 +97,8 @@ static int dasd_ioctl_quiesce(struct dasd_block *block) | |||
94 | if (!capable (CAP_SYS_ADMIN)) | 97 | if (!capable (CAP_SYS_ADMIN)) |
95 | return -EACCES; | 98 | return -EACCES; |
96 | 99 | ||
97 | DEV_MESSAGE(KERN_DEBUG, base, "%s", "Quiesce IO on device"); | 100 | dev_info(&base->cdev->dev, "The DASD has been put in the quiesce " |
101 | "state\n"); | ||
98 | spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); | 102 | spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); |
99 | base->stopped |= DASD_STOPPED_QUIESCE; | 103 | base->stopped |= DASD_STOPPED_QUIESCE; |
100 | spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags); | 104 | spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags); |
@@ -103,7 +107,7 @@ static int dasd_ioctl_quiesce(struct dasd_block *block) | |||
103 | 107 | ||
104 | 108 | ||
105 | /* | 109 | /* |
106 | * Quiesce device. | 110 | * Resume device. |
107 | */ | 111 | */ |
108 | static int dasd_ioctl_resume(struct dasd_block *block) | 112 | static int dasd_ioctl_resume(struct dasd_block *block) |
109 | { | 113 | { |
@@ -114,7 +118,8 @@ static int dasd_ioctl_resume(struct dasd_block *block) | |||
114 | if (!capable (CAP_SYS_ADMIN)) | 118 | if (!capable (CAP_SYS_ADMIN)) |
115 | return -EACCES; | 119 | return -EACCES; |
116 | 120 | ||
117 | DEV_MESSAGE(KERN_DEBUG, base, "%s", "resume IO on device"); | 121 | dev_info(&base->cdev->dev, "I/O operations have been resumed " |
122 | "on the DASD\n"); | ||
118 | spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); | 123 | spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); |
119 | base->stopped &= ~DASD_STOPPED_QUIESCE; | 124 | base->stopped &= ~DASD_STOPPED_QUIESCE; |
120 | spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags); | 125 | spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags); |
@@ -140,8 +145,8 @@ static int dasd_format(struct dasd_block *block, struct format_data_t *fdata) | |||
140 | return -EPERM; | 145 | return -EPERM; |
141 | 146 | ||
142 | if (base->state != DASD_STATE_BASIC) { | 147 | if (base->state != DASD_STATE_BASIC) { |
143 | DEV_MESSAGE(KERN_WARNING, base, "%s", | 148 | dev_warn(&base->cdev->dev, |
144 | "dasd_format: device is not disabled! "); | 149 | "The DASD cannot be formatted while it is enabled\n"); |
145 | return -EBUSY; | 150 | return -EBUSY; |
146 | } | 151 | } |
147 | 152 | ||
@@ -169,10 +174,9 @@ static int dasd_format(struct dasd_block *block, struct format_data_t *fdata) | |||
169 | dasd_sfree_request(cqr, cqr->memdev); | 174 | dasd_sfree_request(cqr, cqr->memdev); |
170 | if (rc) { | 175 | if (rc) { |
171 | if (rc != -ERESTARTSYS) | 176 | if (rc != -ERESTARTSYS) |
172 | DEV_MESSAGE(KERN_ERR, base, | 177 | dev_err(&base->cdev->dev, |
173 | " Formatting of unit %u failed " | 178 | "Formatting unit %d failed with " |
174 | "with rc = %d", | 179 | "rc=%d\n", fdata->start_unit, rc); |
175 | fdata->start_unit, rc); | ||
176 | return rc; | 180 | return rc; |
177 | } | 181 | } |
178 | fdata->start_unit++; | 182 | fdata->start_unit++; |
@@ -199,8 +203,9 @@ dasd_ioctl_format(struct block_device *bdev, void __user *argp) | |||
199 | if (copy_from_user(&fdata, argp, sizeof(struct format_data_t))) | 203 | if (copy_from_user(&fdata, argp, sizeof(struct format_data_t))) |
200 | return -EFAULT; | 204 | return -EFAULT; |
201 | if (bdev != bdev->bd_contains) { | 205 | if (bdev != bdev->bd_contains) { |
202 | DEV_MESSAGE(KERN_WARNING, block->base, "%s", | 206 | dev_warn(&block->base->cdev->dev, |
203 | "Cannot low-level format a partition"); | 207 | "The specified DASD is a partition and cannot be " |
208 | "formatted\n"); | ||
204 | return -EINVAL; | 209 | return -EINVAL; |
205 | } | 210 | } |
206 | return dasd_format(block, &fdata); | 211 | return dasd_format(block, &fdata); |
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 0aa569419d57..2080ba6a69b0 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define KMSG_COMPONENT "dasd" | ||
15 | |||
14 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
15 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
16 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
@@ -267,7 +269,7 @@ dasd_statistics_write(struct file *file, const char __user *user_buf, | |||
267 | buffer = dasd_get_user_string(user_buf, user_len); | 269 | buffer = dasd_get_user_string(user_buf, user_len); |
268 | if (IS_ERR(buffer)) | 270 | if (IS_ERR(buffer)) |
269 | return PTR_ERR(buffer); | 271 | return PTR_ERR(buffer); |
270 | MESSAGE_LOG(KERN_INFO, "/proc/dasd/statictics: '%s'", buffer); | 272 | DBF_EVENT(DBF_DEBUG, "/proc/dasd/statictics: '%s'\n", buffer); |
271 | 273 | ||
272 | /* check for valid verbs */ | 274 | /* check for valid verbs */ |
273 | for (str = buffer; isspace(*str); str++); | 275 | for (str = buffer; isspace(*str); str++); |
@@ -277,33 +279,33 @@ dasd_statistics_write(struct file *file, const char __user *user_buf, | |||
277 | if (strcmp(str, "on") == 0) { | 279 | if (strcmp(str, "on") == 0) { |
278 | /* switch on statistics profiling */ | 280 | /* switch on statistics profiling */ |
279 | dasd_profile_level = DASD_PROFILE_ON; | 281 | dasd_profile_level = DASD_PROFILE_ON; |
280 | MESSAGE(KERN_INFO, "%s", "Statistics switched on"); | 282 | pr_info("The statistics feature has been switched " |
283 | "on\n"); | ||
281 | } else if (strcmp(str, "off") == 0) { | 284 | } else if (strcmp(str, "off") == 0) { |
282 | /* switch off and reset statistics profiling */ | 285 | /* switch off and reset statistics profiling */ |
283 | memset(&dasd_global_profile, | 286 | memset(&dasd_global_profile, |
284 | 0, sizeof (struct dasd_profile_info_t)); | 287 | 0, sizeof (struct dasd_profile_info_t)); |
285 | dasd_profile_level = DASD_PROFILE_OFF; | 288 | dasd_profile_level = DASD_PROFILE_OFF; |
286 | MESSAGE(KERN_INFO, "%s", "Statistics switched off"); | 289 | pr_info("The statistics feature has been switched " |
290 | "off\n"); | ||
287 | } else | 291 | } else |
288 | goto out_error; | 292 | goto out_error; |
289 | } else if (strncmp(str, "reset", 5) == 0) { | 293 | } else if (strncmp(str, "reset", 5) == 0) { |
290 | /* reset the statistics */ | 294 | /* reset the statistics */ |
291 | memset(&dasd_global_profile, 0, | 295 | memset(&dasd_global_profile, 0, |
292 | sizeof (struct dasd_profile_info_t)); | 296 | sizeof (struct dasd_profile_info_t)); |
293 | MESSAGE(KERN_INFO, "%s", "Statistics reset"); | 297 | pr_info("The statistics have been reset\n"); |
294 | } else | 298 | } else |
295 | goto out_error; | 299 | goto out_error; |
296 | kfree(buffer); | 300 | kfree(buffer); |
297 | return user_len; | 301 | return user_len; |
298 | out_error: | 302 | out_error: |
299 | MESSAGE(KERN_WARNING, "%s", | 303 | pr_warning("%s is not a supported value for /proc/dasd/statistics\n", |
300 | "/proc/dasd/statistics: only 'set on', 'set off' " | 304 | str); |
301 | "and 'reset' are supported verbs"); | ||
302 | kfree(buffer); | 305 | kfree(buffer); |
303 | return -EINVAL; | 306 | return -EINVAL; |
304 | #else | 307 | #else |
305 | MESSAGE(KERN_WARNING, "%s", | 308 | pr_warning("/proc/dasd/statistics: is not activated in this kernel\n"); |
306 | "/proc/dasd/statistics: is not activated in this kernel"); | ||
307 | return user_len; | 309 | return user_len; |
308 | #endif /* CONFIG_DASD_PROFILE */ | 310 | #endif /* CONFIG_DASD_PROFILE */ |
309 | } | 311 | } |