diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-28 15:03:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-28 15:03:14 -0400 |
| commit | 2a397e82c7db18019e408f953dd58dc1963a328c (patch) | |
| tree | 43ccaec68cc3aa1b3903e2b4c970d31b8737d4ed | |
| parent | ea45d15394c57cb214aef8e6d40976c128995d43 (diff) | |
| parent | 8588a2b732928b343233af9b1855705b8286bed4 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide: add SH-S202J to ivb_list[]
drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings
drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n
hpt366: fix build for CONFIG_HOTPLUG=n
cy82c693: fix build for CONFIG_HOTPLUG=n
| -rw-r--r-- | drivers/ide/ide-iops.c | 3 | ||||
| -rw-r--r-- | drivers/ide/pci/cy82c693.c | 6 | ||||
| -rw-r--r-- | drivers/ide/pci/generic.c | 2 | ||||
| -rw-r--r-- | drivers/ide/pci/hpt366.c | 32 | ||||
| -rw-r--r-- | drivers/ide/pci/sc1200.c | 9 |
5 files changed, 28 insertions, 24 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 95168833d0..dcda0f109d 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
| @@ -582,9 +582,12 @@ EXPORT_SYMBOL_GPL(ide_in_drive_list); | |||
| 582 | /* | 582 | /* |
| 583 | * Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. | 583 | * Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. |
| 584 | * We list them here and depend on the device side cable detection for them. | 584 | * We list them here and depend on the device side cable detection for them. |
| 585 | * | ||
| 586 | * Some optical devices with the buggy firmwares have the same problem. | ||
| 585 | */ | 587 | */ |
| 586 | static const struct drive_list_entry ivb_list[] = { | 588 | static const struct drive_list_entry ivb_list[] = { |
| 587 | { "QUANTUM FIREBALLlct10 05" , "A03.0900" }, | 589 | { "QUANTUM FIREBALLlct10 05" , "A03.0900" }, |
| 590 | { "TSSTcorp CDDVDW SH-S202J" , "SB00" }, | ||
| 588 | { NULL , NULL } | 591 | { NULL , NULL } |
| 589 | }; | 592 | }; |
| 590 | 593 | ||
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 3ef4fc10fe..1cd4e9cb05 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/drivers/ide/pci/cy82c693.c Version 0.41 Aug 27, 2007 | 2 | * linux/drivers/ide/pci/cy82c693.c Version 0.42 Oct 23, 2007 |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer | 4 | * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer |
| 5 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrator | 5 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrator |
| @@ -436,10 +436,10 @@ static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) | |||
| 436 | hwif->ide_dma_on = &cy82c693_ide_dma_on; | 436 | hwif->ide_dma_on = &cy82c693_ide_dma_on; |
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | static __devinitdata ide_hwif_t *primary; | ||
| 440 | |||
| 441 | static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) | 439 | static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) |
| 442 | { | 440 | { |
| 441 | static ide_hwif_t *primary; | ||
| 442 | |||
| 443 | if (PCI_FUNC(hwif->pci_dev->devfn) == 1) | 443 | if (PCI_FUNC(hwif->pci_dev->devfn) == 1) |
| 444 | primary = hwif; | 444 | primary = hwif; |
| 445 | else { | 445 | else { |
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index f44d70852c..06885697ed 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
| @@ -49,7 +49,7 @@ static int __init ide_generic_all_on(char *unused) | |||
| 49 | printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n"); | 49 | printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n"); |
| 50 | return 1; | 50 | return 1; |
| 51 | } | 51 | } |
| 52 | __setup("all-generic-ide", ide_generic_all_on); | 52 | const __setup("all-generic-ide", ide_generic_all_on); |
| 53 | #endif | 53 | #endif |
| 54 | module_param_named(all_generic_ide, ide_generic_all, bool, 0444); | 54 | module_param_named(all_generic_ide, ide_generic_all, bool, 0444); |
| 55 | MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); | 55 | MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 612b795241..5682895d36 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/drivers/ide/pci/hpt366.c Version 1.20 Oct 1, 2007 | 2 | * linux/drivers/ide/pci/hpt366.c Version 1.21 Oct 23, 2007 |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> |
| 5 | * Portions Copyright (C) 2001 Sun Microsystems, Inc. | 5 | * Portions Copyright (C) 2001 Sun Microsystems, Inc. |
| @@ -433,7 +433,7 @@ static u32 *hpt37x_settings[NUM_ATA_CLOCKS] = { | |||
| 433 | sixty_six_base_hpt37x | 433 | sixty_six_base_hpt37x |
| 434 | }; | 434 | }; |
| 435 | 435 | ||
| 436 | static struct hpt_info hpt36x __devinitdata = { | 436 | static const struct hpt_info hpt36x __devinitdata = { |
| 437 | .chip_name = "HPT36x", | 437 | .chip_name = "HPT36x", |
| 438 | .chip_type = HPT36x, | 438 | .chip_type = HPT36x, |
| 439 | .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2, | 439 | .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2, |
| @@ -441,7 +441,7 @@ static struct hpt_info hpt36x __devinitdata = { | |||
| 441 | .settings = hpt36x_settings | 441 | .settings = hpt36x_settings |
| 442 | }; | 442 | }; |
| 443 | 443 | ||
| 444 | static struct hpt_info hpt370 __devinitdata = { | 444 | static const struct hpt_info hpt370 __devinitdata = { |
| 445 | .chip_name = "HPT370", | 445 | .chip_name = "HPT370", |
| 446 | .chip_type = HPT370, | 446 | .chip_type = HPT370, |
| 447 | .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, | 447 | .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, |
| @@ -449,7 +449,7 @@ static struct hpt_info hpt370 __devinitdata = { | |||
| 449 | .settings = hpt37x_settings | 449 | .settings = hpt37x_settings |
| 450 | }; | 450 | }; |
| 451 | 451 | ||
| 452 | static struct hpt_info hpt370a __devinitdata = { | 452 | static const struct hpt_info hpt370a __devinitdata = { |
| 453 | .chip_name = "HPT370A", | 453 | .chip_name = "HPT370A", |
| 454 | .chip_type = HPT370A, | 454 | .chip_type = HPT370A, |
| 455 | .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, | 455 | .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, |
| @@ -457,7 +457,7 @@ static struct hpt_info hpt370a __devinitdata = { | |||
| 457 | .settings = hpt37x_settings | 457 | .settings = hpt37x_settings |
| 458 | }; | 458 | }; |
| 459 | 459 | ||
| 460 | static struct hpt_info hpt374 __devinitdata = { | 460 | static const struct hpt_info hpt374 __devinitdata = { |
| 461 | .chip_name = "HPT374", | 461 | .chip_name = "HPT374", |
| 462 | .chip_type = HPT374, | 462 | .chip_type = HPT374, |
| 463 | .udma_mask = ATA_UDMA5, | 463 | .udma_mask = ATA_UDMA5, |
| @@ -465,7 +465,7 @@ static struct hpt_info hpt374 __devinitdata = { | |||
| 465 | .settings = hpt37x_settings | 465 | .settings = hpt37x_settings |
| 466 | }; | 466 | }; |
| 467 | 467 | ||
| 468 | static struct hpt_info hpt372 __devinitdata = { | 468 | static const struct hpt_info hpt372 __devinitdata = { |
| 469 | .chip_name = "HPT372", | 469 | .chip_name = "HPT372", |
| 470 | .chip_type = HPT372, | 470 | .chip_type = HPT372, |
| 471 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 471 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -473,7 +473,7 @@ static struct hpt_info hpt372 __devinitdata = { | |||
| 473 | .settings = hpt37x_settings | 473 | .settings = hpt37x_settings |
| 474 | }; | 474 | }; |
| 475 | 475 | ||
| 476 | static struct hpt_info hpt372a __devinitdata = { | 476 | static const struct hpt_info hpt372a __devinitdata = { |
| 477 | .chip_name = "HPT372A", | 477 | .chip_name = "HPT372A", |
| 478 | .chip_type = HPT372A, | 478 | .chip_type = HPT372A, |
| 479 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 479 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -481,7 +481,7 @@ static struct hpt_info hpt372a __devinitdata = { | |||
| 481 | .settings = hpt37x_settings | 481 | .settings = hpt37x_settings |
| 482 | }; | 482 | }; |
| 483 | 483 | ||
| 484 | static struct hpt_info hpt302 __devinitdata = { | 484 | static const struct hpt_info hpt302 __devinitdata = { |
| 485 | .chip_name = "HPT302", | 485 | .chip_name = "HPT302", |
| 486 | .chip_type = HPT302, | 486 | .chip_type = HPT302, |
| 487 | .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 487 | .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -489,7 +489,7 @@ static struct hpt_info hpt302 __devinitdata = { | |||
| 489 | .settings = hpt37x_settings | 489 | .settings = hpt37x_settings |
| 490 | }; | 490 | }; |
| 491 | 491 | ||
| 492 | static struct hpt_info hpt371 __devinitdata = { | 492 | static const struct hpt_info hpt371 __devinitdata = { |
| 493 | .chip_name = "HPT371", | 493 | .chip_name = "HPT371", |
| 494 | .chip_type = HPT371, | 494 | .chip_type = HPT371, |
| 495 | .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 495 | .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -497,7 +497,7 @@ static struct hpt_info hpt371 __devinitdata = { | |||
| 497 | .settings = hpt37x_settings | 497 | .settings = hpt37x_settings |
| 498 | }; | 498 | }; |
| 499 | 499 | ||
| 500 | static struct hpt_info hpt372n __devinitdata = { | 500 | static const struct hpt_info hpt372n __devinitdata = { |
| 501 | .chip_name = "HPT372N", | 501 | .chip_name = "HPT372N", |
| 502 | .chip_type = HPT372N, | 502 | .chip_type = HPT372N, |
| 503 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 503 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -505,7 +505,7 @@ static struct hpt_info hpt372n __devinitdata = { | |||
| 505 | .settings = hpt37x_settings | 505 | .settings = hpt37x_settings |
| 506 | }; | 506 | }; |
| 507 | 507 | ||
| 508 | static struct hpt_info hpt302n __devinitdata = { | 508 | static const struct hpt_info hpt302n __devinitdata = { |
| 509 | .chip_name = "HPT302N", | 509 | .chip_name = "HPT302N", |
| 510 | .chip_type = HPT302N, | 510 | .chip_type = HPT302N, |
| 511 | .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 511 | .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -513,7 +513,7 @@ static struct hpt_info hpt302n __devinitdata = { | |||
| 513 | .settings = hpt37x_settings | 513 | .settings = hpt37x_settings |
| 514 | }; | 514 | }; |
| 515 | 515 | ||
| 516 | static struct hpt_info hpt371n __devinitdata = { | 516 | static const struct hpt_info hpt371n __devinitdata = { |
| 517 | .chip_name = "HPT371N", | 517 | .chip_name = "HPT371N", |
| 518 | .chip_type = HPT371N, | 518 | .chip_type = HPT371N, |
| 519 | .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 519 | .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -1508,7 +1508,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitdata = { | |||
| 1508 | */ | 1508 | */ |
| 1509 | static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 1509 | static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 1510 | { | 1510 | { |
| 1511 | struct hpt_info *info = NULL; | 1511 | const struct hpt_info *info = NULL; |
| 1512 | struct pci_dev *dev2 = NULL; | 1512 | struct pci_dev *dev2 = NULL; |
| 1513 | struct ide_port_info d; | 1513 | struct ide_port_info d; |
| 1514 | u8 idx = id->driver_data; | 1514 | u8 idx = id->driver_data; |
| @@ -1522,7 +1522,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic | |||
| 1522 | if (rev < 3) | 1522 | if (rev < 3) |
| 1523 | info = &hpt36x; | 1523 | info = &hpt36x; |
| 1524 | else { | 1524 | else { |
| 1525 | static struct hpt_info *hpt37x_info[] = | 1525 | static const struct hpt_info *hpt37x_info[] = |
| 1526 | { &hpt370, &hpt370a, &hpt372, &hpt372n }; | 1526 | { &hpt370, &hpt370a, &hpt372, &hpt372n }; |
| 1527 | 1527 | ||
| 1528 | info = hpt37x_info[min_t(u8, rev, 6) - 3]; | 1528 | info = hpt37x_info[min_t(u8, rev, 6) - 3]; |
| @@ -1552,7 +1552,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic | |||
| 1552 | d.name = info->chip_name; | 1552 | d.name = info->chip_name; |
| 1553 | d.udma_mask = info->udma_mask; | 1553 | d.udma_mask = info->udma_mask; |
| 1554 | 1554 | ||
| 1555 | pci_set_drvdata(dev, info); | 1555 | pci_set_drvdata(dev, (void *)info); |
| 1556 | 1556 | ||
| 1557 | if (info == &hpt36x || info == &hpt374) | 1557 | if (info == &hpt36x || info == &hpt374) |
| 1558 | dev2 = pci_get_slot(dev->bus, dev->devfn + 1); | 1558 | dev2 = pci_get_slot(dev->bus, dev->devfn + 1); |
| @@ -1560,7 +1560,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic | |||
| 1560 | if (dev2) { | 1560 | if (dev2) { |
| 1561 | int ret; | 1561 | int ret; |
| 1562 | 1562 | ||
| 1563 | pci_set_drvdata(dev2, info); | 1563 | pci_set_drvdata(dev2, (void *)info); |
| 1564 | 1564 | ||
| 1565 | if (info == &hpt374) | 1565 | if (info == &hpt374) |
| 1566 | hpt374_init(dev, dev2); | 1566 | hpt374_init(dev, dev2); |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index d2c8b5524f..0a7b320206 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
| @@ -324,17 +324,18 @@ static int sc1200_suspend (struct pci_dev *dev, pm_message_t state) | |||
| 324 | 324 | ||
| 325 | pci_disable_device(dev); | 325 | pci_disable_device(dev); |
| 326 | pci_set_power_state(dev, pci_choose_state(dev, state)); | 326 | pci_set_power_state(dev, pci_choose_state(dev, state)); |
| 327 | dev->current_state = state.event; | ||
| 328 | return 0; | 327 | return 0; |
| 329 | } | 328 | } |
| 330 | 329 | ||
| 331 | static int sc1200_resume (struct pci_dev *dev) | 330 | static int sc1200_resume (struct pci_dev *dev) |
| 332 | { | 331 | { |
| 333 | ide_hwif_t *hwif = NULL; | 332 | ide_hwif_t *hwif = NULL; |
| 333 | int i; | ||
| 334 | |||
| 335 | i = pci_enable_device(dev); | ||
| 336 | if (i) | ||
| 337 | return i; | ||
| 334 | 338 | ||
| 335 | pci_set_power_state(dev, PCI_D0); // bring chip back from sleep state | ||
| 336 | dev->current_state = PM_EVENT_ON; | ||
| 337 | pci_enable_device(dev); | ||
| 338 | // | 339 | // |
| 339 | // loop over all interfaces that are part of this pci device: | 340 | // loop over all interfaces that are part of this pci device: |
| 340 | // | 341 | // |
