Buildfixes for the blkman -> block_io change. Also fixes the non TRACE_PCI version of the PCI add-on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12649 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include <blkman.h>
|
||||
#include <block_io.h>
|
||||
|
||||
|
||||
/** called when an IDE channel was registered by a controller driver */
|
||||
@@ -63,7 +63,7 @@ ide_channel_added(device_node_handle parent)
|
||||
// which should be sufficient)
|
||||
// Note: to fix specific drive bugs, use ide_sim_get_restrictions()
|
||||
// in ide_sim.c!
|
||||
{ BLKDEV_MAX_BLOCKS_ITEM, B_UINT32_TYPE, { ui32: 255 }},
|
||||
{ B_BLOCK_DEVICE_MAX_BLOCKS_ITEM, B_UINT32_TYPE, { ui32: 255 }},
|
||||
{ IDE_CHANNEL_ID_ITEM, B_UINT32_TYPE, { ui32: channel_id }},
|
||||
{ PNP_MANAGER_ID_GENERATOR, B_STRING_TYPE, { string: IDE_CHANNEL_ID_GENERATOR }},
|
||||
{ PNP_MANAGER_AUTO_ID, B_UINT32_TYPE, { ui32: channel_id }},
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#define TRACE_PCI
|
||||
#ifndef TRACE_PCI
|
||||
# define TRACE(x) ;
|
||||
# define TRACE(x)
|
||||
#else
|
||||
# define TRACE(x) dprintf x
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <blkman.h>
|
||||
#include <block_io.h>
|
||||
|
||||
|
||||
// bus service should hurry up a bit - good controllers don't take much time
|
||||
@@ -197,15 +197,15 @@ scsi_init_bus(device_node_handle node, void *user_cookie, void **cookie)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
// extract controller/protocoll restrictions from node
|
||||
if (pnp->get_attr_uint32(node, BLKDEV_DMA_ALIGNMENT, &bus->dma_params.alignment, true) != B_OK)
|
||||
if (pnp->get_attr_uint32(node, B_BLOCK_DEVICE_DMA_ALIGNMENT, &bus->dma_params.alignment, true) != B_OK)
|
||||
bus->dma_params.alignment = 0;
|
||||
if (pnp->get_attr_uint32(node, BLKDEV_MAX_BLOCKS_ITEM, &bus->dma_params.max_blocks, true) != B_OK)
|
||||
if (pnp->get_attr_uint32(node, B_BLOCK_DEVICE_MAX_BLOCKS_ITEM, &bus->dma_params.max_blocks, true) != B_OK)
|
||||
bus->dma_params.max_blocks = 0xffffffff;
|
||||
if (pnp->get_attr_uint32(node, BLKDEV_DMA_BOUNDARY, &bus->dma_params.dma_boundary, true) != B_OK)
|
||||
if (pnp->get_attr_uint32(node, B_BLOCK_DEVICE_DMA_BOUNDARY, &bus->dma_params.dma_boundary, true) != B_OK)
|
||||
bus->dma_params.dma_boundary = ~0;
|
||||
if (pnp->get_attr_uint32(node, BLKDEV_MAX_SG_BLOCK_SIZE, &bus->dma_params.max_sg_block_size, true) != B_OK)
|
||||
if (pnp->get_attr_uint32(node, B_BLOCK_DEVICE_MAX_SG_BLOCK_SIZE, &bus->dma_params.max_sg_block_size, true) != B_OK)
|
||||
bus->dma_params.max_sg_block_size = 0xffffffff;
|
||||
if (pnp->get_attr_uint32(node, BLKDEV_MAX_SG_BLOCKS, &bus->dma_params.max_sg_blocks, true) != B_OK)
|
||||
if (pnp->get_attr_uint32(node, B_BLOCK_DEVICE_MAX_SG_BLOCKS, &bus->dma_params.max_sg_blocks, true) != B_OK)
|
||||
bus->dma_params.max_sg_blocks = ~0;
|
||||
|
||||
// do some sanity check:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "scsi_internal.h"
|
||||
|
||||
#include <blkman.h>
|
||||
#include <block_io.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -121,7 +121,7 @@ scsi_register_device(scsi_bus_info *bus, uchar target_id,
|
||||
// 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);
|
||||
pnp->get_attr_uint32(bus->node, B_BLOCK_DEVICE_MAX_BLOCKS_ITEM, &orig_max_blocks, true);
|
||||
|
||||
max_blocks = min(max_blocks, orig_max_blocks);
|
||||
|
||||
@@ -155,7 +155,7 @@ scsi_register_device(scsi_bus_info *bus, uchar target_id,
|
||||
// ToDo: mapping is missing
|
||||
|
||||
// extra restriction of maximum number of blocks per transfer
|
||||
{ BLKDEV_MAX_BLOCKS_ITEM, B_UINT32_TYPE, { ui32: max_blocks }},
|
||||
{ B_BLOCK_DEVICE_MAX_BLOCKS_ITEM, B_UINT32_TYPE, { ui32: max_blocks }},
|
||||
|
||||
// atapi emulation
|
||||
{ SCSI_DEVICE_IS_ATAPI_ITEM, B_UINT8_TYPE, { ui8: is_atapi }},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <bus/IDE.h>
|
||||
#include <bus/ISA.h>
|
||||
#include <device_manager.h>
|
||||
#include <blkman.h>
|
||||
#include <block_io.h>
|
||||
|
||||
#define debug_level_flow 0
|
||||
#define debug_level_error 1
|
||||
@@ -344,7 +344,7 @@ publish_channel(device_node_handle parent, io_resource_handle *resources,
|
||||
// DMA properties; the 16 bit alignment is not necessary as
|
||||
// the ide bus manager handles that very efficiently, but why
|
||||
// not use the block device manager for doing that?
|
||||
{ BLKDEV_DMA_ALIGNMENT, B_UINT32_TYPE, { ui32: 1 }},
|
||||
{ B_BLOCK_DEVICE_DMA_ALIGNMENT, B_UINT32_TYPE, { ui32: 1 }},
|
||||
|
||||
// private data to identify device
|
||||
{ IDE_ISA_COMMAND_BLOCK_BASE, B_UINT16_TYPE, { ui16: command_block_base }},
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <bus/ide/ide_adapter.h>
|
||||
#include <bus/PCI.h>
|
||||
#include <device_manager.h>
|
||||
#include <blkman.h>
|
||||
#include <block_io.h>
|
||||
#include <lendian_bitfield.h>
|
||||
|
||||
#define debug_level_flow 0
|
||||
@@ -623,13 +623,13 @@ ide_adapter_publish_controller(device_node_handle parent, uint16 bus_master_base
|
||||
// DMA properties
|
||||
// data must be word-aligned;
|
||||
// warning: some controllers are more picky!
|
||||
{ BLKDEV_DMA_ALIGNMENT, B_UINT32_TYPE, { ui32: dma_alignment /*1*/}},
|
||||
{ B_BLOCK_DEVICE_DMA_ALIGNMENT, B_UINT32_TYPE, { ui32: dma_alignment /*1*/}},
|
||||
// one S/G block must not cross 64K boundary
|
||||
{ BLKDEV_DMA_BOUNDARY, B_UINT32_TYPE, { ui32: dma_boundary/*0xffff*/ }},
|
||||
{ B_BLOCK_DEVICE_DMA_BOUNDARY, B_UINT32_TYPE, { ui32: dma_boundary/*0xffff*/ }},
|
||||
// max size of S/G block is 16 bits with zero being 64K
|
||||
{ BLKDEV_MAX_SG_BLOCK_SIZE, B_UINT32_TYPE, { ui32: max_sg_block_size/*0x10000*/ }},
|
||||
{ B_BLOCK_DEVICE_MAX_SG_BLOCK_SIZE, B_UINT32_TYPE, { ui32: max_sg_block_size/*0x10000*/ }},
|
||||
// see definition of MAX_SG_COUNT
|
||||
{ BLKDEV_MAX_SG_BLOCKS, B_UINT32_TYPE, { ui32: IDE_ADAPTER_MAX_SG_COUNT }},
|
||||
{ B_BLOCK_DEVICE_MAX_SG_BLOCKS, B_UINT32_TYPE, { ui32: IDE_ADAPTER_MAX_SG_COUNT }},
|
||||
|
||||
// private data to find controller
|
||||
{ IDE_ADAPTER_BUS_MASTER_BASE, B_UINT16_TYPE, { ui16: bus_master_base }},
|
||||
|
||||
Reference in New Issue
Block a user