Re: [PATCHSET 4/4] implement PMP support, take 4

2007-07-12 Thread Jeff Garzik

Tejun Heo wrote:

Hello, all.

his is the fourth take of libata-pmp patchset.  This patchset contains
15 patches and implements PMP support.

#01-04: implement libata PMP support
#05-09: implement sata_sil24 PMP support
#10-15: implement ahci PMP support

Changes from the last take[L] are.

* updated to fit new #upstream
* ACPI support for PMP fan-out ports added
* improved general PMP EH behavior
* various PMP chip specific quirks for smooth handling of first gen
  products which at times are pretty quirky
* AHCI PMP support added

Tested extensively with sil3214/32, ICH9R, JMB360/3 combined with
sil3726, 4726 and 5744 port multipliers.  Disks from all major vendors
and an SATAPI device is used as downstream devices.  sil5744 and 3726
behave very nicely on all controllers.  Hotplugging and suspend/resume
work well too.  There are some remaining issues.

* When attached to AHCI controller (ICH9R, JMB360/3), NCQ doesn't
  work.  Things look okay as long as only one command is in flight but
  as soon as the second command is issued (to the same device), hell
  breaks loose and all sorts of errors occur including device abort,
  bad PMP number and interface fatal error.  This behavior is common
  across all PMP chips.  I've disabled NCQ if PMP is attached to an
  ahci controller for now.

* Sil4726 is a bit too quirky.  Without the first fan-out port
  occupied, the thing acts really weirdly.  As long as the first port
  is occupied, it works okay.  This is reportedly fixed by new
  firmware.  I tried to update the firmware but installing 3124 driver
  on Windows was just too difficult for me and I gave up after thirty
  painful minutes.  Anyone up for testing?

* Again, Sil4726 doesn't like ahci driver initialization sequence.
  During driver initialization, the whole controller is reset and the
  PHY seems to go offline and back online.  Sil4726 doesn't like it
  and goes out for lunch for several secs after that which makes
  initial probing think that the port is empty.  After probing is
  complete, Sil4726 comes back and gets detected but at that point
  detection is asynchronous and if boot device is on one of fan-out
  ports, it can be a problem.  Again, this might have been fixed by
  new firmware.  Anyone up for testing?

* The long boot delay on ASUS boards with on-board PMP chips should be
  fixed by this patchset but I don't have such a board or Sil4723
  which is used on those baords, so I'm not sure.  Anyone up for
  testing?

This patchset is against

  libata-dev#upstream (4e1ae96828f6cee7b89ab8ca474c150fe211afd8)
  + [1] misc-updates patchset
  + [2] libata-link patchset, take 4
  + [3] libata-pmp-prep patchset, take 4


patchset overall seems OK to me


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHSET 4/4] implement PMP support, take 4

2007-07-03 Thread Jim Paris
Tejun Heo wrote:
> Jim Paris wrote:
> > Tejun Heo wrote:
> > > * Sil4726 is a bit too quirky.  Without the first fan-out port
> > >   occupied, the thing acts really weirdly.  As long as the first port
> > >   is occupied, it works okay.
> > 
> > I'll test the 4726 behavior with pulling disks etc including the first
> > port.  I'll also search to see if I can find a Windows machine to
> > update the firmware and let you know how things change.

Hi Tejun,

I tested some hotplug and didn't any problems at all.  I did:

Unplugged ata1.02
Plugged ata1.02
Unplugged ata1.00
Unplugged ata1.03
Plugged ata1.03
Turned off enclosure entirely
Turned on enclosure
Plugged ata1.00

In all cases, all attached disks were correctly recognized.  The log
is appended below.  I didn't bother trying to update the firmware
since it seems to be working just fine.


> If the Config Disk device can't stand IDENTIFY.  I suppose we're better
> off disabling last two ports on r0.  I'll ask SIMG about it and add
> quirks for r0.

OK, I'll gladly test anything you come up with.

Thanks,
-jim


[   53.323077] ata1.15: Port Multiplier 1.1, 0x1095:0x4726 r0, 6 ports, feat 
0x9/0xb

Unplugged ata1.02:

[  685.221846] ata1.02: hard resetting link
[  686.201127] ata1.02: SATA link down (SStatus 0 SControl 300)
[  686.217114] ata1: failed to recover some devices, retrying in 5 secs
[  691.233422] ata1.02: hard resetting link
[  691.797006] ata1.02: SATA link down (SStatus 0 SControl 300)
[  691.828983] ata1.02: limiting SATA link speed to 1.5 Gbps
[  691.829034] ata1.02: limiting speed to UDMA/100:PIO3
[  691.829086] ata1: failed to recover some devices, retrying in 5 secs
[  696.849287] ata1.02: hard resetting link
[  697.480821] ata1.02: SATA link down (SStatus 0 SControl 310)
[  697.496808] ata1.02: disabled
[  698.032416] ata1.02: hard resetting link
[  698.663364] ata1.02: SATA link down (SStatus 0 SControl 300)
[  698.679354] ata1: EH complete
[  698.679979] ata1.02: detaching (SCSI 0:0:2:0)
[  698.680241] sd 0:0:2:0: [sdc] Synchronizing SCSI cache
[  698.680422] sd 0:0:2:0: [sdc] Result: hostbyte=DID_BAD_TARGET 
driverbyte=DRIVER_OK,SUGGEST_OK
[  698.680511] sd 0:0:2:0: [sdc] Stopping disk
[  698.680559] sd 0:0:2:0: [sdc] START_STOP FAILED
[  698.680604] sd 0:0:2:0: [sdc] Result: hostbyte=DID_BAD_TARGET 
driverbyte=DRIVER_OK,SUGGEST_OK

Plugged ata1.02:

[  711.466523] ata1.02: hard resetting link
[  720.807647] ata1.02: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[  720.852090] ata1.02: ATA-7: ST3300822AS, 3.AAD, max UDMA/133
[  720.852142] ata1.02: 586072368 sectors, multi 0: LBA48 NCQ (depth 31/32)
[  720.924577] ata1.02: configured for UDMA/100
[  720.939552] ata1: EH complete
[  720.939878] scsi 0:0:2:0: Direct-Access ATA  ST3300822AS  3.AA 
PQ: 0 ANSI: 5
[  720.940104] sd 0:0:2:0: [sdc] 586072368 512-byte hardware sectors (300069 MB)
[  720.940161] sd 0:0:2:0: [sdc] Write Protect is off
[  720.940220] sd 0:0:2:0: [sdc] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[  720.940328] sd 0:0:2:0: [sdc] 586072368 512-byte hardware sectors (300069 MB)
[  720.940382] sd 0:0:2:0: [sdc] Write Protect is off
[  720.940439] sd 0:0:2:0: [sdc] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[  720.940501]  sdc: sdc1
[  720.966807] sd 0:0:2:0: [sdc] Attached SCSI disk

Unplugged ata1.00:

[  767.021622] ata1.00: hard resetting link
[  768.000899] ata1.00: SATA link down (SStatus 0 SControl 300)
[  768.016887] ata1: failed to recover some devices, retrying in 5 secs
[  773.017199] ata1.00: hard resetting link
[  773.580790] ata1.00: SATA link down (SStatus 0 SControl 300)
[  773.612765] ata1.00: limiting SATA link speed to 1.5 Gbps
[  773.612814] ata1.00: limiting speed to UDMA/100:PIO3
[  773.612865] ata1: failed to recover some devices, retrying in 5 secs
[  778.613078] ata1.00: hard resetting link
[  779.240623] ata1.00: SATA link down (SStatus 0 SControl 310)
[  779.256610] ata1.00: disabled
[  779.776220] ata1.00: hard resetting link
[  780.403767] ata1.00: SATA link down (SStatus 0 SControl 300)
[  780.419757] ata1: EH complete
[  780.419813] ata1.00: detaching (SCSI 0:0:0:0)
[  780.420006] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  780.423967] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET 
driverbyte=DRIVER_OK,SUGGEST_OK
[  780.424066] sd 0:0:0:0: [sda] Stopping disk
[  780.424121] sd 0:0:0:0: [sda] START_STOP FAILED
[  780.424169] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET 
driverbyte=DRIVER_OK,SUGGEST_OK

Unplugged ata1.03:

[  785.512005] ata1.03: hard resetting link
[  786.491286] ata1.03: SATA link down (SStatus 0 SControl 300)
[  786.507272] ata1: failed to recover some devices, retrying in 5 secs
[  791.523581] ata1.03: hard resetting link
[  792.087166] ata1.03: SATA link down (SStatus 0 SControl 300)
[  792.119140] ata1.03: limiting SATA link speed to 1.5 Gbps
[  792.119189] ata1.03: limiting speed to UDMA/100:PIO3
[  792.119239] ata1: failed to recover s

Re: [PATCHSET 4/4] implement PMP support, take 4

2007-07-03 Thread Tejun Heo
Hey,

Jim Paris wrote:
> There are errors with ata1.05 and ata2.05.  I guess those are the
> SiI4726 management ports that were just ignored in the last take of
> PMP.  The EH on those causes a boot delay, but it's pretty short.

Argh... It isn't supposed to fail.  libata-pmp contains workarounds for
those ports now.

>> * Sil4726 is a bit too quirky.  Without the first fan-out port
>>   occupied, the thing acts really weirdly.  As long as the first port
>>   is occupied, it works okay.  This is reportedly fixed by new
>>   firmware.  I tried to update the firmware but installing 3124 driver
>>   on Windows was just too difficult for me and I gave up after thirty
>>   painful minutes.  Anyone up for testing?
> 
> I'll test the 4726 behavior with pulling disks etc including the first
> port.  I'll also search to see if I can find a Windows machine to
> update the firmware and let you know how things change.
> 
> There's a 4726 firmware update utility for Linux available:
>   http://www.siliconimage.com/support/downloadresults.aspx?pid=74
> It's closed source, but I wonder how it is supposed to work.  It seems
> to just probe /dev/sd* and read the first sector.  Maybe it wants that
> management port to be exposed as a SCSI device?

That only works with their proprietary driver ATM.  I'm talking with
SIMG to make it work with the upstream driver.

> [   53.331253] ata1.15: Port Multiplier 1.1, 0x1095:0x4726 r0, 6 ports, feat 
> 0x9/0xb

Oh well, this is the first time I see r0.

> [   63.749131] ata1.05: failed to IDENTIFY (I/O error, err_mask=0x1)
> [   63.764490] ata1.05: limiting SATA link speed to 1.5 Gbps
> [   63.764537] ata1.05: limiting speed to UDMA7:PIO5
> [   63.764582] ata1: failed to recover some devices, retrying in 5 secs

If the Config Disk device can't stand IDENTIFY.  I suppose we're better
off disabling last two ports on r0.  I'll ask SIMG about it and add
quirks for r0.

Thanks for testing.

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHSET 4/4] implement PMP support, take 4

2007-07-03 Thread Jim Paris
Tejun Heo wrote:
> Hello, all.
> 
> his is the fourth take of libata-pmp patchset.  This patchset contains
> 15 patches and implements PMP support.

Hi Tejun,

Thanks once again.  2.6.22-rc6 + libata-tj-2.6.22-rc6-20070702 seems
to be working fine on my system (SiI3124 PCI-X + two SiI4726, plus
other non-PMP stuff).  The libata portions of the boot logs are
attached below.

There are errors with ata1.05 and ata2.05.  I guess those are the
SiI4726 management ports that were just ignored in the last take of
PMP.  The EH on those causes a boot delay, but it's pretty short.

> * Sil4726 is a bit too quirky.  Without the first fan-out port
>   occupied, the thing acts really weirdly.  As long as the first port
>   is occupied, it works okay.  This is reportedly fixed by new
>   firmware.  I tried to update the firmware but installing 3124 driver
>   on Windows was just too difficult for me and I gave up after thirty
>   painful minutes.  Anyone up for testing?

I'll test the 4726 behavior with pulling disks etc including the first
port.  I'll also search to see if I can find a Windows machine to
update the firmware and let you know how things change.

There's a 4726 firmware update utility for Linux available:
  http://www.siliconimage.com/support/downloadresults.aspx?pid=74
It's closed source, but I wonder how it is supposed to work.  It seems
to just probe /dev/sd* and read the first sector.  Maybe it wants that
management port to be exposed as a SCSI device?

-jim

[   50.891895] libata version 3.00 loaded.
[   50.984511] sata_sil24 :01:00.0: version 1.0
[   50.985526] scsi0 : sata_sil24
[   50.985631] scsi1 : sata_sil24
[   50.985722] ata1: SATA max UDMA/100 cmd 0xc2328000 ctl 
0x bmdma 0x irq 0
[   50.985786] ata2: SATA max UDMA/100 cmd 0xc232a000 ctl 
0x bmdma 0x irq 0
[   53.187373] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 0)
[   53.331253] ata1.15: Port Multiplier 1.1, 0x1095:0x4726 r0, 6 ports, feat 
0x9/0xb
[   53.443184] ata1.00: hard resetting link
[   54.006777] ata1.00: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   54.022765] ata1.01: hard resetting link
[   54.666304] ata1.01: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   54.682292] ata1.02: hard resetting link
[   55.293855] ata1.02: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   55.309843] ata1.03: hard resetting link
[   55.937393] ata1.03: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   55.953381] ata1.04: hard resetting link
[   56.580932] ata1.04: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   56.580980] ata1.05: hard resetting link
[   57.144528] ata1.05: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[   57.180320] ata1.00: ATA-7: ST3300822AS, 3.AAD, max UDMA/133
[   57.180371] ata1.00: 586072368 sectors, multi 16: LBA48 NCQ (depth 31/32)
[   57.238586] ata1.00: configured for UDMA/100
[   57.323623] ata1.01: ATA-7: ST3300822AS, 3.AAD, max UDMA/133
[   57.323670] ata1.01: 586072368 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   57.381887] ata1.01: configured for UDMA/100
[   57.411186] ata1.02: ATA-7: ST3300822AS, 3.AAD, max UDMA/133
[   57.411232] ata1.02: 586072368 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   57.469450] ata1.02: configured for UDMA/100
[   57.499841] ata1.03: ATA-7: ST3300822AS, 3.AAD, max UDMA/133
[   57.499888] ata1.03: 586072368 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   57.558108] ata1.03: configured for UDMA/100
[   57.589327] ata1.04: ATA-7: ST3300822AS, 3.AAD, max UDMA/133
[   57.589374] ata1.04: 586072368 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   57.647596] ata1.04: configured for UDMA/100
[   57.647758] ata1.05: failed to IDENTIFY (I/O error, err_mask=0x1)
[   57.647805] ata1: failed to recover some devices, retrying in 5 secs
[   62.649282] ata1.05: hard resetting link
[   63.212886] ata1.05: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[   63.314995] ata1.00: configured for UDMA/100
[   63.433306] ata1.01: configured for UDMA/100
[   63.537472] ata1.02: configured for UDMA/100
[   63.642810] ata1.03: configured for UDMA/100
[   63.748971] ata1.04: configured for UDMA/100
[   63.749131] ata1.05: failed to IDENTIFY (I/O error, err_mask=0x1)
[   63.764490] ata1.05: limiting SATA link speed to 1.5 Gbps
[   63.764537] ata1.05: limiting speed to UDMA7:PIO5
[   63.764582] ata1: failed to recover some devices, retrying in 5 secs
[   68.764898] ata1.05: hard resetting link
[   69.392458] ata1.05: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[   69.392621] ata1.05: failed to IDENTIFY (I/O error, err_mask=0x1)
[   69.392668] ata1: failed to recover some devices, retrying in 5 secs
[   74.392865] ata1.05: hard resetting link
[   74.956471] ata1.05: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[   74.972460] ata1: EH pending after completion, repeating EH (cnt=4)
[   75.100368] ata1: EH complete
[   77.298095] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 0)
[   77.441977] at

[PATCHSET 4/4] implement PMP support, take 4

2007-07-01 Thread Tejun Heo
Hello, all.

his is the fourth take of libata-pmp patchset.  This patchset contains
15 patches and implements PMP support.

#01-04: implement libata PMP support
#05-09: implement sata_sil24 PMP support
#10-15: implement ahci PMP support

Changes from the last take[L] are.

* updated to fit new #upstream
* ACPI support for PMP fan-out ports added
* improved general PMP EH behavior
* various PMP chip specific quirks for smooth handling of first gen
  products which at times are pretty quirky
* AHCI PMP support added

Tested extensively with sil3214/32, ICH9R, JMB360/3 combined with
sil3726, 4726 and 5744 port multipliers.  Disks from all major vendors
and an SATAPI device is used as downstream devices.  sil5744 and 3726
behave very nicely on all controllers.  Hotplugging and suspend/resume
work well too.  There are some remaining issues.

* When attached to AHCI controller (ICH9R, JMB360/3), NCQ doesn't
  work.  Things look okay as long as only one command is in flight but
  as soon as the second command is issued (to the same device), hell
  breaks loose and all sorts of errors occur including device abort,
  bad PMP number and interface fatal error.  This behavior is common
  across all PMP chips.  I've disabled NCQ if PMP is attached to an
  ahci controller for now.

* Sil4726 is a bit too quirky.  Without the first fan-out port
  occupied, the thing acts really weirdly.  As long as the first port
  is occupied, it works okay.  This is reportedly fixed by new
  firmware.  I tried to update the firmware but installing 3124 driver
  on Windows was just too difficult for me and I gave up after thirty
  painful minutes.  Anyone up for testing?

* Again, Sil4726 doesn't like ahci driver initialization sequence.
  During driver initialization, the whole controller is reset and the
  PHY seems to go offline and back online.  Sil4726 doesn't like it
  and goes out for lunch for several secs after that which makes
  initial probing think that the port is empty.  After probing is
  complete, Sil4726 comes back and gets detected but at that point
  detection is asynchronous and if boot device is on one of fan-out
  ports, it can be a problem.  Again, this might have been fixed by
  new firmware.  Anyone up for testing?

* The long boot delay on ASUS boards with on-board PMP chips should be
  fixed by this patchset but I don't have such a board or Sil4723
  which is used on those baords, so I'm not sure.  Anyone up for
  testing?

This patchset is against

  libata-dev#upstream (4e1ae96828f6cee7b89ab8ca474c150fe211afd8)
  + [1] misc-updates patchset
  + [2] libata-link patchset, take 4
  + [3] libata-pmp-prep patchset, take 4

Thanks.

--
tejun

[L] http://thread.gmane.org/gmane.linux.ide/13503
[1] http://thread.gmane.org/gmane.linux.ide/20081
[2] http://thread.gmane.org/gmane.linux.ide/20099
[3] http://thread.gmane.org/gmane.linux.ide/20115


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html