From a5e26b12ca16bec40a458dccd8c3718e2a38d2e4 Mon Sep 17 00:00:00 2001 From: Rupesh Gujare Date: Mon, 23 Jul 2012 18:49:44 +0100 Subject: [PATCH] --- yaml --- r: 324495 b: refs/heads/master c: 24168911bedc23b02a0fa5043befa37580e6a9cb h: refs/heads/master i: 324493: c63237f75b79e3aa9475a1468665f407c1bf3c86 324491: 45989bbea65e2170f1948369505743de2e0d70c8 324487: 679c2c1e9b3563eee65ffa8cb22aec0b08e051f5 324479: ea7ca3e30f92b28f5baf29eb6bd2555bff193ad8 v: v3 --- [refs] | 2 +- trunk/drivers/staging/ozwpan/ozhcd.c | 8 ++++---- trunk/drivers/staging/ozwpan/ozproto.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index fbf970fdac83..bedcaaac2c60 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 28a722958878da5edd563f9393225fa3128c5647 +refs/heads/master: 24168911bedc23b02a0fa5043befa37580e6a9cb diff --git a/trunk/drivers/staging/ozwpan/ozhcd.c b/trunk/drivers/staging/ozwpan/ozhcd.c index 617bfed4a3d6..4ac1f2731861 100644 --- a/trunk/drivers/staging/ozwpan/ozhcd.c +++ b/trunk/drivers/staging/ozwpan/ozhcd.c @@ -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); @@ -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, @@ -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; @@ -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; diff --git a/trunk/drivers/staging/ozwpan/ozproto.h b/trunk/drivers/staging/ozwpan/ozproto.h index 89aea28bd8d5..7d5b47693f3f 100644 --- a/trunk/drivers/staging/ozwpan/ozproto.h +++ b/trunk/drivers/staging/ozwpan/ozproto.h @@ -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. */