Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 2021 18:02:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 243401] [patch] ahci driver problems with Marvell 88SE9230 (Dell BOSS-S1)
Message-ID:  <bug-243401-227-YllmIfmSAJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-243401-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-243401-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D243401

--- Comment #9 from Peter Eriksson <pen@lysator.liu.se> ---
Sorry, have been busy with another problem (a HP server with a lot of disks
panic:ing due to bugs in other parts of the kernel - sigh). I'll get back w=
ith
a better patch soon.

Anyway, the way I changed it was basically to chnage the loop:

1. DELAY(10) instead of DELAY(100) - it takes about 30us for status to chan=
ge
from 0 -> 1, so no need to wait the full 100us :-)

2. Only change the "full timeout" from 100ms to 500ms after ATA_SS_DEV_MASK=
 has
changed from ATA_SS_DET_NO_DEVICE.


My current version of the patch contains a lot of debuging printouts so
probably not really good for production use (it makes it easier to watch wh=
at's
happening though :-)

A sample of the dmesg output:


First an ununes ahci channel/controller without devices:

ahcich13: AHCI engine: stopping
ahcich13: stopping AHCI engine: cr: 1 -> 0 at time 10 us
ahcich13: AHCI engine stopped at time 10 us
ahcich13: ahci_sata_phy_reset: Start
ahcich13: ahci_sata_connect: Start
ahcich13: SATA connect timeout status 0x00000000 at time=3D10000us
ahcich13: ahci_sata_connect: Done (0)
ahcich13: ahci_sata_phy_reset: Done (0)
ahcich13: AHCI reset: device not found
ahcich13: ahci_reset: Done (ahci_sata_phy_reset failed)


First port on the BOSS:

ahcich14: ahciaction: Calling ahci_reset (XPT_RESET_BUS)
ahcich14: ahci_reset: Start
ahcich14: AHCI reset...
ahcich14: AHCI engine: stopping
ahcich14: stopping AHCI engine: cr: 1 -> 0 at time 10 us
ahcich14: AHCI engine stopped at time 10 us
ahcich14: ahci_sata_phy_reset: Start
ahcich14: ahci_sata_connect: Start
ahcich14: SATA changed status 0x00000000 -> 0x00000001 at time=3D30us
ahcich14: SATA changed status 0x00000001 -> 0x00000133 at time=3D211790us
ahcich14: SATA connect status 0x00000133 at time=3D211790us
ahcich14: ahci_sata_connect: Done (1)
ahcich14: ahci_sata_phy_reset: Done (1)
ahcich14: AHCI reset: device found
ahcich14: AHCI reset: device ready after 0ms
ahcich14: AHCI engine(fbs=3D1): starting
ahcich14: ahci_start: Done
ahcich14: ahci_reset: Done


Then it resets the second port/channel (and starts doing stuff on the first
port at the same time):

ahcich15: ahciaction: Calling ahci_reset (XPT_RESET_BUS)
ahcich15: ahci_reset: Start
ahcich15: AHCI reset...
ahcich15: AHCI engine: stopping
ahcich15: stopping AHCI engine: cr: 1 -> 0 at time 10 us
ahcich15: AHCI engine stopped at time 10 us
ahcich15: ahci_sata_phy_reset: Start
ahcich14: ahci_execute_transaction: Kicking controller into sane state
ahcich14: AHCI engine: stopping
ahcich14: stopping AHCI engine: cr: 1 -> 0 at time 10 us
ahcich14: AHCI engine stopped at time 10 us
ahcich14: ahci_clo: Start
ahcich14: ahci_clo: Done
ahcich14: AHCI engine(fbs=3D0): starting
ahcich14: ahci_start: Done
ahcich15: ahci_sata_connect: Start
ahcich15: SATA changed status 0x00000000 -> 0x00000001 at time=3D30us
ahcich14: ahci_end_transaction: Reinit port (eslots=3D00000004)
ahcich14: AHCI engine: stopping
ahcich15: SATA changed status 0x00000001 -> 0x00000133 at time=3D220650us
ahcich15: SATA connect status 0x00000133 at time=3D220650us
ahcich15: ahci_sata_connect: Done (1)
ahcich15: ahci_sata_phy_reset: Done (1)
ahcich15: AHCI reset: device found
ahcich15: AHCI reset: device ready after 0ms
ahcich15: AHCI engine(fbs=3D1): starting
ahcich15: ahci_start: Done
ahcich15: ahci_reset: Done


And then the third (ses?) port - there is only two ports on this controller:

ahcich16: ahciaction: Calling ahci_reset (XPT_RESET_BUS)
ahcich16: ahci_reset: Start
ahcich16: AHCI reset...
ahcich16: AHCI engine: stopping
ahcich16: stopping AHCI engine: cr: 1 -> 0 at time 10 us
ahcich16: AHCI engine stopped at time 10 us
ahcich16: ahci_sata_phy_reset: Start
ahcich16: ahci_sata_connect: Start
ahcich16: SATA changed status 0x00000000 -> 0x00000113 at time=3D70us
ahcich16: SATA connect status 0x00000113 at time=3D70us
ahcich16: ahci_sata_connect: Done (1)
ahcich16: ahci_sata_phy_reset: Done (1)
ahcich16: AHCI reset: device found
ahcich16: AHCI reset: device ready after 0ms
ahcich16: AHCI engine(fbs=3D1): starting
ahcich16: ahci_start: Done
ahcich16: ahci_reset: Done


But then things are a bit strange - notice the 1s timeouts (I increased the=
 max
timeout to 1s in this test boot):

Root mount waiting for: CAM usbus0
uhub0: 26 ports with 26 removable, self powered
ahcich14: stopping AHCI engine: timeout at 1000000 us (cr=3D1, ccs=3D0, ci=
=3D0,
sact=3D0)
ahcich14: ahci_clo: Start
ahcich14: ahci_clo: Done
ahcich14: AHCI engine(fbs=3D1): starting
ahcich14: ahci_start: Done
ahcich15: ahci_execute_transaction: Kicking controller into sane state
ahcich15: AHCI engine: stopping
ugen0.2: <Kingston DataTraveler 2.0> at usbus0
umass0 numa-domain 0 on uhub0
umass0: <Kingston DataTraveler 2.0, class 0/0, rev 2.00/1.00, addr 1> on us=
bus0
umass0:  SCSI over Bulk-Only; quirks =3D 0xc000
umass0:20:0: Attached to scbus20
Root mount waiting for: CAM usbus0
ahcich15: stopping AHCI engine: timeout at 1000000 us (cr=3D1, ccs=3D0, ci=
=3D0,
sact=3D0)
ahcich15: ahci_clo: Start
ahcich15: ahci_clo: Done
ahcich15: AHCI engine(fbs=3D0): starting
ahcich15: ahci_start: Done
ahcich15: ahci_end_transaction: Reinit port (eslots=3D00000004)
ahcich15: AHCI engine: stopping
ugen0.3: <vendor 0x1604 product 0x10c0> at usbus0
uhub1 numa-domain 0 on uhub0
uhub1: <vendor 0x1604 product 0x10c0, class 9/0, rev 2.00/0.00, addr 2> on
usbus0
Root mount waiting for: CAM usbus0
ahcich15: stopping AHCI engine: timeout at 1000000 us (cr=3D1, ccs=3D0, ci=
=3D0,
sact=3D0)
ahcich15: ahci_clo: Start
ahcich15: ahci_clo: Done
ahcich15: AHCI engine(fbs=3D1): starting
ahcich15: ahci_start: Done
ahcich15: ahci_execute_transaction: Kicking controller into sane state
ahcich15: AHCI engine: stopping
Root mount waiting for: CAM usbus0
ahcich15: stopping AHCI engine: timeout at 1000000 us (cr=3D1, ccs=3D0, ci=
=3D0,
sact=3D0)
ahcich15: ahci_clo: Start
ahcich15: ahci_clo: Done
ahcich15: AHCI engine(fbs=3D0): starting
ahcich15: ahci_start: Done
uhub1: 4 ports with 4 removable, self powered
Root mount waiting for: CAM usbus0
ugen0.4: <vendor 0x1604 product 0x10c0> at usbus0
uhub2 numa-domain 0 on uhub1
uhub2: <vendor 0x1604 product 0x10c0, class 9/0, rev 2.00/0.00, addr 3> on
usbus0
Root mount waiting for: CAM usbus0
ahcich15: ahci_end_transaction: Reinit port (eslots=3D00000010)
ahcich15: AHCI engine: stopping
Root mount waiting for: CAM usbus0
hcich15: stopping AHCI engine: timeout at 1000000 us (cr=3D1, ccs=3D0, ci=
=3D0,
sact=3D0)
ahcich15: ahci_clo: Start
ahcich15: ahci_clo: Done
ahcich15: AHCI engine(fbs=3D1): starting
ahcich15: ahci_start: Done
ahcich16: ahci_execute_transaction: Kicking controller into sane state
ahcich16: AHCI engine: stopping
ahcich16: stopping AHCI engine: cr: 1 -> 0 at time 10 us
ahcich16: AHCI engine stopped at time 10 us
ahcich16: ahci_clo: Start
ahcich16: ahci_clo: Done
ahcich16: AHCI engine(fbs=3D0): starting
ahcich16: ahci_start: Done
ahcich16: ahci_end_transaction: Reinit port (eslots=3D00000004)
ahcich16: AHCI engine: stopping
uhub2: 4 ports with 4 removable, self powered
Root mount waiting for: CAM usbus0
ugen0.5: <vendor 0x1604 product 0x10c0> at usbus0
uhub3 numa-domain 0 on uhub1
uhub3: <vendor 0x1604 product 0x10c0, class 9/0, rev 2.00/0.00, addr 4> on
usbus0
ahcich16: stopping AHCI engine: timeout at 1000000 us (cr=3D1, ccs=3D0, ci=
=3D0,
sact=3D0)
ahcich16: ahci_clo: Start
ahcich16: ahci_clo: Done
ahcich16: AHCI engine(fbs=3D1): starting
ahcich16: ahci_start: Done
ahcich16: ahci_execute_transaction: Kicking controller into sane state
ahcich16: AHCI engine: stopping
Root mount waiting for: CAM usbus0
ahcich16: stopping AHCI engine: timeout at 1000000 us (cr=3D1, ccs=3D0, ci=
=3D0,
sact=3D0)
ahcich16: ahci_clo: Start
ahcich16: ahci_clo: Done
ahcich16: AHCI engine(fbs=3D0): starting
ahcich16: ahci_start: Done
Root mount waiting for: CAM usbus0
uhub3: 4 ports with 4 removable, self powered
Root mount waiting for: CAM
Root mount waiting for: CAM
Root mount waiting for: CAM
ahcich16: ahci_end_transaction: Reinit port (eslots=3D00000010)
ahcich16: AHCI engine: stopping
Root mount waiting for: CAM
ahcich16: stopping AHCI engine: timeout at 1000000 us (cr=3D1, ccs=3D0, ci=
=3D0,
sact=3D0)
ahcich16: ahci_clo: Start
ahcich16: ahci_clo: Done
ahcich16: AHCI engine(fbs=3D1): starting
ahcich16: ahci_start: Done


However, eventually things seem to work anyway. I've attached the full
dmesg.boot file

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-243401-227-YllmIfmSAJ>