* Re: sending uevent form SATA promise driver.
2008-10-27 16:42 sending uevent form SATA promise driver Padmini Krishnamurthy
@ 2008-10-27 16:50 ` Kay Sievers
2008-10-27 17:35 ` Padmini Krishnamurthy
2008-10-27 22:33 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2008-10-27 16:50 UTC (permalink / raw)
To: linux-hotplug
On Mon, Oct 27, 2008 at 17:42, Padmini Krishnamurthy <krishpm@yahoo.com> wrote:
> I am adding hotplug support to our SATA promise driver. Can I send a uevent
> from promise driver directly instead of using the hotplug support provided
> by acpi?. We do not have acpi support .
What do you mean? I guess you create and remove devices in the kernel
device tree, which represent the hotplugged devices connected to your
controller. These devices will send uevents on their own, there is
usually no need to send any events with the driver. Just run "udevadm
monitor" while you connect/diconnect any device, and you will see
hotplugged devices coming and going depending on the bus they live on.
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sending uevent form SATA promise driver.
2008-10-27 16:42 sending uevent form SATA promise driver Padmini Krishnamurthy
2008-10-27 16:50 ` Kay Sievers
@ 2008-10-27 17:35 ` Padmini Krishnamurthy
2008-10-27 22:33 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Padmini Krishnamurthy @ 2008-10-27 17:35 UTC (permalink / raw)
To: linux-hotplug
Our test device is connected to the promise card which sits on a PCI slot on the PC. Our test SATA driver drives this device. The driver is loaded during bootup. I am seeing output of both udevadm and /var/log/messages when I turn on the device. I see the interrupt handling messages on /var/log/messages but udevadm does not report any event recived.
So, I ported some of the hotplug support from libata. But there I see that the hotplug event notification is handled in acpi. So, I am not sure, if I have to add this in our driver at the device attach routine?
How would the uevent be sent to udev when the device is attached?
Thanks,
Padmini
--- On Mon, 10/27/08, Kay Sievers <kay.sievers@vrfy.org> wrote:
> From: Kay Sievers <kay.sievers@vrfy.org>
> Subject: Re: sending uevent form SATA promise driver.
> To: "Padmini Krishnamurthy" <krishpm@yahoo.com>
> Cc: linux-hotplug@vger.kernel.org
> Date: Monday, October 27, 2008, 9:50 AM
> On Mon, Oct 27, 2008 at 17:42, Padmini Krishnamurthy
> <krishpm@yahoo.com> wrote:
> > I am adding hotplug support to our SATA promise
> driver. Can I send a uevent
> > from promise driver directly instead of using the
> hotplug support provided
> > by acpi?. We do not have acpi support .
>
> What do you mean? I guess you create and remove devices in
> the kernel
> device tree, which represent the hotplugged devices
> connected to your
> controller. These devices will send uevents on their own,
> there is
> usually no need to send any events with the driver. Just
> run "udevadm
> monitor" while you connect/diconnect any device, and
> you will see
> hotplugged devices coming and going depending on the bus
> they live on.
>
> Kay
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: sending uevent form SATA promise driver.
2008-10-27 16:42 sending uevent form SATA promise driver Padmini Krishnamurthy
2008-10-27 16:50 ` Kay Sievers
2008-10-27 17:35 ` Padmini Krishnamurthy
@ 2008-10-27 22:33 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2008-10-27 22:33 UTC (permalink / raw)
To: linux-hotplug
On Mon, Oct 27, 2008 at 18:35, Padmini Krishnamurthy <krishpm@yahoo.com> wrote:
> Our test device is connected to the promise card which sits on a PCI slot on the PC. Our test SATA driver drives this device. The driver is loaded during bootup. I am seeing output of both udevadm and /var/log/messages when I turn on the device. I see the interrupt handling messages on /var/log/messages but udevadm does not report any event recived.
> So, I ported some of the hotplug support from libata. But there I see that the hotplug event notification is handled in acpi. So, I am not sure, if I have to add this in our driver at the device attach routine?
> How would the uevent be sent to udev when the device is attached?
What kind of devices does this driver create in the kernel? What are
the parent devices of the block devices it offers? SCSI, libata,
whatever?
Your driver should just create devices representing the stuff that is
connected to the controller, the creation of these devices will do the
uevent, you do not create custom events on your own in any usual
driver code.
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread