mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomas Henzl <thenzl@redhat.com>
To: Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	linux-scsi@vger.kernel.org, hch@infradead.org
Cc: martin.petersen@oracle.com, Sathya.Prakash@broadcom.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/10] mpt3sas: Fix possibility of using invalid Enclosure Handles for SAS device after host reset
Date: Wed, 11 Oct 2017 18:07:02 +0200	[thread overview]
Message-ID: <d5327db8-527b-5174-c2e4-6a7c269d0d14@redhat.com> (raw)
In-Reply-To: <1507641083-20207-9-git-send-email-Sreekanth.Reddy@broadcom.com>

On 10/10/2017 03:11 PM, Sreekanth Reddy wrote:
> Enclosure handles are not updated after host reset.
> As a result, driver device structure is holding previously
>  assigned enclosure handle which is different from the
>  enclosure handle populated in the corresponding device page.
>
> Modified the driver to update devices enclosure handles after
>  host reset to current value, by referring the enclosure handles
>  from corresponding device pages
>
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 117 ++++++++++++++++++++++++-----------
>  1 file changed, 81 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index 17b934b..b819914 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -5383,6 +5383,52 @@ _scsih_check_access_status(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
>  }
>  
>  /**
> + * _scsih_get_enclosure_logicalid_chassis_slot - get device's
> + *			EnclosureLogicalID and ChassisSlot information.
> + * @ioc: per adapter object
> + * @sas_device_pg0: SAS device page0
> + * @sas_device: per sas device object
> + *
> + * Returns nothing.
> + */
> +static void
> +_scsih_get_enclosure_logicalid_chassis_slot(struct MPT3SAS_ADAPTER *ioc,
> +	Mpi2SasDevicePage0_t *sas_device_pg0, struct _sas_device *sas_device)
> +{
> +	Mpi2ConfigReply_t mpi_reply;
> +	Mpi2SasEnclosurePage0_t enclosure_pg0;
> +
> +	if (!sas_device_pg0 || !sas_device)
> +		return;

This test^ implies that  sas_device_pg0 or  sas_device can be null,
is that true?

Signed-off-by: Tomas Henzl <thenzl@redhat.com>

  reply	other threads:[~2017-10-11 16:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 13:11 [PATCH 00/10] [SCSI] mpt3sas: Phase15 driver enhancements and fixes Sreekanth Reddy
2017-10-10 13:11 ` [PATCH 01/10] mpt3sas: Processing of Cable Exception events Sreekanth Reddy
2017-10-11 15:17   ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 02/10] mpt3sas: Fixed memory leaks in driver Sreekanth Reddy
2017-10-11 15:30   ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 03/10] mpt3sas: Reduce memory footprints in kdump kernel Sreekanth Reddy
2017-10-11 15:33   ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 04/10] mpt3sas: Fix removal and addition of vSES device during host reset Sreekanth Reddy
2017-10-11 15:35   ` Tomas Henzl
2017-10-11 15:56     ` James Bottomley
2017-10-11 16:12       ` Tomas Henzl
2017-10-11 17:19         ` James Bottomley
2017-10-11 17:27         ` Martin K. Petersen
2017-10-10 13:11 ` [PATCH 05/10] mpt3sas: Fix IO error occurs on pulling out a drive from RAID1 volume created on two SATA drive Sreekanth Reddy
2017-10-11 15:37   ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 06/10] mpt3sas: Updated MPI headers to v2.00.48 Sreekanth Reddy
2017-10-11 15:42   ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 07/10] mpt3sas: Display chassis slot information of the drive Sreekanth Reddy
2017-10-11 16:00   ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 08/10] mpt3sas: Fix possibility of using invalid Enclosure Handles for SAS device after host reset Sreekanth Reddy
2017-10-11 16:07   ` Tomas Henzl [this message]
2017-10-11 16:09   ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 09/10] mpt3sas: Adding support for SAS3616 HBA device Sreekanth Reddy
2017-10-11 16:12   ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 10/10] mpt3sas: Bump mpt3sas driver version to v16.100.00.00 Sreekanth Reddy
2017-10-11 16:13   ` Tomas Henzl
2017-10-11 18:11 ` [PATCH 00/10] [SCSI] mpt3sas: Phase15 driver enhancements and fixes Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5327db8-527b-5174-c2e4-6a7c269d0d14@redhat.com \
    --to=thenzl@redhat.com \
    --cc=Sathya.Prakash@broadcom.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sreekanth.reddy@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®