Re: Drives missing at boot

From: Tejun Heo
Date: Mon Jul 05 2010 - 02:30:36 EST


On 07/03/2010 06:42 PM, Mark Knecht wrote:
> On Sat, Jul 3, 2010 at 9:13 AM, Tejun Heo <tj@xxxxxxxxxx> wrote:
>> Hello,
>>
>> On 07/03/2010 06:06 PM, Mark Knecht wrote:
>>>> Can you please *attach* full logs of a successful boot and several
>>>> failing boots?
>>>
>>> Certainly? Which logs? dmesg or something else?
>>
>> dmesg output preferably with printk timestamp enabled.

Can you please apply the attached patch, reproduce the problem and
post the kernel log?

Thanks.

--
tejun
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 2984e45..987ca80 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3739,6 +3739,14 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
return rc;
} while ((scontrol & 0xf0f) != 0x300 && --tries);

+ /* check once more */
+ msleep(100);
+ if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
+ return rc;
+ ata_link_printk(link, KERN_ERR,
+ "XXX SControl after resume = %X, tries=%d\n",
+ scontrol, ATA_LINK_RESUME_TRIES - tries + 1);
+
if ((scontrol & 0xf0f) != 0x300) {
ata_link_printk(link, KERN_ERR,
"failed to resume link (SControl %X)\n",
@@ -6007,7 +6015,7 @@ static void async_port_probe(void *data, async_cookie_t cookie)

ehi->probe_mask |= ATA_ALL_DEVICES;
ehi->action |= ATA_EH_RESET | ATA_EH_LPM;
- ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET;
+ ehi->flags |= ATA_EHI_NO_AUTOPSY/* | ATA_EHI_QUIET*/;

ap->pflags &= ~ATA_PFLAG_INITIALIZING;
ap->pflags |= ATA_PFLAG_LOADING;