cdparanoia patch for ahci(4)/siis(4)

Alexander Motin mav at FreeBSD.org
Fri Aug 7 07:42:58 UTC 2009


Scott Long wrote:
> Alexander Motin wrote:
>> CAM reports SCSI protocol for ATAPI devices at this moment. It is not
>> good probably. but changing it now may be painful. Checks like
>>     d->ccb->cpi.transport == XPORT_ATA ||
>>     d->ccb->cpi.transport == XPORT_SATA
>> should be for now. "ata" hack should also stay there for now, as
>> ATAPICAM emulates SCSI transport now, but not a new ATA one.
> 
> What protocol should CAM be reporting for ATAPI devices?  It is SCSI.  I
> don't understand why we have to keep on diverging from the goal of
> having a unified and consistent interface here.

ATAPI supports both ATA (partially) and SCSI command sets. And before
main SCSI commands can be executed, ATA identification and configuration
should be done. Now SATA XPT fetches ATA IDENTIFY and sets respective
transfer mode, but it is tricky now for other code to differentiate
ATAPI devices from plain SCSI. From the one side transfer negotiation is
indeed only a transport feature, but from other side, as in this
cdparanoia case ATAPI/SCSI difference somehow affects error handling
(haven't looked actually why).

-- 
Alexander Motin


More information about the freebsd-current mailing list