Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[libata] pata_it821x: fix warning
libata: Fix a large collection of DMA mode mismatches
ahci: sis controllers actually can do PMP
pata_via: clean up recent tf_load changes
libata: restore SControl on detach
libata: use ata_link_printk() when printing SError
libata: always do follow-up SRST if hardreset returned -EAGAIN
libata: fix EH action overwriting in ata_eh_reset()
sata_mv: add the Gen IIE flag to the SoC devices.
ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
sata_mv: don't issue two DMA commands concurrently
libata: implement no[hs]rst force params

+123 -126
+3
Documentation/kernel-parameters.txt
··· 1074 1074 1075 1075 * [no]ncq: Turn on or off NCQ. 1076 1076 1077 + * nohrst, nosrst, norst: suppress hard, soft 1078 + and both resets. 1079 + 1077 1080 If there are multiple matching configurations changing 1078 1081 the same attribute, the last one is used. 1079 1082
+5 -3
drivers/ata/ahci.c
··· 486 486 { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ 487 487 { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ 488 488 { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ 489 + { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ 490 + { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ 489 491 490 492 /* JMicron 360/1/3/5/6, match class to avoid IDE function */ 491 493 { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, ··· 577 575 { PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci }, /* MCP7B */ 578 576 579 577 /* SiS */ 580 - { PCI_VDEVICE(SI, 0x1184), board_ahci_nopmp }, /* SiS 966 */ 581 - { PCI_VDEVICE(SI, 0x1185), board_ahci_nopmp }, /* SiS 968 */ 582 - { PCI_VDEVICE(SI, 0x0186), board_ahci_nopmp }, /* SiS 968 */ 578 + { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ 579 + { PCI_VDEVICE(SI, 0x1185), board_ahci }, /* SiS 968 */ 580 + { PCI_VDEVICE(SI, 0x0186), board_ahci }, /* SiS 968 */ 583 581 584 582 /* Marvell */ 585 583 { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */
+8
drivers/ata/ata_piix.c
··· 275 275 { 0x8086, 0x3a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, 276 276 /* SATA Controller IDE (ICH10) */ 277 277 { 0x8086, 0x3a26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 278 + /* SATA Controller IDE (PCH) */ 279 + { 0x8086, 0x3b20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, 280 + /* SATA Controller IDE (PCH) */ 281 + { 0x8086, 0x3b26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 282 + /* SATA Controller IDE (PCH) */ 283 + { 0x8086, 0x3b2d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 284 + /* SATA Controller IDE (PCH) */ 285 + { 0x8086, 0x3b2e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, 278 286 279 287 { } /* terminate list */ 280 288 };
+37 -23
drivers/ata/libata-core.c
··· 104 104 unsigned long xfer_mask; 105 105 unsigned int horkage_on; 106 106 unsigned int horkage_off; 107 + unsigned int lflags; 107 108 }; 108 109 109 110 struct ata_force_ent { ··· 197 196 } 198 197 199 198 /** 200 - * ata_force_spd_limit - force SATA spd limit according to libata.force 199 + * ata_force_link_limits - force link limits according to libata.force 201 200 * @link: ATA link of interest 202 201 * 203 - * Force SATA spd limit according to libata.force and whine about 204 - * it. When only the port part is specified (e.g. 1:), the limit 205 - * applies to all links connected to both the host link and all 206 - * fan-out ports connected via PMP. If the device part is 207 - * specified as 0 (e.g. 1.00:), it specifies the first fan-out 208 - * link not the host link. Device number 15 always points to the 209 - * host link whether PMP is attached or not. 202 + * Force link flags and SATA spd limit according to libata.force 203 + * and whine about it. When only the port part is specified 204 + * (e.g. 1:), the limit applies to all links connected to both 205 + * the host link and all fan-out ports connected via PMP. If the 206 + * device part is specified as 0 (e.g. 1.00:), it specifies the 207 + * first fan-out link not the host link. Device number 15 always 208 + * points to the host link whether PMP is attached or not. 210 209 * 211 210 * LOCKING: 212 211 * EH context. 213 212 */ 214 - static void ata_force_spd_limit(struct ata_link *link) 213 + static void ata_force_link_limits(struct ata_link *link) 215 214 { 215 + bool did_spd = false; 216 216 int linkno, i; 217 217 218 218 if (ata_is_host_link(link)) ··· 230 228 if (fe->device != -1 && fe->device != linkno) 231 229 continue; 232 230 233 - if (!fe->param.spd_limit) 234 - continue; 231 + /* only honor the first spd limit */ 232 + if (!did_spd && fe->param.spd_limit) { 233 + link->hw_sata_spd_limit = (1 << fe->param.spd_limit) - 1; 234 + ata_link_printk(link, KERN_NOTICE, 235 + "FORCE: PHY spd limit set to %s\n", 236 + fe->param.name); 237 + did_spd = true; 238 + } 235 239 236 - link->hw_sata_spd_limit = (1 << fe->param.spd_limit) - 1; 237 - ata_link_printk(link, KERN_NOTICE, 238 - "FORCE: PHY spd limit set to %s\n", fe->param.name); 239 - return; 240 + /* let lflags stack */ 241 + if (fe->param.lflags) { 242 + link->flags |= fe->param.lflags; 243 + ata_link_printk(link, KERN_NOTICE, 244 + "FORCE: link flag 0x%x forced -> 0x%x\n", 245 + fe->param.lflags, link->flags); 246 + } 240 247 } 241 248 } 242 249 ··· 3288 3277 dev->dma_mode = ata_xfer_mask2mode(dma_mask); 3289 3278 3290 3279 found = 1; 3291 - if (dev->dma_mode != 0xff) 3280 + if (ata_dma_enabled(dev)) 3292 3281 used_dma = 1; 3293 3282 } 3294 3283 if (!found) ··· 3313 3302 3314 3303 /* step 3: set host DMA timings */ 3315 3304 ata_link_for_each_dev(dev, link) { 3316 - if (!ata_dev_enabled(dev) || dev->dma_mode == 0xff) 3305 + if (!ata_dev_enabled(dev) || !ata_dma_enabled(dev)) 3317 3306 continue; 3318 3307 3319 3308 dev->xfer_mode = dev->dma_mode; ··· 5199 5188 */ 5200 5189 int sata_link_init_spd(struct ata_link *link) 5201 5190 { 5202 - u32 scontrol; 5203 5191 u8 spd; 5204 5192 int rc; 5205 5193 5206 - rc = sata_scr_read(link, SCR_CONTROL, &scontrol); 5194 + rc = sata_scr_read(link, SCR_CONTROL, &link->saved_scontrol); 5207 5195 if (rc) 5208 5196 return rc; 5209 5197 5210 - spd = (scontrol >> 4) & 0xf; 5198 + spd = (link->saved_scontrol >> 4) & 0xf; 5211 5199 if (spd) 5212 5200 link->hw_sata_spd_limit &= (1 << spd) - 1; 5213 5201 5214 - ata_force_spd_limit(link); 5202 + ata_force_link_limits(link); 5215 5203 5216 5204 link->sata_spd_limit = link->hw_sata_spd_limit; 5217 5205 ··· 5793 5783 ata_port_wait_eh(ap); 5794 5784 5795 5785 /* EH is now guaranteed to see UNLOADING - EH context belongs 5796 - * to us. Disable all existing devices. 5786 + * to us. Restore SControl and disable all existing devices. 5797 5787 */ 5798 - ata_port_for_each_link(link, ap) { 5788 + __ata_port_for_each_link(link, ap) { 5789 + sata_scr_write(link, SCR_CONTROL, link->saved_scontrol); 5799 5790 ata_link_for_each_dev(dev, link) 5800 5791 ata_dev_disable(dev); 5801 5792 } ··· 6002 5991 { "udma133", .xfer_mask = 1 << (ATA_SHIFT_UDMA + 6) }, 6003 5992 { "udma/133", .xfer_mask = 1 << (ATA_SHIFT_UDMA + 6) }, 6004 5993 { "udma7", .xfer_mask = 1 << (ATA_SHIFT_UDMA + 7) }, 5994 + { "nohrst", .lflags = ATA_LFLAG_NO_HRST }, 5995 + { "nosrst", .lflags = ATA_LFLAG_NO_SRST }, 5996 + { "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST }, 6005 5997 }; 6006 5998 char *start = *cur, *p = *cur; 6007 5999 char *id, *val, *endp;
+13 -17
drivers/ata/libata-eh.c
··· 2040 2040 } 2041 2041 2042 2042 if (ehc->i.serror) 2043 - ata_port_printk(ap, KERN_ERR, 2043 + ata_link_printk(link, KERN_ERR, 2044 2044 "SError: { %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s}\n", 2045 2045 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", 2046 2046 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "", ··· 2171 2171 } 2172 2172 2173 2173 static int ata_eh_followup_srst_needed(struct ata_link *link, 2174 - int rc, int classify, 2175 - const unsigned int *classes) 2174 + int rc, const unsigned int *classes) 2176 2175 { 2177 2176 if ((link->flags & ATA_LFLAG_NO_SRST) || ata_link_offline(link)) 2178 2177 return 0; 2179 - if (rc == -EAGAIN) { 2180 - if (classify) 2181 - return 1; 2182 - rc = 0; 2183 - } 2184 - if (rc != 0) 2185 - return 0; 2178 + if (rc == -EAGAIN) 2179 + return 1; 2186 2180 if (sata_pmp_supported(link->ap) && ata_is_host_link(link)) 2187 2181 return 1; 2188 2182 return 0; ··· 2204 2210 */ 2205 2211 while (ata_eh_reset_timeouts[max_tries] != ULONG_MAX) 2206 2212 max_tries++; 2213 + if (link->flags & ATA_LFLAG_NO_HRST) 2214 + hardreset = NULL; 2215 + if (link->flags & ATA_LFLAG_NO_SRST) 2216 + softreset = NULL; 2207 2217 2208 2218 now = jiffies; 2209 2219 deadline = ata_deadline(ehc->last_reset, ATA_EH_RESET_COOL_DOWN); ··· 2245 2247 ehc->i.action &= ~ATA_EH_RESET; 2246 2248 if (hardreset) { 2247 2249 reset = hardreset; 2248 - ehc->i.action = ATA_EH_HARDRESET; 2250 + ehc->i.action |= ATA_EH_HARDRESET; 2249 2251 } else if (softreset) { 2250 2252 reset = softreset; 2251 - ehc->i.action = ATA_EH_SOFTRESET; 2253 + ehc->i.action |= ATA_EH_SOFTRESET; 2252 2254 } 2253 2255 2254 2256 if (prereset) { ··· 2303 2305 ehc->i.flags |= ATA_EHI_DID_SOFTRESET; 2304 2306 2305 2307 rc = ata_do_reset(link, reset, classes, deadline); 2308 + if (rc && rc != -EAGAIN) 2309 + goto fail; 2306 2310 2307 2311 if (reset == hardreset && 2308 - ata_eh_followup_srst_needed(link, rc, classify, classes)) { 2312 + ata_eh_followup_srst_needed(link, rc, classes)) { 2309 2313 /* okay, let's do follow-up softreset */ 2310 2314 reset = softreset; 2311 2315 ··· 2322 2322 ata_eh_about_to_do(link, NULL, ATA_EH_RESET); 2323 2323 rc = ata_do_reset(link, reset, classes, deadline); 2324 2324 } 2325 - 2326 - /* -EAGAIN can happen if we skipped followup SRST */ 2327 - if (rc && rc != -EAGAIN) 2328 - goto fail; 2329 2325 } else { 2330 2326 if (verbose) 2331 2327 ata_link_printk(link, KERN_INFO, "no reset method "
+1 -1
drivers/ata/pata_acpi.c
··· 181 181 182 182 if (adev != acpi->last) { 183 183 pacpi_set_piomode(ap, adev); 184 - if (adev->dma_mode) 184 + if (ata_dma_enabled(adev)) 185 185 pacpi_set_dmamode(ap, adev); 186 186 acpi->last = adev; 187 187 }
+1 -1
drivers/ata/pata_atiixp.c
··· 183 183 u16 tmp16; 184 184 185 185 pci_read_config_word(pdev, ATIIXP_IDE_UDMA_CONTROL, &tmp16); 186 - if (adev->dma_mode >= XFER_UDMA_0) 186 + if (ata_using_udma(adev)) 187 187 tmp16 |= (1 << dn); 188 188 else 189 189 tmp16 &= ~(1 << dn);
+3 -3
drivers/ata/pata_cs5530.c
··· 149 149 struct ata_device *prev = ap->private_data; 150 150 151 151 /* See if the DMA settings could be wrong */ 152 - if (adev->dma_mode != 0 && adev != prev && prev != NULL) { 152 + if (ata_dma_enabled(adev) && adev != prev && prev != NULL) { 153 153 /* Maybe, but do the channels match MWDMA/UDMA ? */ 154 - if ((adev->dma_mode >= XFER_UDMA_0 && prev->dma_mode < XFER_UDMA_0) || 155 - (adev->dma_mode < XFER_UDMA_0 && prev->dma_mode >= XFER_UDMA_0)) 154 + if ((ata_using_udma(adev) && !ata_using_udma(prev)) || 155 + (ata_using_udma(prev) && !ata_using_udma(adev))) 156 156 /* Switch the mode bits */ 157 157 cs5530_set_dmamode(ap, adev); 158 158 }
+1 -1
drivers/ata/pata_it821x.c
··· 606 606 { 607 607 unsigned char id[41]; 608 608 int mode = 0; 609 - char *mtype; 609 + char *mtype = ""; 610 610 char mbuf[8]; 611 611 char *cbl = "(40 wire cable)"; 612 612
+1 -1
drivers/ata/pata_oldpiix.c
··· 198 198 199 199 if (adev != ap->private_data) { 200 200 oldpiix_set_piomode(ap, adev); 201 - if (adev->dma_mode) 201 + if (ata_dma_enabled(adev)) 202 202 oldpiix_set_dmamode(ap, adev); 203 203 } 204 204 return ata_sff_qc_issue(qc);
+3 -3
drivers/ata/pata_sc1200.c
··· 167 167 struct ata_device *prev = ap->private_data; 168 168 169 169 /* See if the DMA settings could be wrong */ 170 - if (adev->dma_mode != 0 && adev != prev && prev != NULL) { 170 + if (ata_dma_enabled(adev) && adev != prev && prev != NULL) { 171 171 /* Maybe, but do the channels match MWDMA/UDMA ? */ 172 - if ((adev->dma_mode >= XFER_UDMA_0 && prev->dma_mode < XFER_UDMA_0) || 173 - (adev->dma_mode < XFER_UDMA_0 && prev->dma_mode >= XFER_UDMA_0)) 172 + if ((ata_using_udma(adev) && !ata_using_udma(prev)) || 173 + (ata_using_udma(prev) && !ata_using_udma(adev))) 174 174 /* Switch the mode bits */ 175 175 sc1200_set_dmamode(ap, adev); 176 176 }
+11 -48
drivers/ata/pata_via.c
··· 324 324 } 325 325 326 326 /** 327 - * via_ata_sff_tf_load - send taskfile registers to host controller 327 + * via_tf_load - send taskfile registers to host controller 328 328 * @ap: Port to which output is sent 329 329 * @tf: ATA taskfile register set 330 330 * 331 331 * Outputs ATA taskfile to standard ATA host controller. 332 332 * 333 333 * Note: This is to fix the internal bug of via chipsets, which 334 - * will reset the device register after changing the IEN bit on 335 - * ctl register 334 + * will reset the device register after changing the IEN bit on 335 + * ctl register 336 336 */ 337 - static void via_ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) 337 + static void via_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) 338 338 { 339 - struct ata_ioports *ioaddr = &ap->ioaddr; 340 - unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR; 339 + struct ata_taskfile tmp_tf; 341 340 342 - if (tf->ctl != ap->last_ctl) { 343 - iowrite8(tf->ctl, ioaddr->ctl_addr); 344 - iowrite8(tf->device, ioaddr->device_addr); 345 - ap->last_ctl = tf->ctl; 346 - ata_wait_idle(ap); 341 + if (ap->ctl != ap->last_ctl && !(tf->flags & ATA_TFLAG_DEVICE)) { 342 + tmp_tf = *tf; 343 + tmp_tf.flags |= ATA_TFLAG_DEVICE; 344 + tf = &tmp_tf; 347 345 } 348 - 349 - if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) { 350 - iowrite8(tf->hob_feature, ioaddr->feature_addr); 351 - iowrite8(tf->hob_nsect, ioaddr->nsect_addr); 352 - iowrite8(tf->hob_lbal, ioaddr->lbal_addr); 353 - iowrite8(tf->hob_lbam, ioaddr->lbam_addr); 354 - iowrite8(tf->hob_lbah, ioaddr->lbah_addr); 355 - VPRINTK("hob: feat 0x%X nsect 0x%X, lba 0x%X 0x%X 0x%X\n", 356 - tf->hob_feature, 357 - tf->hob_nsect, 358 - tf->hob_lbal, 359 - tf->hob_lbam, 360 - tf->hob_lbah); 361 - } 362 - 363 - if (is_addr) { 364 - iowrite8(tf->feature, ioaddr->feature_addr); 365 - iowrite8(tf->nsect, ioaddr->nsect_addr); 366 - iowrite8(tf->lbal, ioaddr->lbal_addr); 367 - iowrite8(tf->lbam, ioaddr->lbam_addr); 368 - iowrite8(tf->lbah, ioaddr->lbah_addr); 369 - VPRINTK("feat 0x%X nsect 0x%X lba 0x%X 0x%X 0x%X\n", 370 - tf->feature, 371 - tf->nsect, 372 - tf->lbal, 373 - tf->lbam, 374 - tf->lbah); 375 - } 376 - 377 - if (tf->flags & ATA_TFLAG_DEVICE) { 378 - iowrite8(tf->device, ioaddr->device_addr); 379 - VPRINTK("device 0x%X\n", tf->device); 380 - } 381 - 382 - ata_wait_idle(ap); 346 + ata_sff_tf_load(ap, tf); 383 347 } 384 348 385 349 static struct scsi_host_template via_sht = { ··· 356 392 .set_piomode = via_set_piomode, 357 393 .set_dmamode = via_set_dmamode, 358 394 .prereset = via_pre_reset, 359 - .sff_tf_load = via_ata_tf_load, 395 + .sff_tf_load = via_tf_load, 360 396 }; 361 397 362 398 static struct ata_port_operations via_port_ops_noirq = { 363 399 .inherits = &via_port_ops, 364 400 .sff_data_xfer = ata_sff_data_xfer_noirq, 365 - .sff_tf_load = via_ata_tf_load, 366 401 }; 367 402 368 403 /**
+12 -25
drivers/ata/sata_mv.c
··· 1134 1134 if (ap->nr_active_links == 0) 1135 1135 return 0; 1136 1136 1137 - if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) { 1138 - /* 1139 - * The port is operating in host queuing mode (EDMA). 1140 - * It can accomodate a new qc if the qc protocol 1141 - * is compatible with the current host queue mode. 1142 - */ 1143 - if (pp->pp_flags & MV_PP_FLAG_NCQ_EN) { 1144 - /* 1145 - * The host queue (EDMA) is in NCQ mode. 1146 - * If the new qc is also an NCQ command, 1147 - * then allow the new qc. 1148 - */ 1149 - if (qc->tf.protocol == ATA_PROT_NCQ) 1150 - return 0; 1151 - } else { 1152 - /* 1153 - * The host queue (EDMA) is in non-NCQ, DMA mode. 1154 - * If the new qc is also a non-NCQ, DMA command, 1155 - * then allow the new qc. 1156 - */ 1157 - if (qc->tf.protocol == ATA_PROT_DMA) 1158 - return 0; 1159 - } 1160 - } 1137 + /* 1138 + * The port is operating in host queuing mode (EDMA) with NCQ 1139 + * enabled, allow multiple NCQ commands. EDMA also allows 1140 + * queueing multiple DMA commands but libata core currently 1141 + * doesn't allow it. 1142 + */ 1143 + if ((pp->pp_flags & MV_PP_FLAG_EDMA_EN) && 1144 + (pp->pp_flags & MV_PP_FLAG_NCQ_EN) && ata_is_ncq(qc->tf.protocol)) 1145 + return 0; 1146 + 1161 1147 return ATA_DEFER_PORT; 1162 1148 } 1163 1149 ··· 3022 3036 break; 3023 3037 case chip_soc: 3024 3038 hpriv->ops = &mv_soc_ops; 3025 - hp_flags |= MV_HP_FLAG_SOC | MV_HP_ERRATA_60X1C0; 3039 + hp_flags |= MV_HP_FLAG_SOC | MV_HP_GEN_IIE | 3040 + MV_HP_ERRATA_60X1C0; 3026 3041 break; 3027 3042 3028 3043 default:
+24
include/linux/libata.h
··· 163 163 ATA_DEV_NONE = 9, /* no device */ 164 164 165 165 /* struct ata_link flags */ 166 + ATA_LFLAG_NO_HRST = (1 << 1), /* avoid hardreset */ 166 167 ATA_LFLAG_NO_SRST = (1 << 2), /* avoid softreset */ 167 168 ATA_LFLAG_ASSUME_ATA = (1 << 3), /* assume ATA class */ 168 169 ATA_LFLAG_ASSUME_SEMB = (1 << 4), /* assume SEMB class */ ··· 647 646 648 647 unsigned int flags; /* ATA_LFLAG_xxx */ 649 648 649 + u32 saved_scontrol; /* SControl on probe */ 650 650 unsigned int hw_sata_spd_limit; 651 651 unsigned int sata_spd_limit; 652 652 unsigned int sata_spd; /* current SATA PHY speed */ ··· 1429 1427 return from_jiffies + msecs_to_jiffies(timeout_msecs); 1430 1428 } 1431 1429 1430 + /* Don't open code these in drivers as there are traps. Firstly the range may 1431 + change in future hardware and specs, secondly 0xFF means 'no DMA' but is 1432 + > UDMA_0. Dyma ddreigiau */ 1433 + 1434 + static inline int ata_using_mwdma(struct ata_device *adev) 1435 + { 1436 + if (adev->dma_mode >= XFER_MW_DMA_0 && adev->dma_mode <= XFER_MW_DMA_4) 1437 + return 1; 1438 + return 0; 1439 + } 1440 + 1441 + static inline int ata_using_udma(struct ata_device *adev) 1442 + { 1443 + if (adev->dma_mode >= XFER_UDMA_0 && adev->dma_mode <= XFER_UDMA_7) 1444 + return 1; 1445 + return 0; 1446 + } 1447 + 1448 + static inline int ata_dma_enabled(struct ata_device *adev) 1449 + { 1450 + return (adev->dma_mode == 0xFF ? 0 : 1); 1451 + } 1432 1452 1433 1453 /************************************************************************** 1434 1454 * PMP - drivers/ata/libata-pmp.c