Block device driver crashes on making i2c_master_send call in request
I am developing a CD driver for data CD. The CD device is controlled through I2C and the data comes through SPDIF channel. The SPDIF driver is part of the BSP. To read sectors from the CD device, I need to send a i2C play command and then subsequently make a call to spdif_read() function of BSP to read the data. So, in my block driver's request(...) function, when I realize that the request from the kernel is read, I issue a PLAY I2C command using I2c_master_send() api. Then I go on to make a spidif_read() subsequently. The issue is that moment I issue the i2c_master_send(), my driver is crashing.
Can some one throw some light on this? Is it legal to call other driver / Subsystem functions from request() function (which I guess is in the context of the I/O scheduler)