Re: [Bugme-new] [Bug 13496] New: usb-storage driver is crashing on E220 HSDPA Modem / E270 HSDPA/HSUPA Modem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 15 Jun 2009, Andrew Morton wrote:

> > http://bugzilla.kernel.org/show_bug.cgi?id=13496
> > 
> >            Summary: usb-storage driver is crashing on E220 HSDPA Modem /
> >                     E270 HSDPA/HSUPA Modem

This bug report contains two separate problems.  This is the first one:

> > [  204.467771] BUG: scheduling while atomic: swapper/0/0x10010000
....
> > [  204.467973] EIP is at acpi_idle_enter_simple+0xfd/0x138
...
> > [  204.468023] Call Trace:
> > [  204.468036]  [<c0315e8a>] acpi_idle_enter_bm+0x63/0x1fd
> > [  204.468049]  [<c04068cf>] cpuidle_idle_call+0x6f/0xc0
> > [  204.468059]  [<c0101eb0>] cpu_idle+0x60/0xa0
> > [  204.468071]  [<c04e5785>] rest_init+0x55/0x60
> 
> This looks like a lock imbalance - a spinlock or an rwlock.  Could also
> be a preempt_disable() imbalance.

Whatever it is, it is unlikely to be related to usb-storage.

The second problem is this:

[ 2109.971307] WARNING: at
/home/kernel-ppa/mainline/build/fs/proc/generic.c:547
proc_register+0xa0/0x130()
[ 2109.971316] Hardware name: 23736YU
[ 2109.971321] proc_dir_entry 'scsi/usb-storage' already registered

This was caused by a bug, not in usb-storage, but in the SCSI core.  
The bug was in a patch I wrote.  In fact, it was in the second version 
of the patch; the first version probably was correct.

Here is a combined patch (it reverts the second and adds the first).  
Does it fix the "proc_dir_entry already registered" problem?

Alan Stern


Index: usb-2.6/drivers/scsi/hosts.c
===================================================================
--- usb-2.6.orig/drivers/scsi/hosts.c
+++ usb-2.6/drivers/scsi/hosts.c
@@ -176,6 +176,7 @@ void scsi_remove_host(struct Scsi_Host *
 	transport_unregister_device(&shost->shost_gendev);
 	device_unregister(&shost->shost_dev);
 	device_del(&shost->shost_gendev);
+	scsi_proc_hostdir_rm(shost->hostt);
 }
 EXPORT_SYMBOL(scsi_remove_host);
 
@@ -205,9 +206,10 @@ int scsi_add_host(struct Scsi_Host *shos
 	if (error)
 		goto fail;
 
+	scsi_proc_hostdir_add(shost->hostt);
+
 	if (!shost->shost_gendev.parent)
 		shost->shost_gendev.parent = dev ? dev : &platform_bus;
-
 	error = device_add(&shost->shost_gendev);
 	if (error)
 		goto out;
@@ -258,6 +260,7 @@ int scsi_add_host(struct Scsi_Host *shos
  out_del_gendev:
 	device_del(&shost->shost_gendev);
  out:
+	scsi_proc_hostdir_rm(shost->hostt);
 	scsi_destroy_command_freelist(shost);
  fail:
 	return error;
@@ -269,8 +272,6 @@ static void scsi_host_dev_release(struct
 	struct Scsi_Host *shost = dev_to_shost(dev);
 	struct device *parent = dev->parent;
 
-	scsi_proc_hostdir_rm(shost->hostt);
-
 	if (shost->ehandler)
 		kthread_stop(shost->ehandler);
 	if (shost->work_q)
@@ -408,7 +409,6 @@ struct Scsi_Host *scsi_host_alloc(struct
 		goto fail_kfree;
 	}
 
-	scsi_proc_hostdir_add(shost->hostt);
 	return shost;
 
  fail_kfree:

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux