mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
s390/cio: fix multiple structure definitions
Fix multiple definitions of struct channel_path_desc by moving it to asm/chpid.h . Also change ccw_device_get_chp_desc to use proper types. Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
2e4006b34d
commit
2bf29df746
@ -229,5 +229,5 @@ int ccw_device_siosl(struct ccw_device *);
|
|||||||
|
|
||||||
extern void ccw_device_get_schid(struct ccw_device *, struct subchannel_id *);
|
extern void ccw_device_get_schid(struct ccw_device *, struct subchannel_id *);
|
||||||
|
|
||||||
extern void *ccw_device_get_chp_desc(struct ccw_device *, int);
|
struct channel_path_desc *ccw_device_get_chp_desc(struct ccw_device *, int);
|
||||||
#endif /* _S390_CCWDEV_H_ */
|
#endif /* _S390_CCWDEV_H_ */
|
||||||
|
@ -8,6 +8,17 @@
|
|||||||
#include <uapi/asm/chpid.h>
|
#include <uapi/asm/chpid.h>
|
||||||
#include <asm/cio.h>
|
#include <asm/cio.h>
|
||||||
|
|
||||||
|
struct channel_path_desc {
|
||||||
|
u8 flags;
|
||||||
|
u8 lsn;
|
||||||
|
u8 desc;
|
||||||
|
u8 chpid;
|
||||||
|
u8 swla;
|
||||||
|
u8 zeroes;
|
||||||
|
u8 chla;
|
||||||
|
u8 chpp;
|
||||||
|
} __packed;
|
||||||
|
|
||||||
static inline void chp_id_init(struct chp_id *chpid)
|
static inline void chp_id_init(struct chp_id *chpid)
|
||||||
{
|
{
|
||||||
memset(chpid, 0, sizeof(struct chp_id));
|
memset(chpid, 0, sizeof(struct chp_id));
|
||||||
|
@ -509,7 +509,7 @@ out:
|
|||||||
* On success return a newly allocated copy of the channel-path description
|
* On success return a newly allocated copy of the channel-path description
|
||||||
* data associated with the given channel-path ID. Return %NULL on error.
|
* data associated with the given channel-path ID. Return %NULL on error.
|
||||||
*/
|
*/
|
||||||
void *chp_get_chp_desc(struct chp_id chpid)
|
struct channel_path_desc *chp_get_chp_desc(struct chp_id chpid)
|
||||||
{
|
{
|
||||||
struct channel_path *chp;
|
struct channel_path *chp;
|
||||||
struct channel_path_desc *desc;
|
struct channel_path_desc *desc;
|
||||||
|
@ -60,7 +60,7 @@ static inline struct channel_path *chpid_to_chp(struct chp_id chpid)
|
|||||||
int chp_get_status(struct chp_id chpid);
|
int chp_get_status(struct chp_id chpid);
|
||||||
u8 chp_get_sch_opm(struct subchannel *sch);
|
u8 chp_get_sch_opm(struct subchannel *sch);
|
||||||
int chp_is_registered(struct chp_id chpid);
|
int chp_is_registered(struct chp_id chpid);
|
||||||
void *chp_get_chp_desc(struct chp_id chpid);
|
struct channel_path_desc *chp_get_chp_desc(struct chp_id chpid);
|
||||||
void chp_remove_cmg_attr(struct channel_path *chp);
|
void chp_remove_cmg_attr(struct channel_path *chp);
|
||||||
int chp_add_cmg_attr(struct channel_path *chp);
|
int chp_add_cmg_attr(struct channel_path *chp);
|
||||||
int chp_update_desc(struct channel_path *chp);
|
int chp_update_desc(struct channel_path *chp);
|
||||||
|
@ -21,17 +21,6 @@ struct cmg_entry {
|
|||||||
u32 values[NR_MEASUREMENT_ENTRIES];
|
u32 values[NR_MEASUREMENT_ENTRIES];
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct channel_path_desc {
|
|
||||||
u8 flags;
|
|
||||||
u8 lsn;
|
|
||||||
u8 desc;
|
|
||||||
u8 chpid;
|
|
||||||
u8 swla;
|
|
||||||
u8 zeroes;
|
|
||||||
u8 chla;
|
|
||||||
u8 chpp;
|
|
||||||
} __attribute__ ((packed));
|
|
||||||
|
|
||||||
struct channel_path_desc_fmt1 {
|
struct channel_path_desc_fmt1 {
|
||||||
u8 flags;
|
u8 flags;
|
||||||
u8 lsn;
|
u8 lsn;
|
||||||
|
@ -563,14 +563,23 @@ out_unlock:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *ccw_device_get_chp_desc(struct ccw_device *cdev, int chp_no)
|
/**
|
||||||
|
* chp_get_chp_desc - return newly allocated channel-path descriptor
|
||||||
|
* @cdev: device to obtain the descriptor for
|
||||||
|
* @chp_idx: index of the channel path
|
||||||
|
*
|
||||||
|
* On success return a newly allocated copy of the channel-path description
|
||||||
|
* data associated with the given channel path. Return %NULL on error.
|
||||||
|
*/
|
||||||
|
struct channel_path_desc *ccw_device_get_chp_desc(struct ccw_device *cdev,
|
||||||
|
int chp_idx)
|
||||||
{
|
{
|
||||||
struct subchannel *sch;
|
struct subchannel *sch;
|
||||||
struct chp_id chpid;
|
struct chp_id chpid;
|
||||||
|
|
||||||
sch = to_subchannel(cdev->dev.parent);
|
sch = to_subchannel(cdev->dev.parent);
|
||||||
chp_id_init(&chpid);
|
chp_id_init(&chpid);
|
||||||
chpid.id = sch->schib.pmcw.chpid[chp_no];
|
chpid.id = sch->schib.pmcw.chpid[chp_idx];
|
||||||
return chp_get_chp_desc(chpid);
|
return chp_get_chp_desc(chpid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <net/iucv/af_iucv.h>
|
#include <net/iucv/af_iucv.h>
|
||||||
|
|
||||||
#include <asm/ebcdic.h>
|
#include <asm/ebcdic.h>
|
||||||
|
#include <asm/chpid.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/sysinfo.h>
|
#include <asm/sysinfo.h>
|
||||||
#include <asm/compat.h>
|
#include <asm/compat.h>
|
||||||
@ -1344,16 +1345,7 @@ static void qeth_set_multiple_write_queues(struct qeth_card *card)
|
|||||||
static void qeth_update_from_chp_desc(struct qeth_card *card)
|
static void qeth_update_from_chp_desc(struct qeth_card *card)
|
||||||
{
|
{
|
||||||
struct ccw_device *ccwdev;
|
struct ccw_device *ccwdev;
|
||||||
struct channelPath_dsc {
|
struct channel_path_desc *chp_dsc;
|
||||||
u8 flags;
|
|
||||||
u8 lsn;
|
|
||||||
u8 desc;
|
|
||||||
u8 chpid;
|
|
||||||
u8 swla;
|
|
||||||
u8 zeroes;
|
|
||||||
u8 chla;
|
|
||||||
u8 chpp;
|
|
||||||
} *chp_dsc;
|
|
||||||
|
|
||||||
QETH_DBF_TEXT(SETUP, 2, "chp_desc");
|
QETH_DBF_TEXT(SETUP, 2, "chp_desc");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user