2013-08-12 01:53:39

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the wireless-next tree with the wireless tree

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
drivers/net/wireless/iwlwifi/pcie/trans.c between commit eabc4ac5d760
("iwlwifi: pcie: disable L1 Active after pci_enable_device") from
thewireless tree and commit f2532b04b2ec ("iwlwifi: pcie: don't disable
L1 for newest NICs") from the wireless-next tree.

I fixed it up (maybe - see below) and can carry the fix as necessary (no
action is required).

--
Cheers,
Stephen Rothwell [email protected]

diff --cc drivers/net/wireless/iwlwifi/pcie/trans.c
index 390e2f0,e52d1ce..0000000
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@@ -1502,16 -1400,22 +1400,22 @@@ struct iwl_trans *iwl_trans_pcie_alloc(
spin_lock_init(&trans_pcie->reg_lock);
init_waitqueue_head(&trans_pcie->ucode_write_waitq);

+ if (pci_enable_device(pdev)) {
+ err = -ENODEV;
+ goto out_no_pci;
+ }
+
- /* W/A - seems to solve weird behavior. We need to remove this if we
- * don't want to stay in L1 all the time. This wastes a lot of power */
- pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
- PCIE_LINK_STATE_CLKPM);
+ if (!cfg->base_params->pcie_l1_allowed) {
+ /*
+ * W/A - seems to solve weird behavior. We need to remove this
+ * if we don't want to stay in L1 all the time. This wastes a
+ * lot of power.
+ */
+ pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S |
+ PCIE_LINK_STATE_L1 |
+ PCIE_LINK_STATE_CLKPM);
+ }

- if (pci_enable_device(pdev)) {
- err = -ENODEV;
- goto out_no_pci;
- }
-
pci_set_master(pdev);

err = pci_set_dma_mask(pdev, DMA_BIT_MASK(36));


Attachments:
(No filename) (1.67 kB)
(No filename) (836.00 B)
Download all attachments

2013-08-12 15:30:30

by John W. Linville

[permalink] [raw]
Subject: Re: linux-next: manual merge of the wireless-next tree with the wireless tree

I think I have this slightly different in wireless-testing. Johannes,
please review and advise...

John

On Mon, Aug 12, 2013 at 11:53:27AM +1000, Stephen Rothwell wrote:
> Hi John,
>
> Today's linux-next merge of the wireless-next tree got a conflict in
> drivers/net/wireless/iwlwifi/pcie/trans.c between commit eabc4ac5d760
> ("iwlwifi: pcie: disable L1 Active after pci_enable_device") from
> thewireless tree and commit f2532b04b2ec ("iwlwifi: pcie: don't disable
> L1 for newest NICs") from the wireless-next tree.
>
> I fixed it up (maybe - see below) and can carry the fix as necessary (no
> action is required).
>
> --
> Cheers,
> Stephen Rothwell [email protected]
>
> diff --cc drivers/net/wireless/iwlwifi/pcie/trans.c
> index 390e2f0,e52d1ce..0000000
> --- a/drivers/net/wireless/iwlwifi/pcie/trans.c
> +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
> @@@ -1502,16 -1400,22 +1400,22 @@@ struct iwl_trans *iwl_trans_pcie_alloc(
> spin_lock_init(&trans_pcie->reg_lock);
> init_waitqueue_head(&trans_pcie->ucode_write_waitq);
>
> + if (pci_enable_device(pdev)) {
> + err = -ENODEV;
> + goto out_no_pci;
> + }
> +
> - /* W/A - seems to solve weird behavior. We need to remove this if we
> - * don't want to stay in L1 all the time. This wastes a lot of power */
> - pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
> - PCIE_LINK_STATE_CLKPM);
> + if (!cfg->base_params->pcie_l1_allowed) {
> + /*
> + * W/A - seems to solve weird behavior. We need to remove this
> + * if we don't want to stay in L1 all the time. This wastes a
> + * lot of power.
> + */
> + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S |
> + PCIE_LINK_STATE_L1 |
> + PCIE_LINK_STATE_CLKPM);
> + }
>
> - if (pci_enable_device(pdev)) {
> - err = -ENODEV;
> - goto out_no_pci;
> - }
> -
> pci_set_master(pdev);
>
> err = pci_set_dma_mask(pdev, DMA_BIT_MASK(36));



--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2013-08-12 15:34:16

by Berg, Johannes

[permalink] [raw]
Subject: RE: linux-next: manual merge of the wireless-next tree with the wireless tree

> I think I have this slightly different in wireless-testing. Johannes, please
> review and advise...

> > Today's linux-next merge of the wireless-next tree got a conflict in
> > drivers/net/wireless/iwlwifi/pcie/trans.c between commit eabc4ac5d760
> > ("iwlwifi: pcie: disable L1 Active after pci_enable_device") from
> > thewireless tree and commit f2532b04b2ec ("iwlwifi: pcie: don't
> > disable
> > L1 for newest NICs") from the wireless-next tree.
> >
> > I fixed it up (maybe - see below) and can carry the fix as necessary
> > (no action is required).


> > diff --cc drivers/net/wireless/iwlwifi/pcie/trans.c
> > index 390e2f0,e52d1ce..0000000
> > --- a/drivers/net/wireless/iwlwifi/pcie/trans.c
> > +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
> > @@@ -1502,16 -1400,22 +1400,22 @@@ struct iwl_trans
> *iwl_trans_pcie_alloc(
> > spin_lock_init(&trans_pcie->reg_lock);
> > init_waitqueue_head(&trans_pcie->ucode_write_waitq);
> >
> > + if (pci_enable_device(pdev)) {
> > + err = -ENODEV;
> > + goto out_no_pci;
> > + }
> > +
> > - /* W/A - seems to solve weird behavior. We need to remove this if
> we
> > - * don't want to stay in L1 all the time. This wastes a lot of power */
> > - pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S |
> PCIE_LINK_STATE_L1 |
> > - PCIE_LINK_STATE_CLKPM);
> > + if (!cfg->base_params->pcie_l1_allowed) {
> > + /*
> > + * W/A - seems to solve weird behavior. We need to remove
> this
> > + * if we don't want to stay in L1 all the time. This wastes a
> > + * lot of power.
> > + */
> > + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S |
> > + PCIE_LINK_STATE_L1 |
> > + PCIE_LINK_STATE_CLKPM);
> > + }
> >
> > - if (pci_enable_device(pdev)) {
> > - err = -ENODEV;
> > - goto out_no_pci;
> > - }
> > -
> > pci_set_master(pdev);
> >
> > err = pci_set_dma_mask(pdev, DMA_BIT_MASK(36));

This looks fine, and it seems to be exactly what you have in wireless-testing/master. I have yet another change pending to this which removes the err= in favour of taking it from pci_enable_device() though.

johannes
(sorry for the outlook mess - might want to use [email protected])
--

Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052