* [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] ide/ide-cs: replace
@ 2004-09-16 23:44 Nishanth Aravamudan
2004-09-17 18:24 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] macintosh/mediabay: replace Nishanth Aravamudan
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2004-09-16 23:44 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]
Any comments would be appreciated.
Description: Uses msleep() in place of cdrom_sleep()
to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.9-rc2-vanilla/drivers/ide/legacy/ide-cs.c 2004-09-13 17:16:06.000000000 -0700
+++ 2.6.9-rc2/drivers/ide/legacy/ide-cs.c 2004-09-16 16:42:03.000000000 -0700
@@ -43,6 +43,7 @@
#include <linux/ide.h>
#include <linux/hdreg.h>
#include <linux/major.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/system.h>
@@ -357,8 +358,7 @@ void ide_config(dev_link_t *link)
break;
}
}
- __set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ/10);
+ msleep(100);
}
if (hd < 0) {
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] macintosh/mediabay: replace
2004-09-16 23:44 [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] ide/ide-cs: replace Nishanth Aravamudan
@ 2004-09-17 18:24 ` Nishanth Aravamudan
2004-09-17 18:42 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] md/raid10: replace Nishanth Aravamudan
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2004-09-17 18:24 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 4667 bytes --]
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of schedule_timeout() to
guarantee the task delays as expected. Also remove macro MS_TO_HZ() and
replace with msecs_to_jiffies().
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.9-rc2-vanilla/drivers/macintosh/mediabay.c 2004-09-13 17:16:08.000000000 -0700
+++ 2.6.9-rc2/drivers/macintosh/mediabay.c 2004-09-14 14:14:03.000000000 -0700
@@ -98,11 +98,6 @@ int media_bay_count = 0;
#define MB_IDE_READY(i) ((readb(media_bays[i].cd_base + 0x70) & 0x80) == 0)
#endif
-/* Note: All delays are not in milliseconds and converted to HZ relative
- * values by the macro below
- */
-#define MS_TO_HZ(ms) ((ms * HZ + 999) / 1000)
-
/*
* Wait that number of ms between each step in normal polling mode
*/
@@ -384,7 +379,7 @@ static inline void __pmac set_mb_power(s
bay->state = mb_powering_down;
MBDBG("mediabay%d: powering down\n", bay->index);
}
- bay->timer = MS_TO_HZ(MB_POWER_DELAY);
+ bay->timer = msecs_to_jiffies(MB_POWER_DELAY);
}
static void __pmac poll_media_bay(struct media_bay_info* bay)
@@ -393,8 +388,8 @@ static void __pmac poll_media_bay(struct
if (id == bay->last_value) {
if (id != bay->content_id) {
- bay->value_count += MS_TO_HZ(MB_POLL_DELAY);
- if (bay->value_count >= MS_TO_HZ(MB_STABLE_DELAY)) {
+ bay->value_count += msecs_to_jiffies(MB_POLL_DELAY);
+ if (bay->value_count >= msecs_to_jiffies(MB_STABLE_DELAY)) {
/* If the device type changes without going thru
* "MB_NO", we force a pass by "MB_NO" to make sure
* things are properly reset
@@ -504,7 +499,7 @@ static void __pmac media_bay_step(int i)
/* If timer expired or polling IDE busy, run state machine */
if ((bay->state != mb_ide_waiting) && (bay->timer != 0)) {
- bay->timer -= MS_TO_HZ(MB_POLL_DELAY);
+ bay->timer -= msecs_to_jiffies(MB_POLL_DELAY);
if (bay->timer > 0)
return;
bay->timer = 0;
@@ -517,13 +512,13 @@ static void __pmac media_bay_step(int i)
set_mb_power(bay, 0);
break;
}
- bay->timer = MS_TO_HZ(MB_RESET_DELAY);
+ bay->timer = msecs_to_jiffies(MB_RESET_DELAY);
bay->state = mb_enabling_bay;
MBDBG("mediabay%d: enabling (kind:%d)\n", i, bay->content_id);
break;
case mb_enabling_bay:
bay->ops->un_reset(bay);
- bay->timer = MS_TO_HZ(MB_SETUP_DELAY);
+ bay->timer = msecs_to_jiffies(MB_SETUP_DELAY);
bay->state = mb_resetting;
MBDBG("mediabay%d: waiting reset (kind:%d)\n", i, bay->content_id);
break;
@@ -537,7 +532,7 @@ static void __pmac media_bay_step(int i)
#ifdef CONFIG_BLK_DEV_IDE
MBDBG("mediabay%d: waiting IDE reset (kind:%d)\n", i, bay->content_id);
bay->ops->un_reset_ide(bay);
- bay->timer = MS_TO_HZ(MB_IDE_WAIT);
+ bay->timer = msecs_to_jiffies(MB_IDE_WAIT);
bay->state = mb_ide_resetting;
#else
printk(KERN_DEBUG "media-bay %d is ide (not compiled in kernel)\n", i);
@@ -547,7 +542,7 @@ static void __pmac media_bay_step(int i)
#ifdef CONFIG_BLK_DEV_IDE
case mb_ide_resetting:
- bay->timer = MS_TO_HZ(MB_IDE_TIMEOUT);
+ bay->timer = msecs_to_jiffies(MB_IDE_TIMEOUT);
bay->state = mb_ide_waiting;
MBDBG("mediabay%d: waiting IDE ready (kind:%d)\n", i, bay->content_id);
break;
@@ -583,7 +578,7 @@ static void __pmac media_bay_step(int i)
}
break;
} else if (bay->timer > 0)
- bay->timer -= MS_TO_HZ(MB_POLL_DELAY);
+ bay->timer -= msecs_to_jiffies(MB_POLL_DELAY);
if (bay->timer <= 0) {
printk("\nIDE Timeout in bay %d !, IDE state is: 0x%02x\n",
i, readb(bay->cd_base + 0x70));
@@ -641,8 +636,7 @@ static int __pmac media_bay_task(void *x
up(&media_bays[i].lock);
}
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(MS_TO_HZ(MB_POLL_DELAY));
+ msleep_interruptible(MB_POLL_DELAY);
if (signal_pending(current))
return 0;
}
@@ -690,7 +684,7 @@ static int __devinit media_bay_attach(st
msleep(MB_POWER_DELAY);
bay->content_id = MB_NO;
bay->last_value = bay->ops->content(bay);
- bay->value_count = MS_TO_HZ(MB_STABLE_DELAY);
+ bay->value_count = msecs_to_jiffies(MB_STABLE_DELY);
bay->state = mb_empty;
do {
msleep(MB_POLL_DELAY);
@@ -746,8 +740,8 @@ static int __pmac media_bay_resume(struc
}
set_mb_power(bay, 1);
bay->last_value = bay->content_id;
- bay->value_count = MS_TO_HZ(MB_STABLE_DELAY);
- bay->timer = MS_TO_HZ(MB_POWER_DELAY);
+ bay->value_count = msecs_to_jiffies(MB_STABLE_DELAY);
+ bay->timer = msecs_to_jiffies(MB_POWER_DELAY);
#ifdef CONFIG_BLK_DEV_IDE
bay->cd_retry = 0;
#endif
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] md/raid10: replace
2004-09-16 23:44 [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] ide/ide-cs: replace Nishanth Aravamudan
2004-09-17 18:24 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] macintosh/mediabay: replace Nishanth Aravamudan
@ 2004-09-17 18:42 ` Nishanth Aravamudan
2004-09-24 23:06 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] parport/ieee1284_ops: Nishanth Aravamudan
2004-09-27 23:11 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] video/radeonfb: remove Nishanth Aravamudan
3 siblings, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2004-09-17 18:42 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 693 bytes --]
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of schedule_timeout() to
guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.9-rc1-mm4-vanilla/drivers/md/raid10.c 2004-09-09 23:05:58.000000000 -0700
+++ 2.6.9-rc1-mm4/drivers/md/raid10.c 2004-09-10 11:52:10.000000000 -0700
@@ -1358,7 +1358,7 @@ static int sync_request(mddev_t *mddev,
* put in a delay to throttle resync.
*/
if (!go_faster && waitqueue_active(&conf->wait_resume))
- schedule_timeout(HZ);
+ msleep_interruptible(1000);
device_barrier(conf, sector_nr + RESYNC_SECTORS);
/* Again, very different code for resync and recovery.
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] parport/ieee1284_ops:
2004-09-16 23:44 [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] ide/ide-cs: replace Nishanth Aravamudan
2004-09-17 18:24 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] macintosh/mediabay: replace Nishanth Aravamudan
2004-09-17 18:42 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] md/raid10: replace Nishanth Aravamudan
@ 2004-09-24 23:06 ` Nishanth Aravamudan
2004-09-27 23:11 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] video/radeonfb: remove Nishanth Aravamudan
3 siblings, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2004-09-24 23:06 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of schedule_timeout() to
guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.9-rc2-vanilla/drivers/parport/ieee1284_ops.c 2004-09-13 17:16:02.000000000 -0700
+++ 2.6.9-rc2/drivers/parport/ieee1284_ops.c 2004-09-15 09:56:26.000000000 -0700
@@ -97,8 +97,7 @@ size_t parport_ieee1284_write_compat (st
our interrupt handler called. */
if (count && no_irq) {
parport_release (dev);
- __set_current_state (TASK_INTERRUPTIBLE);
- schedule_timeout (wait);
+ msleep_interruptible(jiffies_to_msecs(wait));
parport_claim_or_block (dev);
}
else
@@ -542,8 +541,7 @@ size_t parport_ieee1284_ecp_read_data (s
/* Yield the port for a while. */
if (count && dev->port->irq != PARPORT_IRQ_NONE) {
parport_release (dev);
- __set_current_state (TASK_INTERRUPTIBLE);
- schedule_timeout ((HZ + 24) / 25);
+ msleep_interruptible(40);
parport_claim_or_block (dev);
}
else
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] video/radeonfb: remove
2004-09-16 23:44 [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] ide/ide-cs: replace Nishanth Aravamudan
` (2 preceding siblings ...)
2004-09-24 23:06 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] parport/ieee1284_ops: Nishanth Aravamudan
@ 2004-09-27 23:11 ` Nishanth Aravamudan
3 siblings, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2004-09-27 23:11 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
Any comments would be appreciated.
Description: Remove custom macro MS_TO_HZ(). Will be replaced in *.c
files with msecs_to_jiffies().
--- 2.6.9-rc2-vanilla/drivers/video/aty/radeonfb.h 2004-09-13 17:15:37.000000000 -0700
+++ 2.6.9-rc2/drivers/video/aty/radeonfb.h 2004-09-14 14:14:09.000000000 -0700
@@ -425,8 +425,6 @@ static inline u32 _INPLL(struct radeonfb
spin_unlock_irqrestore(&rinfo->reg_lock, flags); \
} while (0)
-#define MS_TO_HZ(ms) ((ms * HZ + 999) / 1000)
-
#define BIOS_IN8(v) (readb(rinfo->bios_seg + (v)))
#define BIOS_IN16(v) (readb(rinfo->bios_seg + (v)) | \
(readb(rinfo->bios_seg + (v) + 1) << 8))
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-27 23:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16 23:44 [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] ide/ide-cs: replace Nishanth Aravamudan
2004-09-17 18:24 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] macintosh/mediabay: replace Nishanth Aravamudan
2004-09-17 18:42 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] md/raid10: replace Nishanth Aravamudan
2004-09-24 23:06 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] parport/ieee1284_ops: Nishanth Aravamudan
2004-09-27 23:11 ` [Kernel-janitors] [PATCH 2.6.9-rc2 2/3] video/radeonfb: remove Nishanth Aravamudan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.