diff options
Diffstat (limited to 'drivers/ide/pci/serverworks.c')
-rw-r--r-- | drivers/ide/pci/serverworks.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index cfe927469793..a1fb20826a5b 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -312,7 +312,7 @@ static u8 __devinit ata66_svwks_cobalt(ide_hwif_t *hwif) | |||
312 | return ATA_CBL_PATA40; | 312 | return ATA_CBL_PATA40; |
313 | } | 313 | } |
314 | 314 | ||
315 | static u8 __devinit ata66_svwks(ide_hwif_t *hwif) | 315 | static u8 __devinit svwks_cable_detect(ide_hwif_t *hwif) |
316 | { | 316 | { |
317 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 317 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
318 | 318 | ||
@@ -336,17 +336,18 @@ static u8 __devinit ata66_svwks(ide_hwif_t *hwif) | |||
336 | return ATA_CBL_PATA40; | 336 | return ATA_CBL_PATA40; |
337 | } | 337 | } |
338 | 338 | ||
339 | static void __devinit init_hwif_svwks (ide_hwif_t *hwif) | 339 | static const struct ide_port_ops osb4_port_ops = { |
340 | { | 340 | .set_pio_mode = svwks_set_pio_mode, |
341 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 341 | .set_dma_mode = svwks_set_dma_mode, |
342 | 342 | .udma_filter = svwks_udma_filter, | |
343 | hwif->set_pio_mode = &svwks_set_pio_mode; | 343 | }; |
344 | hwif->set_dma_mode = &svwks_set_dma_mode; | ||
345 | hwif->udma_filter = &svwks_udma_filter; | ||
346 | 344 | ||
347 | if (dev->device != PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) | 345 | static const struct ide_port_ops svwks_port_ops = { |
348 | hwif->cable_detect = ata66_svwks; | 346 | .set_pio_mode = svwks_set_pio_mode, |
349 | } | 347 | .set_dma_mode = svwks_set_dma_mode, |
348 | .udma_filter = svwks_udma_filter, | ||
349 | .cable_detect = svwks_cable_detect, | ||
350 | }; | ||
350 | 351 | ||
351 | #define IDE_HFLAGS_SVWKS \ | 352 | #define IDE_HFLAGS_SVWKS \ |
352 | (IDE_HFLAG_LEGACY_IRQS | \ | 353 | (IDE_HFLAG_LEGACY_IRQS | \ |
@@ -356,7 +357,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = { | |||
356 | { /* 0 */ | 357 | { /* 0 */ |
357 | .name = "SvrWks OSB4", | 358 | .name = "SvrWks OSB4", |
358 | .init_chipset = init_chipset_svwks, | 359 | .init_chipset = init_chipset_svwks, |
359 | .init_hwif = init_hwif_svwks, | 360 | .port_ops = &osb4_port_ops, |
360 | .host_flags = IDE_HFLAGS_SVWKS, | 361 | .host_flags = IDE_HFLAGS_SVWKS, |
361 | .pio_mask = ATA_PIO4, | 362 | .pio_mask = ATA_PIO4, |
362 | .mwdma_mask = ATA_MWDMA2, | 363 | .mwdma_mask = ATA_MWDMA2, |
@@ -364,7 +365,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = { | |||
364 | },{ /* 1 */ | 365 | },{ /* 1 */ |
365 | .name = "SvrWks CSB5", | 366 | .name = "SvrWks CSB5", |
366 | .init_chipset = init_chipset_svwks, | 367 | .init_chipset = init_chipset_svwks, |
367 | .init_hwif = init_hwif_svwks, | 368 | .port_ops = &svwks_port_ops, |
368 | .host_flags = IDE_HFLAGS_SVWKS, | 369 | .host_flags = IDE_HFLAGS_SVWKS, |
369 | .pio_mask = ATA_PIO4, | 370 | .pio_mask = ATA_PIO4, |
370 | .mwdma_mask = ATA_MWDMA2, | 371 | .mwdma_mask = ATA_MWDMA2, |
@@ -372,7 +373,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = { | |||
372 | },{ /* 2 */ | 373 | },{ /* 2 */ |
373 | .name = "SvrWks CSB6", | 374 | .name = "SvrWks CSB6", |
374 | .init_chipset = init_chipset_svwks, | 375 | .init_chipset = init_chipset_svwks, |
375 | .init_hwif = init_hwif_svwks, | 376 | .port_ops = &svwks_port_ops, |
376 | .host_flags = IDE_HFLAGS_SVWKS, | 377 | .host_flags = IDE_HFLAGS_SVWKS, |
377 | .pio_mask = ATA_PIO4, | 378 | .pio_mask = ATA_PIO4, |
378 | .mwdma_mask = ATA_MWDMA2, | 379 | .mwdma_mask = ATA_MWDMA2, |
@@ -380,7 +381,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = { | |||
380 | },{ /* 3 */ | 381 | },{ /* 3 */ |
381 | .name = "SvrWks CSB6", | 382 | .name = "SvrWks CSB6", |
382 | .init_chipset = init_chipset_svwks, | 383 | .init_chipset = init_chipset_svwks, |
383 | .init_hwif = init_hwif_svwks, | 384 | .port_ops = &svwks_port_ops, |
384 | .host_flags = IDE_HFLAGS_SVWKS | IDE_HFLAG_SINGLE, | 385 | .host_flags = IDE_HFLAGS_SVWKS | IDE_HFLAG_SINGLE, |
385 | .pio_mask = ATA_PIO4, | 386 | .pio_mask = ATA_PIO4, |
386 | .mwdma_mask = ATA_MWDMA2, | 387 | .mwdma_mask = ATA_MWDMA2, |
@@ -388,7 +389,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = { | |||
388 | },{ /* 4 */ | 389 | },{ /* 4 */ |
389 | .name = "SvrWks HT1000", | 390 | .name = "SvrWks HT1000", |
390 | .init_chipset = init_chipset_svwks, | 391 | .init_chipset = init_chipset_svwks, |
391 | .init_hwif = init_hwif_svwks, | 392 | .port_ops = &svwks_port_ops, |
392 | .host_flags = IDE_HFLAGS_SVWKS | IDE_HFLAG_SINGLE, | 393 | .host_flags = IDE_HFLAGS_SVWKS | IDE_HFLAG_SINGLE, |
393 | .pio_mask = ATA_PIO4, | 394 | .pio_mask = ATA_PIO4, |
394 | .mwdma_mask = ATA_MWDMA2, | 395 | .mwdma_mask = ATA_MWDMA2, |