OLD | NEW |
1 /* qmidevice.c - gobi QMI device | 1 /* qmidevice.c - gobi QMI device |
2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved. | 2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved. |
3 | 3 |
4 * This program is free software; you can redistribute it and/or modify | 4 * This program is free software; you can redistribute it and/or modify |
5 * it under the terms of the GNU General Public License version 2 and | 5 * it under the terms of the GNU General Public License version 2 and |
6 * only version 2 as published by the Free Software Foundation. | 6 * only version 2 as published by the Free Software Foundation. |
7 | 7 |
8 * This program is distributed in the hope that it will be useful, | 8 * This program is distributed in the hope that it will be useful, |
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 | 1370 |
1371 write_sync(dev, wbuf, wbufsize, QMICTL); | 1371 write_sync(dev, wbuf, wbufsize, QMICTL); |
1372 | 1372 |
1373 msleep(100); | 1373 msleep(100); |
1374 if (!down_trylock(&sem)) { | 1374 if (!down_trylock(&sem)) { |
1375 spin_lock_irqsave(&dev->qmi.clients_lock, flags); | 1375 spin_lock_irqsave(&dev->qmi.clients_lock, flags); |
1376 if (client_delread(dev, QMICTL, tid, &rbuf, &rbufsize))
{ | 1376 if (client_delread(dev, QMICTL, tid, &rbuf, &rbufsize))
{ |
1377 spin_unlock_irqrestore(&dev->qmi.clients_lock, f
lags); | 1377 spin_unlock_irqrestore(&dev->qmi.clients_lock, f
lags); |
1378 kfree(rbuf); | 1378 kfree(rbuf); |
1379 break; | 1379 break; |
| 1380 } else { |
| 1381 spin_unlock_irqrestore(&dev->qmi.clients_lock, f
lags); |
1380 } | 1382 } |
1381 } else { | 1383 } else { |
1382 spin_lock_irqsave(&dev->qmi.clients_lock, flags); | 1384 spin_lock_irqsave(&dev->qmi.clients_lock, flags); |
1383 client_notify(dev, QMICTL, tid); | 1385 client_notify(dev, QMICTL, tid); |
1384 spin_unlock_irqrestore(&dev->qmi.clients_lock, flags); | 1386 spin_unlock_irqrestore(&dev->qmi.clients_lock, flags); |
1385 } | 1387 } |
1386 } | 1388 } |
1387 | 1389 |
1388 kfree(wbuf); | 1390 kfree(wbuf); |
1389 | 1391 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 DBG("bad get MEID resp\n"); | 1585 DBG("bad get MEID resp\n"); |
1584 memset(&dev->meid[0], '0', 14); | 1586 memset(&dev->meid[0], '0', 14); |
1585 } | 1587 } |
1586 | 1588 |
1587 client_free(dev, cid); | 1589 client_free(dev, cid); |
1588 return 0; | 1590 return 0; |
1589 } | 1591 } |
1590 | 1592 |
1591 module_param(qcusbnet2k_fwdelay, int, S_IRUGO | S_IWUSR); | 1593 module_param(qcusbnet2k_fwdelay, int, S_IRUGO | S_IWUSR); |
1592 MODULE_PARM_DESC(qcusbnet2k_fwdelay, "Delay for old firmware"); | 1594 MODULE_PARM_DESC(qcusbnet2k_fwdelay, "Delay for old firmware"); |
OLD | NEW |