diff options
31 files changed, 129 insertions, 239 deletions
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c index 7ca3d6d07b34..ecabe5b08489 100644 --- a/arch/mips/jmr3927/rbhma3100/setup.c +++ b/arch/mips/jmr3927/rbhma3100/setup.c | |||
@@ -137,10 +137,6 @@ int jmr3927_ccfg_toeon = 0; | |||
137 | 137 | ||
138 | static inline void do_reset(void) | 138 | static inline void do_reset(void) |
139 | { | 139 | { |
140 | #ifdef CONFIG_TC35815 | ||
141 | extern void tc35815_killall(void); | ||
142 | tc35815_killall(); | ||
143 | #endif | ||
144 | #if 1 /* Resetting PCI bus */ | 140 | #if 1 /* Resetting PCI bus */ |
145 | jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR); | 141 | jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR); |
146 | jmr3927_ioc_reg_out(JMR3927_IOC_RESET_PCI, JMR3927_IOC_RESET_ADDR); | 142 | jmr3927_ioc_reg_out(JMR3927_IOC_RESET_PCI, JMR3927_IOC_RESET_ADDR); |
diff --git a/arch/mips/momentum/jaguar_atx/platform.c b/arch/mips/momentum/jaguar_atx/platform.c index 3df36eda75af..771e55f39875 100644 --- a/arch/mips/momentum/jaguar_atx/platform.c +++ b/arch/mips/momentum/jaguar_atx/platform.c | |||
@@ -47,11 +47,7 @@ static struct resource mv64x60_eth0_resources[] = { | |||
47 | }, | 47 | }, |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static char eth0_mac_addr[ETH_ALEN]; | ||
51 | |||
52 | static struct mv643xx_eth_platform_data eth0_pd = { | 50 | static struct mv643xx_eth_platform_data eth0_pd = { |
53 | .mac_addr = eth0_mac_addr, | ||
54 | |||
55 | .tx_sram_addr = MV_SRAM_BASE_ETH0, | 51 | .tx_sram_addr = MV_SRAM_BASE_ETH0, |
56 | .tx_sram_size = MV_SRAM_TXRING_SIZE, | 52 | .tx_sram_size = MV_SRAM_TXRING_SIZE, |
57 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, | 53 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, |
@@ -80,11 +76,7 @@ static struct resource mv64x60_eth1_resources[] = { | |||
80 | }, | 76 | }, |
81 | }; | 77 | }; |
82 | 78 | ||
83 | static char eth1_mac_addr[ETH_ALEN]; | ||
84 | |||
85 | static struct mv643xx_eth_platform_data eth1_pd = { | 79 | static struct mv643xx_eth_platform_data eth1_pd = { |
86 | .mac_addr = eth1_mac_addr, | ||
87 | |||
88 | .tx_sram_addr = MV_SRAM_BASE_ETH1, | 80 | .tx_sram_addr = MV_SRAM_BASE_ETH1, |
89 | .tx_sram_size = MV_SRAM_TXRING_SIZE, | 81 | .tx_sram_size = MV_SRAM_TXRING_SIZE, |
90 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, | 82 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, |
@@ -113,11 +105,7 @@ static struct resource mv64x60_eth2_resources[] = { | |||
113 | }, | 105 | }, |
114 | }; | 106 | }; |
115 | 107 | ||
116 | static char eth2_mac_addr[ETH_ALEN]; | 108 | static struct mv643xx_eth_platform_data eth2_pd; |
117 | |||
118 | static struct mv643xx_eth_platform_data eth2_pd = { | ||
119 | .mac_addr = eth2_mac_addr, | ||
120 | }; | ||
121 | 109 | ||
122 | static struct platform_device eth2_device = { | 110 | static struct platform_device eth2_device = { |
123 | .name = MV643XX_ETH_NAME, | 111 | .name = MV643XX_ETH_NAME, |
@@ -200,9 +188,9 @@ static int __init mv643xx_eth_add_pds(void) | |||
200 | int ret; | 188 | int ret; |
201 | 189 | ||
202 | get_mac(mac); | 190 | get_mac(mac); |
203 | eth_mac_add(eth0_mac_addr, mac, 0); | 191 | eth_mac_add(eth0_pd.mac_addr, mac, 0); |
204 | eth_mac_add(eth1_mac_addr, mac, 1); | 192 | eth_mac_add(eth1_pd.mac_addr, mac, 1); |
205 | eth_mac_add(eth2_mac_addr, mac, 2); | 193 | eth_mac_add(eth2_pd.mac_addr, mac, 2); |
206 | ret = platform_add_devices(mv643xx_eth_pd_devs, | 194 | ret = platform_add_devices(mv643xx_eth_pd_devs, |
207 | ARRAY_SIZE(mv643xx_eth_pd_devs)); | 195 | ARRAY_SIZE(mv643xx_eth_pd_devs)); |
208 | 196 | ||
diff --git a/arch/mips/momentum/ocelot_3/platform.c b/arch/mips/momentum/ocelot_3/platform.c index 024aef25f372..b80733f0c66d 100644 --- a/arch/mips/momentum/ocelot_3/platform.c +++ b/arch/mips/momentum/ocelot_3/platform.c | |||
@@ -47,11 +47,7 @@ static struct resource mv64x60_eth0_resources[] = { | |||
47 | }, | 47 | }, |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static char eth0_mac_addr[ETH_ALEN]; | ||
51 | |||
52 | static struct mv643xx_eth_platform_data eth0_pd = { | 50 | static struct mv643xx_eth_platform_data eth0_pd = { |
53 | .mac_addr = eth0_mac_addr, | ||
54 | |||
55 | .tx_sram_addr = MV_SRAM_BASE_ETH0, | 51 | .tx_sram_addr = MV_SRAM_BASE_ETH0, |
56 | .tx_sram_size = MV_SRAM_TXRING_SIZE, | 52 | .tx_sram_size = MV_SRAM_TXRING_SIZE, |
57 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, | 53 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, |
@@ -80,11 +76,7 @@ static struct resource mv64x60_eth1_resources[] = { | |||
80 | }, | 76 | }, |
81 | }; | 77 | }; |
82 | 78 | ||
83 | static char eth1_mac_addr[ETH_ALEN]; | ||
84 | |||
85 | static struct mv643xx_eth_platform_data eth1_pd = { | 79 | static struct mv643xx_eth_platform_data eth1_pd = { |
86 | .mac_addr = eth1_mac_addr, | ||
87 | |||
88 | .tx_sram_addr = MV_SRAM_BASE_ETH1, | 80 | .tx_sram_addr = MV_SRAM_BASE_ETH1, |
89 | .tx_sram_size = MV_SRAM_TXRING_SIZE, | 81 | .tx_sram_size = MV_SRAM_TXRING_SIZE, |
90 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, | 82 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, |
@@ -113,11 +105,7 @@ static struct resource mv64x60_eth2_resources[] = { | |||
113 | }, | 105 | }, |
114 | }; | 106 | }; |
115 | 107 | ||
116 | static char eth2_mac_addr[ETH_ALEN]; | 108 | static struct mv643xx_eth_platform_data eth2_pd; |
117 | |||
118 | static struct mv643xx_eth_platform_data eth2_pd = { | ||
119 | .mac_addr = eth2_mac_addr, | ||
120 | }; | ||
121 | 109 | ||
122 | static struct platform_device eth2_device = { | 110 | static struct platform_device eth2_device = { |
123 | .name = MV643XX_ETH_NAME, | 111 | .name = MV643XX_ETH_NAME, |
@@ -200,9 +188,9 @@ static int __init mv643xx_eth_add_pds(void) | |||
200 | int ret; | 188 | int ret; |
201 | 189 | ||
202 | get_mac(mac); | 190 | get_mac(mac); |
203 | eth_mac_add(eth0_mac_addr, mac, 0); | 191 | eth_mac_add(eth0_pd.mac_addr, mac, 0); |
204 | eth_mac_add(eth1_mac_addr, mac, 1); | 192 | eth_mac_add(eth1_pd.mac_addr, mac, 1); |
205 | eth_mac_add(eth2_mac_addr, mac, 2); | 193 | eth_mac_add(eth2_pd.mac_addr, mac, 2); |
206 | ret = platform_add_devices(mv643xx_eth_pd_devs, | 194 | ret = platform_add_devices(mv643xx_eth_pd_devs, |
207 | ARRAY_SIZE(mv643xx_eth_pd_devs)); | 195 | ARRAY_SIZE(mv643xx_eth_pd_devs)); |
208 | 196 | ||
diff --git a/arch/mips/momentum/ocelot_c/platform.c b/arch/mips/momentum/ocelot_c/platform.c index fac8b2499387..f7cd303f3eba 100644 --- a/arch/mips/momentum/ocelot_c/platform.c +++ b/arch/mips/momentum/ocelot_c/platform.c | |||
@@ -46,11 +46,7 @@ static struct resource mv64x60_eth0_resources[] = { | |||
46 | }, | 46 | }, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static char eth0_mac_addr[ETH_ALEN]; | ||
50 | |||
51 | static struct mv643xx_eth_platform_data eth0_pd = { | 49 | static struct mv643xx_eth_platform_data eth0_pd = { |
52 | .mac_addr = eth0_mac_addr, | ||
53 | |||
54 | .tx_sram_addr = MV_SRAM_BASE_ETH0, | 50 | .tx_sram_addr = MV_SRAM_BASE_ETH0, |
55 | .tx_sram_size = MV_SRAM_TXRING_SIZE, | 51 | .tx_sram_size = MV_SRAM_TXRING_SIZE, |
56 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, | 52 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, |
@@ -79,11 +75,7 @@ static struct resource mv64x60_eth1_resources[] = { | |||
79 | }, | 75 | }, |
80 | }; | 76 | }; |
81 | 77 | ||
82 | static char eth1_mac_addr[ETH_ALEN]; | ||
83 | |||
84 | static struct mv643xx_eth_platform_data eth1_pd = { | 78 | static struct mv643xx_eth_platform_data eth1_pd = { |
85 | .mac_addr = eth1_mac_addr, | ||
86 | |||
87 | .tx_sram_addr = MV_SRAM_BASE_ETH1, | 79 | .tx_sram_addr = MV_SRAM_BASE_ETH1, |
88 | .tx_sram_size = MV_SRAM_TXRING_SIZE, | 80 | .tx_sram_size = MV_SRAM_TXRING_SIZE, |
89 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, | 81 | .tx_queue_size = MV_SRAM_TXRING_SIZE / 16, |
@@ -174,8 +166,8 @@ static int __init mv643xx_eth_add_pds(void) | |||
174 | int ret; | 166 | int ret; |
175 | 167 | ||
176 | get_mac(mac); | 168 | get_mac(mac); |
177 | eth_mac_add(eth0_mac_addr, mac, 0); | 169 | eth_mac_add(eth0_pd.mac_addr, mac, 0); |
178 | eth_mac_add(eth1_mac_addr, mac, 1); | 170 | eth_mac_add(eth1_pd.mac_addr, mac, 1); |
179 | ret = platform_add_devices(mv643xx_eth_pd_devs, | 171 | ret = platform_add_devices(mv643xx_eth_pd_devs, |
180 | ARRAY_SIZE(mv643xx_eth_pd_devs)); | 172 | ARRAY_SIZE(mv643xx_eth_pd_devs)); |
181 | 173 | ||
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index dab6169e31ca..48c24f7518c2 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -495,7 +495,7 @@ static void __init build_device_resources(struct of_device *op, | |||
495 | u32 *reg = (preg + (index * ((na + ns) * 4))); | 495 | u32 *reg = (preg + (index * ((na + ns) * 4))); |
496 | struct device_node *dp = op->node; | 496 | struct device_node *dp = op->node; |
497 | struct device_node *pp = p_op->node; | 497 | struct device_node *pp = p_op->node; |
498 | struct of_bus *pbus; | 498 | struct of_bus *pbus, *dbus; |
499 | u64 size, result = OF_BAD_ADDR; | 499 | u64 size, result = OF_BAD_ADDR; |
500 | unsigned long flags; | 500 | unsigned long flags; |
501 | int dna, dns; | 501 | int dna, dns; |
@@ -516,6 +516,7 @@ static void __init build_device_resources(struct of_device *op, | |||
516 | 516 | ||
517 | dna = na; | 517 | dna = na; |
518 | dns = ns; | 518 | dns = ns; |
519 | dbus = bus; | ||
519 | 520 | ||
520 | while (1) { | 521 | while (1) { |
521 | dp = pp; | 522 | dp = pp; |
@@ -528,13 +529,13 @@ static void __init build_device_resources(struct of_device *op, | |||
528 | pbus = of_match_bus(pp); | 529 | pbus = of_match_bus(pp); |
529 | pbus->count_cells(dp, &pna, &pns); | 530 | pbus->count_cells(dp, &pna, &pns); |
530 | 531 | ||
531 | if (build_one_resource(dp, bus, pbus, addr, | 532 | if (build_one_resource(dp, dbus, pbus, addr, |
532 | dna, dns, pna)) | 533 | dna, dns, pna)) |
533 | break; | 534 | break; |
534 | 535 | ||
535 | dna = pna; | 536 | dna = pna; |
536 | dns = pns; | 537 | dns = pns; |
537 | bus = pbus; | 538 | dbus = pbus; |
538 | } | 539 | } |
539 | 540 | ||
540 | build_res: | 541 | build_res: |
@@ -549,9 +550,6 @@ static void __init build_device_resources(struct of_device *op, | |||
549 | r->start = result & 0xffffffff; | 550 | r->start = result & 0xffffffff; |
550 | r->end = result + size - 1; | 551 | r->end = result + size - 1; |
551 | r->flags = flags | ((result >> 32ULL) & 0xffUL); | 552 | r->flags = flags | ((result >> 32ULL) & 0xffUL); |
552 | } else { | ||
553 | r->start = ~0UL; | ||
554 | r->end = ~0UL; | ||
555 | } | 553 | } |
556 | r->name = op->node->name; | 554 | r->name = op->node->name; |
557 | } | 555 | } |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 207f1b6eef53..3fa5f95c4614 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -944,6 +944,14 @@ int pcibios_assign_resource(struct pci_dev *pdev, int resource) | |||
944 | return -ENXIO; | 944 | return -ENXIO; |
945 | } | 945 | } |
946 | 946 | ||
947 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
948 | { | ||
949 | struct pcidev_cookie *pc = pdev->sysdata; | ||
950 | |||
951 | return pc->prom_node; | ||
952 | } | ||
953 | EXPORT_SYMBOL(pci_device_to_OF_node); | ||
954 | |||
947 | /* | 955 | /* |
948 | * This probably belongs here rather than ioport.c because | 956 | * This probably belongs here rather than ioport.c because |
949 | * we do not want this crud linked into SBus kernels. | 957 | * we do not want this crud linked into SBus kernels. |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index ad74e5e8778e..fb9bf1e4d036 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -581,7 +581,7 @@ static void __init build_device_resources(struct of_device *op, | |||
581 | u32 *reg = (preg + (index * ((na + ns) * 4))); | 581 | u32 *reg = (preg + (index * ((na + ns) * 4))); |
582 | struct device_node *dp = op->node; | 582 | struct device_node *dp = op->node; |
583 | struct device_node *pp = p_op->node; | 583 | struct device_node *pp = p_op->node; |
584 | struct of_bus *pbus; | 584 | struct of_bus *pbus, *dbus; |
585 | u64 size, result = OF_BAD_ADDR; | 585 | u64 size, result = OF_BAD_ADDR; |
586 | unsigned long flags; | 586 | unsigned long flags; |
587 | int dna, dns; | 587 | int dna, dns; |
@@ -599,6 +599,7 @@ static void __init build_device_resources(struct of_device *op, | |||
599 | 599 | ||
600 | dna = na; | 600 | dna = na; |
601 | dns = ns; | 601 | dns = ns; |
602 | dbus = bus; | ||
602 | 603 | ||
603 | while (1) { | 604 | while (1) { |
604 | dp = pp; | 605 | dp = pp; |
@@ -611,13 +612,13 @@ static void __init build_device_resources(struct of_device *op, | |||
611 | pbus = of_match_bus(pp); | 612 | pbus = of_match_bus(pp); |
612 | pbus->count_cells(dp, &pna, &pns); | 613 | pbus->count_cells(dp, &pna, &pns); |
613 | 614 | ||
614 | if (build_one_resource(dp, bus, pbus, addr, | 615 | if (build_one_resource(dp, dbus, pbus, addr, |
615 | dna, dns, pna)) | 616 | dna, dns, pna)) |
616 | break; | 617 | break; |
617 | 618 | ||
618 | dna = pna; | 619 | dna = pna; |
619 | dns = pns; | 620 | dns = pns; |
620 | bus = pbus; | 621 | dbus = pbus; |
621 | } | 622 | } |
622 | 623 | ||
623 | build_res: | 624 | build_res: |
@@ -635,9 +636,6 @@ static void __init build_device_resources(struct of_device *op, | |||
635 | r->start = result; | 636 | r->start = result; |
636 | r->end = result + size - 1; | 637 | r->end = result + size - 1; |
637 | r->flags = flags; | 638 | r->flags = flags; |
638 | } else { | ||
639 | r->start = ~0UL; | ||
640 | r->end = ~0UL; | ||
641 | } | 639 | } |
642 | r->name = op->node->name; | 640 | r->name = op->node->name; |
643 | } | 641 | } |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 6fedfb98f8b0..196b4b72482b 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -681,4 +681,12 @@ void arch_teardown_msi_irq(unsigned int virt_irq) | |||
681 | } | 681 | } |
682 | #endif /* !(CONFIG_PCI_MSI) */ | 682 | #endif /* !(CONFIG_PCI_MSI) */ |
683 | 683 | ||
684 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
685 | { | ||
686 | struct pcidev_cookie *pc = pdev->sysdata; | ||
687 | |||
688 | return pc->op->node; | ||
689 | } | ||
690 | EXPORT_SYMBOL(pci_device_to_OF_node); | ||
691 | |||
684 | #endif /* !(CONFIG_PCI) */ | 692 | #endif /* !(CONFIG_PCI) */ |
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index bb022ed4a866..8d17d8df3662 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -530,7 +530,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
530 | u16 aoemajor; | 530 | u16 aoemajor; |
531 | 531 | ||
532 | hin = (struct aoe_hdr *) skb->mac.raw; | 532 | hin = (struct aoe_hdr *) skb->mac.raw; |
533 | aoemajor = be16_to_cpu(hin->major); | 533 | aoemajor = be16_to_cpu(get_unaligned(&hin->major)); |
534 | d = aoedev_by_aoeaddr(aoemajor, hin->minor); | 534 | d = aoedev_by_aoeaddr(aoemajor, hin->minor); |
535 | if (d == NULL) { | 535 | if (d == NULL) { |
536 | snprintf(ebuf, sizeof ebuf, "aoecmd_ata_rsp: ata response " | 536 | snprintf(ebuf, sizeof ebuf, "aoecmd_ata_rsp: ata response " |
@@ -542,7 +542,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
542 | 542 | ||
543 | spin_lock_irqsave(&d->lock, flags); | 543 | spin_lock_irqsave(&d->lock, flags); |
544 | 544 | ||
545 | n = be32_to_cpu(hin->tag); | 545 | n = be32_to_cpu(get_unaligned(&hin->tag)); |
546 | f = getframe(d, n); | 546 | f = getframe(d, n); |
547 | if (f == NULL) { | 547 | if (f == NULL) { |
548 | calc_rttavg(d, -tsince(n)); | 548 | calc_rttavg(d, -tsince(n)); |
@@ -550,9 +550,9 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
550 | snprintf(ebuf, sizeof ebuf, | 550 | snprintf(ebuf, sizeof ebuf, |
551 | "%15s e%d.%d tag=%08x@%08lx\n", | 551 | "%15s e%d.%d tag=%08x@%08lx\n", |
552 | "unexpected rsp", | 552 | "unexpected rsp", |
553 | be16_to_cpu(hin->major), | 553 | be16_to_cpu(get_unaligned(&hin->major)), |
554 | hin->minor, | 554 | hin->minor, |
555 | be32_to_cpu(hin->tag), | 555 | be32_to_cpu(get_unaligned(&hin->tag)), |
556 | jiffies); | 556 | jiffies); |
557 | aoechr_error(ebuf); | 557 | aoechr_error(ebuf); |
558 | return; | 558 | return; |
@@ -631,7 +631,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
631 | printk(KERN_INFO | 631 | printk(KERN_INFO |
632 | "aoe: unrecognized ata command %2.2Xh for %d.%d\n", | 632 | "aoe: unrecognized ata command %2.2Xh for %d.%d\n", |
633 | ahout->cmdstat, | 633 | ahout->cmdstat, |
634 | be16_to_cpu(hin->major), | 634 | be16_to_cpu(get_unaligned(&hin->major)), |
635 | hin->minor); | 635 | hin->minor); |
636 | } | 636 | } |
637 | } | 637 | } |
@@ -733,7 +733,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb) | |||
733 | * Enough people have their dip switches set backwards to | 733 | * Enough people have their dip switches set backwards to |
734 | * warrant a loud message for this special case. | 734 | * warrant a loud message for this special case. |
735 | */ | 735 | */ |
736 | aoemajor = be16_to_cpu(h->major); | 736 | aoemajor = be16_to_cpu(get_unaligned(&h->major)); |
737 | if (aoemajor == 0xfff) { | 737 | if (aoemajor == 0xfff) { |
738 | printk(KERN_ERR "aoe: Warning: shelf address is all ones. " | 738 | printk(KERN_ERR "aoe: Warning: shelf address is all ones. " |
739 | "Check shelf dip switches.\n"); | 739 | "Check shelf dip switches.\n"); |
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c index 9626e0f5da9d..aab6d91a2c22 100644 --- a/drivers/block/aoe/aoenet.c +++ b/drivers/block/aoe/aoenet.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <linux/netdevice.h> | 9 | #include <linux/netdevice.h> |
10 | #include <linux/moduleparam.h> | 10 | #include <linux/moduleparam.h> |
11 | #include <asm/unaligned.h> | ||
11 | #include "aoe.h" | 12 | #include "aoe.h" |
12 | 13 | ||
13 | #define NECODES 5 | 14 | #define NECODES 5 |
@@ -123,7 +124,7 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt, | |||
123 | skb_push(skb, ETH_HLEN); /* (1) */ | 124 | skb_push(skb, ETH_HLEN); /* (1) */ |
124 | 125 | ||
125 | h = (struct aoe_hdr *) skb->mac.raw; | 126 | h = (struct aoe_hdr *) skb->mac.raw; |
126 | n = be32_to_cpu(h->tag); | 127 | n = be32_to_cpu(get_unaligned(&h->tag)); |
127 | if ((h->verfl & AOEFL_RSP) == 0 || (n & 1<<31)) | 128 | if ((h->verfl & AOEFL_RSP) == 0 || (n & 1<<31)) |
128 | goto exit; | 129 | goto exit; |
129 | 130 | ||
@@ -133,7 +134,7 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt, | |||
133 | n = 0; | 134 | n = 0; |
134 | if (net_ratelimit()) | 135 | if (net_ratelimit()) |
135 | printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n", | 136 | printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n", |
136 | be16_to_cpu(h->major), h->minor, | 137 | be16_to_cpu(get_unaligned(&h->major)), h->minor, |
137 | h->err, aoe_errlist[n]); | 138 | h->err, aoe_errlist[n]); |
138 | goto exit; | 139 | goto exit; |
139 | } | 140 | } |
diff --git a/drivers/net/cxgb3/version.h b/drivers/net/cxgb3/version.h index 782a6cf158a5..82278f850259 100644 --- a/drivers/net/cxgb3/version.h +++ b/drivers/net/cxgb3/version.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #define DRV_DESC "Chelsio T3 Network Driver" | 35 | #define DRV_DESC "Chelsio T3 Network Driver" |
36 | #define DRV_NAME "cxgb3" | 36 | #define DRV_NAME "cxgb3" |
37 | /* Driver version */ | 37 | /* Driver version */ |
38 | #define DRV_VERSION "1.0" | 38 | #define DRV_VERSION "1.0-ko" |
39 | #define FW_VERSION_MAJOR 3 | 39 | #define FW_VERSION_MAJOR 3 |
40 | #define FW_VERSION_MINOR 2 | 40 | #define FW_VERSION_MINOR 2 |
41 | #endif /* __CHELSIO_VERSION_H */ | 41 | #endif /* __CHELSIO_VERSION_H */ |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 3e045a695dbc..be2ddbb6ef56 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -1380,7 +1380,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev) | |||
1380 | 1380 | ||
1381 | pd = pdev->dev.platform_data; | 1381 | pd = pdev->dev.platform_data; |
1382 | if (pd) { | 1382 | if (pd) { |
1383 | if (pd->mac_addr) | 1383 | if (is_valid_ether_addr(pd->mac_addr)) |
1384 | memcpy(dev->dev_addr, pd->mac_addr, 6); | 1384 | memcpy(dev->dev_addr, pd->mac_addr, 6); |
1385 | 1385 | ||
1386 | if (pd->phy_addr || pd->force_phy_addr) | 1386 | if (pd->phy_addr || pd->force_phy_addr) |
diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h index 7cb0a41c5cb4..7d4e90cf49e8 100644 --- a/drivers/net/mv643xx_eth.h +++ b/drivers/net/mv643xx_eth.h | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | #include <linux/mv643xx.h> | 10 | #include <linux/mv643xx.h> |
11 | 11 | ||
12 | #include <asm/dma-mapping.h> | ||
13 | |||
12 | /* Checksum offload for Tx works for most packets, but | 14 | /* Checksum offload for Tx works for most packets, but |
13 | * fails if previous packet sent did not use hw csum | 15 | * fails if previous packet sent did not use hw csum |
14 | */ | 16 | */ |
@@ -47,7 +49,7 @@ | |||
47 | #define ETH_HW_IP_ALIGN 2 /* hw aligns IP header */ | 49 | #define ETH_HW_IP_ALIGN 2 /* hw aligns IP header */ |
48 | #define ETH_WRAPPER_LEN (ETH_HW_IP_ALIGN + ETH_HLEN + \ | 50 | #define ETH_WRAPPER_LEN (ETH_HW_IP_ALIGN + ETH_HLEN + \ |
49 | ETH_VLAN_HLEN + ETH_FCS_LEN) | 51 | ETH_VLAN_HLEN + ETH_FCS_LEN) |
50 | #define ETH_RX_SKB_SIZE (dev->mtu + ETH_WRAPPER_LEN + ETH_DMA_ALIGN) | 52 | #define ETH_RX_SKB_SIZE (dev->mtu + ETH_WRAPPER_LEN + dma_get_cache_alignment()) |
51 | 53 | ||
52 | #define ETH_RX_QUEUES_ENABLED (1 << 0) /* use only Q0 for receive */ | 54 | #define ETH_RX_QUEUES_ENABLED (1 << 0) /* use only Q0 for receive */ |
53 | #define ETH_TX_QUEUES_ENABLED (1 << 0) /* use only Q0 for transmit */ | 55 | #define ETH_TX_QUEUES_ENABLED (1 << 0) /* use only Q0 for transmit */ |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 954842e85ab9..b05dc6ed7fb7 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /************************************************************************* | 1 | /************************************************************************* |
2 | * myri10ge.c: Myricom Myri-10G Ethernet driver. | 2 | * myri10ge.c: Myricom Myri-10G Ethernet driver. |
3 | * | 3 | * |
4 | * Copyright (C) 2005, 2006 Myricom, Inc. | 4 | * Copyright (C) 2005 - 2007 Myricom, Inc. |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without |
@@ -16,17 +16,17 @@ | |||
16 | * may be used to endorse or promote products derived from this software | 16 | * may be used to endorse or promote products derived from this software |
17 | * without specific prior written permission. | 17 | * without specific prior written permission. |
18 | * | 18 | * |
19 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | * SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. |
30 | * | 30 | * |
31 | * | 31 | * |
32 | * If the eeprom on your board is not recent enough, you will need to get a | 32 | * If the eeprom on your board is not recent enough, you will need to get a |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 2807ef400fb5..81742e4e5610 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -72,6 +72,8 @@ | |||
72 | #define FLASH_SECTOR_SIZE (64 * 1024) | 72 | #define FLASH_SECTOR_SIZE (64 * 1024) |
73 | #define FLASH_TOTAL_SIZE (NUM_FLASH_SECTORS * FLASH_SECTOR_SIZE) | 73 | #define FLASH_TOTAL_SIZE (NUM_FLASH_SECTORS * FLASH_SECTOR_SIZE) |
74 | 74 | ||
75 | #define PHAN_VENDOR_ID 0x4040 | ||
76 | |||
75 | #define RCV_DESC_RINGSIZE \ | 77 | #define RCV_DESC_RINGSIZE \ |
76 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) | 78 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) |
77 | #define STATUS_DESC_RINGSIZE \ | 79 | #define STATUS_DESC_RINGSIZE \ |
@@ -82,7 +84,7 @@ | |||
82 | (sizeof(struct netxen_cmd_buffer) * adapter->max_tx_desc_count) | 84 | (sizeof(struct netxen_cmd_buffer) * adapter->max_tx_desc_count) |
83 | #define RCV_BUFFSIZE \ | 85 | #define RCV_BUFFSIZE \ |
84 | (sizeof(struct netxen_rx_buffer) * rcv_desc->max_rx_desc_count) | 86 | (sizeof(struct netxen_rx_buffer) * rcv_desc->max_rx_desc_count) |
85 | #define find_diff_among(a,b,range) ((a)<(b)?((b)-(a)):((b)+(range)-(a))) | 87 | #define find_diff_among(a,b,range) ((a)<=(b)?((b)-(a)):((b)+(range)-(a))) |
86 | 88 | ||
87 | #define NETXEN_NETDEV_STATUS 0x1 | 89 | #define NETXEN_NETDEV_STATUS 0x1 |
88 | #define NETXEN_RCV_PRODUCER_OFFSET 0 | 90 | #define NETXEN_RCV_PRODUCER_OFFSET 0 |
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c index 6252e9a87278..986ef98db229 100644 --- a/drivers/net/netxen/netxen_nic_ethtool.c +++ b/drivers/net/netxen/netxen_nic_ethtool.c | |||
@@ -82,8 +82,7 @@ static const struct netxen_nic_stats netxen_nic_gstrings_stats[] = { | |||
82 | #define NETXEN_NIC_STATS_LEN ARRAY_SIZE(netxen_nic_gstrings_stats) | 82 | #define NETXEN_NIC_STATS_LEN ARRAY_SIZE(netxen_nic_gstrings_stats) |
83 | 83 | ||
84 | static const char netxen_nic_gstrings_test[][ETH_GSTRING_LEN] = { | 84 | static const char netxen_nic_gstrings_test[][ETH_GSTRING_LEN] = { |
85 | "Register_Test_offline", "EEPROM_Test_offline", | 85 | "Register_Test_on_offline", |
86 | "Interrupt_Test_offline", "Loopback_Test_offline", | ||
87 | "Link_Test_on_offline" | 86 | "Link_Test_on_offline" |
88 | }; | 87 | }; |
89 | 88 | ||
@@ -394,19 +393,12 @@ netxen_nic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) | |||
394 | } | 393 | } |
395 | } | 394 | } |
396 | 395 | ||
397 | static void | ||
398 | netxen_nic_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | ||
399 | { | ||
400 | wol->supported = WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC; | ||
401 | /* options can be added depending upon the mode */ | ||
402 | wol->wolopts = 0; | ||
403 | } | ||
404 | |||
405 | static u32 netxen_nic_test_link(struct net_device *dev) | 396 | static u32 netxen_nic_test_link(struct net_device *dev) |
406 | { | 397 | { |
407 | struct netxen_port *port = netdev_priv(dev); | 398 | struct netxen_port *port = netdev_priv(dev); |
408 | struct netxen_adapter *adapter = port->adapter; | 399 | struct netxen_adapter *adapter = port->adapter; |
409 | __u32 status; | 400 | __u32 status; |
401 | int val; | ||
410 | 402 | ||
411 | /* read which mode */ | 403 | /* read which mode */ |
412 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { | 404 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { |
@@ -415,11 +407,13 @@ static u32 netxen_nic_test_link(struct net_device *dev) | |||
415 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, | 407 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, |
416 | &status) != 0) | 408 | &status) != 0) |
417 | return -EIO; | 409 | return -EIO; |
418 | else | 410 | else { |
419 | return (netxen_get_phy_link(status)); | 411 | val = netxen_get_phy_link(status); |
412 | return !val; | ||
413 | } | ||
420 | } else if (adapter->ahw.board_type == NETXEN_NIC_XGBE) { | 414 | } else if (adapter->ahw.board_type == NETXEN_NIC_XGBE) { |
421 | int val = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_XG_STATE)); | 415 | val = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_XG_STATE)); |
422 | return val == XG_LINK_UP; | 416 | return (val == XG_LINK_UP) ? 0 : 1; |
423 | } | 417 | } |
424 | return -EIO; | 418 | return -EIO; |
425 | } | 419 | } |
@@ -606,100 +600,21 @@ netxen_nic_set_pauseparam(struct net_device *dev, | |||
606 | 600 | ||
607 | static int netxen_nic_reg_test(struct net_device *dev) | 601 | static int netxen_nic_reg_test(struct net_device *dev) |
608 | { | 602 | { |
609 | struct netxen_port *port = netdev_priv(dev); | 603 | struct netxen_adapter *adapter = netdev_priv(dev); |
610 | struct netxen_adapter *adapter = port->adapter; | 604 | u32 data_read, data_written; |
611 | u32 data_read, data_written, save; | ||
612 | __u32 mode; | ||
613 | |||
614 | /* | ||
615 | * first test the "Read Only" registers by writing which mode | ||
616 | */ | ||
617 | netxen_nic_read_w0(adapter, NETXEN_NIU_MODE, &mode); | ||
618 | if (netxen_get_niu_enable_ge(mode)) { /* GB Mode */ | ||
619 | netxen_nic_read_w0(adapter, | ||
620 | NETXEN_NIU_GB_MII_MGMT_STATUS(port->portnum), | ||
621 | &data_read); | ||
622 | |||
623 | save = data_read; | ||
624 | if (data_read) | ||
625 | data_written = data_read & NETXEN_NIC_INVALID_DATA; | ||
626 | else | ||
627 | data_written = NETXEN_NIC_INVALID_DATA; | ||
628 | netxen_nic_write_w0(adapter, | ||
629 | NETXEN_NIU_GB_MII_MGMT_STATUS(port-> | ||
630 | portnum), | ||
631 | data_written); | ||
632 | netxen_nic_read_w0(adapter, | ||
633 | NETXEN_NIU_GB_MII_MGMT_STATUS(port->portnum), | ||
634 | &data_read); | ||
635 | |||
636 | if (data_written == data_read) { | ||
637 | netxen_nic_write_w0(adapter, | ||
638 | NETXEN_NIU_GB_MII_MGMT_STATUS(port-> | ||
639 | portnum), | ||
640 | save); | ||
641 | |||
642 | return 0; | ||
643 | } | ||
644 | |||
645 | /* netxen_niu_gb_mii_mgmt_indicators is read only */ | ||
646 | netxen_nic_read_w0(adapter, | ||
647 | NETXEN_NIU_GB_MII_MGMT_INDICATE(port-> | ||
648 | portnum), | ||
649 | &data_read); | ||
650 | |||
651 | save = data_read; | ||
652 | if (data_read) | ||
653 | data_written = data_read & NETXEN_NIC_INVALID_DATA; | ||
654 | else | ||
655 | data_written = NETXEN_NIC_INVALID_DATA; | ||
656 | netxen_nic_write_w0(adapter, | ||
657 | NETXEN_NIU_GB_MII_MGMT_INDICATE(port-> | ||
658 | portnum), | ||
659 | data_written); | ||
660 | |||
661 | netxen_nic_read_w0(adapter, | ||
662 | NETXEN_NIU_GB_MII_MGMT_INDICATE(port-> | ||
663 | portnum), | ||
664 | &data_read); | ||
665 | |||
666 | if (data_written == data_read) { | ||
667 | netxen_nic_write_w0(adapter, | ||
668 | NETXEN_NIU_GB_MII_MGMT_INDICATE | ||
669 | (port->portnum), save); | ||
670 | return 0; | ||
671 | } | ||
672 | 605 | ||
673 | /* netxen_niu_gb_interface_status is read only */ | 606 | netxen_nic_read_w0(adapter, NETXEN_PCIX_PH_REG(0), &data_read); |
674 | netxen_nic_read_w0(adapter, | 607 | if ((data_read & 0xffff) != PHAN_VENDOR_ID) |
675 | NETXEN_NIU_GB_INTERFACE_STATUS(port-> | 608 | return 1; |
676 | portnum), | ||
677 | &data_read); | ||
678 | 609 | ||
679 | save = data_read; | 610 | data_written = (u32)0xa5a5a5a5; |
680 | if (data_read) | ||
681 | data_written = data_read & NETXEN_NIC_INVALID_DATA; | ||
682 | else | ||
683 | data_written = NETXEN_NIC_INVALID_DATA; | ||
684 | netxen_nic_write_w0(adapter, | ||
685 | NETXEN_NIU_GB_INTERFACE_STATUS(port-> | ||
686 | portnum), | ||
687 | data_written); | ||
688 | 611 | ||
689 | netxen_nic_read_w0(adapter, | 612 | netxen_nic_reg_write(adapter, CRB_SCRATCHPAD_TEST, data_written); |
690 | NETXEN_NIU_GB_INTERFACE_STATUS(port-> | 613 | data_read = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_SCRATCHPAD_TEST)); |
691 | portnum), | 614 | if (data_written != data_read) |
692 | &data_read); | 615 | return 1; |
693 | 616 | ||
694 | if (data_written == data_read) { | 617 | return 0; |
695 | netxen_nic_write_w0(adapter, | ||
696 | NETXEN_NIU_GB_INTERFACE_STATUS | ||
697 | (port->portnum), save); | ||
698 | |||
699 | return 0; | ||
700 | } | ||
701 | } /* GB Mode */ | ||
702 | return 1; | ||
703 | } | 618 | } |
704 | 619 | ||
705 | static int netxen_nic_diag_test_count(struct net_device *dev) | 620 | static int netxen_nic_diag_test_count(struct net_device *dev) |
@@ -713,26 +628,20 @@ netxen_nic_diag_test(struct net_device *dev, struct ethtool_test *eth_test, | |||
713 | { | 628 | { |
714 | if (eth_test->flags == ETH_TEST_FL_OFFLINE) { /* offline tests */ | 629 | if (eth_test->flags == ETH_TEST_FL_OFFLINE) { /* offline tests */ |
715 | /* link test */ | 630 | /* link test */ |
716 | if (!(data[4] = (u64) netxen_nic_test_link(dev))) | 631 | if ((data[1] = (u64) netxen_nic_test_link(dev))) |
717 | eth_test->flags |= ETH_TEST_FL_FAILED; | 632 | eth_test->flags |= ETH_TEST_FL_FAILED; |
718 | 633 | ||
719 | if (netif_running(dev)) | ||
720 | dev->stop(dev); | ||
721 | |||
722 | /* register tests */ | 634 | /* register tests */ |
723 | if (!(data[0] = netxen_nic_reg_test(dev))) | 635 | if ((data[0] = netxen_nic_reg_test(dev))) |
724 | eth_test->flags |= ETH_TEST_FL_FAILED; | 636 | eth_test->flags |= ETH_TEST_FL_FAILED; |
725 | /* other tests pass as of now */ | ||
726 | data[1] = data[2] = data[3] = 1; | ||
727 | if (netif_running(dev)) | ||
728 | dev->open(dev); | ||
729 | } else { /* online tests */ | 637 | } else { /* online tests */ |
730 | /* link test */ | 638 | /* register tests */ |
731 | if (!(data[4] = (u64) netxen_nic_test_link(dev))) | 639 | if((data[0] = netxen_nic_reg_test(dev))) |
732 | eth_test->flags |= ETH_TEST_FL_FAILED; | 640 | eth_test->flags |= ETH_TEST_FL_FAILED; |
733 | 641 | ||
734 | /* other tests pass by default */ | 642 | /* link test */ |
735 | data[0] = data[1] = data[2] = data[3] = 1; | 643 | if ((data[1] = (u64) netxen_nic_test_link(dev))) |
644 | eth_test->flags |= ETH_TEST_FL_FAILED; | ||
736 | } | 645 | } |
737 | } | 646 | } |
738 | 647 | ||
@@ -783,7 +692,6 @@ struct ethtool_ops netxen_nic_ethtool_ops = { | |||
783 | .get_drvinfo = netxen_nic_get_drvinfo, | 692 | .get_drvinfo = netxen_nic_get_drvinfo, |
784 | .get_regs_len = netxen_nic_get_regs_len, | 693 | .get_regs_len = netxen_nic_get_regs_len, |
785 | .get_regs = netxen_nic_get_regs, | 694 | .get_regs = netxen_nic_get_regs, |
786 | .get_wol = netxen_nic_get_wol, | ||
787 | .get_link = ethtool_op_get_link, | 695 | .get_link = ethtool_op_get_link, |
788 | .get_eeprom_len = netxen_nic_get_eeprom_len, | 696 | .get_eeprom_len = netxen_nic_get_eeprom_len, |
789 | .get_eeprom = netxen_nic_get_eeprom, | 697 | .get_eeprom = netxen_nic_get_eeprom, |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index deec796f90da..a2877f33fa85 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -508,8 +508,8 @@ void netxen_nic_pci_change_crbwindow(struct netxen_adapter *adapter, u32 wndw) | |||
508 | void netxen_load_firmware(struct netxen_adapter *adapter) | 508 | void netxen_load_firmware(struct netxen_adapter *adapter) |
509 | { | 509 | { |
510 | int i; | 510 | int i; |
511 | long data, size = 0; | 511 | u32 data, size = 0; |
512 | long flashaddr = NETXEN_FLASH_BASE, memaddr = NETXEN_PHANTOM_MEM_BASE; | 512 | u32 flashaddr = NETXEN_FLASH_BASE, memaddr = NETXEN_PHANTOM_MEM_BASE; |
513 | u64 off; | 513 | u64 off; |
514 | void __iomem *addr; | 514 | void __iomem *addr; |
515 | 515 | ||
@@ -951,6 +951,7 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
951 | netxen_nic_driver_name); | 951 | netxen_nic_driver_name); |
952 | return; | 952 | return; |
953 | } | 953 | } |
954 | *ptr32 = le32_to_cpu(*ptr32); | ||
954 | ptr32++; | 955 | ptr32++; |
955 | addr += sizeof(u32); | 956 | addr += sizeof(u32); |
956 | } | 957 | } |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 2f965701a95b..586d32b676af 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -38,13 +38,13 @@ | |||
38 | #include "netxen_nic_phan_reg.h" | 38 | #include "netxen_nic_phan_reg.h" |
39 | 39 | ||
40 | struct crb_addr_pair { | 40 | struct crb_addr_pair { |
41 | long addr; | 41 | u32 addr; |
42 | long data; | 42 | u32 data; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | #define NETXEN_MAX_CRB_XFORM 60 | 45 | #define NETXEN_MAX_CRB_XFORM 60 |
46 | static unsigned int crb_addr_xform[NETXEN_MAX_CRB_XFORM]; | 46 | static unsigned int crb_addr_xform[NETXEN_MAX_CRB_XFORM]; |
47 | #define NETXEN_ADDR_ERROR ((unsigned long ) 0xffffffff ) | 47 | #define NETXEN_ADDR_ERROR (0xffffffff) |
48 | 48 | ||
49 | #define crb_addr_transform(name) \ | 49 | #define crb_addr_transform(name) \ |
50 | crb_addr_xform[NETXEN_HW_PX_MAP_CRB_##name] = \ | 50 | crb_addr_xform[NETXEN_HW_PX_MAP_CRB_##name] = \ |
@@ -252,10 +252,10 @@ void netxen_initialize_adapter_ops(struct netxen_adapter *adapter) | |||
252 | * netxen_decode_crb_addr(0 - utility to translate from internal Phantom CRB | 252 | * netxen_decode_crb_addr(0 - utility to translate from internal Phantom CRB |
253 | * address to external PCI CRB address. | 253 | * address to external PCI CRB address. |
254 | */ | 254 | */ |
255 | unsigned long netxen_decode_crb_addr(unsigned long addr) | 255 | u32 netxen_decode_crb_addr(u32 addr) |
256 | { | 256 | { |
257 | int i; | 257 | int i; |
258 | unsigned long base_addr, offset, pci_base; | 258 | u32 base_addr, offset, pci_base; |
259 | 259 | ||
260 | crb_addr_transform_setup(); | 260 | crb_addr_transform_setup(); |
261 | 261 | ||
@@ -756,7 +756,7 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) | |||
756 | int n, i; | 756 | int n, i; |
757 | int init_delay = 0; | 757 | int init_delay = 0; |
758 | struct crb_addr_pair *buf; | 758 | struct crb_addr_pair *buf; |
759 | unsigned long off; | 759 | u32 off; |
760 | 760 | ||
761 | /* resetall */ | 761 | /* resetall */ |
762 | status = netxen_nic_get_board_info(adapter); | 762 | status = netxen_nic_get_board_info(adapter); |
@@ -813,14 +813,13 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) | |||
813 | if (verbose) | 813 | if (verbose) |
814 | printk("%s: PCI: 0x%08x == 0x%08x\n", | 814 | printk("%s: PCI: 0x%08x == 0x%08x\n", |
815 | netxen_nic_driver_name, (unsigned int) | 815 | netxen_nic_driver_name, (unsigned int) |
816 | netxen_decode_crb_addr((unsigned long) | 816 | netxen_decode_crb_addr(addr), val); |
817 | addr), val); | ||
818 | } | 817 | } |
819 | for (i = 0; i < n; i++) { | 818 | for (i = 0; i < n; i++) { |
820 | 819 | ||
821 | off = netxen_decode_crb_addr((unsigned long)buf[i].addr); | 820 | off = netxen_decode_crb_addr(buf[i].addr); |
822 | if (off == NETXEN_ADDR_ERROR) { | 821 | if (off == NETXEN_ADDR_ERROR) { |
823 | printk(KERN_ERR"CRB init value out of range %lx\n", | 822 | printk(KERN_ERR"CRB init value out of range %x\n", |
824 | buf[i].addr); | 823 | buf[i].addr); |
825 | continue; | 824 | continue; |
826 | } | 825 | } |
@@ -927,6 +926,10 @@ int netxen_initialize_adapter_offload(struct netxen_adapter *adapter) | |||
927 | void netxen_free_adapter_offload(struct netxen_adapter *adapter) | 926 | void netxen_free_adapter_offload(struct netxen_adapter *adapter) |
928 | { | 927 | { |
929 | if (adapter->dummy_dma.addr) { | 928 | if (adapter->dummy_dma.addr) { |
929 | writel(0, NETXEN_CRB_NORMALIZE(adapter, | ||
930 | CRB_HOST_DUMMY_BUF_ADDR_HI)); | ||
931 | writel(0, NETXEN_CRB_NORMALIZE(adapter, | ||
932 | CRB_HOST_DUMMY_BUF_ADDR_LO)); | ||
930 | pci_free_consistent(adapter->ahw.pdev, | 933 | pci_free_consistent(adapter->ahw.pdev, |
931 | NETXEN_HOST_DUMMY_DMA_SIZE, | 934 | NETXEN_HOST_DUMMY_DMA_SIZE, |
932 | adapter->dummy_dma.addr, | 935 | adapter->dummy_dma.addr, |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 1bf3d494b92f..7d2525e76abb 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -42,8 +42,6 @@ | |||
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/vmalloc.h> | 43 | #include <linux/vmalloc.h> |
44 | 44 | ||
45 | #define PHAN_VENDOR_ID 0x4040 | ||
46 | |||
47 | MODULE_DESCRIPTION("NetXen Multi port (1/10) Gigabit Network Driver"); | 45 | MODULE_DESCRIPTION("NetXen Multi port (1/10) Gigabit Network Driver"); |
48 | MODULE_LICENSE("GPL"); | 46 | MODULE_LICENSE("GPL"); |
49 | MODULE_VERSION(NETXEN_NIC_LINUX_VERSIONID); | 47 | MODULE_VERSION(NETXEN_NIC_LINUX_VERSIONID); |
@@ -379,6 +377,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
379 | netdev->tx_timeout = netxen_tx_timeout; | 377 | netdev->tx_timeout = netxen_tx_timeout; |
380 | netdev->watchdog_timeo = HZ; | 378 | netdev->watchdog_timeo = HZ; |
381 | 379 | ||
380 | netxen_nic_change_mtu(netdev, netdev->mtu); | ||
381 | |||
382 | SET_ETHTOOL_OPS(netdev, &netxen_nic_ethtool_ops); | 382 | SET_ETHTOOL_OPS(netdev, &netxen_nic_ethtool_ops); |
383 | netdev->poll = netxen_nic_poll; | 383 | netdev->poll = netxen_nic_poll; |
384 | netdev->weight = NETXEN_NETDEV_WEIGHT; | 384 | netdev->weight = NETXEN_NETDEV_WEIGHT; |
@@ -434,13 +434,11 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
434 | adapter->port_count++; | 434 | adapter->port_count++; |
435 | adapter->port[i] = port; | 435 | adapter->port[i] = port; |
436 | } | 436 | } |
437 | #ifndef CONFIG_PPC64 | ||
438 | writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)); | 437 | writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)); |
439 | netxen_pinit_from_rom(adapter, 0); | 438 | netxen_pinit_from_rom(adapter, 0); |
440 | udelay(500); | 439 | udelay(500); |
441 | netxen_load_firmware(adapter); | 440 | netxen_load_firmware(adapter); |
442 | netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE); | 441 | netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE); |
443 | #endif | ||
444 | /* | 442 | /* |
445 | * delay a while to ensure that the Pegs are up & running. | 443 | * delay a while to ensure that the Pegs are up & running. |
446 | * Otherwise, we might see some flaky behaviour. | 444 | * Otherwise, we might see some flaky behaviour. |
@@ -529,12 +527,13 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev) | |||
529 | free_irq(adapter->irq, adapter); | 527 | free_irq(adapter->irq, adapter); |
530 | netxen_nic_stop_all_ports(adapter); | 528 | netxen_nic_stop_all_ports(adapter); |
531 | /* leave the hw in the same state as reboot */ | 529 | /* leave the hw in the same state as reboot */ |
532 | netxen_pinit_from_rom(adapter, 0); | ||
533 | writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)); | 530 | writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)); |
531 | netxen_pinit_from_rom(adapter, 0); | ||
532 | udelay(500); | ||
534 | netxen_load_firmware(adapter); | 533 | netxen_load_firmware(adapter); |
535 | netxen_free_adapter_offload(adapter); | 534 | netxen_free_adapter_offload(adapter); |
536 | 535 | ||
537 | udelay(500); /* Delay for a while to drain the DMA engines */ | 536 | mdelay(1000); /* Delay for a while to drain the DMA engines */ |
538 | for (i = 0; i < adapter->port_count; i++) { | 537 | for (i = 0; i < adapter->port_count; i++) { |
539 | port = adapter->port[i]; | 538 | port = adapter->port[i]; |
540 | if ((port) && (port->netdev)) { | 539 | if ((port) && (port->netdev)) { |
@@ -545,7 +544,6 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev) | |||
545 | 544 | ||
546 | if ((adapter->flags & NETXEN_NIC_MSI_ENABLED)) | 545 | if ((adapter->flags & NETXEN_NIC_MSI_ENABLED)) |
547 | pci_disable_msi(pdev); | 546 | pci_disable_msi(pdev); |
548 | pci_set_drvdata(pdev, NULL); | ||
549 | if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) | 547 | if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) |
550 | netxen_free_hw_resources(adapter); | 548 | netxen_free_hw_resources(adapter); |
551 | 549 | ||
@@ -556,6 +554,7 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev) | |||
556 | 554 | ||
557 | pci_release_regions(pdev); | 555 | pci_release_regions(pdev); |
558 | pci_disable_device(pdev); | 556 | pci_disable_device(pdev); |
557 | pci_set_drvdata(pdev, NULL); | ||
559 | 558 | ||
560 | for (ctxid = 0; ctxid < MAX_RCV_CTX; ++ctxid) { | 559 | for (ctxid = 0; ctxid < MAX_RCV_CTX; ++ctxid) { |
561 | recv_ctx = &adapter->recv_ctx[ctxid]; | 560 | recv_ctx = &adapter->recv_ctx[ctxid]; |
diff --git a/drivers/net/netxen/netxen_nic_phan_reg.h b/drivers/net/netxen/netxen_nic_phan_reg.h index 7879f855af0b..0c7c94328b7f 100644 --- a/drivers/net/netxen/netxen_nic_phan_reg.h +++ b/drivers/net/netxen/netxen_nic_phan_reg.h | |||
@@ -102,6 +102,9 @@ | |||
102 | #define CRB_CMD_CONSUMER_OFFSET_1 NETXEN_NIC_REG(0x1b0) | 102 | #define CRB_CMD_CONSUMER_OFFSET_1 NETXEN_NIC_REG(0x1b0) |
103 | #define CRB_TEMP_STATE NETXEN_NIC_REG(0x1b4) | 103 | #define CRB_TEMP_STATE NETXEN_NIC_REG(0x1b4) |
104 | 104 | ||
105 | /* used for ethtool tests */ | ||
106 | #define CRB_SCRATCHPAD_TEST NETXEN_NIC_REG(0x280) | ||
107 | |||
105 | /* | 108 | /* |
106 | * CrbPortPhanCntrHi/Lo is used to pass the address of HostPhantomIndex address | 109 | * CrbPortPhanCntrHi/Lo is used to pass the address of HostPhantomIndex address |
107 | * which can be read by the Phantom host to get producer/consumer indexes from | 110 | * which can be read by the Phantom host to get producer/consumer indexes from |
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 3a14d19b72bd..d3f65dab306c 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -2210,7 +2210,7 @@ static int ql_send_map(struct ql3_adapter *qdev, | |||
2210 | { | 2210 | { |
2211 | struct oal *oal; | 2211 | struct oal *oal; |
2212 | struct oal_entry *oal_entry; | 2212 | struct oal_entry *oal_entry; |
2213 | int len = skb->len; | 2213 | int len = skb_headlen(skb); |
2214 | dma_addr_t map; | 2214 | dma_addr_t map; |
2215 | int err; | 2215 | int err; |
2216 | int completed_segs, i; | 2216 | int completed_segs, i; |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index eae2b63951f1..e3a7e3ceab77 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -1703,19 +1703,6 @@ static void tc35815_chip_init(struct net_device *dev) | |||
1703 | spin_unlock_irqrestore(&lp->lock, flags); | 1703 | spin_unlock_irqrestore(&lp->lock, flags); |
1704 | } | 1704 | } |
1705 | 1705 | ||
1706 | /* XXX */ | ||
1707 | void | ||
1708 | tc35815_killall(void) | ||
1709 | { | ||
1710 | struct net_device *dev; | ||
1711 | |||
1712 | for (dev = root_tc35815_dev; dev; dev = ((struct tc35815_local *)dev->priv)->next_module) { | ||
1713 | if (dev->flags&IFF_UP){ | ||
1714 | dev->stop(dev); | ||
1715 | } | ||
1716 | } | ||
1717 | } | ||
1718 | |||
1719 | static struct pci_driver tc35815_driver = { | 1706 | static struct pci_driver tc35815_driver = { |
1720 | .name = TC35815_MODULE_NAME, | 1707 | .name = TC35815_MODULE_NAME, |
1721 | .probe = tc35815_probe, | 1708 | .probe = tc35815_probe, |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 9d67f11422ec..dacea4fd3337 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -63,7 +63,7 @@ MODULE_PARM_DESC (debug, "de2104x bitmapped message enable number"); | |||
63 | 63 | ||
64 | /* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */ | 64 | /* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */ |
65 | #if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ | 65 | #if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ |
66 | || defined(__sparc_) || defined(__ia64__) \ | 66 | || defined(__sparc__) || defined(__ia64__) \ |
67 | || defined(__sh__) || defined(__mips__) | 67 | || defined(__sh__) || defined(__mips__) |
68 | static int rx_copybreak = 1518; | 68 | static int rx_copybreak = 1518; |
69 | #else | 69 | #else |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 5a35354aa523..e3774a522372 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -67,7 +67,7 @@ const char * const medianame[32] = { | |||
67 | 67 | ||
68 | /* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */ | 68 | /* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */ |
69 | #if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ | 69 | #if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ |
70 | || defined(__sparc_) || defined(__ia64__) \ | 70 | || defined(__sparc__) || defined(__ia64__) \ |
71 | || defined(__sh__) || defined(__mips__) | 71 | || defined(__sh__) || defined(__mips__) |
72 | static int rx_copybreak = 1518; | 72 | static int rx_copybreak = 1518; |
73 | #else | 73 | #else |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 73c831a3b747..e594af46ff05 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -2733,8 +2733,9 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm) | |||
2733 | * dangling pins on the second core. Be careful | 2733 | * dangling pins on the second core. Be careful |
2734 | * and ignore these cores here. | 2734 | * and ignore these cores here. |
2735 | */ | 2735 | */ |
2736 | if (bcm->pci_dev->device != 0x4324) { | 2736 | if (1 /*bcm->pci_dev->device != 0x4324*/ ) { |
2737 | dprintk(KERN_INFO PFX "Ignoring additional 802.11 core.\n"); | 2737 | /* TODO: A PHY */ |
2738 | dprintk(KERN_INFO PFX "Ignoring additional 802.11a core.\n"); | ||
2738 | continue; | 2739 | continue; |
2739 | } | 2740 | } |
2740 | } | 2741 | } |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 7e228aded4c2..46ba1235f03a 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -1026,8 +1026,7 @@ int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch) | |||
1026 | break; | 1026 | break; |
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | /* let fbcon do a soft blank for us */ | 1029 | return 0; |
1030 | return (blank == FB_BLANK_NORMAL) ? -EINVAL : 0; | ||
1031 | } | 1030 | } |
1032 | 1031 | ||
1033 | static int radeonfb_blank (int blank, struct fb_info *info) | 1032 | static int radeonfb_blank (int blank, struct fb_info *info) |
diff --git a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h index 38644742f011..a750c688408b 100644 --- a/include/asm-sparc/pci.h +++ b/include/asm-sparc/pci.h | |||
@@ -165,6 +165,9 @@ static inline int pci_dma_mapping_error(dma_addr_t dma_addr) | |||
165 | return (dma_addr == PCI_DMA_ERROR_CODE); | 165 | return (dma_addr == PCI_DMA_ERROR_CODE); |
166 | } | 166 | } |
167 | 167 | ||
168 | struct device_node; | ||
169 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | ||
170 | |||
168 | #endif /* __KERNEL__ */ | 171 | #endif /* __KERNEL__ */ |
169 | 172 | ||
170 | /* generic pci stuff */ | 173 | /* generic pci stuff */ |
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index 86c13dccea3d..274868d8598d 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -91,6 +91,7 @@ extern struct property *of_find_property(struct device_node *np, | |||
91 | extern int of_device_is_compatible(struct device_node *device, const char *); | 91 | extern int of_device_is_compatible(struct device_node *device, const char *); |
92 | extern void *of_get_property(struct device_node *node, const char *name, | 92 | extern void *of_get_property(struct device_node *node, const char *name, |
93 | int *lenp); | 93 | int *lenp); |
94 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) | ||
94 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 95 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
95 | extern int of_getintprop_default(struct device_node *np, | 96 | extern int of_getintprop_default(struct device_node *np, |
96 | const char *name, | 97 | const char *name, |
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h index ca6560288ae8..b14a725b430d 100644 --- a/include/asm-sparc64/pci.h +++ b/include/asm-sparc64/pci.h | |||
@@ -312,6 +312,9 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
312 | return PCI_IRQ_NONE; | 312 | return PCI_IRQ_NONE; |
313 | } | 313 | } |
314 | 314 | ||
315 | struct device_node; | ||
316 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | ||
317 | |||
315 | #endif /* __KERNEL__ */ | 318 | #endif /* __KERNEL__ */ |
316 | 319 | ||
317 | #endif /* __SPARC64_PCI_H */ | 320 | #endif /* __SPARC64_PCI_H */ |
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h index 99671ed6625d..0eca2d98627f 100644 --- a/include/asm-sparc64/prom.h +++ b/include/asm-sparc64/prom.h | |||
@@ -99,6 +99,7 @@ extern struct property *of_find_property(struct device_node *np, | |||
99 | extern int of_device_is_compatible(struct device_node *device, const char *); | 99 | extern int of_device_is_compatible(struct device_node *device, const char *); |
100 | extern void *of_get_property(struct device_node *node, const char *name, | 100 | extern void *of_get_property(struct device_node *node, const char *name, |
101 | int *lenp); | 101 | int *lenp); |
102 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) | ||
102 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 103 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
103 | extern int of_getintprop_default(struct device_node *np, | 104 | extern int of_getintprop_default(struct device_node *np, |
104 | const char *name, | 105 | const char *name, |
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index aff25c000abf..e7d4da1cc9fa 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -1288,7 +1288,6 @@ struct mv64xxx_i2c_pdata { | |||
1288 | #define MV643XX_ETH_NAME "mv643xx_eth" | 1288 | #define MV643XX_ETH_NAME "mv643xx_eth" |
1289 | 1289 | ||
1290 | struct mv643xx_eth_platform_data { | 1290 | struct mv643xx_eth_platform_data { |
1291 | char *mac_addr; /* pointer to mac address */ | ||
1292 | u16 force_phy_addr; /* force override if phy_addr == 0 */ | 1291 | u16 force_phy_addr; /* force override if phy_addr == 0 */ |
1293 | u16 phy_addr; | 1292 | u16 phy_addr; |
1294 | 1293 | ||
@@ -1303,6 +1302,7 @@ struct mv643xx_eth_platform_data { | |||
1303 | u32 tx_sram_size; | 1302 | u32 tx_sram_size; |
1304 | u32 rx_sram_addr; | 1303 | u32 rx_sram_addr; |
1305 | u32 rx_sram_size; | 1304 | u32 rx_sram_size; |
1305 | u8 mac_addr[6]; /* mac address if non-zero*/ | ||
1306 | }; | 1306 | }; |
1307 | 1307 | ||
1308 | #endif /* __ASM_MV643XX_H */ | 1308 | #endif /* __ASM_MV643XX_H */ |