All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@intel.com>
To: "torvalds@transmeta.com" <torvalds@transmeta.com>,
	rmk@arm.linux.org.uk, lkml <linux-kernel@vger.kernel.org>
Subject: [Fwd: 2.4.0-test12-pre7]
Date: Thu, 07 Dec 2000 08:05:44 -0800	[thread overview]
Message-ID: <3A2FB558.C4C13106@intel.com> (raw)

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

> From: Russell King [mailto:rmk@arm.linux.org.uk]
> 
> Linus Torvalds writes:
> >     - me: UHCI drivers really need to enable bus mastering.
> 
> But it'll already be turned on if pci_assign_unassigned_resources() is
> called.  This calls pdev_enable_device for every single device, which
> turns on the bus master bit in the PCI command register.
> 
> Is it intentional that pci_assign_unassigned_resources should:
> 1. enable all devices?
> 2. enable bus master on all devices?

Russell beat me to this question (must have something to do
with that .uk location).

I think that Linus's patch is correct and that
pci/setup_res.c::pdev_enable_device() shouldn't be doing this:

	/* ??? Always turn on bus mastering.  If the device doesn't support
	   it, the bit will go into the bucket. */
	cmd |= PCI_COMMAND_MASTER;

First, the ??? makes it iffy.

Second, if the device doesn't support it, OK, but if the device
does support bus mastering and the device has been programmed
from a previous kernel/driver bootup (i.e., the device isn't reset
by a soft boot), then the device still knows some memory addresses
to DMA into, but it shouldn't be using those.  This is addressed
in a Word .doc file at www.pcisig.com/developers/docs/ :
"Warm Boot on PCI Machines".  The short summary is that soft reset
should disable bus mastering and not re-enable it.
This doc says that device drivers (or expansion ROM code) are
responsible for setting the bus master bit.

Third, removing this will help find drivers that don't do
  pci_set_master() when they should (like UHCI HCDs).  :(

~Randy
-- 
_______________________________________________
|randy.dunlap_at_intel.com        503-677-5408|
|NOTE: Any views presented here are mine alone|
|& may not represent the views of my employer.|
-----------------------------------------------

[-- Attachment #2: Type: message/rfc822, Size: 1103 bytes --]

To: Russell King <rmk@arm.linux.org.uk>, torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: RE: 2.4.0-test12-pre7
Date: Thu, 7 Dec 2000 07:48:42 -0800
Message-ID: <D5E932F578EBD111AC3F00A0C96B1E6F063E0631@orsmsx31.jf.intel.com>

> From: Russell King [mailto:rmk@arm.linux.org.uk]
> 
> Linus Torvalds writes:
> >     - me: UHCI drivers really need to enable bus mastering.
> 
> But it'll already be turned on if pci_assign_unassigned_resources() is
> called.  This calls pdev_enable_device for every single device, which
> turns on the bus master bit in the PCI command register.
> 
> Is it intentional that pci_assign_unassigned_resources should:
> 1. enable all devices?
> 2. enable bus master on all devices?

Russell beat me to this question (must have something to do
with that .uk location).

I think that Linus's patch is correct and that
pci/setup_res.c::pdev_enable_device() shouldn't be doing this:

             reply	other threads:[~2000-12-07 16:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-07 16:05 Randy Dunlap [this message]
2000-12-07 16:30 ` [Fwd: 2.4.0-test12-pre7] Alan Cox

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=3A2FB558.C4C13106@intel.com \
    --to=randy.dunlap@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=torvalds@transmeta.com \
    /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.