LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [Regression in 2.6.25-rcX] CD/DVD writer no longer works
@ 2008-02-24 20:57 zkopex
  2008-02-25  3:36 ` Mike Galbraith
  0 siblings, 1 reply; 5+ messages in thread
From: zkopex @ 2008-02-24 20:57 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Regression in 2.6.25-rcX] CD/DVD writer no longer works
  2008-02-24 20:57 [Regression in 2.6.25-rcX] CD/DVD writer no longer works zkopex
@ 2008-02-25  3:36 ` Mike Galbraith
  2008-02-28  3:26   ` zkopex mtrof
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Galbraith @ 2008-02-25  3:36 UTC (permalink / raw)
  To: zkopex; +Cc: LKML


On Sun, 2008-02-24 at 12:57 -0800, zkopex wrote:
> Hello,

Greetings,

> 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.

> 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.

diff --git a/block/blk-core.c b/block/blk-core.c
index 775c851..c013ca2 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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;
diff --git a/block/blk-map.c b/block/blk-map.c
index 09f7fd0..ae4a0fc 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -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;
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 7506c4f..a15d0ee 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -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)
diff --git a/block/bsg.c b/block/bsg.c
index 7f3c095..8917c51 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -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
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index e993cac..9675b34 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -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));
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 0562b0a..85daaaa 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -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
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6fe67d1..094eba2 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -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;



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Regression in 2.6.25-rcX] CD/DVD writer no longer works
  2008-02-25  3:36 ` Mike Galbraith
@ 2008-02-28  3:26   ` zkopex mtrof
  2008-02-28  4:21     ` Mike Galbraith
  2008-02-28 14:41     ` Frans Pop
  0 siblings, 2 replies; 5+ messages in thread
From: zkopex mtrof @ 2008-02-28  3:26 UTC (permalink / raw)
  To: Mike Galbraith; +Cc: LKML


--- Mike Galbraith <efault@gmx.de> wrote:
> 
> On Sun, 2008-02-24 at 12:57 -0800, zkopex wrote:
> > Hello,
> 
> Greetings,

Hi again,

> 
> > 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.

> 
> > 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.
> 
[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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Regression in 2.6.25-rcX] CD/DVD writer no longer works
  2008-02-28  3:26   ` zkopex mtrof
@ 2008-02-28  4:21     ` Mike Galbraith
  2008-02-28 14:41     ` Frans Pop
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Galbraith @ 2008-02-28  4:21 UTC (permalink / raw)
  To: zkopex mtrof; +Cc: LKML


On Wed, 2008-02-27 at 19:26 -0800, zkopex mtrof wrote:

> [patch snipped]
> 
> Thank you very much! The patch you supplied fixes the regression!

You're welcome.  In the meantime, I found a better way.

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index ba21d97..7a6f784 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -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 */


> 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Regression in 2.6.25-rcX] CD/DVD writer no longer works
  2008-02-28  3:26   ` zkopex mtrof
  2008-02-28  4:21     ` Mike Galbraith
@ 2008-02-28 14:41     ` Frans Pop
  1 sibling, 0 replies; 5+ messages in thread
From: Frans Pop @ 2008-02-28 14:41 UTC (permalink / raw)
  To: zkopex mtrof; +Cc: efault, linux-kernel

zkopex mtrof wrote:
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-28 14:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-24 20:57 [Regression in 2.6.25-rcX] CD/DVD writer no longer works zkopex
2008-02-25  3:36 ` Mike Galbraith
2008-02-28  3:26   ` zkopex mtrof
2008-02-28  4:21     ` Mike Galbraith
2008-02-28 14:41     ` Frans Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).