From: Brian King <brking@linux.vnet.ibm.com>
To: greg@kroah.com
Cc: linux-pci@atrey.karlin.mff.cuni.cz, paulus@samba.org,
linuxppc-dev@ozlabs.org, James.Bottomley@steeleye.com,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/3] pci: New PCI-E reset API
Date: Thu, 08 Mar 2007 14:44:26 -0600 [thread overview]
Message-ID: <45F075AA.502@linux.vnet.ibm.com> (raw)
In-Reply-To: <11718964333825-patch-mail.ibm.com>
Greg,
I saw you pulled this into your gregkh-2.6 tree. Does that mean
it is queued for 2.6.22?
Thanks,
Brian
Brian King wrote:
> Adds a new API which can be used to issue various types
> of PCI-E reset, including PCI-E warm reset and PCI-E hot reset.
> This is needed for an ipr PCI-E adapter which does not properly
> implement BIST. Running BIST on this adapter results in PCI-E
> errors. The only reliable reset mechanism that exists on this
> hardware is PCI Fundamental reset (warm reset). Since driving
> this type of reset is architecture unique, this provides the
> necessary hooks for architectures to add this support.
>
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> ---
>
> linux-2.6-bjking1/drivers/pci/pci.c | 29 +++++++++++++++++++++++++++++
> linux-2.6-bjking1/include/linux/pci.h | 14 ++++++++++++++
> 2 files changed, 43 insertions(+)
>
> diff -puN drivers/pci/pci.c~pci_pci_reset_api drivers/pci/pci.c
> --- linux-2.6/drivers/pci/pci.c~pci_pci_reset_api 2007-02-16 10:10:30.000000000 -0600
> +++ linux-2.6-bjking1/drivers/pci/pci.c 2007-02-16 10:10:30.000000000 -0600
> @@ -893,6 +893,34 @@ pci_disable_device(struct pci_dev *dev)
> }
>
> /**
> + * pcibios_set_pcie_reset_state - set reset state for device dev
> + * @dev: the PCI-E device reset
> + * @state: Reset state to enter into
> + *
> + *
> + * Sets the PCI-E reset state for the device. This is the default
> + * implementation. Architecture implementations can override this.
> + */
> +int __attribute__ ((weak)) pcibios_set_pcie_reset_state(struct pci_dev *dev,
> + enum pcie_reset_state state)
> +{
> + return -EINVAL;
> +}
> +
> +/**
> + * pci_set_pcie_reset_state - set reset state for device dev
> + * @dev: the PCI-E device reset
> + * @state: Reset state to enter into
> + *
> + *
> + * Sets the PCI reset state for the device.
> + */
> +int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
> +{
> + return pcibios_set_pcie_reset_state(dev, state);
> +}
> +
> +/**
> * pci_enable_wake - enable device to generate PME# when suspended
> * @dev: - PCI device to operate on
> * @state: - Current state of device.
> @@ -1374,4 +1402,5 @@ EXPORT_SYMBOL(pci_set_power_state);
> EXPORT_SYMBOL(pci_save_state);
> EXPORT_SYMBOL(pci_restore_state);
> EXPORT_SYMBOL(pci_enable_wake);
> +EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);
>
> diff -puN include/linux/pci.h~pci_pci_reset_api include/linux/pci.h
> --- linux-2.6/include/linux/pci.h~pci_pci_reset_api 2007-02-16 10:10:30.000000000 -0600
> +++ linux-2.6-bjking1/include/linux/pci.h 2007-02-16 10:10:30.000000000 -0600
> @@ -96,6 +96,19 @@ enum pci_channel_state {
> pci_channel_io_perm_failure = (__force pci_channel_state_t) 3,
> };
>
> +typedef unsigned int __bitwise pcie_reset_state_t;
> +
> +enum pcie_reset_state {
> + /* Reset is NOT asserted (Use to deassert reset) */
> + pci_reset_normal = (__force pcie_reset_state_t) 1,
> +
> + /* Use #PERST to reset PCI-E device */
> + pci_reset_pcie_warm_reset = (__force pcie_reset_state_t) 2,
> +
> + /* Use PCI-E Hot Reset to reset device */
> + pci_reset_pcie_hot_reset = (__force pcie_reset_state_t) 3
> +};
> +
> typedef unsigned short __bitwise pci_bus_flags_t;
> enum pci_bus_flags {
> PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
> @@ -539,6 +552,7 @@ static inline int pci_is_managed(struct
>
> void pci_disable_device(struct pci_dev *dev);
> void pci_set_master(struct pci_dev *dev);
> +int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state);
> #define HAVE_PCI_SET_MWI
> int __must_check pci_set_mwi(struct pci_dev *dev);
> void pci_clear_mwi(struct pci_dev *dev);
> _
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
WARNING: multiple messages have this Message-ID (diff)
From: Brian King <brking@linux.vnet.ibm.com>
To: greg@kroah.com
Cc: James.Bottomley@steeleye.com, linuxppc-dev@ozlabs.org,
linux-pci@atrey.karlin.mff.cuni.cz, paulus@samba.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/3] pci: New PCI-E reset API
Date: Thu, 08 Mar 2007 14:44:26 -0600 [thread overview]
Message-ID: <45F075AA.502@linux.vnet.ibm.com> (raw)
In-Reply-To: <11718964333825-patch-mail.ibm.com>
Greg,
I saw you pulled this into your gregkh-2.6 tree. Does that mean
it is queued for 2.6.22?
Thanks,
Brian
Brian King wrote:
> Adds a new API which can be used to issue various types
> of PCI-E reset, including PCI-E warm reset and PCI-E hot reset.
> This is needed for an ipr PCI-E adapter which does not properly
> implement BIST. Running BIST on this adapter results in PCI-E
> errors. The only reliable reset mechanism that exists on this
> hardware is PCI Fundamental reset (warm reset). Since driving
> this type of reset is architecture unique, this provides the
> necessary hooks for architectures to add this support.
>
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> ---
>
> linux-2.6-bjking1/drivers/pci/pci.c | 29 +++++++++++++++++++++++++++++
> linux-2.6-bjking1/include/linux/pci.h | 14 ++++++++++++++
> 2 files changed, 43 insertions(+)
>
> diff -puN drivers/pci/pci.c~pci_pci_reset_api drivers/pci/pci.c
> --- linux-2.6/drivers/pci/pci.c~pci_pci_reset_api 2007-02-16 10:10:30.000000000 -0600
> +++ linux-2.6-bjking1/drivers/pci/pci.c 2007-02-16 10:10:30.000000000 -0600
> @@ -893,6 +893,34 @@ pci_disable_device(struct pci_dev *dev)
> }
>
> /**
> + * pcibios_set_pcie_reset_state - set reset state for device dev
> + * @dev: the PCI-E device reset
> + * @state: Reset state to enter into
> + *
> + *
> + * Sets the PCI-E reset state for the device. This is the default
> + * implementation. Architecture implementations can override this.
> + */
> +int __attribute__ ((weak)) pcibios_set_pcie_reset_state(struct pci_dev *dev,
> + enum pcie_reset_state state)
> +{
> + return -EINVAL;
> +}
> +
> +/**
> + * pci_set_pcie_reset_state - set reset state for device dev
> + * @dev: the PCI-E device reset
> + * @state: Reset state to enter into
> + *
> + *
> + * Sets the PCI reset state for the device.
> + */
> +int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
> +{
> + return pcibios_set_pcie_reset_state(dev, state);
> +}
> +
> +/**
> * pci_enable_wake - enable device to generate PME# when suspended
> * @dev: - PCI device to operate on
> * @state: - Current state of device.
> @@ -1374,4 +1402,5 @@ EXPORT_SYMBOL(pci_set_power_state);
> EXPORT_SYMBOL(pci_save_state);
> EXPORT_SYMBOL(pci_restore_state);
> EXPORT_SYMBOL(pci_enable_wake);
> +EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);
>
> diff -puN include/linux/pci.h~pci_pci_reset_api include/linux/pci.h
> --- linux-2.6/include/linux/pci.h~pci_pci_reset_api 2007-02-16 10:10:30.000000000 -0600
> +++ linux-2.6-bjking1/include/linux/pci.h 2007-02-16 10:10:30.000000000 -0600
> @@ -96,6 +96,19 @@ enum pci_channel_state {
> pci_channel_io_perm_failure = (__force pci_channel_state_t) 3,
> };
>
> +typedef unsigned int __bitwise pcie_reset_state_t;
> +
> +enum pcie_reset_state {
> + /* Reset is NOT asserted (Use to deassert reset) */
> + pci_reset_normal = (__force pcie_reset_state_t) 1,
> +
> + /* Use #PERST to reset PCI-E device */
> + pci_reset_pcie_warm_reset = (__force pcie_reset_state_t) 2,
> +
> + /* Use PCI-E Hot Reset to reset device */
> + pci_reset_pcie_hot_reset = (__force pcie_reset_state_t) 3
> +};
> +
> typedef unsigned short __bitwise pci_bus_flags_t;
> enum pci_bus_flags {
> PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
> @@ -539,6 +552,7 @@ static inline int pci_is_managed(struct
>
> void pci_disable_device(struct pci_dev *dev);
> void pci_set_master(struct pci_dev *dev);
> +int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state);
> #define HAVE_PCI_SET_MWI
> int __must_check pci_set_mwi(struct pci_dev *dev);
> void pci_clear_mwi(struct pci_dev *dev);
> _
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
next prev parent reply other threads:[~2007-03-08 20:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 14:47 [PATCH 1/3] pci: New PCI-E reset API Brian King
2007-02-19 14:47 ` [PATCH 2/3] powerpc: Add powerpc PCI-E reset API implementation Brian King
2007-02-19 14:47 ` Brian King
2007-02-19 14:47 ` [PATCH 3/3] ipr: Use PCI-E reset API for new ipr adapter Brian King
2007-02-19 14:47 ` Brian King
2007-03-08 20:44 ` Brian King [this message]
2007-03-08 20:44 ` [PATCH 1/3] pci: New PCI-E reset API Brian King
2007-03-09 0:32 ` Greg KH
2007-03-09 0:32 ` Greg KH
2007-03-09 14:53 ` Brian King
-- strict thread matches above, loose matches on Subject: below --
2007-02-19 14:47 Brian King
2007-02-19 14:47 Brian King
2007-02-01 17:30 Brian King
2007-02-01 19:12 ` Matthew Wilcox
2007-02-01 19:12 ` Matthew Wilcox
2007-02-01 22:14 ` Brian King
2007-02-01 22:14 ` Brian King
2007-02-09 15:20 ` Brian King
2007-02-01 17:30 Brian King
2007-02-01 17:30 Brian King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45F075AA.502@linux.vnet.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=James.Bottomley@steeleye.com \
--cc=greg@kroah.com \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.