Re: [PATCH 3/3] Fix device detection issues with mvsas driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 18, 2012 at 11:35 AM, Praveen Murali <pmurali@xxxxxxxxxxxx> wrote:
>  I am using the Marvell SAS HBA (MV64460/64461/64462 System Controller,
> Revision B (rev 01)), on a system running Ubuntu 12.04 stock kernel. And
> i am seeing some drive detection issues with SATA drives, mostly during
> hotplugging the drives; the issue gets exaggerated when we keep removing
> and plugging in drives.
>
> From dmesg, after starting the LibATA debugs, it looks like the
> ata_eh_revalidate_and_attach fails because ata_dev_read_id fails to get
> the IDENTIFY command response. I see "both IDENTIFYs aborted, assuming
> NODEV" for all these drives that go undetected. At this point, if I
> unload and reload the mvsas driver, these drives detect fine. So, I
> hooked up a SATA analyzer between the HBA and one of the drives, and
> restarted the test. From what I can see, even though the drive responds
> to the IDENTIFY command, the upper layer detects an error and discards
> the response. On further debugging it was evident that the error was
> being detected in the FIS.
>
>  After going thru the mvsas driver, I see that the driver allocates a
> DMA area for an FIS pool (for as many as 33 FIS's) and initializes it to
> 0. And each ATA command is allocated a FIS area from this pool during
> the command prep; but its never cleared.
>
> This change initializes the FIS area before using it and it fixes the
> drive detection issue. I have tested it with kernel 3.2.0.
>
> ---
>  drivers/scsi/mvsas/mv_sas.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
> index a4884a5..31bfd4e 100644
> --- a/drivers/scsi/mvsas/mv_sas.c
> +++ b/drivers/scsi/mvsas/mv_sas.c
> @@ -21,6 +21,16 @@
>  * along with this program; if not, write to the Free Software
>  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
>  * USA
> + *
> + * Changelog:
> + *     Praveen Murali <pmurali@xxxxxxxxxxxx>   May 15, 2012
> + *             Cleanup and prepare the FIS index before issuing the
> + *             ATA command (during prep: mvs_task_prep_ata). This is
> + *             to overcome the drive detection issue where the SATA drives
> + *             fail to get detected during hotplug since the ATA module
> + *             (libATA) detects errors set in the FIS eventhough the SATA
> + *             analyzer shows that the IDENTIFY command was successfull.
> + *
>  */

Hi,

The changelog will exist in the git history, no need to also append it
to the file.  I think this should also be tagged for the -stable tree.

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux