Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101547
b: refs/heads/master
c: 235f7f2
h: refs/heads/master
i:
  101545: 2658385
  101543: dea4dd1
v: v3
  • Loading branch information
Martin Peschke authored and James Bottomley committed Jul 12, 2008
1 parent ae018c1 commit 96c5b2e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 47 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc8c282963bd258a5bf49d3aa52675a4ae6d31f6
refs/heads/master: 235f7f25f4928f5075dbebdfb9ca2c5d90db882c
46 changes: 0 additions & 46 deletions trunk/drivers/s390/scsi/zfcp_sysfs_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,51 +39,6 @@ ZFCP_DEFINE_ADAPTER_ATTR(hardware_version, "0x%08x\n",
ZFCP_DEFINE_ADAPTER_ATTR(in_recovery, "%d\n", atomic_test_mask
(ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status));

/**
* zfcp_sysfs_port_add_store - add a port to sysfs tree
* @dev: pointer to belonging device
* @buf: pointer to input buffer
* @count: number of bytes in buffer
*
* Store function of the "port_add" attribute of an adapter.
*/
static ssize_t
zfcp_sysfs_port_add_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
wwn_t wwpn;
char *endp;
struct zfcp_adapter *adapter;
struct zfcp_port *port;
int retval = -EINVAL;

down(&zfcp_data.config_sema);

adapter = dev_get_drvdata(dev);
if (atomic_test_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status)) {
retval = -EBUSY;
goto out;
}

wwpn = simple_strtoull(buf, &endp, 0);
if ((endp + 1) < (buf + count))
goto out;

port = zfcp_port_enqueue(adapter, wwpn, 0, 0);
if (!port)
goto out;

retval = 0;

zfcp_erp_port_reopen(port, 0, 91, NULL);
zfcp_erp_wait(port->adapter);
zfcp_port_put(port);
out:
up(&zfcp_data.config_sema);
return retval ? retval : (ssize_t) count;
}

static DEVICE_ATTR(port_add, S_IWUSR, NULL, zfcp_sysfs_port_add_store);

/**
* zfcp_sysfs_port_rescan - trigger manual port rescan
* @dev: pointer to belonging device
Expand Down Expand Up @@ -237,7 +192,6 @@ static struct attribute *zfcp_adapter_attrs[] = {
&dev_attr_failed.attr,
&dev_attr_in_recovery.attr,
&dev_attr_port_remove.attr,
&dev_attr_port_add.attr,
&dev_attr_port_rescan.attr,
&dev_attr_peer_wwnn.attr,
&dev_attr_peer_wwpn.attr,
Expand Down

0 comments on commit 96c5b2e

Please sign in to comment.