Commit 3fa1dbd9 authored by David S. Miller's avatar David S. Miller

Merge branch 's390-qeth-next'

Julian Wiedmann says:

====================
s390/qeth: updates 2020-07-14

please apply the following patch series for qeth to netdev's net-next tree.

This brings a mix of cleanups for various parts of the control code.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 3d12e50f 94ae20f7
...@@ -721,7 +721,6 @@ struct qeth_card_options { ...@@ -721,7 +721,6 @@ struct qeth_card_options {
struct qeth_vnicc_info vnicc; /* VNICC options */ struct qeth_vnicc_info vnicc; /* VNICC options */
enum qeth_discipline_id layer; enum qeth_discipline_id layer;
enum qeth_ipa_isolation_modes isolation; enum qeth_ipa_isolation_modes isolation;
enum qeth_ipa_isolation_modes prev_isolation;
int sniffer; int sniffer;
enum qeth_cq cq; enum qeth_cq cq;
char hsuid[9]; char hsuid[9];
...@@ -804,14 +803,13 @@ struct qeth_card { ...@@ -804,14 +803,13 @@ struct qeth_card {
struct workqueue_struct *event_wq; struct workqueue_struct *event_wq;
struct workqueue_struct *cmd_wq; struct workqueue_struct *cmd_wq;
wait_queue_head_t wait_q; wait_queue_head_t wait_q;
DECLARE_HASHTABLE(mac_htable, 4);
DECLARE_HASHTABLE(ip_htable, 4); DECLARE_HASHTABLE(ip_htable, 4);
DECLARE_HASHTABLE(local_addrs4, 4); DECLARE_HASHTABLE(local_addrs4, 4);
DECLARE_HASHTABLE(local_addrs6, 4); DECLARE_HASHTABLE(local_addrs6, 4);
spinlock_t local_addrs4_lock; spinlock_t local_addrs4_lock;
spinlock_t local_addrs6_lock; spinlock_t local_addrs6_lock;
struct mutex ip_lock; struct mutex ip_lock;
DECLARE_HASHTABLE(ip_mc_htable, 4); DECLARE_HASHTABLE(rx_mode_addrs, 4);
struct work_struct rx_mode_work; struct work_struct rx_mode_work;
struct work_struct kernel_thread_starter; struct work_struct kernel_thread_starter;
spinlock_t thread_mask_lock; spinlock_t thread_mask_lock;
...@@ -1071,6 +1069,9 @@ int qeth_query_switch_attributes(struct qeth_card *card, ...@@ -1071,6 +1069,9 @@ int qeth_query_switch_attributes(struct qeth_card *card,
struct qeth_switch_info *sw_info); struct qeth_switch_info *sw_info);
int qeth_query_card_info(struct qeth_card *card, int qeth_query_card_info(struct qeth_card *card,
struct carrier_info *carrier_info); struct carrier_info *carrier_info);
int qeth_setadpparms_set_access_ctrl(struct qeth_card *card,
enum qeth_ipa_isolation_modes mode);
unsigned int qeth_count_elements(struct sk_buff *skb, unsigned int data_offset); unsigned int qeth_count_elements(struct sk_buff *skb, unsigned int data_offset);
int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
struct sk_buff *skb, struct qeth_hdr *hdr, struct sk_buff *skb, struct qeth_hdr *hdr,
...@@ -1078,7 +1079,6 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, ...@@ -1078,7 +1079,6 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
int elements_needed); int elements_needed);
int qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); int qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...); void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...);
int qeth_set_access_ctrl_online(struct qeth_card *card, int fallback);
int qeth_configure_cq(struct qeth_card *, enum qeth_cq); int qeth_configure_cq(struct qeth_card *, enum qeth_cq);
int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action); int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
void qeth_trace_features(struct qeth_card *); void qeth_trace_features(struct qeth_card *);
......
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <asm/cio.h> #include <asm/cio.h>
#include "qeth_core_mpc.h" #include "qeth_core_mpc.h"
unsigned char IDX_ACTIVATE_READ[] = { const unsigned char IDX_ACTIVATE_READ[] = {
0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x19, 0x01, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x01, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc1,
...@@ -18,7 +18,7 @@ unsigned char IDX_ACTIVATE_READ[] = { ...@@ -18,7 +18,7 @@ unsigned char IDX_ACTIVATE_READ[] = {
0x00, 0x00 0x00, 0x00
}; };
unsigned char IDX_ACTIVATE_WRITE[] = { const unsigned char IDX_ACTIVATE_WRITE[] = {
0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0x01, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x15, 0x01, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc1, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc1,
...@@ -26,7 +26,7 @@ unsigned char IDX_ACTIVATE_WRITE[] = { ...@@ -26,7 +26,7 @@ unsigned char IDX_ACTIVATE_WRITE[] = {
0x00, 0x00 0x00, 0x00
}; };
unsigned char CM_ENABLE[] = { const unsigned char CM_ENABLE[] = {
0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x63,
0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x01,
...@@ -45,7 +45,7 @@ unsigned char CM_ENABLE[] = { ...@@ -45,7 +45,7 @@ unsigned char CM_ENABLE[] = {
0xff, 0xff, 0xff 0xff, 0xff, 0xff
}; };
unsigned char CM_SETUP[] = { const unsigned char CM_SETUP[] = {
0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x64,
0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x01,
...@@ -65,7 +65,7 @@ unsigned char CM_SETUP[] = { ...@@ -65,7 +65,7 @@ unsigned char CM_SETUP[] = {
0x04, 0x06, 0xc8, 0x00 0x04, 0x06, 0xc8, 0x00
}; };
unsigned char ULP_ENABLE[] = { const unsigned char ULP_ENABLE[] = {
0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x6b,
0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x01,
...@@ -85,7 +85,7 @@ unsigned char ULP_ENABLE[] = { ...@@ -85,7 +85,7 @@ unsigned char ULP_ENABLE[] = {
0xf1, 0x00, 0x00 0xf1, 0x00, 0x00
}; };
unsigned char ULP_SETUP[] = { const unsigned char ULP_SETUP[] = {
0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x6c,
0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x01,
...@@ -107,7 +107,7 @@ unsigned char ULP_SETUP[] = { ...@@ -107,7 +107,7 @@ unsigned char ULP_SETUP[] = {
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
unsigned char DM_ACT[] = { const unsigned char DM_ACT[] = {
0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x55,
0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x01,
...@@ -123,7 +123,7 @@ unsigned char DM_ACT[] = { ...@@ -123,7 +123,7 @@ unsigned char DM_ACT[] = {
0x05, 0x40, 0x01, 0x01, 0x00 0x05, 0x40, 0x01, 0x01, 0x00
}; };
unsigned char IPA_PDU_HEADER[] = { const unsigned char IPA_PDU_HEADER[] = {
0x00, 0xe0, 0x00, 0x00, 0x77, 0x77, 0x77, 0x77, 0x00, 0xe0, 0x00, 0x00, 0x77, 0x77, 0x77, 0x77,
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
......
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
#include <uapi/linux/if_ether.h> #include <uapi/linux/if_ether.h>
#include <uapi/linux/in6.h> #include <uapi/linux/in6.h>
extern const unsigned char IPA_PDU_HEADER[];
#define IPA_PDU_HEADER_SIZE 0x40 #define IPA_PDU_HEADER_SIZE 0x40
#define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer + 0x0e) #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer + 0x0e)
#define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer + 0x26) #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer + 0x26)
#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer + 0x29) #define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer + 0x29)
#define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer + 0x3a) #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer + 0x3a)
extern unsigned char IPA_PDU_HEADER[];
#define QETH_IPA_CMD_DEST_ADDR(buffer) (buffer + 0x2c) #define QETH_IPA_CMD_DEST_ADDR(buffer) (buffer + 0x2c)
#define QETH_SEQ_NO_LENGTH 4 #define QETH_SEQ_NO_LENGTH 4
...@@ -858,7 +858,7 @@ extern const char *qeth_get_ipa_cmd_name(enum qeth_ipa_cmds cmd); ...@@ -858,7 +858,7 @@ extern const char *qeth_get_ipa_cmd_name(enum qeth_ipa_cmds cmd);
/* END OF IP Assist related definitions */ /* END OF IP Assist related definitions */
/*****************************************************************************/ /*****************************************************************************/
extern unsigned char CM_ENABLE[]; extern const unsigned char CM_ENABLE[];
#define CM_ENABLE_SIZE 0x63 #define CM_ENABLE_SIZE 0x63
#define QETH_CM_ENABLE_ISSUER_RM_TOKEN(buffer) (buffer + 0x2c) #define QETH_CM_ENABLE_ISSUER_RM_TOKEN(buffer) (buffer + 0x2c)
#define QETH_CM_ENABLE_FILTER_TOKEN(buffer) (buffer + 0x53) #define QETH_CM_ENABLE_FILTER_TOKEN(buffer) (buffer + 0x53)
...@@ -868,7 +868,7 @@ extern unsigned char CM_ENABLE[]; ...@@ -868,7 +868,7 @@ extern unsigned char CM_ENABLE[];
(PDU_ENCAPSULATION(buffer) + 0x13) (PDU_ENCAPSULATION(buffer) + 0x13)
extern unsigned char CM_SETUP[]; extern const unsigned char CM_SETUP[];
#define CM_SETUP_SIZE 0x64 #define CM_SETUP_SIZE 0x64
#define QETH_CM_SETUP_DEST_ADDR(buffer) (buffer + 0x2c) #define QETH_CM_SETUP_DEST_ADDR(buffer) (buffer + 0x2c)
#define QETH_CM_SETUP_CONNECTION_TOKEN(buffer) (buffer + 0x51) #define QETH_CM_SETUP_CONNECTION_TOKEN(buffer) (buffer + 0x51)
...@@ -877,7 +877,7 @@ extern unsigned char CM_SETUP[]; ...@@ -877,7 +877,7 @@ extern unsigned char CM_SETUP[];
#define QETH_CM_SETUP_RESP_DEST_ADDR(buffer) \ #define QETH_CM_SETUP_RESP_DEST_ADDR(buffer) \
(PDU_ENCAPSULATION(buffer) + 0x1a) (PDU_ENCAPSULATION(buffer) + 0x1a)
extern unsigned char ULP_ENABLE[]; extern const unsigned char ULP_ENABLE[];
#define ULP_ENABLE_SIZE 0x6b #define ULP_ENABLE_SIZE 0x6b
#define QETH_ULP_ENABLE_LINKNUM(buffer) (buffer + 0x61) #define QETH_ULP_ENABLE_LINKNUM(buffer) (buffer + 0x61)
#define QETH_ULP_ENABLE_DEST_ADDR(buffer) (buffer + 0x2c) #define QETH_ULP_ENABLE_DEST_ADDR(buffer) (buffer + 0x2c)
...@@ -898,7 +898,7 @@ extern unsigned char ULP_ENABLE[]; ...@@ -898,7 +898,7 @@ extern unsigned char ULP_ENABLE[];
#define QETH_ULP_ENABLE_PROT_TYPE(buffer) (buffer + 0x50) #define QETH_ULP_ENABLE_PROT_TYPE(buffer) (buffer + 0x50)
#define QETH_IPA_CMD_PROT_TYPE(buffer) (buffer + 0x19) #define QETH_IPA_CMD_PROT_TYPE(buffer) (buffer + 0x19)
extern unsigned char ULP_SETUP[]; extern const unsigned char ULP_SETUP[];
#define ULP_SETUP_SIZE 0x6c #define ULP_SETUP_SIZE 0x6c
#define QETH_ULP_SETUP_DEST_ADDR(buffer) (buffer + 0x2c) #define QETH_ULP_SETUP_DEST_ADDR(buffer) (buffer + 0x2c)
#define QETH_ULP_SETUP_CONNECTION_TOKEN(buffer) (buffer + 0x51) #define QETH_ULP_SETUP_CONNECTION_TOKEN(buffer) (buffer + 0x51)
...@@ -910,7 +910,7 @@ extern unsigned char ULP_SETUP[]; ...@@ -910,7 +910,7 @@ extern unsigned char ULP_SETUP[];
(PDU_ENCAPSULATION(buffer) + 0x1a) (PDU_ENCAPSULATION(buffer) + 0x1a)
extern unsigned char DM_ACT[]; extern const unsigned char DM_ACT[];
#define DM_ACT_SIZE 0x55 #define DM_ACT_SIZE 0x55
#define QETH_DM_ACT_DEST_ADDR(buffer) (buffer + 0x2c) #define QETH_DM_ACT_DEST_ADDR(buffer) (buffer + 0x2c)
#define QETH_DM_ACT_CONNECTION_TOKEN(buffer) (buffer + 0x51) #define QETH_DM_ACT_CONNECTION_TOKEN(buffer) (buffer + 0x51)
...@@ -921,9 +921,8 @@ extern unsigned char DM_ACT[]; ...@@ -921,9 +921,8 @@ extern unsigned char DM_ACT[];
#define QETH_PDU_HEADER_SEQ_NO(buffer) (buffer + 0x1c) #define QETH_PDU_HEADER_SEQ_NO(buffer) (buffer + 0x1c)
#define QETH_PDU_HEADER_ACK_SEQ_NO(buffer) (buffer + 0x20) #define QETH_PDU_HEADER_ACK_SEQ_NO(buffer) (buffer + 0x20)
extern unsigned char IDX_ACTIVATE_READ[]; extern const unsigned char IDX_ACTIVATE_READ[];
extern unsigned char IDX_ACTIVATE_WRITE[]; extern const unsigned char IDX_ACTIVATE_WRITE[];
#define IDX_ACTIVATE_SIZE 0x22 #define IDX_ACTIVATE_SIZE 0x22
#define QETH_IDX_ACT_PNO(buffer) (buffer+0x0b) #define QETH_IDX_ACT_PNO(buffer) (buffer+0x0b)
#define QETH_IDX_ACT_ISSUER_RM_TOKEN(buffer) (buffer + 0x0c) #define QETH_IDX_ACT_ISSUER_RM_TOKEN(buffer) (buffer + 0x0c)
......
...@@ -448,19 +448,17 @@ static ssize_t qeth_dev_isolation_store(struct device *dev, ...@@ -448,19 +448,17 @@ static ssize_t qeth_dev_isolation_store(struct device *dev,
rc = -EINVAL; rc = -EINVAL;
goto out; goto out;
} }
rc = count;
if (qeth_card_hw_is_reachable(card))
/* defer IP assist if device is offline (until discipline->set_online)*/ rc = qeth_setadpparms_set_access_ctrl(card, isolation);
card->options.prev_isolation = card->options.isolation;
card->options.isolation = isolation; if (!rc)
if (qeth_card_hw_is_reachable(card)) { WRITE_ONCE(card->options.isolation, isolation);
int ipa_rc = qeth_set_access_ctrl_online(card, 1);
if (ipa_rc != 0)
rc = ipa_rc;
}
out: out:
mutex_unlock(&card->conf_mutex); mutex_unlock(&card->conf_mutex);
return rc;
return rc ? rc : count;
} }
static DEVICE_ATTR(isolation, 0644, qeth_dev_isolation_show, static DEVICE_ATTR(isolation, 0644, qeth_dev_isolation_show,
......
...@@ -156,7 +156,7 @@ static void qeth_l2_drain_rx_mode_cache(struct qeth_card *card) ...@@ -156,7 +156,7 @@ static void qeth_l2_drain_rx_mode_cache(struct qeth_card *card)
struct hlist_node *tmp; struct hlist_node *tmp;
int i; int i;
hash_for_each_safe(card->mac_htable, i, tmp, mac, hnode) { hash_for_each_safe(card->rx_mode_addrs, i, tmp, mac, hnode) {
hash_del(&mac->hnode); hash_del(&mac->hnode);
kfree(mac); kfree(mac);
} }
...@@ -438,7 +438,7 @@ static void qeth_l2_add_mac(struct qeth_card *card, struct netdev_hw_addr *ha) ...@@ -438,7 +438,7 @@ static void qeth_l2_add_mac(struct qeth_card *card, struct netdev_hw_addr *ha)
u32 mac_hash = get_unaligned((u32 *)(&ha->addr[2])); u32 mac_hash = get_unaligned((u32 *)(&ha->addr[2]));
struct qeth_mac *mac; struct qeth_mac *mac;
hash_for_each_possible(card->mac_htable, mac, hnode, mac_hash) { hash_for_each_possible(card->rx_mode_addrs, mac, hnode, mac_hash) {
if (ether_addr_equal_64bits(ha->addr, mac->mac_addr)) { if (ether_addr_equal_64bits(ha->addr, mac->mac_addr)) {
mac->disp_flag = QETH_DISP_ADDR_DO_NOTHING; mac->disp_flag = QETH_DISP_ADDR_DO_NOTHING;
return; return;
...@@ -452,7 +452,7 @@ static void qeth_l2_add_mac(struct qeth_card *card, struct netdev_hw_addr *ha) ...@@ -452,7 +452,7 @@ static void qeth_l2_add_mac(struct qeth_card *card, struct netdev_hw_addr *ha)
ether_addr_copy(mac->mac_addr, ha->addr); ether_addr_copy(mac->mac_addr, ha->addr);
mac->disp_flag = QETH_DISP_ADDR_ADD; mac->disp_flag = QETH_DISP_ADDR_ADD;
hash_add(card->mac_htable, &mac->hnode, mac_hash); hash_add(card->rx_mode_addrs, &mac->hnode, mac_hash);
} }
static void qeth_l2_rx_mode_work(struct work_struct *work) static void qeth_l2_rx_mode_work(struct work_struct *work)
...@@ -475,7 +475,7 @@ static void qeth_l2_rx_mode_work(struct work_struct *work) ...@@ -475,7 +475,7 @@ static void qeth_l2_rx_mode_work(struct work_struct *work)
qeth_l2_add_mac(card, ha); qeth_l2_add_mac(card, ha);
netif_addr_unlock_bh(dev); netif_addr_unlock_bh(dev);
hash_for_each_safe(card->mac_htable, i, tmp, mac, hnode) { hash_for_each_safe(card->rx_mode_addrs, i, tmp, mac, hnode) {
switch (mac->disp_flag) { switch (mac->disp_flag) {
case QETH_DISP_ADDR_DELETE: case QETH_DISP_ADDR_DELETE:
qeth_l2_remove_mac(card, mac->mac_addr); qeth_l2_remove_mac(card, mac->mac_addr);
...@@ -601,7 +601,6 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev) ...@@ -601,7 +601,6 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev)
return rc; return rc;
} }
hash_init(card->mac_htable);
INIT_WORK(&card->rx_mode_work, qeth_l2_rx_mode_work); INIT_WORK(&card->rx_mode_work, qeth_l2_rx_mode_work);
return 0; return 0;
} }
......
...@@ -58,7 +58,7 @@ static struct qeth_ipaddr *qeth_l3_find_addr_by_ip(struct qeth_card *card, ...@@ -58,7 +58,7 @@ static struct qeth_ipaddr *qeth_l3_find_addr_by_ip(struct qeth_card *card,
struct qeth_ipaddr *addr; struct qeth_ipaddr *addr;
if (query->is_multicast) { if (query->is_multicast) {
hash_for_each_possible(card->ip_mc_htable, addr, hnode, key) hash_for_each_possible(card->rx_mode_addrs, addr, hnode, key)
if (qeth_l3_addr_match_ip(addr, query)) if (qeth_l3_addr_match_ip(addr, query))
return addr; return addr;
} else { } else {
...@@ -239,7 +239,7 @@ static void qeth_l3_drain_rx_mode_cache(struct qeth_card *card) ...@@ -239,7 +239,7 @@ static void qeth_l3_drain_rx_mode_cache(struct qeth_card *card)
struct hlist_node *tmp; struct hlist_node *tmp;
int i; int i;
hash_for_each_safe(card->ip_mc_htable, i, tmp, addr, hnode) { hash_for_each_safe(card->rx_mode_addrs, i, tmp, addr, hnode) {
hash_del(&addr->hnode); hash_del(&addr->hnode);
kfree(addr); kfree(addr);
} }
...@@ -1093,7 +1093,7 @@ static int qeth_l3_add_mcast_rtnl(struct net_device *dev, int vid, void *arg) ...@@ -1093,7 +1093,7 @@ static int qeth_l3_add_mcast_rtnl(struct net_device *dev, int vid, void *arg)
if (!ipm) if (!ipm)
continue; continue;
hash_add(card->ip_mc_htable, &ipm->hnode, hash_add(card->rx_mode_addrs, &ipm->hnode,
qeth_l3_ipaddr_hash(ipm)); qeth_l3_ipaddr_hash(ipm));
} }
...@@ -1124,8 +1124,8 @@ static int qeth_l3_add_mcast_rtnl(struct net_device *dev, int vid, void *arg) ...@@ -1124,8 +1124,8 @@ static int qeth_l3_add_mcast_rtnl(struct net_device *dev, int vid, void *arg)
if (!ipm) if (!ipm)
continue; continue;
hash_add(card->ip_mc_htable, hash_add(card->rx_mode_addrs, &ipm->hnode,
&ipm->hnode, qeth_l3_ipaddr_hash(ipm)); qeth_l3_ipaddr_hash(ipm));
} }
read_unlock_bh(&in6_dev->lock); read_unlock_bh(&in6_dev->lock);
...@@ -1219,7 +1219,7 @@ static void qeth_l3_rx_mode_work(struct work_struct *work) ...@@ -1219,7 +1219,7 @@ static void qeth_l3_rx_mode_work(struct work_struct *work)
vlan_for_each(card->dev, qeth_l3_add_mcast_rtnl, card); vlan_for_each(card->dev, qeth_l3_add_mcast_rtnl, card);
rtnl_unlock(); rtnl_unlock();
hash_for_each_safe(card->ip_mc_htable, i, tmp, addr, hnode) { hash_for_each_safe(card->rx_mode_addrs, i, tmp, addr, hnode) {
switch (addr->disp_flag) { switch (addr->disp_flag) {
case QETH_DISP_ADDR_DELETE: case QETH_DISP_ADDR_DELETE:
rc = qeth_l3_deregister_addr_entry(card, addr); rc = qeth_l3_deregister_addr_entry(card, addr);
...@@ -1919,12 +1919,6 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) ...@@ -1919,12 +1919,6 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
return rc; return rc;
if (IS_OSD(card) || IS_OSX(card)) { if (IS_OSD(card) || IS_OSX(card)) {
if ((card->info.link_type == QETH_LINK_TYPE_LANE_TR) ||
(card->info.link_type == QETH_LINK_TYPE_HSTR)) {
pr_info("qeth_l3: ignoring TR device\n");
return -ENODEV;
}
card->dev->netdev_ops = &qeth_l3_osa_netdev_ops; card->dev->netdev_ops = &qeth_l3_osa_netdev_ops;
/*IPv6 address autoconfiguration stuff*/ /*IPv6 address autoconfiguration stuff*/
...@@ -2004,7 +1998,6 @@ static int qeth_l3_probe_device(struct ccwgroup_device *gdev) ...@@ -2004,7 +1998,6 @@ static int qeth_l3_probe_device(struct ccwgroup_device *gdev)
} }
} }
hash_init(card->ip_mc_htable);
INIT_WORK(&card->rx_mode_work, qeth_l3_rx_mode_work); INIT_WORK(&card->rx_mode_work, qeth_l3_rx_mode_work);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment