i2o: core: fixed a bug in the channel list.

i2o_channel_alloc is responsible for allocating a new channel and adding
it to the list of its supervising I2O device. However, if it is the
first channel being allocated, this function accessed a NULL pointer
when trying to add it to the list of existing channels (which don't
exist, yet. Ofcourse).

Signed-off-by: Michel Megens <dev@michelmegens.net>
i2o: core: fixed a channel listing bug.

The linked list API provided by Linux was utilized in the wrong way with
the listing of channels under an I2O device. Fixed by adding a `struct
list_head' to `struct i2o_dev::channels'. Do do so, the channel list
head pointer has been renamed to `struct i2o_dev::channel_head'.

Also added 2 flags to `struct i2o_dev::flags':
	* I2O_BUF_RX
	* I2O_BUF_TX

These flags indicate whether buffered reads or writes, respectively, are
allowed on that specific device or not.

Previously, _i2o_dev_xfer could set a mode bit while there was no buffer
given for that operation in the function parameters. After calculating
the required modes using bitwise math, all unneccessary modes will be
stripped before the mode is requested.

Signed-off-by: Michel Megens <dev@michelmegens.net>
i2o: dbg: added another xfer debug case.

Implemented:
	* i2o_dbg_xfer3

This function is the 3rd and last called test case for _i2o_dev_xfer. It
tests the disposal of unneccessary modes. That means that it will try to
set modes which should be set and checks if these modes are then dropped
by _i2o_dev_xfer.

Signed-off-by: Michel Megens <dev@michelmegens.net>
i2o: core: changed the i2o device name template.

The template for I2O devices used to be i2o:device<id> and the template
for I2O channels is i2o:channel:<id>. Changed the template of I2O devices
to be the same as I2O channels for consitency.

Signed-off-by: Michel Megens <dev@michelmegens.net>
i2o: core: added trace point mode tracing.

Added a file:
	* include/trace/events/i2o.h

This file describes the trace points for I2O. Currently only the I2O
device mode is traced using these trace points.

Moved the reset of `struct i2o_device::current_mode' from
i2o_dev_request to i2o_dev_free for logic reasons.

Signed-off-by: Michel Megens <dev@michelmegens.net>