Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hdparm-6.3: HDIO_SET_DMA failed: Invalid argument [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1768
Location: PB, Germany

PostPosted: Mon Jul 03, 2006 9:17 pm    Post subject: hdparm-6.3: HDIO_SET_DMA failed: Invalid argument [solved] Reply with quote

Code:
# /etc/init.d/hdparm restart
 * Service hdparm stopping
 * WARNING:  you are stopping a boot service.
 * Service hdparm stopped
 * Service hdparm starting
 HDIO_SET_UNMASKINTR failed: Invalid argument
 HDIO_SET_DMA failed: Invalid argument
 * Service hdparm started
Look at the lines
HDIO_SET_UNMASKINTR failed: Invalid argument
HDIO_SET_DMA failed: Invalid argument


Code:
# hdparm /dev/hda

/dev/hda:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 16383/255/63, sectors = 156301488, start = 0

Code:
# grep -v "#" /etc/conf.d/hdparm

hda_args="-c1 -A1 -B255 -M254 -m16"

all_args="-d1 -u1"

These error messages are since the last update, before this config was working.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770


Last edited by Massimo B. on Fri Aug 25, 2006 8:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Mon Jul 03, 2006 10:33 pm    Post subject: Reply with quote

paoleela,

If you set your kernel up correctly you do noy need hdparm to set DMA an all those other good things.
unmaskirq is a Bad Thing(tm) unless you are uing unbuffered serial ports. It allows other IRQs to be serviced during the HDD IRQ, when the system s really busy, you may get DMA timeouts and the kernel will turn DMA off.

To know if you need hdparm or not I need to see your lspci output and the IDE section of your kernel .config file,
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1768
Location: PB, Germany

PostPosted: Thu Jul 06, 2006 6:28 pm    Post subject: Reply with quote

Why is unmasq IRQ bad? Every hdparm howto tells that and also the gentoo Installation guides.
Unmasq IRQ and setting dma by hdparm was working right before the update and is still working on my x86 system.

Code:
# zgrep  "IDE" /proc/config.gz |grep -v "#"
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_IDE_TASK_IOCTL=y
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDE_PMAC_BLINK=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y

Code:
# lspci |grep -v "USB\|AGP\|VGA\|Fire"
0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth/Pangea PCI
0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo/Pangea Mac I/O
0002:20:0b.0 Host bridge: Apple Computer Inc. UniNorth/Pangea Internal PCI
0002:20:0f.0 Class ffff: Illegal Vendor ID Unknown device ffff (rev ff)

_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Thu Jul 06, 2006 7:27 pm    Post subject: Reply with quote

paoleela,

What arch are you on - at first sight there are some options missing but I need to look at the kernel config for your arch.
My defualt x86 won't help
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1768
Location: PB, Germany

PostPosted: Thu Jul 06, 2006 9:03 pm    Post subject: Reply with quote

It's ppc32/G3. I didn't change the kernel before these messages.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Thu Jul 06, 2006 10:28 pm    Post subject: Reply with quote

paoleela,

Unmasking IRQ was intended to allow the orignial serial UARTS (with no FIFIOs) to intrrupt ongoing hard drive Interrupts.
These days, UARTS, if they are used at all, have FIFOs, so its not required. It was a hack to avoild lost characters.
When the unmasked IRQs are used for other things, it can extend the time taken to service the HDD IRQ to the point where you get a time out and the kernel reverts to PIO mode. So UnmaskIRQ is a bad thing now.

It looks like you have the IDE chip set sepecific code missing from your kernel
lspci will tell you waht that is. You need to rebuild your kernel though because it cannot be a module
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1768
Location: PB, Germany

PostPosted: Sun Jul 16, 2006 12:51 pm    Post subject: Reply with quote

Again:
Doing myself as root:
Code:
hdparm -d1 -u1 -c1 -A1 -B255 -M254 -m16  /dev/hda
works perfectly. It's just about the conf.d script that gives error messages.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
zurd
Apprentice
Apprentice


Joined: 17 Dec 2003
Posts: 228
Location: Canada, Montreal

PostPosted: Sat Jul 29, 2006 8:37 am    Post subject: Reply with quote

Really seems like a script problem, what about rm /etc/conf.d/hdparm and rm /etc/init.d/hdparm then ermere sync and emerge -C hdparm and emerge hdparm then configure the /etc/conf.d/hdparm? In short, reinstall it all?
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1768
Location: PB, Germany

PostPosted: Sat Jul 29, 2006 8:46 am    Post subject: Reply with quote

Of course I aldready reinstalled it, but without -C. It should get overwritten with emerge.
Code:
# cat /etc/conf.d/hdparm
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-conf.d.3,v 1.2 2004/09/06 02:17:08 swegener Exp $

# You can either set hdparm arguments for each drive using hdX_args,
# discX_args, cdromX_args and genericX_args, e.g.
#
hda_args="-c1 -A1 -B255 -M254 -m16"
# disc1_args="-d1"
# cdrom0_args="-d1"

# or, you can set hdparm options for ALL drives using all_args, e.g.
#
all_args="-d1 -u1"

_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
zurd
Apprentice
Apprentice


Joined: 17 Dec 2003
Posts: 228
Location: Canada, Montreal

PostPosted: Sat Jul 29, 2006 8:53 am    Post subject: Reply with quote

Try emerge -C hdparm and see if /etc/init.d/hdparm is still there, as far as I know even though you uninstalled it the script is still there, just a guess but I don't think it get's overwritten, it helped me in the past with package like boinc.

Else I'll re-check in the kernel if in Device Drivers / ATA/ATAPI/MFM/RLL you have your chipset active in it, or what about " Enable DMA only for disks" ? Try checking it or disabling it (mine is disabled)
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1768
Location: PB, Germany

PostPosted: Sat Jul 29, 2006 9:20 am    Post subject: Reply with quote

Yea, but I replaced the init script afterwards with etc-update.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1768
Location: PB, Germany

PostPosted: Fri Aug 25, 2006 8:14 pm    Post subject: Reply with quote

I switched now to ~ppc sys-apps/hdparm-6.6, but it's still the same.
Code:
marialin ~ # /etc/init.d/hdparm restart
 * Service hdparm stopping
 * WARNING:  you are stopping a boot service.
 * Service hdparm stopped
 * Service hdparm starting
 * Running hdparm on /dev/hda ...                               [ ok ]
 * Running hdparm on /dev/hdb ...                               [ ok ]
 * Running hdparm on /dev/sda ...
 HDIO_SET_UNMASKINTR failed: Invalid argument
 HDIO_SET_DMA failed: Invalid argument                   [ ok ]
 * Service hdparm started

marialin ~ # cat /etc/conf.d/hdparm |grep -v "#"

hda_args="-c1 -A1 -B255 -M254 -m16"
all_args="-d1 -u1"

_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1768
Location: PB, Germany

PostPosted: Fri Aug 25, 2006 8:22 pm    Post subject: Reply with quote

Wow, I never realized that only sda makes that error and that /dev/sda is a firewire device.

-> [ solved ]
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum