Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1587819

Re: [PATCH] PCI, pciehp: Reuse set_slot_off()

From "Raj, Ashok" <ashok.raj@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] PCI, pciehp: Reuse set_slot_off()
Date 2017-02-24 18:30 +0100
Message-ID <terQR-3oh-5@gated-at.bofh.it> (permalink)
References <tei1b-4PN-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Yinghai

On Thu, Feb 23, 2017 at 10:54:35PM -0800, Yinghai Lu wrote:
> +++ linux-2.6/drivers/pci/hotplug/pciehp_ctrl.c
> @@ -71,9 +71,6 @@ static void set_slot_off(struct controll
>  		 */
>  		msleep(1000);
>  	}
> -
> -	pciehp_green_led_off(pslot);
> -	pciehp_set_attention_status(pslot, 1);

Re using set_slot_off() in remove_board() make sense.. but i'm not sure
why these are pulled out? It seems to be functionally complete 
when these are done in set_slot_off(). 

>  }
>  
>  /**
> @@ -126,6 +123,8 @@ static int board_added(struct slot *p_sl
>  
>  err_exit:
>  	set_slot_off(ctrl, p_slot);
> +	pciehp_green_led_off(p_slot);
> +	pciehp_set_attention_status(p_slot, 1);
>  	return retval;
>  }
>  
> @@ -142,16 +141,7 @@ static int remove_board(struct slot *p_s
>  	if (retval)
>  		return retval;
>  
> -	if (POWER_CTRL(ctrl)) {
> -		pciehp_power_off_slot(p_slot);
> -
> -		/*
> -		 * After turning power off, we must wait for at least 1 second
> -		 * before taking any action that relies on power having been
> -		 * removed from the slot/adapter.
> -		 */
> -		msleep(1000);
> -	}
> +	set_slot_off(ctrl, p_slot);
>  
>  	/* turn off Green LED */
>  	pciehp_green_led_off(p_slot);
Don't we need the pciehp_set_attention_status() here?

Cheers,
Ashok

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] PCI, pciehp: Reuse set_slot_off() Yinghai Lu <yinghai@kernel.org> - 2017-02-24 08:00 +0100
  Re: [PATCH] PCI, pciehp: Reuse set_slot_off() "Raj, Ashok" <ashok.raj@intel.com> - 2017-02-24 18:30 +0100
    Re: [PATCH] PCI, pciehp: Reuse set_slot_off() Yinghai Lu <yinghai@kernel.org> - 2017-02-24 19:40 +0100

csiph-web