s390/qeth: relax locking for ipato config data
[linux-2.6-microblaze.git] / drivers / s390 / net / qeth_core.h
index ecfd6d1..1b3fe38 100644 (file)
@@ -420,12 +420,6 @@ struct qeth_qdio_out_buffer {
 
 struct qeth_card;
 
-enum qeth_out_q_states {
-       QETH_OUT_Q_UNLOCKED,
-       QETH_OUT_Q_LOCKED,
-       QETH_OUT_Q_LOCKED_FLUSH,
-};
-
 #define QETH_CARD_STAT_ADD(_c, _stat, _val)    ((_c)->stats._stat += (_val))
 #define QETH_CARD_STAT_INC(_c, _stat)          QETH_CARD_STAT_ADD(_c, _stat, 1)
 
@@ -486,12 +480,12 @@ struct qeth_qdio_out_q {
        struct qeth_qdio_out_buffer *bufs[QDIO_MAX_BUFFERS_PER_Q];
        struct qdio_outbuf_state *bufstates; /* convenience pointer */
        struct qeth_out_q_stats stats;
+       spinlock_t lock;
        u8 next_buf_to_fill;
        u8 max_elements;
        u8 queue_no;
        u8 do_pack;
        struct qeth_card *card;
-       atomic_t state;
        /*
         * number of buffers that are currently filled (PRIMED)
         * -> these buffers are hardware-owned
@@ -680,14 +674,27 @@ struct qeth_card_blkt {
        int inter_packet_jumbo;
 };
 
+enum qeth_pnso_mode {
+       QETH_PNSO_NONE,
+       QETH_PNSO_BRIDGEPORT,
+       QETH_PNSO_ADDR_INFO,
+};
+
 #define QETH_BROADCAST_WITH_ECHO    0x01
 #define QETH_BROADCAST_WITHOUT_ECHO 0x02
 struct qeth_card_info {
        unsigned short unit_addr2;
        unsigned short cula;
-       u8 chpid;
        __u16 func_level;
        char mcl_level[QETH_MCL_LENGTH + 1];
+       /* doubleword below corresponds to net_if_token */
+       u16 ddev_devno;
+       u8 cssid;
+       u8 iid;
+       u8 ssid;
+       u8 chpid;
+       u16 chid;
+       u8 ids_valid:1; /* cssid,iid,chid */
        u8 dev_addr_is_registered:1;
        u8 open_when_online:1;
        u8 promisc_mode:1;
@@ -696,6 +703,7 @@ struct qeth_card_info {
        /* no bitfield, we take a pointer on these two: */
        u8 has_lp2lp_cso_v6;
        u8 has_lp2lp_cso_v4;
+       enum qeth_pnso_mode pnso_mode;
        enum qeth_card_types type;
        enum qeth_link_types link_type;
        int broadcast_capable;
@@ -780,6 +788,8 @@ struct qeth_switch_info {
 
 struct qeth_priv {
        unsigned int rx_copybreak;
+       u32 brport_hw_features;
+       u32 brport_features;
 };
 
 #define QETH_NAPI_WEIGHT NAPI_POLL_WEIGHT
@@ -804,12 +814,16 @@ struct qeth_card {
        struct workqueue_struct *event_wq;
        struct workqueue_struct *cmd_wq;
        wait_queue_head_t wait_q;
+
+       struct mutex ip_lock;
+       /* protected by ip_lock: */
        DECLARE_HASHTABLE(ip_htable, 4);
+       struct qeth_ipato ipato;
+
        DECLARE_HASHTABLE(local_addrs4, 4);
        DECLARE_HASHTABLE(local_addrs6, 4);
        spinlock_t local_addrs4_lock;
        spinlock_t local_addrs6_lock;
-       struct mutex ip_lock;
        DECLARE_HASHTABLE(rx_mode_addrs, 4);
        struct work_struct rx_mode_work;
        struct work_struct kernel_thread_starter;
@@ -817,7 +831,6 @@ struct qeth_card {
        unsigned long thread_start_mask;
        unsigned long thread_allowed_mask;
        unsigned long thread_running_mask;
-       struct qeth_ipato ipato;
        struct list_head cmd_waiter_list;
        /* QDIO buffer handling */
        struct qeth_qdio_info qdio;