]> err.no Git - linux-2.6/blobdiff - drivers/ata/pata_ali.c
pata_it821x: use raw nbytes in check_atapi_dma
[linux-2.6] / drivers / ata / pata_ali.c
index 8caf9afc8b905061097d10fedbd4627cabc88084..8786455c901d9b220d6f7f3cb0540900500e927a 100644 (file)
@@ -64,7 +64,7 @@ static int ali_cable_override(struct pci_dev *pdev)
        if (pdev->subsystem_vendor == 0x10CF && pdev->subsystem_device == 0x10AF)
                return 1;
        /* Mitac 8317 (Winbook-A) and relatives */
-       if (pdev->subsystem_vendor == 0x1071  && pdev->subsystem_device == 0x8317)
+       if (pdev->subsystem_vendor == 0x1071 && pdev->subsystem_device == 0x8317)
                return 1;
        /* Systems by DMI */
        if (dmi_check_system(cable_dmi_table))
@@ -295,7 +295,7 @@ static void ali_lock_sectors(struct ata_device *adev)
 static int ali_check_atapi_dma(struct ata_queued_cmd *qc)
 {
        /* If its not a media command, its not worth it */
-       if (qc->nbytes < 2048)
+       if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC)
                return -EOPNOTSUPP;
        return 0;
 }