From: Tejun Heo <tj@kernel.org>
To: Tobias Karnat <tobias.karnat@googlemail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: sata_sil24: external raid storage mistaken as port multiplier
Date: Fri, 26 Nov 2010 18:19:19 +0100 [thread overview]
Message-ID: <4CEFEC17.6060503@kernel.org> (raw)
In-Reply-To: <1290572588.24847.20.camel@Tobias-Karnat>
On 11/24/2010 05:23 AM, Tobias Karnat wrote:
> Hi,
>
> I got it fixed by removing ATA_FLAG_PMP from the SIL24_COMMON_FLAGS.
>
> Could someone turn this into a module option?
>
> The external raid case might in fact has a built-in port multiplier,
> but the case can only be configured as raid0 and raid1.
>
> I suspect that Linux tries to to access the drives separately, which fails.
Hmmm... well, libata is just sending SRST w/ the port number set to 15
and the device is reporting that it is a port multipler to that.
Depending on configuration these devices don't work too well when
commanded as a PMP device. If you put it into JBOD mode, it will
probably work fine. I have no idea why it still reports as a PMP
device when configured as a virtual device.
That said, yeah, it probably would be a good idea to add a
libata.force param.
Can you please apply the following patch and verify that the device
doesn't work without any parameter but it does with
"libata.force=nopmp"?
Thanks.
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 7f77c67..7423265 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6325,6 +6325,7 @@ static int __init ata_parse_force_one(char **cur,
{ "nohrst", .lflags = ATA_LFLAG_NO_HRST },
{ "nosrst", .lflags = ATA_LFLAG_NO_SRST },
{ "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST },
+ { "nopmp", .lflags = ATA_LFLAG_NO_PMP },
};
char *start = *cur, *p = *cur;
char *id, *val, *endp;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index d947b12..6102ba2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -174,6 +174,7 @@ enum {
ATA_LFLAG_DISABLED = (1 << 6), /* link is disabled */
ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */
ATA_LFLAG_NO_LPM = (1 << 8), /* disable LPM on this link */
+ ATA_LFLAG_NO_PMP = (1 << 9), /* disable PMP support */
/* struct ata_port flags */
ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
@@ -1210,7 +1211,8 @@ extern struct device_attribute *ata_common_sdev_attrs[];
#ifdef CONFIG_SATA_PMP
static inline bool sata_pmp_supported(struct ata_port *ap)
{
- return ap->flags & ATA_FLAG_PMP;
+ return (ap->flags & ATA_FLAG_PMP) &&
+ !(ap->link.flags & ATA_LFLAG_NO_PMP);
}
static inline bool sata_pmp_attached(struct ata_port *ap)
next prev parent reply other threads:[~2010-11-26 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 21:24 sata_sil24: external raid storage mistaken as port multiplier Tobias Karnat
2010-11-23 12:08 ` Tobias Karnat
2010-11-24 4:23 ` Tobias Karnat
2010-11-26 17:19 ` Tejun Heo [this message]
2010-11-26 20:13 ` Mark Lord
2010-11-26 20:16 ` Tejun Heo
2010-11-27 2:57 ` Mark Lord
2010-11-28 10:51 ` Tobias Karnat
2010-12-03 12:45 ` Tobias Karnat
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=4CEFEC17.6060503@kernel.org \
--to=tj@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tobias.karnat@googlemail.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).