Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141978581
D25155.id72737.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D25155.id72737.diff
View Options
Index: sys/dev/ciss/ciss.c
===================================================================
--- sys/dev/ciss/ciss.c
+++ sys/dev/ciss/ciss.c
@@ -1284,9 +1284,9 @@
"\20\1ultra2\2ultra3\10fibre1\11fibre2\n");
ciss_printf(sc, " server name '%.16s'\n", sc->ciss_cfg->server_name);
ciss_printf(sc, " heartbeat 0x%x\n", sc->ciss_cfg->heartbeat);
- ciss_printf(sc, " max logical logical volumes: %d\n", sc->ciss_cfg->max_logical_supported);
- ciss_printf(sc, " max physical disks supported: %d\n", sc->ciss_cfg->max_physical_supported);
- ciss_printf(sc, " max physical disks per logical volume: %d\n", sc->ciss_cfg->max_physical_per_logical);
+ ciss_printf(sc, " max logical volumes supported: %d\n", sc->ciss_cfg->max_logical_supported);
+ ciss_printf(sc, " max physical drives supported: %d\n", sc->ciss_cfg->max_physical_supported);
+ ciss_printf(sc, " max physical drives per logical volume: %d\n", sc->ciss_cfg->max_physical_per_logical);
ciss_printf(sc, " JBOD Support is %s\n", (sc->ciss_id->uiYetMoreControllerFlags & YMORE_CONTROLLER_FLAGS_JBOD_SUPPORTED) ?
"Available" : "Unavailable");
ciss_printf(sc, " JBOD Mode is %s\n", (sc->ciss_id->PowerUPNvramFlags & PWR_UP_FLAG_JBOD_ENABLED) ?
@@ -1513,6 +1513,9 @@
nphys, (nphys > 1 || nphys == 0) ? "s" : "");
}
+ /* Per-controller highest target number seen */
+ sc->ciss_max_physical_target = 0;
+
/*
* Figure out the bus mapping.
* Logical buses include both the local logical bus for local arrays and
@@ -1595,6 +1598,8 @@
}
ciss_filter_physical(sc, cll);
+ if (bootverbose)
+ ciss_printf(sc, "max physical target id: %d\n", sc->ciss_max_physical_target);
out:
if (cll != NULL)
@@ -1644,6 +1649,9 @@
target = CISS_EXTRA_TARGET2(ea);
sc->ciss_physical[bus][target].cp_address = cll->lun[i];
sc->ciss_physical[bus][target].cp_online = 1;
+
+ if (target > sc->ciss_max_physical_target)
+ sc->ciss_max_physical_target = target;
}
return (0);
@@ -3034,9 +3042,12 @@
cpi->hba_inquiry = PI_TAG_ABLE; /* XXX is this correct? */
cpi->target_sprt = 0;
cpi->hba_misc = 0;
- cpi->max_target = sc->ciss_cfg->max_logical_supported;
+ /* make sure max_target is the highest of max_logical_supported or the detected ciss_max_targets */
+ cpi->max_target = (sc->ciss_max_physical_target > sc->ciss_cfg->max_logical_supported ?
+ sc->ciss_max_physical_target : sc->ciss_cfg->max_logical_supported);
cpi->max_lun = 0; /* 'logical drive' channel only */
- cpi->initiator_id = sc->ciss_cfg->max_logical_supported;
+ /* make sure the initiator_id is outside the range of used targets */
+ cpi->initiator_id = 0; /* max(sc->ciss_cfg->max_physical_supported, sc->ciss_cfg->max_logical_supported); */
strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
strlcpy(cpi->hba_vid, "CISS", HBA_IDLEN);
strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
@@ -4173,7 +4184,7 @@
struct ciss_softc *sc;
struct ciss_request *cr;
struct ciss_notify *cn;
-
+
sc = (struct ciss_softc *)arg;
mtx_lock(&sc->ciss_mtx);
@@ -4185,13 +4196,13 @@
if (sc->ciss_flags & CISS_FLAG_THREAD_SHUT)
break;
-
+
cr = ciss_dequeue_notify(sc);
-
if (cr == NULL)
panic("cr null");
cn = (struct ciss_notify *)cr->cr_data;
+
switch (cn->class) {
case CISS_NOTIFY_HOTPLUG:
ciss_notify_hotplug(sc, cn);
@@ -4203,9 +4214,9 @@
ciss_notify_physical(sc, cn);
break;
}
-
+
ciss_release_request(cr);
-
+
}
sc->ciss_notify_thread = NULL;
wakeup(&sc->ciss_notify_thread);
Index: sys/dev/ciss/cissvar.h
===================================================================
--- sys/dev/ciss/cissvar.h
+++ sys/dev/ciss/cissvar.h
@@ -238,6 +238,7 @@
int ciss_max_bus_number; /* maximum bus number */
int ciss_max_logical_bus;
int ciss_max_physical_bus;
+ int ciss_max_physical_target; /* highest physical target number */
struct cam_devq *ciss_cam_devq;
struct cam_sim **ciss_cam_sim;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 15, 11:18 AM (13 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27647485
Default Alt Text
D25155.id72737.diff (3 KB)
Attached To
Mode
D25155: CISS: Support >48 JBOD drives, fix SES enumeration, no panic on unplug, sysctl tunables &more verbosity...
Attached
Detach File
Event Timeline
Log In to Comment