Commit 92bde82b authored by Linus Torvalds's avatar Linus Torvalds

Merge

parents 27b3d11b dc1a5b93
......@@ -58,6 +58,7 @@ obj-$(CONFIG_SCSI_AHA152X) += aha152x.o
obj-$(CONFIG_SCSI_AHA1542) += aha1542.o
obj-$(CONFIG_SCSI_AHA1740) += aha1740.o
obj-$(CONFIG_SCSI_AIC7XXX) += aic7xxx/
obj-$(CONFIG_SCSI_AIC79XX) += aic7xxx/
obj-$(CONFIG_SCSI_AACRAID) += aacraid/
obj-$(CONFIG_SCSI_AIC7XXX_OLD) += aic7xxx_old.o
obj-$(CONFIG_SCSI_IPS) += ips.o
......
#
# AIC79XX 2.5.X Kernel configuration File.
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic79xx#2 $
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic79xx#3 $
#
config SCSI_AIC79XX
tristate "Adaptec AIC79xx U320 support"
......@@ -87,7 +87,7 @@ config AIC79XX_DEBUG_MASK
config AIC79XX_REG_PRETTY_PRINT
bool "Decode registers during diagnostics"
depends on SCSI_AIC79XX && SCSI_AIC7XXX_BUILD_FIRMWARE
depends on SCSI_AIC79XX
default y
help
Compile in register value tables for the output of expanded register
......
#
# AIC7XXX and AIC79XX 2.5.X Kernel configuration File.
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic7xxx#4 $
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic7xxx#5 $
#
config SCSI_AIC7XXX
tristate "Adaptec AIC7xxx Fast -> U160 support (New Driver)"
......@@ -92,7 +92,7 @@ config AIC7XXX_DEBUG_MASK
config AIC7XXX_REG_PRETTY_PRINT
bool "Decode registers during diagnostics"
depends on SCSI_AIC7XXX && SCSI_AIC7XXX_BUILD_FIRMWARE
depends on SCSI_AIC7XXX
default y
help
Compile in register value tables for the output of expanded register
......
......@@ -36,7 +36,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7770_osm.c#11 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7770_osm.c#12 $
*/
#include "aic7xxx_osm.h"
......@@ -61,8 +61,14 @@ aic7770_linux_probe(Scsi_Host_Template *template)
uint32_t eisa_id;
size_t id_size;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
if (check_region(eisaBase, AHC_EISA_IOSIZE) != 0)
continue;
request_region(eisaBase, AHC_EISA_IOSIZE, "aic7xxx");
#else
if (request_region(eisaBase, AHC_EISA_IOSIZE, "aic7xxx") != 0)
continue;
#endif
eisa_id = 0;
id_size = sizeof(eisa_id);
......@@ -72,6 +78,7 @@ aic7770_linux_probe(Scsi_Host_Template *template)
eisa_id |= inb(eisaBase + IDOFFSET + i)
<< ((id_size-i-1) * 8);
}
release_region(eisaBase, AHC_EISA_IOSIZE);
if (eisa_id & 0x80000000)
continue; /* no EISA card in slot */
......
......@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#147 $
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#148 $
*
* $FreeBSD$
*/
......@@ -3416,8 +3416,10 @@ ahd_handle_message_phase(struct ahd_softc *ahd)
*/
if (ahd->msgout_len != 0) {
#ifdef AHD_DEBUG
if ((ahd_debug & AHD_SHOW_MESSAGES) != 0)
if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) {
ahd_print_devinfo(ahd, &devinfo);
printf("Asserting ATN for response\n");
}
#endif
ahd_assert_atn(ahd);
}
......@@ -7521,8 +7523,7 @@ ahd_stat_timer(void *arg)
"now %sabled. Cmds %d\n",
ahd_name(ahd),
(enint_coal & ENINT_COALESS) ? "en" : "dis",
ahd->cmdcmplt_total,
ahd->cmdcmplt_counts[ahd->cmdcmplt_bucket]);
ahd->cmdcmplt_total);
#endif
}
......
/*
* Adaptec AIC79xx device driver for Linux.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#100 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#103 $
*
* --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs.
......@@ -1339,7 +1339,7 @@ Scsi_Host_Template aic79xx_driver_template = {
*/
.max_sectors = 8192,
#endif
#if defined CONFIG_HIGHIO
#if defined CONFIG_HIGHIO || LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
/* Assume RedHat Distribution with its different HIGHIO conventions. */
.can_dma_32 = 1,
......@@ -2486,8 +2486,25 @@ ahd_linux_dv_thread(void *data)
printf("In DV Thread\n");
#endif
/*
* Don't care about any signals.
*/
siginitsetinv(&current->blocked, 0);
/*
* Complete thread creation.
*/
lock_kernel();
daemonize();
sprintf(current->comm, "ahd_dv_%d", ahd->unit);
unlock_kernel();
while (1) {
down(&ahd->platform_data->dv_sem);
/*
* Use down_interruptible() rather than down() to
* avoid inclusion in the load average.
*/
down_interruptible(&ahd->platform_data->dv_sem);
/* Check to see if we've been signaled to exit */
ahd_lock(ahd, &s);
......@@ -2510,7 +2527,7 @@ ahd_linux_dv_thread(void *data)
while (LIST_FIRST(&ahd->pending_scbs) != NULL) {
ahd->platform_data->flags |= AHD_DV_WAIT_SIMQ_EMPTY;
ahd_unlock(ahd, &s);
down(&ahd->platform_data->dv_sem);
down_interruptible(&ahd->platform_data->dv_sem);
ahd_lock(ahd, &s);
}
......@@ -2521,7 +2538,7 @@ ahd_linux_dv_thread(void *data)
while (AHD_DV_SIMQ_FROZEN(ahd) == 0) {
ahd->platform_data->flags |= AHD_DV_WAIT_SIMQ_RELEASE;
ahd_unlock(ahd, &s);
down(&ahd->platform_data->dv_sem);
down_interruptible(&ahd->platform_data->dv_sem);
ahd_lock(ahd, &s);
}
ahd_unlock(ahd, &s);
......@@ -2623,6 +2640,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
AHD_TRANS_GOAL, /*paused*/FALSE);
ahd_unlock(ahd, &s);
timeout = 10 * HZ;
targ->flags &= ~AHD_INQ_VALID;
/* FALLTHROUGH */
case AHD_DV_STATE_INQ_VERIFY:
{
......@@ -2686,7 +2704,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahd_unlock(ahd, &s);
#endif
down(&ahd->platform_data->dv_cmd_sem);
down_interruptible(&ahd->platform_data->dv_cmd_sem);
/*
* Wait for the SIMQ to be released so that DV is the
* only reason the queue is frozen.
......@@ -2695,7 +2713,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
while (AHD_DV_SIMQ_FROZEN(ahd) == 0) {
ahd->platform_data->flags |= AHD_DV_WAIT_SIMQ_RELEASE;
ahd_unlock(ahd, &s);
down(&ahd->platform_data->dv_sem);
down_interruptible(&ahd->platform_data->dv_sem);
ahd_lock(ahd, &s);
}
ahd_unlock(ahd, &s);
......@@ -2704,6 +2722,25 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
}
out:
if ((targ->flags & AHD_INQ_VALID) != 0
&& ahd_linux_get_device(ahd, devinfo.channel - 'A',
devinfo.target, devinfo.lun,
/*alloc*/FALSE) == NULL) {
/*
* The DV state machine failed to configure this device.
* This is normal if DV is disabled. Since we have inquiry
* data, filter it and use the "optimistic" negotiation
* parameters found in the inquiry string.
*/
ahd_linux_filter_inquiry(ahd, &devinfo);
if ((targ->flags & (AHD_BASIC_DV|AHD_ENHANCED_DV)) != 0) {
ahd_print_devinfo(ahd, &devinfo);
printf("DV failed to configure device. "
"Please file a bug report against "
"this driver.\n");
}
}
if (cmd != NULL)
free(cmd, M_DEVBUF);
......@@ -2789,24 +2826,21 @@ ahd_linux_dv_transition(struct ahd_softc *ahd, struct scsi_cmnd *cmd,
break;
}
if (ahd_linux_user_dv_setting(ahd) == 0) {
ahd_linux_filter_inquiry(ahd, devinfo);
AHD_SET_DV_STATE(ahd, targ, AHD_DV_STATE_EXIT);
AHD_SET_DV_STATE(ahd, targ, targ->dv_state+1);
targ->flags |= AHD_INQ_VALID;
if (ahd_linux_user_dv_setting(ahd) == 0)
break;
}
spi3data = targ->inq_data->spi3data;
switch (spi3data & SID_SPI_CLOCK_DT_ST) {
default:
case SID_SPI_CLOCK_ST:
/* Assume only basic DV is supported. */
ahd_linux_filter_inquiry(ahd, devinfo);
AHD_SET_DV_STATE(ahd, targ,
AHD_DV_STATE_INQ_VERIFY);
targ->flags |= AHD_BASIC_DV;
break;
case SID_SPI_CLOCK_DT:
case SID_SPI_CLOCK_DT_ST:
AHD_SET_DV_STATE(ahd, targ, AHD_DV_STATE_REBD);
targ->flags |= AHD_ENHANCED_DV;
break;
}
break;
......@@ -2902,8 +2936,15 @@ ahd_linux_dv_transition(struct ahd_softc *ahd, struct scsi_cmnd *cmd,
case AHD_DV_STATE_TUR:
switch (status & SS_MASK) {
case SS_NOP:
if ((targ->flags & AHD_BASIC_DV) != 0) {
ahd_linux_filter_inquiry(ahd, devinfo);
AHD_SET_DV_STATE(ahd, targ,
AHD_DV_STATE_INQ_ASYNC);
AHD_DV_STATE_INQ_VERIFY);
} else if ((targ->flags & AHD_ENHANCED_DV) != 0) {
AHD_SET_DV_STATE(ahd, targ, AHD_DV_STATE_REBD);
} else {
AHD_SET_DV_STATE(ahd, targ, AHD_DV_STATE_EXIT);
}
break;
case SS_RETRY:
case SS_TUR:
......
......@@ -36,7 +36,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#96 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#99 $
*
*/
#ifndef _AIC79XX_LINUX_H_
......@@ -48,6 +48,7 @@
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/smp_lock.h>
#include <linux/version.h>
#ifndef AHD_MODVERSION_FILE
#define __NO_VERSION__
......@@ -287,7 +288,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h>
#endif
#define AIC79XX_DRIVER_VERSION "1.3.0.ALPHA5"
#define AIC79XX_DRIVER_VERSION "1.3.0.ALPHA6"
/**************************** Front End Queues ********************************/
/*
......@@ -424,16 +425,19 @@ struct ahd_linux_device {
};
typedef enum {
AHD_DV_REQUIRED = 0x01
AHD_DV_REQUIRED = 0x01,
AHD_INQ_VALID = 0x02,
AHD_BASIC_DV = 0x04,
AHD_ENHANCED_DV = 0x08
} ahd_linux_targ_flags;
/* DV States */
typedef enum {
AHD_DV_STATE_EXIT = 0,
AHD_DV_STATE_INQ_SHORT_ASYNC,
AHD_DV_STATE_TUR,
AHD_DV_STATE_INQ_ASYNC,
AHD_DV_STATE_INQ_ASYNC_VERIFY,
AHD_DV_STATE_TUR,
AHD_DV_STATE_REBD,
AHD_DV_STATE_INQ_VERIFY,
AHD_DV_STATE_WEB,
......
......@@ -36,7 +36,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#18 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#19 $
*/
#include "aic79xx_osm.h"
......@@ -240,10 +240,8 @@ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base,
if (check_region(*base, 256) != 0
|| check_region(*base2, 256) != 0)
return (ENOMEM);
else {
request_region(*base, 256, "aic79xx");
request_region(*base2, 256, "aic79xx");
}
#else
if (request_region(*base, 256, "aic79xx") == 0)
return (ENOMEM);
......
......@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#104 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#105 $
*
* $FreeBSD$
*/
......@@ -2772,9 +2772,12 @@ ahc_handle_message_phase(struct ahc_softc *ahc)
*/
if (ahc->msgout_len != 0) {
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0)
if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) {
ahc_print_devinfo(ahc, &devinfo);
printf("Asserting ATN for response\n");
}
#endif
ahc_assert_atn(ahc);
}
} else
ahc->msgin_index++;
......
/*
* Adaptec AIC7xxx device driver for Linux.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#163 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#166 $
*
* Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science.
......@@ -2336,8 +2336,25 @@ ahc_linux_dv_thread(void *data)
printf("Launching DV Thread\n");
#endif
/*
* Don't care about any signals.
*/
siginitsetinv(&current->blocked, 0);
/*
* Complete thread creation.
*/
lock_kernel();
daemonize();
sprintf(current->comm, "ahc_dv_%d", ahc->unit);
unlock_kernel();
while (1) {
down(&ahc->platform_data->dv_sem);
/*
* Use down_interruptible() rather than down() to
* avoid inclusion in the load average.
*/
down_interruptible(&ahc->platform_data->dv_sem);
/* Check to see if we've been signaled to exit */
ahc_lock(ahc, &s);
......@@ -2360,7 +2377,7 @@ ahc_linux_dv_thread(void *data)
while (LIST_FIRST(&ahc->pending_scbs) != NULL) {
ahc->platform_data->flags |= AHC_DV_WAIT_SIMQ_EMPTY;
ahc_unlock(ahc, &s);
down(&ahc->platform_data->dv_sem);
down_interruptible(&ahc->platform_data->dv_sem);
ahc_lock(ahc, &s);
}
......@@ -2371,7 +2388,7 @@ ahc_linux_dv_thread(void *data)
while (AHC_DV_SIMQ_FROZEN(ahc) == 0) {
ahc->platform_data->flags |= AHC_DV_WAIT_SIMQ_RELEASE;
ahc_unlock(ahc, &s);
down(&ahc->platform_data->dv_sem);
down_interruptible(&ahc->platform_data->dv_sem);
ahc_lock(ahc, &s);
}
ahc_unlock(ahc, &s);
......@@ -2473,6 +2490,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
AHC_TRANS_GOAL, /*paused*/FALSE);
ahc_unlock(ahc, &s);
timeout = 10 * HZ;
targ->flags &= ~AHC_INQ_VALID;
/* FALLTHROUGH */
case AHC_DV_STATE_INQ_VERIFY:
{
......@@ -2536,7 +2554,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahc_unlock(ahc, &s);
#endif
down(&ahc->platform_data->dv_cmd_sem);
down_interruptible(&ahc->platform_data->dv_cmd_sem);
/*
* Wait for the SIMQ to be released so that DV is the
* only reason the queue is frozen.
......@@ -2545,7 +2563,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
while (AHC_DV_SIMQ_FROZEN(ahc) == 0) {
ahc->platform_data->flags |= AHC_DV_WAIT_SIMQ_RELEASE;
ahc_unlock(ahc, &s);
down(&ahc->platform_data->dv_sem);
down_interruptible(&ahc->platform_data->dv_sem);
ahc_lock(ahc, &s);
}
ahc_unlock(ahc, &s);
......@@ -2554,6 +2572,25 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
}
out:
if ((targ->flags & AHC_INQ_VALID) != 0
&& ahc_linux_get_device(ahc, devinfo.channel - 'A',
devinfo.target, devinfo.lun,
/*alloc*/FALSE) == NULL) {
/*
* The DV state machine failed to configure this device.
* This is normal if DV is disabled. Since we have inquiry
* data, filter it and use the "optimistic" negotiation
* parameters found in the inquiry string.
*/
ahc_linux_filter_inquiry(ahc, &devinfo);
if ((targ->flags & (AHC_BASIC_DV|AHC_ENHANCED_DV)) != 0) {
ahc_print_devinfo(ahc, &devinfo);
printf("DV failed to configure device. "
"Please file a bug report against "
"this driver.\n");
}
}
if (cmd != NULL)
free(cmd, M_DEVBUF);
......@@ -2639,24 +2676,21 @@ ahc_linux_dv_transition(struct ahc_softc *ahc, struct scsi_cmnd *cmd,
break;
}
if (ahc_linux_user_dv_setting(ahc) == 0) {
ahc_linux_filter_inquiry(ahc, devinfo);
AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_EXIT);
AHC_SET_DV_STATE(ahc, targ, targ->dv_state+1);
targ->flags |= AHC_INQ_VALID;
if (ahc_linux_user_dv_setting(ahc) == 0)
break;
}
spi3data = targ->inq_data->spi3data;
switch (spi3data & SID_SPI_CLOCK_DT_ST) {
default:
case SID_SPI_CLOCK_ST:
/* Assume only basic DV is supported. */
ahc_linux_filter_inquiry(ahc, devinfo);
AHC_SET_DV_STATE(ahc, targ,
AHC_DV_STATE_INQ_VERIFY);
targ->flags |= AHC_BASIC_DV;
break;
case SID_SPI_CLOCK_DT:
case SID_SPI_CLOCK_DT_ST:
AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_REBD);
targ->flags |= AHC_ENHANCED_DV;
break;
}
break;
......@@ -2752,8 +2786,15 @@ ahc_linux_dv_transition(struct ahc_softc *ahc, struct scsi_cmnd *cmd,
case AHC_DV_STATE_TUR:
switch (status & SS_MASK) {
case SS_NOP:
if ((targ->flags & AHC_BASIC_DV) != 0) {
ahc_linux_filter_inquiry(ahc, devinfo);
AHC_SET_DV_STATE(ahc, targ,
AHC_DV_STATE_INQ_ASYNC);
AHC_DV_STATE_INQ_VERIFY);
} else if ((targ->flags & AHC_ENHANCED_DV) != 0) {
AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_REBD);
} else {
AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_EXIT);
}
break;
case SS_RETRY:
case SS_TUR:
......@@ -4373,6 +4414,17 @@ ahc_linux_handle_scsi_status(struct ahc_softc *ahc,
memset(&cmd->sense_buffer[sense_size], 0,
sizeof(cmd->sense_buffer) - sense_size);
cmd->result |= (DRIVER_SENSE << 24);
#ifdef AHC_DEBUG
if (ahc_debug & AHC_SHOW_SENSE) {
int i;
printf("Copied %d bytes of sense data:",
sense_size);
for (i = 0; i < sense_size; i++)
printf(" 0x%x", cmd->sense_buffer[i]);
printf("\n");
}
#endif
}
break;
}
......
......@@ -53,7 +53,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#111 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#114 $
*
*/
#ifndef _AIC7XXX_LINUX_H_
......@@ -65,6 +65,7 @@
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/smp_lock.h>
#include <linux/version.h>
#ifndef AHC_MODVERSION_FILE
#define __NO_VERSION__
......@@ -300,7 +301,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h>
#endif
#define AIC7XXX_DRIVER_VERSION "6.2.24"
#define AIC7XXX_DRIVER_VERSION "6.2.25"
/**************************** Front End Queues ********************************/
/*
......@@ -437,16 +438,19 @@ struct ahc_linux_device {
};
typedef enum {
AHC_DV_REQUIRED = 0x01
AHC_DV_REQUIRED = 0x01,
AHC_INQ_VALID = 0x02,
AHC_BASIC_DV = 0x04,
AHC_ENHANCED_DV = 0x08
} ahc_linux_targ_flags;
/* DV States */
typedef enum {
AHC_DV_STATE_EXIT = 0,
AHC_DV_STATE_INQ_SHORT_ASYNC,
AHC_DV_STATE_TUR,
AHC_DV_STATE_INQ_ASYNC,
AHC_DV_STATE_INQ_ASYNC_VERIFY,
AHC_DV_STATE_TUR,
AHC_DV_STATE_REBD,
AHC_DV_STATE_INQ_VERIFY,
AHC_DV_STATE_WEB,
......
......@@ -36,7 +36,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#41 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#42 $
*/
#include "aic7xxx_osm.h"
......@@ -232,7 +232,6 @@ ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, u_long *base)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
if (check_region(*base, 256) != 0)
return (ENOMEM);
else
request_region(*base, 256, "aic7xxx");
#else
if (request_region(*base, 256, "aic7xxx") == 0)
......
......@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_symbol.c#23 $
* $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_symbol.c#24 $
*
* $FreeBSD$
*/
......@@ -546,7 +546,7 @@ symtable_dump(FILE *ofile, FILE *dfile)
if (num_entries == 0)
aic_print_reg_dump_start(dfile,
curnode);
else
else if (dfile != NULL)
fputs(",\n", dfile);
num_entries++;
aic_print_reg_dump_entry(dfile, fieldnode);
......
......@@ -541,12 +541,18 @@ static struct asc_table_entry asc_table[] = {
"Rounded parameter") },
/* DTL WRSOMCAE */{SST(0x39, 0x00, SS_RDEF,
"Saving parameters not supported") },
/* DTL WRSOM */{SST(0x3A, 0x00, SS_FATAL|ENXIO,
/* DTL WRSOM */{SST(0x3A, 0x00, SS_NOP,
"Medium not present") },
/* DT WR OM */{SST(0x3A, 0x01, SS_FATAL|ENXIO,
/* DT WR OM */{SST(0x3A, 0x01, SS_NOP,
"Medium not present - tray closed") },
/* DT WR OM */{SST(0x3A, 0x02, SS_FATAL|ENXIO,
/* DT WR OM */{SST(0x3A, 0x01, SS_NOP,
"Medium not present - tray open") },
/* DT WR OM */{SST(0x3A, 0x03, SS_NOP,
"Medium not present - Loadable") },
/* DT WR OM */{SST(0x3A, 0x04, SS_NOP,
"Medium not present - medium auxiliary "
"memory accessible") },
/* DT WR OM */{SST(0x3A, 0xFF, SS_NOP, NULL) },/* Range 0x05->0xFF */
/* TL */{SST(0x3B, 0x00, SS_RDEF,
"Sequential positioning error") },
/* T */{SST(0x3B, 0x01, SS_RDEF,
......
......@@ -827,12 +827,16 @@ extern const char *scsi_sense_key_text[];
/************************* Large Disk Handling ********************************/
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
static __inline int aic_sector_div(u_long capacity, int heads, int sectors);
static __inline int
aic_sector_div(u_long capacity, int heads, int sectors)
{
return (capacity / (heads * sectors));
}
#else
static __inline int aic_sector_div(sector_t capacity, int heads, int sectors);
static __inline int
aic_sector_div(sector_t capacity, int heads, int sectors)
{
......
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