With the yesterday's (September 23rd, 2008) FreeBSD 7.1-PRERELEASE I was unable to use cdrecord (compiled from port sysutils/cdrecord): it was refusing to open SCSI device: ----- cdrecord: Invalid argument. Cannot open SCSI driver. ----- Digged through the code, I had found that the first problem lies in the bus scanning: it does not set ccb_h.path_id to CAM_XPT_PATH_ID during the call to the XPT_DEV_MATCH routine of ioctl(CAMIOCOMMAND). Another problem was in the libcam code that has the simular problem: it is now filed under bin/127605 and contains the patch. Fix: The following patch fixes the '-scanbus' issue: I am not very much sure that one should set target_id and target_lun as well (without these XPT_DEV_MATCH works too), but these fields are set in the FreeBSD's camcontrol(8) utility when it performs enumeration, so I think that these will not hurt, at least on FreeBSD. In order to successfully burn images with cdrecord I also need the patch for libcam, as described in bin/127605. With these two, burning works without any noticed problems: CD-R and CD-RW disks are toasted fine. For the record: latest cdrecord alpha from ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-2.01.01a49.tar.bz2 still misses the ccb_h.path_id manipulations.--CVuc16wXRV5CbebmCQNeCeX2J66P2lUfOt71m0foLypFtaAN Content-Type: text/plain; name="patch-libscg::scsi-bsd.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-libscg::scsi-bsd.c" --- libscg/scsi-bsd.c.orig 2008-09-24 14:03:04.000000000 +0400 +++ libscg/scsi-bsd.c 2008-09-24 14:04:03.000000000 +0400 @@ -674,6 +674,9 @@ * system. */ ccb.ccb_h.func_code = XPT_DEV_MATCH; + ccb.ccb_h.path_id = CAM_XPT_PATH_ID; + ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; /* * Setup the result buffer. How-To-Repeat: Spawn 'cdrecord -scanbus'. I will output something like ----- $ cdrecord -scanbus cdrecord: Invalid argument. CAMIOCOMMAND ioctl failed. Cannot open SCSI driver. cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root. cdrecord: For possible transport specifiers try 'cdrecord dev=help'. Cdrecord-Clone 2.01 (i386-unknown-freebsd7.1) Copyright (C) 1995-2004 Jörg Schilling ----- My device is the IDE CD/DVD unit PIONEER DVD-RW DVR-108 1.14 emulated as SCSI device via the atapicam(4) layer. Running this command under root does not change the things ;))
Responsible Changed From-To: freebsd-ports-bugs->marius Over to maintainer (via the GNATS Auto Assign Tool)
State Changed From-To: open->suspended Suspend; there's no point in fixing this in libscg before the fix for libcam/PR127605 is committed. Also I think that '-scanbus' not working in some configurations is a minor enough issue that it doesn't warrant needing to change the reply for SCG_AUTHOR. Instead it should be okay to wait until libscg is fixed upstream and to solve this for FreeBSD by updating the port to the next major release once available which should happen in the near future.
please re-open this pr since kern/127605 got committed and closed. alex
State Changed From-To: suspended->open
State Changed From-To: open->feedback Eygene, Can you test this with the other patch committed? Regards, Brad Davis
Brad, good day. Wed, Mar 31, 2010 at 02:32:44AM +0000, brd@FreeBSD.org wrote: > Can you test this with the other patch committed? If you mean the kernel patch in kern/127605, than yes, the problem still persists: I had tested it. By the way, ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-2.01.01a77.tar.bz2 has this stuff already fixed, so sysutils/cdrtools-devel has everything in place and working. sysutils/cdrtools still lives without this fix, but Schilly's politics involves changing SCG_AUTHOR, so port maintainer should decide by himself is he up to it. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #
marius 2010-09-15 17:35:24 UTC FreeBSD ports repository (src committer) Modified files: . UPDATING sysutils/cdrtools Makefile distinfo pkg-descr pkg-plist sysutils/cdrtools/files patch-ad patch-cdrecord::cdrecord.1 patch-cdrecord::cdrecord.dfl patch-readcd::readcd.1 patch-rscsi::rscsi.dfl patch-scgcheck::scgcheck.1 sysutils/cdrtools-cjk Makefile Added files: sysutils/cdrtools/files patch-btcflash::btcflash.1 patch-cdrecord::README.rscsi Removed files: sysutils/cdrtools/files patch-README.rscsi patch-cdda2wav-toc.c patch-cdda2wav::interface.c patch-cdda2wav::ioctl.c patch-cdda2wav::mycdrom.h patch-readcd::readcd.c Log: Update cdrtools to 3.00. For changes since 2.01 see: ftp://ftp.berlios.de/pub/cdrecord/AN-3.00 Note that this breaks and obsoletes sysutils/cdrtools-cjk as mkisofs now employs iconv for character conversion. Consequently USE_CDRTOOLS=cjk and USE_CDRTOOLS together with WITH_CJK are now defunct and bsd.port.mk is expected to be updated by portmgr@ accordingly (PR 150362). PR: 127608, 149644 Approved by: netchild Revision Changes Path 1.970 +16 -1 ports/UPDATING 1.7 +2 -0 ports/sysutils/cdrtools-cjk/Makefile 1.79 +72 -25 ports/sysutils/cdrtools/Makefile 1.31 +3 -3 ports/sysutils/cdrtools/distinfo 1.4 +0 -36 ports/sysutils/cdrtools/files/patch-README.rscsi (dead) 1.5 +51 -15 ports/sysutils/cdrtools/files/patch-ad 1.1 +10 -0 ports/sysutils/cdrtools/files/patch-btcflash::btcflash.1 (new) 1.2 +0 -20 ports/sysutils/cdrtools/files/patch-cdda2wav-toc.c (dead) 1.5 +0 -19 ports/sysutils/cdrtools/files/patch-cdda2wav::interface.c (dead) 1.2 +0 -88 ports/sysutils/cdrtools/files/patch-cdda2wav::ioctl.c (dead) 1.2 +0 -24 ports/sysutils/cdrtools/files/patch-cdda2wav::mycdrom.h (dead) 1.1 +36 -0 ports/sysutils/cdrtools/files/patch-cdrecord::README.rscsi (new) 1.2 +17 -0 ports/sysutils/cdrtools/files/patch-cdrecord::cdrecord.1 1.2 +53 -25 ports/sysutils/cdrtools/files/patch-cdrecord::cdrecord.dfl 1.2 +17 -0 ports/sysutils/cdrtools/files/patch-readcd::readcd.1 1.3 +0 -63 ports/sysutils/cdrtools/files/patch-readcd::readcd.c (dead) 1.2 +1 -11 ports/sysutils/cdrtools/files/patch-rscsi::rscsi.dfl 1.2 +17 -0 ports/sysutils/cdrtools/files/patch-scgcheck::scgcheck.1 1.13 +3 -2 ports/sysutils/cdrtools/pkg-descr 1.13 +66 -15 ports/sysutils/cdrtools/pkg-plist _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed close