Skip to content

SATA controller on PCIe bus sometimes crashes in disk.sys #59

@idigdoug

Description

@idigdoug

The on-board SATA controller seems to work pretty reliably. However, if I use a SATA controller in a PCIe slot, I frequently hit crashes in disk.sys during SMART operations.

The root cause is that storport is returning corrupted buffers to disk.sys.

The crash occurs because disk.sys is not properly handling the corrupt buffers. Microsoft has fixed this in the latest Developer Preview builds, so the crashes should go away in Windows 27765 and later.

The corrupt buffers are a second issue. Appears to be something wrong with DMA mapping:

  • On the way down (BuildMdlFromScatterGatherList), the DMA transfer is treated as transparently-mapped.
  • storport and storahci work with the mapped buffer and everything looks good.
  • On the way up (PutScatterGatherList), the DMA transfer is treated as double-buffered -- PutScatterGatherList copies from essentially-uninitialized memory that it thinks we should have been using.

This means that it's either a bug in Windows DMA handling OR storport is calling into the DMA handling in an unsupported way.

Metadata

Metadata

Assignees

Labels

wontfixThis will not be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions