[PORT FROM R2] Revert "[REVERT ME]n_gsm: add dedicated traces in MUX for APIMR issues"
authorlebsir <samix.lebsir@intel.com>
Tue, 17 Apr 2012 09:50:53 +0000 (11:50 +0200)
committerbuildbot <buildbot@intel.com>
Wed, 18 Apr 2012 11:56:05 +0000 (04:56 -0700)
BZ: 25958

This reverts commit 6fe94a56686e6f4139518c0e9e072da68ecccd71.
This reverts patch http://android.intel.com:8080/#/c/41335

Change-Id: Ib47c9dbd3f2217f1ec2c5c89a1c2a05c661cc886
Signed-off-by: lebsir <samix.lebsir@intel.com>
Reviewed-on: http://android.intel.com:8080/43685
Reviewed-by: Predon, Frederic <frederic.predon@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/tty/n_gsm.c

index 38e416a..034c349 100644 (file)
@@ -1552,7 +1552,8 @@ static void gsm_dlci_data(struct gsm_dlci *dlci, u8 *data, int clen)
        unsigned int modem = 0;
        int len = clen;
 
-       pr_err("%s: %d bytes for tty %d\n", __func__, len, dlci->addr);
+       if (debug & 16)
+               pr_debug("%s: %d bytes for tty %p\n", __func__, len, tty);
 
        if (tty) {
                switch (dlci->adaption)  {
@@ -1742,7 +1743,8 @@ static void gsm_queue(struct gsm_mux *gsm)
        }
        if (gsm->fcs != GOOD_FCS) {
                gsm->bad_fcs++;
-               pr_err("BAD FCS %02x\n", gsm->fcs);
+               if (debug & 4)
+                       pr_debug("BAD FCS %02x\n", gsm->fcs);
                return;
        }
        address = gsm->address >> 1;
@@ -1905,7 +1907,7 @@ static void gsm0_receive(struct gsm_mux *gsm, unsigned char c)
                        gsm->state = GSM_SEARCH;
                        break;
                }
-               pr_err("wait for GSM0_SOF, while got 0x%x\n", (u32)c);
+               pr_debug("wait for GSM0_SOF, while got 0x%x\n", (u32)c);
                break;
        }
 }
@@ -2631,7 +2633,7 @@ static int gsmld_ioctl(struct tty_struct *tty, struct file *file,
 
 static int gsm_mux_net_open(struct net_device *net)
 {
-       pr_err("%s called\n", __func__);
+       pr_debug("%s called\n", __func__);
        netif_start_queue(net);
        return 0;
 }
@@ -2657,7 +2659,6 @@ static void net_free(struct kref *ref)
        if (dlci->net) {
                dlci->adaption = 1;
                dlci->data = gsm_dlci_data;
-               pr_err("net_free %d", kfifo_len(dlci->fifo));
                unregister_netdev(dlci->net);
                free_netdev(dlci->net);
                dlci->net = 0;
@@ -2839,7 +2840,6 @@ static int gsm_create_network(struct gsm_dlci *dlci, struct gsm_netconfig *nc)
        mux_net->dlci = dlci;
        kref_init(&mux_net->ref);
        strncpy(nc->if_name, net->name, IFNAMSIZ); /* return net name */
-       pr_err("netif done");
        return net->ifindex;    /* return network index */
 
 error_ret:
@@ -3077,7 +3077,6 @@ static int gsmtty_ioctl(struct tty_struct *tty,
 
        switch (cmd) {
        case GSMIOC_ENABLE_NET:
-               pr_err("GSMIOC_ENABLE_NET");
                if (copy_from_user(&nc, (void __user *)arg, sizeof(nc)))
                        return -EFAULT;
                nc.if_name[IFNAMSIZ-1] = '\0';
@@ -3087,7 +3086,6 @@ static int gsmtty_ioctl(struct tty_struct *tty,
                        return -EFAULT;
                return index;
        case GSMIOC_DISABLE_NET:
-               pr_err("GSMIOC_DISABLE_NET");
                if (!capable(CAP_NET_ADMIN))
                        return -EPERM;
                gsm_destroy_network(dlci);