Initial 8Gb support, not tested very well yet.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@742 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Dotan Barak
2009-04-03 06:35:36 +00:00
parent 2d3b3f19fd
commit 25a289c0f6
16 changed files with 12670 additions and 239 deletions
+20 -28
View File
@@ -1,6 +1,6 @@
/* $Id: isp.c,v 1.213 2009/02/01 23:49:48 mjacob Exp $ */
/* $Id: isp.c,v 1.216 2009/04/03 04:56:00 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -312,6 +312,9 @@ isp_reset(ispsoftc_t *isp)
case ISP_HA_FC_2400:
btype = "2422";
break;
case ISP_HA_FC_2500:
btype = "2532";
break;
default:
break;
}
@@ -1006,6 +1009,9 @@ isp_reset(ispsoftc_t *isp)
} else {
mbs.param[3] = 1;
}
if (IS_25XX(isp)) {
mbs.ibits |= 0x10;
}
} else if (IS_2322(isp)) {
mbs.param[1] = code_org;
if (isp->isp_loaded_fw) {
@@ -1805,7 +1811,7 @@ isp_fibre_init_2400(ispsoftc_t *isp)
}
}
if (chan == isp->isp_nchan) {
isp_prt(isp, ISP_LOGDEBUG0, "all channels with role 'none'");
isp_prt(isp, ISP_LOGDEBUG0, "all %d channels with role 'none'", chan);
isp->isp_state = ISP_INITSTATE;
return;
}
@@ -2810,7 +2816,11 @@ not_on_fabric:
/* mbs.param[2] undefined if we're just getting rate */
isp_mboxcmd(isp, &mbs);
if (mbs.param[0] == MBOX_COMMAND_COMPLETE) {
if (mbs.param[1] == MBGSD_FOURGB) {
if (mbs.param[1] == MBGSD_EIGHTGB) {
isp_prt(isp, ISP_LOGINFO,
"Chan %d 8Gb link speed", chan);
fcp->isp_gbspeed = 8;
} else if (mbs.param[1] == MBGSD_FOURGB) {
isp_prt(isp, ISP_LOGINFO,
"Chan %d 4Gb link speed", chan);
fcp->isp_gbspeed = 4;
@@ -7845,7 +7855,7 @@ isp_reinit(ispsoftc_t *isp)
isp_reset(isp);
if (isp->isp_state != ISP_RESETSTATE) {
isp_prt(isp, ISP_LOGERR, "isp_reinit cannot reset card");
isp_prt(isp, ISP_LOGERR, "%s: cannot reset card", __func__);
ISP_DISABLE_INTS(isp);
goto cleanup;
}
@@ -7858,7 +7868,7 @@ isp_reinit(ispsoftc_t *isp)
if (isp->isp_state != ISP_RUNSTATE) {
#ifndef ISP_TARGET_MODE
isp_prt(isp, ISP_LOGINFO, "isp_reinit: not at runstate");
isp_prt(isp, ISP_LOGWARN, "%s: not at runstate", __func__);
#endif
ISP_DISABLE_INTS(isp);
if (IS_FC(isp)) {
@@ -8101,9 +8111,12 @@ static void
isp_rd_2400_nvram(ispsoftc_t *isp, uint32_t addr, uint32_t *rp)
{
int loops = 0;
const uint32_t base = 0x7ffe0000;
uint32_t base = 0x7ffe0000;
uint32_t tmp = 0;
if (IS_25XX(isp)) {
base = 0x7ff00000 | 0x48000;
}
ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr);
for (loops = 0; loops < 5000; loops++) {
ISP_DELAY(10);
@@ -8426,16 +8439,6 @@ isp_parse_nvram_2100(ispsoftc_t *isp, uint8_t *nvram_data)
}
fcp->isp_wwnn_nvram = wwn;
#if 0
/*
* Do some obvious fixups here.
*/
if (fcp->isp_wwnn_nvram == 0 && (fcp->isp_wwpn_nvram >> 60) == 2) {
fcp->isp_wwnn_nvram = fcp->isp_wwpn_nvram;
fcp->isp_wwnn_nvram &= ~0x0fff000000000000ULL;
}
#endif
fcp->isp_maxalloc = ISP2100_NVRAM_MAXIOCBALLOCATION(nvram_data);
if ((isp->isp_confopts & ISP_CFG_OWNFSZ) == 0) {
DEFAULT_FRAMESIZE(isp) =
@@ -8510,17 +8513,6 @@ isp_parse_nvram_2400(ispsoftc_t *isp, uint8_t *nvram_data)
}
fcp->isp_wwnn_nvram = wwn;
#if 0
/*
* Do some obvious fixups here.
*/
if (fcp->isp_wwnn_nvram == 0 && (fcp->isp_wwpn_nvram >> 60) == 2) {
fcp->isp_wwnn_nvram = fcp->isp_wwpn_nvram;
fcp->isp_wwnn_nvram &= ~0x0fff000000000000ULL;
}
#endif
if (ISP2400_NVRAM_EXCHANGE_COUNT(nvram_data)) {
fcp->isp_maxalloc = ISP2400_NVRAM_EXCHANGE_COUNT(nvram_data);
}
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_library.c,v 1.55 2009/02/01 23:49:49 mjacob Exp $ */
/* $Id: isp_library.c,v 1.57 2009/03/30 04:19:19 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_library.h,v 1.29 2009/01/24 17:55:53 mjacob Exp $ */
/* $Id: isp_library.h,v 1.31 2009/03/30 04:19:19 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_stds.h,v 1.15 2008/11/13 22:30:00 mjacob Exp $ */
/* $Id: isp_stds.h,v 1.16 2009/03/30 04:19:19 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_target.c,v 1.84 2009/02/13 23:58:38 mjacob Exp $ */
/* $Id: isp_target.c,v 1.86 2009/03/30 04:19:19 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_target.h,v 1.64 2009/02/13 23:58:38 mjacob Exp $ */
/* $Id: isp_target.h,v 1.65 2009/03/30 04:19:19 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_tpublic.h,v 1.45 2009/02/13 23:58:38 mjacob Exp $ */
/* $Id: isp_tpublic.h,v 1.46 2009/03/30 04:19:19 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+4 -2
View File
@@ -1,6 +1,6 @@
/* $Id: ispmbox.h,v 1.76 2009/02/01 23:49:49 mjacob Exp $ */
/* $Id: ispmbox.h,v 1.78 2009/04/03 04:56:00 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -194,6 +194,7 @@
#define MBGSD_TWOGB 1
#define MBGSD_AUTO 2
#define MBGSD_FOURGB 3 /* 24XX only */
#define MBGSD_EIGHTGB 4 /* 25XX only */
#define ISP2100_SET_PCI_PARAM 0x00ff
@@ -1005,6 +1006,7 @@ typedef struct {
#define ICB2400_OPT3_RATE_TWOGB 0x00002000
#define ICB2400_OPT3_RATE_AUTO 0x00004000
#define ICB2400_OPT3_RATE_FOURGB 0x00006000
#define ICB2400_OPT3_RATE_EIGHTGB 0x00008000
#define ICB2400_OPT3_ENA_OOF_XFRDY 0x00000200
#define ICB2400_OPT3_NO_LOCAL_PLOGI 0x00000080
#define ICB2400_OPT3_ENA_OOF 0x00000040
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: ispreg.h,v 1.30 2009/01/24 17:55:53 mjacob Exp $ */
/* $Id: ispreg.h,v 1.31 2009/03/30 04:19:20 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+6 -3
View File
@@ -1,6 +1,6 @@
/* $Id: ispvar.h,v 1.104 2009/02/13 23:58:38 mjacob Exp $ */
/* $Id: ispvar.h,v 1.107 2009/04/03 04:56:00 mjacob Exp $ */
/*-
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -417,7 +417,8 @@ typedef struct {
*/
typedef struct {
uint32_t : 11,
uint32_t
link_active : 1,
npiv_fabric : 1,
inorder : 1,
sendmarker : 1,
@@ -738,6 +739,7 @@ struct ispsoftc {
#define ISP_HA_FC_2312 0x40
#define ISP_HA_FC_2322 0x50
#define ISP_HA_FC_2400 0x60
#define ISP_HA_FC_2500 0x70
#define IS_SCSI(isp) (isp->isp_type & ISP_HA_SCSI)
#define IS_1020(isp) (isp->isp_type < ISP_HA_SCSI_1240)
@@ -762,6 +764,7 @@ struct ispsoftc {
#define IS_2312(isp) ((isp)->isp_type == ISP_HA_FC_2312)
#define IS_2322(isp) ((isp)->isp_type == ISP_HA_FC_2322)
#define IS_24XX(isp) ((isp)->isp_type >= ISP_HA_FC_2400)
#define IS_25XX(isp) ((isp)->isp_type >= ISP_HA_FC_2500)
/*
* DMA related macros
File diff suppressed because it is too large Load Diff
+2 -177
View File
@@ -1,6 +1,6 @@
/* $Id: isp_cb_ops.c,v 1.98 2009/02/01 23:49:55 mjacob Exp $ */
/* $Id: isp_cb_ops.c,v 1.100 2009/03/30 04:17:13 mjacob Exp $ */
/*
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -752,181 +752,6 @@ isp_ioctl(struct inode *ip, struct file *fp, unsigned int c, unsigned long arg)
}
return (rv);
}
#if 0
static void
isp_run_cmd_done(struct scsi_cmnd *Cmnd)
{
struct semaphore *semap = (struct semaphore *) Cmnd->SCp.ptr;
up(semap);
}
static int
isp_run_cmd(ispsoftc_t *isp, isp_xcmd_t *cmd)
{
struct scsi_device *dev = NULL;
struct scsi_cmnd *Cmnd = NULL;
struct Scsi_Host *host = NULL;
uint32_t handle;
uint8_t local[QENTRY_LEN];
ispreq_t *reqp;
void *qep;
int time, result = 0;
struct semaphore rsem;
unsigned long flags;
time = cmd->timeout / 1000;
if (time == 0 && cmd->timeout) {
time = 1;
}
if (IS_24XX(isp) && time > 0x1999) {
time = 0x1999;
}
memset(local, 0, sizeof (local));
Cmnd = isp_kzalloc(sizeof (struct scsi_cmnd), GFP_KERNEL);
if (Cmnd == NULL) {
result = -ENOMEM;
goto out;
}
host = isp->isp_osinfo.host;
dev = isp_kzalloc(sizeof (struct scsi_device), GFP_KERNEL);
if (dev == NULL) {
result = -ENOMEM;
goto out;
}
Cmnd->device = dev;
dev->host = host;
Cmnd->scsi_done = isp_run_cmd_done;
Cmnd->SCp.ptr = (char *)&rsem;
sema_init(&rsem, 0);
ISP_LOCKU_SOFTC(isp);
qep = isp_getrqentry(isp);
if (qep == NULL) {
ISP_UNLKU_SOFTC(isp);
isp_prt(isp, ISP_LOGDEBUG0, "%s: Request Queue Overflow", __func__);
result = -ENOMEM;
goto out;
}
reqp = (ispreq_t *) local;
reqp->req_header.rqs_entry_count = 1;
if (isp_save_xs(isp, Cmnd, &handle)) {
ISP_UNLKU_SOFTC(isp);
isp_prt(isp, ISP_LOGDEBUG0, "out of xflist pointers");
result = -ENOMEM;
goto out;
}
reqp->req_handle = handle;
/*
* Now see if we need to synchronize the ISP with respect to anything.
* We do dual duty here (cough) for synchronizing for busses other
* than which we got here to send a command to.
*/
if (IS_24XX(isp)) {
ispreqt7_t *t7 = (ispreqt7_t *) local;
reqp->req_header.rqs_entry_type = RQSTYPE_T7RQS;
t7->req_task_attribute = FCP_CMND_TASK_ATTR_SIMPLE;
t7->req_nphdl = cmd->handle;
t7->req_tidlo = cmd->portid;
t7->req_tidhi = cmd->portid >> 16;
if (cmd->lun > 256) {
t7->req_lun[0] = cmd->lun >> 8;
t7->req_lun[0] |= 0x40;
}
t7->req_lun[1] = cmd->lun;
MEMCPY(t7->req_cdb, cmd->fcd.beg.cdb, min(sizeof (t7->req_cdb), sizeof (cmd->fcd.beg.cdb)));
Cmnd->cmd_len = sizeof(t7->req_cdb);
t7->req_time = time;
t7->req_vpidx = cmd->channel;
} else if (IS_FC(isp)) {
ispreqt2_t *t2 = (ispreqt2_t *) local;
reqp->req_header.rqs_entry_type = RQSTYPE_T2RQS;
t2->req_flags = REQFLAG_STAG;
if (ISP_CAP_2KLOGIN(isp)) {
((ispreqt2e_t *)reqp)->req_target = cmd->handle;
((ispreqt2e_t *)reqp)->req_scclun = cmd->lun;
} else if (ISP_CAP_SCCFW(isp)) {
t2->req_target = cmd->handle;
t2->req_scclun = cmd->lun;
} else {
t2->req_target = cmd->handle;
t2->req_lun_trn = cmd->lun;
}
MEMCPY(t2->req_cdb, cmd->fcd.beg.cdb, min(sizeof (t2->req_cdb), sizeof (cmd->fcd.beg.cdb)));
Cmnd->cmd_len = sizeof(t2->req_cdb);
t2->req_time = time;
} else {
reqp->req_header.rqs_entry_type = RQSTYPE_REQUEST;
reqp->req_flags = REQFLAG_STAG;
reqp->req_target = cmd->handle;
reqp->req_lun_trn = cmd->lun;
reqp->req_cdblen = 12;
MEMCPY(reqp->req_cdb, cmd->fcd.beg.cdb, min(sizeof (reqp->req_cdb), sizeof (cmd->fcd.beg.cdb)));
Cmnd->cmd_len = 12;
reqp->req_time = time;
}
MEMCPY(Cmnd->cmnd, cmd->fcd.beg.cdb, Cmnd->cmd_len);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
Cmnd->request_bufflen = cmd->fcd.beg.data_length;
Cmnd->request_buffer = cmd->fcd.beg.data_ptr;
if (Cmnd->request_bufflen && Cmnd->request_buffer) {
if (cmd->fcd.beg.do_read) {
Cmnd->sc_data_direction = SCSI_DATA_READ;
} else {
Cmnd->sc_data_direction = SCSI_DATA_WRITE;
}
} else {
Cmnd->sc_data_direction = SCSI_DATA_NONE;
}
result = ISP_DMASETUP(isp, Cmnd, reqp);
switch (result) {
default:
isp_prt(isp, ISP_LOGWARN, "isp_run_cmd: dma setup returned %d", result);
result = -EIO;
break;
case CMD_EAGAIN:
result = -ENOMEM;
break;
case CMD_QUEUED:
ISP_SYNC_REQUEST(isp);
isp->isp_nactive++;
result = 0;
break;
}
#else
isp_prt(isp, ISP_LOGERR, "do not have a kernel map thingie yet");
result = -EFAULT;
#endif
if (result == 0) {
ISP_UNLKU_SOFTC(isp);
down(&rsem);
cmd->fcd.end.data_residual = XS_GET_RESID(Cmnd);
cmd->fcd.end.status = Cmnd->SCp.Status;
if (cmd->fcd.end.status == SCSI_CHECK) {
MEMCPY(cmd->fcd.end.sense_data, XS_SNSP(Cmnd), min(sizeof(cmd->fcd.end.sense_data), XS_SNSLEN(Cmnd)));
}
if (host_byte(Cmnd->result) != DID_OK) {
result = -EIO;
}
ISP_LOCKU_SOFTC(isp);
ISP_DMAFREE(isp, Cmnd, handle);
}
isp_destroy_handle(isp, handle);
ISP_UNLKU_SOFTC(isp);
out:
if (dev) {
isp_kfree(dev, sizeof (struct scsi_device));
}
isp_kfree(Cmnd, sizeof (struct scsi_cmnd));
return (result);
}
#endif
/*
* vim:ts=4:sw=4:expandtab
*/
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_ioctl.h,v 1.29 2008/09/12 22:24:31 mjacob Exp $ */
/* $Id: isp_ioctl.h,v 1.30 2009/03/30 04:17:34 mjacob Exp $ */
/*
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+6 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_linux.c,v 1.241 2009/02/13 23:58:38 mjacob Exp $ */
/* $Id: isp_linux.c,v 1.243 2009/04/03 04:56:00 mjacob Exp $ */
/*
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -158,6 +158,10 @@ isplinux_info(struct Scsi_Host *host)
foo[25] = '4';
foo[26] = '2';
foo[27] = '2';
} else if (isp->isp_type == ISP_HA_FC_2500) {
foo[25] = '5';
foo[26] = '3';
foo[27] = '2';
}
return (foo);
} else if (IS_1240(isp)) {
+2 -2
View File
@@ -1,6 +1,6 @@
/* $Id: isp_linux.h,v 1.169 2009/02/13 23:58:38 mjacob Exp $ */
/* $Id: isp_linux.h,v 1.171 2009/03/30 04:17:25 mjacob Exp $ */
/*
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
+37 -9
View File
@@ -1,6 +1,6 @@
/* $Id: isp_pci.c,v 1.176 2009/02/13 23:58:38 mjacob Exp $ */
/* $Id: isp_pci.c,v 1.179 2009/04/03 04:56:01 mjacob Exp $ */
/*
* Copyright (c) 1997-2008 by Matthew Jacob
* Copyright (c) 1997-2009 by Matthew Jacob
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -77,7 +77,7 @@ static int isp_pci_rd_isr(ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *);
#if !(defined(ISP_DISABLE_2300_SUPPORT) && defined(ISP_DISABLE_2322_SUPPORT))
static int isp_pci_rd_isr_2300(ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *);
#endif
#ifndef ISP_DISABLE_2400_SUPPORT
#if !defined(ISP_DISABLE_2400_SUPPORT)
static uint32_t isp_pci_rd_reg_2400(ispsoftc_t *, int);
static void isp_pci_wr_reg_2400(ispsoftc_t *, int, uint32_t);
static int isp_pci_rd_isr_2400(ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *);
@@ -118,6 +118,7 @@ static int isplinux_pci_exclude(struct pci_dev *);
#define ISP_2300_RISC_CODE NULL
#define ISP_2322_RISC_CODE NULL
#define ISP_2400_RISC_CODE NULL
#define ISP_2500_RISC_CODE NULL
#if defined(DISABLE_FW_LOADER) || !(defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE))
#ifndef ISP_DISABLE_1020_SUPPORT
@@ -143,6 +144,7 @@ static int isplinux_pci_exclude(struct pci_dev *);
#endif
#ifndef ISP_DISABLE_2400_SUPPORT
#include "asm_2400.h"
#include "asm_2500.h"
#endif
#endif
@@ -265,6 +267,18 @@ static struct ispmdvec mdvec_2400 = {
NULL,
ISP_2400_RISC_CODE
};
static struct ispmdvec mdvec_2500 = {
isp_pci_rd_isr_2400,
isp_pci_rd_reg_2400,
isp_pci_wr_reg_2400,
isp_pci_mbxdma,
isp_pci_dmasetup,
isp_pci_dmateardown,
isp_pci_reset0,
isp_pci_reset1,
NULL,
ISP_2500_RISC_CODE
};
#endif
#ifndef PCI_DEVICE_ID_QLOGIC_ISP1020
@@ -323,6 +337,10 @@ static struct ispmdvec mdvec_2400 = {
#define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432
#endif
#ifndef PCI_DEVICE_ID_QLOGIC_ISP2532
#define PCI_DEVICE_ID_QLOGIC_ISP2532 0x2532
#endif
#ifndef PCI_DEVICE_ID_QLOGIC_ISP6312
#define PCI_DEVICE_ID_QLOGIC_ISP6312 0x6312
#endif
@@ -600,6 +618,7 @@ isplinux_pci_init_one(struct Scsi_Host *host)
break;
case PCI_DEVICE_ID_QLOGIC_ISP2422:
case PCI_DEVICE_ID_QLOGIC_ISP2432:
case PCI_DEVICE_ID_QLOGIC_ISP2532:
isp->isp_port = PCI_FUNC(pdev->devfn);
isp_pci->poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2400_OFF;
isp->isp_nchan += isp_vports;
@@ -611,7 +630,7 @@ isplinux_pci_init_one(struct Scsi_Host *host)
}
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,7)
if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422 || pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432) {
if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422 || pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432 || pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2532) {
struct msix_entry isp_msix[3];
int reg;
@@ -810,6 +829,12 @@ isplinux_pci_init_one(struct Scsi_Host *host)
if (isp->isp_mdvec->dv_ispfw == NULL)
fwname = "ql2400_fw.bin";
}
if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2532) {
isp->isp_mdvec = &mdvec_2500;
isp->isp_type = ISP_HA_FC_2500;
if (isp->isp_mdvec->dv_ispfw == NULL)
fwname = "ql2500_fw.bin";
}
#endif
if (isp_pci->msix_enabled) {
if (request_irq(isp_pci->msix_vector[0], isplinux_intr, 0, "isp_general", isp_pci)) {
@@ -872,12 +897,12 @@ isplinux_pci_init_one(struct Scsi_Host *host)
*/
if (IS_1020(isp)) {
if (pci_set_dma_mask(pdev, (u64)(0xffffffull))) {
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(24))) {
isp_prt(isp, ISP_LOGERR, "cannot set dma mask");
goto bad;
}
} else if (pci_set_dma_mask(pdev, (u64) (0xffffffffffffffffull))) {
if (pci_set_dma_mask(pdev, (u64) (0xffffffffull))) {
} else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
isp_prt(isp, ISP_LOGERR, "cannot set dma mask");
goto bad;
}
@@ -1047,7 +1072,7 @@ isp_pci_rd_isr(ispsoftc_t *isp, uint32_t *isrp, uint16_t *semap, uint16_t *mbp)
}
#endif
#if !(defined(ISP_DISABLE_2300_SUPPORT) && defined(ISP_DISASBLE_2322_SUPPORT) && defined(ISP_DISABLE_2400_SUPPORT))
#if !(defined(ISP_DISABLE_2300_SUPPORT) && defined(ISP_DISABLE_2322_SUPPORT) && defined(ISP_DISABLE_2400_SUPPORT))
static __inline uint32_t
ispregrd32(struct isp_pcisoftc *pcs, vm_offset_t offset)
{
@@ -1125,7 +1150,7 @@ isp_pci_rd_isr_2300(ispsoftc_t *isp, uint32_t *isrp, uint16_t *semap, uint16_t *
}
#endif
#ifndef ISP_DISABLE_2400_SUPPORT
#if !defined(ISP_DISABLE_2400_SUPPORT)
static __inline void
ispregwr32(struct isp_pcisoftc *pcs, vm_offset_t offset, uint32_t val)
{
@@ -1694,6 +1719,8 @@ isp_pci_dmasetup(ispsoftc_t *isp, Scsi_Cmnd *Cmnd, void *fqe)
hp->rqs_entry_type = RQSTYPE_T3RQS;
}
break;
case RQSTYPE_T7RQS:
break;
default:
isp_prt(isp, ISP_LOGERR, "%s: unknwon type 0x%x", __func__, hp->rqs_entry_type);
return (CMD_COMPLETE);
@@ -1975,6 +2002,7 @@ static struct pci_device_id isp_pci_tbl[] __devinitdata = {
#ifndef ISP_DISABLE_2400_SUPPORT
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2422) },
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2432) },
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2532) },
#endif
{ 0, 0 }
};