Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 17aaf5f

Browse files
authoredFeb 23, 2025·
Merge pull request ps2homebrew#1490 from pcm720/master
Limit max BDM UDMA mode to UDMA4 to avoid compatibility issues with various SATA/IDE2SD adapters
2 parents 4f94ffd + 629ac6a commit 17aaf5f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/bdmsupport.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,13 @@ void bdmResolveLBA_UDMA(bdm_device_data_t *pDeviceData)
766766

767767
// Query the drive for the highest UDMA mode.
768768
pDeviceData->ataHighestUDMAMode = fileXioDevctl("xhdd0:", ATA_DEVCTL_GET_HIGHEST_UDMA_MODE, NULL, 0, NULL, 0);
769-
if (pDeviceData->ataHighestUDMAMode < 0 || pDeviceData->ataHighestUDMAMode > 7) {
769+
if (pDeviceData->ataHighestUDMAMode < 0) {
770770
// Failed to query highest UDMA mode supported.
771-
LOG("Mass device %d is backed by ATA but failed to get highest UDMA mode %d\n", pDeviceData->ataHighestUDMAMode);
771+
LOG("Mass device %d is backed by ATA but failed to get highest UDMA mode %d\n", pDeviceData->massDeviceIndex, pDeviceData->ataHighestUDMAMode);
772+
pDeviceData->ataHighestUDMAMode = 4;
773+
} else if (pDeviceData->ataHighestUDMAMode > 4) {
774+
// Limit max UDMA mode to 4 to avoid compatibility issues
775+
LOG("Mass device %d supports up to UDMA mode %d, limiting to UDMA 4\n", pDeviceData->massDeviceIndex, pDeviceData->ataHighestUDMAMode);
772776
pDeviceData->ataHighestUDMAMode = 4;
773777
}
774778

0 commit comments

Comments
 (0)
Please sign in to comment.