* Re: [PATCH] bcma: pci: implement enabling interrupts
2011-05-18 10:58 [PATCH] bcma: pci: implement enabling interrupts Rafał Miłecki
@ 2011-05-18 10:39 ` Arend van Spriel
2011-05-18 11:26 ` Rafał Miłecki
0 siblings, 1 reply; 5+ messages in thread
From: Arend van Spriel @ 2011-05-18 10:39 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless@vger.kernel.org, John W. Linville
On 05/18/2011 12:58 PM, Rafał Miłecki wrote:
> Signed-off-by: Rafał Miłecki<zajec5@gmail.com>
> ---
> drivers/bcma/driver_pci.c | 18 ++++++++++++++++++
> 1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
> index e757e4e..879fe1d 100644
> --- a/drivers/bcma/driver_pci.c
> +++ b/drivers/bcma/driver_pci.c
> @@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
> {
> bcma_pcicore_serdes_workaround(pc);
> }
> +
> +int bcma_core_pci_irq_enable(struct bcma_drv_pci *pc, struct bcma_device *core)
> +{
> + struct pci_dev *pdev = pc->core->bus->host_pci;
> + u32 coremask, tmp;
> + int err;
> +
> + coremask = BIT(core->core_index);
> +
> + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK,&tmp);
> + if (err)
> + goto out;
> + tmp |= coremask<< 8;
> + err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
> +
> +out:
> + return err;
> +}
Hi Rafał,
Do you intend to have a disable as well?
Gr. AvS
--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] bcma: pci: implement enabling interrupts
@ 2011-05-18 10:58 Rafał Miłecki
2011-05-18 10:39 ` Arend van Spriel
0 siblings, 1 reply; 5+ messages in thread
From: Rafał Miłecki @ 2011-05-18 10:58 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: Rafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/bcma/driver_pci.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
index e757e4e..879fe1d 100644
--- a/drivers/bcma/driver_pci.c
+++ b/drivers/bcma/driver_pci.c
@@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
{
bcma_pcicore_serdes_workaround(pc);
}
+
+int bcma_core_pci_irq_enable(struct bcma_drv_pci *pc, struct bcma_device *core)
+{
+ struct pci_dev *pdev = pc->core->bus->host_pci;
+ u32 coremask, tmp;
+ int err;
+
+ coremask = BIT(core->core_index);
+
+ err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
+ if (err)
+ goto out;
+ tmp |= coremask << 8;
+ err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
+
+out:
+ return err;
+}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] bcma: pci: implement enabling interrupts
2011-05-18 10:39 ` Arend van Spriel
@ 2011-05-18 11:26 ` Rafał Miłecki
2011-05-18 11:31 ` Arend van Spriel
0 siblings, 1 reply; 5+ messages in thread
From: Rafał Miłecki @ 2011-05-18 11:26 UTC (permalink / raw)
To: Arend van Spriel; +Cc: linux-wireless@vger.kernel.org, John W. Linville
W dniu 18 maja 2011 12:39 użytkownik Arend van Spriel
<arend@broadcom.com> napisał:
> On 05/18/2011 12:58 PM, Rafał Miłecki wrote:
>>
>> Signed-off-by: Rafał Miłecki<zajec5@gmail.com>
>> ---
>> drivers/bcma/driver_pci.c | 18 ++++++++++++++++++
>> 1 files changed, 18 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
>> index e757e4e..879fe1d 100644
>> --- a/drivers/bcma/driver_pci.c
>> +++ b/drivers/bcma/driver_pci.c
>> @@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
>> {
>> bcma_pcicore_serdes_workaround(pc);
>> }
>> +
>> +int bcma_core_pci_irq_enable(struct bcma_drv_pci *pc, struct bcma_device
>> *core)
>> +{
>> + struct pci_dev *pdev = pc->core->bus->host_pci;
>> + u32 coremask, tmp;
>> + int err;
>> +
>> + coremask = BIT(core->core_index);
>> +
>> + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK,&tmp);
>> + if (err)
>> + goto out;
>> + tmp |= coremask<< 8;
>> + err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
>> +
>> +out:
>> + return err;
>> +}
>
> Hi Rafał,
>
> Do you intend to have a disable as well?
Sure. I just didn't test disabling function yet, that's why I didn't publish it.
--
Rafał
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bcma: pci: implement enabling interrupts
2011-05-18 11:26 ` Rafał Miłecki
@ 2011-05-18 11:31 ` Arend van Spriel
2011-05-18 22:30 ` Rafał Miłecki
0 siblings, 1 reply; 5+ messages in thread
From: Arend van Spriel @ 2011-05-18 11:31 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless@vger.kernel.org, John W. Linville
On 05/18/2011 01:26 PM, Rafał Miłecki wrote:
> W dniu 18 maja 2011 12:39 użytkownik Arend van Spriel
> <arend@broadcom.com> napisał:
>> On 05/18/2011 12:58 PM, Rafał Miłecki wrote:
>>> Signed-off-by: Rafał Miłecki<zajec5@gmail.com>
>>> ---
>>> drivers/bcma/driver_pci.c | 18 ++++++++++++++++++
>>> 1 files changed, 18 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
>>> index e757e4e..879fe1d 100644
>>> --- a/drivers/bcma/driver_pci.c
>>> +++ b/drivers/bcma/driver_pci.c
>>> @@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
>>> {
>>> bcma_pcicore_serdes_workaround(pc);
>>> }
>>> +
>>> +int bcma_core_pci_irq_enable(struct bcma_drv_pci *pc, struct bcma_device
>>> *core)
>>> +{
>>> + struct pci_dev *pdev = pc->core->bus->host_pci;
>>> + u32 coremask, tmp;
>>> + int err;
>>> +
>>> + coremask = BIT(core->core_index);
>>> +
>>> + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK,&tmp);
>>> + if (err)
>>> + goto out;
>>> + tmp |= coremask<< 8;
>>> + err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
>>> +
>>> +out:
>>> + return err;
>>> +}
>> Hi Rafał,
>>
>> Do you intend to have a disable as well?
> Sure. I just didn't test disabling function yet, that's why I didn't publish it.
Thanks,
I was just wondering whether there would be a yang for this yin ;-)
Gr. AvS
--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bcma: pci: implement enabling interrupts
2011-05-18 11:31 ` Arend van Spriel
@ 2011-05-18 22:30 ` Rafał Miłecki
0 siblings, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2011-05-18 22:30 UTC (permalink / raw)
To: Arend van Spriel; +Cc: linux-wireless@vger.kernel.org, John W. Linville
W dniu 18 maja 2011 13:31 użytkownik Arend van Spriel
<arend@broadcom.com> napisał:
> On 05/18/2011 01:26 PM, Rafał Miłecki wrote:
>>
>> W dniu 18 maja 2011 12:39 użytkownik Arend van Spriel
>> <arend@broadcom.com> napisał:
>>>
>>> On 05/18/2011 12:58 PM, Rafał Miłecki wrote:
>>>>
>>>> Signed-off-by: Rafał Miłecki<zajec5@gmail.com>
>>>> ---
>>>> drivers/bcma/driver_pci.c | 18 ++++++++++++++++++
>>>> 1 files changed, 18 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
>>>> index e757e4e..879fe1d 100644
>>>> --- a/drivers/bcma/driver_pci.c
>>>> +++ b/drivers/bcma/driver_pci.c
>>>> @@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
>>>> {
>>>> bcma_pcicore_serdes_workaround(pc);
>>>> }
>>>> +
>>>> +int bcma_core_pci_irq_enable(struct bcma_drv_pci *pc, struct
>>>> bcma_device
>>>> *core)
>>>> +{
>>>> + struct pci_dev *pdev = pc->core->bus->host_pci;
>>>> + u32 coremask, tmp;
>>>> + int err;
>>>> +
>>>> + coremask = BIT(core->core_index);
>>>> +
>>>> + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK,&tmp);
>>>> + if (err)
>>>> + goto out;
>>>> + tmp |= coremask<< 8;
>>>> + err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
>>>> +
>>>> +out:
>>>> + return err;
>>>> +}
>>>
>>> Hi Rafał,
>>>
>>> Do you intend to have a disable as well?
>>
>> Sure. I just didn't test disabling function yet, that's why I didn't
>> publish it.
>
> Thanks,
>
> I was just wondering whether there would be a yang for this yin ;-)
Actually, we could use the same function to enable and disable
interrupts. Only one additional argument and one condition is needed.
John: can you drop this patch? In case one function will not be an
option, I'll just resend it.
--
Rafał
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-18 22:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-18 10:58 [PATCH] bcma: pci: implement enabling interrupts Rafał Miłecki
2011-05-18 10:39 ` Arend van Spriel
2011-05-18 11:26 ` Rafał Miłecki
2011-05-18 11:31 ` Arend van Spriel
2011-05-18 22:30 ` Rafał Miłecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).