Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

linux-next: manual merge of the net tree with the net-current tree

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


sfr at canb

Aug 13, 2009, 7:40 PM

Post #1 of 7 (212 views)
Permalink
linux-next: manual merge of the net tree with the net-current tree

Hi David,

Today's linux-next merge of the net tree got a conflict in
drivers/net/netxen/netxen_nic_main.c between commits
e424fa9d6a0add1a9b812b07e3607daaa5b9e53d ("netxen: remove netxen
workqueue") and 232e7d68d50c9ac3a55d716e5ae215ecd1e043b9 ("netxen: free
napi resources during detach") from the net-current tree and commits
6598b169b856793f8f9b80a3f3c5a48f5eaf40e3 ("netxen: enable ip addr
hashing"), f17443f4b01659a5c44d5fc6f5c502c39c293959 ("netxen: refactor
net_device setup code") and 7042cd8f148345bfca6c336f009c96a416674f5e
("netxen: support for ethtool set ringparam") from the net tree.

I fixed it up (I hope) (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr [at] canb

diff --cc drivers/net/netxen/netxen_nic_main.c
index 28f270f,98271f9..0000000
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@@ -905,19 -923,15 +935,17 @@@ netxen_nic_attach(struct netxen_adapte
struct nx_host_rds_ring *rds_ring;
struct nx_host_tx_ring *tx_ring;

+ if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC)
+ return 0;
+
err = netxen_init_firmware(adapter);
- if (err != 0) {
- printk(KERN_ERR "Failed to init firmware\n");
- return -EIO;
- }
+ if (err)
+ return err;
+
+ err = netxen_napi_add(adapter, netdev);
+ if (err)
+ return err;

- if (adapter->fw_major < 4)
- adapter->max_rds_rings = 3;
- else
- adapter->max_rds_rings = 2;
-
err = netxen_alloc_sw_resources(adapter);
if (err) {
printk(KERN_ERR "%s: Error in setting sw resources\n",
@@@ -981,6 -1000,95 +1015,91 @@@ netxen_nic_detach(struct netxen_adapte
adapter->is_up = 0;
}

+ int
+ netxen_nic_reset_context(struct netxen_adapter *adapter)
+ {
+ int err = 0;
+ struct net_device *netdev = adapter->netdev;
+
+ if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
+
+ if (netif_running(netdev))
+ netxen_nic_down(adapter, netdev);
+
+ netxen_nic_detach(adapter);
+
+ err = netxen_nic_attach(adapter);
+ if (err)
+ goto done;
+
+ if (netif_running(netdev))
+ err = netxen_nic_up(adapter, netdev);
+ }
+ done:
+ return err;
+ }
+
+ static int
+ netxen_setup_netdev(struct netxen_adapter *adapter,
+ struct net_device *netdev)
+ {
+ int err = 0;
+ struct pci_dev *pdev = adapter->pdev;
+
+ adapter->rx_csum = 1;
+ adapter->mc_enabled = 0;
+ if (NX_IS_REVISION_P3(adapter->ahw.revision_id))
+ adapter->max_mc_count = 38;
+ else
+ adapter->max_mc_count = 16;
+
+ netdev->netdev_ops = &netxen_netdev_ops;
+ netdev->watchdog_timeo = 2*HZ;
+
+ netxen_nic_change_mtu(netdev, netdev->mtu);
+
+ SET_ETHTOOL_OPS(netdev, &netxen_nic_ethtool_ops);
+
+ netdev->features |= (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO);
+ netdev->features |= (NETIF_F_GRO);
+ netdev->vlan_features |= (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO);
+
+ if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) {
+ netdev->features |= (NETIF_F_IPV6_CSUM | NETIF_F_TSO6);
+ netdev->vlan_features |= (NETIF_F_IPV6_CSUM | NETIF_F_TSO6);
+ }
+
+ if (adapter->pci_using_dac) {
+ netdev->features |= NETIF_F_HIGHDMA;
+ netdev->vlan_features |= NETIF_F_HIGHDMA;
+ }
+
+ if (adapter->capabilities & NX_FW_CAPABILITY_FVLANTX)
+ netdev->features |= (NETIF_F_HW_VLAN_TX);
+
+ netdev->irq = adapter->msix_entries[0].vector;
+
- err = netxen_napi_add(adapter, netdev);
- if (err)
- return err;
-
+ init_timer(&adapter->watchdog_timer);
+ adapter->watchdog_timer.function = &netxen_watchdog;
+ adapter->watchdog_timer.data = (unsigned long)adapter;
+ INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task);
+ INIT_WORK(&adapter->tx_timeout_task, netxen_reset_task);
+
+ if (netxen_read_mac_addr(adapter))
+ dev_warn(&pdev->dev, "failed to read mac addr\n");
+
+ netif_carrier_off(netdev);
+ netif_stop_queue(netdev);
+
+ err = register_netdev(netdev);
+ if (err) {
+ dev_err(&pdev->dev, "failed to register net device\n");
+ return err;
+ }
+
+ return 0;
+ }
+
static int __devinit
netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
@@@ -1189,17 -1245,13 +1256,15 @@@ static void __devexit netxen_nic_remove

unregister_netdev(netdev);

+ cancel_work_sync(&adapter->watchdog_task);
+ cancel_work_sync(&adapter->tx_timeout_task);
+
- if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
- netxen_nic_detach(adapter);
- }
+ netxen_nic_detach(adapter);

if (adapter->portnum == 0)
- netxen_free_adapter_offload(adapter);
+ netxen_free_dummy_dma(adapter);

netxen_teardown_intr(adapter);
- netxen_free_sds_rings(&adapter->recv_ctx);

netxen_cleanup_pci_map(adapter);

@@@ -1225,11 -1277,7 +1290,10 @@@ netxen_nic_suspend(struct pci_dev *pdev
if (netif_running(netdev))
netxen_nic_down(adapter, netdev);

+ cancel_work_sync(&adapter->watchdog_task);
+ cancel_work_sync(&adapter->tx_timeout_task);
+
- if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC)
- netxen_nic_detach(adapter);
+ netxen_nic_detach(adapter);

pci_save_state(pdev);

@@@ -1686,11 -1746,15 +1779,14 @@@ void netxen_watchdog_task(struct work_s

static void netxen_tx_timeout(struct net_device *netdev)
{
- struct netxen_adapter *adapter = (struct netxen_adapter *)
- netdev_priv(netdev);
+ struct netxen_adapter *adapter = netdev_priv(netdev);
+
+ dev_err(&netdev->dev, "transmit timeout, resetting.\n");
+
- SCHEDULE_WORK(&adapter->tx_timeout_task);
+ schedule_work(&adapter->tx_timeout_task);
}

- static void netxen_tx_timeout_task(struct work_struct *work)
+ static void netxen_reset_task(struct work_struct *work)
{
struct netxen_adapter *adapter =
container_of(work, struct netxen_adapter, tx_timeout_task);
@@@ -1844,6 -2025,14 +2057,11 @@@ static int __init netxen_init_module(vo
{
printk(KERN_INFO "%s\n", netxen_nic_driver_string);

- if ((netxen_workq = create_singlethread_workqueue("netxen")) == NULL)
- return -ENOMEM;
-
+ #ifdef CONFIG_INET
+ register_netdevice_notifier(&netxen_netdev_cb);
+ register_inetaddr_notifier(&netxen_inetaddr_cb);
+ #endif
+
return pci_register_driver(&netxen_driver);
}

@@@ -1852,6 -2041,12 +2070,11 @@@ module_init(netxen_init_module)
static void __exit netxen_exit_module(void)
{
pci_unregister_driver(&netxen_driver);
+
+ #ifdef CONFIG_INET
+ unregister_inetaddr_notifier(&netxen_inetaddr_cb);
+ unregister_netdevice_notifier(&netxen_netdev_cb);
+ #endif
- destroy_workqueue(netxen_workq);
}

module_exit(netxen_exit_module);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


davem at davemloft

Aug 13, 2009, 7:50 PM

Post #2 of 7 (204 views)
Permalink
Re: linux-next: manual merge of the net tree with the net-current tree [In reply to]

From: Stephen Rothwell <sfr [at] canb>
Date: Fri, 14 Aug 2009 12:40:40 +1000

> Hi David,
>
> Today's linux-next merge of the net tree got a conflict in
> drivers/net/netxen/netxen_nic_main.c between commits
> e424fa9d6a0add1a9b812b07e3607daaa5b9e53d ("netxen: remove netxen
> workqueue") and 232e7d68d50c9ac3a55d716e5ae215ecd1e043b9 ("netxen: free
> napi resources during detach") from the net-current tree and commits
> 6598b169b856793f8f9b80a3f3c5a48f5eaf40e3 ("netxen: enable ip addr
> hashing"), f17443f4b01659a5c44d5fc6f5c502c39c293959 ("netxen: refactor
> net_device setup code") and 7042cd8f148345bfca6c336f009c96a416674f5e
> ("netxen: support for ethtool set ringparam") from the net tree.
>
> I fixed it up (I hope) (see below) and can carry the fix as necessary.

Thanks for the note Stephen.

I'll do a merge of net-2.6 into net-next-2.6 to resolve this
and get it out of your hair.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


sfr at canb

Aug 13, 2009, 9:19 PM

Post #3 of 7 (202 views)
Permalink
Re: linux-next: manual merge of the net tree with the net-current tree [In reply to]

Hi Dave,

On Thu, 13 Aug 2009 19:50:42 -0700 (PDT) David Miller <davem [at] davemloft> wrote:
>
> I'll do a merge of net-2.6 into net-next-2.6 to resolve this
> and get it out of your hair.

Thanks.

--
Cheers,
Stephen Rothwell sfr [at] canb
http://www.canb.auug.org.au/~sfr/


dhananjay.phadke at qlogic

Aug 13, 2009, 10:27 PM

Post #4 of 7 (196 views)
Permalink
RE: linux-next: manual merge of the net tree with the net-current tree [In reply to]

Well yeah, I had already confessed in the introductory mail.

http://article.gmane.org/gmane.linux.network/135134

I have verified my own cherry-picked version of net-next driver,
will do that again once Dave fixes the tree.

Thanks,
Dhananjay

> -----Original Message-----
> From: David Miller [mailto:davem [at] davemloft]
> Sent: Thursday, August 13, 2009 19:51
> To: sfr [at] canb
> Cc: linux-next [at] vger; linux-kernel [at] vger;
> Dhananjay Phadke; Amit Salecha
> Subject: Re: linux-next: manual merge of the net tree with
> the net-current tree
>
> From: Stephen Rothwell <sfr [at] canb>
> Date: Fri, 14 Aug 2009 12:40:40 +1000
>
> > Hi David,
> >
> > Today's linux-next merge of the net tree got a conflict in
> > drivers/net/netxen/netxen_nic_main.c between commits
> > e424fa9d6a0add1a9b812b07e3607daaa5b9e53d ("netxen: remove netxen
> > workqueue") and 232e7d68d50c9ac3a55d716e5ae215ecd1e043b9
> ("netxen: free
> > napi resources during detach") from the net-current tree and commits
> > 6598b169b856793f8f9b80a3f3c5a48f5eaf40e3 ("netxen: enable ip addr
> > hashing"), f17443f4b01659a5c44d5fc6f5c502c39c293959
> ("netxen: refactor
> > net_device setup code") and 7042cd8f148345bfca6c336f009c96a416674f5e
> > ("netxen: support for ethtool set ringparam") from the net tree.
> >
> > I fixed it up (I hope) (see below) and can carry the fix as
> necessary.
>
> Thanks for the note Stephen.
>
> I'll do a merge of net-2.6 into net-next-2.6 to resolve this
> and get it out of your hair.
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.392 / Virus Database: 270.13.54/2300 - Release
> Date: 08/13/09 18:16:00
> --
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


sfr at canb

Nov 23, 2009, 3:17 PM

Post #5 of 7 (144 views)
Permalink
Re: linux-next: manual merge of the net tree with the net-current tree [In reply to]

Hi Amit,

On Mon, 23 Nov 2009 12:09:10 -0600 Amit Salecha <amit.salecha [at] qlogic> wrote:
>
> This merge looks ok and I have tested it.

Thanks for the confirmation.

--
Cheers,
Stephen Rothwell sfr [at] canb
http://www.canb.auug.org.au/~sfr/


davem at davemloft

Oct 4, 2010, 10:47 PM

Post #6 of 7 (110 views)
Permalink
Re: linux-next: manual merge of the net tree with the net-current tree [In reply to]

From: Jerry Chu <hkchu [at] google>
Date: Thu, 30 Sep 2010 20:27:05 -0700

> In tcp_write_timeout():
>
> if (retransmits_timed_out(sk, retry_until,
> (1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV) ? 0 :
> icsk->icsk_user_timeout, syn_set)) {
>
> should be simplified to
>
> if (retransmits_timed_out(sk, retry_until,
> syn_set ? 0 : icsk->icsk_user_timeout, syn_set)) {

I've merged net-2.6 into net-next-2.6 and integrated this simplification
while doing so.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


davem at davemloft

Sep 27, 2011, 10:36 PM

Post #7 of 7 (43 views)
Permalink
Re: linux-next: manual merge of the net tree with the net-current tree [In reply to]

From: Stephen Rothwell <sfr [at] canb>
Date: Wed, 28 Sep 2011 12:54:28 +1000

> Today's linux-next merge of the net tree got a conflict in
> net/batman-adv/soft-interface.c between commit 8b267b312df9 ("batman-adv:
> do_bcast has to be true for broadcast packets only") from the net-current
> tree and commit 3d393e473210 ("batman-adv: implement AP-isolation on the
> sender side") from the net tree.
>
> Just context changes. I fixed it up (see below) and can carry the fix as
> necessary.

Yep, I'll do a merge soon to fix this up for good, thanks Stephen!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.