Sergey,
...
Why is it so? And what is the system suposed to do? Actually remove
the device?
Looking at the size of your device (512 MB), I guess that it is some
king of flash drive. Such devices pretend to be removable hard disks -
and here the "removable" bit causes trouble.
Indeed I was talking about a CF Flash Card in a CF socket.
...
Anyway, here is the patch with such workaround for CompactFlash (against
the current git tree, but it should also apply to earlier kernels with
some fuzz).
---
Subject: [PATCH] Avoid superfluous rechecking of partitions for IDE flash drives
For some reason, IDE flash drives report that they have removable media,
which is not really correct - the drive as a whole is removed, therefore
rescanning of the partition table on the first open of such devices is
just a waste of time.
Signed-off-by: Sergey Vlasov <[EMAIL PROTECTED]>
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -1174,6 +1174,14 @@ static int idedisk_media_changed(struct
struct ide_disk_obj *idkp = ide_disk_g(disk);
ide_drive_t *drive = idkp->drive;
+ /*
+ * PCMCIA flash drives report themselves as removable, but can be
+ * treated as fixed - when such device is removed, its IDE controller
+ * also disappears.
+ */
+ if (drive->is_flash)
+ return 0;
+
/* do not scan partitions twice if this is a removable device */
if (drive->attach) {
drive->attach = 0;
Is "drive->is_flash" set for mechanical PCMCIA hard disk drives (like
Microdrives) as well?
--
Steven
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html