kernels/linux-2.4.0/drivers/i2o/i2o_block.c
/*
 * Reboot notifier.  This is called by i2o_core when the system
 * shuts down.
 */
Reboot notifier.  This is called by i2o_core when the system
shuts down.
Reboot notifier . This is called by i2o_core when the system shuts down .
static void i2ob_reboot_event(void)
{
	int i;
	for(i=0;i<MAX_I2OB;i++)
	{
		struct i2ob_device *dev=&i2ob_dev[(i<<4)];
		if(dev->refcnt!=0)
		{
			u32 msg[5];
			int *query_done = &dev->done_flag;
			msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0;
			msg[1] = I2O_CMD_BLOCK_CFLUSH<<24|HOST_TID<<12|dev->tid;
			msg[2] = i2ob_context|0x40000000;
			msg[3] = (u32)query_done;
			msg[4] = 60<<16;
			i2o_post_wait(dev->controller, msg, 20, 2);
			msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0;
			msg[1] = I2O_CMD_BLOCK_MUNLOCK<<24|HOST_TID<<12|dev->tid;
			msg[2] = i2ob_context|0x40000000;
			msg[3] = (u32)query_done;
			msg[4] = -1;
			i2o_post_wait(dev->controller, msg, 20, 2);
		}
	}	
}
static void i2ob_reboot_event ( void ) { int i ; for ( i = 0 ; i < MAX_I2OB ; i ++ ) { struct i2ob_device * dev = & i2ob_dev [ ( i << 4 ) ] ; if ( dev -> refcnt != 0 ) { u32 msg [ 5 ] ; int * query_done = & dev -> done_flag ; msg [ 0 ] = FIVE_WORD_MSG_SIZE | SGL_OFFSET_0 ; msg [ 1 ] = I2O_CMD_BLOCK_CFLUSH << 24 | HOST_TID << 12 | dev -> tid ; msg [ 2 ] = i2ob_context | 0x40000000 ; msg [ 3 ] = ( u32 ) query_done ; msg [ 4 ] = 60 << 16 ; i2o_post_wait ( dev -> controller , msg , 20 , 2 ) ; msg [ 0 ] = FIVE_WORD_MSG_SIZE | SGL_OFFSET_0 ; msg [ 1 ] = I2O_CMD_BLOCK_MUNLOCK << 24 | HOST_TID << 12 | dev -> tid ; msg [ 2 ] = i2ob_context | 0x40000000 ; msg [ 3 ] = ( u32 ) query_done ; msg [ 4 ] = -1 ; i2o_post_wait ( dev -> controller , msg , 20 , 2 ) ; } } }
Reboot notifier.
Reboot notifier .
/*
			 *	Flush the onboard cache
			 */ /*
			 *	Unlock the media
			 */