diff options
Diffstat (limited to 'drivers/ata/ata_piix.c')
| -rw-r--r-- | drivers/ata/ata_piix.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 0ca4c3b78dc5..22b2dba90b9a 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
| @@ -151,7 +151,7 @@ struct piix_host_priv { | |||
| 151 | 151 | ||
| 152 | static int piix_init_one (struct pci_dev *pdev, | 152 | static int piix_init_one (struct pci_dev *pdev, |
| 153 | const struct pci_device_id *ent); | 153 | const struct pci_device_id *ent); |
| 154 | static void piix_host_stop(struct ata_host_set *host_set); | 154 | static void piix_host_stop(struct ata_host *host); |
| 155 | static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev); | 155 | static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev); |
| 156 | static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev); | 156 | static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev); |
| 157 | static void piix_pata_error_handler(struct ata_port *ap); | 157 | static void piix_pata_error_handler(struct ata_port *ap); |
| @@ -362,7 +362,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 362 | /* piix4_pata */ | 362 | /* piix4_pata */ |
| 363 | { | 363 | { |
| 364 | .sht = &piix_sht, | 364 | .sht = &piix_sht, |
| 365 | .host_flags = ATA_FLAG_SLAVE_POSS, | 365 | .flags = ATA_FLAG_SLAVE_POSS, |
| 366 | .pio_mask = 0x1f, /* pio0-4 */ | 366 | .pio_mask = 0x1f, /* pio0-4 */ |
| 367 | #if 0 | 367 | #if 0 |
| 368 | .mwdma_mask = 0x06, /* mwdma1-2 */ | 368 | .mwdma_mask = 0x06, /* mwdma1-2 */ |
| @@ -376,7 +376,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 376 | /* ich5_pata */ | 376 | /* ich5_pata */ |
| 377 | { | 377 | { |
| 378 | .sht = &piix_sht, | 378 | .sht = &piix_sht, |
| 379 | .host_flags = ATA_FLAG_SLAVE_POSS | PIIX_FLAG_CHECKINTR, | 379 | .flags = ATA_FLAG_SLAVE_POSS | PIIX_FLAG_CHECKINTR, |
| 380 | .pio_mask = 0x1f, /* pio0-4 */ | 380 | .pio_mask = 0x1f, /* pio0-4 */ |
| 381 | #if 0 | 381 | #if 0 |
| 382 | .mwdma_mask = 0x06, /* mwdma1-2 */ | 382 | .mwdma_mask = 0x06, /* mwdma1-2 */ |
| @@ -390,7 +390,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 390 | /* ich5_sata */ | 390 | /* ich5_sata */ |
| 391 | { | 391 | { |
| 392 | .sht = &piix_sht, | 392 | .sht = &piix_sht, |
| 393 | .host_flags = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR | | 393 | .flags = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR | |
| 394 | PIIX_FLAG_IGNORE_PCS, | 394 | PIIX_FLAG_IGNORE_PCS, |
| 395 | .pio_mask = 0x1f, /* pio0-4 */ | 395 | .pio_mask = 0x1f, /* pio0-4 */ |
| 396 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 396 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
| @@ -401,7 +401,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 401 | /* i6300esb_sata */ | 401 | /* i6300esb_sata */ |
| 402 | { | 402 | { |
| 403 | .sht = &piix_sht, | 403 | .sht = &piix_sht, |
| 404 | .host_flags = ATA_FLAG_SATA | | 404 | .flags = ATA_FLAG_SATA | |
| 405 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_IGNORE_PCS, | 405 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_IGNORE_PCS, |
| 406 | .pio_mask = 0x1f, /* pio0-4 */ | 406 | .pio_mask = 0x1f, /* pio0-4 */ |
| 407 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 407 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
| @@ -412,7 +412,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 412 | /* ich6_sata */ | 412 | /* ich6_sata */ |
| 413 | { | 413 | { |
| 414 | .sht = &piix_sht, | 414 | .sht = &piix_sht, |
| 415 | .host_flags = ATA_FLAG_SATA | | 415 | .flags = ATA_FLAG_SATA | |
| 416 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR, | 416 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR, |
| 417 | .pio_mask = 0x1f, /* pio0-4 */ | 417 | .pio_mask = 0x1f, /* pio0-4 */ |
| 418 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 418 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
| @@ -423,7 +423,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 423 | /* ich6_sata_ahci */ | 423 | /* ich6_sata_ahci */ |
| 424 | { | 424 | { |
| 425 | .sht = &piix_sht, | 425 | .sht = &piix_sht, |
| 426 | .host_flags = ATA_FLAG_SATA | | 426 | .flags = ATA_FLAG_SATA | |
| 427 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | 427 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | |
| 428 | PIIX_FLAG_AHCI, | 428 | PIIX_FLAG_AHCI, |
| 429 | .pio_mask = 0x1f, /* pio0-4 */ | 429 | .pio_mask = 0x1f, /* pio0-4 */ |
| @@ -435,7 +435,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 435 | /* ich6m_sata_ahci */ | 435 | /* ich6m_sata_ahci */ |
| 436 | { | 436 | { |
| 437 | .sht = &piix_sht, | 437 | .sht = &piix_sht, |
| 438 | .host_flags = ATA_FLAG_SATA | | 438 | .flags = ATA_FLAG_SATA | |
| 439 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | 439 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | |
| 440 | PIIX_FLAG_AHCI, | 440 | PIIX_FLAG_AHCI, |
| 441 | .pio_mask = 0x1f, /* pio0-4 */ | 441 | .pio_mask = 0x1f, /* pio0-4 */ |
| @@ -447,7 +447,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 447 | /* ich8_sata_ahci */ | 447 | /* ich8_sata_ahci */ |
| 448 | { | 448 | { |
| 449 | .sht = &piix_sht, | 449 | .sht = &piix_sht, |
| 450 | .host_flags = ATA_FLAG_SATA | | 450 | .flags = ATA_FLAG_SATA | |
| 451 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | 451 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | |
| 452 | PIIX_FLAG_AHCI, | 452 | PIIX_FLAG_AHCI, |
| 453 | .pio_mask = 0x1f, /* pio0-4 */ | 453 | .pio_mask = 0x1f, /* pio0-4 */ |
| @@ -485,7 +485,7 @@ MODULE_PARM_DESC(force_pcs, "force honoring or ignoring PCS to work around " | |||
| 485 | */ | 485 | */ |
| 486 | static void piix_pata_cbl_detect(struct ata_port *ap) | 486 | static void piix_pata_cbl_detect(struct ata_port *ap) |
| 487 | { | 487 | { |
| 488 | struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); | 488 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
| 489 | u8 tmp, mask; | 489 | u8 tmp, mask; |
| 490 | 490 | ||
| 491 | /* no 80c support in host controller? */ | 491 | /* no 80c support in host controller? */ |
| @@ -517,7 +517,7 @@ cbl40: | |||
| 517 | */ | 517 | */ |
| 518 | static int piix_pata_prereset(struct ata_port *ap) | 518 | static int piix_pata_prereset(struct ata_port *ap) |
| 519 | { | 519 | { |
| 520 | struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); | 520 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
| 521 | 521 | ||
| 522 | if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no])) { | 522 | if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no])) { |
| 523 | ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n"); | 523 | ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n"); |
| @@ -551,8 +551,8 @@ static void piix_pata_error_handler(struct ata_port *ap) | |||
| 551 | */ | 551 | */ |
| 552 | static unsigned int piix_sata_present_mask(struct ata_port *ap) | 552 | static unsigned int piix_sata_present_mask(struct ata_port *ap) |
| 553 | { | 553 | { |
| 554 | struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); | 554 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
| 555 | struct piix_host_priv *hpriv = ap->host_set->private_data; | 555 | struct piix_host_priv *hpriv = ap->host->private_data; |
| 556 | const unsigned int *map = hpriv->map; | 556 | const unsigned int *map = hpriv->map; |
| 557 | int base = 2 * ap->port_no; | 557 | int base = 2 * ap->port_no; |
| 558 | unsigned int present_mask = 0; | 558 | unsigned int present_mask = 0; |
| @@ -631,7 +631,7 @@ static void piix_sata_error_handler(struct ata_port *ap) | |||
| 631 | static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev) | 631 | static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev) |
| 632 | { | 632 | { |
| 633 | unsigned int pio = adev->pio_mode - XFER_PIO_0; | 633 | unsigned int pio = adev->pio_mode - XFER_PIO_0; |
| 634 | struct pci_dev *dev = to_pci_dev(ap->host_set->dev); | 634 | struct pci_dev *dev = to_pci_dev(ap->host->dev); |
| 635 | unsigned int is_slave = (adev->devno != 0); | 635 | unsigned int is_slave = (adev->devno != 0); |
| 636 | unsigned int master_port= ap->port_no ? 0x42 : 0x40; | 636 | unsigned int master_port= ap->port_no ? 0x42 : 0x40; |
| 637 | unsigned int slave_port = 0x44; | 637 | unsigned int slave_port = 0x44; |
| @@ -683,7 +683,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
| 683 | static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev) | 683 | static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev) |
| 684 | { | 684 | { |
| 685 | unsigned int udma = adev->dma_mode; /* FIXME: MWDMA too */ | 685 | unsigned int udma = adev->dma_mode; /* FIXME: MWDMA too */ |
| 686 | struct pci_dev *dev = to_pci_dev(ap->host_set->dev); | 686 | struct pci_dev *dev = to_pci_dev(ap->host->dev); |
| 687 | u8 maslave = ap->port_no ? 0x42 : 0x40; | 687 | u8 maslave = ap->port_no ? 0x42 : 0x40; |
| 688 | u8 speed = udma; | 688 | u8 speed = udma; |
| 689 | unsigned int drive_dn = (ap->port_no ? 2 : 0) + adev->devno; | 689 | unsigned int drive_dn = (ap->port_no ? 2 : 0) + adev->devno; |
| @@ -835,13 +835,13 @@ static void __devinit piix_init_pcs(struct pci_dev *pdev, | |||
| 835 | if (force_pcs == 1) { | 835 | if (force_pcs == 1) { |
| 836 | dev_printk(KERN_INFO, &pdev->dev, | 836 | dev_printk(KERN_INFO, &pdev->dev, |
| 837 | "force ignoring PCS (0x%x)\n", new_pcs); | 837 | "force ignoring PCS (0x%x)\n", new_pcs); |
| 838 | pinfo[0].host_flags |= PIIX_FLAG_IGNORE_PCS; | 838 | pinfo[0].flags |= PIIX_FLAG_IGNORE_PCS; |
| 839 | pinfo[1].host_flags |= PIIX_FLAG_IGNORE_PCS; | 839 | pinfo[1].flags |= PIIX_FLAG_IGNORE_PCS; |
| 840 | } else if (force_pcs == 2) { | 840 | } else if (force_pcs == 2) { |
| 841 | dev_printk(KERN_INFO, &pdev->dev, | 841 | dev_printk(KERN_INFO, &pdev->dev, |
| 842 | "force honoring PCS (0x%x)\n", new_pcs); | 842 | "force honoring PCS (0x%x)\n", new_pcs); |
| 843 | pinfo[0].host_flags &= ~PIIX_FLAG_IGNORE_PCS; | 843 | pinfo[0].flags &= ~PIIX_FLAG_IGNORE_PCS; |
| 844 | pinfo[1].host_flags &= ~PIIX_FLAG_IGNORE_PCS; | 844 | pinfo[1].flags &= ~PIIX_FLAG_IGNORE_PCS; |
| 845 | } | 845 | } |
| 846 | } | 846 | } |
| 847 | 847 | ||
| @@ -881,7 +881,7 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev, | |||
| 881 | default: | 881 | default: |
| 882 | printk(" P%d", map[i]); | 882 | printk(" P%d", map[i]); |
| 883 | if (i & 1) | 883 | if (i & 1) |
| 884 | pinfo[i / 2].host_flags |= ATA_FLAG_SLAVE_POSS; | 884 | pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS; |
| 885 | break; | 885 | break; |
| 886 | } | 886 | } |
| 887 | } | 887 | } |
| @@ -916,7 +916,7 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 916 | struct ata_port_info port_info[2]; | 916 | struct ata_port_info port_info[2]; |
| 917 | struct ata_port_info *ppinfo[2] = { &port_info[0], &port_info[1] }; | 917 | struct ata_port_info *ppinfo[2] = { &port_info[0], &port_info[1] }; |
| 918 | struct piix_host_priv *hpriv; | 918 | struct piix_host_priv *hpriv; |
| 919 | unsigned long host_flags; | 919 | unsigned long port_flags; |
| 920 | 920 | ||
| 921 | if (!printed_version++) | 921 | if (!printed_version++) |
| 922 | dev_printk(KERN_DEBUG, &pdev->dev, | 922 | dev_printk(KERN_DEBUG, &pdev->dev, |
| @@ -935,9 +935,9 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 935 | port_info[0].private_data = hpriv; | 935 | port_info[0].private_data = hpriv; |
| 936 | port_info[1].private_data = hpriv; | 936 | port_info[1].private_data = hpriv; |
| 937 | 937 | ||
| 938 | host_flags = port_info[0].host_flags; | 938 | port_flags = port_info[0].flags; |
| 939 | 939 | ||
| 940 | if (host_flags & PIIX_FLAG_AHCI) { | 940 | if (port_flags & PIIX_FLAG_AHCI) { |
| 941 | u8 tmp; | 941 | u8 tmp; |
| 942 | pci_read_config_byte(pdev, PIIX_SCC, &tmp); | 942 | pci_read_config_byte(pdev, PIIX_SCC, &tmp); |
| 943 | if (tmp == PIIX_AHCI_DEVICE) { | 943 | if (tmp == PIIX_AHCI_DEVICE) { |
| @@ -948,7 +948,7 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 948 | } | 948 | } |
| 949 | 949 | ||
| 950 | /* Initialize SATA map */ | 950 | /* Initialize SATA map */ |
| 951 | if (host_flags & ATA_FLAG_SATA) { | 951 | if (port_flags & ATA_FLAG_SATA) { |
| 952 | piix_init_sata_map(pdev, port_info, | 952 | piix_init_sata_map(pdev, port_info, |
| 953 | piix_map_db_table[ent->driver_data]); | 953 | piix_map_db_table[ent->driver_data]); |
| 954 | piix_init_pcs(pdev, port_info, | 954 | piix_init_pcs(pdev, port_info, |
| @@ -961,7 +961,7 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 961 | * MSI is disabled (and it is disabled, as we don't use | 961 | * MSI is disabled (and it is disabled, as we don't use |
| 962 | * message-signalled interrupts currently). | 962 | * message-signalled interrupts currently). |
| 963 | */ | 963 | */ |
| 964 | if (host_flags & PIIX_FLAG_CHECKINTR) | 964 | if (port_flags & PIIX_FLAG_CHECKINTR) |
| 965 | pci_intx(pdev, 1); | 965 | pci_intx(pdev, 1); |
| 966 | 966 | ||
| 967 | if (piix_check_450nx_errata(pdev)) { | 967 | if (piix_check_450nx_errata(pdev)) { |
| @@ -976,11 +976,11 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 976 | return ata_pci_init_one(pdev, ppinfo, 2); | 976 | return ata_pci_init_one(pdev, ppinfo, 2); |
| 977 | } | 977 | } |
| 978 | 978 | ||
| 979 | static void piix_host_stop(struct ata_host_set *host_set) | 979 | static void piix_host_stop(struct ata_host *host) |
| 980 | { | 980 | { |
| 981 | struct piix_host_priv *hpriv = host_set->private_data; | 981 | struct piix_host_priv *hpriv = host->private_data; |
| 982 | 982 | ||
| 983 | ata_host_stop(host_set); | 983 | ata_host_stop(host); |
| 984 | 984 | ||
| 985 | kfree(hpriv); | 985 | kfree(hpriv); |
| 986 | } | 986 | } |
