DragonFly bugs List (threaded) for 2008-11
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: Problems with a SATA DVD burner
Steve O'Hara-Smith wrote:
> For now it's usable but not ideal, does anyone have any suggestions
> as to how I might go about getting DMA working for this drive ?
Please test this patch.
--
Hasso Tepper
diff --git a/sys/dev/disk/nata/atapi-cam.c b/sys/dev/disk/nata/atapi-cam.c
--- a/sys/dev/disk/nata/atapi-cam.c
+++ b/sys/dev/disk/nata/atapi-cam.c
@@ -504,10 +504,10 @@
switch (ccb_h->flags & CAM_DIR_MASK) {
case CAM_DIR_IN:
- request_flags |= ATA_R_READ|ATA_R_DMA;
+ request_flags |= ATA_R_READ;
break;
case CAM_DIR_OUT:
- request_flags |= ATA_R_WRITE|ATA_R_DMA;
+ request_flags |= ATA_R_WRITE;
break;
case CAM_DIR_NONE:
/* No flags need to be set */
@@ -516,8 +516,6 @@
device_printf(softc->dev, "unknown IO operation\n");
goto action_invalid;
}
- if (softc->atadev[tid]->mode < ATA_DMA)
- request_flags &= ~ATA_R_DMA;
if ((hcb = allocate_hcb(softc, unit, bus, ccb)) == NULL) {
kprintf("cannot allocate ATAPI/CAM hcb\n");
@@ -579,6 +577,14 @@
request->u.atapi.ccb[3] = request->u.atapi.ccb[1] & 0x1f;
request->u.atapi.ccb[2] = 0;
request->u.atapi.ccb[1] = 0;
+ /* FALLTHROUGH */
+
+ case READ_10:
+ case WRITE_10:
+ case READ_12:
+ case WRITE_12:
+ if (softc->atadev[tid]->mode >= ATA_DMA)
+ request_flags |= ATA_R_DMA;
break;
}
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]