Re: [patch] I-Opener fix (again)

2000-12-13 Thread alex

On Wed, Dec 13, 2000 at 01:20:02PM -0700, Tim Riker wrote:
> Andre,
> 
> What are the "laptops that have CFA devices that do not come on channels
> in a pair" systems you refer to?

I assume he's referring to flash devices which show up as an IDE bus with only
a master and no slave, and don't handle slave accesses well (right?).  It
should be noted that my patch does _not_ break these cases at all.

-alex
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [patch] I-Opener fix (again)

2000-12-13 Thread Tim Riker

Andre,

What are the "laptops that have CFA devices that do not come on channels
in a pair" systems you refer to?

This patch fixes the iopener and other systems here at Lineo that have
2nd drive flash. The only other way we have been booting these is with
"hdb=noprobe" which just disables the 2nd drive flash. hdb=flash does
not fix it.

[EMAIL PROTECTED] wrote:
> 
> On Tue, Dec 12, 2000 at 10:47:35PM -0800, Andre Hedrick wrote:
> >
> > Basically if the setting of
> >
> >  * "hdx=flash"  : allows for more than one ata_flash disk to be
> >  *  registered. In most cases, only one device
> >  *  will be present.
> >
> > fails then I will look into this but, the breaking of laptops that have
> > CFA devices that do not come on channels in a pair canb not happen.
> > If you have a vender unique setting that will follow always the way
> > I-Opener's are setup then that is better.
> 
> Ok, there are two things here:
> 
> 1) "hdx=flash" _does_ fail, because the flash-related code clobbers hda
>_after_ hda's detection phase, when it's looking at hdb (which is flash).
> 
> 2) I can see no situation where hdb detection should ever override the
>_already_performed_ detection of hda in this way.
> 
> Basically, as is, the kernel finds hda (traditional IDE device), configures it
> normally, then finds hdb (flash), and clobbers all the correct info it already
> detected for hda.  This seems just plain wrong.
> 
> -alex
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/

-- 
Tim Riker - http://rikers.org/ - short SIGs! 
All I need to know I could have learned in Kindergarten
... if I'd just been paying attention.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [patch] I-Opener fix (again)

2000-12-13 Thread Tim Riker

Andre,

What are the "laptops that have CFA devices that do not come on channels
in a pair" systems you refer to?

This patch fixes the iopener and other systems here at Lineo that have
2nd drive flash. The only other way we have been booting these is with
"hdb=noprobe" which just disables the 2nd drive flash. hdb=flash does
not fix it.

[EMAIL PROTECTED] wrote:
 
 On Tue, Dec 12, 2000 at 10:47:35PM -0800, Andre Hedrick wrote:
 
  Basically if the setting of
 
   * "hdx=flash"  : allows for more than one ata_flash disk to be
   *  registered. In most cases, only one device
   *  will be present.
 
  fails then I will look into this but, the breaking of laptops that have
  CFA devices that do not come on channels in a pair canb not happen.
  If you have a vender unique setting that will follow always the way
  I-Opener's are setup then that is better.
 
 Ok, there are two things here:
 
 1) "hdx=flash" _does_ fail, because the flash-related code clobbers hda
_after_ hda's detection phase, when it's looking at hdb (which is flash).
 
 2) I can see no situation where hdb detection should ever override the
_already_performed_ detection of hda in this way.
 
 Basically, as is, the kernel finds hda (traditional IDE device), configures it
 normally, then finds hdb (flash), and clobbers all the correct info it already
 detected for hda.  This seems just plain wrong.
 
 -alex
 -
 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
 the body of a message to [EMAIL PROTECTED]
 Please read the FAQ at http://www.tux.org/lkml/

-- 
Tim Riker - http://rikers.org/ - short SIGs! g
All I need to know I could have learned in Kindergarten
... if I'd just been paying attention.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [patch] I-Opener fix (again)

2000-12-13 Thread alex

On Wed, Dec 13, 2000 at 01:20:02PM -0700, Tim Riker wrote:
 Andre,
 
 What are the "laptops that have CFA devices that do not come on channels
 in a pair" systems you refer to?

I assume he's referring to flash devices which show up as an IDE bus with only
a master and no slave, and don't handle slave accesses well (right?).  It
should be noted that my patch does _not_ break these cases at all.

-alex
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [patch] I-Opener fix (again)

2000-12-12 Thread Andre Hedrick


Basically if the setting of 

 * "hdx=flash"  : allows for more than one ata_flash disk to be
 *  registered. In most cases, only one device
 *  will be present.

fails then I will look into this but, the breaking of laptops that have
CFA devices that do not come on channels in a pair canb not happen.
If you have a vender unique setting that will follow always the way
I-Opener's are setup then that is better.

Cheers,

On Mon, 11 Dec 2000 [EMAIL PROTECTED] wrote:

> It's been a few months (and a couple of kernel releases) since I mentioned this
> before and it doesn't look like it's made it in, and I haven't seen any more
> comments on it in the list archives, so I'm bringing it up again in case it
> just got forgotten about somewhere along the line..
> 
> As I remember, Andre Hedrick had asked for clarification on my original post,
> and I sent a followup message in response, but now I can't seem to find it
> anywhere in the archives, so I don't know whether it never made it out of my
> mailer or..
> 
> In any case, attached is a patch (against 2.4.0pre11) which fixes the bug which
> causes disk detection issues on I-Opener (and possibly other unusual) hardware.
> 
> The problem is that the code assumes that a flash-disk will always be the
> primary disk on an interface, but on the I-Opener this is not always the case.
> If a traditional disk is primary, and a flashdisk is secondary, the detection
> code (wrongly) disables the primary disk that it had already previously
> detected.
> 
> I would like to see this make it into the official source as it's a very small
> change that fixes some obviously wrong behavior..
> 
> -alex
> 

Andre Hedrick
CTO Timpanogas Research Group
EVP Linux Development, TRG
Linux ATA Development

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [patch] I-Opener fix (again)

2000-12-12 Thread Andre Hedrick


Basically if the setting of 

 * "hdx=flash"  : allows for more than one ata_flash disk to be
 *  registered. In most cases, only one device
 *  will be present.

fails then I will look into this but, the breaking of laptops that have
CFA devices that do not come on channels in a pair canb not happen.
If you have a vender unique setting that will follow always the way
I-Opener's are setup then that is better.

Cheers,

On Mon, 11 Dec 2000 [EMAIL PROTECTED] wrote:

 It's been a few months (and a couple of kernel releases) since I mentioned this
 before and it doesn't look like it's made it in, and I haven't seen any more
 comments on it in the list archives, so I'm bringing it up again in case it
 just got forgotten about somewhere along the line..
 
 As I remember, Andre Hedrick had asked for clarification on my original post,
 and I sent a followup message in response, but now I can't seem to find it
 anywhere in the archives, so I don't know whether it never made it out of my
 mailer or..
 
 In any case, attached is a patch (against 2.4.0pre11) which fixes the bug which
 causes disk detection issues on I-Opener (and possibly other unusual) hardware.
 
 The problem is that the code assumes that a flash-disk will always be the
 primary disk on an interface, but on the I-Opener this is not always the case.
 If a traditional disk is primary, and a flashdisk is secondary, the detection
 code (wrongly) disables the primary disk that it had already previously
 detected.
 
 I would like to see this make it into the official source as it's a very small
 change that fixes some obviously wrong behavior..
 
 -alex
 

Andre Hedrick
CTO Timpanogas Research Group
EVP Linux Development, TRG
Linux ATA Development

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[patch] I-Opener fix (again)

2000-12-11 Thread alex

It's been a few months (and a couple of kernel releases) since I mentioned this
before and it doesn't look like it's made it in, and I haven't seen any more
comments on it in the list archives, so I'm bringing it up again in case it
just got forgotten about somewhere along the line..

As I remember, Andre Hedrick had asked for clarification on my original post,
and I sent a followup message in response, but now I can't seem to find it
anywhere in the archives, so I don't know whether it never made it out of my
mailer or..

In any case, attached is a patch (against 2.4.0pre11) which fixes the bug which
causes disk detection issues on I-Opener (and possibly other unusual) hardware.

The problem is that the code assumes that a flash-disk will always be the
primary disk on an interface, but on the I-Opener this is not always the case.
If a traditional disk is primary, and a flashdisk is secondary, the detection
code (wrongly) disables the primary disk that it had already previously
detected.

I would like to see this make it into the official source as it's a very small
change that fixes some obviously wrong behavior..

-alex


--- drivers/ide/ide-probe.c.origMon Dec 11 14:59:08 2000
+++ drivers/ide/ide-probe.c Mon Dec 11 15:00:13 2000
@@ -161,8 +161,8 @@
 * Prevent long system lockup probing later for non-existant
 * slave drive if the hwif is actually a flash memory card of some variety:
 */
-   if (drive_is_flashcard(drive)) {
-   ide_drive_t *mate = (drive)->drives[1^drive->select.b.unit];
+   if (!drive->select.b.unit && drive_is_flashcard(drive)) {
+   ide_drive_t *mate = (drive)->drives[1];
if (!mate->ata_flash) {
mate->present = 0;
mate->noprobe = 1;



[patch] I-Opener fix (again)

2000-12-11 Thread alex

It's been a few months (and a couple of kernel releases) since I mentioned this
before and it doesn't look like it's made it in, and I haven't seen any more
comments on it in the list archives, so I'm bringing it up again in case it
just got forgotten about somewhere along the line..

As I remember, Andre Hedrick had asked for clarification on my original post,
and I sent a followup message in response, but now I can't seem to find it
anywhere in the archives, so I don't know whether it never made it out of my
mailer or..

In any case, attached is a patch (against 2.4.0pre11) which fixes the bug which
causes disk detection issues on I-Opener (and possibly other unusual) hardware.

The problem is that the code assumes that a flash-disk will always be the
primary disk on an interface, but on the I-Opener this is not always the case.
If a traditional disk is primary, and a flashdisk is secondary, the detection
code (wrongly) disables the primary disk that it had already previously
detected.

I would like to see this make it into the official source as it's a very small
change that fixes some obviously wrong behavior..

-alex


--- drivers/ide/ide-probe.c.origMon Dec 11 14:59:08 2000
+++ drivers/ide/ide-probe.c Mon Dec 11 15:00:13 2000
@@ -161,8 +161,8 @@
 * Prevent long system lockup probing later for non-existant
 * slave drive if the hwif is actually a flash memory card of some variety:
 */
-   if (drive_is_flashcard(drive)) {
-   ide_drive_t *mate = HWIF(drive)-drives[1^drive-select.b.unit];
+   if (!drive-select.b.unit  drive_is_flashcard(drive)) {
+   ide_drive_t *mate = HWIF(drive)-drives[1];
if (!mate-ata_flash) {
mate-present = 0;
mate-noprobe = 1;