Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
08d0ea94
Commit
08d0ea94
authored
Feb 05, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usb_submit_urb() changes for USB drivers that live outside of the drivers/usb subdirectory.
parent
af2a09fe
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
24 deletions
+24
-24
drivers/bluetooth/hci_usb.c
drivers/bluetooth/hci_usb.c
+5
-5
drivers/input/joystick/iforce.c
drivers/input/joystick/iforce.c
+3
-3
drivers/isdn/hisax/st5481.h
drivers/isdn/hisax/st5481.h
+2
-2
drivers/isdn/hisax/st5481_b.c
drivers/isdn/hisax/st5481_b.c
+1
-1
drivers/isdn/hisax/st5481_d.c
drivers/isdn/hisax/st5481_d.c
+3
-3
drivers/isdn/hisax/st5481_usb.c
drivers/isdn/hisax/st5481_usb.c
+5
-5
drivers/media/video/cpia_usb.c
drivers/media/video/cpia_usb.c
+2
-2
drivers/net/irda/irda-usb.c
drivers/net/irda/irda-usb.c
+3
-3
No files found.
drivers/bluetooth/hci_usb.c
View file @
08d0ea94
...
...
@@ -120,11 +120,11 @@ int hci_usb_open(struct hci_dev *hdev)
DBG
(
"%s"
,
hdev
->
name
);
husb
->
read_urb
->
dev
=
husb
->
udev
;
if
((
status
=
usb_submit_urb
(
husb
->
read_urb
)))
if
((
status
=
usb_submit_urb
(
husb
->
read_urb
,
GFP_KERNEL
)))
DBG
(
"read submit failed. %d"
,
status
);
husb
->
intr_urb
->
dev
=
husb
->
udev
;
if
((
status
=
usb_submit_urb
(
husb
->
intr_urb
)))
if
((
status
=
usb_submit_urb
(
husb
->
intr_urb
,
GFP_KERNEL
)))
DBG
(
"interrupt submit failed. %d"
,
status
);
hdev
->
flags
|=
HCI_RUNNING
;
...
...
@@ -428,7 +428,7 @@ static void hci_usb_bulk_read(struct urb *urb)
resubmit:
husb
->
read_urb
->
dev
=
husb
->
udev
;
if
((
status
=
usb_submit_urb
(
husb
->
read_urb
)))
if
((
status
=
usb_submit_urb
(
husb
->
read_urb
,
GFP_KERNEL
)))
DBG
(
"%s read URB submit failed %d"
,
husb
->
hdev
.
name
,
status
);
DBG
(
"%s read URB re-submited"
,
husb
->
hdev
.
name
);
...
...
@@ -453,7 +453,7 @@ static int hci_usb_ctrl_msg(struct hci_usb *husb, struct sk_buff *skb)
FILL_CONTROL_URB
(
urb
,
husb
->
udev
,
pipe
,
(
void
*
)
dr
,
skb
->
data
,
skb
->
len
,
hci_usb_ctrl
,
skb
);
if
((
status
=
usb_submit_urb
(
urb
)))
{
if
((
status
=
usb_submit_urb
(
urb
,
GFP_KERNEL
)))
{
DBG
(
"%s control URB submit failed %d"
,
husb
->
hdev
.
name
,
status
);
return
status
;
}
...
...
@@ -474,7 +474,7 @@ static int hci_usb_write_msg(struct hci_usb *husb, struct sk_buff *skb)
hci_usb_bulk_write
,
skb
);
urb
->
transfer_flags
|=
USB_QUEUE_BULK
;
if
((
status
=
usb_submit_urb
(
urb
)))
{
if
((
status
=
usb_submit_urb
(
urb
,
GFP_KERNEL
)))
{
DBG
(
"%s write URB submit failed %d"
,
husb
->
hdev
.
name
,
status
);
return
status
;
}
...
...
drivers/input/joystick/iforce.c
View file @
08d0ea94
...
...
@@ -204,7 +204,7 @@ static void send_packet(struct iforce *iforce, u16 cmd, unsigned char* data)
set_current_state
(
TASK_INTERRUPTIBLE
);
add_wait_queue
(
&
iforce
->
wait
,
&
wait
);
if
(
usb_submit_urb
(
iforce
->
out
))
{
if
(
usb_submit_urb
(
iforce
->
out
,
GFP_ATOMIC
))
{
set_current_state
(
TASK_RUNNING
);
remove_wait_queue
(
&
iforce
->
wait
,
&
wait
);
return
;
...
...
@@ -289,7 +289,7 @@ static int get_id_packet(struct iforce *iforce, char *packet)
set_current_state
(
TASK_INTERRUPTIBLE
);
add_wait_queue
(
&
iforce
->
wait
,
&
wait
);
if
(
usb_submit_urb
(
iforce
->
ctrl
))
{
if
(
usb_submit_urb
(
iforce
->
ctrl
,
GFP_ATOMIC
))
{
set_current_state
(
TASK_RUNNING
);
remove_wait_queue
(
&
iforce
->
wait
,
&
wait
);
return
-
1
;
...
...
@@ -345,7 +345,7 @@ static int iforce_open(struct input_dev *dev)
if
(
iforce
->
open
++
)
break
;
iforce
->
irq
->
dev
=
iforce
->
usbdev
;
if
(
usb_submit_urb
(
iforce
->
irq
))
if
(
usb_submit_urb
(
iforce
->
irq
,
GFP_KERNEL
))
return
-
EIO
;
break
;
#endif
...
...
drivers/isdn/hisax/st5481.h
View file @
08d0ea94
...
...
@@ -409,10 +409,10 @@ struct st5481_adapter {
* Submit an URB with error reporting. This is a macro so
* the __FUNCTION__ returns the caller function name.
*/
#define SUBMIT_URB(urb) \
#define SUBMIT_URB(urb
, mem_flags
) \
({ \
int status; \
if ((status = usb_submit_urb(urb)) < 0) { \
if ((status = usb_submit_urb(urb
, mem_flags
)) < 0) { \
WARN("usb_submit_urb failed,status=%d", status); \
} \
status; \
...
...
drivers/isdn/hisax/st5481_b.c
View file @
08d0ea94
...
...
@@ -115,7 +115,7 @@ static void usb_b_out(struct st5481_bcs *bcs,int buf_nr)
DBG_ISO_PACKET
(
0x200
,
urb
);
SUBMIT_URB
(
urb
);
SUBMIT_URB
(
urb
,
GFP_KERNEL
);
}
/*
...
...
drivers/isdn/hisax/st5481_d.c
View file @
08d0ea94
...
...
@@ -356,10 +356,10 @@ static void usb_d_out(struct st5481_adapter *adapter, int buf_nr)
DBG_ISO_PACKET
(
0x20
,
urb
);
if
(
usb_submit_urb
(
urb
)
<
0
)
{
if
(
usb_submit_urb
(
urb
,
GFP_KERNEL
)
<
0
)
{
// There is another URB queued up
urb
->
transfer_flags
=
USB_ISO_ASAP
;
SUBMIT_URB
(
urb
);
SUBMIT_URB
(
urb
,
GFP_KERNEL
);
}
}
...
...
@@ -450,7 +450,7 @@ static void dout_start_xmit(struct FsmInst *fsm, int event, void *arg)
urb
->
transfer_flags
=
USB_ISO_ASAP
;
DBG_ISO_PACKET
(
0x20
,
urb
);
SUBMIT_URB
(
urb
);
SUBMIT_URB
(
urb
,
GFP_KERNEL
);
}
static
void
dout_short_fifo
(
struct
FsmInst
*
fsm
,
int
event
,
void
*
arg
)
...
...
drivers/isdn/hisax/st5481_usb.c
View file @
08d0ea94
...
...
@@ -48,7 +48,7 @@ static void usb_next_ctrl_msg(struct urb *urb,
// Prepare the URB
urb
->
dev
=
adapter
->
usb_dev
;
SUBMIT_URB
(
urb
);
SUBMIT_URB
(
urb
,
GFP_KERNEL
);
}
/*
...
...
@@ -357,7 +357,7 @@ void __devinit st5481_start(struct st5481_adapter *adapter)
adapter
->
leds
=
RED_LED
;
// Start receiving on the interrupt endpoint
SUBMIT_URB
(
intr
->
urb
);
SUBMIT_URB
(
intr
->
urb
,
GFP_KERNEL
);
while
((
request
=
init_cmd_table
[
i
++
]))
{
value
=
init_cmd_table
[
i
++
];
...
...
@@ -517,7 +517,7 @@ static void usb_in_complete(struct urb *urb)
urb
->
dev
=
in
->
adapter
->
usb_dev
;
urb
->
actual_length
=
0
;
SUBMIT_URB
(
urb
);
SUBMIT_URB
(
urb
,
GFP_KERNEL
);
}
int
__devinit
st5481_setup_in
(
struct
st5481_in
*
in
)
...
...
@@ -603,10 +603,10 @@ static void st5481_start_rcv(void *context)
DBG
(
4
,
""
);
in
->
urb
[
0
]
->
dev
=
adapter
->
usb_dev
;
SUBMIT_URB
(
in
->
urb
[
0
]);
SUBMIT_URB
(
in
->
urb
[
0
]
,
GFP_KERNEL
);
in
->
urb
[
1
]
->
dev
=
adapter
->
usb_dev
;
SUBMIT_URB
(
in
->
urb
[
1
]);
SUBMIT_URB
(
in
->
urb
[
1
]
,
GFP_KERNEL
);
}
void
st5481_in_mode
(
struct
st5481_in
*
in
,
int
mode
)
...
...
drivers/media/video/cpia_usb.c
View file @
08d0ea94
...
...
@@ -246,13 +246,13 @@ static int cpia_usb_open(void *privdata)
ucpia
->
sbuf
[
1
].
urb
->
next
=
ucpia
->
sbuf
[
0
].
urb
;
ucpia
->
sbuf
[
0
].
urb
->
next
=
ucpia
->
sbuf
[
1
].
urb
;
err
=
usb_submit_urb
(
ucpia
->
sbuf
[
0
].
urb
);
err
=
usb_submit_urb
(
ucpia
->
sbuf
[
0
].
urb
,
GFP_KERNEL
);
if
(
err
)
{
printk
(
KERN_ERR
"cpia_init_isoc: usb_submit_urb 0 ret %d
\n
"
,
err
);
goto
error_urb1
;
}
err
=
usb_submit_urb
(
ucpia
->
sbuf
[
1
].
urb
);
err
=
usb_submit_urb
(
ucpia
->
sbuf
[
1
].
urb
,
GFP_KERNEL
);
if
(
err
)
{
printk
(
KERN_ERR
"cpia_init_isoc: usb_submit_urb 1 ret %d
\n
"
,
err
);
...
...
drivers/net/irda/irda-usb.c
View file @
08d0ea94
...
...
@@ -278,7 +278,7 @@ static void irda_usb_change_speed_xbofs(struct irda_usb_cb *self)
urb
->
transfer_flags
=
USB_QUEUE_BULK
|
USB_ASYNC_UNLINK
;
urb
->
timeout
=
MSECS_TO_JIFFIES
(
100
);
if
((
ret
=
usb_submit_urb
(
urb
)))
{
if
((
ret
=
usb_submit_urb
(
urb
,
GFP_KERNEL
)))
{
WARNING
(
__FUNCTION__
"(), failed Speed URB
\n
"
);
}
spin_unlock_irqrestore
(
&
self
->
lock
,
flags
);
...
...
@@ -451,7 +451,7 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
}
/* Ask USB to send the packet */
if
((
res
=
usb_submit_urb
(
urb
)))
{
if
((
res
=
usb_submit_urb
(
urb
,
GFP_KERNEL
)))
{
WARNING
(
__FUNCTION__
"(), failed Tx URB
\n
"
);
self
->
stats
.
tx_errors
++
;
/* Let USB recover : We will catch that in the watchdog */
...
...
@@ -730,7 +730,7 @@ static void irda_usb_submit(struct irda_usb_cb *self, struct sk_buff *skb, struc
urb
->
status
=
0
;
urb
->
next
=
NULL
;
/* Don't auto resubmit URBs */
ret
=
usb_submit_urb
(
urb
);
ret
=
usb_submit_urb
(
urb
,
GFP_KERNEL
);
if
(
ret
)
{
/* If this ever happen, we are in deep s***.
* Basically, the Rx path will stop... */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment