Re: 2.6.5-rc1 SCSI + st regressions (was: Linux 2.6.5-rc1)

From: Kai Makisara (Kai.Makisara_at_kolumbus.fi)
Date: 03/17/04

  • Next message: Scott Long: "Re: "Enhanced" MD code avaible for review"
    Date:	Wed, 17 Mar 2004 23:18:40 +0200 (EET)
    To: Matthias Andree <ma+lscsi@dt.e-technik.uni-dortmund.de>
    
    

    On Wed, 17 Mar 2004, Kai Makisara wrote:

    > On Tue, 16 Mar 2004, Matthias Andree wrote:
    >
    > > On Tue, 16 Mar 2004, Matthew Wilcox wrote:
    > >
    > > > On Tue, Mar 16, 2004 at 10:12:03PM +0100, Matthias Andree wrote:
    > > > > I have some SCSI troubles with 2.6.5-rc1 (from BK) that 2.6.4 didn't
    > > > > have.
    > > > >
    > > > > Modprobe, loading the st driver, tries a NULL pointer dereference in
    > > > > kernel space and my 2nd tape drive isn't found: st1 is not shown. cat
    > > > > /proc/scsi/scsi (typed after the attempted zero page dereference) hangs
    > > > > in rwsem_down_read_failed with process state D.
    > > >
    > > > I notice you're using the sym2 driver. Could you try backing out the
    > > > changes made to it in 2.6.5-rc1, just to be sure we're looking at an st
    > > > problem, not a sym2 problem?
    > >
    ...
    > st.c is using the name put into kobj.name in making
    > the class file names. I will make a patch that removes this dependency.
    >
    The patch at the end of this message removes the dependency on the kobj
    name being set. It also tries to once more restore the naming that is
    defined in devices.txt. The patch is against 2.6.5-rc1-bk2 and it seems to
    work correctly in my tests.

    -- 
    Kai
    ------------------------------8<-------------------------------------------
    --- linux-2.6.5-rc1-bk2/drivers/scsi/st.c	2004-03-17 22:37:11.000000000 +0200
    +++ linux-2.6.5-rc1-bk2-k1/drivers/scsi/st.c	2004-03-17 23:03:57.000000000 +0200
    @@ -17,7 +17,7 @@
        Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
      */
     
    -static char *verstr = "20040226";
    +static char *verstr = "20040317";
     
     #include <linux/module.h>
     
    @@ -4193,19 +4193,24 @@
     
     static void do_create_class_files(Scsi_Tape *STp, int dev_num, int mode)
     {
    -	int rew, error;
    +	int i, rew, error;
    +	char name[10];
     	struct class_device *st_class_member;
     
     	if (!st_sysfs_class)
     		return;
     
     	for (rew=0; rew < 2; rew++) {
    +		/* Make sure that the minor numbers corresponding to the four
    +		   first modes always get the same names */
    +		i = mode << (4 - ST_NBR_MODE_BITS);
    +		snprintf(name, 10, "%s%s%s", rew ? "n" : "",
    +			 STp->disk->disk_name, st_formats[i]);
     		st_class_member =
     			class_simple_device_add(st_sysfs_class,
     						MKDEV(SCSI_TAPE_MAJOR,
     						      TAPE_MINOR(dev_num, mode, rew)),
    -						&STp->device->sdev_gendev, "%s",
    -						STp->modes[mode].cdevs[rew]->kobj.name);
    +						&STp->device->sdev_gendev, "%s", name);
     		if (!st_class_member) {
     			printk(KERN_WARNING "st%d: class_simple_device_add failed\n",
     			       dev_num);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Scott Long: "Re: "Enhanced" MD code avaible for review"

    Relevant Pages

    • Re: OOPS - APIC or othere?
      ... > dependency to some other functionality? ... There were no OOPS issues related with that patch. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [2.4 patch] let SCSI_SATA_NV depend on EXPERIMENTAL
      ... Since it depends on EXPERIMENTAL in 2.6, I'd sugget the patch below to ... add this dependency in 2.4, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.8-rc2-mm1
      ... > The following issue comes from Linus' tree: ... > The patch below adds a dependency on JFFS2_FS to ... please add the dependency on JFFS2_FS). ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.8-rc2-mm1
      ... JFFS2_COMPRESSION_OPTIONS is asked even if JFFS2_FS support isn't ... The patch below adds a dependency on JFFS2_FS to ... I've also added a dependency on EXPERIMENTAL which seemed to be logical ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [parisc-linux] Re: [PATCH 3/9] mm: parisc pte atomicity
      ... using your own tmpalias area sounds much better than getting ... I've simply not wrapped my head around the races, ... it looks like we agree that my patch is necessary and valid as is; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)