diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-11 12:21:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-11 12:21:28 -0500 |
commit | 5da38d32824eb27c325d296bf3a39b5946578789 (patch) | |
tree | fdc0356ea0de6100a2a180fb93db98f752a543a1 | |
parent | 7e2cec8631b76e123787a57eb8334b95762b8741 (diff) | |
parent | 19b723218bde79c60a394a3caee9eb156ac2d356 (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:
libata: fix last_reset timestamp handling
libata: Avoid overflow in ata_tf_read_block() when tf->hba_lbal > 127
[libata] pata_pcmcia: another memory card support
[libata] pata_sch: notice attached slave devices
[libata] pata_cs553*.c: cleanup kernel-doc
-rw-r--r-- | drivers/ata/libata-core.c | 2 | ||||
-rw-r--r-- | drivers/ata/libata-eh.c | 21 | ||||
-rw-r--r-- | drivers/ata/pata_cs5535.c | 1 | ||||
-rw-r--r-- | drivers/ata/pata_cs5536.c | 1 | ||||
-rw-r--r-- | drivers/ata/pata_pcmcia.c | 1 | ||||
-rw-r--r-- | drivers/ata/pata_sch.c | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 0cd3ad49713..4214bfb13bb 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -612,7 +612,7 @@ u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev) | |||
612 | if (tf->flags & ATA_TFLAG_LBA48) { | 612 | if (tf->flags & ATA_TFLAG_LBA48) { |
613 | block |= (u64)tf->hob_lbah << 40; | 613 | block |= (u64)tf->hob_lbah << 40; |
614 | block |= (u64)tf->hob_lbam << 32; | 614 | block |= (u64)tf->hob_lbam << 32; |
615 | block |= tf->hob_lbal << 24; | 615 | block |= (u64)tf->hob_lbal << 24; |
616 | } else | 616 | } else |
617 | block |= (tf->device & 0xf) << 24; | 617 | block |= (tf->device & 0xf) << 24; |
618 | 618 | ||
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 8077bdf5d30..32da9a93ce4 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -610,9 +610,6 @@ void ata_scsi_error(struct Scsi_Host *host) | |||
610 | if (ata_ncq_enabled(dev)) | 610 | if (ata_ncq_enabled(dev)) |
611 | ehc->saved_ncq_enabled |= 1 << devno; | 611 | ehc->saved_ncq_enabled |= 1 << devno; |
612 | } | 612 | } |
613 | |||
614 | /* set last reset timestamp to some time in the past */ | ||
615 | ehc->last_reset = jiffies - 60 * HZ; | ||
616 | } | 613 | } |
617 | 614 | ||
618 | ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS; | 615 | ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS; |
@@ -2281,17 +2278,21 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2281 | if (link->flags & ATA_LFLAG_NO_SRST) | 2278 | if (link->flags & ATA_LFLAG_NO_SRST) |
2282 | softreset = NULL; | 2279 | softreset = NULL; |
2283 | 2280 | ||
2284 | now = jiffies; | 2281 | /* make sure each reset attemp is at least COOL_DOWN apart */ |
2285 | deadline = ata_deadline(ehc->last_reset, ATA_EH_RESET_COOL_DOWN); | 2282 | if (ehc->i.flags & ATA_EHI_DID_RESET) { |
2286 | if (time_before(now, deadline)) | 2283 | now = jiffies; |
2287 | schedule_timeout_uninterruptible(deadline - now); | 2284 | WARN_ON(time_after(ehc->last_reset, now)); |
2285 | deadline = ata_deadline(ehc->last_reset, | ||
2286 | ATA_EH_RESET_COOL_DOWN); | ||
2287 | if (time_before(now, deadline)) | ||
2288 | schedule_timeout_uninterruptible(deadline - now); | ||
2289 | } | ||
2288 | 2290 | ||
2289 | spin_lock_irqsave(ap->lock, flags); | 2291 | spin_lock_irqsave(ap->lock, flags); |
2290 | ap->pflags |= ATA_PFLAG_RESETTING; | 2292 | ap->pflags |= ATA_PFLAG_RESETTING; |
2291 | spin_unlock_irqrestore(ap->lock, flags); | 2293 | spin_unlock_irqrestore(ap->lock, flags); |
2292 | 2294 | ||
2293 | ata_eh_about_to_do(link, NULL, ATA_EH_RESET); | 2295 | ata_eh_about_to_do(link, NULL, ATA_EH_RESET); |
2294 | ehc->last_reset = jiffies; | ||
2295 | 2296 | ||
2296 | ata_link_for_each_dev(dev, link) { | 2297 | ata_link_for_each_dev(dev, link) { |
2297 | /* If we issue an SRST then an ATA drive (not ATAPI) | 2298 | /* If we issue an SRST then an ATA drive (not ATAPI) |
@@ -2379,7 +2380,6 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2379 | /* | 2380 | /* |
2380 | * Perform reset | 2381 | * Perform reset |
2381 | */ | 2382 | */ |
2382 | ehc->last_reset = jiffies; | ||
2383 | if (ata_is_host_link(link)) | 2383 | if (ata_is_host_link(link)) |
2384 | ata_eh_freeze_port(ap); | 2384 | ata_eh_freeze_port(ap); |
2385 | 2385 | ||
@@ -2391,6 +2391,7 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2391 | reset == softreset ? "soft" : "hard"); | 2391 | reset == softreset ? "soft" : "hard"); |
2392 | 2392 | ||
2393 | /* mark that this EH session started with reset */ | 2393 | /* mark that this EH session started with reset */ |
2394 | ehc->last_reset = jiffies; | ||
2394 | if (reset == hardreset) | 2395 | if (reset == hardreset) |
2395 | ehc->i.flags |= ATA_EHI_DID_HARDRESET; | 2396 | ehc->i.flags |= ATA_EHI_DID_HARDRESET; |
2396 | else | 2397 | else |
@@ -2535,7 +2536,7 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2535 | ata_eh_done(link, NULL, ATA_EH_RESET); | 2536 | ata_eh_done(link, NULL, ATA_EH_RESET); |
2536 | if (slave) | 2537 | if (slave) |
2537 | ata_eh_done(slave, NULL, ATA_EH_RESET); | 2538 | ata_eh_done(slave, NULL, ATA_EH_RESET); |
2538 | ehc->last_reset = jiffies; | 2539 | ehc->last_reset = jiffies; /* update to completion time */ |
2539 | ehc->i.action |= ATA_EH_REVALIDATE; | 2540 | ehc->i.action |= ATA_EH_REVALIDATE; |
2540 | 2541 | ||
2541 | rc = 0; | 2542 | rc = 0; |
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c index 1b2d4a0f5f7..8b236af84c2 100644 --- a/drivers/ata/pata_cs5535.c +++ b/drivers/ata/pata_cs5535.c | |||
@@ -72,7 +72,6 @@ | |||
72 | /** | 72 | /** |
73 | * cs5535_cable_detect - detect cable type | 73 | * cs5535_cable_detect - detect cable type |
74 | * @ap: Port to detect on | 74 | * @ap: Port to detect on |
75 | * @deadline: deadline jiffies for the operation | ||
76 | * | 75 | * |
77 | * Perform cable detection for ATA66 capable cable. Return a libata | 76 | * Perform cable detection for ATA66 capable cable. Return a libata |
78 | * cable type. | 77 | * cable type. |
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index 73f8332cb67..afed9297619 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c | |||
@@ -110,7 +110,6 @@ static inline int cs5536_write(struct pci_dev *pdev, int reg, int val) | |||
110 | /** | 110 | /** |
111 | * cs5536_cable_detect - detect cable type | 111 | * cs5536_cable_detect - detect cable type |
112 | * @ap: Port to detect on | 112 | * @ap: Port to detect on |
113 | * @deadline: deadline jiffies for the operation | ||
114 | * | 113 | * |
115 | * Perform cable detection for ATA66 capable cable. Return a libata | 114 | * Perform cable detection for ATA66 capable cable. Return a libata |
116 | * cable type. | 115 | * cable type. |
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 271cb64d429..64b2e2281ee 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -416,6 +416,7 @@ static struct pcmcia_device_id pcmcia_devices[] = { | |||
416 | PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), | 416 | PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), |
417 | PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e), | 417 | PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e), |
418 | PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6), | 418 | PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6), |
419 | PCMCIA_DEVICE_PROD_ID2("Flash Card", 0x5a362506), | ||
419 | PCMCIA_DEVICE_NULL, | 420 | PCMCIA_DEVICE_NULL, |
420 | }; | 421 | }; |
421 | 422 | ||
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c index c8cc027789f..6aeeeeb3412 100644 --- a/drivers/ata/pata_sch.c +++ b/drivers/ata/pata_sch.c | |||
@@ -83,7 +83,7 @@ static struct ata_port_operations sch_pata_ops = { | |||
83 | }; | 83 | }; |
84 | 84 | ||
85 | static struct ata_port_info sch_port_info = { | 85 | static struct ata_port_info sch_port_info = { |
86 | .flags = 0, | 86 | .flags = ATA_FLAG_SLAVE_POSS, |
87 | .pio_mask = ATA_PIO4, /* pio0-4 */ | 87 | .pio_mask = ATA_PIO4, /* pio0-4 */ |
88 | .mwdma_mask = ATA_MWDMA2, /* mwdma0-2 */ | 88 | .mwdma_mask = ATA_MWDMA2, /* mwdma0-2 */ |
89 | .udma_mask = ATA_UDMA5, /* udma0-5 */ | 89 | .udma_mask = ATA_UDMA5, /* udma0-5 */ |