Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/ps3: Warn on PS3 device errors

To aid debugging PS3 boot problems change the log level
of several PS3 device errors from pr_debug to pr_warn.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/eb5c1c10da0bbdeb27c8b069187b4f58e429e837.1622746428.git.geoff@infradead.org

authored by

Geoff Levand and committed by
Michael Ellerman
472b440f 6caebff1

+17 -16
+5 -4
arch/powerpc/platforms/ps3/system-bus.c
··· 64 64 result = lv1_open_device(dev->bus_id, dev->dev_id, 0); 65 65 66 66 if (result) { 67 - pr_debug("%s:%d: lv1_open_device failed: %s\n", __func__, 68 - __LINE__, ps3_result(result)); 69 - result = -EPERM; 67 + pr_warn("%s:%d: lv1_open_device dev=%u.%u(%s) failed: %s\n", 68 + __func__, __LINE__, dev->match_id, dev->match_sub_id, 69 + dev_name(&dev->core), ps3_result(result)); 70 + result = -EPERM; 70 71 } 71 72 72 73 done: ··· 121 120 result = lv1_gpu_open(0); 122 121 123 122 if (result) { 124 - pr_debug("%s:%d: lv1_gpu_open failed: %s\n", __func__, 123 + pr_warn("%s:%d: lv1_gpu_open failed: %s\n", __func__, 125 124 __LINE__, ps3_result(result)); 126 125 result = -EPERM; 127 126 }
+1 -1
drivers/ps3/ps3-vuart.c
··· 358 358 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_written); 359 359 360 360 if (result) { 361 - dev_dbg(&dev->core, "%s:%d: lv1_write_virtual_uart failed: " 361 + dev_warn(&dev->core, "%s:%d: lv1_write_virtual_uart failed: " 362 362 "%s\n", __func__, __LINE__, ps3_result(result)); 363 363 return result; 364 364 }
+11 -11
drivers/ps3/ps3av.c
··· 217 217 /* send pkt */ 218 218 res = ps3av_vuart_write(ps3av->dev, send_buf, write_len); 219 219 if (res < 0) { 220 - dev_dbg(&ps3av->dev->core, 221 - "%s: ps3av_vuart_write() failed (result=%d)\n", 222 - __func__, res); 220 + dev_warn(&ps3av->dev->core, 221 + "%s:%d: ps3av_vuart_write() failed: %s\n", __func__, 222 + __LINE__, ps3_result(res)); 223 223 return res; 224 224 } 225 225 ··· 230 230 res = ps3av_vuart_read(ps3av->dev, recv_buf, PS3AV_HDR_SIZE, 231 231 timeout); 232 232 if (res != PS3AV_HDR_SIZE) { 233 - dev_dbg(&ps3av->dev->core, 234 - "%s: ps3av_vuart_read() failed (result=%d)\n", 235 - __func__, res); 233 + dev_warn(&ps3av->dev->core, 234 + "%s:%d: ps3av_vuart_read() failed: %s\n", __func__, 235 + __LINE__, ps3_result(res)); 236 236 return res; 237 237 } 238 238 ··· 240 240 res = ps3av_vuart_read(ps3av->dev, &recv_buf->cid, 241 241 recv_buf->size, timeout); 242 242 if (res < 0) { 243 - dev_dbg(&ps3av->dev->core, 244 - "%s: ps3av_vuart_read() failed (result=%d)\n", 245 - __func__, res); 243 + dev_warn(&ps3av->dev->core, 244 + "%s:%d: ps3av_vuart_read() failed: %s\n", __func__, 245 + __LINE__, ps3_result(res)); 246 246 return res; 247 247 } 248 248 res += PS3AV_HDR_SIZE; /* total len */ ··· 251 251 } while (event); 252 252 253 253 if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) { 254 - dev_dbg(&ps3av->dev->core, "%s: reply err (result=%x)\n", 255 - __func__, recv_buf->cid); 254 + dev_warn(&ps3av->dev->core, "%s:%d: reply err: %x\n", __func__, 255 + __LINE__, recv_buf->cid); 256 256 return -EINVAL; 257 257 } 258 258