Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > device_create() will register the device in sysfs and send uevent. So, your > original udev rule/code will not work, since it always would read > a mac address of 0, as proposed_mac is not populated when the device is > announced. That is, unless udev is scheduled after the ma

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread Mauro Carvalho Chehab
Em Wed, 31 Oct 2018 16:13:00 + Sean Young escreveu: > On Wed, Oct 31, 2018 at 03:51:40PM +, David Howells wrote: > > David Howells wrote: > > > > > > > > Devices without a mac address shouldn't have a mac_dvb sysfs > > > > > > attribute, > > > > > > I think. > > > > > > > > > > I'

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread Sean Young
On Wed, Oct 31, 2018 at 03:51:40PM +, David Howells wrote: > David Howells wrote: > > > > > > Devices without a mac address shouldn't have a mac_dvb sysfs > > > > > attribute, > > > > > I think. > > > > > > > > I'm not sure that's possible within the core infrastructure. It's a > > > > cla

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread Mauro Carvalho Chehab
Em Wed, 31 Oct 2018 15:51:40 + David Howells escreveu: > David Howells wrote: > > > > > > Devices without a mac address shouldn't have a mac_dvb sysfs > > > > > attribute, > > > > > I think. > > > > > > > > I'm not sure that's possible within the core infrastructure. It's a > > > > cla

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
David Howells wrote: > > > > Devices without a mac address shouldn't have a mac_dvb sysfs attribute, > > > > I think. > > > > > > I'm not sure that's possible within the core infrastructure. It's a > > > class attribute set when the class is created; I'm not sure it can be > > > overridden on a

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > > > Devices without a mac address shouldn't have a mac_dvb sysfs attribute, > > > I think. > > > > I'm not sure that's possible within the core infrastructure. It's a class > > attribute set when the class is created; I'm not sure it can be overridden > > on > > a per-devic

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > > How do I tell? If it's all zeros it's not there? > > The mac gets populated through read_mac_address member of > dvb_usb_device_properties. That doesn't seem to be true for all drivers. The cx23885 driver does things differently, for instance. David

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > With this patch, with a usb Hauppauge Nova-T Stick I get: > > $ tail /sys/class/dvb/*/dvb_* > ... > ==> /sys/class/dvb/dvb0.demux0/dvb_mac <== > 00:00:00:00:00:00 I presume you're complaining, then, that the file exists in this instance rather than it doesn't have the real M

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread Sean Young
On Wed, Oct 31, 2018 at 10:36:22AM +, David Howells wrote: > Sean Young wrote: > > > > > Devices have a MAC address available, which is printed during boot: > > > > Not all dvb devices have a mac address. > > How do I tell? If it's all zeros it's not there? The mac gets populated through

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > > > Devices have a MAC address available, which is printed during boot: > > Not all dvb devices have a mac address. How do I tell? If it's all zeros it's not there? > Devices without a mac address shouldn't have a mac_dvb sysfs attribute, > I think. I'm not sure that's po

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread Sean Young
On Tue, Oct 30, 2018 at 09:35:31PM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 30 Oct 2018 22:32:50 + > Sean Young escreveu: > > Thanks for reviewing it! > > > On Tue, Oct 30, 2018 at 11:03:19AM -0300, Mauro Carvalho Chehab wrote: > > > Em Mon, 24 Sep 2018 11:10:31 +0100 > > > David Howell

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-30 Thread Mauro Carvalho Chehab
Em Tue, 30 Oct 2018 22:32:50 + Sean Young escreveu: Thanks for reviewing it! > On Tue, Oct 30, 2018 at 11:03:19AM -0300, Mauro Carvalho Chehab wrote: > > Em Mon, 24 Sep 2018 11:10:31 +0100 > > David Howells escreveu: > > > > > Some devices, such as the DVBSky S952 and T982 cards, are dua

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-30 Thread Sean Young
On Tue, Oct 30, 2018 at 11:03:19AM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 24 Sep 2018 11:10:31 +0100 > David Howells escreveu: > > > Some devices, such as the DVBSky S952 and T982 cards, are dual port cards > > that provide two cx23885 devices on the same PCI device, which means the > > at

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-30 Thread Mauro Carvalho Chehab
Em Mon, 24 Sep 2018 11:10:31 +0100 David Howells escreveu: > Some devices, such as the DVBSky S952 and T982 cards, are dual port cards > that provide two cx23885 devices on the same PCI device, which means the > attributes available for writing udev rules are exactly the same, apart > from the ad