lkml.org 
[lkml]   [2004]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.5-rc1 SCSI + st regressions (was: Linux 2.6.5-rc1)
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/
\
 
 \ /
  Last update: 2005-03-22 14:01    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site