Tuesday, October 24, 2006

SATA DVD on FreeBSD

I have SATA DVD burner and it is not recognised by my FreeBSD-6.1
I figured it out that SATA ATAPI device does not get reset signal before beeing detected.
I added reset ATA call in ata-chipset.c:ata_sata_connect() function before retrieval of ATAPI_MAGIC_LSB status code:

ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_IDS | ATA_A_RESET);
ata_udelay(10000);
ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_IDS);
ata_udelay(100000);
ATA_IDX_INB(ch, ATA_ERROR);


It is not the complete patch to make serial ATAPI working, sometimes it gives arrors at the end of write session, but it produces valid DVD and CD.