Set scsi target id limit to 16, was previously hardcoded to 2. Add a node attribute to allow overriding this value.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22071 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ddf188703a
commit
402a4a4e7b
@ -285,6 +285,9 @@ typedef struct {
|
||||
// revision (string)
|
||||
#define SCSI_DEVICE_REVISION_ITEM "scsi/revision"
|
||||
|
||||
// maximum targets on scsi bus
|
||||
#define SCSI_DEVICE_MAX_TARGET_COUNT "scsi/max_target_count"
|
||||
|
||||
// directory containing links to peripheral drivers
|
||||
#define SCSI_PERIPHERAL_DRIVERS_DIR "scsi"
|
||||
|
||||
|
@ -99,6 +99,10 @@ scsi_create_bus(device_node_handle node, uint8 path_id)
|
||||
memset(bus, 0, sizeof(*bus));
|
||||
|
||||
bus->path_id = path_id;
|
||||
|
||||
if (pnp->get_attr_uint32(node, SCSI_DEVICE_MAX_TARGET_COUNT, &bus->max_target_count, true) != B_OK)
|
||||
bus->max_target_count = MAX_TARGET_ID + 1;
|
||||
|
||||
bus->node = node;
|
||||
bus->lock_count = bus->blocked[0] = bus->blocked[1] = 0;
|
||||
bus->sim_overflow = 0;
|
||||
|
@ -255,7 +255,7 @@ scsi_scan_bus(scsi_bus_info *bus)
|
||||
// as this function is optional for SIM, we ignore its result
|
||||
bus->interface->scan_bus(bus->sim_cookie);
|
||||
|
||||
for (target_id = 0; target_id <= 1/*MAX_TARGET_ID*/; ++target_id) {
|
||||
for (target_id = 0; target_id < bus->max_target_count; ++target_id) {
|
||||
int lun;
|
||||
|
||||
SHOW_FLOW(3, "target: %d", target_id);
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
|
||||
#define MAX_PATH_ID 255
|
||||
#define MAX_TARGET_ID 31
|
||||
#define MAX_TARGET_ID 15
|
||||
#define MAX_LUN_ID 7
|
||||
|
||||
|
||||
@ -107,6 +107,7 @@ typedef struct scsi_bus_info {
|
||||
bool sim_overflow; // 1, if SIM refused req because of bus queue overflow
|
||||
|
||||
uchar path_id; // SCSI path id
|
||||
uint32 max_target_count; // maximum count of target_ids on the bus
|
||||
|
||||
thread_id service_thread; // service thread
|
||||
sem_id start_service; // released whenever service thread has work to do
|
||||
|
Loading…
Reference in New Issue
Block a user