Mercurial > illumos > illumos-gate
changeset 8482:4148db9b5caf
6786949 mpathadm does not work on VMWare
6786708 system panics in scsi_device_hba_private_get+0xc(0)
author | Chris Liu <Chris.Liu@Sun.COM> |
---|---|
date | Tue, 06 Jan 2009 17:39:27 +0800 |
parents | f9a2c94c147f |
children | 9f75fcc64d65 |
files | usr/src/uts/common/io/scsi/adapters/scsi_vhci/mpapi_impl.c |
diffstat | 1 files changed, 17 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/adapters/scsi_vhci/mpapi_impl.c Mon Jan 05 23:05:47 2009 -0800 +++ b/usr/src/uts/common/io/scsi/adapters/scsi_vhci/mpapi_impl.c Tue Jan 06 17:39:27 2009 +0800 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -3298,8 +3298,8 @@ void vhci_mpapi_update_tpg_data(struct scsi_address *ap, char *ptr) { - struct scsi_vhci_lun *vlun = ADDR2VLUN(ap); - struct scsi_vhci *vhci = ADDR2VHCI(ap); + struct scsi_vhci_lun *vlun; + struct scsi_vhci *vhci; struct scsi_device *psd; scsi_vhci_priv_t *svp; mdi_pathinfo_t *pip; @@ -3341,8 +3341,9 @@ } /* - * Get the vlun through the following process; - * ADDR2VLUN(ap) doesn't give the scsi_vhci lun + * The scsi_address passed is associated with a scsi_vhci allocated + * scsi_device structure for a pathinfo node. Getting the vlun from + * this is a bit complicated. */ if (ap->a_hba_tran->tran_hba_flags & SCSI_HBA_ADDR_COMPLEX) psd = scsi_address_device(ap); @@ -3362,8 +3363,10 @@ VHCI_DEBUG(4, (CE_NOTE, NULL, "vhci_mpapi_update_tpg_data: vhci=%p, " "(vlun)wwn=(%p)%s, pip=%p, ap=%p, ptr=%p, as=%x, tpg_id=%s, fops=" - "%p\n", (void *)vhci, (void *)vlun, vlun->svl_lun_wwn, (void *)pip, - (void *)ap, (void *)ptr, as, tpg_id, (void *)vlun->svl_fops)); + "%p\n", (void *)vhci, (void *)vlun, + vlun ? vlun->svl_lun_wwn : "NONE", + (void *)pip, (void *)ap, (void *)ptr, as, tpg_id, + (void *)(vlun ? vlun->svl_fops : NULL))); if ((vhci == NULL) || (vlun == NULL) || (pip == NULL) || !SCSI_FAILOVER_IS_TPGS(vlun->svl_fops)) { @@ -3758,16 +3761,13 @@ ilist = vhci->mp_priv->obj_hdr_list[MP_OBJECT_TYPE_MULTIPATH_LU]->head; while (ilist != NULL) { - if (MP_GET_MAJOR_FROM_ID((uint64_t) - (ilist->item->oid.raw_oid)) != 0) { - lud = ilist->item->idata; - if (lud->valid == 1) { - svl = lud->resp; - ilist->item->oid.raw_oid = - (uint64_t)ddi_get_instance(svl->svl_dip); - lud->prop.id = - (uint64_t)ddi_get_instance(svl->svl_dip); - } + lud = ilist->item->idata; + if (lud->valid == 1) { + svl = lud->resp; + ilist->item->oid.raw_oid = + (uint64_t)ddi_get_instance(svl->svl_dip); + lud->prop.id = + (uint64_t)ddi_get_instance(svl->svl_dip); } ilist = ilist->next; }