Re: Newbie Problem -- I hope

From: Mike A Larson <larz_at_nospam.org>
Date: Tue Jun 14 1994 - 19:25:37 PDT

Hi,

[Andrew Valencia <vandys@cisco.com> writes:]
...
>
> In the meantime, Mike Larson (the owner of the driver) has a version which
> has the retry loop in the driver itself. Mike, should we put that on the
> FTP site?
>

Here are the diffs (from the VSTa 1.3.1 driver). Andy - if you want,
I can send you a new CAM distribution.

*** /vsta131/srv/mach/scsi/main.c Sun Apr 10 15:55:44 1994
--- main.c Tue Jun 14 15:55:52 1994
***************
*** 369,375 ****
          struct cam_file *file;
          struct cam_qmsg *qmsg;
          void (*handler)();
! int ac, irq;
          long status;
          struct msg msg;
          static char *myname = "cam";
--- 369,375 ----
          struct cam_file *file;
          struct cam_qmsg *qmsg;
          void (*handler)();
! int ac, irq, retry;
          long status;
          struct msg msg;
          static char *myname = "cam";
***************
*** 405,411 ****
   * Register the CAM driver.
   * Move entry out of disk and change name to XPT.
   */
! if (namer_register("cam", cam_port_name) < 0) {
                  cam_error(0, "CAM", "can't register name");
                  exit(1);
          }
--- 405,416 ----
   * Register the CAM driver.
   * Move entry out of disk and change name to XPT.
   */
! for(retry = 3; retry > 0; retry--) {
! if (namer_register("cam", cam_port_name) >= 0)
! break;
! cam_msleep(100);
! }
! if(retry <= 0) {
                  cam_error(0, "CAM", "can't register name");
                  exit(1);
          }
***************
*** 504,509 ****
--- 509,521 ----
                             (file->devid == CAM_ROOTDIR)) {
                                  pdev_readdir(&msg, file);
                                  break;
+ }
+ /*
+ * Exit if message is M_ABORT.
+ */
+ if(msg.m_op == M_ABORT) {
+ cam_error(0, myname, "exitting");
+ exit(0);
                          }
  /*
   * The peripheral device pointer must be valid at this point.
Received on Tue Jun 14 18:33:01 1994

This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 21:04:28 PDT