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

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

Issue 6612045: CHROMIUM: gobi: Fix races in qc_deregister() once and for all. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/kernel.git@master
Patch Set: Remove bogus initializer. 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 | « 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
1 /* structs.h - shared structures 1 /* structs.h - shared structures
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 #ifndef QCUSBNET_STRUCTS_H 19 #ifndef QCUSBNET_STRUCTS_H
20 #define QCUSBNET_STRUCTS_H 20 #define QCUSBNET_STRUCTS_H
21 21
22 #include <linux/etherdevice.h> 22 #include <linux/etherdevice.h>
23 #include <linux/ethtool.h> 23 #include <linux/ethtool.h>
24 #include <linux/mii.h> 24 #include <linux/mii.h>
25 #include <linux/usb.h> 25 #include <linux/usb.h>
26 #include <linux/version.h> 26 #include <linux/version.h>
27 #include <linux/cdev.h> 27 #include <linux/cdev.h>
28 #include <linux/kobject.h>
28 #include <linux/kthread.h> 29 #include <linux/kthread.h>
29 30
30 #include <linux/usb/usbnet.h> 31 #include <linux/usb/usbnet.h>
31 32
32 #include <linux/fdtable.h> 33 #include <linux/fdtable.h>
33 34
34 #define DBG(fmt, arg...) \ 35 #define DBG(fmt, arg...) \
35 do { \ 36 do { \
36 if (qcusbnet_debug == 1) \ 37 if (qcusbnet_debug == 1) \
37 printk(KERN_INFO "QCUSBNet2k::%s " fmt, __func__, ##arg); \ 38 printk(KERN_INFO "QCUSBNet2k::%s " fmt, __func__, ##arg); \
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 }; 72 };
72 73
73 enum { 74 enum {
74 DOWN_NO_NDIS_CONNECTION = 0, 75 DOWN_NO_NDIS_CONNECTION = 0,
75 DOWN_CDC_CONNECTION_SPEED = 1, 76 DOWN_CDC_CONNECTION_SPEED = 1,
76 DOWN_DRIVER_SUSPENDED = 2, 77 DOWN_DRIVER_SUSPENDED = 2,
77 DOWN_NET_IFACE_STOPPED = 3, 78 DOWN_NET_IFACE_STOPPED = 3,
78 }; 79 };
79 80
80 struct qcusbnet { 81 struct qcusbnet {
82 struct list_head node;
83 struct kref refcount;
81 struct usbnet *usbnet; 84 struct usbnet *usbnet;
82 struct usb_interface *iface; 85 struct usb_interface *iface;
83 int (*open)(struct net_device *); 86 int (*open)(struct net_device *);
84 int (*stop)(struct net_device *); 87 int (*stop)(struct net_device *);
85 unsigned long down; 88 unsigned long down;
86 bool valid; 89 bool valid;
90 bool dying;
87 struct qmidev qmi; 91 struct qmidev qmi;
88 char meid[14]; 92 char meid[14];
89 struct worker worker; 93 struct worker worker;
90 }; 94 };
91 95
92 #endif /* !QCUSBNET_STRUCTS_H */ 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