)]}'
{
  "commit": "31daabda16063b64a99a526242add727601e43c3",
  "tree": "771e48219041e0a60f33f439c35324d0a3849224",
  "parents": [
    "b8cffc6ad8c000410186815b7bcc6b76ef1bbb13"
  ],
  "author": {
    "name": "Tejun Heo",
    "email": "htejun@gmail.com",
    "time": "Fri Feb 02 16:50:52 2007 +0900"
  },
  "committer": {
    "name": "Jeff Garzik",
    "email": "jeff@garzik.org",
    "time": "Tue May 01 07:49:54 2007 -0400"
  },
  "message": "libata: reimplement reset sequencing\n\nlibata previously depended upon waits in prereset to get resets after\nhotplug right for both spin up and device ready wait.  This was\nnecessary both for reliablity and speed as reset was likely to fail if\ninitiated too early and each try usually took more than 30secs to\nfail.  Previous patches fixed the reliability part by fixing status\nand SCR handling in resets.  This patch remedies the speed part by\nimproving reset sequencing.\n\nPrereset waiting timeout is adjusted to 10s because spinup wait is\nreplaced by reset sequencing and !BSY wait is not as important as\nbefore.  During boot or module loading where the drive is already\nfully spun up, !BSY wait succeeds immediately, so 10s should be enough\nin most cases.  It matters after hotplugging or other error\nconditions, but in those cases, !BSY wait in prereset simply can\u0027t be\nrelied upon due to the varied and weird behaviors ATA controllers and\ndevices show.\n\nReset is now driven by ata_eh_reset_timeouts[] table which contains\ntimeouts for each reset try.  The first reset can be softreset but the\nfollowing ones are always hardreset if available.  Each timeout\ndefines deadline for the reset try.  If a reset try fails, reset is\nretried with the next timeout till the end of the timeout table is\nreached.  If a reset try fails before the timeout with error, libata\nwaits till the deadline of the failed try before retrying.\n\nIOW, the timeout table defines timetable of reset tries such that the\nn\u0027th try always begins at least after the sum of all previous timeouts\nhas passed.  The current timetable defines 4 tries and takes around 1\nminute.\n\n@0\t: First try.  This should succeed most of the time during boot.\n@10\t: 10s is enough to spin up most consumer harddrives.  Give it\n\t  another shot.\n@20\t: 20s should spin up \u003e 99% of working drives.  This has 30s\n\t  timeout for retarded devices needing long idleness post reset.\n@55\t: Final try with 5s timeout just in case.\n\nThe above timetable is trade off between not annoying the device too\nmuch with frequent resets and taking reasonable amount of time in most\ncases.  Some controllers may do better with shorter timeouts while\nothers may fare better with longer but we just can\u0027t rely upon LLD\nwriters to test each controller with wide variety of devices using\nvarious scenarios.  We need default behavior which reasonably fits\nmost cases.\n\nI\u0027ve tested the above timetable on a dozen SATA controllers and a few\nPATA controllers with about a dozen different drives from all major\nvendors and 4 different ODDs from three different vendors for both\nboot and hotplug (if available) cases.\n\nBoot probing is not affected unless the device is broken in which\ncases new code gives up on the port after a minute rather than five or\nnine minutes.  When hotplugging, most devices get detected on the\nfirst or second try.  Multi-platter drives with long spin up time\nwhich sometimes took \u003e 40 secs with the original code, now usually\ncomes up during the second try and at least right after the third try\n@20.\n\nSigned-off-by: Tejun Heo \u003chtejun@gmail.com\u003e\nSigned-off-by: Jeff Garzik \u003cjeff@garzik.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "12717fa5e88860bec1d7347c617edecdc686b36a",
      "old_mode": 33188,
      "old_path": "drivers/ata/libata-core.c",
      "new_id": "a7950885d18e8d5dfad224960ed7c9172d8385dd",
      "new_mode": 33188,
      "new_path": "drivers/ata/libata-core.c"
    },
    {
      "type": "modify",
      "old_id": "b3f7d3c8ae60c83aca1e564feb1ce5ceb92b0af7",
      "old_mode": 33188,
      "old_path": "drivers/ata/libata-eh.c",
      "new_id": "8256655ce7d9ea3e50dd26fa4a00973b7958cf25",
      "new_mode": 33188,
      "new_path": "drivers/ata/libata-eh.c"
    },
    {
      "type": "modify",
      "old_id": "69fc1b8a9215a65a27b9988a389193c345f804cd",
      "old_mode": 33188,
      "old_path": "include/linux/libata.h",
      "new_id": "7906d750aa77481ab34bd5d1c80a9f9db27d38a4",
      "new_mode": 33188,
      "new_path": "include/linux/libata.h"
    }
  ]
}
