Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2002 12:34:58 -0800 (PST)
From:      Joerg Wunsch <joerg@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/aic aic.c
Message-ID:  <200201172034.g0HKYwg74639@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
joerg       2002/01/17 12:34:58 PST

  Modified files:
    sys/dev/aic          aic.c 
  Log:
  Back out the hack from rev 1.13 that was done to initiate a bus rescan
  at insert time.  When asking gibbs for approval for an MFC, this was
  his reply:
  
  1) It leaks memory if it can't allocate a path.
  
  2) It defers allocation of aic->path until the call to scan the
     bus.  This means the path may be NULL when an interrupt occurs
     prior to the call to scan the bus (stray bus reset for instance),
     which will lead to a panic.
  
  3) The driver in current doesn't recover from the failure to allocate
     aic->path.  The driver doesn't check during normal operation if
     the path is NULL, so again a panic will result.
  
  4) aic_cam_rescan calls malloc with M_WAITOK.  aic_cam_rescan is called
     from attach where it isn't necessarily safe to sleep.
  
  5) And most importantly, it co-opts the xpt_periph from the driver level.
     This was never part of the design (xpt_periph used to be static).  Making
     a call of this type may completely confuse the XPT if other XPT operations
     are ongoing.
  
  In the long term, Justin and Warner agreed to implement solution where
  CAM itself will initiate the bus rescan if a new bus is added.  For
  the time being (and in particular in light of the upcoming 4.5
  release), we now have camcontrol available on the boot floppy, and can
  have pccardd initiate the rescan through it.
  
  Revision  Changes    Path
  1.15      +9 -36     src/sys/dev/aic/aic.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201172034.g0HKYwg74639>