Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-16 Thread Guenter Roeck
On 12/16/2013 05:14 PM, Bjorn Helgaas wrote: On Mon, Dec 16, 2013 at 10:39 AM, Guenter Roeck wrote: On Sun, Dec 15, 2013 at 05:18:26PM -0700, Bjorn Helgaas wrote: On Sun, Dec 15, 2013 at 4:24 PM, Rajat Jain wrote: Once again: the way I interpret this is: * Always enable Link events. *

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-16 Thread Bjorn Helgaas
On Mon, Dec 16, 2013 at 10:39 AM, Guenter Roeck wrote: > On Sun, Dec 15, 2013 at 05:18:26PM -0700, Bjorn Helgaas wrote: >> On Sun, Dec 15, 2013 at 4:24 PM, Rajat Jain wrote: >> >> > > >> >> > >> Once again: the way I interpret this is: * Always enable Link events. >> >> > >> * Disable presence

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-16 Thread Guenter Roeck
On Sun, Dec 15, 2013 at 05:18:26PM -0700, Bjorn Helgaas wrote: > On Sun, Dec 15, 2013 at 4:24 PM, Rajat Jain wrote: > >> > > > >> > >> Once again: the way I interpret this is: * Always enable Link events. > >> > >> * Disable presence events if attention button is present. > >> > > > >> > > That

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-16 Thread Guenter Roeck
On Sun, Dec 15, 2013 at 05:18:26PM -0700, Bjorn Helgaas wrote: On Sun, Dec 15, 2013 at 4:24 PM, Rajat Jain rajatj...@juniper.net wrote: Once again: the way I interpret this is: * Always enable Link events. * Disable presence events if attention button is present. That sounds

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-16 Thread Bjorn Helgaas
On Mon, Dec 16, 2013 at 10:39 AM, Guenter Roeck li...@roeck-us.net wrote: On Sun, Dec 15, 2013 at 05:18:26PM -0700, Bjorn Helgaas wrote: On Sun, Dec 15, 2013 at 4:24 PM, Rajat Jain rajatj...@juniper.net wrote: Once again: the way I interpret this is: * Always enable Link events. *

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-16 Thread Guenter Roeck
On 12/16/2013 05:14 PM, Bjorn Helgaas wrote: On Mon, Dec 16, 2013 at 10:39 AM, Guenter Roeck li...@roeck-us.net wrote: On Sun, Dec 15, 2013 at 05:18:26PM -0700, Bjorn Helgaas wrote: On Sun, Dec 15, 2013 at 4:24 PM, Rajat Jain rajatj...@juniper.net wrote: Once again: the way I interpret this

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-15 Thread Bjorn Helgaas
On Sun, Dec 15, 2013 at 4:24 PM, Rajat Jain wrote: >> > > >> > >> Once again: the way I interpret this is: >> > >> * Always enable Link events. >> > >> * Disable presence events if attention button is present. >> > > >> > > That sounds like a good plan to me. >> > >> > How about Diag_Reset from

RE: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-15 Thread Rajat Jain
> > > > > >> Once again: the way I interpret this is: > > >> * Always enable Link events. > > >> * Disable presence events if attention button is present. > > > > > > That sounds like a good plan to me. > > > > How about Diag_Reset from MPT2SAS and others? > > link could up and down > > I am

RE: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-15 Thread Rajat Jain
Hello, > -Original Message- > From: Bjorn Helgaas [mailto:bhelg...@google.com] > > On Fri, Dec 13, 2013 at 12:04 PM, Rajat Jain > wrote: > >> On Thu, Dec 12, 2013 at 11:26 PM, Yinghai Lu > wrote: > >> > On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas > >> > > > > Also, I think the

RE: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-15 Thread Rajat Jain
Hello, -Original Message- From: Bjorn Helgaas [mailto:bhelg...@google.com] On Fri, Dec 13, 2013 at 12:04 PM, Rajat Jain rajatj...@juniper.net wrote: On Thu, Dec 12, 2013 at 11:26 PM, Yinghai Lu ying...@kernel.org wrote: On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas

RE: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-15 Thread Rajat Jain
Once again: the way I interpret this is: * Always enable Link events. * Disable presence events if attention button is present. That sounds like a good plan to me. How about Diag_Reset from MPT2SAS and others? link could up and down I am assuming you are referring to

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-15 Thread Bjorn Helgaas
On Sun, Dec 15, 2013 at 4:24 PM, Rajat Jain rajatj...@juniper.net wrote: Once again: the way I interpret this is: * Always enable Link events. * Disable presence events if attention button is present. That sounds like a good plan to me. How about Diag_Reset from MPT2SAS and

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Guenter Roeck
On Fri, Dec 13, 2013 at 05:58:08PM -0800, Yinghai Lu wrote: > On Fri, Dec 13, 2013 at 1:14 PM, Bjorn Helgaas wrote: > > On Fri, Dec 13, 2013 at 12:04 PM, Rajat Jain wrote: > > > >> Once again: the way I interpret this is: > >> * Always enable Link events. > >> * Disable presence events if

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Yinghai Lu
On Fri, Dec 13, 2013 at 1:14 PM, Bjorn Helgaas wrote: > On Fri, Dec 13, 2013 at 12:04 PM, Rajat Jain wrote: > >> Once again: the way I interpret this is: >> * Always enable Link events. >> * Disable presence events if attention button is present. > > That sounds like a good plan to me. How

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Bjorn Helgaas
On Fri, Dec 13, 2013 at 12:04 PM, Rajat Jain wrote: >> On Thu, Dec 12, 2013 at 11:26 PM, Yinghai Lu wrote: >> > On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas > Also, I think the device removal should _always_ be initiated (if not done > already) whenever the Link goes down for any reason

RE: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Rajat Jain
Hello folks, Firstly, thanks a lot for taking a look at my patch set. > > On Thu, Dec 12, 2013 at 11:26 PM, Yinghai Lu wrote: > > On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas > wrote: > > >>> * Define and use interrupt events for linkup / linkdown. > >> > >> This seems like a reasonable

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Bjorn Helgaas
On Thu, Dec 12, 2013 at 11:26 PM, Yinghai Lu wrote: > On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas wrote: >>> * Define and use interrupt events for linkup / linkdown. >> >> This seems like a reasonable idea. >> >> In the ExpressCard Standard (Rel 2.0, Feb 2009), Section 6.3.1 and Figure >>

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Bjorn Helgaas
On Thu, Dec 12, 2013 at 11:26 PM, Yinghai Lu ying...@kernel.org wrote: On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas bhelg...@google.com wrote: * Define and use interrupt events for linkup / linkdown. This seems like a reasonable idea. In the ExpressCard Standard (Rel 2.0, Feb 2009),

RE: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Rajat Jain
Hello folks, Firstly, thanks a lot for taking a look at my patch set. On Thu, Dec 12, 2013 at 11:26 PM, Yinghai Lu ying...@kernel.org wrote: On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas bhelg...@google.com wrote: * Define and use interrupt events for linkup / linkdown. This seems

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Bjorn Helgaas
On Fri, Dec 13, 2013 at 12:04 PM, Rajat Jain rajatj...@juniper.net wrote: On Thu, Dec 12, 2013 at 11:26 PM, Yinghai Lu ying...@kernel.org wrote: On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas bhelg...@google.com Also, I think the device removal should _always_ be initiated (if not done

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Yinghai Lu
On Fri, Dec 13, 2013 at 1:14 PM, Bjorn Helgaas bhelg...@google.com wrote: On Fri, Dec 13, 2013 at 12:04 PM, Rajat Jain rajatj...@juniper.net wrote: Once again: the way I interpret this is: * Always enable Link events. * Disable presence events if attention button is present. That sounds

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-13 Thread Guenter Roeck
On Fri, Dec 13, 2013 at 05:58:08PM -0800, Yinghai Lu wrote: On Fri, Dec 13, 2013 at 1:14 PM, Bjorn Helgaas bhelg...@google.com wrote: On Fri, Dec 13, 2013 at 12:04 PM, Rajat Jain rajatj...@juniper.net wrote: Once again: the way I interpret this is: * Always enable Link events. * Disable

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-12 Thread Yinghai Lu
On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas wrote: > [+cc Yinghai] > > On Tue, Dec 03, 2013 at 02:32:46PM -0800, Rajat Jain wrote: >> A lot of systems do not have the fancy buttons and LEDs, and instead >> want to rely only on the Link state change events to drive the hotplug >> and removal

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-12 Thread Bjorn Helgaas
[+cc Yinghai] On Tue, Dec 03, 2013 at 02:32:46PM -0800, Rajat Jain wrote: > A lot of systems do not have the fancy buttons and LEDs, and instead > want to rely only on the Link state change events to drive the hotplug > and removal state machinery. >

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-12 Thread Bjorn Helgaas
[+cc Yinghai] On Tue, Dec 03, 2013 at 02:32:46PM -0800, Rajat Jain wrote: A lot of systems do not have the fancy buttons and LEDs, and instead want to rely only on the Link state change events to drive the hotplug and removal state machinery.

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-12 Thread Yinghai Lu
On Thu, Dec 12, 2013 at 2:44 PM, Bjorn Helgaas bhelg...@google.com wrote: [+cc Yinghai] On Tue, Dec 03, 2013 at 02:32:46PM -0800, Rajat Jain wrote: A lot of systems do not have the fancy buttons and LEDs, and instead want to rely only on the Link state change events to drive the hotplug and

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-05 Thread Rajat Jain
On 12/05/2013 01:07 AM, Yijing Wang wrote: > > handle_link_up_event() and handle_link_down_event() are almost the same, > what about use like: > handle_link_state_change_event(p_slot, event) to reuse the the common code ? > > Sure, I can combine both of them to make it look more like this. Let

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-05 Thread Yijing Wang
On 2013/12/4 6:32, Rajat Jain wrote: > A lot of systems do not have the fancy buttons and LEDs, and instead > want to rely only on the Link state change events to drive the hotplug > and removal state machinery. > (http://www.spinics.net/lists/hotplug/msg05802.html) > > This patch adds support

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-05 Thread Yijing Wang
On 2013/12/4 6:32, Rajat Jain wrote: A lot of systems do not have the fancy buttons and LEDs, and instead want to rely only on the Link state change events to drive the hotplug and removal state machinery. (http://www.spinics.net/lists/hotplug/msg05802.html) This patch adds support for that

Re: [PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-05 Thread Rajat Jain
On 12/05/2013 01:07 AM, Yijing Wang wrote: handle_link_up_event() and handle_link_down_event() are almost the same, what about use like: handle_link_state_change_event(p_slot, event) to reuse the the common code ? Sure, I can combine both of them to make it look more like this. Let me

[PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-03 Thread Rajat Jain
A lot of systems do not have the fancy buttons and LEDs, and instead want to rely only on the Link state change events to drive the hotplug and removal state machinery. (http://www.spinics.net/lists/hotplug/msg05802.html) This patch adds support for that functionality. Here are the details about

[PATCH v2 2/4] pciehp: Use link change notifications for hot-plug and removal

2013-12-03 Thread Rajat Jain
A lot of systems do not have the fancy buttons and LEDs, and instead want to rely only on the Link state change events to drive the hotplug and removal state machinery. (http://www.spinics.net/lists/hotplug/msg05802.html) This patch adds support for that functionality. Here are the details about