From: Hauke Mehrtens <hauke@hauke-m.de>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-mips@linux-mips.org,
mb@bu3sch.de, george@znau.edu.ua, arend@broadcom.com,
b43-dev@lists.infradead.org, bernhardloos@googlemail.com,
arnd@arndb.de, julian.calaby@gmail.com, sshtylyov@mvista.com
Subject: Re: [RFC v3 03/13] bcma: add functions to scan cores needed on SoCs
Date: Thu, 30 Jun 2011 09:23:11 +0200 [thread overview]
Message-ID: <4E0C245F.5040107@hauke-m.de> (raw)
In-Reply-To: <BANLkTimAE-xphUYeMMzzz6B531tedo6Vkw@mail.gmail.com>
On 06/30/2011 08:42 AM, Rafał Miłecki wrote:
> 2011/6/30 Hauke Mehrtens <hauke@hauke-m.de>:
- err = bcma_get_next_core(bus, &eromptr, core);
- if (err == -ENXIO)
+ err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core);
+ if (err == -ENODEV) {
+ core_num++;
+ continue;
+ } else if (err == -ENXIO)
continue;
else if (err == -ESPIPE)
break;
else if (err < 0)
return err;
+ core->core_index = core_num++;
+ bus->nr_cores++;
+
pr_info("Core %d found: %s "
"(manuf 0x%03X, id 0x%03X, rev 0x%02X, class 0x%X)\n",
- bus->nr_cores, bcma_device_name(&core->id),
+ core->core_index, bcma_device_name(&core->id),
core->id.manuf, core->id.id, core->id.rev,
core->id.class);
- core->core_index = bus->nr_cores++;
>
> Didn't you just change core indexes (0, 1, ...) to numbers (1, 2,
> ...)? It would break enabling IRQs on PCI.
No, the cores are getting the same indexes numbers as before. While
scanning core_num is increased for every core found also for cores we
are not searching for or we already found. Then core_num will be
assigned to core->core_index. bus->nr_cores is no used any more so it
could be removed or is it needed for something else?
As you can see here [0] it finds core 0 and 3 at first and then the others.
>
> Didn't test it however yet, I'll have access to my machines tomorrow.
>
Hauke
[0] http://permalink.gmane.org/gmane.linux.kernel.wireless.general/71851
next prev parent reply other threads:[~2011-06-30 7:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 22:11 [RFC v3 00/13] bcma: add support for embedded devices like bcm4716 Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 01/13] bcma: move parsing of EEPROM into own function Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 02/13] bcma: move initializing of struct bcma_bus to " Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 03/13] bcma: add functions to scan cores needed on SoCs Hauke Mehrtens
2011-06-30 6:42 ` Rafał Miłecki
2011-06-30 7:23 ` Hauke Mehrtens [this message]
2011-06-29 22:11 ` [RFC v3 04/13] bcma: add SOC bus Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 05/13] bcma: add mips driver Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 06/13] bcma: add serial console support Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 07/13] bcma: get CPU clock Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 08/13] bcma: add pci(e) host mode Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 09/13] bcma: add check if sprom is available before accessing it Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 10/13] bcm47xx: prepare to support different buses Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 11/13] bcm47xx: make it possible to build bcm47xx without ssb Hauke Mehrtens
2011-06-30 8:31 ` Florian Fainelli
2011-06-29 22:11 ` [RFC v3 12/13] bcm47xx: add support for bcma bus Hauke Mehrtens
2011-06-30 8:31 ` Florian Fainelli
2011-06-29 22:11 ` [RFC v3 13/13] bcm47xx: fix irq assignment for new SoCs Hauke Mehrtens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E0C245F.5040107@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=arend@broadcom.com \
--cc=arnd@arndb.de \
--cc=b43-dev@lists.infradead.org \
--cc=bernhardloos@googlemail.com \
--cc=george@znau.edu.ua \
--cc=julian.calaby@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
--cc=sshtylyov@mvista.com \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).