Bug 198336 - sysutils/dvd+rw-tools: Fails to run growisofs: :-( unable to CAMGETPASSTHRU for /dev/cd0: Inappropriate ioctl for device
Summary: sysutils/dvd+rw-tools: Fails to run growisofs: :-( unable to CAMGETPASSTHRU f...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2015-03-06 00:33 UTC by papowell
Modified: 2022-06-09 19:04 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback? (mbeis)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description papowell 2015-03-06 00:33:26 UTC
This showed up on a FreeBSD 9.3 system when I tried to burn a DVD.  A similar error message historically indicated atapicam module may need to be loaded.  However, this failed.  Please note that the FreeBSD Handbook provides instructions on how to burn a DVD and this procedure does not work.

Does another module need to be loaded or is there some sort of permissions issue?  Note that the cdrecord program seemed to detect the DVD burner,


laptop_93: {39} # grep -r ata_controlcmd /usr/src/sys
/usr/src/sys/dev/ata/ata-all.c: error = ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode);
/usr/src/sys/dev/ata/atapi-cd.c:    ata_controlcmd(dev, ATA_DEVICE_RESET, 0, 0, 0);
/usr/src/sys/dev/ata/atapi-cd.c:        ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/atapi-fd.c:        ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:        ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:            error = ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:        ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_ENAB_RCACHE, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:            ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_ENAB_WCACHE, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:            ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_DIS_WCACHE, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:        if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint))
/usr/src/sys/dev/ata/ata-all.h:int ata_controlcmd(device_t dev, u_int8_t command, u_int16_t feature, u_int64_t lba, u_int
16_t count);
/usr/src/sys/dev/ata/atapi-cam.c:       ata_controlcmd(softc->atadev[tid]->dev, ATA_DEVICE_RESET, 0, 0, 0);
/usr/src/sys/dev/ata/ata-queue.c:ata_controlcmd(device_t dev, u_int8_t command, u_int16_t feature,
/usr/src/sys/dev/ata/atapi-tape.c:      ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/ata-raid.c:                error |= ata_controlcmd(rdp->disks[disk].dev,
/usr/src/sys/modules/ata/atadevel/ata-devel.c:    error = ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0,

 

FreeBSD laptop_93.private 9.3-RELEASE-p10 FreeBSD 9.3-RELEASE-p10 #0: Tue Feb 24 21:28:03 UTC 201
5     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

laptop_93: {33} # cdrecord -v -scanbus
Cdrecord-ProDVD-ProBD-Clone 3.00 (amd64-unknown-freebsd9.1) Copyright (C) 1995-2010 J\xf6rg Schil
ling
TOC Type: 1 = CD-ROM
Using libscg version 'schily-0.9'.
SCSI buffer size: 65536
scsibus0:
        0,0,0     0) '' '' '' NON CCS Disk
        0,1,0     1) *
        0,2,0     2) *
        0,3,0     3) *
        0,4,0     4) *
        0,5,0     5) *
        0,6,0     6) *
        0,7,0     7) *
scsibus1:
        1,0,0   100) 'HL-DT-ST' 'DVD+-RW GS30N   ' 'A101' Removable CD-ROM
        1,1,0   101) *
        1,2,0   102) *
        1,3,0   103) *
        1,4,0   104) *
        1,5,0   105) *
        1,6,0   106) *
        1,7,0   107) *
scsibus2:
        2,0,0   200) '' '' '' NON CCS Disk
        2,1,0   201) *
        2,2,0   202) *
        2,3,0   203) *
        2,4,0   204) *
        2,5,0   205) *
        2,6,0   206) *
        2,7,0   207) *
TRYING /dev/cd0
laptop_93: {35} # growisofs -dvd-compat -Z /dev/cd0=FreeBSD-9.3-RELEASE-amd64-dvd1.iso
:-( unable to CAMGETPASSTHRU for /dev/cd0: Inappropriate ioctl for device

laptop_93: {37} # kldload atapicam.ko
kldload: an error occurred while loading the module. Please check dmesg(8) for more details.
laptop_93: {18} # dmesg
link_elf_obj: symbol ata_controlcmd undefined
linker_load_file: Unsupported file type


laptop_93: {39} # grep -r ata_controlcmd /usr/src/sys
/usr/src/sys/dev/ata/ata-all.c: error = ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode);
/usr/src/sys/dev/ata/atapi-cd.c:    ata_controlcmd(dev, ATA_DEVICE_RESET, 0, 0, 0);
/usr/src/sys/dev/ata/atapi-cd.c:        ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/atapi-fd.c:        ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:        ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:            error = ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:        ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_ENAB_RCACHE, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:            ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_ENAB_WCACHE, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:            ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_DIS_WCACHE, 0, 0);
/usr/src/sys/dev/ata/ata-disk.c:        if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint))
/usr/src/sys/dev/ata/ata-all.h:int ata_controlcmd(device_t dev, u_int8_t command, u_int16_t feature, u_int64_t lba, u_int
16_t count);
/usr/src/sys/dev/ata/atapi-cam.c:       ata_controlcmd(softc->atadev[tid]->dev, ATA_DEVICE_RESET, 0, 0, 0);
/usr/src/sys/dev/ata/ata-queue.c:ata_controlcmd(device_t dev, u_int8_t command, u_int16_t feature,
/usr/src/sys/dev/ata/atapi-tape.c:      ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
/usr/src/sys/dev/ata/ata-raid.c:                error |= ata_controlcmd(rdp->disks[disk].dev,
/usr/src/sys/modules/ata/atadevel/ata-devel.c:    error = ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0,
Comment 1 papowell 2015-03-06 15:03:48 UTC
I forgot to indicate that I have:

/boot/loader.conf:

atapicam_load="YES"

But when I do kldstat it does not show up in the installed modules list.
Comment 2 Graham Perrin freebsd_committer 2022-05-23 19:13:51 UTC
Cross-reference: <https://forums.freebsd.org/threads/85282/>
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2022-05-24 03:18:13 UTC
Re-classify (ports issue) until any (potential) base issue can be identified.

We'll need reproduction against a supported FreeBSD version too.
Comment 4 amahling 2022-06-09 19:04:15 UTC
I have a similar issue with CD ripping tool audio/freac v1.1.5

It runs flawlessly under 13.0, after upgrading base system to 13.1 it fails to connect to /dev/cd0 with error 

++ WARN: ioctl(fd, CDIOCALLOW) failed: Invalid argument

++ WARN: open: Inappropriate ioctl for device

It doesn't matter whether I use the freac package or compile it from the ports tree

uname -a 
FreeBSD NomadBSD 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64

I've added the comment, because I suppose it is a problem with the base system. Please let me know, if I would better open a bug report for the freac port. Thank you.