diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-15 13:29:09 -0400 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-15 13:29:09 -0400 | 
| commit | 35b5c55fee08e6e4001ba98060a2d0b82f70b5f4 (patch) | |
| tree | a50b920260c7ccdb2da90bd6a064de168280beeb | |
| parent | e9e961c9a818a2f24711af493b907a8e40a69efc (diff) | |
| parent | b2dde6afe5d29212d521e69492ebc299db235001 (diff) | |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: add device ID for 82801JI sata controller
  drivers/ata: Move a dereference below a NULL test
  libata: implement and use HORKAGE_NOSETXFER, take#2
  libata: fix follow-up SRST failure path
| -rw-r--r-- | drivers/ata/ahci.c | 1 | ||||
| -rw-r--r-- | drivers/ata/libata-core.c | 20 | ||||
| -rw-r--r-- | drivers/ata/libata-eh.c | 4 | ||||
| -rw-r--r-- | drivers/ata/pata_at91.c | 3 | ||||
| -rw-r--r-- | include/linux/libata.h | 1 | 
5 files changed, 26 insertions, 3 deletions
| diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 15a23031833f..336eb1ed73cc 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -513,6 +513,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
| 513 | { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */ | 513 | { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */ | 
| 514 | { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ | 514 | { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ | 
| 515 | { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ | 515 | { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ | 
| 516 | { PCI_VDEVICE(INTEL, 0x3a22), board_ahci }, /* ICH10 */ | ||
| 516 | { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ | 517 | { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ | 
| 517 | { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ | 518 | { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ | 
| 518 | { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ | 519 | { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ | 
| diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 045a486a09ea..2c6aedaef718 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -3392,17 +3392,27 @@ int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel) | |||
| 3392 | 3392 | ||
| 3393 | static int ata_dev_set_mode(struct ata_device *dev) | 3393 | static int ata_dev_set_mode(struct ata_device *dev) | 
| 3394 | { | 3394 | { | 
| 3395 | struct ata_port *ap = dev->link->ap; | ||
| 3395 | struct ata_eh_context *ehc = &dev->link->eh_context; | 3396 | struct ata_eh_context *ehc = &dev->link->eh_context; | 
| 3397 | const bool nosetxfer = dev->horkage & ATA_HORKAGE_NOSETXFER; | ||
| 3396 | const char *dev_err_whine = ""; | 3398 | const char *dev_err_whine = ""; | 
| 3397 | int ign_dev_err = 0; | 3399 | int ign_dev_err = 0; | 
| 3398 | unsigned int err_mask; | 3400 | unsigned int err_mask = 0; | 
| 3399 | int rc; | 3401 | int rc; | 
| 3400 | 3402 | ||
| 3401 | dev->flags &= ~ATA_DFLAG_PIO; | 3403 | dev->flags &= ~ATA_DFLAG_PIO; | 
| 3402 | if (dev->xfer_shift == ATA_SHIFT_PIO) | 3404 | if (dev->xfer_shift == ATA_SHIFT_PIO) | 
| 3403 | dev->flags |= ATA_DFLAG_PIO; | 3405 | dev->flags |= ATA_DFLAG_PIO; | 
| 3404 | 3406 | ||
| 3405 | err_mask = ata_dev_set_xfermode(dev); | 3407 | if (nosetxfer && ap->flags & ATA_FLAG_SATA && ata_id_is_sata(dev->id)) | 
| 3408 | dev_err_whine = " (SET_XFERMODE skipped)"; | ||
| 3409 | else { | ||
| 3410 | if (nosetxfer) | ||
| 3411 | ata_dev_printk(dev, KERN_WARNING, | ||
| 3412 | "NOSETXFER but PATA detected - can't " | ||
| 3413 | "skip SETXFER, might malfunction\n"); | ||
| 3414 | err_mask = ata_dev_set_xfermode(dev); | ||
| 3415 | } | ||
| 3406 | 3416 | ||
| 3407 | if (err_mask & ~AC_ERR_DEV) | 3417 | if (err_mask & ~AC_ERR_DEV) | 
| 3408 | goto fail; | 3418 | goto fail; | 
| @@ -4297,6 +4307,12 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
| 4297 | /* Devices which aren't very happy with higher link speeds */ | 4307 | /* Devices which aren't very happy with higher link speeds */ | 
| 4298 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, | 4308 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, | 
| 4299 | 4309 | ||
| 4310 | /* | ||
| 4311 | * Devices which choke on SETXFER. Applies only if both the | ||
| 4312 | * device and controller are SATA. | ||
| 4313 | */ | ||
| 4314 | { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER }, | ||
| 4315 | |||
| 4300 | /* End Marker */ | 4316 | /* End Marker */ | 
| 4301 | { } | 4317 | { } | 
| 4302 | }; | 4318 | }; | 
| diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index fa22f94ca415..1a07c061f644 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -2517,6 +2517,10 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
| 2517 | 2517 | ||
| 2518 | ata_eh_about_to_do(link, NULL, ATA_EH_RESET); | 2518 | ata_eh_about_to_do(link, NULL, ATA_EH_RESET); | 
| 2519 | rc = ata_do_reset(link, reset, classes, deadline, true); | 2519 | rc = ata_do_reset(link, reset, classes, deadline, true); | 
| 2520 | if (rc) { | ||
| 2521 | failed_link = link; | ||
| 2522 | goto fail; | ||
| 2523 | } | ||
| 2520 | } | 2524 | } | 
| 2521 | } else { | 2525 | } else { | 
| 2522 | if (verbose) | 2526 | if (verbose) | 
| diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index 4b27617be26d..8561a9f195c1 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c | |||
| @@ -312,11 +312,12 @@ err_ide_ioremap: | |||
| 312 | static int __devexit pata_at91_remove(struct platform_device *pdev) | 312 | static int __devexit pata_at91_remove(struct platform_device *pdev) | 
| 313 | { | 313 | { | 
| 314 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 314 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 
| 315 | struct at91_ide_info *info = host->private_data; | 315 | struct at91_ide_info *info; | 
| 316 | struct device *dev = &pdev->dev; | 316 | struct device *dev = &pdev->dev; | 
| 317 | 317 | ||
| 318 | if (!host) | 318 | if (!host) | 
| 319 | return 0; | 319 | return 0; | 
| 320 | info = host->private_data; | ||
| 320 | 321 | ||
| 321 | ata_host_detach(host); | 322 | ata_host_detach(host); | 
| 322 | 323 | ||
| diff --git a/include/linux/libata.h b/include/linux/libata.h index 3d501db36a26..79b6d7fd4ac2 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -385,6 +385,7 @@ enum { | |||
| 385 | not multiple of 16 bytes */ | 385 | not multiple of 16 bytes */ | 
| 386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ | 386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ | 
| 387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | 387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | 
| 388 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ | ||
| 388 | 389 | ||
| 389 | /* DMA mask for user DMA control: User visible values; DO NOT | 390 | /* DMA mask for user DMA control: User visible values; DO NOT | 
| 390 | renumber */ | 391 | renumber */ | 
