linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kallol Biswas <nucleodyne@comcast.net>
Cc: linux-scsi@vger.kernel.org
Subject: How to generate ILI condtion on a tape device
Date: 22 Nov 2003 00:16:48 -0800	[thread overview]
Message-ID: <1069489007.3775.15.camel@driver> (raw)
In-Reply-To: <20031119091717.A11499@beaverton.ibm.com>

Hi,
  I was wondering how to generate ILI condition while reading from a
tape.

A few lines from read_tape(), file st.c
.....
 if (SRpnt->sr_sense_buffer[2] & 0x20) { /* ILI */
             if (STp->block_size == 0) {
                  if (transfer < 0) {
                         if (STps->drv_block >= 0)
                             STps->drv_block+= 1;
                             return (-ENOMEM);
                  }
                  (STp->buffer)->buffer_bytes = bytes - transfer;
              } else {
                    scsi_release_request(SRpnt);
                    SRpnt = *aSRpnt = NULL;
                    if (transfer == blks) { /* We did not get anything,
error */
                       printk(KERN_NOTICE "st%d: Incorrect block
size.\n", dev);
                                                                      
                if(STps->drv_block>=0)                                                                               STps->drv_block+= blks - transfer + 1;
                                                                                st_int_ioctl(STp, MTBSR, 1);
                        return (-EIO);
                      }
 /* We have some data, deliver it */
                                               
(STp->buffer)->buffer_bytes = (blks - transfer) * STp->block_size;
                
        DEBC(printk(ST_DEB_MSG                                                        "st%d: ILI but enough data received %ld %d.\n",
               dev, count, (STp->buffer)->buffer_bytes));
         if (STps->drv_block >= 0)
                STps->drv_block += 1;
        if (st_int_ioctl(STp, MTBSR, 1))    return (-EIO);
       }

I want to make the driver print the message "ILI but enough data
received." to generate an error condition that my new driver (similar to
tape driver) encountering while running with a software from Veritas.



-- 
Kallol Biswas <nucleodyne@comcast.net>
www.nucleodyne.com


  parent reply	other threads:[~2003-11-22  8:18 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-23 12:04 Request for review of Linux iSCSI driver version 4.0.0.1 Krishna Murthy
2003-10-27 15:39 ` Christoph Hellwig
2003-10-29 13:23   ` Surekha.PC
2003-10-29 13:45     ` 'Christoph Hellwig'
2003-10-29 17:28       ` Mike Christie
2003-10-29 18:45         ` Clay Haapala
2003-10-29 19:01           ` Mike Christie
2003-10-29 19:17             ` Clay Haapala
2003-10-29 19:33               ` Mike Christie
2003-10-30 23:42                 ` Andre Hedrick
2003-10-30 13:34         ` jd
2003-11-11 11:56       ` Naveen Burmi
2003-11-11 17:36         ` 'Christoph Hellwig'
2003-11-19 12:40           ` Krishna Murthy
2003-11-19 12:49             ` Matthew Wilcox
2003-11-19 13:38             ` 'Christoph Hellwig'
2003-11-11 17:40         ` James Bottomley
2003-11-06  9:42   ` Sachin Mhatre (smhatre)
2003-11-06 10:09     ` 'Christoph Hellwig'
2003-11-07  8:55       ` Douglas Gilbert
2003-11-07  9:30         ` 'Christoph Hellwig'
2003-11-10 17:43         ` Patrick Mansfield
2003-11-06 11:10     ` Andre Hedrick
2003-11-06 11:14       ` 'Christoph Hellwig'
2003-11-13 14:30   ` Sachin Mhatre (smhatre)
2003-11-13 14:54     ` Matthew Wilcox
2003-11-19 13:04   ` Sachin Mhatre (smhatre)
2003-11-19 13:10     ` 'Christoph Hellwig'
2003-11-19 14:48   ` Naveen Burmi
2003-11-19 14:48     ` Christoph Hellwig
2003-11-19 15:19       ` Naveen Burmi
2003-11-19 15:20         ` Christoph Hellwig
2003-12-01 12:10       ` Krishna Murthy
2003-12-01 15:22         ` James Bottomley
2003-12-04 12:30           ` N.C.Krishna Murthy
2003-12-05 15:33             ` James Bottomley
2003-12-05 17:03               ` Brian King
2003-12-08 15:06               ` N.C.Krishna Murthy
2003-12-08 15:46                 ` Scott M. Ferris
2003-12-10 15:01                   ` N.C.Krishna Murthy
2003-12-10 16:50                     ` Scott M. Ferris
2003-12-11 14:48               ` N.C.Krishna Murthy
2003-12-01 15:27         ` Christoph Hellwig
2003-12-02  5:52           ` N.C.Krishna Murthy
2003-12-02 16:59             ` Patrick Mansfield
2003-11-19 17:17     ` Patrick Mansfield
2003-11-20 13:32       ` Naveen Burmi
2003-11-20 13:34         ` Christoph Hellwig
2003-11-20 14:53           ` Naveen Burmi
2003-11-22  8:16       ` Kallol Biswas [this message]
2003-11-24  8:31         ` How to generate ILI condtion on a tape device Josef Möllers
2003-11-25  7:58           ` Kallol Biswas
2003-11-21 16:42   ` Request for review of Linux iSCSI driver version 4.0.0.1 Clay Haapala
2003-11-21 17:32     ` Matthew Wilcox
2003-11-21 18:18       ` Clay Haapala
2003-11-26 13:41         ` Christoph Hellwig
2003-11-24  6:09   ` Surekha.PC
2003-11-24  7:48     ` 'Christoph Hellwig'
2003-11-24 20:45       ` Patrick Mansfield
2003-11-26 13:45         ` 'Christoph Hellwig'
2003-12-11 12:31       ` Naveen Burmi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1069489007.3775.15.camel@driver \
    --to=nucleodyne@comcast.net \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).