diff options
Diffstat (limited to 'drivers/ata/ata_piix.c')
-rw-r--r-- | drivers/ata/ata_piix.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 3c6f43e381f4..a4b2cb29f46c 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -157,12 +157,12 @@ struct piix_host_priv { | |||
157 | const int *map; | 157 | const int *map; |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static int piix_init_one (struct pci_dev *pdev, | 160 | static int piix_init_one(struct pci_dev *pdev, |
161 | const struct pci_device_id *ent); | 161 | const struct pci_device_id *ent); |
162 | static void piix_pata_error_handler(struct ata_port *ap); | 162 | static void piix_pata_error_handler(struct ata_port *ap); |
163 | static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev); | 163 | static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev); |
164 | static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev); | 164 | static void piix_set_dmamode(struct ata_port *ap, struct ata_device *adev); |
165 | static void ich_set_dmamode (struct ata_port *ap, struct ata_device *adev); | 165 | static void ich_set_dmamode(struct ata_port *ap, struct ata_device *adev); |
166 | static int ich_pata_cable_detect(struct ata_port *ap); | 166 | static int ich_pata_cable_detect(struct ata_port *ap); |
167 | #ifdef CONFIG_PM | 167 | #ifdef CONFIG_PM |
168 | static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); | 168 | static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
@@ -650,9 +650,9 @@ static int ich_pata_cable_detect(struct ata_port *ap) | |||
650 | while (lap->device) { | 650 | while (lap->device) { |
651 | if (lap->device == pdev->device && | 651 | if (lap->device == pdev->device && |
652 | lap->subvendor == pdev->subsystem_vendor && | 652 | lap->subvendor == pdev->subsystem_vendor && |
653 | lap->subdevice == pdev->subsystem_device) { | 653 | lap->subdevice == pdev->subsystem_device) |
654 | return ATA_CBL_PATA40_SHORT; | 654 | return ATA_CBL_PATA40_SHORT; |
655 | } | 655 | |
656 | lap++; | 656 | lap++; |
657 | } | 657 | } |
658 | 658 | ||
@@ -699,7 +699,7 @@ static void piix_pata_error_handler(struct ata_port *ap) | |||
699 | * None (inherited from caller). | 699 | * None (inherited from caller). |
700 | */ | 700 | */ |
701 | 701 | ||
702 | static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev) | 702 | static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev) |
703 | { | 703 | { |
704 | unsigned int pio = adev->pio_mode - XFER_PIO_0; | 704 | unsigned int pio = adev->pio_mode - XFER_PIO_0; |
705 | struct pci_dev *dev = to_pci_dev(ap->host->dev); | 705 | struct pci_dev *dev = to_pci_dev(ap->host->dev); |
@@ -786,7 +786,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
786 | * None (inherited from caller). | 786 | * None (inherited from caller). |
787 | */ | 787 | */ |
788 | 788 | ||
789 | static void do_pata_set_dmamode (struct ata_port *ap, struct ata_device *adev, int isich) | 789 | static void do_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev, int isich) |
790 | { | 790 | { |
791 | struct pci_dev *dev = to_pci_dev(ap->host->dev); | 791 | struct pci_dev *dev = to_pci_dev(ap->host->dev); |
792 | u8 master_port = ap->port_no ? 0x42 : 0x40; | 792 | u8 master_port = ap->port_no ? 0x42 : 0x40; |
@@ -813,7 +813,7 @@ static void do_pata_set_dmamode (struct ata_port *ap, struct ata_device *adev, i | |||
813 | int u_clock, u_speed; | 813 | int u_clock, u_speed; |
814 | 814 | ||
815 | /* | 815 | /* |
816 | * UDMA is handled by a combination of clock switching and | 816 | * UDMA is handled by a combination of clock switching and |
817 | * selection of dividers | 817 | * selection of dividers |
818 | * | 818 | * |
819 | * Handy rule: Odd modes are UDMATIMx 01, even are 02 | 819 | * Handy rule: Odd modes are UDMATIMx 01, even are 02 |
@@ -905,7 +905,7 @@ static void do_pata_set_dmamode (struct ata_port *ap, struct ata_device *adev, i | |||
905 | * None (inherited from caller). | 905 | * None (inherited from caller). |
906 | */ | 906 | */ |
907 | 907 | ||
908 | static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev) | 908 | static void piix_set_dmamode(struct ata_port *ap, struct ata_device *adev) |
909 | { | 909 | { |
910 | do_pata_set_dmamode(ap, adev, 0); | 910 | do_pata_set_dmamode(ap, adev, 0); |
911 | } | 911 | } |
@@ -921,7 +921,7 @@ static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
921 | * None (inherited from caller). | 921 | * None (inherited from caller). |
922 | */ | 922 | */ |
923 | 923 | ||
924 | static void ich_set_dmamode (struct ata_port *ap, struct ata_device *adev) | 924 | static void ich_set_dmamode(struct ata_port *ap, struct ata_device *adev) |
925 | { | 925 | { |
926 | do_pata_set_dmamode(ap, adev, 1); | 926 | do_pata_set_dmamode(ap, adev, 1); |
927 | } | 927 | } |
@@ -1106,8 +1106,7 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev) | |||
1106 | u16 cfg; | 1106 | u16 cfg; |
1107 | int no_piix_dma = 0; | 1107 | int no_piix_dma = 0; |
1108 | 1108 | ||
1109 | while((pdev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL) | 1109 | while ((pdev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL) { |
1110 | { | ||
1111 | /* Look for 450NX PXB. Check for problem configurations | 1110 | /* Look for 450NX PXB. Check for problem configurations |
1112 | A PCI quirk checks bit 6 already */ | 1111 | A PCI quirk checks bit 6 already */ |
1113 | pci_read_config_word(pdev, 0x41, &cfg); | 1112 | pci_read_config_word(pdev, 0x41, &cfg); |
@@ -1241,7 +1240,7 @@ static void piix_iocfg_bit18_quirk(struct pci_dev *pdev) | |||
1241 | * Zero on success, or -ERRNO value. | 1240 | * Zero on success, or -ERRNO value. |
1242 | */ | 1241 | */ |
1243 | 1242 | ||
1244 | static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 1243 | static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
1245 | { | 1244 | { |
1246 | static int printed_version; | 1245 | static int printed_version; |
1247 | struct device *dev = &pdev->dev; | 1246 | struct device *dev = &pdev->dev; |