diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/hvc_console.c | 6 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 12 | ||||
-rw-r--r-- | drivers/isdn/hisax/sedlbauer_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/e100.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 1 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 2 | ||||
-rw-r--r-- | drivers/net/s2io.c | 9 | ||||
-rw-r--r-- | drivers/net/sk98lin/skge.c | 12 | ||||
-rw-r--r-- | drivers/net/skge.c | 98 | ||||
-rw-r--r-- | drivers/net/skge.h | 2 | ||||
-rw-r--r-- | drivers/net/tulip/xircom_cb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/airo.c | 5 | ||||
-rw-r--r-- | drivers/pci/pci.c | 16 | ||||
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 13 | ||||
-rw-r--r-- | drivers/s390/net/ctcmain.c | 41 | ||||
-rw-r--r-- | drivers/scsi/sata_sis.c | 4 | ||||
-rw-r--r-- | drivers/serial/21285.c | 2 | ||||
-rw-r--r-- | drivers/serial/amba-pl010.c | 2 | ||||
-rw-r--r-- | drivers/serial/amba-pl011.c | 2 | ||||
-rw-r--r-- | drivers/serial/clps711x.c | 2 | ||||
-rw-r--r-- | drivers/serial/pxa.c | 4 | ||||
-rw-r--r-- | drivers/serial/sa1100.c | 2 | ||||
-rw-r--r-- | drivers/serial/serial_lh7a40x.c | 2 | ||||
-rw-r--r-- | drivers/video/nvidia/nv_i2c.c | 11 |
25 files changed, 147 insertions, 111 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index cddb789902db..f92177634677 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -839,9 +839,6 @@ int __init hvc_init(void) | |||
839 | hvc_driver->flags = TTY_DRIVER_REAL_RAW; | 839 | hvc_driver->flags = TTY_DRIVER_REAL_RAW; |
840 | tty_set_operations(hvc_driver, &hvc_ops); | 840 | tty_set_operations(hvc_driver, &hvc_ops); |
841 | 841 | ||
842 | if (tty_register_driver(hvc_driver)) | ||
843 | panic("Couldn't register hvc console driver\n"); | ||
844 | |||
845 | /* Always start the kthread because there can be hotplug vty adapters | 842 | /* Always start the kthread because there can be hotplug vty adapters |
846 | * added later. */ | 843 | * added later. */ |
847 | hvc_task = kthread_run(khvcd, NULL, "khvcd"); | 844 | hvc_task = kthread_run(khvcd, NULL, "khvcd"); |
@@ -851,6 +848,9 @@ int __init hvc_init(void) | |||
851 | return -EIO; | 848 | return -EIO; |
852 | } | 849 | } |
853 | 850 | ||
851 | if (tty_register_driver(hvc_driver)) | ||
852 | panic("Couldn't register hvc console driver\n"); | ||
853 | |||
854 | return 0; | 854 | return 0; |
855 | } | 855 | } |
856 | module_init(hvc_init); | 856 | module_init(hvc_init); |
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index fdf53ce04248..44b595d90a4a 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -914,19 +914,23 @@ static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num | |||
914 | return ret; | 914 | return ret; |
915 | } | 915 | } |
916 | 916 | ||
917 | static u32 i2c_pxa_functionality(struct i2c_adapter *adap) | ||
918 | { | ||
919 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; | ||
920 | } | ||
921 | |||
917 | static struct i2c_algorithm i2c_pxa_algorithm = { | 922 | static struct i2c_algorithm i2c_pxa_algorithm = { |
918 | .name = "PXA-I2C-Algorithm", | ||
919 | .id = I2C_ALGO_PXA, | ||
920 | .master_xfer = i2c_pxa_xfer, | 923 | .master_xfer = i2c_pxa_xfer, |
924 | .functionality = i2c_pxa_functionality, | ||
921 | }; | 925 | }; |
922 | 926 | ||
923 | static struct pxa_i2c i2c_pxa = { | 927 | static struct pxa_i2c i2c_pxa = { |
924 | .lock = SPIN_LOCK_UNLOCKED, | 928 | .lock = SPIN_LOCK_UNLOCKED, |
925 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER(i2c_pxa.wait), | 929 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER(i2c_pxa.wait), |
926 | .adap = { | 930 | .adap = { |
927 | .name = "pxa2xx-i2c", | 931 | .owner = THIS_MODULE, |
928 | .id = I2C_ALGO_PXA, | ||
929 | .algo = &i2c_pxa_algorithm, | 932 | .algo = &i2c_pxa_algorithm, |
933 | .name = "pxa2xx-i2c", | ||
930 | .retries = 5, | 934 | .retries = 5, |
931 | }, | 935 | }, |
932 | }; | 936 | }; |
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index c6b5bf7d2aca..dc334aab433e 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
@@ -611,7 +611,7 @@ static int sedlbauer_event(event_t event, int priority, | |||
611 | } /* sedlbauer_event */ | 611 | } /* sedlbauer_event */ |
612 | 612 | ||
613 | static struct pcmcia_device_id sedlbauer_ids[] = { | 613 | static struct pcmcia_device_id sedlbauer_ids[] = { |
614 | PCMCIA_DEVICE_PROD_ID1234("SEDLBAUER", "speed star II", "V 3.1", "(c) 93 - 98 cb ", 0x81fb79f5, 0xf3612e1d, 0x6b95c78a, 0x50d4149c), | 614 | PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "speed star II", "V 3.1", 0x81fb79f5, 0xf3612e1d, 0x6b95c78a), |
615 | PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", "4D67", 0x81fb79f5, 0xe4e9bc12, 0x397b7e90), | 615 | PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", "4D67", 0x81fb79f5, 0xe4e9bc12, 0x397b7e90), |
616 | PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", "4D98", 0x81fb79f5, 0xe4e9bc12, 0x2e5c7fce), | 616 | PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", "4D98", 0x81fb79f5, 0xe4e9bc12, 0x2e5c7fce), |
617 | PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", " (C) 93-94 VK", 0x81fb79f5, 0xe4e9bc12, 0x8db143fe), | 617 | PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", " (C) 93-94 VK", 0x81fb79f5, 0xe4e9bc12, 0x8db143fe), |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 54fff9c2e802..96f14ab1c1f5 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1951,7 +1951,7 @@ config SKGE | |||
1951 | ---help--- | 1951 | ---help--- |
1952 | This driver support the Marvell Yukon or SysKonnect SK-98xx/SK-95xx | 1952 | This driver support the Marvell Yukon or SysKonnect SK-98xx/SK-95xx |
1953 | and related Gigabit Ethernet adapters. It is a new smaller driver | 1953 | and related Gigabit Ethernet adapters. It is a new smaller driver |
1954 | driver with better performance and more complete ethtool support. | 1954 | with better performance and more complete ethtool support. |
1955 | 1955 | ||
1956 | It does not support the link failover and network management | 1956 | It does not support the link failover and network management |
1957 | features that "portable" vendor supplied sk98lin driver does. | 1957 | features that "portable" vendor supplied sk98lin driver does. |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 25cc20e415da..fbf1c06ec5c1 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1387,13 +1387,13 @@ static void e100_update_stats(struct nic *nic) | |||
1387 | ns->collisions += nic->tx_collisions; | 1387 | ns->collisions += nic->tx_collisions; |
1388 | ns->tx_errors += le32_to_cpu(s->tx_max_collisions) + | 1388 | ns->tx_errors += le32_to_cpu(s->tx_max_collisions) + |
1389 | le32_to_cpu(s->tx_lost_crs); | 1389 | le32_to_cpu(s->tx_lost_crs); |
1390 | ns->rx_dropped += le32_to_cpu(s->rx_resource_errors); | ||
1391 | ns->rx_length_errors += le32_to_cpu(s->rx_short_frame_errors) + | 1390 | ns->rx_length_errors += le32_to_cpu(s->rx_short_frame_errors) + |
1392 | nic->rx_over_length_errors; | 1391 | nic->rx_over_length_errors; |
1393 | ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors); | 1392 | ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors); |
1394 | ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors); | 1393 | ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors); |
1395 | ns->rx_over_errors += le32_to_cpu(s->rx_overrun_errors); | 1394 | ns->rx_over_errors += le32_to_cpu(s->rx_overrun_errors); |
1396 | ns->rx_fifo_errors += le32_to_cpu(s->rx_overrun_errors); | 1395 | ns->rx_fifo_errors += le32_to_cpu(s->rx_overrun_errors); |
1396 | ns->rx_missed_errors += le32_to_cpu(s->rx_resource_errors); | ||
1397 | ns->rx_errors += le32_to_cpu(s->rx_crc_errors) + | 1397 | ns->rx_errors += le32_to_cpu(s->rx_crc_errors) + |
1398 | le32_to_cpu(s->rx_alignment_errors) + | 1398 | le32_to_cpu(s->rx_alignment_errors) + |
1399 | le32_to_cpu(s->rx_short_frame_errors) + | 1399 | le32_to_cpu(s->rx_short_frame_errors) + |
@@ -1727,12 +1727,10 @@ static inline int e100_rx_indicate(struct nic *nic, struct rx *rx, | |||
1727 | 1727 | ||
1728 | if(unlikely(!(rfd_status & cb_ok))) { | 1728 | if(unlikely(!(rfd_status & cb_ok))) { |
1729 | /* Don't indicate if hardware indicates errors */ | 1729 | /* Don't indicate if hardware indicates errors */ |
1730 | nic->net_stats.rx_dropped++; | ||
1731 | dev_kfree_skb_any(skb); | 1730 | dev_kfree_skb_any(skb); |
1732 | } else if(actual_size > ETH_DATA_LEN + VLAN_ETH_HLEN) { | 1731 | } else if(actual_size > ETH_DATA_LEN + VLAN_ETH_HLEN) { |
1733 | /* Don't indicate oversized frames */ | 1732 | /* Don't indicate oversized frames */ |
1734 | nic->rx_over_length_errors++; | 1733 | nic->rx_over_length_errors++; |
1735 | nic->net_stats.rx_dropped++; | ||
1736 | dev_kfree_skb_any(skb); | 1734 | dev_kfree_skb_any(skb); |
1737 | } else { | 1735 | } else { |
1738 | nic->net_stats.rx_packets++; | 1736 | nic->net_stats.rx_packets++; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 7c8a0a22dcd5..ee687c902a20 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2544,7 +2544,6 @@ e1000_update_stats(struct e1000_adapter *adapter) | |||
2544 | adapter->stats.crcerrs + adapter->stats.algnerrc + | 2544 | adapter->stats.crcerrs + adapter->stats.algnerrc + |
2545 | adapter->stats.rlec + adapter->stats.mpc + | 2545 | adapter->stats.rlec + adapter->stats.mpc + |
2546 | adapter->stats.cexterr; | 2546 | adapter->stats.cexterr; |
2547 | adapter->net_stats.rx_dropped = adapter->stats.mpc; | ||
2548 | adapter->net_stats.rx_length_errors = adapter->stats.rlec; | 2547 | adapter->net_stats.rx_length_errors = adapter->stats.rlec; |
2549 | adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs; | 2548 | adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs; |
2550 | adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc; | 2549 | adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc; |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 5c555373adbe..89d6d69be382 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1616,8 +1616,6 @@ ixgb_update_stats(struct ixgb_adapter *adapter) | |||
1616 | adapter->stats.icbc + | 1616 | adapter->stats.icbc + |
1617 | adapter->stats.ecbc + adapter->stats.mpc; | 1617 | adapter->stats.ecbc + adapter->stats.mpc; |
1618 | 1618 | ||
1619 | adapter->net_stats.rx_dropped = adapter->stats.mpc; | ||
1620 | |||
1621 | /* see above | 1619 | /* see above |
1622 | * adapter->net_stats.rx_length_errors = adapter->stats.rlec; | 1620 | * adapter->net_stats.rx_length_errors = adapter->stats.rlec; |
1623 | */ | 1621 | */ |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index c829e6a2e8a6..dd451e099a4c 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -428,7 +428,7 @@ static int init_shared_mem(struct s2io_nic *nic) | |||
428 | DBG_PRINT(INIT_DBG, | 428 | DBG_PRINT(INIT_DBG, |
429 | "%s: Zero DMA address for TxDL. ", dev->name); | 429 | "%s: Zero DMA address for TxDL. ", dev->name); |
430 | DBG_PRINT(INIT_DBG, | 430 | DBG_PRINT(INIT_DBG, |
431 | "Virtual address %llx\n", (u64)tmp_v); | 431 | "Virtual address %p\n", tmp_v); |
432 | tmp_v = pci_alloc_consistent(nic->pdev, | 432 | tmp_v = pci_alloc_consistent(nic->pdev, |
433 | PAGE_SIZE, &tmp_p); | 433 | PAGE_SIZE, &tmp_p); |
434 | if (!tmp_v) { | 434 | if (!tmp_v) { |
@@ -657,9 +657,10 @@ static void free_shared_mem(struct s2io_nic *nic) | |||
657 | mac_control->zerodma_virt_addr, | 657 | mac_control->zerodma_virt_addr, |
658 | (dma_addr_t)0); | 658 | (dma_addr_t)0); |
659 | DBG_PRINT(INIT_DBG, | 659 | DBG_PRINT(INIT_DBG, |
660 | "%s: Freeing TxDL with zero DMA addr. ", dev->name); | 660 | "%s: Freeing TxDL with zero DMA addr. ", |
661 | DBG_PRINT(INIT_DBG, "Virtual address %llx\n", | 661 | dev->name); |
662 | (u64)(mac_control->zerodma_virt_addr)); | 662 | DBG_PRINT(INIT_DBG, "Virtual address %p\n", |
663 | mac_control->zerodma_virt_addr); | ||
663 | } | 664 | } |
664 | kfree(mac_control->fifos[i].list_info); | 665 | kfree(mac_control->fifos[i].list_info); |
665 | } | 666 | } |
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index 6ee4771addf1..2e72d79a143c 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c | |||
@@ -5216,17 +5216,15 @@ static struct pci_device_id skge_pci_tbl[] = { | |||
5216 | { PCI_VENDOR_ID_3COM, 0x80eb, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5216 | { PCI_VENDOR_ID_3COM, 0x80eb, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
5217 | { PCI_VENDOR_ID_SYSKONNECT, 0x4300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5217 | { PCI_VENDOR_ID_SYSKONNECT, 0x4300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
5218 | { PCI_VENDOR_ID_SYSKONNECT, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5218 | { PCI_VENDOR_ID_SYSKONNECT, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
5219 | { PCI_VENDOR_ID_DLINK, 0x4c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5219 | /* DLink card does not have valid VPD so this driver gags |
5220 | * { PCI_VENDOR_ID_DLINK, 0x4c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | ||
5221 | */ | ||
5220 | { PCI_VENDOR_ID_MARVELL, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5222 | { PCI_VENDOR_ID_MARVELL, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
5221 | #if 0 /* don't handle Yukon2 cards at the moment -- mlindner@syskonnect.de */ | ||
5222 | { PCI_VENDOR_ID_MARVELL, 0x4360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | ||
5223 | { PCI_VENDOR_ID_MARVELL, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | ||
5224 | #endif | ||
5225 | { PCI_VENDOR_ID_MARVELL, 0x5005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5223 | { PCI_VENDOR_ID_MARVELL, 0x5005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
5226 | { PCI_VENDOR_ID_CNET, 0x434e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5224 | { PCI_VENDOR_ID_CNET, 0x434e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
5227 | { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5225 | { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0015, }, |
5228 | { PCI_VENDOR_ID_LINKSYS, 0x1064, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5226 | { PCI_VENDOR_ID_LINKSYS, 0x1064, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
5229 | { 0, } | 5227 | { 0 } |
5230 | }; | 5228 | }; |
5231 | 5229 | ||
5232 | MODULE_DEVICE_TABLE(pci, skge_pci_tbl); | 5230 | MODULE_DEVICE_TABLE(pci, skge_pci_tbl); |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index d7c98515fdfd..0208258e7826 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include "skge.h" | 42 | #include "skge.h" |
43 | 43 | ||
44 | #define DRV_NAME "skge" | 44 | #define DRV_NAME "skge" |
45 | #define DRV_VERSION "0.9" | 45 | #define DRV_VERSION "1.0" |
46 | #define PFX DRV_NAME " " | 46 | #define PFX DRV_NAME " " |
47 | 47 | ||
48 | #define DEFAULT_TX_RING_SIZE 128 | 48 | #define DEFAULT_TX_RING_SIZE 128 |
@@ -669,7 +669,7 @@ static void skge_led(struct skge_port *skge, enum led_mode mode) | |||
669 | PHY_M_LED_BLINK_RT(BLINK_84MS) | | 669 | PHY_M_LED_BLINK_RT(BLINK_84MS) | |
670 | PHY_M_LEDC_TX_CTRL | | 670 | PHY_M_LEDC_TX_CTRL | |
671 | PHY_M_LEDC_DP_CTRL); | 671 | PHY_M_LEDC_DP_CTRL); |
672 | 672 | ||
673 | gm_phy_write(hw, port, PHY_MARV_LED_OVER, | 673 | gm_phy_write(hw, port, PHY_MARV_LED_OVER, |
674 | PHY_M_LED_MO_RX(MO_LED_OFF) | | 674 | PHY_M_LED_MO_RX(MO_LED_OFF) | |
675 | (skge->speed == SPEED_100 ? | 675 | (skge->speed == SPEED_100 ? |
@@ -876,7 +876,7 @@ static int skge_rx_fill(struct skge_port *skge) | |||
876 | 876 | ||
877 | static void skge_link_up(struct skge_port *skge) | 877 | static void skge_link_up(struct skge_port *skge) |
878 | { | 878 | { |
879 | skge_write8(skge->hw, SK_REG(skge->port, LNK_LED_REG), | 879 | skge_write8(skge->hw, SK_REG(skge->port, LNK_LED_REG), |
880 | LED_BLK_OFF|LED_SYNC_OFF|LED_ON); | 880 | LED_BLK_OFF|LED_SYNC_OFF|LED_ON); |
881 | 881 | ||
882 | netif_carrier_on(skge->netdev); | 882 | netif_carrier_on(skge->netdev); |
@@ -987,6 +987,8 @@ static void genesis_reset(struct skge_hw *hw, int port) | |||
987 | { | 987 | { |
988 | const u8 zero[8] = { 0 }; | 988 | const u8 zero[8] = { 0 }; |
989 | 989 | ||
990 | skge_write8(hw, SK_REG(port, GMAC_IRQ_MSK), 0); | ||
991 | |||
990 | /* reset the statistics module */ | 992 | /* reset the statistics module */ |
991 | xm_write32(hw, port, XM_GP_PORT, XM_GP_RES_STAT); | 993 | xm_write32(hw, port, XM_GP_PORT, XM_GP_RES_STAT); |
992 | xm_write16(hw, port, XM_IMSK, 0xffff); /* disable XMAC IRQs */ | 994 | xm_write16(hw, port, XM_IMSK, 0xffff); /* disable XMAC IRQs */ |
@@ -1021,8 +1023,6 @@ static void bcom_check_link(struct skge_hw *hw, int port) | |||
1021 | (void) xm_phy_read(hw, port, PHY_BCOM_STAT); | 1023 | (void) xm_phy_read(hw, port, PHY_BCOM_STAT); |
1022 | status = xm_phy_read(hw, port, PHY_BCOM_STAT); | 1024 | status = xm_phy_read(hw, port, PHY_BCOM_STAT); |
1023 | 1025 | ||
1024 | pr_debug("bcom_check_link status=0x%x\n", status); | ||
1025 | |||
1026 | if ((status & PHY_ST_LSYNC) == 0) { | 1026 | if ((status & PHY_ST_LSYNC) == 0) { |
1027 | u16 cmd = xm_read16(hw, port, XM_MMU_CMD); | 1027 | u16 cmd = xm_read16(hw, port, XM_MMU_CMD); |
1028 | cmd &= ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX); | 1028 | cmd &= ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX); |
@@ -1106,8 +1106,6 @@ static void bcom_phy_init(struct skge_port *skge, int jumbo) | |||
1106 | { 0x17, 0x0013 }, { 0x15, 0x0A04 }, { 0x18, 0x0420 }, | 1106 | { 0x17, 0x0013 }, { 0x15, 0x0A04 }, { 0x18, 0x0420 }, |
1107 | }; | 1107 | }; |
1108 | 1108 | ||
1109 | pr_debug("bcom_phy_init\n"); | ||
1110 | |||
1111 | /* read Id from external PHY (all have the same address) */ | 1109 | /* read Id from external PHY (all have the same address) */ |
1112 | id1 = xm_phy_read(hw, port, PHY_XMAC_ID1); | 1110 | id1 = xm_phy_read(hw, port, PHY_XMAC_ID1); |
1113 | 1111 | ||
@@ -1340,6 +1338,8 @@ static void genesis_stop(struct skge_port *skge) | |||
1340 | int port = skge->port; | 1338 | int port = skge->port; |
1341 | u32 reg; | 1339 | u32 reg; |
1342 | 1340 | ||
1341 | genesis_reset(hw, port); | ||
1342 | |||
1343 | /* Clear Tx packet arbiter timeout IRQ */ | 1343 | /* Clear Tx packet arbiter timeout IRQ */ |
1344 | skge_write16(hw, B3_PA_CTRL, | 1344 | skge_write16(hw, B3_PA_CTRL, |
1345 | port == 0 ? PA_CLR_TO_TX1 : PA_CLR_TO_TX2); | 1345 | port == 0 ? PA_CLR_TO_TX1 : PA_CLR_TO_TX2); |
@@ -1465,7 +1465,6 @@ static void genesis_link_up(struct skge_port *skge) | |||
1465 | u16 cmd; | 1465 | u16 cmd; |
1466 | u32 mode, msk; | 1466 | u32 mode, msk; |
1467 | 1467 | ||
1468 | pr_debug("genesis_link_up\n"); | ||
1469 | cmd = xm_read16(hw, port, XM_MMU_CMD); | 1468 | cmd = xm_read16(hw, port, XM_MMU_CMD); |
1470 | 1469 | ||
1471 | /* | 1470 | /* |
@@ -1578,7 +1577,6 @@ static void yukon_init(struct skge_hw *hw, int port) | |||
1578 | struct skge_port *skge = netdev_priv(hw->dev[port]); | 1577 | struct skge_port *skge = netdev_priv(hw->dev[port]); |
1579 | u16 ctrl, ct1000, adv; | 1578 | u16 ctrl, ct1000, adv; |
1580 | 1579 | ||
1581 | pr_debug("yukon_init\n"); | ||
1582 | if (skge->autoneg == AUTONEG_ENABLE) { | 1580 | if (skge->autoneg == AUTONEG_ENABLE) { |
1583 | u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL); | 1581 | u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL); |
1584 | 1582 | ||
@@ -1677,9 +1675,11 @@ static void yukon_mac_init(struct skge_hw *hw, int port) | |||
1677 | 1675 | ||
1678 | /* WA code for COMA mode -- set PHY reset */ | 1676 | /* WA code for COMA mode -- set PHY reset */ |
1679 | if (hw->chip_id == CHIP_ID_YUKON_LITE && | 1677 | if (hw->chip_id == CHIP_ID_YUKON_LITE && |
1680 | hw->chip_rev >= CHIP_REV_YU_LITE_A3) | 1678 | hw->chip_rev >= CHIP_REV_YU_LITE_A3) { |
1681 | skge_write32(hw, B2_GP_IO, | 1679 | reg = skge_read32(hw, B2_GP_IO); |
1682 | (skge_read32(hw, B2_GP_IO) | GP_DIR_9 | GP_IO_9)); | 1680 | reg |= GP_DIR_9 | GP_IO_9; |
1681 | skge_write32(hw, B2_GP_IO, reg); | ||
1682 | } | ||
1683 | 1683 | ||
1684 | /* hard reset */ | 1684 | /* hard reset */ |
1685 | skge_write32(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET); | 1685 | skge_write32(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET); |
@@ -1687,10 +1687,12 @@ static void yukon_mac_init(struct skge_hw *hw, int port) | |||
1687 | 1687 | ||
1688 | /* WA code for COMA mode -- clear PHY reset */ | 1688 | /* WA code for COMA mode -- clear PHY reset */ |
1689 | if (hw->chip_id == CHIP_ID_YUKON_LITE && | 1689 | if (hw->chip_id == CHIP_ID_YUKON_LITE && |
1690 | hw->chip_rev >= CHIP_REV_YU_LITE_A3) | 1690 | hw->chip_rev >= CHIP_REV_YU_LITE_A3) { |
1691 | skge_write32(hw, B2_GP_IO, | 1691 | reg = skge_read32(hw, B2_GP_IO); |
1692 | (skge_read32(hw, B2_GP_IO) | GP_DIR_9) | 1692 | reg |= GP_DIR_9; |
1693 | & ~GP_IO_9); | 1693 | reg &= ~GP_IO_9; |
1694 | skge_write32(hw, B2_GP_IO, reg); | ||
1695 | } | ||
1694 | 1696 | ||
1695 | /* Set hardware config mode */ | 1697 | /* Set hardware config mode */ |
1696 | reg = GPC_INT_POL_HI | GPC_DIS_FC | GPC_DIS_SLEEP | | 1698 | reg = GPC_INT_POL_HI | GPC_DIS_FC | GPC_DIS_SLEEP | |
@@ -1729,7 +1731,7 @@ static void yukon_mac_init(struct skge_hw *hw, int port) | |||
1729 | } | 1731 | } |
1730 | 1732 | ||
1731 | gma_write16(hw, port, GM_GP_CTRL, reg); | 1733 | gma_write16(hw, port, GM_GP_CTRL, reg); |
1732 | skge_read16(hw, GMAC_IRQ_SRC); | 1734 | skge_read16(hw, SK_REG(port, GMAC_IRQ_SRC)); |
1733 | 1735 | ||
1734 | yukon_init(hw, port); | 1736 | yukon_init(hw, port); |
1735 | 1737 | ||
@@ -1801,20 +1803,26 @@ static void yukon_stop(struct skge_port *skge) | |||
1801 | struct skge_hw *hw = skge->hw; | 1803 | struct skge_hw *hw = skge->hw; |
1802 | int port = skge->port; | 1804 | int port = skge->port; |
1803 | 1805 | ||
1804 | if (hw->chip_id == CHIP_ID_YUKON_LITE && | 1806 | skge_write8(hw, SK_REG(port, GMAC_IRQ_MSK), 0); |
1805 | hw->chip_rev >= CHIP_REV_YU_LITE_A3) { | 1807 | yukon_reset(hw, port); |
1806 | skge_write32(hw, B2_GP_IO, | ||
1807 | skge_read32(hw, B2_GP_IO) | GP_DIR_9 | GP_IO_9); | ||
1808 | } | ||
1809 | 1808 | ||
1810 | gma_write16(hw, port, GM_GP_CTRL, | 1809 | gma_write16(hw, port, GM_GP_CTRL, |
1811 | gma_read16(hw, port, GM_GP_CTRL) | 1810 | gma_read16(hw, port, GM_GP_CTRL) |
1812 | & ~(GM_GPCR_TX_ENA|GM_GPCR_RX_ENA)); | 1811 | & ~(GM_GPCR_TX_ENA|GM_GPCR_RX_ENA)); |
1813 | gma_read16(hw, port, GM_GP_CTRL); | 1812 | gma_read16(hw, port, GM_GP_CTRL); |
1814 | 1813 | ||
1814 | if (hw->chip_id == CHIP_ID_YUKON_LITE && | ||
1815 | hw->chip_rev >= CHIP_REV_YU_LITE_A3) { | ||
1816 | u32 io = skge_read32(hw, B2_GP_IO); | ||
1817 | |||
1818 | io |= GP_DIR_9 | GP_IO_9; | ||
1819 | skge_write32(hw, B2_GP_IO, io); | ||
1820 | skge_read32(hw, B2_GP_IO); | ||
1821 | } | ||
1822 | |||
1815 | /* set GPHY Control reset */ | 1823 | /* set GPHY Control reset */ |
1816 | skge_write32(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET); | 1824 | skge_write8(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET); |
1817 | skge_write32(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET); | 1825 | skge_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET); |
1818 | } | 1826 | } |
1819 | 1827 | ||
1820 | static void yukon_get_stats(struct skge_port *skge, u64 *data) | 1828 | static void yukon_get_stats(struct skge_port *skge, u64 *data) |
@@ -1873,10 +1881,8 @@ static void yukon_link_up(struct skge_port *skge) | |||
1873 | int port = skge->port; | 1881 | int port = skge->port; |
1874 | u16 reg; | 1882 | u16 reg; |
1875 | 1883 | ||
1876 | pr_debug("yukon_link_up\n"); | ||
1877 | |||
1878 | /* Enable Transmit FIFO Underrun */ | 1884 | /* Enable Transmit FIFO Underrun */ |
1879 | skge_write8(hw, GMAC_IRQ_MSK, GMAC_DEF_MSK); | 1885 | skge_write8(hw, SK_REG(port, GMAC_IRQ_MSK), GMAC_DEF_MSK); |
1880 | 1886 | ||
1881 | reg = gma_read16(hw, port, GM_GP_CTRL); | 1887 | reg = gma_read16(hw, port, GM_GP_CTRL); |
1882 | if (skge->duplex == DUPLEX_FULL || skge->autoneg == AUTONEG_ENABLE) | 1888 | if (skge->duplex == DUPLEX_FULL || skge->autoneg == AUTONEG_ENABLE) |
@@ -1896,7 +1902,6 @@ static void yukon_link_down(struct skge_port *skge) | |||
1896 | int port = skge->port; | 1902 | int port = skge->port; |
1897 | u16 ctrl; | 1903 | u16 ctrl; |
1898 | 1904 | ||
1899 | pr_debug("yukon_link_down\n"); | ||
1900 | gm_phy_write(hw, port, PHY_MARV_INT_MASK, 0); | 1905 | gm_phy_write(hw, port, PHY_MARV_INT_MASK, 0); |
1901 | 1906 | ||
1902 | ctrl = gma_read16(hw, port, GM_GP_CTRL); | 1907 | ctrl = gma_read16(hw, port, GM_GP_CTRL); |
@@ -2112,7 +2117,6 @@ static int skge_up(struct net_device *dev) | |||
2112 | skge_write8(hw, Q_ADDR(rxqaddr[port], Q_CSR), CSR_START | CSR_IRQ_CL_F); | 2117 | skge_write8(hw, Q_ADDR(rxqaddr[port], Q_CSR), CSR_START | CSR_IRQ_CL_F); |
2113 | skge_led(skge, LED_MODE_ON); | 2118 | skge_led(skge, LED_MODE_ON); |
2114 | 2119 | ||
2115 | pr_debug("skge_up completed\n"); | ||
2116 | return 0; | 2120 | return 0; |
2117 | 2121 | ||
2118 | free_rx_ring: | 2122 | free_rx_ring: |
@@ -2135,15 +2139,20 @@ static int skge_down(struct net_device *dev) | |||
2135 | 2139 | ||
2136 | netif_stop_queue(dev); | 2140 | netif_stop_queue(dev); |
2137 | 2141 | ||
2142 | skge_write8(skge->hw, SK_REG(skge->port, LNK_LED_REG), LED_OFF); | ||
2143 | if (hw->chip_id == CHIP_ID_GENESIS) | ||
2144 | genesis_stop(skge); | ||
2145 | else | ||
2146 | yukon_stop(skge); | ||
2147 | |||
2148 | hw->intr_mask &= ~portirqmask[skge->port]; | ||
2149 | skge_write32(hw, B0_IMSK, hw->intr_mask); | ||
2150 | |||
2138 | /* Stop transmitter */ | 2151 | /* Stop transmitter */ |
2139 | skge_write8(hw, Q_ADDR(txqaddr[port], Q_CSR), CSR_STOP); | 2152 | skge_write8(hw, Q_ADDR(txqaddr[port], Q_CSR), CSR_STOP); |
2140 | skge_write32(hw, RB_ADDR(txqaddr[port], RB_CTRL), | 2153 | skge_write32(hw, RB_ADDR(txqaddr[port], RB_CTRL), |
2141 | RB_RST_SET|RB_DIS_OP_MD); | 2154 | RB_RST_SET|RB_DIS_OP_MD); |
2142 | 2155 | ||
2143 | if (hw->chip_id == CHIP_ID_GENESIS) | ||
2144 | genesis_stop(skge); | ||
2145 | else | ||
2146 | yukon_stop(skge); | ||
2147 | 2156 | ||
2148 | /* Disable Force Sync bit and Enable Alloc bit */ | 2157 | /* Disable Force Sync bit and Enable Alloc bit */ |
2149 | skge_write8(hw, SK_REG(port, TXA_CTRL), | 2158 | skge_write8(hw, SK_REG(port, TXA_CTRL), |
@@ -2367,8 +2376,6 @@ static void genesis_set_multicast(struct net_device *dev) | |||
2367 | u32 mode; | 2376 | u32 mode; |
2368 | u8 filter[8]; | 2377 | u8 filter[8]; |
2369 | 2378 | ||
2370 | pr_debug("genesis_set_multicast flags=%x count=%d\n", dev->flags, dev->mc_count); | ||
2371 | |||
2372 | mode = xm_read32(hw, port, XM_MODE); | 2379 | mode = xm_read32(hw, port, XM_MODE); |
2373 | mode |= XM_MD_ENA_HASH; | 2380 | mode |= XM_MD_ENA_HASH; |
2374 | if (dev->flags & IFF_PROMISC) | 2381 | if (dev->flags & IFF_PROMISC) |
@@ -2530,8 +2537,6 @@ static int skge_poll(struct net_device *dev, int *budget) | |||
2530 | unsigned int to_do = min(dev->quota, *budget); | 2537 | unsigned int to_do = min(dev->quota, *budget); |
2531 | unsigned int work_done = 0; | 2538 | unsigned int work_done = 0; |
2532 | 2539 | ||
2533 | pr_debug("skge_poll\n"); | ||
2534 | |||
2535 | for (e = ring->to_clean; work_done < to_do; e = e->next) { | 2540 | for (e = ring->to_clean; work_done < to_do; e = e->next) { |
2536 | struct skge_rx_desc *rd = e->desc; | 2541 | struct skge_rx_desc *rd = e->desc; |
2537 | struct sk_buff *skb; | 2542 | struct sk_buff *skb; |
@@ -2672,9 +2677,9 @@ static void skge_error_irq(struct skge_hw *hw) | |||
2672 | if (hw->chip_id == CHIP_ID_GENESIS) { | 2677 | if (hw->chip_id == CHIP_ID_GENESIS) { |
2673 | /* clear xmac errors */ | 2678 | /* clear xmac errors */ |
2674 | if (hwstatus & (IS_NO_STAT_M1|IS_NO_TIST_M1)) | 2679 | if (hwstatus & (IS_NO_STAT_M1|IS_NO_TIST_M1)) |
2675 | skge_write16(hw, SK_REG(0, RX_MFF_CTRL1), MFF_CLR_INSTAT); | 2680 | skge_write16(hw, RX_MFF_CTRL1, MFF_CLR_INSTAT); |
2676 | if (hwstatus & (IS_NO_STAT_M2|IS_NO_TIST_M2)) | 2681 | if (hwstatus & (IS_NO_STAT_M2|IS_NO_TIST_M2)) |
2677 | skge_write16(hw, SK_REG(0, RX_MFF_CTRL2), MFF_CLR_INSTAT); | 2682 | skge_write16(hw, RX_MFF_CTRL2, MFF_CLR_INSTAT); |
2678 | } else { | 2683 | } else { |
2679 | /* Timestamp (unused) overflow */ | 2684 | /* Timestamp (unused) overflow */ |
2680 | if (hwstatus & IS_IRQ_TIST_OV) | 2685 | if (hwstatus & IS_IRQ_TIST_OV) |
@@ -3000,9 +3005,6 @@ static int skge_reset(struct skge_hw *hw) | |||
3000 | 3005 | ||
3001 | skge_write32(hw, B0_IMSK, hw->intr_mask); | 3006 | skge_write32(hw, B0_IMSK, hw->intr_mask); |
3002 | 3007 | ||
3003 | if (hw->chip_id != CHIP_ID_GENESIS) | ||
3004 | skge_write8(hw, GMAC_IRQ_MSK, 0); | ||
3005 | |||
3006 | spin_lock_bh(&hw->phy_lock); | 3008 | spin_lock_bh(&hw->phy_lock); |
3007 | for (i = 0; i < hw->ports; i++) { | 3009 | for (i = 0; i < hw->ports; i++) { |
3008 | if (hw->chip_id == CHIP_ID_GENESIS) | 3010 | if (hw->chip_id == CHIP_ID_GENESIS) |
@@ -3230,6 +3232,11 @@ static void __devexit skge_remove(struct pci_dev *pdev) | |||
3230 | dev0 = hw->dev[0]; | 3232 | dev0 = hw->dev[0]; |
3231 | unregister_netdev(dev0); | 3233 | unregister_netdev(dev0); |
3232 | 3234 | ||
3235 | skge_write32(hw, B0_IMSK, 0); | ||
3236 | skge_write16(hw, B0_LED, LED_STAT_OFF); | ||
3237 | skge_pci_clear(hw); | ||
3238 | skge_write8(hw, B0_CTST, CS_RST_SET); | ||
3239 | |||
3233 | tasklet_kill(&hw->ext_tasklet); | 3240 | tasklet_kill(&hw->ext_tasklet); |
3234 | 3241 | ||
3235 | free_irq(pdev->irq, hw); | 3242 | free_irq(pdev->irq, hw); |
@@ -3238,7 +3245,7 @@ static void __devexit skge_remove(struct pci_dev *pdev) | |||
3238 | if (dev1) | 3245 | if (dev1) |
3239 | free_netdev(dev1); | 3246 | free_netdev(dev1); |
3240 | free_netdev(dev0); | 3247 | free_netdev(dev0); |
3241 | skge_write16(hw, B0_LED, LED_STAT_OFF); | 3248 | |
3242 | iounmap(hw->regs); | 3249 | iounmap(hw->regs); |
3243 | kfree(hw); | 3250 | kfree(hw); |
3244 | pci_set_drvdata(pdev, NULL); | 3251 | pci_set_drvdata(pdev, NULL); |
@@ -3257,7 +3264,10 @@ static int skge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3257 | struct skge_port *skge = netdev_priv(dev); | 3264 | struct skge_port *skge = netdev_priv(dev); |
3258 | if (netif_running(dev)) { | 3265 | if (netif_running(dev)) { |
3259 | netif_carrier_off(dev); | 3266 | netif_carrier_off(dev); |
3260 | skge_down(dev); | 3267 | if (skge->wol) |
3268 | netif_stop_queue(dev); | ||
3269 | else | ||
3270 | skge_down(dev); | ||
3261 | } | 3271 | } |
3262 | netif_device_detach(dev); | 3272 | netif_device_detach(dev); |
3263 | wol |= skge->wol; | 3273 | wol |= skge->wol; |
diff --git a/drivers/net/skge.h b/drivers/net/skge.h index f1680beb8e68..efbf98c675d2 100644 --- a/drivers/net/skge.h +++ b/drivers/net/skge.h | |||
@@ -2008,7 +2008,7 @@ enum { | |||
2008 | GM_IS_RX_FF_OR = 1<<1, /* Receive FIFO Overrun */ | 2008 | GM_IS_RX_FF_OR = 1<<1, /* Receive FIFO Overrun */ |
2009 | GM_IS_RX_COMPL = 1<<0, /* Frame Reception Complete */ | 2009 | GM_IS_RX_COMPL = 1<<0, /* Frame Reception Complete */ |
2010 | 2010 | ||
2011 | #define GMAC_DEF_MSK (GM_IS_TX_CO_OV | GM_IS_RX_CO_OV | GM_IS_TX_FF_UR) | 2011 | #define GMAC_DEF_MSK (GM_IS_RX_FF_OR | GM_IS_TX_FF_UR) |
2012 | 2012 | ||
2013 | /* GMAC_LINK_CTRL 16 bit GMAC Link Control Reg (YUKON only) */ | 2013 | /* GMAC_LINK_CTRL 16 bit GMAC Link Control Reg (YUKON only) */ |
2014 | /* Bits 15.. 2: reserved */ | 2014 | /* Bits 15.. 2: reserved */ |
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c index 26cc4f6378c7..60d1e05ab732 100644 --- a/drivers/net/tulip/xircom_cb.c +++ b/drivers/net/tulip/xircom_cb.c | |||
@@ -117,7 +117,7 @@ static int xircom_open(struct net_device *dev); | |||
117 | static int xircom_close(struct net_device *dev); | 117 | static int xircom_close(struct net_device *dev); |
118 | static void xircom_up(struct xircom_private *card); | 118 | static void xircom_up(struct xircom_private *card); |
119 | static struct net_device_stats *xircom_get_stats(struct net_device *dev); | 119 | static struct net_device_stats *xircom_get_stats(struct net_device *dev); |
120 | #if CONFIG_NET_POLL_CONTROLLER | 120 | #ifdef CONFIG_NET_POLL_CONTROLLER |
121 | static void xircom_poll_controller(struct net_device *dev); | 121 | static void xircom_poll_controller(struct net_device *dev); |
122 | #endif | 122 | #endif |
123 | 123 | ||
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 2be65d308fbe..06998c2240d9 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -6852,7 +6852,10 @@ static inline char *airo_translate_scan(struct net_device *dev, | |||
6852 | /* Add frequency */ | 6852 | /* Add frequency */ |
6853 | iwe.cmd = SIOCGIWFREQ; | 6853 | iwe.cmd = SIOCGIWFREQ; |
6854 | iwe.u.freq.m = le16_to_cpu(bss->dsChannel); | 6854 | iwe.u.freq.m = le16_to_cpu(bss->dsChannel); |
6855 | iwe.u.freq.m = frequency_list[iwe.u.freq.m] * 100000; | 6855 | /* iwe.u.freq.m containt the channel (starting 1), our |
6856 | * frequency_list array start at index 0... | ||
6857 | */ | ||
6858 | iwe.u.freq.m = frequency_list[iwe.u.freq.m - 1] * 100000; | ||
6856 | iwe.u.freq.e = 1; | 6859 | iwe.u.freq.e = 1; |
6857 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); | 6860 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); |
6858 | 6861 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 992db89adce7..259d247b7551 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -309,17 +309,25 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
309 | 309 | ||
310 | pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr); | 310 | pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr); |
311 | 311 | ||
312 | /* If we're in D3, force entire word to 0. | 312 | /* If we're (effectively) in D3, force entire word to 0. |
313 | * This doesn't affect PME_Status, disables PME_En, and | 313 | * This doesn't affect PME_Status, disables PME_En, and |
314 | * sets PowerState to 0. | 314 | * sets PowerState to 0. |
315 | */ | 315 | */ |
316 | if (dev->current_state >= PCI_D3hot) { | 316 | switch (dev->current_state) { |
317 | if (!(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET)) | 317 | case PCI_UNKNOWN: /* Boot-up */ |
318 | if ((pmcsr & PCI_PM_CTRL_STATE_MASK) == PCI_D3hot | ||
319 | && !(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET)) | ||
318 | need_restore = 1; | 320 | need_restore = 1; |
321 | /* Fall-through: force to D0 */ | ||
322 | case PCI_D3hot: | ||
323 | case PCI_D3cold: | ||
324 | case PCI_POWER_ERROR: | ||
319 | pmcsr = 0; | 325 | pmcsr = 0; |
320 | } else { | 326 | break; |
327 | default: | ||
321 | pmcsr &= ~PCI_PM_CTRL_STATE_MASK; | 328 | pmcsr &= ~PCI_PM_CTRL_STATE_MASK; |
322 | pmcsr |= state; | 329 | pmcsr |= state; |
330 | break; | ||
323 | } | 331 | } |
324 | 332 | ||
325 | /* enter specified state */ | 333 | /* enter specified state */ |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index f0997c36c9b7..ba4d78e5b121 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -1045,7 +1045,18 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i | |||
1045 | { | 1045 | { |
1046 | struct yenta_socket *socket; | 1046 | struct yenta_socket *socket; |
1047 | int ret; | 1047 | int ret; |
1048 | 1048 | ||
1049 | /* | ||
1050 | * If we failed to assign proper bus numbers for this cardbus | ||
1051 | * controller during PCI probe, its subordinate pci_bus is NULL. | ||
1052 | * Bail out if so. | ||
1053 | */ | ||
1054 | if (!dev->subordinate) { | ||
1055 | printk(KERN_ERR "Yenta: no bus associated with %s! " | ||
1056 | "(try 'pci=assign-busses')\n", pci_name(dev)); | ||
1057 | return -ENODEV; | ||
1058 | } | ||
1059 | |||
1049 | socket = kmalloc(sizeof(struct yenta_socket), GFP_KERNEL); | 1060 | socket = kmalloc(sizeof(struct yenta_socket), GFP_KERNEL); |
1050 | if (!socket) | 1061 | if (!socket) |
1051 | return -ENOMEM; | 1062 | return -ENOMEM; |
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 96ca863eaff2..0db4f57a6a95 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ctcmain.c,v 1.74 2005/03/24 09:04:17 mschwide Exp $ | 2 | * $Id: ctcmain.c,v 1.78 2005/09/07 12:18:02 pavlic Exp $ |
3 | * | 3 | * |
4 | * CTC / ESCON network driver | 4 | * CTC / ESCON network driver |
5 | * | 5 | * |
@@ -37,10 +37,9 @@ | |||
37 | * along with this program; if not, write to the Free Software | 37 | * along with this program; if not, write to the Free Software |
38 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 38 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
39 | * | 39 | * |
40 | * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.74 $ | 40 | * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.78 $ |
41 | * | 41 | * |
42 | */ | 42 | */ |
43 | |||
44 | #undef DEBUG | 43 | #undef DEBUG |
45 | #include <linux/module.h> | 44 | #include <linux/module.h> |
46 | #include <linux/init.h> | 45 | #include <linux/init.h> |
@@ -135,7 +134,7 @@ static const char *dev_event_names[] = { | |||
135 | "TX down", | 134 | "TX down", |
136 | "Restart", | 135 | "Restart", |
137 | }; | 136 | }; |
138 | 137 | ||
139 | /** | 138 | /** |
140 | * Events of the channel statemachine | 139 | * Events of the channel statemachine |
141 | */ | 140 | */ |
@@ -249,7 +248,7 @@ static void | |||
249 | print_banner(void) | 248 | print_banner(void) |
250 | { | 249 | { |
251 | static int printed = 0; | 250 | static int printed = 0; |
252 | char vbuf[] = "$Revision: 1.74 $"; | 251 | char vbuf[] = "$Revision: 1.78 $"; |
253 | char *version = vbuf; | 252 | char *version = vbuf; |
254 | 253 | ||
255 | if (printed) | 254 | if (printed) |
@@ -334,7 +333,7 @@ static const char *ch_state_names[] = { | |||
334 | "Restarting", | 333 | "Restarting", |
335 | "Not operational", | 334 | "Not operational", |
336 | }; | 335 | }; |
337 | 336 | ||
338 | #ifdef DEBUG | 337 | #ifdef DEBUG |
339 | /** | 338 | /** |
340 | * Dump header and first 16 bytes of an sk_buff for debugging purposes. | 339 | * Dump header and first 16 bytes of an sk_buff for debugging purposes. |
@@ -671,7 +670,7 @@ static void | |||
671 | fsm_action_nop(fsm_instance * fi, int event, void *arg) | 670 | fsm_action_nop(fsm_instance * fi, int event, void *arg) |
672 | { | 671 | { |
673 | } | 672 | } |
674 | 673 | ||
675 | /** | 674 | /** |
676 | * Actions for channel - statemachines. | 675 | * Actions for channel - statemachines. |
677 | *****************************************************************************/ | 676 | *****************************************************************************/ |
@@ -1514,7 +1513,6 @@ ch_action_reinit(fsm_instance *fi, int event, void *arg) | |||
1514 | fsm_addtimer(&privptr->restart_timer, 1000, DEV_EVENT_RESTART, dev); | 1513 | fsm_addtimer(&privptr->restart_timer, 1000, DEV_EVENT_RESTART, dev); |
1515 | } | 1514 | } |
1516 | 1515 | ||
1517 | |||
1518 | /** | 1516 | /** |
1519 | * The statemachine for a channel. | 1517 | * The statemachine for a channel. |
1520 | */ | 1518 | */ |
@@ -1625,7 +1623,7 @@ static const fsm_node ch_fsm[] = { | |||
1625 | }; | 1623 | }; |
1626 | 1624 | ||
1627 | static const int CH_FSM_LEN = sizeof (ch_fsm) / sizeof (fsm_node); | 1625 | static const int CH_FSM_LEN = sizeof (ch_fsm) / sizeof (fsm_node); |
1628 | 1626 | ||
1629 | /** | 1627 | /** |
1630 | * Functions related to setup and device detection. | 1628 | * Functions related to setup and device detection. |
1631 | *****************************************************************************/ | 1629 | *****************************************************************************/ |
@@ -1976,7 +1974,7 @@ ctc_irq_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1976 | fsm_event(ch->fsm, CH_EVENT_IRQ, ch); | 1974 | fsm_event(ch->fsm, CH_EVENT_IRQ, ch); |
1977 | 1975 | ||
1978 | } | 1976 | } |
1979 | 1977 | ||
1980 | /** | 1978 | /** |
1981 | * Actions for interface - statemachine. | 1979 | * Actions for interface - statemachine. |
1982 | *****************************************************************************/ | 1980 | *****************************************************************************/ |
@@ -2209,13 +2207,18 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2209 | int rc = 0; | 2207 | int rc = 0; |
2210 | 2208 | ||
2211 | DBF_TEXT(trace, 5, __FUNCTION__); | 2209 | DBF_TEXT(trace, 5, __FUNCTION__); |
2210 | /* we need to acquire the lock for testing the state | ||
2211 | * otherwise we can have an IRQ changing the state to | ||
2212 | * TXIDLE after the test but before acquiring the lock. | ||
2213 | */ | ||
2214 | spin_lock_irqsave(&ch->collect_lock, saveflags); | ||
2212 | if (fsm_getstate(ch->fsm) != CH_STATE_TXIDLE) { | 2215 | if (fsm_getstate(ch->fsm) != CH_STATE_TXIDLE) { |
2213 | int l = skb->len + LL_HEADER_LENGTH; | 2216 | int l = skb->len + LL_HEADER_LENGTH; |
2214 | 2217 | ||
2215 | spin_lock_irqsave(&ch->collect_lock, saveflags); | 2218 | if (ch->collect_len + l > ch->max_bufsize - 2) { |
2216 | if (ch->collect_len + l > ch->max_bufsize - 2) | 2219 | spin_unlock_irqrestore(&ch->collect_lock, saveflags); |
2217 | rc = -EBUSY; | 2220 | return -EBUSY; |
2218 | else { | 2221 | } else { |
2219 | atomic_inc(&skb->users); | 2222 | atomic_inc(&skb->users); |
2220 | header.length = l; | 2223 | header.length = l; |
2221 | header.type = skb->protocol; | 2224 | header.type = skb->protocol; |
@@ -2231,7 +2234,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2231 | int ccw_idx; | 2234 | int ccw_idx; |
2232 | struct sk_buff *nskb; | 2235 | struct sk_buff *nskb; |
2233 | unsigned long hi; | 2236 | unsigned long hi; |
2234 | 2237 | spin_unlock_irqrestore(&ch->collect_lock, saveflags); | |
2235 | /** | 2238 | /** |
2236 | * Protect skb against beeing free'd by upper | 2239 | * Protect skb against beeing free'd by upper |
2237 | * layers. | 2240 | * layers. |
@@ -2256,6 +2259,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2256 | if (!nskb) { | 2259 | if (!nskb) { |
2257 | atomic_dec(&skb->users); | 2260 | atomic_dec(&skb->users); |
2258 | skb_pull(skb, LL_HEADER_LENGTH + 2); | 2261 | skb_pull(skb, LL_HEADER_LENGTH + 2); |
2262 | ctc_clear_busy(ch->netdev); | ||
2259 | return -ENOMEM; | 2263 | return -ENOMEM; |
2260 | } else { | 2264 | } else { |
2261 | memcpy(skb_put(nskb, skb->len), | 2265 | memcpy(skb_put(nskb, skb->len), |
@@ -2281,6 +2285,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2281 | */ | 2285 | */ |
2282 | atomic_dec(&skb->users); | 2286 | atomic_dec(&skb->users); |
2283 | skb_pull(skb, LL_HEADER_LENGTH + 2); | 2287 | skb_pull(skb, LL_HEADER_LENGTH + 2); |
2288 | ctc_clear_busy(ch->netdev); | ||
2284 | return -EBUSY; | 2289 | return -EBUSY; |
2285 | } | 2290 | } |
2286 | 2291 | ||
@@ -2327,9 +2332,10 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2327 | } | 2332 | } |
2328 | } | 2333 | } |
2329 | 2334 | ||
2335 | ctc_clear_busy(ch->netdev); | ||
2330 | return rc; | 2336 | return rc; |
2331 | } | 2337 | } |
2332 | 2338 | ||
2333 | /** | 2339 | /** |
2334 | * Interface API for upper network layers | 2340 | * Interface API for upper network layers |
2335 | *****************************************************************************/ | 2341 | *****************************************************************************/ |
@@ -2421,7 +2427,6 @@ ctc_tx(struct sk_buff *skb, struct net_device * dev) | |||
2421 | dev->trans_start = jiffies; | 2427 | dev->trans_start = jiffies; |
2422 | if (transmit_skb(privptr->channel[WRITE], skb) != 0) | 2428 | if (transmit_skb(privptr->channel[WRITE], skb) != 0) |
2423 | rc = 1; | 2429 | rc = 1; |
2424 | ctc_clear_busy(dev); | ||
2425 | return rc; | 2430 | return rc; |
2426 | } | 2431 | } |
2427 | 2432 | ||
@@ -2610,7 +2615,6 @@ stats_write(struct device *dev, struct device_attribute *attr, const char *buf, | |||
2610 | return count; | 2615 | return count; |
2611 | } | 2616 | } |
2612 | 2617 | ||
2613 | |||
2614 | static void | 2618 | static void |
2615 | ctc_netdev_unregister(struct net_device * dev) | 2619 | ctc_netdev_unregister(struct net_device * dev) |
2616 | { | 2620 | { |
@@ -2685,7 +2689,6 @@ ctc_proto_store(struct device *dev, struct device_attribute *attr, const char *b | |||
2685 | return count; | 2689 | return count; |
2686 | } | 2690 | } |
2687 | 2691 | ||
2688 | |||
2689 | static ssize_t | 2692 | static ssize_t |
2690 | ctc_type_show(struct device *dev, struct device_attribute *attr, char *buf) | 2693 | ctc_type_show(struct device *dev, struct device_attribute *attr, char *buf) |
2691 | { | 2694 | { |
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index a63f93186e41..b227e51d12f4 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c | |||
@@ -161,7 +161,7 @@ static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg) | |||
161 | { | 161 | { |
162 | struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); | 162 | struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); |
163 | unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg, pdev->device); | 163 | unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg, pdev->device); |
164 | u32 val, val2; | 164 | u32 val, val2 = 0; |
165 | u8 pmr; | 165 | u8 pmr; |
166 | 166 | ||
167 | if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ | 167 | if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ |
@@ -289,7 +289,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
289 | if (ent->device != 0x182) { | 289 | if (ent->device != 0x182) { |
290 | if ((pmr & SIS_PMR_COMBINED) == 0) { | 290 | if ((pmr & SIS_PMR_COMBINED) == 0) { |
291 | printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in SATA mode\n"); | 291 | printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in SATA mode\n"); |
292 | port2_start=0x64; | 292 | port2_start = 64; |
293 | } | 293 | } |
294 | else { | 294 | else { |
295 | printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in combined mode\n"); | 295 | printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in combined mode\n"); |
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index aec39fb261ca..b5cf39468d18 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c | |||
@@ -463,7 +463,7 @@ static int __init serial21285_console_setup(struct console *co, char *options) | |||
463 | return uart_set_options(port, co, baud, parity, bits, flow); | 463 | return uart_set_options(port, co, baud, parity, bits, flow); |
464 | } | 464 | } |
465 | 465 | ||
466 | extern struct uart_driver serial21285_reg; | 466 | static struct uart_driver serial21285_reg; |
467 | 467 | ||
468 | static struct console serial21285_console = | 468 | static struct console serial21285_console = |
469 | { | 469 | { |
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 978e12437e61..679e678c7e6a 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -689,7 +689,7 @@ static int __init pl010_console_setup(struct console *co, char *options) | |||
689 | return uart_set_options(port, co, baud, parity, bits, flow); | 689 | return uart_set_options(port, co, baud, parity, bits, flow); |
690 | } | 690 | } |
691 | 691 | ||
692 | extern struct uart_driver amba_reg; | 692 | static struct uart_driver amba_reg; |
693 | static struct console amba_console = { | 693 | static struct console amba_console = { |
694 | .name = "ttyAM", | 694 | .name = "ttyAM", |
695 | .write = pl010_console_write, | 695 | .write = pl010_console_write, |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 56071309744c..1ff629c74750 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -701,7 +701,7 @@ static int __init pl011_console_setup(struct console *co, char *options) | |||
701 | return uart_set_options(&uap->port, co, baud, parity, bits, flow); | 701 | return uart_set_options(&uap->port, co, baud, parity, bits, flow); |
702 | } | 702 | } |
703 | 703 | ||
704 | extern struct uart_driver amba_reg; | 704 | static struct uart_driver amba_reg; |
705 | static struct console amba_console = { | 705 | static struct console amba_console = { |
706 | .name = "ttyAMA", | 706 | .name = "ttyAMA", |
707 | .write = pl011_console_write, | 707 | .write = pl011_console_write, |
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c index d822896b488c..78c1f36ad9b7 100644 --- a/drivers/serial/clps711x.c +++ b/drivers/serial/clps711x.c | |||
@@ -525,7 +525,7 @@ static int __init clps711xuart_console_setup(struct console *co, char *options) | |||
525 | return uart_set_options(port, co, baud, parity, bits, flow); | 525 | return uart_set_options(port, co, baud, parity, bits, flow); |
526 | } | 526 | } |
527 | 527 | ||
528 | extern struct uart_driver clps711x_reg; | 528 | static struct uart_driver clps711x_reg; |
529 | static struct console clps711x_console = { | 529 | static struct console clps711x_console = { |
530 | .name = "ttyCL", | 530 | .name = "ttyCL", |
531 | .write = clps711xuart_console_write, | 531 | .write = clps711xuart_console_write, |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index eaa0af835290..672b359b07ce 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -589,8 +589,8 @@ serial_pxa_type(struct uart_port *port) | |||
589 | 589 | ||
590 | #ifdef CONFIG_SERIAL_PXA_CONSOLE | 590 | #ifdef CONFIG_SERIAL_PXA_CONSOLE |
591 | 591 | ||
592 | extern struct uart_pxa_port serial_pxa_ports[]; | 592 | static struct uart_pxa_port serial_pxa_ports[]; |
593 | extern struct uart_driver serial_pxa_reg; | 593 | static struct uart_driver serial_pxa_reg; |
594 | 594 | ||
595 | #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) | 595 | #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) |
596 | 596 | ||
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c index 1225b14f6e9d..dd8aed242357 100644 --- a/drivers/serial/sa1100.c +++ b/drivers/serial/sa1100.c | |||
@@ -799,7 +799,7 @@ sa1100_console_setup(struct console *co, char *options) | |||
799 | return uart_set_options(&sport->port, co, baud, parity, bits, flow); | 799 | return uart_set_options(&sport->port, co, baud, parity, bits, flow); |
800 | } | 800 | } |
801 | 801 | ||
802 | extern struct uart_driver sa1100_reg; | 802 | static struct uart_driver sa1100_reg; |
803 | static struct console sa1100_console = { | 803 | static struct console sa1100_console = { |
804 | .name = "ttySA", | 804 | .name = "ttySA", |
805 | .write = sa1100_console_write, | 805 | .write = sa1100_console_write, |
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index 8302376800c0..d01dbe5da3b9 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c | |||
@@ -632,7 +632,7 @@ static int __init lh7a40xuart_console_setup (struct console* co, char* options) | |||
632 | return uart_set_options (port, co, baud, parity, bits, flow); | 632 | return uart_set_options (port, co, baud, parity, bits, flow); |
633 | } | 633 | } |
634 | 634 | ||
635 | extern struct uart_driver lh7a40x_reg; | 635 | static struct uart_driver lh7a40x_reg; |
636 | static struct console lh7a40x_console = { | 636 | static struct console lh7a40x_console = { |
637 | .name = "ttyAM", | 637 | .name = "ttyAM", |
638 | .write = lh7a40xuart_console_write, | 638 | .write = lh7a40xuart_console_write, |
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c index ace484fa61ce..12f2884d3f0b 100644 --- a/drivers/video/nvidia/nv_i2c.c +++ b/drivers/video/nvidia/nv_i2c.c | |||
@@ -209,10 +209,13 @@ int nvidia_probe_i2c_connector(struct fb_info *info, int conn, u8 **out_edid) | |||
209 | 209 | ||
210 | if (!edid && conn == 1) { | 210 | if (!edid && conn == 1) { |
211 | /* try to get from firmware */ | 211 | /* try to get from firmware */ |
212 | edid = kmalloc(EDID_LENGTH, GFP_KERNEL); | 212 | const u8 *e = fb_firmware_edid(info->device); |
213 | if (edid) | 213 | |
214 | memcpy(edid, fb_firmware_edid(info->device), | 214 | if (e != NULL) { |
215 | EDID_LENGTH); | 215 | edid = kmalloc(EDID_LENGTH, GFP_KERNEL); |
216 | if (edid) | ||
217 | memcpy(edid, e, EDID_LENGTH); | ||
218 | } | ||
216 | } | 219 | } |
217 | 220 | ||
218 | if (out_edid) | 221 | if (out_edid) |