# Odd burner behavior (IBM TP T43, Intel ICH6-M, ata_piix)

## nhaggin

Greetings, all. Apologies if this is redundant, but a few searches didn't find anything quite like it.

I've been experiencing an unusual problem using the DVD burner in my IBM Thinkpad T43. It will burn DVD+R media just fine, and it will burn CD-R media, if I tell cdrecord to run in TAO mode. In SAO/DAO, however, cdrecord dies with the following output:

```
Starting to write CD/DVD at speed 24 in real SAO mode for single session.

Last chance to quit, starting real write    0 seconds. Operation starts.

Waiting for reader process to fill input buffer ... input buffer ready.

BURN-Free is ON.

Performing OPC...

Sending CUE sheet...

cdrecord: WARNING: Drive returns wrong startsec (0) using -150

Writing pregap for track 1 at -150

cdrecord: Success. write_g1: scsi sendcmd: no error

CDB:  2A 00 FF FF FF 6A 00 00 1F 00

status: 0x2 (CHECK CONDITION)

Sense Bytes: 00 00 00 00 00 00 00 00

Sense Key: 0xFFFFFFFF [], Segment 0

Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0

Sense flags: Blk 0 (not valid) 

cmd finished after 0.010s timeout 200s

write track pad data: error after 0 bytes

cdrecord: Input/output error. read buffer cap: scsi sendcmd: no error

CDB:  5C 00 00 00 00 00 00 00 0C 00

status: 0x2 (CHECK CONDITION)

Sense Bytes: 70 00 02 00 00 00 00 0A 00 00 00 00 04 08 00 00

Sense Key: 0x2 Not Ready, Segment 0

Sense Code: 0x04 Qual 0x08 (logical unit not ready, long write in progress) Fru 0x0

Sense flags: Blk 0 (not valid) 

cmd finished after 0.009s timeout 200s

Starting new track at sector: 0

Track 01:    0 of  586 MB written.cdrecord: Input/output error. write_g1: scsi sendcmd: no error

CDB:  2A 00 00 00 00 00 00 00 1F 00

status: 0x2 (CHECK CONDITION)

Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 21 02 00 00

Sense Key: 0x5 Illegal Request, Segment 0

Sense Code: 0x21 Qual 0x02 (invalid address for write) Fru 0x0

Sense flags: Blk 0 (not valid) 

cmd finished after 0.022s timeout 200s

write track data: error after 0 bytes

cdrecord: The current problem looks like a buffer underrun.

cdrecord: It looks like 'driveropts=burnfree' does not work for this drive.

cdrecord: Please report.

cdrecord: Make sure that you are root, enable DMA and check your HW/OS set up.

cdrecord: Input/output error. test unit ready: scsi sendcmd: no error

CDB:  00 00 00 00 00 00

status: 0x2 (CHECK CONDITION)

Sense Bytes: 70 00 02 00 00 00 00 0A 00 00 00 00 04 08 00 00

Sense Key: 0x2 Not Ready, Segment 0

Sense Code: 0x04 Qual 0x08 (logical unit not ready, long write in progress) Fru 0x0

Sense flags: Blk 0 (not valid)
```

This happens both if I burn as root and as my user. cdrecord has mode 0660, and is owned by root:cdrw. My user is a member of the cdrw group. I believe my drive has a PATA interface and is accessed via pass-through on the ICH6-M SATA controller; in order to get DMA working with it I had to #define ATA_ENABLE_PATA and ATA_ENABLE_ATAPI in libata.h.

Output of cdrecord -scanbus:

```
scsibus0:

        0,0,0     0) 'ATA     ' 'FUJITSU MHT2060A' '8471' Disk

        0,1,0     1) *

        0,2,0     2) *

        0,3,0     3) *

        0,4,0     4) *

        0,5,0     5) *

        0,6,0     6) *

        0,7,0     7) *

scsibus1:

        1,0,0   100) 'MATSHITA' 'DVD-RAM UJ-822S ' '1.03' Removable CD-ROM

        1,1,0   101) *

        1,2,0   102) *

        1,3,0   103) *

        1,4,0   104) *

        1,5,0   105) *

        1,6,0   106) *

        1,7,0   107) *
```

Any thoughts?

----------

## Mindstab

Ha

you do have a different laptop than I but you are ahead of me

I cant get any dma to work on mine

could you post your kernel config please? I also have the ich-6 sata controler and same ahrd drive dvd drive except i dont think mine is removable

its still working only on ide, so i m getting 500kb/s from hdparm -t /dev/hdc  :Sad: 

thanks

----------

## nhaggin

I don't have my kernel config accessible right at the moment, but here's a brief summary of what I did to get DMA:

1. The standard IDE subsystem is not needed. Don't compile any of it.

2. Enable SCSI disk and CD-ROM support under the SCSI subsystem, as well as the driver for the ICH6-M.

3. In /path/to/linuxsrc/include/linux/libata.h, you will find the following two lines near the beginning:

#undef ATA_ENABLE_PATA

#undef ATA_ENABLE_ATAPI

Change them to

#define ATA_ENABLE_PATA 1

#define ATA_ENABLE_ATAPI 1

YMMV on other chipsets with Step 3; the ICH6-M driver is one of the few that actually has passthrough support.

Rebuild the kernel and reboot; you should now have DMA.

----------

## Mindstab

ha

well thanks

We still havent solved youre problem but you've helped me at least get my drive onto the scsi bus and able to play dvds

Thanks a million.

Karmically you deserve to have your problem fixed.

Well doing some reading, I found this on the gentoo wiki about sata drives 

http://gentoo-wiki.com/HARDWARE_SATA

Which mentioned that dvd burners on pata interfaces (us?) cant burn yet.

These drivers (libata etc) are still in  bigish dev (which is why we have to uncomment the support for ata and pata becasue not all the driers support it yet)

At the bottom there is a patch that may be of use, I'm not sure.

might take some more looking around, the wiki looked useful  :Smile: 

good luck

----------

## blitz303

i don't konw if you are still watching this thread, but I also have a T43 and I have the same problem.  Earlier I was using the PATA cdrom driver, but per your suggestion, I disabled compilation of that and am now using only SATA everything.  However, I can't seem to get my dvd writer (I believe I have the same as yours) recognized by cdrecord -scanbus.  

Earlier, I was using dev=ATAPI, and I ran into pretty much the same exact problem you did burning dvd's.  The only difference is that I had that problem burning cd's, and for some reason DMA was not enabled (which could be the source of the problem).

If you ever do find it, please post the relevent parts of your .config, because I can't seem to get my dvd burner on the scsi bus

----------

## tuppe666

In 2.6.14 you cannot define ATA_ENABLE_ATAPI as its not there anymore  :Sad: 

----------

## JohnN

Could someone who has DMA working on a T43 post their kernel config? I have not been able to get it to work with 2.6.11, 13 or 14, and these tips are not working for me. I'm missing something...

----------

## jlward4th

In 2.6.14 you can now set a kernel parameter: libata.atapi_enabled=1

```
kernel /linux-2.6.14-suspend2 root=/dev/sda4 resume2=swap:/dev/sda3 vmalloc=256m video=vesafb:1600x1200-32@65 splash=silent,theme:chamonix1 CONSOLE=/dev/tty1 libata.atapi_enabled=1
```

----------

## blitz303

Following the instructions in the new Hardware SATA guide http://gentoo-wiki.com/HARDWARE_SATA, I've been able to make this work.  This includes defining

ATA_ENABLE_ATAPI    and

ATAPI_ENABLE_DMADIR

in /usr/src/linux/include/linux/libata.h.  Also, I have put my .config online here.  

Be aware that this is for kernel version

2.6.13-gentoo-r5.  

For now I only know that I have dvd reading working.  I have yet to test cd/dvd burning, but I will soon.  Good luck to anyone

that has yet to get full functionality with their tp43

----------

## JohnN

Does this require the boot option  "libata.atapi_enabled=1" mentioned in the previous post?

----------

## blitz303

 *JohnN wrote:*   

> Does this require the boot option  "libata.atapi_enabled=1" mentioned in the previous post?

 

Nah, not for 2.6.13.  I'm going to be moving to 2.6.14 right now though, so I'd immagine those options would help me.

----------

## Scratalacha

Personally, I would consider yourself lucky that youre able to get yours to burn even. I have a Thinkpad T43p and I have not yet gotten it to burn a single CD/DVD to date. Additionally, it cannot read certain DVD's without spewing I/O errors till the cows come home, I suspect this has something to do with dual-layer discs. I have tried all the tricks/tips ive seen and ive yet to get it working :/

----------

