From: Praveen Murali <pmurali@logicube.com>
To: yuxiangl@marvell.com
Cc: Dan Williams <dan.j.williams@intel.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH 3/3] Fix device detection issues with mvsas driver
Date: Wed, 16 Oct 2013 15:17:23 -0700 [thread overview]
Message-ID: <525F1073.2080506@logicube.com> (raw)
In-Reply-To: <1381959958.1864.26.camel@dabdike>
[-- Attachment #1: Type: text/plain, Size: 363 bytes --]
Hi Xiang, Can you please take a look at the attached patch and ack it?
Thanks,
Praveen
On 10/16/2013 02:45 PM, James Bottomley wrote:
> On Tue, 2013-10-15 at 19:40 -0700, Praveen Murali wrote:
>> Yes, I checked that today and was meaning to ask you about it. :)
> Ideally, I need someone from Marvell to ack it ... can you prod them?
>
> Thanks,
>
> James
>
>
[-- Attachment #2: Fix-mvsas-disk-detection-issues.patch --]
[-- Type: text/x-diff, Size: 2183 bytes --]
>From 6ad9cf691f9d11e8c6de332efc35bd945c0f2840 Mon Sep 17 00:00:00 2001
From: Praveen Murali <pmurali@logicube.com>
Date: Thu, 21 Jun 2012 09:57:03 -0700
Subject: [PATCH v2] Fix mvsas SATA disk detection issues
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 during init 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.
The fix is to cleanup and prepare the FIS index before issuing the ATA
command (during prep: mvs_task_prep_ata).
---
drivers/scsi/mvsas/mv_sas.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index a4884a5..73d9816 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -458,6 +458,11 @@ static int mvs_task_prep_ata(struct mvs_info *mvi,
mvi_dev->device_id);
return -EBUSY;
}
+
+ /* cleanup and prepare the allocated FIS index */
+ memset( SATA_RECEIVED_D2H_FIS(mvi_dev->taskfileset), 0,
+ sizeof(struct dev_to_host_fis) );
+
slot = &mvi->slot_info[tag];
slot->tx = mvi->tx_prod;
del_q = TXQ_MODE_I | tag |
--
1.7.10
next prev parent reply other threads:[~2013-10-16 22:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 18:35 [PATCH 3/3] Fix device detection issues with mvsas driver Praveen Murali
2012-06-21 16:05 ` Dan Williams
2012-06-21 16:41 ` Praveen Murali
2012-06-21 16:48 ` Dan Williams
2012-06-21 17:05 ` Praveen Murali
2013-10-16 1:33 ` Dan Williams
2013-10-16 2:40 ` Praveen Murali
2013-10-16 21:45 ` James Bottomley
2013-10-16 22:17 ` Praveen Murali [this message]
[not found] <F766E4F80769BD478052FB6533FA745D4CEB81B63E@SC-VEXCH4.marvell.com>
[not found] ` <CAP0P+NXi=owEOnpTAnKxwrHfX-nu+bQF6MeNs3sMZnQLqB1jsw@mail.gmail.com>
2013-10-17 2:57 ` Praveen Murali
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=525F1073.2080506@logicube.com \
--to=pmurali@logicube.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dan.j.williams@intel.com \
--cc=linux-scsi@vger.kernel.org \
--cc=yuxiangl@marvell.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;
as well as URLs for NNTP newsgroup(s).