git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
s390
/
scsi
/
zfcp_sysfs_port.c
diff --git
a/drivers/s390/scsi/zfcp_sysfs_port.c
b/drivers/s390/scsi/zfcp_sysfs_port.c
index
10b66cd
..
1320c05
100644
(file)
--- a/
drivers/s390/scsi/zfcp_sysfs_port.c
+++ b/
drivers/s390/scsi/zfcp_sysfs_port.c
@@
-1,15
+1,8
@@
/*
/*
- * linux/drivers/s390/scsi/zfcp_sysfs_port.c
+ * This file is part of the zfcp device driver for
+ * FCP adapters for IBM System z9 and zSeries.
*
*
- * FCP adapter driver for IBM eServer zSeries
- *
- * sysfs port related routines
- *
- * (C) Copyright IBM Corp. 2003, 2004
- *
- * Authors:
- * Martin Peschke <mpeschke@de.ibm.com>
- * Heiko Carstens <heiko.carstens@de.ibm.com>
+ * (C) Copyright IBM Corp. 2002, 2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-26,8
+19,6
@@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#define ZFCP_SYSFS_PORT_C_REVISION "$Revision: 1.44 $"
-
#include "zfcp_ext.h"
#define ZFCP_LOG_AREA ZFCP_LOG_AREA_CONFIG
#include "zfcp_ext.h"
#define ZFCP_LOG_AREA ZFCP_LOG_AREA_CONFIG
@@
-51,7
+42,7
@@
zfcp_sysfs_port_release(struct device *dev)
* Generates attributes for a port.
*/
#define ZFCP_DEFINE_PORT_ATTR(_name, _format, _value) \
* Generates attributes for a port.
*/
#define ZFCP_DEFINE_PORT_ATTR(_name, _format, _value) \
-static ssize_t zfcp_sysfs_port_##_name##_show(struct device *dev, \
+static ssize_t zfcp_sysfs_port_##_name##_show(struct device *dev,
struct device_attribute *attr,
\
char *buf) \
{ \
struct zfcp_port *port; \
char *buf) \
{ \
struct zfcp_port *port; \
@@
-63,11
+54,10
@@
static ssize_t zfcp_sysfs_port_##_name##_show(struct device *dev, \
static DEVICE_ATTR(_name, S_IRUGO, zfcp_sysfs_port_##_name##_show, NULL);
ZFCP_DEFINE_PORT_ATTR(status, "0x%08x\n", atomic_read(&port->status));
static DEVICE_ATTR(_name, S_IRUGO, zfcp_sysfs_port_##_name##_show, NULL);
ZFCP_DEFINE_PORT_ATTR(status, "0x%08x\n", atomic_read(&port->status));
-ZFCP_DEFINE_PORT_ATTR(wwnn, "0x%016llx\n", port->wwnn);
-ZFCP_DEFINE_PORT_ATTR(d_id, "0x%06x\n", port->d_id);
-ZFCP_DEFINE_PORT_ATTR(scsi_id, "0x%x\n", port->scsi_id);
ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask
(ZFCP_STATUS_COMMON_ERP_INUSE, &port->status));
ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask
(ZFCP_STATUS_COMMON_ERP_INUSE, &port->status));
+ZFCP_DEFINE_PORT_ATTR(access_denied, "%d\n", atomic_test_mask
+ (ZFCP_STATUS_COMMON_ACCESS_DENIED, &port->status));
/**
* zfcp_sysfs_unit_add_store - add a unit to sysfs tree
/**
* zfcp_sysfs_unit_add_store - add a unit to sysfs tree
@@
-78,7
+68,7
@@
ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask
* Store function of the "unit_add" attribute of a port.
*/
static ssize_t
* Store function of the "unit_add" attribute of a port.
*/
static ssize_t
-zfcp_sysfs_unit_add_store(struct device *dev, const char *buf, size_t count)
+zfcp_sysfs_unit_add_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
fcp_lun_t fcp_lun;
char *endp;
{
fcp_lun_t fcp_lun;
char *endp;
@@
-121,7
+111,7
@@
static DEVICE_ATTR(unit_add, S_IWUSR, NULL, zfcp_sysfs_unit_add_store);
* @count: number of bytes in buffer
*/
static ssize_t
* @count: number of bytes in buffer
*/
static ssize_t
-zfcp_sysfs_unit_remove_store(struct device *dev, const char *buf, size_t count)
+zfcp_sysfs_unit_remove_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct zfcp_port *port;
struct zfcp_unit *unit;
{
struct zfcp_port *port;
struct zfcp_unit *unit;
@@
-182,7
+172,7
@@
static DEVICE_ATTR(unit_remove, S_IWUSR, NULL, zfcp_sysfs_unit_remove_store);
* started for the belonging port.
*/
static ssize_t
* started for the belonging port.
*/
static ssize_t
-zfcp_sysfs_port_failed_store(struct device *dev, const char *buf, size_t count)
+zfcp_sysfs_port_failed_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct zfcp_port *port;
unsigned int val;
{
struct zfcp_port *port;
unsigned int val;
@@
-220,7
+210,7
@@
zfcp_sysfs_port_failed_store(struct device *dev, const char *buf, size_t count)
* "0" if port is working, otherwise "1".
*/
static ssize_t
* "0" if port is working, otherwise "1".
*/
static ssize_t
-zfcp_sysfs_port_failed_show(struct device *dev, char *buf)
+zfcp_sysfs_port_failed_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct zfcp_port *port;
{
struct zfcp_port *port;
@@
-242,8
+232,7
@@
static struct attribute *zfcp_port_common_attrs[] = {
&dev_attr_failed.attr,
&dev_attr_in_recovery.attr,
&dev_attr_status.attr,
&dev_attr_failed.attr,
&dev_attr_in_recovery.attr,
&dev_attr_status.attr,
- &dev_attr_wwnn.attr,
- &dev_attr_d_id.attr,
+ &dev_attr_access_denied.attr,
NULL
};
NULL
};
@@
-258,7
+247,6
@@
static struct attribute_group zfcp_port_common_attr_group = {
static struct attribute *zfcp_port_no_ns_attrs[] = {
&dev_attr_unit_add.attr,
&dev_attr_unit_remove.attr,
static struct attribute *zfcp_port_no_ns_attrs[] = {
&dev_attr_unit_add.attr,
&dev_attr_unit_remove.attr,
- &dev_attr_scsi_id.attr,
NULL
};
NULL
};