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
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
Hide 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 {
...
@@ -187,8 +187,8 @@ struct udsl_instance_data {
struct
list_head
spare_buffers
;
struct
list_head
spare_buffers
;
struct
tasklet_struct
send_tasklet
;
struct
tasklet_struct
send_tasklet
;
struct
sk_buff
*
current_skb
;
struct
sk_buff
*
current_skb
;
/* being emptied */
struct
udsl_send_buffer
*
current_buffer
;
struct
udsl_send_buffer
*
current_buffer
;
/* being filled */
struct
list_head
filled_buffers
;
struct
list_head
filled_buffers
;
};
};
...
@@ -329,13 +329,13 @@ static void udsl_complete_receive (struct urb *urb, struct pt_regs *regs)
...
@@ -329,13 +329,13 @@ static void udsl_complete_receive (struct urb *urb, struct pt_regs *regs)
struct
udsl_receiver
*
rcv
;
struct
udsl_receiver
*
rcv
;
unsigned
long
flags
;
unsigned
long
flags
;
PDEBUG
(
"udsl_complete_receive entered
\n
"
);
if
(
!
urb
||
!
(
rcv
=
urb
->
context
)
||
!
(
instance
=
rcv
->
instance
))
{
if
(
!
urb
||
!
(
rcv
=
urb
->
context
)
||
!
(
instance
=
rcv
->
instance
))
{
PDEBUG
(
"udsl_complete_receive: bad urb!
\n
"
);
PDEBUG
(
"udsl_complete_receive: bad urb!
\n
"
);
return
;
return
;
}
}
PDEBUG
(
"udsl_complete_receive entered (urb 0x%p, status %d)
\n
"
,
urb
,
urb
->
status
);
tasklet_schedule
(
&
instance
->
receive_tasklet
);
tasklet_schedule
(
&
instance
->
receive_tasklet
);
/* may not be in_interrupt() */
/* may not be in_interrupt() */
spin_lock_irqsave
(
&
instance
->
completed_receivers_lock
,
flags
);
spin_lock_irqsave
(
&
instance
->
completed_receivers_lock
,
flags
);
...
@@ -353,6 +353,7 @@ static void udsl_process_receive (unsigned long data)
...
@@ -353,6 +353,7 @@ static void udsl_process_receive (unsigned long data)
struct
urb
*
urb
;
struct
urb
*
urb
;
struct
atmsar_vcc_data
*
atmsar_vcc
=
NULL
;
struct
atmsar_vcc_data
*
atmsar_vcc
=
NULL
;
struct
sk_buff
*
new
=
NULL
,
*
tmp
=
NULL
;
struct
sk_buff
*
new
=
NULL
,
*
tmp
=
NULL
;
int
err
;
PDEBUG
(
"udsl_process_receive entered
\n
"
);
PDEBUG
(
"udsl_process_receive entered
\n
"
);
...
@@ -425,9 +426,9 @@ static void udsl_process_receive (unsigned long data)
...
@@ -425,9 +426,9 @@ static void udsl_process_receive (unsigned long data)
UDSL_RCV_BUFFER_SIZE
*
ATM_CELL_SIZE
,
UDSL_RCV_BUFFER_SIZE
*
ATM_CELL_SIZE
,
udsl_complete_receive
,
udsl_complete_receive
,
rcv
);
rcv
);
if
(
!
usb_submit_urb
(
urb
,
GFP_ATOMIC
))
if
(
!
(
err
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
)
))
break
;
break
;
PDEBUG
(
"udsl_process_receive: submission failed
\n
"
);
PDEBUG
(
"udsl_process_receive: submission failed
(%d)
\n
"
,
err
);
/* fall through */
/* fall through */
default:
/* error or urb unlinked */
default:
/* error or urb unlinked */
PDEBUG
(
"udsl_process_receive: adding to spare_receivers
\n
"
);
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)
...
@@ -491,13 +492,13 @@ static void udsl_complete_send (struct urb *urb, struct pt_regs *regs)
struct
udsl_sender
*
snd
;
struct
udsl_sender
*
snd
;
unsigned
long
flags
;
unsigned
long
flags
;
PDEBUG
(
"udsl_complete_send entered
\n
"
);
if
(
!
urb
||
!
(
snd
=
urb
->
context
)
||
!
(
instance
=
snd
->
instance
))
{
if
(
!
urb
||
!
(
snd
=
urb
->
context
)
||
!
(
instance
=
snd
->
instance
))
{
PDEBUG
(
"udsl_complete_send: bad urb!
\n
"
);
PDEBUG
(
"udsl_complete_send: bad urb!
\n
"
);
return
;
return
;
}
}
PDEBUG
(
"udsl_complete_send entered (urb 0x%p, status %d)
\n
"
,
urb
,
urb
->
status
);
tasklet_schedule
(
&
instance
->
send_tasklet
);
tasklet_schedule
(
&
instance
->
send_tasklet
);
/* may not be in_interrupt() */
/* may not be in_interrupt() */
spin_lock_irqsave
(
&
instance
->
send_lock
,
flags
);
spin_lock_irqsave
(
&
instance
->
send_lock
,
flags
);
...
@@ -515,6 +516,7 @@ static void udsl_process_send (unsigned long data)
...
@@ -515,6 +516,7 @@ static void udsl_process_send (unsigned long data)
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
unsigned
char
*
target
;
unsigned
char
*
target
;
unsigned
long
flags
;
unsigned
long
flags
;
int
err
;
PDEBUG
(
"udsl_process_send entered
\n
"
);
PDEBUG
(
"udsl_process_send entered
\n
"
);
...
@@ -524,10 +526,10 @@ static void udsl_process_send (unsigned long data)
...
@@ -524,10 +526,10 @@ static void udsl_process_send (unsigned long data)
if
(
!
list_empty
(
&
instance
->
filled_buffers
))
{
if
(
!
list_empty
(
&
instance
->
filled_buffers
))
{
buf
=
list_entry
(
instance
->
filled_buffers
.
next
,
struct
udsl_send_buffer
,
list
);
buf
=
list_entry
(
instance
->
filled_buffers
.
next
,
struct
udsl_send_buffer
,
list
);
list_del
(
&
buf
->
list
);
list_del
(
&
buf
->
list
);
PDEBUG
(
"sending filled buffer
\n
"
);
PDEBUG
(
"sending filled buffer
(0x%p)
\n
"
,
buf
);
}
else
if
((
buf
=
instance
->
current_buffer
))
{
}
else
if
((
buf
=
instance
->
current_buffer
))
{
instance
->
current_buffer
=
NULL
;
instance
->
current_buffer
=
NULL
;
PDEBUG
(
"sending current buffer
\n
"
);
PDEBUG
(
"sending current buffer
(0x%p)
\n
"
,
buf
);
}
else
/* all buffers empty */
}
else
/* all buffers empty */
break
;
break
;
...
@@ -544,10 +546,10 @@ static void udsl_process_send (unsigned long data)
...
@@ -544,10 +546,10 @@ static void udsl_process_send (unsigned long data)
udsl_complete_send
,
udsl_complete_send
,
snd
);
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
)
{
if
(
(
err
=
usb_submit_urb
(
snd
->
urb
,
GFP_ATOMIC
)
)
<
0
)
{
PDEBUG
(
"submission failed
!
\n
"
);
PDEBUG
(
"submission failed
(%d)!
\n
"
,
err
);
spin_lock_irqsave
(
&
instance
->
send_lock
,
flags
);
spin_lock_irqsave
(
&
instance
->
send_lock
,
flags
);
list_add
(
&
snd
->
list
,
&
instance
->
spare_senders
);
list_add
(
&
snd
->
list
,
&
instance
->
spare_senders
);
spin_unlock_irqrestore
(
&
instance
->
send_lock
,
flags
);
spin_unlock_irqrestore
(
&
instance
->
send_lock
,
flags
);
...
@@ -653,7 +655,7 @@ static int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb)
...
@@ -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
;
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
)
{
if
(
!
instance
)
{
PDEBUG
(
"NULL instance!
\n
"
);
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