diff mbox series

[v3,07/11] vfio/ccw: Update trace data for not operational event

Message ID 20220630203647.2529815-8-farman@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390/vfio-ccw rework | expand

Commit Message

Eric Farman June 30, 2022, 8:36 p.m. UTC
We currently cut a very basic trace whenever the FSM directs
control to the not operational routine.

Convert this to a message, so it's alongside the other configuration
related traces (create, remove, etc.), and record both the event
that brought us here and the current state of the device.
This will provide some better footprints if things go bad.

Suggested-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Eric Farman <farman@linux.ibm.com>
---
 drivers/s390/cio/vfio_ccw_fsm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Matthew Rosato July 5, 2022, 7:29 p.m. UTC | #1
On 6/30/22 4:36 PM, Eric Farman wrote:
> We currently cut a very basic trace whenever the FSM directs
> control to the not operational routine.
> 
> Convert this to a message, so it's alongside the other configuration
> related traces (create, remove, etc.), and record both the event
> that brought us here and the current state of the device.
> This will provide some better footprints if things go bad.
> 
> Suggested-by: Matthew Rosato <mjrosato@linux.ibm.com>
> Signed-off-by: Eric Farman <farman@linux.ibm.com>

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>

> ---
>   drivers/s390/cio/vfio_ccw_fsm.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_fsm.c b/drivers/s390/cio/vfio_ccw_fsm.c
> index bbcc5b486749..88e529a2e184 100644
> --- a/drivers/s390/cio/vfio_ccw_fsm.c
> +++ b/drivers/s390/cio/vfio_ccw_fsm.c
> @@ -160,8 +160,12 @@ static void fsm_notoper(struct vfio_ccw_private *private,
>   {
>   	struct subchannel *sch = private->sch;
>   
> -	VFIO_CCW_TRACE_EVENT(2, "notoper");
> -	VFIO_CCW_TRACE_EVENT(2, dev_name(&sch->dev));
> +	VFIO_CCW_MSG_EVENT(2, "sch %x.%x.%04x: notoper event %x state %x\n",
> +			   sch->schid.cssid,
> +			   sch->schid.ssid,
> +			   sch->schid.sch_no,
> +			   event,
> +			   private->state);
>   
>   	/*
>   	 * TODO:
diff mbox series

Patch

diff --git a/drivers/s390/cio/vfio_ccw_fsm.c b/drivers/s390/cio/vfio_ccw_fsm.c
index bbcc5b486749..88e529a2e184 100644
--- a/drivers/s390/cio/vfio_ccw_fsm.c
+++ b/drivers/s390/cio/vfio_ccw_fsm.c
@@ -160,8 +160,12 @@  static void fsm_notoper(struct vfio_ccw_private *private,
 {
 	struct subchannel *sch = private->sch;
 
-	VFIO_CCW_TRACE_EVENT(2, "notoper");
-	VFIO_CCW_TRACE_EVENT(2, dev_name(&sch->dev));
+	VFIO_CCW_MSG_EVENT(2, "sch %x.%x.%04x: notoper event %x state %x\n",
+			   sch->schid.cssid,
+			   sch->schid.ssid,
+			   sch->schid.sch_no,
+			   event,
+			   private->state);
 
 	/*
 	 * TODO: