Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

HDIO_SET_DMA failed on laptop dvd/cdrw drive [SOLVED]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
23 posts • Page 1 of 1
Author
Message
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

HDIO_SET_DMA failed on laptop dvd/cdrw drive [SOLVED]

  • Quote

Post by jimonade » Wed May 25, 2005 2:48 am

ive read posts and googled for more and found no solution so here it is...

i have a dell lattitude d610 laptop. it has a SATA hard drive and an IDE dvd/cdrw combo drive.

i cant get DMA enabled on the dvd/cdrw combo drive. i first noticed this problem when tyring to play a DVD, and xine helpfully told me that i was losing lots of frames and suggested that i run xine-check.

a xine-check snip...

Code: Select all

[ hint ] DMA is disabled for your DVD interface.
         This will probably result in a serious performance hit when
         playing DVDs. You can issue the command
         hdparm -d1 /dev/hdc
         as root to enable DMA. It would be wise to add this command to
         some script that is executed executed at boot time.
         Note that you probably have to set the DMA mode for your drive as well.
         Most DVD-ROMs work fine with multiword DMA mode 2. You can use
         hdparm -d1 -X34 /dev/hdc
         (as root again) to set this mode. Maybe UDMA2 will give you even better
         performance, but it only works well with some controllers. You'll
         probably need UDMA capable IDE cables for this mode. If you want
         to try: make backups of your important data and type (as root again)
         sync
         hdparm -d1 -X66 /dev/hdc
         If your System still works fine after this, you probably want to keep
         these settings (add them to some boot script).
         If your system hangs or behaves very strangely after a few minutes, you
         should reboot immediately and never use this setting again on this
         machine. Good luck ;-)
         press <enter> to continue...
here is some hdparm test output (i dont know if these are happy numbers or not)...

Code: Select all

ramiken root # hdparm -Tt /dev/hdc

/dev/hdc:
 Timing cached reads:   2108 MB in  2.00 seconds = 1053.63 MB/sec
 Timing buffered disk reads:  read(2097152) returned 163840 bytes
below is some hdparm output...

Code: Select all

ramiken root # hdparm -d 1 /dev/hdc

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
here is some verbose hdparm output...

Code: Select all

ramiken root # hdparm -I /dev/hdc

/dev/hdc:

ATAPI CD-ROM, with removable media
        Model Number:       _NEC DVD+/-RW ND-6500A
        Serial Number:
        Firmware Revision:  202C
Standards:
        Likely used CD-ROM ATAPI-1
Configuration:
        DRQ response: 3ms.
        Packet size: 12 bytes
Capabilities:
        LBA, IORDY(cannot be disabled)
        DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120n
in the above snip, the line ¨DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2¨ has a * next to udma2. i know this is supposed to indicate the current active option, but does this explain the hdparm error?

here is a relavent snip from lspci...

Code: Select all

0000:00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03) (prog-if 80 [Master])
        Subsystem: Dell: Unknown device 0182
        Flags: bus master, 66Mhz, medium devsel, latency 0, IRQ 5
        I/O ports at <ignored>
        I/O ports at <ignored>
        I/O ports at <ignored>
        I/O ports at <ignored>
        I/O ports at bfa0 [size=16]
        Capabilities: [70] Power Management version 2
here is a relavent section of my kernel config...

Code: Select all

#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_CMD640=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_PIIX=y
CONFIG_BLK_DEV_VIA82CXXX=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y
so... any ideas?

i think there may be another useful output snip somewhere in /sys or /proc, but i cant find it.
Last edited by jimonade on Tue Feb 21, 2006 11:39 pm, edited 3 times in total.
Top
cabe
n00b
n00b
Posts: 63
Joined: Thu Nov 25, 2004 5:11 pm

  • Quote

Post by cabe » Wed May 25, 2005 7:04 am

i'm also having this problem.
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

  • Quote

Post by jimonade » Wed May 25, 2005 9:19 pm

i dont know if this is related... but hdparm has problems with my sata drive (/dev/sda) as well.

Code: Select all

ramiken root # hdparm /dev/sda

/dev/sda:
 IO_support   =  0 (default 16-bit)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 7296/255/63, sectors = 60011642880, start = 0

Code: Select all

ramiken root # hdparm -I /dev/sda

/dev/sda:
 HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device

Code: Select all

ramiken root # hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:   2492 MB in  2.00 seconds = 1244.94 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
 Timing buffered disk reads:  104 MB in  3.05 seconds =  34.06 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

Code: Select all

ramiken root # hdparm -d1 /dev/sda

/dev/sda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Inappropriate ioctl for device
is hdparms output for the sata hard disk and cdrw/dvd drive indicative of a larger problem? or anything?
Top
Rad
Guru
Guru
Posts: 403
Joined: Wed Feb 11, 2004 10:51 am
Location: Bern, Switzerland

  • Quote

Post by Rad » Wed May 25, 2005 9:23 pm

Try a different DMA mode. Like -X66 or -X33.
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

  • Quote

Post by jimonade » Thu May 26, 2005 4:12 am

the cd drive is listed in dmesg output as...

Code: Select all

hdc: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache
lets try a different dma mode...

Code: Select all

ramiken root # hdparm -d1 -X66 /dev/hdc

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 setting xfermode to 66 (UltraDMA mode2)
 using_dma    =  0 (off)
after executing the above command i lost control of the terminal (no ^C)...

Code: Select all

ramiken root # ps -A | grep hdparm
21695 pts/5    00:00:00 hdparm
had some trouble getting rid of the (hung?) process...

Code: Select all

ramiken root # ps -A | grep hdparm
21695 pts/5    00:00:00 hdparm
ramiken root # kill 21695
ramiken root # ps -A | grep hdparm
21695 pts/5    00:00:00 hdparm
ramiken root # kill -9 21695
ramiken root # ps -A | grep hdparm
21695 pts/5    00:00:00 hdparm
ramiken root # killall hdparm
ramiken root # ps -A | grep hdparm
21695 pts/5    00:00:00 hdparm
i close the xterm at this point and...

Code: Select all

ramiken root # ps -A | grep hdparm
21695 ?        00:00:00 hdparm
lets try the 33 just for fun...

Code: Select all

ramiken root # hdparm -d1 -X33 /dev/hdc
no output after this command, no control of the xterm it was executed from (no ^C).

after all this dmesg says...

Code: Select all

hdc: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdc: request sense failure: error=0x04 { AbortedCommand }
hdc: CHECK for good STATUS
any ideas?
Top
SuperV
n00b
n00b
User avatar
Posts: 44
Joined: Fri Nov 08, 2002 5:02 pm
Location: Arizona

same symptoms

  • Quote

Post by SuperV » Tue May 31, 2005 6:22 pm

I've got the same stuff going on, found another post that IDE DMA wasnt enabled in the kernel config, but i've checked dozens of times, even gone thru a fresh recompile, and still cannot get this interface to allow DMA transfers, which leads to absolutely dismal performance when playing dvd's

I've got the same line of laptop as the poster above, but it's a D810, instead. Basically the same guts.

My next step is to get a fresh vanilla from kernel.org and see if that fixes it, perhaps the gentoo kernel got a little overzealous with the patching, and b0rked a couple things up.

Perhaps a gentoo kernel package maintainer could chime in here?
Top
SuperV
n00b
n00b
User avatar
Posts: 44
Joined: Fri Nov 08, 2002 5:02 pm
Location: Arizona

still no go

  • Quote

Post by SuperV » Tue May 31, 2005 8:35 pm

tried the vanilla 2.6.12 kernel, everything should be working, and it simply will not let me set /dev/hdc to usa DMA. not sure if something broken with hdparm not being able to set it, in which case, a bug should probably get recorded somewhere, or if it's the kernel itself, but the fact that 2 different version don't allow the DMA to be set, and this laptop came with windows and had it all enabled, leads me to beleive something is amiss with the 915 chipset under linux.
Top
linumik
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 102
Joined: Tue May 31, 2005 9:04 pm

  • Quote

Post by linumik » Tue May 31, 2005 9:43 pm

I had the same problem and solved it by disabling generic IDE support (I compiled it as module). Actually I don't load any of the ide modules.

This moved DVD device from /dev/hdc to /dev/scd0, so you need to change udev configs or make correct symbolic links in the /dev directory.

DVD playback is nice and smooth now. Although hdparm still complains about ioctls

Code: Select all

hdparm /dev/scd0

/dev/scd0:
 IO_support   =  0 (default 16-bit)
 readonly     =  0 (off)
 readahead    = 256 (on)
 HDIO_GETGEO failed: Inappropriate ioctl for device

hdparm -i /dev/scd0
/dev/scd0:
 HDIO_GET_IDENTITY failed: Inappropriate ioctl for device
Here is my config, if anyone needs it.

Code: Select all

#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=m
CONFIG_BLK_DEV_IDE=m

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_IDEDISK is not set
CONFIG_BLK_DEV_IDECS=m
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDETAPE=m
CONFIG_BLK_DEV_IDEFLOPPY=m
CONFIG_BLK_DEV_IDESCSI=m
CONFIG_IDE_TASK_IOCTL=y

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=m
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=m
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y

CONFIG_BLK_DEV_PIIX=m
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y

#
# SCSI device support
#
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=m
CONFIG_CHR_DEV_OSST=m
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_SATA=y
CONFIG_SCSI_ATA_PIIX=y
CONFIG_SCSI_QLA2XXX=y

*edit* and here is my dmesg output

Code: Select all

ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
ata1: dev 0 cfg 49:2f00 82:346b 83:5b09 84:4003 85:346b 86:1809 87:4003 88:203f
ata1: dev 0 ATA, max UDMA/100, 117210240 sectors:
ata1: dev 0 configured for UDMA/100
scsi0 : ata_piix
  Vendor: ATA       Model: WDC WD600VE-75HD  Rev: 09.0
  Type:   Direct-Access                      ANSI SCSI revision: 05
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xBFA8 irq 15
ata2: dev 0 cfg 49:0f00 82:0000 83:0000 84:0000 85:0000 86:0000 87:0000 88:0407
ata2: dev 0 ATAPI, max UDMA/33
ata2: dev 0 configured for UDMA/33
scsi1 : ata_piix
  Vendor: PHILIPS   Model: CDRW/DVD CDD5263  Rev: UD91
  Type:   CD-ROM                             ANSI SCSI revision: 05
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda3
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

  • Quote

Post by jimonade » Fri Jun 10, 2005 10:42 pm

i have that i915 chipset so i guess that could explain it. i disabled generic ide support in my kernel and lost access completely to my cdrom. i still have no idea how to fix it. i'll try some more kernel configs and post results.

here are some relavents from dmesg...

Code: Select all

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide0: I/O resource 0x1F0-0x1F7 not free.
ide0: ports already in use, skipping probe
Probing IDE interface ide1...
hdc: _NEC DVD+/-RW ND-6500A, ATAPI CD/DVD-ROM drive
Probing IDE interface ide2...
Probing IDE interface ide3...
Probing IDE interface ide4...
Probing IDE interface ide5...
ide1 at 0x170-0x177,0x376 on irq 15
hdc: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20
libata version 1.10 loaded.
ata_piix version 1.03
ACPI: PCI interrupt 0000:00:1f.2[B] -> GSI 5 (level, low) -> IRQ 5
ata: 0x170 IDE port busy
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
ata1: dev 0 cfg 49:2b00 82:346b 83:5b29 84:6003 85:3469 86:9a09 87:6003 88:203f
ata1: dev 0 ATA, max UDMA/100, 117210240 sectors:
ata1: dev 0 configured for UDMA/100
scsi0 : ata_piix
  Vendor: ATA       Model: FUJITSU MHV2060A  Rev: 0000
  Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda3 < sda5 sda6 sda7 >
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
Top
linumik
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 102
Joined: Tue May 31, 2005 9:04 pm

no ide

  • Quote

Post by linumik » Sat Jun 11, 2005 2:20 am

I also have d610 laptop. You don't need IDE modules at all for it. Only SCSI. After I set it this way my DVD plays perfectly. Have you tried what I suggested in the previous message?
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

Re: no ide

  • Quote

Post by jimonade » Sat Jun 11, 2005 7:39 pm

yes, i've tried, but i dont think i've got my kernel config right yet. i cant get:
linumik wrote: Vendor: PHILIPS Model: CDRW/DVD CDD5263 Rev: UD91
Type: CD-ROM ANSI SCSI revision: 05
to show up in my dmesg.

in your config, you have several ide options enabled as modules. is that just in case you attach an ide device to your laptop in the future?

in your config, you specify QLogic support (CONFIG_SCSI_QLA2XXX=y). i have all the QLogic support enabled after looking at your config, but i dont understand why it's needed.

i've tried a config with no ide options, and one with ide as modules and still no luck.

also, how did you know that the device node for the drive would be /dev/scd0?

here is my current dmesg situation, i think im getting closer...

Code: Select all

ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
ata1: dev 0 cfg 49:2b00 82:346b 83:5b29 84:6003 85:3469 86:9a09 87:6003 88:203f
ata1: dev 0 ATA, max UDMA/100, 117210240 sectors:
ata1: dev 0 configured for UDMA/100
scsi0 : ata_piix
  Vendor: ATA       Model: FUJITSU MHV2060A  Rev: 0000
  Type:   Direct-Access                      ANSI SCSI revision: 05
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xBFA8 irq 15
ata2: dev 0 cfg 49:0b00 82:0000 83:0000 84:0000 85:0000 86:0000 87:0000 88:0407
ata2: dev 0 ATAPI, max UDMA/33
ata2: dev 0 configured for UDMA/33
scsi1 : ata_piix
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda3 < sda5 sda6 sda7 >
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

  • Quote

Post by jimonade » Sat Jun 11, 2005 7:54 pm

i just noticed something... we may have the same latitude d610 model, but we have different drives.

you have a WesternDigital hard drive and a Phillips cdrw/dvd drive.
i have a FUJITSU MHV2060AH hard drive and a NEC DVD+-RW ND-6500A.

im not sure if this matters much, i bet we still have the same mainboard controllers.
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

  • Quote

Post by jimonade » Sun Jun 12, 2005 9:49 am

i found this today while trying to get the i915GM display working. trying it now...
lancealtar wrote:Okay, I'm posting because it took me a very long time to find the answers to these questions.
#1) I was having problems because my CDRW/DVD-ROM would not allow me to hdparm -d 1 /dev/hdc
I was getting this error

Code: Select all

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
So after a very long time searching a friend help me find http://forums.gentoo.org/viewtopic-t-27 ... cdrom.html.
What I did was make sure that Device Drivers ---> ATA/ATAP/MFM/RLL support ---> ATA/ATAPI/MFM/RLL is NOT Selected
I don't have any PATA so why have it? then you have to do this

Code: Select all

in /usr/src/linux/include/linux/libata.h change
#undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */
to
#define ATA_ENABLE_ATAPI /* define to enable ATAPI support */ 
Then do your make && make modules_install && make install
Make sure /boot is mounted (duh). Or use your genkernel, whatever you like.
Reboot and you shouldn't have any problem with your cdrom showing up as a SCSI device. You might have to change your /dev/cdroms/cdrom0 to point to /dev/sr0 but that's minimal.
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

  • Quote

Post by jimonade » Sun Jun 12, 2005 10:14 am

good news, after the above changes it works, how exciting. dvd playback is quite smooth now.

dmesg says

Code: Select all

ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
ata1: dev 0 cfg 49:2b00 82:346b 83:5b29 84:6003 85:3469 86:9a09 87:6003 88:203f
ata1: dev 0 ATA, max UDMA/100, 117210240 sectors:
ata1: dev 0 configured for UDMA/100
scsi0 : ata_piix
  Vendor: ATA       Model: FUJITSU MHV2060A  Rev: 0000
  Type:   Direct-Access                      ANSI SCSI revision: 05
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xBFA8 irq 15
ata2: dev 0 cfg 49:0b00 82:0000 83:0000 84:0000 85:0000 86:0000 87:0000 88:0407
ata2: dev 0 ATAPI, max UDMA/33
ata2: dev 0 configured for UDMA/33
scsi1 : ata_piix
  Vendor: _NEC      Model: DVD+-RW ND-6500A  Rev: 202C
  Type:   CD-ROM                             ANSI SCSI revision: 05
st: Version 20041025, fixed bufsize 32768, s/g segs 256
osst :I: Tape driver with OnStream support version 0.99.3
osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda3 < sda5 sda6 sda7 >
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
im using udev, and the cdrw/dvd drive was available through the node /dev/sr0 and was symlinked at /dev/cdrw and /dev/cdrom by udev. here is my /etc/udev/cdsymlinks.conf file...

Code: Select all

# Configuration file for cdsymlinks

# Output links for these types of devices.
# Allowed keywords are CD, CDR, CDRW, DVD, DVDRW, DVDRAM, CDMRW, CDWMRW.
# Other words are accepted but ignored.
OUTPUT="CD CDRW DVD DVDRW DVDRAM"

# Whether to output numbered links.
# 1 = output 'cdrom1', 'dvd1' etc. for other devices
# 0 = don't output 'cdrom1', 'dvd1' etc.
# We always output 'cdrom', 'dvd' etc. for the best-match devices.
NUMBERED_LINKS=1
thanks so much for the help.
Top
linumik
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 102
Joined: Tue May 31, 2005 9:04 pm

Congrats

  • Quote

Post by linumik » Sun Jun 12, 2005 3:40 pm

I am glad you were able to fix the problem. Apparently same laptops can have some differences :-\ I still can't make DRI work, but some people report success there as well.
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

  • Quote

Post by jimonade » Wed Jun 22, 2005 6:19 pm

as a warning to others, the below kernel source edit made my system unstable. the system would hang at seemingly random times. after changing the kernel source back, the problem went away.

so i can either have a stable system or DMA enabled, but not both. bummer. can anyone suggest a next step? does this qualify as a kernel bug? feature request? im not sure if i should just wait until its fixed or if i should be proactive.
jimonade wrote:i found this today while trying to get the i915GM display working. trying it now...
lancealtar wrote:Okay, I'm posting because it took me a very long time to find the answers to these questions.
#1) I was having problems because my CDRW/DVD-ROM would not allow me to hdparm -d 1 /dev/hdc
I was getting this error

Code: Select all

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
So after a very long time searching a friend help me find http://forums.gentoo.org/viewtopic-t-27 ... cdrom.html.
What I did was make sure that Device Drivers ---> ATA/ATAP/MFM/RLL support ---> ATA/ATAPI/MFM/RLL is NOT Selected
I don't have any PATA so why have it? then you have to do this

Code: Select all

in /usr/src/linux/include/linux/libata.h change
#undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */
to
#define ATA_ENABLE_ATAPI /* define to enable ATAPI support */ 
Then do your make && make modules_install && make install
Make sure /boot is mounted (duh). Or use your genkernel, whatever you like.
Reboot and you shouldn't have any problem with your cdrom showing up as a SCSI device. You might have to change your /dev/cdroms/cdrom0 to point to /dev/sr0 but that's minimal.
Top
Poetic Intensity
n00b
n00b
Posts: 7
Joined: Sat Jan 24, 2004 12:17 am
Location: Orem, UT
Contact:
Contact Poetic Intensity
Website

Slight Problem with libata.h

  • Quote

Post by Poetic Intensity » Wed Jan 04, 2006 12:08 am

After searching my libata.h file for the requested "#undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */", my search came up blank. Seems like the file doesn't even have that line in it.

So, I tried adding "#define ATA_ENABLE_ATAPI" to it, and rebooting (after making all the other necessary changes) and my CDROM came up missing again.

Any suggestions?
--Poetic Intensity
Top
linumik
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 102
Joined: Tue May 31, 2005 9:04 pm

Re: Slight Problem with libata.h

  • Quote

Post by linumik » Wed Jan 04, 2006 3:19 am

Poetic Intensity wrote:After searching my libata.h file for the requested "#undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */", my search came up blank. Seems like the file doesn't even have that line in it.

So, I tried adding "#define ATA_ENABLE_ATAPI" to it, and rebooting (after making all the other necessary changes) and my CDROM came up missing again.

Any suggestions?
http://forums.gentoo.org/viewtopic-p-29 ... ml#2904081
Top
Poetic Intensity
n00b
n00b
Posts: 7
Joined: Sat Jan 24, 2004 12:17 am
Location: Orem, UT
Contact:
Contact Poetic Intensity
Website

Hooray!

  • Quote

Post by Poetic Intensity » Wed Jan 04, 2006 2:15 pm

Thanks for the tip. Works perfectly now.
--Poetic Intensity
Top
matrixon
n00b
n00b
Posts: 1
Joined: Wed Feb 01, 2006 11:39 pm

re

  • Quote

Post by matrixon » Wed Feb 01, 2006 11:41 pm

im having the same problem i have donde the things u say and now it recognices my device but i cant found it in /dev
when i run lsscsi displays the drive but where its suppose to say which /dev its is it says - how can i fix this?
Top
bollucks
l33t
l33t
Posts: 606
Joined: Wed Oct 27, 2004 11:49 pm

  • Quote

Post by bollucks » Thu Feb 02, 2006 12:46 am

SATA drives always have DMA enabled; there is no PIO for S-ATA, only P-ATA. hdparm does not work with s-ata drives.
Top
aslocum
Apprentice
Apprentice
Posts: 217
Joined: Fri May 28, 2004 10:30 am
Location: Germany, Frankfurt

  • Quote

Post by aslocum » Mon Feb 06, 2006 7:24 am

ok.. ive got the same problems as anyone here with kernel 2.6.15
the kernel want to map the drive to /dev/hdc and no dma...choppy dvd playback :)

i own a dell d610 with the dvd/cd-rw combo.

here is a short overview for all with newer kernels, just to concentrate the above tips in this post.

open the /usr/src/include/linux/libata.h in any editor


search for ATA_ENABLE_ATAPI... just to make sure if you have it.. but normaly not in .15 kernels.

change the following lines:

from
#undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */
to
#define ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */
#define ATA_ENABLE_ATAPI /* define to enable ATAPI support */

now we want to make the kernel config:

make menuconfig
make sure you have the following things:

device drivers --->ATA/ATAPI/MFM/RLL support --->

<*> ATA/ATAPI/MFM/RLL support
<*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support (not sure about this.. but it wont harm anyway ;))
<*> Include IDE/ATAPI CDROM support
[*] PCI IDE chipset support (also unsure.. but ^^:))
< > generic/default IDE chipset support <-- THIS IS A MUST..unchecked!or as module
nothing else checked

SCSI device support --->
[*] legacy /proc/scsi/ support
<*> SCSI disk support
<*> SCSI CDROM support
<*> SCSI generic support
and maybe [*] Probe all LUNs on each SCSI device (for multi-cardreaders and similar things)

SCSI low-level drivers --->
<*> Serial ATA (SATA) support
<*> Intel PIIX/ICH SATA support

make && make modules_install && make install

next reboot your drive will be /dev/sr0 with dma enabled by default

create a rule for udev:

nano /etc/udev/rules.d/10-cdrom.rules
BUS=="scsi", KERNEL=="sr[0-9]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c %c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"

now you can use your cdrom as /dev/cdrw or /dev/cdrom (both are valid)
Dell Latitude d610 1.6Ghz 1GB
gcc-4.0.3 2.6.15-no3
Reiser4
Top
jimonade
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 92
Joined: Wed Apr 21, 2004 11:18 pm
Location: USA, West Lafayette, IN
Contact:
Contact jimonade
Website

  • Quote

Post by jimonade » Tue Feb 21, 2006 11:38 pm

my working solution was found at http://gentoo-wiki.com/HARDWARE_Dell_Latitude_D610... by simply adding this line to grub.conf's kernel line all my troubles went away.

Code: Select all

libata.atapi_enabled=1
Top
Post Reply

23 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic