Re: Kernel bug.

Paul (PELaufer@csupomona.edu)
Wed, 20 Jan 1999 22:30:41 -0800 (PST)


One thing that will cause this is changing HZ to 1024, as seems to be a
popular thing to do lately. It causes an overflow in the general scsi
timeout variable. The following one line patch fixes this - as will
changing HZ back to 1024. Again, this is only for the case where you have
changed HZ to 1024! If you haven't touched HZ, then there is another
problem.

Paul Laufer

--- drivers/scsi/sg.c.orig Wed Jan 20 22:27:14 1999
+++ drivers/scsi/sg.c Wed Jan 20 22:27:29 1999
@@ -54,7 +54,7 @@
struct wait_queue *generic_wait; /* wait for device to be available
*/
struct wait_queue *read_wait; /* wait for response */
struct wait_queue *write_wait; /* wait for free buffer */
- int timeout; /* current default value for device */
+ long timeout; /* current default value for device */
int buff_len; /* length of current buffer */
char *buff; /* the buffer */
struct sg_header header; /* header of pending command */

On 20 Jan 1999, Eloy A. Paris wrote:

> I hate to say that I too am seeing this nasty behavior...
>
> peloy.-
>
> Magnus Holmberg <pucko@lysator.liu.se> wrote:
> >
> > I don't know to who I shall send a bugreport so I tried to you because you
> > are fameous.
> >
> > I just patched my kernel from 2.2.0pre7 to 2.2.0pre8 and Got some trouble:
> > I have compiled in scsi emulation and generic SCSI the same way that works
> > in 2.2.0pre7 and now I get this:
> >
> > SCSI1: SCSI HOST adapter emulation for ide atapi drives
> > .........
> >
> > SCSI bus is being reset for host 1 chanel 0
> > SCSI: aborting command due to timeout: pid 9 SCSI 1, chanel 0, id 0, lun 1
> > Rewuest sense 20 00 00 10 00
> >
> > It works with the same configuration in the pre7 kernel
> >
> > /Magnus
> >
> >
> > _|_|_| _| _| _|_|_| _| _| _|_|
> > _| _| _| _| _| _| _| _| _|
> > _|_|_| _| _| _| _|_| _| _|
> > _| _| _| _| _| _| _| _|
> > _| _|_| _|_|_| _| _| _|_|
> >
> >
> > --==** LIVETS VATTEN **==--
> >
> >
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.rutgers.edu
> > Please read the FAQ at http://www.tux.org/lkml/
> >
>
> --
>
> Eloy A. Paris
> Information Technology Department
> Rockwell Automation Venezuela
> Telephone: +58-2-9432311 Fax: +58-2-9431645
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/