All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin Mareš" <mj@ucw.cz>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Matthew Wilcox" <willy@infradead.org>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH pciutils] libpci: Fix intel_cleanup_io() implementations
Date: Sun, 26 Dec 2021 23:04:42 +0100	[thread overview]
Message-ID: <mj+md-20211226.220346.61868.albireo@ucw.cz> (raw)
In-Reply-To: <20211220192843.15052-1-pali@kernel.org>

Hi!

> Function intel_cleanup_io() should de-initialize I/O port access, e.g. by
> calling iopl(0) to reset I/O privilege level to default value.
> 
> Caller of intel_cleanup_io() expects that this function returns negative
> value on success and positive value on error. Error means that I/O port
> access was not de-initialized and is still active. Success means that I/O
> port access is not active anymore and intel_setup_io() needs to be called
> again to access I/O ports.
> 
> Fix Cygwin, Haiku and Linux implementations of intel_cleanup_io() function
> to correctly de-initialize I/O port access and fix return value.

Thanks for noticing the problem. I fixed it by removing the return value
of intel_cleanup_io() completely. In fact, only returning -1 made sense ever.

					Martin

      reply	other threads:[~2021-12-26 22:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 19:28 [PATCH pciutils] libpci: Fix intel_cleanup_io() implementations Pali Rohár
2021-12-26 22:04 ` Martin Mareš [this message]

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=mj+md-20211226.220346.61868.albireo@ucw.cz \
    --to=mj@ucw.cz \
    --cc=helgaas@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=willy@infradead.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.