Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2007 19:54:23 GMT
From:      Luciano<luisaia@tin.it>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/112463: Samsung USB DVD writer, libscg and FreeBSD kernel
Message-ID:  <200705061954.l46JsNeO060355@www.freebsd.org>
Resent-Message-ID: <200705062000.l46K0CVK008850@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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: <TSSTcorp CD/DVDW SH-S182M SB02> 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 <appro@fy. chalmers.se>, 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 '<data unavaiable>'
Using remote transport code version '<data unavaiable>-<data unavaiable>'
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 '<data unavaiable>'
Using remote transport code version '<data unavaiable>-<data unavaiable>'
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 <CR> 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 <CR> 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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705061954.l46JsNeO060355>