Date: Sat, 26 Dec 2009 20:36:15 +0100 (CET) From: Juergen Lock <nox@jelal.kn-bremen.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/142049: [PATCH:] make audio/cdparanoia work with new cam/ata code Message-ID: <200912261936.nBQJaFGA000544@triton8.kn-bremen.de> Resent-Message-ID: <200912261940.nBQJe1WT023474@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 142049 >Category: ports >Synopsis: [PATCH:] make audio/cdparanoia work with new cam/ata code >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 26 19:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Juergen Lock >Release: FreeBSD 8.0-STABLE amd64 >Organization: me? organized?? >Environment: System: FreeBSD triton8.kn-bremen.de 8.0-STABLE FreeBSD 8.0-STABLE #0: Sat Dec 5 16:24:45 CET 2009 nox@triton8.kn-bremen.de:/usr/obj/data/home/nox/src-s8/src/sys/TRITON8 amd64 >Description: As noted on -current some time ago, cdparanoia seems to be currently broken for optical drives using the new cam/ata code i.e. connected via ahci(4)/siis(4): http://lists.freebsd.org/pipermail/freebsd-current/2009-August/010359.html >How-To-Repeat: Make sure the drive is using the new cam/ata code (this thread may be useful: http://lists.freebsd.org/pipermail/freebsd-current/2009-December/014224.html ), then: Insert audio cd, make sure cdparanoia can access the drive's /dev/cdX and /dev/passY devices (you can find the corresponding passY device by running camcontrol devlist ), then run: cdparanoia -d /dev/cdX 1 to try and rip the first track. If you have mplayer built with cdparanoia support you can also test this way: mplayer -cache 8192 -cdrom-device /dev/cdX cdda:// >Fix: The patch works for me, only drives conneted on a SAS controller (i.e. not native (S)ATA) may still be broken, but that's probably still rare so this is at least much better than it was. (The patch can go in e.g. /usr/ports/audio/cdparanoia/files/patch-camata ) Index: interface/scsi_interface.c @@ -1480,10 +1480,16 @@ /* * if the bus device name is `ata', we're (obviously) * running ATAPICAM. + * same for the new ahci(4) and siis(4) drivers and future others + * which use SATA transport too... */ - if (strncmp(d->ccb->cpi.dev_name, "ata", 3) == 0) { - cdmessage(d, "\tDrive is ATAPI (using ATAPICAM)\n"); + if (strncmp(d->ccb->cpi.dev_name, "ata", 3) == 0 || +#if __FreeBSD_version >= 800102 + d->ccb->cpi.transport == XPORT_SATA || +#endif + d->ccb->cpi.transport == XPORT_ATA) { + cdmessage(d, "\tDrive is ATAPI (using ATAPICAM or direct CAM (S)ATA transport)\n"); d->is_atapi = 1; } else { cdmessage(d, "\tDrive is SCSI\n"); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912261936.nBQJaFGA000544>