CD/DVD writer no longer works
Subsystems (4)
Hello,
I am using Debian Sid on a Toshiba A100 laptop. My CD/DVD writer functions very well on 2.6.23.16 and 2.6.24.2.
I tried 2.6.25-rc2-git7, and I was very sad to notice that when I tried to write a CD, wodim started to output the
following: "Warning: controller returns zero sized CD capabilities page."
Since I was able to use this CD/DVD writer successfully with previous versions of Linux, I believe that this is a regression in 2.6.25-rcX series.
I am willing to try patches and to do pretty much anything to debug/fix this problem.
Thanks in advance.
Note: I am attaching the output of wodim to this e-mail.
- zkopex
--- output of wodim ---
root@debian:~# wodim -v dev=/dev/sr0 blank=fast hardy-desktop-i386.iso wodim: No write mode specified. wodim: Asuming -tao mode. wodim: Future versions of wodim may have different drive dependent defaults. TOC Type: 1 = CD-ROM scsidev: '/dev/sr0' devname: '/dev/sr0' scsibus: -2 target: -2 lun: -2 Linux sg driver version: 3.5.27 Wodim version: 1.1.6 SCSI buffer size: 64512 wodim: Warning: controller returns zero sized CD capabilities page. wodim: Warning: controller returns wrong page 0 for CD capabilities page (2A). Device type : Removable CD-ROM Version : 5 Response Format: 2 Capabilities : Vendor_info : 'MATSHITA' Identification : 'DVD-RAM UJ-841S ' Revision : '1.60' Device seems to be: Generic CD-ROM. wodim: Warning: controller returns zero sized CD capabilities page. wodim: Warning: controller returns wrong page 0 for CD capabilities page (2A). wodim: Warning: controller returns zero sized CD capabilities page. wodim: Warning: controller returns wrong page 0 for CD capabilities page (2A). wodim: Warning: controller returns zero sized CD capabilities page. wodim: Warning: controller returns wrong page 0 for CD capabilities page (2A). wodim: Sorry, no CD/DVD-Recorder or unsupported CD/DVD-Recorder found on this target. wodim: Warning: controller returns zero sized CD capabilities page. wodim: Warning: controller returns wrong page 0 for CD capabilities page (2A). Using generic SCSI-2 CD-ROM driver (scsi2_cd). Driver flags : Supported modes: Beginning DMA speed test. Set CDR_NODMATEST environment variable if device communication breaks or freezes immediately after that. FIFO size : 12582912 = 12288 KB wodim: Drive does not support TAO recording. wodim: Illegal write mode for this drive. --- output of wodim ---
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Quoted 1 line · zkopex
Hello,
Greetings,
Quoted 7 lines
I am using Debian Sid on a Toshiba A100 laptop. My CD/DVD writer functions very well on 2.6.23.16 and 2.6.24.2.
I tried 2.6.25-rc2-git7, and I was very sad to notice that when I tried to write a CD, wodim started to output the
following: "Warning: controller returns zero sized CD capabilities page."
Yeah, I saw that using k3b.
Quoted 6 lines
Since I was able to use this CD/DVD writer successfully with previous versions of Linux, I believe that this is a regression in 2.6.25-rcX series.
I am willing to try patches and to do pretty much anything to debug/fix this problem.
Sounds like you're having the same problem I am. In my case, reverting all but one line of commit 6b00769fe1502b4ad97bb327ef7ac971b208bfb5 cures it, though I don't see why.
Revert patch below is against freshly hatched rc3 if you want to try it.
block/blk-core.c +0 -2
@@ -127,7 +127,6 @@ void rq_init(struct request_queue *q, struct request *rq) rq->nr_hw_segments =0 ; rq->ioprio =0 ; rq->special =NULL ; - rq->raw_data_len =0 ; rq->buffer =NULL ; rq->tag =-1 ; rq->errors =0 ;
@@ -2016,7 +2015,6 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq, rq->hard_cur_sectors = rq->current_nr_sectors; rq->hard_nr_sectors = rq->nr_sectors =bio_sectors (bio); rq->buffer =bio_data (bio); - rq->raw_data_len = bio->bi_size; rq->data_len = bio->bi_size; rq->bio = rq->biotail = bio;
block/blk-map.c +0 -1
@@ -19,7 +19,6 @@ int blk_rq_append_bio(struct request_queue *q, struct request *rq, rq->biotail->bi_next = bio; rq->biotail = bio; - rq->raw_data_len += bio->bi_size; rq->data_len += bio->bi_size; }return 0 ;
block/blk-merge.c +0 -1
@@ -231,7 +231,6 @@ new_segment: ((unsigned long )q->dma_drain_buffer) & (PAGE_SIZE - 1)); nsegs++; - rq->data_len += q->dma_drain_size; }if (sg)
block/bsg.c +4 -4
@@ -437,14 +437,14 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr, }if (rq->next_rq) { - hdr->dout_resid = rq->raw_data_len; - hdr->din_resid = rq->next_rq->raw_data_len; + hdr->dout_resid = rq->data_len; + hdr->din_resid = rq->next_rq->data_len;blk_rq_unmap_user (bidi_bio);blk_put_request (rq->next_rq); }else if (rq_data_dir (rq) ==READ ) - hdr->din_resid = rq->raw_data_len; + hdr->din_resid = rq->data_len;else - hdr->dout_resid = rq->raw_data_len; + hdr->dout_resid = rq->data_len;/* * If the request generated a negative error number, return it
block/scsi_ioctl.c +1 -2
@@ -266,7 +266,7 @@ static int blk_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr, hdr->info =0 ;if (hdr->masked_status || hdr->host_status || hdr->driver_status) hdr->info |=SG_INFO_CHECK ; - hdr->resid = rq->raw_data_len; + hdr->resid = rq->data_len; hdr->sb_len_wr =0 ;if (rq->sense_len && hdr->sbp) {
@@ -528,7 +528,6 @@ static int __blk_send_generic(struct request_queue *q, struct gendisk *bd_disk, rq =blk_get_request (q,WRITE , __GFP_WAIT); rq->cmd_type =REQ_TYPE_BLOCK_PC ; rq->data =NULL ; - rq->raw_data_len =0 ; rq->data_len =0 ; rq->timeout =BLK_DEFAULT_SG_TIMEOUT ;memset (rq->cmd,0 ,sizeof (rq->cmd));
drivers/ata/libata-scsi.c +1 -1
@@ -2539,7 +2539,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)* want to set it properly, and for DMA where it is * effectively meaningless. */ - nbytes =min (scmd->request->raw_data_len, (unsigned int )63 *1024 ); + nbytes =min (qc->nbytes, (unsigned int )63 *1024 );/* Most ATAPI devices which honor transfer chunk size don't * behave according to the spec when odd chunk size which
include/linux/blkdev.h +0 -1
@@ -216,7 +216,6 @@ struct request {unsigned int cmd_len;unsigned char cmd[BLK_MAX_CDB ]; -unsigned int raw_data_len;unsigned int data_len;unsigned int sense_len;void *data;
Quoted 5 lines · --- Mike Galbraith
Quoted 1 line · zkopex
Hello,
Greetings,
Hi again,
Quoted 10 lines
Quoted 8 lines
I am using Debian Sid on a Toshiba A100 laptop. My CD/DVD writer functions very well on 2.6.23.16 and 2.6.24.2.
I tried 2.6.25-rc2-git7, and I was very sad to notice that when I tried to write a CD, wodim started to output the
following: "Warning: controller returns zero sized CD capabilities page."Yeah, I saw that using k3b.
The effects of the bug are seen when using wodim (or cdrecord) directly from the command line too.
Quoted 5 lines
Quoted 5 lines
Since I was able to use this CD/DVD writer successfully with previous versions of Linux, I believe that this is a regression in 2.6.25-rcX series.
Quoted 9 lines
Quoted 2 lines
I am willing to try patches and to do pretty much anything to debug/fix this problem.
Sounds like you're having the same problem I am. In my case, reverting all but one line of commit
6b00769fe1502b4ad97bb327ef7ac971b208bfb5cures it, though I don't see why.Revert patch below is against freshly hatched rc3 if you want to try it.
[patch snipped]
Thank you very much! The patch you supplied fixes the regression!
What do we need to do in order to get this patch applied in mainline so that the regression gets fixed?
To be honest, I was expecting a few replies from the appropriate kernel developers. It looks like I have missed something in my regression report.
Nevertheless, thank you again for your attention/kindness.
Regards,
- zkopex
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Quoted 3 lines · zkopex mtrof
[patch snipped]
Thank you very much! The patch you supplied fixes the regression!
You're welcome. In the meantime, I found a better way.
drivers/scsi/scsi_lib.c +1 -1
@@ -871,7 +871,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)scsi_end_bidi_request (cmd);return ; } - req->data_len =scsi_get_resid (cmd); + req->data_len = req->raw_data_len =scsi_get_resid (cmd); }BUG_ON (blk_bidi_rq (req));/* bidi not support for !blk_pc_request yet */
Quoted 3 lines
To be honest, I was expecting a few replies from the appropriate kernel developers. It looks like I have missed something in my regression report.
I think some of those are traveling.
-Mike
Quoted 8 lines · zkopex mtrof
Thank you very much! The patch you supplied fixes the regression!
What do we need to do in order to get this patch applied in mainline so that the regression gets fixed?
To be honest, I was expecting a few replies from the appropriate kernel developers. It looks like I have missed something in my regression report.
This did happen in a different thread. Looks like a final patch has now been found which can be expected in mainline soon. See:
http://lkml.org/lkml/2008/2/28/76
Cheers,
FJP