Skip to contentSkip to conversation

Request: hdparm module with -X <transfer mode>

DISCUSSION Nando 2 participants 4 messages Dec 8, 2009 – Jan 11, 2010

lore
Share & tools
lore

Nando

author
#0 lore raw

Hi Grub2 Devel team,

I was pleasantly surprised when I saw a hdparm module as part of grub2. So I tried the -X <transfer mode> parameter as is provided by the linux command line finding it isn't implemented. eg:

# hdparm -X udma5 /dev/sda

Can the development team consider adding this feature? A number of ppl's bios is incorrectly setting interfaces to UDMA2/MDMA2, particularly on pata optical drive interfaces which users are using a 2.5" HDDs instead via an optical bay caddy. The workaround being to wait for a (slow) Linux/Windows boot and then typing the above commandline. Doing this at the grub2 bootloader level being more preferable.

Nando

#1 lore raw
Quoted 8 lines · Nando

I was pleasantly surprised when I saw a hdparm module as part of grub2. So I tried the -X
parameter as is provided by the linux command line finding it isn't implemented. eg:

# hdparm -X udma5 /dev/sda
Quoted 8 lines

Can the development team consider adding this feature? A number of ppl's bios is incorrectly setting interfaces to UDMA2/MDMA2, particularly on pata optical drive interfaces which users are using a 2.5" HDDs instead via an optical bay caddy. The workaround being to wait for a (slow) Linux/Windows boot and then typing the above commandline. Doing this at the grub2 bootloader level being more preferable.

OK, added to my local TODO list :-)

Please note that GRUB hdparm does only work in conjunction with the ata+ata_pthru modules because a PC BIOS does not provide any ATA pass-through functionality. A 'hdparm -X' would only help if the actual boot works with ata.mod instead of biosdisk.mod.

Signature · 2 lines
Regards,
Christian Franke
author
#2 lore raw

Hi Christian,

It's great to have hdparm output added. Another fixup that would be needed would be setting the ATAPI cable mode to be 80pin, rather than the slower 40pin. Users who add hard drives in place of PATA optical drives are liked affected. Eg:

http://forum.notebookreview.com/showthread.php?p=5519419 (HP 2510P / optical drive caddy)
http://www.gottabemobile.com/forum/forum_posts.asp?TID=8260&PID=55271 (Dell XT / not sure why)

Comments/suggestions?
Nando

Quoted 38 lines · Christian Franke
Quoted 8 lines · Nando

I was pleasantly surprised when I saw a hdparm module as part of grub2. So I tried the -X
parameter as is provided by the linux command line finding it isn't implemented. eg:

# hdparm -X udma5 /dev/sda
Quoted 8 lines

Can the development team consider adding this feature? A number of ppl's bios is incorrectly setting interfaces to UDMA2/MDMA2, particularly on pata optical drive interfaces which users are using a 2.5" HDDs instead via an optical bay caddy. The workaround being to wait for a (slow) Linux/Windows boot and then typing the above commandline. Doing this at the grub2 bootloader level being more preferable.

OK, added to my local TODO list :-)

Please note that GRUB hdparm does only work in conjunction with the ata+ata_pthru modules because a PC BIOS does not provide any ATA pass-through functionality. A 'hdparm -X' would only help if the actual boot works with ata.mod instead of biosdisk.mod.

--
Regards,
Christian Franke

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw
Quoted 7 lines · Nando

It's great to have hdparm output added. Another fixup that would be needed would be setting the ATAPI cable mode to be 80pin, rather than the slower 40pin. Users who add hard drives in place of PATA optical drives are liked affected. Eg:

http://forum.notebookreview.com/showthread.php?p=5519419 (HP 2510P / optical drive caddy)
http://www.gottabemobile.com/forum/forum_posts.asp?TID=8260&PID=55271 <http://www.gottabemobile.com/forum/forum_posts.asp?TID=8260&PID=55271> (Dell XT / not sure why)

Comments/suggestions?

AFAICS this is not possible:

Cable detection can be done either by host sensing the PDIAG:CBLID signal, by relying on sensing info from the device, or a combination of both. This is rather complex such that false results may be not unlikely. The device reports the state of PDIAG:CBLID in IDENTIFY word 93. The original Linux hdparm prints this info as:
"HW reset results: CBLID- above/below Vih".
(I will add this to GRUB hdparm).

There is no standard ATA command to change what the device reports in word 93. The host OS driver may or may not use this info from the device to detect cable type.

Reference: T13/1532D Vol 2 Rev 4b (ATA-7 Parallel Transport) section 8.2.11 and annex D.

Christian