[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] [PATCH] USB cosmetic changes



Replace spaces by tabs (\t) for tabulation, if the file has more
spaces than tabs as tabulations, I did the opposite.

Note: Apply this patch the last one of the last five sent to the list by me.

Commit message:

Cosmetic. Mainly replace spaces by tabs(\t) for tabulations, in some
files do the opposite depending of what it is mainly used in the file.
Contributed David Galvez.
diff -r 3127c773c734 sys/usb/src.km/Makefile.objs
--- a/sys/usb/src.km/Makefile.objs	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/Makefile.objs	Sat Nov 22 11:59:48 2014 +0100
@@ -51,7 +51,7 @@
 
 $(TARGET): $(OBJS) $(LIBKERNTARGET)
 	$(CC) $(LDEXTRA) -o $@ $(CFLAGS) $(OBJS) $(LIBS)
-	
+
 $(OBJS): ../USBDEFS
 
 
diff -r 3127c773c734 sys/usb/src.km/crtinit.c
--- a/sys/usb/src.km/crtinit.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/crtinit.c	Sat Nov 22 11:59:48 2014 +0100
@@ -199,7 +199,7 @@
 				p = *--envp;
 				while(*p)
 					*q++ = *p++;
-		        	*q = '\0';
+					*q = '\0';
 			}
 		}
 	}
@@ -317,12 +317,12 @@
 		p = my_strrchr(program_invocation_name, '\\');
 		if (p == NULL)
 			p = my_strrchr(program_invocation_name, '/');
- 		if (p != NULL)
- 			p++;
+		if (p != NULL)
+			p++;
 
 		program_invocation_short_name = (p == 0) ?
- 			program_invocation_name : p;
- 	}
+			program_invocation_name : p;
+	}
 
 	__libc_argc = 1; /* at this point __libc_argv[0] is done */
 	while (*from)
diff -r 3127c773c734 sys/usb/src.km/global.h
--- a/sys/usb/src.km/global.h	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/global.h	Sat Nov 22 11:59:48 2014 +0100
@@ -159,8 +159,8 @@
 
 struct cookie
 {
-        long tag;
-        long value;
+	long tag;
+	long value;
 };
 
 #define _USB 0x5f555342L
diff -r 3127c773c734 sys/usb/src.km/hub.c
--- a/sys/usb/src.km/hub.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/hub.c	Sat Nov 22 11:59:48 2014 +0100
@@ -177,8 +177,8 @@
 {
 	struct usb_device *dev;
 
-    if (index >= USB_MAX_HUB)
-        return NULL;
+	if (index >= USB_MAX_HUB)
+		return NULL;
 
 	dev = hub_dev[index].pusb_dev;
 	if (dev && dev->devnum != -1 && dev->devnum != 0)
@@ -303,7 +303,7 @@
 		/* Return now if nothing is connected */
 		if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
 			return 0;
-        }
+		}
 	}
 
 	/* Reset the port */
@@ -680,14 +680,14 @@
 
 		long r;
 		r = kthread_create(NULL, usb_hub_poll_thread, dev, NULL, "hubpoll");
-		
+
 		if (r)
 		{
 			/* XXX todo -> exit gracefully */
 			DEBUG((/*0000000a*/"can't create USB hub kernel thread"));
 		}
 	}
-#endif		
+#endif
 
 	return 1;
 }
@@ -789,7 +789,7 @@
 	p_signal(SIGCHLD,  (long) sigchld);
 
 //	d_setdrv('u' - 'a');
-// 	d_setpath("/");
+//	d_setpath("/");
 
 }
 
@@ -820,38 +820,38 @@
 usb_hub_init(struct usb_device *dev)
 {
 #ifdef TOSONLY
-    long i,j,k = 0;
+	long i,j,k = 0;
 
-    (void)c_conws("Scanning USB devices.... Please wait...\r\n");
+	(void)c_conws("Scanning USB devices.... Please wait...\r\n");
 
 again:
-    for (i = 0; i < USB_MAX_HUB; i++)
-    {
-        struct usb_hub_device *hub = usb_get_hub_index (i);
-        if (hub)
-        {
-            if (usb_hub_events (hub) == 1)
-            {
-                for (j = k; j < USB_MAX_DEVICE; j++)
-                {
-                    struct usb_device *pdev = usb_get_dev_index (j);
-                    if (pdev && pdev->mf && pdev->prod)
-                    {
-                        char name[128];
-                        memset (name, 0, sizeof(name));
-                        strcat (name, "Found ");
-                        strcat (name, pdev->mf);
-                        strcat (name, " ");
-                        strcat (name, pdev->prod);
-                        strcat (name, ".\r\n");
-                        c_conws(name);
-                        k = j+1;
-                    }
-                }
-                goto again;
-            }
-        }
-    }
+	for (i = 0; i < USB_MAX_HUB; i++)
+	{
+		struct usb_hub_device *hub = usb_get_hub_index (i);
+		if (hub)
+		{
+			if (usb_hub_events (hub) == 1)
+			{
+				for (j = k; j < USB_MAX_DEVICE; j++)
+				{
+					struct usb_device *pdev = usb_get_dev_index (j);
+					if (pdev && pdev->mf && pdev->prod)
+					{
+						char name[128];
+						memset (name, 0, sizeof(name));
+						strcat (name, "Found ");
+						strcat (name, pdev->mf);
+						strcat (name, " ");
+						strcat (name, pdev->prod);
+						strcat (name, ".\r\n");
+						c_conws(name);
+						k = j+1;
+					}
+				}
+				goto again;
+			}
+		}
+	}
 #else
 	DEBUG(("Creating USB hub kernel thread"));
 	long r;
diff -r 3127c773c734 sys/usb/src.km/init.c
--- a/sys/usb/src.km/init.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/init.c	Sat Nov 22 11:59:48 2014 +0100
@@ -34,23 +34,23 @@
 
 struct usb_module_api usb_api;
 
-#define MSG_BUILDDATE   __DATE__
+#define MSG_BUILDDATE	__DATE__
 
 #ifdef TOSONLY
-#define MSG_VERSION     "TOS DRIVERS"
-#define MSG_BOOT        \
-        "\033p USB core API driver for TOS " MSG_VERSION " \033q\r\n" \
-        "Brought to TOS by Alan Hourihane.\r\n"
+#define MSG_VERSION		"TOS DRIVERS"
+#define MSG_BOOT		\
+		"\033p USB core API driver for TOS " MSG_VERSION " \033q\r\n" \
+		"Brought to TOS by Alan Hourihane.\r\n"
 #else
-#define MSG_VERSION     "FreeMiNT DRIVERS"
-#define MSG_BOOT        \
-        "\033p USB core API driver for FreeMiNT " MSG_VERSION " \033q\r\n"
+#define MSG_VERSION	"FreeMiNT DRIVERS"
+#define MSG_BOOT	\
+		"\033p USB core API driver for FreeMiNT " MSG_VERSION " \033q\r\n"
 #endif
 
-#define MSG_GREET       \
+#define MSG_GREET		\
 	"David Galvez 2010-2014.\r\n" \
 	"Alan Hourihane 2013-2014.\r\n" \
-    "Compiled " MSG_BUILDDATE ".\r\n\r\n"
+	"Compiled " MSG_BUILDDATE ".\r\n\r\n"
 
 static void
 bootmessage(void)
@@ -104,8 +104,8 @@
 extern unsigned long _PgmSize;
 #endif
 
-long            udd_register            (struct uddif *u);
-long            udd_unregister          (struct uddif *u);
+long			udd_register		(struct uddif *u);
+long			udd_unregister		(struct uddif *u);
 extern long	ucd_register		(struct ucdif *u, struct usb_device **dev);
 extern long	ucd_unregister		(struct ucdif *u);
 
@@ -214,7 +214,7 @@
 #ifdef TOSONLY
 	{
 		/* Set the _USB API cookie */
-        Supexec(set_cookie);
+		Supexec(set_cookie);
 
 		c_conws("USB core installed.\r\n");
 
diff -r 3127c773c734 sys/usb/src.km/ucd.c
--- a/sys/usb/src.km/ucd.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd.c	Sat Nov 22 11:59:48 2014 +0100
@@ -68,15 +68,15 @@
 		return -1;
 	}
 
-        result = (*a->ioctl)(a, LOWLEVEL_INIT, 0);
-        if (result)
-        {
-                DEBUG (("%s: ucd low level init failed!", __FILE__));
-                return -1;
+		result = (*a->ioctl)(a, LOWLEVEL_INIT, 0);
+		if (result)
+		{
+			DEBUG (("%s: ucd low level init failed!", __FILE__));
+			return -1;
 	}
 
-    hub = usb_alloc_new_device(a);
-    if (!hub) 
+	hub = usb_alloc_new_device(a);
+	if (!hub) 
 	{
 		return -1;
 	}
@@ -93,7 +93,7 @@
 	allucdifs = a;
 
 	usb_hub_init(hub);
- 	
+	
 	return 0;
 }
 
@@ -106,7 +106,7 @@
 {
 	struct ucdif **list = &allucdifs;
 
-        (*a->ioctl)(a, LOWLEVEL_STOP, 0);
+	(*a->ioctl)(a, LOWLEVEL_STOP, 0);
 	(*a->close)(a);
 
 	while (*list)
diff -r 3127c773c734 sys/usb/src.km/ucd/aranym/aranym-hcd.c
--- a/sys/usb/src.km/ucd/aranym/aranym-hcd.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd/aranym/aranym-hcd.c	Sat Nov 22 11:59:48 2014 +0100
@@ -327,7 +327,7 @@
 usb_lowlevel_init(void *dummy)
 {
 	int r;
-	
+
 	r = nf_call(USBHOST(USBHOST_LOWLEVEL_INIT));
 
 	if (!r) 
@@ -356,7 +356,7 @@
 {
 	long ret;
 	char message[100];
-	
+
 	kentry	= k;
 
 	/* get the USBHost NatFeat ID */
diff -r 3127c773c734 sys/usb/src.km/ucd/aranym/aranym.h
--- a/sys/usb/src.km/ucd/aranym/aranym.h	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd/aranym/aranym.h	Sat Nov 22 11:59:48 2014 +0100
@@ -124,9 +124,9 @@
 
 	int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 			        int len, struct devrequest *setup)
-      
+
 	int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
-		    		int len)
+					int len)
 */
 
 #endif /* _ARANYM_H */
diff -r 3127c773c734 sys/usb/src.km/ucd/ehci/ehci-hcd.c
--- a/sys/usb/src.km/ucd/ehci/ehci-hcd.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd/ehci/ehci-hcd.c	Sat Nov 22 11:59:48 2014 +0100
@@ -1183,7 +1183,7 @@
 	ehci_uif = *u;
 
 	ehci_uif->next = 0;
-    ehci_uif->api_version = USB_API_VERSION;
+	ehci_uif->api_version = USB_API_VERSION;
 	ehci_uif->class = USB_CONTRLL;
 	ehci_uif->lname = lname;
 	ehci_uif->unit = 0;
@@ -1193,7 +1193,7 @@
 	ehci_uif->resrvd1 = 0;
 	ehci_uif->ioctl = ehci_ioctl;
 	ehci_uif->resrvd2 = 0;
-    strcpy(ehci_uif->name, "ehci-pci");
+	strcpy(ehci_uif->name, "ehci-pci");
 	if(!(ehci_uif->ucd_priv = kmalloc(sizeof(struct ehci))))
 		return -1;
 
diff -r 3127c773c734 sys/usb/src.km/ucd/ethernat/isp116x.h
--- a/sys/usb/src.km/ucd/ethernat/isp116x.h	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd/ethernat/isp116x.h	Sat Nov 22 11:59:48 2014 +0100
@@ -353,9 +353,9 @@
 	   thereby power consumption in suspended state. */
 	unsigned remote_wakeup_enable:1;
 	/* INT output polarity */
-        unsigned int_act_high:1;
-        /* INT edge or level triggered */
-        unsigned int_edge_triggered:1;
+	unsigned int_act_high:1;
+	/* INT edge or level triggered */
+	unsigned int_edge_triggered:1;
 
 };
 
diff -r 3127c773c734 sys/usb/src.km/ucd/netusbee/isp116x.h
--- a/sys/usb/src.km/ucd/netusbee/isp116x.h	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd/netusbee/isp116x.h	Sat Nov 22 11:59:48 2014 +0100
@@ -350,9 +350,9 @@
 	   thereby power consumption in suspended state. */
 	unsigned remote_wakeup_enable:1;
 	/* INT output polarity */
-        unsigned int_act_high:1;
-        /* INT edge or level triggered */
-        unsigned int_edge_triggered:1;
+	unsigned int_act_high:1;
+	/* INT edge or level triggered */
+	unsigned int_edge_triggered:1;
 
 };
 
diff -r 3127c773c734 sys/usb/src.km/ucd/unicorn/crtinit.c
--- a/sys/usb/src.km/ucd/unicorn/crtinit.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd/unicorn/crtinit.c	Sat Nov 22 11:59:48 2014 +0100
@@ -199,7 +199,7 @@
 				p = *--envp;
 				while(*p)
 					*q++ = *p++;
-		        	*q = '\0';
+					*q = '\0';
 			}
 		}
 	}
@@ -317,12 +317,12 @@
 		p = my_strrchr(program_invocation_name, '\\');
 		if (p == NULL)
 			p = my_strrchr(program_invocation_name, '/');
- 		if (p != NULL)
- 			p++;
+		if (p != NULL)
+			p++;
 
 		program_invocation_short_name = (p == 0) ?
- 			program_invocation_name : p;
- 	}
+			program_invocation_name : p;
+	}
 
 	__libc_argc = 1; /* at this point __libc_argv[0] is done */
 	while (*from)
diff -r 3127c773c734 sys/usb/src.km/ucd/unicorn/sl811-hcd.c
--- a/sys/usb/src.km/ucd/unicorn/sl811-hcd.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd/unicorn/sl811-hcd.c	Sat Nov 22 11:59:48 2014 +0100
@@ -106,7 +106,7 @@
 static int intr = 0;
 
 static long sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
-	 		        void *data, unsigned short buf_len, struct devrequest *cmd);
+			        void *data, unsigned short buf_len, struct devrequest *cmd);
 
 /*
  * FIXME... Need to read a config file....
@@ -132,11 +132,11 @@
 	} \
 	if (check_flock() != 0) { \
 		if (ret) \
-  			SuperToUser(ret); \
+			SuperToUser(ret); \
 		return; \
 	} \
 	WRITEMODE = 0x88; \
-    WRITEACC = ((long)ACSI << 21) | 0x8a;
+	WRITEACC = ((long)ACSI << 21) | 0x8a;
 #define LOCKUSBWITHRETURN \
 	unsigned long ret = 0; \
 	if (!Super(1L)) { \
@@ -144,11 +144,11 @@
 	} \
 	if (check_flock() != 0) { \
 		if (ret) \
-  			SuperToUser(ret); \
+			SuperToUser(ret); \
 		return -1; \
 	} \
 	WRITEMODE = 0x88; \
-    WRITEACC = ((long)ACSI << 21) | 0x8a;
+	WRITEACC = ((long)ACSI << 21) | 0x8a;
 
 #define LOCKUSB \
 	unsigned long ret = 0; \
@@ -160,23 +160,23 @@
     WRITEACC = ((long)ACSI << 21) | 0x8a;
 
 #define UNLOCKUSB  \
-    WRITEMODE = 0x00; \
+	WRITEMODE = 0x00; \
 	__asm__ volatile("clr.w 0x43e"); \
 	if (ret) \
-  		SuperToUser(ret);
+		SuperToUser(ret);
 #else
 #define LOCKUSB \
-        {   \
-                __asm__ volatile("1: tas.b 0x43e");        \
-                __asm__ volatile("bne.b 1b");        \
-        } \
+		{   \
+				__asm__ volatile("1: tas.b 0x43e");        \
+				__asm__ volatile("bne.b 1b");        \
+		} \
 	WRITEMODE = 0x88; \
-    WRITEACC = ((long)ACSI << 21) | 0x8a;
+	WRITEACC = ((long)ACSI << 21) | 0x8a;
 #define LOCKUSBWITHRETURN LOCKUSB
 #define LOCKUSBWITHNORETURN LOCKUSB
 
 #define UNLOCKUSB  \
-    WRITEMODE = 0x00; \
+	WRITEMODE = 0x00; \
 	__asm__ volatile("clr.w 0x43e");
 #endif
 		
@@ -203,15 +203,15 @@
 static void inline sl811_read_buf(__u8 offset, __u8 *buf, __u8 size)
 {
 	if ((long)buf & 1) {
-        /* Make it even, to prevent crashes on 68000. */
+		/* Make it even, to prevent crashes on 68000. */
 		DACCESS = offset++;
 		*buf++ = (__u8) DACCESS;
-        size--;
+		size--;
 	}
 
-    /* Speed optimization */
+	/* Speed optimization */
 	while (size >= 16) {
-        __asm__ volatile
+		__asm__ volatile
 		(
 			"lea 0xffff8604,a1;"
 			"move.l #0,d0;"
@@ -299,7 +299,7 @@
 			"move.b d0,%0;"
 			"move.l a0,%1;"
 
-            : "=d" (offset), "=m" (buf)
+			: "=d" (offset), "=m" (buf)
 			: "m" (buf), "d" (offset)
 			: "d0","d1","d4","d5","d6","d7","a0","a1"
 		);
@@ -325,14 +325,14 @@
 static void inline sl811_write_buf(__u8 offset, __u8 *buf, __u8 size)
 {
 	if ((long)buf & 1) {
-        /* Make it even, to prevent crashes on 68000. */
+		/* Make it even, to prevent crashes on 68000. */
 		DACCESS = offset++;
 		DACCESS = *buf++;
-        size--;
+		size--;
 	}
 
 	while (size >= 16) {
-        __asm__ volatile
+		__asm__ volatile
 		(
 			"lea 0xffff8604,a1;"
 			"move.l #0,d0;"
@@ -344,18 +344,18 @@
 			"move.l a0,%1;"
 
 			"move.w d0,(a1);"
-            "move.l d4,d1;"
-            "swap d1;"
-            "lsr.l #8, d1;"
+			"move.l d4,d1;"
+			"swap d1;"
+			"lsr.l #8, d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
 			"move.w d0,(a1);"
-            "move.l d4,d1;"
-            "swap d1;"
+			"move.l d4,d1;"
+			"swap d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
 			"move.w d0,(a1);"
-            "move.l d4,d1;"
+			"move.l d4,d1;"
 			"lsr.l #8, d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
@@ -364,18 +364,18 @@
 			"addq.l #1, d0;"
 
 			"move.w d0,(a1);"
-            "move.l d5,d1;"
-            "swap d1;"
-            "lsr.l #8, d1;"
+			"move.l d5,d1;"
+			"swap d1;"
+			"lsr.l #8, d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
 			"move.w d0,(a1);"
-            "move.l d5,d1;"
-            "swap d1;"
+			"move.l d5,d1;"
+			"swap d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
 			"move.w d0,(a1);"
-            "move.l d5,d1;"
+			"move.l d5,d1;"
 			"lsr.l #8, d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
@@ -384,18 +384,18 @@
 			"addq.l #1, d0;"
 
 			"move.w d0,(a1);"
-            "move.l d6,d1;"
-            "swap d1;"
-            "lsr.l #8, d1;"
+			"move.l d6,d1;"
+			"swap d1;"
+			"lsr.l #8, d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
 			"move.w d0,(a1);"
-            "move.l d6,d1;"
-            "swap d1;"
+			"move.l d6,d1;"
+			"swap d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
 			"move.w d0,(a1);"
-            "move.l d6,d1;"
+			"move.l d6,d1;"
 			"lsr.l #8, d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
@@ -404,18 +404,18 @@
 			"addq.l #1, d0;"
 
 			"move.w d0,(a1);"
-            "move.l d7,d1;"
-            "swap d1;"
-            "lsr.l #8, d1;"
+			"move.l d7,d1;"
+			"swap d1;"
+			"lsr.l #8, d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
 			"move.w d0,(a1);"
-            "move.l d7,d1;"
-            "swap d1;"
+			"move.l d7,d1;"
+			"swap d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
 			"move.w d0,(a1);"
-            "move.l d7,d1;"
+			"move.l d7,d1;"
 			"lsr.l #8, d1;"
 			"move.w d1,(a1);"
 			"addq.l #1, d0;"
@@ -425,7 +425,7 @@
 
 			"move.b d0,%0;"
 
-            : "=d" (offset), "=m" (buf)
+			: "=d" (offset), "=m" (buf)
 			: "m" (buf), "d" (offset)
 			: "d0","d1","d4","d5","d6","d7","a0","a1"
 		);
@@ -554,17 +554,17 @@
 	 * Check the adapter is functional.
 	 */
 	if (usb_init_atari() != 0) {
-       c_conws("Unicorn USB not found\r\n");
-	   return -1;
-    }
+		c_conws("Unicorn USB not found\r\n");
+		return -1;
+	}
 
 	/*
 	 * Initialize the chip.
 	 */
 	LOCKUSB;
-        r = sl811_hc_reset();
+	r = sl811_hc_reset();
 	UNLOCKUSB;
-        if (r)
+	if (r)
 		usb_rh_wakeup();
 	else
 		rh_status.wPortChange = 0;
@@ -606,21 +606,21 @@
 
 static int calc_needed_buswidth(long bytes, long need_preamble)
 {
-    /*
-     * This is the performance optimizer.
-     *
-     * Basically the USB frame can contain a number of bits.
-     *
-     * Unfortunately, our poor ST's are only 8MHz 68000's and are
-     * slow in terms of USB rates. This means we need a larger slop
-     * for potentially missing the end of the frame, and resulting
-     * in device timeouts. Hence 5120 for full speed USB devices.
-     * Low speed use the alternate algorithm
-     *
-     * Reducing 5120 helps performance as we can slot more of our
-     * packets inside a USB frame, but it can result in timeouts if
-     * too low and the USB device could be shutdown.
-     */
+	/*
+	 * This is the performance optimizer.
+	 *
+	 * Basically the USB frame can contain a number of bits.
+	 *
+	 * Unfortunately, our poor ST's are only 8MHz 68000's and are
+	 * slow in terms of USB rates. This means we need a larger slop
+	 * for potentially missing the end of the frame, and resulting
+	 * in device timeouts. Hence 5120 for full speed USB devices.
+	 * Low speed use the alternate algorithm
+	 *
+	 * Reducing 5120 helps performance as we can slot more of our
+	 * packets inside a USB frame, but it can result in timeouts if
+	 * too low and the USB device could be shutdown.
+	 */
 	return !need_preamble ? bytes * 8 + 5120 : bytes * 64 + 3072;
 }
 
@@ -651,7 +651,7 @@
 	sl811_write(SL811_INTRSTS, SL811_INTR_DONE_A);
 	while (err < 3) {
 		register unsigned char intrq;
-	    register int sofcnt;
+		register int sofcnt;
 
 		sl811_write(SL811_ADDR_A, SL811_DATA_START);
 		sl811_write(SL811_LEN_A, len);
@@ -670,14 +670,14 @@
 		{
 			if (5*CONFIG_SYS_HZ < (get_hz_200() - time_start)) {
 				DEBUG(("USB transmit timed out %d",sl811_read(SL811_INTR)));
-		                if (intrq & (SL811_INTR_INSRMV | SL811_INTR_DETECT)) {
+				if (intrq & (SL811_INTR_INSRMV | SL811_INTR_DETECT)) {
 #ifndef TOSONLY
-		                        sl811_hc_reset();
-		                        addroottimeout (0, int_handle_tophalf, 1);
+					sl811_hc_reset();
+					addroottimeout (0, int_handle_tophalf, 1);
 #else
 					reset_stage = 1;
 #endif
-		                } else {
+				} else {
 					sl811_write_intr(intr);
 					sl811_write(SL811_INTRSTS, SL811_INTR_DONE_A);
 				}
@@ -718,12 +718,12 @@
 	err = 0;
 
 #if 0
-    if (status) {
-    	c_conws("ERROR\n\r");
-       	hex_long(len);
-    	hex_long(status);
-    	c_conws("\r\n");
-    }
+	if (status) {
+		c_conws("ERROR\n\r");
+		hex_long(len);
+		hex_long(status);
+		c_conws("\r\n");
+	}
 #endif
 
 	if (status & SL811_USB_STS_NAK)
@@ -806,7 +806,7 @@
 	}
 
 	dev->act_len = done;
-    dev->status = 0;
+	dev->status = 0;
 
 	UNLOCKUSB;
 
@@ -837,15 +837,15 @@
 	LOCKUSBWITHRETURN;
 
 	if (devnum == root_address) {
-        long rret;
+		long rret;
 #ifdef TOSONLY
-        if (reset_stage == 1) {
-    	    sl811_hc_reset();
-        }
-    	reset_stage = 0;
+		if (reset_stage == 1) {
+			sl811_hc_reset();
+		}
+		reset_stage = 0;
 #endif
-    	rret = sl811_rh_submit_urb(dev, pipe, buffer, len, setup);
-    	UNLOCKUSB;
+		rret = sl811_rh_submit_urb(dev, pipe, buffer, len, setup);
+		UNLOCKUSB;
 		return rret;
 	}
 
@@ -860,9 +860,9 @@
 		sl811_hc_reset();
 		reset_stage = 0;
 #endif
-        /* try to continue after the reset */
+		/* try to continue after the reset */
 		UNLOCKUSB;
-        return -1;
+		return -1;
 
 	}
 #endif
@@ -883,7 +883,7 @@
 	
 //		max = SL811_DATA_LIMIT;
 
-	    dev->status = 0;
+		dev->status = 0;
 
 		while (done < len) {
 			long res;
@@ -966,7 +966,7 @@
 
 	dev->act_len = done;
 
-    dev->irq_handle(dev);
+	dev->irq_handle(dev);
 
 	UNLOCKUSB;
 
@@ -980,60 +980,60 @@
 /* Device descriptor */
 static __u8 sl811_rh_dev_des[] =
 {
-	0x12,	    /*	__u8  bLength; */
-	0x01,	    /*	__u8  bDescriptorType; Device */
-	0x10,	    /*	__u16 bcdUSB; v1.1 */
+	0x12,		/*	__u8  bLength; */
+	0x01,		/*	__u8  bDescriptorType; Device */
+	0x10,		/*	__u16 bcdUSB; v1.1 */
 	0x01,
-	0x09,	    /*	__u8  bDeviceClass; HUB_CLASSCODE */
-	0x00,	    /*	__u8  bDeviceSubClass; */
-	0x00,	    /*	__u8  bDeviceProtocol; */
-	0x08,	    /*	__u8  bMaxPacketSize0; 8 Bytes */
-	0x00,	    /*	__u16 idVendor; */
+	0x09,		/*	__u8  bDeviceClass; HUB_CLASSCODE */
+	0x00,		/*	__u8  bDeviceSubClass; */
+	0x00,		/*	__u8  bDeviceProtocol; */
+	0x08,		/*	__u8  bMaxPacketSize0; 8 Bytes */
+	0x00,		/*	__u16 idVendor; */
 	0x00,
-	0x00,	    /*	__u16 idProduct; */
+	0x00,		/*	__u16 idProduct; */
 	0x00,
-	0x00,	    /*	__u16 bcdDevice; */
+	0x00,		/*	__u16 bcdDevice; */
 	0x00,
-	0x00,	    /*	__u8  iManufacturer; */
-	0x02,	    /*	__u8  iProduct; */
-	0x01,	    /*	__u8  iSerialNumber; */
-	0x01	    /*	__u8  bNumConfigurations; */
+	0x00,		/*	__u8  iManufacturer; */
+	0x02,		/*	__u8  iProduct; */
+	0x01,		/*	__u8  iSerialNumber; */
+	0x01		/*	__u8  bNumConfigurations; */
 };
 
 /* Configuration descriptor */
 static __u8 sl811_rh_config_des[] =
 {
-	0x09,	    /*	__u8  bLength; */
-	0x02,	    /*	__u8  bDescriptorType; Configuration */
-	0x19,	    /*	__u16 wTotalLength; */
+	0x09,		/*	__u8  bLength; */
+	0x02,		/*	__u8  bDescriptorType; Configuration */
+	0x19,		/*	__u16 wTotalLength; */
 	0x00,
-	0x01,	    /*	__u8  bNumInterfaces; */
-	0x01,	    /*	__u8  bConfigurationValue; */
-	0x00,	    /*	__u8  iConfiguration; */
-	0x40,	    /*	__u8  bmAttributes;
-		    Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup,
-		    4..0: resvd */
-	0x00,	    /*	__u8  MaxPower; */
+	0x01,		/*	__u8  bNumInterfaces; */
+	0x01,		/*	__u8  bConfigurationValue; */
+	0x00,		/*	__u8  iConfiguration; */
+	0x40,		/*	__u8  bmAttributes;
+			Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup,
+			4..0: resvd */
+	0x00,		/*	__u8  MaxPower; */
 
 	/* interface */
-	0x09,	    /*	__u8  if_bLength; */
-	0x04,	    /*	__u8  if_bDescriptorType; Interface */
-	0x00,	    /*	__u8  if_bInterfaceNumber; */
-	0x00,	    /*	__u8  if_bAlternateSetting; */
-	0x01,	    /*	__u8  if_bNumEndpoints; */
-	0x09,	    /*	__u8  if_bInterfaceClass; HUB_CLASSCODE */
-	0x00,	    /*	__u8  if_bInterfaceSubClass; */
-	0x00,	    /*	__u8  if_bInterfaceProtocol; */
-	0x00,	    /*	__u8  if_iInterface; */
+	0x09,		/*	__u8  if_bLength; */
+	0x04,		/*	__u8  if_bDescriptorType; Interface */
+	0x00,		/*	__u8  if_bInterfaceNumber; */
+	0x00,		/*	__u8  if_bAlternateSetting; */
+	0x01,		/*	__u8  if_bNumEndpoints; */
+	0x09,		/*	__u8  if_bInterfaceClass; HUB_CLASSCODE */
+	0x00,		/*	__u8  if_bInterfaceSubClass; */
+	0x00,		/*	__u8  if_bInterfaceProtocol; */
+	0x00,		/*	__u8  if_iInterface; */
 
 	/* endpoint */
-	0x07,	    /*	__u8  ep_bLength; */
-	0x05,	    /*	__u8  ep_bDescriptorType; Endpoint */
-	0x81,	    /*	__u8  ep_bEndpointAddress; IN Endpoint 1 */
-	0x03,	    /*	__u8  ep_bmAttributes; Interrupt */
-	0x08,	    /*	__u16 ep_wMaxPacketSize; */
+	0x07,		/*	__u8  ep_bLength; */
+	0x05,		/*	__u8  ep_bDescriptorType; Endpoint */
+	0x81,		/*	__u8  ep_bEndpointAddress; IN Endpoint 1 */
+	0x03,		/*	__u8  ep_bmAttributes; Interrupt */
+	0x08,		/*	__u16 ep_wMaxPacketSize; */
 	0x00,
-	0xff	    /*	__u8  ep_bInterval; 255 ms */
+	0xff		/*	__u8  ep_bInterval; 255 ms */
 };
 
 /* root hub class descriptor*/
@@ -1095,7 +1095,7 @@
 
 	/* unsupported IDs --> "stall" */
 	} else
-	    return 0;
+		return 0;
 
 	ascii2utf (buf, data + 2, len - 2);
 	data [0] = 2 + strlen(buf) * 2;
@@ -1475,7 +1475,7 @@
 		} 
 
 		WRITEMODE = 0x88;
-        WRITEACC = ((long)ACSI << 21) | 0x8a;
+		WRITEACC = ((long)ACSI << 21) | 0x8a;
 
 		status = sl811_read(SL811_INTRSTS);
 		sl811_write(SL811_INTRSTS, 0xfe);
@@ -1486,14 +1486,14 @@
 #else
 			sl811_hc_reset();
 #endif
-            WRITEMODE = 0x00;
+			WRITEMODE = 0x00;
 			__asm__ volatile("clr.w 0x43e");
 //			c_conws("RESET\r\n");
 #ifndef TOSONLY
 			addroottimeout (0, int_handle_tophalf, 1);
 #endif
 		} else {
-            WRITEMODE = 0x00;
+			WRITEMODE = 0x00;
 			__asm__ volatile("clr.w 0x43e");
 		}
 	}
diff -r 3127c773c734 sys/usb/src.km/ucd/unicorn/unicorn_int.S
--- a/sys/usb/src.km/ucd/unicorn/unicorn_int.S	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/ucd/unicorn/unicorn_int.S	Sat Nov 22 11:59:48 2014 +0100
@@ -25,10 +25,10 @@
 
 | Checks & Sets FLOCK
 _check_flock:
-    tst.w 0x43e
-    bne.w done
-    dc.w 0x50f9
-    dc.l 0x43e
+	tst.w 0x43e
+	bne.w done
+	dc.w 0x50f9
+	dc.l 0x43e
 	move.b #0, D0
 	rts
 done:
diff -r 3127c773c734 sys/usb/src.km/udd.c
--- a/sys/usb/src.km/udd.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd.c	Sat Nov 22 11:59:48 2014 +0100
@@ -53,7 +53,7 @@
 	alluddifs = a;
 
 	for (i = 0; i < USB_MAX_DEVICE; i++) {
-        	usb_find_interface_driver(&usb_dev[i], 0);
+		usb_find_interface_driver(&usb_dev[i], 0);
 	}
 
 	return 0;
diff -r 3127c773c734 sys/usb/src.km/udd/eth/usb_ether.c
--- a/sys/usb/src.km/udd/eth/usb_ether.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd/eth/usb_ether.c	Sat Nov 22 11:59:48 2014 +0100
@@ -32,8 +32,8 @@
 
 typedef struct
 {
-        unsigned long  name;
-        unsigned long  val;
+	unsigned long  name;
+	unsigned long  val;
 } COOKIE;
 
 #define COOKIEBASE (*(COOKIE **)0x5a0)
@@ -67,15 +67,15 @@
 #define MSG_VERSION     str (VER_MAJOR) "." str (VER_MINOR) str (VER_STATUS) 
 #define MSG_BUILDDATE   __DATE__
 
-#define MSG_BOOT        \
-        "\033p USB ethernet class driver " MSG_VERSION " \033q\r\n"
+#define MSG_BOOT	\
+		"\033p USB ethernet class driver " MSG_VERSION " \033q\r\n"
 
-#define MSG_GREET       \
-        "Ported, mixed and shaken by Alan Hourihane.\r\n" \
-        "Compiled " MSG_BUILDDATE ".\r\n\r\n"
+#define MSG_GREET	   \
+		"Ported, mixed and shaken by Alan Hourihane.\r\n" \
+		"Compiled " MSG_BUILDDATE ".\r\n\r\n"
 
-#define MSG_FAILURE     \
-        "\7\r\nSorry, failed!\r\n\r\n"
+#define MSG_FAILURE	 \
+		"\7\r\nSorry, failed!\r\n\r\n"
 
 char *drv_version = MSG_VERSION;
 
@@ -139,8 +139,8 @@
 
 	for (j = 0; j < numDevices; j++) {
 		if (!usbNetAPI->usbnet[j].before_probe ||
-		    !usbNetAPI->usbnet[j].probe ||
-		    !usbNetAPI->usbnet[j].get_info)
+			!usbNetAPI->usbnet[j].probe ||
+			!usbNetAPI->usbnet[j].get_info)
 			continue;
 
 		usbNetAPI->usbnet[j].before_probe(api);
@@ -206,7 +206,7 @@
 long _cdecl
 init (struct kentry *k, struct usb_module_api *uapi, long arg, long reason)
 {
-        COOKIE *cookie = COOKIEBASE;
+	COOKIE *cookie = COOKIEBASE;
 	long ret;
 
 	kentry	= k;
@@ -222,17 +222,17 @@
 	/*
 	 * Find EUSB cookie.
 	 */
-        if (cookie)
-        {
-                while (cookie->name)
-                {
-                        if (cookie->name == COOKIE_EUSB) {
-                                usbNetAPI = (struct usb_netapi *)cookie->val;
+	if (cookie)
+	{
+		while (cookie->name)
+		{
+			if (cookie->name == COOKIE_EUSB) {
+				usbNetAPI = (struct usb_netapi *)cookie->val;
 				break;
-                        }
-                        cookie++;
-                }
-        }
+			}
+			cookie++;
+		}
+	}
 
 	if (!usbNetAPI) {
 		c_conws (MSG_FAILURE);
diff -r 3127c773c734 sys/usb/src.km/udd/mouse/crtinit.c
--- a/sys/usb/src.km/udd/mouse/crtinit.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd/mouse/crtinit.c	Sat Nov 22 11:59:48 2014 +0100
@@ -199,7 +199,7 @@
 				p = *--envp;
 				while(*p)
 					*q++ = *p++;
-		        	*q = '\0';
+					*q = '\0';
 			}
 		}
 	}
@@ -317,12 +317,12 @@
 		p = my_strrchr(program_invocation_name, '\\');
 		if (p == NULL)
 			p = my_strrchr(program_invocation_name, '/');
- 		if (p != NULL)
- 			p++;
+		if (p != NULL)
+			p++;
 
 		program_invocation_short_name = (p == 0) ?
- 			program_invocation_name : p;
- 	}
+			program_invocation_name : p;
+	}
 
 	__libc_argc = 1; /* at this point __libc_argv[0] is done */
 	while (*from)
diff -r 3127c773c734 sys/usb/src.km/udd/mouse/usb_mouse.c
--- a/sys/usb/src.km/udd/mouse/usb_mouse.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd/mouse/usb_mouse.c	Sat Nov 22 11:59:48 2014 +0100
@@ -47,17 +47,17 @@
 
 struct kbdvbase
 {
-    long midivec;
-    long vkbderr;
-    long vmiderr;
-    long statvec;
-    long mousevec;
-    long clockvec;
-    long joyvec;
-    long midisys;
-    long ikbdsys;
-    short drvstat;              /* Non-zero if a packet is currently
-                                 * transmitted. */
+	long midivec;
+	long vkbderr;
+	long vmiderr;
+	long statvec;
+	long mousevec;
+	long clockvec;
+	long joyvec;
+	long midisys;
+	long ikbdsys;
+	short drvstat;			/* Non-zero if a packet is currently
+							 * transmitted. */
 };
 typedef struct kbdvbase KBDVEC;
 
@@ -85,32 +85,32 @@
 static char lname[] = "USB mouse class driver\0";
 
 static struct uddif mouse_uif = {
-    0,                          /* *next */
-    USB_API_VERSION,            /* API */
-    USB_DEVICE,                 /* class */
-    lname,                      /* lname */
-    "mouse",                    /* name */
-    0,                          /* unit */
-    0,                          /* flags */
-    mouse_probe,                /* probe */
-    mouse_disconnect,           /* disconnect */
-    0,                          /* resrvd1 */
-    mouse_ioctl,                /* ioctl */
-    0,                          /* resrvd2 */
+	0,                          /* *next */
+	USB_API_VERSION,            /* API */
+	USB_DEVICE,                 /* class */
+	lname,                      /* lname */
+	"mouse",                    /* name */
+	0,                          /* unit */
+	0,                          /* flags */
+	mouse_probe,                /* probe */
+	mouse_disconnect,           /* disconnect */
+	0,                          /* resrvd1 */
+	mouse_ioctl,                /* ioctl */
+	0,                          /* resrvd2 */
 };
 
 struct mse_data
 {
-    struct usb_device *pusb_dev;        /* this usb_device */
-    unsigned char ep_in;        /* in endpoint */
-    unsigned char ep_out;       /* out ....... */
-    unsigned char ep_int;       /* interrupt . */
-    long *irq_handle;           /* for USB int requests */
-    unsigned long irqpipe;      /* pipe for release_irq */
-    unsigned char irqmaxp;      /* max packed for irq Pipe */
-    unsigned char irqinterval;  /* Intervall for IRQ Pipe */
-    char data[8];
-    char new[8];
+	struct usb_device *pusb_dev;        /* this usb_device */
+	unsigned char ep_in;        /* in endpoint */
+	unsigned char ep_out;       /* out ....... */
+	unsigned char ep_int;       /* interrupt . */
+	long *irq_handle;            /* for USB int requests */
+	unsigned long irqpipe;      /* pipe for release_irq */
+	unsigned char irqmaxp;      /* max packed for irq Pipe */
+	unsigned char irqinterval;  /* Intervall for IRQ Pipe */
+	char data[8];
+	char new[8];
 };
 
 static struct mse_data mse_data;
@@ -123,7 +123,7 @@
 static long _cdecl
 mouse_ioctl (struct uddif *u, short cmd, long arg)
 {
-    return E_OK;
+	return E_OK;
 }
 
 /*
@@ -137,130 +137,130 @@
 static long
 mouse_disconnect (struct usb_device *dev)
 {
-    if (dev == mse_data.pusb_dev)
-    {
-        mse_data.pusb_dev = NULL;
+	if (dev == mse_data.pusb_dev)
+	{
+		mse_data.pusb_dev = NULL;
 #ifndef TOSONLY
-        wake (WAIT_Q, (long) &mouse_poll_thread);
+		wake (WAIT_Q, (long) &mouse_poll_thread);
 #endif
-    }
+	}
 
-    return 0;
+	return 0;
 }
 
 static long
 usb_mouse_irq (struct usb_device *dev)
 {
-    return 0;
+	return 0;
 }
 
 void
 mouse_int (void)
 {
-    long i, change = 0;
-    long actlen = 0;
-    long r;
+	long i, change = 0;
+	long actlen = 0;
+	long r;
 
-    if (mse_data.pusb_dev == NULL)
-        return;
+	if (mse_data.pusb_dev == NULL)
+		return;
 
 #if 0
-    usb_submit_int_msg (mse_data.pusb_dev,
-                        mse_data.irqpipe,
-                        mse_data.data,
-                        mse_data.irqmaxp > 8 ? 8 : mse_data.irqmaxp,
-                        USB_CNTL_TIMEOUT * 5);
+	usb_submit_int_msg (mse_data.pusb_dev,
+						mse_data.irqpipe,
+						mse_data.data,
+						mse_data.irqmaxp > 8 ? 8 : mse_data.irqmaxp,
+						USB_CNTL_TIMEOUT * 5);
 #else
-    r = usb_bulk_msg (mse_data.pusb_dev,
-                      mse_data.irqpipe,
-                      mse_data.new,
-                      mse_data.irqmaxp > 8 ? 8 : mse_data.irqmaxp,
-                      &actlen, USB_CNTL_TIMEOUT * 5, 1);
+	r = usb_bulk_msg (mse_data.pusb_dev,
+					  mse_data.irqpipe,
+					  mse_data.new,
+					  mse_data.irqmaxp > 8 ? 8 : mse_data.irqmaxp,
+					  &actlen, USB_CNTL_TIMEOUT * 5, 1);
 
-    if ((r != 0) || (actlen < 3) || (actlen > 8))
-    {
-        return;
-    }
-    for (i = 0; i < actlen; i++)
-    {
-        if (mse_data.new[i] != mse_data.data[i])
-        {
-            change = 1;
-            break;
-        }
-    }
-    if (change)
-    {
-        char wheel = 0, buttons, old_buttons;
+	if ((r != 0) || (actlen < 3) || (actlen > 8))
+	{
+		return;
+	}
+	for (i = 0; i < actlen; i++)
+	{
+		if (mse_data.new[i] != mse_data.data[i])
+		{
+			change = 1;
+			break;
+		}
+	}
+	if (change)
+	{
+		char wheel = 0, buttons, old_buttons;
 
-        (void) wheel;
-        (void) buttons;
-        (void) old_buttons;
-        if ((actlen >= 6) && (mse_data.new[0] == 1))
-        {                       /* report-ID */
-            buttons = mse_data.new[1];
-            old_buttons = mse_data.data[1];
-            mouse_packet[0] =
-                ((mse_data.new[1] & 1) << 1) +
-                ((mse_data.new[1] & 2) >> 1) + 0xF8;
-            mouse_packet[1] = mse_data.new[2];
-            mouse_packet[2] = mse_data.new[3];
-            wheel = mse_data.new[4];
-        }
-        else
-        {                       /* boot report */
+		(void) wheel;
+		(void) buttons;
+		(void) old_buttons;
+		if ((actlen >= 6) && (mse_data.new[0] == 1))
+		{					   /* report-ID */
+			buttons = mse_data.new[1];
+			old_buttons = mse_data.data[1];
+			mouse_packet[0] =
+				((mse_data.new[1] & 1) << 1) +
+				((mse_data.new[1] & 2) >> 1) + 0xF8;
+			mouse_packet[1] = mse_data.new[2];
+			mouse_packet[2] = mse_data.new[3];
+			wheel = mse_data.new[4];
+		}
+		else
+		{					   /* boot report */
 
-            buttons = mse_data.new[0];
-            old_buttons = mse_data.data[0];
-            mouse_packet[0] =
-                ((mse_data.new[0] & 1) << 1) +
-                ((mse_data.new[0] & 2) >> 1) + 0xF8;
-            mouse_packet[1] = mse_data.new[1];
-            mouse_packet[2] = mse_data.new[2];
-            if (actlen >= 3)
-                wheel = mse_data.new[3];
-        }
+			buttons = mse_data.new[0];
+			old_buttons = mse_data.data[0];
+			mouse_packet[0] =
+				((mse_data.new[0] & 1) << 1) +
+				((mse_data.new[0] & 2) >> 1) + 0xF8;
+			mouse_packet[1] = mse_data.new[1];
+			mouse_packet[2] = mse_data.new[2];
+			if (actlen >= 3)
+				wheel = mse_data.new[3];
+		}
 #ifdef EIFFELMODE
-        if ((buttons ^ old_buttons) & 4)
-        {                       /* 3rd button */
-            if (buttons & 4)
-            {
-                usb_kbd_send_code (0x72);       /* ENTER */
-                usb_kbd_send_code (0xF2);
-            }
-        }
+		if ((buttons ^ old_buttons) & 4)
+		{					   /* 3rd button */
+			if (buttons & 4)
+			{
+				usb_kbd_send_code (0x72);	   /* ENTER */
+				usb_kbd_send_code (0xF2);
+			}
+		}
 
-        if (wheel != 0)
-        {                       /* actually like Eiffel */
+		if (wheel != 0)
+		{					   /* actually like Eiffel */
 #define REPEAT_WHEEL 3
-            int i;
+			int i;
 
-            if (wheel > 0)
-            {
-                for (i = 0; i < REPEAT_WHEEL; i++)
-                {
-                    usb_kbd_send_code (0x48);   /* UP */
-                    usb_kbd_send_code (0xC8);
-                }
-            }
-            else
-            {
-                for (i = 0; i < REPEAT_WHEEL; i++)
-                {
-                    usb_kbd_send_code (0x50);   /* DOWN */
-                    usb_kbd_send_code (0xD0);
-                }
-            }
-        }
+			if (wheel > 0)
+			{
+				for (i = 0; i < REPEAT_WHEEL; i++)
+				{
+					usb_kbd_send_code (0x48);   /* UP */
+					usb_kbd_send_code (0xC8);
+				}
+			}
+			else
+			{
+				for (i = 0; i < REPEAT_WHEEL; i++)
+				{
+					usb_kbd_send_code (0x50);   /* DOWN */
+					usb_kbd_send_code (0xD0);
+				}
+			}
+		}
 #endif
-        send_packet (vector->mousevec, mouse_packet, mouse_packet + 3);
-        mse_data.data[0] = mse_data.new[0];
-        mse_data.data[1] = mse_data.new[1];
-        mse_data.data[2] = mse_data.new[2];
-        mse_data.data[3] = mse_data.new[3];
-        mse_data.data[4] = mse_data.new[4];
-        mse_data.data[5] = mse_data.new[5];
-    }
+		send_packet (vector->mousevec, mouse_packet, mouse_packet + 3);
+		mse_data.data[0] = mse_data.new[0];
+		mse_data.data[1] = mse_data.new[1];
+		mse_data.data[2] = mse_data.new[2];
+		mse_data.data[3] = mse_data.new[3];
+		mse_data.data[4] = mse_data.new[4];
+		mse_data.data[5] = mse_data.new[5];
+	}
 #endif
 }
 
@@ -268,20 +268,20 @@
 void
 mouse_poll (PROC * proc, long dummy)
 {
-    wake (WAIT_Q, (long) &mouse_poll_thread);
+	wake (WAIT_Q, (long) &mouse_poll_thread);
 }
 
 void
 mouse_poll_thread (void *dummy)
 {
-    while (mse_data.pusb_dev)
-    {
-        mouse_int ();
-        addroottimeout (10, mouse_poll, 0);
-        sleep (WAIT_Q, (long) &mouse_poll_thread);
-    }
+	while (mse_data.pusb_dev)
+	{
+		mouse_int ();
+		addroottimeout (10, mouse_poll, 0);
+		sleep (WAIT_Q, (long) &mouse_poll_thread);
+	}
 
-    kthread_exit (0);
+	kthread_exit (0);
 }
 #endif
 
@@ -292,103 +292,103 @@
 static long
 mouse_probe (struct usb_device *dev)
 {
-    struct usb_interface *iface;
-    struct usb_endpoint_descriptor *ep_desc;
+	struct usb_interface *iface;
+	struct usb_endpoint_descriptor *ep_desc;
 
 
-    /*
-     * Only one mouse at time 
-     */
-    if (mse_data.pusb_dev)
-    {
-        return -1;
-    }
+	/*
+	 * Only one mouse at time 
+	 */
+	if (mse_data.pusb_dev)
+	{
+		return -1;
+	}
 
-    if (dev == NULL)
-    {
-        return -1;
-    }
+	if (dev == NULL)
+	{
+		return -1;
+	}
 
-    usb_disable_asynch (1);     /* asynch transfer not allowed */
+	usb_disable_asynch (1);     /* asynch transfer not allowed */
 
-    /*
-     * let's examine the device now 
-     */
-    iface = &dev->config.if_desc[0];
-    if (!iface)
-    {
-        return -1;
-    }
+	/*
+	 * let's examine the device now 
+	 */
+	iface = &dev->config.if_desc[0];
+	if (!iface)
+	{
+		return -1;
+	}
 
-    if (iface->desc.bInterfaceClass != USB_CLASS_HID)
-    {
-        return -1;
-    }
+	if (iface->desc.bInterfaceClass != USB_CLASS_HID)
+	{
+		return -1;
+	}
 
-    if (iface->desc.bInterfaceSubClass != USB_SUB_HID_BOOT)
-    {
-        return -1;
-    }
+	if (iface->desc.bInterfaceSubClass != USB_SUB_HID_BOOT)
+	{
+		return -1;
+	}
 
-    if (iface->desc.bInterfaceProtocol != 2)
-    {
-        return -1;
-    }
+	if (iface->desc.bInterfaceProtocol != 2)
+	{
+		return -1;
+	}
 
-    if (iface->desc.bNumEndpoints != 1)
-    {
-        return -1;
-    }
+	if (iface->desc.bNumEndpoints != 1)
+	{
+		return -1;
+	}
 
-    ep_desc = &iface->ep_desc[0];
-    if (!ep_desc)
-    {
-        return -1;
-    }
+	ep_desc = &iface->ep_desc[0];
+	if (!ep_desc)
+	{
+		return -1;
+	}
 
-    if ((ep_desc->bmAttributes &
-         USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)
-    {
-        mse_data.ep_int =
-            ep_desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
-        mse_data.irqinterval = ep_desc->bInterval;
-    }
-    else
-    {
-        return -1;
-    }
+	if ((ep_desc->bmAttributes &
+		 USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)
+	{
+		mse_data.ep_int =
+			ep_desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+		mse_data.irqinterval = ep_desc->bInterval;
+	}
+	else
+	{
+		return -1;
+	}
 
-    mse_data.pusb_dev = dev;
+	mse_data.pusb_dev = dev;
 
-    mse_data.irqinterval =
-        (mse_data.irqinterval > 0) ? mse_data.irqinterval : 255;
-    mse_data.irqpipe =
-        usb_rcvintpipe (mse_data.pusb_dev, (long) mse_data.ep_int);
-    mse_data.irqmaxp = usb_maxpacket (dev, mse_data.irqpipe);
-    dev->irq_handle = usb_mouse_irq;
-    memset (mse_data.data, 0, 8);
-    memset (mse_data.new, 0, 8);
+	mse_data.irqinterval =
+		(mse_data.irqinterval > 0) ? mse_data.irqinterval : 255;
+	mse_data.irqpipe =
+		usb_rcvintpipe (mse_data.pusb_dev, (long) mse_data.ep_int);
+	mse_data.irqmaxp = usb_maxpacket (dev, mse_data.irqpipe);
+	dev->irq_handle = usb_mouse_irq;
+	memset (mse_data.data, 0, 8);
+	memset (mse_data.new, 0, 8);
 
-    // if(mse_data.irqmaxp < 6)
-    // usb_set_protocol(dev, iface->desc.bInterfaceNumber, 0); /* boot */
-    // else
-    usb_set_protocol (dev, iface->desc.bInterfaceNumber, 1);    /* report */
+	// if(mse_data.irqmaxp < 6)
+	// usb_set_protocol(dev, iface->desc.bInterfaceNumber, 0); /* boot */
+	// else
+	usb_set_protocol (dev, iface->desc.bInterfaceNumber, 1);    /* report */
 
-    usb_set_idle (dev, iface->desc.bInterfaceNumber, 0, 0);     /* report
+	usb_set_idle (dev, iface->desc.bInterfaceNumber, 0, 0);     /* report
                                                                  * infinite 
                                                                  */
 
 #ifndef TOSONLY
-    long r = kthread_create (get_curproc (), mouse_poll_thread, NULL, NULL,
-                             "mousepoll");
+	long r = kthread_create (get_curproc (), mouse_poll_thread, NULL, NULL,
+							 "mousepoll");
 
-    if (r)
-    {
-        return 0;
-    }
+	if (r)
+	{
+		return 0;
+	}
 #endif
 
-    return 0;
+	return 0;
 }
 
 #ifdef TOSONLY
@@ -401,59 +401,59 @@
 init (struct kentry *k, struct usb_module_api *uapi, long arg, long reason)
 #endif
 {
-    long ret;
+	long ret;
 
 #ifndef TOSONLY
-    kentry = k;
-    api = uapi;
+	kentry = k;
+	api = uapi;
 
-    if (check_kentry_version ())
-        return -1;
+	if (check_kentry_version ())
+		return -1;
 #endif
 
-    c_conws (MSG_BOOT);
-    c_conws (MSG_GREET);
-    DEBUG (("%s: enter init", __FILE__));
+	c_conws (MSG_BOOT);
+	c_conws (MSG_GREET);
+	DEBUG (("%s: enter init", __FILE__));
 
 #ifdef TOSONLY
-    /*
-     * GET _USB COOKIE to REGISTER 
-     */
-    api = get_usb_cookie ();
-    if (!api)
-    {
-        (void) Cconws ("MOUSE failed to get _USB cookie\r\n");
-        return -1;
-    }
+	/*
+	 * GET _USB COOKIE to REGISTER 
+	 */
+	api = get_usb_cookie ();
+	if (!api)
+	{
+		(void) Cconws ("MOUSE failed to get _USB cookie\r\n");
+		return -1;
+	}
 #endif
 
-    ret = udd_register (&mouse_uif);
+	ret = udd_register (&mouse_uif);
 
-    if (ret)
-    {
-        DEBUG (("%s: udd register failed!", __FILE__));
-        return 1;
-    }
+	if (ret)
+	{
+		DEBUG (("%s: udd register failed!", __FILE__));
+		return 1;
+	}
 
-    DEBUG (("%s: udd register ok", __FILE__));
+	DEBUG (("%s: udd register ok", __FILE__));
 
-    vector = (KBDVEC *) Kbdvbase ();
+	vector = (KBDVEC *) Kbdvbase ();
 
 #ifdef TOSONLY
 #if 0
-    old_ikbd_int = Setexc (0x114/4, (long) interrupt_ikbd);
+	old_ikbd_int = Setexc (0x114/4, (long) interrupt_ikbd);
 #else
-    {
-        ret = Super (0L);
-        old_ikbd_int = (void *) *(volatile unsigned long *) 0x400;
-        *(volatile unsigned long *) 0x400 = (unsigned long) interrupt_ikbd;
-        SuperToUser (ret);
-    }
+	{
+		ret = Super (0L);
+		old_ikbd_int = (void *) *(volatile unsigned long *) 0x400;
+		*(volatile unsigned long *) 0x400 = (unsigned long) interrupt_ikbd;
+		SuperToUser (ret);
+	}
 #endif
-    c_conws ("USB mouse driver installed.\r\n");
+	c_conws ("USB mouse driver installed.\r\n");
 
-    Ptermres (_PgmSize, 0);
+	Ptermres (_PgmSize, 0);
 #endif
 
-    return 0;
+	return 0;
 }
diff -r 3127c773c734 sys/usb/src.km/udd/storage/crtinit.c
--- a/sys/usb/src.km/udd/storage/crtinit.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd/storage/crtinit.c	Sat Nov 22 11:59:48 2014 +0100
@@ -317,12 +317,12 @@
 		p = my_strrchr(program_invocation_name, '\\');
 		if (p == NULL)
 			p = my_strrchr(program_invocation_name, '/');
- 		if (p != NULL)
- 			p++;
+		if (p != NULL)
+			p++;
 
 		program_invocation_short_name = (p == 0) ?
- 			program_invocation_name : p;
- 	}
+			program_invocation_name : p;
+	}
 
 	__libc_argc = 1; /* at this point __libc_argv[0] is done */
 	while (*from)
diff -r 3127c773c734 sys/usb/src.km/udd/storage/install.c
--- a/sys/usb/src.km/udd/storage/install.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd/storage/install.c	Sat Nov 22 11:59:48 2014 +0100
@@ -1,9 +1,9 @@
 /*
  *      install.c: install functions for USB storage under TOS/FreeMiNT
  *      
- * 		Based on the assembler code by David Galvez (2010-2012), which
- *		was itself extracted from the USB disk utility assembler code by
- *		Didier Mequignon (2005-2009).
+ *      Based on the assembler code by David Galvez (2010-2012), which
+ *      was itself extracted from the USB disk utility assembler code by
+ *      Didier Mequignon (2005-2009).
  *
  *      Copyright 2014 Roger Burrows <rfburrows@ymail.com>
  *      
@@ -277,9 +277,9 @@
 	type &= 0x00ffffffL;
 
 #ifdef DEBUGGING_ROUTINES
-    c_conws("Found partition ");
-    hex_long(type);
-    c_conws("\r\n");
+	c_conws("Found partition ");
+	hex_long(type);
+	c_conws("\r\n");
 #endif
 
 	if ((type == GEM) || (type == BGM) || (type == RAW))
@@ -302,7 +302,7 @@
 long install_usb_stor(long dev_num,unsigned long part_type,unsigned long part_offset,
 					unsigned long part_size,char *vendor,char *revision,char *product)
 {
-    char boot_sector[DEFAULT_SECTOR_SIZE];
+	char boot_sector[DEFAULT_SECTOR_SIZE];
 	int logdrv;
 	long mask;
 
@@ -359,7 +359,7 @@
 	/*
 	 * update the usb_pun_info structure
 	 */
-    pun_usb.puns++;
+	pun_usb.puns++;
 	pun_usb.pun[logdrv] = dev_num | PUN_USB;
 	pun_usb.partition_start[logdrv] = part_offset;
 
@@ -367,7 +367,7 @@
 	if (part_type&0xff000000L)		    				/* i.e. GEM/BGM/RAW */
 		pun_usb.ptype[logdrv] = part_type;				/* e.g. 0x47454d00 */
 	else 
-        pun_usb.ptype[logdrv] = 0x00440000L | part_type;/* e.g. 0x00440600 */
+		pun_usb.ptype[logdrv] = 0x00440000L | part_type;/* e.g. 0x00440600 */
 
 	pun_usb.psize[logdrv] = part_size;
 	pun_usb.flags[logdrv] = CHANGE_FLAG;
@@ -383,25 +383,25 @@
 		d_setdrv(logdrv);
 	}
 
-    /* Force media change, the recommended AHDI way..... */
-    {
-        char tmpname[16];
-	    char drv[2];
-        long fh;
+	/* Force media change, the recommended AHDI way..... */
+	{
+		char tmpname[16];
+		char drv[2];
+		long fh;
 
-	    drv[0] = ('A' + logdrv);
-	    drv[1] = 0;
+		drv[0] = ('A' + logdrv);
+		drv[1] = 0;
 
-        memset(tmpname, 0, sizeof(tmpname));
-        strcat(tmpname, drv);
-        strcat(tmpname, ":\\test");
-        fh = Fopen(tmpname, 0);
-        if (fh < 0) {
-            /* don't worry about it for now, unless it presents problems. */
-        } else {
-            Fclose(fh);
-        }
-    }
+		memset(tmpname, 0, sizeof(tmpname));
+		strcat(tmpname, drv);
+		strcat(tmpname, ":\\test");
+		fh = Fopen(tmpname, 0);
+		if (fh < 0) {
+			/* don't worry about it for now, unless it presents problems. */
+		} else {
+			Fclose(fh);
+		}
+	}
 
 	restore_old_state(ret);
 
@@ -417,7 +417,7 @@
 	if ((logdrv < 0) || (logdrv >= MAX_LOGICAL_DRIVE))
 		return -1L;
 
-    pun_usb.puns--;
+	pun_usb.puns--;
 	pun_usb.pun[logdrv] = 0xff;
 	pun_usb.partition_start[logdrv] = 0L;	/* probably unnecessary */
 
@@ -469,10 +469,10 @@
 
 	type = pun_usb.ptype[logdrv] >> 8;
 
-    /*
-     * We allow the partition through to get a drive letter, but stop
-     * access to the drives BPB as there isn't one.
-     */
+	/*
+	 * We allow the partition through to get a drive letter, but stop
+	 * access to the drives BPB as there isn't one.
+	 */
 	if ((type == LNX) || (type == MINIX) || (type == RAW))
 		return NULL;
 
@@ -506,11 +506,11 @@
 	if ((start < 0L) || (count < 0L) || !buffer)
 		return EBADR;			/* same as EBADRQ */
 
-    /* 
-     * Tell the user that the media has changed, so call getbpb first !
-     */
+	/* 
+	 * Tell the user that the media has changed, so call getbpb first !
+	 */
 	if (pun_usb.flags[logdrv] & CHANGE_FLAG)
-        return ECHMEDIA;
+		return ECHMEDIA;
 
 	if (mode & NOTRANSLATE) {		/* if physical mode, the rwabs intercept */
 		physdev = logdrv & PUN_DEV;	/*  has already allowed for floppies     */
diff -r 3127c773c734 sys/usb/src.km/udd/storage/usb_storage.c
--- a/sys/usb/src.km/udd/storage/usb_storage.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd/storage/usb_storage.c	Sat Nov 22 11:59:48 2014 +0100
@@ -139,8 +139,8 @@
  * External prototypes
  */
 extern long install_usb_stor	(long dev_num, unsigned long part_type, 
-			     	 unsigned long part_offset, unsigned long part_size, 
-			     	 char *vendor, char *revision, char *product);
+					 unsigned long part_offset, unsigned long part_size, 
+					 char *vendor, char *revision, char *product);
 extern long uninstall_usb_stor	(long dev_num);
 extern long install_xhdi_driver(void);                         //xhdi.c
 extern void install_vectors(void);                             //vectors.S
@@ -236,9 +236,9 @@
 
 
 typedef struct {
-    unsigned long id;           /* really 1-byte flag followed by GEM, BGM, or XGM */
-    unsigned long start;        /* starting sector */
-    unsigned long size;         /* size in sectors */
+	unsigned long id;           /* really 1-byte flag followed by GEM, BGM, or XGM */
+	unsigned long start;        /* starting sector */
+	unsigned long size;         /* size in sectors */
 } atari_partition_t;
 
 
@@ -377,9 +377,9 @@
 	type &= 0x00ffffffL;
 
 #ifdef DEBUGGING_ROUTINES
-    c_conws("Found partition ");
-    hex_long(type);
-    c_conws("\r\n");
+	c_conws("Found partition ");
+	hex_long(type);
+	c_conws("\r\n");
 #endif
 
 	if ((type == GEM) || (type == XGM) || (type == BGM) || (type == RAW))
@@ -391,13 +391,13 @@
 static inline long
 is_active_atari(long part_type)
 {
-    return (part_type & 0x01000000L);
+	return (part_type & 0x01000000L);
 }
 
 static inline long
 is_extended_atari(long part_type)
 {
-    return ((part_type&0x00ffffffL) == XGM);
+	return ((part_type&0x00ffffffL) == XGM);
 }
 
 /*
@@ -444,8 +444,8 @@
 		for (i = 0, pt = part; i < 4; i++, pt++) {
 			if (!is_active_atari(pt->id))
 				continue;
-            if (!is_atari_partition(pt->id))
-                continue;
+			if (!is_atari_partition(pt->id))
+				continue;
 
 			/*
 			 * links always follow the partition description, so if we get a link,
@@ -504,8 +504,8 @@
 		if (!is_active_atari(pt->id))
 			continue;
 
-        if (!is_atari_partition(pt->id))
-            continue;
+		if (!is_atari_partition(pt->id))
+			continue;
 
 		if (is_extended_atari(pt->id))
 		{
@@ -607,21 +607,21 @@
 		return -1;
 	}
 
-    /*
-     * We lookup atari partitions first as they're identified with 
-     * specific code such as GEM, BGM etc.
-     */
+	/*
+	* We lookup atari partitions first as they're identified with 
+	* specific code such as GEM, BGM etc.
+	*/
 	DEBUG(("Try looking up Atari MBR sector"));
 	if (get_partinfo_atari(dev_desc,part_num,which_part,info) == 0) {
-        return 0;
-    }
+		return 0;
+	}
 
 #ifndef TOSONLY
-    /*
-     * We only try adding DOS style partitions in FreeMiNT as HDDRIVER
-     * and other HD managers create a dual partition setup which has
-     * both Atari & DOS and we don't want both installed.
-     */
+	/*
+	* We only try adding DOS style partitions in FreeMiNT as HDDRIVER
+	* and other HD managers create a dual partition setup which has
+	* both Atari & DOS and we don't want both installed.
+	*/
 	if(buffer[DOS_PART_MAGIC_OFFSET] == 0x55 && buffer[DOS_PART_MAGIC_OFFSET+1] == 0xaa)
 	{
 		DEBUG(("found DOS MBR sector"));
@@ -629,7 +629,7 @@
 	}
 #endif
 
-    return -1;
+	return -1;
 }
 
 long
@@ -1022,12 +1022,12 @@
 static long
 usb_stor_CBI_get_status(ccb *srb, struct us_data *us)
 {
-    long result;
+	long result;
 	us->ip_wanted = 1;
 	result = usb_submit_int_msg(us->pusb_dev, us->irqpipe, (void *) &us->ip_data, us->irqmaxp, us->irqinterval);
-    if (result < 0) {
-        return USB_STOR_TRANSPORT_ERROR;
-    }
+	if (result < 0) {
+		return USB_STOR_TRANSPORT_ERROR;
+	}
 	if(us->ip_wanted)
 	{
 		DEBUG(("Did not get interrupt on CBI"));
@@ -1288,7 +1288,7 @@
 	/* if this is an CBI Protocol, get IRQ */
 	if(us->protocol == US_PR_CBI) {
 		status = usb_stor_CBI_get_status(&reqsrb, us);
-    }
+	}
 	if((result < 0) && !(us->pusb_dev->status & USB_ST_STALLED))
 	{
 		DEBUG((" AUTO REQUEST ERROR %ld", us->pusb_dev->status));
@@ -1310,7 +1310,8 @@
 		case 0x02: /* Not Ready */
 			if(notready++ > USB_TRANSPORT_NOT_READY_RETRY)
 			{
-				DEBUG(("cmd 0x%02x returned 0x%02x 0x%02x 0x%02x 0x%02x (NOT READY)", srb->cmd[0], srb->sense_buf[0], srb->sense_buf[2], srb->sense_buf[12], srb->sense_buf[13]));
+				DEBUG(("cmd 0x%02x returned 0x%02x 0x%02x 0x%02x 0x%02x (NOT READY)", 
+						srb->cmd[0], srb->sense_buf[0], srb->sense_buf[2], srb->sense_buf[12], srb->sense_buf[13]));
 				return USB_STOR_TRANSPORT_FAILED;
 			}
 			else
@@ -1345,7 +1346,7 @@
 	{
 		memset(&srb->cmd[0], 0, 12);
 		srb->cmd[0] = SCSI_INQUIRY;
-        srb->cmd[1] = srb->lun << 5;
+		srb->cmd[1] = srb->lun << 5;
 		srb->cmd[4] = 36;
 		srb->datalen = 36;
 		srb->cmdlen = 12;
@@ -1370,7 +1371,7 @@
 	ptr = (char *)srb->pdata;
 	memset(&srb->cmd[0], 0, 12);
 	srb->cmd[0] = SCSI_REQ_SENSE;
-    srb->cmd[1] = srb->lun << 5;
+	srb->cmd[1] = srb->lun << 5;
 	srb->cmd[4] = 18;
 	srb->datalen = 18;
 	srb->pdata = &srb->sense_buf[0];
@@ -1390,7 +1391,7 @@
 	{
 		memset(&srb->cmd[0], 0, 12);
 		srb->cmd[0] = SCSI_TST_U_RDY;
-        srb->cmd[1] = srb->lun << 5;
+		srb->cmd[1] = srb->lun << 5;
 		srb->datalen = 0;
 		srb->cmdlen = 12;
 		if(ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD) {
@@ -1398,8 +1399,8 @@
 		}
 		usb_request_sense(srb, ss);
 		if ((srb->sense_buf[2] == 0x02) &&
-                    (srb->sense_buf[12] == 0x3a))
-                        return -1;
+			(srb->sense_buf[12] == 0x3a))
+				return -1;
 		mdelay(100);
 	}
 	while(retries--);
@@ -1417,7 +1418,7 @@
 	{
 		memset(&srb->cmd[0], 0, 12);
 		srb->cmd[0] = SCSI_RD_CAPAC;
-        srb->cmd[1] = srb->lun << 5;
+		srb->cmd[1] = srb->lun << 5;
 		srb->datalen = 8;
 		srb->cmdlen = 12;
 		if(ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD)
@@ -1432,7 +1433,7 @@
 {
 	memset(&srb->cmd[0], 0, 12);
 	srb->cmd[0] = SCSI_READ10;
-    srb->cmd[1] = srb->lun << 5;
+	srb->cmd[1] = srb->lun << 5;
 	srb->cmd[2] = ((unsigned char) (start >> 24)) & 0xff;
 	srb->cmd[3] = ((unsigned char) (start >> 16)) & 0xff;
 	srb->cmd[4] = ((unsigned char) (start >> 8)) & 0xff;
@@ -1449,7 +1450,7 @@
 {
 	memset(&srb->cmd[0], 0, 12);
 	srb->cmd[0] = SCSI_WRITE10;
-    srb->cmd[1] = srb->lun << 5;
+	srb->cmd[1] = srb->lun << 5;
 	srb->cmd[2] = ((unsigned char) (start >> 24)) & 0xff;
 	srb->cmd[3] = ((unsigned char) (start >> 16)) & 0xff;
 	srb->cmd[4] = ((unsigned char) (start >> 8)) & 0xff;
@@ -1504,7 +1505,7 @@
 	device &= 0xff;	
 	/* Setup  device */
 	DEBUG(("usb_read: dev %ld ", device));
-        dev = usb_dev_desc[device].priv;
+			dev = usb_dev_desc[device].priv;
 	ss = (struct us_data *)dev->privptr;
 	usb_disable_asynch(1); /* asynch transfer not allowed */
 	srb.lun = usb_dev_desc[device].lun;
@@ -1560,7 +1561,7 @@
 	device &= 0xff;
 	/* Setup  device */
 	DEBUG(("usb_write: dev %ld ", device));
-        dev = usb_dev_desc[device].priv;
+			dev = usb_dev_desc[device].priv;
 	ss = (struct us_data *)dev->privptr;
 	usb_disable_asynch(1); /* asynch transfer not allowed */
 	srb.lun = usb_dev_desc[device].lun;
@@ -1618,12 +1619,12 @@
 
 	DEBUG(("iVendor 0x%x iProduct 0x%x", dev->descriptor.idVendor, dev->descriptor.idProduct));
 
-    /* Patch devices....
-     */
+	/* Patch devices....
+	*/
 
-    /* TEAC Floppy should use US_PR_CB not US_PR_CBI */
+	/* TEAC Floppy should use US_PR_CB not US_PR_CBI */
 	if (dev->descriptor.idVendor == 0x0644 && 
-        dev->descriptor.idProduct == 0x0000)
+		dev->descriptor.idProduct == 0x0000)
 	{
 		protocol = US_PR_CB;
 		subclass = US_SC_UFI;
@@ -1690,7 +1691,7 @@
 		ep_desc = &iface->ep_desc[i];
 		/* is it an BULK endpoint? */
 		if ((ep_desc->bmAttributes &
-		     USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {
+			USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {
 			if (ep_desc->bEndpointAddress & USB_DIR_IN)
 				ss->ep_in = ep_desc->bEndpointAddress &
 						USB_ENDPOINT_NUMBER_MASK;
@@ -1701,7 +1702,7 @@
 		}
 		/* is it an interrupt endpoint? */
 		if ((ep_desc->bmAttributes &
-		     USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) {
+			USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) {
 			ss->ep_int = ep_desc->bEndpointAddress &
 						USB_ENDPOINT_NUMBER_MASK;
 			ss->irqinterval = ep_desc->bInterval;
@@ -1710,8 +1711,8 @@
 	DEBUG(("Endpoints In %d Out %d Int %d", ss->ep_in, ss->ep_out, ss->ep_int));
 	/* Do some basic sanity checks, and bail if we find a problem */
 	if (usb_set_interface(dev, iface->desc.bInterfaceNumber, 0) ||
-	    !ss->ep_in || !ss->ep_out ||
-	    (ss->protocol == US_PR_CBI && ss->ep_int == 0)) {
+		!ss->ep_in || !ss->ep_out ||
+		(ss->protocol == US_PR_CBI && ss->ep_int == 0)) {
 		DEBUG(("Problems with device"));
 		return 0;
 	}
@@ -1721,8 +1722,8 @@
 	 * The SFF8070 accepts the requests used in u-boot
 	 */
 	if(ss->subclass != US_SC_UFI && 
-       ss->subclass != US_SC_SCSI && 
-       ss->subclass != US_SC_8070)
+		ss->subclass != US_SC_SCSI && 
+		ss->subclass != US_SC_8070)
 	{
 		DEBUG(("Sorry, protocol %d not yet supported.", ss->subclass));
 		ALERT(("Sorry, protocol %d not yet supported.", ss->subclass));
@@ -1768,7 +1769,7 @@
 	}
 	else {
 		ss->transport_reset(ss);
-    }
+	}
 
 	pccb.pdata = usb_stor_buf;
 	dev_desc->priv = dev;
@@ -1926,7 +1927,7 @@
 storage_probe(struct usb_device *dev)
 {
 	long r, i, lun, start;	
-    long max_lun;
+	long max_lun;
 	
 	if(dev == NULL)
 		return -1;
@@ -1953,24 +1954,24 @@
 		return -1; /* It's not a storage device */
 	}
 
-    start = i;
-    max_lun = usb_get_max_lun(&usb_stor[i]);
-    /* override */
-    max_lun = 0; /* not yet */
-    for (lun = 0;
-         lun <= max_lun &&
-         start < USB_MAX_STOR_DEV; 
-         lun++) {
-	    /* ok, it is a storage devices
-    	 * get info and fill it in
-    	 */
-        usb_dev_desc[i].lun = lun;
-    	if(!usb_stor_get_info(dev, &usb_stor[i], &usb_dev_desc[start])) {
-    		usb_disable_asynch(0); /* asynch transfer allowed */
-    		return -1;
-    	}
-        start++;
-    }
+	start = i;
+	max_lun = usb_get_max_lun(&usb_stor[i]);
+	/* override */
+	max_lun = 0; /* not yet */
+	for (lun = 0;
+		 lun <= max_lun &&
+		 start < USB_MAX_STOR_DEV; 
+		 lun++) {
+		/* ok, it is a storage devices
+		 * get info and fill it in
+		 */
+		usb_dev_desc[i].lun = lun;
+		if(!usb_stor_get_info(dev, &usb_stor[i], &usb_dev_desc[start])) {
+			usb_disable_asynch(0); /* asynch transfer allowed */
+			return -1;
+		}
+		start++;
+	}
 
 	
 	usb_disable_asynch(0); /* asynch transfer allowed */
@@ -1981,32 +1982,32 @@
 	stor_dev = usb_stor_get_dev(dev_num);
 
 	struct us_data *ss;
-    ss = (struct us_data *)dev->privptr;
+	ss = (struct us_data *)dev->privptr;
 
-    //dev_print(stor_dev);
+	//dev_print(stor_dev);
 
 	if(ss->subclass == US_SC_UFI)
-    {
-        DEBUG(("detected USB floppy not supported at this time\r\n"));
-        /* This is a floppy drive, so give it a drive letter ? B ?. */
-        /* Also, we may be better to intercept the TRAP #1 floppy handlers
-         * and deal with them here. ??? */
-        return 0;
-    }
+	{
+		DEBUG(("detected USB floppy not supported at this time\r\n"));
+		/* This is a floppy drive, so give it a drive letter ? B ?. */
+		/* Also, we may be better to intercept the TRAP #1 floppy handlers
+		 * and deal with them here. ??? */
+		return 0;
+	}
 
-    /* Skip everything apart from HARDDISKS */
-    if((stor_dev->type & 0x1f) != DEV_TYPE_HARDDISK) {
+	/* Skip everything apart from HARDDISKS */
+	if((stor_dev->type & 0x1f) != DEV_TYPE_HARDDISK) {
 #if 0
-        c_conws(stor_dev->vendor);
-        c_conout(' ');
-        c_conws(stor_dev->product);
-        c_conout(' ');
-        c_conws(", type : ");
-        hex_long(stor_dev->type & 0x1f);
-        c_conws(" not installed\r\n");
+		c_conws(stor_dev->vendor);
+		c_conout(' ');
+		c_conws(stor_dev->product);
+		c_conout(' ');
+		c_conws(", type : ");
+		hex_long(stor_dev->type & 0x1f);
+		c_conws(" not installed\r\n");
 #endif
-        return 0;
-    }
+	return 0;
+	}
 
 
 	long part_num = 1;
@@ -2022,11 +2023,11 @@
 				     stor_dev->revision, stor_dev->product);
 		if (r == -1) {
 			DEBUG(("unable to install storage device\r\n"));
-        }
+		}
 		else
 		{
 #ifdef TOSONLY
-            SCSIDRV_MediaChange(dev_num);
+			SCSIDRV_MediaChange(dev_num);
 #endif
 			bios_part[dev_num].biosnum[part_num - 1] = r;
 			bios_part[dev_num].partnum = part_num;
@@ -2083,9 +2084,9 @@
 #define BCB	struct _bcb
 BCB
 {
-    BCB     *b_link;    /* next bcb (API)          */
-    char    filler[12];	/* not relevant            */
-    char    *b_bufr;    /* pointer to buffer (API) */
+	BCB		*b_link;	/* next bcb (API)          */
+	char	filler[12];	/* not relevant            */
+	char	*b_bufr;	/* pointer to buffer (API) */
 };
 
 /*
@@ -2153,7 +2154,7 @@
 init (struct kentry *k, struct usb_module_api *uapi, long arg, long reason)
 #endif
 {
-    PUN_INFO *pun_ptr;
+	PUN_INFO *pun_ptr;
 	long ret;
 
 #ifndef TOSONLY
@@ -2187,9 +2188,9 @@
 	}
 
 #ifdef TOSONLY
-    /* goto supervisor mode because of drvbits & handlers */
-    if (!Super(1L))
-        ret = Super(0L);
+	/* goto supervisor mode because of drvbits & handlers */
+	if (!Super(1L))
+		ret = Super(0L);
 #endif
 
 	pun_ptr = get_pun();
@@ -2202,41 +2203,41 @@
 		pun_ptr = install_pun();
 
 	if (!pun_ptr) {
-        if (ret)
-            SuperToUser(ret);
+		if (ret)
+			SuperToUser(ret);
 
-        c_conws("Failed to initialize, out of memory\r\n");
+		c_conws("Failed to initialize, out of memory\r\n");
 		return -1;
 	}
 #else
 	if (!pun_ptr) {
-        c_conws("Failed to initialize, PUN info not available.\r\n");
+		c_conws("Failed to initialize, PUN info not available.\r\n");
 		return -1;
-    }
+	}
 #endif
 
-    /*
-     * install PUN_INFO if necessary
-     */
-    if (pun_usb.cookie != AHDI) {
-        pun_usb.cookie = AHDI;
-        pun_usb.cookie_ptr = &pun_usb.cookie;
-        pun_usb.puns = 0;
-        pun_usb.version_num = 0x0300;
-        pun_usb.max_sect_siz = pun_ptr->max_sect_siz;
-        memset(pun_usb.pun,0xff,MAX_LOGICAL_DRIVE); /* mark all puns invalid */
-    }
+	/*
+	 * install PUN_INFO if necessary
+	 */
+	if (pun_usb.cookie != AHDI) {
+		pun_usb.cookie = AHDI;
+		pun_usb.cookie_ptr = &pun_usb.cookie;
+		pun_usb.puns = 0;
+		pun_usb.version_num = 0x0300;
+		pun_usb.max_sect_siz = pun_ptr->max_sect_siz;
+		memset(pun_usb.pun,0xff,MAX_LOGICAL_DRIVE); /* mark all puns invalid */
+	}
 
-    install_vectors();
-    install_xhdi_driver();
+	install_vectors();
+	install_xhdi_driver();
 
 	DEBUG (("%s: udd register ok", __FILE__));
 
 #ifdef TOSONLY
-    install_scsidrv();
+	install_scsidrv();
 
-    if (ret)
-        SuperToUser(ret);
+	if (ret)
+		SuperToUser(ret);
 
 	c_conws("USB storage driver installed.\r\n");
 
diff -r 3127c773c734 sys/usb/src.km/udd/storage/xhdi.c
--- a/sys/usb/src.km/udd/storage/xhdi.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd/storage/xhdi.c	Sat Nov 22 11:59:48 2014 +0100
@@ -86,100 +86,100 @@
 long
 sys_XHDOSLimits(ushort which,ulong limit)
 {
-    static long dl_secsiz, dl_clusts, dl_maxsec, dl_clusts12;
-    static int first_time = 1;
+	static long dl_secsiz, dl_clusts, dl_maxsec, dl_clusts12;
+	static int first_time = 1;
 
-    if (first_time)
-    {
-        ushort version = Sversion();            /* determine GEMDOS version */
-        version = (version>>8) | (version<<8);  /* swap to correct order */
+	if (first_time)
+	{
+		ushort version = Sversion();            /* determine GEMDOS version */
+		version = (version>>8) | (version<<8);  /* swap to correct order */
 
-        if (version > 0x0040)       /* unknown               */
-            version = 0x0000;       /* so force it to lowest */
+		if (version > 0x0040)       /* unknown               */
+			version = 0x0000;       /* so force it to lowest */
 
-        if (version < 0x0015)       /* TOS 1.00, 1.02, KAOS TOS */
-        {
-            dl_secsiz = 8192L;
-            dl_clusts = 16383L;
-            dl_maxsec = 32767L;     /* max partition size = 256MB approx */
-            dl_clusts12 = 2046L;
-        }
-        else if (version < 0x0030)  /* i.e. TOS 1.04 to TOS 3.06 */
-        {
-            dl_secsiz = 8192L;
-            dl_clusts = 32767L;
-            dl_maxsec = 65535L;     /* max partition size = 512MB approx */
-            dl_clusts12 = MAX_FAT12_CLUSTERS;
-        }
-        else                        /* i.e. TOS 4.0x or FreeMiNT */
-        {
-            dl_secsiz = MAX_LOGSEC_SIZE;
-            dl_clusts = 32767L;
-            dl_maxsec = 65535L;     /* max partition size = 1024MB approx */
-            dl_clusts12 = MAX_FAT12_CLUSTERS;
-        }
-        first_time = 0;
-    }
+		if (version < 0x0015)       /* TOS 1.00, 1.02, KAOS TOS */
+		{
+			dl_secsiz = 8192L;
+			dl_clusts = 16383L;
+			dl_maxsec = 32767L;     /* max partition size = 256MB approx */
+			dl_clusts12 = 2046L;
+		}
+		else if (version < 0x0030)  /* i.e. TOS 1.04 to TOS 3.06 */
+		{
+			dl_secsiz = 8192L;
+			dl_clusts = 32767L;
+			dl_maxsec = 65535L;     /* max partition size = 512MB approx */
+			dl_clusts12 = MAX_FAT12_CLUSTERS;
+		}
+		else                        /* i.e. TOS 4.0x or FreeMiNT */
+		{
+			dl_secsiz = MAX_LOGSEC_SIZE;
+			dl_clusts = 32767L;
+			dl_maxsec = 65535L;     /* max partition size = 1024MB approx */
+			dl_clusts12 = MAX_FAT12_CLUSTERS;
+		}
+		first_time = 0;
+	}
 
-    if (limit == 0)
-    {
-        switch (which)
-        {
-            /* maximal sector size (BIOS level) */
-            case XH_DL_SECSIZ:
-                return dl_secsiz;
+	if (limit == 0)
+	{
+		switch (which)
+		{
+			/* maximal sector size (BIOS level) */
+			case XH_DL_SECSIZ:
+				return dl_secsiz;
 
-            /* minimal number of FATs */
-            case XH_DL_MINFAT:
-                return 2L;
+			/* minimal number of FATs */
+			case XH_DL_MINFAT:
+				return 2L;
 
-            /* maximal number of FATs */
-            case XH_DL_MAXFAT:
-                return 2L;
+			/* maximal number of FATs */
+			case XH_DL_MAXFAT:
+				return 2L;
 
-            /* sectors per cluster minimal */
-            case XH_DL_MINSPC:
-                return 2L;
+			/* sectors per cluster minimal */
+			case XH_DL_MINSPC:
+				return 2L;
 
-            /* sectors per cluster maximal */
-            case XH_DL_MAXSPC:
-                return 2L;
+			/* sectors per cluster maximal */
+			case XH_DL_MAXSPC:
+				return 2L;
 
-            /* maximal number of clusters of a 16 bit FAT */
-            case XH_DL_CLUSTS:
-                return dl_clusts;
+			/* maximal number of clusters of a 16 bit FAT */
+			case XH_DL_CLUSTS:
+				return dl_clusts;
 
-            /* maximal number of sectors */
-            case XH_DL_MAXSEC:
-                return dl_maxsec;
+			/* maximal number of sectors */
+			case XH_DL_MAXSEC:
+				return dl_maxsec;
 
-            /* maximal number of BIOS drives supported by the DOS */
-            case XH_DL_DRIVES:
-                return MAX_LOGICAL_DRIVE;
+			/* maximal number of BIOS drives supported by the DOS */
+			case XH_DL_DRIVES:
+				return MAX_LOGICAL_DRIVE;
 
-            /* maximal clustersize */
-            case XH_DL_CLSIZB:
-                return dl_secsiz * 2;
+			/* maximal clustersize */
+			case XH_DL_CLSIZB:
+				return dl_secsiz * 2;
 
-            /* maximal (bpb->rdlen * bpb->recsiz / 32) */
-            case XH_DL_RDLEN:
-                return 1008L;   /* we return the same value as HDDRIVER */
+			/* maximal (bpb->rdlen * bpb->recsiz / 32) */
+			case XH_DL_RDLEN:
+				return 1008L;   /* we return the same value as HDDRIVER */
 
-            /* maximal number of clusters of a 12 bit FAT */
-            case XH_DL_CLUSTS12:
-                return dl_clusts12;
+			/* maximal number of clusters of a 12 bit FAT */
+			case XH_DL_CLUSTS12:
+				return dl_clusts12;
 
-            /* maximal number of clusters of a 32 bit FAT */
-            case XH_DL_CLUSTS32:
-                return 0L;          /* TOS doesn't support FAT32 */
+			/* maximal number of clusters of a 32 bit FAT */
+			case XH_DL_CLUSTS32:
+				return 0L;          /* TOS doesn't support FAT32 */
 
-            /* supported bits in bpb->bflags */
-            case XH_DL_BFLAGS:
-                return 0x00000001L;
-        }
-    }
+			/* supported bits in bpb->bflags */
+			case XH_DL_BFLAGS:
+				return 0x00000001L;
+		}
+	}
 
-    return ENOSYS;
+	return ENOSYS;
 }
 
 static ushort
@@ -487,7 +487,7 @@
 
 static long
 XHInqTarget2(ushort major, ushort minor, ulong *blocksize, ulong *deviceflags,
-	     char *productname, ushort stringlen)
+		 char *productname, ushort stringlen)
 {
 	DEBUG(("XHInqTarget2(%d.%d)", major, minor));
 
@@ -501,41 +501,41 @@
 	if ((major & PUN_USB) == 0)
 		return ENODEV;
 
-    {
+	{
 		short dev = major & PUN_DEV;
-        block_dev_desc_t *dev_desc = usb_stor_get_dev(dev);
+		block_dev_desc_t *dev_desc = usb_stor_get_dev(dev);
 	
-        if (blocksize) {
-	    	*blocksize = dev_desc->blksz;
-	    	DEBUG(("XHInqTarget2(%d.%d) blocksize: %ld",
-	    		major, minor, *blocksize));
-	    }
+		if (blocksize) {
+			*blocksize = dev_desc->blksz;
+			DEBUG(("XHInqTarget2(%d.%d) blocksize: %ld",
+				major, minor, *blocksize));
+		}
 
-    	if (deviceflags) {
-    		*deviceflags = XH_TARGET_REMOVABLE;
-    		DEBUG(("XHInqTarget2(%d.%d) flags: %08lx",
-    			major, minor, *deviceflags));
-    	}
+		if (deviceflags) {
+			*deviceflags = XH_TARGET_REMOVABLE;
+			DEBUG(("XHInqTarget2(%d.%d) flags: %08lx",
+				major, minor, *deviceflags));
+		}
 
-    	if (productname) {
-    		char devName[64];
+		if (productname) {
+			char devName[64];
 
-    		DEBUG(("XHInqTarget2(%d.%d) %d", major, minor, dev));
+			DEBUG(("XHInqTarget2(%d.%d) %d", major, minor, dev));
 
-    		memset(devName, 0, 64);
-    		strcat(devName, dev_desc->vendor);
-    		strcat(devName, " ");
-    		strcat(devName, dev_desc->product);
-    		strncpy(productname, devName, stringlen);
-    	}
-    }
+			memset(devName, 0, 64);
+			strcat(devName, dev_desc->vendor);
+			strcat(devName, " ");
+			strcat(devName, dev_desc->product);
+			strncpy(productname, devName, stringlen);
+		}
+	}
 
 	return E_OK;
 }
 
 static long
 XHInqTarget(ushort major, ushort minor, ulong *blocksize, ulong *deviceflags,
-	    char *productname)
+		char *productname)
 {
 	if (next_handler) {
 		long ret = next_handler(XHINQTARGET, major, minor, blocksize,
@@ -548,7 +548,7 @@
 		return ENODEV;
 
 	return XHInqTarget2(major, minor, blocksize, deviceflags,
-			    productname, STRINGLEN);
+				productname, STRINGLEN);
 }
 
 static long
@@ -567,13 +567,13 @@
 	if ((major & PUN_USB) == 0)
 		return ENODEV;
 
-    {
+	{
 		short dev = major & PUN_DEV;
-        block_dev_desc_t *dev_desc = usb_stor_get_dev(dev);
+		block_dev_desc_t *dev_desc = usb_stor_get_dev(dev);
 
-        *blocks = dev_desc->lba;
-        *blocksize = dev_desc->blksz;
-    }
+		*blocks = dev_desc->lba;
+		*blocksize = dev_desc->blksz;
+	}
 
 	return E_OK;
 }
@@ -681,7 +681,7 @@
 			} *args = (struct XHLOCK_args *)(&stack);
 
 			return XHLock(args->major, args->minor,
-				      args->do_lock, args->key);
+					  args->do_lock, args->key);
 		}
 
 		case XHSTOP:
@@ -696,7 +696,7 @@
 			} *args = (struct XHSTOP_args *)(&stack);
 
 			return XHStop(args->major, args->minor,
-				      args->do_stop, args->key);
+					  args->do_stop, args->key);
 		}
 
 		case XHEJECT:
@@ -711,7 +711,7 @@
 			} *args = (struct XHEJECT_args *)(&stack);
 
 			return XHEject(args->major, args->minor, args->do_eject,
-				       args->key);
+					   args->key);
 		}
 
 		case XHDRVMAP:
@@ -796,8 +796,8 @@
 			} *args = (struct XHINQTARGET2_args *)(&stack);
 
 			return XHInqTarget2(args->major, args->minor,
-					    args->blocksize, args->deviceflags,
-					    args->productname, args->stringlen);
+						args->blocksize, args->deviceflags,
+						args->productname, args->stringlen);
 		}
 
 		case XHINQDEV2:
@@ -831,7 +831,7 @@
 			} *args = (struct XHDRIVERSPECIAL_args *)(&stack);
 
 			return XHDriverSpecial(args->key1, args->key2,
-					       args->subopcode, args->data);
+						   args->subopcode, args->data);
 		}
 
 		case XHGETCAPACITY:
@@ -846,7 +846,7 @@
 			} *args = (struct XHGETCAPACITY_args *)(&stack);
 
 			return XHGetCapacity(args->major, args->minor,
-					     args->blocks, args->blocksize);
+						 args->blocks, args->blocksize);
 		}
 
 		case XHMEDIUMCHANGED:
@@ -990,17 +990,17 @@
 install_xhdi_driver(void)
 {
 #ifndef TOSONLY
-    return xhnewcookie(*xhdi_handler);
+	return xhnewcookie(*xhdi_handler);
 #else
-    long r = 0;
-    cookie_fun XHDI = get_fun_ptr ();
+	long r = 0;
+	cookie_fun XHDI = get_fun_ptr ();
 
-    if (XHDI) {
-        r = XHDI(XHNEWCOOKIE,*xhdi_handler);
-    } else {
-        set_cookie();
-    }
+	if (XHDI) {
+		r = XHDI(XHNEWCOOKIE,*xhdi_handler);
+	} else {
+		set_cookie();
+	}
 
-    return r;
+	return r;
 #endif
 }
diff -r 3127c773c734 sys/usb/src.km/udd/storage/xhdiasm.S
--- a/sys/usb/src.km/udd/storage/xhdiasm.S	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/udd/storage/xhdiasm.S	Sat Nov 22 11:59:48 2014 +0100
@@ -1,7 +1,7 @@
-	.globl	_usbxhdi
-	.globl	_xhdi_handler
+    .globl	_usbxhdi
+    .globl	_xhdi_handler
 
-	dc.l	0x27011992	// XHDIMAGIC
+    dc.l	0x27011992	// XHDIMAGIC
 _usbxhdi:
     // Important: The XHDI specification requires to backup all the registers
 #ifdef __mcoldfire__
diff -r 3127c773c734 sys/usb/src.km/usb.c
--- a/sys/usb/src.km/usb.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/usb.c	Sat Nov 22 11:59:48 2014 +0100
@@ -74,11 +74,11 @@
 	asynch_allowed = 1;
 	usb_hub_reset();
 
-        /* first make all devices unknown */
-        for (i = 0; i < USB_MAX_DEVICE; i++) {
-                memset(&usb_dev[i], 0, sizeof(struct usb_device));
-                usb_dev[i].devnum = -1;
-        }
+	/* first make all devices unknown */
+	for (i = 0; i < USB_MAX_DEVICE; i++) {
+		memset(&usb_dev[i], 0, sizeof(struct usb_device));
+		usb_dev[i].devnum = -1;
+	}
 }
 
 /******************************************************************************
@@ -124,13 +124,13 @@
 {
 	struct int_msg arg;
 	struct ucdif *ucd = dev->controller;
-	
+
 	arg.dev = dev;
 	arg.pipe = pipe;
 	arg.buffer = buffer;
 	arg.transfer_len = transfer_len;
 	arg.interval =  interval;
-	
+
 	return (*ucd->ioctl)(ucd, SUBMIT_INT_MSG, (long)&arg);
 }
 
@@ -192,11 +192,11 @@
 	}
 
 #ifdef INTERRUPTHANDLER
-       /*
-        * Wait for status to update until timeout expires, USB driver
-        * interrupt handler may set the status when the USB operation has
-        * been completed.
-        */
+	/*
+	 * Wait for status to update until timeout expires, USB driver
+	 * interrupt handler may set the status when the USB operation has
+	 * been completed.
+	 */
 	while (timeout--) {
 		if (!((volatile unsigned long)dev->status & USB_ST_NOT_PROC))
 			break;
@@ -207,7 +207,6 @@
 	if (dev->status)
 		return -1;
 
-
 	return dev->act_len;
 }
 
@@ -810,9 +809,9 @@
 		}
 
 		/* See if it's a hub */
-        if (dev->privptr) {
-    		usb_hub_disconnect(dev);
-        }
+		if (dev->privptr) {
+			usb_hub_disconnect(dev);
+		}
 
 		memset(dev, 0, sizeof(struct usb_device));
 		dev->devnum = -1;
@@ -825,8 +824,8 @@
  */
 struct usb_device *usb_get_dev_index(long index)
 {
-    if (index >= USB_MAX_DEVICE)
-        return NULL;
+	if (index >= USB_MAX_DEVICE)
+		return NULL;
 
 	if (usb_dev[index].devnum == -1)
 		return NULL;
@@ -893,7 +892,7 @@
 	struct usb_device *parent = dev->parent;
 
 	DEBUG(("usb_new_device: "));
- 
+
 	/* We still haven't set the Address yet */
 	addr = dev->devnum;
 	dev->devnum = 0;
@@ -923,7 +922,7 @@
 		kfree(desc);
 		return 1;
 	}
-	
+
 	dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0;
 
 	/*
diff -r 3127c773c734 sys/usb/src.km/usb_api.h
--- a/sys/usb/src.km/usb_api.h	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/usb_api.h	Sat Nov 22 11:59:48 2014 +0100
@@ -47,11 +47,11 @@
 
 struct bulk_msg
 {
-	struct usb_device 	*dev;
-	unsigned long 		pipe;
-	void 			*data;
-	long 			len;
-	long                    flags;
+	struct usb_device	*dev;
+	unsigned long		pipe;
+	void				*data;
+	long				len;
+	long				flags;
 };
 
 struct control_msg
@@ -136,7 +136,7 @@
 	long			_cdecl	(*ucd_register)		(struct ucdif *, struct usb_device **);
 	long			_cdecl	(*ucd_unregister)	(struct ucdif *);
 
-        void			_cdecl	(*usb_rh_wakeup)	(void);
+	void			_cdecl	(*usb_rh_wakeup)	(void);
 	long			_cdecl	(*usb_hub_events)	(struct usb_hub_device *dev);
 	long			_cdecl	(*usb_set_protocol)	(struct usb_device *dev, long ifnum, long protocol);
 	long			_cdecl	(*usb_set_idle)		(struct usb_device *dev, long ifnum, long duration,
diff -r 3127c773c734 sys/usb/src.km/usb_defs.h
--- a/sys/usb/src.km/usb_defs.h	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/usb_defs.h	Sat Nov 22 11:59:48 2014 +0100
@@ -80,11 +80,11 @@
 
 /* USB device speeds */
 enum usb_device_speed {
-        USB_SPEED_UNKNOWN = 0,                  /* enumerating */
-        USB_SPEED_LOW, USB_SPEED_FULL,          /* usb 1.1 */
-        USB_SPEED_HIGH,                         /* usb 2.0 */
-        USB_SPEED_WIRELESS,                     /* wireless (usb 2.5) */
-        USB_SPEED_SUPER,                        /* usb 3.0 */
+		USB_SPEED_UNKNOWN = 0,                  /* enumerating */
+		USB_SPEED_LOW, USB_SPEED_FULL,          /* usb 1.1 */
+		USB_SPEED_HIGH,                         /* usb 2.0 */
+		USB_SPEED_WIRELESS,                     /* wireless (usb 2.5) */
+		USB_SPEED_SUPER,                        /* usb 3.0 */
 };
 
 /* Descriptor types */
@@ -226,7 +226,7 @@
 #define USB_PORT_STAT_POWER         0x0100
 #define USB_PORT_STAT_LOW_SPEED     0x0200
 #define USB_PORT_STAT_HIGH_SPEED    0x0400	/* support for EHCI */
-#define USB_PORT_STAT_SUPER_SPEED   0x0600      /* faking support to XHCI */
+#define USB_PORT_STAT_SUPER_SPEED   0x0600	/* faking support to XHCI */
 #define USB_PORT_STAT_SPEED_MASK        \
         (USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED)
 
diff -r 3127c773c734 sys/usb/src.km/util.c
--- a/sys/usb/src.km/util.c	Fri Nov 21 19:04:51 2014 +0100
+++ b/sys/usb/src.km/util.c	Sat Nov 22 11:59:48 2014 +0100
@@ -70,8 +70,8 @@
 		if (c == '/' || c == '\\')
 		{
 			d = s + 1;
-// 			if (c == '\\')
-// 				*s = '/';
+//			if (c == '\\')
+//				*s = '/';
 		}
 		c = *++s;
 	}