Re: Linux SCSI Driver for Mass Storage Device

From: David A.Lethe (davidATsantools.com)
Date: 02/20/04

  • Next message: Josef Möllers: "Re: Linux SCSI Driver for Mass Storage Device"
    Date: Fri, 20 Feb 2004 01:31:55 -0600
    
    

    On 19 Feb 2004 19:49:48 -0800, cherie_wang@hotmail.com (YCWang) wrote:

    >I wonder how to write a driver for a pci device which is a mass
    >storage device.
    >I think write a scsi low level driver is simpler than write a block
    >device driver. But I don't know which scsi commands I should implement
    >for my mass storage device. I know that my device belongs to scsi
    >disk. Is it enough if I implement all scsi commands appears in sd.c?
    >Thanks a lot& best regard
    >Cherie Wang

    You must implement all of the commands that are mandatory for that
    particular device class, according to the ANSI spec.

    You should also assume that you can't assume that application software
    would send invalid CDBs. As the ANSI spec is very specific on what
    sense info gets returned for various types of invalid CDBs, you have
    to make sure you process them correctly. The storage device should
    already report the proper sense info if it receives munged or invalid
    commands, so just pass them through.

    If your device type (disk, tape, cd, controller, etc...) is the same
    as one that is already supported by the O/S, then you would also have
    to write code to prevent the O/S from loading the built-in driver.


  • Next message: Josef Möllers: "Re: Linux SCSI Driver for Mass Storage Device"

    Relevant Pages

    • Re: Linux SCSI Driver for Mass Storage Device
      ... >I think write a scsi low level driver is simpler than write a block ... >for my mass storage device. ... Is it enough if I implement all scsi commands appears in sd.c? ... sense info gets returned for various types of invalid CDBs, ...
      (comp.os.linux.hardware)
    • Re: CETK Tests for NAND Flash
      ... > I am working on NAND Flash driver for 32 Mbyte NAND Flash. ... > I want to know if the Storage Device Benchmark Tests are applicable to ... > The Storage Device Block Driver Benchmark Test analyzes the performance ...
      (microsoft.public.windowsce.platbuilder)
    • Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel
      ... storage device might not be ready yet when it runs, ... the assertion in the comment that probing is done is absolutely ... driver_probe_done() tests a variable that's incremented just before the driver model calls into the driver .probe method and decremented on return from it. ... if the entire module_initis async the probing may not even have _started_ yet let alone finished. ...
      (Linux-Kernel)
    • Re: USB Function driver (MAINSTONEII CSP)
      ... Does anybody have this driver working? ... Then it normally detects the Reset condition " if ... > storage device is already open. ... > Opened endpoint 0x2 ...
      (microsoft.public.windowsce.platbuilder)
    • Re: IOCTL_SCSI_PASS_THROUGH fails with error 50
      ... My task is to send SCSI commands to a mass storage device. ... Disk is the physical disk device, where the SCSI commands are sent. ... In the simplest case, usual for USB flash drives, Volume is 1 partition occupying the whole Disk, but this is not always so. ...
      (microsoft.public.development.device.drivers)