diff options
Diffstat (limited to 'arch/sparc64/kernel/pci_schizo.c')
| -rw-r--r-- | arch/sparc64/kernel/pci_schizo.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index d8c4e0919b4e..7fe4de03ac2e 100644 --- a/arch/sparc64/kernel/pci_schizo.c +++ b/arch/sparc64/kernel/pci_schizo.c | |||
| @@ -243,8 +243,8 @@ static unsigned char schizo_pil_table[] = { | |||
| 243 | /*0x0c*/0, 0, 0, 0, /* PCI slot 3 Int A, B, C, D */ | 243 | /*0x0c*/0, 0, 0, 0, /* PCI slot 3 Int A, B, C, D */ |
| 244 | /*0x10*/0, 0, 0, 0, /* PCI slot 4 Int A, B, C, D */ | 244 | /*0x10*/0, 0, 0, 0, /* PCI slot 4 Int A, B, C, D */ |
| 245 | /*0x14*/0, 0, 0, 0, /* PCI slot 5 Int A, B, C, D */ | 245 | /*0x14*/0, 0, 0, 0, /* PCI slot 5 Int A, B, C, D */ |
| 246 | /*0x18*/4, /* SCSI */ | 246 | /*0x18*/5, /* SCSI */ |
| 247 | /*0x19*/4, /* second SCSI */ | 247 | /*0x19*/5, /* second SCSI */ |
| 248 | /*0x1a*/0, /* UNKNOWN */ | 248 | /*0x1a*/0, /* UNKNOWN */ |
| 249 | /*0x1b*/0, /* UNKNOWN */ | 249 | /*0x1b*/0, /* UNKNOWN */ |
| 250 | /*0x1c*/8, /* Parallel */ | 250 | /*0x1c*/8, /* Parallel */ |
| @@ -254,7 +254,7 @@ static unsigned char schizo_pil_table[] = { | |||
| 254 | /*0x20*/13, /* Audio Record */ | 254 | /*0x20*/13, /* Audio Record */ |
| 255 | /*0x21*/14, /* Audio Playback */ | 255 | /*0x21*/14, /* Audio Playback */ |
| 256 | /*0x22*/12, /* Serial */ | 256 | /*0x22*/12, /* Serial */ |
| 257 | /*0x23*/4, /* EBUS I2C */ | 257 | /*0x23*/5, /* EBUS I2C */ |
| 258 | /*0x24*/10, /* RTC Clock */ | 258 | /*0x24*/10, /* RTC Clock */ |
| 259 | /*0x25*/11, /* Floppy */ | 259 | /*0x25*/11, /* Floppy */ |
| 260 | /*0x26*/0, /* UNKNOWN */ | 260 | /*0x26*/0, /* UNKNOWN */ |
| @@ -296,11 +296,11 @@ static int schizo_ino_to_pil(struct pci_dev *pdev, unsigned int ino) | |||
| 296 | 296 | ||
| 297 | ret = schizo_pil_table[ino]; | 297 | ret = schizo_pil_table[ino]; |
| 298 | if (ret == 0 && pdev == NULL) { | 298 | if (ret == 0 && pdev == NULL) { |
| 299 | ret = 4; | 299 | ret = 5; |
| 300 | } else if (ret == 0) { | 300 | } else if (ret == 0) { |
| 301 | switch ((pdev->class >> 16) & 0xff) { | 301 | switch ((pdev->class >> 16) & 0xff) { |
| 302 | case PCI_BASE_CLASS_STORAGE: | 302 | case PCI_BASE_CLASS_STORAGE: |
| 303 | ret = 4; | 303 | ret = 5; |
| 304 | break; | 304 | break; |
| 305 | 305 | ||
| 306 | case PCI_BASE_CLASS_NETWORK: | 306 | case PCI_BASE_CLASS_NETWORK: |
| @@ -319,7 +319,7 @@ static int schizo_ino_to_pil(struct pci_dev *pdev, unsigned int ino) | |||
| 319 | break; | 319 | break; |
| 320 | 320 | ||
| 321 | default: | 321 | default: |
| 322 | ret = 4; | 322 | ret = 5; |
| 323 | break; | 323 | break; |
| 324 | }; | 324 | }; |
| 325 | } | 325 | } |
| @@ -1525,7 +1525,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm) | |||
| 1525 | static void pbm_scan_bus(struct pci_controller_info *p, | 1525 | static void pbm_scan_bus(struct pci_controller_info *p, |
| 1526 | struct pci_pbm_info *pbm) | 1526 | struct pci_pbm_info *pbm) |
| 1527 | { | 1527 | { |
| 1528 | struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); | 1528 | struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL); |
| 1529 | 1529 | ||
| 1530 | if (!cookie) { | 1530 | if (!cookie) { |
| 1531 | prom_printf("%s: Critical allocation failure.\n", pbm->name); | 1531 | prom_printf("%s: Critical allocation failure.\n", pbm->name); |
| @@ -1533,7 +1533,6 @@ static void pbm_scan_bus(struct pci_controller_info *p, | |||
| 1533 | } | 1533 | } |
| 1534 | 1534 | ||
| 1535 | /* All we care about is the PBM. */ | 1535 | /* All we care about is the PBM. */ |
| 1536 | memset(cookie, 0, sizeof(*cookie)); | ||
| 1537 | cookie->pbm = pbm; | 1536 | cookie->pbm = pbm; |
| 1538 | 1537 | ||
| 1539 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, | 1538 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, |
| @@ -2120,27 +2119,24 @@ static void __schizo_init(int node, char *model_name, int chip_type) | |||
| 2120 | } | 2119 | } |
| 2121 | } | 2120 | } |
| 2122 | 2121 | ||
| 2123 | p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); | 2122 | p = kzalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); |
| 2124 | if (!p) { | 2123 | if (!p) { |
| 2125 | prom_printf("SCHIZO: Fatal memory allocation error.\n"); | 2124 | prom_printf("SCHIZO: Fatal memory allocation error.\n"); |
| 2126 | prom_halt(); | 2125 | prom_halt(); |
| 2127 | } | 2126 | } |
| 2128 | memset(p, 0, sizeof(*p)); | ||
| 2129 | 2127 | ||
| 2130 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | 2128 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
| 2131 | if (!iommu) { | 2129 | if (!iommu) { |
| 2132 | prom_printf("SCHIZO: Fatal memory allocation error.\n"); | 2130 | prom_printf("SCHIZO: Fatal memory allocation error.\n"); |
| 2133 | prom_halt(); | 2131 | prom_halt(); |
| 2134 | } | 2132 | } |
| 2135 | memset(iommu, 0, sizeof(*iommu)); | ||
| 2136 | p->pbm_A.iommu = iommu; | 2133 | p->pbm_A.iommu = iommu; |
| 2137 | 2134 | ||
| 2138 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | 2135 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
| 2139 | if (!iommu) { | 2136 | if (!iommu) { |
| 2140 | prom_printf("SCHIZO: Fatal memory allocation error.\n"); | 2137 | prom_printf("SCHIZO: Fatal memory allocation error.\n"); |
| 2141 | prom_halt(); | 2138 | prom_halt(); |
| 2142 | } | 2139 | } |
| 2143 | memset(iommu, 0, sizeof(*iommu)); | ||
| 2144 | p->pbm_B.iommu = iommu; | 2140 | p->pbm_B.iommu = iommu; |
| 2145 | 2141 | ||
| 2146 | p->next = pci_controller_root; | 2142 | p->next = pci_controller_root; |
