diff options
Diffstat (limited to 'drivers/s390/char/tape_3590.c')
-rw-r--r-- | drivers/s390/char/tape_3590.c | 132 |
1 files changed, 68 insertions, 64 deletions
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 839987618ffd..4005c44a404c 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -910,7 +910,7 @@ tape_3590_erp_swap(struct tape_device *device, struct tape_request *request, | |||
910 | * should proceed with the new tape... this | 910 | * should proceed with the new tape... this |
911 | * should probably be done in user space! | 911 | * should probably be done in user space! |
912 | */ | 912 | */ |
913 | PRINT_WARN("(%s): Swap Tape Device!\n", device->cdev->dev.bus_id); | 913 | PRINT_WARN("(%s): Swap Tape Device!\n", dev_name(&device->cdev->dev)); |
914 | return tape_3590_erp_basic(device, request, irb, -EIO); | 914 | return tape_3590_erp_basic(device, request, irb, -EIO); |
915 | } | 915 | } |
916 | 916 | ||
@@ -1003,40 +1003,43 @@ tape_3590_print_mim_msg_f0(struct tape_device *device, struct irb *irb) | |||
1003 | /* Exception Message */ | 1003 | /* Exception Message */ |
1004 | switch (sense->fmt.f70.emc) { | 1004 | switch (sense->fmt.f70.emc) { |
1005 | case 0x02: | 1005 | case 0x02: |
1006 | PRINT_WARN("(%s): Data degraded\n", device->cdev->dev.bus_id); | 1006 | PRINT_WARN("(%s): Data degraded\n", |
1007 | dev_name(&device->cdev->dev)); | ||
1007 | break; | 1008 | break; |
1008 | case 0x03: | 1009 | case 0x03: |
1009 | PRINT_WARN("(%s): Data degraded in partion %i\n", | 1010 | PRINT_WARN("(%s): Data degraded in partion %i\n", |
1010 | device->cdev->dev.bus_id, sense->fmt.f70.mp); | 1011 | dev_name(&device->cdev->dev), sense->fmt.f70.mp); |
1011 | break; | 1012 | break; |
1012 | case 0x04: | 1013 | case 0x04: |
1013 | PRINT_WARN("(%s): Medium degraded\n", device->cdev->dev.bus_id); | 1014 | PRINT_WARN("(%s): Medium degraded\n", |
1015 | dev_name(&device->cdev->dev)); | ||
1014 | break; | 1016 | break; |
1015 | case 0x05: | 1017 | case 0x05: |
1016 | PRINT_WARN("(%s): Medium degraded in partition %i\n", | 1018 | PRINT_WARN("(%s): Medium degraded in partition %i\n", |
1017 | device->cdev->dev.bus_id, sense->fmt.f70.mp); | 1019 | dev_name(&device->cdev->dev), sense->fmt.f70.mp); |
1018 | break; | 1020 | break; |
1019 | case 0x06: | 1021 | case 0x06: |
1020 | PRINT_WARN("(%s): Block 0 Error\n", device->cdev->dev.bus_id); | 1022 | PRINT_WARN("(%s): Block 0 Error\n", |
1023 | dev_name(&device->cdev->dev)); | ||
1021 | break; | 1024 | break; |
1022 | case 0x07: | 1025 | case 0x07: |
1023 | PRINT_WARN("(%s): Medium Exception 0x%02x\n", | 1026 | PRINT_WARN("(%s): Medium Exception 0x%02x\n", |
1024 | device->cdev->dev.bus_id, sense->fmt.f70.md); | 1027 | dev_name(&device->cdev->dev), sense->fmt.f70.md); |
1025 | break; | 1028 | break; |
1026 | default: | 1029 | default: |
1027 | PRINT_WARN("(%s): MIM ExMsg: 0x%02x\n", | 1030 | PRINT_WARN("(%s): MIM ExMsg: 0x%02x\n", |
1028 | device->cdev->dev.bus_id, sense->fmt.f70.emc); | 1031 | dev_name(&device->cdev->dev), sense->fmt.f70.emc); |
1029 | break; | 1032 | break; |
1030 | } | 1033 | } |
1031 | /* Service Message */ | 1034 | /* Service Message */ |
1032 | switch (sense->fmt.f70.smc) { | 1035 | switch (sense->fmt.f70.smc) { |
1033 | case 0x02: | 1036 | case 0x02: |
1034 | PRINT_WARN("(%s): Reference Media maintenance procedure %i\n", | 1037 | PRINT_WARN("(%s): Reference Media maintenance procedure %i\n", |
1035 | device->cdev->dev.bus_id, sense->fmt.f70.md); | 1038 | dev_name(&device->cdev->dev), sense->fmt.f70.md); |
1036 | break; | 1039 | break; |
1037 | default: | 1040 | default: |
1038 | PRINT_WARN("(%s): MIM ServiceMsg: 0x%02x\n", | 1041 | PRINT_WARN("(%s): MIM ServiceMsg: 0x%02x\n", |
1039 | device->cdev->dev.bus_id, sense->fmt.f70.smc); | 1042 | dev_name(&device->cdev->dev), sense->fmt.f70.smc); |
1040 | break; | 1043 | break; |
1041 | } | 1044 | } |
1042 | } | 1045 | } |
@@ -1054,101 +1057,101 @@ tape_3590_print_io_sim_msg_f1(struct tape_device *device, struct irb *irb) | |||
1054 | switch (sense->fmt.f71.emc) { | 1057 | switch (sense->fmt.f71.emc) { |
1055 | case 0x01: | 1058 | case 0x01: |
1056 | PRINT_WARN("(%s): Effect of failure is unknown\n", | 1059 | PRINT_WARN("(%s): Effect of failure is unknown\n", |
1057 | device->cdev->dev.bus_id); | 1060 | dev_name(&device->cdev->dev)); |
1058 | break; | 1061 | break; |
1059 | case 0x02: | 1062 | case 0x02: |
1060 | PRINT_WARN("(%s): CU Exception - no performance impact\n", | 1063 | PRINT_WARN("(%s): CU Exception - no performance impact\n", |
1061 | device->cdev->dev.bus_id); | 1064 | dev_name(&device->cdev->dev)); |
1062 | break; | 1065 | break; |
1063 | case 0x03: | 1066 | case 0x03: |
1064 | PRINT_WARN("(%s): CU Exception on channel interface 0x%02x\n", | 1067 | PRINT_WARN("(%s): CU Exception on channel interface 0x%02x\n", |
1065 | device->cdev->dev.bus_id, sense->fmt.f71.md[0]); | 1068 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); |
1066 | break; | 1069 | break; |
1067 | case 0x04: | 1070 | case 0x04: |
1068 | PRINT_WARN("(%s): CU Exception on device path 0x%02x\n", | 1071 | PRINT_WARN("(%s): CU Exception on device path 0x%02x\n", |
1069 | device->cdev->dev.bus_id, sense->fmt.f71.md[0]); | 1072 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); |
1070 | break; | 1073 | break; |
1071 | case 0x05: | 1074 | case 0x05: |
1072 | PRINT_WARN("(%s): CU Exception on library path 0x%02x\n", | 1075 | PRINT_WARN("(%s): CU Exception on library path 0x%02x\n", |
1073 | device->cdev->dev.bus_id, sense->fmt.f71.md[0]); | 1076 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); |
1074 | break; | 1077 | break; |
1075 | case 0x06: | 1078 | case 0x06: |
1076 | PRINT_WARN("(%s): CU Exception on node 0x%02x\n", | 1079 | PRINT_WARN("(%s): CU Exception on node 0x%02x\n", |
1077 | device->cdev->dev.bus_id, sense->fmt.f71.md[0]); | 1080 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); |
1078 | break; | 1081 | break; |
1079 | case 0x07: | 1082 | case 0x07: |
1080 | PRINT_WARN("(%s): CU Exception on partition 0x%02x\n", | 1083 | PRINT_WARN("(%s): CU Exception on partition 0x%02x\n", |
1081 | device->cdev->dev.bus_id, sense->fmt.f71.md[0]); | 1084 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); |
1082 | break; | 1085 | break; |
1083 | default: | 1086 | default: |
1084 | PRINT_WARN("(%s): SIM ExMsg: 0x%02x\n", | 1087 | PRINT_WARN("(%s): SIM ExMsg: 0x%02x\n", |
1085 | device->cdev->dev.bus_id, sense->fmt.f71.emc); | 1088 | dev_name(&device->cdev->dev), sense->fmt.f71.emc); |
1086 | } | 1089 | } |
1087 | /* Service Message */ | 1090 | /* Service Message */ |
1088 | switch (sense->fmt.f71.smc) { | 1091 | switch (sense->fmt.f71.smc) { |
1089 | case 0x01: | 1092 | case 0x01: |
1090 | PRINT_WARN("(%s): Repair impact is unknown\n", | 1093 | PRINT_WARN("(%s): Repair impact is unknown\n", |
1091 | device->cdev->dev.bus_id); | 1094 | dev_name(&device->cdev->dev)); |
1092 | break; | 1095 | break; |
1093 | case 0x02: | 1096 | case 0x02: |
1094 | PRINT_WARN("(%s): Repair will not impact cu performance\n", | 1097 | PRINT_WARN("(%s): Repair will not impact cu performance\n", |
1095 | device->cdev->dev.bus_id); | 1098 | dev_name(&device->cdev->dev)); |
1096 | break; | 1099 | break; |
1097 | case 0x03: | 1100 | case 0x03: |
1098 | if (sense->fmt.f71.mdf == 0) | 1101 | if (sense->fmt.f71.mdf == 0) |
1099 | PRINT_WARN("(%s): Repair will disable node " | 1102 | PRINT_WARN("(%s): Repair will disable node " |
1100 | "0x%x on CU\n", | 1103 | "0x%x on CU\n", |
1101 | device->cdev->dev.bus_id, | 1104 | dev_name(&device->cdev->dev), |
1102 | sense->fmt.f71.md[1]); | 1105 | sense->fmt.f71.md[1]); |
1103 | else | 1106 | else |
1104 | PRINT_WARN("(%s): Repair will disable nodes " | 1107 | PRINT_WARN("(%s): Repair will disable nodes " |
1105 | "(0x%x-0x%x) on CU\n", | 1108 | "(0x%x-0x%x) on CU\n", |
1106 | device->cdev->dev.bus_id, | 1109 | dev_name(&device->cdev->dev), |
1107 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | 1110 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
1108 | break; | 1111 | break; |
1109 | case 0x04: | 1112 | case 0x04: |
1110 | if (sense->fmt.f71.mdf == 0) | 1113 | if (sense->fmt.f71.mdf == 0) |
1111 | PRINT_WARN("(%s): Repair will disable cannel path " | 1114 | PRINT_WARN("(%s): Repair will disable cannel path " |
1112 | "0x%x on CU\n", | 1115 | "0x%x on CU\n", |
1113 | device->cdev->dev.bus_id, | 1116 | dev_name(&device->cdev->dev), |
1114 | sense->fmt.f71.md[1]); | 1117 | sense->fmt.f71.md[1]); |
1115 | else | 1118 | else |
1116 | PRINT_WARN("(%s): Repair will disable cannel paths " | 1119 | PRINT_WARN("(%s): Repair will disable cannel paths " |
1117 | "(0x%x-0x%x) on CU\n", | 1120 | "(0x%x-0x%x) on CU\n", |
1118 | device->cdev->dev.bus_id, | 1121 | dev_name(&device->cdev->dev), |
1119 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | 1122 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
1120 | break; | 1123 | break; |
1121 | case 0x05: | 1124 | case 0x05: |
1122 | if (sense->fmt.f71.mdf == 0) | 1125 | if (sense->fmt.f71.mdf == 0) |
1123 | PRINT_WARN("(%s): Repair will disable device path " | 1126 | PRINT_WARN("(%s): Repair will disable device path " |
1124 | "0x%x on CU\n", | 1127 | "0x%x on CU\n", |
1125 | device->cdev->dev.bus_id, | 1128 | dev_name(&device->cdev->dev), |
1126 | sense->fmt.f71.md[1]); | 1129 | sense->fmt.f71.md[1]); |
1127 | else | 1130 | else |
1128 | PRINT_WARN("(%s): Repair will disable device paths " | 1131 | PRINT_WARN("(%s): Repair will disable device paths " |
1129 | "(0x%x-0x%x) on CU\n", | 1132 | "(0x%x-0x%x) on CU\n", |
1130 | device->cdev->dev.bus_id, | 1133 | dev_name(&device->cdev->dev), |
1131 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | 1134 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
1132 | break; | 1135 | break; |
1133 | case 0x06: | 1136 | case 0x06: |
1134 | if (sense->fmt.f71.mdf == 0) | 1137 | if (sense->fmt.f71.mdf == 0) |
1135 | PRINT_WARN("(%s): Repair will disable library path " | 1138 | PRINT_WARN("(%s): Repair will disable library path " |
1136 | "0x%x on CU\n", | 1139 | "0x%x on CU\n", |
1137 | device->cdev->dev.bus_id, | 1140 | dev_name(&device->cdev->dev), |
1138 | sense->fmt.f71.md[1]); | 1141 | sense->fmt.f71.md[1]); |
1139 | else | 1142 | else |
1140 | PRINT_WARN("(%s): Repair will disable library paths " | 1143 | PRINT_WARN("(%s): Repair will disable library paths " |
1141 | "(0x%x-0x%x) on CU\n", | 1144 | "(0x%x-0x%x) on CU\n", |
1142 | device->cdev->dev.bus_id, | 1145 | dev_name(&device->cdev->dev), |
1143 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | 1146 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
1144 | break; | 1147 | break; |
1145 | case 0x07: | 1148 | case 0x07: |
1146 | PRINT_WARN("(%s): Repair will disable access to CU\n", | 1149 | PRINT_WARN("(%s): Repair will disable access to CU\n", |
1147 | device->cdev->dev.bus_id); | 1150 | dev_name(&device->cdev->dev)); |
1148 | break; | 1151 | break; |
1149 | default: | 1152 | default: |
1150 | PRINT_WARN("(%s): SIM ServiceMsg: 0x%02x\n", | 1153 | PRINT_WARN("(%s): SIM ServiceMsg: 0x%02x\n", |
1151 | device->cdev->dev.bus_id, sense->fmt.f71.smc); | 1154 | dev_name(&device->cdev->dev), sense->fmt.f71.smc); |
1152 | } | 1155 | } |
1153 | } | 1156 | } |
1154 | 1157 | ||
@@ -1165,104 +1168,104 @@ tape_3590_print_dev_sim_msg_f2(struct tape_device *device, struct irb *irb) | |||
1165 | switch (sense->fmt.f71.emc) { | 1168 | switch (sense->fmt.f71.emc) { |
1166 | case 0x01: | 1169 | case 0x01: |
1167 | PRINT_WARN("(%s): Effect of failure is unknown\n", | 1170 | PRINT_WARN("(%s): Effect of failure is unknown\n", |
1168 | device->cdev->dev.bus_id); | 1171 | dev_name(&device->cdev->dev)); |
1169 | break; | 1172 | break; |
1170 | case 0x02: | 1173 | case 0x02: |
1171 | PRINT_WARN("(%s): DV Exception - no performance impact\n", | 1174 | PRINT_WARN("(%s): DV Exception - no performance impact\n", |
1172 | device->cdev->dev.bus_id); | 1175 | dev_name(&device->cdev->dev)); |
1173 | break; | 1176 | break; |
1174 | case 0x03: | 1177 | case 0x03: |
1175 | PRINT_WARN("(%s): DV Exception on channel interface 0x%02x\n", | 1178 | PRINT_WARN("(%s): DV Exception on channel interface 0x%02x\n", |
1176 | device->cdev->dev.bus_id, sense->fmt.f71.md[0]); | 1179 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); |
1177 | break; | 1180 | break; |
1178 | case 0x04: | 1181 | case 0x04: |
1179 | PRINT_WARN("(%s): DV Exception on loader 0x%02x\n", | 1182 | PRINT_WARN("(%s): DV Exception on loader 0x%02x\n", |
1180 | device->cdev->dev.bus_id, sense->fmt.f71.md[0]); | 1183 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); |
1181 | break; | 1184 | break; |
1182 | case 0x05: | 1185 | case 0x05: |
1183 | PRINT_WARN("(%s): DV Exception on message display 0x%02x\n", | 1186 | PRINT_WARN("(%s): DV Exception on message display 0x%02x\n", |
1184 | device->cdev->dev.bus_id, sense->fmt.f71.md[0]); | 1187 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); |
1185 | break; | 1188 | break; |
1186 | case 0x06: | 1189 | case 0x06: |
1187 | PRINT_WARN("(%s): DV Exception in tape path\n", | 1190 | PRINT_WARN("(%s): DV Exception in tape path\n", |
1188 | device->cdev->dev.bus_id); | 1191 | dev_name(&device->cdev->dev)); |
1189 | break; | 1192 | break; |
1190 | case 0x07: | 1193 | case 0x07: |
1191 | PRINT_WARN("(%s): DV Exception in drive\n", | 1194 | PRINT_WARN("(%s): DV Exception in drive\n", |
1192 | device->cdev->dev.bus_id); | 1195 | dev_name(&device->cdev->dev)); |
1193 | break; | 1196 | break; |
1194 | default: | 1197 | default: |
1195 | PRINT_WARN("(%s): DSIM ExMsg: 0x%02x\n", | 1198 | PRINT_WARN("(%s): DSIM ExMsg: 0x%02x\n", |
1196 | device->cdev->dev.bus_id, sense->fmt.f71.emc); | 1199 | dev_name(&device->cdev->dev), sense->fmt.f71.emc); |
1197 | } | 1200 | } |
1198 | /* Service Message */ | 1201 | /* Service Message */ |
1199 | switch (sense->fmt.f71.smc) { | 1202 | switch (sense->fmt.f71.smc) { |
1200 | case 0x01: | 1203 | case 0x01: |
1201 | PRINT_WARN("(%s): Repair impact is unknown\n", | 1204 | PRINT_WARN("(%s): Repair impact is unknown\n", |
1202 | device->cdev->dev.bus_id); | 1205 | dev_name(&device->cdev->dev)); |
1203 | break; | 1206 | break; |
1204 | case 0x02: | 1207 | case 0x02: |
1205 | PRINT_WARN("(%s): Repair will not impact device performance\n", | 1208 | PRINT_WARN("(%s): Repair will not impact device performance\n", |
1206 | device->cdev->dev.bus_id); | 1209 | dev_name(&device->cdev->dev)); |
1207 | break; | 1210 | break; |
1208 | case 0x03: | 1211 | case 0x03: |
1209 | if (sense->fmt.f71.mdf == 0) | 1212 | if (sense->fmt.f71.mdf == 0) |
1210 | PRINT_WARN("(%s): Repair will disable channel path " | 1213 | PRINT_WARN("(%s): Repair will disable channel path " |
1211 | "0x%x on DV\n", | 1214 | "0x%x on DV\n", |
1212 | device->cdev->dev.bus_id, | 1215 | dev_name(&device->cdev->dev), |
1213 | sense->fmt.f71.md[1]); | 1216 | sense->fmt.f71.md[1]); |
1214 | else | 1217 | else |
1215 | PRINT_WARN("(%s): Repair will disable channel path " | 1218 | PRINT_WARN("(%s): Repair will disable channel path " |
1216 | "(0x%x-0x%x) on DV\n", | 1219 | "(0x%x-0x%x) on DV\n", |
1217 | device->cdev->dev.bus_id, | 1220 | dev_name(&device->cdev->dev), |
1218 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | 1221 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
1219 | break; | 1222 | break; |
1220 | case 0x04: | 1223 | case 0x04: |
1221 | if (sense->fmt.f71.mdf == 0) | 1224 | if (sense->fmt.f71.mdf == 0) |
1222 | PRINT_WARN("(%s): Repair will disable interface 0x%x " | 1225 | PRINT_WARN("(%s): Repair will disable interface 0x%x " |
1223 | "on DV\n", | 1226 | "on DV\n", |
1224 | device->cdev->dev.bus_id, | 1227 | dev_name(&device->cdev->dev), |
1225 | sense->fmt.f71.md[1]); | 1228 | sense->fmt.f71.md[1]); |
1226 | else | 1229 | else |
1227 | PRINT_WARN("(%s): Repair will disable interfaces " | 1230 | PRINT_WARN("(%s): Repair will disable interfaces " |
1228 | "(0x%x-0x%x) on DV\n", | 1231 | "(0x%x-0x%x) on DV\n", |
1229 | device->cdev->dev.bus_id, | 1232 | dev_name(&device->cdev->dev), |
1230 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | 1233 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
1231 | break; | 1234 | break; |
1232 | case 0x05: | 1235 | case 0x05: |
1233 | if (sense->fmt.f71.mdf == 0) | 1236 | if (sense->fmt.f71.mdf == 0) |
1234 | PRINT_WARN("(%s): Repair will disable loader 0x%x " | 1237 | PRINT_WARN("(%s): Repair will disable loader 0x%x " |
1235 | "on DV\n", | 1238 | "on DV\n", |
1236 | device->cdev->dev.bus_id, | 1239 | dev_name(&device->cdev->dev), |
1237 | sense->fmt.f71.md[1]); | 1240 | sense->fmt.f71.md[1]); |
1238 | else | 1241 | else |
1239 | PRINT_WARN("(%s): Repair will disable loader " | 1242 | PRINT_WARN("(%s): Repair will disable loader " |
1240 | "(0x%x-0x%x) on DV\n", | 1243 | "(0x%x-0x%x) on DV\n", |
1241 | device->cdev->dev.bus_id, | 1244 | dev_name(&device->cdev->dev), |
1242 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | 1245 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
1243 | break; | 1246 | break; |
1244 | case 0x07: | 1247 | case 0x07: |
1245 | PRINT_WARN("(%s): Repair will disable access to DV\n", | 1248 | PRINT_WARN("(%s): Repair will disable access to DV\n", |
1246 | device->cdev->dev.bus_id); | 1249 | dev_name(&device->cdev->dev)); |
1247 | break; | 1250 | break; |
1248 | case 0x08: | 1251 | case 0x08: |
1249 | if (sense->fmt.f71.mdf == 0) | 1252 | if (sense->fmt.f71.mdf == 0) |
1250 | PRINT_WARN("(%s): Repair will disable message " | 1253 | PRINT_WARN("(%s): Repair will disable message " |
1251 | "display 0x%x on DV\n", | 1254 | "display 0x%x on DV\n", |
1252 | device->cdev->dev.bus_id, | 1255 | dev_name(&device->cdev->dev), |
1253 | sense->fmt.f71.md[1]); | 1256 | sense->fmt.f71.md[1]); |
1254 | else | 1257 | else |
1255 | PRINT_WARN("(%s): Repair will disable message " | 1258 | PRINT_WARN("(%s): Repair will disable message " |
1256 | "displays (0x%x-0x%x) on DV\n", | 1259 | "displays (0x%x-0x%x) on DV\n", |
1257 | device->cdev->dev.bus_id, | 1260 | dev_name(&device->cdev->dev), |
1258 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | 1261 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
1259 | break; | 1262 | break; |
1260 | case 0x09: | 1263 | case 0x09: |
1261 | PRINT_WARN("(%s): Clean DV\n", device->cdev->dev.bus_id); | 1264 | PRINT_WARN("(%s): Clean DV\n", dev_name(&device->cdev->dev)); |
1262 | break; | 1265 | break; |
1263 | default: | 1266 | default: |
1264 | PRINT_WARN("(%s): DSIM ServiceMsg: 0x%02x\n", | 1267 | PRINT_WARN("(%s): DSIM ServiceMsg: 0x%02x\n", |
1265 | device->cdev->dev.bus_id, sense->fmt.f71.smc); | 1268 | dev_name(&device->cdev->dev), sense->fmt.f71.smc); |
1266 | } | 1269 | } |
1267 | } | 1270 | } |
1268 | 1271 | ||
@@ -1279,18 +1282,18 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb) | |||
1279 | return; | 1282 | return; |
1280 | if ((sense->mc > 0) && (sense->mc < TAPE_3590_MAX_MSG)) { | 1283 | if ((sense->mc > 0) && (sense->mc < TAPE_3590_MAX_MSG)) { |
1281 | if (tape_3590_msg[sense->mc] != NULL) | 1284 | if (tape_3590_msg[sense->mc] != NULL) |
1282 | PRINT_WARN("(%s): %s\n", device->cdev->dev.bus_id, | 1285 | PRINT_WARN("(%s): %s\n", dev_name(&device->cdev->dev), |
1283 | tape_3590_msg[sense->mc]); | 1286 | tape_3590_msg[sense->mc]); |
1284 | else { | 1287 | else { |
1285 | PRINT_WARN("(%s): Message Code 0x%x\n", | 1288 | PRINT_WARN("(%s): Message Code 0x%x\n", |
1286 | device->cdev->dev.bus_id, sense->mc); | 1289 | dev_name(&device->cdev->dev), sense->mc); |
1287 | } | 1290 | } |
1288 | return; | 1291 | return; |
1289 | } | 1292 | } |
1290 | if (sense->mc == 0xf0) { | 1293 | if (sense->mc == 0xf0) { |
1291 | /* Standard Media Information Message */ | 1294 | /* Standard Media Information Message */ |
1292 | PRINT_WARN("(%s): MIM SEV=%i, MC=%02x, ES=%x/%x, " | 1295 | PRINT_WARN("(%s): MIM SEV=%i, MC=%02x, ES=%x/%x, " |
1293 | "RC=%02x-%04x-%02x\n", device->cdev->dev.bus_id, | 1296 | "RC=%02x-%04x-%02x\n", dev_name(&device->cdev->dev), |
1294 | sense->fmt.f70.sev, sense->mc, | 1297 | sense->fmt.f70.sev, sense->mc, |
1295 | sense->fmt.f70.emc, sense->fmt.f70.smc, | 1298 | sense->fmt.f70.emc, sense->fmt.f70.smc, |
1296 | sense->fmt.f70.refcode, sense->fmt.f70.mid, | 1299 | sense->fmt.f70.refcode, sense->fmt.f70.mid, |
@@ -1302,7 +1305,7 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb) | |||
1302 | /* Standard I/O Subsystem Service Information Message */ | 1305 | /* Standard I/O Subsystem Service Information Message */ |
1303 | PRINT_WARN("(%s): IOSIM SEV=%i, DEVTYPE=3590/%02x, " | 1306 | PRINT_WARN("(%s): IOSIM SEV=%i, DEVTYPE=3590/%02x, " |
1304 | "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", | 1307 | "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", |
1305 | device->cdev->dev.bus_id, sense->fmt.f71.sev, | 1308 | dev_name(&device->cdev->dev), sense->fmt.f71.sev, |
1306 | device->cdev->id.dev_model, | 1309 | device->cdev->id.dev_model, |
1307 | sense->mc, sense->fmt.f71.emc, | 1310 | sense->mc, sense->fmt.f71.emc, |
1308 | sense->fmt.f71.smc, sense->fmt.f71.refcode1, | 1311 | sense->fmt.f71.smc, sense->fmt.f71.refcode1, |
@@ -1314,7 +1317,7 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb) | |||
1314 | /* Standard Device Service Information Message */ | 1317 | /* Standard Device Service Information Message */ |
1315 | PRINT_WARN("(%s): DEVSIM SEV=%i, DEVTYPE=3590/%02x, " | 1318 | PRINT_WARN("(%s): DEVSIM SEV=%i, DEVTYPE=3590/%02x, " |
1316 | "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", | 1319 | "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", |
1317 | device->cdev->dev.bus_id, sense->fmt.f71.sev, | 1320 | dev_name(&device->cdev->dev), sense->fmt.f71.sev, |
1318 | device->cdev->id.dev_model, | 1321 | device->cdev->id.dev_model, |
1319 | sense->mc, sense->fmt.f71.emc, | 1322 | sense->mc, sense->fmt.f71.emc, |
1320 | sense->fmt.f71.smc, sense->fmt.f71.refcode1, | 1323 | sense->fmt.f71.smc, sense->fmt.f71.refcode1, |
@@ -1327,7 +1330,7 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb) | |||
1327 | return; | 1330 | return; |
1328 | } | 1331 | } |
1329 | PRINT_WARN("(%s): Device Message(%x)\n", | 1332 | PRINT_WARN("(%s): Device Message(%x)\n", |
1330 | device->cdev->dev.bus_id, sense->mc); | 1333 | dev_name(&device->cdev->dev), sense->mc); |
1331 | } | 1334 | } |
1332 | 1335 | ||
1333 | static int tape_3590_crypt_error(struct tape_device *device, | 1336 | static int tape_3590_crypt_error(struct tape_device *device, |
@@ -1336,10 +1339,11 @@ static int tape_3590_crypt_error(struct tape_device *device, | |||
1336 | u8 cu_rc, ekm_rc1; | 1339 | u8 cu_rc, ekm_rc1; |
1337 | u16 ekm_rc2; | 1340 | u16 ekm_rc2; |
1338 | u32 drv_rc; | 1341 | u32 drv_rc; |
1339 | char *bus_id, *sense; | 1342 | const char *bus_id; |
1343 | char *sense; | ||
1340 | 1344 | ||
1341 | sense = ((struct tape_3590_sense *) irb->ecw)->fmt.data; | 1345 | sense = ((struct tape_3590_sense *) irb->ecw)->fmt.data; |
1342 | bus_id = device->cdev->dev.bus_id; | 1346 | bus_id = dev_name(&device->cdev->dev); |
1343 | cu_rc = sense[0]; | 1347 | cu_rc = sense[0]; |
1344 | drv_rc = *((u32*) &sense[5]) & 0xffffff; | 1348 | drv_rc = *((u32*) &sense[5]) & 0xffffff; |
1345 | ekm_rc1 = sense[9]; | 1349 | ekm_rc1 = sense[9]; |
@@ -1440,7 +1444,7 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request, | |||
1440 | * "device intervention" is not very meaningfull | 1444 | * "device intervention" is not very meaningfull |
1441 | */ | 1445 | */ |
1442 | PRINT_WARN("(%s): Tape operation when medium not loaded\n", | 1446 | PRINT_WARN("(%s): Tape operation when medium not loaded\n", |
1443 | device->cdev->dev.bus_id); | 1447 | dev_name(&device->cdev->dev)); |
1444 | tape_med_state_set(device, MS_UNLOADED); | 1448 | tape_med_state_set(device, MS_UNLOADED); |
1445 | tape_3590_schedule_work(device, TO_CRYPT_OFF); | 1449 | tape_3590_schedule_work(device, TO_CRYPT_OFF); |
1446 | return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); | 1450 | return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); |
@@ -1487,18 +1491,18 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request, | |||
1487 | 1491 | ||
1488 | case 0x6020: | 1492 | case 0x6020: |
1489 | PRINT_WARN("(%s): Cartridge of wrong type ?\n", | 1493 | PRINT_WARN("(%s): Cartridge of wrong type ?\n", |
1490 | device->cdev->dev.bus_id); | 1494 | dev_name(&device->cdev->dev)); |
1491 | return tape_3590_erp_basic(device, request, irb, -EMEDIUMTYPE); | 1495 | return tape_3590_erp_basic(device, request, irb, -EMEDIUMTYPE); |
1492 | 1496 | ||
1493 | case 0x8011: | 1497 | case 0x8011: |
1494 | PRINT_WARN("(%s): Another host has reserved the tape device\n", | 1498 | PRINT_WARN("(%s): Another host has reserved the tape device\n", |
1495 | device->cdev->dev.bus_id); | 1499 | dev_name(&device->cdev->dev)); |
1496 | return tape_3590_erp_basic(device, request, irb, -EPERM); | 1500 | return tape_3590_erp_basic(device, request, irb, -EPERM); |
1497 | case 0x8013: | 1501 | case 0x8013: |
1498 | PRINT_WARN("(%s): Another host has privileged access to the " | 1502 | PRINT_WARN("(%s): Another host has privileged access to the " |
1499 | "tape device\n", device->cdev->dev.bus_id); | 1503 | "tape device\n", dev_name(&device->cdev->dev)); |
1500 | PRINT_WARN("(%s): To solve the problem unload the current " | 1504 | PRINT_WARN("(%s): To solve the problem unload the current " |
1501 | "cartridge!\n", device->cdev->dev.bus_id); | 1505 | "cartridge!\n", dev_name(&device->cdev->dev)); |
1502 | return tape_3590_erp_basic(device, request, irb, -EPERM); | 1506 | return tape_3590_erp_basic(device, request, irb, -EPERM); |
1503 | default: | 1507 | default: |
1504 | return tape_3590_erp_basic(device, request, irb, -EIO); | 1508 | return tape_3590_erp_basic(device, request, irb, -EIO); |