Thread (3 messages) flat view 3 messages, 3 authors, 2002-09-20

Re: [PATCH]: HotSwap SCSI in Soft RAID1 (scsi_rescan)

From: Mike Anderson <hidden>
Date: 2002-09-20 19:35:47
Also in: linux-scsi

Cress, Andrew R [andrew.r.cress@intel.com] wrote:
quoted hunk ↗ jump to hunk
--- linux-2.4.18-orig/drivers/scsi/scsi.c	Wed Aug 28 20:38:13 2002
+++ linux-2.4.18/drivers/scsi/scsi.c	Thu Aug 29 08:08:57 2002
@@ -1999,6 +1999,9 @@
 				(*sdtpnt->finish) ();
 			}
 		}
+		for (shpnt = scsi_hostlist; shpnt; shpnt = shpnt->next) {
+			shpnt->init_done = 1;
+		}
 	}
This could probably be done in a upper loop (maybe not to avoid unit
attentions)  or at least only on the adapter template that is being
registered.
+
+			if (!in_interrupt()) {
+			   /* Check if we need to rescan after a reset.
ARC*/
+			   if (SDpnt->host->need_scan == 1) {
+				SDpnt->host->need_scan = 2;
+				spin_unlock_irq(&io_request_lock);
+				scsi_rescan(SDpnt->host,SDpnt->channel);
+				spin_lock_irq(&io_request_lock);
+				SDpnt->host->need_scan = 0;
+			   }
+			}
 		}
I do not have a suggestion on where to move this, but you could be
called under memory pressure which is probably not the best
time to be allocating chunks of memory.

-andmike
-- 
Michael Anderson
andmike@us.ibm.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help