/* Manange the device ids to have an appropraite mapping between the kernel scsi addresses and megaraid scsi and logical drive addresses. We export scsi devices on their actual addresses, whereas the logical drives are exported on a virtual scsi channel.  */
static void megaraid_mbox_setup_device_map(adapter_t *)
/* Manange the device ids to have an appropraite mapping between the kernel scsi addresses and megaraid scsi and logical drive addresses. We export scsi devices on their actual addresses, whereas the logical drives are exported on a virtual scsi channel.  */
static void megaraid_mbox_setup_device_map(adapter_t *)
{
	uint8_t		c;
	uint8_t		t;
	for (t = 0; t < LSI_MAX_LOGICAL_DRIVES_64LD; t++)
		adapter->device_ids[adapter->max_channel][t] =
			(t < adapter->init_id) ?  t : t - 1;
	adapter->device_ids[adapter->max_channel][adapter->init_id] = 0xFF;
	for (c = 0; c < adapter->max_channel; c++)
		for (t = 0; t < LSI_MAX_LOGICAL_DRIVES_64LD; t++)
			adapter->device_ids[c][t] = (c << 8) | t;
}