Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+28 -24
+3
drivers/ide/ide-iops.c
··· 582 582 /* 583 583 * Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. 584 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 588 static const struct drive_list_entry ivb_list[] = { 587 589 { "QUANTUM FIREBALLlct10 05" , "A03.0900" }, 590 + { "TSSTcorp CDDVDW SH-S202J" , "SB00" }, 588 591 { NULL , NULL } 589 592 }; 590 593
+3 -3
drivers/ide/pci/cy82c693.c
··· 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 4 * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer 5 5 * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrator ··· 436 436 hwif->ide_dma_on = &cy82c693_ide_dma_on; 437 437 } 438 438 439 - static __devinitdata ide_hwif_t *primary; 440 - 441 439 static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) 442 440 { 441 + static ide_hwif_t *primary; 442 + 443 443 if (PCI_FUNC(hwif->pci_dev->devfn) == 1) 444 444 primary = hwif; 445 445 else {
+1 -1
drivers/ide/pci/generic.c
··· 49 49 printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n"); 50 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 53 #endif 54 54 module_param_named(all_generic_ide, ide_generic_all, bool, 0444); 55 55 MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers.");
+16 -16
drivers/ide/pci/hpt366.c
··· 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 4 * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> 5 5 * Portions Copyright (C) 2001 Sun Microsystems, Inc. ··· 433 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 437 .chip_name = "HPT36x", 438 438 .chip_type = HPT36x, 439 439 .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2, ··· 441 441 .settings = hpt36x_settings 442 442 }; 443 443 444 - static struct hpt_info hpt370 __devinitdata = { 444 + static const struct hpt_info hpt370 __devinitdata = { 445 445 .chip_name = "HPT370", 446 446 .chip_type = HPT370, 447 447 .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, ··· 449 449 .settings = hpt37x_settings 450 450 }; 451 451 452 - static struct hpt_info hpt370a __devinitdata = { 452 + static const struct hpt_info hpt370a __devinitdata = { 453 453 .chip_name = "HPT370A", 454 454 .chip_type = HPT370A, 455 455 .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, ··· 457 457 .settings = hpt37x_settings 458 458 }; 459 459 460 - static struct hpt_info hpt374 __devinitdata = { 460 + static const struct hpt_info hpt374 __devinitdata = { 461 461 .chip_name = "HPT374", 462 462 .chip_type = HPT374, 463 463 .udma_mask = ATA_UDMA5, ··· 465 465 .settings = hpt37x_settings 466 466 }; 467 467 468 - static struct hpt_info hpt372 __devinitdata = { 468 + static const struct hpt_info hpt372 __devinitdata = { 469 469 .chip_name = "HPT372", 470 470 .chip_type = HPT372, 471 471 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, ··· 473 473 .settings = hpt37x_settings 474 474 }; 475 475 476 - static struct hpt_info hpt372a __devinitdata = { 476 + static const struct hpt_info hpt372a __devinitdata = { 477 477 .chip_name = "HPT372A", 478 478 .chip_type = HPT372A, 479 479 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, ··· 481 481 .settings = hpt37x_settings 482 482 }; 483 483 484 - static struct hpt_info hpt302 __devinitdata = { 484 + static const struct hpt_info hpt302 __devinitdata = { 485 485 .chip_name = "HPT302", 486 486 .chip_type = HPT302, 487 487 .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, ··· 489 489 .settings = hpt37x_settings 490 490 }; 491 491 492 - static struct hpt_info hpt371 __devinitdata = { 492 + static const struct hpt_info hpt371 __devinitdata = { 493 493 .chip_name = "HPT371", 494 494 .chip_type = HPT371, 495 495 .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, ··· 497 497 .settings = hpt37x_settings 498 498 }; 499 499 500 - static struct hpt_info hpt372n __devinitdata = { 500 + static const struct hpt_info hpt372n __devinitdata = { 501 501 .chip_name = "HPT372N", 502 502 .chip_type = HPT372N, 503 503 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, ··· 505 505 .settings = hpt37x_settings 506 506 }; 507 507 508 - static struct hpt_info hpt302n __devinitdata = { 508 + static const struct hpt_info hpt302n __devinitdata = { 509 509 .chip_name = "HPT302N", 510 510 .chip_type = HPT302N, 511 511 .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, ··· 513 513 .settings = hpt37x_settings 514 514 }; 515 515 516 - static struct hpt_info hpt371n __devinitdata = { 516 + static const struct hpt_info hpt371n __devinitdata = { 517 517 .chip_name = "HPT371N", 518 518 .chip_type = HPT371N, 519 519 .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, ··· 1508 1508 */ 1509 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 1512 struct pci_dev *dev2 = NULL; 1513 1513 struct ide_port_info d; 1514 1514 u8 idx = id->driver_data; ··· 1522 1522 if (rev < 3) 1523 1523 info = &hpt36x; 1524 1524 else { 1525 - static struct hpt_info *hpt37x_info[] = 1525 + static const struct hpt_info *hpt37x_info[] = 1526 1526 { &hpt370, &hpt370a, &hpt372, &hpt372n }; 1527 1527 1528 1528 info = hpt37x_info[min_t(u8, rev, 6) - 3]; ··· 1552 1552 d.name = info->chip_name; 1553 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 1557 if (info == &hpt36x || info == &hpt374) 1558 1558 dev2 = pci_get_slot(dev->bus, dev->devfn + 1); ··· 1560 1560 if (dev2) { 1561 1561 int ret; 1562 1562 1563 - pci_set_drvdata(dev2, info); 1563 + pci_set_drvdata(dev2, (void *)info); 1564 1564 1565 1565 if (info == &hpt374) 1566 1566 hpt374_init(dev, dev2);
+5 -4
drivers/ide/pci/sc1200.c
··· 324 324 325 325 pci_disable_device(dev); 326 326 pci_set_power_state(dev, pci_choose_state(dev, state)); 327 - dev->current_state = state.event; 328 327 return 0; 329 328 } 330 329 331 330 static int sc1200_resume (struct pci_dev *dev) 332 331 { 333 332 ide_hwif_t *hwif = NULL; 333 + int i; 334 334 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); 335 + i = pci_enable_device(dev); 336 + if (i) 337 + return i; 338 + 338 339 // 339 340 // loop over all interfaces that are part of this pci device: 340 341 //