Page 1 of 1

DMA on DVD drive [solved]

Posted: Sun Jun 11, 2006 2:31 am
by squashball
Was anybody able to activate dma acces for the DVD drive on a T60?
I was following this Howto but had no success...
http://www.thinkwiki.org/wiki/Problems_ ... _DVD_drive
Regards, Florian

Posted: Mon Jun 19, 2006 6:08 am
by squashball
fixed thanks to Whoopie:
Your T60 uses AHCI by default. You have to change the BIOS settings to "compatibility mode" to use the HDD and DVD drive with ata_piix. Then, you're also able to hotswap your ultrabay. But for this, a patch for ibm_acpi is needed.

Posted: Wed Jun 21, 2006 4:07 am
by trevlix
I don't suppose you can post exactly what you did? I followed the instructions (and put the SATA in compatability mode) and am not able to get DMA turned on with my DVD. I have a T60P, but don't think it should be that different.

Posted: Wed Jun 21, 2006 4:13 am
by squashball
can you post the output of

Code: Select all

dmesg | grep -i ata
and

Code: Select all

dmesg | grep -i dma

Posted: Wed Jun 21, 2006 1:54 pm
by trevlix
Sure - here you go:

dmesg | grep -i ata
[17179569.184000] BIOS-e820: 000000007fee0000 - 000000007fef3000 (ACPI data)
[17179569.184000] Kernel command line: root=/dev/sda3 ro sda=noprobe scd0=noprobe libata.atapi_enabled=1
[17179569.184000] Unknown boot option `libata.atapi_enabled=1': ignoring
[17179569.184000] Memory: 2065036k/2096000k available (2101k kernel code, 29832k reserved, 592k data, 332k init, 1178496k highmem)
[17179571.028000] libata version 1.20 loaded.
[17179571.028000] ata_piix 0000:00:1f.2: version 1.05
[17179571.028000] ata_pci_initb]_one: pci_dev class+intf: 0x10180
[17179571.028000] ata_pci_init_one: NO_LEGACY == 0
[17179571.028000] ata1: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0x18B0 irq 14
[17179571.948000] ata1: dev 0 cfg 00:045a 49:0f00 82:746b 83:7f69 84:6063 85:7469 86:3c49 87:6063 88:203f 93:0000
[17179571.948000] ata1: dev 0 ATA-7, max UDMA/100, 195371568 sectors: LBA48
[17179571.948000] ata_acpi_push_id: skipping for PATA mode
[17179571.948000] ata1: dev 0 configured for UDMA/100
[17179571.948000] pata_get_dev_handle: ENTER: dev->bus_id='0000:00:1f.2'
[17179571.948000] pata_get_dev_handle: dev_handle: 0xdffde820, parent_handle: 0xc23304c0
[17179571.948000] pata_get_dev_handle: for dev=0x1f.2, addr=0x1f0002, parent=0xdff4b400, *handle=0xdffde820
[17179571.948000] scsi0 : ata_piix
[17179571.948000] Vendor: ATA Model: HTS721010G9SA00 Rev: MCZI
[17179571.952000] pata_get_dev_handle: ENTER: dev->bus_id='0000:00:1f.2'
[17179571.952000] pata_get_dev_handle: dev_handle: 0xdffde820, parent_handle: 0xc23304c0
[17179571.952000] pata_get_dev_handle: for dev=0x1f.2, addr=0x1f0002, parent=0xdff4b400, *handle=0xdffde820
[17179571.952000] ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x18B8 irq 15
[17179573.636000] ata2: dev 0 cfg 00:85c0 49:0f00 82:0000 83:0000 84:0000 85:0000 86:0000 87:0000 88:0407 93:4000
[17179573.636000] ata2: dev 0 ATAPI, max UDMA/33
[17179573.636000] ata2(0): applying bridge limits
[17179573.636000] ata_acpi_push_id: skipping for PATA mode
[17179573.636000] ata2: dev 0 configured for UDMA/33
[17179573.636000] pata_get_dev_handle: ENTER: dev->bus_id='0000:00:1f.2'
[17179573.636000] pata_get_dev_handle: dev_handle: 0xdffde820, parent_handle: 0xc23304c0
[17179573.636000] pata_get_dev_handle: for dev=0x1f.2, addr=0x1f0002, parent=0xdff4b400, *handle=0xdffde820
[17179573.636000] scsi1 : ata_piix
[17179573.644000] pata_get_dev_handle: ENTER: dev->bus_id='0000:00:1f.2'
[17179573.644000] pata_get_dev_handle: dev_handle: 0xdffde820, parent_handle: 0xc23304c0
[17179573.644000] pata_get_dev_handle: for dev=0x1f.2, addr=0x1f0002, parent=0xdff4b400, *handle=0xdffde820
[17179575.604000] EXT3-fs: mounted filesystem with ordered data mode.
[17179585.708000] ieee80211_1_1_13: 802.11 data/management/control stack, 1.1.13
[17179585.772000] ieee80211: 802.11 data/management/control stack, git-1.1.7
[17179592.404000] Assertion failed! qc->n_elem > 0,drivers/scsi/libata-core.c,ata_fill_sg,line=2531
[17180474.804000] Assertion failed! qc->n_elem > 0,drivers/scsi/libata-core.c,ata_fill_sg,line=2531
dmesg | grep -i dma
[17179569.184000] DMA zone: 4096 pages, LIFO batch:0
[17179569.184000] DMA32 zone: 0 pages, LIFO batch:0
[17179571.028000] ata1: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0x18B0 irq 14
[17179571.948000] ata1: dev 0 ATA-7, max UDMA/100, 195371568 sectors: LBA48
[17179571.948000] ata1: dev 0 configured for UDMA/100
[17179571.952000] ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x18B8 irq 15
[17179573.636000] ata2: dev 0 ATAPI, max UDMA/33
[17179573.636000] ata2: dev 0 configured for UDMA/33
[17179585.916000] nsc_ircc_pnp_probe() : From PnP, found firbase 0x2F8 ; irq 3 ; dma 1.
[17179602.120000] [fglrx] Maximum main memory to use for locked dma buffers: 1897 MBytes.

Posted: Wed Jun 21, 2006 2:07 pm
by squashball
so your dma seems to be on, doesn't it?

Posted: Wed Jun 21, 2006 2:37 pm
by trevlix
Right, which is the problem. When I run hdparm -d1 /dev/scd0 I get the following:
/dev/scd0:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Inappropriate ioctl for device
I'm trying to figure out what I'm doing wrong. I'm using Ububtu 6.06 if it matters. This is what I've done:

1. Set SATA BIOS setting to compatability mode.
2. Created /etc/modprobe.d/atapienable as per the instructions
3. Added the following lines to /etc/modprobe.d/options:

options libata atapi_enabled=1
options ide hdc=noprobe

4. Ran "update-initramfs -u" as root.
5. Reboot.

Did I miss a step?

Posted: Wed Jun 21, 2006 3:14 pm
by squashball
Nothing wrong :-)
hdparm doesn't work with sata - that's all!
Your DMA is on!

Posted: Wed Jun 21, 2006 3:38 pm
by trevlix
OK - I feel stupid now. :)

So I guess my DVD playing problem isn't related to that then. :) I'll post that in another thread.