diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 11:27:20 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 11:27:28 -0400 |
| commit | 37eca0d64a2dbeece25969ec0698e1ff72bdcf39 (patch) | |
| tree | 54ba70f0428f586f4fe28d8b429b9f9e0799a17a /drivers/ata/libahci.c | |
| parent | 277b199800ac90811ac86d215063df1984f51619 (diff) | |
| parent | 3c06806e690885ce978ef180c8f8b6f8c17fb4b4 (diff) | |
Merge branch 'linus' into core/locking
Reason: Pull in the semaphore related changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/ata/libahci.c')
| -rw-r--r-- | drivers/ata/libahci.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 81e772a94d59..8eea309ea212 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
| @@ -121,7 +121,7 @@ static DEVICE_ATTR(ahci_port_cmd, S_IRUGO, ahci_show_port_cmd, NULL); | |||
| 121 | static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO, | 121 | static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO, |
| 122 | ahci_read_em_buffer, ahci_store_em_buffer); | 122 | ahci_read_em_buffer, ahci_store_em_buffer); |
| 123 | 123 | ||
| 124 | static struct device_attribute *ahci_shost_attrs[] = { | 124 | struct device_attribute *ahci_shost_attrs[] = { |
| 125 | &dev_attr_link_power_management_policy, | 125 | &dev_attr_link_power_management_policy, |
| 126 | &dev_attr_em_message_type, | 126 | &dev_attr_em_message_type, |
| 127 | &dev_attr_em_message, | 127 | &dev_attr_em_message, |
| @@ -132,22 +132,14 @@ static struct device_attribute *ahci_shost_attrs[] = { | |||
| 132 | &dev_attr_em_buffer, | 132 | &dev_attr_em_buffer, |
| 133 | NULL | 133 | NULL |
| 134 | }; | 134 | }; |
| 135 | EXPORT_SYMBOL_GPL(ahci_shost_attrs); | ||
| 135 | 136 | ||
| 136 | static struct device_attribute *ahci_sdev_attrs[] = { | 137 | struct device_attribute *ahci_sdev_attrs[] = { |
| 137 | &dev_attr_sw_activity, | 138 | &dev_attr_sw_activity, |
| 138 | &dev_attr_unload_heads, | 139 | &dev_attr_unload_heads, |
| 139 | NULL | 140 | NULL |
| 140 | }; | 141 | }; |
| 141 | 142 | EXPORT_SYMBOL_GPL(ahci_sdev_attrs); | |
| 142 | struct scsi_host_template ahci_sht = { | ||
| 143 | ATA_NCQ_SHT("ahci"), | ||
| 144 | .can_queue = AHCI_MAX_CMDS - 1, | ||
| 145 | .sg_tablesize = AHCI_MAX_SG, | ||
| 146 | .dma_boundary = AHCI_DMA_BOUNDARY, | ||
| 147 | .shost_attrs = ahci_shost_attrs, | ||
| 148 | .sdev_attrs = ahci_sdev_attrs, | ||
| 149 | }; | ||
| 150 | EXPORT_SYMBOL_GPL(ahci_sht); | ||
| 151 | 143 | ||
| 152 | struct ata_port_operations ahci_ops = { | 144 | struct ata_port_operations ahci_ops = { |
| 153 | .inherits = &sata_pmp_port_ops, | 145 | .inherits = &sata_pmp_port_ops, |
| @@ -430,6 +422,12 @@ void ahci_save_initial_config(struct device *dev, | |||
| 430 | cap &= ~HOST_CAP_SNTF; | 422 | cap &= ~HOST_CAP_SNTF; |
| 431 | } | 423 | } |
| 432 | 424 | ||
| 425 | if (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) { | ||
| 426 | dev_printk(KERN_INFO, dev, | ||
| 427 | "controller can do FBS, turning on CAP_FBS\n"); | ||
| 428 | cap |= HOST_CAP_FBS; | ||
| 429 | } | ||
| 430 | |||
| 433 | if (force_port_map && port_map != force_port_map) { | 431 | if (force_port_map && port_map != force_port_map) { |
| 434 | dev_printk(KERN_INFO, dev, "forcing port_map 0x%x -> 0x%x\n", | 432 | dev_printk(KERN_INFO, dev, "forcing port_map 0x%x -> 0x%x\n", |
| 435 | port_map, force_port_map); | 433 | port_map, force_port_map); |
| @@ -1320,7 +1318,7 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class, | |||
| 1320 | /* issue the first D2H Register FIS */ | 1318 | /* issue the first D2H Register FIS */ |
| 1321 | msecs = 0; | 1319 | msecs = 0; |
| 1322 | now = jiffies; | 1320 | now = jiffies; |
| 1323 | if (time_after(now, deadline)) | 1321 | if (time_after(deadline, now)) |
| 1324 | msecs = jiffies_to_msecs(deadline - now); | 1322 | msecs = jiffies_to_msecs(deadline - now); |
| 1325 | 1323 | ||
| 1326 | tf.ctl |= ATA_SRST; | 1324 | tf.ctl |= ATA_SRST; |
| @@ -2036,9 +2034,15 @@ static int ahci_port_start(struct ata_port *ap) | |||
| 2036 | u32 cmd = readl(port_mmio + PORT_CMD); | 2034 | u32 cmd = readl(port_mmio + PORT_CMD); |
| 2037 | if (cmd & PORT_CMD_FBSCP) | 2035 | if (cmd & PORT_CMD_FBSCP) |
| 2038 | pp->fbs_supported = true; | 2036 | pp->fbs_supported = true; |
| 2039 | else | 2037 | else if (hpriv->flags & AHCI_HFLAG_YES_FBS) { |
| 2038 | dev_printk(KERN_INFO, dev, | ||
| 2039 | "port %d can do FBS, forcing FBSCP\n", | ||
| 2040 | ap->port_no); | ||
| 2041 | pp->fbs_supported = true; | ||
| 2042 | } else | ||
| 2040 | dev_printk(KERN_WARNING, dev, | 2043 | dev_printk(KERN_WARNING, dev, |
| 2041 | "The port is not capable of FBS\n"); | 2044 | "port %d is not capable of FBS\n", |
| 2045 | ap->port_no); | ||
| 2042 | } | 2046 | } |
| 2043 | 2047 | ||
| 2044 | if (pp->fbs_supported) { | 2048 | if (pp->fbs_supported) { |
