id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,field_blocks,field_dependson,field_seealso 274,Accessing devman devices using devmap handles does not work,Jakub Jermář,Vojtech Horky,"In devman_connection(), there is the following comment: {{{ /* * Silly hack to enable the device manager to register as a driver by * the device mapper. If the ipc method is not IPC_M_CONNECT_ME_TO, this * is not the forwarded connection from naming service, so it must be a * connection from the devmapper which thinks this is a devmapper-style * driver. So pretend this is a devmapper-style driver. (This does not * work for device with handle == IPC_M_CONNECT_ME_TO, because devmapper * passes device handle to the driver as an ipc method.) */ }}} Sounds scary, but in reality this does not work anyway. Trying to connect to a devman-style driver (e.g. the serial driver) using its devfs name will result in ENOENT being returned further down in the function in the default alternative of the switch statement. In other words, the method will be IPC_M_CONNECT_ME_TO no matter whether the connection is opened using devman interfaces or devmap interfaces. The reason is that devmap will forward its own IPC_M_CONNECT_ME_TO call to devman like this: {{{ ipc_forward_fast(callid, dev->driver->phone, dev->handle, IPC_GET_ARG3(*call), 0, IPC_FF_NONE); }}} dev->handle here is passed as the formal parameter named ""method"" but because IPC_M_CONNECT_ME_TO is a system method, sys_ipc_forward_common() will simply use it to replace ARG1 instead of the call's own method - contrary to the comment. The message when delivered to devman_connection() will be: {{{ method = IPC_M_CONNECT_ME_TO arg1 = dev->handle (devmap handle) arg2 = flags }}} ",defect,closed,major,0.4.3,helenos/srv/devman,,fixed,,,,,