From 6428737c1f3b2b5f3c18f67127c85535f6ca055a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 17 Feb 2003 23:52:11 -0800 Subject: [PATCH] USB: add "present" flag to usb_device structure. This solves lots of races when drivers hold a reference to the usb_device after the device is physically removed from the system (like when a user has a open handle.) This now prevents any new urbs being submitted or canceled for the device. --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/usb.h b/include/linux/usb.h index b0873cc6d8e1..bec58dddacef 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -239,6 +239,7 @@ struct usb_device { int have_langid; /* whether string_langid is valid yet */ int string_langid; /* language ID for strings */ + int present; /* if device is present or not */ void *hcpriv; /* Host Controller private data */ -- cgit v1.2.3 From f5889474a290f8a3fb9cef91045cc69ad359937c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 18 Feb 2003 00:27:45 -0800 Subject: [PATCH] USB: added sched.h to usb.h Thanks to Matt Wilcox for the info. --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/usb.h b/include/linux/usb.h index bec58dddacef..52d7070ffa42 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -17,6 +17,7 @@ #include /* for struct device */ #include /* for struct file_operations */ #include /* for struct completion */ +#include /* for current && schedule_timeout */ static __inline__ void wait_ms(unsigned int ms) -- cgit v1.2.3