linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: George Kashperko <george@znau.edu.ua>
To: "Michael Büsch" <mb@bu3sch.de>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: SSB AI support code ([RFC4/11] SSB core control and state device ops)
Date: Thu, 10 Feb 2011 00:22:59 +0200	[thread overview]
Message-ID: <1297290179.11978.61.camel@dev.znau.edu.ua> (raw)
In-Reply-To: <1297288959.9734.31.camel@maggie>


В Срд, 09/02/2011 в 23:02 +0100, Michael Büsch пишет:
> On Wed, 2011-02-09 at 22:55 +0100, Rafał Miłecki wrote: 
> > I aksed about reading, you gave me examples of writing. I want to
> > avoid such a non-readable disasters:
> > u32 tmp;
> > ssb_core_ctl_flags(dev, 0, 0, &tmp);
> 
> A good function name consists of:
> "WHAT is done and WHERE is it done"
> 
> ssb_core_ctl_flags()
> violates both of them. It doesn't specify what is done at all,
> except that it might be something random with ctl flags.
> And it lies about where it does it. It implies that it operates
> on SSB. However, it might operate on SSB or AI.
> 

Well, have nothing to say here.
Tbh things like I see them looks like following.
1. possibility is to "mask" bus differences by dev ops. Obviously you
already have seen these patches. This will cover pretty much everyting
on behalf of end device drivers. Everything _if_ decide on control/state
flags treatment.

2. Make separate bus driver. Not a bad way either I'm sure. But still
device drivers are to manage those control/state flags but this time
with if/elses (or just with sumthing like b43_ctl_flags/b43_state_flags
which will do the same as ssb_core_control_flags atm). Tbh b43_ctl_flags
would be bad name for such a function as donno if it gonna flags >> 16
or not so better do things with plain ssb_read32/ssb_write32 :p
As it would be separate bus there will be few more structs for
ssb_ai_driver_register or whatever, not worse mentinning but still. 

Apart from those flags' location everything else (dma, phy io, etc.)
will be pretty much the same. So the only difference from driver's
perespective here are
1. care control flags
2. care control flags, care bits more bus ops.

>From ssb code prespective for SB bus changes are little to nothing (does
it really matters that alot replacing extern fn1 with static inline
fn1(){ ops->fn_a1 }?) except that there will be 2 more files (ssb_ai.h,
ssb_ai.c 12k length both most of which is EROM scanning code - just take
a look at ssb_ai.c - 180 lines with copyrights and whitespace if you
delete that EROM dancing). Does that 180 lines really worse introducing
whole new bus ? Im not sure honestly but its like I see the things. And
ofcourse I dont insist on this vision.

Have nice day,
George




  reply	other threads:[~2011-02-09 22:30 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09 13:36 SSB AI support code George Kashperko
2011-02-09 14:29 ` SSB AI support code ([RFC1/11] SSB admatch redefine) George Kashperko
2011-02-09 14:31 ` SSB AI support code ([RFC2/11] SSB reintroduce handlers as device ops) George Kashperko
2011-02-09 14:32 ` SSB AI support code ([RFC3/11] SSB irqflag device op) George Kashperko
2011-02-09 16:19   ` Larry Finger
2011-02-09 17:10     ` George Kashperko
2011-02-09 17:48       ` Larry Finger
2011-02-09 18:23         ` George Kashperko
2011-02-09 19:19           ` Larry Finger
2011-02-09 19:26             ` George Kashperko
2011-02-09 19:42               ` Larry Finger
2011-02-09 14:34 ` SSB AI support code ([RFC4/11] SSB core control and state device ops) George Kashperko
2011-02-09 20:35   ` Rafał Miłecki
2011-02-09 21:01     ` Rafał Miłecki
2011-02-09 21:21       ` George Kashperko
2011-02-09 21:03     ` George Kashperko
2011-02-09 21:14       ` Michael Büsch
2011-02-09 21:55       ` Rafał Miłecki
2011-02-09 21:58         ` George Kashperko
2011-02-09 22:00         ` George Kashperko
2011-02-09 22:02         ` Michael Büsch
2011-02-09 22:22           ` George Kashperko [this message]
2011-02-09 14:36 ` SSB AI support code ([RFC5/11] SSB propagate core control and state ops usage) George Kashperko
2011-02-09 20:58   ` Rafał Miłecki
2011-02-09 21:12     ` Michael Büsch
2011-02-09 21:26     ` George Kashperko
2011-02-09 21:50       ` Rafał Miłecki
2011-02-09 21:55         ` George Kashperko
2011-02-09 14:37 ` SSB AI support code ([RFC6/11] SSB introduce bus_check_core routine) George Kashperko
2011-02-09 14:39 ` SSB AI support code ([RFC7/11] SSB introduce ssb_bus_detect routine) George Kashperko
2011-02-09 14:40 ` SSB AI support code ([RFC8/11] SSB separate SB-specific scanning) George Kashperko
2011-02-09 14:41 ` SSB AI support code ([RFC9/11] SSB modify irqflag treatment) George Kashperko
2011-02-09 16:23   ` Larry Finger
2011-02-09 16:53     ` George Kashperko
2011-02-09 14:44 ` SSB AI support code ([RFC9/11] SSB separate SB-specific code) George Kashperko
2011-02-09 14:45 ` SSB AI support code ([RFC10/11] SSB modify irqflag treatment) George Kashperko
2011-02-09 14:46 ` SSB AI support code ([RFC11/11] SSB add AI-bus support) George Kashperko
2011-02-09 16:25   ` Larry Finger
2011-02-09 18:33     ` George Kashperko
2011-02-09 16:49   ` Larry Finger
2011-02-09 21:35 ` SSB AI support code Rafał Miłecki
2011-02-09 21:41   ` George Kashperko
2011-02-09 21:51   ` Michael Büsch
2011-02-09 22:53     ` Rafał Miłecki
2011-02-09 23:10       ` Michael Büsch
2011-02-09 23:18       ` Larry Finger
2011-02-10  5:24         ` SSB AI support code ([RFC] v2) George Kashperko
2011-02-10 10:20           ` Michael Büsch
2011-02-10 17:40             ` George Kashperko
2011-02-10 18:11               ` Michael Büsch
     [not found]                 ` <1297362251.15805.51.camel@dev.znau.edu.ua>
     [not found]                   ` <1297363781.30218.37.camel@maggie>
2011-02-10 19:52                     ` George Kashperko
2011-02-10 20:07                       ` Michael Büsch
2011-02-15 14:50                 ` Rafał Miłecki
2011-02-15 15:05                   ` George Kashperko
2011-02-09 23:30       ` SSB AI support code George Kashperko
2011-02-15 14:48         ` Rafał Miłecki
2011-02-15 14:53           ` George Kashperko
2011-02-12 13:03 ` Hauke Mehrtens
2011-02-12 14:15   ` George Kashperko
2011-02-17  9:28   ` Roland Vossen

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=1297290179.11978.61.camel@dev.znau.edu.ua \
    --to=george@znau.edu.ua \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    /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).