Opened 14 years ago
Closed 14 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)
Change History (6)
comment:1 by , 14 years ago
Owner: | set to |
---|---|
Status: | new → accepted |
comment:2 by , 14 years ago
by , 14 years ago
Attachment: | ata-packet-detect.diff added |
---|
Patch implementing more correct packet device detection
comment:3 by , 14 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 , 14 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 , 14 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed in changeset:mainline,916.
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.