Re: [PATCH] wrong order of kzalloc arguments

2007-02-09 Thread Kristen Accardi

On 2/9/07, Al Viro <[EMAIL PROTECTED]> wrote:


Signed-off-by: Al Viro <[EMAIL PROTECTED]>
---
 drivers/acpi/bay.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c
index 667fa1d..91082ce 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -296,7 +296,7 @@ static int bay_add(acpi_handle handle, int id)
/*
 * Initialize bay device structure
 */
-   new_bay = kzalloc(GFP_ATOMIC, sizeof(*new_bay));
+   new_bay = kzalloc(sizeof(*new_bay), GFP_ATOMIC);
INIT_LIST_HEAD(_bay->list);
new_bay->handle = handle;
new_bay->name = (char *)nbuffer.pointer;
--
1.5.0-rc2.GIT


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Oops.  thanks for taking the time to review and fix this.

Kristen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] wrong order of kzalloc arguments

2007-02-09 Thread Kristen Accardi

On 2/9/07, Al Viro [EMAIL PROTECTED] wrote:


Signed-off-by: Al Viro [EMAIL PROTECTED]
---
 drivers/acpi/bay.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c
index 667fa1d..91082ce 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -296,7 +296,7 @@ static int bay_add(acpi_handle handle, int id)
/*
 * Initialize bay device structure
 */
-   new_bay = kzalloc(GFP_ATOMIC, sizeof(*new_bay));
+   new_bay = kzalloc(sizeof(*new_bay), GFP_ATOMIC);
INIT_LIST_HEAD(new_bay-list);
new_bay-handle = handle;
new_bay-name = (char *)nbuffer.pointer;
--
1.5.0-rc2.GIT


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Oops.  thanks for taking the time to review and fix this.

Kristen
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Unidentified Intel wifi network card

2007-01-31 Thread Kristen Accardi

On 1/31/07, Scott Lockwood <[EMAIL PROTECTED]> wrote:

I'm looking for assistance with a wifi device I can't find a driver for,
the Intel Wireless 3945.

I"m getting this:

:0c:00.0 Network controller: Intel Corporation: Unknown device 4222
(rev 02)

on a new Dell Latitude D820. Anyone know if there will be an open source
driver for this any time soon, or if there is one now?

I'm using the latest vendor supplied kernel, so my apologies if this has
already been done and I'm late to the party. I wasn't able to find much,
other than 'use the NDIS wrapper' which I really don't want to do.

Thanks for any assistance, at all,
Scott

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



If you want to play with the experimental version with no binary
regulatory daemon,
try here:
http://bughost.org/iwlwifi/

Otherwise, go here:
http://ipw3945.sf.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Unidentified Intel wifi network card

2007-01-31 Thread Kristen Accardi

On 1/31/07, Scott Lockwood [EMAIL PROTECTED] wrote:

I'm looking for assistance with a wifi device I can't find a driver for,
the Intel Wireless 3945.

Im getting this:

:0c:00.0 Network controller: Intel Corporation: Unknown device 4222
(rev 02)

on a new Dell Latitude D820. Anyone know if there will be an open source
driver for this any time soon, or if there is one now?

I'm using the latest vendor supplied kernel, so my apologies if this has
already been done and I'm late to the party. I wasn't able to find much,
other than 'use the NDIS wrapper' which I really don't want to do.

Thanks for any assistance, at all,
Scott

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



If you want to play with the experimental version with no binary
regulatory daemon,
try here:
http://bughost.org/iwlwifi/

Otherwise, go here:
http://ipw3945.sf.net
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Pcihpd-discuss] Re: ACPI problem with PCI Express Native Hot-plug driver

2005-09-02 Thread Kristen Accardi
>  
> > Even if no body had faced this problem before, I would really
> > appreciate if any one can provide ANY kind of pointers / information
> > regarding this (As I am willing to explore and solve this, no matter
> > what :-))
> > 
> > TIA
> > 
> > Rajat Jain
> >

Hello,
Would you be willing to test the mainline kernel (2.6.13) to see if you
have the same problem with the most recent version of the driver?  And
attach the logs again please.

Thanks,
Kristen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Pcihpd-discuss] Re: ACPI problem with PCI Express Native Hot-plug driver

2005-09-02 Thread Kristen Accardi
  
  Even if no body had faced this problem before, I would really
  appreciate if any one can provide ANY kind of pointers / information
  regarding this (As I am willing to explore and solve this, no matter
  what :-))
  
  TIA
  
  Rajat Jain
 

Hello,
Would you be willing to test the mainline kernel (2.6.13) to see if you
have the same problem with the most recent version of the driver?  And
attach the logs again please.

Thanks,
Kristen

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Pcihpd-discuss] [PATCH] use bus_slot number for name

2005-08-16 Thread Kristen Accardi
On Wed, 2005-08-10 at 16:01 +0100, Matthew Wilcox wrote:
> On Fri, Aug 05, 2005 at 12:16:06PM -0700, Kristen Accardi wrote:
> > For systems with multiple hotplug controllers, you need to use more than
> > just the slot number to uniquely name the slot.  Without a unique slot
> > name, the pci_hp_register() will fail.  This patch adds the bus number
> > to the name.
> 
> That doesn't make much sense.  The slot number should at least be unique
> to the chassis, if not to the whole machine.  HP's large machines with
> multiple cabinets encode the cabinet number in the return from _SUN.
> It ends up as something like 80103 for a large machine while still being
> merely slot 3 for the smaller machines.
> 
> IOW, I think this is a firmware bug which needs to be fixed there.
> 

Just wanted to let you know that I'm not ignoring your comment :).  I'm
checking now to see if the firmware is required to make the slot number
unique across all controllers.  I also am expecting a hardware/firmware
update for the machine that exhibited this behavior, and so will retest
when I get it and let you know.  although, I'm not sure if it's a good
idea to trust the BIOS to do this properly even if it's required.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Pcihpd-discuss] [PATCH] use bus_slot number for name

2005-08-16 Thread Kristen Accardi
On Wed, 2005-08-10 at 16:01 +0100, Matthew Wilcox wrote:
 On Fri, Aug 05, 2005 at 12:16:06PM -0700, Kristen Accardi wrote:
  For systems with multiple hotplug controllers, you need to use more than
  just the slot number to uniquely name the slot.  Without a unique slot
  name, the pci_hp_register() will fail.  This patch adds the bus number
  to the name.
 
 That doesn't make much sense.  The slot number should at least be unique
 to the chassis, if not to the whole machine.  HP's large machines with
 multiple cabinets encode the cabinet number in the return from _SUN.
 It ends up as something like 80103 for a large machine while still being
 merely slot 3 for the smaller machines.
 
 IOW, I think this is a firmware bug which needs to be fixed there.
 

Just wanted to let you know that I'm not ignoring your comment :).  I'm
checking now to see if the firmware is required to make the slot number
unique across all controllers.  I also am expecting a hardware/firmware
update for the machine that exhibited this behavior, and so will retest
when I get it and let you know.  although, I'm not sure if it's a good
idea to trust the BIOS to do this properly even if it's required.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] 6700/6702PXH quirk

2005-08-08 Thread Kristen Accardi
On Mon, 2005-08-08 at 10:36 -0600, Bjorn Helgaas wrote:
> On Friday 05 August 2005 5:51 pm, Kristen Accardi wrote:
> > On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
> > driver and SHPC driver in MSI mode are used together.  This patch will
> > prevent MSI from being enabled for the SHPC as part of an early pci
> > quirk, as well as on any pci device which sets the no_msi bit.  
> 
> For mailing list archaeology, I assume this is erratum 15 in the
> 6700/6702 PXH spec update:
>   http://download.intel.com/design/chipsets/specupdt/30270609.pdf
> 
> which says
> 
>   An MSI is generated by the standard hot-plug controller may
>   get corrupted in presence of another ACPI hot-plug driver.
>   The ACPI driver performs configuration reads of DWSEL/DWORD
>   register in order to determine the hot-plug capability of all
>   the ACPI devices.  If the MSI is generated by the Standard
>   Hot-Plug Controller (SHPC) in this time period, there is a
>   possibility of the MSI getting corrupted.  As a result the
>   MSI may not get issued upstream to the MCH.  The above is a
>   result of interaction of separate events that are unpredict-
>   able.

That's correct.

> 
> So what still bugs me about this (and I'm probably just showing my
> ignorance here), is that we seem to have two drivers (SHPC and ACPI)
> poking at the same hardware.  Why is this?
> 
> And where exactly is the ACPI code that is involved?  I see shpc_init()
> doing config reads of DWORD_DATA, but I don't see how ACPI is involved.
> Is there some AML that's doing the config accesses?  Why would there
> be AML if we're using SHPC?
> 
> > @@ -699,6 +699,9 @@ int pci_enable_msi(struct pci_dev* dev)
> > if (!pci_msi_enable || !dev)
> > return status;
> >  
> > +   if (dev->no_msi)
> > +   return status;
> > +
> 

I am just learning this stuff as well, so hopefully someone will correct
me if I'm wrong.  This seems like a poorly worded erratum.  The acpiphp
driver does not actual do any config reads - it just asks the acpi core
to read the acpi namespace to determine the hotplug capabilities.  I
will try to find out more about the test case that they used to discover
this problem and get someone to explain it to me in english.


> Is there any reason not to fold this into the test above it?
> 

No, it seems that patches done at 4:45 on Friday don't turn out
optimally :).

> > +static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
> > +{
> > +   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
> > +   PCI_CAP_ID_MSI);
> 
> Is this even needed?  You're doing early fixups, which happen before
> any drivers touch the device, so you should only need to disable MSI
> if the BIOS can leave it enabled.  But I would have thought MSI would
> be disabled until a driver explicitly enables it.

This was me being paranoid.  I was concerned that some BIOS might decide
to enable by default, so I was just trying to make really really sure
that MSI would be turned off.  Think that's overkill?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] 6700/6702PXH quirk

2005-08-08 Thread Kristen Accardi
On Mon, 2005-08-08 at 10:36 -0600, Bjorn Helgaas wrote:
 On Friday 05 August 2005 5:51 pm, Kristen Accardi wrote:
  On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
  driver and SHPC driver in MSI mode are used together.  This patch will
  prevent MSI from being enabled for the SHPC as part of an early pci
  quirk, as well as on any pci device which sets the no_msi bit.  
 
 For mailing list archaeology, I assume this is erratum 15 in the
 6700/6702 PXH spec update:
   http://download.intel.com/design/chipsets/specupdt/30270609.pdf
 
 which says
 
   An MSI is generated by the standard hot-plug controller may
   get corrupted in presence of another ACPI hot-plug driver.
   The ACPI driver performs configuration reads of DWSEL/DWORD
   register in order to determine the hot-plug capability of all
   the ACPI devices.  If the MSI is generated by the Standard
   Hot-Plug Controller (SHPC) in this time period, there is a
   possibility of the MSI getting corrupted.  As a result the
   MSI may not get issued upstream to the MCH.  The above is a
   result of interaction of separate events that are unpredict-
   able.

That's correct.

 
 So what still bugs me about this (and I'm probably just showing my
 ignorance here), is that we seem to have two drivers (SHPC and ACPI)
 poking at the same hardware.  Why is this?
 
 And where exactly is the ACPI code that is involved?  I see shpc_init()
 doing config reads of DWORD_DATA, but I don't see how ACPI is involved.
 Is there some AML that's doing the config accesses?  Why would there
 be AML if we're using SHPC?
 
  @@ -699,6 +699,9 @@ int pci_enable_msi(struct pci_dev* dev)
  if (!pci_msi_enable || !dev)
  return status;
   
  +   if (dev-no_msi)
  +   return status;
  +
 

I am just learning this stuff as well, so hopefully someone will correct
me if I'm wrong.  This seems like a poorly worded erratum.  The acpiphp
driver does not actual do any config reads - it just asks the acpi core
to read the acpi namespace to determine the hotplug capabilities.  I
will try to find out more about the test case that they used to discover
this problem and get someone to explain it to me in english.


 Is there any reason not to fold this into the test above it?
 

No, it seems that patches done at 4:45 on Friday don't turn out
optimally :).

  +static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
  +{
  +   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
  +   PCI_CAP_ID_MSI);
 
 Is this even needed?  You're doing early fixups, which happen before
 any drivers touch the device, so you should only need to disable MSI
 if the BIOS can leave it enabled.  But I would have thought MSI would
 be disabled until a driver explicitly enables it.

This was me being paranoid.  I was concerned that some BIOS might decide
to enable by default, so I was just trying to make really really sure
that MSI would be turned off.  Think that's overkill?

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 18:50 -0400, Jeff Garzik wrote:
> 
> AFAICS we don't need a new list, simply consisting of PCI devs.
> 
> Just invent, and set, a bit somewhere in struct pci_dev.
> 
>   Jeff
> 
> 
> 
Great!  I like that much better.  How about this:

On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
driver and SHPC driver in MSI mode are used together.  This patch will
prevent MSI from being enabled for the SHPC as part of an early pci
quirk, as well as on any pci device which sets the no_msi bit.  

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/msi.c linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c
--- linux-2.6.13-rc4/drivers/pci/msi.c  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c 2005-08-05 16:35:16.0 
-0700
@@ -453,7 +453,7 @@ static void enable_msi_mode(struct pci_d
}
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
u16 control;
 
@@ -699,6 +699,9 @@ int pci_enable_msi(struct pci_dev* dev)
if (!pci_msi_enable || !dev)
return status;
 
+   if (dev->no_msi)
+   return status;
+
temp = dev->irq;
 
if ((status = msi_init()) < 0)
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/pci.h linux-2.6.13-rc4-pxhquirk/drivers/pci/pci.h
--- linux-2.6.13-rc4/drivers/pci/pci.h  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/pci.h 2005-08-05 16:37:18.0 
-0700
@@ -46,7 +46,7 @@ extern int pci_msi_quirk;
 #else
 #define pci_msi_quirk 0
 #endif
-
+void disable_msi_mode(struct pci_dev *dev, int pos, int type);
 extern int pcie_mch_quirk;
 extern struct device_attribute pci_dev_attrs[];
 extern struct class_device_attribute class_device_attr_cpuaffinity;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/quirks.c 
linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c
--- linux-2.6.13-rc4/drivers/pci/quirks.c   2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c  2005-08-05 
16:38:28.0 -0700
@@ -1267,6 +1267,27 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_pcie_mch );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_pcie_mch );
 
+
+/* 
+ * It's possible for the MSI to get corrupted if shpc and acpi
+ * are used together on certain PXH-based systems.
+ */
+static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+{
+   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+   PCI_CAP_ID_MSI);
+   dev->no_msi = 1;
+
+   printk(KERN_WARNING "PCI: PXH quirk detected, "
+   "disabling MSI for SHPC device\n");
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_0, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_1, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,   
quirk_pcie_pxh);
+
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/include/linux/pci.h 
linux-2.6.13-rc4-pxhquirk/include/linux/pci.h
--- linux-2.6.13-rc4/include/linux/pci.h2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/include/linux/pci.h   2005-08-05 
16:37:08.0 -0700
@@ -556,6 +556,7 @@ struct pci_dev {
/* keep track of device state */
unsigned intis_enabled:1;   /* pci_enable_device has been called */
unsigned intis_busmaster:1; /* device is busmaster */
+   unsigned intno_msi:1;   /* device may not use msi */

u32 saved_config_space[16]; /* config space saved at 
suspend time */
struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM 
entry */
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/include/linux/pci_ids.h 
linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h
--- linux-2.6.13-rc4/include/linux/pci_ids.h2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h   2005-08-02 
13:58:53.0 -0700
@@ -2281,6 +2281,11 @@
 #define PCI_VENDOR_ID_INTEL0x8086
 #define PCI_DEVICE_ID_INTEL_EESSC  0x0008
 #define PCI_DEVICE_ID_INTEL_21145  0x0039
+#define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320
+#define 

Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 15:26 -0700, Andrew Morton wrote:
> Kristen Accardi <[EMAIL PROTECTED]> wrote:

> > +   if (!quirk)
> > +   return -ENOMEM;
> > +   
> > +   INIT_LIST_HEAD(>list);
> > +   quirk->dev = dev;
> > +   list_add(>list, _quirk_list);
> > +   return 0;
> > +}
> 
> Does the list not need any locking?

Actually, I'm glad you asked that question because I was wondering that
myself.  The devices are added to the list at boot time, and after that
time, the list will never change.  Does PCI enumeration happen on all
processors?  I thought maybe it only happened on one.  In that case we
don't need a lock I don't think.  



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:35 -0700, Greg KH wrote:
> On Fri, Aug 05, 2005 at 09:27:42AM -0700, Kristen Accardi wrote:
> > @@ -1127,3 +1159,5 @@ EXPORT_SYMBOL(pci_enable_msi);
> >  EXPORT_SYMBOL(pci_disable_msi);
> >  EXPORT_SYMBOL(pci_enable_msix);
> >  EXPORT_SYMBOL(pci_disable_msix);
> > +EXPORT_SYMBOL(disable_msi_mode);
> > +EXPORT_SYMBOL(msi_add_quirk);
> 
> Why do these need to be exported?  It doesn't look like you are trying
> to access these from a module, or do you have a patch that uses them
> somewhere else?
> 
> thanks,
> 
> greg k-h

resend with changelog info:
On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
driver and SHPC driver in MSI mode are used together.  This patch will
prevent MSI from being enabled for the SHPC.  

I made this patch more generic than just shpc because I thought it was
possible that other devices in the system might need to add themselves
to the msi black list.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/msi.c linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c
--- linux-2.6.13-rc4/drivers/pci/msi.c  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c 2005-08-05 11:38:00.0 
-0700
@@ -38,6 +38,32 @@ int vector_irq[NR_VECTORS] = { [0 ... NR
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 #endif
 
+
+LIST_HEAD(msi_quirk_list);
+
+struct msi_quirk 
+{
+   struct list_head list;
+   struct pci_dev *dev;
+};
+
+
+int msi_add_quirk(struct pci_dev *dev)
+{
+   struct msi_quirk *quirk;
+
+   quirk = (struct msi_quirk *) kmalloc(sizeof(*quirk), GFP_KERNEL);
+   if (!quirk)
+   return -ENOMEM;
+   
+   INIT_LIST_HEAD(>list);
+   quirk->dev = dev;
+   list_add(>list, _quirk_list);
+   return 0;
+}
+
+
+
 static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
 {
memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
@@ -453,7 +479,7 @@ static void enable_msi_mode(struct pci_d
}
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
u16 control;
 
@@ -695,10 +721,16 @@ int pci_enable_msi(struct pci_dev* dev)
 {
int pos, temp, status = -EINVAL;
u16 control;
+   struct msi_quirk *quirk;
 
if (!pci_msi_enable || !dev)
return status;
 
+   list_for_each_entry(quirk, _quirk_list, list) {
+   if (quirk->dev == dev)
+   return -EINVAL;
+   }
+
temp = dev->irq;
 
if ((status = msi_init()) < 0)
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/quirks.c 
linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c
--- linux-2.6.13-rc4/drivers/pci/quirks.c   2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c  2005-08-05 
11:54:15.0 -0700
@@ -21,6 +21,10 @@
 #include 
 #include "pci.h"
 
+
+void disable_msi_mode(struct pci_dev *dev, int pos, int type);
+int msi_add_quirk(struct pci_dev *dev);
+
 /* Deal with broken BIOS'es that neglect to enable passive release,
which can cause problems in combination with the 82441FX/PPro MTRRs */
 static void __devinit quirk_passive_release(struct pci_dev *dev)
@@ -1267,6 +1271,30 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_pcie_mch );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_pcie_mch );
 
+
+/* 
+ * It's possible for the MSI to get corrupted if shpc and acpi
+ * are used together on certain PXH-based systems.
+ */
+static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+{
+   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+   PCI_CAP_ID_MSI);
+   if (!msi_add_quirk(dev)) 
+   printk(KERN_WARNING "PCI: PXH quirk detected, disabling MSI for 
SHPC device\n");
+   else {
+   pci_msi_quirk = 1;
+   printk(KERN_WARNING "PCI: PXH quirk detected, unable to disable 
MSI for SHPC device, disabling MSI for all devices\n");
+   }
+   
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_0, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_1, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,   
quirk_pcie_pxh);
+
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {

Re: [PATCH] use bus_slot number for name

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 15:51 -0400, Dave Jones wrote:
> On Fri, Aug 05, 2005 at 12:16:06PM -0700, Kristen Accardi wrote:
>  > For systems with multiple hotplug controllers, you need to use more than
>  > just the slot number to uniquely name the slot.  Without a unique slot
>  > name, the pci_hp_register() will fail.  This patch adds the bus number
>  > to the name.
>  > 
>  > Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>
>  > 
>  > diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
> linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h 
> linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h
>  > --- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h  2005-07-28 
> 15:44:44.0 -0700
>  > +++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h 
> 2005-08-04 17:57:18.0 -0700
>  > @@ -302,7 +302,7 @@ static inline void return_resource(struc
>  >  
>  >  static inline void make_slot_name(char *buffer, int buffer_size, struct 
> slot *slot)
>  >  {
>  > -  snprintf(buffer, buffer_size, "%d", slot->number);
>  > +  snprintf(buffer, buffer_size, "%04d_%04d", slot->bus, slot->number);
>  >  }
> 
> Won't using..
> 
>   snprintf(buffer, buffer_size, "%s", pci_name(slot));
> 
> work equally as well, and also future-proof this ?
>  
>   Dave

What do you think of this patch - it is basically what you asked for
except that I moved the functionality up to pci_hotplug.h so that all
drivers can use the same nameing convention if they feel like it.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/pciehp_core.c 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp_core.c
--- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp_core.c  2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp_core.c 
2005-08-05 14:15:09.0 -0700
@@ -140,7 +140,7 @@ static int init_slots(struct controller 
goto error_hpslot;
memset(new_slot->hotplug_slot->info, 0,
sizeof(struct hotplug_slot_info));
-   new_slot->hotplug_slot->name = kmalloc(SLOT_NAME_SIZE,
+   new_slot->hotplug_slot->name = kmalloc(HPSLOT_NAME_SIZE,
GFP_KERNEL);
if (!new_slot->hotplug_slot->name)
goto error_info;
@@ -156,7 +156,7 @@ static int init_slots(struct controller 
/* register this slot with the hotplug pci core */
new_slot->hotplug_slot->private = new_slot;
new_slot->hotplug_slot->release = _slot;
-   make_slot_name(new_slot->hotplug_slot->name, SLOT_NAME_SIZE, 
new_slot);
+   pci_hp_make_slot_name(new_slot->hotplug_slot, ctrl->pci_dev); 
new_slot->hotplug_slot->ops = _hotplug_slot_ops;
 
new_slot->hpc_ops->get_power_status(new_slot, 
&(new_slot->hotplug_slot->info->power_status));
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h   2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h  
2005-08-05 14:14:54.0 -0700
@@ -298,12 +298,6 @@ static inline void return_resource(struc
*head = node;
 }
 
-#define SLOT_NAME_SIZE 10
-
-static inline void make_slot_name(char *buffer, int buffer_size, struct slot 
*slot)
-{
-   snprintf(buffer, buffer_size, "%d", slot->number);
-}
 
 enum php_ctlr_type {
PCI,
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/pci_hotplug.h 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pci_hotplug.h
--- linux-2.6.13-rc4/drivers/pci/hotplug/pci_hotplug.h  2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pci_hotplug.h 
2005-08-05 14:21:45.0 -0700
@@ -170,6 +170,12 @@ struct hotplug_slot {
 };
 #define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj)
 
+#define HPSLOT_NAME_SIZE BUS_ID_SIZE 
+static inline void pci_hp_make_slot_name(struct hotplug_slot *hpslot, struct 
pci_dev *pdev)
+{
+   snprintf(hpslot->name, HPSLOT_NAME_SIZE, "%s", pci_name(pdev));
+}
+
 extern int pci_hp_register (struct hotplug_slot *slot);
 extern int pci_hp_deregister   (struct hotplug_slot *slot);
 extern int pci_hp_change_slot_info (struct hotplug_slot *slot

Re: [PATCH] use bus_slot number for name

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 15:51 -0400, Dave Jones wrote:
> On Fri, Aug 05, 2005 at 12:16:06PM -0700, Kristen Accardi wrote:
>  > For systems with multiple hotplug controllers, you need to use more than
>  > just the slot number to uniquely name the slot.  Without a unique slot
>  > name, the pci_hp_register() will fail.  This patch adds the bus number
>  > to the name.
>  > 
>  > Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>
>  > 
>  > diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
> linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h 
> linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h
>  > --- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h  2005-07-28 
> 15:44:44.0 -0700
>  > +++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h 
> 2005-08-04 17:57:18.0 -0700
>  > @@ -302,7 +302,7 @@ static inline void return_resource(struc
>  >  
>  >  static inline void make_slot_name(char *buffer, int buffer_size, struct 
> slot *slot)
>  >  {
>  > -  snprintf(buffer, buffer_size, "%d", slot->number);
>  > +  snprintf(buffer, buffer_size, "%04d_%04d", slot->bus, slot->number);
>  >  }
> 
> Won't using..
> 
>   snprintf(buffer, buffer_size, "%s", pci_name(slot));
> 
> work equally as well, and also future-proof this ?
>  
>   Dave

Well, it isn't as convenient since pci_dev is not available from the
slot structure. But I will do it if this is the general consensus.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] use bus_slot number for name

2005-08-05 Thread Kristen Accardi
For systems with multiple hotplug controllers, you need to use more than
just the slot number to uniquely name the slot.  Without a unique slot
name, the pci_hp_register() will fail.  This patch adds the bus number
to the name.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h   2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h  
2005-08-04 17:57:18.0 -0700
@@ -302,7 +302,7 @@ static inline void return_resource(struc
 
 static inline void make_slot_name(char *buffer, int buffer_size, struct slot 
*slot)
 {
-   snprintf(buffer, buffer_size, "%d", slot->number);
+   snprintf(buffer, buffer_size, "%04d_%04d", slot->bus, slot->number);
 }
 
 enum php_ctlr_type {
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/shpchp.h 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/shpchp.h
--- linux-2.6.13-rc4/drivers/pci/hotplug/shpchp.h   2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/shpchp.h  
2005-08-04 17:57:18.0 -0700
@@ -46,7 +46,7 @@ extern int shpchp_poll_mode;
 extern int shpchp_poll_time;
 extern int shpchp_debug;
 
-/*#define dbg(format, arg...) do { if (shpchp_debug) printk(KERN_DEBUG "%s: " 
format, MY_NAME , ## arg); } while (0)*/
+/* #define dbg(format, arg...) do { if (shpchp_debug) printk(KERN_DEBUG "%s: " 
format, MY_NAME , ## arg); } while (0) */
 #define dbg(format, arg...) do { if (shpchp_debug) printk("%s: " format, 
MY_NAME , ## arg); } while (0)
 #define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
 #define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
@@ -411,7 +411,7 @@ static inline void return_resource(struc
 
 static inline void make_slot_name(char *buffer, int buffer_size, struct slot 
*slot)
 {
-   snprintf(buffer, buffer_size, "%d", slot->number);
+   snprintf(buffer, buffer_size, "%04d_%04d", slot->bus, slot->number);
 }
 
 enum php_ctlr_type {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:35 -0700, Greg KH wrote:
> On Fri, Aug 05, 2005 at 09:27:42AM -0700, Kristen Accardi wrote:
> > @@ -1127,3 +1159,5 @@ EXPORT_SYMBOL(pci_enable_msi);
> >  EXPORT_SYMBOL(pci_disable_msi);
> >  EXPORT_SYMBOL(pci_enable_msix);
> >  EXPORT_SYMBOL(pci_disable_msix);
> > +EXPORT_SYMBOL(disable_msi_mode);
> > +EXPORT_SYMBOL(msi_add_quirk);
> 
> Why do these need to be exported?  It doesn't look like you are trying
> to access these from a module, or do you have a patch that uses them
> somewhere else?
> 
> thanks,
> 
> greg k-h

Oh... I thought I had to in order to access it from quirks.c.  You are
right, I don't need this, and we can always export later if modules want
to add to the msi_quirks list.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/msi.c linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c
--- linux-2.6.13-rc4/drivers/pci/msi.c  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c 2005-08-05 11:38:00.0 
-0700
@@ -38,6 +38,32 @@ int vector_irq[NR_VECTORS] = { [0 ... NR
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 #endif
 
+
+LIST_HEAD(msi_quirk_list);
+
+struct msi_quirk 
+{
+   struct list_head list;
+   struct pci_dev *dev;
+};
+
+
+int msi_add_quirk(struct pci_dev *dev)
+{
+   struct msi_quirk *quirk;
+
+   quirk = (struct msi_quirk *) kmalloc(sizeof(*quirk), GFP_KERNEL);
+   if (!quirk)
+   return -ENOMEM;
+   
+   INIT_LIST_HEAD(>list);
+   quirk->dev = dev;
+   list_add(>list, _quirk_list);
+   return 0;
+}
+
+
+
 static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
 {
memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
@@ -453,7 +479,7 @@ static void enable_msi_mode(struct pci_d
}
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
u16 control;
 
@@ -695,10 +721,16 @@ int pci_enable_msi(struct pci_dev* dev)
 {
int pos, temp, status = -EINVAL;
u16 control;
+   struct msi_quirk *quirk;
 
if (!pci_msi_enable || !dev)
return status;
 
+   list_for_each_entry(quirk, _quirk_list, list) {
+   if (quirk->dev == dev)
+   return -EINVAL;
+   }
+
temp = dev->irq;
 
if ((status = msi_init()) < 0)
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/quirks.c 
linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c
--- linux-2.6.13-rc4/drivers/pci/quirks.c   2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c  2005-08-05 
11:54:15.0 -0700
@@ -21,6 +21,10 @@
 #include 
 #include "pci.h"
 
+
+void disable_msi_mode(struct pci_dev *dev, int pos, int type);
+int msi_add_quirk(struct pci_dev *dev);
+
 /* Deal with broken BIOS'es that neglect to enable passive release,
which can cause problems in combination with the 82441FX/PPro MTRRs */
 static void __devinit quirk_passive_release(struct pci_dev *dev)
@@ -1267,6 +1271,30 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_pcie_mch );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_pcie_mch );
 
+
+/* 
+ * It's possible for the MSI to get corrupted if shpc and acpi
+ * are used together on certain PXH-based systems.
+ */
+static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+{
+   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+   PCI_CAP_ID_MSI);
+   if (!msi_add_quirk(dev)) 
+   printk(KERN_WARNING "PCI: PXH quirk detected, disabling MSI for 
SHPC device\n");
+   else {
+   pci_msi_quirk = 1;
+   printk(KERN_WARNING "PCI: PXH quirk detected, unable to disable 
MSI for SHPC device, disabling MSI for all devices\n");
+   }
+   
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_0, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_1, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,   
quirk_pcie_pxh);
+
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/include/linux/pci_ids.h 
linux-2.6.13-rc4-pxhquirk

Re: [PATCH] new contact info

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:36 -0700, Greg KH wrote:
> On Fri, Aug 05, 2005 at 11:06:08AM -0700, Kristen Accardi wrote:
> > diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
> > linux-2.6.13-rc5/MAINTAINERS linux-2.6.13-rc5-new/MAINTAINERS
> > --- linux-2.6.13-rc5/MAINTAINERS2005-08-01 21:45:48.0 -0700
> > +++ linux-2.6.13-rc5-new/MAINTAINERS2005-08-05 11:03:36.0 
> > -0700
> > @@ -1825,6 +1825,11 @@ P:   Greg Kroah-Hartman
> >  M: [EMAIL PROTECTED]
> >  S: Maintained
> >  
> > +PCIE HOTPLUG DRIVER
> > +P: Kristen Carlson Accardi
> > +M: [EMAIL PROTECTED]
> > +S: Maintained
> 
> Care to try it again, and add the pcihpd mailing list address too?  That
> is the place to talk about pci hotplug drivers, right?
> 
> thanks,
> 
> greg k-h

Ok.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c  2005-08-05 
09:34:57.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-05 
09:35:31.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h   2005-08-05 
09:35:48.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 #ifndef _PCIEHP_H
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c   2005-08-05 
09:36:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c   2005-08-05 
09:36:24.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c2005-08-05 
09:36:48.0 -0700
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 
linux-2.6.13

Re: [PATCH] new contact info

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:09 -0600, Bjorn Helgaas wrote:
> On Friday 05 August 2005 10:49 am, Kristen Accardi wrote:
> > Changing of the guards.
> > 
> > Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>
> > 
> > diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
> > linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c 
> > linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c
> > --- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c  2005-08-01 
> > 21:45:48.0 -0700
> > +++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c  2005-08-05 
> > 09:34:57.0 -0700
> > @@ -23,7 +23,7 @@
> >   * along with this program; if not, write to the Free Software
> >   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> >   *
> > - * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> > + * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> >   *
> >   */
> > ...
> 
> How about an update to MAINTAINERS in addition or even instead?

Ok.  How bout in addition.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c  2005-08-05 
09:34:57.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-05 
09:35:31.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h   2005-08-05 
09:35:48.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 #ifndef _PCIEHP_H
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c   2005-08-05 
09:36:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c   2005-08-05 
09:36:24.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c2005-08-05 
09:36:48.0 -0700
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Sof

Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:12 -0600, Bjorn Helgaas wrote:
> On Friday 05 August 2005 10:27 am, Kristen Accardi wrote:
> > On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
> > driver and SHPC driver in MSI mode are used together.  This patch will
> > prevent MSI from being enabled for the SHPC.  
> 
> Can you outline the scenario that causes the corruption?  This patch
> feels like a band-aid over a deeper problem.

This is a workaround to a hardware problem.  If a MSI interrupt occurs
while the ACPI driver is doing a config read of the hotplug capabilities
register, the MSI interrupt will be corrupted, and the MSI interrupt
will never make it to the MCH.  This causes the hotplug device to not be
recognized.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] new contact info

2005-08-05 Thread Kristen Accardi
Changing of the guards.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c  2005-08-05 
09:34:57.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-05 
09:35:31.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h   2005-08-05 
09:35:48.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 #ifndef _PCIEHP_H
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c   2005-08-05 
09:36:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c   2005-08-05 
09:36:24.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c2005-08-05 
09:36:48.0 -0700
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm.h 2005-08-05 
09:37:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
+ * Send feedback to <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_nonacpi.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_nonacpi.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_nonacpi.c 2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_nonacpi.c 2005-08-05 
09:37:27.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, 

[PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
driver and SHPC driver in MSI mode are used together.  This patch will
prevent MSI from being enabled for the SHPC.  

I made this patch more generic than just shpc because I thought it was
possible that other devices in the system might need to add themselves
to the msi black list.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/msi.c linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c
--- linux-2.6.13-rc4/drivers/pci/msi.c  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c 2005-08-04 12:09:44.0 
-0700
@@ -38,6 +38,32 @@ int vector_irq[NR_VECTORS] = { [0 ... NR
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 #endif
 
+
+LIST_HEAD(msi_quirk_list);
+
+struct msi_quirk 
+{
+   struct list_head list;
+   struct pci_dev *dev;
+};
+
+
+int msi_add_quirk(struct pci_dev *dev)
+{
+   struct msi_quirk *quirk;
+
+   quirk = (struct msi_quirk *) kmalloc(sizeof(*quirk), GFP_KERNEL);
+   if (!quirk)
+   return -ENOMEM;
+   
+   INIT_LIST_HEAD(>list);
+   quirk->dev = dev;
+   list_add(>list, _quirk_list);
+   return 0;
+}
+
+
+
 static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
 {
memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
@@ -453,7 +479,7 @@ static void enable_msi_mode(struct pci_d
}
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
u16 control;
 
@@ -695,10 +721,16 @@ int pci_enable_msi(struct pci_dev* dev)
 {
int pos, temp, status = -EINVAL;
u16 control;
+   struct msi_quirk *quirk;
 
if (!pci_msi_enable || !dev)
return status;
 
+   list_for_each_entry(quirk, _quirk_list, list) {
+   if (quirk->dev == dev)
+   return -EINVAL;
+   }
+
temp = dev->irq;
 
if ((status = msi_init()) < 0)
@@ -1127,3 +1159,5 @@ EXPORT_SYMBOL(pci_enable_msi);
 EXPORT_SYMBOL(pci_disable_msi);
 EXPORT_SYMBOL(pci_enable_msix);
 EXPORT_SYMBOL(pci_disable_msix);
+EXPORT_SYMBOL(disable_msi_mode);
+EXPORT_SYMBOL(msi_add_quirk);
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/quirks.c 
linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c
--- linux-2.6.13-rc4/drivers/pci/quirks.c   2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c  2005-08-04 
12:09:55.0 -0700
@@ -21,6 +21,10 @@
 #include 
 #include "pci.h"
 
+
+extern void disable_msi_mode(struct pci_dev *dev, int pos, int type);
+extern int msi_add_quirk(struct pci_dev *dev);
+
 /* Deal with broken BIOS'es that neglect to enable passive release,
which can cause problems in combination with the 82441FX/PPro MTRRs */
 static void __devinit quirk_passive_release(struct pci_dev *dev)
@@ -1267,6 +1271,30 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_pcie_mch );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_pcie_mch );
 
+
+/* 
+ * It's possible for the MSI to get corrupted if shpc and acpi
+ * are used together on certain PXH-based systems.
+ */
+static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+{
+   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+   PCI_CAP_ID_MSI);
+   if (!msi_add_quirk(dev)) 
+   printk(KERN_WARNING "PCI: PXH quirk detected, disabling MSI for 
SHPC device\n");
+   else {
+   pci_msi_quirk = 1;
+   printk(KERN_WARNING "PCI: PXH quirk detected, unable to disable 
MSI for SHPC device, disabling MSI for all devices\n");
+   }
+   
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_0, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_1, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,   
quirk_pcie_pxh);
+
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/include/linux/pci_ids.h 
linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h
--- linux-2.6.13-rc4/include/linux/pci_ids.h2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h   2005-08-02 
13:58:53.0 -0700
@@ -2281,6 +2281,11 @@
 #define PCI_VENDOR_ID_INTEL

[PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
driver and SHPC driver in MSI mode are used together.  This patch will
prevent MSI from being enabled for the SHPC.  

I made this patch more generic than just shpc because I thought it was
possible that other devices in the system might need to add themselves
to the msi black list.

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/msi.c linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c
--- linux-2.6.13-rc4/drivers/pci/msi.c  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c 2005-08-04 12:09:44.0 
-0700
@@ -38,6 +38,32 @@ int vector_irq[NR_VECTORS] = { [0 ... NR
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 #endif
 
+
+LIST_HEAD(msi_quirk_list);
+
+struct msi_quirk 
+{
+   struct list_head list;
+   struct pci_dev *dev;
+};
+
+
+int msi_add_quirk(struct pci_dev *dev)
+{
+   struct msi_quirk *quirk;
+
+   quirk = (struct msi_quirk *) kmalloc(sizeof(*quirk), GFP_KERNEL);
+   if (!quirk)
+   return -ENOMEM;
+   
+   INIT_LIST_HEAD(quirk-list);
+   quirk-dev = dev;
+   list_add(quirk-list, msi_quirk_list);
+   return 0;
+}
+
+
+
 static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
 {
memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
@@ -453,7 +479,7 @@ static void enable_msi_mode(struct pci_d
}
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
u16 control;
 
@@ -695,10 +721,16 @@ int pci_enable_msi(struct pci_dev* dev)
 {
int pos, temp, status = -EINVAL;
u16 control;
+   struct msi_quirk *quirk;
 
if (!pci_msi_enable || !dev)
return status;
 
+   list_for_each_entry(quirk, msi_quirk_list, list) {
+   if (quirk-dev == dev)
+   return -EINVAL;
+   }
+
temp = dev-irq;
 
if ((status = msi_init())  0)
@@ -1127,3 +1159,5 @@ EXPORT_SYMBOL(pci_enable_msi);
 EXPORT_SYMBOL(pci_disable_msi);
 EXPORT_SYMBOL(pci_enable_msix);
 EXPORT_SYMBOL(pci_disable_msix);
+EXPORT_SYMBOL(disable_msi_mode);
+EXPORT_SYMBOL(msi_add_quirk);
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/quirks.c 
linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c
--- linux-2.6.13-rc4/drivers/pci/quirks.c   2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c  2005-08-04 
12:09:55.0 -0700
@@ -21,6 +21,10 @@
 #include linux/acpi.h
 #include pci.h
 
+
+extern void disable_msi_mode(struct pci_dev *dev, int pos, int type);
+extern int msi_add_quirk(struct pci_dev *dev);
+
 /* Deal with broken BIOS'es that neglect to enable passive release,
which can cause problems in combination with the 82441FX/PPro MTRRs */
 static void __devinit quirk_passive_release(struct pci_dev *dev)
@@ -1267,6 +1271,30 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_pcie_mch );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_pcie_mch );
 
+
+/* 
+ * It's possible for the MSI to get corrupted if shpc and acpi
+ * are used together on certain PXH-based systems.
+ */
+static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+{
+   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+   PCI_CAP_ID_MSI);
+   if (!msi_add_quirk(dev)) 
+   printk(KERN_WARNING PCI: PXH quirk detected, disabling MSI for 
SHPC device\n);
+   else {
+   pci_msi_quirk = 1;
+   printk(KERN_WARNING PCI: PXH quirk detected, unable to disable 
MSI for SHPC device, disabling MSI for all devices\n);
+   }
+   
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_0, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_1, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,   
quirk_pcie_pxh);
+
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
unsigned int num_parallel = (dev-subsystem_device  0xf0)  4;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/include/linux/pci_ids.h 
linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h
--- linux-2.6.13-rc4/include/linux/pci_ids.h2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h   2005-08-02 
13:58:53.0 -0700
@@ -2281,6 +2281,11 @@
 #define PCI_VENDOR_ID_INTEL  

[PATCH] new contact info

2005-08-05 Thread Kristen Accardi
Changing of the guards.

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c  2005-08-05 
09:34:57.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-05 
09:35:31.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h   2005-08-05 
09:35:48.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 #ifndef _PCIEHP_H
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c   2005-08-05 
09:36:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED],[EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED],[EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c   2005-08-05 
09:36:24.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c2005-08-05 
09:36:48.0 -0700
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm.h 2005-08-05 
09:37:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_nonacpi.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_nonacpi.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_nonacpi.c 2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_nonacpi.c 2005-08-05 
09:37:27.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to 

Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:12 -0600, Bjorn Helgaas wrote:
 On Friday 05 August 2005 10:27 am, Kristen Accardi wrote:
  On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
  driver and SHPC driver in MSI mode are used together.  This patch will
  prevent MSI from being enabled for the SHPC.  
 
 Can you outline the scenario that causes the corruption?  This patch
 feels like a band-aid over a deeper problem.

This is a workaround to a hardware problem.  If a MSI interrupt occurs
while the ACPI driver is doing a config read of the hotplug capabilities
register, the MSI interrupt will be corrupted, and the MSI interrupt
will never make it to the MCH.  This causes the hotplug device to not be
recognized.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] new contact info

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:09 -0600, Bjorn Helgaas wrote:
 On Friday 05 August 2005 10:49 am, Kristen Accardi wrote:
  Changing of the guards.
  
  Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]
  
  diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
  linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c 
  linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c
  --- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c  2005-08-01 
  21:45:48.0 -0700
  +++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c  2005-08-05 
  09:34:57.0 -0700
  @@ -23,7 +23,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
  - * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  + * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
*
*/
  ...
 
 How about an update to MAINTAINERS in addition or even instead?

Ok.  How bout in addition.

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c  2005-08-05 
09:34:57.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-05 
09:35:31.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h   2005-08-05 
09:35:48.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 #ifndef _PCIEHP_H
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c   2005-08-05 
09:36:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED],[EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED],[EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c   2005-08-05 
09:36:24.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c2005-08-05 
09:36:48.0 -0700
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 2005-08

Re: [PATCH] new contact info

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:36 -0700, Greg KH wrote:
 On Fri, Aug 05, 2005 at 11:06:08AM -0700, Kristen Accardi wrote:
  diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
  linux-2.6.13-rc5/MAINTAINERS linux-2.6.13-rc5-new/MAINTAINERS
  --- linux-2.6.13-rc5/MAINTAINERS2005-08-01 21:45:48.0 -0700
  +++ linux-2.6.13-rc5-new/MAINTAINERS2005-08-05 11:03:36.0 
  -0700
  @@ -1825,6 +1825,11 @@ P:   Greg Kroah-Hartman
   M: [EMAIL PROTECTED]
   S: Maintained
   
  +PCIE HOTPLUG DRIVER
  +P: Kristen Carlson Accardi
  +M: [EMAIL PROTECTED]
  +S: Maintained
 
 Care to try it again, and add the pcihpd mailing list address too?  That
 is the place to talk about pci hotplug drivers, right?
 
 thanks,
 
 greg k-h

Ok.

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_core.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_core.c  2005-08-05 
09:34:57.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_ctrl.c  2005-08-05 
09:35:31.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp.h   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp.h   2005-08-05 
09:35:48.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 #ifndef _PCIEHP_H
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_hpc.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_hpc.c   2005-08-05 
09:36:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED],[EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED],[EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehp_pci.c   2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehp_pci.c   2005-08-05 
09:36:24.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm_acpi.c2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm_acpi.c2005-08-05 
09:36:48.0 -0700
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED]
  *
  */
 
diff -uprN -X linux-2.6.13-rc5/Documentation/dontdiff 
linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 
linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm.h
--- linux-2.6.13-rc5/drivers/pci/hotplug/pciehprm.h 2005-08-01 
21:45:48.0 -0700
+++ linux-2.6.13-rc5-new/drivers/pci/hotplug/pciehprm.h 2005-08-05 
09:37:07.0 -0700
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation

Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:35 -0700, Greg KH wrote:
 On Fri, Aug 05, 2005 at 09:27:42AM -0700, Kristen Accardi wrote:
  @@ -1127,3 +1159,5 @@ EXPORT_SYMBOL(pci_enable_msi);
   EXPORT_SYMBOL(pci_disable_msi);
   EXPORT_SYMBOL(pci_enable_msix);
   EXPORT_SYMBOL(pci_disable_msix);
  +EXPORT_SYMBOL(disable_msi_mode);
  +EXPORT_SYMBOL(msi_add_quirk);
 
 Why do these need to be exported?  It doesn't look like you are trying
 to access these from a module, or do you have a patch that uses them
 somewhere else?
 
 thanks,
 
 greg k-h

Oh... I thought I had to in order to access it from quirks.c.  You are
right, I don't need this, and we can always export later if modules want
to add to the msi_quirks list.

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/msi.c linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c
--- linux-2.6.13-rc4/drivers/pci/msi.c  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c 2005-08-05 11:38:00.0 
-0700
@@ -38,6 +38,32 @@ int vector_irq[NR_VECTORS] = { [0 ... NR
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 #endif
 
+
+LIST_HEAD(msi_quirk_list);
+
+struct msi_quirk 
+{
+   struct list_head list;
+   struct pci_dev *dev;
+};
+
+
+int msi_add_quirk(struct pci_dev *dev)
+{
+   struct msi_quirk *quirk;
+
+   quirk = (struct msi_quirk *) kmalloc(sizeof(*quirk), GFP_KERNEL);
+   if (!quirk)
+   return -ENOMEM;
+   
+   INIT_LIST_HEAD(quirk-list);
+   quirk-dev = dev;
+   list_add(quirk-list, msi_quirk_list);
+   return 0;
+}
+
+
+
 static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
 {
memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
@@ -453,7 +479,7 @@ static void enable_msi_mode(struct pci_d
}
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
u16 control;
 
@@ -695,10 +721,16 @@ int pci_enable_msi(struct pci_dev* dev)
 {
int pos, temp, status = -EINVAL;
u16 control;
+   struct msi_quirk *quirk;
 
if (!pci_msi_enable || !dev)
return status;
 
+   list_for_each_entry(quirk, msi_quirk_list, list) {
+   if (quirk-dev == dev)
+   return -EINVAL;
+   }
+
temp = dev-irq;
 
if ((status = msi_init())  0)
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/quirks.c 
linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c
--- linux-2.6.13-rc4/drivers/pci/quirks.c   2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c  2005-08-05 
11:54:15.0 -0700
@@ -21,6 +21,10 @@
 #include linux/acpi.h
 #include pci.h
 
+
+void disable_msi_mode(struct pci_dev *dev, int pos, int type);
+int msi_add_quirk(struct pci_dev *dev);
+
 /* Deal with broken BIOS'es that neglect to enable passive release,
which can cause problems in combination with the 82441FX/PPro MTRRs */
 static void __devinit quirk_passive_release(struct pci_dev *dev)
@@ -1267,6 +1271,30 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_pcie_mch );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_pcie_mch );
 
+
+/* 
+ * It's possible for the MSI to get corrupted if shpc and acpi
+ * are used together on certain PXH-based systems.
+ */
+static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+{
+   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+   PCI_CAP_ID_MSI);
+   if (!msi_add_quirk(dev)) 
+   printk(KERN_WARNING PCI: PXH quirk detected, disabling MSI for 
SHPC device\n);
+   else {
+   pci_msi_quirk = 1;
+   printk(KERN_WARNING PCI: PXH quirk detected, unable to disable 
MSI for SHPC device, disabling MSI for all devices\n);
+   }
+   
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_0, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_1, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,   
quirk_pcie_pxh);
+
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
unsigned int num_parallel = (dev-subsystem_device  0xf0)  4;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/include/linux/pci_ids.h 
linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h
--- linux-2.6.13-rc4/include/linux/pci_ids.h2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk

[PATCH] use bus_slot number for name

2005-08-05 Thread Kristen Accardi
For systems with multiple hotplug controllers, you need to use more than
just the slot number to uniquely name the slot.  Without a unique slot
name, the pci_hp_register() will fail.  This patch adds the bus number
to the name.

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h   2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h  
2005-08-04 17:57:18.0 -0700
@@ -302,7 +302,7 @@ static inline void return_resource(struc
 
 static inline void make_slot_name(char *buffer, int buffer_size, struct slot 
*slot)
 {
-   snprintf(buffer, buffer_size, %d, slot-number);
+   snprintf(buffer, buffer_size, %04d_%04d, slot-bus, slot-number);
 }
 
 enum php_ctlr_type {
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/shpchp.h 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/shpchp.h
--- linux-2.6.13-rc4/drivers/pci/hotplug/shpchp.h   2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/shpchp.h  
2005-08-04 17:57:18.0 -0700
@@ -46,7 +46,7 @@ extern int shpchp_poll_mode;
 extern int shpchp_poll_time;
 extern int shpchp_debug;
 
-/*#define dbg(format, arg...) do { if (shpchp_debug) printk(KERN_DEBUG %s:  
format, MY_NAME , ## arg); } while (0)*/
+/* #define dbg(format, arg...) do { if (shpchp_debug) printk(KERN_DEBUG %s:  
format, MY_NAME , ## arg); } while (0) */
 #define dbg(format, arg...) do { if (shpchp_debug) printk(%s:  format, 
MY_NAME , ## arg); } while (0)
 #define err(format, arg...) printk(KERN_ERR %s:  format, MY_NAME , ## arg)
 #define info(format, arg...) printk(KERN_INFO %s:  format, MY_NAME , ## arg)
@@ -411,7 +411,7 @@ static inline void return_resource(struc
 
 static inline void make_slot_name(char *buffer, int buffer_size, struct slot 
*slot)
 {
-   snprintf(buffer, buffer_size, %d, slot-number);
+   snprintf(buffer, buffer_size, %04d_%04d, slot-bus, slot-number);
 }
 
 enum php_ctlr_type {

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] use bus_slot number for name

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 15:51 -0400, Dave Jones wrote:
 On Fri, Aug 05, 2005 at 12:16:06PM -0700, Kristen Accardi wrote:
   For systems with multiple hotplug controllers, you need to use more than
   just the slot number to uniquely name the slot.  Without a unique slot
   name, the pci_hp_register() will fail.  This patch adds the bus number
   to the name.
   
   Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]
   
   diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
 linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h 
 linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h
   --- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h  2005-07-28 
 15:44:44.0 -0700
   +++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h 
 2005-08-04 17:57:18.0 -0700
   @@ -302,7 +302,7 @@ static inline void return_resource(struc

static inline void make_slot_name(char *buffer, int buffer_size, struct 
 slot *slot)
{
   -  snprintf(buffer, buffer_size, %d, slot-number);
   +  snprintf(buffer, buffer_size, %04d_%04d, slot-bus, slot-number);
}
 
 Won't using..
 
   snprintf(buffer, buffer_size, %s, pci_name(slot));
 
 work equally as well, and also future-proof this ?
  
   Dave

Well, it isn't as convenient since pci_dev is not available from the
slot structure. But I will do it if this is the general consensus.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] use bus_slot number for name

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 15:51 -0400, Dave Jones wrote:
 On Fri, Aug 05, 2005 at 12:16:06PM -0700, Kristen Accardi wrote:
   For systems with multiple hotplug controllers, you need to use more than
   just the slot number to uniquely name the slot.  Without a unique slot
   name, the pci_hp_register() will fail.  This patch adds the bus number
   to the name.
   
   Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]
   
   diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
 linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h 
 linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h
   --- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h  2005-07-28 
 15:44:44.0 -0700
   +++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h 
 2005-08-04 17:57:18.0 -0700
   @@ -302,7 +302,7 @@ static inline void return_resource(struc

static inline void make_slot_name(char *buffer, int buffer_size, struct 
 slot *slot)
{
   -  snprintf(buffer, buffer_size, %d, slot-number);
   +  snprintf(buffer, buffer_size, %04d_%04d, slot-bus, slot-number);
}
 
 Won't using..
 
   snprintf(buffer, buffer_size, %s, pci_name(slot));
 
 work equally as well, and also future-proof this ?
  
   Dave

What do you think of this patch - it is basically what you asked for
except that I moved the functionality up to pci_hotplug.h so that all
drivers can use the same nameing convention if they feel like it.

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/pciehp_core.c 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp_core.c
--- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp_core.c  2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp_core.c 
2005-08-05 14:15:09.0 -0700
@@ -140,7 +140,7 @@ static int init_slots(struct controller 
goto error_hpslot;
memset(new_slot-hotplug_slot-info, 0,
sizeof(struct hotplug_slot_info));
-   new_slot-hotplug_slot-name = kmalloc(SLOT_NAME_SIZE,
+   new_slot-hotplug_slot-name = kmalloc(HPSLOT_NAME_SIZE,
GFP_KERNEL);
if (!new_slot-hotplug_slot-name)
goto error_info;
@@ -156,7 +156,7 @@ static int init_slots(struct controller 
/* register this slot with the hotplug pci core */
new_slot-hotplug_slot-private = new_slot;
new_slot-hotplug_slot-release = release_slot;
-   make_slot_name(new_slot-hotplug_slot-name, SLOT_NAME_SIZE, 
new_slot);
+   pci_hp_make_slot_name(new_slot-hotplug_slot, ctrl-pci_dev); 
new_slot-hotplug_slot-ops = pciehp_hotplug_slot_ops;
 
new_slot-hpc_ops-get_power_status(new_slot, 
(new_slot-hotplug_slot-info-power_status));
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h
--- linux-2.6.13-rc4/drivers/pci/hotplug/pciehp.h   2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pciehp.h  
2005-08-05 14:14:54.0 -0700
@@ -298,12 +298,6 @@ static inline void return_resource(struc
*head = node;
 }
 
-#define SLOT_NAME_SIZE 10
-
-static inline void make_slot_name(char *buffer, int buffer_size, struct slot 
*slot)
-{
-   snprintf(buffer, buffer_size, %d, slot-number);
-}
 
 enum php_ctlr_type {
PCI,
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/pci_hotplug.h 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pci_hotplug.h
--- linux-2.6.13-rc4/drivers/pci/hotplug/pci_hotplug.h  2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/pci_hotplug.h 
2005-08-05 14:21:45.0 -0700
@@ -170,6 +170,12 @@ struct hotplug_slot {
 };
 #define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj)
 
+#define HPSLOT_NAME_SIZE BUS_ID_SIZE 
+static inline void pci_hp_make_slot_name(struct hotplug_slot *hpslot, struct 
pci_dev *pdev)
+{
+   snprintf(hpslot-name, HPSLOT_NAME_SIZE, %s, pci_name(pdev));
+}
+
 extern int pci_hp_register (struct hotplug_slot *slot);
 extern int pci_hp_deregister   (struct hotplug_slot *slot);
 extern int pci_hp_change_slot_info (struct hotplug_slot *slot,
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/hotplug/shpchp_core.c 
linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/shpchp_core.c
--- linux-2.6.13-rc4/drivers/pci/hotplug/shpchp_core.c  2005-07-28 
15:44:44.0 -0700
+++ linux-2.6.13-rc4-shpchp-slot-name-fix/drivers/pci/hotplug/shpchp_core.c 
2005-08-05 14:15

Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 11:35 -0700, Greg KH wrote:
 On Fri, Aug 05, 2005 at 09:27:42AM -0700, Kristen Accardi wrote:
  @@ -1127,3 +1159,5 @@ EXPORT_SYMBOL(pci_enable_msi);
   EXPORT_SYMBOL(pci_disable_msi);
   EXPORT_SYMBOL(pci_enable_msix);
   EXPORT_SYMBOL(pci_disable_msix);
  +EXPORT_SYMBOL(disable_msi_mode);
  +EXPORT_SYMBOL(msi_add_quirk);
 
 Why do these need to be exported?  It doesn't look like you are trying
 to access these from a module, or do you have a patch that uses them
 somewhere else?
 
 thanks,
 
 greg k-h

resend with changelog info:
On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
driver and SHPC driver in MSI mode are used together.  This patch will
prevent MSI from being enabled for the SHPC.  

I made this patch more generic than just shpc because I thought it was
possible that other devices in the system might need to add themselves
to the msi black list.

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/msi.c linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c
--- linux-2.6.13-rc4/drivers/pci/msi.c  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c 2005-08-05 11:38:00.0 
-0700
@@ -38,6 +38,32 @@ int vector_irq[NR_VECTORS] = { [0 ... NR
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 #endif
 
+
+LIST_HEAD(msi_quirk_list);
+
+struct msi_quirk 
+{
+   struct list_head list;
+   struct pci_dev *dev;
+};
+
+
+int msi_add_quirk(struct pci_dev *dev)
+{
+   struct msi_quirk *quirk;
+
+   quirk = (struct msi_quirk *) kmalloc(sizeof(*quirk), GFP_KERNEL);
+   if (!quirk)
+   return -ENOMEM;
+   
+   INIT_LIST_HEAD(quirk-list);
+   quirk-dev = dev;
+   list_add(quirk-list, msi_quirk_list);
+   return 0;
+}
+
+
+
 static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
 {
memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
@@ -453,7 +479,7 @@ static void enable_msi_mode(struct pci_d
}
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
u16 control;
 
@@ -695,10 +721,16 @@ int pci_enable_msi(struct pci_dev* dev)
 {
int pos, temp, status = -EINVAL;
u16 control;
+   struct msi_quirk *quirk;
 
if (!pci_msi_enable || !dev)
return status;
 
+   list_for_each_entry(quirk, msi_quirk_list, list) {
+   if (quirk-dev == dev)
+   return -EINVAL;
+   }
+
temp = dev-irq;
 
if ((status = msi_init())  0)
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/quirks.c 
linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c
--- linux-2.6.13-rc4/drivers/pci/quirks.c   2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c  2005-08-05 
11:54:15.0 -0700
@@ -21,6 +21,10 @@
 #include linux/acpi.h
 #include pci.h
 
+
+void disable_msi_mode(struct pci_dev *dev, int pos, int type);
+int msi_add_quirk(struct pci_dev *dev);
+
 /* Deal with broken BIOS'es that neglect to enable passive release,
which can cause problems in combination with the 82441FX/PPro MTRRs */
 static void __devinit quirk_passive_release(struct pci_dev *dev)
@@ -1267,6 +1271,30 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_pcie_mch );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_pcie_mch );
 
+
+/* 
+ * It's possible for the MSI to get corrupted if shpc and acpi
+ * are used together on certain PXH-based systems.
+ */
+static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+{
+   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+   PCI_CAP_ID_MSI);
+   if (!msi_add_quirk(dev)) 
+   printk(KERN_WARNING PCI: PXH quirk detected, disabling MSI for 
SHPC device\n);
+   else {
+   pci_msi_quirk = 1;
+   printk(KERN_WARNING PCI: PXH quirk detected, unable to disable 
MSI for SHPC device, disabling MSI for all devices\n);
+   }
+   
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_0, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_1, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,   
quirk_pcie_pxh);
+
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
unsigned int num_parallel = (dev-subsystem_device  0xf0)  4;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff

Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 15:26 -0700, Andrew Morton wrote:
 Kristen Accardi [EMAIL PROTECTED] wrote:

  +   if (!quirk)
  +   return -ENOMEM;
  +   
  +   INIT_LIST_HEAD(quirk-list);
  +   quirk-dev = dev;
  +   list_add(quirk-list, msi_quirk_list);
  +   return 0;
  +}
 
 Does the list not need any locking?

Actually, I'm glad you asked that question because I was wondering that
myself.  The devices are added to the list at boot time, and after that
time, the list will never change.  Does PCI enumeration happen on all
processors?  I thought maybe it only happened on one.  In that case we
don't need a lock I don't think.  



-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] 6700/6702PXH quirk

2005-08-05 Thread Kristen Accardi
On Fri, 2005-08-05 at 18:50 -0400, Jeff Garzik wrote:
 
 AFAICS we don't need a new list, simply consisting of PCI devs.
 
 Just invent, and set, a bit somewhere in struct pci_dev.
 
   Jeff
 
 
 
Great!  I like that much better.  How about this:

On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
driver and SHPC driver in MSI mode are used together.  This patch will
prevent MSI from being enabled for the SHPC as part of an early pci
quirk, as well as on any pci device which sets the no_msi bit.  

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/msi.c linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c
--- linux-2.6.13-rc4/drivers/pci/msi.c  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/msi.c 2005-08-05 16:35:16.0 
-0700
@@ -453,7 +453,7 @@ static void enable_msi_mode(struct pci_d
}
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
u16 control;
 
@@ -699,6 +699,9 @@ int pci_enable_msi(struct pci_dev* dev)
if (!pci_msi_enable || !dev)
return status;
 
+   if (dev-no_msi)
+   return status;
+
temp = dev-irq;
 
if ((status = msi_init())  0)
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/pci.h linux-2.6.13-rc4-pxhquirk/drivers/pci/pci.h
--- linux-2.6.13-rc4/drivers/pci/pci.h  2005-07-28 15:44:44.0 -0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/pci.h 2005-08-05 16:37:18.0 
-0700
@@ -46,7 +46,7 @@ extern int pci_msi_quirk;
 #else
 #define pci_msi_quirk 0
 #endif
-
+void disable_msi_mode(struct pci_dev *dev, int pos, int type);
 extern int pcie_mch_quirk;
 extern struct device_attribute pci_dev_attrs[];
 extern struct class_device_attribute class_device_attr_cpuaffinity;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/drivers/pci/quirks.c 
linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c
--- linux-2.6.13-rc4/drivers/pci/quirks.c   2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/drivers/pci/quirks.c  2005-08-05 
16:38:28.0 -0700
@@ -1267,6 +1267,27 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_pcie_mch );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_pcie_mch );
 
+
+/* 
+ * It's possible for the MSI to get corrupted if shpc and acpi
+ * are used together on certain PXH-based systems.
+ */
+static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+{
+   disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+   PCI_CAP_ID_MSI);
+   dev-no_msi = 1;
+
+   printk(KERN_WARNING PCI: PXH quirk detected, 
+   disabling MSI for SHPC device\n);
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_0, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHD_1, 
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,  
quirk_pcie_pxh);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,   
quirk_pcie_pxh);
+
+
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
unsigned int num_parallel = (dev-subsystem_device  0xf0)  4;
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/include/linux/pci.h 
linux-2.6.13-rc4-pxhquirk/include/linux/pci.h
--- linux-2.6.13-rc4/include/linux/pci.h2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/include/linux/pci.h   2005-08-05 
16:37:08.0 -0700
@@ -556,6 +556,7 @@ struct pci_dev {
/* keep track of device state */
unsigned intis_enabled:1;   /* pci_enable_device has been called */
unsigned intis_busmaster:1; /* device is busmaster */
+   unsigned intno_msi:1;   /* device may not use msi */

u32 saved_config_space[16]; /* config space saved at 
suspend time */
struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM 
entry */
diff -uprN -X linux-2.6.13-rc4/Documentation/dontdiff 
linux-2.6.13-rc4/include/linux/pci_ids.h 
linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h
--- linux-2.6.13-rc4/include/linux/pci_ids.h2005-07-28 15:44:44.0 
-0700
+++ linux-2.6.13-rc4-pxhquirk/include/linux/pci_ids.h   2005-08-02 
13:58:53.0 -0700
@@ -2281,6 +2281,11 @@
 #define PCI_VENDOR_ID_INTEL0x8086
 #define PCI_DEVICE_ID_INTEL_EESSC  0x0008
 #define PCI_DEVICE_ID_INTEL_21145  0x0039
+#define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320
+#define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321

Re: Re: Problem while inserting pciehp (PCI Express Hot-plug) driver

2005-07-28 Thread Kristen Accardi
On 7/28/05, Rajat Jain <[EMAIL PROTECTED]> wrote:
> >
> > Hi Rajat, you can learn more about the OSHP method by reading the PCI
> > express spec.  It is used to tell an ACPI bios that the OS will be
> > handling the hotplug events natively.  It may be that your BIOS does
> > not allow native hotplug for pcie, in which case you need to be using
> > the acpiphp driver instead of the pciehp driver.  You could just try
> > modprobing acpiphp and see if this will handle the hotplug events.  A
> > recent version of lspci (which understands pcie) will tell you as well
> > if pcie hotplug capability is supported (lspci -vv).
> >
> 
> Okay. I'm sorry but I'm not very clear with this. I'm just putting
> down here my understanding. So basically we have two mutually
> EXCLUSIVE hotplug drivers I can use for PCI Express:
> 
> 1) "pciehp.ko" : We use this PCIE HP driver when our BIOS supports
> Native Hot-plug for PCI Express (which means that hot-plug will be
> handled by OS single handedly).
> 
> 2) "acpiphp.ko" : We use this "generic" ACPI HP driver when BIOS
> allows only ITSELF to handle hot-plug events.

usually this is configurable.  So, you can configure you BIOS to use
acpi to handle hot-plug, or you can allow the OS to handle it.  Most
OS (from what I hear) don't actually implement native hotplug support,
so native hotplug support is probably not as big a priority for bios
writers as the acpi support.  so, it doesn't surprise me to find some
that don't support native.

you can run the native hotplug driver on a system who's bios supports
acpi - if it provides the OSHP method, this tells the bios to allow
the OS to handle it.

> 
> Is my understanding correct? I would appreciate if you could help me
> gain a grip on this.

i'm trying to gain a grip myself, as i've just started learning about
pcie :).  someone else hopefully will correct me if i'm telling you
the wrong info.


> 
> Thanks a lot for the useful info you gave. Provided me with a new
> direction to work on.
> 
> Regards,
> 
> Rajat
> 

Kristen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Re: Problem while inserting pciehp (PCI Express Hot-plug) driver

2005-07-28 Thread Kristen Accardi
On 7/28/05, Rajat Jain [EMAIL PROTECTED] wrote:
 
  Hi Rajat, you can learn more about the OSHP method by reading the PCI
  express spec.  It is used to tell an ACPI bios that the OS will be
  handling the hotplug events natively.  It may be that your BIOS does
  not allow native hotplug for pcie, in which case you need to be using
  the acpiphp driver instead of the pciehp driver.  You could just try
  modprobing acpiphp and see if this will handle the hotplug events.  A
  recent version of lspci (which understands pcie) will tell you as well
  if pcie hotplug capability is supported (lspci -vv).
 
 
 Okay. I'm sorry but I'm not very clear with this. I'm just putting
 down here my understanding. So basically we have two mutually
 EXCLUSIVE hotplug drivers I can use for PCI Express:
 
 1) pciehp.ko : We use this PCIE HP driver when our BIOS supports
 Native Hot-plug for PCI Express (which means that hot-plug will be
 handled by OS single handedly).
 
 2) acpiphp.ko : We use this generic ACPI HP driver when BIOS
 allows only ITSELF to handle hot-plug events.

usually this is configurable.  So, you can configure you BIOS to use
acpi to handle hot-plug, or you can allow the OS to handle it.  Most
OS (from what I hear) don't actually implement native hotplug support,
so native hotplug support is probably not as big a priority for bios
writers as the acpi support.  so, it doesn't surprise me to find some
that don't support native.

you can run the native hotplug driver on a system who's bios supports
acpi - if it provides the OSHP method, this tells the bios to allow
the OS to handle it.

 
 Is my understanding correct? I would appreciate if you could help me
 gain a grip on this.

i'm trying to gain a grip myself, as i've just started learning about
pcie :).  someone else hopefully will correct me if i'm telling you
the wrong info.


 
 Thanks a lot for the useful info you gave. Provided me with a new
 direction to work on.
 
 Regards,
 
 Rajat
 

Kristen
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Re: Problem while inserting pciehp (PCI Express Hot-plug) driver

2005-07-27 Thread Kristen Accardi
On 7/24/05, Rajat Jain <[EMAIL PROTECTED]> wrote:
> > On Tue, Jul 12, 2005 at 06:01:22PM +0900, Rajat Jain
> > wrote:
> >
> > > Hi,
> > >
> > > I'm trying to use the PCI Express Hot-Plug Controller driver
> > > (pciehp.ko) with Kernel 2.6 so that I can get hot-plug events
> > > whenever I add a card to my PCI Express slot.
> > >
> > > I built the driver as a module, and am trying to load it
> > > manually using modprobe. However, when trying to insert,
> > > I'm getting the following error:
> > >
> > > pciehp: acpi_pciehprm:\_SB.PCI0 _OSC fails=0x5
> > > pciehp: Both _OSC and OSHP methods do not exist
> > > FATAL: Error inserting pciehp
> > >
> > > (/lib/modules/2.6.9-5.18AXcustom-hotplug/kernel/drivers/pci/hotplug/pciehp.ko):
> > > No such device
> > >
> 
> > --- Greg KH <[EMAIL PROTECTED]> wrote:
> > Your bios does not support pci express hotplug.  Are
> > you sure you have pci express hotplug hardware in your
> > system?  If so, contact your bios vendor to get an
> > updated version.
> >
> > Good luck,
> >
> >  greg k-h
> 
> Thanks for replying Greg. I checked again, I have the hardware in my
> system. I asked the vendor for bios update, but he says mine is the
> latest version.
> 
> I downloaded the Intel "iasl" compiler
> (http://developer.intel.com/technology/iapc/acpi/downloads.htm),  and
> used it to decompile "/proc/acpi/dsdt" file (in AML) to its equivalent
> ACPI source code. I could not find the _OSC and OSHP control methods
> there. Is this information sufficient enough to deduce that I need a
> BIOS update? And the hardware is OK but the problem is with the bios?
> 
> Just out of curosity, I would appreciate if you could provide me
> pointers to OSHP and _OSC methods. What exactly do they mean? Does
> every hardware containing a hot-plug controller necessarily has to
> implement them both? I checked with ACPI Specs but it contains no
> refrence to "OSHP" method.
> 
> Any pointers are more than appreciated,
> 
> TIA,
> 
> Rajat

Hi Rajat, you can learn more about the OSHP method by reading the PCI
express spec.  It is used to tell an ACPI bios that the OS will be
handling the hotplug events natively.  It may be that your BIOS does
not allow native hotplug for pcie, in which case you need to be using
the acpiphp driver instead of the pciehp driver.  You could just try
modprobing acpiphp and see if this will handle the hotplug events.  A
recent version of lspci (which understands pcie) will tell you as well
if pcie hotplug capability is supported (lspci -vv).

> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Re: Problem while inserting pciehp (PCI Express Hot-plug) driver

2005-07-27 Thread Kristen Accardi
On 7/24/05, Rajat Jain [EMAIL PROTECTED] wrote:
  On Tue, Jul 12, 2005 at 06:01:22PM +0900, Rajat Jain
  wrote:
 
   Hi,
  
   I'm trying to use the PCI Express Hot-Plug Controller driver
   (pciehp.ko) with Kernel 2.6 so that I can get hot-plug events
   whenever I add a card to my PCI Express slot.
  
   I built the driver as a module, and am trying to load it
   manually using modprobe. However, when trying to insert,
   I'm getting the following error:
  
   pciehp: acpi_pciehprm:\_SB.PCI0 _OSC fails=0x5
   pciehp: Both _OSC and OSHP methods do not exist
   FATAL: Error inserting pciehp
  
   (/lib/modules/2.6.9-5.18AXcustom-hotplug/kernel/drivers/pci/hotplug/pciehp.ko):
   No such device
  
 
  --- Greg KH [EMAIL PROTECTED] wrote:
  Your bios does not support pci express hotplug.  Are
  you sure you have pci express hotplug hardware in your
  system?  If so, contact your bios vendor to get an
  updated version.
 
  Good luck,
 
   greg k-h
 
 Thanks for replying Greg. I checked again, I have the hardware in my
 system. I asked the vendor for bios update, but he says mine is the
 latest version.
 
 I downloaded the Intel iasl compiler
 (http://developer.intel.com/technology/iapc/acpi/downloads.htm),  and
 used it to decompile /proc/acpi/dsdt file (in AML) to its equivalent
 ACPI source code. I could not find the _OSC and OSHP control methods
 there. Is this information sufficient enough to deduce that I need a
 BIOS update? And the hardware is OK but the problem is with the bios?
 
 Just out of curosity, I would appreciate if you could provide me
 pointers to OSHP and _OSC methods. What exactly do they mean? Does
 every hardware containing a hot-plug controller necessarily has to
 implement them both? I checked with ACPI Specs but it contains no
 refrence to OSHP method.
 
 Any pointers are more than appreciated,
 
 TIA,
 
 Rajat

Hi Rajat, you can learn more about the OSHP method by reading the PCI
express spec.  It is used to tell an ACPI bios that the OS will be
handling the hotplug events natively.  It may be that your BIOS does
not allow native hotplug for pcie, in which case you need to be using
the acpiphp driver instead of the pciehp driver.  You could just try
modprobing acpiphp and see if this will handle the hotplug events.  A
recent version of lspci (which understands pcie) will tell you as well
if pcie hotplug capability is supported (lspci -vv).

 -
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/