From: akpm@linux-foundation.org Subject: [patch 4/4] libata: expose AN to user space Date: Tue, 16 Oct 2007 14:21:25 -0700 Message-ID: <200710162121.l9GLLQJ2017814@imap1.linux-foundation.org> Return-path: Received: from smtp2.linux-foundation.org ([207.189.120.14]:58690 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933530AbXJPV2D (ORCPT ); Tue, 16 Oct 2007 17:28:03 -0400 Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: jeff@garzik.org Cc: linux-ide@vger.kernel.org, akpm@linux-foundation.org, kristen.c.accardi@intel.com, James.Bottomley@steeleye.com, htejun@gmail.com From: Kristen Carlson Accardi If Asynchronous Notification of media change events is supported, pass that information up to the SCSI layer. Signed-off-by: Kristen Carlson Accardi Cc: Jeff Garzik Cc: Tejun Heo Cc: James Bottomley Signed-off-by: Andrew Morton --- drivers/ata/libata-scsi.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN drivers/ata/libata-scsi.c~libata-expose-an-to-user-space drivers/ata/libata-scsi.c --- a/drivers/ata/libata-scsi.c~libata-expose-an-to-user-space +++ a/drivers/ata/libata-scsi.c @@ -773,6 +773,9 @@ static void ata_scsi_dev_config(struct s blk_queue_max_hw_segments(q, q->max_hw_segments - 1); } + if (dev->flags & ATA_DFLAG_AN) + sdev->media_change_notify = 1; + if (dev->flags & ATA_DFLAG_NCQ) { int depth; _