mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: peterson@austin.ibm.com
Cc: anton@au.ibm.com, paulus@ozlabs.au.ibm.com, mj@suse.cz,
	linux-kernel@vger.kernel.org
Subject: Re: PowerPC Linux and PCI
Date: Fri, 19 Apr 2002 14:38:39 -0700 (PDT)	[thread overview]
Message-ID: <20020419.143839.15920500.davem@redhat.com> (raw)
In-Reply-To: <3CC08DFF.787F6E54@austin.ibm.com>

   From: James L Peterson <peterson@austin.ibm.com>
   Date: Fri, 19 Apr 2002 16:37:03 -0500

   if (pci_read_config_dword(temp, PCI_VENDOR_ID, &l))
     return NULL;
        ....
     memcpy(dev, temp, sizeof(*dev));
    dev->vendor = l & 0xffff;
    dev->device = (l >> 16) & 0xffff;
   
   It seems to me this is incorrect for a big-endian machine
   (like PowerPC).  If we read the two 16-bit parts out of the
   first 32-bit part, we will end up with:

pci_read_config_dword should do the byte swapping on &l for
the caller, fix your pci_{read,write}_config_*() arch implementation.


  reply	other threads:[~2002-04-19 21:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF8A238806.80D1511C-ON87256B75.00773B75@boulder.ibm.com>
     [not found] ` <20020307220318.GA4664@haven>
2002-04-19 21:37   ` James L Peterson
2002-04-19 21:38     ` David S. Miller [this message]
2002-04-20  9:10       ` Paul Mackerras
2002-04-22 14:14         ` James L Peterson
2002-04-23  8:00           ` Paul Mackerras
2002-04-23  8:14             ` David S. Miller
2002-04-23 16:54               ` James L Peterson
2002-04-23 17:53             ` James L Peterson
2002-04-23 17:16 Ed Vance
2002-04-24  3:59 ` David S. Miller
2002-04-24 16:45 Ed Vance

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=20020419.143839.15920500.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=anton@au.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mj@suse.cz \
    --cc=paulus@ozlabs.au.ibm.com \
    --cc=peterson@austin.ibm.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 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®