On Tue, Dec 31, 2024 at 10:36:06PM -0500, Kris Karas (Bug Reporting) wrote: > Greetings, happy new year, > > I have a 3TB (2.7 TiB) drive attached via an Initio USB-to-SATA bridge to a > server that has been running mainline kernel 6.6. As the next LTS kernel is > now out, 6.12, I upgraded; here's how it went: > > * Booting into 6.6, drive shows normally as 3TB. > * Rebooting into 6.12, drive now shows as 2TB. > * Rebooting back into 6.6, drive continues to show as 2TB. > * Yank USB cable and re-plug, drive once again shows as 3TB. > > As the errant drive size = 512 byte sectors * 2^32, it appears as though the > USB-to-SATA initialization code in the more recent kernel is putting the > adapter into some sort of 32-bit mode. Resetting it via a disconnected > cable (or power cycling) is required to get the normal behavior back. > > The USB-to-SATA adapter lists itself (lsusb) as: > ID 13fd:1e40 Initio Corporation INIC-1610P SATA bridge > It comes bundled inside a "Vantec NexStar CX" external drive enclosure. > > There are no error messages in the dmesg output as the kernel boots. The > output is the same between 6.6 and 6.12, except for the capacity reported, > and the failure to properly read the GPT partition table under the truncated > disk size. > > Anybody have any suggestions for something to try? An hdparm setting > perhaps? I could always bisect, but that would take awhile as the kernel > versions are considerably distant. Somebody on the linux-scsi list might be able to offer more pointed advice, as the SCSI stack is responsible for determining the size of an attached USB drive. At the USB level, you can try collecting usbmon traces under both 6.6 and 6.12 kernels, for purposes of comparison. Follow the instructions in the kernel source file Documentation/usb/usbmon.rst, and be sure to start the trace before plugging in the drive. Alan Stern