Opened 13 years ago

Closed 13 years ago

#316 closed defect (fixed)

Real CD-ROM not working

Reported by: Jiri Svoboda Owned by: Jiri Svoboda
Priority: major Milestone: 0.5.0
Component: helenos/unspecified Version:
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

While ata_bd does work with the emulated CD-ROM inside Qemu, it does not work with the real thing. It does not detect it.

Attachments (1)

ata-packet-detect.diff (2.7 KB ) - added by Alex 13 years ago.
Patch implementing more correct packet device detection

Download all attachments as: .zip

Change History (6)

comment:1 by Jiri Svoboda, 13 years ago

Owner: set to Jiri Svoboda
Status: newaccepted

comment:2 by Jiri Svoboda, 13 years ago

ata_bd does not use the 'right' way of detecting ATA(PI) devices. It tries to issue an ATA device identify command. If that times out, it assumes there's no device.

The problem seems to be that during issuing the identify command, the driver waits for DRDY (device ready) status. However, ATAPI devices don't set DRDY, at least not until they receive the first packet command (this is one of the backward-compatibility measures).

Problem is that at this point the setting of DRDY is the only thing that ata_bd uses to tell if there is a device — it usually waits for not BSY and DRDY. If there is no device, BSY will be always false, so this alone is not sufficient.

It would probably be best to implement a more 'standard' way of detecting the devices.

by Alex, 13 years ago

Attachment: ata-packet-detect.diff added

Patch implementing more correct packet device detection

comment:3 by Jiri Svoboda, 13 years ago

I had a similar fix on my hard disk. I applied Alex's patch with cosmetic subsequent modification. Now the state with my CD-ROM is that it is detected as a packet device, but then the identify packet device command takes a long time to complete and the inquiry packet command just times out.

comment:4 by Jiri Svoboda, 13 years ago

Jiří Kavalík reports the driver to work with his ATAPI DVD writer. This could mean that the problem is specific to my hardware setup. I am using a SATA Blu-Ray writer, the SATA controller running in ATAPI emulation mode. It could be some quirk or simply my HW is more sensitive to what the driver does and needs some extra push to do the right thing. I guess I will close this ticket now, since it has served its purpose and ATAPI seems to work now (in general). I'll probably do more experimenting and see if I can get it working with my drive as well.

comment:5 by Jiri Svoboda, 13 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.