Bug 183294 - VIA VX900 - SATA hang
Summary: VIA VX900 - SATA hang
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexander Motin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-25 08:30 UTC by alexandre.martins
Modified: 2019-01-21 09:23 UTC (History)
4 users (show)

See Also:


Attachments
file.diff (1.15 KB, patch)
2013-10-25 08:30 UTC, alexandre.martins
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alexandre.martins 2013-10-25 08:30:00 UTC
The VIA VX900, SATA controler, hang during its initialization, resulting hard drives not seen by kernel.

The hang is due to the reset commands that not wait previous reset command completion.

Depending on the speed of the hard drive initilization, the reset command can take more time.

Fix: Wait the controller have finished the reset command before send another one.

The attached patch show two kinds of waiting, but i don't know which is the better one.

Patch attached with submission follows:
How-To-Repeat: It's depending on how many and the kind of hard drives drive plugged.
Comment 1 ross.stormcrow 2014-06-07 06:00:29 UTC
Can confirm this problem still exists from Release 9.x to 10.0 on an ECS VX900-I v1.0a motherboard.  FreeBSD 8.x does not have this bug.

As a side note, OpenBSD 5.4 and 5.5 exibit the same behavior (hangs on SATA initialization) but NetBSD 6.1.4 does not.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:52:44 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"
Comment 3 ross.stormcrow 2018-05-22 23:54:04 UTC
11.2 BETA 2 still has the SATA hang bug, has this diff been added to the kernel already or will I need to add it manually to try it?
Comment 4 Alexandre martins 2018-05-23 08:30:45 UTC
The patch is in production for us since 4 years ago.

We use the "more complex" version.

The patch is not currently applied into the kernel, so, you have to add it manually to try it.
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-05-23 15:23:05 UTC
A commit references this bug:

Author: mav
Date: Wed May 23 15:22:58 UTC 2018
New revision: 334099
URL: https://svnweb.freebsd.org/changeset/base/334099

Log:
  Add ready polling after PHY reset on VIA SATA controllers.

  According to PR there are cases of controller hang if soft reset is
  sent before device report ready status after the hard reset.

  I don't think this patch is perfect, but it was reported as working
  by the submitter, and I have neither the old hardware nor interest to
  test some improved version, so just done some style cleaning.

  PR:		183294
  Submitted by:	alexandre.martins@netasq.com
  MFC after:	1 month

Changes:
  head/sys/dev/ata/chipsets/ata-via.c
Comment 6 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-21 09:23:49 UTC
There is a commit referencing this PR, but it's still not closed and has been inactive for some time. Closing the PR as fixed but feel free to re-open it if the issue hasn't been completely resolved.

Thanks