diff --git a/qla_isp/common/isp.c b/qla_isp/common/isp.c index e794f8a83..8b4ff1cbe 100644 --- a/qla_isp/common/isp.c +++ b/qla_isp/common/isp.c @@ -1,4 +1,4 @@ -/* $Id: isp.c,v 1.184 2007/12/20 18:26:18 mjacob Exp $ */ +/* $Id: isp.c,v 1.185 2007/12/26 22:38:03 mjacob Exp $ */ /*- * Copyright (c) 1997-2007 by Matthew Jacob * All rights reserved. @@ -5801,6 +5801,13 @@ isp_parse_async(ispsoftc_t *isp, uint16_t mbox) FCPARAM(isp, chan)->isp_loopstate = LOOP_LIP_RCVD; break; + case ASYNC_RCV_ERR: + if (IS_24XX(isp)) { + isp_prt(isp, ISP_LOGWARN, "Receive Error"); + } else { + isp_prt(isp, ISP_LOGWARN, "Unknown Async Code 0x%x", mbox); + } + break; case ASYNC_RJT_SENT: /* same as ASYNC_QFULL_SENT */ if (IS_24XX(isp)) { isp_prt(isp, ISP_LOGTDEBUG0, "LS_RJT sent"); diff --git a/qla_isp/linux/isp_cb_ops.c b/qla_isp/linux/isp_cb_ops.c index b75d55f98..07dc1a239 100644 --- a/qla_isp/linux/isp_cb_ops.c +++ b/qla_isp/linux/isp_cb_ops.c @@ -1,4 +1,4 @@ -/* $Id: isp_cb_ops.c,v 1.79 2007/12/11 22:18:05 mjacob Exp $ */ +/* $Id: isp_cb_ops.c,v 1.81 2007/12/26 22:53:45 mjacob Exp $ */ /* * Copyright (c) 1997-2007 by Matthew Jacob * All rights reserved. @@ -594,8 +594,11 @@ isp_ioctl(struct inode *ip, struct file *fp, unsigned int c, unsigned long arg) break; } case ISP_FC_LIP: + if (COPYIN((void *)arg, &chan, sizeof (chan))) { + chan = 0; + } ISP_LOCK_SOFTC(isp); - if (isp_control(isp, ISPCTL_SEND_LIP, 0)) { + if (isp_control(isp, ISPCTL_SEND_LIP, chan)) { rv = -EIO; } ISP_UNLK_SOFTC(isp); diff --git a/qla_isp/linux/isp_ioctl.h b/qla_isp/linux/isp_ioctl.h index 5feba0632..0c8c0e058 100644 --- a/qla_isp/linux/isp_ioctl.h +++ b/qla_isp/linux/isp_ioctl.h @@ -1,4 +1,4 @@ -/* $Id: isp_ioctl.h,v 1.24 2007/12/02 22:02:06 mjacob Exp $ */ +/* $Id: isp_ioctl.h,v 1.25 2007/12/26 22:38:42 mjacob Exp $ */ /* * Copyright (c) 1997-2007 by Matthew Jacob * All rights reserved. @@ -81,6 +81,8 @@ * This ioctl performs a reset and then will set the adapter to the * role that was passed in (the old role will be returned). It almost * goes w/o saying: use with caution. + * + * Channel selector stored in bits 8..32 as input to driver. */ #define ISP_SETROLE (ISP_IOC | 4) @@ -94,6 +96,7 @@ /* * Get the current adapter role + * Channel selector passed in first argument. */ #define ISP_GETROLE (ISP_IOC | 5) @@ -200,17 +203,20 @@ struct isp_wwn { * Various Reset Goodies */ struct isp_fc_tsk_mgmt { - uint32_t loopid; /* 0..255/2048 */ - uint32_t lun; - enum { + uint32_t loopid; /* 0..255/2048 */ + uint16_t lun; + uint16_t chan; + enum { IPT_CLEAR_ACA, IPT_TARGET_RESET, IPT_LUN_RESET, IPT_CLEAR_TASK_SET, IPT_ABORT_TASK_SET - } action; + } action; }; -#define ISP_TSK_MGMT (ISP_IOC | 21) +/* don't use 21 anymore */ +/* #define ISP_TSK_MGMT (ISP_IOC | 21) */ +#define ISP_TSK_MGMT (ISP_IOC | 22) /* * Just gimme a list of WWPNs that are logged into us. diff --git a/qla_isp/linux/isp_pci.c b/qla_isp/linux/isp_pci.c index dd851c61a..ffd8d0027 100644 --- a/qla_isp/linux/isp_pci.c +++ b/qla_isp/linux/isp_pci.c @@ -1,4 +1,4 @@ -/* $Id: isp_pci.c,v 1.149 2007/12/12 21:19:04 mjacob Exp $ */ +/* $Id: isp_pci.c,v 1.150 2007/12/26 22:37:25 mjacob Exp $ */ /* * Copyright (c) 1997-2007 by Matthew Jacob * All rights reserved. @@ -3342,7 +3342,7 @@ isplinux_pci_init(void) } ret = pci_register_driver(&isplinux_pci_driver); if (ret < 0) { - printk(KERN_ERR "%s: unable to register driver (return value %d)", __FUNCTION__, ret); + printk(KERN_ERR "%s: unable to register driver (return value %d)", __FUNCTION__, ret); unregister_chrdev_region(isp_dev, MAX_ISP); return (ret); }