aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2013-11-10 07:05:51 -0500
committerChris Zankel <chris@zankel.net>2014-01-14 13:19:51 -0500
commita6e16b9aaf0df4b1de8853cad97f387ade9fa8f5 (patch)
tree0990a0d4fa730f2add46c527ec368200db4d060f
parent35e14b443aa906ffb4ff8bd884e393c1bbdb6670 (diff)
xtensa: ISS: clean up diagnostic, increase verbosity
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
-rw-r--r--arch/xtensa/platforms/iss/network.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index 668ed624b2c2..3aff4302f938 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/arch/xtensa/platforms/iss/network.c
@@ -165,8 +165,8 @@ static int tuntap_open(struct iss_net_private *lp)
165 165
166 fd = simc_open("/dev/net/tun", 02, 0); /* O_RDWR */ 166 fd = simc_open("/dev/net/tun", 02, 0); /* O_RDWR */
167 if (fd < 0) { 167 if (fd < 0) {
168 pr_err("Failed to open /dev/net/tun, returned %d (errno = %d)\n", 168 pr_err("%s: failed to open /dev/net/tun, returned %d (errno = %d)\n",
169 fd, errno); 169 lp->dev->name, fd, errno);
170 return fd; 170 return fd;
171 } 171 }
172 172
@@ -176,8 +176,8 @@ static int tuntap_open(struct iss_net_private *lp)
176 176
177 err = simc_ioctl(fd, TUNSETIFF, &ifr); 177 err = simc_ioctl(fd, TUNSETIFF, &ifr);
178 if (err < 0) { 178 if (err < 0) {
179 pr_err("Failed to set interface, returned %d (errno = %d)\n", 179 pr_err("%s: failed to set interface %s, returned %d (errno = %d)\n",
180 err, errno); 180 lp->dev->name, dev_name, err, errno);
181 simc_close(fd); 181 simc_close(fd);
182 return err; 182 return err;
183 } 183 }
@@ -232,11 +232,13 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init)
232 if (*init == ',') { 232 if (*init == ',') {
233 rem = split_if_spec(init + 1, &mac_str, &dev_name); 233 rem = split_if_spec(init + 1, &mac_str, &dev_name);
234 if (rem != NULL) { 234 if (rem != NULL) {
235 pr_err("Extra garbage on specification : '%s'\n", rem); 235 pr_err("%s: extra garbage on specification : '%s'\n",
236 dev->name, rem);
236 return 0; 237 return 0;
237 } 238 }
238 } else if (*init != '\0') { 239 } else if (*init != '\0') {
239 pr_err("Invalid argument: %s. Skipping device!\n", init); 240 pr_err("%s: invalid argument: %s. Skipping device!\n",
241 dev->name, init);
240 return 0; 242 return 0;
241 } 243 }
242 244
@@ -261,8 +263,6 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init)
261 lp->tp.protocol = tuntap_protocol; 263 lp->tp.protocol = tuntap_protocol;
262 lp->tp.poll = tuntap_poll; 264 lp->tp.poll = tuntap_poll;
263 265
264 pr_info("TUN/TAP backend -\n");
265
266 return 1; 266 return 1;
267} 267}
268 268
@@ -435,7 +435,7 @@ static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
435 435
436 } else { 436 } else {
437 netif_start_queue(dev); 437 netif_start_queue(dev);
438 pr_err("iss_net_start_xmit: failed(%d)\n", len); 438 pr_err("%s: %s failed(%d)\n", dev->name, __func__, len);
439 } 439 }
440 440
441 spin_unlock_irqrestore(&lp->lock, flags); 441 spin_unlock_irqrestore(&lp->lock, flags);
@@ -538,7 +538,8 @@ static int iss_net_configure(int index, char *init)
538 */ 538 */
539 539
540 if (!tuntap_probe(lp, index, init)) { 540 if (!tuntap_probe(lp, index, init)) {
541 pr_err("Invalid arguments. Skipping device!\n"); 541 pr_err("%s: invalid arguments. Skipping device!\n",
542 dev->name);
542 goto errout; 543 goto errout;
543 } 544 }
544 545
@@ -570,7 +571,7 @@ static int iss_net_configure(int index, char *init)
570 rtnl_unlock(); 571 rtnl_unlock();
571 572
572 if (err) { 573 if (err) {
573 pr_err("Error registering net device!\n"); 574 pr_err("%s: error registering net device!\n", dev->name);
574 /* XXX: should we call ->remove() here? */ 575 /* XXX: should we call ->remove() here? */
575 free_netdev(dev); 576 free_netdev(dev);
576 return 1; 577 return 1;