All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: Randolph Chung <randolph@tausq.org>
Cc: parisc-linux@lists.parisc-linux.org, "M. Grabert" <xam@cs.ucc.ie>
Subject: Re: [parisc-linux] Results of (IDE) kernel tests with modified io.c
Date: Tue, 9 Mar 2004 11:38:39 -0700	[thread overview]
Message-ID: <20040309183839.GA19675@colo.lackof.org> (raw)
In-Reply-To: <20040309072917.GN1113@tausq.org>

On Mon, Mar 08, 2004 at 11:29:17PM -0800, Randolph Chung wrote:
...
> Grant tells me that he suspects there's a bug somewhere in the pci
> config accessor functions tho...

After getting some sleep, I'm convinced the lba_pci.c cfg accessors
are wrong. The following patch should fix the write path and IIRC,
Randolph already tried this out.

Two remaining issues:
1) I still need to figure out why the "TR4PLUS" code path doesn't work
   for config space read function. It still crashes with changes
   similar to the write path.

2) Both "astro" based workstations and servers provide PCI config
   accessors via PDC. A patch to support those was submitted a month
   or so ago but I haven't heard back if the submitter could/would
   apply the requested changes.

thanks,
grant

Index: drivers/parisc/lba_pci.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/parisc/lba_pci.c,v
retrieving revision 1.9
diff -u -p -r1.9 lba_pci.c
--- a/drivers/parisc/lba_pci.c	4 Feb 2004 16:31:16 -0000	1.9
+++ b/drivers/parisc/lba_pci.c	9 Mar 2004 06:57:06 -0000
@@ -613,13 +612,14 @@ static int lba_cfg_write(struct pci_bus 
 	/* Basic Algorithm */
 	LBA_CFG_TR4_ADDR_SETUP(d, tok | pos);
 	switch(size) {
-	case 1: WRITE_REG8 (data, d->hba.base_addr + LBA_PCI_CFG_DATA);
+	case 1: WRITE_REG8 (data, d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 3));
 		   break;
-	case 2: WRITE_REG16(data, d->hba.base_addr + LBA_PCI_CFG_DATA);
+	case 2: WRITE_REG16(data, d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 2));
 		   break;
 	case 4: WRITE_REG32(data, d->hba.base_addr + LBA_PCI_CFG_DATA);
 		   break;
 	}
+	/* flush posted write */
 	lba_t32 = READ_REG32(d->hba.base_addr + LBA_PCI_CFG_ADDR);
 	return 0;
 }

  parent reply	other threads:[~2004-03-09 18:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-09  6:29 [parisc-linux] Results of (IDE) kernel tests with modified io.c M. Grabert
2004-03-09  6:36 ` Randolph Chung
2004-03-09  7:11   ` M. Grabert
2004-03-09  7:29     ` Randolph Chung
2004-03-09 15:26       ` [parisc-linux] 2.6.4-rc1-pa3 siimage/NS87415 IDE progess (and another mystery)! M. Grabert
2004-07-11 22:18         ` [parisc-linux] " Grant Grundler
2004-07-11 22:48           ` M. Grabert
2004-07-11 23:14           ` Randolph Chung
2004-07-11 23:34             ` Randolph Chung
2004-07-12  0:12               ` Grant Grundler
2004-07-12  3:37               ` M. Grabert
2004-07-12  4:19                 ` M. Grabert
2004-07-12 16:14                   ` Grant Grundler
2004-07-12 18:51                     ` M. Grabert
2004-07-13  3:56                       ` Grant Grundler
2004-07-13  5:59                         ` Grant Grundler
2004-07-12 19:44                     ` Alan Cox
2004-07-12 16:05                 ` Grant Grundler
2004-07-12 18:39                   ` M. Grabert
2004-07-12 18:50                     ` Randolph Chung
2004-07-13  4:17                     ` Grant Grundler
2004-07-11 23:34             ` Grant Grundler
2004-03-09 18:38       ` Grant Grundler [this message]
2004-03-09 15:25     ` [parisc-linux] Results of (IDE) kernel tests with modified io.c John David Anglin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040309183839.GA19675@colo.lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=randolph@tausq.org \
    --cc=xam@cs.ucc.ie \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.