aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libahci.c11
-rw-r--r--include/linux/libata.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 3797a7bba15d..64c3f1f41af1 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -173,6 +173,7 @@ struct ata_port_operations ahci_ops = {
173 .em_store = ahci_led_store, 173 .em_store = ahci_led_store,
174 .sw_activity_show = ahci_activity_show, 174 .sw_activity_show = ahci_activity_show,
175 .sw_activity_store = ahci_activity_store, 175 .sw_activity_store = ahci_activity_store,
176 .transmit_led_message = ahci_transmit_led_message,
176#ifdef CONFIG_PM 177#ifdef CONFIG_PM
177 .port_suspend = ahci_port_suspend, 178 .port_suspend = ahci_port_suspend,
178 .port_resume = ahci_port_resume, 179 .port_resume = ahci_port_resume,
@@ -774,7 +775,7 @@ static void ahci_start_port(struct ata_port *ap)
774 775
775 /* EM Transmit bit maybe busy during init */ 776 /* EM Transmit bit maybe busy during init */
776 for (i = 0; i < EM_MAX_RETRY; i++) { 777 for (i = 0; i < EM_MAX_RETRY; i++) {
777 rc = ahci_transmit_led_message(ap, 778 rc = ap->ops->transmit_led_message(ap,
778 emp->led_state, 779 emp->led_state,
779 4); 780 4);
780 if (rc == -EBUSY) 781 if (rc == -EBUSY)
@@ -915,7 +916,7 @@ static void ahci_sw_activity_blink(unsigned long arg)
915 led_message |= (1 << 16); 916 led_message |= (1 << 16);
916 } 917 }
917 spin_unlock_irqrestore(ap->lock, flags); 918 spin_unlock_irqrestore(ap->lock, flags);
918 ahci_transmit_led_message(ap, led_message, 4); 919 ap->ops->transmit_led_message(ap, led_message, 4);
919} 920}
920 921
921static void ahci_init_sw_activity(struct ata_link *link) 922static void ahci_init_sw_activity(struct ata_link *link)
@@ -1044,7 +1045,7 @@ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
1044 if (emp->blink_policy) 1045 if (emp->blink_policy)
1045 state &= ~EM_MSG_LED_VALUE_ACTIVITY; 1046 state &= ~EM_MSG_LED_VALUE_ACTIVITY;
1046 1047
1047 return ahci_transmit_led_message(ap, state, size); 1048 return ap->ops->transmit_led_message(ap, state, size);
1048} 1049}
1049 1050
1050static ssize_t ahci_activity_store(struct ata_device *dev, enum sw_activity val) 1051static ssize_t ahci_activity_store(struct ata_device *dev, enum sw_activity val)
@@ -1063,7 +1064,7 @@ static ssize_t ahci_activity_store(struct ata_device *dev, enum sw_activity val)
1063 /* set the LED to OFF */ 1064 /* set the LED to OFF */
1064 port_led_state &= EM_MSG_LED_VALUE_OFF; 1065 port_led_state &= EM_MSG_LED_VALUE_OFF;
1065 port_led_state |= (ap->port_no | (link->pmp << 8)); 1066 port_led_state |= (ap->port_no | (link->pmp << 8));
1066 ahci_transmit_led_message(ap, port_led_state, 4); 1067 ap->ops->transmit_led_message(ap, port_led_state, 4);
1067 } else { 1068 } else {
1068 link->flags |= ATA_LFLAG_SW_ACTIVITY; 1069 link->flags |= ATA_LFLAG_SW_ACTIVITY;
1069 if (val == BLINK_OFF) { 1070 if (val == BLINK_OFF) {
@@ -1071,7 +1072,7 @@ static ssize_t ahci_activity_store(struct ata_device *dev, enum sw_activity val)
1071 port_led_state &= EM_MSG_LED_VALUE_OFF; 1072 port_led_state &= EM_MSG_LED_VALUE_OFF;
1072 port_led_state |= (ap->port_no | (link->pmp << 8)); 1073 port_led_state |= (ap->port_no | (link->pmp << 8));
1073 port_led_state |= EM_MSG_LED_VALUE_ON; /* check this */ 1074 port_led_state |= EM_MSG_LED_VALUE_ON; /* check this */
1074 ahci_transmit_led_message(ap, port_led_state, 4); 1075 ap->ops->transmit_led_message(ap, port_led_state, 4);
1075 } 1076 }
1076 } 1077 }
1077 emp->blink_policy = val; 1078 emp->blink_policy = val;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index c886dc87aa81..4ea55bb45deb 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -910,6 +910,9 @@ struct ata_port_operations {
910 ssize_t (*sw_activity_show)(struct ata_device *dev, char *buf); 910 ssize_t (*sw_activity_show)(struct ata_device *dev, char *buf);
911 ssize_t (*sw_activity_store)(struct ata_device *dev, 911 ssize_t (*sw_activity_store)(struct ata_device *dev,
912 enum sw_activity val); 912 enum sw_activity val);
913 ssize_t (*transmit_led_message)(struct ata_port *ap, u32 state,
914 ssize_t size);
915
913 /* 916 /*
914 * Obsolete 917 * Obsolete
915 */ 918 */