Re: http://bugzilla.kernel.org/show_bug.cgi?id=11742

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Valerio,

please do not remove people from the CC list because they're following the
discussion too, thanks.

> Hi Boris, first thank you for giving me that hint: kmail it's really my email client and it's guilty for the behaviour of cut and pasted text...

Next time just save the email in a text file and then try applying the patch in
it - I think this way works.

> I've just tried your patch above and it doesn't work and I have noticed a lot of messages during boot (see below).

Yep, it is _not_ supposed to work but instead tell us exactly why/which commands
puzzle your cdrom drive so that it turns off dma.

[.. ]

> [  182.374511] Disabling dma for ATA_PC, queue_dma_alignment: 0x1f, q->dma_pad_mask: 0xf,addr: 0xffff8800ab52a000, rq->data_len: 0x8, on_stack: 0

Can you now try this new patch I've attached below (before that revert the old
one by doing "patch -p1 -R < [file.patch]" recompile the kernel with it, reboot),
start simulated burning on your machine and then cancel it shortly thereafter.
Now do

dmesg > log.msg

and send me the _whole_ file so that we can see the messages you get while
burning.

Thanks.

-- 
Regards/Gruss,
    Boris.
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index f16bb46..118035c 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1165,7 +1165,6 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
 		struct request_queue *q = drive->queue;
 		unsigned int alignment;
 		unsigned long addr;
-		unsigned long stack_mask = ~(THREAD_SIZE - 1);
 
 		if (rq->bio)
 			addr = (unsigned long)bio_data(rq->bio);
@@ -1181,12 +1180,16 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
 		 * separate masks.
 		 */
 		alignment = queue_dma_alignment(q) | q->dma_pad_mask;
-		if (addr & alignment || rq->data_len & alignment)
-			info->dma = 0;
-
-		if (!((addr & stack_mask) ^
-		      ((unsigned long)current->stack & stack_mask)))
+		if (addr & alignment || rq->data_len & alignment
+			|| object_is_on_stack((void *)addr)) {
+			printk(KERN_ERR "Disabling dma for 0x%x cmd type, "
+					"queue_dma_alignment: 0x%x, q->dma_pad_mask: 0x%x,"
+					"addr: 0x%lx, rq->data_len: 0x%x, on_stack: %d\n",
+					rq->cmd_type,
+					queue_dma_alignment(q), q->dma_pad_mask, addr,
+					rq->data_len, object_is_on_stack((void *)addr));
 			info->dma = 0;
+		}
 	}
 }
 

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux