lkml.org 
[lkml]   [2001]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: OOPS: 2.5.1-pre8 - cdrecord + ide_scsi
On Sun, Dec 09 2001, Carl Ritson wrote:
> Got this at the very start of burning a cd, nothing special, using
> ide-scsi build into kernel. "cdrecord -v dev=0,0,0 speed=4 img.iso".
> Box is Dual-PIII 866, 1GB Ram, all IDE system.

Agrh, because of a bug in ide-scsi conversion this (other) bug went
unnoticed for a while. Basically we cannot look up the request queue
reliably from a request, since it may not have originated from the block
layer. ide-scsi builds it's own, for example. For those, we don't want
to trust the sg count either.

Does attached patch work?

--
Jens Axboe

--- /opt/kernel/linux-2.5.1-pre8/drivers/ide/ide-dma.c Sun Dec 9 03:54:19 2001
+++ drivers/ide/ide-dma.c Sun Dec 9 05:03:15 2001
@@ -226,12 +226,13 @@

static int ide_build_sglist (ide_hwif_t *hwif, struct request *rq)
{
+ request_queue_t *q = &hwif->drives[DEVICE_NR(rq->rq_dev) & 1].queue;
struct scatterlist *sg = hwif->sg_table;
int nents;

- nents = blk_rq_map_sg(rq->q, rq, hwif->sg_table);
+ nents = blk_rq_map_sg(q, rq, hwif->sg_table);

- if (nents > rq->nr_segments)
+ if (rq->q && nents > rq->nr_segments)
printk("ide-dma: received %d segments, build %d\n", rq->nr_segments, nents);

if (rq_data_dir(rq) == READ)
\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.054 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site