Commit 3bb23158 authored by Robert Sprowson's avatar Robert Sprowson

Correct case sensitive compare never matching

In the module post init service call handler SCSIdriver -> SCSIDriver. While a caseless compare would also solve this, the only disc loading copy in RO5x0Hook loads the disc based SCSIDriver first anyway, so there's always a matched set there (as in ROM). Remove unused module post final service call handler too.
module.c: adjust case, remove unused code
modhdr.cmhg: remove unused service call table entry
glue.c: adjust case (of debug/comments)
Makefile: simplified given recent shared makefile improvements, notably the debug flags are now picked up from CDFLAGS/CMHGDFLAGS based on the target
!MkDebug/!MkRam: pass in the target for which the obey file relates rather than 'all'

Version 0.21. Tagged as 'SCSISoftUSB-0_21'
parent da39d756
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all THROWBACK=-throwback DEBUG=TRUE
amu_machine debug THROWBACK=-throwback
......@@ -13,5 +13,5 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all THROWBACK=-throwback
amu_machine standalone THROWBACK=-throwback
| Copyright 2005 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all THROWBACK=-throwback
amu_machine gpa.SCSISoftUSB THROWBACK=-throwback
......@@ -14,39 +14,23 @@
#
# Makefile for SCSISoftUSB
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 29-Apr-2003 BJGA Created.
DEBUG ?= FALSE
ifeq ($(DEBUG),TRUE)
CFLAGS += -DDEBUGLIB -DUMASS_DEBUG -DUSB_DEBUG
CMHGFLAGS += -DDEBUGLIB -DUMASS_DEBUG -DUSB_DEBUG
LIBS = ${DEBUGLIBS} ${NET5LIBS}
endif
COMPONENT = SCSISoftUSB
TARGET = SCSISoftUSB
TARGET ?= SCSISoftUSB
OBJS = global glue module umass umass_quirks asm
CMHGFILE = modhdr
HDRS =
CINCLUDES = -ITCPIPLibs:,C:USB
CFLAGS += -ffah -wp -wc -we -zM -zps1 -DDISABLE_PACKED -D_KERNEL
CFLAGS += -wp -wc -we -DDISABLE_PACKED -D_KERNEL
CMHGFILE = modhdr
CMHGDEPENDS = glue module
RAMCDEFINES = -DSTANDALONE
CDFLAGS += -DDEBUGLIB -DUMASS_DEBUG -DUSB_DEBUG
CMHGDFLAGS += -DDEBUGLIB -DUMASS_DEBUG -DUSB_DEBUG
RES_OBJ = resmess
RES_AREA = resmess_ResourcesFiles
RES_OBJ = resmess
RES_AREA = resmess_ResourcesFiles
include StdTools
include ModStdRule
include ModuleLibs
include DbgRules
include CModule
DBG_LIBS += ${SOCK5LIB} ${INETLIB}
# Dynamic dependencies:
/* (0.20)
/* (0.21)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.20
#define Module_MajorVersion_CMHG 0.21
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 30 Jan 2016
#define Module_Date_CMHG 10 Mar 2016
#define Module_MajorVersion "0.20"
#define Module_Version 20
#define Module_MajorVersion "0.21"
#define Module_Version 21
#define Module_MinorVersion ""
#define Module_Date "30 Jan 2016"
#define Module_Date "10 Mar 2016"
#define Module_ApplicationDate "30-Jan-16"
#define Module_ApplicationDate "10-Mar-16"
#define Module_ComponentName "SCSISoftUSB"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/SCSI/SCSISoftUSB"
#define Module_FullVersion "0.20"
#define Module_HelpVersion "0.20 (30 Jan 2016)"
#define Module_LibraryVersionInfo "0:20"
#define Module_FullVersion "0.21"
#define Module_HelpVersion "0.21 (10 Mar 2016)"
#define Module_LibraryVersionInfo "0:21"
......@@ -190,7 +190,7 @@ void glue_DetachDevice(my_usb_device_t *device)
if (device->command_active && softc->transfer_priv != NULL)
{
softc->transfer_priv = NULL; /* if we're interrupting ticker processing, no longer try to do a callback at end of ticker */
DEBUGf("Calling SCSIdriver from DetachDevice\n");
DEBUGf("Calling SCSIDriver from DetachDevice\n");
asm_DoTransferCompleteCallback((_kernel_oserror *)(ErrorNumber_SCSI_Died & 0xFF),
0,
device->callback,
......@@ -276,7 +276,7 @@ void glue_ResetDevice(my_usb_device_t *device, int reason)
/* Do callback if necessary */
if (softc->transfer_priv != NULL)
{
DEBUGf("Calling SCSIdriver from ResetDevice\n");
DEBUGf("Calling SCSIDriver from ResetDevice\n");
asm_DoTransferCompleteCallback(device->callback_error,
device->callback_status_byte,
device->callback,
......@@ -431,7 +431,7 @@ _kernel_oserror *glue_DoCommand(my_usb_device_t *device, uint32_t lun, uint32_t
/* Do callback */
if (softc->transfer_priv != NULL)
{
DEBUGf("Calling SCSIdriver from DoCommand\n");
DEBUGf("Calling SCSIDriver from DoCommand\n");
asm_DoTransferCompleteCallback(device->callback_error,
device->callback_status_byte,
device->callback,
......@@ -720,7 +720,7 @@ void glue_Tick(my_usb_device_t *device)
if (softc->transfer_priv != NULL)
{
DEBUGCHAR('K');
DEBUGf("Calling SCSIdriver from Tick, addr=%x err=%x r0=%x r4=%x r5=%x r12=%x\n", (int)device->callback, (int)device->callback_error, device->callback_status_byte, device->callback_not_transferred, (int)device->callback_pw, (int)device->callback_wp);
DEBUGf("Calling SCSIDriver from Tick, addr=%x err=%x r0=%x r4=%x r5=%x r12=%x\n", (int)device->callback, (int)device->callback_error, device->callback_status_byte, device->callback_not_transferred, (int)device->callback_pw, (int)device->callback_wp);
asm_DoTransferCompleteCallback(device->callback_error,
device->callback_status_byte,
device->callback,
......
......@@ -358,7 +358,7 @@ void module_Service(int service_number, _kernel_swi_regs *r, void *pw)
break;
case Service_ModulePostInit:
if (strcmp((const char *)r->r[2], "SCSIdriver") == 0)
if (strcmp((const char *)r->r[2], "SCSIDriver") == 0)
{
_swix(OS_RemoveTickerEvent, _INR(0,1),
module_scsiregister_handler,
......@@ -368,19 +368,13 @@ void module_Service(int service_number, _kernel_swi_regs *r, void *pw)
device->registered = false;
}
_swix(OS_CallAfter, _INR(0,2),
1, /* No point using a long delay if SCSIdriver has only just started */
1, /* No point using a long delay if SCSIDriver has only just started */
module_scsiregister_handler,
global_PrivateWord);
}
break;
case Service_ModulePostFinal:
if (strcmp((const char *)r->r[2], "SCSIdriver") == 0)
{
}
break;
case Service_PreReset:
No_New_Stuff=true;
break;
......@@ -434,7 +428,7 @@ _kernel_oserror *module_SCSIRegister(_kernel_swi_regs *r, void *pw)
global_PrivateWord);
return NULL;
}
/* Instead of registering the devices directly from this ticker event, register them from a callback. This ensures SCSIdriver's malloc()s can enlarge the RMA if needed. */
/* Instead of registering the devices directly from this ticker event, register them from a callback. This ensures SCSIDriver's malloc()s can enlarge the RMA if needed. */
Registering = true;
_swix(OS_AddCallBack, _INR(0,1),
module_scsiregister_cb_handler,
......
......@@ -36,7 +36,6 @@ finalisation-code: module_Final
service-call-handler: module_Service Service_MessageFileClosed,
Service_ModulePostInit,
Service_ModulePostFinal,
Service_PreReset,
Service_USB,
Service_DeviceDead
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment