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
nexedi
linux
Commits
a9112471
Commit
a9112471
authored
Feb 19, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usb usb-uhci.c:
- added usb_put_urb() and usb_get_urb() logic.
parent
0f0bca32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
drivers/usb/usb-uhci.c
drivers/usb/usb-uhci.c
+9
-1
No files found.
drivers/usb/usb-uhci.c
View file @
a9112471
...
@@ -1217,6 +1217,7 @@ _static int uhci_unlink_urb_sync (uhci_t *s, struct urb *urb)
...
@@ -1217,6 +1217,7 @@ _static int uhci_unlink_urb_sync (uhci_t *s, struct urb *urb)
urb
->
complete
((
struct
urb
*
)
urb
);
urb
->
complete
((
struct
urb
*
)
urb
);
}
}
usb_dec_dev_use
(
usb_dev
);
usb_dec_dev_use
(
usb_dev
);
usb_put_urb
(
urb
);
}
}
else
else
spin_unlock_irqrestore
(
&
s
->
urb_list_lock
,
flags
);
spin_unlock_irqrestore
(
&
s
->
urb_list_lock
,
flags
);
...
@@ -1305,7 +1306,7 @@ _static void uhci_cleanup_unlink(uhci_t *s, int force)
...
@@ -1305,7 +1306,7 @@ _static void uhci_cleanup_unlink(uhci_t *s, int force)
#else
#else
kfree
(
urb_priv
);
kfree
(
urb_priv
);
#endif
#endif
usb_put_urb
(
urb
);
}
}
}
}
}
}
...
@@ -1650,6 +1651,9 @@ _static int uhci_submit_urb (struct urb *urb, int mem_flags)
...
@@ -1650,6 +1651,9 @@ _static int uhci_submit_urb (struct urb *urb, int mem_flags)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
/* increment the reference count of the urb, as we now also control it */
urb
=
usb_get_urb
(
urb
);
usb_inc_dev_use
(
urb
->
dev
);
usb_inc_dev_use
(
urb
->
dev
);
spin_lock_irqsave
(
&
s
->
urb_list_lock
,
flags
);
spin_lock_irqsave
(
&
s
->
urb_list_lock
,
flags
);
...
@@ -1665,6 +1669,7 @@ _static int uhci_submit_urb (struct urb *urb, int mem_flags)
...
@@ -1665,6 +1669,7 @@ _static int uhci_submit_urb (struct urb *urb, int mem_flags)
(
!
(
urb
->
transfer_flags
&
USB_QUEUE_BULK
)
||
!
(
queued_urb
->
transfer_flags
&
USB_QUEUE_BULK
))))
{
(
!
(
urb
->
transfer_flags
&
USB_QUEUE_BULK
)
||
!
(
queued_urb
->
transfer_flags
&
USB_QUEUE_BULK
))))
{
spin_unlock_irqrestore
(
&
s
->
urb_list_lock
,
flags
);
spin_unlock_irqrestore
(
&
s
->
urb_list_lock
,
flags
);
usb_dec_dev_use
(
urb
->
dev
);
usb_dec_dev_use
(
urb
->
dev
);
usb_put_urb
(
urb
);
err
(
"ENXIO %08x, flags %x, urb %p, burb %p"
,
urb
->
pipe
,
urb
->
transfer_flags
,
urb
,
queued_urb
);
err
(
"ENXIO %08x, flags %x, urb %p, burb %p"
,
urb
->
pipe
,
urb
->
transfer_flags
,
urb
,
queued_urb
);
return
-
ENXIO
;
// urb already queued
return
-
ENXIO
;
// urb already queued
}
}
...
@@ -1678,6 +1683,7 @@ _static int uhci_submit_urb (struct urb *urb, int mem_flags)
...
@@ -1678,6 +1683,7 @@ _static int uhci_submit_urb (struct urb *urb, int mem_flags)
if
(
!
urb_priv
)
{
if
(
!
urb_priv
)
{
usb_dec_dev_use
(
urb
->
dev
);
usb_dec_dev_use
(
urb
->
dev
);
spin_unlock_irqrestore
(
&
s
->
urb_list_lock
,
flags
);
spin_unlock_irqrestore
(
&
s
->
urb_list_lock
,
flags
);
usb_put_urb
(
urb
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
@@ -1766,6 +1772,7 @@ _static int uhci_submit_urb (struct urb *urb, int mem_flags)
...
@@ -1766,6 +1772,7 @@ _static int uhci_submit_urb (struct urb *urb, int mem_flags)
#else
#else
kfree
(
urb_priv
);
kfree
(
urb_priv
);
#endif
#endif
usb_put_urb
(
urb
);
return
ret
;
return
ret
;
}
}
...
@@ -2730,6 +2737,7 @@ _static int process_urb (uhci_t *s, struct list_head *p)
...
@@ -2730,6 +2737,7 @@ _static int process_urb (uhci_t *s, struct list_head *p)
}
}
usb_dec_dev_use
(
usb_dev
);
usb_dec_dev_use
(
usb_dev
);
usb_put_urb
(
urb
);
}
}
}
}
...
...
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