Skip to content

Conversation

@seijikun
Copy link
Contributor

@seijikun seijikun commented Nov 3, 2025

Every warning sign has a story behind it.
And boy ... do I have stories of actual server hardware doing "things".

Let's call this time's offending vendor Super M.
Or better yet! Let's call it: S. Micro


On some mainboards, we have the problem that using UDMA to send the IDENTIFY command to the HDD just hangs indefinitely until the watchdog kills the app. Sending the same command using PIO works.

Hangs:

	let request = AtaRequestBuilder::read_udma(scsi_pt.io_align(), 0xEC)?
		.with_timeout(Duration::from_millis(500))
		.use_read_buffer(bfr)?
		.build();
      let response = device.execute_command(request)?;

Works:

	let request = AtaRequestBuilder::read_pio(scsi_pt.io_align(), 0xEC)?
		.with_timeout(Duration::from_millis(500))
		.with_device_head(0xA0)
		.with_sector_count(0)
		.use_read_buffer(bfr)?
		.build();
      let response = device.execute_command(request)?;

At first I thought it hangs because there were no drives connected to the port. But no ... turns out there actually are drives connected.

image

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@seijikun seijikun force-pushed the mr-atapassthru-pio branch 2 times, most recently from a723828 to e31d65c Compare November 3, 2025 20:21
@phip1611
Copy link
Member

phip1611 commented Nov 4, 2025

oh no.. - thanks for your ongoing valuable contributions!

@seijikun seijikun force-pushed the mr-atapassthru-pio branch 2 times, most recently from 654a36d to 09c4fcc Compare November 4, 2025 10:12
@seijikun
Copy link
Contributor Author

seijikun commented Nov 4, 2025

I added more documentation. This ATA part of the UEFI spec is really confusing.

@phip1611
Copy link
Member

phip1611 commented Nov 5, 2025

thanks!

@phip1611 phip1611 added this pull request to the merge queue Nov 5, 2025
Merged via the queue into rust-osdev:main with commit 176d71f Nov 5, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants