lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <820029d2-2989-412f-b026-676e97a9dd5c@wanadoo.fr>
Date: Sun, 15 Sep 2024 17:40:00 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Jijie Shao <shaojijie@...wei.com>, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: shenjian15@...wei.com, wangpeiyang1@...wei.com, liuyonglong@...wei.com,
 chenhao418@...wei.com, sudongming1@...wei.com, xujunsheng@...wei.com,
 shiyongbang@...wei.com, libaihan@...wei.com, andrew@...n.ch,
 jdamato@...tly.com, horms@...nel.org, kalesh-anakkur.purayil@...adcom.com,
 jonathan.cameron@...wei.com, shameerali.kolothum.thodi@...wei.com,
 salil.mehta@...wei.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V10 net-next 04/10] net: hibmcge: Add interrupt supported
 in this module

Le 12/09/2024 à 04:51, Jijie Shao a écrit :
> The driver supports four interrupts: TX interrupt, RX interrupt,
> mdio interrupt, and error interrupt.
> 
> Actually, the driver does not use the mdio interrupt.
> Therefore, the driver does not request the mdio interrupt.
> 
> The error interrupt distinguishes different error information
> by using different masks. To distinguish different errors,
> the statistics count is added for each error.
> 
> To ensure the consistency of the code process, masks are added for the
> TX interrupt and RX interrupt.
> 
> This patch implements interrupt request, and provides a
> unified entry for the interrupt handler function. However,
> the specific interrupt handler function of each interrupt
> is not implemented currently.
> 
> Because of pcim_enable_device(), the interrupt vector
> is already device managed and does not need to be free actively.
> 
> Signed-off-by: Jijie Shao <shaojijie@...wei.com>

...

> +int hbg_irq_init(struct hbg_priv *priv)
> +{
> +	struct hbg_vector *vectors = &priv->vectors;
> +	struct device *dev = &priv->pdev->dev;
> +	int ret, id;
> +	u32 i;
> +
> +	/* used pcim_enable_device(),  so the vectors become device managed */
> +	ret = pci_alloc_irq_vectors(priv->pdev, HBG_VECTOR_NUM, HBG_VECTOR_NUM,
> +				    PCI_IRQ_MSI | PCI_IRQ_MSIX);
> +	if (ret < 0)
> +		return dev_err_probe(dev, ret, "failed to allocate MSI vectors\n");
> +
> +	if (ret != HBG_VECTOR_NUM)
> +		return dev_err_probe(dev, -EINVAL,
> +				     "requested %u MSI, but allocated %d MSI\n",
> +				     HBG_VECTOR_NUM, ret);
> +
> +	/* mdio irq not request, so the number of requested interrupts

Nitpick: "mdio irq not requested"?

> +	 * is HBG_VECTOR_NUM - 1.
> +	 */
> +	for (i = 0; i < HBG_VECTOR_NUM - 1; i++) {
> +		id = pci_irq_vector(priv->pdev, i);

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ