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: <20080710163515.7d112a87.akpm@linux-foundation.org>
Date:	Thu, 10 Jul 2008 16:35:15 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	linux-kernel@...r.kernel.org, alan@...rguk.ukuu.org.uk
Subject: Re: [PATCH] Char: isicom, enable/disable pci device

On Thu, 10 Jul 2008 16:20:12 +0200 Jiri Slaby <jirislaby@...il.com> wrote:

> Don't forget to enable and disable PCI devices. The device
> might be unusable without that.
> 
> Signed-off-by: Jiri Slaby <jirislaby@...il.com>
> ---
>  drivers/char/isicom.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
> index 4f3cefa..a1a67e3 100644
> --- a/drivers/char/isicom.c
> +++ b/drivers/char/isicom.c
> @@ -1736,6 +1736,12 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
>  	if (card_count >= BOARD_COUNT)
>  		goto err;
>  
> +	retval = pci_enable_device(pdev);
> +	if (retval) {
> +		dev_err(&pdev->dev, "failed to enable\n");
> +		goto err;
> +	}
> +
>  	dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device);
>  
>  	/* allot the first empty slot in the array */
> @@ -1790,6 +1796,7 @@ errunrr:
>  errdec:
>  	board->base = 0;
>  	card_count--;
> +	pci_disable_device(pdev);
>  err:
>  	return retval;
>  }
> @@ -1806,6 +1813,7 @@ static void __devexit isicom_remove(struct pci_dev *pdev)
>  	pci_release_region(pdev, 3);
>  	board->base = 0;
>  	card_count--;
> +	pci_disable_device(pdev);
>  }
>  
>  static int __init isicom_init(void)

hm.  Is this a recently-added problem?

I wonder what the chance is that this will fix something.  Or break
something.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ