From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Marek Belisko <marek.belisko@open-nandra.com>
Cc: gregkh@suse.de, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, chl.pixo@gmail.com
Subject: Re: [PATCH 1/2] staging: ft1000-pcmcia: Fix compilation errors.
Date: Fri, 17 Dec 2010 14:04:26 +0100 [thread overview]
Message-ID: <20101217130426.GA21706@isilmar-3.linta.de> (raw)
In-Reply-To: <1292573592-3624-2-git-send-email-marek.belisko@open-nandra.com>
Hey,
On Fri, Dec 17, 2010 at 09:13:11AM +0100, Marek Belisko wrote:
> Following patch will fix all compilation errors. Main problems
> was with pcmcia API changes. Also remove BROKEN as now driver
> is properly build.
Thanks!
One question, though:
> +int ft1000_get_mac(struct pcmcia_device *p_dev, tuple_t *tuple, void *priv)
> {
> - tuple_t tuple;
> + int i;
> cisparse_t parse;
> - int last_fn, last_ret, i;
> - u_char buf[64];
> cistpl_lan_node_id_t *node_id;
> - cistpl_cftable_entry_t dflt = { 0 };
> - cistpl_cftable_entry_t *cfg;
> - unsigned char mac_address[6];
> -
> - DEBUG(0, "ft1000_cs: ft1000_config(0x%p)\n", link);
>
> + if (!pcmcia_parse_tuple(tuple, &parse)) {
> + if (parse.funce.type == CISTPL_FUNCE_LAN_NODE_ID) {
> + node_id = (cistpl_lan_node_id_t *) parse.funce.data;
> + if (node_id->nb == 6) {
> + for (i = 0; i < 6; i++)
> + *((unsigned char *)priv + i) =
> + node_id->id[i];
> + /*
> + * we found MAC address and will
> + * end the pcmcia_loop_tuple
> + */
> + return 0;
> + }
> + }
> + }
> /*
> - This reads the card's CONFIG tuple to find its configuration
> - registers.
> + * we did not find MAC address in this tuple
> + * continue pcmcia_loop_tuple
> */
> -// tuple.DesiredTuple = CISTPL_CONFIG;
> -// tuple.Attributes = 0;
> - tuple.TupleData = buf;
> - tuple.TupleDataMax = sizeof(buf);
> - tuple.TupleOffset = 0;
> -// CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
> -// CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
> -// CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
> -// link->conf.ConfigBase = parse.config.base;
> -// link->conf.Present = parse.config.rmask[0];
> + return 1;
> +} /* ft1000_get_mac */
...
> + /* get the MAC address */
> + ret = pcmcia_loop_tuple(link, CISTPL_FUNCE,
> + ft1000_get_mac, mac_address);
> + if (ret)
> + goto failed;
Does this differ from the generic pcmcia_get_mac_from_cis() function, or
could we use this generic function for the purposes needed in this driver?
Best,
Dominik
next prev parent reply other threads:[~2010-12-17 13:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 8:13 [PATCH 0/2] Fix ft1000-pcmcia driver Marek Belisko
2010-12-17 8:13 ` [PATCH 1/2] staging: ft1000-pcmcia: Fix compilation errors Marek Belisko
2010-12-17 13:04 ` Dominik Brodowski [this message]
2010-12-17 13:16 ` Belisko Marek
[not found] ` <AANLkTinD0f06h75dP9b9d8k3jZ2jbaYX2u=tRS4UWZbc@mail.gmail.com>
2010-12-22 20:14 ` Dominik Brodowski
2010-12-17 8:13 ` [PATCH 2/2] staging: ft1000-pcmcia: Fix compilation warning Marek Belisko
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=20101217130426.GA21706@isilmar-3.linta.de \
--to=linux@dominikbrodowski.net \
--cc=chl.pixo@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.belisko@open-nandra.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
all inboxes | Powered by JetHome®