OSDN Git Service

Merge "diag: Update event and log ranges of diag masks"
authorLinux Build Service Account <lnxbuild@localhost>
Fri, 20 Sep 2019 11:12:12 +0000 (04:12 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Fri, 20 Sep 2019 11:12:11 +0000 (04:12 -0700)
arch/arm/boot/dts/qcom/msm8996.dtsi
drivers/soc/qcom/hab/ghs_comm.c
drivers/soc/qcom/hab/hab_ghs.c

index 5836185..faba810 100644 (file)
                        interrupts = <0 131 0>;
                        usb-phy = <&qusb_phy0>, <&ssphy>;
                        tx-fifo-resize;
+                       snps,dis_u2_susphy_quirk;
+                       snps,dis_enblslpm_quirk;
                        snps,usb3-u1u2-disable;
                        snps,nominal-elastic-buffer;
                        snps,is-utmi-l1-suspend;
                        interrupts = <0 138 0>;
                        usb-phy = <&qusb_phy1>, <&usb_nop_phy>;
                        maximum-speed = "high-speed";
+                       snps,dis_u2_susphy_quirk;
+                       snps,dis_enblslpm_quirk;
                        snps,nominal-elastic-buffer;
                        snps,is-utmi-l1-suspend;
                        snps,hird-threshold = /bits/ 8 <0x0>;
index fbd5797..0234172 100644 (file)
@@ -53,6 +53,12 @@ int physical_channel_send(struct physical_channel *pchan,
        GIPC_Result result = GIPC_Success;
        uint8_t *msg = NULL;
 
+       if (!dev) {
+               pr_err("no send pchan %s has been de-alloced msg for %zd bytes\n",
+                       pchan->name);
+               return -ENODEV;
+       }
+
        spin_lock_bh(&dev->io_lock);
 
        result = GIPC_PrepareMessage(dev->endpoint, sizebytes+sizeof(*header),
@@ -104,10 +110,15 @@ void physical_channel_rx_dispatch(unsigned long physical_channel)
                (struct physical_channel *)physical_channel;
        struct ghs_vdev *dev = (struct ghs_vdev *)pchan->hyp_data;
        GIPC_Result result = GIPC_Success;
-
        uint32_t events;
        unsigned long flags;
 
+       if (!dev) {
+               pr_err("no recv pchan %s has been de-alloced msg for %zd bytes\n",
+                       pchan->name);
+               return;
+       }
+
        spin_lock_irqsave(&pchan->rxbuf_lock, flags);
        events = kgipc_dequeue_events(dev->endpoint);
        spin_unlock_irqrestore(&pchan->rxbuf_lock, flags);
index 2c8fb14..f479d69 100644 (file)
@@ -263,7 +263,8 @@ int habhyp_commdev_dealloc(void *commdev)
        kgipc_endpoint_free(dev->endpoint);
        kfree(dev->read_data);
        kfree(dev);
-
+       pchan->closed = 1;
+       pchan->hyp_data = NULL;
        if (get_refcnt(pchan->refcount) > 1) {
                pr_warn("potential leak pchan %s vchans %d refcnt %d\n",
                        pchan->name, pchan->vcnt, get_refcnt(pchan->refcount));