diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-29 15:04:10 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-29 15:04:10 -0400 |
| commit | bbf6c0a705d612a3e51c73280a2d6a608436abc6 (patch) | |
| tree | 99bce086b0790934d4e08b8bae9b3c62295c0859 | |
| parent | 7acaf5202a355547ca3b038bdf509ca450fa913b (diff) | |
| parent | a2fa6721c7237b5a666f16f732628c0c09c0b954 (diff) | |
Merge tag 'staging-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are some staging driver fixes for your tree. Nothing huge, just
some fixes for issues that have been reported and a few new device ids
added.
All have been in linux-next for a while"
* tag 'staging-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: r8188eu: Add new USB ID
staging/rtl8188eu: add 0df6:0076 Sitecom Europe B.V.
staging: android: fix a possible memory leak
staging: lustre: lustre: libcfs: workitem.c: Cleaning up missing null-terminate after strncpy call
staging: et131x: Fix errors caused by phydev->addr accesses before initialisation
staging: lustre: Remove circular dependency on header
| -rw-r--r-- | drivers/staging/android/logger.c | 5 | ||||
| -rw-r--r-- | drivers/staging/et131x/et131x.c | 68 | ||||
| -rw-r--r-- | drivers/staging/lustre/lustre/libcfs/workitem.c | 1 | ||||
| -rw-r--r-- | drivers/staging/lustre/lustre/obdclass/class_obd.c | 2 | ||||
| -rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 |
5 files changed, 35 insertions, 43 deletions
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c index 9b47e66599a3..0bf0d24d12d5 100644 --- a/drivers/staging/android/logger.c +++ b/drivers/staging/android/logger.c | |||
| @@ -790,7 +790,7 @@ static int __init create_log(char *log_name, int size) | |||
| 790 | if (unlikely(ret)) { | 790 | if (unlikely(ret)) { |
| 791 | pr_err("failed to register misc device for log '%s'!\n", | 791 | pr_err("failed to register misc device for log '%s'!\n", |
| 792 | log->misc.name); | 792 | log->misc.name); |
| 793 | goto out_free_log; | 793 | goto out_free_misc_name; |
| 794 | } | 794 | } |
| 795 | 795 | ||
| 796 | pr_info("created %luK log '%s'\n", | 796 | pr_info("created %luK log '%s'\n", |
| @@ -798,6 +798,9 @@ static int __init create_log(char *log_name, int size) | |||
| 798 | 798 | ||
| 799 | return 0; | 799 | return 0; |
| 800 | 800 | ||
| 801 | out_free_misc_name: | ||
| 802 | kfree(log->misc.name); | ||
| 803 | |||
| 801 | out_free_log: | 804 | out_free_log: |
| 802 | kfree(log); | 805 | kfree(log); |
| 803 | 806 | ||
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 8bf1eb485163..831b7c6fe494 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c | |||
| @@ -1421,22 +1421,16 @@ static int et131x_mii_read(struct et131x_adapter *adapter, u8 reg, u16 *value) | |||
| 1421 | * @reg: the register to read | 1421 | * @reg: the register to read |
| 1422 | * @value: 16-bit value to write | 1422 | * @value: 16-bit value to write |
| 1423 | */ | 1423 | */ |
| 1424 | static int et131x_mii_write(struct et131x_adapter *adapter, u8 reg, u16 value) | 1424 | static int et131x_mii_write(struct et131x_adapter *adapter, u8 addr, u8 reg, |
| 1425 | u16 value) | ||
| 1425 | { | 1426 | { |
| 1426 | struct mac_regs __iomem *mac = &adapter->regs->mac; | 1427 | struct mac_regs __iomem *mac = &adapter->regs->mac; |
| 1427 | struct phy_device *phydev = adapter->phydev; | ||
| 1428 | int status = 0; | 1428 | int status = 0; |
| 1429 | u8 addr; | ||
| 1430 | u32 delay = 0; | 1429 | u32 delay = 0; |
| 1431 | u32 mii_addr; | 1430 | u32 mii_addr; |
| 1432 | u32 mii_cmd; | 1431 | u32 mii_cmd; |
| 1433 | u32 mii_indicator; | 1432 | u32 mii_indicator; |
| 1434 | 1433 | ||
| 1435 | if (!phydev) | ||
| 1436 | return -EIO; | ||
| 1437 | |||
| 1438 | addr = phydev->addr; | ||
| 1439 | |||
| 1440 | /* Save a local copy of the registers we are dealing with so we can | 1434 | /* Save a local copy of the registers we are dealing with so we can |
| 1441 | * set them back | 1435 | * set them back |
| 1442 | */ | 1436 | */ |
| @@ -1631,17 +1625,7 @@ static int et131x_mdio_write(struct mii_bus *bus, int phy_addr, | |||
| 1631 | struct net_device *netdev = bus->priv; | 1625 | struct net_device *netdev = bus->priv; |
| 1632 | struct et131x_adapter *adapter = netdev_priv(netdev); | 1626 | struct et131x_adapter *adapter = netdev_priv(netdev); |
| 1633 | 1627 | ||
| 1634 | return et131x_mii_write(adapter, reg, value); | 1628 | return et131x_mii_write(adapter, phy_addr, reg, value); |
| 1635 | } | ||
| 1636 | |||
| 1637 | static int et131x_mdio_reset(struct mii_bus *bus) | ||
| 1638 | { | ||
| 1639 | struct net_device *netdev = bus->priv; | ||
| 1640 | struct et131x_adapter *adapter = netdev_priv(netdev); | ||
| 1641 | |||
| 1642 | et131x_mii_write(adapter, MII_BMCR, BMCR_RESET); | ||
| 1643 | |||
| 1644 | return 0; | ||
| 1645 | } | 1629 | } |
| 1646 | 1630 | ||
| 1647 | /* et1310_phy_power_switch - PHY power control | 1631 | /* et1310_phy_power_switch - PHY power control |
| @@ -1656,18 +1640,20 @@ static int et131x_mdio_reset(struct mii_bus *bus) | |||
| 1656 | static void et1310_phy_power_switch(struct et131x_adapter *adapter, bool down) | 1640 | static void et1310_phy_power_switch(struct et131x_adapter *adapter, bool down) |
| 1657 | { | 1641 | { |
| 1658 | u16 data; | 1642 | u16 data; |
| 1643 | struct phy_device *phydev = adapter->phydev; | ||
| 1659 | 1644 | ||
| 1660 | et131x_mii_read(adapter, MII_BMCR, &data); | 1645 | et131x_mii_read(adapter, MII_BMCR, &data); |
| 1661 | data &= ~BMCR_PDOWN; | 1646 | data &= ~BMCR_PDOWN; |
| 1662 | if (down) | 1647 | if (down) |
| 1663 | data |= BMCR_PDOWN; | 1648 | data |= BMCR_PDOWN; |
| 1664 | et131x_mii_write(adapter, MII_BMCR, data); | 1649 | et131x_mii_write(adapter, phydev->addr, MII_BMCR, data); |
| 1665 | } | 1650 | } |
| 1666 | 1651 | ||
| 1667 | /* et131x_xcvr_init - Init the phy if we are setting it into force mode */ | 1652 | /* et131x_xcvr_init - Init the phy if we are setting it into force mode */ |
| 1668 | static void et131x_xcvr_init(struct et131x_adapter *adapter) | 1653 | static void et131x_xcvr_init(struct et131x_adapter *adapter) |
| 1669 | { | 1654 | { |
| 1670 | u16 lcr2; | 1655 | u16 lcr2; |
| 1656 | struct phy_device *phydev = adapter->phydev; | ||
| 1671 | 1657 | ||
| 1672 | /* Set the LED behavior such that LED 1 indicates speed (off = | 1658 | /* Set the LED behavior such that LED 1 indicates speed (off = |
| 1673 | * 10Mbits, blink = 100Mbits, on = 1000Mbits) and LED 2 indicates | 1659 | * 10Mbits, blink = 100Mbits, on = 1000Mbits) and LED 2 indicates |
| @@ -1688,7 +1674,7 @@ static void et131x_xcvr_init(struct et131x_adapter *adapter) | |||
| 1688 | else | 1674 | else |
| 1689 | lcr2 |= (LED_VAL_LINKON << LED_TXRX_SHIFT); | 1675 | lcr2 |= (LED_VAL_LINKON << LED_TXRX_SHIFT); |
| 1690 | 1676 | ||
| 1691 | et131x_mii_write(adapter, PHY_LED_2, lcr2); | 1677 | et131x_mii_write(adapter, phydev->addr, PHY_LED_2, lcr2); |
| 1692 | } | 1678 | } |
| 1693 | } | 1679 | } |
| 1694 | 1680 | ||
| @@ -3643,14 +3629,14 @@ static void et131x_adjust_link(struct net_device *netdev) | |||
| 3643 | 3629 | ||
| 3644 | et131x_mii_read(adapter, PHY_MPHY_CONTROL_REG, | 3630 | et131x_mii_read(adapter, PHY_MPHY_CONTROL_REG, |
| 3645 | ®ister18); | 3631 | ®ister18); |
| 3646 | et131x_mii_write(adapter, PHY_MPHY_CONTROL_REG, | 3632 | et131x_mii_write(adapter, phydev->addr, |
| 3647 | register18 | 0x4); | 3633 | PHY_MPHY_CONTROL_REG, register18 | 0x4); |
| 3648 | et131x_mii_write(adapter, PHY_INDEX_REG, | 3634 | et131x_mii_write(adapter, phydev->addr, PHY_INDEX_REG, |
| 3649 | register18 | 0x8402); | 3635 | register18 | 0x8402); |
| 3650 | et131x_mii_write(adapter, PHY_DATA_REG, | 3636 | et131x_mii_write(adapter, phydev->addr, PHY_DATA_REG, |
| 3651 | register18 | 511); | 3637 | register18 | 511); |
| 3652 | et131x_mii_write(adapter, PHY_MPHY_CONTROL_REG, | 3638 | et131x_mii_write(adapter, phydev->addr, |
| 3653 | register18); | 3639 | PHY_MPHY_CONTROL_REG, register18); |
| 3654 | } | 3640 | } |
| 3655 | 3641 | ||
| 3656 | et1310_config_flow_control(adapter); | 3642 | et1310_config_flow_control(adapter); |
| @@ -3662,7 +3648,8 @@ static void et131x_adjust_link(struct net_device *netdev) | |||
| 3662 | et131x_mii_read(adapter, PHY_CONFIG, ®); | 3648 | et131x_mii_read(adapter, PHY_CONFIG, ®); |
| 3663 | reg &= ~ET_PHY_CONFIG_TX_FIFO_DEPTH; | 3649 | reg &= ~ET_PHY_CONFIG_TX_FIFO_DEPTH; |
| 3664 | reg |= ET_PHY_CONFIG_FIFO_DEPTH_32; | 3650 | reg |= ET_PHY_CONFIG_FIFO_DEPTH_32; |
| 3665 | et131x_mii_write(adapter, PHY_CONFIG, reg); | 3651 | et131x_mii_write(adapter, phydev->addr, PHY_CONFIG, |
| 3652 | reg); | ||
| 3666 | } | 3653 | } |
| 3667 | 3654 | ||
| 3668 | et131x_set_rx_dma_timer(adapter); | 3655 | et131x_set_rx_dma_timer(adapter); |
| @@ -3675,14 +3662,14 @@ static void et131x_adjust_link(struct net_device *netdev) | |||
| 3675 | 3662 | ||
| 3676 | et131x_mii_read(adapter, PHY_MPHY_CONTROL_REG, | 3663 | et131x_mii_read(adapter, PHY_MPHY_CONTROL_REG, |
| 3677 | ®ister18); | 3664 | ®ister18); |
| 3678 | et131x_mii_write(adapter, PHY_MPHY_CONTROL_REG, | 3665 | et131x_mii_write(adapter, phydev->addr, |
| 3679 | register18 | 0x4); | 3666 | PHY_MPHY_CONTROL_REG, register18 | 0x4); |
| 3680 | et131x_mii_write(adapter, PHY_INDEX_REG, | 3667 | et131x_mii_write(adapter, phydev->addr, |
| 3681 | register18 | 0x8402); | 3668 | PHY_INDEX_REG, register18 | 0x8402); |
| 3682 | et131x_mii_write(adapter, PHY_DATA_REG, | 3669 | et131x_mii_write(adapter, phydev->addr, |
| 3683 | register18 | 511); | 3670 | PHY_DATA_REG, register18 | 511); |
| 3684 | et131x_mii_write(adapter, PHY_MPHY_CONTROL_REG, | 3671 | et131x_mii_write(adapter, phydev->addr, |
| 3685 | register18); | 3672 | PHY_MPHY_CONTROL_REG, register18); |
| 3686 | } | 3673 | } |
| 3687 | 3674 | ||
| 3688 | /* Free the packets being actively sent & stopped */ | 3675 | /* Free the packets being actively sent & stopped */ |
| @@ -4644,10 +4631,6 @@ static int et131x_pci_setup(struct pci_dev *pdev, | |||
| 4644 | /* Copy address into the net_device struct */ | 4631 | /* Copy address into the net_device struct */ |
| 4645 | memcpy(netdev->dev_addr, adapter->addr, ETH_ALEN); | 4632 | memcpy(netdev->dev_addr, adapter->addr, ETH_ALEN); |
| 4646 | 4633 | ||
| 4647 | /* Init variable for counting how long we do not have link status */ | ||
| 4648 | adapter->boot_coma = 0; | ||
| 4649 | et1310_disable_phy_coma(adapter); | ||
| 4650 | |||
| 4651 | rc = -ENOMEM; | 4634 | rc = -ENOMEM; |
| 4652 | 4635 | ||
| 4653 | /* Setup the mii_bus struct */ | 4636 | /* Setup the mii_bus struct */ |
| @@ -4663,7 +4646,6 @@ static int et131x_pci_setup(struct pci_dev *pdev, | |||
| 4663 | adapter->mii_bus->priv = netdev; | 4646 | adapter->mii_bus->priv = netdev; |
| 4664 | adapter->mii_bus->read = et131x_mdio_read; | 4647 | adapter->mii_bus->read = et131x_mdio_read; |
| 4665 | adapter->mii_bus->write = et131x_mdio_write; | 4648 | adapter->mii_bus->write = et131x_mdio_write; |
| 4666 | adapter->mii_bus->reset = et131x_mdio_reset; | ||
| 4667 | adapter->mii_bus->irq = kmalloc_array(PHY_MAX_ADDR, sizeof(int), | 4649 | adapter->mii_bus->irq = kmalloc_array(PHY_MAX_ADDR, sizeof(int), |
| 4668 | GFP_KERNEL); | 4650 | GFP_KERNEL); |
| 4669 | if (!adapter->mii_bus->irq) | 4651 | if (!adapter->mii_bus->irq) |
| @@ -4687,6 +4669,10 @@ static int et131x_pci_setup(struct pci_dev *pdev, | |||
| 4687 | /* Setup et1310 as per the documentation */ | 4669 | /* Setup et1310 as per the documentation */ |
| 4688 | et131x_adapter_setup(adapter); | 4670 | et131x_adapter_setup(adapter); |
| 4689 | 4671 | ||
| 4672 | /* Init variable for counting how long we do not have link status */ | ||
| 4673 | adapter->boot_coma = 0; | ||
| 4674 | et1310_disable_phy_coma(adapter); | ||
| 4675 | |||
| 4690 | /* We can enable interrupts now | 4676 | /* We can enable interrupts now |
| 4691 | * | 4677 | * |
| 4692 | * NOTE - Because registration of interrupt handler is done in the | 4678 | * NOTE - Because registration of interrupt handler is done in the |
diff --git a/drivers/staging/lustre/lustre/libcfs/workitem.c b/drivers/staging/lustre/lustre/libcfs/workitem.c index 65629579bd7d..03ab9e046784 100644 --- a/drivers/staging/lustre/lustre/libcfs/workitem.c +++ b/drivers/staging/lustre/lustre/libcfs/workitem.c | |||
| @@ -365,6 +365,7 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab, | |||
| 365 | return -ENOMEM; | 365 | return -ENOMEM; |
| 366 | 366 | ||
| 367 | strncpy(sched->ws_name, name, CFS_WS_NAME_LEN); | 367 | strncpy(sched->ws_name, name, CFS_WS_NAME_LEN); |
| 368 | sched->ws_name[CFS_WS_NAME_LEN - 1] = '\0'; | ||
| 368 | sched->ws_cptab = cptab; | 369 | sched->ws_cptab = cptab; |
| 369 | sched->ws_cpt = cpt; | 370 | sched->ws_cpt = cpt; |
| 370 | 371 | ||
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c index 8b19f3caa68f..701c6a776524 100644 --- a/drivers/staging/lustre/lustre/obdclass/class_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | #define DEBUG_SUBSYSTEM S_CLASS | 37 | #define DEBUG_SUBSYSTEM S_CLASS |
| 38 | # include <asm/atomic.h> | 38 | # include <linux/atomic.h> |
| 39 | 39 | ||
| 40 | #include "../include/obd_support.h" | 40 | #include "../include/obd_support.h" |
| 41 | #include "../include/obd_class.h" | 41 | #include "../include/obd_class.h" |
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index b8676ac77b0c..407a318b09db 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c | |||
| @@ -43,9 +43,11 @@ static struct usb_device_id rtw_usb_id_tbl[] = { | |||
| 43 | {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)}, /* 8188ETV */ | 43 | {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)}, /* 8188ETV */ |
| 44 | /*=== Customer ID ===*/ | 44 | /*=== Customer ID ===*/ |
| 45 | /****** 8188EUS ********/ | 45 | /****** 8188EUS ********/ |
| 46 | {USB_DEVICE(0x056e, 0x4008)}, /* Elecom WDC-150SU2M */ | ||
| 46 | {USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */ | 47 | {USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */ |
| 47 | {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ | 48 | {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ |
| 48 | {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ | 49 | {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ |
| 50 | {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ | ||
| 49 | {} /* Terminating entry */ | 51 | {} /* Terminating entry */ |
| 50 | }; | 52 | }; |
| 51 | 53 | ||
