All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davy Chan <chandave-linux-mips@wiasia.com>
To: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org
Subject: [PATCH] pnx8550: Fix broken write_config_byte() function in arch/mips/pci/ops-pnx8550.c
Date: Fri, 5 Jan 2007 13:56:46 +0800	[thread overview]
Message-ID: <20070105135646.D14007@wiasia.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

(Looks like not many people write single bytes to the PCI configuration
 registers on a PNX8550-based system.)

There's a serious typo in the function:
  arch/mips/pci/ops-pnx8550.c:write_config_byte()

The parameter passed to the function config_access() is PCI_CMD_CONFIG_READ
instead of PCI_CMD_CONFIG_WRITE. This renders any attempts to write
a single byte to the PCI configuration registers useless.

This problem does not exist for write_config_word() nor write_config_dword().

This problem has been there since kernel v2.6.17 and is still there
as of kernel v2.6.19.1.

Patch attached.

See ya...

d.c.


[-- Attachment #2: ops-pnx8550.c.patch --]
[-- Type: text/plain, Size: 411 bytes --]

--- linux-2.6.17.13-orig/arch/mips/pci/ops-pnx8550.c	2006-09-10 01:17:04.000000000 +0800
+++ linux-2.6.17.13/arch/mips/pci/ops-pnx8550.c	2007-01-04 13:49:37.000000000 +0800
@@ -202,7 +202,7 @@
 		break;
 	}
 
-	err = config_access(PCI_CMD_CONFIG_READ, bus, devfn, where, ~(1 << (where & 3)), &data);
+	err = config_access(PCI_CMD_CONFIG_WRITE, bus, devfn, where, ~(1 << (where & 3)), &data);
 
 	return err;
 }

             reply	other threads:[~2007-01-05  6:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05  5:56 Davy Chan [this message]
2007-01-08 15:26 ` [PATCH] pnx8550: Fix broken write_config_byte() function in arch/mips/pci/ops-pnx8550.c Ralf Baechle

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=20070105135646.D14007@wiasia.com \
    --to=chandave-linux-mips@wiasia.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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.