lkml.org 
[lkml]   [2005]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC/BUG?] ide_cs's removable status
From
Date
On Iau, 2005-09-22 at 14:29 +0100, Russell King wrote:
> the whole lot isn't garbage, just some parts of it?

Bits.

> I'm wondering if your first adapter is somehow "inteligent" and isn't
> operating the CF card in "PCMCIA" mode. If this is the case, PCMCIA
> should be more inteligent about it than it currently is - telling IDE
> that the media is replaceable when the interface is registered.

It isn't being intelligent, its being dumb. I've not seen a smart
PCMCIA<->CF convertor. USB ones yes but not PCMCIA.

> There is another concern I have in all this, one which seems to have
> been completely missed. Yes we do this partition rescanning each time
> a "removable" IDE device is opened, but do we re-read the identity?

Don't think so - and just tested - we don't. Its totally [select an
expletive]ed if I do that. the /proc/ide identify data and the dumped
ident data directly from ide are different.

> > The pcmcia ide floppy (40MB clik! drive if anyone
> > wants to play) I have always shows up as present. It triggers the same
> > hotplug behaviour being complained about as far as I can see and
> > correctly so.
>
> Not having a clik drive, but "ide floppy" sounds like standard floppy
> behaviour - the "other" class of hotplug where the media is replaceable
> independent of the controller itself, so this is a slightly different
> problem, and one which we handle correctly.

We generate hot plug events when scanning the partition tables each
time. So you'd get the same loops - or am I misunderstanding something
here about what you mean by "correctly" ?

So in fact its not a case of ->removable but that IDE wants to seperate
->removable and ->mightgoaway. That lets us fix the broken cache flush
behaviour with modern media monitoring tools.

ie change idedisk_release to do

if(drive->mightgoaway||drive->usage==1) ide_cacheflush_p(drive)

then
if(drive->doorlocking && drive->usage == 1)

Syquests (real removable IDE disk) will have drive->doorlocking = 1 set
PCMCIA will have drive->mightgoaway set so will flush

(and M/O disks are ide-scsi or ide-cd so not affected)

The first change is needed because currently several control apps may
hold the disk open for media change detection, SMART and the like and if
they do so the user perceived "close" - end of a raw I/O access or
umount return will not media flush.

Alan

-
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/

\
 
 \ /
  Last update: 2005-09-22 17:33    [W:0.506 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site