lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 26 Nov 2010 18:19:19 +0100
From:	Tejun Heo <tj@...nel.org>
To:	Tobias Karnat <tobias.karnat@...glemail.com>
CC:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: sata_sil24: external raid storage mistaken as port multiplier

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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ