Re: [RFC][PATCH] Very basic sysfs support for ATM devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 Jan 2005 20:50:38 +0300
Roman Kagan <rkagan@xxxxxxx> wrote:

>   Hi,
> 
> Here's a quick and simple-minded patch to add very basic sysfs support
> to ATM devices.  It creates class/atm and provides a couple of
> attributes for each ATM device and hotplug callout for device
> addition/removal, which was the main motivation for me to write it up.
> 
> The code was modelled after sysfs support for bluetooth.
> 
> With this patch, an utility to set up a network interface on the newly
> registered ATM device can be called automatically via hotplug.
> 
> E.g. I was able to set up for automatic[*] initiation of the PPPoE
> connection using an USB ADSL modem in the following chain:
> 
>  modem plugged in -> hotplug usb device add -> modprobe device driver ->
>  creation of ATM device -> hotplug atm interface add -> br2684ctl ->
>  creation of nas0 interface -> hotplug net interface add -> pppd nas0
> 
> [*] there are two caveats:
> 1) br2684ctl misbehaved when called with -b (background) switch so I
> used & in the hotplug script instead
> 2) pppd with rp-pppoe plugin, when started before the ADSL link is
> negotiated, times out to receive PADO and never retries, so I had to put
> a big delay before starting it up to allow for link to be established
> first.
> 
> The patch is against 2.6.10.  Please comment.
> 

The first question about sysfs related patches is always, does the following
work:

	(sleep 120; cat /sys/some/device/file) &
	rmmod thedevicemodule

You need to make sure that all kobjects are correctly reference counted and
that the free is done by the kernel subsystem not the device.
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux