From owner-freebsd-bugs@FreeBSD.ORG Sun May 6 20:00:12 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C64416A406 for ; Sun, 6 May 2007 20:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 6E82B13C455 for ; Sun, 6 May 2007 20:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l46K0CBL008851 for ; Sun, 6 May 2007 20:00:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l46K0CVK008850; Sun, 6 May 2007 20:00:12 GMT (envelope-from gnats) Resent-Date: Sun, 6 May 2007 20:00:12 GMT Resent-Message-Id: <200705062000.l46K0CVK008850@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Luciano Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C63E616A403 for ; Sun, 6 May 2007 19:59:25 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id B78C313C43E for ; Sun, 6 May 2007 19:59:25 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l46JxPpT066308 for ; Sun, 6 May 2007 19:59:25 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l46JsNeO060355; Sun, 6 May 2007 19:54:23 GMT (envelope-from nobody) Message-Id: <200705061954.l46JsNeO060355@www.freebsd.org> Date: Sun, 6 May 2007 19:54:23 GMT From: Luciano To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: kern/112463: Samsung USB DVD writer, libscg and FreeBSD kernel X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2007 20:00:12 -0000 >Number: 112463 >Category: kern >Synopsis: Samsung USB DVD writer, libscg and FreeBSD kernel >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun May 06 20:00:11 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Luciano >Release: FreeBSD 6.1 >Organization: USB >Environment: FreeBSD eclypse.it 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: I have a problem with my external USB DVD writer (model SE-S184M/EUBN). I do not succeed in to burn DVD (only CD). The system (FreeBSD eclypse.it 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386) recognizes masterizzatore like: ------------------------------------------------------------------------------------------------------- umass0: TSST corp USB Mass Storage Device, rev 2.00/0.00, addr 3 cd0 at umass-sim0 bus 0 target 0 lun 0 cd0: device Removable CD-ROM SCSI-0 cd0: 40.000MB/s transfers cd0: Device Attempt to query size failed: NOT READY, Medium not present - tray close If I use the comand whith a dvd+rw : dvd+rw- format /dev/cd0 I obtain * DVD±RW/-RAM format utility by , version 6.0. :-( (unable to GET CONFIGURATION: Input/output error and on the consul: umass0: Unsupported ATAPI command 0x46. ------------------------------------------------------------------------------------------------------- 1. I have asked the list "questions" , they advised me to contact the cdrecord maintainer (Jorg Schilling) for this problem. 2. He advised to me to upgrade of the program. After an upgrade the problem persisted. 3. After He says "Can you verify that FreeBSD did not again break the SCSI implementation and does not do an auto-request Sense? Please use "scgcheck" to verify the correctness of your SCSI implementation. Jörg" My verify is: ------------------------------------------------------------------------------------------------------- Scgcheck 2.01 (i386-unknown-freebsd6.1) SCSI user level transport library ABI checker. Copyright (C) 1998,2001 Jörg Schilling Checking if your implementation supports to scan the SCSI bus. Trying to open device: '(NULL POINTER)'. Using libscg version 'schily-0.9' Using libscg transport code version 'schily-scsi-bsd.c-1.44' Using kernel transport code version '' Using remote transport code version '-' Max DMA buffer size: 65536 scsibus1: 1,0,0 100) 'ATAPI ' 'CD-ROM 52X ' '172A' Removable CD-ROM 1,1,0 101) 'HL-DT-ST' 'CD-RW GCE-8481B ' '1.00' Removable CD-ROM 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) 'TSSTcorp' 'CD/DVDW SH-S182M' 'SB04' Removable CD-ROM 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) * ----------> SCSI scan bus test PASSED For the next test we need to open a single SCSI device. Best results will be obtained if you specify a modern CD-ROM drive. Trying to open device: '2,0,0'. Using libscg version 'schily-0.9' Using libscg transport code version 'schily-scsi-bsd.c-1.44' Using kernel transport code version '' Using remote transport code version '-' Max DMA buffer size: 65536 Device type : Removable CD-ROM Version : 0 Response Format: 2 Capabilities : Vendor_info : 'TSSTcorp' Identifikation : 'CD/DVDW SH-S182M' Revision : 'SB04' First SCSI open OK - device usable Checking for second SCSI open. Second SCSI open for same device succeeded, 1 file descriptor(s) used. Second SCSI open is usable Closing second SCSI. Checking first SCSI. First SCSI open is still usable Second SCSI open test passed. Executing 'inquiry' command on Bus 2 Target 0, Lun 0 timeout 40s CDB: 12 00 00 00 24 00 cmd finished after 0.001s timeout 40s ----------> SCSI succeeded command test PASSED **********> Testing for failed SCSI command. Inquiry did not fail. scgcheck: Input/output error. test unit ready: scsi sendcmd: retryable error CDB: 00 00 00 00 00 00 status: 0x2 (CHECK CONDITION) Sense Bytes: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Sense Key: 0x2 Not Ready, Segment 0 Sense Code: 0x3A Qual 0x01 (medium not present - tray closed) Fru 0x0 Sense flags: Blk 0 (not valid) cmd finished after 0.002s timeout 40s ----------> SCSI Transport return != SCG_NO_ERROR (1) ----------> SCSI failed command test FAILED **********> Testing for SCSI sense data count. **********> Testing if at least CCS_SENSE_LEN (18) is supported... Sense Data: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 Sense Data: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 ----------> Wanted 18 sense bytes, got it. ----------> Libscg says 32 sense bytes but got (18) **********> Testing for 32 bytes of sense data... Sense Data: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Sense Data: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ----------> Wanted 32 sense bytes, got it. ----------> Got a maximum of 32 sense bytes ----------> SCSI sense count test FAILED ----------> SCSI status byte test NOT YET READY **********> Testing for working DMA residual count. **********> Testing for working DMA residual count == 0. ----------> Wanted 36 bytes, got it. ----------> SCSI DMA residual count == 0 test PASSED **********> Testing for working DMA residual count == DMA count. ----------> Wanted 0 bytes, got it. ----------> SCSI DMA residual count == DMA count test PASSED **********> Testing for working DMA residual count == 1. ----------> Wanted 36 bytes, got it. ----------> SCSI DMA residual count == 1 test PASSED **********> Testing for working DMA overrun test. ----------> SCSI DMA overrun test FAILED ----------> SCSI transport code test NOT YET READY ------------------------------------------------------------------------------------------------------------ 4. And I have obtained this answer: ------------------------------------------------------------------------------------------------------------ > Hi, > the result of scgcheck command is (much long): > ----------> SCSI succeeded command test PASSED > Ready to start test for failing command? Enter to continue: > Inquiry did not fail. > This may be because the firmware in your drive is buggy. > If the current drive is not a CD-ROM drive please restart > the test utility. Otherwise remove any medium from the drive. > Ready to start test for failing command? Enter to continue: > scgcheck: Input/output error. test unit ready: scsi sendcmd: retryable error > CDB: 00 00 00 00 00 00 > status: 0x2 (CHECK CONDITION) > Sense Bytes: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > Sense Key: 0x2 Not Ready, Segment 0 > Sense Code: 0x3A Qual 0x01 (medium not present - tray closed) Fru 0x0 > Sense flags: Blk 0 (not valid) > cmd finished after 0.002s timeout 40s > ----------> SCSI Transport return != SCG_NO_ERROR (1) > ----------> SCSI failed command test FAILED It looks like I would need to see whether I could enhance the libscg adptation layer for freeBSD/CAM. But in this case you correctly receive a CHECK CONDITION. In order to check whether this layer has more problems I would need to add debug code that s currently missing. Please note that the probability that the problem is inside your kernel is much higher than a problem in libscg. This is because the SCSI status byte is directly copied from the FreeBSD Kernel. Did you try to send a bug report to the FreeBSD kernel team? Jörg ------------------------------------------------------------------------------------------------------------- >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: