Bugzilla – Attachment 179246 Details for
Bug 229260
Optical drive (SH-S162L) not configured
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
atapi-dma-for-rw-only.patch
atapi-dma-for-rw-only.patch (text/x-patch), 1.15 KB, created by
Tejun Heo
on 2007-10-18 14:21:30 UTC
(
hide
)
Description:
atapi-dma-for-rw-only.patch
Filename:
MIME Type:
Creator:
Tejun Heo
Created:
2007-10-18 14:21:30 UTC
Size:
1.15 KB
patch
obsolete
>diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c >index 68699b3..0ff981f 100644 >--- a/drivers/ata/libata-core.c >+++ b/drivers/ata/libata-core.c >@@ -52,6 +52,7 @@ > #include <scsi/scsi.h> > #include <scsi/scsi_cmnd.h> > #include <scsi/scsi_host.h> >+#include <linux/cdrom.h> > #include <linux/libata.h> > #include <asm/io.h> > #include <asm/semaphore.h> >@@ -4446,12 +4447,26 @@ static void ata_fill_sg_dumb(struct ata_queued_cmd *qc) > int ata_check_atapi_dma(struct ata_queued_cmd *qc) > { > struct ata_port *ap = qc->ap; >- >- /* Don't allow DMA if it isn't multiple of 16 bytes. Quite a >- * few ATAPI devices choke on such DMA requests. >- */ >- if (unlikely(qc->nbytes & 15)) >+ struct scsi_cmnd *cmd = qc->scsicmd; >+ u8 *cdb = cmd->cmnd; >+ >+ /* some drives can only do ATAPI DMA on read/write */ >+ switch (cdb[0]) { >+ case READ_10: >+ case WRITE_10: >+ case READ_12: >+ case WRITE_12: >+ case READ_6: >+ case WRITE_6: >+ case GPCMD_READ_CD: >+ case GPCMD_READ_CD_MSF: >+ case GPCMD_WRITE_AND_VERIFY_10: >+ /* atapi dma maybe ok */ >+ break; >+ default: >+ /* turn off atapi dma */ > return 1; >+ } > > if (ap->ops->check_atapi_dma) > return ap->ops->check_atapi_dma(qc);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 229260
:
110439
|
110440
|
112812
|
113034
|
146652
|
146927
|
147389
|
157226
|
158345
|
159331
|
159332
|
159974
|
160145
|
160656
|
160699
|
161349
|
161350
|
173856
|
179005
|
179156
| 179246 |
179479
|
179480
|
179499
|
179500
|
179503
|
179556
|
179801