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. * Disa

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 ev

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 so

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 MP

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 assum

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 dev

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 attenti

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 about

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 (irr

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 ide

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 >> 6-2

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 sta

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. > (http://www.spinics.net/lists/hotplug/msg05802.

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 m

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