Re: DeLock 10x SATA AHCI controller not working properly

2016-11-28 Thread Alexander Motin
I've made some experiments with the card sample I've got and indeed
found the problem.  I believe it is a bug in the ASMedia ASM1062 chip
firmware that wasn't triggered on other OSes.  I've just committed small
patch to FreeBSD HEAD at r309251 to workaround the problem.  With this
patch on very quick tests card seems working properly.

On 08.11.2016 07:42, Alexander Motin wrote:
> As I have told before, this card is from completely different price
> segment then proper SAS/SATA HBAs.  For its $80 it is not promised to be
> reliable.  But in case anything can be done, I'll try to take a look on
> it in couple weeks when I get one and return home.
> 
> On 07.11.2016 16:19, Daniel Engberg wrote:
>> I discussed this card briefly with Alexander Motin (@mav) back in 2015,
>> https://forums.freebsd.org/threads/50411/page-2#post-282648 .
>> I've CCed him for suggestions.
>>
>> https://lists.freebsd.org/pipermail/freebsd-current/2016-October/063668.html

-- 
Alexander Motin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: DeLock 10x SATA AHCI controller not working properly

2016-11-15 Thread Jia-Shiun Li
according to the msgs, the controller pretended to be a 12-port host
to hide port multipliers behind it? Creative, but then any magic
(or bugs) it does remains vendor-specific and unknown to outside world.

Looks there is no firmware or jumpers to change this behavior.
http://www.addonics.com/products/ad10sa6gpx2.php


-Jia-Shiun.


On Tue, Nov 8, 2016 at 1:42 PM, Alexander Motin  wrote:

> As I have told before, this card is from completely different price
> segment then proper SAS/SATA HBAs.  For its $80 it is not promised to be
> reliable.  But in case anything can be done, I'll try to take a look on
> it in couple weeks when I get one and return home.
>
> On 07.11.2016 16:19, Daniel Engberg wrote:
> > I discussed this card briefly with Alexander Motin (@mav) back in 2015,
> > https://forums.freebsd.org/threads/50411/page-2#post-282648 .
> > I've CCed him for suggestions.
> >
> > https://lists.freebsd.org/pipermail/freebsd-current/
> 2016-October/063668.html
>
> --
> Alexander Motin
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: DeLock 10x SATA AHCI controller not working properly

2016-11-07 Thread Alexander Motin
As I have told before, this card is from completely different price
segment then proper SAS/SATA HBAs.  For its $80 it is not promised to be
reliable.  But in case anything can be done, I'll try to take a look on
it in couple weeks when I get one and return home.

On 07.11.2016 16:19, Daniel Engberg wrote:
> I discussed this card briefly with Alexander Motin (@mav) back in 2015,
> https://forums.freebsd.org/threads/50411/page-2#post-282648 .
> I've CCed him for suggestions.
> 
> https://lists.freebsd.org/pipermail/freebsd-current/2016-October/063668.html

-- 
Alexander Motin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: DeLock 10x SATA AHCI controller not working properly

2016-11-07 Thread Daniel Engberg

Hi,

I discussed this card briefly with Alexander Motin (@mav) back in 2015, 
https://forums.freebsd.org/threads/50411/page-2#post-282648 .

I've CCed him for suggestions.

https://lists.freebsd.org/pipermail/freebsd-current/2016-October/063668.html

Best regards,
Daniel
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


DeLock 10x SATA AHCI controller not working properly

2016-10-27 Thread D. E
Dear list,

I hope you guys can help me with my new AHCI controller that doesn't work well 
with FreeBSD yet.


*** Introduction

I have bought this very neat $80 SATA AHCI controller: 
http://www.delock.com/produkte/G_89384/merkmale.html
This controller is PCI-express 2.0 with 2 lanes, so 1GB/s bandwidth shared 
across 10 ports. For just $80 this is a great deal! It is also VERY power 
efficient, unlike SAS adapters which can use up to 8W when doing nothing. The 
controller itself it a 2-port Asmedia AHCI SATA controller with two port 
multipliers on it. Thus, each 5 ports are sharing one SATA/600 link. It pushes 
beyond 900MB/s when fully utilised.
The controller is detected by FreeBSD 11.0-RELEASE-p1 amd64 as a regular AHCI 
controller. It appears to work, in that it detects the disks that are connected 
to it and it can do I/O.


*** The problem

This controller generates various I/O errors and timeouts. But only in specific 
circumstances, where I think that NCQ or simultaneous access is a factor. 
Because when i start a simple dd read command for each harddrive connected to 
the controller, there are no errors or timeouts in the dmesg. But when 
importing a pool, creating a pool or scrubbing a pool that is empty, timeouts 
and I/O errors are 100% reproducable in just a few seconds. This is after dd 
commands have been running for hours straight without any hickup.

In other words, I believe this controller needs some kind of quirk. The 
controller is reported to be working properly on Linux.


*** What I already tried

I tried disabling MSI and MSI-X interrupts. I tried disabling NCQ although with 
limited effect: ZFS can be tuned to use one outstanding I/O, but I still got 
errors now and then.
Is there any way of doing some easy quirks to localize the problem and also get 
this controller working reliably, albeit slower?


*** Example errors when working with ZFS:

ahcich7: Timeout on slot 23 port 0
ahcich7: is  cs  ss  rs 0080 tfd 50 serr  
cmd 0004cf17
(ada9:ahcich7:0:0:0): READ_DMA. ACB: c8 00 00 ff 02 40 00 00 00 00 00 00
(ada9:ahcich7:0:0:0): CAM status: Command timeout
(ada9:ahcich7:0:0:0): Retrying command
ahcich17: Timeout on slot 30 port 0
ahcich17: is  cs  ss  rs 4000 tfd 50 serr  
cmd 0004c317
(aprobe0:ahcich17:0:0:0): SETFEATURES SET TRANSFER MODE. ACB: ef 03 00 00 00 40 
00 00 00 00 46 00
(aprobe0:ahcich17:0:0:0): CAM status: Command timeout
(aprobe0:ahcich17:0:0:0): Retrying command


*** Detection logs:

# pciconf -lv
ahci1@pci0:4:0:0:   class=0x010601 card=0x10601b21 chip=0x06251b21 rev=0x01 
hdr=0x00
vendor = 'ASMedia Technology Inc.'
class  = mass storage
subclass   = SATA

# dmesg
pci4:  on pcib4
ahci1:  mem 0xfdafe000-0xfdaf irq 16 at device 0.0 on 
pci4
ahci1: AHCI v1.31 with 12 6Gbps ports, Port Multiplier not supported
ahcich6:  at channel 0 on ahci1
ahcich7:  at channel 1 on ahci1
ahcich10:  at channel 4 on ahci1
ahcich11:  at channel 5 on ahci1
ahcich12:  at channel 6 on ahci1
ahcich13:  at channel 7 on ahci1
ahcich14:  at channel 8 on ahci1
ahcich15:  at channel 9 on ahci1
ahcich16:  at channel 10 on ahci1
ahcich17:  at channel 11 on ahci1

# devinfo -r
  pci4
  pcib4 bus numbers:
  4
ahci1
Interrupt request lines:
0x109
pcib4 memory window:
0xfdafe000-0xfdaf
  ahcich6
  I/O memory addresses:
  0xfdafe100-0xfdafe17f
  ahcich7
  I/O memory addresses:
  0xfdafe180-0xfdafe1ff
  ahcich10
  I/O memory addresses:
  0xfdafe300-0xfdafe37f
  ahcich11
  I/O memory addresses:
  0xfdafe380-0xfdafe3ff
  ahcich12
  I/O memory addresses:
  0xfdafe400-0xfdafe47f
  ahcich13
  I/O memory addresses:
  0xfdafe480-0xfdafe4ff
  ahcich14
  I/O memory addresses:
  0xfdafe500-0xfdafe57f
  ahcich15
  I/O memory addresses:
  0xfdafe580-0xfdafe5ff
  ahcich16
  I/O memory addresses:
  0xfdafe600-0xfdafe67f
  ahcich17
  I/O memory addresses:
  0xfdafe680-0xfdafe6ff


PS. please click 'Reply All' when replying, since I am not subscribed to the 
list, meaning that I cannot easily reply on your reply unless you also send it 
to my email directly, using 'Reply All'. Thanks!
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


DeLock 10x SATA AHCI controller not working properly

2016-10-27 Thread D. E
Dear list,

I hope you guys can help me with my new AHCI controller that doesn't work well 
with FreeBSD yet.


*** Introduction

I have bought this very neat $80 SATA AHCI controller: 
http://www.delock.com/produkte/G_89384/merkmale.html
This controller is PCI-express 2.0 with 2 lanes, so 1GB/s bandwidth shared 
across 10 ports. For just $80 this is a great deal! It is also VERY power 
efficient, unlike SAS adapters which can use up to 8W when doing nothing. The 
controller itself it a 2-port Asmedia AHCI SATA controller with two port 
multipliers on it. Thus, each 5 ports are sharing one SATA/600 link. It pushes 
beyond 900MB/s when fully utilised.
The controller is detected by FreeBSD 11.0-RELEASE-p1 amd64 as a regular AHCI 
controller. It appears to work, in that it detects the disks that are connected 
to it and it can do I/O.


*** The problem

This controller generates various I/O errors and timeouts. But only in specific 
circumstances, where I think that NCQ or simultaneous access is a factor. 
Because when i start a simple dd read command for each harddrive connected to 
the controller, there are no errors or timeouts in the dmesg. But when 
importing a pool, creating a pool or scrubbing a pool that is empty, timeouts 
and I/O errors are 100% reproducable in just a few seconds. This is after dd 
commands have been running for hours straight without any hickup.

In other words, I believe this controller needs some kind of quirk. The 
controller is reported to be working properly on Linux.


*** What I already tried

I tried disabling MSI and MSI-X interrupts. I tried disabling NCQ although with 
limited effect: ZFS can be tuned to use one outstanding I/O, but I still got 
errors now and then.
Is there any way of doing some easy quirks to localize the problem and also get 
this controller working reliably, albeit slower?


*** Example errors when working with ZFS:

ahcich7: Timeout on slot 23 port 0
ahcich7: is  cs  ss  rs 0080 tfd 50 serr  
cmd 0004cf17
(ada9:ahcich7:0:0:0): READ_DMA. ACB: c8 00 00 ff 02 40 00 00 00 00 00 00
(ada9:ahcich7:0:0:0): CAM status: Command timeout
(ada9:ahcich7:0:0:0): Retrying command
ahcich17: Timeout on slot 30 port 0
ahcich17: is  cs  ss  rs 4000 tfd 50 serr  
cmd 0004c317
(aprobe0:ahcich17:0:0:0): SETFEATURES SET TRANSFER MODE. ACB: ef 03 00 00 00 40 
00 00 00 00 46 00
(aprobe0:ahcich17:0:0:0): CAM status: Command timeout
(aprobe0:ahcich17:0:0:0): Retrying command


*** Detection logs:

# pciconf -lv
ahci1@pci0:4:0:0:   class=0x010601 card=0x10601b21 chip=0x06251b21 rev=0x01 
hdr=0x00
vendor = 'ASMedia Technology Inc.'
class  = mass storage
subclass   = SATA

# dmesg
pci4:  on pcib4
ahci1:  mem 0xfdafe000-0xfdaf irq 16 at device 0.0 on 
pci4
ahci1: AHCI v1.31 with 12 6Gbps ports, Port Multiplier not supported
ahcich6:  at channel 0 on ahci1
ahcich7:  at channel 1 on ahci1
ahcich10:  at channel 4 on ahci1
ahcich11:  at channel 5 on ahci1
ahcich12:  at channel 6 on ahci1
ahcich13:  at channel 7 on ahci1
ahcich14:  at channel 8 on ahci1
ahcich15:  at channel 9 on ahci1
ahcich16:  at channel 10 on ahci1
ahcich17:  at channel 11 on ahci1

# devinfo -r
  pci4
  pcib4 bus numbers:
  4
ahci1
Interrupt request lines:
0x109
pcib4 memory window:
0xfdafe000-0xfdaf
  ahcich6
  I/O memory addresses:
  0xfdafe100-0xfdafe17f
  ahcich7
  I/O memory addresses:
  0xfdafe180-0xfdafe1ff
  ahcich10
  I/O memory addresses:
  0xfdafe300-0xfdafe37f
  ahcich11
  I/O memory addresses:
  0xfdafe380-0xfdafe3ff
  ahcich12
  I/O memory addresses:
  0xfdafe400-0xfdafe47f
  ahcich13
  I/O memory addresses:
  0xfdafe480-0xfdafe4ff
  ahcich14
  I/O memory addresses:
  0xfdafe500-0xfdafe57f
  ahcich15
  I/O memory addresses:
  0xfdafe580-0xfdafe5ff
  ahcich16
  I/O memory addresses:
  0xfdafe600-0xfdafe67f
  ahcich17
  I/O memory addresses:
  0xfdafe680-0xfdafe6ff


PS. please click 'Reply All' when replying, since I am not subscribed to the 
list, meaning that I cannot easily reply on your reply unless you also send it 
to my email directly, using 'Reply All'. Thanks!
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"