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

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

 



Hi,

On Wed, Oct 22, 2008 at 4:45 PM, Valerio Passini
<valerio.passini@xxxxxxxxx> wrote:

[.. ]

> Hi Boris, please send me patches already formatted to be applied by patch
> program, because the substitution of spaces with tabs and other indentation
> characters requires a lot of time and it has never worked (or explain me how
> to make it work :))

Ups, sorry, I had the wrong branch here. This patch below should be fine:

[.. ]

> P.S: I have received messages from bugzilla, but I have subscribed to this
> mailing list on Fujita's suggestion just to ease communication. What do you
> prefer between bugzilla and linux-ide?

Let's keep the conversation on linux-ide. I'll upload the fix to bugzilla
after we've figured out the root cause.

Thanks.

-- 
Regards/Gruss,
Boris


---
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index f16bb46..98051e4 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,15 @@ 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 ATA_PC, "
+					"queue_dma_alignment: 0x%x, q->dma_pad_mask: 0x%x,"
+					"addr: 0x%lx, rq->data_len: 0x%x, on_stack: %d\n",
+					queue_dma_alignment(q), q->dma_pad_mask, addr,
+					rq->data_len, object_is_on_stack((void *)addr));
 			info->dma = 0;
+		}
 	}
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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