Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: drivers/net/usb/gobi/qcusbnet.c

Issue 6672003: CHROMIUM: qcusbnet: Add gobi3k support. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/kernel.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | drivers/net/usb/gobi/qmidevice.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* qcusbnet.c - gobi network device 1 /* qcusbnet.c - gobi network 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
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 12
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software 14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 * 02110-1301, USA. 16 * 02110-1301, USA.
17 */ 17 */
18 18
19 #include "structs.h" 19 #include "structs.h"
20 #include "qmidevice.h" 20 #include "qmidevice.h"
21 #include "qmi.h" 21 #include "qmi.h"
22 #include "qcusbnet.h" 22 #include "qcusbnet.h"
23 23
24 #define DRIVER_VERSION "1.0.110" 24 #define DRIVER_VERSION "1.0.110"
Jason Glasgow 2011/03/10 20:58:40 As you change the driver do you want to change the
25 #define DRIVER_AUTHOR "Qualcomm Innovation Center" 25 #define DRIVER_AUTHOR "Qualcomm Innovation Center"
26 #define DRIVER_DESC "QCUSBNet2k" 26 #define DRIVER_DESC "QCUSBNet2k"
Jason Glasgow 2011/03/10 20:58:40 Is 2k correct? gobi?
27 27
28 int qcusbnet_debug; 28 int qcusbnet_debug;
29 static struct class *devclass; 29 static struct class *devclass;
30 30
31 int qc_suspend(struct usb_interface *iface, pm_message_t event) 31 int qc_suspend(struct usb_interface *iface, pm_message_t event)
32 { 32 {
33 struct usbnet *usbnet; 33 struct usbnet *usbnet;
34 struct qcusbnet *dev; 34 struct qcusbnet *dev;
35 35
36 if (!iface) 36 if (!iface)
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 int i; 125 int i;
126 struct usb_host_endpoint *endpoint = NULL; 126 struct usb_host_endpoint *endpoint = NULL;
127 struct usb_host_endpoint *in = NULL; 127 struct usb_host_endpoint *in = NULL;
128 struct usb_host_endpoint *out = NULL; 128 struct usb_host_endpoint *out = NULL;
129 129
130 if (iface->num_altsetting != 1) { 130 if (iface->num_altsetting != 1) {
131 DBG("invalid num_altsetting %u\n", iface->num_altsetting); 131 DBG("invalid num_altsetting %u\n", iface->num_altsetting);
132 return -EINVAL; 132 return -EINVAL;
133 } 133 }
134 134
135 » if (iface->cur_altsetting->desc.bInterfaceNumber != 0) { 135 » if (iface->cur_altsetting->desc.bInterfaceNumber != 0
136 » && iface->cur_altsetting->desc.bInterfaceNumber != 5) {
136 DBG("invalid interface %d\n", 137 DBG("invalid interface %d\n",
137 iface->cur_altsetting->desc.bInterfaceNumber); 138 iface->cur_altsetting->desc.bInterfaceNumber);
138 return -EINVAL; 139 return -EINVAL;
139 } 140 }
140 141
141 numends = iface->cur_altsetting->desc.bNumEndpoints; 142 numends = iface->cur_altsetting->desc.bNumEndpoints;
142 for (i = 0; i < numends; i++) { 143 for (i = 0; i < numends; i++) {
143 endpoint = iface->cur_altsetting->endpoint + i; 144 endpoint = iface->cur_altsetting->endpoint + i;
144 if (!endpoint) { 145 if (!endpoint) {
145 DBG("invalid endpoint %u\n", i); 146 DBG("invalid endpoint %u\n", i);
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 MKVIDPID(0x1199, 0x9004), /* Sierra Wireless Gobi 2000 */ 525 MKVIDPID(0x1199, 0x9004), /* Sierra Wireless Gobi 2000 */
525 MKVIDPID(0x1199, 0x9005), /* Sierra Wireless Gobi 2000 */ 526 MKVIDPID(0x1199, 0x9005), /* Sierra Wireless Gobi 2000 */
526 MKVIDPID(0x1199, 0x9006), /* Sierra Wireless Gobi 2000 */ 527 MKVIDPID(0x1199, 0x9006), /* Sierra Wireless Gobi 2000 */
527 MKVIDPID(0x1199, 0x9007), /* Sierra Wireless Gobi 2000 */ 528 MKVIDPID(0x1199, 0x9007), /* Sierra Wireless Gobi 2000 */
528 MKVIDPID(0x1199, 0x9008), /* Sierra Wireless Gobi 2000 */ 529 MKVIDPID(0x1199, 0x9008), /* Sierra Wireless Gobi 2000 */
529 MKVIDPID(0x1199, 0x9009), /* Sierra Wireless Gobi 2000 */ 530 MKVIDPID(0x1199, 0x9009), /* Sierra Wireless Gobi 2000 */
530 MKVIDPID(0x1199, 0x900a), /* Sierra Wireless Gobi 2000 */ 531 MKVIDPID(0x1199, 0x900a), /* Sierra Wireless Gobi 2000 */
531 MKVIDPID(0x05c6, 0x9225), /* Sony Gobi 2000 */ 532 MKVIDPID(0x05c6, 0x9225), /* Sony Gobi 2000 */
532 MKVIDPID(0x05c6, 0x9235), /* Top Global Gobi 2000 */ 533 MKVIDPID(0x05c6, 0x9235), /* Top Global Gobi 2000 */
533 MKVIDPID(0x05c6, 0x9275), /* iRex Technologies Gobi 2000 */ 534 MKVIDPID(0x05c6, 0x9275), /* iRex Technologies Gobi 2000 */
535
536 MKVIDPID(0x05c6, 0x920d), /* Qualcomm Gobi 3000 */
537 MKVIDPID(0x1410, 0xa021), /* Novatel Gobi 3000 */
534 { } 538 { }
535 }; 539 };
536 540
537 MODULE_DEVICE_TABLE(usb, qc_vidpids); 541 MODULE_DEVICE_TABLE(usb, qc_vidpids);
538 542
539 int qcnet_probe(struct usb_interface *iface, const struct usb_device_id *vidpids ) 543 int qcnet_probe(struct usb_interface *iface, const struct usb_device_id *vidpids )
540 { 544 {
541 int status; 545 int status;
542 struct usbnet *usbnet; 546 struct usbnet *usbnet;
543 struct qcusbnet *dev; 547 struct qcusbnet *dev;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 status = qc_register(dev); 609 status = qc_register(dev);
606 if (status) { 610 if (status) {
607 qc_deregister(dev); 611 qc_deregister(dev);
608 } 612 }
609 613
610 return status; 614 return status;
611 } 615 }
612 EXPORT_SYMBOL_GPL(qcnet_probe); 616 EXPORT_SYMBOL_GPL(qcnet_probe);
613 617
614 static struct usb_driver qcusbnet = { 618 static struct usb_driver qcusbnet = {
615 » .name = "QCUSBNet2k", 619 » .name = "gobi",
616 .id_table = qc_vidpids, 620 .id_table = qc_vidpids,
617 .probe = qcnet_probe, 621 .probe = qcnet_probe,
618 .disconnect = usbnet_disconnect, 622 .disconnect = usbnet_disconnect,
619 .suspend = qc_suspend, 623 .suspend = qc_suspend,
620 .resume = qc_resume, 624 .resume = qc_resume,
621 .supports_autosuspend = true, 625 .supports_autosuspend = true,
622 }; 626 };
623 627
624 static int __init modinit(void) 628 static int __init modinit(void)
625 { 629 {
(...skipping 14 matching lines...) Expand all
640 } 644 }
641 module_exit(modexit); 645 module_exit(modexit);
642 646
643 MODULE_VERSION(DRIVER_VERSION); 647 MODULE_VERSION(DRIVER_VERSION);
644 MODULE_AUTHOR(DRIVER_AUTHOR); 648 MODULE_AUTHOR(DRIVER_AUTHOR);
645 MODULE_DESCRIPTION(DRIVER_DESC); 649 MODULE_DESCRIPTION(DRIVER_DESC);
646 MODULE_LICENSE("Dual BSD/GPL"); 650 MODULE_LICENSE("Dual BSD/GPL");
647 651
648 module_param(qcusbnet_debug, bool, S_IRUGO | S_IWUSR); 652 module_param(qcusbnet_debug, bool, S_IRUGO | S_IWUSR);
649 MODULE_PARM_DESC(qcusbnet_debug, "Debugging enabled or not"); 653 MODULE_PARM_DESC(qcusbnet_debug, "Debugging enabled or not");
OLDNEW
« no previous file with comments | « no previous file | drivers/net/usb/gobi/qmidevice.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698