Re: [PATCH] drivers:staging: sources for ST core

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pavan Savoy
Date: Tuesday, March 30, 2010 - 8:53 am

Alan,

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


Agree - It's all there because of the organization's coding standards.
Will correct it.


Yes, platform device context ? as in per-device ?
However, would face a problem (as mentioned in other mail) - 
which is when a BT/FM driver which are like client drivers want to use this line discipline, do they need to know which context this needs to go into ?


One more variable ? to st_gdata ? done. Sounds simple.

Do I need to do it in tty_open and _release ?
Because I don't have anything much to release when tty closes.
All I have to do is done in tty_close. 


Ok, But is it ok, to maintain codes, internally among ST/BT/FM drivers ?
 

send_frame is called from st_int_recv - which is a SOFT-IRQ I believe, So do I really need that ?


point taken.

Ha, this one's a copy/paste piece from hci_ll.c's recv function.
 

This global function pointer as such is not a necessity.
st_recv can point to st_kim_recv (response to firmware download) or st_int_recv (response to commands).

They are sort of mutually exclusive, firmware will be downloaded once.
and once ready, chip will always use cmd/response st_int_recv.


Ok.


The 2nd path doesn't come until the int_dequeue at all, i.e it would know ST_TX_SENDING, and would queue the skb and return.
I remember there was one lock here, removed when I started to have problem on SMP.


Ok, the whole thing will go off.
The plan is to use /dev/rfkill and avoid the sysfs entry altogether.


ok, But can I really put the kref upon tty_close ?
A bluetooth driver, might have registered, but wouldn't have started communication i.e tty_open might not have occurred.

So, I wouldn't have any trouble with that right ?


yep, redundant - will remove it.


Ok, the only problem here is st_int_write, which is called during firmware download. I don't get a tty there, and hence I copy it onto the st_gdata->tty.
For the rest of callbacks from TTY layer, I can make use of the tty coming into the function.

Considering the other way, if st_gdata went into the tty->disc_data, I have EXPORTED functions like st_register and st_unregister, when I can't get hold of the disc_data.



Yep, I remember doing that, and using a couple of goto-s as well.
Organization coding standards and linux Coding Style collided.
- Will do that.


      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] drivers:staging: sources for ST core, Pavan Savoy, (Tue Mar 30, 8:53 am)
Re: [PATCH] drivers:staging: sources for ST core, Greg KH, (Tue Mar 30, 1:38 pm)