Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324495
b: refs/heads/master
c: 2416891
h: refs/heads/master
i:
  324493: c63237f
  324491: 45989bb
  324487: 679c2c1
  324479: ea7ca3e
v: v3
  • Loading branch information
Rupesh Gujare authored and Greg Kroah-Hartman committed Aug 14, 2012
1 parent 07882aa commit a5e26b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28a722958878da5edd563f9393225fa3128c5647
refs/heads/master: 24168911bedc23b02a0fa5043befa37580e6a9cb
8 changes: 4 additions & 4 deletions trunk/drivers/staging/ozwpan/ozhcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ int oz_hcd_heartbeat(void *hport)
ep = ep_from_link(e);
if (ep->credit < 0)
continue;
ep->credit += (now - ep->last_jiffies);
ep->credit += jiffies_to_msecs(now - ep->last_jiffies);
if (ep->credit > ep->credit_ceiling)
ep->credit = ep->credit_ceiling;
oz_event_log(OZ_EVT_EP_CREDIT, ep->ep_num, 0, 0, ep->credit);
Expand All @@ -1062,7 +1062,7 @@ int oz_hcd_heartbeat(void *hport)
urbl = list_first_entry(&ep->urb_list,
struct oz_urb_link, link);
urb = urbl->urb;
if (ep->credit < urb->number_of_packets)
if ((ep->credit + 1) < urb->number_of_packets)
break;
ep->credit -= urb->number_of_packets;
oz_event_log(OZ_EVT_EP_CREDIT, ep->ep_num, 0, 0,
Expand Down Expand Up @@ -1105,7 +1105,7 @@ int oz_hcd_heartbeat(void *hport)
}
continue;
}
ep->credit += (now - ep->last_jiffies);
ep->credit += jiffies_to_msecs(now - ep->last_jiffies);
oz_event_log(OZ_EVT_EP_CREDIT, ep->ep_num | USB_DIR_IN,
0, 0, ep->credit);
ep->last_jiffies = now;
Expand All @@ -1117,7 +1117,7 @@ int oz_hcd_heartbeat(void *hport)
int len = 0;
int copy_len;
int i;
if (ep->credit < urb->number_of_packets)
if ((ep->credit + 1) < urb->number_of_packets)
break;
if (ep->buffered_units < urb->number_of_packets)
break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/ozwpan/ozproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/* Converts millisecs to jiffies.
*/
#define oz_ms_to_jiffies(__x) (((__x)*1000)/HZ)
#define oz_ms_to_jiffies(__x) msecs_to_jiffies(__x)

/* Quantum milliseconds.
*/
Expand Down

0 comments on commit a5e26b1

Please sign in to comment.