Mercurial > illumos > illumos-gate
changeset 12949:dd7214c03e0d
6968895 only one path seen on JBOD after SAS cable pull/reinsert
6971809 target failing to reenumerate after being moved from one PHY to another
author | Jesse Butler <jesse.butler@oracle.com> |
---|---|
date | Wed, 28 Jul 2010 12:51:51 -0600 |
parents | ea5597b82cd8 |
children | d560524b6bb6 |
files | usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_scsa.c usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c |
diffstat | 2 files changed, 12 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_scsa.c Wed Jul 28 11:20:25 2010 -0700 +++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_scsa.c Wed Jul 28 12:51:51 2010 -0600 @@ -479,10 +479,8 @@ target->target_num); pwp->targets[target->target_num] = NULL; target->target_num = PMCS_INVALID_TARGET_NUM; - /* - * If the target still has a PHY pointer, break the linkage - */ - if (phyp) { + /* If the PHY has a pointer to this target, clear it */ + if (phyp && (phyp->target == target)) { phyp->target = NULL; } target->phy = NULL; @@ -1427,7 +1425,8 @@ (void *)tgt, tgt->target_num); pwp->targets[tgt->target_num] = NULL; tgt->target_num = PMCS_INVALID_TARGET_NUM; - if (phyp) { + /* If the PHY has a pointer to this target, clear it */ + if (phyp && (phyp->target == tgt)) { phyp->target = NULL; } tgt->phy = NULL; @@ -3195,6 +3194,14 @@ } } + /* + * Set this target pointer back up, since it's been + * through pmcs_clear_xp(). + */ + tgt->dev_gone = 0; + tgt->assigned = 1; + tgt->dtype = phyp->dtype; + tgt->dev_state = PMCS_DEVICE_STATE_OPERATIONAL; tgt->phy = phyp; phyp->target = tgt;
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c Wed Jul 28 11:20:25 2010 -0700 +++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c Wed Jul 28 12:51:51 2010 -0600 @@ -6820,14 +6820,6 @@ pmcs_prt(pwp, PMCS_PRT_DEBUG, NULL, xp, "%s: Device 0x%p is gone.", __func__, (void *)xp); - /* - * Clear the dip now. This keeps pmcs_remove_device from attempting - * to call us on the same device while we're still flushing queues. - * The only side effect is we can no longer update SM-HBA properties, - * but this device is going away anyway, so no matter. - */ - xp->dip = NULL; - xp->smpd = NULL; xp->special_running = 0; xp->recovering = 0; xp->recover_wait = 0;