Deleted Added
full compact
aic7xxx.c (49933) aic7xxx.c (50107)
1/*
2 * Generic driver for the aic7xxx based adaptec SCSI controllers
3 * Product specific probe and attach routines can be found in:
4 * i386/eisa/ahc_eisa.c 27/284X and aic7770 motherboard controllers
5 * pci/ahc_pci.c 3985, 3980, 3940, 2940, aic7895, aic7890,
6 * aic7880, aic7870, aic7860, and aic7850 controllers
7 *
8 * Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999 Justin T. Gibbs.

--- 22 unchanged lines hidden (view full) ---

31 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
1/*
2 * Generic driver for the aic7xxx based adaptec SCSI controllers
3 * Product specific probe and attach routines can be found in:
4 * i386/eisa/ahc_eisa.c 27/284X and aic7770 motherboard controllers
5 * pci/ahc_pci.c 3985, 3980, 3940, 2940, aic7895, aic7890,
6 * aic7880, aic7870, aic7860, and aic7850 controllers
7 *
8 * Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999 Justin T. Gibbs.

--- 22 unchanged lines hidden (view full) ---

31 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * $Id: aic7xxx.c,v 1.31 1999/05/23 18:55:58 gibbs Exp $
39 * $Id: aic7xxx.c,v 1.32 1999/08/16 22:49:28 gibbs Exp $
40 */
41/*
42 * A few notes on features of the driver.
43 *
44 * SCB paging takes advantage of the fact that devices stay disconnected
45 * from the bus a relatively long time and that while they're disconnected,
46 * having the SCBs for these transactions down on the host adapter is of
47 * little use. Instead of leaving this idle SCB down on the card we copy

--- 43 unchanged lines hidden (view full) ---

91#include <opt_aic7xxx.h>
92
93#include <pci.h>
94#include <stddef.h> /* For offsetof */
95
96#include <sys/param.h>
97#include <sys/systm.h>
98#include <sys/malloc.h>
40 */
41/*
42 * A few notes on features of the driver.
43 *
44 * SCB paging takes advantage of the fact that devices stay disconnected
45 * from the bus a relatively long time and that while they're disconnected,
46 * having the SCBs for these transactions down on the host adapter is of
47 * little use. Instead of leaving this idle SCB down on the card we copy

--- 43 unchanged lines hidden (view full) ---

91#include <opt_aic7xxx.h>
92
93#include <pci.h>
94#include <stddef.h> /* For offsetof */
95
96#include <sys/param.h>
97#include <sys/systm.h>
98#include <sys/malloc.h>
99#include <sys/eventhandler.h>
99#include <sys/buf.h>
100#include <sys/proc.h>
101
102#include <cam/cam.h>
103#include <cam/cam_ccb.h>
104#include <cam/cam_sim.h>
105#include <cam/cam_xpt_sim.h>
106#include <cam/cam_debug.h>

--- 97 unchanged lines hidden (view full) ---

204static int ahcinitscbdata(struct ahc_softc *ahc);
205static void ahcfiniscbdata(struct ahc_softc *ahc);
206
207static bus_dmamap_callback_t ahcdmamapcb;
208
209#if UNUSED
210static void ahc_dump_targcmd(struct target_cmd *cmd);
211#endif
100#include <sys/buf.h>
101#include <sys/proc.h>
102
103#include <cam/cam.h>
104#include <cam/cam_ccb.h>
105#include <cam/cam_sim.h>
106#include <cam/cam_xpt_sim.h>
107#include <cam/cam_debug.h>

--- 97 unchanged lines hidden (view full) ---

205static int ahcinitscbdata(struct ahc_softc *ahc);
206static void ahcfiniscbdata(struct ahc_softc *ahc);
207
208static bus_dmamap_callback_t ahcdmamapcb;
209
210#if UNUSED
211static void ahc_dump_targcmd(struct target_cmd *cmd);
212#endif
212static void ahc_shutdown(int howto, void *arg);
213static void ahc_shutdown(void *arg, int howto);
213static cam_status
214 ahc_find_tmode_devs(struct ahc_softc *ahc,
215 struct cam_sim *sim, union ccb *ccb,
216 struct tmode_tstate **tstate,
217 struct tmode_lstate **lstate,
218 int notfound_failure);
219static void ahc_action(struct cam_sim *sim, union ccb *ccb);
220static void ahc_async(void *callback_arg, u_int32_t code,

--- 4065 unchanged lines hidden (view full) ---

4286 */
4287 if (bootverbose)
4288 printf("%s: Downloading Sequencer Program...",
4289 ahc_name(ahc));
4290
4291 ahc_loadseq(ahc);
4292
4293 /* We have to wait until after any system dumps... */
214static cam_status
215 ahc_find_tmode_devs(struct ahc_softc *ahc,
216 struct cam_sim *sim, union ccb *ccb,
217 struct tmode_tstate **tstate,
218 struct tmode_lstate **lstate,
219 int notfound_failure);
220static void ahc_action(struct cam_sim *sim, union ccb *ccb);
221static void ahc_async(void *callback_arg, u_int32_t code,

--- 4065 unchanged lines hidden (view full) ---

4287 */
4288 if (bootverbose)
4289 printf("%s: Downloading Sequencer Program...",
4290 ahc_name(ahc));
4291
4292 ahc_loadseq(ahc);
4293
4294 /* We have to wait until after any system dumps... */
4294 at_shutdown(ahc_shutdown, ahc, SHUTDOWN_FINAL);
4295 EVENTHANDLER_REGISTER(shutdown_final, ahc_shutdown, ahc, SHUTDOWN_PRI_DEFAULT);
4295
4296 return (0);
4297}
4298
4299static cam_status
4300ahc_find_tmode_devs(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb,
4301 struct tmode_tstate **tstate, struct tmode_lstate **lstate,
4302 int notfound_failure)

--- 2128 unchanged lines hidden (view full) ---

6431 } else {
6432 printf(", ");
6433 }
6434 }
6435}
6436#endif
6437
6438static void
4296
4297 return (0);
4298}
4299
4300static cam_status
4301ahc_find_tmode_devs(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb,
4302 struct tmode_tstate **tstate, struct tmode_lstate **lstate,
4303 int notfound_failure)

--- 2128 unchanged lines hidden (view full) ---

6432 } else {
6433 printf(", ");
6434 }
6435 }
6436}
6437#endif
6438
6439static void
6439ahc_shutdown(int howto, void *arg)
6440ahc_shutdown(void *arg, int howto)
6440{
6441 struct ahc_softc *ahc;
6442 int i;
6443 u_int sxfrctl1_a, sxfrctl1_b;
6444
6445 ahc = (struct ahc_softc *)arg;
6446
6447 pause_sequencer(ahc);

--- 125 unchanged lines hidden ---
6441{
6442 struct ahc_softc *ahc;
6443 int i;
6444 u_int sxfrctl1_a, sxfrctl1_b;
6445
6446 ahc = (struct ahc_softc *)arg;
6447
6448 pause_sequencer(ahc);

--- 125 unchanged lines hidden ---