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/dasd.c | |
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/dasd.c')
-rw-r--r-- | drivers/s390/block/dasd.c | 176 |
1 files changed, 88 insertions, 88 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 | } |