diff -ur pcmcia-cs-3.1.20/SUPPORTED.CARDS pcmcia-cs-3.1.20-powerbook-orinocco/SUPPORTED.CARDS
--- pcmcia-cs-3.1.20/SUPPORTED.CARDS	Wed Aug 30 23:32:48 2000
+++ pcmcia-cs-3.1.20-powerbook-orinocco/SUPPORTED.CARDS	Tue Oct 10 13:26:51 2000
@@ -278,7 +278,7 @@
 	AT&T / NCR / Lucent WaveLAN version 2.0
 	DEC RoamAbout/DS
 
-	[wvlan_cs driver] [x86,axp]
+	[wvlan_cs driver] [x86,axp,ppc]
 	Lucent WaveLAN/IEEE 802.11(b)
 	Melco WLI-PCM-L11
 	NCR WaveLAN/IEEE 802.11
diff -ur pcmcia-cs-3.1.20/clients/3c575_cb.c pcmcia-cs-3.1.20-powerbook-orinocco/clients/3c575_cb.c
--- pcmcia-cs-3.1.20/clients/3c575_cb.c	Mon Aug 28 23:48:29 2000
+++ pcmcia-cs-3.1.20-powerbook-orinocco/clients/3c575_cb.c	Tue Oct 10 13:27:08 2000
@@ -1446,7 +1446,7 @@
 		/* queue will be restarted at the DMADone interrupt. */
 	} else {
 		/* ... and the packet rounded to a doubleword. */
-		outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
+		outsl_ns(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
 		dev_free_skb(skb);
 		if (inw(ioaddr + TxFree) > 1536) {
 			netif_start_queue(dev);
@@ -1704,7 +1704,7 @@
 					while (inw(ioaddr + Wn7_MasterStatus) & 0x8000)
 						;
 				} else {
-					insl(ioaddr + RX_FIFO, skb_put(skb, pkt_len),
+					insl_ns(ioaddr + RX_FIFO, skb_put(skb, pkt_len),
 						 (pkt_len + 3) >> 2);
 				}
 				outw(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */
diff -ur pcmcia-cs-3.1.20/etc/config pcmcia-cs-3.1.20-powerbook-orinocco/etc/config
--- pcmcia-cs-3.1.20/etc/config	Mon Aug 28 20:13:01 2000
+++ pcmcia-cs-3.1.20-powerbook-orinocco/etc/config	Tue Oct 10 13:27:08 2000
@@ -40,7 +40,7 @@
   class "ftl" module "ftl_cs"
 
 device "serial_cs"
-  class "serial" module "serial_cs"
+  class "serial" module "misc/serial", "serial_cs"
 
 device "parport_cs"
   class "parport" module "parport_cs"
diff -ur pcmcia-cs-3.1.20/etc/config.opts pcmcia-cs-3.1.20-powerbook-orinocco/etc/config.opts
--- pcmcia-cs-3.1.20/etc/config.opts	Tue Jun  6 23:01:50 2000
+++ pcmcia-cs-3.1.20-powerbook-orinocco/etc/config.opts	Tue Oct 10 13:27:08 2000
@@ -5,9 +5,8 @@
 
 # System resources available for PCMCIA devices
 
-include port 0x100-0x4ff, port 0x800-0x8ff, port 0xc00-0xcff
-include memory 0xc0000-0xfffff
-include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff
+include port 0x0-0xfff
+include memory 0x90000000-0x90ffffff, memory 0xa0000000-0xa0ffffff            
 
 # High port numbers do not always work...
 # include port 0x1000-0x17ff
@@ -17,12 +16,6 @@
 
 # Resources we should not use, even if they appear to be available
 
-# First built-in serial port
-exclude irq 4
-# Second built-in serial port
-#exclude irq 3
-# First built-in parallel port
-exclude irq 7
 
 #----------------------------------------------------------------------
 
diff -ur pcmcia-cs-3.1.20/modules/cs.c pcmcia-cs-3.1.20-powerbook-orinocco/modules/cs.c
--- pcmcia-cs-3.1.20/modules/cs.c	Tue Aug 29 03:19:23 2000
+++ pcmcia-cs-3.1.20-powerbook-orinocco/modules/cs.c	Tue Oct 10 13:27:08 2000
@@ -440,6 +440,10 @@
     /* Blank out the socket state */
     s->state &= SOCKET_PRESENT|SOCKET_SETUP_PENDING;
     init_socket(s);
+#ifdef __powerpc__
+    s->socket.flags |= SS_EJECTION;
+    s->ss_entry(s->sock, SS_SetSocket, &s->socket);
+#endif
     s->irq.AssignedIRQ = s->irq.Config = 0;
     s->lock_count = 0;
     s->cis_used = 0;
diff -ur pcmcia-cs-3.1.20/modules/i82365.c pcmcia-cs-3.1.20-powerbook-orinocco/modules/i82365.c
--- pcmcia-cs-3.1.20/modules/i82365.c	Wed Aug 30 22:08:37 2000
+++ pcmcia-cs-3.1.20-powerbook-orinocco/modules/i82365.c	Tue Oct 10 13:27:08 2000
@@ -56,6 +56,13 @@
 #include <asm/bitops.h>
 #include <asm/segment.h>
 #include <asm/system.h>
+
+#ifdef __powerpc__
+#include <asm/prom.h>
+#include <asm/adb.h>
+#include <asm/pmu.h>
+#endif
+
 #endif
 
 #include <pcmcia/version.h>
@@ -188,6 +195,10 @@
     u_char		pci_lat, cb_lat, sub_bus, cache;
     u_int		cb_phys;
     char		*cb_virt;
+#ifdef __powerpc__
+    int			pmu_socket;
+    struct adb_request	pmu_req;
+#endif
 #endif
     union {
 	cirrus_state_t		cirrus;
@@ -1511,6 +1522,32 @@
 	}
 #endif
     }
+#ifdef __powerpc__
+    /* work out the mapping to PMU socket number */
+    {
+	struct device_node *np;
+	for (i = 0; i < ns; ++i) {
+	    s[i].pmu_socket = 0;
+	    s[i].pmu_req.complete = 1;
+	}
+	for (np = find_type_devices("pccard"); np != NULL; np = np->next) {
+	    int *reg = (int *) get_property(np, "reg", NULL);
+	    int *ps = (int *) get_property(np, "AAPL,pmu-socket-number", NULL);
+	    int bus, devfn;
+	    if (reg == NULL || ps == NULL)
+		continue;
+	    bus = (reg[0] >> 16) & 0xff;
+	    devfn = (reg[0] >> 8) & 0xff;
+	    for (i = 0; i < ns; ++i) {
+		if (s[i].bus == bus && s[i].devfn == devfn) {
+		    s[i].pmu_socket = *ps;
+		    DEBUG(2, ("socket %d is pmu socket %d\n", i, *ps));
+		    break;
+		}
+	    }
+	}
+    }
+#endif
 
 } /* add_pcic */
 
@@ -2072,7 +2109,13 @@
 	cb_writel(s, CB_SOCKET_EVENT, -1);
     }
 #endif
-
+#ifdef __powerpc__
+	if (state->flags & SS_EJECTION) {
+		if (s->pmu_socket != 0 && s->pmu_req.complete)
+			pmu_request(&s->pmu_req, NULL, 2, PMU_PCEJECT, s->pmu_socket);
+		state->flags &= ~SS_EJECTION;
+	}
+#endif
     return 0;
 } /* i365_set_socket */
 
@@ -2301,7 +2344,15 @@
     i365_get(s, I365_CSC);
     cb_writel(s, CB_SOCKET_MASK, CB_SM_CCD);
     cb_writel(s, CB_SOCKET_EVENT, -1);
-    
+
+#ifdef __powerpc__
+    if (state->flags & SS_EJECTION) {
+		if (s->pmu_socket != 0 && s->pmu_req.complete)
+			pmu_request(&s->pmu_req, NULL, 2, PMU_PCEJECT, s->pmu_socket);
+		state->flags &= ~SS_EJECTION;
+	}
+#endif	
+
     return 0;
 } /* cb_set_socket */
 
diff -ur pcmcia-cs-3.1.20/wireless/wvlan_cs.c pcmcia-cs-3.1.20-powerbook-orinocco/wireless/wvlan_cs.c
--- pcmcia-cs-3.1.20/wireless/wvlan_cs.c	Sat Aug 26 04:30:08 2000
+++ pcmcia-cs-3.1.20-powerbook-orinocco/wireless/wvlan_cs.c	Tue Oct 10 13:26:51 2000
@@ -4,6 +4,13 @@
  *	by Andreas Neuhaus <andy@fasta.fh-dortmund.de>
  *	http://www.fasta.fh-dortmund.de/users/andy/wvlan/
  *
+ *  Byteorder patches for LinuxPPC v0.4
+ *  by Harald Roelle <harald@roelle.com>
+ *  http://www.roelle.com/wvlanPPC
+ *  
+ *  Further updates for 3.1.17
+ *  by I-Jong Lin <ijonglin@hpl.hp.com>
+ *
  *	This driver is free software; you can redistribute and/or
  *	modify it under the terms of the GNU General Public License;
  *	either version 2 of the license, or (at your option) any
@@ -234,6 +241,15 @@
 
 #include "wvlan_hcf.h"
 
+#ifdef __powerpc__
+#include <linux/byteorder/swab.h>
+inline void SwapBytesBlock( void* ptr, int len)
+{
+	int l = (len)/2;
+	while ( l--) swab16s( ((unsigned short*)ptr)++);
+}
+#endif
+
 /* #define PCMCIA_DEBUG 1	// For developer only :-) */
 
 // Undefine this if you want to ignore Tx timeouts
@@ -261,7 +277,7 @@
 /********************************************************************
  * MISC
  */
-static char *version = "1.0.4";
+static char *version = "1.0.4-ppcPatch-0.4";
 static dev_info_t dev_info = "wvlan_cs";
 static dev_link_t *dev_list = NULL;
 
@@ -305,7 +321,11 @@
 #define TX_TIMEOUT ((4000*HZ)/1000)
 
 // Ethernet-II snap header
+#ifdef __powerpc__ // (roelle): store it already byte swapped for ppc, saves some cycles
+static char snap_header[] = { 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x03, 0xf8, 0x00 };
+#else
 static char snap_header[] = { 0x00, 0x00, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
+#endif
 
 // Valid MTU values (HCF_MAX_MSG (2304) is the max hardware frame size)
 #define WVLAN_MIN_MTU 256
@@ -481,6 +501,9 @@
 	if (rc)
 		return rc;
 	l = min(len, ltv.len*2);
+#ifdef __powerpc__
+	SwapBytesBlock( ltv.mac_addr, l+1);  // make sure odd length gets treated right
+#endif
 	memcpy(mac, (char *)ltv.mac_addr, l);
 	return 0;
 }
@@ -534,6 +557,9 @@
 	l = min(strlen(name), ltv.len*2);
 	ltv.id[0] = l;
 	memcpy((char *) &ltv.id[1], name, l);
+#ifdef __powerpc__ // (roelle): no reswapping needed later, we did a memcopy before
+	SwapBytesBlock( &ltv.id[1], l+1); // make sure odd length gets treated right
+#endif
 	rc = hcf_put_info(ifbp, (LTVP) &ltv);
 	DEBUG(DEBUG_NOISY, "%s: hcf_put_info(CFG_CNF_OWN_NAME:'%s') returned 0x%x\n", dev_info, name, rc);
 	return rc;
@@ -554,6 +580,9 @@
 		l = min(len, ltv.id[0]);
 	else
 		l = min(len, ltv.len*2);	/* It's a feature */
+#ifdef __powerpc__
+	SwapBytesBlock( &ltv.id[1], l+1); // make shure odd length gets treated right
+#endif
 	memcpy(name, (char *) &ltv.id[1], l);
 	name[l] = 0;
 	DEBUG(DEBUG_NOISY, "%s: hcf_get_info(CFG_CNF_OWN_NAME):'%s'\n", dev_info, name);
@@ -573,6 +602,9 @@
 	l = min(strlen(name), ltv.len*2);
 	ltv.id[0] = l;
 	memcpy((char *) &ltv.id[1], name, l);
+#ifdef __powerpc__ // (roelle): no reswapping needed later, we did a memcopy before
+	SwapBytesBlock( &ltv.id[1], l+1); // make sure odd length gets treated right
+#endif
 	rc = hcf_put_info(ifbp, (LTVP) &ltv);
 	DEBUG(DEBUG_NOISY, "%s: hcf_put_info(CFG_CNF_OWN/DESIRED_SSID:'%s') returned 0x%x\n", dev_info, name, rc);
 	return rc;
@@ -598,6 +630,9 @@
 	if (ltv.id[0])
 	{
 		l = min(len, ltv.id[0]);
+#ifdef __powerpc__
+		SwapBytesBlock( &ltv.id[1], l+1); // make sure odd length gets treated right
+#endif
 		memcpy(name, (char *) &ltv.id[1], l);
 	}
 	else
@@ -619,6 +654,9 @@
 	if (rc)
 		return rc;
 	l = min(len, ltv.len*2);
+#ifdef __powerpc__
+	SwapBytesBlock( ltv.mac_addr, l+1); // make sure odd length gets treated right
+#endif
 	memcpy(mac, (char *)ltv.mac_addr, l);
 	return 0;
 }
@@ -723,6 +761,9 @@
 	ltv.typ = CFG_SUPPORTED_DATA_RATES;
 	rc = hcf_get_info(ifbp, (LTVP) &ltv);
 	brnum = ltv.id[0];
+#ifdef __powerpc__
+	SwapBytesBlock( &ltv.id[1], brnum+1); // make shure odd length gets treated right
+#endif
 	memcpy(brlist, (char *) &ltv.id[1], brnum);
 	DEBUG(DEBUG_NOISY, "%s: hcf_get_info(CFG_CHANNEL_LIST):0x%x returned 0x%x\n", dev_info, brnum, rc);
 	return rc ? 0 : brnum;
@@ -862,6 +903,9 @@
 		ltv_key.len = sizeof(KEY_STRCT)*MAX_KEYS/2 + 1;
 		ltv_key.typ = CFG_CNF_DEFAULT_KEYS;
 		memcpy((char *) &ltv_key.key, (char *) keys, sizeof(KEY_STRCT)*MAX_KEYS);
+#ifdef __powerpc__ // (roelle): no reswapping needed later, we did a memcopy before
+	    SwapBytesBlock( &ltv_key.key, ltv_key.len+1); // make sure odd length gets treated right
+#endif
 		rc = hcf_put_info(ifbp, (LTVP) &ltv_key);
 		DEBUG(DEBUG_NOISY, "%s: hcf_put_info(CFG_CNF_TX_KEY_ID:0x%x) returned 0x%x\n", dev_info, mode, rc);
 		if (rc)
@@ -1567,7 +1611,8 @@
 				//	1.6 Mb/s for the 2 Mb/s card
 				//	~5 Mb/s for the 11 Mb/s card
 				// Jean II
-				range.throughput = 1.6 * 1024 * 1024;
+				//range.throughput = 1.6 * 1024 * 1024;
+				range.throughput = 6 * 1024 * 1024; // (roelle:) for the 11 Mb/s card
 				range.min_nwid = 0x0000;
 				range.max_nwid = 0x0000;
 				range.num_channels = 14;
@@ -1782,6 +1827,9 @@
 				int typ = *((int *) wrq->u.name);
 				ltv.len = 18;
 				ltv.typ = typ;
+				//
+				// NOTE: NO BYTE SWAPPING FOR POWERPC HERE! 
+				//
 				rc = hcf_get_info(&local->ifb, (LTVP) &ltv);
 				if (rc)
 					printk(KERN_DEBUG "%s: hcf_get_info(0x%x) returned error 0x%x\n", dev_info, typ, rc);
@@ -1832,6 +1880,10 @@
 		ltv.len = 4;
 		ltv.typ = CFG_COMMS_QUALITY;
 		rc = hcf_get_info(&local->ifb, (LTVP) &ltv);
+#ifdef __powerpc__
+		//(roelle). I don't get it, why HERE no byte swapping is needed
+		//SwapBytesBlock( &(ltv.signal_lvl), 4);
+#endif
 		DEBUG(DEBUG_NOISY, "%s: hcf_get_info(CFG_COMMS_QUALITY) returned 0x%x\n", dev_info, rc);
 		local->wstats.qual.qual = max(min(ltv.coms_qual, 0x8b-0x2f), 0);
 		local->wstats.qual.level = max(min(ltv.signal_lvl, 0x8a), 0x2f) - 0x95;
@@ -1992,6 +2044,8 @@
 					memcpy(ltv.mac_addr[i++], dmi->dmi_addr, dmi->dmi_addrlen);
 					ltv.len = (ETH_ALEN * local->mc_count / 2) + 1;
 					ltv.typ = CFG_GROUP_ADDR;
+					//(roelle): UNTESTED ON PPC
+					//          Most likely byte swapping is needed here also
 					rc = hcf_put_info(&local->ifb, (LTVP) &ltv);
 					DEBUG(DEBUG_NOISY, "%s: hcf_put_info(CFG_GROUP_ADDR:0x%x) returned 0x%x\n", dev_info, local->mc_count, rc);
 				}
@@ -2095,15 +2149,34 @@
 	// HCF-light doesn't support that.
 	if (p[13] + (p[12] << 8) > 1500)
 	{
+#ifdef __powerpc__
+		SwapBytesBlock( p, len);
+#endif
 		hcf_put_data(&local->ifb, p, 12, 0);
 		len += sizeof(snap_header);
+#ifdef __powerpc__
+		snap_header[0] = (len-0x0e) & 0xff;
+		snap_header[1] = (char)((len-0x0e) >> 8);
+#else
 		snap_header[1] = (len-0x0e) & 0xff;
 		snap_header[0] = (char)((len-0x0e) >> 8);
+#endif
 		hcf_put_data(&local->ifb, snap_header, sizeof(snap_header), 0);
 		hcf_put_data(&local->ifb, p+12, len-12-sizeof(snap_header), 0);
 	}
 	else
+{
+#ifdef __powerpc__
+		SwapBytesBlock( p, len);
+#endif
 		hcf_put_data(&local->ifb, p, len, 0);
+}
+#ifdef __powerpc__
+	// (roelle): I dont't know if the data is needed later, so to be safe, swap it back.
+	//
+	//           Andreas: Your opinion?
+	SwapBytesBlock( p, len);
+#endif
 
 	// Send packet
 	rc = hcf_send(&local->ifb, 0);
@@ -2154,10 +2227,18 @@
 	{
 		hcf_get_data(&local->ifb, 0, p, 12);
 		hcf_get_data(&local->ifb, 12+sizeof(snap_header), p+12, len-12-sizeof(snap_header));
+#ifdef __powerpc__
+		SwapBytesBlock( p, len-sizeof(snap_header));
+#endif
 		skb_trim(skb, len-sizeof(snap_header));
 	}
 	else
+	{
 		hcf_get_data(&local->ifb, 0, p, len);
+#ifdef __powerpc__
+		SwapBytesBlock( p, len);
+#endif
+	}
 
 	skb->dev = dev;
 	skb->protocol = eth_type_trans(skb, dev);
@@ -2201,6 +2282,9 @@
 #if defined(HISTOGRAM)
 		// We can't be clever...
 		rc = hcf_get_data(&local->ifb, HFS_Q_INFO, stats, 2);
+#ifdef __powerpc__
+		SwapBytesBlock( stats, 2);
+#endif
 		DEBUG(DEBUG_NOISY, "%s: hcf_get_data(HFS_Q_INFO) returned 0x%x\n", dev_info, rc);
 #else // Therefore WIRELESS_SPY only !!!
 		memset(&stats, 0, sizeof(stats));
@@ -2209,6 +2293,9 @@
 			if (!memcmp(srcaddr, local->spy_address[i], MAC_ADDR_SIZE))
 			{
 				rc = hcf_get_data(&local->ifb, HFS_Q_INFO, stats, 2);
+#ifdef __powerpc__
+				SwapBytesBlock( stats, 2);
+#endif
 				break;
 			}
 #endif
