All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	linux-ide@vger.kernel.org, jgarzik@pobox.com
Subject: Re: [patch 3/3] libata: handle AN interrupt
Date: Thu, 29 Mar 2007 11:13:36 +0900	[thread overview]
Message-ID: <460B20D0.7010009@gmail.com> (raw)
In-Reply-To: <20070328164457.a675a7d2.kristen.c.accardi@intel.com>

Kristen Carlson Accardi wrote:
> When we get an SDB FIS with the 'N' bit set, we should send
> an event to user space to indicate that there has been a
> media change.  The ahci host controller will send the
> event via KOBJ_CHANGE uevent.
> 
> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
>  
> +static void async_notify_thread(struct work_struct *work)
> +{
> +	struct ata_device *atadev =
> +		container_of(work, struct ata_device, async_notify);
> +
> +	/*
> +	 * TBD - who should send this event?  I couldn't find an
> +	 * easy way to map an ata_device to a genhd device, so
> +	 * decided maybe the ata host should send the event and
> +	 * allow user space to figure out what happened?
> +	 */
> +	kobject_uevent(&atadev->ap->host->dev->kobj, KOBJ_CHANGE);
> +}

I don't think this is right.  If you're gonna make media_change_event 
capability generic, you gotta make event delivery generic too.  You can 
make it a genhd event and make genhd supply the interface function, say, 
genhd_notify_media_change() which is then forwarded by SCSI layer.

Thanks.

-- 
tejun

  reply	other threads:[~2007-03-29  2:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070328230108.597741522@intel.com>
2007-03-28 23:44 ` [patch 1/3] libata: check for AN support Kristen Carlson Accardi
2007-03-29  1:53   ` Tejun Heo
2007-03-29  2:02     ` Jeff Garzik
2007-03-28 23:44 ` [patch 2/3] libata: expose AN support to user space via sysfs Kristen Carlson Accardi
2007-03-29  0:15   ` Jeff Garzik
2007-03-29  2:07     ` Tejun Heo
2007-03-29  2:19       ` Jeff Garzik
2007-03-29  2:38         ` Tejun Heo
2007-04-05  8:03           ` Jeff Garzik
2007-03-29  2:04   ` Tejun Heo
2007-03-28 23:44 ` [patch 3/3] libata: handle AN interrupt Kristen Carlson Accardi
2007-03-29  2:13   ` Tejun Heo [this message]
2007-03-29 12:38 James Smart
2007-03-29 12:43 ` Jeff Garzik
2007-03-29 13:04   ` James Smart
     [not found] <20070321004740.939006166@intel.com>
2007-03-21  0:52 ` Kristen Carlson Accardi

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=460B20D0.7010009@gmail.com \
    --to=htejun@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jgarzik@pobox.com \
    --cc=kristen.c.accardi@intel.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.