Greg -- This patch looks reasonable. Please send to Linus for 2.4 (and 2.5 if applicable)
Matt ----- Forwarded message from Tim Schmielau <[EMAIL PROTECTED]> ----- Date: Sun, 22 Sep 2002 13:45:52 +0200 From: Tim Schmielau <[EMAIL PROTECTED]> Subject: [linux-usb-devel] [patch] fix compares of jiffies To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] List-Id: <linux-usb-devel.lists.sourceforge.net> X-Spam-Status: No, hits=-5.5 required=5.0 tests=DEAR_SOMEBODY,UNIFIED_PATCH version=2.11 Dear Linux kernel code maintainer, 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. For a small part of the patches, I believe you to be the relevant kernel code maintainer. Appended to this email you will find some lines explaining why I decided to mail or cc: you on this (an extract of the copyright notice or the MAINTAINERS file), followed by the patch itself. If I mailed you in error, please drop me a short note. I kindly ask you to approve the correctness of the patch, and pass it on to the relevant people for inclusion into the mainline kernel. Thanks, Tim Schmielau ([EMAIL PROTECTED]) USB MASS STORAGE DRIVER P: Matthew Dharm M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] L: [EMAIL PROTECTED] S: Maintained W: http://www.one-eyed-alien.net/~mdharm/linux-usb/ --- linux-2.4.20-pre6/drivers/usb/storage/sddr55.c Wed Sep 11 13:36:57 2002 +++ linux-2.4.20-pre6-jfix/drivers/usb/storage/sddr55.c Wed Sep 11 13:00:45 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 ----- End forwarded message ----- -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver It was a new hope. -- Dust Puppy User Friendly, 12/25/1998
msg08058/pgp00000.pgp
Description: PGP signature
