NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/39526: adh driver crashes system if it runs out of memory



The following reply was made to PR kern/39526; it has been noted by GNATS.

From: Wolfgang Stukenbrock <Wolfgang.Stukenbrock%nagler-company.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: Wolfgang.Stukenbrock%nagler-company.com@localhost
Subject: Re: kern/39526: adh driver crashes system if it runs out of memory
Date: Thu, 25 Sep 2008 15:23:38 +0200

 Hi,
 
 after some additional testing the follwoing patch will lead to a 
 situation, where the controler can be used in a 64-Bit system with 8GB 
 main memory without crashing the system shortly after the lower 4GB 
 memory is used by proesses.
 It enables the already present 64-Bit memory access modes of the driver.
 This will remove the usage of the upper nibble of the length field for 
 additional address bits and uses a real 64-Bit pointer.
 I don't understand why this change changes anything, because the no 
 change at all is done to the problematic 32-Bit DMA-structure alloc.
 And there the alloc failures will happen ...
 But with this fix there will be much less alloc failures as without it.
 
 This fix will not solve the problem at all!
 If there is lots of trafic on the SCSI-Bus prior all of the lower 4GB 
 memory is used up, no problem occures anymore, but it IO on the 
 controler starts after the lower 4GB memory is used by processes, the 
 system will crash after a short time.
 
 
 rcsdiff -r1.1 -u ahd_pci.c
 ===================================================================
 RCS file: RCS/ahd_pci.c,v
 retrieving revision 1.1
 diff -u -r1.1 ahd_pci.c
 --- ahd_pci.c   2008/09/12 14:37:11     1.1
 +++ ahd_pci.c   2008/09/25 13:11:06
 @@ -400,6 +400,12 @@
                  ahd->chip |= AHD_PCI;
                  ahd->bugs &= ~AHD_PCIX_BUG_MASK;
          }
 +       else if (devconfig & PCI64BIT) {
 +               ahd->flags |= AHD_64BIT_ADDRESSING;
 +               aprint_normal("\n%s: using 64 Bit addressing modes", 
 ahd_name(ahd));
 +       } else {
 +               aprint_normal("\n%s: using normal addressing modes - not 
 on 64 Bit bus", ahd_name(ahd));
 +       }
 
          /*
           * Map PCI Registers
 @@ -502,7 +508,8 @@
          if ((ahd->flags & (AHD_39BIT_ADDRESSING|AHD_64BIT_ADDRESSING)) 
 != 0) {
                  uint32_t dvconfig;
 
 -               aprint_normal("%s: Enabling 39Bit Addressing\n", 
 ahd_name(ahd));
 +               aprint_normal("%s: Enabling %sBit Addressing\n", 
 ahd_name(ahd),
 +                 ((ahd->flags & AHD_64BIT_ADDRESSING) ? "64" : "39"));
                  dvconfig = pci_conf_read(pa->pa_pc, pa->pa_tag, DEVCONFIG);
                  dvconfig |= DACEN;
                  pci_conf_write(pa->pa_pc, pa->pa_tag, DEVCONFIG, dvconfig);
 
 
 
 gnats-admin%NetBSD.org@localhost wrote:
 
 > Thank you very much for your problem report.
 > It has the internal identification `kern/39526'.
 > The individual assigned to look at your
 > report is: kern-bug-people. 
 > 
 > 
 >>Category:       kern
 >>Responsible:    kern-bug-people
 >>Synopsis:       adh driver crashes system if it runs out of memory
 >>Arrival-Date:   Fri Sep 12 13:50:00 +0000 2008
 >>
 > 
 
 


Home | Main Index | Thread Index | Old Index