Commit 2adf35f5 authored by Justin T. Gibbs's avatar Justin T. Gibbs

Bring in some deltas that were missed in the aic79xx 1.1.1 and aic7xxx

6.2.10 updates.  The aic79xx driver now also supports mid-layer induced
ordered tag operations.
parent b9904638
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#112 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#113 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -1862,11 +1862,10 @@ ahd_dump_sglist(struct scb *scb) ...@@ -1862,11 +1862,10 @@ ahd_dump_sglist(struct scb *scb)
len = ahd_le32toh(sg_list[i].len); len = ahd_le32toh(sg_list[i].len);
printf("sg[%d] - Addr 0x%x%x : Length %d%s\n", printf("sg[%d] - Addr 0x%x%x : Length %d%s\n",
i, i,
(sg_list[i].len >> 24)&SG_HIGH_ADDR_BITS, (len >> 24) & SG_HIGH_ADDR_BITS,
ahd_le32toh(sg_list[i].addr), ahd_le32toh(sg_list[i].addr),
sg_list[i].len & AHD_SG_LEN_MASK, len & AHD_SG_LEN_MASK,
(sg_list[i].len & AHD_DMA_LAST_SEG) len & AHD_DMA_LAST_SEG ? " Last" : "");
? " Last" : "");
} }
} }
} }
......
/* /*
* Adaptec AIC79xx device driver for Linux. * Adaptec AIC79xx device driver for Linux.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#53 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#56 $
* *
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs. * Copyright (c) 1994-2000 Justin T. Gibbs.
...@@ -1756,6 +1756,17 @@ ahd_linux_run_device_queue(struct ahd_softc *ahd, struct ahd_linux_device *dev) ...@@ -1756,6 +1756,17 @@ ahd_linux_run_device_queue(struct ahd_softc *ahd, struct ahd_linux_device *dev)
} }
if ((dev->flags & (AHD_DEV_Q_TAGGED|AHD_DEV_Q_BASIC)) != 0) { if ((dev->flags & (AHD_DEV_Q_TAGGED|AHD_DEV_Q_BASIC)) != 0) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
int msg_bytes;
uint8_t tag_msgs[2];
msg_bytes = scsi_populate_tag_msg(cmd, tag_msgs);
if (msg_bytes && tag_msgs[0] != MSG_SIMPLE_TASK) {
hscb->control |= tag_msgs[0];
if (tag_msgs[0] == MSG_ORDERED_TASK)
dev->commands_since_idle_or_otag = 0;
} else
#endif
if (dev->commands_since_idle_or_otag == AHD_OTAG_THRESH if (dev->commands_since_idle_or_otag == AHD_OTAG_THRESH
&& (dev->flags & AHD_DEV_Q_TAGGED) != 0) { && (dev->flags & AHD_DEV_Q_TAGGED) != 0) {
hscb->control |= MSG_ORDERED_TASK; hscb->control |= MSG_ORDERED_TASK;
...@@ -2762,7 +2773,7 @@ ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag) ...@@ -2762,7 +2773,7 @@ ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag)
/* /*
* In all versions of Linux, we have to work around * In all versions of Linux, we have to work around
* a major flaw in how the mid-layer is locked down * a major flaw in how the mid-layer is locked down
* if we are to sleep succesffully in our error handler * if we are to sleep successfully in our error handler
* while allowing our interrupt handler to run. Since * while allowing our interrupt handler to run. Since
* the midlayer acquires either the io_request_lock or * the midlayer acquires either the io_request_lock or
* our lock prior to calling us, we must use the * our lock prior to calling us, we must use the
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#63 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#64 $
* *
*/ */
#ifndef _AIC79XX_LINUX_H_ #ifndef _AIC79XX_LINUX_H_
...@@ -469,7 +469,7 @@ ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg) ...@@ -469,7 +469,7 @@ ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg)
#include <linux/smp.h> #include <linux/smp.h>
#endif #endif
#define AIC79XX_DRIVER_VERSION "1.1.0" #define AIC79XX_DRIVER_VERSION "1.1.1"
/**************************** Front End Queues ********************************/ /**************************** Front End Queues ********************************/
/* /*
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#78 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#79 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -3854,7 +3854,7 @@ ahc_shutdown(void *arg) ...@@ -3854,7 +3854,7 @@ ahc_shutdown(void *arg)
/* /*
* Reset the controller and record some information about it * Reset the controller and record some information about it
* that is only availabel just after a reset. * that is only available just after a reset.
*/ */
int int
ahc_reset(struct ahc_softc *ahc) ahc_reset(struct ahc_softc *ahc)
......
/* /*
* Adaptec AIC7xxx device driver for Linux. * Adaptec AIC7xxx device driver for Linux.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#121 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#124 $
* *
* Copyright (c) 1994 John Aycock * Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science. * The University of Calgary Department of Computer Science.
...@@ -1802,6 +1802,17 @@ ahc_linux_run_device_queue(struct ahc_softc *ahc, struct ahc_linux_device *dev) ...@@ -1802,6 +1802,17 @@ ahc_linux_run_device_queue(struct ahc_softc *ahc, struct ahc_linux_device *dev)
} }
if ((dev->flags & (AHC_DEV_Q_TAGGED|AHC_DEV_Q_BASIC)) != 0) { if ((dev->flags & (AHC_DEV_Q_TAGGED|AHC_DEV_Q_BASIC)) != 0) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
int msg_bytes;
uint8_t tag_msgs[2];
msg_bytes = scsi_populate_tag_msg(cmd, tag_msgs);
if (msg_bytes && tag_msgs[0] != MSG_SIMPLE_TASK) {
hscb->control |= tag_msgs[0];
if (tag_msgs[0] == MSG_ORDERED_TASK)
dev->commands_since_idle_or_otag = 0;
} else
#endif
if (dev->commands_since_idle_or_otag == AHC_OTAG_THRESH if (dev->commands_since_idle_or_otag == AHC_OTAG_THRESH
&& (dev->flags & AHC_DEV_Q_TAGGED) != 0) { && (dev->flags & AHC_DEV_Q_TAGGED) != 0) {
hscb->control |= MSG_ORDERED_TASK; hscb->control |= MSG_ORDERED_TASK;
...@@ -2897,7 +2908,7 @@ ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag) ...@@ -2897,7 +2908,7 @@ ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag)
/* /*
* In all versions of Linux, we have to work around * In all versions of Linux, we have to work around
* a major flaw in how the mid-layer is locked down * a major flaw in how the mid-layer is locked down
* if we are to sleep succesffully in our error handler * if we are to sleep successfully in our error handler
* while allowing our interrupt handler to run. Since * while allowing our interrupt handler to run. Since
* the midlayer acquires either the io_request_lock or * the midlayer acquires either the io_request_lock or
* our lock prior to calling us, we must use the * our lock prior to calling us, we must use the
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment