From: Andrew Morton <akpm@linux-foundation.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] Char: isicom, enable/disable pci device
Date: Thu, 10 Jul 2008 16:35:15 -0700 [thread overview]
Message-ID: <20080710163515.7d112a87.akpm@linux-foundation.org> (raw)
In-Reply-To: <1215699612-17909-1-git-send-email-jirislaby@gmail.com>
On Thu, 10 Jul 2008 16:20:12 +0200 Jiri Slaby <jirislaby@gmail.com> wrote:
> Don't forget to enable and disable PCI devices. The device
> might be unusable without that.
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.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.
next prev parent reply other threads:[~2008-07-10 23:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 14:20 [PATCH] Char: isicom, enable/disable pci device Jiri Slaby
2008-07-10 23:35 ` Andrew Morton [this message]
2008-07-11 14:26 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080710163515.7d112a87.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.