Merge tag 'scmi-updates-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
[linux-block.git] / drivers / firmware / arm_scmi / virtio.c
index eefcc4146749ce0a7c50ad37ef01c0c41cc4fb59..97d7cf53b77487e603fcecf3e052fdfa6062eaf5 100644 (file)
@@ -95,7 +95,7 @@ static int scmi_vio_feed_vq_rx(struct scmi_vio_channel *vioch,
 
        rc = virtqueue_add_inbuf(vioch->vqueue, &sg_in, 1, msg, GFP_ATOMIC);
        if (rc)
-               dev_err_once(dev, "failed to add to virtqueue (%d)\n", rc);
+               dev_err(dev, "failed to add to RX virtqueue (%d)\n", rc);
        else
                virtqueue_kick(vioch->vqueue);
 
@@ -193,8 +193,8 @@ static unsigned int virtio_get_max_msg(struct scmi_chan_info *base_cinfo)
 static int virtio_link_supplier(struct device *dev)
 {
        if (!scmi_vdev) {
-               dev_notice_once(dev,
-                               "Deferring probe after not finding a bound scmi-virtio device\n");
+               dev_notice(dev,
+                          "Deferring probe after not finding a bound scmi-virtio device\n");
                return -EPROBE_DEFER;
        }
 
@@ -334,9 +334,8 @@ static int virtio_send_message(struct scmi_chan_info *cinfo,
        rc = virtqueue_add_sgs(vioch->vqueue, sgs, 1, 1, msg, GFP_ATOMIC);
        if (rc) {
                list_add(&msg->list, &vioch->free_list);
-               dev_err_once(vioch->cinfo->dev,
-                            "%s() failed to add to virtqueue (%d)\n", __func__,
-                            rc);
+               dev_err(vioch->cinfo->dev,
+                       "failed to add to TX virtqueue (%d)\n", rc);
        } else {
                virtqueue_kick(vioch->vqueue);
        }
@@ -427,10 +426,10 @@ static int scmi_vio_probe(struct virtio_device *vdev)
                        sz /= DESCRIPTORS_PER_TX_MSG;
 
                if (sz > MSG_TOKEN_MAX) {
-                       dev_info_once(dev,
-                                     "%s virtqueue could hold %d messages. Only %ld allowed to be pending.\n",
-                                     channels[i].is_rx ? "rx" : "tx",
-                                     sz, MSG_TOKEN_MAX);
+                       dev_info(dev,
+                                "%s virtqueue could hold %d messages. Only %ld allowed to be pending.\n",
+                                channels[i].is_rx ? "rx" : "tx",
+                                sz, MSG_TOKEN_MAX);
                        sz = MSG_TOKEN_MAX;
                }
                channels[i].max_msg = sz;
@@ -460,12 +459,13 @@ static void scmi_vio_remove(struct virtio_device *vdev)
 
 static int scmi_vio_validate(struct virtio_device *vdev)
 {
+#ifdef CONFIG_ARM_SCMI_TRANSPORT_VIRTIO_VERSION1_COMPLIANCE
        if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
                dev_err(&vdev->dev,
                        "device does not comply with spec version 1.x\n");
                return -EINVAL;
        }
-
+#endif
        return 0;
 }