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
c0e59929
Commit
c0e59929
authored
Feb 16, 2003
by
Duncan Sands
Committed by
Greg Kroah-Hartman
Feb 16, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB speedtouch: minor speedtouch changes
Add some comments and debug info.
parent
a792bb5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
drivers/usb/misc/speedtouch.c
drivers/usb/misc/speedtouch.c
+16
-14
No files found.
drivers/usb/misc/speedtouch.c
View file @
c0e59929
...
...
@@ -187,8 +187,8 @@ struct udsl_instance_data {
struct
list_head
spare_buffers
;
struct
tasklet_struct
send_tasklet
;
struct
sk_buff
*
current_skb
;
struct
udsl_send_buffer
*
current_buffer
;
struct
sk_buff
*
current_skb
;
/* being emptied */
struct
udsl_send_buffer
*
current_buffer
;
/* being filled */
struct
list_head
filled_buffers
;
};
...
...
@@ -329,13 +329,13 @@ static void udsl_complete_receive (struct urb *urb, struct pt_regs *regs)
struct
udsl_receiver
*
rcv
;
unsigned
long
flags
;
PDEBUG
(
"udsl_complete_receive entered
\n
"
);
if
(
!
urb
||
!
(
rcv
=
urb
->
context
)
||
!
(
instance
=
rcv
->
instance
))
{
PDEBUG
(
"udsl_complete_receive: bad urb!
\n
"
);
return
;
}
PDEBUG
(
"udsl_complete_receive entered (urb 0x%p, status %d)
\n
"
,
urb
,
urb
->
status
);
tasklet_schedule
(
&
instance
->
receive_tasklet
);
/* may not be in_interrupt() */
spin_lock_irqsave
(
&
instance
->
completed_receivers_lock
,
flags
);
...
...
@@ -353,6 +353,7 @@ static void udsl_process_receive (unsigned long data)
struct
urb
*
urb
;
struct
atmsar_vcc_data
*
atmsar_vcc
=
NULL
;
struct
sk_buff
*
new
=
NULL
,
*
tmp
=
NULL
;
int
err
;
PDEBUG
(
"udsl_process_receive entered
\n
"
);
...
...
@@ -425,9 +426,9 @@ static void udsl_process_receive (unsigned long data)
UDSL_RCV_BUFFER_SIZE
*
ATM_CELL_SIZE
,
udsl_complete_receive
,
rcv
);
if
(
!
usb_submit_urb
(
urb
,
GFP_ATOMIC
))
if
(
!
(
err
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
)
))
break
;
PDEBUG
(
"udsl_process_receive: submission failed
\n
"
);
PDEBUG
(
"udsl_process_receive: submission failed
(%d)
\n
"
,
err
);
/* fall through */
default:
/* error or urb unlinked */
PDEBUG
(
"udsl_process_receive: adding to spare_receivers
\n
"
);
...
...
@@ -491,13 +492,13 @@ static void udsl_complete_send (struct urb *urb, struct pt_regs *regs)
struct
udsl_sender
*
snd
;
unsigned
long
flags
;
PDEBUG
(
"udsl_complete_send entered
\n
"
);
if
(
!
urb
||
!
(
snd
=
urb
->
context
)
||
!
(
instance
=
snd
->
instance
))
{
PDEBUG
(
"udsl_complete_send: bad urb!
\n
"
);
return
;
}
PDEBUG
(
"udsl_complete_send entered (urb 0x%p, status %d)
\n
"
,
urb
,
urb
->
status
);
tasklet_schedule
(
&
instance
->
send_tasklet
);
/* may not be in_interrupt() */
spin_lock_irqsave
(
&
instance
->
send_lock
,
flags
);
...
...
@@ -515,6 +516,7 @@ static void udsl_process_send (unsigned long data)
struct
sk_buff
*
skb
;
unsigned
char
*
target
;
unsigned
long
flags
;
int
err
;
PDEBUG
(
"udsl_process_send entered
\n
"
);
...
...
@@ -524,10 +526,10 @@ static void udsl_process_send (unsigned long data)
if
(
!
list_empty
(
&
instance
->
filled_buffers
))
{
buf
=
list_entry
(
instance
->
filled_buffers
.
next
,
struct
udsl_send_buffer
,
list
);
list_del
(
&
buf
->
list
);
PDEBUG
(
"sending filled buffer
\n
"
);
PDEBUG
(
"sending filled buffer
(0x%p)
\n
"
,
buf
);
}
else
if
((
buf
=
instance
->
current_buffer
))
{
instance
->
current_buffer
=
NULL
;
PDEBUG
(
"sending current buffer
\n
"
);
PDEBUG
(
"sending current buffer
(0x%p)
\n
"
,
buf
);
}
else
/* all buffers empty */
break
;
...
...
@@ -544,10 +546,10 @@ static void udsl_process_send (unsigned long data)
udsl_complete_send
,
snd
);
PDEBUG
(
"submitting urb
, contains %d cells
\n
"
,
UDSL_SND_BUFFER_SIZE
-
buf
->
free_cells
);
PDEBUG
(
"submitting urb
0x%p, contains %d cells
\n
"
,
snd
->
urb
,
UDSL_SND_BUFFER_SIZE
-
buf
->
free_cells
);
if
(
usb_submit_urb
(
snd
->
urb
,
GFP_ATOMIC
)
<
0
)
{
PDEBUG
(
"submission failed
!
\n
"
);
if
(
(
err
=
usb_submit_urb
(
snd
->
urb
,
GFP_ATOMIC
)
)
<
0
)
{
PDEBUG
(
"submission failed
(%d)!
\n
"
,
err
);
spin_lock_irqsave
(
&
instance
->
send_lock
,
flags
);
list_add
(
&
snd
->
list
,
&
instance
->
spare_senders
);
spin_unlock_irqrestore
(
&
instance
->
send_lock
,
flags
);
...
...
@@ -653,7 +655,7 @@ static int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb)
{
struct
udsl_instance_data
*
instance
=
vcc
->
dev
->
dev_data
;
PDEBUG
(
"udsl_atm_send called (skb 0x%p,
skb->
len %u)
\n
"
,
skb
,
skb
->
len
);
PDEBUG
(
"udsl_atm_send called (skb 0x%p, len %u)
\n
"
,
skb
,
skb
->
len
);
if
(
!
instance
)
{
PDEBUG
(
"NULL instance!
\n
"
);
...
...
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