Skip to content

Commit e77c8e8

Browse files
committed
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2 parents 641cb85 + af98441 commit e77c8e8

37 files changed

+346
-184
lines changed

drivers/isdn/gigaset/dummyll.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,20 @@ void gigaset_isdn_stop(struct cardstate *cs)
5757
{
5858
}
5959

60-
int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
60+
int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
6161
{
62-
pr_info("no ISDN subsystem interface\n");
6362
return 1;
6463
}
6564

66-
void gigaset_isdn_unregister(struct cardstate *cs)
65+
void gigaset_isdn_unregdev(struct cardstate *cs)
66+
{
67+
}
68+
69+
void gigaset_isdn_regdrv(void)
70+
{
71+
pr_info("no ISDN subsystem interface\n");
72+
}
73+
74+
void gigaset_isdn_unregdrv(void)
6775
{
6876
}

drivers/net/arm/ks8695net.c

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -449,19 +449,17 @@ ks8695_rx_irq(int irq, void *dev_id)
449449
}
450450

451451
/**
452-
* ks8695_rx - Receive packets called by NAPI poll method
452+
* ks8695_rx - Receive packets called by NAPI poll method
453453
* @ksp: Private data for the KS8695 Ethernet
454-
* @budget: The max packets would be receive
454+
* @budget: Number of packets allowed to process
455455
*/
456-
457456
static int ks8695_rx(struct ks8695_priv *ksp, int budget)
458457
{
459458
struct net_device *ndev = ksp->ndev;
460459
struct sk_buff *skb;
461460
int buff_n;
462461
u32 flags;
463462
int pktlen;
464-
int last_rx_processed = -1;
465463
int received = 0;
466464

467465
buff_n = ksp->next_rx_desc_read;
@@ -471,6 +469,7 @@ static int ks8695_rx(struct ks8695_priv *ksp, int budget)
471469
cpu_to_le32(RDES_OWN)))) {
472470
rmb();
473471
flags = le32_to_cpu(ksp->rx_ring[buff_n].status);
472+
474473
/* Found an SKB which we own, this means we
475474
* received a packet
476475
*/
@@ -533,23 +532,18 @@ static int ks8695_rx(struct ks8695_priv *ksp, int budget)
533532
ksp->rx_ring[buff_n].status = cpu_to_le32(RDES_OWN);
534533
rx_finished:
535534
received++;
536-
/* And note this as processed so we can start
537-
* from here next time
538-
*/
539-
last_rx_processed = buff_n;
540535
buff_n = (buff_n + 1) & MAX_RX_DESC_MASK;
541-
/*And note which RX descriptor we last did */
542-
if (likely(last_rx_processed != -1))
543-
ksp->next_rx_desc_read =
544-
(last_rx_processed + 1) &
545-
MAX_RX_DESC_MASK;
546536
}
537+
538+
/* And note which RX descriptor we last did */
539+
ksp->next_rx_desc_read = buff_n;
540+
547541
/* And refill the buffers */
548542
ks8695_refill_rxbuffers(ksp);
549543

550-
/* Kick the RX DMA engine, in case it became
551-
* suspended */
544+
/* Kick the RX DMA engine, in case it became suspended */
552545
ks8695_writereg(ksp, KS8695_DRSC, 0);
546+
553547
return received;
554548
}
555549

drivers/net/igb/e1000_82575.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
9494
case E1000_DEV_ID_82576_FIBER:
9595
case E1000_DEV_ID_82576_SERDES:
9696
case E1000_DEV_ID_82576_QUAD_COPPER:
97+
case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
9798
case E1000_DEV_ID_82576_SERDES_QUAD:
9899
mac->type = e1000_82576;
99100
break;

drivers/net/igb/e1000_hw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct e1000_hw;
4141
#define E1000_DEV_ID_82576_FIBER 0x10E6
4242
#define E1000_DEV_ID_82576_SERDES 0x10E7
4343
#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8
44+
#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526
4445
#define E1000_DEV_ID_82576_NS 0x150A
4546
#define E1000_DEV_ID_82576_NS_SERDES 0x1518
4647
#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D

drivers/net/igb/igb_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
7272
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER), board_82575 },
7373
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES), board_82575 },
7474
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES_QUAD), board_82575 },
75+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2), board_82575 },
7576
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER), board_82575 },
7677
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), board_82575 },
7778
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), board_82575 },

drivers/net/ixgbe/ixgbe_82599.c

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#define IXGBE_82599_MC_TBL_SIZE 128
4040
#define IXGBE_82599_VFT_TBL_SIZE 128
4141

42+
void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw);
4243
s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
4344
ixgbe_link_speed speed,
4445
bool autoneg,
@@ -68,7 +69,9 @@ static void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
6869
if (hw->phy.multispeed_fiber) {
6970
/* Set up dual speed SFP+ support */
7071
mac->ops.setup_link = &ixgbe_setup_mac_link_multispeed_fiber;
72+
mac->ops.flap_tx_laser = &ixgbe_flap_tx_laser_multispeed_fiber;
7173
} else {
74+
mac->ops.flap_tx_laser = NULL;
7275
if ((mac->ops.get_media_type(hw) ==
7376
ixgbe_media_type_backplane) &&
7477
(hw->phy.smart_speed == ixgbe_smart_speed_auto ||
@@ -412,6 +415,41 @@ s32 ixgbe_start_mac_link_82599(struct ixgbe_hw *hw,
412415
return status;
413416
}
414417

418+
/**
419+
* ixgbe_flap_tx_laser_multispeed_fiber - Flap Tx laser
420+
* @hw: pointer to hardware structure
421+
*
422+
* When the driver changes the link speeds that it can support,
423+
* it sets autotry_restart to true to indicate that we need to
424+
* initiate a new autotry session with the link partner. To do
425+
* so, we set the speed then disable and re-enable the tx laser, to
426+
* alert the link partner that it also needs to restart autotry on its
427+
* end. This is consistent with true clause 37 autoneg, which also
428+
* involves a loss of signal.
429+
**/
430+
void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw)
431+
{
432+
u32 esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
433+
434+
hw_dbg(hw, "ixgbe_flap_tx_laser_multispeed_fiber\n");
435+
436+
if (hw->mac.autotry_restart) {
437+
/* Disable tx laser; allow 100us to go dark per spec */
438+
esdp_reg |= IXGBE_ESDP_SDP3;
439+
IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
440+
IXGBE_WRITE_FLUSH(hw);
441+
udelay(100);
442+
443+
/* Enable tx laser; allow 100ms to light up */
444+
esdp_reg &= ~IXGBE_ESDP_SDP3;
445+
IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
446+
IXGBE_WRITE_FLUSH(hw);
447+
msleep(100);
448+
449+
hw->mac.autotry_restart = false;
450+
}
451+
}
452+
415453
/**
416454
* ixgbe_setup_mac_link_multispeed_fiber - Set MAC link speed
417455
* @hw: pointer to hardware structure
@@ -439,16 +477,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
439477
hw->mac.ops.get_link_capabilities(hw, &phy_link_speed, &negotiation);
440478
speed &= phy_link_speed;
441479

442-
/*
443-
* When the driver changes the link speeds that it can support,
444-
* it sets autotry_restart to true to indicate that we need to
445-
* initiate a new autotry session with the link partner. To do
446-
* so, we set the speed then disable and re-enable the tx laser, to
447-
* alert the link partner that it also needs to restart autotry on its
448-
* end. This is consistent with true clause 37 autoneg, which also
449-
* involves a loss of signal.
450-
*/
451-
452480
/*
453481
* Try each speed one by one, highest priority first. We do this in
454482
* software because 10gb fiber doesn't support speed autonegotiation.
@@ -466,6 +494,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
466494
/* Set the module link speed */
467495
esdp_reg |= (IXGBE_ESDP_SDP5_DIR | IXGBE_ESDP_SDP5);
468496
IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
497+
IXGBE_WRITE_FLUSH(hw);
469498

470499
/* Allow module to change analog characteristics (1G->10G) */
471500
msleep(40);
@@ -478,19 +507,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
478507
return status;
479508

480509
/* Flap the tx laser if it has not already been done */
481-
if (hw->mac.autotry_restart) {
482-
/* Disable tx laser; allow 100us to go dark per spec */
483-
esdp_reg |= IXGBE_ESDP_SDP3;
484-
IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
485-
udelay(100);
486-
487-
/* Enable tx laser; allow 2ms to light up per spec */
488-
esdp_reg &= ~IXGBE_ESDP_SDP3;
489-
IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
490-
msleep(2);
491-
492-
hw->mac.autotry_restart = false;
493-
}
510+
hw->mac.ops.flap_tx_laser(hw);
494511

495512
/*
496513
* Wait for the controller to acquire link. Per IEEE 802.3ap,
@@ -525,6 +542,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
525542
esdp_reg &= ~IXGBE_ESDP_SDP5;
526543
esdp_reg |= IXGBE_ESDP_SDP5_DIR;
527544
IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
545+
IXGBE_WRITE_FLUSH(hw);
528546

529547
/* Allow module to change analog characteristics (10G->1G) */
530548
msleep(40);
@@ -537,19 +555,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
537555
return status;
538556

539557
/* Flap the tx laser if it has not already been done */
540-
if (hw->mac.autotry_restart) {
541-
/* Disable tx laser; allow 100us to go dark per spec */
542-
esdp_reg |= IXGBE_ESDP_SDP3;
543-
IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
544-
udelay(100);
545-
546-
/* Enable tx laser; allow 2ms to light up per spec */
547-
esdp_reg &= ~IXGBE_ESDP_SDP3;
548-
IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
549-
msleep(2);
550-
551-
hw->mac.autotry_restart = false;
552-
}
558+
hw->mac.ops.flap_tx_laser(hw);
553559

554560
/* Wait for the link partner to also set speed */
555561
msleep(100);

drivers/net/ixgbe/ixgbe_fcoe.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,9 @@ int ixgbe_fcoe_enable(struct net_device *netdev)
614614
netdev->vlan_features |= NETIF_F_FSO;
615615
netdev->vlan_features |= NETIF_F_FCOE_MTU;
616616
netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1;
617-
netdev_features_change(netdev);
618617

619618
ixgbe_init_interrupt_scheme(adapter);
619+
netdev_features_change(netdev);
620620

621621
if (netif_running(netdev))
622622
netdev->netdev_ops->ndo_open(netdev);
@@ -660,11 +660,11 @@ int ixgbe_fcoe_disable(struct net_device *netdev)
660660
netdev->vlan_features &= ~NETIF_F_FSO;
661661
netdev->vlan_features &= ~NETIF_F_FCOE_MTU;
662662
netdev->fcoe_ddp_xid = 0;
663-
netdev_features_change(netdev);
664663

665664
ixgbe_cleanup_fcoe(adapter);
666-
667665
ixgbe_init_interrupt_scheme(adapter);
666+
netdev_features_change(netdev);
667+
668668
if (netif_running(netdev))
669669
netdev->netdev_ops->ndo_open(netdev);
670670
rc = 0;

drivers/net/ixgbe/ixgbe_main.c

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -935,10 +935,12 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
935935
if (skb->prev)
936936
skb = ixgbe_transform_rsc_queue(skb, &(rx_ring->rsc_count));
937937
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
938-
if (IXGBE_RSC_CB(skb)->dma)
938+
if (IXGBE_RSC_CB(skb)->dma) {
939939
pci_unmap_single(pdev, IXGBE_RSC_CB(skb)->dma,
940940
rx_ring->rx_buf_len,
941941
PCI_DMA_FROMDEVICE);
942+
IXGBE_RSC_CB(skb)->dma = 0;
943+
}
942944
if (rx_ring->flags & IXGBE_RING_RX_PS_ENABLED)
943945
rx_ring->rsc_count += skb_shinfo(skb)->nr_frags;
944946
else
@@ -3126,10 +3128,12 @@ static void ixgbe_clean_rx_ring(struct ixgbe_adapter *adapter,
31263128
rx_buffer_info->skb = NULL;
31273129
do {
31283130
struct sk_buff *this = skb;
3129-
if (IXGBE_RSC_CB(this)->dma)
3131+
if (IXGBE_RSC_CB(this)->dma) {
31303132
pci_unmap_single(pdev, IXGBE_RSC_CB(this)->dma,
31313133
rx_ring->rx_buf_len,
31323134
PCI_DMA_FROMDEVICE);
3135+
IXGBE_RSC_CB(this)->dma = 0;
3136+
}
31333137
skb = skb->prev;
31343138
dev_kfree_skb(this);
31353139
} while (skb);
@@ -5018,6 +5022,7 @@ static void ixgbe_multispeed_fiber_task(struct work_struct *work)
50185022
autoneg = hw->phy.autoneg_advertised;
50195023
if ((!autoneg) && (hw->mac.ops.get_link_capabilities))
50205024
hw->mac.ops.get_link_capabilities(hw, &autoneg, &negotiation);
5025+
hw->mac.autotry_restart = false;
50215026
if (hw->mac.ops.setup_link)
50225027
hw->mac.ops.setup_link(hw, autoneg, negotiation, true);
50235028
adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;
@@ -6245,9 +6250,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
62456250
case IXGBE_DEV_ID_82599_KX4:
62466251
adapter->wol = (IXGBE_WUFC_MAG | IXGBE_WUFC_EX |
62476252
IXGBE_WUFC_MC | IXGBE_WUFC_BC);
6248-
/* Enable ACPI wakeup in GRC */
6249-
IXGBE_WRITE_REG(hw, IXGBE_GRC,
6250-
(IXGBE_READ_REG(hw, IXGBE_GRC) & ~IXGBE_GRC_APME));
62516253
break;
62526254
default:
62536255
adapter->wol = 0;
@@ -6380,6 +6382,16 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev)
63806382
del_timer_sync(&adapter->sfp_timer);
63816383
cancel_work_sync(&adapter->watchdog_task);
63826384
cancel_work_sync(&adapter->sfp_task);
6385+
if (adapter->hw.phy.multispeed_fiber) {
6386+
struct ixgbe_hw *hw = &adapter->hw;
6387+
/*
6388+
* Restart clause 37 autoneg, disable and re-enable
6389+
* the tx laser, to clear & alert the link partner
6390+
* that it needs to restart autotry
6391+
*/
6392+
hw->mac.autotry_restart = true;
6393+
hw->mac.ops.flap_tx_laser(hw);
6394+
}
63836395
cancel_work_sync(&adapter->multispeed_fiber_task);
63846396
cancel_work_sync(&adapter->sfp_config_module_task);
63856397
if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE ||

drivers/net/ixgbe/ixgbe_type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,7 @@ struct ixgbe_mac_operations {
23972397
s32 (*enable_rx_dma)(struct ixgbe_hw *, u32);
23982398

23992399
/* Link */
2400+
void (*flap_tx_laser)(struct ixgbe_hw *);
24002401
s32 (*setup_link)(struct ixgbe_hw *, ixgbe_link_speed, bool, bool);
24012402
s32 (*check_link)(struct ixgbe_hw *, ixgbe_link_speed *, bool *, bool);
24022403
s32 (*get_link_capabilities)(struct ixgbe_hw *, ixgbe_link_speed *,

0 commit comments

Comments
 (0)