Deleted Added
full compact
dpt_scsi.c (49860) dpt_scsi.c (50107)
1/*
2 * Copyright (c) 1997 by Simon Shapiro
3 * All Rights Reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

38 * team for creating and maintaining such a wonderful O/S.
39 *
40 * TODO: * Add ISA probe code.
41 * * Add driver-level RAID-0. This will allow interoperability with
42 * NiceTry, M$-Doze, Win-Dog, Slowlaris, etc., in recognizing RAID
43 * arrays that span controllers (Wow!).
44 */
45
1/*
2 * Copyright (c) 1997 by Simon Shapiro
3 * All Rights Reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

38 * team for creating and maintaining such a wonderful O/S.
39 *
40 * TODO: * Add ISA probe code.
41 * * Add driver-level RAID-0. This will allow interoperability with
42 * NiceTry, M$-Doze, Win-Dog, Slowlaris, etc., in recognizing RAID
43 * arrays that span controllers (Wow!).
44 */
45
46#ident "$Id: dpt_scsi.c,v 1.23 1999/05/06 20:16:22 ken Exp $"
46#ident "$Id: dpt_scsi.c,v 1.24 1999/08/16 01:49:35 gibbs Exp $"
47
48#define _DPT_C_
49
50#include "opt_dpt.h"
51#include <sys/param.h>
52#include <sys/systm.h>
53#include <sys/malloc.h>
54#include <sys/buf.h>

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

150 u_int command, u_int retries,
151 u_int ifc, u_int code,
152 u_int code2);
153static void dptprocesserror(dpt_softc_t *dpt, dpt_ccb_t *dccb,
154 union ccb *ccb, u_int hba_stat,
155 u_int scsi_stat, u_int32_t resid);
156
157static void dpttimeout(void *arg);
47
48#define _DPT_C_
49
50#include "opt_dpt.h"
51#include <sys/param.h>
52#include <sys/systm.h>
53#include <sys/malloc.h>
54#include <sys/buf.h>

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

150 u_int command, u_int retries,
151 u_int ifc, u_int code,
152 u_int code2);
153static void dptprocesserror(dpt_softc_t *dpt, dpt_ccb_t *dccb,
154 union ccb *ccb, u_int hba_stat,
155 u_int scsi_stat, u_int32_t resid);
156
157static void dpttimeout(void *arg);
158static void dptshutdown(int howto, void *arg);
158static void dptshutdown(void *arg, int howto);
159
160/* ================= Private Inline Function definitions ====================*/
161static __inline int
162dpt_just_reset(dpt_softc_t * dpt)
163{
164 if ((dpt_inb(dpt, 2) == 'D')
165 && (dpt_inb(dpt, 3) == 'P')
166 && (dpt_inb(dpt, 4) == 'T')

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

1402 CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
1403 xpt_bus_deregister(cam_sim_path(dpt->sims[i]));
1404 cam_sim_free(dpt->sims[i], /*free_devq*/i == 0);
1405 break;
1406 }
1407
1408 }
1409 if (i > 0)
159
160/* ================= Private Inline Function definitions ====================*/
161static __inline int
162dpt_just_reset(dpt_softc_t * dpt)
163{
164 if ((dpt_inb(dpt, 2) == 'D')
165 && (dpt_inb(dpt, 3) == 'P')
166 && (dpt_inb(dpt, 4) == 'T')

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

1402 CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
1403 xpt_bus_deregister(cam_sim_path(dpt->sims[i]));
1404 cam_sim_free(dpt->sims[i], /*free_devq*/i == 0);
1405 break;
1406 }
1407
1408 }
1409 if (i > 0)
1410 at_shutdown(dptshutdown, dpt, SHUTDOWN_FINAL);
1410 EVENTHANDLER_REGISTER(shutdown_final, dptshutdown,
1411 dpt, SHUTDOWN_PRI_DEFAULT);
1411 return (i);
1412}
1413
1414
1415/*
1416 * This is the interrupt handler for the DPT driver.
1417 */
1418void

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

1634 dpt_send_immediate(dpt, &dccb->eata_ccb, dccb->eata_ccb.cp_busaddr,
1635 /*retries*/20000, EATA_SPECIFIC_ABORT, 0, 0);
1636 ccb->ccb_h.status = CAM_CMD_TIMEOUT;
1637 splx(s);
1638}
1639
1640/*
1641 * Shutdown the controller and ensure that the cache is completely flushed.
1412 return (i);
1413}
1414
1415
1416/*
1417 * This is the interrupt handler for the DPT driver.
1418 */
1419void

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

1635 dpt_send_immediate(dpt, &dccb->eata_ccb, dccb->eata_ccb.cp_busaddr,
1636 /*retries*/20000, EATA_SPECIFIC_ABORT, 0, 0);
1637 ccb->ccb_h.status = CAM_CMD_TIMEOUT;
1638 splx(s);
1639}
1640
1641/*
1642 * Shutdown the controller and ensure that the cache is completely flushed.
1642 * Called via at_shutdown(9) after all disk access has completed.
1643 * Called from the shutdown_final event after all disk access has completed.
1643 */
1644static void
1644 */
1645static void
1645dptshutdown(int howto, void *arg)
1646dptshutdown(void *arg, int howto)
1646{
1647 dpt_softc_t *dpt;
1648
1649 dpt = (dpt_softc_t *)arg;
1650
1651 printf("dpt%d: Shutting down (mode %x) HBA. Please wait...\n",
1652 dpt->unit, howto);
1653

--- 873 unchanged lines hidden ---
1647{
1648 dpt_softc_t *dpt;
1649
1650 dpt = (dpt_softc_t *)arg;
1651
1652 printf("dpt%d: Shutting down (mode %x) HBA. Please wait...\n",
1653 dpt->unit, howto);
1654

--- 873 unchanged lines hidden ---