Linux ATA/IDE development
 help / color / mirror / Atom feed
* Is FBS (FIS) working on Silicon Image 3726 port multiplier?
@ 2012-10-17  5:25 Norman Diamond
  0 siblings, 0 replies; 4+ messages in thread
From: Norman Diamond @ 2012-10-17  5:25 UTC (permalink / raw)
  To: linux-ide

I'm trying to use an SIL3726 with 5 SATA drives and an SIL3132.
FBS should work, right?  But performance looks like CBS.
Is there some way to check if FBS is actually enabled?
I'm trying to read some source code to figure it out.
The kernel is a little bit old by now but apparently not too old.

In file libata-pmp.c, the following is logged:
	if (print_info) {
		ata_dev_printk(dev, KERN_INFO, "Port Multiplier %s, "
			       "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n",
			       sata_pmp_spec_rev_str(gscr), vendor, devid,
			       sata_pmp_gscr_rev(gscr),
			       nr_ports, gscr[SATA_PMP_GSCR_FEAT_EN],
			       gscr[SATA_PMP_GSCR_FEAT]);
ata3.15: Port Multiplier 1.1, 0x1095:0x3726 r23, 6 ports, feat 0x1/0x9

Good, the following is not logged:
		if (!(dev->flags & ATA_DFLAG_AN))
			ata_dev_printk(dev, KERN_INFO,
				"Asynchronous notification not supported, "
				"hotplug won't\n         work on fan-out "
				"ports. Use warm-plug instead.\n");

We have quirks but these shouldn't prevent FBS:
	if (vendor == 0x1095 && devid == 0x3726) {
		/* sil3726 quirks */
		ata_for_each_link(link, ap, EDGE) {
			/* Class code report is unreliable and SRST
			 * times out under certain configurations.
			 */
			if (link->pmp < 5)
				link->flags |= ATA_LFLAG_NO_SRST |
					       ATA_LFLAG_ASSUME_ATA;

			/* port 5 is for SEMB device and it doesn't like SRST */
			if (link->pmp == 5)
				link->flags |= ATA_LFLAG_NO_SRST |
					       ATA_LFLAG_ASSUME_SEMB;
		}

In file libata-core.c we have another quirk that shouldn't prevent FBS:
	/* Odd clown on sil3726/4726 PMPs */
	{ "Config  Disk",	NULL,		ATA_HORKAGE_DISABLE },

In file libahci.c something doesn't happen that maybe should happen.
static void ahci_enable_fbs(struct ata_port *ap)
{
	struct ahci_port_priv *pp = ap->private_data;
	void __iomem *port_mmio = ahci_port_base(ap);
	u32 fbs;
	int rc;

	if (!pp->fbs_supported)
		return;

	fbs = readl(port_mmio + PORT_FBS);
	if (fbs & PORT_FBS_EN) {
		pp->fbs_enabled = true;
		pp->fbs_last_dev = -1; /* initialization */
		return;
	}

	rc = ahci_stop_engine(ap);
	if (rc)
		return;

	writel(fbs | PORT_FBS_EN, port_mmio + PORT_FBS);
	fbs = readl(port_mmio + PORT_FBS);
	if (fbs & PORT_FBS_EN) {
		dev_printk(KERN_INFO, ap->host->dev, "FBS is enabled.\n");
		pp->fbs_enabled = true;
		pp->fbs_last_dev = -1; /* initialization */
	} else
		dev_printk(KERN_ERR, ap->host->dev, "Failed to enable FBS\n");

	ahci_start_engine(ap);
}

We do not get a log of "FBS is enabled.".
We do not get a log of "Failed to enable FBS".
So is this function returning early for some reason?
Or is this function not called for some reason?

Should FBS be working?

Also it was pleasant to see this function:
void ahci_print_info(struct ata_host *host, const char *scc_s)
[...]
		cap & HOST_CAP_FBS ? "fbs " : "",
But is there a pseudofile in /proc or /sys to view the output?
My find-foo and Google-foo skill weren't good enough for this.
/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/host4
contains stuff about the drives but not about the port multiplier.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is FBS (FIS) working on Silicon Image 3726 port multiplier?
@ 2012-11-24  1:01 Norman Diamond
  2012-11-28  1:06 ` Robert Hancock
  0 siblings, 1 reply; 4+ messages in thread
From: Norman Diamond @ 2012-11-24  1:01 UTC (permalink / raw)
  To: linux-ide

I wrot on October 17, 2012 2:25 PM

> I'm trying to use an SIL3726 with 5 SATA drives and an SIL3132.
> FBS should work, right?  But performance looks like CBS.
> Is there some way to check if FBS is actually enabled?

I added some ata_dev_printk calls in file libahci.c,
static void ahci_enable_fbs(struct ata_port *ap)
and a few other places, but none of them were logged.
In file libata-pmp.c, the following continues to be logged:
if (print_info) {
ata_dev_printk(dev, KERN_INFO, "Port Multiplier %s, "
       "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n",
       sata_pmp_spec_rev_str(gscr), vendor, devid,
       sata_pmp_gscr_rev(gscr),
       nr_ports, gscr[SATA_PMP_GSCR_FEAT_EN],
       gscr[SATA_PMP_GSCR_FEAT]);
ata3.15: Port Multiplier 1.1, 0x1095:0x3726 r23, 6 ports, feat 0x1/0x9

Finally I figured out that the sil24 driver uses its own port multiplier 
code and never calls the libahci code.

So the reason why it performs like CBS instead of FBS is due to something in 
the sil24 driver, or the SIL3132 HBA firmware, or the SIL3726 port 
multiplier firmware.  I still can't figure out which.

I read that someone else got FBS working on a Marvell HBA with SIL3726 port 
multiplier, but my Marvell HBA errors out in trying to detect the SIL3726, 
maybe because SAS-to-eSATA cables seem to have numerous problems.  My 
Marvell HBA also errors out trying to detect a JMicron port multiplier, 
maybe because of the same cable or maybe because JMicron firmware is 
generally pretty miserable.

Does anyone have FBS (FIS) working with an SIL3726? 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is FBS (FIS) working on Silicon Image 3726 port multiplier?
  2012-11-24  1:01 Is FBS (FIS) working on Silicon Image 3726 port multiplier? Norman Diamond
@ 2012-11-28  1:06 ` Robert Hancock
  2012-11-28 22:41   ` Norman Diamond
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Hancock @ 2012-11-28  1:06 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-ide

On 11/23/2012 07:01 PM, Norman Diamond wrote:
> I wrot on October 17, 2012 2:25 PM
>
>> I'm trying to use an SIL3726 with 5 SATA drives and an SIL3132.
>> FBS should work, right?  But performance looks like CBS.
>> Is there some way to check if FBS is actually enabled?
>
> I added some ata_dev_printk calls in file libahci.c,
> static void ahci_enable_fbs(struct ata_port *ap)
> and a few other places, but none of them were logged.
> In file libata-pmp.c, the following continues to be logged:
> if (print_info) {
> ata_dev_printk(dev, KERN_INFO, "Port Multiplier %s, "
>        "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n",
>        sata_pmp_spec_rev_str(gscr), vendor, devid,
>        sata_pmp_gscr_rev(gscr),
>        nr_ports, gscr[SATA_PMP_GSCR_FEAT_EN],
>        gscr[SATA_PMP_GSCR_FEAT]);
> ata3.15: Port Multiplier 1.1, 0x1095:0x3726 r23, 6 ports, feat 0x1/0x9
>
> Finally I figured out that the sil24 driver uses its own port multiplier
> code and never calls the libahci code.
>
> So the reason why it performs like CBS instead of FBS is due to
> something in the sil24 driver, or the SIL3132 HBA firmware, or the
> SIL3726 port multiplier firmware.  I still can't figure out which.

sata_sil24 doesn't support FBS. The datasheet seems to have some mention 
of FBS support in the chip, but I don't know if that's actually the case.

>
> I read that someone else got FBS working on a Marvell HBA with SIL3726
> port multiplier, but my Marvell HBA errors out in trying to detect the
> SIL3726, maybe because SAS-to-eSATA cables seem to have numerous
> problems.  My Marvell HBA also errors out trying to detect a JMicron
> port multiplier, maybe because of the same cable or maybe because
> JMicron firmware is generally pretty miserable.
>
> Does anyone have FBS (FIS) working with an SIL3726?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ide" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is FBS (FIS) working on Silicon Image 3726 port multiplier?
  2012-11-28  1:06 ` Robert Hancock
@ 2012-11-28 22:41   ` Norman Diamond
  0 siblings, 0 replies; 4+ messages in thread
From: Norman Diamond @ 2012-11-28 22:41 UTC (permalink / raw)
  To: linux-ide; +Cc: Robert Hancock

On Wed, 2012/11/28, Robert Hancock wrote:
> On 11/23/2012 07:01 PM, Norman Diamond wrote:
>> I wrot on October 17, 2012 2:25 PM
>>
>>> I'm trying to use an SIL3726 with 5 SATA drives and an SIL3132.
>>> FBS should work, right?  But performance looks like CBS.
>>> Is there some way to check if FBS is actually enabled?
>>
>> I added some ata_dev_printk calls in file libahci.c,
>> static void ahci_enable_fbs(struct ata_port *ap)
>> and a few other places, but none of them were logged.
>> In file libata-pmp.c, the following continues to be logged:
>> if (print_info) {
>> ata_dev_printk(dev, KERN_INFO, "Port Multiplier %s, "
>>        "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n",
>>        sata_pmp_spec_rev_str(gscr), vendor, devid,
>>        sata_pmp_gscr_rev(gscr),
>>        nr_ports, gscr[SATA_PMP_GSCR_FEAT_EN],
>>        gscr[SATA_PMP_GSCR_FEAT]);
>> ata3.15: Port Multiplier 1.1, 0x1095:0x3726 r23, 6 ports, feat 0x1/0x9
>>
>> Finally I figured out that the sil24 driver uses its own port multiplier
>> code and never calls the libahci code.
>>
>> So the reason why it performs like CBS instead of FBS is due to
>> something in the sil24 driver, or the SIL3132 HBA firmware, or the
>> SIL3726 port multiplier firmware.  I still can't figure out which.
> 
> sata_sil24 doesn't support FBS. The datasheet seems to have some mention 
> of FBS support in the chip, but I don't know if that's actually the case.

OK.  Although we can't figure out the underlying reason, it is clear that the combination of SIL3132 (or SIL3124) HBA and Linux will not support FBS regardless of SIL3726's capability.  Everywhere I looked, there were statements that SIL3132, SIL3124, and SIL3726 support FBS, but if the vendor doesn't release details of the HBAs then obviously it's hard to get FBS working.  Sometimes it's amazing that Linux volunteers can make a chip work at all.

Thank you for the information.  At least now I know not to waste more days trying to figure out where to add more printk's and still not accomplishing anything.

After posting the question, I tried a Marvell SAS HBA but having trouble that might be due to a SAS-to-eSATA cable maybe being the wrong variety.  It sure is frustrating trying to find a way to get FBS to work.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-28 22:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-24  1:01 Is FBS (FIS) working on Silicon Image 3726 port multiplier? Norman Diamond
2012-11-28  1:06 ` Robert Hancock
2012-11-28 22:41   ` Norman Diamond
  -- strict thread matches above, loose matches on Subject: below --
2012-10-17  5:25 Norman Diamond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox