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] [day] [month] [year] [list]
Message-Id: <20060723113001.3fdd426d.akpm@osdl.org>
Date:	Sun, 23 Jul 2006 11:30:01 -0700
From:	Andrew Morton <akpm@...l.org>
To:	James Courtier-Dutton <James@...erbug.co.uk>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Cross platform method for detecting hot unplug in irq handler

On Sun, 23 Jul 2006 14:11:01 +0100
James Courtier-Dutton <James@...erbug.co.uk> wrote:

> Hi,
> 
> I am writing a driver for a PCMCIA device.
> When the card is removed, the driver's IRQ handler is called.
> The first thing the IRQ handler does is read a status register from the
> card's IOPORT. On the ia32 (i386) platform, the resulting status read
> will return 0xffffffff. If the driver reads this value, it assumes the
> card has been removed and acts accordingly.
> 
> Is this a reliable way of detecting PCMCIA or Hotplug card removal
> inside an IRQ handler?
> Is it consistent cross platforms. E.g. ia64, amd64, PPC, MIPS etc.?
> Does a more reliable detection method exist in the kernel?

Cardbus has detection pins, ad they can be queried via the controller.  But
it's too slow and afaik cardbus will reliably rern 0xffffffff for a removed
card.

Lots of drivers treat a read of all-ones as indicating a removed card.  It
works.
-
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