Re: IDE disk initialization problem with tonight's kernel.

From: walt <wa1ter_at_myrealbox.com>
Date: Mon, 19 May 2003 06:29:58 -0700
Soeren Schmidt wrote:
> It seems walt wrote:
> 
>>Soeren Schmidt wrote:
>>
>>>It seems walt wrote:
>>>
>>>
>>>>Sometime between this morning's cvsup at around 12:00 noon GMT Sunday
>>>>and tonight's cvsup at 03:00 GMT Monday some changes were made in the
>>>>kernel which caused these errors:
>>>>
>>>>
>>>>ad0: 76319MB <WDC WD800JB-00CRA1> [155061/16/63] at ata0-master UDMA33
>>>>ad1: 76319MB <ST380021A> [155061/16/63] at ata0-slave UDMA33
>>>>Mounting root from ufs:/dev/ad0s3a
>>>>ad0: UDMA ICRC error cmd=write fsbn 281961420 of 140980710-140980713
>>>> falling back to PIO mode
>>
>>>I cant tell what controller this is from the above, could you mail me
>>>the output of dmesg and pciconf -l please ?
>>
>> From the bad kernel:
>>atapci0: <Promise PDC20376 SATA150 controller> port 0xb800-0xb87f,0xd000-0xd00f,0xd400-0xd43f mem 0xf2000000-0xf201ffff,0xf2800000-0xf2800fff irq 11 at device 8.0 on pci0
>>atapci1: <VIA 82C586B UDMA33 controller> port 0xa400-0xa40f at device 17.1 on pci0
>>ata0: at 0x1f0 irq 14 on atapci1
>>ata1: at 0x170 irq 15 on atapci1
> 
>  
> I have a fix ready here waiting for re_at_'s approval:
> 
> 
> Index: ata-chipset.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/ata/ata-chipset.c,v
> retrieving revision 1.27
> diff -u -r1.27 ata-chipset.c
> --- ata-chipset.c	18 May 2003 16:45:48 -0000	1.27
> +++ ata-chipset.c	19 May 2003 06:33:55 -0000
> _at__at_ -2003,26 +2003,21 _at__at_
>  ata_find_chip(device_t dev, struct ata_chip_id *index, int slot)
>  {
>      device_t *children;
> -    u_int32_t devid;
> -    u_int8_t revid;
>      int nchildren, i;
>  
> -
>      if (device_get_children(device_get_parent(dev), &children, &nchildren))
>  	return 0;
>  
> -    devid = pci_get_devid(dev);
> -    revid = pci_get_revid(dev);
> -
>      while (index->chipid != 0) {
>  	for (i = 0; i < nchildren; i++) {
>  	    if (((slot >= 0 && pci_get_slot(children[i]) == slot) || slot < 0)&&
> -		pci_get_devid(children[i]) == devid &&
> -		pci_get_revid(children[i]) >= revid) {
> +		pci_get_devid(children[i]) == index->chipid &&
> +		pci_get_revid(children[i]) >= index->chiprev) {
>  		free(children, M_TEMP);
>  		return index;
>  	    }
>  	}
> +	index++;
>      }
>      free(children, M_TEMP);
>      return NULL;

This patch works for me, thanks!  That must set a speed record for bugfixes :0)
Received on Mon May 19 2003 - 04:29:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:08 UTC