Re: [PATCH 03/51] sym53c8xx_2: split off bus reset from host reset

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

 



On Tue, Aug 17, 2021 at 11:14:08AM +0200, Hannes Reinecke wrote:
> The current handler does both, bus reset and host reset.
> So split them off into two distinct functions.

Well, it splits out both the bus and the host reset from sym_eh_handler,
which also handles abort and device reset.

> +	/*
> +	 * Escalate to host reset if the PCI bus went down
>  	 */

That's a pretty big change from the old code and warrants a little
explanation.  I suspect this is fine, but I'd like to read the
thoughts about it in the commit log.

> +	spin_lock_irq(shost->host_lock);
> +	sym_reset_scsi_bus(np, 1);
> +	spin_unlock_irq(shost->host_lock);

This loses the cmd_queued handling.  Which I guess should be fine, but
again needs to be properly documented.  Same for the host reset.

> +						(sym_data->io_reset,
> +						WAIT_FOR_PCI_RECOVERY*HZ);
> +		spin_lock_irq(shost->host_lock);
> +		sym_data->io_reset = NULL;
> +		spin_unlock_irq(shost->host_lock);
> +	}
> +
> +	if (finished_reset) {
> +		sym_reset_scsi_bus(np, 0);
> +		sym_start_up(shost, 1);
> +	}
> +
> +	shost_printk(KERN_WARNING, shost, "HOST RESET operation %s.\n",
> +			finished_reset==1 ? "complete" : "failed");
> +	return finished_reset ? SCSI_SUCCESS : SCSI_FAILED;

The old code just returned early for the !finished_reset case, why
does this change it?



[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