Re: [PATCH] fix powerbook media bay

From: Paul Mackerras (paulus@samba.org)
Date: Sun Mar 23 2003 - 16:34:55 EST


Alan Cox writes:

> IDE supports dynamic addition of interfaces so it should be possible
> to make this work either way around.

Yes, it should be possible with some tweaks to the media bay driver.

It gets a bit complicated though because at the moment there is no way
to say "here's a new interface and by the way it's a pmac IDE
interface so please use the pmac driver on it". (Come to that there
doesn't appear to be any way to dynamically add an interface that uses
MMIO.)

Consequently the pmac IDE driver needs to know about the mediabay IDE
interface at pmac_ide_probe time and reserve a slot for it (which it
does). At that point the pmac IDE driver tells the mediabay driver
the ioremapped base address of the interface so that the mediabay
driver can pass that back in to ide_register_hw. Which is all a bit
backwards.

Of course, if you happened to plug in a CF card while you didn't have
the CD drive in the media bay, the CF card would get the media bay's
hwif structure and it would blow up in your face.

Is the IDE stuff still in the middle of open-heart surgery? I'm happy
to hack on it and send you patches if it isn't all going to change
dramatically in the next week anyway.

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



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:45 EST