Chris' USB mass storage kit V1.1

1 Introduction

After purchasing my Archos Jukebox Recorder, a portable MP3 player which may also be used as an external USB harddisk, I had to discover that the USB mass storage drivers floating around on my disk don't work with this gadget despite the fact that the device is USB mass storage class compliant.

The drivers in this archive are mainly written to support the Jukebox (read a HowTo here) but also work with other USB mass storage devices. If you find your particular USB device is supported by the driver drop me a note. Please use the USBRES.ZIP package available on ftp://ftp.netlabs.org/pub/usb to get the Vendor- and Product-ID of your device and include this information in your mail.

The following drivers are included:

CWUSBUHC.SYS UHCI compliant USB host controller driver
CWUSBOHC.SYS OHCI compliant USB host controller driver
CWUSBD.SYS USB driver
CWUSBMSD.SYS Enhanced USB mass storage class driver


2 UHCI compliant host controller driver

This driver is based on the sources available on the DDK site. It does not have the feature set of the latest IBM driver downloadable with software choice. If you already have a (maybe better) working driver from there feel free to use that one. Unlike the latest IBM drivers only one controller chip is supported with this driver. When loading this driver twice you system may freeze when attaching an USB device (at least my system does).

Use this driver if your USB controller chip is UHCI compliant (for example Intel and VIA chipsets). Refer to your mainboard documentation if in doubt.

The driver supports the following switches:

/V Verbose, show some information while booting.
/FS Forces driver to stop USB host during OS/2 shutdown process. This parameter can be used to prevent POST (power on system test) failure on some hardware with legacy keyboard.

Add the following line to CONFIG.SYS to install the driver:

  [...]
  BASEDEV=CWUSBUHC.SYS /V
  [...]


3 OHCI compliant host controller driver

This driver is based on the sources available on the DDK site. It does not have the feature set of the latest IBM driver downloadable with software choice. If you already have a (maybe better) working driver from there feel free to use that one. Unlike the latest IBM drivers only one controller chip is supported with this driver. When loading this driver twice you system may freeze when attaching an USB device (at least my system does).

Use this driver if your USB controller chip is OHCI compliant. Refer to your mainboard documentation if in doubt.

The driver supports the following switches:

/V Verbose, show some information while booting.
/FS Forces driver to stop USB host during OS/2 shutdown process. This parameter can be used to prevent POST (power on system test) failure on some hardware with legacy keyboard.

Add the following line to CONFIG.SYS to install the driver:

  [...]
  BASEDEV=CWUSBOHC.SYS /V
  [...]


4 USB driver

This driver is based on the sources available on the DDK site. It does not have the feature set of the latest IBM driver downloadable with software choice. If you already have a (maybe better) working driver from there feel free to use that one.

The driver supports the following switches:
/V Verbose, show some information while booting.
/I13 parameter could be used to delay USB host overtaking by USB driver stack until other device driver finishes required initialization operations and then send request to USBD driver to start USB service. It could be used to boot from USB floppy drive.
/REQ This parameter controlls USBD driver initialization: driver at initalization time checks for listed host controller drivers and fails to install if none of listed drivers is loaded. Current version of USB stack supports the following parameter codings:

/REQ:USBUHCD$
/REQ:CWUSBUHC$ USBD driver is loaded only if UHCI compliant host driver is loaded

/REQ:USBOHCD$
/REQ:CWUSBOHC$ USBD driver is loaded only if OHCI compliant host driver is loaded

/REQ:USBUHCD$,USBOHCD$,CWUSBOHC$,CWUSBUHC$
USBD driver is loaded only if one of OHCI/UHCI compliant host drivers is loaded. This most general form of parameter and must be used in most cases.

Add the following line to CONFIG.SYS to install the driver:

  [...]
  BASEDEV=CWUSBD.SYS /V 
  [...]


5 USB mass storage class driver

Enhanced USB mass storage driver which supports more (or other) devices than the IBM version. Support for READ 10 commands and better disk geometry handling. Can force external hard disks to appear as removable devices.

The driver supports the following switches:

/V Verbose, show some information while booting.
/FLOPPIES:n Number of floppy devices to be served (by default 1). In order to remove service the key value must be set to 0.
/A_USAGE:n Parameter controls usage of 'A' drive flag for the 1st floppy device. The following values of n can be used:

0 - 'A' drive flag is not used;
1 - 'A' drive flag is used;
2 (default value) - 'A' drive flag is used only if there is no other device driver using this flag.

/MAX_FLOPPY Parameter forces driver to report floppy device geometry with maximal sector count as floppy device physical geometry. With this parameter driver supports LS-120 media formatting but does not support XDF floppy filter features and vice versa.
/REMOVABLES:n Number of removable media devices to be served (by default 1).
/FIXED_DISKS:n Number of fixed disks to be served.
/CDS:n Number of CD-ROM/CD-RW devices to be served (by default 1).
/REMOVABLE_AS_FLOPPY System uses removable disks as partitioned volumes:

BASEDEV=USBMSD.ADD /REMOVABLE_AS_FLOPPY

/FORCE_TO_REMOVABLE Change external hard disks (for example Archos Jukebox) to removable. This may be necessary if a device anounces itself as a fixed disk but you want to use it as a removable device.

Add the following line to CONFIG.SYS to install the driver:

  [...]
  BASEDEV=CWUSBMSD.ADD /V /FLOPPIES:0 /REMOVABLES:1 /FIXED_DISKS:0 /FORCE_TO_REMOVABLE
  [...]


6 Installation

Copy the files *.SYS and *.ADD to your \OS2\BOOT directory. Add the following lines to your config.sys then reboot.
  [...]
  BASEDEV=CWUSBUHC.SYS /V   **** If you have an OHCI chipset use CWUSBOHC.SYS
  BASEDEV=CWUSBD.SYS /V 
  BASEDEV=CWUSBMSD.ADD /V /FLOPPIES:0 /REMOVABLES:1 /FIXED_DISKS:0 /FORCE_TO_REMOVABLE
  [...]

7 Usage

After attaching an USB device to your system you should hear a short beep. If not, the device is not recognized by the mass storage driver. Check if the drivers are loaded using the hardware manager. Make sure you attached to the right port.

If you hear the beep but you can't switch to the device afterwards the disk geometry wasn't determined properly. This means your device isn't supported.

Before detaching a device make sure you eject the media using the eject command or the context menu! Even if you have a device without changeable media (for example a memory stick) this is necessary to close the filesystem.


8 Known problems


9 Tested devices

I tested the mass storage driver with the following devices. Only reading and writing was tested. I don't know if media formatting works.


10 License

 THIS SOFTWARE IS PROVIDED ``AS IS'' AND
 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 SUCH DAMAGE.
In short, if it burns your house it's all your fault.

11 Author

Copyright (c) Chris Wohlgemuth 2002.

http://www.geocities.com/SiliconValley/Sector/5785/index.html

http://www.os2world.com/cdwriting