Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
  tg3: Fix single-vector MSI-X code
  openvswitch: Fix multipart datapath dumps.
  ipv6: fix per device IP snmp counters
  inetpeer: initialize ->redirect_genid in inet_getpeer()
  net: fix NULL-deref in WARN() in skb_gso_segment()
  net: WARN if skb_checksum_help() is called on skb requiring segmentation
  caif: Remove bad WARN_ON in caif_dev
  caif: Fix typo in Vendor/Product-ID for CAIF modems
  bnx2x: Disable AN KR work-around for BCM57810
  bnx2x: Remove AutoGrEEEn for BCM84833
  bnx2x: Remove 100Mb force speed for BCM84833
  bnx2x: Fix PFC setting on BCM57840
  bnx2x: Fix Super-Isolate mode for BCM84833
  net: fix some sparse errors
  net: kill duplicate included header
  net: sh-eth: Fix build error by the value which is not defined
  net: Use device model to get driver name in skb_gso_segment()
  bridge: BH already disabled in br_fdb_cleanup()
  net: move sock_update_memcg outside of CONFIG_INET
  mwl8k: Fixing Sparse ENDIAN CHECK warning
  ...
  • Loading branch information
torvalds committed Jan 18, 2012
2 parents 6a48897 + c3b5003 commit ccb19d2
Show file tree
Hide file tree
Showing 58 changed files with 429 additions and 380 deletions.
3 changes: 3 additions & 0 deletions Documentation/devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ Your cooperation is appreciated.
234 = /dev/btrfs-control Btrfs control device
235 = /dev/autofs Autofs control device
236 = /dev/mapper/control Device-Mapper control device
237 = /dev/loop-control Loopback control device
238 = /dev/vhost-net Host kernel accelerator for virtio net

240-254 Reserved for local use
255 Reserved for MISC_DYNAMIC_MINOR

Expand Down
15 changes: 8 additions & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,7 @@ F: net/ax25/
B43 WIRELESS DRIVER
M: Stefano Brivio <[email protected]>
L: [email protected]
L: [email protected] (moderated for non-subscribers)
W: http://linuxwireless.org/en/users/Drivers/b43
S: Maintained
F: drivers/net/wireless/b43/
Expand Down Expand Up @@ -1588,6 +1589,13 @@ L: [email protected]
S: Supported
F: drivers/scsi/bnx2fc/

BROADCOM SPECIFIC AMBA DRIVER (BCMA)
M: Rafał Miłecki <[email protected]>
L: [email protected]
S: Maintained
F: drivers/bcma/
F: include/linux/bcma/

BROCADE BFA FC SCSI DRIVER
M: Jing Huang <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -6117,13 +6125,6 @@ S: Maintained
F: drivers/ssb/
F: include/linux/ssb/

BROADCOM SPECIFIC AMBA DRIVER (BCMA)
M: Rafał Miłecki <[email protected]>
L: [email protected]
S: Maintained
F: drivers/bcma/
F: include/linux/bcma/

SONY VAIO CONTROL DEVICE DRIVER
M: Mattia Dongili <[email protected]>
L: [email protected]
Expand Down
1 change: 1 addition & 0 deletions drivers/bcma/bcma_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
struct bcma_device *core_cc,
struct bcma_device *core_mips);
#ifdef CONFIG_PM
int bcma_bus_suspend(struct bcma_bus *bus);
int bcma_bus_resume(struct bcma_bus *bus);
#endif

Expand Down
43 changes: 18 additions & 25 deletions drivers/bcma/host_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,38 +235,32 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
}

#ifdef CONFIG_PM
static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
static int bcma_host_pci_suspend(struct device *dev)
{
/* Host specific */
pci_save_state(dev);
pci_disable_device(dev);
pci_set_power_state(dev, pci_choose_state(dev, state));
struct pci_dev *pdev = to_pci_dev(dev);
struct bcma_bus *bus = pci_get_drvdata(pdev);

return 0;
bus->mapped_core = NULL;

return bcma_bus_suspend(bus);
}

static int bcma_host_pci_resume(struct pci_dev *dev)
static int bcma_host_pci_resume(struct device *dev)
{
struct bcma_bus *bus = pci_get_drvdata(dev);
int err;
struct pci_dev *pdev = to_pci_dev(dev);
struct bcma_bus *bus = pci_get_drvdata(pdev);

/* Host specific */
pci_set_power_state(dev, 0);
err = pci_enable_device(dev);
if (err)
return err;
pci_restore_state(dev);
return bcma_bus_resume(bus);
}

/* Bus specific */
err = bcma_bus_resume(bus);
if (err)
return err;
static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend,
bcma_host_pci_resume);
#define BCMA_PM_OPS (&bcma_pm_ops)

return 0;
}
#else /* CONFIG_PM */
# define bcma_host_pci_suspend NULL
# define bcma_host_pci_resume NULL

#define BCMA_PM_OPS NULL

#endif /* CONFIG_PM */

static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
Expand All @@ -284,8 +278,7 @@ static struct pci_driver bcma_pci_bridge_driver = {
.id_table = bcma_pci_bridge_tbl,
.probe = bcma_host_pci_probe,
.remove = bcma_host_pci_remove,
.suspend = bcma_host_pci_suspend,
.resume = bcma_host_pci_resume,
.driver.pm = BCMA_PM_OPS,
};

int __init bcma_host_pci_init(void)
Expand Down
24 changes: 24 additions & 0 deletions drivers/bcma/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,21 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
}

#ifdef CONFIG_PM
int bcma_bus_suspend(struct bcma_bus *bus)
{
struct bcma_device *core;

list_for_each_entry(core, &bus->cores, list) {
struct device_driver *drv = core->dev.driver;
if (drv) {
struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
if (adrv->suspend)
adrv->suspend(core);
}
}
return 0;
}

int bcma_bus_resume(struct bcma_bus *bus)
{
struct bcma_device *core;
Expand All @@ -252,6 +267,15 @@ int bcma_bus_resume(struct bcma_bus *bus)
bcma_core_chipcommon_init(&bus->drv_cc);
}

list_for_each_entry(core, &bus->cores, list) {
struct device_driver *drv = core->dev.driver;
if (drv) {
struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
if (adrv->resume)
adrv->resume(core);
}
}

return 0;
}
#endif
Expand Down
7 changes: 6 additions & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,18 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
DP(NETIF_MSG_LINK, "cfg_idx = %x\n", cfg_idx);

if (cmd->autoneg == AUTONEG_ENABLE) {
u32 an_supported_speed = bp->port.supported[cfg_idx];
if (bp->link_params.phy[EXT_PHY1].type ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833)
an_supported_speed |= (SUPPORTED_100baseT_Half |
SUPPORTED_100baseT_Full);
if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) {
DP(NETIF_MSG_LINK, "Autoneg not supported\n");
return -EINVAL;
}

/* advertise the requested speed and duplex if supported */
if (cmd->advertising & ~(bp->port.supported[cfg_idx])) {
if (cmd->advertising & ~an_supported_speed) {
DP(NETIF_MSG_LINK, "Advertisement parameters "
"are not supported\n");
return -EINVAL;
Expand Down
Loading

0 comments on commit ccb19d2

Please sign in to comment.