[PATCH] Hotplug for openfirmware/macio devices

STALE8063d

3 messages, 1 author, 2004-09-16 · open the first message on its own page

[PATCH] Hotplug for openfirmware/macio devices

From: Jeff Mahoney <hidden>
Date: 2004-09-16 20:15:01

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hey all -

Many devices on the macintosh hardware platform are hidden behind a
macio asic that places devices beyond the PCI bus for hotplug. Loading
the driver manually works fine, but we have this wonderful hotplug
system now. Why should macio be a second class citizen?

At least for me, the most noticable one was my airport card, but there
may be others. I only have an ibook and a powermac.

Attached are three patches, which do the following:
* kernel-of-hotplug.diff; against 2.6.9-rc2 (mainline)
~  - exports OF information to userspace
~  - removes struct of_device in favor of struct of_device_id, which
~    uses character arrays such that the structure can be more easily
~    used by module-init-tools [the renaming is required to use the
~    MODULE_DEVICE_TABLE macro]
~  - changes the semantics of OF_MATCH_ANY to be an empty string
~  - adds the name, type, and compat strings to the macio sysfs tree
~  - adds a hotplug filter to pass the name, type, and compat info
~    to hotplug
~  - adds the appropriate MODULE_DEVICE_TABLE entries so that
~    module-init-tools can know about macio devices
~  - (Yes, I know this information is available via /proc/device_tree,
~     but sysfs is a much more natural fit)
* hotplug-macio.diff
~  - macio.rc: handles coldplugging of devices by traversing
~    the macio sysfs tree
~  - macio.agent: handles macio hotplug events
* module-init-tools-3.0-pre10-openfirmware.diff
~  - adds support for a modules.ofmap table so that the hotplug scripts
~    can determine which modules to load based on the OF information.

Is there a limit for the length of the various OF strings? I've assumed
32 for the sake of testing, but it's completely arbitrary.

Take a look if you're interested. My familiarity with the PPC world is
peripheral at best. I'd love feedback.

- -Jeff

- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBSfKpLPWxlyuTD7IRAjogAJ0YN3ikH4Vdlc0HFL8VqmudfXdWPgCff6D6
8AwEoPW6w5nUGlzAiHmiq4I=
=pF7H
-----END PGP SIGNATURE-----

Re: [PATCH] Hotplug for openfirmware/macio devices

From: Jeff Mahoney <hidden>
Date: 2004-09-16 21:06:47

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff Mahoney wrote:
|
| Hey all -
|
| Many devices on the macintosh hardware platform are hidden behind a
| macio asic that places devices beyond the PCI bus for hotplug. Loading
| the driver manually works fine, but we have this wonderful hotplug
| system now. Why should macio be a second class citizen?
|
| At least for me, the most noticable one was my airport card, but there
| may be others. I only have an ibook and a powermac.
|
| Attached are three patches, which do the following:
| * kernel-of-hotplug.diff; against 2.6.9-rc2 (mainline)

| Take a look if you're interested. My familiarity with the PPC world is
| peripheral at best. I'd love feedback.

As a quick note, it's been pointed out to me that some of the drivers
won't compile as is.

I only compile tested with the drivers I use, so stuff slipped by. I'll
have an updated kernel patch in a little bit.

- -Jeff

- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBSgEeLPWxlyuTD7IRArijAJwOG/8WGId3foGajgKTu3/s4gRJMQCePHMq
CggbvmovKdA0YBkED6aLkJs=
=6pUe
-----END PGP SIGNATURE-----

Re: [PATCH] Hotplug for openfirmware/macio devices

From: Jeff Mahoney <hidden>
Date: 2004-09-16 22:24:45

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff Mahoney wrote:
|
| Hey all -
|
| Many devices on the macintosh hardware platform are hidden behind a
| macio asic that places devices beyond the PCI bus for hotplug. Loading
| the driver manually works fine, but we have this wonderful hotplug
| system now. Why should macio be a second class citizen?
|
| At least for me, the most noticable one was my airport card, but there
| may be others. I only have an ibook and a powermac.
|
| Attached are three patches, which do the following:
| * kernel-of-hotplug.diff; against 2.6.9-rc2 (mainline)
| ~  - exports OF information to userspace
| ~  - removes struct of_device in favor of struct of_device_id, which
| ~    uses character arrays such that the structure can be more easily
| ~    used by module-init-tools [the renaming is required to use the
| ~    MODULE_DEVICE_TABLE macro]
| ~  - changes the semantics of OF_MATCH_ANY to be an empty string
| ~  - adds the name, type, and compat strings to the macio sysfs tree
| ~  - adds a hotplug filter to pass the name, type, and compat info
| ~    to hotplug
| ~  - adds the appropriate MODULE_DEVICE_TABLE entries so that
| ~    module-init-tools can know about macio devices
| ~  - (Yes, I know this information is available via /proc/device_tree,
| ~     but sysfs is a much more natural fit)
| * hotplug-macio.diff
| ~  - macio.rc: handles coldplugging of devices by traversing
| ~    the macio sysfs tree
| ~  - macio.agent: handles macio hotplug events
| * module-init-tools-3.0-pre10-openfirmware.diff
| ~  - adds support for a modules.ofmap table so that the hotplug scripts
| ~    can determine which modules to load based on the OF information.
|
| Is there a limit for the length of the various OF strings? I've assumed
| 32 for the sake of testing, but it's completely arbitrary.
|
| Take a look if you're interested. My familiarity with the PPC world is
| peripheral at best. I'd love feedback.

As promised, updated kernel patch.

- -Jeff


- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBShNkLPWxlyuTD7IRAioJAJsFWzAyp3AbXLd8Q7c2VQVYOMt4EwCeLGF2
/fUIjnQUXqJHPK4H9CeUI4k=
=HFZy
-----END PGP SIGNATURE-----
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help