Deleted Added
sdiff udiff text old ( 66800 ) new ( 66845 )
full compact
1/*
2 * Bus independent FreeBSD shim for the aic7xxx based adaptec SCSI controllers
3 *
4 * Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999, 2000 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $Id$
32 *
33 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx_osm.c 66800 2000-10-08 03:37:52Z gibbs $
34 */
35
36#include <dev/aic7xxx/aic7xxx_freebsd.h>
37#include <dev/aic7xxx/aic7xxx_inline.h>
38
39#include <sys/eventhandler.h>
40
41#ifndef AHC_TMODE_ENABLE

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

1537
1538 /* Will clear us from the bus */
1539 restart_sequencer(ahc);
1540 ahc_unlock(ahc, &s);
1541 return;
1542 }
1543
1544 ahc_set_recoveryscb(ahc, active_scb);
1545 ahc_outb(ahc, MSG_OUT, MSG_BUS_DEV_RESET);
1546 ahc_outb(ahc, SCSISIGO, last_phase|ATNO);
1547 ahc_print_path(ahc, active_scb);
1548 printf("BDR message in message buffer\n");
1549 active_scb->flags |= SCB_DEVICE_RESET;
1550 active_scb->io_ctx->ccb_h.timeout_ch =
1551 timeout(ahc_timeout, (caddr_t)active_scb, 2 * hz);
1552 unpause_sequencer(ahc);
1553 } else {

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

1576 disconnected = TRUE;
1577 }
1578
1579 if (disconnected) {
1580 struct scb *prev_scb;
1581
1582 ahc_set_recoveryscb(ahc, scb);
1583 /*
1584 * Simply set the MK_MESSAGE control bit.
1585 */
1586 scb->hscb->control |= MK_MESSAGE;
1587 scb->flags |= SCB_QUEUED_MSG
1588 | SCB_DEVICE_RESET;
1589
1590 /*
1591 * Actually re-queue this SCB in an attempt
1592 * to select the device before it reconnects.
1593 * In either case (selection or reselection),
1594 * we will now issue a target reset to the
1595 * timed-out device.
1596 *
1597 * Remove any cached copy of this SCB in the
1598 * disconnected list in preparation for the
1599 * queuing of our abort SCB. We use the
1600 * same element in the SCB, SCB_NEXT, for
1601 * both the qinfifo and the disconnected list.
1602 */
1603 ahc_search_disc_list(ahc, target, channel,
1604 lun, scb->hscb->tag,
1605 /*stop_on_first*/TRUE,
1606 /*remove*/TRUE,
1607 /*save_state*/TRUE);
1608
1609 /*
1610 * Clear out any entries in the QINFIFO first
1611 * so we are the next SCB for this target
1612 * to run.
1613 */
1614 ahc_search_qinfifo(ahc,
1615 SCB_GET_TARGET(ahc, scb),
1616 channel, SCB_GET_LUN(scb),
1617 SCB_LIST_NULL,

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

1625 u_int prev_tag;
1626
1627 prev_tag =
1628 ahc->qinfifo[ahc->qinfifonext - 1];
1629 prev_scb = ahc_lookup_scb(ahc,
1630 prev_tag);
1631 }
1632 ahc_qinfifo_requeue(ahc, prev_scb, scb);
1633 scb->io_ctx->ccb_h.timeout_ch =
1634 timeout(ahc_timeout, (caddr_t)scb, 2 * hz);
1635 unpause_sequencer(ahc);
1636 } else {
1637 /* Go "immediatly" to the bus reset */
1638 /* This shouldn't happen */
1639 ahc_set_recoveryscb(ahc, scb);
1640 ahc_print_path(ahc, scb);

--- 201 unchanged lines hidden ---