mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net
Subject: Re: [RFC 4/4] firewire: add mem1394
Date: Sun, 05 Feb 2006 15:19:53 +0100	[thread overview]
Message-ID: <43E60989.5080600@s5r6.in-berlin.de> (raw)
In-Reply-To: <1138920185.3621.24.camel@localhost>

Johannes Berg wrote:
> While the previous patches were purely infrastructure, this patch
> actually adds the code using it: mem1394.
> 
> There are some open questions on a few things, maybe someone can help
> out there.
[...]
> +	/* this is a bit icky. I think I'll want to create a
> +	 * "struct hpsb_node_class_interface" that you register
> +	 * with nodemgr.c instead of registering the "struct class_interface"
> +	 * directly. It would wrap around the "struct class_interface"
> +	 * and handle things like this.
> +	 *
> +	 * This means it would call the node_class_interface's
> +	 *  - "add" method whenever the device is fully there, and an
> +	 *  - "update" method when it survived a bus reset, and the
> +	 *  - "remove" method when it went away, also taking care of
> +	 * debouncing, which the mem1394 interface currently doesn't handle.

I currently think so too.

> +	 * But I need advice on this. It'll probably works this way
> +	 * but most likely not once this interface stuff gets more
> +	 * use; I can imagine using it for scanners instead of raw1394
> +	 * so that the kernel can validate that a user can only
> +	 * access a certain scanner and not all 1394 devices on the bus.

Probably not. All devices (except perhaps custom embedded devices) which 
implement one or another high level protocol will always be accessed 
either by a protocol driver in kernelspace (like sbp2, eth1394, 
video1394) on top of a struct unit_directory, or by a driver or library 
in userspace on top of libraw1394/ raw1394. This is because such devices 
and protocols all implement the ISO/IEC 13213 CSR architecture.

> +	 * In other words some 'raw1394intf' instead of 'raw1394' which
> +	 * creates one character device per ieee1394 node for finer
> +	 * grained access control.
> +	 * That would definitely want to have debouncing etc.
> +	 *
> +	 * However, I don't fully understand the states node_entries go
> +	 * through yet, so I'm not sure this should even be here!
> +	 * Maybe it should be in open? But then the device could go
> +	 * into limbo when it is already opened...
> +	 *
> +	 * Similarly, what happens if a node is suspended?
> +	 */
[...]

When a node represented by a node_entry leaves the bus, the node_entry 
is "suspended" and "put into limbo", which is both the same for the 1394 
stack. The node_entry is only "removed" when forced by userspace through 
ieee1394's sysfs interface or when the ieee1394 driver module is 
unloaded. A unit_directory is either "suspended" or "removed", depending 
on what the protocol driver bound to the unit_directory implements. 
This behaviour of ieee1394 is currently not extensively used, but I plan 
to implement capability of sbp2 to survive transient disconnection on 
top of it.

I still haven't tested your driver yet and won't be able to do so during 
the next days...
-- 
Stefan Richter
-=====-=-==- --=- --=-=
http://arcgraph.de/sr/

  parent reply	other threads:[~2006-02-05 14:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-02 22:27 [RFC 0/4] firewire: interface to remote memory (mem1394) Johannes Berg
2006-02-02 22:38 ` [RFC 1/4] firewire: node interface Johannes Berg
2006-02-02 22:40 ` [RFC 2/4] firewire: dynamic cdev allocation below firewire major Johannes Berg
2006-02-05 13:11   ` Stefan Richter
2006-02-13  3:51   ` Jody McIntyre
2006-02-13  7:32     ` Arjan van de Ven
2006-02-13 12:02       ` Johannes Berg
2006-02-13 16:49         ` Stefan Richter
2006-02-13 21:10         ` Arjan van de Ven
2006-02-14 15:41           ` Johannes Berg
2006-02-02 22:41 ` [RFC 3/4] firewire: unconditionally export hpsb_send_packet_and_wait Johannes Berg
2006-02-05 13:42   ` Stefan Richter
2006-02-07 10:45     ` Johannes Berg
2006-02-02 22:43 ` [RFC 4/4] firewire: add mem1394 Johannes Berg
2006-02-03 11:35   ` Andy Wingo
2006-02-03 11:47     ` Johannes Berg
2006-02-05 12:59       ` Stefan Richter
2006-02-05  8:43   ` Andrew Morton
2006-02-05  9:09     ` Kyle Moffett
     [not found]       ` <43E5D599.5040503@s5r6.in-berlin.de>
2006-02-05 20:09         ` Stefan Richter
2006-02-05 20:17     ` Andi Kleen
2006-02-05 20:50       ` Stefan Richter
2006-02-06  8:44         ` Andi Kleen
2006-02-05 14:19   ` Stefan Richter [this message]
2006-02-07 10:41     ` Johannes Berg

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=43E60989.5080600@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /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®