[Bug 12320] warn_on_slowpath when playing audio CD

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

 



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





------- Comment #12 from bbpetkov@xxxxxxxx  2008-12-30 05:51 -------
(In reply to comment #11)
> (In reply to comment #9)
> > (In reply to comment #8)

[.. ]

> > > Borislav, it seems that ide_map_sg() need to check for REQ_TYPE_ATA_PC now that
> > > DMA is allowed for such requests (so it can use sg_init_one() path for them
> > > instead of the usual blk_rq_map_sg() one)?
> > 
> > Hmm,
> > 
> > shouldn't we do that for all rq's which aren't bio-backed? As a means to handle
> > the more general case?
> 
> It would be even better...

How about something similar to the following:

diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index cc35d6d..4bee817 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -574,14 +574,15 @@ void ide_map_sg(ide_drive_t *drive, struct request *rq)
        ide_hwif_t *hwif = drive->hwif;
        struct scatterlist *sg = hwif->sg_table;

-       if (hwif->sg_mapped)    /* needed by ide-scsi */
-               return;
-
-       if (rq->cmd_type != REQ_TYPE_ATA_TASKFILE) {
-               hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg);
-       } else {
+       if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
                sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE);
                hwif->sg_nents = 1;
+       } else if (!rq->bio) {
+               sg_init_one(sg, rq->data, rq->data_len);
+               hwif->sg_nents = 1;
+       }
+       else {
+               hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg);
        }
 }

?


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
--
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