public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [FIX] ide-io: increase timeout value to allow for slave wakeup
@ 2006-04-22 20:59 Al Boldi
  2006-04-22 21:58 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Al Boldi @ 2006-04-22 20:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton


During an STR resume cycle, the ide master disk times-out when there is also 
a slave present (especially CD).  Increasing the timeout in ide-io from 
10,000 to 100,000 fixes this problem.

Andrew, do I have to send a patch or can you take care of this one-liner?

Thanks!

--
Al


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FIX] ide-io: increase timeout value to allow for slave wakeup
  2006-04-22 20:59 [FIX] ide-io: increase timeout value to allow for slave wakeup Al Boldi
@ 2006-04-22 21:58 ` Andrew Morton
  2006-04-23  4:21   ` Al Boldi
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2006-04-22 21:58 UTC (permalink / raw)
  To: Al Boldi; +Cc: linux-kernel

Al Boldi <a1426z@gawab.com> wrote:
>
> 
> During an STR resume cycle, the ide master disk times-out when there is also 
> a slave present (especially CD).  Increasing the timeout in ide-io from 
> 10,000 to 100,000 fixes this problem.
> 
> Andrew, do I have to send a patch or can you take care of this one-liner?
> 

Please see the thread "sata suspend resume ..." on this mailing list,
starting Wed, 19 Apr.  It sounds like the same thing.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FIX] ide-io: increase timeout value to allow for slave wakeup
  2006-04-22 21:58 ` Andrew Morton
@ 2006-04-23  4:21   ` Al Boldi
  2006-04-23  4:43     ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Al Boldi @ 2006-04-23  4:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Andrew Morton wrote:
> Al Boldi <a1426z@gawab.com> wrote:
> > During an STR resume cycle, the ide master disk times-out when there is
> > also a slave present (especially CD).  Increasing the timeout in ide-io
> > from 10,000 to 100,000 fixes this problem.
> >
> > Andrew, do I have to send a patch or can you take care of this
> > one-liner?
>
> Please see the thread "sata suspend resume ..." on this mailing list,
> starting Wed, 19 Apr.  It sounds like the same thing.

Yes, that's what prompted me to look into ide-io.
So, will the sata fix also fix ide-io?

Thanks!

--
Al


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FIX] ide-io: increase timeout value to allow for slave wakeup
  2006-04-23  4:21   ` Al Boldi
@ 2006-04-23  4:43     ` Andrew Morton
  2006-04-23 11:22       ` Al Boldi
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2006-04-23  4:43 UTC (permalink / raw)
  To: Al Boldi; +Cc: linux-kernel

Al Boldi <a1426z@gawab.com> wrote:
>
> Andrew Morton wrote:
> > Al Boldi <a1426z@gawab.com> wrote:
> > > During an STR resume cycle, the ide master disk times-out when there is
> > > also a slave present (especially CD).  Increasing the timeout in ide-io
> > > from 10,000 to 100,000 fixes this problem.
> > >
> > > Andrew, do I have to send a patch or can you take care of this
> > > one-liner?
> >
> > Please see the thread "sata suspend resume ..." on this mailing list,
> > starting Wed, 19 Apr.  It sounds like the same thing.
> 
> Yes, that's what prompted me to look into ide-io.
> So, will the sata fix also fix ide-io?
> 

Oh.  No.  Please send a patch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FIX] ide-io: increase timeout value to allow for slave wakeup
  2006-04-23  4:43     ` Andrew Morton
@ 2006-04-23 11:22       ` Al Boldi
  2006-04-24  1:14         ` Mark Lord
  0 siblings, 1 reply; 6+ messages in thread
From: Al Boldi @ 2006-04-23 11:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-ide

Andrew Morton wrote:
> Al Boldi <a1426z@gawab.com> wrote:
> > Andrew Morton wrote:
> > > Al Boldi <a1426z@gawab.com> wrote:
> > > > During an STR resume cycle, the ide master disk times-out when there
> > > > is also a slave present (especially CD).  Increasing the timeout in
> > > > ide-io from 10,000 to 100,000 fixes this problem.
> > > >
> > > > Andrew, do I have to send a patch or can you take care of this
> > > > one-liner?
> > >
> > > Please see the thread "sata suspend resume ..." on this mailing list,
> > > starting Wed, 19 Apr.  It sounds like the same thing.
> >
> > Yes, that's what prompted me to look into ide-io.
> > So, will the sata fix also fix ide-io?
>
> Oh.  No.  Please send a patch.

--- 16/drivers/ide/ide-io.c.orig	2006-03-31 19:12:11.000000000 +0300
+++ 16/drivers/ide/ide-io.c	2006-04-23 13:24:15.000000000 +0300
@@ -932,7 +932,7 @@ static ide_startstop_t start_request (id
 			printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name);
 		SELECT_DRIVE(drive);
 		HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]);
-		rc = ide_wait_not_busy(HWIF(drive), 10000);
+		rc = ide_wait_not_busy(HWIF(drive), 100000);
 		if (rc)
 			printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name);
 	}

Also apply this one to get rid of this message:

	hdb: set_drive_speed_status: status=0x40 { DriveReady }
	ide: failed opcode was: unknown

Maybe someone on the ide list can comment on this first though.

--- 16/include/linux/ide.h.orig	2006-03-31 19:12:51.000000000 +0300
+++ 16/include/linux/ide.h	2006-04-23 13:06:32.000000000 +0300
@@ -120,7 +120,7 @@ typedef unsigned char	byte;	/* used ever
 #define IDE_BCOUNTL_REG		IDE_LCYL_REG
 #define IDE_BCOUNTH_REG		IDE_HCYL_REG
 
-#define OK_STAT(stat,good,bad)	(((stat)&((good)|(bad)))==(good))
+#define OK_STAT(stat,good,bad)	(((stat)&((good)|(bad)))==((stat)&(good)))
 #define BAD_R_STAT		(BUSY_STAT   | ERR_STAT)
 #define BAD_W_STAT		(BAD_R_STAT  | WRERR_STAT)
 #define BAD_STAT		(BAD_R_STAT  | DRQ_STAT)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FIX] ide-io: increase timeout value to allow for slave wakeup
  2006-04-23 11:22       ` Al Boldi
@ 2006-04-24  1:14         ` Mark Lord
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Lord @ 2006-04-24  1:14 UTC (permalink / raw)
  To: Al Boldi; +Cc: Andrew Morton, linux-kernel, linux-ide

Al Boldi wrote:
 ..
> Also apply this one to get rid of this message:
> 
> 	hdb: set_drive_speed_status: status=0x40 { DriveReady }
> 	ide: failed opcode was: unknown
> 
> Maybe someone on the ide list can comment on this first though.
> 
> --- 16/include/linux/ide.h.orig	2006-03-31 19:12:51.000000000 +0300
> +++ 16/include/linux/ide.h	2006-04-23 13:06:32.000000000 +0300
> @@ -120,7 +120,7 @@ typedef unsigned char	byte;	/* used ever
>  #define IDE_BCOUNTL_REG		IDE_LCYL_REG
>  #define IDE_BCOUNTH_REG		IDE_HCYL_REG
>  
> -#define OK_STAT(stat,good,bad)	(((stat)&((good)|(bad)))==(good))
> +#define OK_STAT(stat,good,bad)	(((stat)&((good)|(bad)))==((stat)&(good)))
>  #define BAD_R_STAT		(BUSY_STAT   | ERR_STAT)
>  #define BAD_W_STAT		(BAD_R_STAT  | WRERR_STAT)
>  #define BAD_STAT		(BAD_R_STAT  | DRQ_STAT)
> 

Assuming hdb is a CDROM/optical drive, then this change makes sense for that.
But I don't think it is a valid (good) change for regular ATA disks.

A more complex patch is required, one which correctly handles each drive type.

cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-04-24  1:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-22 20:59 [FIX] ide-io: increase timeout value to allow for slave wakeup Al Boldi
2006-04-22 21:58 ` Andrew Morton
2006-04-23  4:21   ` Al Boldi
2006-04-23  4:43     ` Andrew Morton
2006-04-23 11:22       ` Al Boldi
2006-04-24  1:14         ` Mark Lord

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox