# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.691   -> 1.692  
#       drivers/usb/storage/sddr55.c    1.1     -> 1.2    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/26      [EMAIL PROTECTED]      1.692
# [PATCH] fix compares of jiffies
# 
# on rechecking the current stable kernel code, I found some places where jiffies
# were compared in a way that seems to break when they wrap. For these,
# I made up patches to use the macros "time_before()" or "time_after()"
# that are supposed to handle wraparound correctly.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
--- a/drivers/usb/storage/sddr55.c      Mon Sep 30 10:46:50 2002
+++ b/drivers/usb/storage/sddr55.c      Mon Sep 30 10:46:50 2002
@@ -968,7 +968,7 @@
        /* only check card status if the map isn't allocated, ie no card seen yet
         * or if it's been over half a second since we last accessed it
         */
-       if (info->lba_to_pba == NULL || jiffies > (info->last_access + HZ/2)) {
+       if (info->lba_to_pba == NULL || time_after(jiffies, info->last_access + HZ/2)) 
+{
 
                /* check to see if a card is fitted */
                result = sddr55_status (us);


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to