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

[MiNT] [PATCH][4/6] USB. Use MiNT's XHDOSLimits when running under MiNT



Commit message:

Use kernel limits (XHDOSLimits) when the driver is running as a module
under MiNT.

Contributed by David Gálvez.
diff -r 3d344365bc8a -r 379ea6192a19 sys/usb/src.km/udd/storage/xhdi.c
--- a/sys/usb/src.km/udd/storage/xhdi.c	Fri Apr 17 17:57:46 2015 +0200
+++ b/sys/usb/src.km/udd/storage/xhdi.c	Fri Apr 17 18:00:18 2015 +0200
@@ -86,6 +86,7 @@
 long
 sys_XHDOSLimits(ushort which,ulong limit)
 {
+#ifdef TOSONLY
 	static long dl_secsiz, dl_clusts, dl_maxsec, dl_clusts12;
 	static int first_time = 1;
 
@@ -111,7 +112,7 @@
 			dl_maxsec = 65535L;     /* max partition size = 512MB approx */
 			dl_clusts12 = MAX_FAT12_CLUSTERS;
 		}
-		else                        /* i.e. TOS 4.0x or FreeMiNT */
+		else                        /* i.e. TOS 4.0x */
 		{
 			dl_secsiz = MAX_LOGSEC_SIZE;
 			dl_clusts = 32766L;
@@ -178,6 +179,9 @@
 				return 0x00000001L;
 		}
 	}
+#else
+	return xhdoslimits(which, limit);
+#endif /* TOSONLY */
 
 	return ENOSYS;
 }