Skip to content

Commit 6efca89

Browse files
committed
Merge branch 's390-qeth-next'
Julian Wiedmann says: ==================== s390/qeth: updates 2020-01-25 please apply the following patch series for qeth to your net-next tree. This brings a number of cleanups for the init/teardown code paths. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 14a1d24 + 17d9723 commit 6efca89

File tree

7 files changed

+180
-273
lines changed

7 files changed

+180
-273
lines changed

drivers/s390/net/qeth_core.h

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ enum qeth_channel_states {
558558
*/
559559
enum qeth_card_states {
560560
CARD_STATE_DOWN,
561-
CARD_STATE_HARDSETUP,
562561
CARD_STATE_SOFTSETUP,
563562
};
564563

@@ -608,6 +607,8 @@ struct qeth_cmd_buffer {
608607
long timeout;
609608
unsigned char *data;
610609
void (*finalize)(struct qeth_card *card, struct qeth_cmd_buffer *iob);
610+
bool (*match)(struct qeth_cmd_buffer *iob,
611+
struct qeth_cmd_buffer *reply);
611612
void (*callback)(struct qeth_card *card, struct qeth_cmd_buffer *iob,
612613
unsigned int data_length);
613614
int rc;
@@ -618,6 +619,14 @@ static inline void qeth_get_cmd(struct qeth_cmd_buffer *iob)
618619
refcount_inc(&iob->ref_count);
619620
}
620621

622+
static inline struct qeth_ipa_cmd *__ipa_reply(struct qeth_cmd_buffer *iob)
623+
{
624+
if (!IS_IPA(iob->data))
625+
return NULL;
626+
627+
return (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data);
628+
}
629+
621630
static inline struct qeth_ipa_cmd *__ipa_cmd(struct qeth_cmd_buffer *iob)
622631
{
623632
return (struct qeth_ipa_cmd *)(iob->data + IPA_PDU_HEADER_SIZE);
@@ -727,11 +736,10 @@ struct qeth_osn_info {
727736

728737
struct qeth_discipline {
729738
const struct device_type *devtype;
730-
int (*recover)(void *ptr);
731739
int (*setup) (struct ccwgroup_device *);
732740
void (*remove) (struct ccwgroup_device *);
733-
int (*set_online) (struct ccwgroup_device *);
734-
int (*set_offline) (struct ccwgroup_device *);
741+
int (*set_online)(struct qeth_card *card);
742+
void (*set_offline)(struct qeth_card *card);
735743
int (*do_ioctl)(struct net_device *dev, struct ifreq *rq, int cmd);
736744
int (*control_event_handler)(struct qeth_card *card,
737745
struct qeth_ipa_cmd *cmd);
@@ -987,14 +995,11 @@ struct net_device *qeth_clone_netdev(struct net_device *orig);
987995
struct qeth_card *qeth_get_card_by_busid(char *bus_id);
988996
void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int);
989997
int qeth_threads_running(struct qeth_card *, unsigned long);
990-
int qeth_do_run_thread(struct qeth_card *, unsigned long);
991-
void qeth_clear_thread_start_bit(struct qeth_card *, unsigned long);
992-
void qeth_clear_thread_running_bit(struct qeth_card *, unsigned long);
993998
int qeth_core_hardsetup_card(struct qeth_card *card, bool *carrier_ok);
994999
int qeth_stop_channel(struct qeth_channel *channel);
1000+
int qeth_set_offline(struct qeth_card *card, bool resetting);
9951001

9961002
void qeth_print_status_message(struct qeth_card *);
997-
int qeth_init_qdio_queues(struct qeth_card *);
9981003
int qeth_send_ipa_cmd(struct qeth_card *, struct qeth_cmd_buffer *,
9991004
int (*reply_cb)
10001005
(struct qeth_card *, struct qeth_reply *, unsigned long),
@@ -1027,7 +1032,9 @@ void qeth_setadp_promisc_mode(struct qeth_card *card, bool enable);
10271032
int qeth_setadpparms_change_macaddr(struct qeth_card *);
10281033
void qeth_tx_timeout(struct net_device *, unsigned int txqueue);
10291034
void qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
1030-
u16 cmd_length);
1035+
u16 cmd_length,
1036+
bool (*match)(struct qeth_cmd_buffer *iob,
1037+
struct qeth_cmd_buffer *reply));
10311038
int qeth_query_switch_attributes(struct qeth_card *card,
10321039
struct qeth_switch_info *sw_info);
10331040
int qeth_query_card_info(struct qeth_card *card,

0 commit comments

Comments
 (0)