[Debburn-devel] Need help with ATTACHEMENT

Ihar Areshchankau iharsw at tut.by
Sun Aug 24 12:51:48 UTC 2008


Hello!

I want to migrate from Windows to Linux. One problem I have this time is
that my CDRW device doesn't writes discs at all. It reads fine, but
doesn't writes. I try distinct Linux distributions: RedHat, Ubuntu,
Mandrake - no effect. I try distinct versions of the cdrtools software -
no effect. Today I've installed cdrkit with wodim - no effect!

The problem is that cdrecord (and wodim too) with any command (cdrecord
-scanbus) hungs up the system with following messages in the system log
(see in the attached file). One recommendation that I found in the
Internet is to change file scsi_cdr.c:

int
mode_sense_g1(SCSI *usalp, Uchar *dp, int cnt, int page, int pcf)
{
	register struct	usal_cmd	*scmd = usalp->scmd;

	fillbytes((caddr_t)scmd, sizeof (*scmd), '\0');
	scmd->addr = (caddr_t)dp;
	/* !!!!!!!!!!! Inserted !!!!!!!!!!! */
          cnt = 256;
          /*----------*/
          scmd->size = cnt;
	scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA;
	scmd->cdb_len = SC_G1_CDBLEN;
	scmd->sense_len = CCS_SENSE_LEN;
	scmd->cdb.g1_cdb.cmd = 0x5A;
	scmd->cdb.g1_cdb.lun = usal_lun(usalp);
#ifdef	nonono
	scmd->cdb.g0_cdb.high_addr = 1<<4;	/* DBD Disable Block desc. */
#endif
	scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0);
	g1_cdblen(&scmd->cdb.g1_cdb, cnt);

	usalp->cmdname = "mode sense g1";

	if (usal_cmd(usalp) < 0)
		return (-1);
	if (usalp->verbose) usal_prbytes("Mode Sense Data", dp, cnt -
usal_getresid(usalp));
	return (0);
}

After doing the changes wodim seems to work: "wodim -scanbus" and "wodim
blank=all /dev/hdc" completed:
------------------------
$wodim -scanbus

Warning, sysfs is not mounted on /sys!
It is recommended to mount sysfs to allow better device configuration
scsibus1000:
          1000,0,0 100000) *
          1000,1,0 100001) *
          1000,2,0 100002) 'ATAPI   ' 'CDRW DRIVE 48X24' 'L.B4' Removable
CD-ROM
          1000,3,0 100003) 'HL-DT-ST' 'DVD-ROM GDR8162B' '0015' Removable
CD-ROM
          1000,4,0 100004) *
          1000,5,0 100005) *
          1000,6,0 100006) *
          1000,7,0 100007) *
------------------------
$ wodim blank=all /dev/hdc
wodim: No write mode specified.
wodim: Asuming -tao mode.
wodim: Future versions of wodim may have different drive dependent
defaults.
Device was not specified. Trying to find an appropriate drive...
Detected CD-R drive: /dev/hdc
Using /dev/cdrom of unknown capabilities

Warning, sysfs is not mounted on /sys!
It is recommended to mount sysfs to allow better device configuration
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'ATAPI   '
Identification : 'CDRW DRIVE 48X24'
Revision       : 'L.B4'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE FORCESPEED
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
wodim: WARNING: Total disk size unknown. Data may not fit on disk.
------------------------

But "eject /dev/hdc" after this hungs system again. I want to ask you: is
there way to configure my system to work without recompiling cdrecord -
using hdparm, etc.? Or I must replace my device? But in Windows it works
fine...

Addition information about BENQ CDRW model 4824s:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/dev/hdc:

ATAPI CD-ROM, with removable media
          Model Number:       ATAPI   CDRW DRIVE 48X24
          Serial Number:
          Firmware Revision:  Ver L.B4
Standards:
          Used: ATAPI for CD-ROMs, SFF-8020i, r2.5
          Supported: CD-ROM ATAPI-2
Configuration:
          DRQ response: 50us.
          Packet size: 12 bytes
Capabilities:
          LBA, IORDY(cannot be disabled)
          DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2
               Cycle time: min=120ns recommended=120ns
          PIO: pio0 pio1 pio2 pio3 pio4
               Cycle time: no flow control=227ns  IORDY flow control=120ns
Commands/features:
          Enabled Supported:
                  DEVICE RESET cmd
                  PACKET command feature set
             *    Mandatory FLUSH CACHE command

__________________
Best regards
Ihar Areshchankau

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 080824.hdc
Type: application/octet-stream
Size: 15321 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debburn-devel/attachments/20080824/436f8ecf/attachment.obj 


More information about the Debburn-devel mailing list