aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2007-10-19 02:41:04 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:53 -0400
commit1c3f0b8e07de78a86f2dce911f5e245845ce40a8 (patch)
tree6ecefa9d2777c79e759f56c533533463ba83206e
parent68318b8e0b61f98f0be833cc862ab6dee69348b4 (diff)
Change struct marker users
Prior to use struct marker in the linux kernel markers, we need to clean two drivers which use this structure name. Change bonding driver types : - struct marker to struct bond_marker. - marker_t to bond_marker_t. - marker_header to bond_marker_header. - marker_header_t to bond_marker_header_t. Change qla4xxx struct marker_entry usage : - Change struct marker_entry for struct qla4_marker_entry. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Chad Tindel <ctindel@users.sourceforge.net> Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: David Somayajulu <david.somayajulu@qlogic.com> Cc: James Bottomley <James.Bottomley@SteelEye.com> Cc: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/net/bonding/bond_3ad.c32
-rw-r--r--drivers/net/bonding/bond_3ad.h12
-rw-r--r--drivers/scsi/qla4xxx/ql4_fw.h2
-rw-r--r--drivers/scsi/qla4xxx/ql4_iocb.c2
4 files changed, 25 insertions, 23 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 7a045a37056e..084f0292ea6e 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -126,7 +126,7 @@ static struct aggregator *__get_active_agg(struct aggregator *aggregator);
126 126
127// ================= main 802.3ad protocol functions ================== 127// ================= main 802.3ad protocol functions ==================
128static int ad_lacpdu_send(struct port *port); 128static int ad_lacpdu_send(struct port *port);
129static int ad_marker_send(struct port *port, struct marker *marker); 129static int ad_marker_send(struct port *port, struct bond_marker *marker);
130static void ad_mux_machine(struct port *port); 130static void ad_mux_machine(struct port *port);
131static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port); 131static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port);
132static void ad_tx_machine(struct port *port); 132static void ad_tx_machine(struct port *port);
@@ -139,8 +139,8 @@ static void ad_initialize_port(struct port *port, int lacp_fast);
139static void ad_initialize_lacpdu(struct lacpdu *Lacpdu); 139static void ad_initialize_lacpdu(struct lacpdu *Lacpdu);
140static void ad_enable_collecting_distributing(struct port *port); 140static void ad_enable_collecting_distributing(struct port *port);
141static void ad_disable_collecting_distributing(struct port *port); 141static void ad_disable_collecting_distributing(struct port *port);
142static void ad_marker_info_received(struct marker *marker_info, struct port *port); 142static void ad_marker_info_received(struct bond_marker *marker_info, struct port *port);
143static void ad_marker_response_received(struct marker *marker, struct port *port); 143static void ad_marker_response_received(struct bond_marker *marker, struct port *port);
144 144
145 145
146///////////////////////////////////////////////////////////////////////////////// 146/////////////////////////////////////////////////////////////////////////////////
@@ -889,12 +889,12 @@ static int ad_lacpdu_send(struct port *port)
889 * Returns: 0 on success 889 * Returns: 0 on success
890 * < 0 on error 890 * < 0 on error
891 */ 891 */
892static int ad_marker_send(struct port *port, struct marker *marker) 892static int ad_marker_send(struct port *port, struct bond_marker *marker)
893{ 893{
894 struct slave *slave = port->slave; 894 struct slave *slave = port->slave;
895 struct sk_buff *skb; 895 struct sk_buff *skb;
896 struct marker_header *marker_header; 896 struct bond_marker_header *marker_header;
897 int length = sizeof(struct marker_header); 897 int length = sizeof(struct bond_marker_header);
898 struct mac_addr lacpdu_multicast_address = AD_MULTICAST_LACPDU_ADDR; 898 struct mac_addr lacpdu_multicast_address = AD_MULTICAST_LACPDU_ADDR;
899 899
900 skb = dev_alloc_skb(length + 16); 900 skb = dev_alloc_skb(length + 16);
@@ -909,7 +909,7 @@ static int ad_marker_send(struct port *port, struct marker *marker)
909 skb->network_header = skb->mac_header + ETH_HLEN; 909 skb->network_header = skb->mac_header + ETH_HLEN;
910 skb->protocol = PKT_TYPE_LACPDU; 910 skb->protocol = PKT_TYPE_LACPDU;
911 911
912 marker_header = (struct marker_header *)skb_put(skb, length); 912 marker_header = (struct bond_marker_header *)skb_put(skb, length);
913 913
914 marker_header->ad_header.destination_address = lacpdu_multicast_address; 914 marker_header->ad_header.destination_address = lacpdu_multicast_address;
915 /* Note: source addres is set to be the member's PERMANENT address, because we use it 915 /* Note: source addres is set to be the member's PERMANENT address, because we use it
@@ -1709,7 +1709,7 @@ static void ad_disable_collecting_distributing(struct port *port)
1709 */ 1709 */
1710static void ad_marker_info_send(struct port *port) 1710static void ad_marker_info_send(struct port *port)
1711{ 1711{
1712 struct marker marker; 1712 struct bond_marker marker;
1713 u16 index; 1713 u16 index;
1714 1714
1715 // fill the marker PDU with the appropriate values 1715 // fill the marker PDU with the appropriate values
@@ -1742,13 +1742,14 @@ static void ad_marker_info_send(struct port *port)
1742 * @port: the port we're looking at 1742 * @port: the port we're looking at
1743 * 1743 *
1744 */ 1744 */
1745static void ad_marker_info_received(struct marker *marker_info,struct port *port) 1745static void ad_marker_info_received(struct bond_marker *marker_info,
1746 struct port *port)
1746{ 1747{
1747 struct marker marker; 1748 struct bond_marker marker;
1748 1749
1749 // copy the received marker data to the response marker 1750 // copy the received marker data to the response marker
1750 //marker = *marker_info; 1751 //marker = *marker_info;
1751 memcpy(&marker, marker_info, sizeof(struct marker)); 1752 memcpy(&marker, marker_info, sizeof(struct bond_marker));
1752 // change the marker subtype to marker response 1753 // change the marker subtype to marker response
1753 marker.tlv_type=AD_MARKER_RESPONSE_SUBTYPE; 1754 marker.tlv_type=AD_MARKER_RESPONSE_SUBTYPE;
1754 // send the marker response 1755 // send the marker response
@@ -1767,7 +1768,8 @@ static void ad_marker_info_received(struct marker *marker_info,struct port *port
1767 * response for marker PDU's, in this stage, but only to respond to marker 1768 * response for marker PDU's, in this stage, but only to respond to marker
1768 * information. 1769 * information.
1769 */ 1770 */
1770static void ad_marker_response_received(struct marker *marker, struct port *port) 1771static void ad_marker_response_received(struct bond_marker *marker,
1772 struct port *port)
1771{ 1773{
1772 marker=NULL; // just to satisfy the compiler 1774 marker=NULL; // just to satisfy the compiler
1773 port=NULL; // just to satisfy the compiler 1775 port=NULL; // just to satisfy the compiler
@@ -2164,15 +2166,15 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u
2164 case AD_TYPE_MARKER: 2166 case AD_TYPE_MARKER:
2165 // No need to convert fields to Little Endian since we don't use the marker's fields. 2167 // No need to convert fields to Little Endian since we don't use the marker's fields.
2166 2168
2167 switch (((struct marker *)lacpdu)->tlv_type) { 2169 switch (((struct bond_marker *)lacpdu)->tlv_type) {
2168 case AD_MARKER_INFORMATION_SUBTYPE: 2170 case AD_MARKER_INFORMATION_SUBTYPE:
2169 dprintk("Received Marker Information on port %d\n", port->actor_port_number); 2171 dprintk("Received Marker Information on port %d\n", port->actor_port_number);
2170 ad_marker_info_received((struct marker *)lacpdu, port); 2172 ad_marker_info_received((struct bond_marker *)lacpdu, port);
2171 break; 2173 break;
2172 2174
2173 case AD_MARKER_RESPONSE_SUBTYPE: 2175 case AD_MARKER_RESPONSE_SUBTYPE:
2174 dprintk("Received Marker Response on port %d\n", port->actor_port_number); 2176 dprintk("Received Marker Response on port %d\n", port->actor_port_number);
2175 ad_marker_response_received((struct marker *)lacpdu, port); 2177 ad_marker_response_received((struct bond_marker *)lacpdu, port);
2176 break; 2178 break;
2177 2179
2178 default: 2180 default:
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 862952fa6fd9..f16557264944 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -92,7 +92,7 @@ typedef enum {
92typedef enum { 92typedef enum {
93 AD_MARKER_INFORMATION_SUBTYPE = 1, // marker imformation subtype 93 AD_MARKER_INFORMATION_SUBTYPE = 1, // marker imformation subtype
94 AD_MARKER_RESPONSE_SUBTYPE // marker response subtype 94 AD_MARKER_RESPONSE_SUBTYPE // marker response subtype
95} marker_subtype_t; 95} bond_marker_subtype_t;
96 96
97// timers types(43.4.9 in the 802.3ad standard) 97// timers types(43.4.9 in the 802.3ad standard)
98typedef enum { 98typedef enum {
@@ -148,7 +148,7 @@ typedef struct lacpdu_header {
148} lacpdu_header_t; 148} lacpdu_header_t;
149 149
150// Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) 150// Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard)
151typedef struct marker { 151typedef struct bond_marker {
152 u8 subtype; // = 0x02 (marker PDU) 152 u8 subtype; // = 0x02 (marker PDU)
153 u8 version_number; // = 0x01 153 u8 version_number; // = 0x01
154 u8 tlv_type; // = 0x01 (marker information) 154 u8 tlv_type; // = 0x01 (marker information)
@@ -161,12 +161,12 @@ typedef struct marker {
161 u8 tlv_type_terminator; // = 0x00 161 u8 tlv_type_terminator; // = 0x00
162 u8 terminator_length; // = 0x00 162 u8 terminator_length; // = 0x00
163 u8 reserved_90[90]; // = 0 163 u8 reserved_90[90]; // = 0
164} marker_t; 164} bond_marker_t;
165 165
166typedef struct marker_header { 166typedef struct bond_marker_header {
167 struct ad_header ad_header; 167 struct ad_header ad_header;
168 struct marker marker; 168 struct bond_marker marker;
169} marker_header_t; 169} bond_marker_header_t;
170 170
171#pragma pack() 171#pragma pack()
172 172
diff --git a/drivers/scsi/qla4xxx/ql4_fw.h b/drivers/scsi/qla4xxx/ql4_fw.h
index 9bb3d1d2a925..fe415ec85655 100644
--- a/drivers/scsi/qla4xxx/ql4_fw.h
+++ b/drivers/scsi/qla4xxx/ql4_fw.h
@@ -671,7 +671,7 @@ struct continuation_t1_entry {
671#define ET_CONTINUE ET_CONT_T1 671#define ET_CONTINUE ET_CONT_T1
672 672
673/* Marker entry structure*/ 673/* Marker entry structure*/
674struct marker_entry { 674struct qla4_marker_entry {
675 struct qla4_header hdr; /* 00-03 */ 675 struct qla4_header hdr; /* 00-03 */
676 676
677 uint32_t system_defined; /* 04-07 */ 677 uint32_t system_defined; /* 04-07 */
diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c
index 5006ecb3ef5e..e4461b5d767a 100644
--- a/drivers/scsi/qla4xxx/ql4_iocb.c
+++ b/drivers/scsi/qla4xxx/ql4_iocb.c
@@ -69,7 +69,7 @@ static int qla4xxx_get_req_pkt(struct scsi_qla_host *ha,
69static int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, 69static int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha,
70 struct ddb_entry *ddb_entry, int lun) 70 struct ddb_entry *ddb_entry, int lun)
71{ 71{
72 struct marker_entry *marker_entry; 72 struct qla4_marker_entry *marker_entry;
73 unsigned long flags = 0; 73 unsigned long flags = 0;
74 uint8_t status = QLA_SUCCESS; 74 uint8_t status = QLA_SUCCESS;
75 75