Commit c46f2ffb authored by James Bottomley's avatar James Bottomley
Browse files

merge by hand (scsi_device.h)

parents c2a9331c f59114b7
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -328,11 +328,6 @@ static int sg_io(struct file *file, request_queue_t *q,
	return 0;
}

#define FORMAT_UNIT_TIMEOUT		(2 * 60 * 60 * HZ)
#define START_STOP_TIMEOUT		(60 * HZ)
#define MOVE_MEDIUM_TIMEOUT		(5 * 60 * HZ)
#define READ_ELEMENT_STATUS_TIMEOUT	(5 * 60 * HZ)
#define READ_DEFECT_DATA_TIMEOUT	(60 * HZ )
#define OMAX_SB_LEN 16          /* For backward compatibility */

static int sg_scsi_ioctl(struct file *file, request_queue_t *q,
+27 −14
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@

extern int i2o_parm_issue(struct i2o_device *, int, void *, int, void *, int);

static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd,
			 unsigned long arg);

static spinlock_t i2o_config_lock;

#define MODINC(x,y) ((x) = ((x) + 1) % (y))
@@ -538,8 +541,7 @@ static int i2o_cfg_evt_get(unsigned long arg, struct file *fp)
}

#ifdef CONFIG_COMPAT
static int i2o_cfg_passthru32(unsigned fd, unsigned cmnd, unsigned long arg,
			      struct file *file)
static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long arg)
{
	struct i2o_cmd_passthru32 __user *cmd;
	struct i2o_controller *c;
@@ -752,7 +754,26 @@ static int i2o_cfg_passthru32(unsigned fd, unsigned cmnd, unsigned long arg,
	return rcode;
}

#else
static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
{
	int ret;
	lock_kernel();		
	switch (cmd) { 
	case I2OGETIOPS:
		ret = i2o_cfg_ioctl(NULL, file, cmd, arg);
		break;
	case I2OPASSTHRU32:
		ret = i2o_cfg_passthru32(file, cmd, arg);
		break;
	default:
		ret = -ENOIOCTLCMD;
		break;
	}
	unlock_kernel();
	return ret;
}

#endif

static int i2o_cfg_passthru(unsigned long arg)
{
@@ -958,7 +979,6 @@ static int i2o_cfg_passthru(unsigned long arg)
	kfree(reply);
	return rcode;
}
#endif

/*
 * IOCTL Handler
@@ -1013,11 +1033,9 @@ static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd,
		ret = i2o_cfg_evt_get(arg, fp);
		break;

#ifndef CONFIG_COMPAT
	case I2OPASSTHRU:
		ret = i2o_cfg_passthru(arg);
		break;
#endif

	default:
		osm_debug("unknown ioctl called!\n");
@@ -1105,6 +1123,9 @@ static struct file_operations config_fops = {
	.owner = THIS_MODULE,
	.llseek = no_llseek,
	.ioctl = i2o_cfg_ioctl,
#ifdef CONFIG_COMPAT
	.compat_ioctl = i2o_cfg_compat_ioctl,
#endif
	.open = cfg_open,
	.release = cfg_release,
	.fasync = cfg_fasync,
@@ -1134,19 +1155,11 @@ static int __init i2o_config_init(void)
		misc_deregister(&i2o_miscdev);
		return -EBUSY;
	}
#ifdef CONFIG_COMPAT
	register_ioctl32_conversion(I2OPASSTHRU32, i2o_cfg_passthru32);
	register_ioctl32_conversion(I2OGETIOPS, (void *)sys_ioctl);
#endif
	return 0;
}

static void i2o_config_exit(void)
{
#ifdef CONFIG_COMPAT
	unregister_ioctl32_conversion(I2OPASSTHRU32);
	unregister_ioctl32_conversion(I2OGETIOPS);
#endif
	misc_deregister(&i2o_miscdev);
	i2o_driver_unregister(&i2o_config_driver);
}
+2 −2
Original line number Diff line number Diff line
@@ -88,10 +88,10 @@ MODULE_DESCRIPTION
    ("FCP (SCSI over Fibre Channel) HBA driver for IBM eServer zSeries");
MODULE_LICENSE("GPL");

module_param(device, charp, 0);
module_param(device, charp, 0400);
MODULE_PARM_DESC(device, "specify initial device");

module_param(loglevel, uint, 0);
module_param(loglevel, uint, 0400);
MODULE_PARM_DESC(loglevel,
		 "log levels, 8 nibbles: "
		 "FC ERP QDIO CIO Config FSF SCSI Other, "
+4 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@
/********************* GENERAL DEFINES *********************************/

/* zfcp version number, it consists of major, minor, and patch-level number */
#define ZFCP_VERSION		"4.2.0"
#define ZFCP_VERSION		"4.3.0"

/**
 * zfcp_sg_to_address - determine kernel address from struct scatterlist
@@ -851,6 +851,9 @@ struct zfcp_adapter {
	wwn_t			wwnn;	           /* WWNN */
	wwn_t			wwpn;	           /* WWPN */
	fc_id_t			s_id;	           /* N_Port ID */
	wwn_t			peer_wwnn;	   /* P2P peer WWNN */
	wwn_t			peer_wwpn;	   /* P2P peer WWPN */
	fc_id_t			peer_d_id;	   /* P2P peer D_ID */
	struct ccw_device       *ccw_device;	   /* S/390 ccw device */
	u8			fc_service_class;
	u32			fc_topology;	   /* FC topology */
+19 −1
Original line number Diff line number Diff line
@@ -2568,6 +2568,23 @@ zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action)
	case ZFCP_ERP_STEP_UNINITIALIZED:
	case ZFCP_ERP_STEP_PHYS_PORT_CLOSING:
	case ZFCP_ERP_STEP_PORT_CLOSING:
		if (adapter->fc_topology == FSF_TOPO_P2P) {
			if (port->wwpn != adapter->peer_wwpn) {
				ZFCP_LOG_NORMAL("Failed to open port 0x%016Lx "
						"on adapter %s.\nPeer WWPN "
						"0x%016Lx does not match\n",
						port->wwpn,
						zfcp_get_busid_by_adapter(adapter),
						adapter->peer_wwpn);
				zfcp_erp_port_failed(port);
				retval = ZFCP_ERP_FAILED;
				break;
			}
			port->d_id = adapter->peer_d_id;
			atomic_set_mask(ZFCP_STATUS_PORT_DID_DID, &port->status);
			retval = zfcp_erp_port_strategy_open_port(erp_action);
			break;
		}
		if (!(adapter->nameserver_port)) {
			retval = zfcp_nameserver_enqueue(adapter);
			if (retval != 0) {
@@ -3516,8 +3533,9 @@ zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter)
	debug_text_event(adapter->erp_dbf, 3, "a_access_unblock");
	debug_event(adapter->erp_dbf, 3, &adapter->name, 8);

	zfcp_erp_port_access_changed(adapter->nameserver_port);
	read_lock_irqsave(&zfcp_data.config_lock, flags);
	if (adapter->nameserver_port)
		zfcp_erp_port_access_changed(adapter->nameserver_port);
	list_for_each_entry(port, &adapter->port_list_head, list)
		if (port != adapter->nameserver_port)
			zfcp_erp_port_access_changed(port);
Loading