lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <570950.67367.qm@web94902.mail.in2.yahoo.com>
Date:	Mon, 5 Apr 2010 21:48:27 +0530 (IST)
From:	Pavan Savoy <pavan_savoy@...com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	Greg KH <gregkh@...e.de>, Marcel Holtmann <marcel@...tmann.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers:staging: sources for ST core


--- On Fri, 2/4/10, Alan Cox <alan@...rguk.ukuu.org.uk> wrote:

> From: Alan Cox <alan@...rguk.ukuu.org.uk>
> Subject: Re: [PATCH] drivers:staging: sources for ST core
> To: "Pavan Savoy" <pavan_savoy@...oo.co.in>
> Cc: "Greg KH" <gregkh@...e.de>, "Marcel Holtmann" <marcel@...tmann.org>, linux-kernel@...r.kernel.org
> Date: Friday, 2 April, 2010, 4:57 AM
> Sorry but I can't make head or tail
> of this and the code flow you are
> trying to achieve.
> 
> The usual way you do stuff is to put per device stuff in a
> per device
> struct, driver wide stuff in a driver struct (or static
> variables) and
> then run everything from the device end.
> 
> I'd expect a low level driver to do something like
> 
> 
>     probe()
>         create device entry
>         initialise device (eg
> download firmware)
>         register itself with
> anything higher level
> 

What I am trying to achieve is something like this,

HCI-core	V4L2-radio	Char-device=/dev/tigps for fops
 ^		^		^
 |		|		|
 |		|		|
BT		FM		GPS [these register themselves to ST]
\		 |		 /
 \		 |		/
  \		 |		/
    Shared Transport Ldisc driver
  		|
  	TTY Layer	<-- UART driver has already registered.

So, when a BT device try and registers itself to ST (shared transport) driver, I need to toggle chip enable line and 'download_firmware', and in case another _register from FM or GPS happens at  the same time, I need to signal it pending, and call a callback upon completion of firmware download.

Now which are to be identified as per-device or bus or driver ?
Because when an st_register is called, I need to do some tty_* operations from the ldisc driver itself - i.e I cannot embed tty into any of BT, FM or GPS per-device structures.

I also expose a st_write function, where in any of BT, FM and GPS driver upon being ready (fw download completed) sends across an SKB, which I queue up and write.

All of what I wanted to do, could not be done when I tried ST ldisc as a bus and each of BT, FM and GPS as per-device structs registering with type ST as bus.
So again, Now which are to be identified as per-device or bus or driver ?



      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ