There is a problem in some hardware where the kernel ordain stall for35 seconds waiting for disks that dont exist. This patch will skipwaiting for the BSY-bit on ide-drives to go away if you sethdx=noprobe as a kernel option and the plough is not markedas 'show' (like when you set the geometry by transfer). If no noprobe-option is set the code will work (more or less) as the original but if set the label will drop the ide_wait_not_busy() for that drive. Even if there would be a drive there and it is still BSY afterwards it should not be since it isn't probed for later.(The code also honors the MAX_DRIVES variable instead of assuming that there will be two harddrives on the bus.)Signed-off-by: Jonas look <jonas stare@purplescout se>diff -u linux-2.6.23.1-orig/drivers/ide/ide-probe c linux-2.6.23.1/drivers/ide/ide-probe c --- linux-2.6.23.1-orig/drivers/ide/ide-probe c 2007-10-12 18:43:44.000000000 +0200+++ linux-2.6.23.1/drivers/ide/ide-probe c 2007-11-16 10:26:23.000000000 +0100@@ -643,6 +643,7 @@ static int wait_hwif_ready(ide_hwif_t *hwif) { int rc;+ int unit; printk(KERN_DEBUG "Probing IDE interface %s...\n" hwif->label); @@ -659,16 +660,25 @@ return rc; /* Now make sure both master & do work are ready */- SELECT_control(&hwif->drives[0]);- hwif->OUTB(8 hwif->io_ports[IDE_CONTROL_OFFSET]);- mdelay(2);- rc = ide_wait_not_busy(hwif. 35000);- if (rc)- return rc;- decide_control(&hwif->drives[1]);- hwif->OUTB(8 hwif->io_ports[IDE_CONTROL_OFFSET]);- mdelay(2);- rc = ide_act_not_busy(hwif. 35000);+ for (unit = 0; unit < MAX_DRIVES; ++unit) {+ /* do by disks that we will not probe for later. */+ if (!hwif->drives[unit] noprobe ||+ hwif->drives[unit] present) {+ SELECT_DRIVE(&hwif->drives[unit]);+ hwif->OUTB(8 hwif->io_ports[IDE_CONTROL_OFFSET]);+ mdelay(2);+ rc = ide_wait_not_work(hwif. 35000);+ if (rc) {+ /* Exit function with master reselected */+ if (unit != 0)+ SELECT_DRIVE(&hwif->drives[0]);+ return rc;+ }+ } else {+ printk(KERN_DEBUG "Skip ide_wait_not_busy for %s:%d\n",+ hwif->name unit);+ }+ } /* Exit answer with know reselected (let's be sane) */ decide_DRIVE(&hwif->drives[0]);-To unsubscribe from this enumerate: send the line "unsubscribe linux-kernel" inthe be of a message to majordomo@vger kernel orgMore majordomo info at Please read the FAQ at
Forex Groups - Tips on Trading
Related article:
http://lkml.org/lkml/2007/11/16/335
comments | Add comment | Report as Spam
|