Skip to content

Commit ccb19d2

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* 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 ...
2 parents 6a48897 + c3b5003 commit ccb19d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+429
-380
lines changed

Documentation/devices.txt

+3
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ Your cooperation is appreciated.
447447
234 = /dev/btrfs-control Btrfs control device
448448
235 = /dev/autofs Autofs control device
449449
236 = /dev/mapper/control Device-Mapper control device
450+
237 = /dev/loop-control Loopback control device
451+
238 = /dev/vhost-net Host kernel accelerator for virtio net
452+
450453
240-254 Reserved for local use
451454
255 Reserved for MISC_DYNAMIC_MINOR
452455

MAINTAINERS

+8-7
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,7 @@ F: net/ax25/
14121412
B43 WIRELESS DRIVER
14131413
M: Stefano Brivio <[email protected]>
14141414
1415+
L: [email protected] (moderated for non-subscribers)
14151416
W: http://linuxwireless.org/en/users/Drivers/b43
14161417
S: Maintained
14171418
F: drivers/net/wireless/b43/
@@ -1588,6 +1589,13 @@ L: [email protected]
15881589
S: Supported
15891590
F: drivers/scsi/bnx2fc/
15901591

1592+
BROADCOM SPECIFIC AMBA DRIVER (BCMA)
1593+
M: Rafał Miłecki <[email protected]>
1594+
1595+
S: Maintained
1596+
F: drivers/bcma/
1597+
F: include/linux/bcma/
1598+
15911599
BROCADE BFA FC SCSI DRIVER
15921600
M: Jing Huang <[email protected]>
15931601
@@ -6117,13 +6125,6 @@ S: Maintained
61176125
F: drivers/ssb/
61186126
F: include/linux/ssb/
61196127

6120-
BROADCOM SPECIFIC AMBA DRIVER (BCMA)
6121-
M: Rafał Miłecki <[email protected]>
6122-
6123-
S: Maintained
6124-
F: drivers/bcma/
6125-
F: include/linux/bcma/
6126-
61276128
SONY VAIO CONTROL DEVICE DRIVER
61286129
M: Mattia Dongili <[email protected]>
61296130

drivers/bcma/bcma_private.h

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
1919
struct bcma_device *core_cc,
2020
struct bcma_device *core_mips);
2121
#ifdef CONFIG_PM
22+
int bcma_bus_suspend(struct bcma_bus *bus);
2223
int bcma_bus_resume(struct bcma_bus *bus);
2324
#endif
2425

drivers/bcma/host_pci.c

+18-25
Original file line numberDiff line numberDiff line change
@@ -235,38 +235,32 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
235235
}
236236

237237
#ifdef CONFIG_PM
238-
static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
238+
static int bcma_host_pci_suspend(struct device *dev)
239239
{
240-
/* Host specific */
241-
pci_save_state(dev);
242-
pci_disable_device(dev);
243-
pci_set_power_state(dev, pci_choose_state(dev, state));
240+
struct pci_dev *pdev = to_pci_dev(dev);
241+
struct bcma_bus *bus = pci_get_drvdata(pdev);
244242

245-
return 0;
243+
bus->mapped_core = NULL;
244+
245+
return bcma_bus_suspend(bus);
246246
}
247247

248-
static int bcma_host_pci_resume(struct pci_dev *dev)
248+
static int bcma_host_pci_resume(struct device *dev)
249249
{
250-
struct bcma_bus *bus = pci_get_drvdata(dev);
251-
int err;
250+
struct pci_dev *pdev = to_pci_dev(dev);
251+
struct bcma_bus *bus = pci_get_drvdata(pdev);
252252

253-
/* Host specific */
254-
pci_set_power_state(dev, 0);
255-
err = pci_enable_device(dev);
256-
if (err)
257-
return err;
258-
pci_restore_state(dev);
253+
return bcma_bus_resume(bus);
254+
}
259255

260-
/* Bus specific */
261-
err = bcma_bus_resume(bus);
262-
if (err)
263-
return err;
256+
static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend,
257+
bcma_host_pci_resume);
258+
#define BCMA_PM_OPS (&bcma_pm_ops)
264259

265-
return 0;
266-
}
267260
#else /* CONFIG_PM */
268-
# define bcma_host_pci_suspend NULL
269-
# define bcma_host_pci_resume NULL
261+
262+
#define BCMA_PM_OPS NULL
263+
270264
#endif /* CONFIG_PM */
271265

272266
static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
@@ -284,8 +278,7 @@ static struct pci_driver bcma_pci_bridge_driver = {
284278
.id_table = bcma_pci_bridge_tbl,
285279
.probe = bcma_host_pci_probe,
286280
.remove = bcma_host_pci_remove,
287-
.suspend = bcma_host_pci_suspend,
288-
.resume = bcma_host_pci_resume,
281+
.driver.pm = BCMA_PM_OPS,
289282
};
290283

291284
int __init bcma_host_pci_init(void)

drivers/bcma/main.c

+24
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,21 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
241241
}
242242

243243
#ifdef CONFIG_PM
244+
int bcma_bus_suspend(struct bcma_bus *bus)
245+
{
246+
struct bcma_device *core;
247+
248+
list_for_each_entry(core, &bus->cores, list) {
249+
struct device_driver *drv = core->dev.driver;
250+
if (drv) {
251+
struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
252+
if (adrv->suspend)
253+
adrv->suspend(core);
254+
}
255+
}
256+
return 0;
257+
}
258+
244259
int bcma_bus_resume(struct bcma_bus *bus)
245260
{
246261
struct bcma_device *core;
@@ -252,6 +267,15 @@ int bcma_bus_resume(struct bcma_bus *bus)
252267
bcma_core_chipcommon_init(&bus->drv_cc);
253268
}
254269

270+
list_for_each_entry(core, &bus->cores, list) {
271+
struct device_driver *drv = core->dev.driver;
272+
if (drv) {
273+
struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
274+
if (adrv->resume)
275+
adrv->resume(core);
276+
}
277+
}
278+
255279
return 0;
256280
}
257281
#endif

drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,18 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
365365
DP(NETIF_MSG_LINK, "cfg_idx = %x\n", cfg_idx);
366366

367367
if (cmd->autoneg == AUTONEG_ENABLE) {
368+
u32 an_supported_speed = bp->port.supported[cfg_idx];
369+
if (bp->link_params.phy[EXT_PHY1].type ==
370+
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833)
371+
an_supported_speed |= (SUPPORTED_100baseT_Half |
372+
SUPPORTED_100baseT_Full);
368373
if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) {
369374
DP(NETIF_MSG_LINK, "Autoneg not supported\n");
370375
return -EINVAL;
371376
}
372377

373378
/* advertise the requested speed and duplex if supported */
374-
if (cmd->advertising & ~(bp->port.supported[cfg_idx])) {
379+
if (cmd->advertising & ~an_supported_speed) {
375380
DP(NETIF_MSG_LINK, "Advertisement parameters "
376381
"are not supported\n");
377382
return -EINVAL;

0 commit comments

Comments
 (0)