linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata: ahci enclosure management led sync
@ 2008-10-16 14:26 David Milburn
  2008-10-27 14:58 ` Tejun Heo
  2008-10-28  4:40 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: David Milburn @ 2008-10-16 14:26 UTC (permalink / raw)
  To: jeff; +Cc: linux-ide, kristen.c.accardi, tj

Synchronize ahci_sw_activity and ahci_sw_activity_blink with ata_port lock.

Signed-off-by: David Milburn <dmilburn@redhat.com>
--- 
 drivers/ata/ahci.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 2e1a7cb..40ec29a 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1219,6 +1219,7 @@ static void ahci_sw_activity_blink(unsigned long arg)
 	struct ahci_em_priv *emp = &pp->em_priv[link->pmp];
 	unsigned long led_message = emp->led_state;
 	u32 activity_led_state;
+	unsigned long flags;
 
 	led_message &= 0xffff0000;
 	led_message |= ap->port_no | (link->pmp << 8);
@@ -1227,6 +1228,7 @@ static void ahci_sw_activity_blink(unsigned long arg)
 	 * toggle state of LED and reset timer.  If not,
 	 * turn LED to desired idle state.
 	 */
+	spin_lock_irqsave(ap->lock, flags);
 	if (emp->saved_activity != emp->activity) {
 		emp->saved_activity = emp->activity;
 		/* get the current LED state */
@@ -1249,6 +1251,7 @@ static void ahci_sw_activity_blink(unsigned long arg)
 		if (emp->blink_policy == BLINK_OFF)
 			led_message |= (1 << 16);
 	}
+	spin_unlock_irqrestore(ap->lock, flags);
 	ahci_transmit_led_message(ap, led_message, 4);
 }
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libata: ahci enclosure management led sync
  2008-10-16 14:26 [PATCH] libata: ahci enclosure management led sync David Milburn
@ 2008-10-27 14:58 ` Tejun Heo
  2008-10-28  4:40 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2008-10-27 14:58 UTC (permalink / raw)
  To: David Milburn; +Cc: jeff, linux-ide, kristen.c.accardi

David Milburn wrote:
> Synchronize ahci_sw_activity and ahci_sw_activity_blink with ata_port lock.
> 
> Signed-off-by: David Milburn <dmilburn@redhat.com>

Acked-by: Tejun Heo <tj@kernel.org>

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libata: ahci enclosure management led sync
  2008-10-16 14:26 [PATCH] libata: ahci enclosure management led sync David Milburn
  2008-10-27 14:58 ` Tejun Heo
@ 2008-10-28  4:40 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2008-10-28  4:40 UTC (permalink / raw)
  To: David Milburn; +Cc: linux-ide, kristen.c.accardi, tj

David Milburn wrote:
> Synchronize ahci_sw_activity and ahci_sw_activity_blink with ata_port lock.
> 
> Signed-off-by: David Milburn <dmilburn@redhat.com>
> --- 
>  drivers/ata/ahci.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

applied



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-28  4:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-16 14:26 [PATCH] libata: ahci enclosure management led sync David Milburn
2008-10-27 14:58 ` Tejun Heo
2008-10-28  4:40 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).