mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Daniela Engert <dani@ngrt.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.4.19-ac2
Date: 04 Aug 2002 22:01:16 +0100	[thread overview]
Message-ID: <1028494876.15495.17.camel@irongate.swansea.linux.org.uk> (raw)
In-Reply-To: <200208041939.VAA15993@myway.myway.de>

On Sun, 2002-08-04 at 20:39, Daniela Engert wrote:
> On 04 Aug 2002 21:27:19 +0100, Alan Cox wrote:
> 
> > 	if((r9 & 0x0A) != 0x0A)		/* Legacy only */
> > 	/* Request programmability */
> > 	pci_write_config_byte(dev, PCI_CLASS_PROG, r9|0x05);
> 
> There is no guarantee that this will succeed. Quite some PCI IDE
> controller chips (f.e. ALi, SiS) may have config register 9 r/o locked
> by some other means.

If its locked read only then that is fine. The read back will see the
old value not 0x05 bits set. In which case it'll leave it alone 

	pci_write_config_byte(dev, PCI_CLASS_PROG, r9|0x05);
        pci_read_config_byte(dev, PCI_CLASS_PROG, &r9);

	if((r9 & 0x05) == 0x05)		/* Reprogrammable */
		return 1;

	/* Refused */
	return 0;

I'm just trying to get this right so we can do a sensible quick fix for
2.4.19. Its relatively easy to add pci_assign_device(dev) functionality
and make the IDE drivers do the right thing when they kick the devices
out of legacy mode. Thats the longer term right answer.


  reply	other threads:[~2002-08-04 19:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-04 17:46 Alan Cox
2002-08-04 18:57 ` Devilkin
2002-08-04 20:27   ` Alan Cox
2002-08-04 19:39     ` Daniela Engert
2002-08-04 21:01       ` Alan Cox [this message]
2002-08-05 10:21         ` Eric W. Biederman
2002-08-05 13:00           ` Alan Cox
2002-08-05  5:44   ` Clemens 'Gullevek' Schwaighofer
2002-08-04 21:24 Tony Spinillo

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=1028494876.15495.17.camel@irongate.swansea.linux.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=dani@ngrt.de \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®