rem: { BLKDEV_MAX_BLOCKS_ITEM, B_UINT32_TYPE, { ui32: max_blocks }},
add: { B_BLOCK_DEVICE_MAX_BLOCKS_ITEM, B_UINT32_TYPE, { ui32: max_blocks }},
context: scsi_register_device(scsi_bus_info *bus, uchar target_id,	uchar target_lun, scsi_res_inquiry *inquiry_data){	bool is_atapi, manual_autosense;	uint32 orig_max_blocks, max_blocks;	SHOW_FLOW0( 3, "" );	// ask for restrictions		bus->interface->get_restrictions(bus->sim_cookie, 		target_id, &is_atapi, &manual_autosense, &max_blocks);	// find maximum transfer blocks	// set default value to max (need something like ULONG_MAX here)	orig_max_blocks = ~0;			pnp->get_attr_uint32(bus->node, BLKDEV_MAX_BLOCKS_ITEM, &orig_max_blocks, true);	max_blocks = min(max_blocks, orig_max_blocks);	{		char vendor_ident[sizeof( inquiry_data->vendor_ident ) + 1];		char product_ident[sizeof( inquiry_data->product_ident ) + 1];		char product_rev[sizeof( inquiry_data->product_rev ) + 1];		device_attr attrs[] = {			// info about driver			{ B_DRIVER_MODULE, B_STRING_TYPE, { string: SCSI_DEVICE_MODULE_NAME }},			// connection			{ SCSI_DEVICE_TARGET_ID_ITEM, B_UINT8_TYPE, { ui8: target_id }},			{ SCSI_DEVICE_TARGET_LUN_ITEM, B_UINT8_TYPE, { ui8: target_lun }},			{ PNP_DRIVER_CONNECTION, B_STRING_TYPE, { string:				"target: %"SCSI_DEVICE_TARGET_ID_ITEM				"%, lun: %"SCSI_DEVICE_TARGET_LUN_ITEM"%" }},			// inquiry data (used for both identification and information)			{ SCSI_DEVICE_INQUIRY_ITEM, B_RAW_TYPE, 				{ raw: { inquiry_data, sizeof( *inquiry_data ) }}},			// some more info for driver loading			{ SCSI_DEVICE_TYPE_ITEM, B_UINT8_TYPE, { ui8: inquiry_data->device_type }},			{ SCSI_DEVICE_VENDOR_ITEM, B_STRING_TYPE, { string: vendor_ident }},			{ SCSI_DEVICE_PRODUCT_ITEM, B_STRING_TYPE, { string: product_ident }},			{ SCSI_DEVICE_REVISION_ITEM, B_STRING_TYPE, { string: product_rev }},			// description of peripheral drivers			{ B_DRIVER_BUS, B_STRING_TYPE, { string: "scsi" }},			// ToDo: mapping is missing			// extra restriction of maximum number of blocks per transfer			{ BLKDEV_MAX_BLOCKS_ITEM, B_UINT32_TYPE, { ui32: max_blocks }},			// atapi emulation			{ SCSI_DEVICE_IS_ATAPI_ITEM, B_UINT8_TYPE, { ui8: is_atapi }},			// manual autosense			{ SCSI_DEVICE_MANUAL_AUTOSENSE_ITEM, B_UINT8_TYPE, { ui8: manual_autosense }},			{ NULL }		};		device_node_handle node;		status_t res;		beautify_string(vendor_ident, inquiry_data->vendor_ident, sizeof(vendor_ident));		beautify_string(product_ident, inquiry_data->product_ident, sizeof(product_ident));		beautify_string(product_rev, inquiry_data->product_rev, sizeof(product_rev));		res = pnp->register_device(bus->node, attrs, NULL, &node);		if (res < 0)			return res;	}	return B_OK;}