Index: uspace/drv/block/isa-ide/isa-ide_hw.h
===================================================================
--- uspace/drv/block/isa-ide/isa-ide_hw.h	(revision e43acd38c0225c4fac18ac08d9da30ca442ef906)
+++ uspace/drv/block/isa-ide/isa-ide_hw.h	(revision e43acd38c0225c4fac18ac08d9da30ca442ef906)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2025 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup pci-ide
+ * @{
+ */
+/** @file ISA IDE hardware protocol
+ */
+
+#ifndef ISA_IDE_HW_H
+#define ISA_IDE_HW_H
+
+/*
+ * PCI IDE needs to use ATA ports at fixed legacy ISA addresses.
+ * We need to know what those addresses are so that, if we are
+ * asked to attach to those *and* we know that PCI IDE is attached
+ * to legacy IDE ranges, we should not attach.
+ */
+enum {
+	leg_ide_ata_cmd_p = 0x01f0,
+	leg_ide_ata_ctl_p = 0x03f4,
+	leg_ide_ata_cmd_s = 0x0170,
+	leg_ide_ata_ctl_s = 0x0374
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/drv/block/isa-ide/main.c
===================================================================
--- uspace/drv/block/isa-ide/main.c	(revision a796812c405518891216868c0051c7e9bd48cc2c)
+++ uspace/drv/block/isa-ide/main.c	(revision e43acd38c0225c4fac18ac08d9da30ca442ef906)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2024 Jiri Svoboda
+ * Copyright (c) 2025 Jiri Svoboda
  * All rights reserved.
  *
@@ -43,4 +43,5 @@
 
 #include "isa-ide.h"
+#include "isa-ide_hw.h"
 #include "main.h"
 
@@ -70,5 +71,5 @@
 	async_sess_t *parent_sess;
 	hw_res_list_parsed_t hw_res;
-	hw_res_flags_t flags;
+	hw_res_claims_t claims;
 	errno_t rc;
 
@@ -77,25 +78,16 @@
 		return ENOMEM;
 
-	rc = hw_res_get_flags(parent_sess, &flags);
-	if (rc != EOK)
-		return rc;
-
-	/*
-	 * Prevent attaching to the legacy ISA IDE register block
-	 * on a system with PCI not to conflict with PCI IDE.
-	 *
-	 * XXX This is a simplification. If we had a PCI-based system without
-	 * PCI-IDE or with PCI-IDE disabled and would still like to use
-	 * an ISA IDE controller, this would prevent us from doing so.
-	 */
-	if (flags & hwf_isa_bridge) {
-		ddf_msg(LVL_NOTE, "Will not attach to PCI/ISA bridge.");
-		return EIO;
+	rc = hw_res_query_legacy_io(parent_sess, &claims);
+	if (rc != EOK) {
+		ddf_msg(LVL_NOTE, "Error getting HW resource flags.");
+		return rc;
 	}
 
 	hw_res_list_parsed_init(&hw_res);
 	rc = hw_res_get_list_parsed(parent_sess, &hw_res, 0);
-	if (rc != EOK)
-		return rc;
+	if (rc != EOK) {
+		ddf_msg(LVL_NOTE, "Error getting HW resource list.");
+		return rc;
+	}
 
 	if (hw_res.io_ranges.count != 4) {
@@ -148,4 +140,16 @@
 	}
 
+	/*
+	 * Only attach to legacy ISA IDE register block if it
+	 * is not claimed by PCI IDE driver.
+	 */
+	if (res->cmd1 == leg_ide_ata_cmd_p &&
+	    res->cmd2 == leg_ide_ata_cmd_s &&
+	    (claims & hwc_isa_ide) != 0) {
+		ddf_msg(LVL_NOTE, "Will not attach to ISA legacy ports "
+		    "since they are already handled by PCI.");
+		return EBUSY;
+	}
+
 	return EOK;
 error:
@@ -167,5 +171,6 @@
 	rc = isa_ide_get_res(dev, &res);
 	if (rc != EOK) {
-		ddf_msg(LVL_ERROR, "Invalid HW resource configuration.");
+		if (rc == EINVAL)
+			ddf_msg(LVL_ERROR, "Invalid HW resource configuration.");
 		return EINVAL;
 	}
Index: uspace/drv/block/pc-floppy/main.c
===================================================================
--- uspace/drv/block/pc-floppy/main.c	(revision a796812c405518891216868c0051c7e9bd48cc2c)
+++ uspace/drv/block/pc-floppy/main.c	(revision e43acd38c0225c4fac18ac08d9da30ca442ef906)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2024 Jiri Svoboda
+ * Copyright (c) 2025 Jiri Svoboda
  * All rights reserved.
  *
@@ -73,5 +73,4 @@
 	async_sess_t *parent_sess;
 	hw_res_list_parsed_t hw_res;
-	hw_res_flags_t flags;
 	errno_t rc;
 
@@ -79,8 +78,4 @@
 	if (parent_sess == NULL)
 		return ENOMEM;
-
-	rc = hw_res_get_flags(parent_sess, &flags);
-	if (rc != EOK)
-		return rc;
 
 	hw_res_list_parsed_init(&hw_res);
Index: uspace/drv/block/pci-ide/main.c
===================================================================
--- uspace/drv/block/pci-ide/main.c	(revision a796812c405518891216868c0051c7e9bd48cc2c)
+++ uspace/drv/block/pci-ide/main.c	(revision e43acd38c0225c4fac18ac08d9da30ca442ef906)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2024 Jiri Svoboda
+ * Copyright (c) 2025 Jiri Svoboda
  * All rights reserved.
  *
@@ -133,4 +133,5 @@
 	pci_ide_ctrl_t *ctrl;
 	pci_ide_hwres_t res;
+	async_sess_t *parent_sess;
 	errno_t rc;
 
@@ -164,4 +165,18 @@
 	if (rc != EOK) {
 		ddf_msg(LVL_ERROR, "Failed initializing ATA controller.");
+		rc = EIO;
+		goto error;
+	}
+
+	parent_sess = ddf_dev_parent_sess_get(dev);
+	if (parent_sess == NULL) {
+		rc = ENOMEM;
+		goto error;
+	}
+
+	/* Claim legacy I/O range to prevent ISA IDE from attaching there. */
+	rc = hw_res_claim_legacy_io(parent_sess, hwc_isa_ide);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed claiming legacy I/O range.");
 		rc = EIO;
 		goto error;
Index: uspace/drv/block/pci-ide/pci-ide.c
===================================================================
--- uspace/drv/block/pci-ide/pci-ide.c	(revision a796812c405518891216868c0051c7e9bd48cc2c)
+++ uspace/drv/block/pci-ide/pci-ide.c	(revision e43acd38c0225c4fac18ac08d9da30ca442ef906)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2024 Jiri Svoboda
+ * Copyright (c) 2025 Jiri Svoboda
  * All rights reserved.
  *
@@ -189,4 +189,6 @@
 
 	ddf_msg(LVL_DEBUG, "pci_ide_channel_init()");
+
+	memset(&params, 0, sizeof(params));
 
 	chan->ctrl = ctrl;
