Bug 5577

Summary: permanent compact flash change notification
Product: IO/Storage Reporter: Ulrich Holeschak (ulrich)
Component: IDEAssignee: Bartlomiej Zolnierkiewicz (bzolnier)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: bunk
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.14 Subsystem:
Regression: --- Bisected commit-id:

Description Ulrich Holeschak 2005-11-09 14:39:52 UTC
Distribution: standard kernel 2.6.14
Hardware Environment: PQI compact flash with CF-IDE adapter
Software Environment:
Problem Description:
Kernel permanently gets change notifications for compact flash.

Steps to reproduce:
Insert compact flash in CF-IDE adapter and boot. In the logfiles you will
permanently see re-detection of the compact flash.

Solution:
This patch has been copied from older SUSE kernels (2.6.11).
It simply prevents change notifications for compact flashes in the function
idedisk_media_changed().
--- linux-2.6.14-3-org/drivers/ide/ide-disk.c	2005-11-06 23:21:59.000000000 +0100
+++ linux-2.6.14-3/drivers/ide/ide-disk.c	2005-11-06 23:22:35.000000000 +0100
@@ -1179,6 +1179,10 @@
 		drive->attach = 0;
 		return 0;
 	}
+	/* We get reliably notified from PCMCIA layer */
+	if (drive->is_flash)
+		return 0;
+
 	/* if removable, always assume it was changed */
 	return drive->removable;
 }
Comment 1 Bartlomiej Zolnierkiewicz 2006-01-12 06:30:57 UTC
Could you verify that 2.6.15-mm3 or just the patch at the link below fixes the
issue?

http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.15/2.6.15-mm3/broken-out/stop-compactflash-devices-being-marked-as-removable.patch
Comment 2 Adrian Bunk 2006-04-22 10:07:42 UTC
I'm assuming the patch mentioned in comment #1 that is alerady included in
kernel 2.6.16 fixed this issue.

Please reopen this bug if it's still present in kernel 2.6.16.