diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2010-07-14 06:12:57 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:05:27 -0400 |
commit | 48813cf989eb8695fe84df30207fc8ff5f15783c (patch) | |
tree | 031eb09af4f435faa285f863416bece80e9d2193 /drivers/scsi/aic7xxx/aic7xxx_pci.c | |
parent | 660bdddb52843d361e47c30294366ae0deac821b (diff) |
[SCSI] aic7xxx: Remove OS utility wrappers
This patch removes malloc(), free(), and printf() wrappers from the aic7xxx
SCSI driver. I didn't use pr_debug for printf because of some 'clever' uses of
printf don't compile with the pr_debug. I didn't fix the overeager uses of
GFP_ATOMIC either because I wanted to keep this patch as simple as possible.
[jejb:fixed up checkpatch errors and fixed up missed conversion]
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_pci.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_pci.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c index 27014b9de126..2b11a4272364 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c | |||
@@ -752,7 +752,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry) | |||
752 | if ((ahc->flags & AHC_39BIT_ADDRESSING) != 0) { | 752 | if ((ahc->flags & AHC_39BIT_ADDRESSING) != 0) { |
753 | 753 | ||
754 | if (bootverbose) | 754 | if (bootverbose) |
755 | printf("%s: Enabling 39Bit Addressing\n", | 755 | printk("%s: Enabling 39Bit Addressing\n", |
756 | ahc_name(ahc)); | 756 | ahc_name(ahc)); |
757 | devconfig |= DACEN; | 757 | devconfig |= DACEN; |
758 | } | 758 | } |
@@ -896,7 +896,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry) | |||
896 | /* See if someone else set us up already */ | 896 | /* See if someone else set us up already */ |
897 | if ((ahc->flags & AHC_NO_BIOS_INIT) == 0 | 897 | if ((ahc->flags & AHC_NO_BIOS_INIT) == 0 |
898 | && scsiseq != 0) { | 898 | && scsiseq != 0) { |
899 | printf("%s: Using left over BIOS settings\n", | 899 | printk("%s: Using left over BIOS settings\n", |
900 | ahc_name(ahc)); | 900 | ahc_name(ahc)); |
901 | ahc->flags &= ~AHC_USEDEFAULTS; | 901 | ahc->flags &= ~AHC_USEDEFAULTS; |
902 | ahc->flags |= AHC_BIOS_ENABLED; | 902 | ahc->flags |= AHC_BIOS_ENABLED; |
@@ -1155,7 +1155,7 @@ done: | |||
1155 | ahc_outb(ahc, CLRINT, CLRPARERR); | 1155 | ahc_outb(ahc, CLRINT, CLRPARERR); |
1156 | ahc_outb(ahc, CLRINT, CLRBRKADRINT); | 1156 | ahc_outb(ahc, CLRINT, CLRBRKADRINT); |
1157 | if (bootverbose && enable) { | 1157 | if (bootverbose && enable) { |
1158 | printf("%s: External SRAM, %s access%s, %dbytes/SCB\n", | 1158 | printk("%s: External SRAM, %s access%s, %dbytes/SCB\n", |
1159 | ahc_name(ahc), fast ? "fast" : "slow", | 1159 | ahc_name(ahc), fast ? "fast" : "slow", |
1160 | pcheck ? ", parity checking enabled" : "", | 1160 | pcheck ? ", parity checking enabled" : "", |
1161 | large ? 64 : 32); | 1161 | large ? 64 : 32); |
@@ -1292,7 +1292,7 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1) | |||
1292 | if (have_seeprom) { | 1292 | if (have_seeprom) { |
1293 | 1293 | ||
1294 | if (bootverbose) | 1294 | if (bootverbose) |
1295 | printf("%s: Reading SEEPROM...", ahc_name(ahc)); | 1295 | printk("%s: Reading SEEPROM...", ahc_name(ahc)); |
1296 | 1296 | ||
1297 | for (;;) { | 1297 | for (;;) { |
1298 | u_int start_addr; | 1298 | u_int start_addr; |
@@ -1309,9 +1309,9 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1) | |||
1309 | if (have_seeprom != 0 || sd.sd_chip == C56_66) { | 1309 | if (have_seeprom != 0 || sd.sd_chip == C56_66) { |
1310 | if (bootverbose) { | 1310 | if (bootverbose) { |
1311 | if (have_seeprom == 0) | 1311 | if (have_seeprom == 0) |
1312 | printf ("checksum error\n"); | 1312 | printk ("checksum error\n"); |
1313 | else | 1313 | else |
1314 | printf ("done.\n"); | 1314 | printk ("done.\n"); |
1315 | } | 1315 | } |
1316 | break; | 1316 | break; |
1317 | } | 1317 | } |
@@ -1362,9 +1362,9 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1) | |||
1362 | 1362 | ||
1363 | if (!have_seeprom) { | 1363 | if (!have_seeprom) { |
1364 | if (bootverbose) | 1364 | if (bootverbose) |
1365 | printf("%s: No SEEPROM available.\n", ahc_name(ahc)); | 1365 | printk("%s: No SEEPROM available.\n", ahc_name(ahc)); |
1366 | ahc->flags |= AHC_USEDEFAULTS; | 1366 | ahc->flags |= AHC_USEDEFAULTS; |
1367 | free(ahc->seep_config, M_DEVBUF); | 1367 | kfree(ahc->seep_config); |
1368 | ahc->seep_config = NULL; | 1368 | ahc->seep_config = NULL; |
1369 | sc = NULL; | 1369 | sc = NULL; |
1370 | } else { | 1370 | } else { |
@@ -1399,7 +1399,7 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1) | |||
1399 | if ((sc->adapter_control & CFSTERM) != 0) | 1399 | if ((sc->adapter_control & CFSTERM) != 0) |
1400 | *sxfrctl1 |= STPWEN; | 1400 | *sxfrctl1 |= STPWEN; |
1401 | if (bootverbose) | 1401 | if (bootverbose) |
1402 | printf("%s: Low byte termination %sabled\n", | 1402 | printk("%s: Low byte termination %sabled\n", |
1403 | ahc_name(ahc), | 1403 | ahc_name(ahc), |
1404 | (*sxfrctl1 & STPWEN) ? "en" : "dis"); | 1404 | (*sxfrctl1 & STPWEN) ? "en" : "dis"); |
1405 | } | 1405 | } |
@@ -1569,7 +1569,7 @@ configure_termination(struct ahc_softc *ahc, | |||
1569 | &eeprom_present); | 1569 | &eeprom_present); |
1570 | if ((adapter_control & CFSEAUTOTERM) == 0) { | 1570 | if ((adapter_control & CFSEAUTOTERM) == 0) { |
1571 | if (bootverbose) | 1571 | if (bootverbose) |
1572 | printf("%s: Manual SE Termination\n", | 1572 | printk("%s: Manual SE Termination\n", |
1573 | ahc_name(ahc)); | 1573 | ahc_name(ahc)); |
1574 | enableSEC_low = (adapter_control & CFSELOWTERM); | 1574 | enableSEC_low = (adapter_control & CFSELOWTERM); |
1575 | enableSEC_high = | 1575 | enableSEC_high = |
@@ -1577,7 +1577,7 @@ configure_termination(struct ahc_softc *ahc, | |||
1577 | } | 1577 | } |
1578 | if ((adapter_control & CFAUTOTERM) == 0) { | 1578 | if ((adapter_control & CFAUTOTERM) == 0) { |
1579 | if (bootverbose) | 1579 | if (bootverbose) |
1580 | printf("%s: Manual LVD Termination\n", | 1580 | printk("%s: Manual LVD Termination\n", |
1581 | ahc_name(ahc)); | 1581 | ahc_name(ahc)); |
1582 | enablePRI_low = (adapter_control & CFSTERM); | 1582 | enablePRI_low = (adapter_control & CFSTERM); |
1583 | enablePRI_high = (adapter_control & CFWSTERM); | 1583 | enablePRI_high = (adapter_control & CFWSTERM); |
@@ -1604,19 +1604,19 @@ configure_termination(struct ahc_softc *ahc, | |||
1604 | 1604 | ||
1605 | if (bootverbose | 1605 | if (bootverbose |
1606 | && (ahc->features & AHC_ULTRA2) == 0) { | 1606 | && (ahc->features & AHC_ULTRA2) == 0) { |
1607 | printf("%s: internal 50 cable %s present", | 1607 | printk("%s: internal 50 cable %s present", |
1608 | ahc_name(ahc), | 1608 | ahc_name(ahc), |
1609 | internal50_present ? "is":"not"); | 1609 | internal50_present ? "is":"not"); |
1610 | 1610 | ||
1611 | if ((ahc->features & AHC_WIDE) != 0) | 1611 | if ((ahc->features & AHC_WIDE) != 0) |
1612 | printf(", internal 68 cable %s present", | 1612 | printk(", internal 68 cable %s present", |
1613 | internal68_present ? "is":"not"); | 1613 | internal68_present ? "is":"not"); |
1614 | printf("\n%s: external cable %s present\n", | 1614 | printk("\n%s: external cable %s present\n", |
1615 | ahc_name(ahc), | 1615 | ahc_name(ahc), |
1616 | externalcable_present ? "is":"not"); | 1616 | externalcable_present ? "is":"not"); |
1617 | } | 1617 | } |
1618 | if (bootverbose) | 1618 | if (bootverbose) |
1619 | printf("%s: BIOS eeprom %s present\n", | 1619 | printk("%s: BIOS eeprom %s present\n", |
1620 | ahc_name(ahc), eeprom_present ? "is" : "not"); | 1620 | ahc_name(ahc), eeprom_present ? "is" : "not"); |
1621 | 1621 | ||
1622 | if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) { | 1622 | if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) { |
@@ -1642,7 +1642,7 @@ configure_termination(struct ahc_softc *ahc, | |||
1642 | && (internal50_present != 0) | 1642 | && (internal50_present != 0) |
1643 | && (internal68_present != 0) | 1643 | && (internal68_present != 0) |
1644 | && (externalcable_present != 0)) { | 1644 | && (externalcable_present != 0)) { |
1645 | printf("%s: Illegal cable configuration!!. " | 1645 | printk("%s: Illegal cable configuration!!. " |
1646 | "Only two connectors on the " | 1646 | "Only two connectors on the " |
1647 | "adapter may be used at a " | 1647 | "adapter may be used at a " |
1648 | "time!\n", ahc_name(ahc)); | 1648 | "time!\n", ahc_name(ahc)); |
@@ -1664,10 +1664,10 @@ configure_termination(struct ahc_softc *ahc, | |||
1664 | brddat |= BRDDAT6; | 1664 | brddat |= BRDDAT6; |
1665 | if (bootverbose) { | 1665 | if (bootverbose) { |
1666 | if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) | 1666 | if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) |
1667 | printf("%s: 68 pin termination " | 1667 | printk("%s: 68 pin termination " |
1668 | "Enabled\n", ahc_name(ahc)); | 1668 | "Enabled\n", ahc_name(ahc)); |
1669 | else | 1669 | else |
1670 | printf("%s: %sHigh byte termination " | 1670 | printk("%s: %sHigh byte termination " |
1671 | "Enabled\n", ahc_name(ahc), | 1671 | "Enabled\n", ahc_name(ahc), |
1672 | enableSEC_high ? "Secondary " | 1672 | enableSEC_high ? "Secondary " |
1673 | : ""); | 1673 | : ""); |
@@ -1683,10 +1683,10 @@ configure_termination(struct ahc_softc *ahc, | |||
1683 | *sxfrctl1 |= STPWEN; | 1683 | *sxfrctl1 |= STPWEN; |
1684 | if (bootverbose) { | 1684 | if (bootverbose) { |
1685 | if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) | 1685 | if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) |
1686 | printf("%s: 50 pin termination " | 1686 | printk("%s: 50 pin termination " |
1687 | "Enabled\n", ahc_name(ahc)); | 1687 | "Enabled\n", ahc_name(ahc)); |
1688 | else | 1688 | else |
1689 | printf("%s: %sLow byte termination " | 1689 | printk("%s: %sLow byte termination " |
1690 | "Enabled\n", ahc_name(ahc), | 1690 | "Enabled\n", ahc_name(ahc), |
1691 | enableSEC_low ? "Secondary " | 1691 | enableSEC_low ? "Secondary " |
1692 | : ""); | 1692 | : ""); |
@@ -1696,7 +1696,7 @@ configure_termination(struct ahc_softc *ahc, | |||
1696 | if (enablePRI_low != 0) { | 1696 | if (enablePRI_low != 0) { |
1697 | *sxfrctl1 |= STPWEN; | 1697 | *sxfrctl1 |= STPWEN; |
1698 | if (bootverbose) | 1698 | if (bootverbose) |
1699 | printf("%s: Primary Low Byte termination " | 1699 | printk("%s: Primary Low Byte termination " |
1700 | "Enabled\n", ahc_name(ahc)); | 1700 | "Enabled\n", ahc_name(ahc)); |
1701 | } | 1701 | } |
1702 | 1702 | ||
@@ -1709,7 +1709,7 @@ configure_termination(struct ahc_softc *ahc, | |||
1709 | if (enablePRI_high != 0) { | 1709 | if (enablePRI_high != 0) { |
1710 | brddat |= BRDDAT4; | 1710 | brddat |= BRDDAT4; |
1711 | if (bootverbose) | 1711 | if (bootverbose) |
1712 | printf("%s: Primary High Byte " | 1712 | printk("%s: Primary High Byte " |
1713 | "termination Enabled\n", | 1713 | "termination Enabled\n", |
1714 | ahc_name(ahc)); | 1714 | ahc_name(ahc)); |
1715 | } | 1715 | } |
@@ -1721,7 +1721,7 @@ configure_termination(struct ahc_softc *ahc, | |||
1721 | *sxfrctl1 |= STPWEN; | 1721 | *sxfrctl1 |= STPWEN; |
1722 | 1722 | ||
1723 | if (bootverbose) | 1723 | if (bootverbose) |
1724 | printf("%s: %sLow byte termination Enabled\n", | 1724 | printk("%s: %sLow byte termination Enabled\n", |
1725 | ahc_name(ahc), | 1725 | ahc_name(ahc), |
1726 | (ahc->features & AHC_ULTRA2) ? "Primary " | 1726 | (ahc->features & AHC_ULTRA2) ? "Primary " |
1727 | : ""); | 1727 | : ""); |
@@ -1731,7 +1731,7 @@ configure_termination(struct ahc_softc *ahc, | |||
1731 | && (ahc->features & AHC_WIDE) != 0) { | 1731 | && (ahc->features & AHC_WIDE) != 0) { |
1732 | brddat |= BRDDAT6; | 1732 | brddat |= BRDDAT6; |
1733 | if (bootverbose) | 1733 | if (bootverbose) |
1734 | printf("%s: %sHigh byte termination Enabled\n", | 1734 | printk("%s: %sHigh byte termination Enabled\n", |
1735 | ahc_name(ahc), | 1735 | ahc_name(ahc), |
1736 | (ahc->features & AHC_ULTRA2) | 1736 | (ahc->features & AHC_ULTRA2) |
1737 | ? "Secondary " : ""); | 1737 | ? "Secondary " : ""); |
@@ -1937,29 +1937,29 @@ ahc_pci_intr(struct ahc_softc *ahc) | |||
1937 | status1 = ahc_pci_read_config(ahc->dev_softc, | 1937 | status1 = ahc_pci_read_config(ahc->dev_softc, |
1938 | PCIR_STATUS + 1, /*bytes*/1); | 1938 | PCIR_STATUS + 1, /*bytes*/1); |
1939 | 1939 | ||
1940 | printf("%s: PCI error Interrupt at seqaddr = 0x%x\n", | 1940 | printk("%s: PCI error Interrupt at seqaddr = 0x%x\n", |
1941 | ahc_name(ahc), | 1941 | ahc_name(ahc), |
1942 | ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8)); | 1942 | ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8)); |
1943 | 1943 | ||
1944 | if (status1 & DPE) { | 1944 | if (status1 & DPE) { |
1945 | ahc->pci_target_perr_count++; | 1945 | ahc->pci_target_perr_count++; |
1946 | printf("%s: Data Parity Error Detected during address " | 1946 | printk("%s: Data Parity Error Detected during address " |
1947 | "or write data phase\n", ahc_name(ahc)); | 1947 | "or write data phase\n", ahc_name(ahc)); |
1948 | } | 1948 | } |
1949 | if (status1 & SSE) { | 1949 | if (status1 & SSE) { |
1950 | printf("%s: Signal System Error Detected\n", ahc_name(ahc)); | 1950 | printk("%s: Signal System Error Detected\n", ahc_name(ahc)); |
1951 | } | 1951 | } |
1952 | if (status1 & RMA) { | 1952 | if (status1 & RMA) { |
1953 | printf("%s: Received a Master Abort\n", ahc_name(ahc)); | 1953 | printk("%s: Received a Master Abort\n", ahc_name(ahc)); |
1954 | } | 1954 | } |
1955 | if (status1 & RTA) { | 1955 | if (status1 & RTA) { |
1956 | printf("%s: Received a Target Abort\n", ahc_name(ahc)); | 1956 | printk("%s: Received a Target Abort\n", ahc_name(ahc)); |
1957 | } | 1957 | } |
1958 | if (status1 & STA) { | 1958 | if (status1 & STA) { |
1959 | printf("%s: Signaled a Target Abort\n", ahc_name(ahc)); | 1959 | printk("%s: Signaled a Target Abort\n", ahc_name(ahc)); |
1960 | } | 1960 | } |
1961 | if (status1 & DPR) { | 1961 | if (status1 & DPR) { |
1962 | printf("%s: Data Parity Error has been reported via PERR#\n", | 1962 | printk("%s: Data Parity Error has been reported via PERR#\n", |
1963 | ahc_name(ahc)); | 1963 | ahc_name(ahc)); |
1964 | } | 1964 | } |
1965 | 1965 | ||
@@ -1968,14 +1968,14 @@ ahc_pci_intr(struct ahc_softc *ahc) | |||
1968 | status1, /*bytes*/1); | 1968 | status1, /*bytes*/1); |
1969 | 1969 | ||
1970 | if ((status1 & (DPE|SSE|RMA|RTA|STA|DPR)) == 0) { | 1970 | if ((status1 & (DPE|SSE|RMA|RTA|STA|DPR)) == 0) { |
1971 | printf("%s: Latched PCIERR interrupt with " | 1971 | printk("%s: Latched PCIERR interrupt with " |
1972 | "no status bits set\n", ahc_name(ahc)); | 1972 | "no status bits set\n", ahc_name(ahc)); |
1973 | } else { | 1973 | } else { |
1974 | ahc_outb(ahc, CLRINT, CLRPARERR); | 1974 | ahc_outb(ahc, CLRINT, CLRPARERR); |
1975 | } | 1975 | } |
1976 | 1976 | ||
1977 | if (ahc->pci_target_perr_count > AHC_PCI_TARGET_PERR_THRESH) { | 1977 | if (ahc->pci_target_perr_count > AHC_PCI_TARGET_PERR_THRESH) { |
1978 | printf( | 1978 | printk( |
1979 | "%s: WARNING WARNING WARNING WARNING\n" | 1979 | "%s: WARNING WARNING WARNING WARNING\n" |
1980 | "%s: Too many PCI parity errors observed as a target.\n" | 1980 | "%s: Too many PCI parity errors observed as a target.\n" |
1981 | "%s: Some device on this bus is generating bad parity.\n" | 1981 | "%s: Some device on this bus is generating bad parity.\n" |
@@ -2386,7 +2386,7 @@ ahc_aha29160C_setup(struct ahc_softc *ahc) | |||
2386 | static int | 2386 | static int |
2387 | ahc_raid_setup(struct ahc_softc *ahc) | 2387 | ahc_raid_setup(struct ahc_softc *ahc) |
2388 | { | 2388 | { |
2389 | printf("RAID functionality unsupported\n"); | 2389 | printk("RAID functionality unsupported\n"); |
2390 | return (ENXIO); | 2390 | return (ENXIO); |
2391 | } | 2391 | } |
2392 | 2392 | ||
@@ -2404,7 +2404,7 @@ ahc_aha394XX_setup(struct ahc_softc *ahc) | |||
2404 | ahc->channel = 'B'; | 2404 | ahc->channel = 'B'; |
2405 | break; | 2405 | break; |
2406 | default: | 2406 | default: |
2407 | printf("adapter at unexpected slot %d\n" | 2407 | printk("adapter at unexpected slot %d\n" |
2408 | "unable to map to a channel\n", | 2408 | "unable to map to a channel\n", |
2409 | ahc_get_pci_slot(pci)); | 2409 | ahc_get_pci_slot(pci)); |
2410 | ahc->channel = 'A'; | 2410 | ahc->channel = 'A'; |
@@ -2429,7 +2429,7 @@ ahc_aha398XX_setup(struct ahc_softc *ahc) | |||
2429 | ahc->channel = 'C'; | 2429 | ahc->channel = 'C'; |
2430 | break; | 2430 | break; |
2431 | default: | 2431 | default: |
2432 | printf("adapter at unexpected slot %d\n" | 2432 | printk("adapter at unexpected slot %d\n" |
2433 | "unable to map to a channel\n", | 2433 | "unable to map to a channel\n", |
2434 | ahc_get_pci_slot(pci)); | 2434 | ahc_get_pci_slot(pci)); |
2435 | ahc->channel = 'A'; | 2435 | ahc->channel = 'A'; |
@@ -2459,7 +2459,7 @@ ahc_aha494XX_setup(struct ahc_softc *ahc) | |||
2459 | ahc->channel = 'D'; | 2459 | ahc->channel = 'D'; |
2460 | break; | 2460 | break; |
2461 | default: | 2461 | default: |
2462 | printf("adapter at unexpected slot %d\n" | 2462 | printk("adapter at unexpected slot %d\n" |
2463 | "unable to map to a channel\n", | 2463 | "unable to map to a channel\n", |
2464 | ahc_get_pci_slot(pci)); | 2464 | ahc_get_pci_slot(pci)); |
2465 | ahc->channel = 'A'; | 2465 | ahc->channel = 'A'; |