mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavan Savoy <pavan_savoy@ti.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org, npelly@google.com
Subject: Re: [PATCH] drivers:staging: sources for ST core
Date: Tue, 27 Apr 2010 03:36:43 +0530 (IST)	[thread overview]
Message-ID: <867722.38404.qm@web94916.mail.in2.yahoo.com> (raw)
In-Reply-To: <20100426230352.1564ef0f@lxorguk.ukuu.org.uk>

Alan,

--- On Tue, 27/4/10, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> From: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Subject: Re: [PATCH] drivers:staging: sources for ST core
> To: pavan_savoy@ti.com
> Cc: gregkh@suse.de, linux-kernel@vger.kernel.org, npelly@google.com, pavan_savoy@yahoo.co.in
> Date: Tuesday, 27 April, 2010, 3:33 AM
> 
> > +/* function pointer pointing to either,
> > + * st_kim_recv during registration to receive fw
> download responses
> > + * st_int_recv after registration to receive proto
> stack responses
> > + */
> > +void (*st_recv) (void*, const unsigned char*, long);
> 
> You still need a context of some kind as I said before to
> avoid thse
> globals and single device limits.

The st_recv is a global pointer to a function, and changes only once in lifetime of the driver (after a function called download_firmware).
This can be easily avoided by having a flag in my st_tty_recieve function, as in

if (test_bit(FIRMWARE_DOWNLOADED, st_gdata->st_state)
        /*
         * if fw download is in progress then route incoming data
         * to KIM for validation
         */
        st_int_recv(data, count);
else
        kim_recv(data, count);
        ST_DRV_VER("done %s", __func__);

However, the other global reference which was st_gdata, now is inside the tty->disc_data reference.

Should I put in the above ?

> And all the other issues - no explanation of the locking
> etc don't seem
> to have been touched either.

I have removed most un-wanted locking stuff, I could find.
What else is required ? please suggest.

> I don't really see how I am supposed to review this stuff
> when the
> locking and flow control assumptions are completely opaque

Didn't get what is that is required about flow-control ?
> Alan
> 

Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

  reply	other threads:[~2010-04-26 22:06 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 18:16 New ldisc for WiLink7.0 pavan_savoy
2010-04-08 18:16 ` [PATCH] serial: TTY: new ldiscs for staging pavan_savoy
2010-04-08 18:16   ` [PATCH] drivers:staging: sources for ST core pavan_savoy
2010-04-08 18:16     ` [PATCH] drivers:staging: sources for Init manager module pavan_savoy
2010-04-08 18:16       ` [PATCH] drivers:staging: sources for HCI LL PM protocol pavan_savoy
2010-04-08 18:16         ` [PATCH] drivers:staging: sources for ST header file pavan_savoy
2010-04-08 18:16           ` [PATCH] drivers:staging: Kconfig, Makefile for TI's ST ldisc pavan_savoy
2010-04-08 18:16             ` [PATCH] Documentation:staging: add TODO and ABI to ti-st pavan_savoy
2010-04-08 18:16               ` [PATCH] bluetooth: BT driver using ST for TI combo devices pavan_savoy
2010-04-13 15:06     ` [PATCH] drivers:staging: sources for ST core Pavan Savoy
2010-04-13 15:12       ` Alan Cox
2010-04-19 18:37         ` Pavan Savoy
2010-04-26 21:24           ` Pavan Savoy
2010-04-26 22:03     ` Alan Cox
2010-04-26 22:06       ` Pavan Savoy [this message]
2010-04-26 21:59   ` [PATCH] serial: TTY: new ldiscs for staging Alan Cox
2010-04-26 21:56     ` Savoy, Pavan
2010-04-26 22:06       ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2010-04-27 16:15 [PATCH] drivers:staging: sources for ST core Pavan Savoy
2010-04-01 17:20 Pavan Savoy
2010-04-01 22:43 ` Pavan Savoy
2010-04-01 23:27   ` Alan Cox
2010-04-05 16:18     ` Pavan Savoy
2010-03-31 19:27 Pavan Savoy
2010-03-31 20:24 ` Greg KH
2010-03-31 23:57   ` Pavan Savoy
2010-04-01  9:20     ` Alan Cox
2010-03-30 22:50 Pavan Savoy
2010-03-31 17:30 ` Greg KH
2010-03-31 18:02   ` Pavan Savoy
2010-03-31 18:19     ` Greg KH
2010-03-25 23:20 [v4] New ldisc for WiLink7.0 pavan_savoy
2010-03-25 23:20 ` [PATCH] serial: TTY: new ldiscs for staging pavan_savoy
2010-03-25 23:20   ` [PATCH] drivers:staging: sources for ST core pavan_savoy
2010-03-30 11:22     ` Alan Cox
2010-03-30 15:53       ` Pavan Savoy
2010-03-30 20:38         ` Greg KH
2010-03-30 21:05           ` Pavan Savoy
2010-03-30 21:47             ` Greg KH
2010-03-31  2:24             ` Joe Perches

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=867722.38404.qm@web94916.mail.in2.yahoo.com \
    --to=pavan_savoy@ti.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npelly@google.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®