HomeFreeBSD

Widen the type for to.

Description

Widen the type for to.

The timeout field in the CAPS register is defined to be 8 bits, so its type was
uint8_t. We recently started adding 1 to it to cope with rogue devices that
listed 0 timeout time (which is impossible). However, in so doing, other devices
that list 0xff (for a 2 minute timeout) were broken when adding 1
overflowed. Widen the type to be uint32_t like its source register to avoid the
issue.

Reported by: bapt@

Details

Provenance
impAuthored on Jul 25 2019, 8:26 PM
Parents
rGc15a591cbd4a: Make `camcontrol sanitize` support also ATA devices.
Branches
Unknown
Tags
Unknown

Event Timeline