Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 1999 15:31:31 -0400
From:      "Christopher R. Bowman" <crb@ChrisBowman.com>
To:        freebsd-scsi@freebsd.org
Subject:   Question about ncr.c
Message-ID:  <199905211933.PAA07285@quark.ChrisBowman.com>

next in thread | raw e-mail | index | archive | help
a small section of ncr.c is presented below.  Shouldn't line 3851 read

cam_sim_free(np->sim, /*free_simq*/TRUE);
instead of just free?  Not much practical difference, but it just seems more correct.

3829         /*
3830         ** Create the device queue.  We only allow MAX_START-1 concurrent
3831         ** transactions so we can be sure to have one element free in our
3832         ** start queue to reset to the idle loop.
3833         */
3834         devq = cam_simq_alloc(MAX_START - 1);
3835         if (devq == NULL)
3836                 return;
3837 
3838         /*
3839         **      Now tell the generic SCSI layer
3840         **      about our bus.
3841         */
3842         np->sim = cam_sim_alloc(ncr_action, ncr_poll, "ncr", np, np->unit,
3843                                 1, MAX_TAGS, devq);
3844         if (np->sim == NULL) {
3845                 cam_simq_free(devq);
3846                 return;
3847         }
3848 
3849         
3850         if (xpt_bus_register(np->sim, 0) != CAM_SUCCESS) {
3851                 free(np->sim, M_DEVBUF);
3852                 return;
3853         }
3854         
3855 #ifdef __alpha__
3856         alpha_register_pci_scsi(config_id->bus, config_id->slot, np->sim);
3857 #endif  
3858 
3859         if (xpt_create_path(&np->path, /*periph*/NULL,
3860                             cam_sim_path(np->sim), CAM_TARGET_WILDCARD,
3861                             CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
3862                 xpt_bus_deregister(cam_sim_path(np->sim));
3863                 cam_sim_free(np->sim, /*free_simq*/TRUE);
3864                 free(np->sim, M_DEVBUF);
3865                 return;
3866         }

--------
Christopher R. Bowman
crb@ChrisBowman.com
http://www.ChrisBowman.com/


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




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