*** linux-2.6.28.8/drivers/ide/Kconfig.old	2009-03-19 21:30:24.594129124 +0900
--- linux-2.6.28.8/drivers/ide/Kconfig	2009-03-19 21:49:41.776996312 +0900
***************
*** 691,696 ****
--- 691,706 ----
  	  CD-ROM on hda. This option changes this to more natural hda for
  	  hard disk and hdc for CD-ROM.
  
+ config BLK_DEV_IDE_PMAC_SHORTCABLE
+        bool "Assume short IDE cable on PowerBook/iBook"
+        depends on BLK_DEV_IDE_PMAC
+        help
+          Some IDE drives fail to recognize 80-conductor IDE cable used in
+ 	 PowerBooks and the driver limits the transfer speed to ATA/33.
+ 	 With this option, the driver reports the 80-conductor cable to be 
+ 	 of "40 conductor short" type on PowerBook/iBook, and enables to use
+ 	 ATA/100 on drives that support the transfer mode.
+ 
  config BLK_DEV_IDE_AU1XXX
         bool "IDE for AMD Alchemy Au1200"
         depends on SOC_AU1200
*** linux-2.6.28.8/drivers/ide/pmac.c.orig	2009-03-19 22:21:14.137849502 +0900
--- linux-2.6.28.8/drivers/ide/pmac.c	2009-03-19 22:16:44.612877441 +0900
***************
*** 917,926 ****
  		(pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
  	struct device_node *np = pmif->node;
  	const char *cable = of_get_property(np, "cable-type", NULL);
  
  	/* Get cable type from device-tree. */
  	if (cable && !strncmp(cable, "80-", 3))
! 		return ATA_CBL_PATA80;
  
  	/*
  	 * G5's seem to have incorrect cable type in device-tree.
--- 917,938 ----
  		(pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
  	struct device_node *np = pmif->node;
  	const char *cable = of_get_property(np, "cable-type", NULL);
+ #ifdef CONFIG_BLK_DEV_IDE_PMAC_SHORTCABLE
+ 	struct device_node *root = of_find_node_by_path("/");
+ 	const char *model = of_get_property(root, "model", NULL);
+ #endif
  
  	/* Get cable type from device-tree. */
  	if (cable && !strncmp(cable, "80-", 3))
! 	  {
! #ifdef CONFIG_BLK_DEV_IDE_PMAC_SHORTCABLE
! 	    if(strncmp(model,"PowerBook",9)==0)
! 	      /* Some drives fail to detect 80c cable in PowerBook */
! 	      return ATA_CBL_PATA40_SHORT;
! 	    else
! #endif
! 	      return ATA_CBL_PATA80;
! 	  }
  
  	/*
  	 * G5's seem to have incorrect cable type in device-tree.
