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

Side by Side Diff: drivers/net/usb/gobi/structs.h

Issue 6822058: CHROMIUM: gobi: resubmit interrupt urb on failed reads (Closed) Base URL: ssh://gitrw.chromium.org:9222/kernel.git@11.1.241.B
Patch Set: Created 9 years, 8 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 | « drivers/net/usb/gobi/qmidevice.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* structs.h - shared structures
2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
3
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
6 * only version 2 as published by the Free Software Foundation.
7
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12
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
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 * 02110-1301, USA.
17 */
18
19 #ifndef QCUSBNET_STRUCTS_H
20 #define QCUSBNET_STRUCTS_H
21
22 #include <linux/etherdevice.h>
23 #include <linux/ethtool.h>
24 #include <linux/mii.h>
25 #include <linux/usb.h>
26 #include <linux/version.h>
27 #include <linux/cdev.h>
28 #include <linux/kobject.h>
29 #include <linux/kthread.h>
30
31 #include <linux/usb/usbnet.h>
32
33 #include <linux/fdtable.h>
34
35 #define DBG(fmt, arg...) \
36 do { \
37 if (qcusbnet_debug == 1) \
38 printk(KERN_INFO "QCUSBNet2k::%s " fmt, __func__, ##arg); \
39 } while (0)
40
41 struct qcusbnet;
42
43 struct urbreq {
44 struct list_head node;
45 struct urb *urb;
46 };
47
48 #define DEFAULT_READ_URB_LENGTH 0x1000
49
50 struct worker {
51 struct task_struct *thread;
52 struct completion work;
53 struct list_head urbs;
54 spinlock_t urbs_lock;
55 struct urb *active;
56 spinlock_t active_lock;
57 struct usb_interface *iface;
58 };
59
60 struct qmidev {
61 dev_t devnum;
62 struct class *devclass;
63 struct cdev cdev;
64 struct urb *readurb;
65 struct urbsetup *readsetup;
66 void *readbuf;
67 struct urb *inturb;
68 void *intbuf;
69 struct list_head clients;
70 spinlock_t clients_lock;
71 atomic_t qmitid;
72 };
73
74 enum {
75 DOWN_NO_NDIS_CONNECTION = 0,
76 DOWN_CDC_CONNECTION_SPEED = 1,
77 DOWN_DRIVER_SUSPENDED = 2,
78 DOWN_NET_IFACE_STOPPED = 3,
79 };
80
81 struct qcusbnet {
82 struct list_head node;
83 struct kref refcount;
84 struct usbnet *usbnet;
85 struct usb_interface *iface;
86 int (*open)(struct net_device *);
87 int (*stop)(struct net_device *);
88 unsigned long down;
89 bool valid;
90 bool dying;
91 struct qmidev qmi;
92 char meid[14];
93 struct worker worker;
94 };
95
96 #endif /* !QCUSBNET_STRUCTS_H */
OLDNEW
« no previous file with comments | « drivers/net/usb/gobi/qmidevice.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698