linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
@ 2007-05-04 19:18 Sergei Shtylyov
  2007-05-05 19:30 ` Bartlomiej Zolnierkiewicz
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2007-05-04 19:18 UTC (permalink / raw)
  To: bzolnier, michal.kepien; +Cc: linux-ide, linux-kernel

HPT36x chip don't seem to have the channel enable bits, so prevent the IDE core
from checking them...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---
Michal, sorry for unintended breakage, please verify the patch... :-)

 drivers/ide/pci/hpt366.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/ide/pci/hpt366.c
===================================================================
--- linux-2.6.orig/drivers/ide/pci/hpt366.c
+++ linux-2.6/drivers/ide/pci/hpt366.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/hpt366.c		Version 1.02	Apr 18, 2007
+ * linux/drivers/ide/pci/hpt366.c		Version 1.03	May 4, 2007
  *
  * Copyright (C) 1999-2003		Andre Hedrick <andre@linux-ide.org>
  * Portions Copyright (C) 2001	        Sun Microsystems, Inc.
@@ -1527,7 +1527,12 @@ static int __devinit init_setup_hpt366(s
 	if (rev > 2)
 		goto init_single;
 
+	/*
+	 * HPT36x chips are single channel and
+	 * do not seem to have the channel enable bit...
+	 */
 	d->channels = 1;
+	d->enablebits[0].reg = 0;
 
 	if ((dev2 = pci_get_slot(dev->bus, dev->devfn + 1)) != NULL) {
 	  	u8  pin1 = 0, pin2 = 0;


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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-04 19:18 [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x Sergei Shtylyov
@ 2007-05-05 19:30 ` Bartlomiej Zolnierkiewicz
  2007-05-05 20:18   ` Sergei Shtylyov
  2007-05-06 22:53 ` Andries Brouwer
  2007-05-24 20:23 ` Sergei Shtylyov
  2 siblings, 1 reply; 13+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-05-05 19:30 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: michal.kepien, linux-ide, linux-kernel

On Friday 04 May 2007, Sergei Shtylyov wrote:
> HPT36x chip don't seem to have the channel enable bits, so prevent the IDE core
> from checking them...
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

applied

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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-05 19:30 ` Bartlomiej Zolnierkiewicz
@ 2007-05-05 20:18   ` Sergei Shtylyov
  2007-05-05 21:20     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 13+ messages in thread
From: Sergei Shtylyov @ 2007-05-05 20:18 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: michal.kepien, linux-ide, linux-kernel

Hello.

Bartlomiej Zolnierkiewicz wrote:

>>HPT36x chip don't seem to have the channel enable bits, so prevent the IDE core
>>from checking them...

>>Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> applied

    I'm getting "403 Forbidden" trying to browse this patch (and 
ide-cs-recognize-2gb-compactflash-from-transcend.patch as well).

MBR, Sergei

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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-05 20:18   ` Sergei Shtylyov
@ 2007-05-05 21:20     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 13+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-05-05 21:20 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: michal.kepien, linux-ide, linux-kernel

On Saturday 05 May 2007, Sergei Shtylyov wrote:
> Hello.
> 
> Bartlomiej Zolnierkiewicz wrote:
> 
> >>HPT36x chip don't seem to have the channel enable bits, so prevent the IDE core
> >>from checking them...
> 
> >>Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> 
> > applied
> 
>     I'm getting "403 Forbidden" trying to browse this patch (and 
> ide-cs-recognize-2gb-compactflash-from-transcend.patch as well).

Should be fixed now - sorry for that.

While at it I replaced mine version of "the hpt366: simplify UltraDMA
filtering (take 2)" with the official one ;) and fixed my damn scripts
to always do "chmod 644 pata-2.6/patches/*.patch" before pushing updates
to kernel.org.

Bart

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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-04 19:18 [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x Sergei Shtylyov
  2007-05-05 19:30 ` Bartlomiej Zolnierkiewicz
@ 2007-05-06 22:53 ` Andries Brouwer
  2007-05-24 20:23 ` Sergei Shtylyov
  2 siblings, 0 replies; 13+ messages in thread
From: Andries Brouwer @ 2007-05-06 22:53 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: bzolnier, michal.kepien, linux-ide, linux-kernel

On Fri, May 04, 2007 at 11:18:37PM +0400, Sergei Shtylyov wrote:
> HPT36x chip don't seem to have the channel enable bits,
> so prevent the IDE core from checking them...
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

Earlier this evening I reported that HPT366 was broken in 2.6.21.
I confirm that this fixes it for me.

Andries

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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-04 19:18 [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x Sergei Shtylyov
  2007-05-05 19:30 ` Bartlomiej Zolnierkiewicz
  2007-05-06 22:53 ` Andries Brouwer
@ 2007-05-24 20:23 ` Sergei Shtylyov
  2007-05-24 20:34   ` Linas Vepstas
  2007-05-28 20:32   ` Andries Brouwer
  2 siblings, 2 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2007-05-24 20:23 UTC (permalink / raw)
  To: linux-ide; +Cc: bzolnier, Alan Cox, linas, Andries.Brouwer, michal.kepien

Hello, I wrote:
> HPT36x chip don't seem to have the channel enable bits, so prevent the IDE core
> from checking them...

> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> Index: linux-2.6/drivers/ide/pci/hpt366.c
> ===================================================================
> --- linux-2.6.orig/drivers/ide/pci/hpt366.c
> +++ linux-2.6/drivers/ide/pci/hpt366.c
> @@ -1,5 +1,5 @@
>  /*
> - * linux/drivers/ide/pci/hpt366.c		Version 1.02	Apr 18, 2007
> + * linux/drivers/ide/pci/hpt366.c		Version 1.03	May 4, 2007
>   *
>   * Copyright (C) 1999-2003		Andre Hedrick <andre@linux-ide.org>
>   * Portions Copyright (C) 2001	        Sun Microsystems, Inc.
> @@ -1527,7 +1527,12 @@ static int __devinit init_setup_hpt366(s
>  	if (rev > 2)
>  		goto init_single;
>  
> +	/*
> +	 * HPT36x chips are single channel and
> +	 * do not seem to have the channel enable bit...
> +	 */

    Actually it does, but the bit is different. :-/

>  	d->channels = 1;
> +	d->enablebits[0].reg = 0;

    Linas, Andries, Michal, cound you try this instead:

	d->enablebits[0].mask = d->enablebits[0].val = 0x10;

>  	if ((dev2 = pci_get_slot(dev->bus, dev->devfn + 1)) != NULL) {
>  	  	u8  pin1 = 0, pin2 = 0;

MBR, Sergei

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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-24 20:23 ` Sergei Shtylyov
@ 2007-05-24 20:34   ` Linas Vepstas
  2007-05-24 20:53     ` Sergei Shtylyov
  2007-05-28 20:32   ` Andries Brouwer
  1 sibling, 1 reply; 13+ messages in thread
From: Linas Vepstas @ 2007-05-24 20:34 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-ide, bzolnier, Alan Cox, Andries.Brouwer, michal.kepien

Hi,

On Fri, May 25, 2007 at 12:23:25AM +0400, Sergei Shtylyov wrote:
> Hello, I wrote:
> >HPT36x chip don't seem to have the channel enable bits, so prevent the IDE 
> >core from checking them...
> 
> >Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> 
> > 	d->channels = 1;
> >+	d->enablebits[0].reg = 0;

The original patch worked for me.

>    Linas, Andries, Michal, cound you try this instead:
> 
> 	d->enablebits[0].mask = d->enablebits[0].val = 0x10;

Based on the printk's from my system, this should work fine.
The config register had 0x33 in it, so 0x33 & mask == val for me.
I'll reply tommorrow if this doesn't work.

--linas


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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-24 20:34   ` Linas Vepstas
@ 2007-05-24 20:53     ` Sergei Shtylyov
  2007-05-24 21:06       ` Linas Vepstas
  2007-05-24 21:47       ` Sergei Shtylyov
  0 siblings, 2 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2007-05-24 20:53 UTC (permalink / raw)
  To: Linas Vepstas
  Cc: linux-ide, bzolnier, Alan Cox, Andries.Brouwer, michal.kepien

Linas Vepstas wrote:

>>>HPT36x chip don't seem to have the channel enable bits, so prevent the IDE 
>>>core from checking them...

>>>Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

>>>	d->channels = 1;
>>>+	d->enablebits[0].reg = 0;

> The original patch worked for me.

>>   Linas, Andries, Michal, cound you try this instead:
>>
>>	d->enablebits[0].mask = d->enablebits[0].val = 0x10;

> Based on the printk's from my system, this should work fine.
> The config register had 0x33 in it, so 0x33 & mask == val for me.
> I'll reply tommorrow if this doesn't work.

    It probably won't work the way it should anyway -- the secondary channel 
(and controller in this case) uses another bit in this register and the 
controllers get registered with IDE core "in pair". Highpoint knows how to 
make broken hardware. :-)

> --linas

MBR, Sergei

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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-24 20:53     ` Sergei Shtylyov
@ 2007-05-24 21:06       ` Linas Vepstas
  2007-05-24 21:47       ` Sergei Shtylyov
  1 sibling, 0 replies; 13+ messages in thread
From: Linas Vepstas @ 2007-05-24 21:06 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-ide, bzolnier, Alan Cox, Andries.Brouwer, michal.kepien

On Fri, May 25, 2007 at 12:53:19AM +0400, Sergei Shtylyov wrote:
>
> knows how to make broken hardware. :-)

You mean, "value-added hardware" ;->

--linas


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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-24 20:53     ` Sergei Shtylyov
  2007-05-24 21:06       ` Linas Vepstas
@ 2007-05-24 21:47       ` Sergei Shtylyov
  2007-05-25 17:58         ` Linas Vepstas
  1 sibling, 1 reply; 13+ messages in thread
From: Sergei Shtylyov @ 2007-05-24 21:47 UTC (permalink / raw)
  To: linux-ide
  Cc: Linas Vepstas, bzolnier, Alan Cox, Andries.Brouwer, michal.kepien

Hello, I wrote:

>>>> HPT36x chip don't seem to have the channel enable bits, so prevent 
>>>> the IDE core from checking them...

>>>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

>>>>     d->channels = 1;
>>>> +    d->enablebits[0].reg = 0;

>> The original patch worked for me.

>>>   Linas, Andries, Michal, cound you try this instead:
>>>
>>>     d->enablebits[0].mask = d->enablebits[0].val = 0x10;

>> Based on the printk's from my system, this should work fine.
>> The config register had 0x33 in it, so 0x33 & mask == val for me.
>> I'll reply tommorrow if this doesn't work.

>    It probably won't work the way it should anyway -- the secondary 
> channel (and controller in this case) uses another bit in this register 
> and the controllers get registered with IDE core "in pair".

    Maybe it will though, after reading some more "secret" stuff. :-)

> Highpoint 
> knows how to make broken hardware. :-)

   It's alos known for lousy documentation. And even that they're not readily 
giving out. :-)

>> --linas

MBR, Sergei


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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-24 21:47       ` Sergei Shtylyov
@ 2007-05-25 17:58         ` Linas Vepstas
  2007-05-25 18:12           ` Sergei Shtylyov
  0 siblings, 1 reply; 13+ messages in thread
From: Linas Vepstas @ 2007-05-25 17:58 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-ide, bzolnier, Alan Cox, Andries.Brouwer, michal.kepien

On Fri, May 25, 2007 at 01:47:04AM +0400, Sergei Shtylyov wrote:
> Hello, I wrote:
> 
> >>>  Linas, Andries, Michal, cound you try this instead:
> >>>
> >>>    d->enablebits[0].mask = d->enablebits[0].val = 0x10;
> 
> >   It probably won't work the way it should anyway -- the secondary 
> >channel (and controller in this case) uses another bit in this register 
> >and the controllers get registered with IDE core "in pair".

Setting d->enablebits[0].mask = d->enablebits[0].val = 0x10; makes
my system bootable, and so this works well enough for me.  Without this
patch, mainline 2.6.21.1 is broken, and so I'll say it again:

Please submit a patch to the stable branch so that this gets generically
fixed!  I'll happily Ack it. 

--linas

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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-25 17:58         ` Linas Vepstas
@ 2007-05-25 18:12           ` Sergei Shtylyov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2007-05-25 18:12 UTC (permalink / raw)
  To: Linas Vepstas
  Cc: linux-ide, bzolnier, Alan Cox, Andries.Brouwer, michal.kepien

Linas Vepstas wrote:

>>>>> Linas, Andries, Michal, cound you try this instead:

>>>>>   d->enablebits[0].mask = d->enablebits[0].val = 0x10;

>>>  It probably won't work the way it should anyway -- the secondary 
>>>channel (and controller in this case) uses another bit in this register 
>>>and the controllers get registered with IDE core "in pair".

> Setting d->enablebits[0].mask = d->enablebits[0].val = 0x10; makes
> my system bootable, and so this works well enough for me.  Without this
> patch, mainline 2.6.21.1 is broken, and so I'll say it again:
> 
> Please submit a patch to the stable branch so that this gets generically
> fixed!  I'll happily Ack it. 

    Already done. I hope it'll be in 2.6.21.3...

> --linas

WBR, Sergei

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

* Re: [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x
  2007-05-24 20:23 ` Sergei Shtylyov
  2007-05-24 20:34   ` Linas Vepstas
@ 2007-05-28 20:32   ` Andries Brouwer
  1 sibling, 0 replies; 13+ messages in thread
From: Andries Brouwer @ 2007-05-28 20:32 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-ide, bzolnier, Alan Cox, linas, Andries.Brouwer,
	michal.kepien

On Fri, May 25, 2007 at 12:23:25AM +0400, Sergei Shtylyov wrote:

>> HPT36x chip don't seem to have the channel enable bits, so prevent the
>> IDE core from checking them...

>    Actually it does, but the bit is different. :-/
> 
>>  	d->channels = 1;
>> +	d->enablebits[0].reg = 0;
> 
>    Linas, Andries, Michal, cound you try this instead:
> 
> 	d->enablebits[0].mask = d->enablebits[0].val = 0x10;

OK, tried, works fine.

Andries

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

end of thread, other threads:[~2007-05-28 20:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-04 19:18 [PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x Sergei Shtylyov
2007-05-05 19:30 ` Bartlomiej Zolnierkiewicz
2007-05-05 20:18   ` Sergei Shtylyov
2007-05-05 21:20     ` Bartlomiej Zolnierkiewicz
2007-05-06 22:53 ` Andries Brouwer
2007-05-24 20:23 ` Sergei Shtylyov
2007-05-24 20:34   ` Linas Vepstas
2007-05-24 20:53     ` Sergei Shtylyov
2007-05-24 21:06       ` Linas Vepstas
2007-05-24 21:47       ` Sergei Shtylyov
2007-05-25 17:58         ` Linas Vepstas
2007-05-25 18:12           ` Sergei Shtylyov
2007-05-28 20:32   ` Andries Brouwer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).