Bug 427961

Summary: Cannot set UDMA mode on IDE disk
Product: [Fedora] Fedora Reporter: Vlado Potisk <reg.bugs>
Component: hdparmAssignee: Karsten Hopp <karsten>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-08 11:12:16 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Vlado Potisk 2008-01-08 03:04:49 EST
Description of problem:
My IDE disk need to be switched from UDMA5 to UDMA4 in order to prevent errors
caused by a removable tray cabling. hdparm is unable to do that.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. hdparm -d1 -X68 -k1 /dev/sdc
Actual results:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Inappropriate ioctl for device
 setting keep_settings to 1 (on)
 HDIO_SET_KEEPSETTINGS failed: Inappropriate ioctl for device
 setting xfermode to 68 (UltraDMA mode4)
SG_IO: bad/missing ATA_16 sense data::  70 00 05 00 00 00 00 0a 00 00 00 00 24
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 HDIO_DRIVE_CMD(setxfermode) failed: Input/output error

Expected results:
no errors

Additional info:

Back in the old days when sdc was hda it worked fine.

Output of hdparm -i /dev/sdc:

 Model=WDC WD2000JB-00GVA0                     , FwRev=08.02D08,
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6
Comment 1 Karsten Hopp 2008-01-08 11:12:16 EST
hdparm cannot be used for libata devices (ATA devices named like SCSI devices).
Unfortunately I haven't found a way to set a specific DMA mode with sdparm
either so the only solution right now that I'm aware of is to add your harddisk
model to the libata blacklist in the kernel source and build your own custom kernel.
On the other hand I personally wouldn't trust any data on that removable tray HD
anyway and just go for a USB disk.