]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/ahci.c
libata: ahci enclosure management led sync
[linux-2.6-omap-h63xx.git] / drivers / ata / ahci.c
index aeadd00411a187dc164eaa4abe4c3a447af8af59..3c71d31334315a0a5c20c5920efb4f66d6f70dfe 100644 (file)
@@ -588,6 +588,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
        { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },        /* 6145 */
        { PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv },        /* 6121 */
 
+       /* Promise */
+       { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci },   /* PDC42819 */
+
        /* Generic, PCI class code for AHCI */
        { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
          PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
@@ -1220,6 +1223,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);
@@ -1228,6 +1232,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 */
@@ -1250,6 +1255,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);
 }