mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luca Tettamanti <kronos.it@gmail.com>
To: Conke Hu <conke.hu@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] add pci revision id to struct pci_dev
Date: Mon, 6 Nov 2006 22:01:33 +0100	[thread overview]
Message-ID: <20061106210133.GA9717@dreamland.darkstar.lan> (raw)
In-Reply-To: <5767b9100611060440i1149e0e3v2162e0604db10da7@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF8, Size: 1700 bytes --]

Conke Hu <conke.hu@gmail.com> ha scritto:
> Hi all,
>    PCI revision id had better be added to struct pci_dev and
> initialized in pci_scan_device.
[...]
> diff -Nur linux-2.6.19-rc4-git10.orig/include/linux/pci.h
> linux-2.6.19-rc4-git10/include/linux/pci.h
> --- linux-2.6.19-rc4-git10.orig/include/linux/pci.h     2006-11-06
> 19:39:07.000000000 +0800
> +++ linux-2.6.19-rc4-git10/include/linux/pci.h  2006-11-06
> 19:41:57.000000000 +0800
> @@ -123,6 +123,7 @@
>       unsigned short  device;
>       unsigned short  subsystem_vendor;
>       unsigned short  subsystem_device;
> +       u8              revision;       /* PCI revision ID */
>       unsigned int    class;          /* 3 bytes: (base,sub,prog-if) */
>       u8              hdr_type;       /* PCI header type (`multi'
> flag masked out) */
>       u8              rom_base_reg;   /* which config register
> controls the ROM */

Hi,
I've noticed that after the 'class' field there are 3 u8 fields. If you
add the revision there then sizeof(struct pci_dev) stays constant:

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 09be0f8..c8586b7 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -124,6 +124,7 @@ struct pci_dev {
 	unsigned short	subsystem_vendor;
 	unsigned short	subsystem_device;
 	unsigned int	class;		/* 3 bytes: (base,sub,prog-if) */
+	u8		revision;	/* PCI revision id */
 	u8		hdr_type;	/* PCI header type (`multi' flag masked out) */
 	u8		rom_base_reg;	/* which config register controls the ROM */
 	u8		pin;  		/* which interrupt pin this device uses */


Luca
-- 
E' bene ricordare che l'intero Universo è formato,
con un'unica trascurabile eccezione, dagli "altri".
John Andrew Holmes

      parent reply	other threads:[~2006-11-06 21:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06 12:40 Conke Hu
2006-11-06 12:46 ` Arjan van de Ven
2006-11-06 13:28 ` Alan Cox
2006-11-06 14:10   ` Conke Hu
2006-11-06 14:31     ` Alan Cox
2006-11-06 14:19   ` Arjan van de Ven
2006-11-06 14:34     ` Alan Cox
2006-11-06 21:01 ` Luca Tettamanti [this message]

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=20061106210133.GA9717@dreamland.darkstar.lan \
    --to=kronos.it@gmail.com \
    --cc=conke.hu@gmail.com \
    --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®