Subject: Patch for ALI15x3 - Linux-MIPS kernel 2.4.22-rc3

From: Jack Miller <[email-masked]>
Date: 12 Nov 2003 10:43:03 -0800

Ralf,
    Please apply this patch for the file drivers/ide/pci/alim15x3.c.  It
fixes the LBA addressing mode for chip revisions <= 0xC4.  Thank-You.

  Regards,
    Jack

--- alim15x3.c.orig	2003-11-12 10:32:04.000000000 -0800
+++ alim15x3.c	2003-11-12 08:18:08.000000000 -0800
@@ -760,7 +760,7 @@
 	hwif->speedproc = &ali15x3_tune_chipset;
 
 	/* Don't use LBA48 on ALi devices before rev 0xC5 */
-	hwif->addressing = (m5229_revision <= 0xC4) ? 1 : 0;
+	hwif->addressing = (m5229_revision <= 0xC4) ? 0 : 1;
 
 	if (!hwif->dma_base) {
 		hwif->drives[0].autotune = 1;

---

From: Alan Cox <[email-masked]>
Date: Thu, 13 Nov 2003 00:56:33 +0000

> fixes the LBA addressing mode for chip revisions <= 0xC4.  Thank-You.

It seems to break it not fix it.

addressing = 1 means no LBA48
addressing = 0 means LBA48

Alan

---

From: "Jack Miller" <[email-masked]>
Date: Wed, 12 Nov 2003 17:13:53 -0800

Alan,
    I am not so sure of that.  If you look at ide-disk.c:__ide_do_rw_disk(),
there is a local variable assignment statement:

  u8 lba48 = (drive->addressing = 1) ? 1 : 0;

  So it would seem that the problem is elswhere ?

  -Jack

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Alan Cox
> Sent: Wednesday, November 12, 2003 4:57 PM
> To: Jack Miller
> Cc: Ralf Baechle; Linux-MIPS
> Subject: Re: Patch for ALI15x3 - Linux-MIPS kernel 2.4.22-rc3
>
>

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Thu, 13 Nov 2003 09:59:08 +0100

On Wed, 2003-11-12 17:13:53 -0800, Jack Miller <[email-masked]>
>   u8 lba48 = (drive->addressing = 1) ? 1 : 0;
                                 ^^^

Explode. Now, lba48 would _always_ be 1.

MfG, JBG

-- 
   Jan-Benedict Glaw       [email-masked]    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

---

From: "Jack Miller" <[email-masked]>
Date: Thu, 13 Nov 2003 09:49:34 -0800

Sorry for the typo in the transcription, the source code is correct
regarding the test and assignment.

> [mailto:[email-masked]]On Behalf Of Jan-Benedict Glaw
> Sent: Thursday, November 13, 2003 12:59 AM
> To: Linux-MIPS
> wrote in message
> <[email-masked]>:
> >   Alan,

---

From: Alan Cox <[email-masked]>
Date: Thu, 13 Nov 2003 22:37:25 +0000

>   So it would seem that the problem is elswhere ?

drive and hwif->addressing are different. (Not my idea don't blame me!)

In the last code I did before going on sabattical its all become a bit
irrelevant as I implemented the notion of lba48 pio-only