RE: [PATCH 2/5] pciehp: Don't enable presence notification while surprise removal is not supported.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: linux-pci-owner@xxxxxxxxxxxxxxx
> [mailto:linux-pci-owner@xxxxxxxxxxxxxxx] On Behalf Of Yinghai Lu
> Sent: Saturday, June 23, 2012 4:42 PM
> To: Bjorn Helgaas
> Cc: linux-pci@xxxxxxxxxxxxxxx; Yinghai Lu
> Subject: [PATCH 2/5] pciehp: Don't enable presence notification while
> surprise removal is not supported.
> 
> If surprise removal is not supported, that event get dropped later.
> So there is no point to enable that.

Presence changed event is currently just for printing a kernel message when
surprise removal is not supported, and I think the message is not so important.
So I agree this change.

Acked-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>

> 
> Also some sick chipset have those bit flip around when the card is not
> present.
> and make log full of useless warning.

Is there any other way to avoid this issue other than disabling presence
changed notification? If we need enabling presence changed event in the
future, this will happen again. I'm worrying about this.

Regards,
Kenji Kaneshige


> 
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
> ---
>  drivers/pci/hotplug/pciehp_hpc.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/pciehp_hpc.c
> b/drivers/pci/hotplug/pciehp_hpc.c
> index a960fae..d4fa705 100644
> --- a/drivers/pci/hotplug/pciehp_hpc.c
> +++ b/drivers/pci/hotplug/pciehp_hpc.c
> @@ -808,7 +808,7 @@ int pciehp_get_cur_lnk_width(struct slot *slot,
> 
>  int pcie_enable_notification(struct controller *ctrl)
>  {
> -	u16 cmd, mask;
> +	u16 cmd = 0, mask;
> 
>  	/*
>  	 * TBD: Power fault detected software notification support.
> @@ -820,7 +820,8 @@ int pcie_enable_notification(struct controller *ctrl)
>  	 * when it is cleared in the interrupt service routine, and
>  	 * next power fault detected interrupt was notified again.
>  	 */
> -	cmd = PCI_EXP_SLTCTL_PDCE;
> +	if (HP_SUPR_RM(ctrl))
> +		cmd |= PCI_EXP_SLTCTL_PDCE;
>  	if (ATTN_BUTTN(ctrl))
>  		cmd |= PCI_EXP_SLTCTL_ABPE;
>  	if (MRL_SENS(ctrl))
> --
> 1.7.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux