#emc-devel | Logs for 2008-04-23

[15:30:28] <alex_joni> skunkworks_: now you can kick it
[15:30:28] <skunkworks_> Thanks alex
[15:30:48] <cradek> * cradek kicks alex_joni
[15:30:52] <cradek> oops I missed
[15:31:37] <alex_joni> :/
[15:31:38] <skunkworks_> that is one long leg..
[18:28:58] <cradek> alex_joni: http://pastebin.ca/994866
[18:31:22] <cradek> I don't get what's going on there. I do not have parport_pc loaded.
[18:34:08] <jepler> 108 /* we only need the pnp layer to activate the device, at least for now */
[18:34:11] <jepler> 109 static struct pnp_driver parport_pc_pnp_driver = {
[18:34:14] <jepler> 110 .name = "parport_pc",
[18:34:14] <jepler> in probe_parport.c try changing this string
[18:34:26] <jepler> oh wait
[18:34:34] <jepler> this happened the *second* time you ran emc or loaded probe_parport, didn't it
[18:34:38] <jepler> f***
[18:35:42] <jepler> normally you pnp_register_driver when your module loads and pnp_unregister_driver (I think) when you unload, you'll only have a single registration for a given driver name
[18:36:15] <jepler> but one of your weird-ass machines parports break forever after pnp_unregister_driver, so I changed probe_parport so that it never calls pnp_unregister_driver
[18:36:31] <jepler> makes sense that it's an error, but before now it wasn't a diagnosed error
[18:37:08] <cradek> f***
[18:38:42] <jepler> all this just so that stepconf didn't have to ask the user whether to use probe_parport or not
[18:38:50] <jepler> (since your machine that breaks doesn't need it in the first place)
[18:40:00] <cradek> yes, sadly it's going to be a question the user doesn't know how to answer
[18:46:19] <alex_joni> hmm.. odd
[18:51:32] <jepler> I'm open to ideas...
[18:57:06] <cradek> how does one tell for sure whether probe_parport is needed?
[18:58:06] <jepler> if you don't get outputs on the parport otherwise?
[18:58:23] <jepler> if emc doesn't work and you don't think there's another reason?
[18:58:26] <cradek> so hal_parport loads fine, but the port just silently doesn't work?
[18:58:30] <jepler> yes
[18:58:39] <jepler> because there's not actually any device at that address
[18:58:50] <cradek> yuck.
[19:07:03] <jepler> the linux parport driver does try to detect the presence of an spp port, but it does it by outb()ing on the control and/or data ports
[19:08:03] <jepler> it writes 0xc and 0xe on the control port and 0xaa and 0x55 on the data port. if either of those reads back the same, it is detected as an SPP port
[19:08:26] <jepler> (that is, if 0xc and 0xe read back; or if 0xaa and 0x55 read back)
[19:09:04] <jepler> I suppose this could be done as a one-time detection with a special module
[19:09:26] <cradek> probe_parport could try it, and if it works, skip the pnp stuff
[19:09:36] <jepler> but that might make attached hardware do something
[19:09:50] <cradek> yeah that's the sucky part I guess
[19:10:05] <jepler> that's why I was thinking of a one-time thing .. stepconf would do it
[19:10:15] <cradek> oh I see
[19:40:16] <alex_joni> hmm.. I think the "old" way was ok enough
[19:41:04] <alex_joni> have stuff with hal_parport only, and if that fails have the user load "probe_parport"
[19:42:33] <cradek> [ ] Try harder to find a plug-and-play parallel port
[19:43:11] <alex_joni> another "hack" might be to modprobe parport_pc | grep /proc/ioports/ modprobe -r parport-pc
[19:47:04] <jepler> that won't tell you whether PNP is needed to make the port work at all
[19:47:19] <alex_joni> doesn't it stay enabled?
[19:47:26] <jepler> no; that's the problem
[19:47:29] <alex_joni> or configured or whatever?
[19:47:39] <alex_joni> hmm.. I had a problem with a cardbus parport once
[19:47:39] <jepler> when you remove parport_pc the pnp subsystem disables those I/Os
[19:47:48] <alex_joni> that was the only way to get it to work
[19:48:02] <alex_joni> (load the linux driver, unload it, then load hal_parport)
[21:06:57] <alex_joni> cradek: still testing on a laptop?
[21:07:23] <cradek> yes
[21:20:57] <alex_joni> you might need something like this: http://www.geekologie.com/2008/04/warmth_and_privacy_while_using.php
[23:57:36] <cradek> I already have one - don't you?