Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libata-sff: separate out BMDMA init

Separate out ata_pci_bmdma_prepare_host() and ata_pci_bmdma_init_one()
from their SFF counterparts. SFF ones no longer try to initialize
BMDMA or set PCI master.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by

Tejun Heo and committed by
Jeff Garzik
1c5afdf7 c3b28894

+166 -66
+1 -1
drivers/ata/ata_generic.c
··· 155 155 return rc; 156 156 pcim_pin_device(dev); 157 157 } 158 - return ata_pci_sff_init_one(dev, ppi, &generic_sht, NULL, 0); 158 + return ata_pci_bmdma_init_one(dev, ppi, &generic_sht, NULL, 0); 159 159 } 160 160 161 161 static struct pci_device_id ata_generic[] = {
+1 -1
drivers/ata/ata_piix.c
··· 1589 1589 hpriv->map = piix_init_sata_map(pdev, port_info, 1590 1590 piix_map_db_table[ent->driver_data]); 1591 1591 1592 - rc = ata_pci_sff_prepare_host(pdev, ppi, &host); 1592 + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); 1593 1593 if (rc) 1594 1594 return rc; 1595 1595 host->private_data = hpriv;
+114 -24
drivers/ata/libata-sff.c
··· 2315 2315 EXPORT_SYMBOL_GPL(ata_pci_sff_init_host); 2316 2316 2317 2317 /** 2318 - * ata_pci_sff_prepare_host - helper to prepare native PCI ATA host 2318 + * ata_pci_sff_prepare_host - helper to prepare PCI PIO-only SFF ATA host 2319 2319 * @pdev: target PCI device 2320 2320 * @ppi: array of port_info, must be enough for two ports 2321 2321 * @r_host: out argument for the initialized ATA host 2322 2322 * 2323 - * Helper to allocate ATA host for @pdev, acquire all native PCI 2324 - * resources and initialize it accordingly in one go. 2323 + * Helper to allocate PIO-only SFF ATA host for @pdev, acquire 2324 + * all PCI resources and initialize it accordingly in one go. 2325 2325 * 2326 2326 * LOCKING: 2327 2327 * Inherited from calling layer (may sleep). ··· 2350 2350 rc = ata_pci_sff_init_host(host); 2351 2351 if (rc) 2352 2352 goto err_out; 2353 - 2354 - /* init DMA related stuff */ 2355 - ata_pci_bmdma_init(host); 2356 2353 2357 2354 devres_remove_group(&pdev->dev, NULL); 2358 2355 *r_host = host; ··· 2455 2458 } 2456 2459 EXPORT_SYMBOL_GPL(ata_pci_sff_activate_host); 2457 2460 2461 + static const struct ata_port_info *ata_sff_find_valid_pi( 2462 + const struct ata_port_info * const *ppi) 2463 + { 2464 + int i; 2465 + 2466 + /* look up the first valid port_info */ 2467 + for (i = 0; i < 2 && ppi[i]; i++) 2468 + if (ppi[i]->port_ops != &ata_dummy_port_ops) 2469 + return ppi[i]; 2470 + 2471 + return NULL; 2472 + } 2473 + 2458 2474 /** 2459 - * ata_pci_sff_init_one - Initialize/register PCI IDE host controller 2475 + * ata_pci_sff_init_one - Initialize/register PIO-only PCI IDE controller 2460 2476 * @pdev: Controller to be initialized 2461 2477 * @ppi: array of port_info, must be enough for two ports 2462 2478 * @sht: scsi_host_template to use when registering the host ··· 2478 2468 * 2479 2469 * This is a helper function which can be called from a driver's 2480 2470 * xxx_init_one() probe function if the hardware uses traditional 2481 - * IDE taskfile registers. 2482 - * 2483 - * This function calls pci_enable_device(), reserves its register 2484 - * regions, sets the dma mask, enables bus master mode, and calls 2485 - * ata_device_add() 2471 + * IDE taskfile registers and is PIO only. 2486 2472 * 2487 2473 * ASSUMPTION: 2488 2474 * Nobody makes a single channel controller that appears solely as ··· 2495 2489 struct scsi_host_template *sht, void *host_priv, int hflag) 2496 2490 { 2497 2491 struct device *dev = &pdev->dev; 2498 - const struct ata_port_info *pi = NULL; 2492 + const struct ata_port_info *pi; 2499 2493 struct ata_host *host = NULL; 2500 - int i, rc; 2494 + int rc; 2501 2495 2502 2496 DPRINTK("ENTER\n"); 2503 2497 2504 - /* look up the first valid port_info */ 2505 - for (i = 0; i < 2 && ppi[i]; i++) { 2506 - if (ppi[i]->port_ops != &ata_dummy_port_ops) { 2507 - pi = ppi[i]; 2508 - break; 2509 - } 2510 - } 2511 - 2498 + pi = ata_sff_find_valid_pi(ppi); 2512 2499 if (!pi) { 2513 2500 dev_printk(KERN_ERR, &pdev->dev, 2514 2501 "no valid port_info specified\n"); ··· 2522 2523 host->private_data = host_priv; 2523 2524 host->flags |= hflag; 2524 2525 2525 - pci_set_master(pdev); 2526 - rc = ata_pci_sff_activate_host(host, ata_bmdma_interrupt, sht); 2526 + rc = ata_pci_sff_activate_host(host, ata_sff_interrupt, sht); 2527 2527 out: 2528 2528 if (rc == 0) 2529 2529 devres_remove_group(&pdev->dev, NULL); ··· 3193 3195 } 3194 3196 } 3195 3197 EXPORT_SYMBOL_GPL(ata_pci_bmdma_init); 3198 + 3199 + /** 3200 + * ata_pci_bmdma_prepare_host - helper to prepare PCI BMDMA ATA host 3201 + * @pdev: target PCI device 3202 + * @ppi: array of port_info, must be enough for two ports 3203 + * @r_host: out argument for the initialized ATA host 3204 + * 3205 + * Helper to allocate BMDMA ATA host for @pdev, acquire all PCI 3206 + * resources and initialize it accordingly in one go. 3207 + * 3208 + * LOCKING: 3209 + * Inherited from calling layer (may sleep). 3210 + * 3211 + * RETURNS: 3212 + * 0 on success, -errno otherwise. 3213 + */ 3214 + int ata_pci_bmdma_prepare_host(struct pci_dev *pdev, 3215 + const struct ata_port_info * const * ppi, 3216 + struct ata_host **r_host) 3217 + { 3218 + int rc; 3219 + 3220 + rc = ata_pci_sff_prepare_host(pdev, ppi, r_host); 3221 + if (rc) 3222 + return rc; 3223 + 3224 + ata_pci_bmdma_init(*r_host); 3225 + return 0; 3226 + } 3227 + EXPORT_SYMBOL_GPL(ata_pci_bmdma_prepare_host); 3228 + 3229 + /** 3230 + * ata_pci_bmdma_init_one - Initialize/register BMDMA PCI IDE controller 3231 + * @pdev: Controller to be initialized 3232 + * @ppi: array of port_info, must be enough for two ports 3233 + * @sht: scsi_host_template to use when registering the host 3234 + * @host_priv: host private_data 3235 + * @hflags: host flags 3236 + * 3237 + * This function is similar to ata_pci_sff_init_one() but also 3238 + * takes care of BMDMA initialization. 3239 + * 3240 + * LOCKING: 3241 + * Inherited from PCI layer (may sleep). 3242 + * 3243 + * RETURNS: 3244 + * Zero on success, negative on errno-based value on error. 3245 + */ 3246 + int ata_pci_bmdma_init_one(struct pci_dev *pdev, 3247 + const struct ata_port_info * const * ppi, 3248 + struct scsi_host_template *sht, void *host_priv, 3249 + int hflags) 3250 + { 3251 + struct device *dev = &pdev->dev; 3252 + const struct ata_port_info *pi; 3253 + struct ata_host *host = NULL; 3254 + int rc; 3255 + 3256 + DPRINTK("ENTER\n"); 3257 + 3258 + pi = ata_sff_find_valid_pi(ppi); 3259 + if (!pi) { 3260 + dev_printk(KERN_ERR, &pdev->dev, 3261 + "no valid port_info specified\n"); 3262 + return -EINVAL; 3263 + } 3264 + 3265 + if (!devres_open_group(dev, NULL, GFP_KERNEL)) 3266 + return -ENOMEM; 3267 + 3268 + rc = pcim_enable_device(pdev); 3269 + if (rc) 3270 + goto out; 3271 + 3272 + /* prepare and activate BMDMA host */ 3273 + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); 3274 + if (rc) 3275 + goto out; 3276 + host->private_data = host_priv; 3277 + host->flags |= hflags; 3278 + 3279 + pci_set_master(pdev); 3280 + rc = ata_pci_sff_activate_host(host, ata_bmdma_interrupt, sht); 3281 + out: 3282 + if (rc == 0) 3283 + devres_remove_group(&pdev->dev, NULL); 3284 + else 3285 + devres_release_group(&pdev->dev, NULL); 3286 + 3287 + return rc; 3288 + } 3289 + EXPORT_SYMBOL_GPL(ata_pci_bmdma_init_one); 3196 3290 3197 3291 #endif /* CONFIG_PCI */ 3198 3292
+1 -1
drivers/ata/pata_acpi.c
··· 260 260 return rc; 261 261 pcim_pin_device(pdev); 262 262 } 263 - return ata_pci_sff_init_one(pdev, ppi, &pacpi_sht, NULL, 0); 263 + return ata_pci_bmdma_init_one(pdev, ppi, &pacpi_sht, NULL, 0); 264 264 } 265 265 266 266 static const struct pci_device_id pacpi_pci_tbl[] = {
+4 -1
drivers/ata/pata_ali.c
··· 583 583 ppi[0] = &info_20_udma; 584 584 } 585 585 586 - return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL, 0); 586 + if (!ppi[0]->mwdma_mask && !ppi[0]->udma_mask) 587 + return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL, 0); 588 + else 589 + return ata_pci_bmdma_init_one(pdev, ppi, &ali_sht, NULL, 0); 587 590 } 588 591 589 592 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_amd.c
··· 574 574 } 575 575 576 576 /* And fire it up */ 577 - return ata_pci_sff_init_one(pdev, ppi, &amd_sht, hpriv, 0); 577 + return ata_pci_bmdma_init_one(pdev, ppi, &amd_sht, hpriv, 0); 578 578 } 579 579 580 580 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_artop.c
··· 421 421 422 422 BUG_ON(ppi[0] == NULL); 423 423 424 - return ata_pci_sff_init_one(pdev, ppi, &artop_sht, NULL, 0); 424 + return ata_pci_bmdma_init_one(pdev, ppi, &artop_sht, NULL, 0); 425 425 } 426 426 427 427 static const struct pci_device_id artop_pci_tbl[] = {
+2 -2
drivers/ata/pata_atiixp.c
··· 246 246 if (!pci_test_config_bits(pdev, &atiixp_enable_bits[i])) 247 247 ppi[i] = &ata_dummy_port_info; 248 248 249 - return ata_pci_sff_init_one(pdev, ppi, &atiixp_sht, NULL, 250 - ATA_HOST_PARALLEL_SCAN); 249 + return ata_pci_bmdma_init_one(pdev, ppi, &atiixp_sht, NULL, 250 + ATA_HOST_PARALLEL_SCAN); 251 251 } 252 252 253 253 static const struct pci_device_id atiixp[] = {
+1 -1
drivers/ata/pata_cmd64x.c
··· 367 367 pci_write_config_byte(pdev, UDIDETCR0, 0xF0); 368 368 #endif 369 369 370 - return ata_pci_sff_init_one(pdev, ppi, &cmd64x_sht, NULL, 0); 370 + return ata_pci_bmdma_init_one(pdev, ppi, &cmd64x_sht, NULL, 0); 371 371 } 372 372 373 373 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_cs5530.c
··· 324 324 ppi[1] = &info_palmax_secondary; 325 325 326 326 /* Now kick off ATA set up */ 327 - return ata_pci_sff_init_one(pdev, ppi, &cs5530_sht, NULL, 0); 327 + return ata_pci_bmdma_init_one(pdev, ppi, &cs5530_sht, NULL, 0); 328 328 } 329 329 330 330 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_cs5535.c
··· 198 198 rdmsr(ATAC_CH0D1_PIO, timings, dummy); 199 199 if (CS5535_BAD_PIO(timings)) 200 200 wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0); 201 - return ata_pci_sff_init_one(dev, ppi, &cs5535_sht, NULL, 0); 201 + return ata_pci_bmdma_init_one(dev, ppi, &cs5535_sht, NULL, 0); 202 202 } 203 203 204 204 static const struct pci_device_id cs5535[] = {
+1 -1
drivers/ata/pata_cs5536.c
··· 260 260 return -ENODEV; 261 261 } 262 262 263 - return ata_pci_sff_init_one(dev, ppi, &cs5536_sht, NULL, 0); 263 + return ata_pci_bmdma_init_one(dev, ppi, &cs5536_sht, NULL, 0); 264 264 } 265 265 266 266 static const struct pci_device_id cs5536[] = {
+1 -1
drivers/ata/pata_cypress.c
··· 138 138 if (PCI_FUNC(pdev->devfn) != 1) 139 139 return -ENODEV; 140 140 141 - return ata_pci_sff_init_one(pdev, ppi, &cy82c693_sht, NULL, 0); 141 + return ata_pci_bmdma_init_one(pdev, ppi, &cy82c693_sht, NULL, 0); 142 142 } 143 143 144 144 static const struct pci_device_id cy82c693[] = {
+2 -2
drivers/ata/pata_efar.c
··· 277 277 dev_printk(KERN_DEBUG, &pdev->dev, 278 278 "version " DRV_VERSION "\n"); 279 279 280 - return ata_pci_sff_init_one(pdev, ppi, &efar_sht, NULL, 281 - ATA_HOST_PARALLEL_SCAN); 280 + return ata_pci_bmdma_init_one(pdev, ppi, &efar_sht, NULL, 281 + ATA_HOST_PARALLEL_SCAN); 282 282 } 283 283 284 284 static const struct pci_device_id efar_pci_tbl[] = {
+1 -1
drivers/ata/pata_hpt366.c
··· 361 361 break; 362 362 } 363 363 /* Now kick off ATA set up */ 364 - return ata_pci_sff_init_one(dev, ppi, &hpt36x_sht, hpriv, 0); 364 + return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0); 365 365 } 366 366 367 367 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_hpt37x.c
··· 987 987 } 988 988 989 989 /* Now kick off ATA set up */ 990 - return ata_pci_sff_init_one(dev, ppi, &hpt37x_sht, private_data, 0); 990 + return ata_pci_bmdma_init_one(dev, ppi, &hpt37x_sht, private_data, 0); 991 991 } 992 992 993 993 static const struct pci_device_id hpt37x[] = {
+1 -1
drivers/ata/pata_hpt3x2n.c
··· 548 548 outb(inb(iobase + 0x9c) | 0x04, iobase + 0x9c); 549 549 550 550 /* Now kick off ATA set up */ 551 - return ata_pci_sff_init_one(dev, ppi, &hpt3x2n_sht, hpriv, 0); 551 + return ata_pci_bmdma_init_one(dev, ppi, &hpt3x2n_sht, hpriv, 0); 552 552 } 553 553 554 554 static const struct pci_device_id hpt3x2n[] = {
+1 -1
drivers/ata/pata_it8213.c
··· 273 273 dev_printk(KERN_DEBUG, &pdev->dev, 274 274 "version " DRV_VERSION "\n"); 275 275 276 - return ata_pci_sff_init_one(pdev, ppi, &it8213_sht, NULL, 0); 276 + return ata_pci_bmdma_init_one(pdev, ppi, &it8213_sht, NULL, 0); 277 277 } 278 278 279 279 static const struct pci_device_id it8213_pci_tbl[] = {
+1 -1
drivers/ata/pata_it821x.c
··· 933 933 else 934 934 ppi[0] = &info_smart; 935 935 } 936 - return ata_pci_sff_init_one(pdev, ppi, &it821x_sht, NULL, 0); 936 + return ata_pci_bmdma_init_one(pdev, ppi, &it821x_sht, NULL, 0); 937 937 } 938 938 939 939 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_jmicron.c
··· 144 144 }; 145 145 const struct ata_port_info *ppi[] = { &info, NULL }; 146 146 147 - return ata_pci_sff_init_one(pdev, ppi, &jmicron_sht, NULL, 0); 147 + return ata_pci_bmdma_init_one(pdev, ppi, &jmicron_sht, NULL, 0); 148 148 } 149 149 150 150 static const struct pci_device_id jmicron_pci_tbl[] = {
+1 -1
drivers/ata/pata_marvell.c
··· 153 153 return -ENODEV; 154 154 } 155 155 #endif 156 - return ata_pci_sff_init_one(pdev, ppi, &marvell_sht, NULL, 0); 156 + return ata_pci_bmdma_init_one(pdev, ppi, &marvell_sht, NULL, 0); 157 157 } 158 158 159 159 static const struct pci_device_id marvell_pci_tbl[] = {
+1 -1
drivers/ata/pata_netcell.c
··· 82 82 ata_pci_bmdma_clear_simplex(pdev); 83 83 84 84 /* And let the library code do the work */ 85 - return ata_pci_sff_init_one(pdev, port_info, &netcell_sht, NULL, 0); 85 + return ata_pci_bmdma_init_one(pdev, port_info, &netcell_sht, NULL, 0); 86 86 } 87 87 88 88 static const struct pci_device_id netcell_pci_tbl[] = {
+1 -1
drivers/ata/pata_ns87415.c
··· 380 380 381 381 ns87415_fixup(pdev); 382 382 383 - return ata_pci_sff_init_one(pdev, ppi, &ns87415_sht, NULL, 0); 383 + return ata_pci_bmdma_init_one(pdev, ppi, &ns87415_sht, NULL, 0); 384 384 } 385 385 386 386 static const struct pci_device_id ns87415_pci_tbl[] = {
+1 -1
drivers/ata/pata_oldpiix.c
··· 248 248 dev_printk(KERN_DEBUG, &pdev->dev, 249 249 "version " DRV_VERSION "\n"); 250 250 251 - return ata_pci_sff_init_one(pdev, ppi, &oldpiix_sht, NULL, 0); 251 + return ata_pci_bmdma_init_one(pdev, ppi, &oldpiix_sht, NULL, 0); 252 252 } 253 253 254 254 static const struct pci_device_id oldpiix_pci_tbl[] = {
+1 -1
drivers/ata/pata_optidma.c
··· 429 429 if (optiplus_with_udma(dev)) 430 430 ppi[0] = &info_82c700_udma; 431 431 432 - return ata_pci_sff_init_one(dev, ppi, &optidma_sht, NULL, 0); 432 + return ata_pci_bmdma_init_one(dev, ppi, &optidma_sht, NULL, 0); 433 433 } 434 434 435 435 static const struct pci_device_id optidma[] = {
+1 -1
drivers/ata/pata_pdc202xx_old.c
··· 337 337 return -ENODEV; 338 338 } 339 339 } 340 - return ata_pci_sff_init_one(dev, ppi, &pdc202xx_sht, NULL, 0); 340 + return ata_pci_bmdma_init_one(dev, ppi, &pdc202xx_sht, NULL, 0); 341 341 } 342 342 343 343 static const struct pci_device_id pdc202xx[] = {
+1 -1
drivers/ata/pata_piccolo.c
··· 95 95 }; 96 96 const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info }; 97 97 /* Just one port for the moment */ 98 - return ata_pci_sff_init_one(dev, ppi, &tosh_sht, NULL, 0); 98 + return ata_pci_bmdma_init_one(dev, ppi, &tosh_sht, NULL, 0); 99 99 } 100 100 101 101 static struct pci_device_id ata_tosh[] = {
+1 -1
drivers/ata/pata_radisys.c
··· 227 227 dev_printk(KERN_DEBUG, &pdev->dev, 228 228 "version " DRV_VERSION "\n"); 229 229 230 - return ata_pci_sff_init_one(pdev, ppi, &radisys_sht, NULL, 0); 230 + return ata_pci_bmdma_init_one(pdev, ppi, &radisys_sht, NULL, 0); 231 231 } 232 232 233 233 static const struct pci_device_id radisys_pci_tbl[] = {
+1 -1
drivers/ata/pata_rdc.c
··· 344 344 */ 345 345 pci_read_config_dword(pdev, 0x54, &hpriv->saved_iocfg); 346 346 347 - rc = ata_pci_sff_prepare_host(pdev, ppi, &host); 347 + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); 348 348 if (rc) 349 349 return rc; 350 350 host->private_data = hpriv;
+1 -1
drivers/ata/pata_sc1200.c
··· 237 237 }; 238 238 const struct ata_port_info *ppi[] = { &info, NULL }; 239 239 240 - return ata_pci_sff_init_one(dev, ppi, &sc1200_sht, NULL, 0); 240 + return ata_pci_bmdma_init_one(dev, ppi, &sc1200_sht, NULL, 0); 241 241 } 242 242 243 243 static const struct pci_device_id sc1200[] = {
+1 -1
drivers/ata/pata_sch.c
··· 179 179 dev_printk(KERN_DEBUG, &pdev->dev, 180 180 "version " DRV_VERSION "\n"); 181 181 182 - return ata_pci_sff_init_one(pdev, ppi, &sch_sht, NULL, 0); 182 + return ata_pci_bmdma_init_one(pdev, ppi, &sch_sht, NULL, 0); 183 183 } 184 184 185 185 static int __init sch_init(void)
+1 -1
drivers/ata/pata_serverworks.c
··· 460 460 if (pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE) 461 461 ata_pci_bmdma_clear_simplex(pdev); 462 462 463 - return ata_pci_sff_init_one(pdev, ppi, &serverworks_sht, NULL, 0); 463 + return ata_pci_bmdma_init_one(pdev, ppi, &serverworks_sht, NULL, 0); 464 464 } 465 465 466 466 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_sil680.c
··· 378 378 IRQF_SHARED, &sil680_sht); 379 379 380 380 use_ioports: 381 - return ata_pci_sff_init_one(pdev, ppi, &sil680_sht, NULL, 0); 381 + return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0); 382 382 } 383 383 384 384 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_sis.c
··· 826 826 827 827 sis_fixup(pdev, chipset); 828 828 829 - return ata_pci_sff_init_one(pdev, ppi, &sis_sht, chipset, 0); 829 + return ata_pci_bmdma_init_one(pdev, ppi, &sis_sht, chipset, 0); 830 830 } 831 831 832 832 #ifdef CONFIG_PM
+1 -1
drivers/ata/pata_sl82c105.c
··· 316 316 val |= CTRL_P0EN | CTRL_P0F16 | CTRL_P1F16; 317 317 pci_write_config_dword(dev, 0x40, val); 318 318 319 - return ata_pci_sff_init_one(dev, ppi, &sl82c105_sht, NULL, 0); 319 + return ata_pci_bmdma_init_one(dev, ppi, &sl82c105_sht, NULL, 0); 320 320 } 321 321 322 322 static const struct pci_device_id sl82c105[] = {
+1 -1
drivers/ata/pata_triflex.c
··· 201 201 if (!printed_version++) 202 202 dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n"); 203 203 204 - return ata_pci_sff_init_one(dev, ppi, &triflex_sht, NULL, 0); 204 + return ata_pci_bmdma_init_one(dev, ppi, &triflex_sht, NULL, 0); 205 205 } 206 206 207 207 static const struct pci_device_id triflex[] = {
+1 -1
drivers/ata/pata_via.c
··· 627 627 } 628 628 629 629 /* We have established the device type, now fire it up */ 630 - return ata_pci_sff_init_one(pdev, ppi, &via_sht, (void *)config, 0); 630 + return ata_pci_bmdma_init_one(pdev, ppi, &via_sht, (void *)config, 0); 631 631 } 632 632 633 633 #ifdef CONFIG_PM
+1 -1
drivers/ata/sata_nv.c
··· 2430 2430 2431 2431 ppi[0] = &nv_port_info[type]; 2432 2432 ipriv = ppi[0]->private_data; 2433 - rc = ata_pci_sff_prepare_host(pdev, ppi, &host); 2433 + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); 2434 2434 if (rc) 2435 2435 return rc; 2436 2436
+1 -1
drivers/ata/sata_sis.c
··· 279 279 break; 280 280 } 281 281 282 - rc = ata_pci_sff_prepare_host(pdev, ppi, &host); 282 + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); 283 283 if (rc) 284 284 return rc; 285 285
+2 -2
drivers/ata/sata_via.c
··· 463 463 struct ata_host *host; 464 464 int rc; 465 465 466 - rc = ata_pci_sff_prepare_host(pdev, ppi, &host); 466 + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); 467 467 if (rc) 468 468 return rc; 469 469 *r_host = host; ··· 520 520 struct ata_host *host; 521 521 int i, rc; 522 522 523 - rc = ata_pci_sff_prepare_host(pdev, ppi, &host); 523 + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); 524 524 if (rc) 525 525 return rc; 526 526 *r_host = host;
+7
include/linux/libata.h
··· 1644 1644 #ifdef CONFIG_PCI 1645 1645 extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); 1646 1646 extern void ata_pci_bmdma_init(struct ata_host *host); 1647 + extern int ata_pci_bmdma_prepare_host(struct pci_dev *pdev, 1648 + const struct ata_port_info * const * ppi, 1649 + struct ata_host **r_host); 1650 + extern int ata_pci_bmdma_init_one(struct pci_dev *pdev, 1651 + const struct ata_port_info * const * ppi, 1652 + struct scsi_host_template *sht, 1653 + void *host_priv, int hflags); 1647 1654 #endif /* CONFIG_PCI */ 1648 1655 1649 1656 /**