Re: aic94xx panic on module insertion

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

 



James Bottomley <James.Bottomley@xxxxxxxxxxxx> wrote:
> On Mon, 2006-07-10 at 10:29 -0700, Mike Anderson wrote:
> > Yes, since we have not formed a port yet on phy1 it would appear that we
> > could just drop this event if port is null as we are going to do discovery
> > post port forming the port anyway.
> 
> OK, so this is the fix?
> 
> James
> 
> diff --git a/drivers/scsi/sas/sas_port.c b/drivers/scsi/sas/sas_port.c
> index 07415e9..d931478 100644
> --- a/drivers/scsi/sas/sas_port.c
> +++ b/drivers/scsi/sas/sas_port.c
> @@ -199,6 +199,12 @@ void sas_porte_broadcast_rcvd(void *data
>  	u32 prim;
>  	struct asd_sas_phy *phy = data;
>  
> +	/* Broadcast received before port forms.  This is fine, since
> +	 * port formation will trigger a domain discovery (rather than
> +	 * revalidation) */
> +	if (!sas->port)
> +		return;
> +
>  	sas_begin_event(PORTE_BROADCAST_RCVD, &phy->ha->event_lock,
>  			&phy->port_events_pending);
>  

or this is the one I was trying, but I cannot generate the events you
where seeing. I was trying to create fake ones but have not been
successful. Either seems like it would address this event.

Index: aic94xx-sas-2.6-patched/drivers/scsi/sas/sas_discover.c
===================================================================
--- aic94xx-sas-2.6-patched.orig/drivers/scsi/sas/sas_discover.c	2006-07-10 11:56:43.000000000 -0700
+++ aic94xx-sas-2.6-patched/drivers/scsi/sas/sas_discover.c	2006-07-10 15:58:44.000000000 -0700
@@ -717,7 +717,11 @@ static void sas_revalidate_domain(void *
 
 int sas_discover_event(struct asd_sas_port *port, enum discover_event ev)
 {
-	struct sas_discovery *disc = &port->disc;
+	struct sas_discovery *disc;
+
+	if (!port)
+		return;
+	disc = &port->disc;
 
 	BUG_ON(ev >= DISC_NUM_EVENTS);
 
-andmike
--
Michael Anderson
andmike@xxxxxxxxxx
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux