PATCH: add checks to pc9800 ide reserve

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 22 Mar 2003 23:55:34 GMT


diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.65-bk3/drivers/ide/legacy/pc9800.c linux-2.5.65-ac3/drivers/ide/legacy/pc9800.c
--- linux-2.5.65-bk3/drivers/ide/legacy/pc9800.c 2003-03-22 19:35:11.000000000 +0000
+++ linux-2.5.65-ac3/drivers/ide/legacy/pc9800.c 2003-03-22 20:36:26.000000000 +0000
@@ -64,9 +64,13 @@
/* Restore original value, just in case. */
outb(saved_bank, PC9800_IDE_BANKSELECT);

- /* These ports are probably used by IDE I/F. */
- request_region(0x430, 1, "ide");
- request_region(0x435, 1, "ide");
+ /* These ports are reseved by IDE I/F. */
+ if (!request_region(0x430, 1, "ide") ||
+ !request_region(0x435, 1, "ide")) {
+ printk(KERN_WARNING
+ "ide: IO port 0x430 and 0x435 are reserved for IDE"
+ " the card using these ports may not work\n");
+ }

if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET] == HD_DATA &&
ide_hwifs[1].io_ports[IDE_DATA_OFFSET] == HD_DATA) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/